]> git.sur5r.net Git - openldap/blob - configure
Add BDB version mismatch check
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.539 2004/04/19 19:36:53 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-backends     enable all available backends no|yes|mod [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
99 ac_help="$ac_help
100       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend no|yes|mod [no]"
105 ac_help="$ac_help
106     --enable-monitor      enable monitor backend no|yes|mod [yes]"
107 ac_help="$ac_help
108     --enable-null         enable null backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-relay        enable relay backend no|yes|mod [yes]"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLAPD Overlay Options:"
122 ac_help="$ac_help
123     --enable-overlays     enable all available overlays no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-chain        LDAP Chain Response no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
142 ac_help="$ac_help
143
144 SLURPD (Replication Daemon) Options:"
145 ac_help="$ac_help
146   --enable-slurpd         enable building slurpd [auto]"
147 ac_help="$ac_help
148
149 Library Generation & Linking Options"
150 ac_help="$ac_help
151   --enable-static[=PKGS]  build static libraries [default=yes]"
152 ac_help="$ac_help
153   --enable-shared[=PKGS]  build shared libraries [default=yes]"
154 ac_help="$ac_help
155   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
156 ac_help="$ac_help
157   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
158
159 # Find the correct PATH separator.  Usually this is `:', but
160 # DJGPP uses `;' like DOS.
161 if test "X${PATH_SEPARATOR+set}" != Xset; then
162   UNAME=${UNAME-`uname 2>/dev/null`}
163   case X$UNAME in
164     *-DOS) lt_cv_sys_path_separator=';' ;;
165     *)     lt_cv_sys_path_separator=':' ;;
166   esac
167   PATH_SEPARATOR=$lt_cv_sys_path_separator
168 fi
169
170
171 # Check that we are running under the correct shell.
172 SHELL=${CONFIG_SHELL-/bin/sh}
173
174 case X$ECHO in
175 X*--fallback-echo)
176   # Remove one level of quotation (which was required for Make).
177   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
178   ;;
179 esac
180
181 echo=${ECHO-echo}
182 if test "X$1" = X--no-reexec; then
183   # Discard the --no-reexec flag, and continue.
184   shift
185 elif test "X$1" = X--fallback-echo; then
186   # Avoid inline document here, it may be left over
187   :
188 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
189   # Yippee, $echo works!
190   :
191 else
192   # Restart under the correct shell.
193   exec $SHELL "$0" --no-reexec ${1+"$@"}
194 fi
195
196 if test "X$1" = X--fallback-echo; then
197   # used as fallback echo
198   shift
199   cat <<EOF
200
201 EOF
202   exit 0
203 fi
204
205 # The HP-UX ksh and POSIX shell print the target directory to stdout
206 # if CDPATH is set.
207 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
208
209 if test -z "$ECHO"; then
210 if test "X${echo_test_string+set}" != Xset; then
211 # find a string as large as possible, as long as the shell can cope with it
212   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
213     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
214     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
215        echo_test_string="`eval $cmd`" &&
216        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
217     then
218       break
219     fi
220   done
221 fi
222
223 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
224    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
225    test "X$echo_testing_string" = "X$echo_test_string"; then
226   :
227 else
228   # The Solaris, AIX, and Digital Unix default echo programs unquote
229   # backslashes.  This makes it impossible to quote backslashes using
230   #   echo "$something" | sed 's/\\/\\\\/g'
231   #
232   # So, first we look for a working echo in the user's PATH.
233
234   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
235   for dir in $PATH /usr/ucb; do
236     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
237        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
238        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
239        test "X$echo_testing_string" = "X$echo_test_string"; then
240       echo="$dir/echo"
241       break
242     fi
243   done
244   IFS="$save_ifs"
245
246   if test "X$echo" = Xecho; then
247     # We didn't find a better echo, so look for alternatives.
248     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
249        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
250        test "X$echo_testing_string" = "X$echo_test_string"; then
251       # This shell has a builtin print -r that does the trick.
252       echo='print -r'
253     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
254          test "X$CONFIG_SHELL" != X/bin/ksh; then
255       # If we have ksh, try running configure again with it.
256       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
257       export ORIGINAL_CONFIG_SHELL
258       CONFIG_SHELL=/bin/ksh
259       export CONFIG_SHELL
260       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
261     else
262       # Try using printf.
263       echo='printf %s\n'
264       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
265          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
266          test "X$echo_testing_string" = "X$echo_test_string"; then
267         # Cool, printf works
268         :
269       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
270            test "X$echo_testing_string" = 'X\t' &&
271            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
272            test "X$echo_testing_string" = "X$echo_test_string"; then
273         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
274         export CONFIG_SHELL
275         SHELL="$CONFIG_SHELL"
276         export SHELL
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
279            test "X$echo_testing_string" = 'X\t' &&
280            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
281            test "X$echo_testing_string" = "X$echo_test_string"; then
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       else
284         # maybe with a smaller string...
285         prev=:
286
287         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
288           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
289           then
290             break
291           fi
292           prev="$cmd"
293         done
294
295         if test "$prev" != 'sed 50q "$0"'; then
296           echo_test_string=`eval $prev`
297           export echo_test_string
298           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
299         else
300           # Oops.  We lost completely, so just stick with echo.
301           echo=echo
302         fi
303       fi
304     fi
305   fi
306 fi
307 fi
308
309 # Copy echo and quote the copy suitably for passing to libtool from
310 # the Makefile, instead of quoting the original, which is used later.
311 ECHO=$echo
312 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
313    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
314 fi
315
316
317 ac_help="$ac_help
318   --disable-libtool-lock  avoid locking (might break parallel builds)"
319 ac_help="$ac_help
320   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
321 ac_help="$ac_help
322
323 See INSTALL file for further details."
324
325 # Initialize some variables set by options.
326 # The variables have the same names as the options, with
327 # dashes changed to underlines.
328 build=NONE
329 cache_file=./config.cache
330 exec_prefix=NONE
331 host=NONE
332 no_create=
333 nonopt=NONE
334 no_recursion=
335 prefix=NONE
336 program_prefix=NONE
337 program_suffix=NONE
338 program_transform_name=s,x,x,
339 silent=
340 site=
341 srcdir=
342 target=NONE
343 verbose=
344 x_includes=NONE
345 x_libraries=NONE
346 bindir='${exec_prefix}/bin'
347 sbindir='${exec_prefix}/sbin'
348 libexecdir='${exec_prefix}/libexec'
349 datadir='${prefix}/share'
350 sysconfdir='${prefix}/etc'
351 sharedstatedir='${prefix}/com'
352 localstatedir='${prefix}/var'
353 libdir='${exec_prefix}/lib'
354 includedir='${prefix}/include'
355 oldincludedir='/usr/include'
356 infodir='${prefix}/info'
357 mandir='${prefix}/man'
358
359 # Initialize some other variables.
360 subdirs=
361 MFLAGS= MAKEFLAGS=
362 SHELL=${CONFIG_SHELL-/bin/sh}
363 # Maximum number of lines to put in a shell here document.
364 ac_max_here_lines=12
365
366 ac_prev=
367 for ac_option
368 do
369
370   # If the previous option needs an argument, assign it.
371   if test -n "$ac_prev"; then
372     eval "$ac_prev=\$ac_option"
373     ac_prev=
374     continue
375   fi
376
377   case "$ac_option" in
378   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
379   *) ac_optarg= ;;
380   esac
381
382   # Accept the important Cygnus configure options, so we can diagnose typos.
383
384   case "$ac_option" in
385
386   -bindir | --bindir | --bindi | --bind | --bin | --bi)
387     ac_prev=bindir ;;
388   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
389     bindir="$ac_optarg" ;;
390
391   -build | --build | --buil | --bui | --bu)
392     ac_prev=build ;;
393   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
394     build="$ac_optarg" ;;
395
396   -cache-file | --cache-file | --cache-fil | --cache-fi \
397   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
398     ac_prev=cache_file ;;
399   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
400   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
401     cache_file="$ac_optarg" ;;
402
403   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
404     ac_prev=datadir ;;
405   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
406   | --da=*)
407     datadir="$ac_optarg" ;;
408
409   -disable-* | --disable-*)
410     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
411     # Reject names that are not valid shell variable names.
412     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
413       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
414     fi
415     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
416     eval "enable_${ac_feature}=no" ;;
417
418   -enable-* | --enable-*)
419     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
422       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
423     fi
424     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
425     case "$ac_option" in
426       *=*) ;;
427       *) ac_optarg=yes ;;
428     esac
429     eval "enable_${ac_feature}='$ac_optarg'" ;;
430
431   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
432   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
433   | --exec | --exe | --ex)
434     ac_prev=exec_prefix ;;
435   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
436   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
437   | --exec=* | --exe=* | --ex=*)
438     exec_prefix="$ac_optarg" ;;
439
440   -gas | --gas | --ga | --g)
441     # Obsolete; use --with-gas.
442     with_gas=yes ;;
443
444   -help | --help | --hel | --he)
445     # Omit some internal or obsolete options to make the list less imposing.
446     # This message is too long to be a string in the A/UX 3.1 sh.
447     cat << EOF
448 Usage: configure [options] [host]
449 Options: [defaults in brackets after descriptions]
450 Configuration:
451   --cache-file=FILE       cache test results in FILE
452   --help                  print this message
453   --no-create             do not create output files
454   --quiet, --silent       do not print \`checking...' messages
455   --version               print the version of autoconf that created configure
456 Directory and file names:
457   --prefix=PREFIX         install architecture-independent files in PREFIX
458                           [$ac_default_prefix]
459   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
460                           [same as prefix]
461   --bindir=DIR            user executables in DIR [EPREFIX/bin]
462   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
463   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
464   --datadir=DIR           read-only architecture-independent data in DIR
465                           [PREFIX/share]
466   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
467   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
468                           [PREFIX/com]
469   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
470   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
471   --includedir=DIR        C header files in DIR [PREFIX/include]
472   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
473   --infodir=DIR           info documentation in DIR [PREFIX/info]
474   --mandir=DIR            man documentation in DIR [PREFIX/man]
475   --srcdir=DIR            find the sources in DIR [configure dir or ..]
476   --program-prefix=PREFIX prepend PREFIX to installed program names
477   --program-suffix=SUFFIX append SUFFIX to installed program names
478   --program-transform-name=PROGRAM
479                           run sed PROGRAM on installed program names
480 EOF
481     cat << EOF
482 Host type:
483   --build=BUILD           configure for building on BUILD [BUILD=HOST]
484   --host=HOST             configure for HOST [guessed]
485   --target=TARGET         configure for TARGET [TARGET=HOST]
486 Features and packages:
487   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
488   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
489   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
490   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
491   --x-includes=DIR        X include files are in DIR
492   --x-libraries=DIR       X library files are in DIR
493 EOF
494     if test -n "$ac_help"; then
495       echo "--enable and --with options recognized:$ac_help"
496     fi
497     exit 0 ;;
498
499   -host | --host | --hos | --ho)
500     ac_prev=host ;;
501   -host=* | --host=* | --hos=* | --ho=*)
502     host="$ac_optarg" ;;
503
504   -includedir | --includedir | --includedi | --included | --include \
505   | --includ | --inclu | --incl | --inc)
506     ac_prev=includedir ;;
507   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
508   | --includ=* | --inclu=* | --incl=* | --inc=*)
509     includedir="$ac_optarg" ;;
510
511   -infodir | --infodir | --infodi | --infod | --info | --inf)
512     ac_prev=infodir ;;
513   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
514     infodir="$ac_optarg" ;;
515
516   -libdir | --libdir | --libdi | --libd)
517     ac_prev=libdir ;;
518   -libdir=* | --libdir=* | --libdi=* | --libd=*)
519     libdir="$ac_optarg" ;;
520
521   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
522   | --libexe | --libex | --libe)
523     ac_prev=libexecdir ;;
524   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
525   | --libexe=* | --libex=* | --libe=*)
526     libexecdir="$ac_optarg" ;;
527
528   -localstatedir | --localstatedir | --localstatedi | --localstated \
529   | --localstate | --localstat | --localsta | --localst \
530   | --locals | --local | --loca | --loc | --lo)
531     ac_prev=localstatedir ;;
532   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
533   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
534   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
535     localstatedir="$ac_optarg" ;;
536
537   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
538     ac_prev=mandir ;;
539   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
540     mandir="$ac_optarg" ;;
541
542   -nfp | --nfp | --nf)
543     # Obsolete; use --without-fp.
544     with_fp=no ;;
545
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c)
548     no_create=yes ;;
549
550   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
551   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
552     no_recursion=yes ;;
553
554   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
555   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
556   | --oldin | --oldi | --old | --ol | --o)
557     ac_prev=oldincludedir ;;
558   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
559   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
560   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
561     oldincludedir="$ac_optarg" ;;
562
563   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
564     ac_prev=prefix ;;
565   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
566     prefix="$ac_optarg" ;;
567
568   -program-prefix | --program-prefix | --program-prefi | --program-pref \
569   | --program-pre | --program-pr | --program-p)
570     ac_prev=program_prefix ;;
571   -program-prefix=* | --program-prefix=* | --program-prefi=* \
572   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
573     program_prefix="$ac_optarg" ;;
574
575   -program-suffix | --program-suffix | --program-suffi | --program-suff \
576   | --program-suf | --program-su | --program-s)
577     ac_prev=program_suffix ;;
578   -program-suffix=* | --program-suffix=* | --program-suffi=* \
579   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
580     program_suffix="$ac_optarg" ;;
581
582   -program-transform-name | --program-transform-name \
583   | --program-transform-nam | --program-transform-na \
584   | --program-transform-n | --program-transform- \
585   | --program-transform | --program-transfor \
586   | --program-transfo | --program-transf \
587   | --program-trans | --program-tran \
588   | --progr-tra | --program-tr | --program-t)
589     ac_prev=program_transform_name ;;
590   -program-transform-name=* | --program-transform-name=* \
591   | --program-transform-nam=* | --program-transform-na=* \
592   | --program-transform-n=* | --program-transform-=* \
593   | --program-transform=* | --program-transfor=* \
594   | --program-transfo=* | --program-transf=* \
595   | --program-trans=* | --program-tran=* \
596   | --progr-tra=* | --program-tr=* | --program-t=*)
597     program_transform_name="$ac_optarg" ;;
598
599   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
600   | -silent | --silent | --silen | --sile | --sil)
601     silent=yes ;;
602
603   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
604     ac_prev=sbindir ;;
605   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
606   | --sbi=* | --sb=*)
607     sbindir="$ac_optarg" ;;
608
609   -sharedstatedir | --sharedstatedir | --sharedstatedi \
610   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
611   | --sharedst | --shareds | --shared | --share | --shar \
612   | --sha | --sh)
613     ac_prev=sharedstatedir ;;
614   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
615   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
616   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
617   | --sha=* | --sh=*)
618     sharedstatedir="$ac_optarg" ;;
619
620   -site | --site | --sit)
621     ac_prev=site ;;
622   -site=* | --site=* | --sit=*)
623     site="$ac_optarg" ;;
624
625   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
626     ac_prev=srcdir ;;
627   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
628     srcdir="$ac_optarg" ;;
629
630   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
631   | --syscon | --sysco | --sysc | --sys | --sy)
632     ac_prev=sysconfdir ;;
633   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
634   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
635     sysconfdir="$ac_optarg" ;;
636
637   -target | --target | --targe | --targ | --tar | --ta | --t)
638     ac_prev=target ;;
639   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
640     target="$ac_optarg" ;;
641
642   -v | -verbose | --verbose | --verbos | --verbo | --verb)
643     verbose=yes ;;
644
645   -version | --version | --versio | --versi | --vers)
646     echo "configure generated by autoconf version 2.13.1"
647     exit 0 ;;
648
649   -with-* | --with-*)
650     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
651     # Reject names that are not valid shell variable names.
652     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
653       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
654     fi
655     ac_package=`echo $ac_package| sed 's/-/_/g'`
656     case "$ac_option" in
657       *=*) ;;
658       *) ac_optarg=yes ;;
659     esac
660     eval "with_${ac_package}='$ac_optarg'" ;;
661
662   -without-* | --without-*)
663     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     eval "with_${ac_package}=no" ;;
670
671   --x)
672     # Obsolete; use --with-x.
673     with_x=yes ;;
674
675   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
676   | --x-incl | --x-inc | --x-in | --x-i)
677     ac_prev=x_includes ;;
678   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
679   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
680     x_includes="$ac_optarg" ;;
681
682   -x-libraries | --x-libraries | --x-librarie | --x-librari \
683   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
684     ac_prev=x_libraries ;;
685   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
686   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
687     x_libraries="$ac_optarg" ;;
688
689   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
690     ;;
691
692   *)
693     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
694       echo "configure: warning: $ac_option: invalid host type" 1>&2
695     fi
696     if test "x$nonopt" != xNONE; then
697       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
698     fi
699     nonopt="$ac_option"
700     ;;
701
702   esac
703 done
704
705 if test -n "$ac_prev"; then
706   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
707 fi
708
709 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
710
711 # File descriptor usage:
712 # 0 standard input
713 # 1 file creation
714 # 2 errors and warnings
715 # 3 some systems may open it to /dev/tty
716 # 4 used on the Kubota Titan
717 # 6 checking for... messages and results
718 # 5 compiler messages saved in config.log
719 if test "$silent" = yes; then
720   exec 6>/dev/null
721 else
722   exec 6>&1
723 fi
724 exec 5>./config.log
725
726 echo "\
727 This file contains any messages produced by compilers while
728 running configure, to aid debugging if configure makes a mistake.
729 " 1>&5
730
731 # Strip out --no-create and --no-recursion so they do not pile up.
732 # Also quote any args containing shell metacharacters.
733 ac_configure_args=
734 for ac_arg
735 do
736   case "$ac_arg" in
737   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
738   | --no-cr | --no-c) ;;
739   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
740   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
741   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
742   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
743   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
744   esac
745 done
746
747 # NLS nuisances.
748 # Only set these to C if already set.  These must not be set unconditionally
749 # because not all systems understand e.g. LANG=C (notably SCO).
750 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
751 # Non-C LC_CTYPE values break the ctype check.
752 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
753 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
754 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
755 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
756
757 # confdefs.h avoids OS command line length limits that DEFS can exceed.
758 rm -rf conftest* confdefs.h
759 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
760 echo > confdefs.h
761
762 # A filename unique to this package, relative to the directory that
763 # configure is in, which we can look for to find out if srcdir is correct.
764 ac_unique_file=build/version.sh
765
766 # Find the source files, if location was not specified.
767 if test -z "$srcdir"; then
768   ac_srcdir_defaulted=yes
769   # Try the directory containing this script, then its parent.
770   ac_prog=$0
771   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
772   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
773   srcdir=$ac_confdir
774   if test ! -r $srcdir/$ac_unique_file; then
775     srcdir=..
776   fi
777 else
778   ac_srcdir_defaulted=no
779 fi
780 if test ! -r $srcdir/$ac_unique_file; then
781   if test "$ac_srcdir_defaulted" = yes; then
782     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
783   else
784     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
785   fi
786 fi
787 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
788
789 # Prefer explicitly selected file to automatically selected ones.
790 if test -z "$CONFIG_SITE"; then
791   if test "x$prefix" != xNONE; then
792     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
793   else
794     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
795   fi
796 fi
797 for ac_site_file in $CONFIG_SITE; do
798   if test -r "$ac_site_file"; then
799     echo "loading site script $ac_site_file"
800     . "$ac_site_file"
801   fi
802 done
803
804
805 ac_ext=c
806 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
807 ac_cpp='$CPP $CPPFLAGS'
808 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
809 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
810 cross_compiling=$ac_cv_prog_cc_cross
811
812 ac_exeext=
813 ac_objext=o
814 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
815   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
816   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
817     ac_n= ac_c='
818 ' ac_t='        '
819   else
820     ac_n=-n ac_c= ac_t=
821   fi
822 else
823   ac_n= ac_c='\c' ac_t=
824 fi
825
826
827 # set unset (borrowed from autoconf 2.49c)
828 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
829   ol_unset=unset
830 else
831   ol_unset=false
832 fi
833 # unset CDPATH
834 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
835
836 ac_aux_dir=
837 for ac_dir in build $srcdir/build; do
838   if test -f $ac_dir/install-sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install-sh -c"
841     break
842   elif test -f $ac_dir/install.sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install.sh -c"
845     break
846   elif test -f $ac_dir/shtool; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/shtool install -c"
849     break
850   fi
851 done
852 if test -z "$ac_aux_dir"; then
853   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
854 fi
855 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
856 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
857 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
858
859 eval `$ac_aux_dir/version.sh`
860 if test -z "$OL_STRING"; then
861         { echo "configure: error: could not determine version" 1>&2; exit 1; }
862 fi
863
864 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
865         ac_cv_shtool="$ac_aux_dir/shtool"
866 else
867         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
868 fi
869
870 SHTOOL="$ac_cv_shtool"
871
872 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
873 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
874
875 OPENLDAP_CVS=""
876 if test -d $ac_aux_dir/CVS; then
877         OPENLDAP_CVS="(from CVS sources) "
878 fi
879
880 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
881
882
883 echo $ac_n "checking host system type""... $ac_c" 1>&6
884 echo "configure:885: checking host system type" >&5
885 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
886
887 # Make sure we can run config.sub.
888   if $ac_config_sub sun4 >/dev/null 2>&1; then :
889     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
890   fi
891
892   ac_cv_host_alias=$host
893   case "$ac_cv_host_alias" in
894   NONE)
895     case $nonopt in
896     NONE)
897       if ac_cv_host_alias=`$ac_config_guess`; then :
898       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
899       fi ;;
900     *) ac_cv_host_alias=$nonopt ;;
901     esac ;;
902   esac
903
904   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
905   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
906   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
907   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
908 else
909   echo $ac_n "(cached) $ac_c" 1>&6
910 fi
911
912 echo "$ac_t""$ac_cv_host" 1>&6
913
914 host=$ac_cv_host
915 host_alias=$ac_cv_host_alias
916 host_cpu=$ac_cv_host_cpu
917 host_vendor=$ac_cv_host_vendor
918 host_os=$ac_cv_host_os
919
920
921
922
923
924 echo $ac_n "checking target system type""... $ac_c" 1>&6
925 echo "configure:926: checking target system type" >&5
926 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
927
928 # Make sure we can run config.sub.
929   if $ac_config_sub sun4 >/dev/null 2>&1; then :
930     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
931   fi
932
933   ac_cv_target_alias=$target
934   case "$ac_cv_target_alias" in
935   NONE)
936     case $nonopt in
937     NONE)
938       ac_cv_target_alias=$host_alias ;;
939
940     *) ac_cv_target_alias=$nonopt ;;
941     esac ;;
942   esac
943
944   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
945   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
946   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
947   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
948 else
949   echo $ac_n "(cached) $ac_c" 1>&6
950 fi
951
952 echo "$ac_t""$ac_cv_target" 1>&6
953
954 target=$ac_cv_target
955 target_alias=$ac_cv_target_alias
956 target_cpu=$ac_cv_target_cpu
957 target_vendor=$ac_cv_target_vendor
958 target_os=$ac_cv_target_os
959
960
961
962
963
964 echo $ac_n "checking build system type""... $ac_c" 1>&6
965 echo "configure:966: checking build system type" >&5
966 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
967
968 # Make sure we can run config.sub.
969   if $ac_config_sub sun4 >/dev/null 2>&1; then :
970     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
971   fi
972
973   ac_cv_build_alias=$build
974   case "$ac_cv_build_alias" in
975   NONE)
976     case $nonopt in
977     NONE)
978       ac_cv_build_alias=$host_alias ;;
979
980     *) ac_cv_build_alias=$nonopt ;;
981     esac ;;
982   esac
983
984   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
985   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 else
989   echo $ac_n "(cached) $ac_c" 1>&6
990 fi
991
992 echo "$ac_t""$ac_cv_build" 1>&6
993
994 build=$ac_cv_build
995 build_alias=$ac_cv_build_alias
996 build_cpu=$ac_cv_build_cpu
997 build_vendor=$ac_cv_build_vendor
998 build_os=$ac_cv_build_os
999
1000
1001
1002
1003
1004 # Do some error checking and defaulting for the host and target type.
1005 # The inputs are:
1006 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1007 #
1008 # The rules are:
1009 # 1. You are not allowed to specify --host, --target, and nonopt at the
1010 #    same time.
1011 # 2. Host defaults to nonopt.
1012 # 3. If nonopt is not specified, then host defaults to the current host,
1013 #    as determined by config.guess.
1014 # 4. Target and build default to nonopt.
1015 # 5. If nonopt is not specified, then target and build default to host.
1016
1017 # The aliases save the names the user supplied, while $host etc.
1018 # will get canonicalized.
1019 case $host---$target---$nonopt in
1020 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1021 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1022 esac
1023
1024 test "$host_alias" != "$target_alias" &&
1025   test "$program_prefix$program_suffix$program_transform_name" = \
1026     NONENONEs,x,x, &&
1027   program_prefix=${target_alias}-
1028
1029
1030 # Find a good install program.  We prefer a C program (faster),
1031 # so one script is as good as another.  But avoid the broken or
1032 # incompatible versions:
1033 # SysV /etc/install, /usr/sbin/install
1034 # SunOS /usr/etc/install
1035 # IRIX /sbin/install
1036 # AIX /bin/install
1037 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1038 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1039 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1040 # ./install, which can be erroneously created by make from ./install.sh.
1041 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1042 echo "configure:1043: checking for a BSD compatible install" >&5
1043 if test -z "$INSTALL"; then
1044 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1048   for ac_dir in $PATH; do
1049     # Account for people who put trailing slashes in PATH elements.
1050     case "$ac_dir/" in
1051     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1052     *)
1053       # OSF1 and SCO ODT 3.0 have their own names for install.
1054       # Don't use installbsd from OSF since it installs stuff as root
1055       # by default.
1056       for ac_prog in ginstall scoinst install; do
1057         if test -f $ac_dir/$ac_prog; then
1058           if test $ac_prog = install &&
1059             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # AIX install.  It has an incompatible calling convention.
1061             :
1062           elif test $ac_prog = install &&
1063             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # program-specific install script used by HP pwplus--don't use.
1065             :
1066           else
1067             ac_cv_path_install="$ac_dir/$ac_prog -c"
1068             break 2
1069           fi
1070         fi
1071       done
1072       ;;
1073     esac
1074   done
1075   IFS="$ac_save_IFS"
1076
1077 fi
1078   if test "${ac_cv_path_install+set}" = set; then
1079     INSTALL="$ac_cv_path_install"
1080   else
1081     # As a last resort, use the slow shell script.  We don't cache a
1082     # path for INSTALL within a source directory, because that will
1083     # break other packages using the cache if that directory is
1084     # removed, or if the path is relative.
1085     INSTALL="$ac_install_sh"
1086   fi
1087 fi
1088 echo "$ac_t""$INSTALL" 1>&6
1089
1090 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1091 # It thinks the first close brace ends the variable substitution.
1092 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1093
1094 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1095
1096 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1097
1098 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1099 echo "configure:1100: checking whether build environment is sane" >&5
1100 # Just in case
1101 sleep 1
1102 echo timestamp > conftestfile
1103 # Do `set' in a subshell so we don't clobber the current shell's
1104 # arguments.  Must try -L first in case configure is actually a
1105 # symlink; some systems play weird games with the mod time of symlinks
1106 # (eg FreeBSD returns the mod time of the symlink's containing
1107 # directory).
1108 if (
1109    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1110    if test "$*" = "X"; then
1111       # -L didn't work.
1112       set X `ls -t $srcdir/configure conftestfile`
1113    fi
1114    if test "$*" != "X $srcdir/configure conftestfile" \
1115       && test "$*" != "X conftestfile $srcdir/configure"; then
1116
1117       # If neither matched, then we have a broken ls.  This can happen
1118       # if, for instance, CONFIG_SHELL is bash and it inherits a
1119       # broken ls alias from the environment.  This has actually
1120       # happened.  Such a system could not be considered "sane".
1121       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1122 alias in your environment" 1>&2; exit 1; }
1123    fi
1124
1125    test "$2" = conftestfile
1126    )
1127 then
1128    # Ok.
1129    :
1130 else
1131    { echo "configure: error: newly created file is older than distributed files!
1132 Check your system clock" 1>&2; exit 1; }
1133 fi
1134 rm -f conftest*
1135 echo "$ac_t""yes" 1>&6
1136 if test "$program_transform_name" = s,x,x,; then
1137   program_transform_name=
1138 else
1139   # Double any \ or $.  echo might interpret backslashes.
1140   cat <<\EOF_SED > conftestsed
1141 s,\\,\\\\,g; s,\$,$$,g
1142 EOF_SED
1143   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1144   rm -f conftestsed
1145 fi
1146 test "$program_prefix" != NONE &&
1147   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1148 # Use a double $ so make ignores it.
1149 test "$program_suffix" != NONE &&
1150   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1151
1152 # sed with no file args requires a program.
1153 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1154
1155 for ac_prog in mawk gawk nawk awk
1156 do
1157 # Extract the first word of "$ac_prog", so it can be a program name with args.
1158 set dummy $ac_prog; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_word" >&5
1161 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   if test -n "$AWK"; then
1165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1166 else
1167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1168   ac_dummy="$PATH"
1169   for ac_dir in $ac_dummy; do
1170     test -z "$ac_dir" && ac_dir=.
1171     if test -f $ac_dir/$ac_word; then
1172       ac_cv_prog_AWK="$ac_prog"
1173       break
1174     fi
1175   done
1176   IFS="$ac_save_ifs"
1177 fi
1178 fi
1179 AWK="$ac_cv_prog_AWK"
1180 if test -n "$AWK"; then
1181   echo "$ac_t""$AWK" 1>&6
1182 else
1183   echo "$ac_t""no" 1>&6
1184 fi
1185
1186 test -n "$AWK" && break
1187 done
1188
1189 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${MAKE-make} sets \${MAKE}" >&5
1191 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1192 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1193   echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195   cat > conftestmake <<\EOF
1196 all:
1197         @echo 'ac_maketemp="${MAKE}"'
1198 EOF
1199 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1200 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1201 if test -n "$ac_maketemp"; then
1202   eval ac_cv_prog_make_${ac_make}_set=yes
1203 else
1204   eval ac_cv_prog_make_${ac_make}_set=no
1205 fi
1206 rm -f conftestmake
1207 fi
1208 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1209   echo "$ac_t""yes" 1>&6
1210   SET_MAKE=
1211 else
1212   echo "$ac_t""no" 1>&6
1213   SET_MAKE="MAKE=${MAKE-make}"
1214 fi
1215
1216
1217
1218 PACKAGE=$OL_PACKAGE
1219
1220 VERSION=$OL_VERSION
1221
1222 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1223   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1224 fi
1225
1226
1227
1228 missing_dir=`cd $ac_aux_dir && pwd`
1229 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1230 echo "configure:1231: checking for working aclocal" >&5
1231 # Run test in a subshell; some versions of sh will print an error if
1232 # an executable is not found, even if stderr is redirected.
1233 # Redirect stdin to placate older versions of autoconf.  Sigh.
1234 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1235    ACLOCAL=aclocal
1236    echo "$ac_t""found" 1>&6
1237 else
1238    ACLOCAL="$missing_dir/missing aclocal"
1239    echo "$ac_t""missing" 1>&6
1240 fi
1241
1242 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working autoconf" >&5
1244 # Run test in a subshell; some versions of sh will print an error if
1245 # an executable is not found, even if stderr is redirected.
1246 # Redirect stdin to placate older versions of autoconf.  Sigh.
1247 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1248    AUTOCONF=autoconf
1249    echo "$ac_t""found" 1>&6
1250 else
1251    AUTOCONF="$missing_dir/missing autoconf"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working automake" >&5
1257 # Run test in a subshell; some versions of sh will print an error if
1258 # an executable is not found, even if stderr is redirected.
1259 # Redirect stdin to placate older versions of autoconf.  Sigh.
1260 if (automake --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOMAKE=automake
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOMAKE="$missing_dir/missing automake"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working autoheader" >&5
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf.  Sigh.
1273 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOHEADER=autoheader
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOHEADER="$missing_dir/missing autoheader"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working makeinfo" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1287    MAKEINFO=makeinfo
1288    echo "$ac_t""found" 1>&6
1289 else
1290    MAKEINFO="$missing_dir/missing makeinfo"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 install_sh="$missing_dir/install-sh"
1295 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1296
1297 for ac_prog in gnutar gtar tar
1298 do
1299 # Extract the first word of "$ac_prog", so it can be a program name with args.
1300 set dummy $ac_prog; ac_word=$2
1301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_word" >&5
1303 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1304   echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306   if test -n "$AMTAR"; then
1307   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1308 else
1309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1310   ac_dummy="$PATH"
1311   for ac_dir in $ac_dummy; do
1312     test -z "$ac_dir" && ac_dir=.
1313     if test -f $ac_dir/$ac_word; then
1314       ac_cv_prog_AMTAR="$ac_prog"
1315       break
1316     fi
1317   done
1318   IFS="$ac_save_ifs"
1319 fi
1320 fi
1321 AMTAR="$ac_cv_prog_AMTAR"
1322 if test -n "$AMTAR"; then
1323   echo "$ac_t""$AMTAR" 1>&6
1324 else
1325   echo "$ac_t""no" 1>&6
1326 fi
1327
1328 test -n "$AMTAR" && break
1329 done
1330
1331
1332 AMTARFLAGS=
1333 if test -n "$AMTAR"; then
1334   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1335         AMTARFLAGS=o
1336   fi
1337 fi
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_PACKAGE "$PACKAGE"
1341 EOF
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_VERSION "$VERSION"
1345 EOF
1346
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION $OL_API_INC
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1362 EOF
1363
1364
1365 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1366
1367 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1368
1369 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1370
1371
1372
1373 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1374 echo "configure:1375: checking configure arguments" >&5
1375
1376
1377 top_builddir=`pwd`
1378
1379 ldap_subdir="/openldap"
1380
1381 # Check whether --with-subdir or --without-subdir was given.
1382 if test "${with_subdir+set}" = set; then
1383   withval="$with_subdir"
1384   case "$withval" in
1385         no) ldap_subdir=""
1386                 ;;
1387         yes)
1388                 ;;
1389         /*|\\*)
1390                 ldap_subdir="$withval"
1391                 ;;
1392         *)
1393                 ldap_subdir="/$withval"
1394                 ;;
1395 esac
1396
1397 fi
1398
1399
1400 # OpenLDAP --enable-debug
1401         # Check whether --enable-debug or --disable-debug was given.
1402 if test "${enable_debug+set}" = set; then
1403   enableval="$enable_debug"
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-debug" 1>&2; exit 1; }
1413         fi
1414         ol_enable_debug="$ol_arg"
1415
1416 else
1417         ol_enable_debug="yes"
1418 fi
1419 # end --enable-debug
1420 # OpenLDAP --enable-dynamic
1421         # Check whether --enable-dynamic or --disable-dynamic was given.
1422 if test "${enable_dynamic+set}" = set; then
1423   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1433         fi
1434         ol_enable_dynamic="$ol_arg"
1435
1436 else
1437         ol_enable_dynamic="no"
1438 fi
1439 # end --enable-dynamic
1440 # OpenLDAP --enable-syslog
1441         # Check whether --enable-syslog or --disable-syslog was given.
1442 if test "${enable_syslog+set}" = set; then
1443   enableval="$enable_syslog"
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-syslog" 1>&2; exit 1; }
1453         fi
1454         ol_enable_syslog="$ol_arg"
1455
1456 else
1457         ol_enable_syslog="auto"
1458 fi
1459 # end --enable-syslog
1460 # OpenLDAP --enable-proctitle
1461         # Check whether --enable-proctitle or --disable-proctitle was given.
1462 if test "${enable_proctitle+set}" = set; then
1463   enableval="$enable_proctitle"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1473         fi
1474         ol_enable_proctitle="$ol_arg"
1475
1476 else
1477         ol_enable_proctitle="yes"
1478 fi
1479 # end --enable-proctitle
1480 ol_enable_referrals=${ol_enable_referrals-no}
1481 ol_enable_kbind=${ol_enable_kbind-no}
1482 # OpenLDAP --enable-ipv6
1483         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1484 if test "${enable_ipv6+set}" = set; then
1485   enableval="$enable_ipv6"
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-ipv6" 1>&2; exit 1; }
1495         fi
1496         ol_enable_ipv6="$ol_arg"
1497
1498 else
1499         ol_enable_ipv6="auto"
1500 fi
1501 # end --enable-ipv6
1502 # OpenLDAP --enable-local
1503         # Check whether --enable-local or --disable-local was given.
1504 if test "${enable_local+set}" = set; then
1505   enableval="$enable_local"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1515         fi
1516         ol_enable_local="$ol_arg"
1517
1518 else
1519         ol_enable_local="auto"
1520 fi
1521 # end --enable-local
1522
1523
1524 # OpenLDAP --with-cyrus_sasl
1525         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1526 if test "${with_cyrus_sasl+set}" = set; then
1527   withval="$with_cyrus_sasl"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no  ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1537         fi
1538         ol_with_cyrus_sasl="$ol_arg"
1539
1540 else
1541         ol_with_cyrus_sasl="auto"
1542 fi
1543 # end --with-cyrus_sasl
1544
1545 # OpenLDAP --with-fetch
1546         # Check whether --with-fetch or --without-fetch was given.
1547 if test "${with_fetch+set}" = set; then
1548   withval="$with_fetch"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1558         fi
1559         ol_with_fetch="$ol_arg"
1560
1561 else
1562         ol_with_fetch="auto"
1563 fi
1564 # end --with-fetch
1565
1566 ol_with_kerberos=${ol_with_kerberos-auto}
1567 # OpenLDAP --with-threads
1568         # Check whether --with-threads or --without-threads was given.
1569 if test "${with_threads+set}" = set; then
1570   withval="$with_threads"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1574                 if test "$withval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1580         fi
1581         ol_with_threads="$ol_arg"
1582
1583 else
1584         ol_with_threads="auto"
1585 fi
1586 # end --with-threads
1587
1588 # OpenLDAP --with-tls
1589         # Check whether --with-tls or --without-tls was given.
1590 if test "${with_tls+set}" = set; then
1591   withval="$with_tls"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto ssleay openssl yes no  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1601         fi
1602         ol_with_tls="$ol_arg"
1603
1604 else
1605         ol_with_tls="auto"
1606 fi
1607 # end --with-tls
1608
1609 # OpenLDAP --with-yielding_select
1610         # Check whether --with-yielding_select or --without-yielding_select was given.
1611 if test "${with_yielding_select+set}" = set; then
1612   withval="$with_yielding_select"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no manual  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1622         fi
1623         ol_with_yielding_select="$ol_arg"
1624
1625 else
1626         ol_with_yielding_select="auto"
1627 fi
1628 # end --with-yielding_select
1629
1630
1631
1632 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1633 if test "${with_xxslapdoptions+set}" = set; then
1634   withval="$with_xxslapdoptions"
1635   :
1636 fi
1637
1638 # OpenLDAP --enable-slapd
1639         # Check whether --enable-slapd or --disable-slapd was given.
1640 if test "${enable_slapd+set}" = set; then
1641   enableval="$enable_slapd"
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-slapd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_slapd="$ol_arg"
1653
1654 else
1655         ol_enable_slapd="yes"
1656 fi
1657 # end --enable-slapd
1658 # OpenLDAP --enable-aci
1659         # Check whether --enable-aci or --disable-aci was given.
1660 if test "${enable_aci+set}" = set; then
1661   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1671         fi
1672         ol_enable_aci="$ol_arg"
1673
1674 else
1675         ol_enable_aci="no"
1676 fi
1677 # end --enable-aci
1678 # OpenLDAP --enable-cleartext
1679         # Check whether --enable-cleartext or --disable-cleartext was given.
1680 if test "${enable_cleartext+set}" = set; then
1681   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1691         fi
1692         ol_enable_cleartext="$ol_arg"
1693
1694 else
1695         ol_enable_cleartext="yes"
1696 fi
1697 # end --enable-cleartext
1698 # OpenLDAP --enable-crypt
1699         # Check whether --enable-crypt or --disable-crypt was given.
1700 if test "${enable_crypt+set}" = set; then
1701   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1711         fi
1712         ol_enable_crypt="$ol_arg"
1713
1714 else
1715         ol_enable_crypt="no"
1716 fi
1717 # end --enable-crypt
1718 # OpenLDAP --enable-lmpasswd
1719         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1720 if test "${enable_lmpasswd+set}" = set; then
1721   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_lmpasswd="$ol_arg"
1733
1734 else
1735         ol_enable_lmpasswd="no"
1736 fi
1737 # end --enable-lmpasswd
1738 # OpenLDAP --enable-spasswd
1739         # Check whether --enable-spasswd or --disable-spasswd was given.
1740 if test "${enable_spasswd+set}" = set; then
1741   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1751         fi
1752         ol_enable_spasswd="$ol_arg"
1753
1754 else
1755         ol_enable_spasswd="no"
1756 fi
1757 # end --enable-spasswd
1758 # OpenLDAP --enable-modules
1759         # Check whether --enable-modules or --disable-modules was given.
1760 if test "${enable_modules+set}" = set; then
1761   enableval="$enable_modules"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1771         fi
1772         ol_enable_modules="$ol_arg"
1773
1774 else
1775         ol_enable_modules="no"
1776 fi
1777 # end --enable-modules
1778 ol_enable_multimaster=${ol_enable_multimaster-no}
1779 # OpenLDAP --enable-rewrite
1780         # Check whether --enable-rewrite or --disable-rewrite was given.
1781 if test "${enable_rewrite+set}" = set; then
1782   enableval="$enable_rewrite"
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-rewrite" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rewrite="$ol_arg"
1794
1795 else
1796         ol_enable_rewrite="auto"
1797 fi
1798 # end --enable-rewrite
1799 # OpenLDAP --enable-rlookups
1800         # Check whether --enable-rlookups or --disable-rlookups was given.
1801 if test "${enable_rlookups+set}" = set; then
1802   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1812         fi
1813         ol_enable_rlookups="$ol_arg"
1814
1815 else
1816         ol_enable_rlookups="no"
1817 fi
1818 # end --enable-rlookups
1819 # OpenLDAP --enable-slapi
1820         # Check whether --enable-slapi or --disable-slapi was given.
1821 if test "${enable_slapi+set}" = set; then
1822   enableval="$enable_slapi"
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-slapi" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slapi="$ol_arg"
1834
1835 else
1836         ol_enable_slapi="no"
1837 fi
1838 # end --enable-slapi
1839 # OpenLDAP --enable-slp
1840         # Check whether --enable-slp or --disable-slp was given.
1841 if test "${enable_slp+set}" = set; then
1842   enableval="$enable_slp"
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-slp" 1>&2; exit 1; }
1852         fi
1853         ol_enable_slp="$ol_arg"
1854
1855 else
1856         ol_enable_slp="no"
1857 fi
1858 # end --enable-slp
1859 # OpenLDAP --enable-wrappers
1860         # Check whether --enable-wrappers or --disable-wrappers was given.
1861 if test "${enable_wrappers+set}" = set; then
1862   enableval="$enable_wrappers"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1872         fi
1873         ol_enable_wrappers="$ol_arg"
1874
1875 else
1876         ol_enable_wrappers="no"
1877 fi
1878 # end --enable-wrappers
1879
1880 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1881         passwd perl relay shell sql"
1882
1883 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1884 if test "${with_xxslapbackends+set}" = set; then
1885   withval="$with_xxslapbackends"
1886   :
1887 fi
1888
1889
1890 # OpenLDAP --enable-backends
1891         # Check whether --enable-backends or --disable-backends was given.
1892 if test "${enable_backends+set}" = set; then
1893   enableval="$enable_backends"
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-backends" 1>&2; exit 1; }
1903         fi
1904         ol_enable_backends="$ol_arg"
1905
1906 else
1907         ol_enable_backends="no"
1908 fi
1909 # end --enable-backends
1910 # OpenLDAP --enable-bdb
1911         # Check whether --enable-bdb or --disable-bdb was given.
1912 if test "${enable_bdb+set}" = set; then
1913   enableval="$enable_bdb"
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-bdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_bdb="$ol_arg"
1925
1926 else
1927         ol_enable_bdb="yes"
1928 fi
1929 # end --enable-bdb
1930 # OpenLDAP --enable-dnssrv
1931         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1932 if test "${enable_dnssrv+set}" = set; then
1933   enableval="$enable_dnssrv"
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-dnssrv" 1>&2; exit 1; }
1943         fi
1944         ol_enable_dnssrv="$ol_arg"
1945
1946 else
1947         ol_enable_dnssrv="no"
1948 fi
1949 # end --enable-dnssrv
1950 # OpenLDAP --enable-hdb
1951         # Check whether --enable-hdb or --disable-hdb was given.
1952 if test "${enable_hdb+set}" = set; then
1953   enableval="$enable_hdb"
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-hdb" 1>&2; exit 1; }
1963         fi
1964         ol_enable_hdb="$ol_arg"
1965
1966 else
1967         ol_enable_hdb="no"
1968 fi
1969 # end --enable-hdb
1970 # OpenLDAP --enable-ldap
1971         # Check whether --enable-ldap or --disable-ldap was given.
1972 if test "${enable_ldap+set}" = set; then
1973   enableval="$enable_ldap"
1974   
1975         ol_arg=invalid
1976         for ol_val in no yes mod ; do
1977                 if test "$enableval" = "$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 $enableval for --enable-ldap" 1>&2; exit 1; }
1983         fi
1984         ol_enable_ldap="$ol_arg"
1985
1986 else
1987         ol_enable_ldap="no"
1988 fi
1989 # end --enable-ldap
1990 # OpenLDAP --enable-ldbm
1991         # Check whether --enable-ldbm or --disable-ldbm was given.
1992 if test "${enable_ldbm+set}" = set; then
1993   enableval="$enable_ldbm"
1994   
1995         ol_arg=invalid
1996         for ol_val in no yes mod ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2003         fi
2004         ol_enable_ldbm="$ol_arg"
2005
2006 else
2007         ol_enable_ldbm="no"
2008 fi
2009 # end --enable-ldbm
2010 # OpenLDAP --with-ldbm_api
2011         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2012 if test "${with_ldbm_api+set}" = set; then
2013   withval="$with_ldbm_api"
2014   
2015         ol_arg=invalid
2016         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_api="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_api="auto"
2028 fi
2029 # end --with-ldbm_api
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-meta
2053         # Check whether --enable-meta or --disable-meta was given.
2054 if test "${enable_meta+set}" = set; then
2055   enableval="$enable_meta"
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-meta" 1>&2; exit 1; }
2065         fi
2066         ol_enable_meta="$ol_arg"
2067
2068 else
2069         ol_enable_meta="no"
2070 fi
2071 # end --enable-meta
2072 # OpenLDAP --enable-monitor
2073         # Check whether --enable-monitor or --disable-monitor was given.
2074 if test "${enable_monitor+set}" = set; then
2075   enableval="$enable_monitor"
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-monitor" 1>&2; exit 1; }
2085         fi
2086         ol_enable_monitor="$ol_arg"
2087
2088 else
2089         ol_enable_monitor="yes"
2090 fi
2091 # end --enable-monitor
2092 # OpenLDAP --enable-null
2093         # Check whether --enable-null or --disable-null was given.
2094 if test "${enable_null+set}" = set; then
2095   enableval="$enable_null"
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-null" 1>&2; exit 1; }
2105         fi
2106         ol_enable_null="$ol_arg"
2107
2108 else
2109         ol_enable_null="no"
2110 fi
2111 # end --enable-null
2112 # OpenLDAP --enable-passwd
2113         # Check whether --enable-passwd or --disable-passwd was given.
2114 if test "${enable_passwd+set}" = set; then
2115   enableval="$enable_passwd"
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-passwd" 1>&2; exit 1; }
2125         fi
2126         ol_enable_passwd="$ol_arg"
2127
2128 else
2129         ol_enable_passwd="no"
2130 fi
2131 # end --enable-passwd
2132 # OpenLDAP --enable-perl
2133         # Check whether --enable-perl or --disable-perl was given.
2134 if test "${enable_perl+set}" = set; then
2135   enableval="$enable_perl"
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-perl" 1>&2; exit 1; }
2145         fi
2146         ol_enable_perl="$ol_arg"
2147
2148 else
2149         ol_enable_perl="no"
2150 fi
2151 # end --enable-perl
2152 # OpenLDAP --enable-relay
2153         # Check whether --enable-relay or --disable-relay was given.
2154 if test "${enable_relay+set}" = set; then
2155   enableval="$enable_relay"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2165         fi
2166         ol_enable_relay="$ol_arg"
2167
2168 else
2169         ol_enable_relay="yes"
2170 fi
2171 # end --enable-relay
2172 # OpenLDAP --enable-shell
2173         # Check whether --enable-shell or --disable-shell was given.
2174 if test "${enable_shell+set}" = set; then
2175   enableval="$enable_shell"
2176   
2177         ol_arg=invalid
2178         for ol_val in no yes mod ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2185         fi
2186         ol_enable_shell="$ol_arg"
2187
2188 else
2189         ol_enable_shell="no"
2190 fi
2191 # end --enable-shell
2192 # OpenLDAP --enable-sql
2193         # Check whether --enable-sql or --disable-sql was given.
2194 if test "${enable_sql+set}" = set; then
2195   enableval="$enable_sql"
2196   
2197         ol_arg=invalid
2198         for ol_val in no yes mod ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2205         fi
2206         ol_enable_sql="$ol_arg"
2207
2208 else
2209         ol_enable_sql="no"
2210 fi
2211 # end --enable-sql
2212
2213 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2214         refint unique"
2215
2216 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2217 if test "${with_xxslapoverlays+set}" = set; then
2218   withval="$with_xxslapoverlays"
2219   :
2220 fi
2221
2222
2223 # OpenLDAP --enable-overlays
2224         # Check whether --enable-overlays or --disable-overlays was given.
2225 if test "${enable_overlays+set}" = set; then
2226   enableval="$enable_overlays"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2236         fi
2237         ol_enable_overlays="$ol_arg"
2238
2239 else
2240         ol_enable_overlays="no"
2241 fi
2242 # end --enable-overlays
2243 # OpenLDAP --enable-chain
2244         # Check whether --enable-chain or --disable-chain was given.
2245 if test "${enable_chain+set}" = set; then
2246   enableval="$enable_chain"
2247   
2248         ol_arg=invalid
2249         for ol_val in no yes mod ; do
2250                 if test "$enableval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2256         fi
2257         ol_enable_chain="$ol_arg"
2258
2259 else
2260         ol_enable_chain="no"
2261 fi
2262 # end --enable-chain
2263
2264 # OpenLDAP --enable-denyop
2265         # Check whether --enable-denyop or --disable-denyop was given.
2266 if test "${enable_denyop+set}" = set; then
2267   enableval="$enable_denyop"
2268   
2269         ol_arg=invalid
2270         for ol_val in no yes mod ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2277         fi
2278         ol_enable_denyop="$ol_arg"
2279
2280 else
2281         ol_enable_denyop="no"
2282 fi
2283 # end --enable-denyop
2284
2285 # OpenLDAP --enable-dyngroup
2286         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2287 if test "${enable_dyngroup+set}" = set; then
2288   enableval="$enable_dyngroup"
2289   
2290         ol_arg=invalid
2291         for ol_val in no yes mod ; do
2292                 if test "$enableval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2298         fi
2299         ol_enable_dyngroup="$ol_arg"
2300
2301 else
2302         ol_enable_dyngroup="no"
2303 fi
2304 # end --enable-dyngroup
2305
2306 # OpenLDAP --enable-lastmod
2307         # Check whether --enable-lastmod or --disable-lastmod was given.
2308 if test "${enable_lastmod+set}" = set; then
2309   enableval="$enable_lastmod"
2310   
2311         ol_arg=invalid
2312         for ol_val in no yes mod ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2319         fi
2320         ol_enable_lastmod="$ol_arg"
2321
2322 else
2323         ol_enable_lastmod="no"
2324 fi
2325 # end --enable-lastmod
2326
2327 # OpenLDAP --enable-ppolicy
2328         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2329 if test "${enable_ppolicy+set}" = set; then
2330   enableval="$enable_ppolicy"
2331   
2332         ol_arg=invalid
2333         for ol_val in no yes mod ; do
2334                 if test "$enableval" = "$ol_val" ; then
2335                         ol_arg="$ol_val"
2336                 fi
2337         done
2338         if test "$ol_arg" = "invalid" ; then
2339                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2340         fi
2341         ol_enable_ppolicy="$ol_arg"
2342
2343 else
2344         ol_enable_ppolicy="no"
2345 fi
2346 # end --enable-ppolicy
2347
2348 # OpenLDAP --enable-proxycache
2349         # Check whether --enable-proxycache or --disable-proxycache was given.
2350 if test "${enable_proxycache+set}" = set; then
2351   enableval="$enable_proxycache"
2352   
2353         ol_arg=invalid
2354         for ol_val in no yes mod ; do
2355                 if test "$enableval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2361         fi
2362         ol_enable_proxycache="$ol_arg"
2363
2364 else
2365         ol_enable_proxycache="no"
2366 fi
2367 # end --enable-proxycache
2368
2369 # OpenLDAP --enable-refint
2370         # Check whether --enable-refint or --disable-refint was given.
2371 if test "${enable_refint+set}" = set; then
2372   enableval="$enable_refint"
2373   
2374         ol_arg=invalid
2375         for ol_val in no yes mod ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2382         fi
2383         ol_enable_refint="$ol_arg"
2384
2385 else
2386         ol_enable_refint="no"
2387 fi
2388 # end --enable-refint
2389
2390 # OpenLDAP --enable-rwm
2391         # Check whether --enable-rwm or --disable-rwm was given.
2392 if test "${enable_rwm+set}" = set; then
2393   enableval="$enable_rwm"
2394   
2395         ol_arg=invalid
2396         for ol_val in no yes mod ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2403         fi
2404         ol_enable_rwm="$ol_arg"
2405
2406 else
2407         ol_enable_rwm="no"
2408 fi
2409 # end --enable-rwm
2410
2411 # OpenLDAP --enable-unique
2412         # Check whether --enable-unique or --disable-unique was given.
2413 if test "${enable_unique+set}" = set; then
2414   enableval="$enable_unique"
2415   
2416         ol_arg=invalid
2417         for ol_val in no yes mod ; do
2418                 if test "$enableval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2424         fi
2425         ol_enable_unique="$ol_arg"
2426
2427 else
2428         ol_enable_unique="no"
2429 fi
2430 # end --enable-unique
2431
2432
2433
2434 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2435 if test "${with_xxslurpdoptions+set}" = set; then
2436   withval="$with_xxslurpdoptions"
2437   :
2438 fi
2439
2440 # OpenLDAP --enable-slurpd
2441         # Check whether --enable-slurpd or --disable-slurpd was given.
2442 if test "${enable_slurpd+set}" = set; then
2443   enableval="$enable_slurpd"
2444   
2445         ol_arg=invalid
2446         for ol_val in auto yes no ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2453         fi
2454         ol_enable_slurpd="$ol_arg"
2455
2456 else
2457         ol_enable_slurpd="auto"
2458 fi
2459 # end --enable-slurpd
2460
2461 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2462 if test "${with_xxliboptions+set}" = set; then
2463   withval="$with_xxliboptions"
2464   :
2465 fi
2466
2467 # Check whether --enable-static or --disable-static was given.
2468 if test "${enable_static+set}" = set; then
2469   enableval="$enable_static"
2470   p=${PACKAGE-default}
2471 case $enableval in
2472 yes) enable_static=yes ;;
2473 no) enable_static=no ;;
2474 *)
2475   enable_static=no
2476   # Look at the argument we got.  We use all the common list separators.
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2478   for pkg in $enableval; do
2479     if test "X$pkg" = "X$p"; then
2480       enable_static=yes
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484   ;;
2485 esac
2486 else
2487   enable_static=yes
2488 fi
2489
2490 # Check whether --enable-shared or --disable-shared was given.
2491 if test "${enable_shared+set}" = set; then
2492   enableval="$enable_shared"
2493   p=${PACKAGE-default}
2494 case $enableval in
2495 yes) enable_shared=yes ;;
2496 no) enable_shared=no ;;
2497 *)
2498   enable_shared=no
2499   # Look at the argument we got.  We use all the common list separators.
2500   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2501   for pkg in $enableval; do
2502     if test "X$pkg" = "X$p"; then
2503       enable_shared=yes
2504     fi
2505   done
2506   IFS="$ac_save_ifs"
2507   ;;
2508 esac
2509 else
2510   enable_shared=yes
2511 fi
2512
2513
2514
2515 # Activate any backends that were not explicitly enabled.
2516 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2517 if test $ol_enable_backends != no ; then
2518         for i in $Backends; do
2519                 eval "ol_tmp=\$ol_enable_$i"
2520                 if test $ol_tmp = no ; then
2521                         eval "ol_enable_$i=$ol_enable_backends"
2522                 fi
2523         done
2524 fi
2525 # Activate the overlays
2526 if test $ol_enable_overlays != no ; then
2527         for i in $Overlays; do
2528                 eval "ol_tmp=\$ol_enable_$i"
2529                 if test $ol_tmp = no ; then
2530                         eval "ol_enable_$i=$ol_enable_overlays"
2531                 fi
2532         done
2533 fi
2534
2535 # validate options
2536 if test $ol_enable_slapd = no ; then
2537                 if test $ol_enable_slapi = yes ; then
2538                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2539         fi
2540         if test $ol_enable_backends != no ; then
2541                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2542         fi
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp != no ; then
2546                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2547                         eval "ol_enable_$i=no"
2548                 fi
2549         done
2550         if test $ol_enable_modules = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2552         fi
2553         if test $ol_enable_multimaster = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2555         fi
2556         if test $ol_enable_wrappers = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2558         fi
2559         if test $ol_enable_rlookups = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2561         fi
2562         if test $ol_enable_aci = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2564         fi
2565         if test $ol_with_ldbm_api != auto ; then
2566                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2567         fi
2568         if test $ol_with_ldbm_type != auto ; then
2569                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2570         fi
2571         if test $ol_enable_slurpd = yes ; then
2572                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2573         fi
2574         if test $ol_enable_rewrite = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2576         fi
2577                 if test $ol_enable_overlays != no ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2579         fi
2580         for i in $Overlays; do
2581                 eval "ol_tmp=\$ol_enable_$i"
2582                 if test $ol_tmp != no ; then
2583                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2584                         eval "ol_enable_$i=no"
2585                 fi
2586         done
2587
2588         # force settings to no
2589         ol_enable_slapi=no
2590
2591         ol_enable_backends=no
2592         ol_enable_overlays=no
2593         ol_enable_modules=no
2594         ol_enable_multimaster=no
2595         ol_enable_rlookups=no
2596         ol_enable_aci=no
2597         ol_enable_wrappers=no
2598
2599         ol_with_ldbm_api=no
2600         ol_with_ldbm_type=no
2601
2602         ol_enable_slurpd=no
2603
2604         ol_enable_rewrite=no
2605
2606 elif test $ol_enable_ldbm = no ; then
2607         
2608         if test $ol_with_ldbm_api != auto ; then
2609                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2610         fi
2611
2612         if test $ol_with_ldbm_type != auto ; then
2613                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2614         fi
2615
2616         if test $ol_enable_modules != yes -a \
2617                 $ol_enable_bdb = no -a \
2618                 $ol_enable_dnssrv = no -a \
2619                 $ol_enable_hdb = no -a \
2620                 $ol_enable_ldap = no -a \
2621                 $ol_enable_meta = no -a \
2622                 $ol_enable_monitor = no -a \
2623                 $ol_enable_null = no -a \
2624                 $ol_enable_passwd = no -a \
2625                 $ol_enable_perl = no -a \
2626                 $ol_enable_relay = no -a \
2627                 $ol_enable_shell = no -a \
2628                 $ol_enable_sql = no ; then
2629
2630                 if test $ol_enable_slapd = yes ; then
2631                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2632                 else
2633                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2634                         ol_enable_slapd=no
2635                 fi
2636         fi
2637
2638         ol_with_ldbm_api=no
2639         ol_with_ldbm_type=no
2640
2641         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2642                 ol_with_ldbm_api=berkeley
2643         fi
2644
2645 else
2646                 if test $ol_with_ldbm_api = gdbm -a \
2647                 $ol_with_ldbm_type = btree ; then
2648                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2649         fi
2650         if test $ol_with_ldbm_api = mdbm -a \
2651                 $ol_with_ldbm_type = btree ; then
2652                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2653         fi
2654         if test $ol_with_ldbm_api = ndbm -a \
2655                 $ol_with_ldbm_type = btree ; then
2656                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2657         fi
2658
2659         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2660                 if test $ol_with_ldbm_api = auto ; then
2661                         ol_with_ldbm_api=berkeley
2662                 elif test $ol_with_ldbm_api != berkeley ; then
2663                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2664                 fi
2665         fi
2666 fi
2667
2668 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2669         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2670 fi
2671
2672 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2673         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2674 fi
2675
2676 if test $ol_enable_slurpd = yes ; then
2677                 if test $ol_with_threads = no ; then
2678                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2679         fi
2680 fi
2681
2682 if test $ol_enable_lmpasswd = yes ; then
2683         if test $ol_with_tls = no ; then
2684                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2685         fi
2686 fi
2687
2688 if test $ol_enable_kbind = yes ; then
2689         if test $ol_with_kerberos = no ; then
2690                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2691         elif test $ol_with_kerberos = auto ; then
2692                 ol_with_kerberos=yes
2693         fi
2694
2695 elif test $ol_enable_kbind = no ; then
2696         if test $ol_with_kerberos = auto ; then
2697                 ol_with_kerberos=no
2698         elif test $ol_with_kerberos != no ; then
2699                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2700                 ol_with_kerberos=no
2701         fi
2702 fi
2703
2704 if test $ol_enable_spasswd = yes ; then
2705         if test $ol_with_cyrus_sasl = no ; then
2706                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2707         fi
2708         ol_with_cyrus_sasl=yes
2709 fi
2710
2711 echo "$ac_t""done" 1>&6
2712
2713 LDAP_LIBS=
2714 LDBM_LIBS=
2715 LTHREAD_LIBS=
2716 LUTIL_LIBS=
2717
2718 SLAPD_LIBS=
2719 SLURPD_LIBS=
2720
2721 BUILD_SLAPD=no
2722 BUILD_SLURPD=no
2723
2724 BUILD_THREAD=no
2725
2726 BUILD_SLAPI=no
2727 SLAPD_SLAPI_DEPEND=
2728
2729 BUILD_BDB=no
2730 BUILD_DNSSRV=no
2731 BUILD_HDB=no
2732 BUILD_LDAP=no
2733 BUILD_LDBM=no
2734 BUILD_META=no
2735 BUILD_MONITOR=no
2736 BUILD_NULL=no
2737 BUILD_PASSWD=no
2738 BUILD_PERL=no
2739 BUILD_RELAY=no
2740 BUILD_SHELL=no
2741 BUILD_SQL=no
2742
2743 BUILD_CHAIN=no
2744 BUILD_DENYOP=no
2745 BUILD_DYNGROUP=no
2746 BUILD_LASTMOD=no
2747 BUILD_PPOLICY=no
2748 BUILD_PROXYCACHE=no
2749 BUILD_REFINT=no
2750 BUILD_RWM=no
2751 BUILD_UNIQUE=no
2752
2753 SLAPD_DYNAMIC_OVERLAYS=
2754
2755 SLAPD_MODULES_LDFLAGS=
2756 SLAPD_MODULES_CPPFLAGS=
2757
2758 SLAPD_STATIC_BACKENDS=
2759 SLAPD_DYNAMIC_BACKENDS=
2760
2761 SLAPD_PERL_LDFLAGS=
2762 MOD_PERL_LDFLAGS=
2763 PERL_CPPFLAGS=
2764
2765 SLAPD_SQL_LDFLAGS=
2766 SLAPD_SQL_LIBS=
2767 SLAPD_SQL_INCLUDES=
2768
2769 KRB4_LIBS=
2770 KRB5_LIBS=
2771 SASL_LIBS=
2772 TLS_LIBS=
2773 MODULES_LIBS=
2774 SLAPI_LIBS=
2775 LIBSLAPI=
2776 LIBSLAPITOOLS=
2777 AUTH_LIBS=
2778
2779 SLAPD_SLP_LIBS=
2780
2781
2782 # Find a good install program.  We prefer a C program (faster),
2783 # so one script is as good as another.  But avoid the broken or
2784 # incompatible versions:
2785 # SysV /etc/install, /usr/sbin/install
2786 # SunOS /usr/etc/install
2787 # IRIX /sbin/install
2788 # AIX /bin/install
2789 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2790 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2791 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2792 # ./install, which can be erroneously created by make from ./install.sh.
2793 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2794 echo "configure:2795: checking for a BSD compatible install" >&5
2795 if test -z "$INSTALL"; then
2796 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2797   echo $ac_n "(cached) $ac_c" 1>&6
2798 else
2799     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2800   for ac_dir in $PATH; do
2801     # Account for people who put trailing slashes in PATH elements.
2802     case "$ac_dir/" in
2803     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2804     *)
2805       # OSF1 and SCO ODT 3.0 have their own names for install.
2806       # Don't use installbsd from OSF since it installs stuff as root
2807       # by default.
2808       for ac_prog in ginstall scoinst install; do
2809         if test -f $ac_dir/$ac_prog; then
2810           if test $ac_prog = install &&
2811             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2812             # AIX install.  It has an incompatible calling convention.
2813             :
2814           elif test $ac_prog = install &&
2815             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2816             # program-specific install script used by HP pwplus--don't use.
2817             :
2818           else
2819             ac_cv_path_install="$ac_dir/$ac_prog -c"
2820             break 2
2821           fi
2822         fi
2823       done
2824       ;;
2825     esac
2826   done
2827   IFS="$ac_save_IFS"
2828
2829 fi
2830   if test "${ac_cv_path_install+set}" = set; then
2831     INSTALL="$ac_cv_path_install"
2832   else
2833     # As a last resort, use the slow shell script.  We don't cache a
2834     # path for INSTALL within a source directory, because that will
2835     # break other packages using the cache if that directory is
2836     # removed, or if the path is relative.
2837     INSTALL="$ac_install_sh"
2838   fi
2839 fi
2840 echo "$ac_t""$INSTALL" 1>&6
2841
2842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2843 # It thinks the first close brace ends the variable substitution.
2844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2845
2846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2847
2848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2849
2850
2851 cat >> confdefs.h <<\EOF
2852 #define HAVE_MKVERSION 1
2853 EOF
2854
2855
2856
2857
2858 ol_aix_threads=no
2859 case "$target" in
2860 *-*-aix*)       if test -z "$CC" ; then
2861                 case "$ol_with_threads" in
2862                 auto | yes |  posix) ol_aix_threads=yes ;;
2863                 esac
2864         fi
2865 ;;
2866 esac
2867
2868 if test $ol_aix_threads = yes ; then
2869         if test -z "${CC}" ; then
2870                 for ac_prog in cc_r xlc_r cc
2871 do
2872 # Extract the first word of "$ac_prog", so it can be a program name with args.
2873 set dummy $ac_prog; ac_word=$2
2874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_word" >&5
2876 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   if test -n "$CC"; then
2880   ac_cv_prog_CC="$CC" # Let the user override the test.
2881 else
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2883   ac_dummy="$PATH"
2884   for ac_dir in $ac_dummy; do
2885     test -z "$ac_dir" && ac_dir=.
2886     if test -f $ac_dir/$ac_word; then
2887       ac_cv_prog_CC="$ac_prog"
2888       break
2889     fi
2890   done
2891   IFS="$ac_save_ifs"
2892 fi
2893 fi
2894 CC="$ac_cv_prog_CC"
2895 if test -n "$CC"; then
2896   echo "$ac_t""$CC" 1>&6
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901 test -n "$CC" && break
2902 done
2903
2904
2905                 if test "$CC" = cc ; then
2906                                                 if test $ol_with_threads != auto ; then
2907                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2908                         else
2909                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2910                         fi
2911                         ol_with_threads=no
2912                 fi
2913         fi
2914
2915         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2916                 ol_with_threads=posix
2917                 ol_cv_pthread_create=yes
2918         fi
2919 fi
2920
2921 if test -z "${CC}"; then
2922         for ac_prog in cc gcc
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$CC"; then
2932   ac_cv_prog_CC="$CC" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_CC="$ac_prog"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 CC="$ac_cv_prog_CC"
2947 if test -n "$CC"; then
2948   echo "$ac_t""$CC" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 test -n "$CC" && break
2954 done
2955 test -n "$CC" || CC="missing"
2956
2957
2958         if test "${CC}" = "missing" ; then
2959                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2960         fi
2961 fi
2962
2963 if test -z "${AR}"; then
2964         for ac_prog in ar gar
2965 do
2966 # Extract the first word of "$ac_prog", so it can be a program name with args.
2967 set dummy $ac_prog; ac_word=$2
2968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2969 echo "configure:2970: checking for $ac_word" >&5
2970 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -n "$AR"; then
2974   ac_cv_prog_AR="$AR" # Let the user override the test.
2975 else
2976   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2977   ac_dummy="$PATH"
2978   for ac_dir in $ac_dummy; do
2979     test -z "$ac_dir" && ac_dir=.
2980     if test -f $ac_dir/$ac_word; then
2981       ac_cv_prog_AR="$ac_prog"
2982       break
2983     fi
2984   done
2985   IFS="$ac_save_ifs"
2986 fi
2987 fi
2988 AR="$ac_cv_prog_AR"
2989 if test -n "$AR"; then
2990   echo "$ac_t""$AR" 1>&6
2991 else
2992   echo "$ac_t""no" 1>&6
2993 fi
2994
2995 test -n "$AR" && break
2996 done
2997 test -n "$AR" || AR="missing"
2998
2999
3000         if test "${AR}" = "missing" ; then
3001                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3002         fi
3003 fi
3004
3005
3006
3007 # Find the correct PATH separator.  Usually this is `:', but
3008 # DJGPP uses `;' like DOS.
3009 if test "X${PATH_SEPARATOR+set}" != Xset; then
3010   UNAME=${UNAME-`uname 2>/dev/null`}
3011   case X$UNAME in
3012     *-DOS) lt_cv_sys_path_separator=';' ;;
3013     *)     lt_cv_sys_path_separator=':' ;;
3014   esac
3015   PATH_SEPARATOR=$lt_cv_sys_path_separator
3016 fi
3017
3018 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3019 echo "configure:3020: checking for Cygwin environment" >&5
3020 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026
3027 int main() {
3028
3029 #ifndef __CYGWIN__
3030 #define __CYGWIN__ __CYGWIN32__
3031 #endif
3032 return __CYGWIN__;
3033 ; return 0; }
3034 EOF
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036   rm -rf conftest*
3037   ac_cv_cygwin=yes
3038 else
3039   echo "configure: failed program was:" >&5
3040   cat conftest.$ac_ext >&5
3041   rm -rf conftest*
3042   ac_cv_cygwin=no
3043 fi
3044 rm -f conftest*
3045 fi
3046
3047 echo "$ac_t""$ac_cv_cygwin" 1>&6
3048 CYGWIN=
3049 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3050 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3051 echo "configure:3052: checking for mingw32 environment" >&5
3052 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 int main() {
3060 return __MINGW32__;
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3064   rm -rf conftest*
3065   ac_cv_mingw32=yes
3066 else
3067   echo "configure: failed program was:" >&5
3068   cat conftest.$ac_ext >&5
3069   rm -rf conftest*
3070   ac_cv_mingw32=no
3071 fi
3072 rm -f conftest*
3073 fi
3074
3075 echo "$ac_t""$ac_cv_mingw32" 1>&6
3076 MINGW32=
3077 test "$ac_cv_mingw32" = yes && MINGW32=yes
3078 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3079 echo "configure:3080: checking for EMX OS/2 environment" >&5
3080 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086
3087 int main() {
3088 return __EMX__;
3089 ; return 0; }
3090 EOF
3091 if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3092   rm -rf conftest*
3093   ac_cv_emxos2=yes
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   rm -rf conftest*
3098   ac_cv_emxos2=no
3099 fi
3100 rm -f conftest*
3101 fi
3102
3103 echo "$ac_t""$ac_cv_emxos2" 1>&6
3104 EMXOS2=
3105 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3106 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3107 echo "configure:3108: checking how to run the C preprocessor" >&5
3108 # On Suns, sometimes $CPP names a directory.
3109 if test -n "$CPP" && test -d "$CPP"; then
3110   CPP=
3111 fi
3112 if test -z "$CPP"; then
3113 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116     # This must be in double quotes, not single quotes, because CPP may get
3117   # substituted into the Makefile and "${CC-cc}" will confuse make.
3118   CPP="${CC-cc} -E"
3119   # On the NeXT, cc -E runs the code through the compiler's parser,
3120   # not just through cpp.
3121   cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <assert.h>
3125 Syntax Error
3126 EOF
3127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3128 { (eval echo configure:3129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3130 if test -z "$ac_err"; then
3131   :
3132 else
3133   echo "$ac_err" >&5
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136   rm -rf conftest*
3137   CPP="${CC-cc} -E -traditional-cpp"
3138   cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <assert.h>
3142 Syntax Error
3143 EOF
3144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3145 { (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3147 if test -z "$ac_err"; then
3148   :
3149 else
3150   echo "$ac_err" >&5
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   CPP="${CC-cc} -nologo -E"
3155   cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158 #include <assert.h>
3159 Syntax Error
3160 EOF
3161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3162 { (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3164 if test -z "$ac_err"; then
3165   :
3166 else
3167   echo "$ac_err" >&5
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   CPP=/lib/cpp
3172 fi
3173 rm -f conftest*
3174 fi
3175 rm -f conftest*
3176 fi
3177 rm -f conftest*
3178   ac_cv_prog_CPP="$CPP"
3179 fi
3180   CPP="$ac_cv_prog_CPP"
3181 else
3182   ac_cv_prog_CPP="$CPP"
3183 fi
3184 echo "$ac_t""$CPP" 1>&6
3185
3186 # Check whether --enable-fast-install or --disable-fast-install was given.
3187 if test "${enable_fast_install+set}" = set; then
3188   enableval="$enable_fast_install"
3189   p=${PACKAGE-default}
3190 case $enableval in
3191 yes) enable_fast_install=yes ;;
3192 no) enable_fast_install=no ;;
3193 *)
3194   enable_fast_install=no
3195   # Look at the argument we got.  We use all the common list separators.
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3197   for pkg in $enableval; do
3198     if test "X$pkg" = "X$p"; then
3199       enable_fast_install=yes
3200     fi
3201   done
3202   IFS="$ac_save_ifs"
3203   ;;
3204 esac
3205 else
3206   enable_fast_install=yes
3207 fi
3208
3209 # Extract the first word of "gcc", so it can be a program name with args.
3210 set dummy gcc; ac_word=$2
3211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_word" >&5
3213 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   if test -n "$CC"; then
3217   ac_cv_prog_CC="$CC" # Let the user override the test.
3218 else
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3220   ac_dummy="$PATH"
3221   for ac_dir in $ac_dummy; do
3222     test -z "$ac_dir" && ac_dir=.
3223     if test -f $ac_dir/$ac_word; then
3224       ac_cv_prog_CC="gcc"
3225       break
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229 fi
3230 fi
3231 CC="$ac_cv_prog_CC"
3232 if test -n "$CC"; then
3233   echo "$ac_t""$CC" 1>&6
3234 else
3235   echo "$ac_t""no" 1>&6
3236 fi
3237
3238 if test -z "$CC"; then
3239   # Extract the first word of "cc", so it can be a program name with args.
3240 set dummy cc; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   if test -n "$CC"; then
3247   ac_cv_prog_CC="$CC" # Let the user override the test.
3248 else
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3250   ac_prog_rejected=no
3251   ac_dummy="$PATH"
3252   for ac_dir in $ac_dummy; do
3253     test -z "$ac_dir" && ac_dir=.
3254     if test -f $ac_dir/$ac_word; then
3255       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3256         ac_prog_rejected=yes
3257         continue
3258       fi
3259       ac_cv_prog_CC="cc"
3260       break
3261     fi
3262   done
3263   IFS="$ac_save_ifs"
3264 if test $ac_prog_rejected = yes; then
3265   # We found a bogon in the path, so make sure we never use it.
3266   set dummy $ac_cv_prog_CC
3267   shift
3268   if test $# -gt 0; then
3269     # We chose a different compiler from the bogus one.
3270     # However, it has the same basename, so the bogon will be chosen
3271     # first if we set CC to just the basename; use the full file name.
3272     shift
3273     set dummy "$ac_dir/$ac_word" "$@"
3274     shift
3275     ac_cv_prog_CC="$@"
3276   fi
3277 fi
3278 fi
3279 fi
3280 CC="$ac_cv_prog_CC"
3281 if test -n "$CC"; then
3282   echo "$ac_t""$CC" 1>&6
3283 else
3284   echo "$ac_t""no" 1>&6
3285 fi
3286
3287   if test -z "$CC"; then
3288     case "`uname -s`" in
3289     *win32* | *WIN32* | *CYGWIN*)
3290       # Extract the first word of "cl", so it can be a program name with args.
3291 set dummy cl; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$CC"; then
3298   ac_cv_prog_CC="$CC" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_CC="cl"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 CC="$ac_cv_prog_CC"
3313 if test -n "$CC"; then
3314   echo "$ac_t""$CC" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318  ;;
3319     esac
3320   fi
3321   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3322 fi
3323
3324 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3325 echo "configure:3326: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3326
3327 ac_ext=c
3328 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3329 ac_cpp='$CPP $CPPFLAGS'
3330 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3331 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3332 cross_compiling=$ac_cv_prog_cc_cross
3333
3334 cat > conftest.$ac_ext << EOF
3335
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338
3339 main(){return(0);}
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342   ac_cv_prog_cc_works=yes
3343   # If we can't run a trivial program, we are probably using a cross compiler.
3344   if (./conftest; exit) 2>/dev/null; then
3345     ac_cv_prog_cc_cross=no
3346   else
3347     ac_cv_prog_cc_cross=yes
3348   fi
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   ac_cv_prog_cc_works=no
3353 fi
3354 rm -fr conftest*
3355 ac_ext=c
3356 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3357 ac_cpp='$CPP $CPPFLAGS'
3358 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3359 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3360 cross_compiling=$ac_cv_prog_cc_cross
3361
3362 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3363 if test $ac_cv_prog_cc_works = no; then
3364   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3365 fi
3366 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3367 echo "configure:3368: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3368 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3369 cross_compiling=$ac_cv_prog_cc_cross
3370
3371 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3372 echo "configure:3373: checking whether we are using GNU C" >&5
3373 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.c <<EOF
3377 #ifdef __GNUC__
3378   yes;
3379 #endif
3380 EOF
3381 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3382   ac_cv_prog_gcc=yes
3383 else
3384   ac_cv_prog_gcc=no
3385 fi
3386 fi
3387
3388 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3389
3390 if test $ac_cv_prog_gcc = yes; then
3391   GCC=yes
3392 else
3393   GCC=
3394 fi
3395
3396 ac_test_CFLAGS="${CFLAGS+set}"
3397 ac_save_CFLAGS="$CFLAGS"
3398 CFLAGS=
3399 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3400 echo "configure:3401: checking whether ${CC-cc} accepts -g" >&5
3401 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   echo 'void f(){}' > conftest.c
3405 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3406   ac_cv_prog_cc_g=yes
3407 else
3408   ac_cv_prog_cc_g=no
3409 fi
3410 rm -f conftest*
3411
3412 fi
3413
3414 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3415 if test "$ac_test_CFLAGS" = set; then
3416   CFLAGS="$ac_save_CFLAGS"
3417 elif test $ac_cv_prog_cc_g = yes; then
3418   if test "$GCC" = yes; then
3419     CFLAGS="-g -O2"
3420   else
3421     CFLAGS="-g"
3422   fi
3423 else
3424   if test "$GCC" = yes; then
3425     CFLAGS="-O2"
3426   else
3427     CFLAGS=
3428   fi
3429 fi
3430
3431 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3432 if test "${with_gnu_ld+set}" = set; then
3433   withval="$with_gnu_ld"
3434   test "$withval" = no || with_gnu_ld=yes
3435 else
3436   with_gnu_ld=no
3437 fi
3438
3439 ac_prog=ld
3440 if test "$GCC" = yes; then
3441   # Check if gcc -print-prog-name=ld gives a path.
3442   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3443 echo "configure:3444: checking for ld used by GCC" >&5
3444   case $host in
3445   *-*-mingw*)
3446     # gcc leaves a trailing carriage return which upsets mingw
3447     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3448   *)
3449     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3450   esac
3451   case $ac_prog in
3452     # Accept absolute paths.
3453     [\\/]* | [A-Za-z]:[\\/]*)
3454       re_direlt='/[^/][^/]*/\.\./'
3455       # Canonicalize the path of ld
3456       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3457       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3458         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3459       done
3460       test -z "$LD" && LD="$ac_prog"
3461       ;;
3462   "")
3463     # If it fails, then pretend we aren't using GCC.
3464     ac_prog=ld
3465     ;;
3466   *)
3467     # If it is relative, then search for the first ld in PATH.
3468     with_gnu_ld=unknown
3469     ;;
3470   esac
3471 elif test "$with_gnu_ld" = yes; then
3472   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3473 echo "configure:3474: checking for GNU ld" >&5
3474 else
3475   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3476 echo "configure:3477: checking for non-GNU ld" >&5
3477 fi
3478 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   if test -z "$LD"; then
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3483   for ac_dir in $PATH; do
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3486       lt_cv_path_LD="$ac_dir/$ac_prog"
3487       # Check to see if the program is GNU ld.  I'd rather use --version,
3488       # but apparently some GNU ld's only accept -v.
3489       # Break only if it was the GNU/non-GNU ld that we prefer.
3490       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3491         test "$with_gnu_ld" != no && break
3492       else
3493         test "$with_gnu_ld" != yes && break
3494       fi
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 else
3499   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3500 fi
3501 fi
3502
3503 LD="$lt_cv_path_LD"
3504 if test -n "$LD"; then
3505   echo "$ac_t""$LD" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3510 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3511 echo "configure:3512: checking if the linker ($LD) is GNU ld" >&5
3512 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3516 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3517   lt_cv_prog_gnu_ld=yes
3518 else
3519   lt_cv_prog_gnu_ld=no
3520 fi
3521 fi
3522
3523 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3524 with_gnu_ld=$lt_cv_prog_gnu_ld
3525
3526
3527 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3528 echo "configure:3529: checking for $LD option to reload object files" >&5
3529 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   lt_cv_ld_reload_flag='-r'
3533 fi
3534
3535 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3536 reload_flag=$lt_cv_ld_reload_flag
3537 test -n "$reload_flag" && reload_flag=" $reload_flag"
3538
3539 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3540 echo "configure:3541: checking for BSD-compatible nm" >&5
3541 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   if test -n "$NM"; then
3545   # Let the user override the test.
3546   lt_cv_path_NM="$NM"
3547 else
3548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3549   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3550     test -z "$ac_dir" && ac_dir=.
3551     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3552     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3553       # Check to see if the nm accepts a BSD-compat flag.
3554       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3555       #   nm: unknown option "B" ignored
3556       # Tru64's nm complains that /dev/null is an invalid object file
3557       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3558         lt_cv_path_NM="$tmp_nm -B"
3559         break
3560       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3561         lt_cv_path_NM="$tmp_nm -p"
3562         break
3563       else
3564         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3565         continue # so that we can try to find one that supports BSD flags
3566       fi
3567     fi
3568   done
3569   IFS="$ac_save_ifs"
3570   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3571 fi
3572 fi
3573
3574 NM="$lt_cv_path_NM"
3575 echo "$ac_t""$NM" 1>&6
3576
3577 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3578 echo "configure:3579: checking for a sed that does not truncate output" >&5
3579 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   # Loop through the user's path and test for sed and gsed.
3583 # Then use that list of sed's as ones to test for truncation.
3584 as_executable_p="test -f"
3585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586 for as_dir in $PATH
3587 do
3588   IFS=$as_save_IFS
3589   test -z "$as_dir" && as_dir=.
3590   for ac_prog in sed gsed; do
3591     for ac_exec_ext in '' $ac_executable_extensions; do
3592       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3593         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3594       fi
3595     done
3596   done
3597 done
3598
3599   # Create a temporary directory, and hook for its removal unless debugging.
3600 $debug ||
3601 {
3602   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3603   trap '{ (exit 1); exit 1; }' 1 2 13 15
3604 }
3605
3606 # Create a (secure) tmp directory for tmp files.
3607 : ${TMPDIR=/tmp}
3608 {
3609   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3610   test -n "$tmp" && test -d "$tmp"
3611 }  ||
3612 {
3613   tmp=$TMPDIR/sed$$-$RANDOM
3614   (umask 077 && mkdir $tmp)
3615 } ||
3616 {
3617    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3618    { (exit 1); exit 1; }
3619 }
3620   _max=0
3621   _count=0
3622   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3623   # along with /bin/sed that truncates output.
3624   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3625     test ! -f ${_sed} && break
3626     cat /dev/null > "$tmp/sed.in"
3627     _count=0
3628     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3629     # Check for GNU sed and select it if it is found.
3630     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3631       lt_cv_path_SED=${_sed}
3632       break
3633     fi
3634     while true; do
3635       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3636       mv "$tmp/sed.tmp" "$tmp/sed.in"
3637       cp "$tmp/sed.in" "$tmp/sed.nl"
3638       echo >>"$tmp/sed.nl"
3639       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3640       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3641       # 40000 chars as input seems more than enough
3642       test $_count -gt 10 && break
3643       _count=`expr $_count + 1`
3644       if test $_count -gt $_max; then
3645         _max=$_count
3646         lt_cv_path_SED=$_sed
3647       fi
3648     done
3649   done
3650   rm -rf "$tmp"
3651
3652 fi
3653
3654 if test "X$SED" != "X"; then
3655   lt_cv_path_SED=$SED
3656 else
3657   SED=$lt_cv_path_SED
3658 fi
3659 echo "$ac_t""$SED" 1>&6
3660
3661 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3662 echo "configure:3663: checking whether ln -s works" >&5
3663 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3664   echo $ac_n "(cached) $ac_c" 1>&6
3665 else
3666   rm -f conftestdata
3667 if ln -s X conftestdata 2>/dev/null
3668 then
3669   rm -f conftestdata
3670   ac_cv_prog_LN_S="ln -s"
3671 else
3672   ac_cv_prog_LN_S=ln
3673 fi
3674 fi
3675 LN_S="$ac_cv_prog_LN_S"
3676 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3677   echo "$ac_t""yes" 1>&6
3678 else
3679   echo "$ac_t""no" 1>&6
3680 fi
3681
3682 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3683 echo "configure:3684: checking how to recognise dependent libraries" >&5
3684 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   lt_cv_file_magic_cmd='$MAGIC_CMD'
3688 lt_cv_file_magic_test_file=
3689 lt_cv_deplibs_check_method='unknown'
3690 # Need to set the preceding variable on all platforms that support
3691 # interlibrary dependencies.
3692 # 'none' -- dependencies not supported.
3693 # `unknown' -- same as none, but documents that we really don't know.
3694 # 'pass_all' -- all dependencies passed with no checks.
3695 # 'test_compile' -- check by making test program.
3696 # 'file_magic [[regex]]' -- check by looking for files in library path
3697 # which responds to the $file_magic_cmd with a given egrep regex.
3698 # If you have `file' or equivalent on your system and you're not sure
3699 # whether `pass_all' will *always* work, you probably want this one.
3700
3701 case $host_os in
3702 aix4* | aix5*)
3703   lt_cv_deplibs_check_method=pass_all
3704   ;;
3705
3706 beos*)
3707   lt_cv_deplibs_check_method=pass_all
3708   ;;
3709
3710 bsdi4*)
3711   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3712   lt_cv_file_magic_cmd='/usr/bin/file -L'
3713   lt_cv_file_magic_test_file=/shlib/libc.so
3714   ;;
3715
3716 cygwin* | mingw* | pw32*)
3717   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3718   lt_cv_file_magic_cmd='$OBJDUMP -f'
3719   ;;
3720
3721 darwin* | rhapsody*)
3722   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3723   lt_cv_file_magic_cmd='/usr/bin/file -L'
3724   case "$host_os" in
3725   rhapsody* | darwin1.[012])
3726     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3727     ;;
3728   *) # Darwin 1.3 on
3729     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3730     ;;
3731   esac
3732   ;;
3733
3734 freebsd*)
3735   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3736     case $host_cpu in
3737     i*86 )
3738       # Not sure whether the presence of OpenBSD here was a mistake.
3739       # Let's accept both of them until this is cleared up.
3740       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3741       lt_cv_file_magic_cmd=/usr/bin/file
3742       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3743       ;;
3744     esac
3745   else
3746     lt_cv_deplibs_check_method=pass_all
3747   fi
3748   ;;
3749
3750 gnu*)
3751   lt_cv_deplibs_check_method=pass_all
3752   ;;
3753
3754 hpux10.20*|hpux11*)
3755   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3756   lt_cv_file_magic_cmd=/usr/bin/file
3757   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3758   ;;
3759
3760 irix5* | irix6* | nonstopux*)
3761   case $host_os in
3762   irix5* | nonstopux*)
3763     # this will be overridden with pass_all, but let us keep it just in case
3764     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3765     ;;
3766   *)
3767     case $LD in
3768     *-32|*"-32 ") libmagic=32-bit;;
3769     *-n32|*"-n32 ") libmagic=N32;;
3770     *-64|*"-64 ") libmagic=64-bit;;
3771     *) libmagic=never-match;;
3772     esac
3773     # this will be overridden with pass_all, but let us keep it just in case
3774     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3775     ;;
3776   esac
3777   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3778   lt_cv_deplibs_check_method=pass_all
3779   ;;
3780
3781 # This must be Linux ELF.
3782 linux-gnu*)
3783   case $host_cpu in
3784   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3785     lt_cv_deplibs_check_method=pass_all ;;
3786   *)
3787     # glibc up to 2.1.1 does not perform some relocations on ARM
3788     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3789   esac
3790   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3791   ;;
3792
3793 netbsd*)
3794   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3795     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3796   else
3797     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3798   fi
3799   ;;
3800
3801 newos6*)
3802   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3803   lt_cv_file_magic_cmd=/usr/bin/file
3804   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3805   ;;
3806
3807 openbsd*)
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3810   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3811     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3812   else
3813     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3814   fi
3815   ;;
3816
3817 openedition*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 osf3* | osf4* | osf5*)
3822   # this will be overridden with pass_all, but let us keep it just in case
3823   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 sco3.2v5*)
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 solaris*)
3833   lt_cv_deplibs_check_method=pass_all
3834   lt_cv_file_magic_test_file=/lib/libc.so
3835   ;;
3836
3837 sysv5uw[78]* | sysv4*uw2*)
3838   lt_cv_deplibs_check_method=pass_all
3839   ;;
3840
3841 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3842   case $host_vendor in
3843   motorola)
3844     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]'
3845     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3846     ;;
3847   ncr)
3848     lt_cv_deplibs_check_method=pass_all
3849     ;;
3850   sequent)
3851     lt_cv_file_magic_cmd='/bin/file'
3852     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3853     ;;
3854   sni)
3855     lt_cv_file_magic_cmd='/bin/file'
3856     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3857     lt_cv_file_magic_test_file=/lib/libc.so
3858     ;;
3859   siemens)
3860     lt_cv_deplibs_check_method=pass_all
3861     ;;
3862   esac
3863   ;;
3864 esac
3865
3866 fi
3867
3868 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3869 file_magic_cmd=$lt_cv_file_magic_cmd
3870 deplibs_check_method=$lt_cv_deplibs_check_method
3871
3872 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3873 echo "configure:3874: checking for object suffix" >&5
3874 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   rm -f conftest*
3878 echo 'int i = 1;' > conftest.$ac_ext
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880   for ac_file in conftest.*; do
3881     case $ac_file in
3882     *.c) ;;
3883     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3884     esac
3885   done
3886 else
3887   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3888 fi
3889 rm -f conftest*
3890 fi
3891
3892 echo "$ac_t""$ac_cv_objext" 1>&6
3893 OBJEXT=$ac_cv_objext
3894 ac_objext=$ac_cv_objext
3895
3896
3897
3898
3899 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3900 echo "configure:3901: checking for executable suffix" >&5
3901 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3905   ac_cv_exeext=.exe
3906 else
3907   rm -f conftest*
3908   echo 'int main () { return 0; }' > conftest.$ac_ext
3909   ac_cv_exeext=
3910   if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3911     for file in conftest.*; do
3912       case $file in
3913       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3914       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3915       esac
3916     done
3917   else
3918     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3919   fi
3920   rm -f conftest*
3921   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3922 fi
3923 fi
3924
3925 EXEEXT=""
3926 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3927 echo "$ac_t""${ac_cv_exeext}" 1>&6
3928 ac_exeext=$EXEEXT
3929
3930 if test $host != $build; then
3931   ac_tool_prefix=${host_alias}-
3932 else
3933   ac_tool_prefix=
3934 fi
3935
3936
3937
3938
3939 # Check for command to grab the raw symbol name followed by C symbol from nm.
3940 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3941 echo "configure:3942: checking command to parse $NM output" >&5
3942 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3943   echo $ac_n "(cached) $ac_c" 1>&6
3944 else
3945   
3946 # These are sane defaults that work on at least a few old systems.
3947 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3948
3949 # Character class describing NM global symbol codes.
3950 symcode='[BCDEGRST]'
3951
3952 # Regexp to match symbols that can be accessed directly from C.
3953 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3954
3955 # Transform the above into a raw symbol and a C symbol.
3956 symxfrm='\1 \2\3 \3'
3957
3958 # Transform an extracted symbol line into a proper C declaration
3959 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3960
3961 # Transform an extracted symbol line into symbol name and symbol address
3962 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'"
3963
3964 # Define system-specific variables.
3965 case $host_os in
3966 aix*)
3967   symcode='[BCDT]'
3968   ;;
3969 cygwin* | mingw* | pw32*)
3970   symcode='[ABCDGISTW]'
3971   ;;
3972 hpux*) # Its linker distinguishes data from code symbols
3973   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3974   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'"
3975   ;;
3976 irix* | nonstopux*)
3977   symcode='[BCDEGRST]'
3978   ;;
3979 osf*)
3980   symcode='[BCDEGQRST]'
3981   ;;
3982 solaris* | sysv5*)
3983   symcode='[BDT]'
3984   ;;
3985 sysv4)
3986   symcode='[DFNSTU]'
3987   ;;
3988 esac
3989
3990 # Handle CRLF in mingw tool chain
3991 opt_cr=
3992 case $host_os in
3993 mingw*)
3994   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3995   ;;
3996 esac
3997
3998 # If we're using GNU nm, then use its standard symbol codes.
3999 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4000   symcode='[ABCDGISTW]'
4001 fi
4002
4003 # Try without a prefix undercore, then with it.
4004 for ac_symprfx in "" "_"; do
4005
4006   # Write the raw and C identifiers.
4007 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4008
4009   # Check to see that the pipe works correctly.
4010   pipe_works=no
4011   rm -f conftest*
4012   cat > conftest.$ac_ext <<EOF
4013 #ifdef __cplusplus
4014 extern "C" {
4015 #endif
4016 char nm_test_var;
4017 void nm_test_func(){}
4018 #ifdef __cplusplus
4019 }
4020 #endif
4021 int main(){nm_test_var='a';nm_test_func();return(0);}
4022 EOF
4023
4024   if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4025     # Now try to grab the symbols.
4026     nlist=conftest.nm
4027     if { (eval echo configure:4028: \"$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
4028       # Try sorting and uniquifying the output.
4029       if sort "$nlist" | uniq > "$nlist"T; then
4030         mv -f "$nlist"T "$nlist"
4031       else
4032         rm -f "$nlist"T
4033       fi
4034
4035       # Make sure that we snagged all the symbols we need.
4036       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4037         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4038           cat <<EOF > conftest.$ac_ext
4039 #ifdef __cplusplus
4040 extern "C" {
4041 #endif
4042
4043 EOF
4044           # Now generate the symbol file.
4045           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4046
4047           cat <<EOF >> conftest.$ac_ext
4048 #if defined (__STDC__) && __STDC__
4049 # define lt_ptr void *
4050 #else
4051 # define lt_ptr char *
4052 # define const
4053 #endif
4054
4055 /* The mapping between symbol names and symbols. */
4056 const struct {
4057   const char *name;
4058   lt_ptr address;
4059 }
4060 lt_preloaded_symbols[] =
4061 {
4062 EOF
4063           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4064           cat <<\EOF >> conftest.$ac_ext
4065   {0, (lt_ptr) 0}
4066 };
4067
4068 #ifdef __cplusplus
4069 }
4070 #endif
4071 EOF
4072           # Now try linking the two files.
4073           mv conftest.$ac_objext conftstm.$ac_objext
4074           save_LIBS="$LIBS"
4075           save_CFLAGS="$CFLAGS"
4076           LIBS="conftstm.$ac_objext"
4077           CFLAGS="$CFLAGS$no_builtin_flag"
4078           if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4079             pipe_works=yes
4080           fi
4081           LIBS="$save_LIBS"
4082           CFLAGS="$save_CFLAGS"
4083         else
4084           echo "cannot find nm_test_func in $nlist" >&5
4085         fi
4086       else
4087         echo "cannot find nm_test_var in $nlist" >&5
4088       fi
4089     else
4090       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4091     fi
4092   else
4093     echo "$progname: failed program was:" >&5
4094     cat conftest.$ac_ext >&5
4095   fi
4096   rm -f conftest* conftst*
4097
4098   # Do not use the global_symbol_pipe unless it works.
4099   if test "$pipe_works" = yes; then
4100     break
4101   else
4102     lt_cv_sys_global_symbol_pipe=
4103   fi
4104 done
4105
4106 fi
4107
4108 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4109 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4110   global_symbol_to_cdecl=
4111   global_symbol_to_c_name_address=
4112 else
4113   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4114   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4115 fi
4116 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4117 then
4118   echo "$ac_t""failed" 1>&6
4119 else
4120   echo "$ac_t""ok" 1>&6
4121 fi
4122
4123 for ac_hdr in dlfcn.h
4124 do
4125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4127 echo "configure:4128: checking for $ac_hdr" >&5
4128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4129   echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131   cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <$ac_hdr>
4135 EOF
4136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4137 { (eval echo configure:4138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4139 if test -z "$ac_err"; then
4140   rm -rf conftest*
4141   eval "ac_cv_header_$ac_safe=yes"
4142 else
4143   echo "$ac_err" >&5
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   eval "ac_cv_header_$ac_safe=no"
4148 fi
4149 rm -f conftest*
4150 fi
4151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4152   echo "$ac_t""yes" 1>&6
4153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4154   cat >> confdefs.h <<EOF
4155 #define $ac_tr_hdr 1
4156 EOF
4157  
4158 else
4159   echo "$ac_t""no" 1>&6
4160 fi
4161 done
4162
4163
4164
4165
4166
4167
4168 # Only perform the check for file, if the check method requires it
4169 case $deplibs_check_method in
4170 file_magic*)
4171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4173 echo "configure:4174: checking for ${ac_tool_prefix}file" >&5
4174 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   case $MAGIC_CMD in
4178   /*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4180   ;;
4181   ?:/*)
4182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4183   ;;
4184   *)
4185   ac_save_MAGIC_CMD="$MAGIC_CMD"
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="/usr/bin:$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/${ac_tool_prefix}file; then
4191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4192       if test -n "$file_magic_test_file"; then
4193         case $deplibs_check_method in
4194         "file_magic "*)
4195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4198             egrep "$file_magic_regex" > /dev/null; then
4199             :
4200           else
4201             cat <<EOF 1>&2
4202
4203 *** Warning: the command libtool uses to detect shared libraries,
4204 *** $file_magic_cmd, produces output that libtool cannot recognize.
4205 *** The result is that libtool may fail to recognize shared libraries
4206 *** as such.  This will affect the creation of libtool libraries that
4207 *** depend on shared libraries, but programs linked with such libtool
4208 *** libraries will work regardless of this problem.  Nevertheless, you
4209 *** may want to report the problem to your system manager and/or to
4210 *** bug-libtool@gnu.org
4211
4212 EOF
4213           fi ;;
4214         esac
4215       fi
4216       break
4217     fi
4218   done
4219   IFS="$ac_save_ifs"
4220   MAGIC_CMD="$ac_save_MAGIC_CMD"
4221   ;;
4222 esac
4223 fi
4224
4225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4226 if test -n "$MAGIC_CMD"; then
4227   echo "$ac_t""$MAGIC_CMD" 1>&6
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231
4232 if test -z "$lt_cv_path_MAGIC_CMD"; then
4233   if test -n "$ac_tool_prefix"; then
4234     echo $ac_n "checking for file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298
4299   fi
4300   ;;
4301 esac
4302
4303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_word" >&5
4307 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   if test -n "$RANLIB"; then
4311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4312 else
4313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4314   ac_dummy="$PATH"
4315   for ac_dir in $ac_dummy; do
4316     test -z "$ac_dir" && ac_dir=.
4317     if test -f $ac_dir/$ac_word; then
4318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4319       break
4320     fi
4321   done
4322   IFS="$ac_save_ifs"
4323 fi
4324 fi
4325 RANLIB="$ac_cv_prog_RANLIB"
4326 if test -n "$RANLIB"; then
4327   echo "$ac_t""$RANLIB" 1>&6
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331
4332
4333 if test -z "$ac_cv_prog_RANLIB"; then
4334 if test -n "$ac_tool_prefix"; then
4335   # Extract the first word of "ranlib", so it can be a program name with args.
4336 set dummy ranlib; ac_word=$2
4337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_word" >&5
4339 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4340   echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342   if test -n "$RANLIB"; then
4343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4344 else
4345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4346   ac_dummy="$PATH"
4347   for ac_dir in $ac_dummy; do
4348     test -z "$ac_dir" && ac_dir=.
4349     if test -f $ac_dir/$ac_word; then
4350       ac_cv_prog_RANLIB="ranlib"
4351       break
4352     fi
4353   done
4354   IFS="$ac_save_ifs"
4355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4356 fi
4357 fi
4358 RANLIB="$ac_cv_prog_RANLIB"
4359 if test -n "$RANLIB"; then
4360   echo "$ac_t""$RANLIB" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365 else
4366   RANLIB=":"
4367 fi
4368 fi
4369
4370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4371 set dummy ${ac_tool_prefix}strip; ac_word=$2
4372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_word" >&5
4374 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   if test -n "$STRIP"; then
4378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4379 else
4380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4381   ac_dummy="$PATH"
4382   for ac_dir in $ac_dummy; do
4383     test -z "$ac_dir" && ac_dir=.
4384     if test -f $ac_dir/$ac_word; then
4385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4386       break
4387     fi
4388   done
4389   IFS="$ac_save_ifs"
4390 fi
4391 fi
4392 STRIP="$ac_cv_prog_STRIP"
4393 if test -n "$STRIP"; then
4394   echo "$ac_t""$STRIP" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400 if test -z "$ac_cv_prog_STRIP"; then
4401 if test -n "$ac_tool_prefix"; then
4402   # Extract the first word of "strip", so it can be a program name with args.
4403 set dummy strip; ac_word=$2
4404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_word" >&5
4406 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   if test -n "$STRIP"; then
4410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4411 else
4412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4413   ac_dummy="$PATH"
4414   for ac_dir in $ac_dummy; do
4415     test -z "$ac_dir" && ac_dir=.
4416     if test -f $ac_dir/$ac_word; then
4417       ac_cv_prog_STRIP="strip"
4418       break
4419     fi
4420   done
4421   IFS="$ac_save_ifs"
4422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4423 fi
4424 fi
4425 STRIP="$ac_cv_prog_STRIP"
4426 if test -n "$STRIP"; then
4427   echo "$ac_t""$STRIP" 1>&6
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 else
4433   STRIP=":"
4434 fi
4435 fi
4436
4437
4438 enable_dlopen=yes
4439 enable_win32_dll=yes
4440
4441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4442 if test "${enable_libtool_lock+set}" = set; then
4443   enableval="$enable_libtool_lock"
4444   :
4445 fi
4446
4447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4448
4449 # Some flags need to be propagated to the compiler or linker for good
4450 # libtool support.
4451 case $host in
4452 *-*-irix6*)
4453   # Find out which ABI we are using.
4454   echo '#line 4455 "configure"' > conftest.$ac_ext
4455   if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456     case `/usr/bin/file conftest.$ac_objext` in
4457     *32-bit*)
4458       LD="${LD-ld} -32"
4459       ;;
4460     *N32*)
4461       LD="${LD-ld} -n32"
4462       ;;
4463     *64-bit*)
4464       LD="${LD-ld} -64"
4465       ;;
4466     esac
4467   fi
4468   rm -rf conftest*
4469   ;;
4470
4471 *-*-sco3.2v5*)
4472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4473   SAVE_CFLAGS="$CFLAGS"
4474   CFLAGS="$CFLAGS -belf"
4475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4476 echo "configure:4477: checking whether the C compiler needs -belf" >&5
4477 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481      ac_ext=c
4482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4486 cross_compiling=$ac_cv_prog_cc_cross
4487
4488      cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491
4492 int main() {
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497   rm -rf conftest*
4498   lt_cv_cc_needs_belf=yes
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=no
4504 fi
4505 rm -f conftest*
4506      ac_ext=c
4507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4508 ac_cpp='$CPP $CPPFLAGS'
4509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4511 cross_compiling=$ac_cv_prog_cc_cross
4512
4513 fi
4514
4515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4518     CFLAGS="$SAVE_CFLAGS"
4519   fi
4520   ;;
4521
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$DLLTOOL"; then
4531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 DLLTOOL="$ac_cv_prog_DLLTOOL"
4546 if test -n "$DLLTOOL"; then
4547   echo "$ac_t""$DLLTOOL" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_DLLTOOL"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "dlltool", so it can be a program name with args.
4556 set dummy dlltool; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$DLLTOOL"; then
4563   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_DLLTOOL="dlltool"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4576 fi
4577 fi
4578 DLLTOOL="$ac_cv_prog_DLLTOOL"
4579 if test -n "$DLLTOOL"; then
4580   echo "$ac_t""$DLLTOOL" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   DLLTOOL="false"
4587 fi
4588 fi
4589
4590   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}as; ac_word=$2
4592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_word" >&5
4594 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   if test -n "$AS"; then
4598   ac_cv_prog_AS="$AS" # Let the user override the test.
4599 else
4600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4601   ac_dummy="$PATH"
4602   for ac_dir in $ac_dummy; do
4603     test -z "$ac_dir" && ac_dir=.
4604     if test -f $ac_dir/$ac_word; then
4605       ac_cv_prog_AS="${ac_tool_prefix}as"
4606       break
4607     fi
4608   done
4609   IFS="$ac_save_ifs"
4610 fi
4611 fi
4612 AS="$ac_cv_prog_AS"
4613 if test -n "$AS"; then
4614   echo "$ac_t""$AS" 1>&6
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619
4620 if test -z "$ac_cv_prog_AS"; then
4621 if test -n "$ac_tool_prefix"; then
4622   # Extract the first word of "as", so it can be a program name with args.
4623 set dummy as; ac_word=$2
4624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_word" >&5
4626 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   if test -n "$AS"; then
4630   ac_cv_prog_AS="$AS" # Let the user override the test.
4631 else
4632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4633   ac_dummy="$PATH"
4634   for ac_dir in $ac_dummy; do
4635     test -z "$ac_dir" && ac_dir=.
4636     if test -f $ac_dir/$ac_word; then
4637       ac_cv_prog_AS="as"
4638       break
4639     fi
4640   done
4641   IFS="$ac_save_ifs"
4642   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4643 fi
4644 fi
4645 AS="$ac_cv_prog_AS"
4646 if test -n "$AS"; then
4647   echo "$ac_t""$AS" 1>&6
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651
4652 else
4653   AS="false"
4654 fi
4655 fi
4656
4657   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4658 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_word" >&5
4661 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   if test -n "$OBJDUMP"; then
4665   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4666 else
4667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4668   ac_dummy="$PATH"
4669   for ac_dir in $ac_dummy; do
4670     test -z "$ac_dir" && ac_dir=.
4671     if test -f $ac_dir/$ac_word; then
4672       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4673       break
4674     fi
4675   done
4676   IFS="$ac_save_ifs"
4677 fi
4678 fi
4679 OBJDUMP="$ac_cv_prog_OBJDUMP"
4680 if test -n "$OBJDUMP"; then
4681   echo "$ac_t""$OBJDUMP" 1>&6
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686
4687 if test -z "$ac_cv_prog_OBJDUMP"; then
4688 if test -n "$ac_tool_prefix"; then
4689   # Extract the first word of "objdump", so it can be a program name with args.
4690 set dummy objdump; ac_word=$2
4691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4692 echo "configure:4693: checking for $ac_word" >&5
4693 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   if test -n "$OBJDUMP"; then
4697   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4698 else
4699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4700   ac_dummy="$PATH"
4701   for ac_dir in $ac_dummy; do
4702     test -z "$ac_dir" && ac_dir=.
4703     if test -f $ac_dir/$ac_word; then
4704       ac_cv_prog_OBJDUMP="objdump"
4705       break
4706     fi
4707   done
4708   IFS="$ac_save_ifs"
4709   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4710 fi
4711 fi
4712 OBJDUMP="$ac_cv_prog_OBJDUMP"
4713 if test -n "$OBJDUMP"; then
4714   echo "$ac_t""$OBJDUMP" 1>&6
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719 else
4720   OBJDUMP="false"
4721 fi
4722 fi
4723
4724
4725   # recent cygwin and mingw systems supply a stub DllMain which the user
4726   # can override, but on older systems we have to supply one
4727   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4728 echo "configure:4729: checking if libtool should supply DllMain function" >&5
4729 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4738       DllMain (0, 0, 0);
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   lt_cv_need_dllmain=no
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=yes
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4754
4755   case $host/$CC in
4756   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4757     # old mingw systems require "-dll" to link a DLL, while more recent ones
4758     # require "-mdll"
4759     SAVE_CFLAGS="$CFLAGS"
4760     CFLAGS="$CFLAGS -mdll"
4761     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4762 echo "configure:4763: checking how to link DLLs" >&5
4763 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   lt_cv_cc_dll_switch=-mdll
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-dll
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4787     CFLAGS="$SAVE_CFLAGS" ;;
4788   *-*-cygwin* | *-*-pw32*)
4789     # cygwin systems need to pass --dll to the linker, and not link
4790     # crt.o which will require a WinMain@16 definition.
4791     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4792   esac
4793   ;;
4794   
4795 esac
4796
4797 # Sed substitution that helps us do robust quoting.  It backslashifies
4798 # metacharacters that are still active within double-quoted strings.
4799 Xsed='sed -e s/^X//'
4800 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4801
4802 # Same as above, but do not quote variable references.
4803 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4804
4805 # Sed substitution to delay expansion of an escaped shell variable in a
4806 # double_quote_subst'ed string.
4807 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4808
4809 # Constants:
4810 rm="rm -f"
4811
4812 # Global variables:
4813 default_ofile=libtool
4814 can_build_shared=yes
4815
4816 # All known linkers require a `.a' archive for static linking (except M$VC,
4817 # which needs '.lib').
4818 libext=a
4819 ltmain="$ac_aux_dir/ltmain.sh"
4820 ofile="$default_ofile"
4821 with_gnu_ld="$lt_cv_prog_gnu_ld"
4822 need_locks="$enable_libtool_lock"
4823
4824 old_CC="$CC"
4825 old_CFLAGS="$CFLAGS"
4826
4827 # Set sane defaults for various variables
4828 test -z "$AR" && AR=ar
4829 test -z "$AR_FLAGS" && AR_FLAGS=cru
4830 test -z "$AS" && AS=as
4831 test -z "$CC" && CC=cc
4832 test -z "$DLLTOOL" && DLLTOOL=dlltool
4833 test -z "$LD" && LD=ld
4834 test -z "$LN_S" && LN_S="ln -s"
4835 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4836 test -z "$NM" && NM=nm
4837 test -z "$OBJDUMP" && OBJDUMP=objdump
4838 test -z "$RANLIB" && RANLIB=:
4839 test -z "$STRIP" && STRIP=:
4840 test -z "$ac_objext" && ac_objext=o
4841
4842 if test x"$host" != x"$build"; then
4843   ac_tool_prefix=${host_alias}-
4844 else
4845   ac_tool_prefix=
4846 fi
4847
4848 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4849 case $host_os in
4850 linux-gnu*) ;;
4851 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4852 esac
4853
4854 case $host_os in
4855 aix3*)
4856   # AIX sometimes has problems with the GCC collect2 program.  For some
4857   # reason, if we set the COLLECT_NAMES environment variable, the problems
4858   # vanish in a puff of smoke.
4859   if test "X${COLLECT_NAMES+set}" != Xset; then
4860     COLLECT_NAMES=
4861     export COLLECT_NAMES
4862   fi
4863   ;;
4864 esac
4865
4866 # Determine commands to create old-style static archives.
4867 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4868 old_postinstall_cmds='chmod 644 $oldlib'
4869 old_postuninstall_cmds=
4870
4871 if test -n "$RANLIB"; then
4872   case $host_os in
4873   openbsd*)
4874     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   *)
4877     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4878     ;;
4879   esac
4880   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4881 fi
4882
4883 # Allow CC to be a program name with arguments.
4884 set dummy $CC
4885 compiler="$2"
4886
4887 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4888 echo "configure:4889: checking for objdir" >&5
4889 rm -f .libs 2>/dev/null
4890 mkdir .libs 2>/dev/null
4891 if test -d .libs; then
4892   objdir=.libs
4893 else
4894   # MS-DOS does not allow filenames that begin with a dot.
4895   objdir=_libs
4896 fi
4897 rmdir .libs 2>/dev/null
4898 echo "$ac_t""$objdir" 1>&6
4899
4900
4901 # Check whether --with-pic or --without-pic was given.
4902 if test "${with_pic+set}" = set; then
4903   withval="$with_pic"
4904   pic_mode="$withval"
4905 else
4906   pic_mode=default
4907 fi
4908
4909 test -z "$pic_mode" && pic_mode=default
4910
4911 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4912 # in isolation, and that seeing it set (from the cache) indicates that
4913 # the associated values are set (in the cache) correctly too.
4914 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4915 echo "configure:4916: checking for $compiler option to produce PIC" >&5
4916 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919    lt_cv_prog_cc_pic=
4920   lt_cv_prog_cc_shlib=
4921   lt_cv_prog_cc_wl=
4922   lt_cv_prog_cc_static=
4923   lt_cv_prog_cc_no_builtin=
4924   lt_cv_prog_cc_can_build_shared=$can_build_shared
4925
4926   if test "$GCC" = yes; then
4927     lt_cv_prog_cc_wl='-Wl,'
4928     lt_cv_prog_cc_static='-static'
4929
4930     case $host_os in
4931     aix*)
4932       # Below there is a dirty hack to force normal static linking with -ldl
4933       # The problem is because libdl dynamically linked with both libc and
4934       # libC (AIX C++ library), which obviously doesn't included in libraries
4935       # list by gcc. This cause undefined symbols with -static flags.
4936       # This hack allows C programs to be linked with "-static -ldl", but
4937       # not sure about C++ programs.
4938       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4939       ;;
4940     amigaos*)
4941       # FIXME: we need at least 68020 code to build shared libraries, but
4942       # adding the `-m68020' flag to GCC prevents building anything better,
4943       # like `-m68040'.
4944       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4945       ;;
4946     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4947       # PIC is the default for these OSes.
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       lt_cv_prog_cc_pic='-fno-common'
4953       ;;
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959     sysv4*MP*)
4960       if test -d /usr/nec; then
4961          lt_cv_prog_cc_pic=-Kconform_pic
4962       fi
4963       ;;
4964     *)
4965       lt_cv_prog_cc_pic='-fPIC'
4966       ;;
4967     esac
4968   else
4969     # PORTME Check for PIC flags for the system compiler.
4970     case $host_os in
4971     aix3* | aix4* | aix5*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       # All AIX code is PIC.
4974       if test "$host_cpu" = ia64; then
4975         # AIX 5 now supports IA64 processor
4976         lt_cv_prog_cc_static='-Bstatic'
4977       else
4978         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4979       fi
4980       ;;
4981
4982     hpux9* | hpux10* | hpux11*)
4983       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4984       lt_cv_prog_cc_wl='-Wl,'
4985       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4986       lt_cv_prog_cc_pic='+Z'
4987       ;;
4988
4989     irix5* | irix6* | nonstopux*)
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       # PIC (with -KPIC) is the default.
4993       ;;
4994
4995     cygwin* | mingw* | pw32* | os2*)
4996       # This hack is so that the source file can tell whether it is being
4997       # built for inclusion in a dll (and should export symbols for example).
4998       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4999       ;;
5000
5001     newsos6)
5002       lt_cv_prog_cc_pic='-KPIC'
5003       lt_cv_prog_cc_static='-Bstatic'
5004       ;;
5005     
5006     openedition)
5007       # XPLINK code is PIC by default
5008       ;;
5009
5010     osf3* | osf4* | osf5*)
5011       # All OSF/1 code is PIC.
5012       lt_cv_prog_cc_wl='-Wl,'
5013       lt_cv_prog_cc_static='-non_shared'
5014       ;;
5015
5016     sco3.2v5*)
5017       lt_cv_prog_cc_pic='-Kpic'
5018       lt_cv_prog_cc_static='-dn'
5019       lt_cv_prog_cc_shlib='-belf'
5020       ;;
5021
5022     solaris*)
5023       lt_cv_prog_cc_pic='-KPIC'
5024       lt_cv_prog_cc_static='-Bstatic'
5025       lt_cv_prog_cc_wl='-Wl,'
5026       ;;
5027
5028     sunos4*)
5029       lt_cv_prog_cc_pic='-PIC'
5030       lt_cv_prog_cc_static='-Bstatic'
5031       lt_cv_prog_cc_wl='-Qoption ld '
5032       ;;
5033
5034     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5035       lt_cv_prog_cc_pic='-KPIC'
5036       lt_cv_prog_cc_static='-Bstatic'
5037       lt_cv_prog_cc_wl='-Wl,'
5038       ;;
5039
5040     uts4*)
5041       lt_cv_prog_cc_pic='-pic'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       ;;
5044
5045     sysv4*MP*)
5046       if test -d /usr/nec ;then
5047         lt_cv_prog_cc_pic='-Kconform_pic'
5048         lt_cv_prog_cc_static='-Bstatic'
5049       fi
5050       ;;
5051
5052     *)
5053       lt_cv_prog_cc_can_build_shared=no
5054       ;;
5055     esac
5056   fi
5057
5058 fi
5059
5060 if test -z "$lt_cv_prog_cc_pic"; then
5061   echo "$ac_t""none" 1>&6
5062 else
5063   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5064
5065   # Check to make sure the pic_flag actually works.
5066   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5067 echo "configure:5068: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5068   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071       save_CFLAGS="$CFLAGS"
5072     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5073     cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082   rm -rf conftest*
5083         case $host_os in
5084       hpux9* | hpux10* | hpux11*)
5085         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5086         # they create non-PIC objects.  So, if there were any warnings, we
5087         # assume that PIC is not supported.
5088         if test -s conftest.err; then
5089           lt_cv_prog_cc_pic_works=no
5090         else
5091           lt_cv_prog_cc_pic_works=yes
5092         fi
5093         ;;
5094       *)
5095         lt_cv_prog_cc_pic_works=yes
5096         ;;
5097       esac
5098     
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103         lt_cv_prog_cc_pic_works=no
5104     
5105 fi
5106 rm -f conftest*
5107     CFLAGS="$save_CFLAGS"
5108   
5109 fi
5110
5111
5112   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5113     lt_cv_prog_cc_pic=
5114     lt_cv_prog_cc_can_build_shared=no
5115   else
5116     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5117   fi
5118
5119   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5120 fi
5121
5122 # Check for any special shared library compilation flags.
5123 if test -n "$lt_cv_prog_cc_shlib"; then
5124   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5125   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5126   else
5127    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5128     lt_cv_prog_cc_can_build_shared=no
5129   fi
5130 fi
5131
5132 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5134 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137     lt_cv_prog_cc_static_works=no
5138   save_LDFLAGS="$LDFLAGS"
5139   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5140   cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   lt_cv_prog_cc_static_works=yes
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154 fi
5155 rm -f conftest*
5156   LDFLAGS="$save_LDFLAGS"
5157
5158 fi
5159
5160
5161 # Belt *and* braces to stop my trousers falling down:
5162 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5163 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5164
5165 pic_flag="$lt_cv_prog_cc_pic"
5166 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5167 wl="$lt_cv_prog_cc_wl"
5168 link_static_flag="$lt_cv_prog_cc_static"
5169 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5170 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5171
5172
5173 # Check to see if options -o and -c are simultaneously supported by compiler
5174 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5175 echo "configure:5176: checking if $compiler supports -c -o file.$ac_objext" >&5
5176 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   
5180 $rm -r conftest 2>/dev/null
5181 mkdir conftest
5182 cd conftest
5183 echo "int some_variable = 0;" > conftest.$ac_ext
5184 mkdir out
5185 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5186 # that will create temporary files in the current directory regardless of
5187 # the output directory.  Thus, making CWD read-only will cause this test
5188 # to fail, enabling locking or at least warning the user not to do parallel
5189 # builds.
5190 chmod -w .
5191 save_CFLAGS="$CFLAGS"
5192 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5193 compiler_c_o=no
5194 if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5195   # The compiler can only warn and ignore the option if not recognized
5196   # So say no if there are warnings
5197   if test -s out/conftest.err; then
5198     lt_cv_compiler_c_o=no
5199   else
5200     lt_cv_compiler_c_o=yes
5201   fi
5202 else
5203   # Append any errors to the config.log.
5204   cat out/conftest.err 1>&5
5205   lt_cv_compiler_c_o=no
5206 fi
5207 CFLAGS="$save_CFLAGS"
5208 chmod u+w .
5209 $rm conftest* out/*
5210 rmdir out
5211 cd ..
5212 rmdir conftest
5213 $rm -r conftest 2>/dev/null
5214
5215 fi
5216
5217 compiler_c_o=$lt_cv_compiler_c_o
5218 echo "$ac_t""$compiler_c_o" 1>&6
5219
5220 if test x"$compiler_c_o" = x"yes"; then
5221   # Check to see if we can write to a .lo
5222   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -c -o file.lo" >&5
5224   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228   lt_cv_compiler_o_lo=no
5229   save_CFLAGS="$CFLAGS"
5230   CFLAGS="$CFLAGS -c -o conftest.lo"
5231   save_objext="$ac_objext"
5232   ac_objext=lo
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 int some_variable = 0;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243       # The compiler can only warn and ignore the option if not recognized
5244     # So say no if there are warnings
5245     if test -s conftest.err; then
5246       lt_cv_compiler_o_lo=no
5247     else
5248       lt_cv_compiler_o_lo=yes
5249     fi
5250   
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254 fi
5255 rm -f conftest*
5256   ac_objext="$save_objext"
5257   CFLAGS="$save_CFLAGS"
5258   
5259 fi
5260
5261   compiler_o_lo=$lt_cv_compiler_o_lo
5262   echo "$ac_t""$compiler_o_lo" 1>&6
5263 else
5264   compiler_o_lo=no
5265 fi
5266
5267 # Check to see if we can do hard links to lock some files if needed
5268 hard_links="nottested"
5269 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5270   # do not overwrite the value of need_locks provided by the user
5271   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5272 echo "configure:5273: checking if we can lock with hard links" >&5
5273   hard_links=yes
5274   $rm conftest*
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   touch conftest.a
5277   ln conftest.a conftest.b 2>&5 || hard_links=no
5278   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5279   echo "$ac_t""$hard_links" 1>&6
5280   if test "$hard_links" = no; then
5281     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5282     need_locks=warn
5283   fi
5284 else
5285   need_locks=no
5286 fi
5287
5288 if test "$GCC" = yes; then
5289   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5290   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5292   echo "int some_variable = 0;" > conftest.$ac_ext
5293   save_CFLAGS="$CFLAGS"
5294   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5295   compiler_rtti_exceptions=no
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       compiler_rtti_exceptions=no
5310     else
5311       compiler_rtti_exceptions=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   CFLAGS="$save_CFLAGS"
5320   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5321
5322   if test "$compiler_rtti_exceptions" = "yes"; then
5323     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5324   else
5325     no_builtin_flag=' -fno-builtin'
5326   fi
5327 fi
5328
5329 # See if the linker supports building shared libraries.
5330 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking whether the linker ($LD) supports shared libraries" >&5
5332
5333 allow_undefined_flag=
5334 no_undefined_flag=
5335 need_lib_prefix=unknown
5336 need_version=unknown
5337 # when you set need_version to no, make sure it does not cause -set_version
5338 # flags to be left without arguments
5339 archive_cmds=
5340 archive_expsym_cmds=
5341 old_archive_from_new_cmds=
5342 old_archive_from_expsyms_cmds=
5343 export_dynamic_flag_spec=
5344 whole_archive_flag_spec=
5345 thread_safe_flag_spec=
5346 hardcode_into_libs=no
5347 hardcode_libdir_flag_spec=
5348 hardcode_libdir_separator=
5349 hardcode_direct=no
5350 hardcode_minus_L=no
5351 hardcode_shlibpath_var=unsupported
5352 runpath_var=
5353 link_all_deplibs=unknown
5354 always_export_symbols=no
5355 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5356 # include_expsyms should be a list of space-separated symbols to be *always*
5357 # included in the symbol list
5358 include_expsyms=
5359 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5360 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5361 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5362 # as well as any symbol that contains `d'.
5363 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5364 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5365 # platforms (ab)use it in PIC code, but their linkers get confused if
5366 # the symbol is explicitly referenced.  Since portable code cannot
5367 # rely on this symbol name, it's probably fine to never include it in
5368 # preloaded symbol tables.
5369 extract_expsyms_cmds=
5370
5371 case $host_os in
5372 cygwin* | mingw* | pw32*)
5373   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5374   # When not using gcc, we currently assume that we are using
5375   # Microsoft Visual C++.
5376   if test "$GCC" != yes; then
5377     with_gnu_ld=no
5378   fi
5379   ;;
5380 openbsd*)
5381   with_gnu_ld=no
5382   ;;
5383 esac
5384
5385 ld_shlibs=yes
5386 if test "$with_gnu_ld" = yes; then
5387   # If archive_cmds runs LD, not CC, wlarc should be empty
5388   wlarc='${wl}'
5389
5390   # See if GNU ld supports shared libraries.
5391   case $host_os in
5392   aix3* | aix4* | aix5*)
5393     # On AIX, the GNU linker is very broken
5394     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5395     ld_shlibs=no
5396     cat <<EOF 1>&2
5397
5398 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5399 *** to be unable to reliably create shared libraries on AIX.
5400 *** Therefore, libtool is disabling shared libraries support.  If you
5401 *** really care for shared libraries, you may want to modify your PATH
5402 *** so that a non-GNU linker is found, and then restart.
5403
5404 EOF
5405     ;;
5406
5407   amigaos*)
5408     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)'
5409     hardcode_libdir_flag_spec='-L$libdir'
5410     hardcode_minus_L=yes
5411
5412     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5413     # that the semantics of dynamic libraries on AmigaOS, at least up
5414     # to version 4, is to share data among multiple programs linked
5415     # with the same dynamic library.  Since this doesn't match the
5416     # behavior of shared libraries on other platforms, we can use
5417     # them.
5418     ld_shlibs=no
5419     ;;
5420
5421   beos*)
5422     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5423       allow_undefined_flag=unsupported
5424       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5425       # support --undefined.  This deserves some investigation.  FIXME
5426       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5427     else
5428       ld_shlibs=no
5429     fi
5430     ;;
5431
5432   cygwin* | mingw* | pw32*)
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     allow_undefined_flag=unsupported
5437     always_export_symbols=yes
5438
5439     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5440       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5441       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5442       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5443       else $CC -o impgen impgen.c ; fi)~
5444       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5445
5446     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5447
5448     # cygwin and mingw dlls have different entry points and sets of symbols
5449     # to exclude.
5450     # FIXME: what about values for MSVC?
5451     dll_entry=__cygwin_dll_entry@12
5452     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5453     case $host_os in
5454     mingw*)
5455       # mingw values
5456       dll_entry=_DllMainCRTStartup@12
5457       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5458       ;;
5459     esac
5460
5461     # mingw and cygwin differ, and it's simplest to just exclude the union
5462     # of the two symbol sets.
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5464
5465     # recent cygwin and mingw systems supply a stub DllMain which the user
5466     # can override, but on older systems we have to supply one (in ltdll.c)
5467     if test "x$lt_cv_need_dllmain" = "xyes"; then
5468       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5469       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~
5470         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5471     else
5472       ltdll_obj=
5473       ltdll_cmds=
5474     fi
5475
5476     # Extract the symbol export list from an `--export-all' def file,
5477     # then regenerate the def file from the symbol export list, so that
5478     # the compiled dll only exports the symbol export list.
5479     # Be careful not to strip the DATA tag left be newer dlltools.
5480     export_symbols_cmds="$ltdll_cmds"'
5481       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5482       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5483
5484     # If the export-symbols file already is a .def file (1st line
5485     # is EXPORTS), use it as is.
5486     # If DATA tags from a recent dlltool are present, honour them!
5487     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5488         cp $export_symbols $output_objdir/$soname-def;
5489       else
5490         echo EXPORTS > $output_objdir/$soname-def;
5491         _lt_hint=1;
5492         cat $export_symbols | while read symbol; do
5493          set dummy \$symbol;
5494          case \$# in
5495            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5496            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5497            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5498          esac;
5499          _lt_hint=`expr 1 + \$_lt_hint`;
5500         done;
5501       fi~
5502       '"$ltdll_cmds"'
5503       $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~
5504       $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~
5505       $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~
5506       $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~
5507       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5508     ;;
5509
5510   netbsd*)
5511     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5512       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5513       wlarc=
5514     else
5515       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5516       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5517     fi
5518     ;;
5519
5520   solaris* | sysv5*)
5521     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5522       ld_shlibs=no
5523       cat <<EOF 1>&2
5524
5525 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5526 *** create shared libraries on Solaris systems.  Therefore, libtool
5527 *** is disabling shared libraries support.  We urge you to upgrade GNU
5528 *** binutils to release 2.9.1 or newer.  Another option is to modify
5529 *** your PATH or compiler configuration so that the native linker is
5530 *** used, and then restart.
5531
5532 EOF
5533     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5534       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5535       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5536     else
5537       ld_shlibs=no
5538     fi
5539     ;;
5540
5541   sunos4*)
5542     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5543     wlarc=
5544     hardcode_direct=yes
5545     hardcode_shlibpath_var=no
5546     ;;
5547
5548   *)
5549     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5550       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5551       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5552     else
5553       ld_shlibs=no
5554     fi
5555     ;;
5556   esac
5557
5558   if test "$ld_shlibs" = yes; then
5559     runpath_var=LD_RUN_PATH
5560     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5561     export_dynamic_flag_spec='${wl}--export-dynamic'
5562     case $host_os in
5563     cygwin* | mingw* | pw32*)
5564       # dlltool doesn't understand --whole-archive et. al.
5565       whole_archive_flag_spec=
5566       ;;
5567     *)
5568       # ancient GNU ld didn't support --whole-archive et. al.
5569       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5570         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5571       else
5572         whole_archive_flag_spec=
5573       fi
5574       ;;
5575     esac
5576   fi
5577 else
5578   # PORTME fill in a description of your system's linker (not GNU ld)
5579   case $host_os in
5580   aix3*)
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583     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'
5584     # Note: this linker hardcodes the directories in LIBPATH if there
5585     # are no directories specified by -L.
5586     hardcode_minus_L=yes
5587     if test "$GCC" = yes && test -z "$link_static_flag"; then
5588       # Neither direct hardcoding nor static linking is supported with a
5589       # broken collect2.
5590       hardcode_direct=unsupported
5591     fi
5592     ;;
5593
5594   aix4* | aix5*)
5595     if test "$host_cpu" = ia64; then
5596       # On IA64, the linker does run time linking by default, so we don't
5597       # have to do anything special.
5598       aix_use_runtimelinking=no
5599       exp_sym_flag='-Bexport'
5600       no_entry_flag=""
5601     else
5602       aix_use_runtimelinking=no
5603
5604       # Test if we are trying to use run time linking or normal
5605       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5606       # need to do runtime linking.
5607       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5608         for ld_flag in $LDFLAGS; do
5609           case $ld_flag in
5610           *-brtl*)
5611             aix_use_runtimelinking=yes
5612             break
5613           ;;
5614           esac
5615         done
5616       esac
5617
5618       exp_sym_flag='-bexport'
5619       no_entry_flag='-bnoentry'
5620     fi
5621
5622     # When large executables or shared objects are built, AIX ld can
5623     # have problems creating the table of contents.  If linking a library
5624     # or program results in "error TOC overflow" add -mminimal-toc to
5625     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5626     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5627
5628     hardcode_direct=yes
5629     archive_cmds=''
5630     hardcode_libdir_separator=':'
5631     if test "$GCC" = yes; then
5632       case $host_os in aix4.[012]|aix4.[012].*)
5633         collect2name=`${CC} -print-prog-name=collect2`
5634         if test -f "$collect2name" && \
5635           strings "$collect2name" | grep resolve_lib_name >/dev/null
5636         then
5637           # We have reworked collect2
5638           hardcode_direct=yes
5639         else
5640           # We have old collect2
5641           hardcode_direct=unsupported
5642           # It fails to find uninstalled libraries when the uninstalled
5643           # path is not listed in the libpath.  Setting hardcode_minus_L
5644           # to unsupported forces relinking
5645           hardcode_minus_L=yes
5646           hardcode_libdir_flag_spec='-L$libdir'
5647           hardcode_libdir_separator=
5648         fi
5649       esac
5650
5651       shared_flag='-shared'
5652     else
5653       # not using gcc
5654       if test "$host_cpu" = ia64; then
5655         shared_flag='${wl}-G'
5656       else
5657         if test "$aix_use_runtimelinking" = yes; then
5658           shared_flag='${wl}-G'
5659         else
5660           shared_flag='${wl}-bM:SRE'
5661         fi
5662       fi
5663     fi
5664
5665     # It seems that -bexpall can do strange things, so it is better to
5666     # generate a list of symbols to export.
5667     always_export_symbols=yes
5668     if test "$aix_use_runtimelinking" = yes; then
5669       # Warning - without using the other runtime loading flags (-brtl),
5670       # -berok will link without error, but may produce a broken library.
5671       allow_undefined_flag='-berok'
5672       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5673       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"
5674     else
5675       if test "$host_cpu" = ia64; then
5676         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5677         allow_undefined_flag="-z nodefs"
5678         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"
5679       else
5680         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5681         # Warning - without using the other run time loading flags,
5682         # -berok will link without error, but may produce a broken library.
5683         allow_undefined_flag='${wl}-berok'
5684         # This is a bit strange, but is similar to how AIX traditionally builds
5685         # it's shared libraries.
5686         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'
5687       fi
5688     fi
5689     ;;
5690
5691   amigaos*)
5692     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)'
5693     hardcode_libdir_flag_spec='-L$libdir'
5694     hardcode_minus_L=yes
5695     # see comment about different semantics on the GNU ld section
5696     ld_shlibs=no
5697     ;;
5698
5699   cygwin* | mingw* | pw32*)
5700     # When not using gcc, we currently assume that we are using
5701     # Microsoft Visual C++.
5702     # hardcode_libdir_flag_spec is actually meaningless, as there is
5703     # no search path for DLLs.
5704     hardcode_libdir_flag_spec=' '
5705     allow_undefined_flag=unsupported
5706     # Tell ltmain to make .lib files, not .a files.
5707     libext=lib
5708     # FIXME: Setting linknames here is a bad hack.
5709     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5710     # The linker will automatically build a .lib file if we build a DLL.
5711     old_archive_from_new_cmds='true'
5712     # FIXME: Should let the user specify the lib program.
5713     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5714     fix_srcfile_path='`cygpath -w "$srcfile"`'
5715     ;;
5716
5717   darwin* | rhapsody*)
5718     case "$host_os" in
5719     rhapsody* | darwin1.[012])
5720       allow_undefined_flag='-undefined suppress'
5721       ;;
5722     *) # Darwin 1.3 on
5723       allow_undefined_flag='-flat_namespace -undefined suppress'
5724       ;;
5725     esac
5726     # FIXME: Relying on posixy $() will cause problems for
5727     #        cross-compilation, but unfortunately the echo tests do not
5728     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5729     #        `"' quotes if we put them in here... so don't!
5730     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)'
5731     # We need to add '_' to the symbols in $export_symbols first
5732     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5733     hardcode_direct=yes
5734     hardcode_shlibpath_var=no
5735     whole_archive_flag_spec='-all_load $convenience'
5736     ;;
5737
5738   freebsd1*)
5739     ld_shlibs=no
5740     ;;
5741
5742   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5743   # support.  Future versions do this automatically, but an explicit c++rt0.o
5744   # does not break anything, and helps significantly (at the cost of a little
5745   # extra space).
5746   freebsd2.2*)
5747     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5748     hardcode_libdir_flag_spec='-R$libdir'
5749     hardcode_direct=yes
5750     hardcode_shlibpath_var=no
5751     ;;
5752
5753   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5754   freebsd2*)
5755     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5756     hardcode_direct=yes
5757     hardcode_minus_L=yes
5758     hardcode_shlibpath_var=no
5759     ;;
5760
5761   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5762   freebsd*)
5763     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5764     hardcode_libdir_flag_spec='-R$libdir'
5765     hardcode_direct=yes
5766     hardcode_shlibpath_var=no
5767     ;;
5768
5769   hpux9* | hpux10* | hpux11*)
5770     case $host_os in
5771     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' ;;
5772     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5773     esac
5774     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5775     hardcode_libdir_separator=:
5776     hardcode_direct=yes
5777     hardcode_minus_L=yes # Not in the search PATH, but as the default
5778                          # location of the library.
5779     export_dynamic_flag_spec='${wl}-E'
5780     ;;
5781
5782   irix5* | irix6* | nonstopux*)
5783     if test "$GCC" = yes; then
5784       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'
5785       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5786     else
5787       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'
5788       hardcode_libdir_flag_spec='-rpath $libdir'
5789     fi
5790     hardcode_libdir_separator=:
5791     link_all_deplibs=yes
5792     ;;
5793
5794   netbsd*)
5795     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5796       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5797     else
5798       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5799     fi
5800     hardcode_libdir_flag_spec='-R$libdir'
5801     hardcode_direct=yes
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   newsos6)
5806     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5807     hardcode_direct=yes
5808     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5809     hardcode_libdir_separator=:
5810     hardcode_shlibpath_var=no
5811     ;;
5812
5813   openbsd*)
5814     hardcode_direct=yes
5815     hardcode_shlibpath_var=no
5816     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5817       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5818       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5819       export_dynamic_flag_spec='${wl}-E'
5820     else
5821       case "$host_os" in
5822       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5823         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5824         hardcode_libdir_flag_spec='-R$libdir'
5825         ;;
5826       *)
5827         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5828         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5829         ;;
5830       esac
5831     fi
5832     ;;
5833
5834   openedition*)
5835     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5836         cp \$linknames \$output_objdir && linknames=''"
5837     export_dynamic_flag_spec="-Wl,DLL"
5838     ;;
5839
5840   os2*)
5841     hardcode_libdir_flag_spec='-L$libdir'
5842     hardcode_minus_L=yes
5843     allow_undefined_flag=unsupported
5844     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'
5845     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5846     ;;
5847
5848   osf3*)
5849     if test "$GCC" = yes; then
5850       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5851       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'
5852     else
5853       allow_undefined_flag=' -expect_unresolved \*'
5854       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'
5855     fi
5856     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5857     hardcode_libdir_separator=:
5858     ;;
5859
5860   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5861     if test "$GCC" = yes; then
5862       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5863       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'
5864       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5865     else
5866       allow_undefined_flag=' -expect_unresolved \*'
5867       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'
5868       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5869       $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'
5870
5871       #Both c and cxx compiler support -rpath directly
5872       hardcode_libdir_flag_spec='-rpath $libdir'
5873     fi
5874     hardcode_libdir_separator=:
5875     ;;
5876
5877   sco3.2v5*)
5878     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5879     hardcode_shlibpath_var=no
5880     runpath_var=LD_RUN_PATH
5881     hardcode_runpath_var=yes
5882     export_dynamic_flag_spec='${wl}-Bexport'
5883     ;;
5884
5885   solaris*)
5886     # gcc --version < 3.0 without binutils cannot create self contained
5887     # shared libraries reliably, requiring libgcc.a to resolve some of
5888     # the object symbols generated in some cases.  Libraries that use
5889     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5890     # a copy of libgcc.a into every shared library to guarantee resolving
5891     # such symbols causes other problems:  According to Tim Van Holder
5892     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5893     # (to the application) exception stack for one thing.
5894     no_undefined_flag=' -z defs'
5895     if test "$GCC" = yes; then
5896       case `$CC --version 2>/dev/null` in
5897       [12].*)
5898         cat <<EOF 1>&2
5899
5900 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5901 *** create self contained shared libraries on Solaris systems, without
5902 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5903 *** -no-undefined support, which will at least allow you to build shared
5904 *** libraries.  However, you may find that when you link such libraries
5905 *** into an application without using GCC, you have to manually add
5906 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5907 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5908 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5909
5910 EOF
5911         no_undefined_flag=
5912         ;;
5913       esac
5914     fi
5915     # $CC -shared without GNU ld will not create a library from C++
5916     # object files and a static libstdc++, better avoid it by now
5917     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5919                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5920     hardcode_libdir_flag_spec='-R$libdir'
5921     hardcode_shlibpath_var=no
5922     case $host_os in
5923     solaris2.[0-5] | solaris2.[0-5].*) ;;
5924     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5925       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5926     esac
5927     link_all_deplibs=yes
5928     ;;
5929
5930   sunos4*)
5931     if test "x$host_vendor" = xsequent; then
5932       # Use $CC to link under sequent, because it throws in some extra .o
5933       # files that make .init and .fini sections work.
5934       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5935     else
5936       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5937     fi
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_direct=yes
5940     hardcode_minus_L=yes
5941     hardcode_shlibpath_var=no
5942     ;;
5943
5944   sysv4)
5945     case $host_vendor in
5946       sni)
5947         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948         hardcode_direct=yes # is this really true???
5949         ;;
5950       siemens)
5951         ## LD is ld it makes a PLAMLIB
5952         ## CC just makes a GrossModule.
5953         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5954         reload_cmds='$CC -r -o $output$reload_objs'
5955         hardcode_direct=no
5956         ;;
5957       motorola)
5958         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5960         ;;
5961     esac
5962     runpath_var='LD_RUN_PATH'
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   sysv4.3*)
5967     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     hardcode_shlibpath_var=no
5969     export_dynamic_flag_spec='-Bexport'
5970     ;;
5971
5972   sysv5*)
5973     no_undefined_flag=' -z text'
5974     # $CC -shared without GNU ld will not create a library from C++
5975     # object files and a static libstdc++, better avoid it by now
5976     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5978                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5979     hardcode_libdir_flag_spec=
5980     hardcode_shlibpath_var=no
5981     runpath_var='LD_RUN_PATH'
5982     ;;
5983
5984   uts4*)
5985     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986     hardcode_libdir_flag_spec='-L$libdir'
5987     hardcode_shlibpath_var=no
5988     ;;
5989
5990   dgux*)
5991     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992     hardcode_libdir_flag_spec='-L$libdir'
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4*MP*)
5997     if test -d /usr/nec; then
5998       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999       hardcode_shlibpath_var=no
6000       runpath_var=LD_RUN_PATH
6001       hardcode_runpath_var=yes
6002       ld_shlibs=yes
6003     fi
6004     ;;
6005
6006   sysv4.2uw2*)
6007     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6008     hardcode_direct=yes
6009     hardcode_minus_L=no
6010     hardcode_shlibpath_var=no
6011     hardcode_runpath_var=yes
6012     runpath_var=LD_RUN_PATH
6013     ;;
6014
6015   sysv5uw7* | unixware7*)
6016     no_undefined_flag='${wl}-z ${wl}text'
6017     if test "$GCC" = yes; then
6018       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6019     else
6020       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6021     fi
6022     runpath_var='LD_RUN_PATH'
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   *)
6027     ld_shlibs=no
6028     ;;
6029   esac
6030 fi
6031 echo "$ac_t""$ld_shlibs" 1>&6
6032 test "$ld_shlibs" = no && can_build_shared=no
6033
6034 # Check hardcoding attributes.
6035 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6036 echo "configure:6037: checking how to hardcode library paths into programs" >&5
6037 hardcode_action=
6038 if test -n "$hardcode_libdir_flag_spec" || \
6039    test -n "$runpath_var"; then
6040
6041   # We can hardcode non-existant directories.
6042   if test "$hardcode_direct" != no &&
6043      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6044      # have to relink, otherwise we might link with an installed library
6045      # when we should be linking with a yet-to-be-installed one
6046      ## test "$hardcode_shlibpath_var" != no &&
6047      test "$hardcode_minus_L" != no; then
6048     # Linking always hardcodes the temporary library directory.
6049     hardcode_action=relink
6050   else
6051     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6052     hardcode_action=immediate
6053   fi
6054 else
6055   # We cannot hardcode anything, or else we can only hardcode existing
6056   # directories.
6057   hardcode_action=unsupported
6058 fi
6059 echo "$ac_t""$hardcode_action" 1>&6
6060
6061 striplib=
6062 old_striplib=
6063 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6064 echo "configure:6065: checking whether stripping libraries is possible" >&5
6065 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6066   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6067   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6068   echo "$ac_t""yes" 1>&6
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072
6073 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6074 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6075
6076 # PORTME Fill in your ld.so characteristics
6077 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6078 echo "configure:6079: checking dynamic linker characteristics" >&5
6079 library_names_spec=
6080 libname_spec='lib$name'
6081 soname_spec=
6082 postinstall_cmds=
6083 postuninstall_cmds=
6084 finish_cmds=
6085 finish_eval=
6086 shlibpath_var=
6087 shlibpath_overrides_runpath=unknown
6088 version_type=none
6089 dynamic_linker="$host_os ld.so"
6090 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6091 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6092
6093 case $host_os in
6094 aix3*)
6095   version_type=linux
6096   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6097   shlibpath_var=LIBPATH
6098
6099   # AIX has no versioning support, so we append a major version to the name.
6100   soname_spec='${libname}${release}.so$major'
6101   ;;
6102
6103 aix4* | aix5*)
6104   version_type=linux
6105   need_lib_prefix=no
6106   need_version=no
6107   hardcode_into_libs=yes
6108   if test "$host_cpu" = ia64; then
6109     # AIX 5 supports IA64
6110     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6111     shlibpath_var=LD_LIBRARY_PATH
6112   else
6113     # With GCC up to 2.95.x, collect2 would create an import file
6114     # for dependence libraries.  The import file would start with
6115     # the line `#! .'.  This would cause the generated library to
6116     # depend on `.', always an invalid library.  This was fixed in
6117     # development snapshots of GCC prior to 3.0.
6118     case $host_os in
6119       aix4 | aix4.[01] | aix4.[01].*)
6120         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6121              echo ' yes '
6122              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6123           :
6124         else
6125           can_build_shared=no
6126         fi
6127         ;;
6128     esac
6129     # AIX (on Power*) has no versioning support, so currently we can
6130     # not hardcode correct soname into executable. Probably we can
6131     # add versioning support to collect2, so additional links can
6132     # be useful in future.
6133     if test "$aix_use_runtimelinking" = yes; then
6134       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6135       # instead of lib<name>.a to let people know that these are not
6136       # typical AIX shared libraries.
6137       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6138     else
6139       # We preserve .a as extension for shared libraries through AIX4.2
6140       # and later when we are not doing run time linking.
6141       library_names_spec='${libname}${release}.a $libname.a'
6142       soname_spec='${libname}${release}.so$major'
6143     fi
6144     shlibpath_var=LIBPATH
6145   fi
6146   hardcode_into_libs=yes
6147   ;;
6148
6149 amigaos*)
6150   library_names_spec='$libname.ixlibrary $libname.a'
6151   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6152   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'
6153   ;;
6154
6155 beos*)
6156   library_names_spec='${libname}.so'
6157   dynamic_linker="$host_os ld.so"
6158   shlibpath_var=LIBRARY_PATH
6159   ;;
6160
6161 bsdi4*)
6162   version_type=linux
6163   need_version=no
6164   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6165   soname_spec='${libname}${release}.so$major'
6166   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6167   shlibpath_var=LD_LIBRARY_PATH
6168   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6169   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6170   export_dynamic_flag_spec=-rdynamic
6171   # the default ld.so.conf also contains /usr/contrib/lib and
6172   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6173   # libtool to hard-code these into programs
6174   ;;
6175
6176 cygwin* | mingw* | pw32*)
6177   version_type=windows
6178   need_version=no
6179   need_lib_prefix=no
6180   case $GCC,$host_os in
6181   yes,cygwin*)
6182     library_names_spec='$libname.dll.a'
6183     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6184     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6185       dldir=$destdir/`dirname \$dlpath`~
6186       test -d \$dldir || mkdir -p \$dldir~
6187       $install_prog .libs/$dlname \$dldir/$dlname'
6188     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6189       dlpath=$dir/\$dldll~
6190        $rm \$dlpath'
6191     ;;
6192   yes,mingw*)
6193     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6194     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6195     ;;
6196   yes,pw32*)
6197     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6198     ;;
6199   *)
6200     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6201     ;;
6202   esac
6203   dynamic_linker='Win32 ld.exe'
6204   # FIXME: first we should search . and the directory the executable is in
6205   shlibpath_var=PATH
6206   ;;
6207
6208 darwin* | rhapsody*)
6209   dynamic_linker="$host_os dyld"
6210   version_type=darwin
6211   need_lib_prefix=no
6212   need_version=no
6213   # FIXME: Relying on posixy $() will cause problems for
6214   #        cross-compilation, but unfortunately the echo tests do not
6215   #        yet detect zsh echo's removal of \ escapes.
6216   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)'
6217   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6218   shlibpath_overrides_runpath=yes
6219   shlibpath_var=DYLD_LIBRARY_PATH
6220   ;;
6221
6222 freebsd1*)
6223   dynamic_linker=no
6224   ;;
6225
6226 freebsd*)
6227   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6228   version_type=freebsd-$objformat
6229   case $version_type in
6230     freebsd-elf*)
6231       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6232       need_version=no
6233       need_lib_prefix=no
6234       ;;
6235     freebsd-*)
6236       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6237       need_version=yes
6238       ;;
6239   esac
6240   shlibpath_var=LD_LIBRARY_PATH
6241   case $host_os in
6242   freebsd2*)
6243     shlibpath_overrides_runpath=yes
6244     ;;
6245   *)
6246     shlibpath_overrides_runpath=no
6247     hardcode_into_libs=yes
6248     ;;
6249   esac
6250   ;;
6251
6252 gnu*)
6253   version_type=linux
6254   need_lib_prefix=no
6255   need_version=no
6256   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6257   soname_spec='${libname}${release}.so$major'
6258   shlibpath_var=LD_LIBRARY_PATH
6259   hardcode_into_libs=yes
6260   ;;
6261
6262 hpux9* | hpux10* | hpux11*)
6263   # Give a soname corresponding to the major version so that dld.sl refuses to
6264   # link against other versions.
6265   dynamic_linker="$host_os dld.sl"
6266   version_type=sunos
6267   need_lib_prefix=no
6268   need_version=no
6269   shlibpath_var=SHLIB_PATH
6270   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6271   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6272   soname_spec='${libname}${release}.sl$major'
6273   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6274   postinstall_cmds='chmod 555 $lib'
6275   ;;
6276
6277 irix5* | irix6* | nonstopux*)
6278   case $host_os in
6279     nonstopux*) version_type=nonstopux ;;
6280     *)          version_type=irix ;;
6281   esac
6282   need_lib_prefix=no
6283   need_version=no
6284   soname_spec='${libname}${release}.so$major'
6285   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6286   case $host_os in
6287   irix5* | nonstopux*)
6288     libsuff= shlibsuff=
6289     ;;
6290   *)
6291     case $LD in # libtool.m4 will add one of these switches to LD
6292     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6293     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6294     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6295     *) libsuff= shlibsuff= libmagic=never-match;;
6296     esac
6297     ;;
6298   esac
6299   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6300   shlibpath_overrides_runpath=no
6301   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6302   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6303   ;;
6304
6305 # No shared lib support for Linux oldld, aout, or coff.
6306 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6307   dynamic_linker=no
6308   ;;
6309
6310 # This must be Linux ELF.
6311 linux-gnu*)
6312   version_type=linux
6313   need_lib_prefix=no
6314   need_version=no
6315   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6316   soname_spec='${libname}${release}.so$major'
6317   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6318   shlibpath_var=LD_LIBRARY_PATH
6319   shlibpath_overrides_runpath=no
6320   # This implies no fast_install, which is unacceptable.
6321   # Some rework will be needed to allow for fast_install
6322   # before this can be enabled.
6323   hardcode_into_libs=yes
6324
6325   # We used to test for /lib/ld.so.1 and disable shared libraries on
6326   # powerpc, because MkLinux only supported shared libraries with the
6327   # GNU dynamic linker.  Since this was broken with cross compilers,
6328   # most powerpc-linux boxes support dynamic linking these days and
6329   # people can always --disable-shared, the test was removed, and we
6330   # assume the GNU/Linux dynamic linker is in use.
6331   dynamic_linker='GNU/Linux ld.so'
6332   ;;
6333
6334 netbsd*)
6335   version_type=sunos
6336   need_lib_prefix=no
6337   need_version=no
6338   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6339     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6340     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6341     dynamic_linker='NetBSD (a.out) ld.so'
6342   else
6343     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6344     soname_spec='${libname}${release}.so$major'
6345     dynamic_linker='NetBSD ld.elf_so'
6346   fi
6347   shlibpath_var=LD_LIBRARY_PATH
6348   shlibpath_overrides_runpath=yes
6349   hardcode_into_libs=yes
6350   ;;
6351
6352 newsos6)
6353   version_type=linux
6354   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   shlibpath_overrides_runpath=yes
6357   ;;
6358
6359 openbsd*)
6360   version_type=sunos
6361   need_lib_prefix=no
6362   need_version=no
6363   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6364     case "$host_os" in
6365     openbsd2.[89] | openbsd2.[89].*)
6366       shlibpath_overrides_runpath=no
6367       ;;
6368     *)
6369       shlibpath_overrides_runpath=yes
6370       ;;
6371     esac
6372   else
6373     shlibpath_overrides_runpath=yes
6374   fi
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6376   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6377   shlibpath_var=LD_LIBRARY_PATH
6378   ;;
6379
6380 openedition*)
6381   need_lib_prefix=no
6382   need_version=no
6383   shlibpath_overrides_runpath=yes
6384   shlibpath_var=LIBPATH
6385   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6386   # the library's exports are in libname.x; this is the file that must
6387   # actually be linked with to use a DLL.
6388   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6389   ;;
6390
6391 os2*)
6392   libname_spec='$name'
6393   need_lib_prefix=no
6394   library_names_spec='$libname.dll $libname.a'
6395   dynamic_linker='OS/2 ld.exe'
6396   shlibpath_var=LIBPATH
6397   ;;
6398
6399 osf3* | osf4* | osf5*)
6400   version_type=osf
6401   need_version=no
6402   soname_spec='${libname}${release}.so$major'
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6404   shlibpath_var=LD_LIBRARY_PATH
6405   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6406   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6407   hardcode_into_libs=yes
6408   ;;
6409
6410 sco3.2v5*)
6411   version_type=osf
6412   soname_spec='${libname}${release}.so$major'
6413   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6414   shlibpath_var=LD_LIBRARY_PATH
6415   ;;
6416
6417 solaris*)
6418   version_type=linux
6419   need_lib_prefix=no
6420   need_version=no
6421   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6422   soname_spec='${libname}${release}.so$major'
6423   shlibpath_var=LD_LIBRARY_PATH
6424   shlibpath_overrides_runpath=yes
6425   hardcode_into_libs=yes
6426   # ldd complains unless libraries are executable
6427   postinstall_cmds='chmod +x $lib'
6428   ;;
6429
6430 sunos4*)
6431   version_type=sunos
6432   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6433   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6434   shlibpath_var=LD_LIBRARY_PATH
6435   shlibpath_overrides_runpath=yes
6436   if test "$with_gnu_ld" = yes; then
6437     need_lib_prefix=no
6438   fi
6439   need_version=yes
6440   ;;
6441
6442 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6443   version_type=linux
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   shlibpath_var=LD_LIBRARY_PATH
6447   case $host_vendor in
6448     sni)
6449       shlibpath_overrides_runpath=no
6450       need_lib_prefix=no
6451       export_dynamic_flag_spec='${wl}-Blargedynsym'
6452       runpath_var=LD_RUN_PATH
6453       ;;
6454     siemens)
6455       need_lib_prefix=no
6456       ;;
6457     motorola)
6458       need_lib_prefix=no
6459       need_version=no
6460       shlibpath_overrides_runpath=no
6461       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6462       ;;
6463   esac
6464   ;;
6465
6466 uts4*)
6467   version_type=linux
6468   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6469   soname_spec='${libname}${release}.so$major'
6470   shlibpath_var=LD_LIBRARY_PATH
6471   ;;
6472
6473 dgux*)
6474   version_type=linux
6475   need_lib_prefix=no
6476   need_version=no
6477   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6478   soname_spec='${libname}${release}.so$major'
6479   shlibpath_var=LD_LIBRARY_PATH
6480   ;;
6481
6482 sysv4*MP*)
6483   if test -d /usr/nec ;then
6484     version_type=linux
6485     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6486     soname_spec='$libname.so.$major'
6487     shlibpath_var=LD_LIBRARY_PATH
6488   fi
6489   ;;
6490
6491 *)
6492   dynamic_linker=no
6493   ;;
6494 esac
6495 echo "$ac_t""$dynamic_linker" 1>&6
6496 test "$dynamic_linker" = no && can_build_shared=no
6497
6498 # Report the final consequences.
6499 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6500 echo "configure:6501: checking if libtool supports shared libraries" >&5
6501 echo "$ac_t""$can_build_shared" 1>&6
6502
6503 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6504 echo "configure:6505: checking whether to build shared libraries" >&5
6505 test "$can_build_shared" = "no" && enable_shared=no
6506
6507 # On AIX, shared libraries and static libraries use the same namespace, and
6508 # are all built from PIC.
6509 case "$host_os" in
6510 aix3*)
6511   test "$enable_shared" = yes && enable_static=no
6512   if test -n "$RANLIB"; then
6513     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6514     postinstall_cmds='$RANLIB $lib'
6515   fi
6516   ;;
6517
6518 aix4*)
6519   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6520     test "$enable_shared" = yes && enable_static=no
6521   fi
6522   ;;
6523 esac
6524 echo "$ac_t""$enable_shared" 1>&6
6525
6526 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking whether to build static libraries" >&5
6528 # Make sure either enable_shared or enable_static is yes.
6529 test "$enable_shared" = yes || enable_static=yes
6530 echo "$ac_t""$enable_static" 1>&6
6531
6532 if test "$hardcode_action" = relink; then
6533   # Fast installation is not supported
6534   enable_fast_install=no
6535 elif test "$shlibpath_overrides_runpath" = yes ||
6536      test "$enable_shared" = no; then
6537   # Fast installation is not necessary
6538   enable_fast_install=needless
6539 fi
6540
6541 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6542 if test "$GCC" = yes; then
6543   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6544 fi
6545
6546 if test "x$enable_dlopen" != xyes; then
6547   enable_dlopen=unknown
6548   enable_dlopen_self=unknown
6549   enable_dlopen_self_static=unknown
6550 else
6551   lt_cv_dlopen=no
6552   lt_cv_dlopen_libs=
6553
6554   case $host_os in
6555   beos*)
6556     lt_cv_dlopen="load_add_on"
6557     lt_cv_dlopen_libs=
6558     lt_cv_dlopen_self=yes
6559     ;;
6560
6561   cygwin* | mingw* | pw32*)
6562     lt_cv_dlopen="LoadLibrary"
6563     lt_cv_dlopen_libs=
6564    ;;
6565
6566   *)
6567     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6568 echo "configure:6569: checking for dllload" >&5
6569 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572   cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 /* System header to define __stub macros and hopefully few prototypes,
6576     which can conflict with char dllload(); below.  */
6577 #include <assert.h>
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char dllload();
6582 char (*f)();
6583
6584 int main() {
6585
6586 /* The GNU C library defines this for functions which it implements
6587     to always fail with ENOSYS.  Some functions are actually named
6588     something starting with __ and the normal name is an alias.  */
6589 #if defined (__stub_dllload) || defined (__stub___dllload)
6590 choke me
6591 #else
6592 f = dllload;
6593 #endif
6594
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   eval "ac_cv_func_dllload=yes"
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_func_dllload=no"
6605 fi
6606 rm -f conftest*
6607 fi
6608
6609 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   lt_cv_dlopen="dllload"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6615 echo "configure:6616: checking for shl_load" >&5
6616 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char shl_load(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char shl_load();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6637 choke me
6638 #else
6639 f = shl_load;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_shl_load=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_shl_load=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658   lt_cv_dlopen="shl_load"
6659 else
6660   echo "$ac_t""no" 1>&6
6661 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6662 echo "configure:6663: checking for shl_load in -ldld" >&5
6663 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-ldld  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char shl_load();
6676
6677 int main() {
6678 shl_load()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6697 else
6698   echo "$ac_t""no" 1>&6
6699 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6700 echo "configure:6701: checking for dlopen" >&5
6701 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char dlopen(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char dlopen();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6722 choke me
6723 #else
6724 f = dlopen;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_dlopen=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_dlopen=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   lt_cv_dlopen="dlopen"
6744 else
6745   echo "$ac_t""no" 1>&6
6746 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6747 echo "configure:6748: checking for dlopen in -ldl" >&5
6748 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6750   echo $ac_n "(cached) $ac_c" 1>&6
6751 else
6752   ac_save_LIBS="$LIBS"
6753 LIBS="-ldl  $LIBS"
6754 cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 /* Override any gcc2 internal prototype to avoid an error.  */
6758 /* We use char because int might match the return type of a gcc2
6759     builtin and then its argument prototype would still apply.  */
6760 char dlopen();
6761
6762 int main() {
6763 dlopen()
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=no"
6774 fi
6775 rm -f conftest*
6776 LIBS="$ac_save_LIBS"
6777
6778 fi
6779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6780   echo "$ac_t""yes" 1>&6
6781   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6782 else
6783   echo "$ac_t""no" 1>&6
6784 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6785 echo "configure:6786: checking for dlopen in -lsvld" >&5
6786 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   ac_save_LIBS="$LIBS"
6791 LIBS="-lsvld  $LIBS"
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 /* Override any gcc2 internal prototype to avoid an error.  */
6796 /* We use char because int might match the return type of a gcc2
6797     builtin and then its argument prototype would still apply.  */
6798 char dlopen();
6799
6800 int main() {
6801 dlopen()
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=no"
6812 fi
6813 rm -f conftest*
6814 LIBS="$ac_save_LIBS"
6815
6816 fi
6817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6818   echo "$ac_t""yes" 1>&6
6819   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6820 else
6821   echo "$ac_t""no" 1>&6
6822 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6823 echo "configure:6824: checking for dld_link in -ldld" >&5
6824 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   ac_save_LIBS="$LIBS"
6829 LIBS="-ldld  $LIBS"
6830 cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* Override any gcc2 internal prototype to avoid an error.  */
6834 /* We use char because int might match the return type of a gcc2
6835     builtin and then its argument prototype would still apply.  */
6836 char dld_link();
6837
6838 int main() {
6839 dld_link()
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_lib_$ac_lib_var=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=no"
6850 fi
6851 rm -f conftest*
6852 LIBS="$ac_save_LIBS"
6853
6854 fi
6855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6856   echo "$ac_t""yes" 1>&6
6857   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862               
6863 fi
6864
6865             
6866 fi
6867
6868           
6869 fi
6870
6871         
6872 fi
6873
6874       
6875 fi
6876
6877     
6878 fi
6879
6880     ;;
6881   esac
6882
6883   if test "x$lt_cv_dlopen" != xno; then
6884     enable_dlopen=yes
6885   else
6886     enable_dlopen=no
6887   fi
6888
6889   case $lt_cv_dlopen in
6890   dlopen)
6891     save_CPPFLAGS="$CPPFLAGS"
6892         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6893
6894     save_LDFLAGS="$LDFLAGS"
6895     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6896
6897     save_LIBS="$LIBS"
6898     LIBS="$lt_cv_dlopen_libs $LIBS"
6899
6900     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6901 echo "configure:6902: checking whether a program can dlopen itself" >&5
6902 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905           if test "$cross_compiling" = yes; then :
6906   lt_cv_dlopen_self=cross
6907 else
6908     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6909   lt_status=$lt_dlunknown
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913
6914 #if HAVE_DLFCN_H
6915 #include <dlfcn.h>
6916 #endif
6917
6918 #include <stdio.h>
6919
6920 #ifdef RTLD_GLOBAL
6921 #  define LT_DLGLOBAL           RTLD_GLOBAL
6922 #else
6923 #  ifdef DL_GLOBAL
6924 #    define LT_DLGLOBAL         DL_GLOBAL
6925 #  else
6926 #    define LT_DLGLOBAL         0
6927 #  endif
6928 #endif
6929
6930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6931    find out it does not work in some platform. */
6932 #ifndef LT_DLLAZY_OR_NOW
6933 #  ifdef RTLD_LAZY
6934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6935 #  else
6936 #    ifdef DL_LAZY
6937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6938 #    else
6939 #      ifdef RTLD_NOW
6940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6941 #      else
6942 #        ifdef DL_NOW
6943 #          define LT_DLLAZY_OR_NOW      DL_NOW
6944 #        else
6945 #          define LT_DLLAZY_OR_NOW      0
6946 #        endif
6947 #      endif
6948 #    endif
6949 #  endif
6950 #endif
6951
6952 #ifdef __cplusplus
6953 extern "C" void exit (int);
6954 #endif
6955
6956 void fnord() { int i=42;}
6957 int main ()
6958 {
6959   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6960   int status = $lt_dlunknown;
6961
6962   if (self)
6963     {
6964       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6965       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6966       /* dlclose (self); */
6967     }
6968
6969     exit (status);
6970 }
6971 EOF
6972   if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6973     (./conftest; exit; ) 2>/dev/null
6974     lt_status=$?
6975     case x$lt_status in
6976       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6977       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6978       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6979     esac
6980   else :
6981     # compilation failed
6982     lt_cv_dlopen_self=no
6983   fi
6984 fi
6985 rm -fr conftest*
6986
6987     
6988 fi
6989
6990 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6991
6992     if test "x$lt_cv_dlopen_self" = xyes; then
6993       LDFLAGS="$LDFLAGS $link_static_flag"
6994       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6995 echo "configure:6996: checking whether a statically linked program can dlopen itself" >&5
6996 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999           if test "$cross_compiling" = yes; then :
7000   lt_cv_dlopen_self_static=cross
7001 else
7002     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7003   lt_status=$lt_dlunknown
7004   cat > conftest.$ac_ext <<EOF
7005 #line 7006 "configure"
7006 #include "confdefs.h"
7007
7008 #if HAVE_DLFCN_H
7009 #include <dlfcn.h>
7010 #endif
7011
7012 #include <stdio.h>
7013
7014 #ifdef RTLD_GLOBAL
7015 #  define LT_DLGLOBAL           RTLD_GLOBAL
7016 #else
7017 #  ifdef DL_GLOBAL
7018 #    define LT_DLGLOBAL         DL_GLOBAL
7019 #  else
7020 #    define LT_DLGLOBAL         0
7021 #  endif
7022 #endif
7023
7024 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7025    find out it does not work in some platform. */
7026 #ifndef LT_DLLAZY_OR_NOW
7027 #  ifdef RTLD_LAZY
7028 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7029 #  else
7030 #    ifdef DL_LAZY
7031 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7032 #    else
7033 #      ifdef RTLD_NOW
7034 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7035 #      else
7036 #        ifdef DL_NOW
7037 #          define LT_DLLAZY_OR_NOW      DL_NOW
7038 #        else
7039 #          define LT_DLLAZY_OR_NOW      0
7040 #        endif
7041 #      endif
7042 #    endif
7043 #  endif
7044 #endif
7045
7046 #ifdef __cplusplus
7047 extern "C" void exit (int);
7048 #endif
7049
7050 void fnord() { int i=42;}
7051 int main ()
7052 {
7053   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7054   int status = $lt_dlunknown;
7055
7056   if (self)
7057     {
7058       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7059       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7060       /* dlclose (self); */
7061     }
7062
7063     exit (status);
7064 }
7065 EOF
7066   if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7067     (./conftest; exit; ) 2>/dev/null
7068     lt_status=$?
7069     case x$lt_status in
7070       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7071       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7072       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7073     esac
7074   else :
7075     # compilation failed
7076     lt_cv_dlopen_self_static=no
7077   fi
7078 fi
7079 rm -fr conftest*
7080
7081       
7082 fi
7083
7084 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7085     fi
7086
7087     CPPFLAGS="$save_CPPFLAGS"
7088     LDFLAGS="$save_LDFLAGS"
7089     LIBS="$save_LIBS"
7090     ;;
7091   esac
7092
7093   case $lt_cv_dlopen_self in
7094   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7095   *) enable_dlopen_self=unknown ;;
7096   esac
7097
7098   case $lt_cv_dlopen_self_static in
7099   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7100   *) enable_dlopen_self_static=unknown ;;
7101   esac
7102 fi
7103
7104
7105 if test "$enable_shared" = yes && test "$GCC" = yes; then
7106   case $archive_cmds in
7107   *'~'*)
7108     # FIXME: we may have to deal with multi-command sequences.
7109     ;;
7110   '$CC '*)
7111     # Test whether the compiler implicitly links with -lc since on some
7112     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7113     # to ld, don't add -lc before -lgcc.
7114     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7115 echo "configure:7116: checking whether -lc should be explicitly linked in" >&5
7116     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   $rm conftest*
7120     echo 'static int dummy;' > conftest.$ac_ext
7121
7122     if { (eval echo configure:7123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7123       soname=conftest
7124       lib=conftest
7125       libobjs=conftest.$ac_objext
7126       deplibs=
7127       wl=$lt_cv_prog_cc_wl
7128       compiler_flags=-v
7129       linker_flags=-v
7130       verstring=
7131       output_objdir=.
7132       libname=conftest
7133       save_allow_undefined_flag=$allow_undefined_flag
7134       allow_undefined_flag=
7135       if { (eval echo configure:7136: \"$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; }
7136       then
7137         lt_cv_archive_cmds_need_lc=no
7138       else
7139         lt_cv_archive_cmds_need_lc=yes
7140       fi
7141       allow_undefined_flag=$save_allow_undefined_flag
7142     else
7143       cat conftest.err 1>&5
7144     fi
7145 fi
7146
7147     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7148     ;;
7149   esac
7150 fi
7151 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7152
7153 # The second clause should only fire when bootstrapping the
7154 # libtool distribution, otherwise you forgot to ship ltmain.sh
7155 # with your package, and you will get complaints that there are
7156 # no rules to generate ltmain.sh.
7157 if test -f "$ltmain"; then
7158   :
7159 else
7160   # If there is no Makefile yet, we rely on a make rule to execute
7161   # `config.status --recheck' to rerun these tests and create the
7162   # libtool script then.
7163   test -f Makefile && make "$ltmain"
7164 fi
7165
7166 if test -f "$ltmain"; then
7167   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7168   $rm -f "${ofile}T"
7169
7170   echo creating $ofile
7171
7172   # Now quote all the things that may contain metacharacters while being
7173   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7174   # variables and quote the copies for generation of the libtool script.
7175   for var in echo old_CC old_CFLAGS SED \
7176     AR AR_FLAGS CC LD LN_S NM SHELL \
7177     reload_flag reload_cmds wl \
7178     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7179     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7180     library_names_spec soname_spec \
7181     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7182     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7183     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7184     old_striplib striplib file_magic_cmd export_symbols_cmds \
7185     deplibs_check_method allow_undefined_flag no_undefined_flag \
7186     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7187     global_symbol_to_c_name_address \
7188     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7189     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7190     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7191
7192     case $var in
7193     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7194     old_postinstall_cmds | old_postuninstall_cmds | \
7195     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7196     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7197     postinstall_cmds | postuninstall_cmds | \
7198     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7199       # Double-quote double-evaled strings.
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7201       ;;
7202     *)
7203       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7204       ;;
7205     esac
7206   done
7207
7208   cat <<__EOF__ > "${ofile}T"
7209 #! $SHELL
7210
7211 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7212 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7213 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7214 #
7215 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7216 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7217 #
7218 # This program is free software; you can redistribute it and/or modify
7219 # it under the terms of the GNU General Public License as published by
7220 # the Free Software Foundation; either version 2 of the License, or
7221 # (at your option) any later version.
7222 #
7223 # This program is distributed in the hope that it will be useful, but
7224 # WITHOUT ANY WARRANTY; without even the implied warranty of
7225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7226 # General Public License for more details.
7227 #
7228 # You should have received a copy of the GNU General Public License
7229 # along with this program; if not, write to the Free Software
7230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7231 #
7232 # As a special exception to the GNU General Public License, if you
7233 # distribute this file as part of a program that contains a
7234 # configuration script generated by Autoconf, you may include it under
7235 # the same distribution terms that you use for the rest of that program.
7236
7237 # A sed that does not truncate output.
7238 SED=$lt_SED
7239
7240 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7241 Xsed="${SED} -e s/^X//"
7242
7243 # The HP-UX ksh and POSIX shell print the target directory to stdout
7244 # if CDPATH is set.
7245 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7246
7247 # ### BEGIN LIBTOOL CONFIG
7248
7249 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7250
7251 # Shell to use when invoking shell scripts.
7252 SHELL=$lt_SHELL
7253
7254 # Whether or not to build shared libraries.
7255 build_libtool_libs=$enable_shared
7256
7257 # Whether or not to build static libraries.
7258 build_old_libs=$enable_static
7259
7260 # Whether or not to add -lc for building shared libraries.
7261 build_libtool_need_lc=$need_lc
7262
7263 # Whether or not to optimize for fast installation.
7264 fast_install=$enable_fast_install
7265
7266 # The host system.
7267 host_alias=$host_alias
7268 host=$host
7269
7270 # An echo program that does not interpret backslashes.
7271 echo=$lt_echo
7272
7273 # The archiver.
7274 AR=$lt_AR
7275 AR_FLAGS=$lt_AR_FLAGS
7276
7277 # The default C compiler.
7278 CC=$lt_CC
7279
7280 # Is the compiler the GNU C compiler?
7281 with_gcc=$GCC
7282
7283 # The linker used to build libraries.
7284 LD=$lt_LD
7285
7286 # Whether we need hard or soft links.
7287 LN_S=$lt_LN_S
7288
7289 # A BSD-compatible nm program.
7290 NM=$lt_NM
7291
7292 # A symbol stripping program
7293 STRIP=$STRIP
7294
7295 # Used to examine libraries when file_magic_cmd begins "file"
7296 MAGIC_CMD=$MAGIC_CMD
7297
7298 # Used on cygwin: DLL creation program.
7299 DLLTOOL="$DLLTOOL"
7300
7301 # Used on cygwin: object dumper.
7302 OBJDUMP="$OBJDUMP"
7303
7304 # Used on cygwin: assembler.
7305 AS="$AS"
7306
7307 # The name of the directory that contains temporary libtool files.
7308 objdir=$objdir
7309
7310 # How to create reloadable object files.
7311 reload_flag=$lt_reload_flag
7312 reload_cmds=$lt_reload_cmds
7313
7314 # How to pass a linker flag through the compiler.
7315 wl=$lt_wl
7316
7317 # Object file suffix (normally "o").
7318 objext="$ac_objext"
7319
7320 # Old archive suffix (normally "a").
7321 libext="$libext"
7322
7323 # Executable file suffix (normally "").
7324 exeext="$exeext"
7325
7326 # Additional compiler flags for building library objects.
7327 pic_flag=$lt_pic_flag
7328 pic_mode=$pic_mode
7329
7330 # Does compiler simultaneously support -c and -o options?
7331 compiler_c_o=$lt_compiler_c_o
7332
7333 # Can we write directly to a .lo ?
7334 compiler_o_lo=$lt_compiler_o_lo
7335
7336 # Must we lock files when doing compilation ?
7337 need_locks=$lt_need_locks
7338
7339 # Do we need the lib prefix for modules?
7340 need_lib_prefix=$need_lib_prefix
7341
7342 # Do we need a version for libraries?
7343 need_version=$need_version
7344
7345 # Whether dlopen is supported.
7346 dlopen_support=$enable_dlopen
7347
7348 # Whether dlopen of programs is supported.
7349 dlopen_self=$enable_dlopen_self
7350
7351 # Whether dlopen of statically linked programs is supported.
7352 dlopen_self_static=$enable_dlopen_self_static
7353
7354 # Compiler flag to prevent dynamic linking.
7355 link_static_flag=$lt_link_static_flag
7356
7357 # Compiler flag to turn off builtin functions.
7358 no_builtin_flag=$lt_no_builtin_flag
7359
7360 # Compiler flag to allow reflexive dlopens.
7361 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7362
7363 # Compiler flag to generate shared objects directly from archives.
7364 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7365
7366 # Compiler flag to generate thread-safe objects.
7367 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7368
7369 # Library versioning type.
7370 version_type=$version_type
7371
7372 # Format of library name prefix.
7373 libname_spec=$lt_libname_spec
7374
7375 # List of archive names.  First name is the real one, the rest are links.
7376 # The last name is the one that the linker finds with -lNAME.
7377 library_names_spec=$lt_library_names_spec
7378
7379 # The coded name of the library, if different from the real name.
7380 soname_spec=$lt_soname_spec
7381
7382 # Commands used to build and install an old-style archive.
7383 RANLIB=$lt_RANLIB
7384 old_archive_cmds=$lt_old_archive_cmds
7385 old_postinstall_cmds=$lt_old_postinstall_cmds
7386 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7387
7388 # Create an old-style archive from a shared archive.
7389 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7390
7391 # Create a temporary old-style archive to link instead of a shared archive.
7392 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7393
7394 # Commands used to build and install a shared archive.
7395 archive_cmds=$lt_archive_cmds
7396 archive_expsym_cmds=$lt_archive_expsym_cmds
7397 postinstall_cmds=$lt_postinstall_cmds
7398 postuninstall_cmds=$lt_postuninstall_cmds
7399
7400 # Commands to strip libraries.
7401 old_striplib=$lt_old_striplib
7402 striplib=$lt_striplib
7403
7404 # Method to check whether dependent libraries are shared objects.
7405 deplibs_check_method=$lt_deplibs_check_method
7406
7407 # Command to use when deplibs_check_method == file_magic.
7408 file_magic_cmd=$lt_file_magic_cmd
7409
7410 # Flag that allows shared libraries with undefined symbols to be built.
7411 allow_undefined_flag=$lt_allow_undefined_flag
7412
7413 # Flag that forces no undefined symbols.
7414 no_undefined_flag=$lt_no_undefined_flag
7415
7416 # Commands used to finish a libtool library installation in a directory.
7417 finish_cmds=$lt_finish_cmds
7418
7419 # Same as above, but a single script fragment to be evaled but not shown.
7420 finish_eval=$lt_finish_eval
7421
7422 # Take the output of nm and produce a listing of raw symbols and C names.
7423 global_symbol_pipe=$lt_global_symbol_pipe
7424
7425 # Transform the output of nm in a proper C declaration
7426 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7427
7428 # Transform the output of nm in a C name address pair
7429 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7430
7431 # This is the shared library runtime path variable.
7432 runpath_var=$runpath_var
7433
7434 # This is the shared library path variable.
7435 shlibpath_var=$shlibpath_var
7436
7437 # Is shlibpath searched before the hard-coded library search path?
7438 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7439
7440 # How to hardcode a shared library path into an executable.
7441 hardcode_action=$hardcode_action
7442
7443 # Whether we should hardcode library paths into libraries.
7444 hardcode_into_libs=$hardcode_into_libs
7445
7446 # Flag to hardcode \$libdir into a binary during linking.
7447 # This must work even if \$libdir does not exist.
7448 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7449
7450 # Whether we need a single -rpath flag with a separated argument.
7451 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7452
7453 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7454 # resulting binary.
7455 hardcode_direct=$hardcode_direct
7456
7457 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7458 # resulting binary.
7459 hardcode_minus_L=$hardcode_minus_L
7460
7461 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7462 # the resulting binary.
7463 hardcode_shlibpath_var=$hardcode_shlibpath_var
7464
7465 # Variables whose values should be saved in libtool wrapper scripts and
7466 # restored at relink time.
7467 variables_saved_for_relink="$variables_saved_for_relink"
7468
7469 # Whether libtool must link a program against all its dependency libraries.
7470 link_all_deplibs=$link_all_deplibs
7471
7472 # Compile-time system search path for libraries
7473 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7474
7475 # Run-time system search path for libraries
7476 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7477
7478 # Fix the shell variable \$srcfile for the compiler.
7479 fix_srcfile_path="$fix_srcfile_path"
7480
7481 # Set to yes if exported symbols are required.
7482 always_export_symbols=$always_export_symbols
7483
7484 # The commands to list exported symbols.
7485 export_symbols_cmds=$lt_export_symbols_cmds
7486
7487 # The commands to extract the exported symbol list from a shared archive.
7488 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7489
7490 # Symbols that should not be listed in the preloaded symbols.
7491 exclude_expsyms=$lt_exclude_expsyms
7492
7493 # Symbols that must always be exported.
7494 include_expsyms=$lt_include_expsyms
7495
7496 # ### END LIBTOOL CONFIG
7497
7498 __EOF__
7499
7500   case $host_os in
7501   aix3*)
7502     cat <<\EOF >> "${ofile}T"
7503
7504 # AIX sometimes has problems with the GCC collect2 program.  For some
7505 # reason, if we set the COLLECT_NAMES environment variable, the problems
7506 # vanish in a puff of smoke.
7507 if test "X${COLLECT_NAMES+set}" != Xset; then
7508   COLLECT_NAMES=
7509   export COLLECT_NAMES
7510 fi
7511 EOF
7512     ;;
7513   esac
7514
7515   case $host_os in
7516   cygwin* | mingw* | pw32* | os2*)
7517     cat <<'EOF' >> "${ofile}T"
7518       # This is a source program that is used to create dlls on Windows
7519       # Don't remove nor modify the starting and closing comments
7520 # /* ltdll.c starts here */
7521 # #define WIN32_LEAN_AND_MEAN
7522 # #include <windows.h>
7523 # #undef WIN32_LEAN_AND_MEAN
7524 # #include <stdio.h>
7525 #
7526 # #ifndef __CYGWIN__
7527 # #  ifdef __CYGWIN32__
7528 # #    define __CYGWIN__ __CYGWIN32__
7529 # #  endif
7530 # #endif
7531 #
7532 # #ifdef __cplusplus
7533 # extern "C" {
7534 # #endif
7535 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7536 # #ifdef __cplusplus
7537 # }
7538 # #endif
7539 #
7540 # #ifdef __CYGWIN__
7541 # #include <cygwin/cygwin_dll.h>
7542 # DECLARE_CYGWIN_DLL( DllMain );
7543 # #endif
7544 # HINSTANCE __hDllInstance_base;
7545 #
7546 # BOOL APIENTRY
7547 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7548 # {
7549 #   __hDllInstance_base = hInst;
7550 #   return TRUE;
7551 # }
7552 # /* ltdll.c ends here */
7553         # This is a source program that is used to create import libraries
7554         # on Windows for dlls which lack them. Don't remove nor modify the
7555         # starting and closing comments
7556 # /* impgen.c starts here */
7557 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7558 #
7559 #  This file is part of GNU libtool.
7560 #
7561 #  This program is free software; you can redistribute it and/or modify
7562 #  it under the terms of the GNU General Public License as published by
7563 #  the Free Software Foundation; either version 2 of the License, or
7564 #  (at your option) any later version.
7565 #
7566 #  This program is distributed in the hope that it will be useful,
7567 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7568 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7569 #  GNU General Public License for more details.
7570 #
7571 #  You should have received a copy of the GNU General Public License
7572 #  along with this program; if not, write to the Free Software
7573 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7574 #  */
7575 #
7576 # #include <stdio.h>            /* for printf() */
7577 # #include <unistd.h>           /* for open(), lseek(), read() */
7578 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7579 # #include <string.h>           /* for strdup() */
7580 #
7581 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7582 # #ifndef O_BINARY
7583 # #define O_BINARY 0
7584 # #endif
7585 #
7586 # static unsigned int
7587 # pe_get16 (fd, offset)
7588 #      int fd;
7589 #      int offset;
7590 # {
7591 #   unsigned char b[2];
7592 #   lseek (fd, offset, SEEK_SET);
7593 #   read (fd, b, 2);
7594 #   return b[0] + (b[1]<<8);
7595 # }
7596 #
7597 # static unsigned int
7598 # pe_get32 (fd, offset)
7599 #     int fd;
7600 #     int offset;
7601 # {
7602 #   unsigned char b[4];
7603 #   lseek (fd, offset, SEEK_SET);
7604 #   read (fd, b, 4);
7605 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7606 # }
7607 #
7608 # static unsigned int
7609 # pe_as32 (ptr)
7610 #      void *ptr;
7611 # {
7612 #   unsigned char *b = ptr;
7613 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7614 # }
7615 #
7616 # int
7617 # main (argc, argv)
7618 #     int argc;
7619 #     char *argv[];
7620 # {
7621 #     int dll;
7622 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7623 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7624 #     unsigned long name_rvas, nexp;
7625 #     unsigned char *expdata, *erva;
7626 #     char *filename, *dll_name;
7627 #
7628 #     filename = argv[1];
7629 #
7630 #     dll = open(filename, O_RDONLY|O_BINARY);
7631 #     if (dll < 1)
7632 #       return 1;
7633 #
7634 #     dll_name = filename;
7635 #
7636 #     for (i=0; filename[i]; i++)
7637 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7638 #           dll_name = filename + i +1;
7639 #
7640 #     pe_header_offset = pe_get32 (dll, 0x3c);
7641 #     opthdr_ofs = pe_header_offset + 4 + 20;
7642 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7643 #
7644 #     if (num_entries < 1) /* no exports */
7645 #       return 1;
7646 #
7647 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7648 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7649 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7650 #     secptr = (pe_header_offset + 4 + 20 +
7651 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7652 #
7653 #     expptr = 0;
7654 #     for (i = 0; i < nsections; i++)
7655 #     {
7656 #       char sname[8];
7657 #       unsigned long secptr1 = secptr + 40 * i;
7658 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7659 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7660 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7661 #       lseek(dll, secptr1, SEEK_SET);
7662 #       read(dll, sname, 8);
7663 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7664 #       {
7665 #           expptr = fptr + (export_rva - vaddr);
7666 #           if (export_rva + export_size > vaddr + vsize)
7667 #               export_size = vsize - (export_rva - vaddr);
7668 #           break;
7669 #       }
7670 #     }
7671 #
7672 #     expdata = (unsigned char*)malloc(export_size);
7673 #     lseek (dll, expptr, SEEK_SET);
7674 #     read (dll, expdata, export_size);
7675 #     erva = expdata - export_rva;
7676 #
7677 #     nexp = pe_as32 (expdata+24);
7678 #     name_rvas = pe_as32 (expdata+32);
7679 #
7680 #     printf ("EXPORTS\n");
7681 #     for (i = 0; i<nexp; i++)
7682 #     {
7683 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7684 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7685 #     }
7686 #
7687 #     return 0;
7688 # }
7689 # /* impgen.c ends here */
7690
7691 EOF
7692     ;;
7693   esac
7694
7695   # We use sed instead of cat because bash on DJGPP gets confused if
7696   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7697   # text mode, it properly converts lines to CR/LF.  This bash problem
7698   # is reportedly fixed, but why not run on old versions too?
7699   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7700
7701   mv -f "${ofile}T" "$ofile" || \
7702     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7703   chmod +x "$ofile"
7704 fi
7705
7706
7707
7708
7709
7710 # This can be used to rebuild libtool when needed
7711 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7712
7713 # Always use our own libtool.
7714 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7715
7716 # Prevent multiple expansion
7717
7718
7719
7720 # test for ln hardlink support
7721 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7722 echo "configure:7723: checking whether ln works" >&5
7723 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   rm -f conftest.src conftest.dst
7727 echo "conftest" > conftest.src
7728 if ln conftest.src conftest.dst 2>/dev/null
7729 then
7730   ol_cv_prog_LN_H="ln"
7731 else
7732   ol_cv_prog_LN_H="cp"
7733 fi
7734 rm -f conftest.src conftest.dst
7735
7736 fi
7737 LN_H="$ol_cv_prog_LN_H"
7738 if test "$ol_cv_prog_LN_H" = "ln"; then
7739         echo "$ac_t""yes" 1>&6
7740 else
7741         echo "$ac_t""no" 1>&6
7742 fi
7743
7744 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7745 echo "configure:7746: checking whether ln -s works" >&5
7746 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7747   echo $ac_n "(cached) $ac_c" 1>&6
7748 else
7749   rm -f conftestdata
7750 if ln -s X conftestdata 2>/dev/null
7751 then
7752   rm -f conftestdata
7753   ac_cv_prog_LN_S="ln -s"
7754 else
7755   ac_cv_prog_LN_S=ln
7756 fi
7757 fi
7758 LN_S="$ac_cv_prog_LN_S"
7759 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7760   echo "$ac_t""yes" 1>&6
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764
7765
7766 ol_link_perl=no
7767 if test $ol_enable_perl != no ; then
7768         # Extract the first word of "perl", so it can be a program name with args.
7769 set dummy perl; ac_word=$2
7770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7771 echo "configure:7772: checking for $ac_word" >&5
7772 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7773   echo $ac_n "(cached) $ac_c" 1>&6
7774 else
7775   case "$PERLBIN" in
7776   /*)
7777   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7778   ;;
7779   ?:/*)
7780   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7781   ;;
7782   *)
7783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7784   ac_dummy="$PATH"
7785   for ac_dir in $ac_dummy; do 
7786     test -z "$ac_dir" && ac_dir=.
7787     if test -f $ac_dir/$ac_word; then
7788       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7789       break
7790     fi
7791   done
7792   IFS="$ac_save_ifs"
7793   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7794   ;;
7795 esac
7796 fi
7797 PERLBIN="$ac_cv_path_PERLBIN"
7798 if test -n "$PERLBIN"; then
7799   echo "$ac_t""$PERLBIN" 1>&6
7800 else
7801   echo "$ac_t""no" 1>&6
7802 fi
7803
7804
7805         if test "no$PERLBIN" = "no" ; then
7806                 if test $ol_enable_perl = yes ; then
7807                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7808                 fi
7809
7810         else
7811                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7812                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7813
7814                 if test x"$ol_enable_perl" = "xyes" ; then
7815                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7816                 else
7817                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7818                 fi
7819                                 ol_link_perl=yes
7820         fi
7821 fi
7822
7823 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7824 echo "configure:7825: checking how to run the C preprocessor" >&5
7825 # On Suns, sometimes $CPP names a directory.
7826 if test -n "$CPP" && test -d "$CPP"; then
7827   CPP=
7828 fi
7829 if test -z "$CPP"; then
7830 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7831   echo $ac_n "(cached) $ac_c" 1>&6
7832 else
7833     # This must be in double quotes, not single quotes, because CPP may get
7834   # substituted into the Makefile and "${CC-cc}" will confuse make.
7835   CPP="${CC-cc} -E"
7836   # On the NeXT, cc -E runs the code through the compiler's parser,
7837   # not just through cpp.
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <assert.h>
7842 Syntax Error
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   :
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   CPP="${CC-cc} -E -traditional-cpp"
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <assert.h>
7859 Syntax Error
7860 EOF
7861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7862 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7864 if test -z "$ac_err"; then
7865   :
7866 else
7867   echo "$ac_err" >&5
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   CPP="${CC-cc} -nologo -E"
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <assert.h>
7876 Syntax Error
7877 EOF
7878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7879 { (eval echo configure:7880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7881 if test -z "$ac_err"; then
7882   :
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   CPP=/lib/cpp
7889 fi
7890 rm -f conftest*
7891 fi
7892 rm -f conftest*
7893 fi
7894 rm -f conftest*
7895   ac_cv_prog_CPP="$CPP"
7896 fi
7897   CPP="$ac_cv_prog_CPP"
7898 else
7899   ac_cv_prog_CPP="$CPP"
7900 fi
7901 echo "$ac_t""$CPP" 1>&6
7902
7903
7904
7905 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7906 echo "configure:7907: checking for Cygwin environment" >&5
7907 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913
7914 int main() {
7915
7916 #ifndef __CYGWIN__
7917 #define __CYGWIN__ __CYGWIN32__
7918 #endif
7919 return __CYGWIN__;
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7923   rm -rf conftest*
7924   ac_cv_cygwin=yes
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   ac_cv_cygwin=no
7930 fi
7931 rm -f conftest*
7932 fi
7933
7934 echo "$ac_t""$ac_cv_cygwin" 1>&6
7935 CYGWIN=
7936 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7937 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7938 echo "configure:7939: checking for mingw32 environment" >&5
7939 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945
7946 int main() {
7947 return __MINGW32__;
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7951   rm -rf conftest*
7952   ac_cv_mingw32=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   ac_cv_mingw32=no
7958 fi
7959 rm -f conftest*
7960 fi
7961
7962 echo "$ac_t""$ac_cv_mingw32" 1>&6
7963 MINGW32=
7964 test "$ac_cv_mingw32" = yes && MINGW32=yes
7965
7966
7967
7968 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7969 echo "configure:7970: checking for executable suffix" >&5
7970 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7974   ac_cv_exeext=.exe
7975 else
7976   rm -f conftest*
7977   echo 'int main () { return 0; }' > conftest.$ac_ext
7978   ac_cv_exeext=
7979   if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7980     for file in conftest.*; do
7981       case $file in
7982       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7983       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7984       esac
7985     done
7986   else
7987     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7988   fi
7989   rm -f conftest*
7990   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7991 fi
7992 fi
7993
7994 EXEEXT=""
7995 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7996 echo "$ac_t""${ac_cv_exeext}" 1>&6
7997 ac_exeext=$EXEEXT
7998
7999 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8000 echo "configure:8001: checking for object suffix" >&5
8001 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   rm -f conftest*
8005 echo 'int i = 1;' > conftest.$ac_ext
8006 if { (eval echo configure:8007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8007   for ac_file in conftest.*; do
8008     case $ac_file in
8009     *.c) ;;
8010     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8011     esac
8012   done
8013 else
8014   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8015 fi
8016 rm -f conftest*
8017 fi
8018
8019 echo "$ac_t""$ac_cv_objext" 1>&6
8020 OBJEXT=$ac_cv_objext
8021 ac_objext=$ac_cv_objext
8022
8023
8024 cat >> confdefs.h <<EOF
8025 #define EXEEXT "${EXEEXT}"
8026 EOF
8027
8028
8029 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8030 echo "configure:8031: checking for be_app in -lbe" >&5
8031 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   ac_save_LIBS="$LIBS"
8036 LIBS="-lbe -lroot -lnet $LIBS"
8037 cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* Override any gcc2 internal prototype to avoid an error.  */
8041 /* We use char because int might match the return type of a gcc2
8042     builtin and then its argument prototype would still apply.  */
8043 char be_app();
8044
8045 int main() {
8046 be_app()
8047 ; return 0; }
8048 EOF
8049 if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8050   rm -rf conftest*
8051   eval "ac_cv_lib_$ac_lib_var=yes"
8052 else
8053   echo "configure: failed program was:" >&5
8054   cat conftest.$ac_ext >&5
8055   rm -rf conftest*
8056   eval "ac_cv_lib_$ac_lib_var=no"
8057 fi
8058 rm -f conftest*
8059 LIBS="$ac_save_LIBS"
8060
8061 fi
8062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8063   echo "$ac_t""yes" 1>&6
8064   LIBS="$LIBS -lbe -lroot -lnet"
8065 else
8066   echo "$ac_t""no" 1>&6
8067 :
8068 fi
8069
8070
8071
8072
8073
8074 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8075 echo "configure:8076: checking for ${CC-cc} option to accept ANSI C" >&5
8076 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   am_cv_prog_cc_stdc=no
8080 ac_save_CC="$CC"
8081 # Don't try gcc -ansi; that turns off useful extensions and
8082 # breaks some systems' header files.
8083 # AIX                   -qlanglvl=ansi
8084 # Ultrix and OSF/1      -std1
8085 # HP-UX 10.20 and later -Ae
8086 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8087 # SVR4                  -Xc -D__EXTENSIONS__
8088 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8089 do
8090   CC="$ac_save_CC $ac_arg"
8091   cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 #include <stdarg.h>
8095 #include <stdio.h>
8096 #include <sys/types.h>
8097 #include <sys/stat.h>
8098 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8099 struct buf { int x; };
8100 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8101 static char *e (p, i)
8102      char **p;
8103      int i;
8104 {
8105   return p[i];
8106 }
8107 static char *f (char * (*g) (char **, int), char **p, ...)
8108 {
8109   char *s;
8110   va_list v;
8111   va_start (v,p);
8112   s = g (p, va_arg (v,int));
8113   va_end (v);
8114   return s;
8115 }
8116 int test (int i, double x);
8117 struct s1 {int (*f) (int a);};
8118 struct s2 {int (*f) (double a);};
8119 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8120 int argc;
8121 char **argv;
8122
8123 int main() {
8124
8125 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8126
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8130   rm -rf conftest*
8131   am_cv_prog_cc_stdc="$ac_arg"; break
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135 fi
8136 rm -f conftest*
8137 done
8138 CC="$ac_save_CC"
8139
8140 fi
8141
8142 if test -z "$am_cv_prog_cc_stdc"; then
8143   echo "$ac_t""none needed" 1>&6
8144 else
8145   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8146 fi
8147 case "x$am_cv_prog_cc_stdc" in
8148   x|xno) ;;
8149   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8150 esac
8151
8152 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8153         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8154 fi
8155
8156 # test for make depend flag
8157 OL_MKDEP=
8158 OL_MKDEP_FLAGS=
8159 if test -z "${MKDEP}"; then
8160         OL_MKDEP="${CC-cc}"
8161         if test -z "${MKDEP_FLAGS}"; then
8162                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8163 echo "configure:8164: checking for ${OL_MKDEP} depend flag" >&5
8164 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   
8168                         ol_cv_mkdep=no
8169                         for flag in "-M" "-xM"; do
8170                                 cat > conftest.c <<EOF
8171  noCode;
8172 EOF
8173                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8174                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8175                                 then
8176                                         if test ! -f conftest."${ac_object}" ; then
8177                                                 ol_cv_mkdep=$flag
8178                                                 OL_MKDEP_FLAGS="$flag"
8179                                                 break
8180                                         fi
8181                                 fi
8182                         done
8183                         rm -f conftest*
8184                 
8185 fi
8186
8187 echo "$ac_t""$ol_cv_mkdep" 1>&6
8188         else
8189                 cc_cv_mkdep=yes
8190                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8191         fi
8192 else
8193         cc_cv_mkdep=yes
8194         OL_MKDEP="${MKDEP}"
8195         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8196 fi
8197
8198
8199
8200 if test "${ol_cv_mkdep}" = no ; then
8201         # this will soon become an error
8202         echo "configure: warning: do not know how to generate dependencies" 1>&2
8203 fi
8204
8205 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8206 echo "configure:8207: checking for afopen in -ls" >&5
8207 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8209   echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211   ac_save_LIBS="$LIBS"
8212 LIBS="-ls  $LIBS"
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* Override any gcc2 internal prototype to avoid an error.  */
8217 /* We use char because int might match the return type of a gcc2
8218     builtin and then its argument prototype would still apply.  */
8219 char afopen();
8220
8221 int main() {
8222 afopen()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 LIBS="$ac_save_LIBS"
8236
8237 fi
8238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240   
8241         AUTH_LIBS=-ls
8242         cat >> confdefs.h <<\EOF
8243 #define HAVE_AIX_SECURITY 1
8244 EOF
8245
8246
8247 else
8248   echo "$ac_t""no" 1>&6
8249 fi
8250
8251
8252 case "$target" in
8253 *-ibm-openedition)
8254         ac_cv_func_getopt=no
8255         cat >> confdefs.h <<\EOF
8256 #define BOTH_STRINGS_H 1
8257 EOF
8258
8259         ;;
8260 esac
8261
8262 ol_link_modules=no
8263 if test $ol_enable_modules != no ; then
8264         for ac_hdr in ltdl.h
8265 do
8266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8268 echo "configure:8269: checking for $ac_hdr" >&5
8269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   cat > conftest.$ac_ext <<EOF
8273 #line 8274 "configure"
8274 #include "confdefs.h"
8275 #include <$ac_hdr>
8276 EOF
8277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8278 { (eval echo configure:8279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8280 if test -z "$ac_err"; then
8281   rm -rf conftest*
8282   eval "ac_cv_header_$ac_safe=yes"
8283 else
8284   echo "$ac_err" >&5
8285   echo "configure: failed program was:" >&5
8286   cat conftest.$ac_ext >&5
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=no"
8289 fi
8290 rm -f conftest*
8291 fi
8292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8293   echo "$ac_t""yes" 1>&6
8294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8295   cat >> confdefs.h <<EOF
8296 #define $ac_tr_hdr 1
8297 EOF
8298  
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302 done
8303
8304
8305         if test $ac_cv_header_ltdl_h = no ; then
8306                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8307         fi
8308
8309         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8310 echo "configure:8311: checking for lt_dlinit in -lltdl" >&5
8311 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   ac_save_LIBS="$LIBS"
8316 LIBS="-lltdl  $LIBS"
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char lt_dlinit();
8324
8325 int main() {
8326 lt_dlinit()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 LIBS="$ac_save_LIBS"
8340
8341 fi
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344   
8345                 MODULES_LIBS=-lltdl
8346                 cat >> confdefs.h <<\EOF
8347 #define HAVE_LIBLTDL 1
8348 EOF
8349
8350         
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354
8355
8356         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8357                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8358         fi
8359         ol_link_modules=yes
8360
8361 else
8362         for i in $Backends; do
8363                 eval "ol_tmp=\$ol_enable_$i"
8364                 if test $ol_tmp = mod ; then
8365                         echo "configure: warning: building static $i backend" 1>&2
8366                         eval "ol_enable_$i=yes"
8367                 fi
8368         done
8369         for i in $Overlays; do
8370                 eval "ol_tmp=\$ol_enable_$i"
8371                 if test $ol_tmp = mod ; then
8372                         echo "configure: warning: building static $i overlay" 1>&2
8373                         eval "ol_enable_$i=yes"
8374                 fi
8375         done
8376 fi
8377
8378 # test for EBCDIC
8379 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8380 echo "configure:8381: checking for EBCDIC" >&5
8381 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8382   echo $ac_n "(cached) $ac_c" 1>&6
8383 else
8384   
8385         cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388
8389 #if !('M' == 0xd4)
8390 #include <__ASCII__/generate_error.h>
8391 #endif
8392
8393 EOF
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8398   rm -rf conftest*
8399   ol_cv_cpp_ebcdic=yes
8400 else
8401   echo "$ac_err" >&5
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=no
8406 fi
8407 rm -f conftest*
8408 fi
8409
8410 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8411 if test $ol_cv_cpp_ebcdic = yes ; then
8412         cat >> confdefs.h <<\EOF
8413 #define HAVE_EBCDIC 1
8414 EOF
8415
8416 fi
8417
8418 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8419 echo "configure:8420: checking for ANSI C header files" >&5
8420 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <stdlib.h>
8427 #include <stdarg.h>
8428 #include <string.h>
8429 #include <float.h>
8430 EOF
8431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8432 { (eval echo configure:8433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8434 if test -z "$ac_err"; then
8435   rm -rf conftest*
8436   ol_cv_header_stdc=yes
8437 else
8438   echo "$ac_err" >&5
8439   echo "configure: failed program was:" >&5
8440   cat conftest.$ac_ext >&5
8441   rm -rf conftest*
8442   ol_cv_header_stdc=no
8443 fi
8444 rm -f conftest*
8445
8446 if test $ol_cv_header_stdc = yes; then
8447   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 #include <string.h>
8452 EOF
8453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8454   egrep "memchr" >/dev/null 2>&1; then
8455   :
8456 else
8457   rm -rf conftest*
8458   ol_cv_header_stdc=no
8459 fi
8460 rm -f conftest*
8461
8462 fi
8463
8464 if test $ol_cv_header_stdc = yes; then
8465   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8466 cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 #include <stdlib.h>
8470 EOF
8471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8472   egrep "free" >/dev/null 2>&1; then
8473   :
8474 else
8475   rm -rf conftest*
8476   ol_cv_header_stdc=no
8477 fi
8478 rm -f conftest*
8479
8480 fi
8481
8482 if test $ol_cv_header_stdc = yes; then
8483   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8484 if test "$cross_compiling" = yes; then
8485   :
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <ctype.h>
8491 #ifndef HAVE_EBCDIC
8492 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8493 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8494 #else
8495 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8496                 || ('j' <= (c) && (c) <= 'r') \
8497                 || ('s' <= (c) && (c) <= 'z'))
8498 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8499 #endif
8500 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8501 int main () { int i; for (i = 0; i < 256; i++)
8502 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8503 exit (0); }
8504
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   :
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   ol_cv_header_stdc=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518 fi
8519 fi
8520
8521 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8522 if test $ol_cv_header_stdc = yes; then
8523   cat >> confdefs.h <<\EOF
8524 #define STDC_HEADERS 1
8525 EOF
8526
8527 fi
8528 ac_cv_header_stdc=disable
8529
8530
8531 if test $ol_cv_header_stdc != yes; then
8532         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8533 fi
8534
8535 ac_header_dirent=no
8536 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8537 do
8538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8539 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_hdr that defines DIR" >&5
8541 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 #include <sys/types.h>
8548 #include <$ac_hdr>
8549 int main() {
8550 DIR *dirp = 0;
8551 ; return 0; }
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8554   rm -rf conftest*
8555   eval "ac_cv_header_dirent_$ac_safe=yes"
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -rf conftest*
8560   eval "ac_cv_header_dirent_$ac_safe=no"
8561 fi
8562 rm -f conftest*
8563 fi
8564 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8567   cat >> confdefs.h <<EOF
8568 #define $ac_tr_hdr 1
8569 EOF
8570  ac_header_dirent=$ac_hdr; break
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574 done
8575 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8576 if test $ac_header_dirent = dirent.h; then
8577 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8578 echo "configure:8579: checking for opendir in -ldir" >&5
8579 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8581   echo $ac_n "(cached) $ac_c" 1>&6
8582 else
8583   ac_save_LIBS="$LIBS"
8584 LIBS="-ldir  $LIBS"
8585 cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 /* Override any gcc2 internal prototype to avoid an error.  */
8589 /* We use char because int might match the return type of a gcc2
8590     builtin and then its argument prototype would still apply.  */
8591 char opendir();
8592
8593 int main() {
8594 opendir()
8595 ; return 0; }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8598   rm -rf conftest*
8599   eval "ac_cv_lib_$ac_lib_var=yes"
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=no"
8605 fi
8606 rm -f conftest*
8607 LIBS="$ac_save_LIBS"
8608
8609 fi
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612   LIBS="$LIBS -ldir"
8613 else
8614   echo "$ac_t""no" 1>&6
8615 fi
8616
8617 else
8618 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8619 echo "configure:8620: checking for opendir in -lx" >&5
8620 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   ac_save_LIBS="$LIBS"
8625 LIBS="-lx  $LIBS"
8626 cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 /* Override any gcc2 internal prototype to avoid an error.  */
8630 /* We use char because int might match the return type of a gcc2
8631     builtin and then its argument prototype would still apply.  */
8632 char opendir();
8633
8634 int main() {
8635 opendir()
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=no"
8646 fi
8647 rm -f conftest*
8648 LIBS="$ac_save_LIBS"
8649
8650 fi
8651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653   LIBS="$LIBS -lx"
8654 else
8655   echo "$ac_t""no" 1>&6
8656 fi
8657
8658 fi
8659
8660 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8661 echo "configure:8662: checking for sys/wait.h that is POSIX.1 compatible" >&5
8662 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669 #include <sys/wait.h>
8670 #ifndef WEXITSTATUS
8671 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8672 #endif
8673 #ifndef WIFEXITED
8674 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8675 #endif
8676 int main() {
8677 int s;
8678 wait (&s);
8679 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8683   rm -rf conftest*
8684   ac_cv_header_sys_wait_h=yes
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   ac_cv_header_sys_wait_h=no
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8695 if test $ac_cv_header_sys_wait_h = yes; then
8696   cat >> confdefs.h <<\EOF
8697 #define HAVE_SYS_WAIT_H 1
8698 EOF
8699
8700 fi
8701
8702 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8703 echo "configure:8704: checking POSIX termios" >&5
8704 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8705   echo $ac_n "(cached) $ac_c" 1>&6
8706 else
8707   cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 #include <sys/types.h>
8711 #include <unistd.h>
8712 #include <termios.h>
8713 int main() {
8714 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8715    tcgetattr(0, 0);
8716 ; return 0; }
8717 EOF
8718 if { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8719   rm -rf conftest*
8720   am_cv_sys_posix_termios=yes
8721 else
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   am_cv_sys_posix_termios=no
8726 fi
8727 rm -f conftest*
8728 fi
8729
8730 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8731
8732
8733  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8734 echo "configure:8735: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8735 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8739
8740   gwinsz_in_termios_h=no
8741   if test $am_cv_sys_posix_termios = yes; then
8742     cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <sys/types.h>
8746 #     include <termios.h>
8747 #     ifdef TIOCGWINSZ
8748         yes
8749 #     endif
8750     
8751 EOF
8752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8753   egrep "yes" >/dev/null 2>&1; then
8754   rm -rf conftest*
8755   gwinsz_in_termios_h=yes
8756 fi
8757 rm -f conftest*
8758
8759   fi
8760
8761   if test $gwinsz_in_termios_h = no; then
8762     cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 #include <sys/types.h>
8766 #     include <sys/ioctl.h>
8767 #     ifdef TIOCGWINSZ
8768         yes
8769 #     endif
8770     
8771 EOF
8772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8773   egrep "yes" >/dev/null 2>&1; then
8774   rm -rf conftest*
8775   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8776 fi
8777 rm -f conftest*
8778
8779   fi
8780   
8781 fi
8782
8783 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8784   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8785     cat >> confdefs.h <<\EOF
8786 #define GWINSZ_IN_SYS_IOCTL 1
8787 EOF
8788
8789   fi
8790
8791 if test $am_cv_sys_posix_termios = yes ; then
8792         cat >> confdefs.h <<\EOF
8793 #define HAVE_POSIX_TERMIOS 1
8794 EOF
8795
8796 fi
8797
8798 for ac_hdr in \
8799         arpa/inet.h             \
8800         arpa/nameser.h  \
8801         assert.h                \
8802         bits/types.h    \
8803         conio.h                 \
8804         crypt.h                 \
8805         direct.h                \
8806         errno.h                 \
8807         fcntl.h                 \
8808         filio.h                 \
8809         getopt.h                \
8810         grp.h                   \
8811         io.h                    \
8812         libutil.h               \
8813         limits.h                \
8814         locale.h                \
8815         netinet/tcp.h   \
8816         malloc.h                \
8817         memory.h                \
8818         psap.h                  \
8819         pwd.h                   \
8820         process.h               \
8821         resolv.h                \
8822         sgtty.h                 \
8823         shadow.h                \
8824         stddef.h                \
8825         string.h                \
8826         strings.h               \
8827         sysexits.h              \
8828         sys/file.h              \
8829         sys/filio.h             \
8830         sys/errno.h             \
8831         sys/ioctl.h             \
8832         sys/param.h             \
8833         sys/resource.h  \
8834         sys/select.h    \
8835         sys/socket.h    \
8836         sys/stat.h              \
8837         sys/syslog.h    \
8838         sys/time.h              \
8839         sys/types.h             \
8840         sys/ucred.h             \
8841         sys/uio.h               \
8842         syslog.h                \
8843         termios.h               \
8844         unistd.h                \
8845         winsock.h               \
8846         winsock2.h              \
8847
8848 do
8849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8851 echo "configure:8852: checking for $ac_hdr" >&5
8852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 #include <$ac_hdr>
8859 EOF
8860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8861 { (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8863 if test -z "$ac_err"; then
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=yes"
8866 else
8867   echo "$ac_err" >&5
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=no"
8872 fi
8873 rm -f conftest*
8874 fi
8875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8876   echo "$ac_t""yes" 1>&6
8877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8878   cat >> confdefs.h <<EOF
8879 #define $ac_tr_hdr 1
8880 EOF
8881  
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885 done
8886
8887
8888
8889
8890 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8891 echo "configure:8892: checking for sigset in -lV3" >&5
8892 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   ac_save_LIBS="$LIBS"
8897 LIBS="-lV3  $LIBS"
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* Override any gcc2 internal prototype to avoid an error.  */
8902 /* We use char because int might match the return type of a gcc2
8903     builtin and then its argument prototype would still apply.  */
8904 char sigset();
8905
8906 int main() {
8907 sigset()
8908 ; return 0; }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=yes"
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   eval "ac_cv_lib_$ac_lib_var=no"
8918 fi
8919 rm -f conftest*
8920 LIBS="$ac_save_LIBS"
8921
8922 fi
8923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8924   echo "$ac_t""yes" 1>&6
8925     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8926     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8927   cat >> confdefs.h <<EOF
8928 #define $ac_tr_lib 1
8929 EOF
8930
8931   LIBS="-lV3 $LIBS"
8932
8933 else
8934   echo "$ac_t""no" 1>&6
8935 fi
8936
8937
8938 if test "$ac_cv_header_winsock_h" = yes; then
8939 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8940 echo "configure:8941: checking for winsock" >&5
8941 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   save_LIBS="$LIBS"
8945 for curlib in ws2_32 wsock32; do
8946         LIBS="$LIBS -l$curlib"
8947         cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <winsock.h>
8951                         
8952 int main() {
8953
8954                         socket(0,0,0);
8955                         select(0,NULL,NULL,NULL,NULL);
8956                         closesocket(0);
8957                         gethostname(NULL,0);
8958                         
8959 ; return 0; }
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8962   rm -rf conftest*
8963   ol_cv_winsock=yes
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -rf conftest*
8968   ol_cv_winsock=no
8969 fi
8970 rm -f conftest*
8971
8972         if test $ol_cv_winsock = yes; then
8973                 cat >> confdefs.h <<\EOF
8974 #define HAVE_WINSOCK 1
8975 EOF
8976
8977                 ac_cv_func_socket=yes
8978                 ac_cv_func_select=yes
8979                 ac_cv_func_closesocket=yes
8980                 ac_cv_func_gethostname=yes
8981                 if test $curlib = ws2_32; then
8982                         ol_cv_winsock=winsock2
8983                         cat >> confdefs.h <<\EOF
8984 #define HAVE_WINSOCK2 1
8985 EOF
8986
8987                 fi
8988                 break
8989         fi
8990         LIBS="$save_LIBS"
8991 done
8992 fi
8993
8994 echo "$ac_t""$ol_cv_winsock" 1>&6
8995 fi
8996
8997
8998 echo $ac_n "checking for socket""... $ac_c" 1>&6
8999 echo "configure:9000: checking for socket" >&5
9000 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* System header to define __stub macros and hopefully few prototypes,
9007     which can conflict with char socket(); below.  */
9008 #include <assert.h>
9009 /* Override any gcc2 internal prototype to avoid an error.  */
9010 /* We use char because int might match the return type of a gcc2
9011     builtin and then its argument prototype would still apply.  */
9012 char socket();
9013 char (*f)();
9014
9015 int main() {
9016
9017 /* The GNU C library defines this for functions which it implements
9018     to always fail with ENOSYS.  Some functions are actually named
9019     something starting with __ and the normal name is an alias.  */
9020 #if defined (__stub_socket) || defined (__stub___socket)
9021 choke me
9022 #else
9023 f = socket;
9024 #endif
9025
9026 ; return 0; }
9027 EOF
9028 if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9029   rm -rf conftest*
9030   eval "ac_cv_func_socket=yes"
9031 else
9032   echo "configure: failed program was:" >&5
9033   cat conftest.$ac_ext >&5
9034   rm -rf conftest*
9035   eval "ac_cv_func_socket=no"
9036 fi
9037 rm -f conftest*
9038 fi
9039
9040 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042   :
9043 else
9044   echo "$ac_t""no" 1>&6
9045         
9046         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9047 echo "configure:9048: checking for main in -lsocket" >&5
9048 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   ac_save_LIBS="$LIBS"
9053 LIBS="-lsocket  $LIBS"
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057
9058 int main() {
9059 main()
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   eval "ac_cv_lib_$ac_lib_var=yes"
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=no"
9070 fi
9071 rm -f conftest*
9072 LIBS="$ac_save_LIBS"
9073
9074 fi
9075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9076   echo "$ac_t""yes" 1>&6
9077     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9078     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9079   cat >> confdefs.h <<EOF
9080 #define $ac_tr_lib 1
9081 EOF
9082
9083   LIBS="-lsocket $LIBS"
9084
9085 else
9086   echo "$ac_t""no" 1>&6
9087 fi
9088
9089         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9090 echo "configure:9091: checking for main in -lnet" >&5
9091 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   ac_save_LIBS="$LIBS"
9096 LIBS="-lnet  $LIBS"
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100
9101 int main() {
9102 main()
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9106   rm -rf conftest*
9107   eval "ac_cv_lib_$ac_lib_var=yes"
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   eval "ac_cv_lib_$ac_lib_var=no"
9113 fi
9114 rm -f conftest*
9115 LIBS="$ac_save_LIBS"
9116
9117 fi
9118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9119   echo "$ac_t""yes" 1>&6
9120     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9122   cat >> confdefs.h <<EOF
9123 #define $ac_tr_lib 1
9124 EOF
9125
9126   LIBS="-lnet $LIBS"
9127
9128 else
9129   echo "$ac_t""no" 1>&6
9130 fi
9131
9132         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9133 echo "configure:9134: checking for main in -lnsl_s" >&5
9134 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9136   echo $ac_n "(cached) $ac_c" 1>&6
9137 else
9138   ac_save_LIBS="$LIBS"
9139 LIBS="-lnsl_s  $LIBS"
9140 cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143
9144 int main() {
9145 main()
9146 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   eval "ac_cv_lib_$ac_lib_var=yes"
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_lib_$ac_lib_var=no"
9156 fi
9157 rm -f conftest*
9158 LIBS="$ac_save_LIBS"
9159
9160 fi
9161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9162   echo "$ac_t""yes" 1>&6
9163     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9165   cat >> confdefs.h <<EOF
9166 #define $ac_tr_lib 1
9167 EOF
9168
9169   LIBS="-lnsl_s $LIBS"
9170
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174
9175         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9176 echo "configure:9177: checking for main in -lnsl" >&5
9177 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9179   echo $ac_n "(cached) $ac_c" 1>&6
9180 else
9181   ac_save_LIBS="$LIBS"
9182 LIBS="-lnsl  $LIBS"
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186
9187 int main() {
9188 main()
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   eval "ac_cv_lib_$ac_lib_var=yes"
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   eval "ac_cv_lib_$ac_lib_var=no"
9199 fi
9200 rm -f conftest*
9201 LIBS="$ac_save_LIBS"
9202
9203 fi
9204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9208   cat >> confdefs.h <<EOF
9209 #define $ac_tr_lib 1
9210 EOF
9211
9212   LIBS="-lnsl $LIBS"
9213
9214 else
9215   echo "$ac_t""no" 1>&6
9216 fi
9217
9218         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9219 echo "configure:9220: checking for socket in -linet" >&5
9220 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9222   echo $ac_n "(cached) $ac_c" 1>&6
9223 else
9224   ac_save_LIBS="$LIBS"
9225 LIBS="-linet  $LIBS"
9226 cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* Override any gcc2 internal prototype to avoid an error.  */
9230 /* We use char because int might match the return type of a gcc2
9231     builtin and then its argument prototype would still apply.  */
9232 char socket();
9233
9234 int main() {
9235 socket()
9236 ; return 0; }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9239   rm -rf conftest*
9240   eval "ac_cv_lib_$ac_lib_var=yes"
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=no"
9246 fi
9247 rm -f conftest*
9248 LIBS="$ac_save_LIBS"
9249
9250 fi
9251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9252   echo "$ac_t""yes" 1>&6
9253     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9255   cat >> confdefs.h <<EOF
9256 #define $ac_tr_lib 1
9257 EOF
9258
9259   LIBS="-linet $LIBS"
9260
9261 else
9262   echo "$ac_t""no" 1>&6
9263 fi
9264
9265         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9266 echo "configure:9267: checking for main in -lgen" >&5
9267 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9269   echo $ac_n "(cached) $ac_c" 1>&6
9270 else
9271   ac_save_LIBS="$LIBS"
9272 LIBS="-lgen  $LIBS"
9273 cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276
9277 int main() {
9278 main()
9279 ; return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9282   rm -rf conftest*
9283   eval "ac_cv_lib_$ac_lib_var=yes"
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=no"
9289 fi
9290 rm -f conftest*
9291 LIBS="$ac_save_LIBS"
9292
9293 fi
9294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9295   echo "$ac_t""yes" 1>&6
9296     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9298   cat >> confdefs.h <<EOF
9299 #define $ac_tr_lib 1
9300 EOF
9301
9302   LIBS="-lgen $LIBS"
9303
9304 else
9305   echo "$ac_t""no" 1>&6
9306 fi
9307
9308
9309 fi
9310
9311
9312 echo $ac_n "checking for select""... $ac_c" 1>&6
9313 echo "configure:9314: checking for select" >&5
9314 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 /* System header to define __stub macros and hopefully few prototypes,
9321     which can conflict with char select(); below.  */
9322 #include <assert.h>
9323 /* Override any gcc2 internal prototype to avoid an error.  */
9324 /* We use char because int might match the return type of a gcc2
9325     builtin and then its argument prototype would still apply.  */
9326 char select();
9327 char (*f)();
9328
9329 int main() {
9330
9331 /* The GNU C library defines this for functions which it implements
9332     to always fail with ENOSYS.  Some functions are actually named
9333     something starting with __ and the normal name is an alias.  */
9334 #if defined (__stub_select) || defined (__stub___select)
9335 choke me
9336 #else
9337 f = select;
9338 #endif
9339
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_func_select=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_func_select=no"
9350 fi
9351 rm -f conftest*
9352 fi
9353
9354 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356   :
9357 else
9358   echo "$ac_t""no" 1>&6
9359 { echo "configure: error: select() required." 1>&2; exit 1; }
9360 fi
9361
9362
9363 if test "${ac_cv_header_winsock_h}" != yes; then
9364                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9365 echo "configure:9366: checking types of arguments for select()" >&5
9366  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9376      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9377       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9378        cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #ifdef HAVE_SYS_TYPES_H
9382 #include <sys/types.h>
9383 #endif
9384 #ifdef HAVE_SYS_TIME_H
9385 #include <sys/time.h>
9386 #endif
9387 #ifdef HAVE_SYS_SELECT_H
9388 #include <sys/select.h>
9389 #endif
9390 #ifdef HAVE_SYS_SOCKET_H
9391 #include <sys/socket.h>
9392 #endif
9393 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);
9394 int main() {
9395
9396 ; return 0; }
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9399   rm -rf conftest*
9400           ac_not_found=no ; break 3
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   ac_not_found=yes
9406 fi
9407 rm -f conftest*
9408       done
9409      done
9410     done
9411    
9412 fi
9413   
9414 fi
9415  
9416 fi
9417  if test "$ac_not_found" = yes; then
9418   ac_cv_func_select_arg1=int 
9419   ac_cv_func_select_arg234='int *' 
9420   ac_cv_func_select_arg5='struct timeval *'
9421  fi
9422  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9423  cat >> confdefs.h <<EOF
9424 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9425 EOF
9426
9427  cat >> confdefs.h <<EOF
9428 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9429 EOF
9430
9431  cat >> confdefs.h <<EOF
9432 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9433 EOF
9434
9435
9436 fi
9437
9438
9439 for ac_hdr in regex.h 
9440 do
9441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9443 echo "configure:9444: checking for $ac_hdr" >&5
9444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9445   echo $ac_n "(cached) $ac_c" 1>&6
9446 else
9447   cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 #include <$ac_hdr>
9451 EOF
9452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9453 { (eval echo configure:9454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9455 if test -z "$ac_err"; then
9456   rm -rf conftest*
9457   eval "ac_cv_header_$ac_safe=yes"
9458 else
9459   echo "$ac_err" >&5
9460   echo "configure: failed program was:" >&5
9461   cat conftest.$ac_ext >&5
9462   rm -rf conftest*
9463   eval "ac_cv_header_$ac_safe=no"
9464 fi
9465 rm -f conftest*
9466 fi
9467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9468   echo "$ac_t""yes" 1>&6
9469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9470   cat >> confdefs.h <<EOF
9471 #define $ac_tr_hdr 1
9472 EOF
9473  
9474 else
9475   echo "$ac_t""no" 1>&6
9476 fi
9477 done
9478
9479 if test "$ac_cv_header_regex_h" != yes ; then
9480         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9481 fi
9482
9483 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9484 echo "configure:9485: checking for library containing regfree" >&5
9485 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9486   echo $ac_n "(cached) $ac_c" 1>&6
9487 else
9488   ac_func_search_save_LIBS="$LIBS"
9489 ac_cv_search_regfree="no"
9490 cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 /* Override any gcc2 internal prototype to avoid an error.  */
9494 /* We use char because int might match the return type of a gcc2
9495     builtin and then its argument prototype would still apply.  */
9496 char regfree();
9497
9498 int main() {
9499 regfree()
9500 ; return 0; }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9503   rm -rf conftest*
9504   ac_cv_search_regfree="none required"
9505 else
9506   echo "configure: failed program was:" >&5
9507   cat conftest.$ac_ext >&5
9508 fi
9509 rm -f conftest*
9510 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9511 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9512 cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 /* Override any gcc2 internal prototype to avoid an error.  */
9516 /* We use char because int might match the return type of a gcc2
9517     builtin and then its argument prototype would still apply.  */
9518 char regfree();
9519
9520 int main() {
9521 regfree()
9522 ; return 0; }
9523 EOF
9524 if { (eval echo configure:9525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9525   rm -rf conftest*
9526   ac_cv_search_regfree="-l$ac_lib"
9527 break
9528 else
9529   echo "configure: failed program was:" >&5
9530   cat conftest.$ac_ext >&5
9531 fi
9532 rm -f conftest*
9533 done
9534 LIBS="$ac_func_search_save_LIBS"
9535 fi
9536
9537 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9538 if test "$ac_cv_search_regfree" != "no"; then
9539   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9540   :
9541 else :
9542   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9543 fi
9544
9545
9546 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9547 echo "configure:9548: checking for compatible POSIX regex" >&5
9548 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   
9552         if test "$cross_compiling" = yes; then
9553   ol_cv_c_posix_regex=cross
9554 else
9555   cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558
9559 #include <sys/types.h>
9560 #include <regex.h>
9561 static char *pattern, *string;
9562 main()
9563 {
9564         int rc;
9565         regex_t re;
9566
9567         pattern = "^A";
9568
9569         if(regcomp(&re, pattern, 0)) {
9570                 return -1;
9571         }
9572         
9573         string = "ALL MATCH";
9574         
9575         rc = regexec(&re, string, 0, (void*)0, 0);
9576
9577         regfree(&re);
9578
9579         return rc;
9580 }
9581 EOF
9582 if { (eval echo configure:9583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9583 then
9584   ol_cv_c_posix_regex=yes
9585 else
9586   echo "configure: failed program was:" >&5
9587   cat conftest.$ac_ext >&5
9588   rm -fr conftest*
9589   ol_cv_c_posix_regex=no
9590 fi
9591 rm -fr conftest*
9592 fi
9593
9594 fi
9595
9596 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9597
9598 if test "$ol_cv_c_posix_regex" = no ; then
9599         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9600 fi
9601
9602
9603 have_uuid=no
9604 for ac_hdr in sys/uuid.h
9605 do
9606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9608 echo "configure:9609: checking for $ac_hdr" >&5
9609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 #include <$ac_hdr>
9616 EOF
9617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9618 { (eval echo configure:9619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9620 if test -z "$ac_err"; then
9621   rm -rf conftest*
9622   eval "ac_cv_header_$ac_safe=yes"
9623 else
9624   echo "$ac_err" >&5
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627   rm -rf conftest*
9628   eval "ac_cv_header_$ac_safe=no"
9629 fi
9630 rm -f conftest*
9631 fi
9632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9633   echo "$ac_t""yes" 1>&6
9634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9635   cat >> confdefs.h <<EOF
9636 #define $ac_tr_hdr 1
9637 EOF
9638  
9639 else
9640   echo "$ac_t""no" 1>&6
9641 fi
9642 done
9643
9644 if test $ac_cv_header_sys_uuid_h = yes ; then
9645         save_LIBS="$LIBS"
9646         
9647 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9648 echo "configure:9649: checking for library containing uuid_to_str" >&5
9649 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9650   echo $ac_n "(cached) $ac_c" 1>&6
9651 else
9652   ac_func_search_save_LIBS="$LIBS"
9653 ac_cv_search_uuid_to_str="no"
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657 /* Override any gcc2 internal prototype to avoid an error.  */
9658 /* We use char because int might match the return type of a gcc2
9659     builtin and then its argument prototype would still apply.  */
9660 char uuid_to_str();
9661
9662 int main() {
9663 uuid_to_str()
9664 ; return 0; }
9665 EOF
9666 if { (eval echo configure:9667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9667   rm -rf conftest*
9668   ac_cv_search_uuid_to_str="none required"
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672 fi
9673 rm -f conftest*
9674 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9675 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9676 cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 /* Override any gcc2 internal prototype to avoid an error.  */
9680 /* We use char because int might match the return type of a gcc2
9681     builtin and then its argument prototype would still apply.  */
9682 char uuid_to_str();
9683
9684 int main() {
9685 uuid_to_str()
9686 ; return 0; }
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9689   rm -rf conftest*
9690   ac_cv_search_uuid_to_str="-l$ac_lib"
9691 break
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695 fi
9696 rm -f conftest*
9697 done
9698 LIBS="$ac_func_search_save_LIBS"
9699 fi
9700
9701 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9702 if test "$ac_cv_search_uuid_to_str" != "no"; then
9703   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9704   have_uuid=yes
9705 else :
9706   :
9707 fi
9708         LIBS="$save_LIBS"
9709
9710         if test have_uuid = yes ; then
9711                 cat >> confdefs.h <<\EOF
9712 #define HAVE_UUID_TO_STR 1
9713 EOF
9714
9715
9716                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9717                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9718         fi
9719 fi
9720
9721 if test $have_uuid = no ; then
9722         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9723 echo "configure:9724: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9724         save_LIBS="$LIBS"
9725         LIBS="$LIBS -lrpcrt4"
9726         cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729
9730                 int __stdcall UuidCreate(void *);
9731                 int __stdcall UuidToStringA(void *,void **);
9732                 
9733 int main() {
9734
9735                 UuidCreate(0);
9736                 UuidToStringA(0,0);
9737                 
9738 ; return 0; }
9739 EOF
9740 if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9741   rm -rf conftest*
9742   need_rpcrt=yes
9743 else
9744   echo "configure: failed program was:" >&5
9745   cat conftest.$ac_ext >&5
9746   rm -rf conftest*
9747   need_rpcrt=no
9748 fi
9749 rm -f conftest*
9750         if test $need_rpcrt = yes; then
9751                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9752         fi
9753         LIBS="$save_LIBS"
9754         echo "$ac_t""$need_rpcrt" 1>&6
9755 fi
9756
9757 ol_link_dnssrv=no
9758 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9759 echo "configure:9760: checking for res_query" >&5
9760 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9761   echo $ac_n "(cached) $ac_c" 1>&6
9762 else
9763   cat > conftest.$ac_ext <<EOF
9764 #line 9765 "configure"
9765 #include "confdefs.h"
9766 /* System header to define __stub macros and hopefully few prototypes,
9767     which can conflict with char res_query(); below.  */
9768 #include <assert.h>
9769 /* Override any gcc2 internal prototype to avoid an error.  */
9770 /* We use char because int might match the return type of a gcc2
9771     builtin and then its argument prototype would still apply.  */
9772 char res_query();
9773 char (*f)();
9774
9775 int main() {
9776
9777 /* The GNU C library defines this for functions which it implements
9778     to always fail with ENOSYS.  Some functions are actually named
9779     something starting with __ and the normal name is an alias.  */
9780 #if defined (__stub_res_query) || defined (__stub___res_query)
9781 choke me
9782 #else
9783 f = res_query;
9784 #endif
9785
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9789   rm -rf conftest*
9790   eval "ac_cv_func_res_query=yes"
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794   rm -rf conftest*
9795   eval "ac_cv_func_res_query=no"
9796 fi
9797 rm -f conftest*
9798 fi
9799
9800 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9801   echo "$ac_t""yes" 1>&6
9802   :
9803 else
9804   echo "$ac_t""no" 1>&6
9805 fi
9806
9807 if test $ac_cv_func_res_query = no ; then 
9808         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9809 echo "configure:9810: checking for __res_query" >&5
9810 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9811   echo $ac_n "(cached) $ac_c" 1>&6
9812 else
9813   cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* System header to define __stub macros and hopefully few prototypes,
9817     which can conflict with char __res_query(); below.  */
9818 #include <assert.h>
9819 /* Override any gcc2 internal prototype to avoid an error.  */
9820 /* We use char because int might match the return type of a gcc2
9821     builtin and then its argument prototype would still apply.  */
9822 char __res_query();
9823 char (*f)();
9824
9825 int main() {
9826
9827 /* The GNU C library defines this for functions which it implements
9828     to always fail with ENOSYS.  Some functions are actually named
9829     something starting with __ and the normal name is an alias.  */
9830 #if defined (__stub___res_query) || defined (__stub_____res_query)
9831 choke me
9832 #else
9833 f = __res_query;
9834 #endif
9835
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   eval "ac_cv_func___res_query=yes"
9841 else
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   eval "ac_cv_func___res_query=no"
9846 fi
9847 rm -f conftest*
9848 fi
9849
9850 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9851   echo "$ac_t""yes" 1>&6
9852   :
9853 else
9854   echo "$ac_t""no" 1>&6
9855 fi
9856
9857         ac_cv_func_res_query=$ac_cv_func___res_query
9858 fi
9859
9860 if test $ac_cv_func_res_query = no ; then 
9861         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9862 echo "configure:9863: checking for res_query in -lbind" >&5
9863 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   ac_save_LIBS="$LIBS"
9868 LIBS="-lbind  $LIBS"
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 /* Override any gcc2 internal prototype to avoid an error.  */
9873 /* We use char because int might match the return type of a gcc2
9874     builtin and then its argument prototype would still apply.  */
9875 char res_query();
9876
9877 int main() {
9878 res_query()
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   eval "ac_cv_lib_$ac_lib_var=yes"
9884 else
9885   echo "configure: failed program was:" >&5
9886   cat conftest.$ac_ext >&5
9887   rm -rf conftest*
9888   eval "ac_cv_lib_$ac_lib_var=no"
9889 fi
9890 rm -f conftest*
9891 LIBS="$ac_save_LIBS"
9892
9893 fi
9894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9895   echo "$ac_t""yes" 1>&6
9896     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9897     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9898   cat >> confdefs.h <<EOF
9899 #define $ac_tr_lib 1
9900 EOF
9901
9902   LIBS="-lbind $LIBS"
9903
9904 else
9905   echo "$ac_t""no" 1>&6
9906 fi
9907
9908         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9909 fi
9910
9911 if test $ac_cv_func_res_query = no ; then 
9912         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9913 echo "configure:9914: checking for __res_query in -lbind" >&5
9914 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9916   echo $ac_n "(cached) $ac_c" 1>&6
9917 else
9918   ac_save_LIBS="$LIBS"
9919 LIBS="-lbind  $LIBS"
9920 cat > conftest.$ac_ext <<EOF
9921 #line 9922 "configure"
9922 #include "confdefs.h"
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char __res_query();
9927
9928 int main() {
9929 __res_query()
9930 ; return 0; }
9931 EOF
9932 if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9933   rm -rf conftest*
9934   eval "ac_cv_lib_$ac_lib_var=yes"
9935 else
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_lib_$ac_lib_var=no"
9940 fi
9941 rm -f conftest*
9942 LIBS="$ac_save_LIBS"
9943
9944 fi
9945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9946   echo "$ac_t""yes" 1>&6
9947     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9948     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9949   cat >> confdefs.h <<EOF
9950 #define $ac_tr_lib 1
9951 EOF
9952
9953   LIBS="-lbind $LIBS"
9954
9955 else
9956   echo "$ac_t""no" 1>&6
9957 fi
9958
9959         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9960 fi
9961
9962 if test $ac_cv_func_res_query = no ; then 
9963         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9964 echo "configure:9965: checking for res_query in -lresolv" >&5
9965 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9967   echo $ac_n "(cached) $ac_c" 1>&6
9968 else
9969   ac_save_LIBS="$LIBS"
9970 LIBS="-lresolv  $LIBS"
9971 cat > conftest.$ac_ext <<EOF
9972 #line 9973 "configure"
9973 #include "confdefs.h"
9974 /* Override any gcc2 internal prototype to avoid an error.  */
9975 /* We use char because int might match the return type of a gcc2
9976     builtin and then its argument prototype would still apply.  */
9977 char res_query();
9978
9979 int main() {
9980 res_query()
9981 ; return 0; }
9982 EOF
9983 if { (eval echo configure:9984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9984   rm -rf conftest*
9985   eval "ac_cv_lib_$ac_lib_var=yes"
9986 else
9987   echo "configure: failed program was:" >&5
9988   cat conftest.$ac_ext >&5
9989   rm -rf conftest*
9990   eval "ac_cv_lib_$ac_lib_var=no"
9991 fi
9992 rm -f conftest*
9993 LIBS="$ac_save_LIBS"
9994
9995 fi
9996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9997   echo "$ac_t""yes" 1>&6
9998     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10000   cat >> confdefs.h <<EOF
10001 #define $ac_tr_lib 1
10002 EOF
10003
10004   LIBS="-lresolv $LIBS"
10005
10006 else
10007   echo "$ac_t""no" 1>&6
10008 fi
10009
10010         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10011 fi
10012
10013 if test $ac_cv_func_res_query = no ; then 
10014         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10015 echo "configure:10016: checking for __res_query in -lresolv" >&5
10016 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   ac_save_LIBS="$LIBS"
10021 LIBS="-lresolv  $LIBS"
10022 cat > conftest.$ac_ext <<EOF
10023 #line 10024 "configure"
10024 #include "confdefs.h"
10025 /* Override any gcc2 internal prototype to avoid an error.  */
10026 /* We use char because int might match the return type of a gcc2
10027     builtin and then its argument prototype would still apply.  */
10028 char __res_query();
10029
10030 int main() {
10031 __res_query()
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   eval "ac_cv_lib_$ac_lib_var=yes"
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   eval "ac_cv_lib_$ac_lib_var=no"
10042 fi
10043 rm -f conftest*
10044 LIBS="$ac_save_LIBS"
10045
10046 fi
10047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10048   echo "$ac_t""yes" 1>&6
10049     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10051   cat >> confdefs.h <<EOF
10052 #define $ac_tr_lib 1
10053 EOF
10054
10055   LIBS="-lresolv $LIBS"
10056
10057 else
10058   echo "$ac_t""no" 1>&6
10059 fi
10060
10061         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10062 fi
10063
10064 if test "$ac_cv_func_res_query" = yes ; then
10065         cat >> confdefs.h <<\EOF
10066 #define HAVE_RES_QUERY 1
10067 EOF
10068
10069
10070         if test $ol_enable_dnssrv != no ; then
10071                 ol_link_dnssrv=yes
10072         fi
10073 fi
10074
10075 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10076         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10077 fi
10078
10079 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10080 do
10081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10082 echo "configure:10083: checking for $ac_func" >&5
10083 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10084   echo $ac_n "(cached) $ac_c" 1>&6
10085 else
10086   cat > conftest.$ac_ext <<EOF
10087 #line 10088 "configure"
10088 #include "confdefs.h"
10089 /* System header to define __stub macros and hopefully few prototypes,
10090     which can conflict with char $ac_func(); below.  */
10091 #include <assert.h>
10092 /* Override any gcc2 internal prototype to avoid an error.  */
10093 /* We use char because int might match the return type of a gcc2
10094     builtin and then its argument prototype would still apply.  */
10095 char $ac_func();
10096 char (*f)();
10097
10098 int main() {
10099
10100 /* The GNU C library defines this for functions which it implements
10101     to always fail with ENOSYS.  Some functions are actually named
10102     something starting with __ and the normal name is an alias.  */
10103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10104 choke me
10105 #else
10106 f = $ac_func;
10107 #endif
10108
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_func_$ac_func=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_func_$ac_func=no"
10119 fi
10120 rm -f conftest*
10121 fi
10122
10123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10124   echo "$ac_t""yes" 1>&6
10125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10126   cat >> confdefs.h <<EOF
10127 #define $ac_tr_func 1
10128 EOF
10129  
10130 else
10131   echo "$ac_t""no" 1>&6
10132 fi
10133 done
10134
10135
10136 ol_link_ipv6=no
10137 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10138         if test $ol_enable_ipv6 = yes ; then
10139                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10140         fi
10141 elif test $ol_enable_ipv6 != no ; then
10142         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10143 echo "configure:10144: checking INET6_ADDRSTRLEN" >&5
10144 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10145   echo $ac_n "(cached) $ac_c" 1>&6
10146 else
10147   
10148                 cat > conftest.$ac_ext <<EOF
10149 #line 10150 "configure"
10150 #include "confdefs.h"
10151
10152 #                       include <netinet/in.h>
10153 #                       ifdef INET6_ADDRSTRLEN
10154                                 __has_inet6_addrstrlen__;
10155 #                       endif
10156                 
10157 EOF
10158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10159   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10160   rm -rf conftest*
10161   ol_cv_inet6_addrstrlen=yes
10162 else
10163   rm -rf conftest*
10164   ol_cv_inet6_addrstrlen=no
10165 fi
10166 rm -f conftest*
10167
10168 fi
10169
10170 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10171
10172
10173         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10174 echo "configure:10175: checking struct sockaddr_storage" >&5
10175 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10176   echo $ac_n "(cached) $ac_c" 1>&6
10177 else
10178   
10179                 cat > conftest.$ac_ext <<EOF
10180 #line 10181 "configure"
10181 #include "confdefs.h"
10182
10183 #include <sys/types.h>
10184 #include <sys/socket.h>
10185
10186 int main() {
10187
10188                         struct sockaddr_storage ss;
10189
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10193   rm -rf conftest*
10194   ol_cv_struct_sockaddr_storage=yes
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   ol_cv_struct_sockaddr_storage=no
10200 fi
10201 rm -f conftest*
10202 fi
10203
10204 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10205
10206         if test $ol_cv_inet6_addrstrlen = yes \
10207                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10208                 ol_link_ipv6=yes
10209         elif test $ol_enable_ipv6 = yes \
10210                         -a $ol_cv_inet6_addrstrlen = no ; then
10211                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10212         elif test $ol_enable_ipv6 = yes \
10213                         -a $ol_cv_struct_sockaddr_storage = no ; then
10214                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10215         fi
10216 fi
10217
10218 if test $ol_enable_local != no ; then
10219         for ac_hdr in sys/un.h 
10220 do
10221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10223 echo "configure:10224: checking for $ac_hdr" >&5
10224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10225   echo $ac_n "(cached) $ac_c" 1>&6
10226 else
10227   cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 #include <$ac_hdr>
10231 EOF
10232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10233 { (eval echo configure:10234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10235 if test -z "$ac_err"; then
10236   rm -rf conftest*
10237   eval "ac_cv_header_$ac_safe=yes"
10238 else
10239   echo "$ac_err" >&5
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -rf conftest*
10243   eval "ac_cv_header_$ac_safe=no"
10244 fi
10245 rm -f conftest*
10246 fi
10247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10248   echo "$ac_t""yes" 1>&6
10249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10250   cat >> confdefs.h <<EOF
10251 #define $ac_tr_hdr 1
10252 EOF
10253  
10254 else
10255   echo "$ac_t""no" 1>&6
10256 fi
10257 done
10258
10259
10260         if test $ol_enable_local = auto ; then
10261                 ol_enable_local=$ac_cv_header_sys_un_h
10262         elif test $ac_cv_header_sys_un_h = no ; then
10263                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10264         fi
10265 fi
10266
10267 ol_link_kbind=no
10268 ol_link_krb5=no
10269 ol_link_krb4=no
10270
10271 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10272         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10273         -o $ol_with_kerberos = k425 ; then
10274
10275         for ac_hdr in krb5.h
10276 do
10277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10279 echo "configure:10280: checking for $ac_hdr" >&5
10280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10281   echo $ac_n "(cached) $ac_c" 1>&6
10282 else
10283   cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286 #include <$ac_hdr>
10287 EOF
10288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10289 { (eval echo configure:10290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10291 if test -z "$ac_err"; then
10292   rm -rf conftest*
10293   eval "ac_cv_header_$ac_safe=yes"
10294 else
10295   echo "$ac_err" >&5
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   eval "ac_cv_header_$ac_safe=no"
10300 fi
10301 rm -f conftest*
10302 fi
10303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10304   echo "$ac_t""yes" 1>&6
10305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10306   cat >> confdefs.h <<EOF
10307 #define $ac_tr_hdr 1
10308 EOF
10309  
10310 else
10311   echo "$ac_t""no" 1>&6
10312 fi
10313 done
10314
10315
10316         if test $ac_cv_header_krb5_h = yes ; then
10317                                 for ac_hdr in heim_err.h
10318 do
10319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10321 echo "configure:10322: checking for $ac_hdr" >&5
10322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10323   echo $ac_n "(cached) $ac_c" 1>&6
10324 else
10325   cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <$ac_hdr>
10329 EOF
10330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10331 { (eval echo configure:10332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10333 if test -z "$ac_err"; then
10334   rm -rf conftest*
10335   eval "ac_cv_header_$ac_safe=yes"
10336 else
10337   echo "$ac_err" >&5
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=no"
10342 fi
10343 rm -f conftest*
10344 fi
10345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10346   echo "$ac_t""yes" 1>&6
10347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10348   cat >> confdefs.h <<EOF
10349 #define $ac_tr_hdr 1
10350 EOF
10351  
10352 else
10353   echo "$ac_t""no" 1>&6
10354 fi
10355 done
10356
10357                 if test $ac_cv_header_heim_err_h = yes ; then
10358                         krb5_impl=heimdal
10359                 else
10360                         krb5_impl=mit
10361                 fi
10362
10363                 if test $krb5_impl = mit; then
10364                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10365 echo "configure:10366: checking for main in -lk5crypto" >&5
10366 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10368   echo $ac_n "(cached) $ac_c" 1>&6
10369 else
10370   ac_save_LIBS="$LIBS"
10371 LIBS="-lk5crypto  $LIBS"
10372 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375
10376 int main() {
10377 main()
10378 ; return 0; }
10379 EOF
10380 if { (eval echo configure:10381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10381   rm -rf conftest*
10382   eval "ac_cv_lib_$ac_lib_var=yes"
10383 else
10384   echo "configure: failed program was:" >&5
10385   cat conftest.$ac_ext >&5
10386   rm -rf conftest*
10387   eval "ac_cv_lib_$ac_lib_var=no"
10388 fi
10389 rm -f conftest*
10390 LIBS="$ac_save_LIBS"
10391
10392 fi
10393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10394   echo "$ac_t""yes" 1>&6
10395   krb5crypto=k5crypto
10396 else
10397   echo "$ac_t""no" 1>&6
10398 krb5crypto=crypto
10399 fi
10400
10401
10402                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10403 echo "configure:10404: checking for main in -lkrb5" >&5
10404 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10405 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10406   echo $ac_n "(cached) $ac_c" 1>&6
10407 else
10408   ac_save_LIBS="$LIBS"
10409 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10410 cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413
10414 int main() {
10415 main()
10416 ; return 0; }
10417 EOF
10418 if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10419   rm -rf conftest*
10420   eval "ac_cv_lib_$ac_lib_var=yes"
10421 else
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   eval "ac_cv_lib_$ac_lib_var=no"
10426 fi
10427 rm -f conftest*
10428 LIBS="$ac_save_LIBS"
10429
10430 fi
10431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10432   echo "$ac_t""yes" 1>&6
10433   have_krb5=yes
10434                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10435 else
10436   echo "$ac_t""no" 1>&6
10437 have_krb5=no
10438 fi
10439
10440
10441                 elif test $krb5_impl = heimdal; then
10442                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10443 echo "configure:10444: checking for main in -ldes" >&5
10444 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10445 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10446   echo $ac_n "(cached) $ac_c" 1>&6
10447 else
10448   ac_save_LIBS="$LIBS"
10449 LIBS="-ldes  $LIBS"
10450 cat > conftest.$ac_ext <<EOF
10451 #line 10452 "configure"
10452 #include "confdefs.h"
10453
10454 int main() {
10455 main()
10456 ; return 0; }
10457 EOF
10458 if { (eval echo configure:10459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10459   rm -rf conftest*
10460   eval "ac_cv_lib_$ac_lib_var=yes"
10461 else
10462   echo "configure: failed program was:" >&5
10463   cat conftest.$ac_ext >&5
10464   rm -rf conftest*
10465   eval "ac_cv_lib_$ac_lib_var=no"
10466 fi
10467 rm -f conftest*
10468 LIBS="$ac_save_LIBS"
10469
10470 fi
10471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10472   echo "$ac_t""yes" 1>&6
10473   krb5crypto=des
10474 else
10475   echo "$ac_t""no" 1>&6
10476 krb5crypto=crypto
10477 fi
10478
10479
10480                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10481 echo "configure:10482: checking for main in -lkrb5" >&5
10482 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10483 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   ac_save_LIBS="$LIBS"
10487 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10488 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491
10492 int main() {
10493 main()
10494 ; return 0; }
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10497   rm -rf conftest*
10498   eval "ac_cv_lib_$ac_lib_var=yes"
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=no"
10504 fi
10505 rm -f conftest*
10506 LIBS="$ac_save_LIBS"
10507
10508 fi
10509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10510   echo "$ac_t""yes" 1>&6
10511   have_krb5=yes
10512                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10513 else
10514   echo "$ac_t""no" 1>&6
10515 have_krb5=no
10516 fi
10517
10518
10519                         cat >> confdefs.h <<\EOF
10520 #define HAVE_HEIMDAL_KERBEROS 1
10521 EOF
10522
10523
10524                 else
10525                         have_krb5=no
10526                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10527                 fi
10528
10529                 if test $have_krb5 = yes ; then
10530                         ol_link_krb5=yes
10531
10532                         cat >> confdefs.h <<\EOF
10533 #define HAVE_KRB5 1
10534 EOF
10535
10536
10537                         if test $ol_with_kerberos = k5only ; then
10538                                 ol_with_kerberos=found
10539                         fi
10540
10541                 elif test $ol_with_kerberos != auto ; then
10542                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10543                 fi
10544
10545         fi
10546 fi
10547
10548 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10549         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10550
10551         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10552 do
10553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10555 echo "configure:10556: checking for $ac_hdr" >&5
10556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   cat > conftest.$ac_ext <<EOF
10560 #line 10561 "configure"
10561 #include "confdefs.h"
10562 #include <$ac_hdr>
10563 EOF
10564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10565 { (eval echo configure:10566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10567 if test -z "$ac_err"; then
10568   rm -rf conftest*
10569   eval "ac_cv_header_$ac_safe=yes"
10570 else
10571   echo "$ac_err" >&5
10572   echo "configure: failed program was:" >&5
10573   cat conftest.$ac_ext >&5
10574   rm -rf conftest*
10575   eval "ac_cv_header_$ac_safe=no"
10576 fi
10577 rm -f conftest*
10578 fi
10579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10580   echo "$ac_t""yes" 1>&6
10581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10582   cat >> confdefs.h <<EOF
10583 #define $ac_tr_hdr 1
10584 EOF
10585  
10586 else
10587   echo "$ac_t""no" 1>&6
10588 fi
10589 done
10590
10591
10592         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10593                 if test $krb5_impl = mit; then
10594                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10595 echo "configure:10596: checking for main in -lkrb4" >&5
10596 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10597 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10598   echo $ac_n "(cached) $ac_c" 1>&6
10599 else
10600   ac_save_LIBS="$LIBS"
10601 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10602 cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605
10606 int main() {
10607 main()
10608 ; return 0; }
10609 EOF
10610 if { (eval echo configure:10611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10611   rm -rf conftest*
10612   eval "ac_cv_lib_$ac_lib_var=yes"
10613 else
10614   echo "configure: failed program was:" >&5
10615   cat conftest.$ac_ext >&5
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=no"
10618 fi
10619 rm -f conftest*
10620 LIBS="$ac_save_LIBS"
10621
10622 fi
10623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10624   echo "$ac_t""yes" 1>&6
10625   have_k425=yes
10626                                 KRB4_LIBS="-lkrb4 -ldes425"
10627 else
10628   echo "$ac_t""no" 1>&6
10629 have_k425=no
10630 fi
10631
10632
10633                 elif test $krb5_impl = heimdal; then
10634                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10635 echo "configure:10636: checking for main in -lkrb4" >&5
10636 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10637 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10638   echo $ac_n "(cached) $ac_c" 1>&6
10639 else
10640   ac_save_LIBS="$LIBS"
10641 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10642 cat > conftest.$ac_ext <<EOF
10643 #line 10644 "configure"
10644 #include "confdefs.h"
10645
10646 int main() {
10647 main()
10648 ; return 0; }
10649 EOF
10650 if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10651   rm -rf conftest*
10652   eval "ac_cv_lib_$ac_lib_var=yes"
10653 else
10654   echo "configure: failed program was:" >&5
10655   cat conftest.$ac_ext >&5
10656   rm -rf conftest*
10657   eval "ac_cv_lib_$ac_lib_var=no"
10658 fi
10659 rm -f conftest*
10660 LIBS="$ac_save_LIBS"
10661
10662 fi
10663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665   have_k425=yes
10666                                 KRB4_LIBS="-lkrb4"
10667 else
10668   echo "$ac_t""no" 1>&6
10669 have_k425=no
10670 fi
10671
10672
10673                 else
10674                         have_425=no
10675                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10676                 fi
10677
10678                 if test $have_k425 = yes ; then
10679                         ol_with_kerberos=found
10680                         ol_link_krb4=yes
10681
10682                         cat >> confdefs.h <<\EOF
10683 #define HAVE_KRB425 1
10684 EOF
10685
10686                         cat >> confdefs.h <<\EOF
10687 #define HAVE_KRB4 1
10688 EOF
10689
10690
10691                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10692 echo "configure:10693: checking for des_debug in Kerberos libraries" >&5
10693 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10694   echo $ac_n "(cached) $ac_c" 1>&6
10695 else
10696   
10697                                                                 save_LIBS="$LIBS"
10698                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10699                                 cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702
10703 #include <kerberosIV/krb.h>
10704 #include <kerberosIV/des.h>
10705 extern int des_debug;
10706
10707 int main() {
10708
10709 des_debug = 1;
10710
10711 ; return 0; }
10712 EOF
10713 if { (eval echo configure:10714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10714   rm -rf conftest*
10715   ol_cv_var_des_debug=yes
10716 else
10717   echo "configure: failed program was:" >&5
10718   cat conftest.$ac_ext >&5
10719   rm -rf conftest*
10720   ol_cv_var_des_debug=no
10721 fi
10722 rm -f conftest*
10723                                                                 LIBS="$save_LIBS"
10724                         
10725 fi
10726
10727 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10728
10729                         if test $ol_cv_var_des_debug = yes ; then
10730                                 cat >> confdefs.h <<\EOF
10731 #define HAVE_DES_DEBUG 1
10732 EOF
10733
10734                         fi
10735
10736                         LIBS="$save_LIBS"
10737                 fi
10738         fi
10739 fi
10740
10741 if test $ol_link_krb5 = yes ; then
10742         ol_with_kerberos=found
10743 fi
10744
10745 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10746         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10747
10748         for ac_hdr in krb.h des.h krb-archaeology.h 
10749 do
10750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10752 echo "configure:10753: checking for $ac_hdr" >&5
10753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10754   echo $ac_n "(cached) $ac_c" 1>&6
10755 else
10756   cat > conftest.$ac_ext <<EOF
10757 #line 10758 "configure"
10758 #include "confdefs.h"
10759 #include <$ac_hdr>
10760 EOF
10761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10762 { (eval echo configure:10763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10764 if test -z "$ac_err"; then
10765   rm -rf conftest*
10766   eval "ac_cv_header_$ac_safe=yes"
10767 else
10768   echo "$ac_err" >&5
10769   echo "configure: failed program was:" >&5
10770   cat conftest.$ac_ext >&5
10771   rm -rf conftest*
10772   eval "ac_cv_header_$ac_safe=no"
10773 fi
10774 rm -f conftest*
10775 fi
10776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10777   echo "$ac_t""yes" 1>&6
10778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10779   cat >> confdefs.h <<EOF
10780 #define $ac_tr_hdr 1
10781 EOF
10782  
10783 else
10784   echo "$ac_t""no" 1>&6
10785 fi
10786 done
10787
10788
10789         if test $ac_cv_header_krb_h = yes ; then
10790                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10791 echo "configure:10792: checking for main in -lkrb" >&5
10792 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10793 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10794   echo $ac_n "(cached) $ac_c" 1>&6
10795 else
10796   ac_save_LIBS="$LIBS"
10797 LIBS="-lkrb -ldes $LIBS"
10798 cat > conftest.$ac_ext <<EOF
10799 #line 10800 "configure"
10800 #include "confdefs.h"
10801
10802 int main() {
10803 main()
10804 ; return 0; }
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10807   rm -rf conftest*
10808   eval "ac_cv_lib_$ac_lib_var=yes"
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=no"
10814 fi
10815 rm -f conftest*
10816 LIBS="$ac_save_LIBS"
10817
10818 fi
10819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10820   echo "$ac_t""yes" 1>&6
10821   have_k4=yes
10822 else
10823   echo "$ac_t""no" 1>&6
10824 have_k4=no
10825 fi
10826
10827
10828                 if test $have_k4 = yes ; then
10829                         ol_with_kerberos=found
10830                         ol_link_krb4=yes
10831
10832                         cat >> confdefs.h <<\EOF
10833 #define HAVE_KRB4 1
10834 EOF
10835
10836
10837                         KRB4_LIBS="-lkrb -ldes"
10838
10839                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10840                                 cat >> confdefs.h <<\EOF
10841 #define HAVE_KTH_KERBEROS 1
10842 EOF
10843
10844                         fi
10845                 fi
10846         fi
10847 fi
10848
10849 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10850         ol_link_kbind=yes
10851
10852 elif test $ol_enable_kbind = yes ; then
10853         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10854 fi
10855
10856 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10857         cat >> confdefs.h <<\EOF
10858 #define HAVE_KERBEROS 1
10859 EOF
10860
10861
10862 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10863         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10864 fi
10865
10866 ol_link_tls=no
10867 if test $ol_with_tls != no ; then
10868         for ac_hdr in openssl/ssl.h ssl.h
10869 do
10870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10872 echo "configure:10873: checking for $ac_hdr" >&5
10873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10874   echo $ac_n "(cached) $ac_c" 1>&6
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 #include <$ac_hdr>
10880 EOF
10881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10882 { (eval echo configure:10883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10884 if test -z "$ac_err"; then
10885   rm -rf conftest*
10886   eval "ac_cv_header_$ac_safe=yes"
10887 else
10888   echo "$ac_err" >&5
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_header_$ac_safe=no"
10893 fi
10894 rm -f conftest*
10895 fi
10896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10897   echo "$ac_t""yes" 1>&6
10898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10899   cat >> confdefs.h <<EOF
10900 #define $ac_tr_hdr 1
10901 EOF
10902  
10903 else
10904   echo "$ac_t""no" 1>&6
10905 fi
10906 done
10907
10908         
10909         if test $ac_cv_header_openssl_ssl_h = yes \
10910                 -o $ac_cv_header_ssl_h = yes ; then
10911                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10912 echo "configure:10913: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10913 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10915   echo $ac_n "(cached) $ac_c" 1>&6
10916 else
10917   ac_save_LIBS="$LIBS"
10918 LIBS="-lssl -lcrypto $LIBS"
10919 cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 /* Override any gcc2 internal prototype to avoid an error.  */
10923 /* We use char because int might match the return type of a gcc2
10924     builtin and then its argument prototype would still apply.  */
10925 char SSLeay_add_ssl_algorithms();
10926
10927 int main() {
10928 SSLeay_add_ssl_algorithms()
10929 ; return 0; }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=yes"
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   eval "ac_cv_lib_$ac_lib_var=no"
10939 fi
10940 rm -f conftest*
10941 LIBS="$ac_save_LIBS"
10942
10943 fi
10944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946   have_ssleay=yes
10947                         need_rsaref=no
10948 else
10949   echo "$ac_t""no" 1>&6
10950 have_ssleay=no
10951 fi
10952
10953                         
10954                 if test $have_ssleay = no ; then
10955                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10956 echo "configure:10957: checking for SSL_library_init in -lssl" >&5
10957 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10959   echo $ac_n "(cached) $ac_c" 1>&6
10960 else
10961   ac_save_LIBS="$LIBS"
10962 LIBS="-lssl -lcrypto $LIBS"
10963 cat > conftest.$ac_ext <<EOF
10964 #line 10965 "configure"
10965 #include "confdefs.h"
10966 /* Override any gcc2 internal prototype to avoid an error.  */
10967 /* We use char because int might match the return type of a gcc2
10968     builtin and then its argument prototype would still apply.  */
10969 char SSL_library_init();
10970
10971 int main() {
10972 SSL_library_init()
10973 ; return 0; }
10974 EOF
10975 if { (eval echo configure:10976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10976   rm -rf conftest*
10977   eval "ac_cv_lib_$ac_lib_var=yes"
10978 else
10979   echo "configure: failed program was:" >&5
10980   cat conftest.$ac_ext >&5
10981   rm -rf conftest*
10982   eval "ac_cv_lib_$ac_lib_var=no"
10983 fi
10984 rm -f conftest*
10985 LIBS="$ac_save_LIBS"
10986
10987 fi
10988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10989   echo "$ac_t""yes" 1>&6
10990   have_ssleay=yes
10991                                 need_rsaref=no
10992 else
10993   echo "$ac_t""no" 1>&6
10994 have_ssleay=no
10995 fi
10996
10997                 fi
10998
10999                 if test $have_ssleay = no ; then
11000                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11001 echo "configure:11002: checking for ssl3_accept in -lssl" >&5
11002 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11004   echo $ac_n "(cached) $ac_c" 1>&6
11005 else
11006   ac_save_LIBS="$LIBS"
11007 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11008 cat > conftest.$ac_ext <<EOF
11009 #line 11010 "configure"
11010 #include "confdefs.h"
11011 /* Override any gcc2 internal prototype to avoid an error.  */
11012 /* We use char because int might match the return type of a gcc2
11013     builtin and then its argument prototype would still apply.  */
11014 char ssl3_accept();
11015
11016 int main() {
11017 ssl3_accept()
11018 ; return 0; }
11019 EOF
11020 if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11021   rm -rf conftest*
11022   eval "ac_cv_lib_$ac_lib_var=yes"
11023 else
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_lib_$ac_lib_var=no"
11028 fi
11029 rm -f conftest*
11030 LIBS="$ac_save_LIBS"
11031
11032 fi
11033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11034   echo "$ac_t""yes" 1>&6
11035   have_ssleay=yes
11036                                 need_rsaref=yes
11037 else
11038   echo "$ac_t""no" 1>&6
11039 have_ssleay=no
11040 fi
11041
11042                 fi
11043
11044                 if test $have_ssleay = yes ; then
11045                         ol_with_tls=found
11046                         ol_link_tls=yes
11047
11048                         cat >> confdefs.h <<\EOF
11049 #define HAVE_SSLEAY 1
11050 EOF
11051
11052
11053                         if test $need_rsaref = yes; then
11054                                 cat >> confdefs.h <<\EOF
11055 #define HAVE_RSAREF 1
11056 EOF
11057
11058
11059                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11060                         else
11061                                 TLS_LIBS="-lssl -lcrypto"
11062                         fi
11063                 fi
11064         fi
11065
11066 else
11067         echo "configure: warning: TLS data protection not supported!" 1>&2
11068 fi
11069
11070 WITH_TLS=no
11071 if test $ol_link_tls = yes ; then
11072         cat >> confdefs.h <<\EOF
11073 #define HAVE_TLS 1
11074 EOF
11075
11076         WITH_TLS=yes
11077
11078 elif test $ol_with_tls = auto ; then
11079         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11080         echo "configure: warning: TLS data protection not supported!" 1>&2
11081
11082 elif test $ol_with_tls != no ; then
11083         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11084 fi
11085
11086 if test $ol_enable_lmpasswd != no; then
11087         if test $ol_link_tls != yes ; then
11088                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11089         fi
11090
11091         cat >> confdefs.h <<\EOF
11092 #define SLAPD_LMHASH 1
11093 EOF
11094
11095 fi
11096
11097 ol_link_threads=no
11098
11099 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11100         -o $ol_with_threads = nt ; then
11101
11102         
11103         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11104 echo "configure:11105: checking for _beginthread" >&5
11105 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111 /* System header to define __stub macros and hopefully few prototypes,
11112     which can conflict with char _beginthread(); below.  */
11113 #include <assert.h>
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char _beginthread();
11118 char (*f)();
11119
11120 int main() {
11121
11122 /* The GNU C library defines this for functions which it implements
11123     to always fail with ENOSYS.  Some functions are actually named
11124     something starting with __ and the normal name is an alias.  */
11125 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11126 choke me
11127 #else
11128 f = _beginthread;
11129 #endif
11130
11131 ; return 0; }
11132 EOF
11133 if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11134   rm -rf conftest*
11135   eval "ac_cv_func__beginthread=yes"
11136 else
11137   echo "configure: failed program was:" >&5
11138   cat conftest.$ac_ext >&5
11139   rm -rf conftest*
11140   eval "ac_cv_func__beginthread=no"
11141 fi
11142 rm -f conftest*
11143 fi
11144
11145 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147   :
11148 else
11149   echo "$ac_t""no" 1>&6
11150 fi
11151
11152
11153         if test $ac_cv_func__beginthread = yes ; then
11154                 cat >> confdefs.h <<\EOF
11155 #define HAVE_NT_THREADS 1
11156 EOF
11157
11158                 ol_cv_nt_threads=yes
11159         fi
11160
11161
11162         if test "$ol_cv_nt_threads" = yes ; then
11163                 ol_link_threads=nt
11164                 ol_with_threads=found
11165                 ol_with_yielding_select=yes
11166
11167                 cat >> confdefs.h <<\EOF
11168 #define HAVE_NT_SERVICE_MANAGER 1
11169 EOF
11170
11171                 cat >> confdefs.h <<\EOF
11172 #define HAVE_NT_EVENT_LOG 1
11173 EOF
11174
11175         fi
11176
11177         if test $ol_with_threads = nt ; then
11178                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11179         fi
11180 fi
11181
11182 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11183         -o $ol_with_threads = posix ; then
11184
11185         for ac_hdr in pthread.h
11186 do
11187 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11188 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11189 echo "configure:11190: checking for $ac_hdr" >&5
11190 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11191   echo $ac_n "(cached) $ac_c" 1>&6
11192 else
11193   cat > conftest.$ac_ext <<EOF
11194 #line 11195 "configure"
11195 #include "confdefs.h"
11196 #include <$ac_hdr>
11197 EOF
11198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11199 { (eval echo configure:11200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11201 if test -z "$ac_err"; then
11202   rm -rf conftest*
11203   eval "ac_cv_header_$ac_safe=yes"
11204 else
11205   echo "$ac_err" >&5
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   eval "ac_cv_header_$ac_safe=no"
11210 fi
11211 rm -f conftest*
11212 fi
11213 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11214   echo "$ac_t""yes" 1>&6
11215     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11216   cat >> confdefs.h <<EOF
11217 #define $ac_tr_hdr 1
11218 EOF
11219  
11220 else
11221   echo "$ac_t""no" 1>&6
11222 fi
11223 done
11224
11225
11226         if test $ac_cv_header_pthread_h = yes ; then
11227                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11228 echo "configure:11229: checking POSIX thread version" >&5
11229 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   
11233         cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236
11237 #               include <pthread.h>
11238         
11239 int main() {
11240
11241                 int i = PTHREAD_CREATE_JOINABLE;
11242         
11243 ; return 0; }
11244 EOF
11245 if { (eval echo configure:11246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11246   rm -rf conftest*
11247   
11248         cat > conftest.$ac_ext <<EOF
11249 #line 11250 "configure"
11250 #include "confdefs.h"
11251 #include <pthread.h>
11252 EOF
11253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11254   egrep "pthread_detach" >/dev/null 2>&1; then
11255   rm -rf conftest*
11256   ol_cv_pthread_version=10
11257 else
11258   rm -rf conftest*
11259   ol_cv_pthread_version=8
11260 fi
11261 rm -f conftest*
11262
11263 else
11264   echo "configure: failed program was:" >&5
11265   cat conftest.$ac_ext >&5
11266   rm -rf conftest*
11267   
11268         cat > conftest.$ac_ext <<EOF
11269 #line 11270 "configure"
11270 #include "confdefs.h"
11271
11272 #               include <pthread.h>
11273 #               ifdef PTHREAD_CREATE_UNDETACHED
11274                 draft7
11275 #               endif
11276         
11277 EOF
11278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11279   egrep "draft7" >/dev/null 2>&1; then
11280   rm -rf conftest*
11281   ol_cv_pthread_version=7
11282 else
11283   rm -rf conftest*
11284   
11285         cat > conftest.$ac_ext <<EOF
11286 #line 11287 "configure"
11287 #include "confdefs.h"
11288 #include <pthread.h>
11289 EOF
11290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11291   egrep "pthread_attr_init" >/dev/null 2>&1; then
11292   rm -rf conftest*
11293   ol_cv_pthread_version=6
11294 else
11295   rm -rf conftest*
11296   
11297         cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300
11301 #               include <pthread.h>
11302 #ifdef          PTHREAD_MUTEX_INITIALIZER
11303                 draft5
11304 #endif
11305         
11306 EOF
11307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11308   egrep "draft5" >/dev/null 2>&1; then
11309   rm -rf conftest*
11310   ol_cv_pthread_version=5
11311 else
11312   rm -rf conftest*
11313   ol_cv_pthread_version=4
11314 fi
11315 rm -f conftest*
11316  
11317 fi
11318 rm -f conftest*
11319  
11320 fi
11321 rm -f conftest*
11322  
11323 fi
11324 rm -f conftest*
11325
11326 fi
11327
11328 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11329
11330
11331                 if test $ol_cv_pthread_version != 0 ; then
11332                         cat >> confdefs.h <<EOF
11333 #define HAVE_PTHREADS $ol_cv_pthread_version
11334 EOF
11335
11336                 else
11337                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11338                 fi
11339
11340                 # consider threads found
11341                 ol_with_threads=found
11342
11343                 
11344         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11345 echo "configure:11346: checking for LinuxThreads pthread.h" >&5
11346 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11347   echo $ac_n "(cached) $ac_c" 1>&6
11348 else
11349   cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352 #include <pthread.h>
11353 EOF
11354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11355   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11356   rm -rf conftest*
11357   ol_cv_header_linux_threads=yes
11358 else
11359   rm -rf conftest*
11360   ol_cv_header_linux_threads=no
11361 fi
11362 rm -f conftest*
11363
11364                 
11365 fi
11366
11367 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11368         if test $ol_cv_header_linux_threads = yes; then
11369                 cat >> confdefs.h <<\EOF
11370 #define HAVE_LINUX_THREADS 1
11371 EOF
11372
11373         fi
11374
11375                 
11376         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11377 echo "configure:11378: checking for GNU Pth pthread.h" >&5
11378 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11379   echo $ac_n "(cached) $ac_c" 1>&6
11380 else
11381   cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 #include <pthread.h>
11385 #ifdef _POSIX_THREAD_IS_GNU_PTH
11386         __gnu_pth__;
11387 #endif
11388
11389 EOF
11390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11391   egrep "__gnu_pth__" >/dev/null 2>&1; then
11392   rm -rf conftest*
11393   ol_cv_header_gnu_pth_pthread_h=yes
11394 else
11395   rm -rf conftest*
11396   ol_cv_header_gnu_pth_pthread_h=no
11397 fi
11398 rm -f conftest*
11399
11400                 
11401 fi
11402
11403 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11404
11405
11406                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11407                         for ac_hdr in sched.h
11408 do
11409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11411 echo "configure:11412: checking for $ac_hdr" >&5
11412 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11413   echo $ac_n "(cached) $ac_c" 1>&6
11414 else
11415   cat > conftest.$ac_ext <<EOF
11416 #line 11417 "configure"
11417 #include "confdefs.h"
11418 #include <$ac_hdr>
11419 EOF
11420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11421 { (eval echo configure:11422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11423 if test -z "$ac_err"; then
11424   rm -rf conftest*
11425   eval "ac_cv_header_$ac_safe=yes"
11426 else
11427   echo "$ac_err" >&5
11428   echo "configure: failed program was:" >&5
11429   cat conftest.$ac_ext >&5
11430   rm -rf conftest*
11431   eval "ac_cv_header_$ac_safe=no"
11432 fi
11433 rm -f conftest*
11434 fi
11435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11436   echo "$ac_t""yes" 1>&6
11437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11438   cat >> confdefs.h <<EOF
11439 #define $ac_tr_hdr 1
11440 EOF
11441  
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445 done
11446
11447                 fi
11448
11449                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11450                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11451 echo "configure:11452: checking for pthread_create in default libraries" >&5
11452 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11453   echo $ac_n "(cached) $ac_c" 1>&6
11454 else
11455   
11456                 if test "$cross_compiling" = yes; then
11457   cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460 /* pthread test headers */
11461 #include <pthread.h>
11462 #if HAVE_PTHREADS < 7
11463 #include <errno.h>
11464 #endif
11465 #ifndef NULL
11466 #define NULL (void*)0
11467 #endif
11468
11469 static void *task(p)
11470         void *p;
11471 {
11472         return (void *) (p == NULL);
11473 }
11474
11475 int main() {
11476
11477         /* pthread test function */
11478 #ifndef PTHREAD_CREATE_DETACHED
11479 #define PTHREAD_CREATE_DETACHED 1
11480 #endif
11481         pthread_t t;
11482         int status;
11483         int detach = PTHREAD_CREATE_DETACHED;
11484
11485 #if HAVE_PTHREADS > 4
11486         /* Final pthreads */
11487         pthread_attr_t attr;
11488
11489         status = pthread_attr_init(&attr);
11490         if( status ) return status;
11491
11492 #if HAVE_PTHREADS < 7
11493         status = pthread_attr_setdetachstate(&attr, &detach);
11494         if( status < 0 ) status = errno;
11495 #else
11496         status = pthread_attr_setdetachstate(&attr, detach);
11497 #endif
11498         if( status ) return status;
11499         status = pthread_create( &t, &attr, task, NULL );
11500 #if HAVE_PTHREADS < 7
11501         if( status < 0 ) status = errno;
11502 #endif
11503         if( status ) return status;
11504 #else
11505         /* Draft 4 pthreads */
11506         status = pthread_create( &t, pthread_attr_default, task, NULL );
11507         if( status ) return errno;
11508
11509         /* give thread a chance to complete */
11510         /* it should remain joinable and hence detachable */
11511         sleep( 1 );
11512
11513         status = pthread_detach( &t );
11514         if( status ) return errno;
11515 #endif
11516
11517 #ifdef HAVE_LINUX_THREADS
11518         pthread_kill_other_threads_np();
11519 #endif
11520
11521         return 0;
11522
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11526   rm -rf conftest*
11527   ol_cv_pthread_create=yes
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   ol_cv_pthread_create=no
11533 fi
11534 rm -f conftest*
11535 else
11536   cat > conftest.$ac_ext <<EOF
11537 #line 11538 "configure"
11538 #include "confdefs.h"
11539 /* pthread test headers */
11540 #include <pthread.h>
11541 #if HAVE_PTHREADS < 7
11542 #include <errno.h>
11543 #endif
11544 #ifndef NULL
11545 #define NULL (void*)0
11546 #endif
11547
11548 static void *task(p)
11549         void *p;
11550 {
11551         return (void *) (p == NULL);
11552 }
11553
11554
11555 int main(argc, argv)
11556         int argc;
11557         char **argv;
11558 {
11559
11560         /* pthread test function */
11561 #ifndef PTHREAD_CREATE_DETACHED
11562 #define PTHREAD_CREATE_DETACHED 1
11563 #endif
11564         pthread_t t;
11565         int status;
11566         int detach = PTHREAD_CREATE_DETACHED;
11567
11568 #if HAVE_PTHREADS > 4
11569         /* Final pthreads */
11570         pthread_attr_t attr;
11571
11572         status = pthread_attr_init(&attr);
11573         if( status ) return status;
11574
11575 #if HAVE_PTHREADS < 7
11576         status = pthread_attr_setdetachstate(&attr, &detach);
11577         if( status < 0 ) status = errno;
11578 #else
11579         status = pthread_attr_setdetachstate(&attr, detach);
11580 #endif
11581         if( status ) return status;
11582         status = pthread_create( &t, &attr, task, NULL );
11583 #if HAVE_PTHREADS < 7
11584         if( status < 0 ) status = errno;
11585 #endif
11586         if( status ) return status;
11587 #else
11588         /* Draft 4 pthreads */
11589         status = pthread_create( &t, pthread_attr_default, task, NULL );
11590         if( status ) return errno;
11591
11592         /* give thread a chance to complete */
11593         /* it should remain joinable and hence detachable */
11594         sleep( 1 );
11595
11596         status = pthread_detach( &t );
11597         if( status ) return errno;
11598 #endif
11599
11600 #ifdef HAVE_LINUX_THREADS
11601         pthread_kill_other_threads_np();
11602 #endif
11603
11604         return 0;
11605
11606 }
11607
11608 EOF
11609 if { (eval echo configure:11610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11610 then
11611   ol_cv_pthread_create=yes
11612 else
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -fr conftest*
11616   ol_cv_pthread_create=no
11617 fi
11618 rm -fr conftest*
11619 fi
11620
11621 fi
11622
11623 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11624
11625                 if test $ol_cv_pthread_create != no ; then
11626                         ol_link_threads=posix
11627                         ol_link_pthreads=""
11628                 fi
11629                 
11630                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11631 if test "$ol_link_threads" = no ; then
11632         # try -kthread
11633         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11634 echo "configure:11635: checking for pthread link with -kthread" >&5
11635 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11636   echo $ac_n "(cached) $ac_c" 1>&6
11637 else
11638   
11639                 # save the flags
11640                 ol_LIBS="$LIBS"
11641                 LIBS="-kthread $LIBS"
11642
11643                 if test "$cross_compiling" = yes; then
11644   cat > conftest.$ac_ext <<EOF
11645 #line 11646 "configure"
11646 #include "confdefs.h"
11647 /* pthread test headers */
11648 #include <pthread.h>
11649 #if HAVE_PTHREADS < 7
11650 #include <errno.h>
11651 #endif
11652 #ifndef NULL
11653 #define NULL (void*)0
11654 #endif
11655
11656 static void *task(p)
11657         void *p;
11658 {
11659         return (void *) (p == NULL);
11660 }
11661
11662 int main() {
11663
11664         /* pthread test function */
11665 #ifndef PTHREAD_CREATE_DETACHED
11666 #define PTHREAD_CREATE_DETACHED 1
11667 #endif
11668         pthread_t t;
11669         int status;
11670         int detach = PTHREAD_CREATE_DETACHED;
11671
11672 #if HAVE_PTHREADS > 4
11673         /* Final pthreads */
11674         pthread_attr_t attr;
11675
11676         status = pthread_attr_init(&attr);
11677         if( status ) return status;
11678
11679 #if HAVE_PTHREADS < 7
11680         status = pthread_attr_setdetachstate(&attr, &detach);
11681         if( status < 0 ) status = errno;
11682 #else
11683         status = pthread_attr_setdetachstate(&attr, detach);
11684 #endif
11685         if( status ) return status;
11686         status = pthread_create( &t, &attr, task, NULL );
11687 #if HAVE_PTHREADS < 7
11688         if( status < 0 ) status = errno;
11689 #endif
11690         if( status ) return status;
11691 #else
11692         /* Draft 4 pthreads */
11693         status = pthread_create( &t, pthread_attr_default, task, NULL );
11694         if( status ) return errno;
11695
11696         /* give thread a chance to complete */
11697         /* it should remain joinable and hence detachable */
11698         sleep( 1 );
11699
11700         status = pthread_detach( &t );
11701         if( status ) return errno;
11702 #endif
11703
11704 #ifdef HAVE_LINUX_THREADS
11705         pthread_kill_other_threads_np();
11706 #endif
11707
11708         return 0;
11709
11710 ; return 0; }
11711 EOF
11712 if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11713   rm -rf conftest*
11714   ol_cv_pthread_kthread=yes
11715 else
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   ol_cv_pthread_kthread=no
11720 fi
11721 rm -f conftest*
11722 else
11723   cat > conftest.$ac_ext <<EOF
11724 #line 11725 "configure"
11725 #include "confdefs.h"
11726 /* pthread test headers */
11727 #include <pthread.h>
11728 #if HAVE_PTHREADS < 7
11729 #include <errno.h>
11730 #endif
11731 #ifndef NULL
11732 #define NULL (void*)0
11733 #endif
11734
11735 static void *task(p)
11736         void *p;
11737 {
11738         return (void *) (p == NULL);
11739 }
11740
11741
11742 int main(argc, argv)
11743         int argc;
11744         char **argv;
11745 {
11746
11747         /* pthread test function */
11748 #ifndef PTHREAD_CREATE_DETACHED
11749 #define PTHREAD_CREATE_DETACHED 1
11750 #endif
11751         pthread_t t;
11752         int status;
11753         int detach = PTHREAD_CREATE_DETACHED;
11754
11755 #if HAVE_PTHREADS > 4
11756         /* Final pthreads */
11757         pthread_attr_t attr;
11758
11759         status = pthread_attr_init(&attr);
11760         if( status ) return status;
11761
11762 #if HAVE_PTHREADS < 7
11763         status = pthread_attr_setdetachstate(&attr, &detach);
11764         if( status < 0 ) status = errno;
11765 #else
11766         status = pthread_attr_setdetachstate(&attr, detach);
11767 #endif
11768         if( status ) return status;
11769         status = pthread_create( &t, &attr, task, NULL );
11770 #if HAVE_PTHREADS < 7
11771         if( status < 0 ) status = errno;
11772 #endif
11773         if( status ) return status;
11774 #else
11775         /* Draft 4 pthreads */
11776         status = pthread_create( &t, pthread_attr_default, task, NULL );
11777         if( status ) return errno;
11778
11779         /* give thread a chance to complete */
11780         /* it should remain joinable and hence detachable */
11781         sleep( 1 );
11782
11783         status = pthread_detach( &t );
11784         if( status ) return errno;
11785 #endif
11786
11787 #ifdef HAVE_LINUX_THREADS
11788         pthread_kill_other_threads_np();
11789 #endif
11790
11791         return 0;
11792
11793 }
11794
11795 EOF
11796 if { (eval echo configure:11797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11797 then
11798   ol_cv_pthread_kthread=yes
11799 else
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -fr conftest*
11803   ol_cv_pthread_kthread=no
11804 fi
11805 rm -fr conftest*
11806 fi
11807
11808
11809                 # restore the LIBS
11810                 LIBS="$ol_LIBS"
11811         
11812 fi
11813
11814 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11815
11816         if test $ol_cv_pthread_kthread = yes ; then
11817                 ol_link_pthreads="-kthread"
11818                 ol_link_threads=posix
11819         fi
11820 fi
11821
11822                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11823 if test "$ol_link_threads" = no ; then
11824         # try -pthread
11825         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11826 echo "configure:11827: checking for pthread link with -pthread" >&5
11827 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11828   echo $ac_n "(cached) $ac_c" 1>&6
11829 else
11830   
11831                 # save the flags
11832                 ol_LIBS="$LIBS"
11833                 LIBS="-pthread $LIBS"
11834
11835                 if test "$cross_compiling" = yes; then
11836   cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839 /* pthread test headers */
11840 #include <pthread.h>
11841 #if HAVE_PTHREADS < 7
11842 #include <errno.h>
11843 #endif
11844 #ifndef NULL
11845 #define NULL (void*)0
11846 #endif
11847
11848 static void *task(p)
11849         void *p;
11850 {
11851         return (void *) (p == NULL);
11852 }
11853
11854 int main() {
11855
11856         /* pthread test function */
11857 #ifndef PTHREAD_CREATE_DETACHED
11858 #define PTHREAD_CREATE_DETACHED 1
11859 #endif
11860         pthread_t t;
11861         int status;
11862         int detach = PTHREAD_CREATE_DETACHED;
11863
11864 #if HAVE_PTHREADS > 4
11865         /* Final pthreads */
11866         pthread_attr_t attr;
11867
11868         status = pthread_attr_init(&attr);
11869         if( status ) return status;
11870
11871 #if HAVE_PTHREADS < 7
11872         status = pthread_attr_setdetachstate(&attr, &detach);
11873         if( status < 0 ) status = errno;
11874 #else
11875         status = pthread_attr_setdetachstate(&attr, detach);
11876 #endif
11877         if( status ) return status;
11878         status = pthread_create( &t, &attr, task, NULL );
11879 #if HAVE_PTHREADS < 7
11880         if( status < 0 ) status = errno;
11881 #endif
11882         if( status ) return status;
11883 #else
11884         /* Draft 4 pthreads */
11885         status = pthread_create( &t, pthread_attr_default, task, NULL );
11886         if( status ) return errno;
11887
11888         /* give thread a chance to complete */
11889         /* it should remain joinable and hence detachable */
11890         sleep( 1 );
11891
11892         status = pthread_detach( &t );
11893         if( status ) return errno;
11894 #endif
11895
11896 #ifdef HAVE_LINUX_THREADS
11897         pthread_kill_other_threads_np();
11898 #endif
11899
11900         return 0;
11901
11902 ; return 0; }
11903 EOF
11904 if { (eval echo configure:11905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11905   rm -rf conftest*
11906   ol_cv_pthread_pthread=yes
11907 else
11908   echo "configure: failed program was:" >&5
11909   cat conftest.$ac_ext >&5
11910   rm -rf conftest*
11911   ol_cv_pthread_pthread=no
11912 fi
11913 rm -f conftest*
11914 else
11915   cat > conftest.$ac_ext <<EOF
11916 #line 11917 "configure"
11917 #include "confdefs.h"
11918 /* pthread test headers */
11919 #include <pthread.h>
11920 #if HAVE_PTHREADS < 7
11921 #include <errno.h>
11922 #endif
11923 #ifndef NULL
11924 #define NULL (void*)0
11925 #endif
11926
11927 static void *task(p)
11928         void *p;
11929 {
11930         return (void *) (p == NULL);
11931 }
11932
11933
11934 int main(argc, argv)
11935         int argc;
11936         char **argv;
11937 {
11938
11939         /* pthread test function */
11940 #ifndef PTHREAD_CREATE_DETACHED
11941 #define PTHREAD_CREATE_DETACHED 1
11942 #endif
11943         pthread_t t;
11944         int status;
11945         int detach = PTHREAD_CREATE_DETACHED;
11946
11947 #if HAVE_PTHREADS > 4
11948         /* Final pthreads */
11949         pthread_attr_t attr;
11950
11951         status = pthread_attr_init(&attr);
11952         if( status ) return status;
11953
11954 #if HAVE_PTHREADS < 7
11955         status = pthread_attr_setdetachstate(&attr, &detach);
11956         if( status < 0 ) status = errno;
11957 #else
11958         status = pthread_attr_setdetachstate(&attr, detach);
11959 #endif
11960         if( status ) return status;
11961         status = pthread_create( &t, &attr, task, NULL );
11962 #if HAVE_PTHREADS < 7
11963         if( status < 0 ) status = errno;
11964 #endif
11965         if( status ) return status;
11966 #else
11967         /* Draft 4 pthreads */
11968         status = pthread_create( &t, pthread_attr_default, task, NULL );
11969         if( status ) return errno;
11970
11971         /* give thread a chance to complete */
11972         /* it should remain joinable and hence detachable */
11973         sleep( 1 );
11974
11975         status = pthread_detach( &t );
11976         if( status ) return errno;
11977 #endif
11978
11979 #ifdef HAVE_LINUX_THREADS
11980         pthread_kill_other_threads_np();
11981 #endif
11982
11983         return 0;
11984
11985 }
11986
11987 EOF
11988 if { (eval echo configure:11989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11989 then
11990   ol_cv_pthread_pthread=yes
11991 else
11992   echo "configure: failed program was:" >&5
11993   cat conftest.$ac_ext >&5
11994   rm -fr conftest*
11995   ol_cv_pthread_pthread=no
11996 fi
11997 rm -fr conftest*
11998 fi
11999
12000
12001                 # restore the LIBS
12002                 LIBS="$ol_LIBS"
12003         
12004 fi
12005
12006 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12007
12008         if test $ol_cv_pthread_pthread = yes ; then
12009                 ol_link_pthreads="-pthread"
12010                 ol_link_threads=posix
12011         fi
12012 fi
12013
12014                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12015 if test "$ol_link_threads" = no ; then
12016         # try -pthreads
12017         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12018 echo "configure:12019: checking for pthread link with -pthreads" >&5
12019 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12020   echo $ac_n "(cached) $ac_c" 1>&6
12021 else
12022   
12023                 # save the flags
12024                 ol_LIBS="$LIBS"
12025                 LIBS="-pthreads $LIBS"
12026
12027                 if test "$cross_compiling" = yes; then
12028   cat > conftest.$ac_ext <<EOF
12029 #line 12030 "configure"
12030 #include "confdefs.h"
12031 /* pthread test headers */
12032 #include <pthread.h>
12033 #if HAVE_PTHREADS < 7
12034 #include <errno.h>
12035 #endif
12036 #ifndef NULL
12037 #define NULL (void*)0
12038 #endif
12039
12040 static void *task(p)
12041         void *p;
12042 {
12043         return (void *) (p == NULL);
12044 }
12045
12046 int main() {
12047
12048         /* pthread test function */
12049 #ifndef PTHREAD_CREATE_DETACHED
12050 #define PTHREAD_CREATE_DETACHED 1
12051 #endif
12052         pthread_t t;
12053         int status;
12054         int detach = PTHREAD_CREATE_DETACHED;
12055
12056 #if HAVE_PTHREADS > 4
12057         /* Final pthreads */
12058         pthread_attr_t attr;
12059
12060         status = pthread_attr_init(&attr);
12061         if( status ) return status;
12062
12063 #if HAVE_PTHREADS < 7
12064         status = pthread_attr_setdetachstate(&attr, &detach);
12065         if( status < 0 ) status = errno;
12066 #else
12067         status = pthread_attr_setdetachstate(&attr, detach);
12068 #endif
12069         if( status ) return status;
12070         status = pthread_create( &t, &attr, task, NULL );
12071 #if HAVE_PTHREADS < 7
12072         if( status < 0 ) status = errno;
12073 #endif
12074         if( status ) return status;
12075 #else
12076         /* Draft 4 pthreads */
12077         status = pthread_create( &t, pthread_attr_default, task, NULL );
12078         if( status ) return errno;
12079
12080         /* give thread a chance to complete */
12081         /* it should remain joinable and hence detachable */
12082         sleep( 1 );
12083
12084         status = pthread_detach( &t );
12085         if( status ) return errno;
12086 #endif
12087
12088 #ifdef HAVE_LINUX_THREADS
12089         pthread_kill_other_threads_np();
12090 #endif
12091
12092         return 0;
12093
12094 ; return 0; }
12095 EOF
12096 if { (eval echo configure:12097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12097   rm -rf conftest*
12098   ol_cv_pthread_pthreads=yes
12099 else
12100   echo "configure: failed program was:" >&5
12101   cat conftest.$ac_ext >&5
12102   rm -rf conftest*
12103   ol_cv_pthread_pthreads=no
12104 fi
12105 rm -f conftest*
12106 else
12107   cat > conftest.$ac_ext <<EOF
12108 #line 12109 "configure"
12109 #include "confdefs.h"
12110 /* pthread test headers */
12111 #include <pthread.h>
12112 #if HAVE_PTHREADS < 7
12113 #include <errno.h>
12114 #endif
12115 #ifndef NULL
12116 #define NULL (void*)0
12117 #endif
12118
12119 static void *task(p)
12120         void *p;
12121 {
12122         return (void *) (p == NULL);
12123 }
12124
12125
12126 int main(argc, argv)
12127         int argc;
12128         char **argv;
12129 {
12130
12131         /* pthread test function */
12132 #ifndef PTHREAD_CREATE_DETACHED
12133 #define PTHREAD_CREATE_DETACHED 1
12134 #endif
12135         pthread_t t;
12136         int status;
12137         int detach = PTHREAD_CREATE_DETACHED;
12138
12139 #if HAVE_PTHREADS > 4
12140         /* Final pthreads */
12141         pthread_attr_t attr;
12142
12143         status = pthread_attr_init(&attr);
12144         if( status ) return status;
12145
12146 #if HAVE_PTHREADS < 7
12147         status = pthread_attr_setdetachstate(&attr, &detach);
12148         if( status < 0 ) status = errno;
12149 #else
12150         status = pthread_attr_setdetachstate(&attr, detach);
12151 #endif
12152         if( status ) return status;
12153         status = pthread_create( &t, &attr, task, NULL );
12154 #if HAVE_PTHREADS < 7
12155         if( status < 0 ) status = errno;
12156 #endif
12157         if( status ) return status;
12158 #else
12159         /* Draft 4 pthreads */
12160         status = pthread_create( &t, pthread_attr_default, task, NULL );
12161         if( status ) return errno;
12162
12163         /* give thread a chance to complete */
12164         /* it should remain joinable and hence detachable */
12165         sleep( 1 );
12166
12167         status = pthread_detach( &t );
12168         if( status ) return errno;
12169 #endif
12170
12171 #ifdef HAVE_LINUX_THREADS
12172         pthread_kill_other_threads_np();
12173 #endif
12174
12175         return 0;
12176
12177 }
12178
12179 EOF
12180 if { (eval echo configure:12181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12181 then
12182   ol_cv_pthread_pthreads=yes
12183 else
12184   echo "configure: failed program was:" >&5
12185   cat conftest.$ac_ext >&5
12186   rm -fr conftest*
12187   ol_cv_pthread_pthreads=no
12188 fi
12189 rm -fr conftest*
12190 fi
12191
12192
12193                 # restore the LIBS
12194                 LIBS="$ol_LIBS"
12195         
12196 fi
12197
12198 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12199
12200         if test $ol_cv_pthread_pthreads = yes ; then
12201                 ol_link_pthreads="-pthreads"
12202                 ol_link_threads=posix
12203         fi
12204 fi
12205
12206                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12207 if test "$ol_link_threads" = no ; then
12208         # try -mthreads
12209         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12210 echo "configure:12211: checking for pthread link with -mthreads" >&5
12211 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12212   echo $ac_n "(cached) $ac_c" 1>&6
12213 else
12214   
12215                 # save the flags
12216                 ol_LIBS="$LIBS"
12217                 LIBS="-mthreads $LIBS"
12218
12219                 if test "$cross_compiling" = yes; then
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* pthread test headers */
12224 #include <pthread.h>
12225 #if HAVE_PTHREADS < 7
12226 #include <errno.h>
12227 #endif
12228 #ifndef NULL
12229 #define NULL (void*)0
12230 #endif
12231
12232 static void *task(p)
12233         void *p;
12234 {
12235         return (void *) (p == NULL);
12236 }
12237
12238 int main() {
12239
12240         /* pthread test function */
12241 #ifndef PTHREAD_CREATE_DETACHED
12242 #define PTHREAD_CREATE_DETACHED 1
12243 #endif
12244         pthread_t t;
12245         int status;
12246         int detach = PTHREAD_CREATE_DETACHED;
12247
12248 #if HAVE_PTHREADS > 4
12249         /* Final pthreads */
12250         pthread_attr_t attr;
12251
12252         status = pthread_attr_init(&attr);
12253         if( status ) return status;
12254
12255 #if HAVE_PTHREADS < 7
12256         status = pthread_attr_setdetachstate(&attr, &detach);
12257         if( status < 0 ) status = errno;
12258 #else
12259         status = pthread_attr_setdetachstate(&attr, detach);
12260 #endif
12261         if( status ) return status;
12262         status = pthread_create( &t, &attr, task, NULL );
12263 #if HAVE_PTHREADS < 7
12264         if( status < 0 ) status = errno;
12265 #endif
12266         if( status ) return status;
12267 #else
12268         /* Draft 4 pthreads */
12269         status = pthread_create( &t, pthread_attr_default, task, NULL );
12270         if( status ) return errno;
12271
12272         /* give thread a chance to complete */
12273         /* it should remain joinable and hence detachable */
12274         sleep( 1 );
12275
12276         status = pthread_detach( &t );
12277         if( status ) return errno;
12278 #endif
12279
12280 #ifdef HAVE_LINUX_THREADS
12281         pthread_kill_other_threads_np();
12282 #endif
12283
12284         return 0;
12285
12286 ; return 0; }
12287 EOF
12288 if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12289   rm -rf conftest*
12290   ol_cv_pthread_mthreads=yes
12291 else
12292   echo "configure: failed program was:" >&5
12293   cat conftest.$ac_ext >&5
12294   rm -rf conftest*
12295   ol_cv_pthread_mthreads=no
12296 fi
12297 rm -f conftest*
12298 else
12299   cat > conftest.$ac_ext <<EOF
12300 #line 12301 "configure"
12301 #include "confdefs.h"
12302 /* pthread test headers */
12303 #include <pthread.h>
12304 #if HAVE_PTHREADS < 7
12305 #include <errno.h>
12306 #endif
12307 #ifndef NULL
12308 #define NULL (void*)0
12309 #endif
12310
12311 static void *task(p)
12312         void *p;
12313 {
12314         return (void *) (p == NULL);
12315 }
12316
12317
12318 int main(argc, argv)
12319         int argc;
12320         char **argv;
12321 {
12322
12323         /* pthread test function */
12324 #ifndef PTHREAD_CREATE_DETACHED
12325 #define PTHREAD_CREATE_DETACHED 1
12326 #endif
12327         pthread_t t;
12328         int status;
12329         int detach = PTHREAD_CREATE_DETACHED;
12330
12331 #if HAVE_PTHREADS > 4
12332         /* Final pthreads */
12333         pthread_attr_t attr;
12334
12335         status = pthread_attr_init(&attr);
12336         if( status ) return status;
12337
12338 #if HAVE_PTHREADS < 7
12339         status = pthread_attr_setdetachstate(&attr, &detach);
12340         if( status < 0 ) status = errno;
12341 #else
12342         status = pthread_attr_setdetachstate(&attr, detach);
12343 #endif
12344         if( status ) return status;
12345         status = pthread_create( &t, &attr, task, NULL );
12346 #if HAVE_PTHREADS < 7
12347         if( status < 0 ) status = errno;
12348 #endif
12349         if( status ) return status;
12350 #else
12351         /* Draft 4 pthreads */
12352         status = pthread_create( &t, pthread_attr_default, task, NULL );
12353         if( status ) return errno;
12354
12355         /* give thread a chance to complete */
12356         /* it should remain joinable and hence detachable */
12357         sleep( 1 );
12358
12359         status = pthread_detach( &t );
12360         if( status ) return errno;
12361 #endif
12362
12363 #ifdef HAVE_LINUX_THREADS
12364         pthread_kill_other_threads_np();
12365 #endif
12366
12367         return 0;
12368
12369 }
12370
12371 EOF
12372 if { (eval echo configure:12373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12373 then
12374   ol_cv_pthread_mthreads=yes
12375 else
12376   echo "configure: failed program was:" >&5
12377   cat conftest.$ac_ext >&5
12378   rm -fr conftest*
12379   ol_cv_pthread_mthreads=no
12380 fi
12381 rm -fr conftest*
12382 fi
12383
12384
12385                 # restore the LIBS
12386                 LIBS="$ol_LIBS"
12387         
12388 fi
12389
12390 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12391
12392         if test $ol_cv_pthread_mthreads = yes ; then
12393                 ol_link_pthreads="-mthreads"
12394                 ol_link_threads=posix
12395         fi
12396 fi
12397
12398                 # Pthread try link: -thread (ol_cv_pthread_thread)
12399 if test "$ol_link_threads" = no ; then
12400         # try -thread
12401         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12402 echo "configure:12403: checking for pthread link with -thread" >&5
12403 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12404   echo $ac_n "(cached) $ac_c" 1>&6
12405 else
12406   
12407                 # save the flags
12408                 ol_LIBS="$LIBS"
12409                 LIBS="-thread $LIBS"
12410
12411                 if test "$cross_compiling" = yes; then
12412   cat > conftest.$ac_ext <<EOF
12413 #line 12414 "configure"
12414 #include "confdefs.h"
12415 /* pthread test headers */
12416 #include <pthread.h>
12417 #if HAVE_PTHREADS < 7
12418 #include <errno.h>
12419 #endif
12420 #ifndef NULL
12421 #define NULL (void*)0
12422 #endif
12423
12424 static void *task(p)
12425         void *p;
12426 {
12427         return (void *) (p == NULL);
12428 }
12429
12430 int main() {
12431
12432         /* pthread test function */
12433 #ifndef PTHREAD_CREATE_DETACHED
12434 #define PTHREAD_CREATE_DETACHED 1
12435 #endif
12436         pthread_t t;
12437         int status;
12438         int detach = PTHREAD_CREATE_DETACHED;
12439
12440 #if HAVE_PTHREADS > 4
12441         /* Final pthreads */
12442         pthread_attr_t attr;
12443
12444         status = pthread_attr_init(&attr);
12445         if( status ) return status;
12446
12447 #if HAVE_PTHREADS < 7
12448         status = pthread_attr_setdetachstate(&attr, &detach);
12449         if( status < 0 ) status = errno;
12450 #else
12451         status = pthread_attr_setdetachstate(&attr, detach);
12452 #endif
12453         if( status ) return status;
12454         status = pthread_create( &t, &attr, task, NULL );
12455 #if HAVE_PTHREADS < 7
12456         if( status < 0 ) status = errno;
12457 #endif
12458         if( status ) return status;
12459 #else
12460         /* Draft 4 pthreads */
12461         status = pthread_create( &t, pthread_attr_default, task, NULL );
12462         if( status ) return errno;
12463
12464         /* give thread a chance to complete */
12465         /* it should remain joinable and hence detachable */
12466         sleep( 1 );
12467
12468         status = pthread_detach( &t );
12469         if( status ) return errno;
12470 #endif
12471
12472 #ifdef HAVE_LINUX_THREADS
12473         pthread_kill_other_threads_np();
12474 #endif
12475
12476         return 0;
12477
12478 ; return 0; }
12479 EOF
12480 if { (eval echo configure:12481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12481   rm -rf conftest*
12482   ol_cv_pthread_thread=yes
12483 else
12484   echo "configure: failed program was:" >&5
12485   cat conftest.$ac_ext >&5
12486   rm -rf conftest*
12487   ol_cv_pthread_thread=no
12488 fi
12489 rm -f conftest*
12490 else
12491   cat > conftest.$ac_ext <<EOF
12492 #line 12493 "configure"
12493 #include "confdefs.h"
12494 /* pthread test headers */
12495 #include <pthread.h>
12496 #if HAVE_PTHREADS < 7
12497 #include <errno.h>
12498 #endif
12499 #ifndef NULL
12500 #define NULL (void*)0
12501 #endif
12502
12503 static void *task(p)
12504         void *p;
12505 {
12506         return (void *) (p == NULL);
12507 }
12508
12509
12510 int main(argc, argv)
12511         int argc;
12512         char **argv;
12513 {
12514
12515         /* pthread test function */
12516 #ifndef PTHREAD_CREATE_DETACHED
12517 #define PTHREAD_CREATE_DETACHED 1
12518 #endif
12519         pthread_t t;
12520         int status;
12521         int detach = PTHREAD_CREATE_DETACHED;
12522
12523 #if HAVE_PTHREADS > 4
12524         /* Final pthreads */
12525         pthread_attr_t attr;
12526
12527         status = pthread_attr_init(&attr);
12528         if( status ) return status;
12529
12530 #if HAVE_PTHREADS < 7
12531         status = pthread_attr_setdetachstate(&attr, &detach);
12532         if( status < 0 ) status = errno;
12533 #else
12534         status = pthread_attr_setdetachstate(&attr, detach);
12535 #endif
12536         if( status ) return status;
12537         status = pthread_create( &t, &attr, task, NULL );
12538 #if HAVE_PTHREADS < 7
12539         if( status < 0 ) status = errno;
12540 #endif
12541         if( status ) return status;
12542 #else
12543         /* Draft 4 pthreads */
12544         status = pthread_create( &t, pthread_attr_default, task, NULL );
12545         if( status ) return errno;
12546
12547         /* give thread a chance to complete */
12548         /* it should remain joinable and hence detachable */
12549         sleep( 1 );
12550
12551         status = pthread_detach( &t );
12552         if( status ) return errno;
12553 #endif
12554
12555 #ifdef HAVE_LINUX_THREADS
12556         pthread_kill_other_threads_np();
12557 #endif
12558
12559         return 0;
12560
12561 }
12562
12563 EOF
12564 if { (eval echo configure:12565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12565 then
12566   ol_cv_pthread_thread=yes
12567 else
12568   echo "configure: failed program was:" >&5
12569   cat conftest.$ac_ext >&5
12570   rm -fr conftest*
12571   ol_cv_pthread_thread=no
12572 fi
12573 rm -fr conftest*
12574 fi
12575
12576
12577                 # restore the LIBS
12578                 LIBS="$ol_LIBS"
12579         
12580 fi
12581
12582 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12583
12584         if test $ol_cv_pthread_thread = yes ; then
12585                 ol_link_pthreads="-thread"
12586                 ol_link_threads=posix
12587         fi
12588 fi
12589
12590
12591                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12592 if test "$ol_link_threads" = no ; then
12593         # try -lpthread -lmach -lexc -lc_r
12594         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12595 echo "configure:12596: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12596 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12597   echo $ac_n "(cached) $ac_c" 1>&6
12598 else
12599   
12600                 # save the flags
12601                 ol_LIBS="$LIBS"
12602                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12603
12604                 if test "$cross_compiling" = yes; then
12605   cat > conftest.$ac_ext <<EOF
12606 #line 12607 "configure"
12607 #include "confdefs.h"
12608 /* pthread test headers */
12609 #include <pthread.h>
12610 #if HAVE_PTHREADS < 7
12611 #include <errno.h>
12612 #endif
12613 #ifndef NULL
12614 #define NULL (void*)0
12615 #endif
12616
12617 static void *task(p)
12618         void *p;
12619 {
12620         return (void *) (p == NULL);
12621 }
12622
12623 int main() {
12624
12625         /* pthread test function */
12626 #ifndef PTHREAD_CREATE_DETACHED
12627 #define PTHREAD_CREATE_DETACHED 1
12628 #endif
12629         pthread_t t;
12630         int status;
12631         int detach = PTHREAD_CREATE_DETACHED;
12632
12633 #if HAVE_PTHREADS > 4
12634         /* Final pthreads */
12635         pthread_attr_t attr;
12636
12637         status = pthread_attr_init(&attr);
12638         if( status ) return status;
12639
12640 #if HAVE_PTHREADS < 7
12641         status = pthread_attr_setdetachstate(&attr, &detach);
12642         if( status < 0 ) status = errno;
12643 #else
12644         status = pthread_attr_setdetachstate(&attr, detach);
12645 #endif
12646         if( status ) return status;
12647         status = pthread_create( &t, &attr, task, NULL );
12648 #if HAVE_PTHREADS < 7
12649         if( status < 0 ) status = errno;
12650 #endif
12651         if( status ) return status;
12652 #else
12653         /* Draft 4 pthreads */
12654         status = pthread_create( &t, pthread_attr_default, task, NULL );
12655         if( status ) return errno;
12656
12657         /* give thread a chance to complete */
12658         /* it should remain joinable and hence detachable */
12659         sleep( 1 );
12660
12661         status = pthread_detach( &t );
12662         if( status ) return errno;
12663 #endif
12664
12665 #ifdef HAVE_LINUX_THREADS
12666         pthread_kill_other_threads_np();
12667 #endif
12668
12669         return 0;
12670
12671 ; return 0; }
12672 EOF
12673 if { (eval echo configure:12674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12674   rm -rf conftest*
12675   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12676 else
12677   echo "configure: failed program was:" >&5
12678   cat conftest.$ac_ext >&5
12679   rm -rf conftest*
12680   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12681 fi
12682 rm -f conftest*
12683 else
12684   cat > conftest.$ac_ext <<EOF
12685 #line 12686 "configure"
12686 #include "confdefs.h"
12687 /* pthread test headers */
12688 #include <pthread.h>
12689 #if HAVE_PTHREADS < 7
12690 #include <errno.h>
12691 #endif
12692 #ifndef NULL
12693 #define NULL (void*)0
12694 #endif
12695
12696 static void *task(p)
12697         void *p;
12698 {
12699         return (void *) (p == NULL);
12700 }
12701
12702
12703 int main(argc, argv)
12704         int argc;
12705         char **argv;
12706 {
12707
12708         /* pthread test function */
12709 #ifndef PTHREAD_CREATE_DETACHED
12710 #define PTHREAD_CREATE_DETACHED 1
12711 #endif
12712         pthread_t t;
12713         int status;
12714         int detach = PTHREAD_CREATE_DETACHED;
12715
12716 #if HAVE_PTHREADS > 4
12717         /* Final pthreads */
12718         pthread_attr_t attr;
12719
12720         status = pthread_attr_init(&attr);
12721         if( status ) return status;
12722
12723 #if HAVE_PTHREADS < 7
12724         status = pthread_attr_setdetachstate(&attr, &detach);
12725         if( status < 0 ) status = errno;
12726 #else
12727         status = pthread_attr_setdetachstate(&attr, detach);
12728 #endif
12729         if( status ) return status;
12730         status = pthread_create( &t, &attr, task, NULL );
12731 #if HAVE_PTHREADS < 7
12732         if( status < 0 ) status = errno;
12733 #endif
12734         if( status ) return status;
12735 #else
12736         /* Draft 4 pthreads */
12737         status = pthread_create( &t, pthread_attr_default, task, NULL );
12738         if( status ) return errno;
12739
12740         /* give thread a chance to complete */
12741         /* it should remain joinable and hence detachable */
12742         sleep( 1 );
12743
12744         status = pthread_detach( &t );
12745         if( status ) return errno;
12746 #endif
12747
12748 #ifdef HAVE_LINUX_THREADS
12749         pthread_kill_other_threads_np();
12750 #endif
12751
12752         return 0;
12753
12754 }
12755
12756 EOF
12757 if { (eval echo configure:12758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12758 then
12759   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12760 else
12761   echo "configure: failed program was:" >&5
12762   cat conftest.$ac_ext >&5
12763   rm -fr conftest*
12764   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12765 fi
12766 rm -fr conftest*
12767 fi
12768
12769
12770                 # restore the LIBS
12771                 LIBS="$ol_LIBS"
12772         
12773 fi
12774
12775 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12776
12777         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12778                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12779                 ol_link_threads=posix
12780         fi
12781 fi
12782
12783                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12784 if test "$ol_link_threads" = no ; then
12785         # try -lpthread -lmach -lexc
12786         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12787 echo "configure:12788: checking for pthread link with -lpthread -lmach -lexc" >&5
12788 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12789   echo $ac_n "(cached) $ac_c" 1>&6
12790 else
12791   
12792                 # save the flags
12793                 ol_LIBS="$LIBS"
12794                 LIBS="-lpthread -lmach -lexc $LIBS"
12795
12796                 if test "$cross_compiling" = yes; then
12797   cat > conftest.$ac_ext <<EOF
12798 #line 12799 "configure"
12799 #include "confdefs.h"
12800 /* pthread test headers */
12801 #include <pthread.h>
12802 #if HAVE_PTHREADS < 7
12803 #include <errno.h>
12804 #endif
12805 #ifndef NULL
12806 #define NULL (void*)0
12807 #endif
12808
12809 static void *task(p)
12810         void *p;
12811 {
12812         return (void *) (p == NULL);
12813 }
12814
12815 int main() {
12816
12817         /* pthread test function */
12818 #ifndef PTHREAD_CREATE_DETACHED
12819 #define PTHREAD_CREATE_DETACHED 1
12820 #endif
12821         pthread_t t;
12822         int status;
12823         int detach = PTHREAD_CREATE_DETACHED;
12824
12825 #if HAVE_PTHREADS > 4
12826         /* Final pthreads */
12827         pthread_attr_t attr;
12828
12829         status = pthread_attr_init(&attr);
12830         if( status ) return status;
12831
12832 #if HAVE_PTHREADS < 7
12833         status = pthread_attr_setdetachstate(&attr, &detach);
12834         if( status < 0 ) status = errno;
12835 #else
12836         status = pthread_attr_setdetachstate(&attr, detach);
12837 #endif
12838         if( status ) return status;
12839         status = pthread_create( &t, &attr, task, NULL );
12840 #if HAVE_PTHREADS < 7
12841         if( status < 0 ) status = errno;
12842 #endif
12843         if( status ) return status;
12844 #else
12845         /* Draft 4 pthreads */
12846         status = pthread_create( &t, pthread_attr_default, task, NULL );
12847         if( status ) return errno;
12848
12849         /* give thread a chance to complete */
12850         /* it should remain joinable and hence detachable */
12851         sleep( 1 );
12852
12853         status = pthread_detach( &t );
12854         if( status ) return errno;
12855 #endif
12856
12857 #ifdef HAVE_LINUX_THREADS
12858         pthread_kill_other_threads_np();
12859 #endif
12860
12861         return 0;
12862
12863 ; return 0; }
12864 EOF
12865 if { (eval echo configure:12866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12866   rm -rf conftest*
12867   ol_cv_pthread_lpthread_lmach_lexc=yes
12868 else
12869   echo "configure: failed program was:" >&5
12870   cat conftest.$ac_ext >&5
12871   rm -rf conftest*
12872   ol_cv_pthread_lpthread_lmach_lexc=no
12873 fi
12874 rm -f conftest*
12875 else
12876   cat > conftest.$ac_ext <<EOF
12877 #line 12878 "configure"
12878 #include "confdefs.h"
12879 /* pthread test headers */
12880 #include <pthread.h>
12881 #if HAVE_PTHREADS < 7
12882 #include <errno.h>
12883 #endif
12884 #ifndef NULL
12885 #define NULL (void*)0
12886 #endif
12887
12888 static void *task(p)
12889         void *p;
12890 {
12891         return (void *) (p == NULL);
12892 }
12893
12894
12895 int main(argc, argv)
12896         int argc;
12897         char **argv;
12898 {
12899
12900         /* pthread test function */
12901 #ifndef PTHREAD_CREATE_DETACHED
12902 #define PTHREAD_CREATE_DETACHED 1
12903 #endif
12904         pthread_t t;
12905         int status;
12906         int detach = PTHREAD_CREATE_DETACHED;
12907
12908 #if HAVE_PTHREADS > 4
12909         /* Final pthreads */
12910         pthread_attr_t attr;
12911
12912         status = pthread_attr_init(&attr);
12913         if( status ) return status;
12914
12915 #if HAVE_PTHREADS < 7
12916         status = pthread_attr_setdetachstate(&attr, &detach);
12917         if( status < 0 ) status = errno;
12918 #else
12919         status = pthread_attr_setdetachstate(&attr, detach);
12920 #endif
12921         if( status ) return status;
12922         status = pthread_create( &t, &attr, task, NULL );
12923 #if HAVE_PTHREADS < 7
12924         if( status < 0 ) status = errno;
12925 #endif
12926         if( status ) return status;
12927 #else
12928         /* Draft 4 pthreads */
12929         status = pthread_create( &t, pthread_attr_default, task, NULL );
12930         if( status ) return errno;
12931
12932         /* give thread a chance to complete */
12933         /* it should remain joinable and hence detachable */
12934         sleep( 1 );
12935
12936         status = pthread_detach( &t );
12937         if( status ) return errno;
12938 #endif
12939
12940 #ifdef HAVE_LINUX_THREADS
12941         pthread_kill_other_threads_np();
12942 #endif
12943
12944         return 0;
12945
12946 }
12947
12948 EOF
12949 if { (eval echo configure:12950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12950 then
12951   ol_cv_pthread_lpthread_lmach_lexc=yes
12952 else
12953   echo "configure: failed program was:" >&5
12954   cat conftest.$ac_ext >&5
12955   rm -fr conftest*
12956   ol_cv_pthread_lpthread_lmach_lexc=no
12957 fi
12958 rm -fr conftest*
12959 fi
12960
12961
12962                 # restore the LIBS
12963                 LIBS="$ol_LIBS"
12964         
12965 fi
12966
12967 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12968
12969         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12970                 ol_link_pthreads="-lpthread -lmach -lexc"
12971                 ol_link_threads=posix
12972         fi
12973 fi
12974
12975
12976                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12977 if test "$ol_link_threads" = no ; then
12978         # try -lpthread -Wl,-woff,85
12979         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12980 echo "configure:12981: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12981 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12982   echo $ac_n "(cached) $ac_c" 1>&6
12983 else
12984   
12985                 # save the flags
12986                 ol_LIBS="$LIBS"
12987                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12988
12989                 if test "$cross_compiling" = yes; then
12990   cat > conftest.$ac_ext <<EOF
12991 #line 12992 "configure"
12992 #include "confdefs.h"
12993 /* pthread test headers */
12994 #include <pthread.h>
12995 #if HAVE_PTHREADS < 7
12996 #include <errno.h>
12997 #endif
12998 #ifndef NULL
12999 #define NULL (void*)0
13000 #endif
13001
13002 static void *task(p)
13003         void *p;
13004 {
13005         return (void *) (p == NULL);
13006 }
13007
13008 int main() {
13009
13010         /* pthread test function */
13011 #ifndef PTHREAD_CREATE_DETACHED
13012 #define PTHREAD_CREATE_DETACHED 1
13013 #endif
13014         pthread_t t;
13015         int status;
13016         int detach = PTHREAD_CREATE_DETACHED;
13017
13018 #if HAVE_PTHREADS > 4
13019         /* Final pthreads */
13020         pthread_attr_t attr;
13021
13022         status = pthread_attr_init(&attr);
13023         if( status ) return status;
13024
13025 #if HAVE_PTHREADS < 7
13026         status = pthread_attr_setdetachstate(&attr, &detach);
13027         if( status < 0 ) status = errno;
13028 #else
13029         status = pthread_attr_setdetachstate(&attr, detach);
13030 #endif
13031         if( status ) return status;
13032         status = pthread_create( &t, &attr, task, NULL );
13033 #if HAVE_PTHREADS < 7
13034         if( status < 0 ) status = errno;
13035 #endif
13036         if( status ) return status;
13037 #else
13038         /* Draft 4 pthreads */
13039         status = pthread_create( &t, pthread_attr_default, task, NULL );
13040         if( status ) return errno;
13041
13042         /* give thread a chance to complete */
13043         /* it should remain joinable and hence detachable */
13044         sleep( 1 );
13045
13046         status = pthread_detach( &t );
13047         if( status ) return errno;
13048 #endif
13049
13050 #ifdef HAVE_LINUX_THREADS
13051         pthread_kill_other_threads_np();
13052 #endif
13053
13054         return 0;
13055
13056 ; return 0; }
13057 EOF
13058 if { (eval echo configure:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13059   rm -rf conftest*
13060   ol_cv_pthread_lib_lpthread_woff=yes
13061 else
13062   echo "configure: failed program was:" >&5
13063   cat conftest.$ac_ext >&5
13064   rm -rf conftest*
13065   ol_cv_pthread_lib_lpthread_woff=no
13066 fi
13067 rm -f conftest*
13068 else
13069   cat > conftest.$ac_ext <<EOF
13070 #line 13071 "configure"
13071 #include "confdefs.h"
13072 /* pthread test headers */
13073 #include <pthread.h>
13074 #if HAVE_PTHREADS < 7
13075 #include <errno.h>
13076 #endif
13077 #ifndef NULL
13078 #define NULL (void*)0
13079 #endif
13080
13081 static void *task(p)
13082         void *p;
13083 {
13084         return (void *) (p == NULL);
13085 }
13086
13087
13088 int main(argc, argv)
13089         int argc;
13090         char **argv;
13091 {
13092
13093         /* pthread test function */
13094 #ifndef PTHREAD_CREATE_DETACHED
13095 #define PTHREAD_CREATE_DETACHED 1
13096 #endif
13097         pthread_t t;
13098         int status;
13099         int detach = PTHREAD_CREATE_DETACHED;
13100
13101 #if HAVE_PTHREADS > 4
13102         /* Final pthreads */
13103         pthread_attr_t attr;
13104
13105         status = pthread_attr_init(&attr);
13106         if( status ) return status;
13107
13108 #if HAVE_PTHREADS < 7
13109         status = pthread_attr_setdetachstate(&attr, &detach);
13110         if( status < 0 ) status = errno;
13111 #else
13112         status = pthread_attr_setdetachstate(&attr, detach);
13113 #endif
13114         if( status ) return status;
13115         status = pthread_create( &t, &attr, task, NULL );
13116 #if HAVE_PTHREADS < 7
13117         if( status < 0 ) status = errno;
13118 #endif
13119         if( status ) return status;
13120 #else
13121         /* Draft 4 pthreads */
13122         status = pthread_create( &t, pthread_attr_default, task, NULL );
13123         if( status ) return errno;
13124
13125         /* give thread a chance to complete */
13126         /* it should remain joinable and hence detachable */
13127         sleep( 1 );
13128
13129         status = pthread_detach( &t );
13130         if( status ) return errno;
13131 #endif
13132
13133 #ifdef HAVE_LINUX_THREADS
13134         pthread_kill_other_threads_np();
13135 #endif
13136
13137         return 0;
13138
13139 }
13140
13141 EOF
13142 if { (eval echo configure:13143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13143 then
13144   ol_cv_pthread_lib_lpthread_woff=yes
13145 else
13146   echo "configure: failed program was:" >&5
13147   cat conftest.$ac_ext >&5
13148   rm -fr conftest*
13149   ol_cv_pthread_lib_lpthread_woff=no
13150 fi
13151 rm -fr conftest*
13152 fi
13153
13154
13155                 # restore the LIBS
13156                 LIBS="$ol_LIBS"
13157         
13158 fi
13159
13160 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13161
13162         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13163                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13164                 ol_link_threads=posix
13165         fi
13166 fi
13167
13168
13169                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13170 if test "$ol_link_threads" = no ; then
13171         # try -lpthread
13172         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13173 echo "configure:13174: checking for pthread link with -lpthread" >&5
13174 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13175   echo $ac_n "(cached) $ac_c" 1>&6
13176 else
13177   
13178                 # save the flags
13179                 ol_LIBS="$LIBS"
13180                 LIBS="-lpthread $LIBS"
13181
13182                 if test "$cross_compiling" = yes; then
13183   cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186 /* pthread test headers */
13187 #include <pthread.h>
13188 #if HAVE_PTHREADS < 7
13189 #include <errno.h>
13190 #endif
13191 #ifndef NULL
13192 #define NULL (void*)0
13193 #endif
13194
13195 static void *task(p)
13196         void *p;
13197 {
13198         return (void *) (p == NULL);
13199 }
13200
13201 int main() {
13202
13203         /* pthread test function */
13204 #ifndef PTHREAD_CREATE_DETACHED
13205 #define PTHREAD_CREATE_DETACHED 1
13206 #endif
13207         pthread_t t;
13208         int status;
13209         int detach = PTHREAD_CREATE_DETACHED;
13210
13211 #if HAVE_PTHREADS > 4
13212         /* Final pthreads */
13213         pthread_attr_t attr;
13214
13215         status = pthread_attr_init(&attr);
13216         if( status ) return status;
13217
13218 #if HAVE_PTHREADS < 7
13219         status = pthread_attr_setdetachstate(&attr, &detach);
13220         if( status < 0 ) status = errno;
13221 #else
13222         status = pthread_attr_setdetachstate(&attr, detach);
13223 #endif
13224         if( status ) return status;
13225         status = pthread_create( &t, &attr, task, NULL );
13226 #if HAVE_PTHREADS < 7
13227         if( status < 0 ) status = errno;
13228 #endif
13229         if( status ) return status;
13230 #else
13231         /* Draft 4 pthreads */
13232         status = pthread_create( &t, pthread_attr_default, task, NULL );
13233         if( status ) return errno;
13234
13235         /* give thread a chance to complete */
13236         /* it should remain joinable and hence detachable */
13237         sleep( 1 );
13238
13239         status = pthread_detach( &t );
13240         if( status ) return errno;
13241 #endif
13242
13243 #ifdef HAVE_LINUX_THREADS
13244         pthread_kill_other_threads_np();
13245 #endif
13246
13247         return 0;
13248
13249 ; return 0; }
13250 EOF
13251 if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13252   rm -rf conftest*
13253   ol_cv_pthread_lpthread=yes
13254 else
13255   echo "configure: failed program was:" >&5
13256   cat conftest.$ac_ext >&5
13257   rm -rf conftest*
13258   ol_cv_pthread_lpthread=no
13259 fi
13260 rm -f conftest*
13261 else
13262   cat > conftest.$ac_ext <<EOF
13263 #line 13264 "configure"
13264 #include "confdefs.h"
13265 /* pthread test headers */
13266 #include <pthread.h>
13267 #if HAVE_PTHREADS < 7
13268 #include <errno.h>
13269 #endif
13270 #ifndef NULL
13271 #define NULL (void*)0
13272 #endif
13273
13274 static void *task(p)
13275         void *p;
13276 {
13277         return (void *) (p == NULL);
13278 }
13279
13280
13281 int main(argc, argv)
13282         int argc;
13283         char **argv;
13284 {
13285
13286         /* pthread test function */
13287 #ifndef PTHREAD_CREATE_DETACHED
13288 #define PTHREAD_CREATE_DETACHED 1
13289 #endif
13290         pthread_t t;
13291         int status;
13292         int detach = PTHREAD_CREATE_DETACHED;
13293
13294 #if HAVE_PTHREADS > 4
13295         /* Final pthreads */
13296         pthread_attr_t attr;
13297
13298         status = pthread_attr_init(&attr);
13299         if( status ) return status;
13300
13301 #if HAVE_PTHREADS < 7
13302         status = pthread_attr_setdetachstate(&attr, &detach);
13303         if( status < 0 ) status = errno;
13304 #else
13305         status = pthread_attr_setdetachstate(&attr, detach);
13306 #endif
13307         if( status ) return status;
13308         status = pthread_create( &t, &attr, task, NULL );
13309 #if HAVE_PTHREADS < 7
13310         if( status < 0 ) status = errno;
13311 #endif
13312         if( status ) return status;
13313 #else
13314         /* Draft 4 pthreads */
13315         status = pthread_create( &t, pthread_attr_default, task, NULL );
13316         if( status ) return errno;
13317
13318         /* give thread a chance to complete */
13319         /* it should remain joinable and hence detachable */
13320         sleep( 1 );
13321
13322         status = pthread_detach( &t );
13323         if( status ) return errno;
13324 #endif
13325
13326 #ifdef HAVE_LINUX_THREADS
13327         pthread_kill_other_threads_np();
13328 #endif
13329
13330         return 0;
13331
13332 }
13333
13334 EOF
13335 if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13336 then
13337   ol_cv_pthread_lpthread=yes
13338 else
13339   echo "configure: failed program was:" >&5
13340   cat conftest.$ac_ext >&5
13341   rm -fr conftest*
13342   ol_cv_pthread_lpthread=no
13343 fi
13344 rm -fr conftest*
13345 fi
13346
13347
13348                 # restore the LIBS
13349                 LIBS="$ol_LIBS"
13350         
13351 fi
13352
13353 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13354
13355         if test $ol_cv_pthread_lpthread = yes ; then
13356                 ol_link_pthreads="-lpthread"
13357                 ol_link_threads=posix
13358         fi
13359 fi
13360
13361                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13362 if test "$ol_link_threads" = no ; then
13363         # try -lc_r
13364         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13365 echo "configure:13366: checking for pthread link with -lc_r" >&5
13366 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13367   echo $ac_n "(cached) $ac_c" 1>&6
13368 else
13369   
13370                 # save the flags
13371                 ol_LIBS="$LIBS"
13372                 LIBS="-lc_r $LIBS"
13373
13374                 if test "$cross_compiling" = yes; then
13375   cat > conftest.$ac_ext <<EOF
13376 #line 13377 "configure"
13377 #include "confdefs.h"
13378 /* pthread test headers */
13379 #include <pthread.h>
13380 #if HAVE_PTHREADS < 7
13381 #include <errno.h>
13382 #endif
13383 #ifndef NULL
13384 #define NULL (void*)0
13385 #endif
13386
13387 static void *task(p)
13388         void *p;
13389 {
13390         return (void *) (p == NULL);
13391 }
13392
13393 int main() {
13394
13395         /* pthread test function */
13396 #ifndef PTHREAD_CREATE_DETACHED
13397 #define PTHREAD_CREATE_DETACHED 1
13398 #endif
13399         pthread_t t;
13400         int status;
13401         int detach = PTHREAD_CREATE_DETACHED;
13402
13403 #if HAVE_PTHREADS > 4
13404         /* Final pthreads */
13405         pthread_attr_t attr;
13406
13407         status = pthread_attr_init(&attr);
13408         if( status ) return status;
13409
13410 #if HAVE_PTHREADS < 7
13411         status = pthread_attr_setdetachstate(&attr, &detach);
13412         if( status < 0 ) status = errno;
13413 #else
13414         status = pthread_attr_setdetachstate(&attr, detach);
13415 #endif
13416         if( status ) return status;
13417         status = pthread_create( &t, &attr, task, NULL );
13418 #if HAVE_PTHREADS < 7
13419         if( status < 0 ) status = errno;
13420 #endif
13421         if( status ) return status;
13422 #else
13423         /* Draft 4 pthreads */
13424         status = pthread_create( &t, pthread_attr_default, task, NULL );
13425         if( status ) return errno;
13426
13427         /* give thread a chance to complete */
13428         /* it should remain joinable and hence detachable */
13429         sleep( 1 );
13430
13431         status = pthread_detach( &t );
13432         if( status ) return errno;
13433 #endif
13434
13435 #ifdef HAVE_LINUX_THREADS
13436         pthread_kill_other_threads_np();
13437 #endif
13438
13439         return 0;
13440
13441 ; return 0; }
13442 EOF
13443 if { (eval echo configure:13444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13444   rm -rf conftest*
13445   ol_cv_pthread_lc_r=yes
13446 else
13447   echo "configure: failed program was:" >&5
13448   cat conftest.$ac_ext >&5
13449   rm -rf conftest*
13450   ol_cv_pthread_lc_r=no
13451 fi
13452 rm -f conftest*
13453 else
13454   cat > conftest.$ac_ext <<EOF
13455 #line 13456 "configure"
13456 #include "confdefs.h"
13457 /* pthread test headers */
13458 #include <pthread.h>
13459 #if HAVE_PTHREADS < 7
13460 #include <errno.h>
13461 #endif
13462 #ifndef NULL
13463 #define NULL (void*)0
13464 #endif
13465
13466 static void *task(p)
13467         void *p;
13468 {
13469         return (void *) (p == NULL);
13470 }
13471
13472
13473 int main(argc, argv)
13474         int argc;
13475         char **argv;
13476 {
13477
13478         /* pthread test function */
13479 #ifndef PTHREAD_CREATE_DETACHED
13480 #define PTHREAD_CREATE_DETACHED 1
13481 #endif
13482         pthread_t t;
13483         int status;
13484         int detach = PTHREAD_CREATE_DETACHED;
13485
13486 #if HAVE_PTHREADS > 4
13487         /* Final pthreads */
13488         pthread_attr_t attr;
13489
13490         status = pthread_attr_init(&attr);
13491         if( status ) return status;
13492
13493 #if HAVE_PTHREADS < 7
13494         status = pthread_attr_setdetachstate(&attr, &detach);
13495         if( status < 0 ) status = errno;
13496 #else
13497         status = pthread_attr_setdetachstate(&attr, detach);
13498 #endif
13499         if( status ) return status;
13500         status = pthread_create( &t, &attr, task, NULL );
13501 #if HAVE_PTHREADS < 7
13502         if( status < 0 ) status = errno;
13503 #endif
13504         if( status ) return status;
13505 #else
13506         /* Draft 4 pthreads */
13507         status = pthread_create( &t, pthread_attr_default, task, NULL );
13508         if( status ) return errno;
13509
13510         /* give thread a chance to complete */
13511         /* it should remain joinable and hence detachable */
13512         sleep( 1 );
13513
13514         status = pthread_detach( &t );
13515         if( status ) return errno;
13516 #endif
13517
13518 #ifdef HAVE_LINUX_THREADS
13519         pthread_kill_other_threads_np();
13520 #endif
13521
13522         return 0;
13523
13524 }
13525
13526 EOF
13527 if { (eval echo configure:13528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13528 then
13529   ol_cv_pthread_lc_r=yes
13530 else
13531   echo "configure: failed program was:" >&5
13532   cat conftest.$ac_ext >&5
13533   rm -fr conftest*
13534   ol_cv_pthread_lc_r=no
13535 fi
13536 rm -fr conftest*
13537 fi
13538
13539
13540                 # restore the LIBS
13541                 LIBS="$ol_LIBS"
13542         
13543 fi
13544
13545 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13546
13547         if test $ol_cv_pthread_lc_r = yes ; then
13548                 ol_link_pthreads="-lc_r"
13549                 ol_link_threads=posix
13550         fi
13551 fi
13552
13553
13554                 # Pthread try link: -threads (ol_cv_pthread_threads)
13555 if test "$ol_link_threads" = no ; then
13556         # try -threads
13557         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13558 echo "configure:13559: checking for pthread link with -threads" >&5
13559 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13560   echo $ac_n "(cached) $ac_c" 1>&6
13561 else
13562   
13563                 # save the flags
13564                 ol_LIBS="$LIBS"
13565                 LIBS="-threads $LIBS"
13566
13567                 if test "$cross_compiling" = yes; then
13568   cat > conftest.$ac_ext <<EOF
13569 #line 13570 "configure"
13570 #include "confdefs.h"
13571 /* pthread test headers */
13572 #include <pthread.h>
13573 #if HAVE_PTHREADS < 7
13574 #include <errno.h>
13575 #endif
13576 #ifndef NULL
13577 #define NULL (void*)0
13578 #endif
13579
13580 static void *task(p)
13581         void *p;
13582 {
13583         return (void *) (p == NULL);
13584 }
13585
13586 int main() {
13587
13588         /* pthread test function */
13589 #ifndef PTHREAD_CREATE_DETACHED
13590 #define PTHREAD_CREATE_DETACHED 1
13591 #endif
13592         pthread_t t;
13593         int status;
13594         int detach = PTHREAD_CREATE_DETACHED;
13595
13596 #if HAVE_PTHREADS > 4
13597         /* Final pthreads */
13598         pthread_attr_t attr;
13599
13600         status = pthread_attr_init(&attr);
13601         if( status ) return status;
13602
13603 #if HAVE_PTHREADS < 7
13604         status = pthread_attr_setdetachstate(&attr, &detach);
13605         if( status < 0 ) status = errno;
13606 #else
13607         status = pthread_attr_setdetachstate(&attr, detach);
13608 #endif
13609         if( status ) return status;
13610         status = pthread_create( &t, &attr, task, NULL );
13611 #if HAVE_PTHREADS < 7
13612         if( status < 0 ) status = errno;
13613 #endif
13614         if( status ) return status;
13615 #else
13616         /* Draft 4 pthreads */
13617         status = pthread_create( &t, pthread_attr_default, task, NULL );
13618         if( status ) return errno;
13619
13620         /* give thread a chance to complete */
13621         /* it should remain joinable and hence detachable */
13622         sleep( 1 );
13623
13624         status = pthread_detach( &t );
13625         if( status ) return errno;
13626 #endif
13627
13628 #ifdef HAVE_LINUX_THREADS
13629         pthread_kill_other_threads_np();
13630 #endif
13631
13632         return 0;
13633
13634 ; return 0; }
13635 EOF
13636 if { (eval echo configure:13637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13637   rm -rf conftest*
13638   ol_cv_pthread_threads=yes
13639 else
13640   echo "configure: failed program was:" >&5
13641   cat conftest.$ac_ext >&5
13642   rm -rf conftest*
13643   ol_cv_pthread_threads=no
13644 fi
13645 rm -f conftest*
13646 else
13647   cat > conftest.$ac_ext <<EOF
13648 #line 13649 "configure"
13649 #include "confdefs.h"
13650 /* pthread test headers */
13651 #include <pthread.h>
13652 #if HAVE_PTHREADS < 7
13653 #include <errno.h>
13654 #endif
13655 #ifndef NULL
13656 #define NULL (void*)0
13657 #endif
13658
13659 static void *task(p)
13660         void *p;
13661 {
13662         return (void *) (p == NULL);
13663 }
13664
13665
13666 int main(argc, argv)
13667         int argc;
13668         char **argv;
13669 {
13670
13671         /* pthread test function */
13672 #ifndef PTHREAD_CREATE_DETACHED
13673 #define PTHREAD_CREATE_DETACHED 1
13674 #endif
13675         pthread_t t;
13676         int status;
13677         int detach = PTHREAD_CREATE_DETACHED;
13678
13679 #if HAVE_PTHREADS > 4
13680         /* Final pthreads */
13681         pthread_attr_t attr;
13682
13683         status = pthread_attr_init(&attr);
13684         if( status ) return status;
13685
13686 #if HAVE_PTHREADS < 7
13687         status = pthread_attr_setdetachstate(&attr, &detach);
13688         if( status < 0 ) status = errno;
13689 #else
13690         status = pthread_attr_setdetachstate(&attr, detach);
13691 #endif
13692         if( status ) return status;
13693         status = pthread_create( &t, &attr, task, NULL );
13694 #if HAVE_PTHREADS < 7
13695         if( status < 0 ) status = errno;
13696 #endif
13697         if( status ) return status;
13698 #else
13699         /* Draft 4 pthreads */
13700         status = pthread_create( &t, pthread_attr_default, task, NULL );
13701         if( status ) return errno;
13702
13703         /* give thread a chance to complete */
13704         /* it should remain joinable and hence detachable */
13705         sleep( 1 );
13706
13707         status = pthread_detach( &t );
13708         if( status ) return errno;
13709 #endif
13710
13711 #ifdef HAVE_LINUX_THREADS
13712         pthread_kill_other_threads_np();
13713 #endif
13714
13715         return 0;
13716
13717 }
13718
13719 EOF
13720 if { (eval echo configure:13721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13721 then
13722   ol_cv_pthread_threads=yes
13723 else
13724   echo "configure: failed program was:" >&5
13725   cat conftest.$ac_ext >&5
13726   rm -fr conftest*
13727   ol_cv_pthread_threads=no
13728 fi
13729 rm -fr conftest*
13730 fi
13731
13732
13733                 # restore the LIBS
13734                 LIBS="$ol_LIBS"
13735         
13736 fi
13737
13738 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13739
13740         if test $ol_cv_pthread_threads = yes ; then
13741                 ol_link_pthreads="-threads"
13742                 ol_link_threads=posix
13743         fi
13744 fi
13745
13746
13747                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13748 if test "$ol_link_threads" = no ; then
13749         # try -lpthreads -lmach -lexc -lc_r
13750         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13751 echo "configure:13752: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13752 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13753   echo $ac_n "(cached) $ac_c" 1>&6
13754 else
13755   
13756                 # save the flags
13757                 ol_LIBS="$LIBS"
13758                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13759
13760                 if test "$cross_compiling" = yes; then
13761   cat > conftest.$ac_ext <<EOF
13762 #line 13763 "configure"
13763 #include "confdefs.h"
13764 /* pthread test headers */
13765 #include <pthread.h>
13766 #if HAVE_PTHREADS < 7
13767 #include <errno.h>
13768 #endif
13769 #ifndef NULL
13770 #define NULL (void*)0
13771 #endif
13772
13773 static void *task(p)
13774         void *p;
13775 {
13776         return (void *) (p == NULL);
13777 }
13778
13779 int main() {
13780
13781         /* pthread test function */
13782 #ifndef PTHREAD_CREATE_DETACHED
13783 #define PTHREAD_CREATE_DETACHED 1
13784 #endif
13785         pthread_t t;
13786         int status;
13787         int detach = PTHREAD_CREATE_DETACHED;
13788
13789 #if HAVE_PTHREADS > 4
13790         /* Final pthreads */
13791         pthread_attr_t attr;
13792
13793         status = pthread_attr_init(&attr);
13794         if( status ) return status;
13795
13796 #if HAVE_PTHREADS < 7
13797         status = pthread_attr_setdetachstate(&attr, &detach);
13798         if( status < 0 ) status = errno;
13799 #else
13800         status = pthread_attr_setdetachstate(&attr, detach);
13801 #endif
13802         if( status ) return status;
13803         status = pthread_create( &t, &attr, task, NULL );
13804 #if HAVE_PTHREADS < 7
13805         if( status < 0 ) status = errno;
13806 #endif
13807         if( status ) return status;
13808 #else
13809         /* Draft 4 pthreads */
13810         status = pthread_create( &t, pthread_attr_default, task, NULL );
13811         if( status ) return errno;
13812
13813         /* give thread a chance to complete */
13814         /* it should remain joinable and hence detachable */
13815         sleep( 1 );
13816
13817         status = pthread_detach( &t );
13818         if( status ) return errno;
13819 #endif
13820
13821 #ifdef HAVE_LINUX_THREADS
13822         pthread_kill_other_threads_np();
13823 #endif
13824
13825         return 0;
13826
13827 ; return 0; }
13828 EOF
13829 if { (eval echo configure:13830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13830   rm -rf conftest*
13831   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13832 else
13833   echo "configure: failed program was:" >&5
13834   cat conftest.$ac_ext >&5
13835   rm -rf conftest*
13836   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13837 fi
13838 rm -f conftest*
13839 else
13840   cat > conftest.$ac_ext <<EOF
13841 #line 13842 "configure"
13842 #include "confdefs.h"
13843 /* pthread test headers */
13844 #include <pthread.h>
13845 #if HAVE_PTHREADS < 7
13846 #include <errno.h>
13847 #endif
13848 #ifndef NULL
13849 #define NULL (void*)0
13850 #endif
13851
13852 static void *task(p)
13853         void *p;
13854 {
13855         return (void *) (p == NULL);
13856 }
13857
13858
13859 int main(argc, argv)
13860         int argc;
13861         char **argv;
13862 {
13863
13864         /* pthread test function */
13865 #ifndef PTHREAD_CREATE_DETACHED
13866 #define PTHREAD_CREATE_DETACHED 1
13867 #endif
13868         pthread_t t;
13869         int status;
13870         int detach = PTHREAD_CREATE_DETACHED;
13871
13872 #if HAVE_PTHREADS > 4
13873         /* Final pthreads */
13874         pthread_attr_t attr;
13875
13876         status = pthread_attr_init(&attr);
13877         if( status ) return status;
13878
13879 #if HAVE_PTHREADS < 7
13880         status = pthread_attr_setdetachstate(&attr, &detach);
13881         if( status < 0 ) status = errno;
13882 #else
13883         status = pthread_attr_setdetachstate(&attr, detach);
13884 #endif
13885         if( status ) return status;
13886         status = pthread_create( &t, &attr, task, NULL );
13887 #if HAVE_PTHREADS < 7
13888         if( status < 0 ) status = errno;
13889 #endif
13890         if( status ) return status;
13891 #else
13892         /* Draft 4 pthreads */
13893         status = pthread_create( &t, pthread_attr_default, task, NULL );
13894         if( status ) return errno;
13895
13896         /* give thread a chance to complete */
13897         /* it should remain joinable and hence detachable */
13898         sleep( 1 );
13899
13900         status = pthread_detach( &t );
13901         if( status ) return errno;
13902 #endif
13903
13904 #ifdef HAVE_LINUX_THREADS
13905         pthread_kill_other_threads_np();
13906 #endif
13907
13908         return 0;
13909
13910 }
13911
13912 EOF
13913 if { (eval echo configure:13914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13914 then
13915   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13916 else
13917   echo "configure: failed program was:" >&5
13918   cat conftest.$ac_ext >&5
13919   rm -fr conftest*
13920   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13921 fi
13922 rm -fr conftest*
13923 fi
13924
13925
13926                 # restore the LIBS
13927                 LIBS="$ol_LIBS"
13928         
13929 fi
13930
13931 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13932
13933         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13934                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13935                 ol_link_threads=posix
13936         fi
13937 fi
13938
13939                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13940 if test "$ol_link_threads" = no ; then
13941         # try -lpthreads -lmach -lexc
13942         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13943 echo "configure:13944: checking for pthread link with -lpthreads -lmach -lexc" >&5
13944 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13945   echo $ac_n "(cached) $ac_c" 1>&6
13946 else
13947   
13948                 # save the flags
13949                 ol_LIBS="$LIBS"
13950                 LIBS="-lpthreads -lmach -lexc $LIBS"
13951
13952                 if test "$cross_compiling" = yes; then
13953   cat > conftest.$ac_ext <<EOF
13954 #line 13955 "configure"
13955 #include "confdefs.h"
13956 /* pthread test headers */
13957 #include <pthread.h>
13958 #if HAVE_PTHREADS < 7
13959 #include <errno.h>
13960 #endif
13961 #ifndef NULL
13962 #define NULL (void*)0
13963 #endif
13964
13965 static void *task(p)
13966         void *p;
13967 {
13968         return (void *) (p == NULL);
13969 }
13970
13971 int main() {
13972
13973         /* pthread test function */
13974 #ifndef PTHREAD_CREATE_DETACHED
13975 #define PTHREAD_CREATE_DETACHED 1
13976 #endif
13977         pthread_t t;
13978         int status;
13979         int detach = PTHREAD_CREATE_DETACHED;
13980
13981 #if HAVE_PTHREADS > 4
13982         /* Final pthreads */
13983         pthread_attr_t attr;
13984
13985         status = pthread_attr_init(&attr);
13986         if( status ) return status;
13987
13988 #if HAVE_PTHREADS < 7
13989         status = pthread_attr_setdetachstate(&attr, &detach);
13990         if( status < 0 ) status = errno;
13991 #else
13992         status = pthread_attr_setdetachstate(&attr, detach);
13993 #endif
13994         if( status ) return status;
13995         status = pthread_create( &t, &attr, task, NULL );
13996 #if HAVE_PTHREADS < 7
13997         if( status < 0 ) status = errno;
13998 #endif
13999         if( status ) return status;
14000 #else
14001         /* Draft 4 pthreads */
14002         status = pthread_create( &t, pthread_attr_default, task, NULL );
14003         if( status ) return errno;
14004
14005         /* give thread a chance to complete */
14006         /* it should remain joinable and hence detachable */
14007         sleep( 1 );
14008
14009         status = pthread_detach( &t );
14010         if( status ) return errno;
14011 #endif
14012
14013 #ifdef HAVE_LINUX_THREADS
14014         pthread_kill_other_threads_np();
14015 #endif
14016
14017         return 0;
14018
14019 ; return 0; }
14020 EOF
14021 if { (eval echo configure:14022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14022   rm -rf conftest*
14023   ol_cv_pthread_lpthreads_lmach_lexc=yes
14024 else
14025   echo "configure: failed program was:" >&5
14026   cat conftest.$ac_ext >&5
14027   rm -rf conftest*
14028   ol_cv_pthread_lpthreads_lmach_lexc=no
14029 fi
14030 rm -f conftest*
14031 else
14032   cat > conftest.$ac_ext <<EOF
14033 #line 14034 "configure"
14034 #include "confdefs.h"
14035 /* pthread test headers */
14036 #include <pthread.h>
14037 #if HAVE_PTHREADS < 7
14038 #include <errno.h>
14039 #endif
14040 #ifndef NULL
14041 #define NULL (void*)0
14042 #endif
14043
14044 static void *task(p)
14045         void *p;
14046 {
14047         return (void *) (p == NULL);
14048 }
14049
14050
14051 int main(argc, argv)
14052         int argc;
14053         char **argv;
14054 {
14055
14056         /* pthread test function */
14057 #ifndef PTHREAD_CREATE_DETACHED
14058 #define PTHREAD_CREATE_DETACHED 1
14059 #endif
14060         pthread_t t;
14061         int status;
14062         int detach = PTHREAD_CREATE_DETACHED;
14063
14064 #if HAVE_PTHREADS > 4
14065         /* Final pthreads */
14066         pthread_attr_t attr;
14067
14068         status = pthread_attr_init(&attr);
14069         if( status ) return status;
14070
14071 #if HAVE_PTHREADS < 7
14072         status = pthread_attr_setdetachstate(&attr, &detach);
14073         if( status < 0 ) status = errno;
14074 #else
14075         status = pthread_attr_setdetachstate(&attr, detach);
14076 #endif
14077         if( status ) return status;
14078         status = pthread_create( &t, &attr, task, NULL );
14079 #if HAVE_PTHREADS < 7
14080         if( status < 0 ) status = errno;
14081 #endif
14082         if( status ) return status;
14083 #else
14084         /* Draft 4 pthreads */
14085         status = pthread_create( &t, pthread_attr_default, task, NULL );
14086         if( status ) return errno;
14087
14088         /* give thread a chance to complete */
14089         /* it should remain joinable and hence detachable */
14090         sleep( 1 );
14091
14092         status = pthread_detach( &t );
14093         if( status ) return errno;
14094 #endif
14095
14096 #ifdef HAVE_LINUX_THREADS
14097         pthread_kill_other_threads_np();
14098 #endif
14099
14100         return 0;
14101
14102 }
14103
14104 EOF
14105 if { (eval echo configure:14106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14106 then
14107   ol_cv_pthread_lpthreads_lmach_lexc=yes
14108 else
14109   echo "configure: failed program was:" >&5
14110   cat conftest.$ac_ext >&5
14111   rm -fr conftest*
14112   ol_cv_pthread_lpthreads_lmach_lexc=no
14113 fi
14114 rm -fr conftest*
14115 fi
14116
14117
14118                 # restore the LIBS
14119                 LIBS="$ol_LIBS"
14120         
14121 fi
14122
14123 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14124
14125         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14126                 ol_link_pthreads="-lpthreads -lmach -lexc"
14127                 ol_link_threads=posix
14128         fi
14129 fi
14130
14131                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14132 if test "$ol_link_threads" = no ; then
14133         # try -lpthreads -lexc
14134         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14135 echo "configure:14136: checking for pthread link with -lpthreads -lexc" >&5
14136 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14137   echo $ac_n "(cached) $ac_c" 1>&6
14138 else
14139   
14140                 # save the flags
14141                 ol_LIBS="$LIBS"
14142                 LIBS="-lpthreads -lexc $LIBS"
14143
14144                 if test "$cross_compiling" = yes; then
14145   cat > conftest.$ac_ext <<EOF
14146 #line 14147 "configure"
14147 #include "confdefs.h"
14148 /* pthread test headers */
14149 #include <pthread.h>
14150 #if HAVE_PTHREADS < 7
14151 #include <errno.h>
14152 #endif
14153 #ifndef NULL
14154 #define NULL (void*)0
14155 #endif
14156
14157 static void *task(p)
14158         void *p;
14159 {
14160         return (void *) (p == NULL);
14161 }
14162
14163 int main() {
14164
14165         /* pthread test function */
14166 #ifndef PTHREAD_CREATE_DETACHED
14167 #define PTHREAD_CREATE_DETACHED 1
14168 #endif
14169         pthread_t t;
14170         int status;
14171         int detach = PTHREAD_CREATE_DETACHED;
14172
14173 #if HAVE_PTHREADS > 4
14174         /* Final pthreads */
14175         pthread_attr_t attr;
14176
14177         status = pthread_attr_init(&attr);
14178         if( status ) return status;
14179
14180 #if HAVE_PTHREADS < 7
14181         status = pthread_attr_setdetachstate(&attr, &detach);
14182         if( status < 0 ) status = errno;
14183 #else
14184         status = pthread_attr_setdetachstate(&attr, detach);
14185 #endif
14186         if( status ) return status;
14187         status = pthread_create( &t, &attr, task, NULL );
14188 #if HAVE_PTHREADS < 7
14189         if( status < 0 ) status = errno;
14190 #endif
14191         if( status ) return status;
14192 #else
14193         /* Draft 4 pthreads */
14194         status = pthread_create( &t, pthread_attr_default, task, NULL );
14195         if( status ) return errno;
14196
14197         /* give thread a chance to complete */
14198         /* it should remain joinable and hence detachable */
14199         sleep( 1 );
14200
14201         status = pthread_detach( &t );
14202         if( status ) return errno;
14203 #endif
14204
14205 #ifdef HAVE_LINUX_THREADS
14206         pthread_kill_other_threads_np();
14207 #endif
14208
14209         return 0;
14210
14211 ; return 0; }
14212 EOF
14213 if { (eval echo configure:14214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14214   rm -rf conftest*
14215   ol_cv_pthread_lpthreads_lexc=yes
14216 else
14217   echo "configure: failed program was:" >&5
14218   cat conftest.$ac_ext >&5
14219   rm -rf conftest*
14220   ol_cv_pthread_lpthreads_lexc=no
14221 fi
14222 rm -f conftest*
14223 else
14224   cat > conftest.$ac_ext <<EOF
14225 #line 14226 "configure"
14226 #include "confdefs.h"
14227 /* pthread test headers */
14228 #include <pthread.h>
14229 #if HAVE_PTHREADS < 7
14230 #include <errno.h>
14231 #endif
14232 #ifndef NULL
14233 #define NULL (void*)0
14234 #endif
14235
14236 static void *task(p)
14237         void *p;
14238 {
14239         return (void *) (p == NULL);
14240 }
14241
14242
14243 int main(argc, argv)
14244         int argc;
14245         char **argv;
14246 {
14247
14248         /* pthread test function */
14249 #ifndef PTHREAD_CREATE_DETACHED
14250 #define PTHREAD_CREATE_DETACHED 1
14251 #endif
14252         pthread_t t;
14253         int status;
14254         int detach = PTHREAD_CREATE_DETACHED;
14255
14256 #if HAVE_PTHREADS > 4
14257         /* Final pthreads */
14258         pthread_attr_t attr;
14259
14260         status = pthread_attr_init(&attr);
14261         if( status ) return status;
14262
14263 #if HAVE_PTHREADS < 7
14264         status = pthread_attr_setdetachstate(&attr, &detach);
14265         if( status < 0 ) status = errno;
14266 #else
14267         status = pthread_attr_setdetachstate(&attr, detach);
14268 #endif
14269         if( status ) return status;
14270         status = pthread_create( &t, &attr, task, NULL );
14271 #if HAVE_PTHREADS < 7
14272         if( status < 0 ) status = errno;
14273 #endif
14274         if( status ) return status;
14275 #else
14276         /* Draft 4 pthreads */
14277         status = pthread_create( &t, pthread_attr_default, task, NULL );
14278         if( status ) return errno;
14279
14280         /* give thread a chance to complete */
14281         /* it should remain joinable and hence detachable */
14282         sleep( 1 );
14283
14284         status = pthread_detach( &t );
14285         if( status ) return errno;
14286 #endif
14287
14288 #ifdef HAVE_LINUX_THREADS
14289         pthread_kill_other_threads_np();
14290 #endif
14291
14292         return 0;
14293
14294 }
14295
14296 EOF
14297 if { (eval echo configure:14298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14298 then
14299   ol_cv_pthread_lpthreads_lexc=yes
14300 else
14301   echo "configure: failed program was:" >&5
14302   cat conftest.$ac_ext >&5
14303   rm -fr conftest*
14304   ol_cv_pthread_lpthreads_lexc=no
14305 fi
14306 rm -fr conftest*
14307 fi
14308
14309
14310                 # restore the LIBS
14311                 LIBS="$ol_LIBS"
14312         
14313 fi
14314
14315 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14316
14317         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14318                 ol_link_pthreads="-lpthreads -lexc"
14319                 ol_link_threads=posix
14320         fi
14321 fi
14322
14323
14324                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14325 if test "$ol_link_threads" = no ; then
14326         # try -lpthreads
14327         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14328 echo "configure:14329: checking for pthread link with -lpthreads" >&5
14329 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14330   echo $ac_n "(cached) $ac_c" 1>&6
14331 else
14332   
14333                 # save the flags
14334                 ol_LIBS="$LIBS"
14335                 LIBS="-lpthreads $LIBS"
14336
14337                 if test "$cross_compiling" = yes; then
14338   cat > conftest.$ac_ext <<EOF
14339 #line 14340 "configure"
14340 #include "confdefs.h"
14341 /* pthread test headers */
14342 #include <pthread.h>
14343 #if HAVE_PTHREADS < 7
14344 #include <errno.h>
14345 #endif
14346 #ifndef NULL
14347 #define NULL (void*)0
14348 #endif
14349
14350 static void *task(p)
14351         void *p;
14352 {
14353         return (void *) (p == NULL);
14354 }
14355
14356 int main() {
14357
14358         /* pthread test function */
14359 #ifndef PTHREAD_CREATE_DETACHED
14360 #define PTHREAD_CREATE_DETACHED 1
14361 #endif
14362         pthread_t t;
14363         int status;
14364         int detach = PTHREAD_CREATE_DETACHED;
14365
14366 #if HAVE_PTHREADS > 4
14367         /* Final pthreads */
14368         pthread_attr_t attr;
14369
14370         status = pthread_attr_init(&attr);
14371         if( status ) return status;
14372
14373 #if HAVE_PTHREADS < 7
14374         status = pthread_attr_setdetachstate(&attr, &detach);
14375         if( status < 0 ) status = errno;
14376 #else
14377         status = pthread_attr_setdetachstate(&attr, detach);
14378 #endif
14379         if( status ) return status;
14380         status = pthread_create( &t, &attr, task, NULL );
14381 #if HAVE_PTHREADS < 7
14382         if( status < 0 ) status = errno;
14383 #endif
14384         if( status ) return status;
14385 #else
14386         /* Draft 4 pthreads */
14387         status = pthread_create( &t, pthread_attr_default, task, NULL );
14388         if( status ) return errno;
14389
14390         /* give thread a chance to complete */
14391         /* it should remain joinable and hence detachable */
14392         sleep( 1 );
14393
14394         status = pthread_detach( &t );
14395         if( status ) return errno;
14396 #endif
14397
14398 #ifdef HAVE_LINUX_THREADS
14399         pthread_kill_other_threads_np();
14400 #endif
14401
14402         return 0;
14403
14404 ; return 0; }
14405 EOF
14406 if { (eval echo configure:14407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14407   rm -rf conftest*
14408   ol_cv_pthread_lib_lpthreads=yes
14409 else
14410   echo "configure: failed program was:" >&5
14411   cat conftest.$ac_ext >&5
14412   rm -rf conftest*
14413   ol_cv_pthread_lib_lpthreads=no
14414 fi
14415 rm -f conftest*
14416 else
14417   cat > conftest.$ac_ext <<EOF
14418 #line 14419 "configure"
14419 #include "confdefs.h"
14420 /* pthread test headers */
14421 #include <pthread.h>
14422 #if HAVE_PTHREADS < 7
14423 #include <errno.h>
14424 #endif
14425 #ifndef NULL
14426 #define NULL (void*)0
14427 #endif
14428
14429 static void *task(p)
14430         void *p;
14431 {
14432         return (void *) (p == NULL);
14433 }
14434
14435
14436 int main(argc, argv)
14437         int argc;
14438         char **argv;
14439 {
14440
14441         /* pthread test function */
14442 #ifndef PTHREAD_CREATE_DETACHED
14443 #define PTHREAD_CREATE_DETACHED 1
14444 #endif
14445         pthread_t t;
14446         int status;
14447         int detach = PTHREAD_CREATE_DETACHED;
14448
14449 #if HAVE_PTHREADS > 4
14450         /* Final pthreads */
14451         pthread_attr_t attr;
14452
14453         status = pthread_attr_init(&attr);
14454         if( status ) return status;
14455
14456 #if HAVE_PTHREADS < 7
14457         status = pthread_attr_setdetachstate(&attr, &detach);
14458         if( status < 0 ) status = errno;
14459 #else
14460         status = pthread_attr_setdetachstate(&attr, detach);
14461 #endif
14462         if( status ) return status;
14463         status = pthread_create( &t, &attr, task, NULL );
14464 #if HAVE_PTHREADS < 7
14465         if( status < 0 ) status = errno;
14466 #endif
14467         if( status ) return status;
14468 #else
14469         /* Draft 4 pthreads */
14470         status = pthread_create( &t, pthread_attr_default, task, NULL );
14471         if( status ) return errno;
14472
14473         /* give thread a chance to complete */
14474         /* it should remain joinable and hence detachable */
14475         sleep( 1 );
14476
14477         status = pthread_detach( &t );
14478         if( status ) return errno;
14479 #endif
14480
14481 #ifdef HAVE_LINUX_THREADS
14482         pthread_kill_other_threads_np();
14483 #endif
14484
14485         return 0;
14486
14487 }
14488
14489 EOF
14490 if { (eval echo configure:14491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14491 then
14492   ol_cv_pthread_lib_lpthreads=yes
14493 else
14494   echo "configure: failed program was:" >&5
14495   cat conftest.$ac_ext >&5
14496   rm -fr conftest*
14497   ol_cv_pthread_lib_lpthreads=no
14498 fi
14499 rm -fr conftest*
14500 fi
14501
14502
14503                 # restore the LIBS
14504                 LIBS="$ol_LIBS"
14505         
14506 fi
14507
14508 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14509
14510         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14511                 ol_link_pthreads="-lpthreads"
14512                 ol_link_threads=posix
14513         fi
14514 fi
14515
14516
14517                 if test $ol_link_threads != no ; then
14518                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14519
14520                                                 save_CPPFLAGS="$CPPFLAGS"
14521                         save_LIBS="$LIBS"
14522                         LIBS="$LTHREAD_LIBS $LIBS"
14523
14524                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14525 do
14526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14527 echo "configure:14528: checking for $ac_func" >&5
14528 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14529   echo $ac_n "(cached) $ac_c" 1>&6
14530 else
14531   cat > conftest.$ac_ext <<EOF
14532 #line 14533 "configure"
14533 #include "confdefs.h"
14534 /* System header to define __stub macros and hopefully few prototypes,
14535     which can conflict with char $ac_func(); below.  */
14536 #include <assert.h>
14537 /* Override any gcc2 internal prototype to avoid an error.  */
14538 /* We use char because int might match the return type of a gcc2
14539     builtin and then its argument prototype would still apply.  */
14540 char $ac_func();
14541 char (*f)();
14542
14543 int main() {
14544
14545 /* The GNU C library defines this for functions which it implements
14546     to always fail with ENOSYS.  Some functions are actually named
14547     something starting with __ and the normal name is an alias.  */
14548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14549 choke me
14550 #else
14551 f = $ac_func;
14552 #endif
14553
14554 ; return 0; }
14555 EOF
14556 if { (eval echo configure:14557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14557   rm -rf conftest*
14558   eval "ac_cv_func_$ac_func=yes"
14559 else
14560   echo "configure: failed program was:" >&5
14561   cat conftest.$ac_ext >&5
14562   rm -rf conftest*
14563   eval "ac_cv_func_$ac_func=no"
14564 fi
14565 rm -f conftest*
14566 fi
14567
14568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14569   echo "$ac_t""yes" 1>&6
14570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14571   cat >> confdefs.h <<EOF
14572 #define $ac_tr_func 1
14573 EOF
14574  
14575 else
14576   echo "$ac_t""no" 1>&6
14577 fi
14578 done
14579
14580
14581                         if test $ac_cv_func_sched_yield = no -a \
14582                                 $ac_cv_func_pthread_yield = no -a \
14583                                 $ac_cv_func_thr_yield = no ; then
14584                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14585 echo "configure:14586: checking for sched_yield in -lrt" >&5
14586 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14588   echo $ac_n "(cached) $ac_c" 1>&6
14589 else
14590   ac_save_LIBS="$LIBS"
14591 LIBS="-lrt  $LIBS"
14592 cat > conftest.$ac_ext <<EOF
14593 #line 14594 "configure"
14594 #include "confdefs.h"
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 /* We use char because int might match the return type of a gcc2
14597     builtin and then its argument prototype would still apply.  */
14598 char sched_yield();
14599
14600 int main() {
14601 sched_yield()
14602 ; return 0; }
14603 EOF
14604 if { (eval echo configure:14605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14605   rm -rf conftest*
14606   eval "ac_cv_lib_$ac_lib_var=yes"
14607 else
14608   echo "configure: failed program was:" >&5
14609   cat conftest.$ac_ext >&5
14610   rm -rf conftest*
14611   eval "ac_cv_lib_$ac_lib_var=no"
14612 fi
14613 rm -f conftest*
14614 LIBS="$ac_save_LIBS"
14615
14616 fi
14617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14618   echo "$ac_t""yes" 1>&6
14619   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14620                                         cat >> confdefs.h <<\EOF
14621 #define HAVE_SCHED_YIELD 1
14622 EOF
14623
14624                                         ac_cv_func_sched_yield=yes
14625 else
14626   echo "$ac_t""no" 1>&6
14627 ac_cv_func_sched_yield=no
14628 fi
14629
14630                         fi
14631                         if test $ac_cv_func_sched_yield = no -a \
14632                                 $ac_cv_func_pthread_yield = no -a \
14633                                 "$ac_cv_func_thr_yield" = no ; then
14634                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14635                         fi
14636
14637                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14638 do
14639 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14640 echo "configure:14641: checking for $ac_func" >&5
14641 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14642   echo $ac_n "(cached) $ac_c" 1>&6
14643 else
14644   cat > conftest.$ac_ext <<EOF
14645 #line 14646 "configure"
14646 #include "confdefs.h"
14647 /* System header to define __stub macros and hopefully few prototypes,
14648     which can conflict with char $ac_func(); below.  */
14649 #include <assert.h>
14650 /* Override any gcc2 internal prototype to avoid an error.  */
14651 /* We use char because int might match the return type of a gcc2
14652     builtin and then its argument prototype would still apply.  */
14653 char $ac_func();
14654 char (*f)();
14655
14656 int main() {
14657
14658 /* The GNU C library defines this for functions which it implements
14659     to always fail with ENOSYS.  Some functions are actually named
14660     something starting with __ and the normal name is an alias.  */
14661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14662 choke me
14663 #else
14664 f = $ac_func;
14665 #endif
14666
14667 ; return 0; }
14668 EOF
14669 if { (eval echo configure:14670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14670   rm -rf conftest*
14671   eval "ac_cv_func_$ac_func=yes"
14672 else
14673   echo "configure: failed program was:" >&5
14674   cat conftest.$ac_ext >&5
14675   rm -rf conftest*
14676   eval "ac_cv_func_$ac_func=no"
14677 fi
14678 rm -f conftest*
14679 fi
14680
14681 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14682   echo "$ac_t""yes" 1>&6
14683     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14684   cat >> confdefs.h <<EOF
14685 #define $ac_tr_func 1
14686 EOF
14687  
14688 else
14689   echo "$ac_t""no" 1>&6
14690 fi
14691 done
14692
14693
14694                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14695 echo "configure:14696: checking for pthread_detach with <pthread.h>" >&5
14696 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14697   echo $ac_n "(cached) $ac_c" 1>&6
14698 else
14699   
14700                                                                 cat > conftest.$ac_ext <<EOF
14701 #line 14702 "configure"
14702 #include "confdefs.h"
14703
14704 #include <pthread.h>
14705 #ifndef NULL
14706 #define NULL (void*)0
14707 #endif
14708
14709 int main() {
14710 pthread_detach(NULL);
14711 ; return 0; }
14712 EOF
14713 if { (eval echo configure:14714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14714   rm -rf conftest*
14715   ol_cv_func_pthread_detach=yes
14716 else
14717   echo "configure: failed program was:" >&5
14718   cat conftest.$ac_ext >&5
14719   rm -rf conftest*
14720   ol_cv_func_pthread_detach=no
14721 fi
14722 rm -f conftest*
14723                         
14724 fi
14725
14726 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14727
14728                         if test $ol_cv_func_pthread_detach = no ; then
14729                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14730                         fi
14731
14732                         cat >> confdefs.h <<\EOF
14733 #define HAVE_PTHREAD_DETACH 1
14734 EOF
14735
14736
14737                                                 for ac_func in \
14738                                 pthread_setconcurrency \
14739                                 pthread_getconcurrency \
14740                                 thr_setconcurrency \
14741                                 thr_getconcurrency \
14742                         
14743 do
14744 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14745 echo "configure:14746: checking for $ac_func" >&5
14746 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14747   echo $ac_n "(cached) $ac_c" 1>&6
14748 else
14749   cat > conftest.$ac_ext <<EOF
14750 #line 14751 "configure"
14751 #include "confdefs.h"
14752 /* System header to define __stub macros and hopefully few prototypes,
14753     which can conflict with char $ac_func(); below.  */
14754 #include <assert.h>
14755 /* Override any gcc2 internal prototype to avoid an error.  */
14756 /* We use char because int might match the return type of a gcc2
14757     builtin and then its argument prototype would still apply.  */
14758 char $ac_func();
14759 char (*f)();
14760
14761 int main() {
14762
14763 /* The GNU C library defines this for functions which it implements
14764     to always fail with ENOSYS.  Some functions are actually named
14765     something starting with __ and the normal name is an alias.  */
14766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14767 choke me
14768 #else
14769 f = $ac_func;
14770 #endif
14771
14772 ; return 0; }
14773 EOF
14774 if { (eval echo configure:14775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14775   rm -rf conftest*
14776   eval "ac_cv_func_$ac_func=yes"
14777 else
14778   echo "configure: failed program was:" >&5
14779   cat conftest.$ac_ext >&5
14780   rm -rf conftest*
14781   eval "ac_cv_func_$ac_func=no"
14782 fi
14783 rm -f conftest*
14784 fi
14785
14786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14787   echo "$ac_t""yes" 1>&6
14788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14789   cat >> confdefs.h <<EOF
14790 #define $ac_tr_func 1
14791 EOF
14792  
14793 else
14794   echo "$ac_t""no" 1>&6
14795 fi
14796 done
14797
14798
14799                         
14800         for ac_func in pthread_kill_other_threads_np
14801 do
14802 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14803 echo "configure:14804: checking for $ac_func" >&5
14804 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14805   echo $ac_n "(cached) $ac_c" 1>&6
14806 else
14807   cat > conftest.$ac_ext <<EOF
14808 #line 14809 "configure"
14809 #include "confdefs.h"
14810 /* System header to define __stub macros and hopefully few prototypes,
14811     which can conflict with char $ac_func(); below.  */
14812 #include <assert.h>
14813 /* Override any gcc2 internal prototype to avoid an error.  */
14814 /* We use char because int might match the return type of a gcc2
14815     builtin and then its argument prototype would still apply.  */
14816 char $ac_func();
14817 char (*f)();
14818
14819 int main() {
14820
14821 /* The GNU C library defines this for functions which it implements
14822     to always fail with ENOSYS.  Some functions are actually named
14823     something starting with __ and the normal name is an alias.  */
14824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14825 choke me
14826 #else
14827 f = $ac_func;
14828 #endif
14829
14830 ; return 0; }
14831 EOF
14832 if { (eval echo configure:14833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14833   rm -rf conftest*
14834   eval "ac_cv_func_$ac_func=yes"
14835 else
14836   echo "configure: failed program was:" >&5
14837   cat conftest.$ac_ext >&5
14838   rm -rf conftest*
14839   eval "ac_cv_func_$ac_func=no"
14840 fi
14841 rm -f conftest*
14842 fi
14843
14844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14845   echo "$ac_t""yes" 1>&6
14846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14847   cat >> confdefs.h <<EOF
14848 #define $ac_tr_func 1
14849 EOF
14850  
14851 else
14852   echo "$ac_t""no" 1>&6
14853 fi
14854 done
14855
14856         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14857 echo "configure:14858: checking for LinuxThreads implementation" >&5
14858 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14859   echo $ac_n "(cached) $ac_c" 1>&6
14860 else
14861   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14862 fi
14863
14864 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14865
14866                         
14867         
14868         
14869         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14870 echo "configure:14871: checking for LinuxThreads consistency" >&5
14871 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14872   echo $ac_n "(cached) $ac_c" 1>&6
14873 else
14874   
14875                 if test $ol_cv_header_linux_threads = yes -a \
14876                         $ol_cv_sys_linux_threads = yes; then
14877                         ol_cv_linux_threads=yes
14878                 elif test $ol_cv_header_linux_threads = no -a \
14879                         $ol_cv_sys_linux_threads = no; then
14880                         ol_cv_linux_threads=no
14881                 else
14882                         ol_cv_linux_threads=error
14883                 fi
14884         
14885 fi
14886
14887 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14888
14889
14890                         if test $ol_cv_linux_threads = error; then
14891                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14892                         fi
14893
14894                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14895 echo "configure:14896: checking if pthread_create() works" >&5
14896 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14897   echo $ac_n "(cached) $ac_c" 1>&6
14898 else
14899   
14900                         if test "$cross_compiling" = yes; then
14901                                 ol_cv_pthread_create_works=yes
14902 else
14903   cat > conftest.$ac_ext <<EOF
14904 #line 14905 "configure"
14905 #include "confdefs.h"
14906 /* pthread test headers */
14907 #include <pthread.h>
14908 #if HAVE_PTHREADS < 7
14909 #include <errno.h>
14910 #endif
14911 #ifndef NULL
14912 #define NULL (void*)0
14913 #endif
14914
14915 static void *task(p)
14916         void *p;
14917 {
14918         return (void *) (p == NULL);
14919 }
14920
14921
14922 int main(argc, argv)
14923         int argc;
14924         char **argv;
14925 {
14926
14927         /* pthread test function */
14928 #ifndef PTHREAD_CREATE_DETACHED
14929 #define PTHREAD_CREATE_DETACHED 1
14930 #endif
14931         pthread_t t;
14932         int status;
14933         int detach = PTHREAD_CREATE_DETACHED;
14934
14935 #if HAVE_PTHREADS > 4
14936         /* Final pthreads */
14937         pthread_attr_t attr;
14938
14939         status = pthread_attr_init(&attr);
14940         if( status ) return status;
14941
14942 #if HAVE_PTHREADS < 7
14943         status = pthread_attr_setdetachstate(&attr, &detach);
14944         if( status < 0 ) status = errno;
14945 #else
14946         status = pthread_attr_setdetachstate(&attr, detach);
14947 #endif
14948         if( status ) return status;
14949         status = pthread_create( &t, &attr, task, NULL );
14950 #if HAVE_PTHREADS < 7
14951         if( status < 0 ) status = errno;
14952 #endif
14953         if( status ) return status;
14954 #else
14955         /* Draft 4 pthreads */
14956         status = pthread_create( &t, pthread_attr_default, task, NULL );
14957         if( status ) return errno;
14958
14959         /* give thread a chance to complete */
14960         /* it should remain joinable and hence detachable */
14961         sleep( 1 );
14962
14963         status = pthread_detach( &t );
14964         if( status ) return errno;
14965 #endif
14966
14967 #ifdef HAVE_LINUX_THREADS
14968         pthread_kill_other_threads_np();
14969 #endif
14970
14971         return 0;
14972
14973 }
14974
14975 EOF
14976 if { (eval echo configure:14977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14977 then
14978   ol_cv_pthread_create_works=yes
14979 else
14980   echo "configure: failed program was:" >&5
14981   cat conftest.$ac_ext >&5
14982   rm -fr conftest*
14983   ol_cv_pthread_create_works=no
14984 fi
14985 rm -fr conftest*
14986 fi
14987
14988 fi
14989
14990 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14991
14992                         if test $ol_cv_pthread_create_works = no ; then
14993                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14994                         fi
14995
14996                                                 if test $ol_with_yielding_select = auto ; then
14997                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14998 echo "configure:14999: checking if select yields when using pthreads" >&5
14999 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15000   echo $ac_n "(cached) $ac_c" 1>&6
15001 else
15002   
15003                                 if test "$cross_compiling" = yes; then
15004   ol_cv_pthread_select_yields=cross
15005 else
15006   cat > conftest.$ac_ext <<EOF
15007 #line 15008 "configure"
15008 #include "confdefs.h"
15009
15010 #include <sys/types.h>
15011 #include <sys/time.h>
15012 #include <unistd.h>
15013 #include <pthread.h>
15014 #ifndef NULL
15015 #define NULL (void*) 0
15016 #endif
15017
15018 static int fildes[2];
15019
15020 static void *task(p)
15021         void *p;
15022 {
15023         int i;
15024         struct timeval tv;
15025
15026         fd_set rfds;
15027
15028         tv.tv_sec=10;
15029         tv.tv_usec=0;
15030
15031         FD_ZERO(&rfds);
15032         FD_SET(fildes[0], &rfds);
15033
15034         /* we're not interested in any fds */
15035         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15036
15037         if(i < 0) {
15038                 perror("select");
15039                 exit(10);
15040         }
15041
15042         exit(0); /* if we exit here, the select blocked the whole process */
15043 }
15044
15045 int main(argc, argv)
15046         int argc;
15047         char **argv;
15048 {
15049         pthread_t t;
15050
15051         /* create a pipe to select */
15052         if(pipe(&fildes[0])) {
15053                 perror("select");
15054                 exit(1);
15055         }
15056
15057 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15058         (void) pthread_setconcurrency(2);
15059 #else
15060 #ifdef HAVE_THR_SETCONCURRENCY
15061         /* Set Solaris LWP concurrency to 2 */
15062         thr_setconcurrency(2);
15063 #endif
15064 #endif
15065
15066 #if HAVE_PTHREADS < 6
15067         pthread_create(&t, pthread_attr_default, task, NULL);
15068 #else
15069         pthread_create(&t, NULL, task, NULL);
15070 #endif
15071
15072         /* make sure task runs first */
15073 #if HAVE_THR_YIELD
15074         thr_yield();
15075 #elif defined( HAVE_SCHED_YIELD )
15076         sched_yield();
15077 #elif defined( HAVE_PTHREAD_YIELD )
15078         pthread_yield();
15079 #endif
15080
15081         exit(2);
15082 }
15083 EOF
15084 if { (eval echo configure:15085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15085 then
15086   ol_cv_pthread_select_yields=no
15087 else
15088   echo "configure: failed program was:" >&5
15089   cat conftest.$ac_ext >&5
15090   rm -fr conftest*
15091   ol_cv_pthread_select_yields=yes
15092 fi
15093 rm -fr conftest*
15094 fi
15095
15096 fi
15097
15098 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15099
15100                                 if test $ol_cv_pthread_select_yields = cross ; then
15101                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15102                                 fi
15103
15104                                 if test $ol_cv_pthread_select_yields = yes ; then
15105                                         ol_with_yielding_select=yes
15106                                 fi
15107                         fi
15108
15109                                                 CPPFLAGS="$save_CPPFLAGS"
15110                         LIBS="$save_LIBS"
15111                 else
15112                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15113                 fi
15114         fi
15115
15116         if test $ol_with_threads = posix ; then
15117                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15118         fi
15119 fi
15120
15121 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15122         -o $ol_with_threads = mach ; then
15123
15124                 for ac_hdr in mach/cthreads.h cthreads.h
15125 do
15126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15128 echo "configure:15129: checking for $ac_hdr" >&5
15129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15130   echo $ac_n "(cached) $ac_c" 1>&6
15131 else
15132   cat > conftest.$ac_ext <<EOF
15133 #line 15134 "configure"
15134 #include "confdefs.h"
15135 #include <$ac_hdr>
15136 EOF
15137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15138 { (eval echo configure:15139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15140 if test -z "$ac_err"; then
15141   rm -rf conftest*
15142   eval "ac_cv_header_$ac_safe=yes"
15143 else
15144   echo "$ac_err" >&5
15145   echo "configure: failed program was:" >&5
15146   cat conftest.$ac_ext >&5
15147   rm -rf conftest*
15148   eval "ac_cv_header_$ac_safe=no"
15149 fi
15150 rm -f conftest*
15151 fi
15152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15153   echo "$ac_t""yes" 1>&6
15154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15155   cat >> confdefs.h <<EOF
15156 #define $ac_tr_hdr 1
15157 EOF
15158  
15159 else
15160   echo "$ac_t""no" 1>&6
15161 fi
15162 done
15163
15164         if test $ac_cv_header_mach_cthreads_h = yes ; then
15165                 ol_with_threads=found
15166
15167                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15168 echo "configure:15169: checking for cthread_fork" >&5
15169 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15170   echo $ac_n "(cached) $ac_c" 1>&6
15171 else
15172   cat > conftest.$ac_ext <<EOF
15173 #line 15174 "configure"
15174 #include "confdefs.h"
15175 /* System header to define __stub macros and hopefully few prototypes,
15176     which can conflict with char cthread_fork(); below.  */
15177 #include <assert.h>
15178 /* Override any gcc2 internal prototype to avoid an error.  */
15179 /* We use char because int might match the return type of a gcc2
15180     builtin and then its argument prototype would still apply.  */
15181 char cthread_fork();
15182 char (*f)();
15183
15184 int main() {
15185
15186 /* The GNU C library defines this for functions which it implements
15187     to always fail with ENOSYS.  Some functions are actually named
15188     something starting with __ and the normal name is an alias.  */
15189 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15190 choke me
15191 #else
15192 f = cthread_fork;
15193 #endif
15194
15195 ; return 0; }
15196 EOF
15197 if { (eval echo configure:15198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15198   rm -rf conftest*
15199   eval "ac_cv_func_cthread_fork=yes"
15200 else
15201   echo "configure: failed program was:" >&5
15202   cat conftest.$ac_ext >&5
15203   rm -rf conftest*
15204   eval "ac_cv_func_cthread_fork=no"
15205 fi
15206 rm -f conftest*
15207 fi
15208
15209 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15210   echo "$ac_t""yes" 1>&6
15211   ol_link_threads=yes
15212 else
15213   echo "$ac_t""no" 1>&6
15214 fi
15215
15216
15217                 if test $ol_link_threads = no ; then
15218                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15219 echo "configure:15220: checking for cthread_fork with -all_load" >&5
15220 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15221   echo $ac_n "(cached) $ac_c" 1>&6
15222 else
15223   
15224                                                                 save_LIBS="$LIBS"
15225                                 LIBS="-all_load $LIBS"
15226                                 cat > conftest.$ac_ext <<EOF
15227 #line 15228 "configure"
15228 #include "confdefs.h"
15229 #include <mach/cthreads.h>
15230 int main() {
15231
15232                                         cthread_fork((void *)0, (void *)0);
15233                                         
15234 ; return 0; }
15235 EOF
15236 if { (eval echo configure:15237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15237   rm -rf conftest*
15238   ol_cv_cthread_all_load=yes
15239 else
15240   echo "configure: failed program was:" >&5
15241   cat conftest.$ac_ext >&5
15242   rm -rf conftest*
15243   ol_cv_cthread_all_load=no
15244 fi
15245 rm -f conftest*
15246                                                                 LIBS="$save_LIBS"
15247                         
15248 fi
15249
15250 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15251
15252                         if test $ol_cv_cthread_all_load = yes ; then
15253                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15254                                 ol_link_threads=mach
15255                                 ol_with_threads=found
15256                         fi
15257                 fi
15258
15259         elif test $ac_cv_header_cthreads_h = yes ; then
15260                                 
15261                 ol_with_threads=found
15262  
15263                                 save_LIBS="$LIBS"
15264                 LIBS="$LIBS -lthreads"
15265                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15266 echo "configure:15267: checking for cthread_fork" >&5
15267 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15268   echo $ac_n "(cached) $ac_c" 1>&6
15269 else
15270   cat > conftest.$ac_ext <<EOF
15271 #line 15272 "configure"
15272 #include "confdefs.h"
15273 /* System header to define __stub macros and hopefully few prototypes,
15274     which can conflict with char cthread_fork(); below.  */
15275 #include <assert.h>
15276 /* Override any gcc2 internal prototype to avoid an error.  */
15277 /* We use char because int might match the return type of a gcc2
15278     builtin and then its argument prototype would still apply.  */
15279 char cthread_fork();
15280 char (*f)();
15281
15282 int main() {
15283
15284 /* The GNU C library defines this for functions which it implements
15285     to always fail with ENOSYS.  Some functions are actually named
15286     something starting with __ and the normal name is an alias.  */
15287 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15288 choke me
15289 #else
15290 f = cthread_fork;
15291 #endif
15292
15293 ; return 0; }
15294 EOF
15295 if { (eval echo configure:15296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15296   rm -rf conftest*
15297   eval "ac_cv_func_cthread_fork=yes"
15298 else
15299   echo "configure: failed program was:" >&5
15300   cat conftest.$ac_ext >&5
15301   rm -rf conftest*
15302   eval "ac_cv_func_cthread_fork=no"
15303 fi
15304 rm -f conftest*
15305 fi
15306
15307 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15308   echo "$ac_t""yes" 1>&6
15309   ol_link_threads=yes
15310 else
15311   echo "$ac_t""no" 1>&6
15312 fi
15313
15314                 LIBS="$save_LIBS"
15315
15316                 if test $ol_link_threads = yes ; then
15317                         LTHREAD_LIBS="-lthreads"
15318                         ol_link_threads=mach
15319                         ol_with_threads=found
15320                 else
15321                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15322                 fi
15323
15324         elif test $ol_with_threads = mach ; then
15325                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15326         fi
15327
15328         if test $ol_link_threads = mach ; then
15329                 cat >> confdefs.h <<\EOF
15330 #define HAVE_MACH_CTHREADS 1
15331 EOF
15332
15333         elif test $ol_with_threads = found ; then
15334                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15335         fi
15336 fi
15337
15338 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15339         -o $ol_with_threads = pth ; then
15340
15341         for ac_hdr in pth.h
15342 do
15343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15345 echo "configure:15346: checking for $ac_hdr" >&5
15346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15347   echo $ac_n "(cached) $ac_c" 1>&6
15348 else
15349   cat > conftest.$ac_ext <<EOF
15350 #line 15351 "configure"
15351 #include "confdefs.h"
15352 #include <$ac_hdr>
15353 EOF
15354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15355 { (eval echo configure:15356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15357 if test -z "$ac_err"; then
15358   rm -rf conftest*
15359   eval "ac_cv_header_$ac_safe=yes"
15360 else
15361   echo "$ac_err" >&5
15362   echo "configure: failed program was:" >&5
15363   cat conftest.$ac_ext >&5
15364   rm -rf conftest*
15365   eval "ac_cv_header_$ac_safe=no"
15366 fi
15367 rm -f conftest*
15368 fi
15369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15370   echo "$ac_t""yes" 1>&6
15371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15372   cat >> confdefs.h <<EOF
15373 #define $ac_tr_hdr 1
15374 EOF
15375  
15376 else
15377   echo "$ac_t""no" 1>&6
15378 fi
15379 done
15380
15381
15382         if test $ac_cv_header_pth_h = yes ; then
15383                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15384 echo "configure:15385: checking for pth_version in -lpth" >&5
15385 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15387   echo $ac_n "(cached) $ac_c" 1>&6
15388 else
15389   ac_save_LIBS="$LIBS"
15390 LIBS="-lpth  $LIBS"
15391 cat > conftest.$ac_ext <<EOF
15392 #line 15393 "configure"
15393 #include "confdefs.h"
15394 /* Override any gcc2 internal prototype to avoid an error.  */
15395 /* We use char because int might match the return type of a gcc2
15396     builtin and then its argument prototype would still apply.  */
15397 char pth_version();
15398
15399 int main() {
15400 pth_version()
15401 ; return 0; }
15402 EOF
15403 if { (eval echo configure:15404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15404   rm -rf conftest*
15405   eval "ac_cv_lib_$ac_lib_var=yes"
15406 else
15407   echo "configure: failed program was:" >&5
15408   cat conftest.$ac_ext >&5
15409   rm -rf conftest*
15410   eval "ac_cv_lib_$ac_lib_var=no"
15411 fi
15412 rm -f conftest*
15413 LIBS="$ac_save_LIBS"
15414
15415 fi
15416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15417   echo "$ac_t""yes" 1>&6
15418   have_pth=yes
15419 else
15420   echo "$ac_t""no" 1>&6
15421 have_pth=no
15422 fi
15423
15424
15425                 if test $have_pth = yes ; then
15426                         cat >> confdefs.h <<\EOF
15427 #define HAVE_GNU_PTH 1
15428 EOF
15429
15430                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15431                         ol_link_threads=pth
15432                         ol_with_threads=found
15433
15434                         if test $ol_with_yielding_select = auto ; then
15435                                 ol_with_yielding_select=yes
15436                         fi
15437                 fi
15438         fi
15439 fi
15440
15441 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15442         -o $ol_with_threads = lwp ; then
15443
15444                 for ac_hdr in thread.h synch.h
15445 do
15446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15448 echo "configure:15449: checking for $ac_hdr" >&5
15449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15450   echo $ac_n "(cached) $ac_c" 1>&6
15451 else
15452   cat > conftest.$ac_ext <<EOF
15453 #line 15454 "configure"
15454 #include "confdefs.h"
15455 #include <$ac_hdr>
15456 EOF
15457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15458 { (eval echo configure:15459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15460 if test -z "$ac_err"; then
15461   rm -rf conftest*
15462   eval "ac_cv_header_$ac_safe=yes"
15463 else
15464   echo "$ac_err" >&5
15465   echo "configure: failed program was:" >&5
15466   cat conftest.$ac_ext >&5
15467   rm -rf conftest*
15468   eval "ac_cv_header_$ac_safe=no"
15469 fi
15470 rm -f conftest*
15471 fi
15472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15473   echo "$ac_t""yes" 1>&6
15474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15475   cat >> confdefs.h <<EOF
15476 #define $ac_tr_hdr 1
15477 EOF
15478  
15479 else
15480   echo "$ac_t""no" 1>&6
15481 fi
15482 done
15483
15484         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15485                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15486 echo "configure:15487: checking for thr_create in -lthread" >&5
15487 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15489   echo $ac_n "(cached) $ac_c" 1>&6
15490 else
15491   ac_save_LIBS="$LIBS"
15492 LIBS="-lthread  $LIBS"
15493 cat > conftest.$ac_ext <<EOF
15494 #line 15495 "configure"
15495 #include "confdefs.h"
15496 /* Override any gcc2 internal prototype to avoid an error.  */
15497 /* We use char because int might match the return type of a gcc2
15498     builtin and then its argument prototype would still apply.  */
15499 char thr_create();
15500
15501 int main() {
15502 thr_create()
15503 ; return 0; }
15504 EOF
15505 if { (eval echo configure:15506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15506   rm -rf conftest*
15507   eval "ac_cv_lib_$ac_lib_var=yes"
15508 else
15509   echo "configure: failed program was:" >&5
15510   cat conftest.$ac_ext >&5
15511   rm -rf conftest*
15512   eval "ac_cv_lib_$ac_lib_var=no"
15513 fi
15514 rm -f conftest*
15515 LIBS="$ac_save_LIBS"
15516
15517 fi
15518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15519   echo "$ac_t""yes" 1>&6
15520   have_thr=yes
15521 else
15522   echo "$ac_t""no" 1>&6
15523 have_thr=no
15524 fi
15525
15526
15527                 if test $have_thr = yes ; then
15528                         cat >> confdefs.h <<\EOF
15529 #define HAVE_THR 1
15530 EOF
15531
15532                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15533                         ol_link_threads=thr
15534
15535                         if test $ol_with_yielding_select = auto ; then
15536                                 ol_with_yielding_select=yes
15537                         fi
15538
15539                                                 for ac_func in \
15540                                 thr_setconcurrency \
15541                                 thr_getconcurrency \
15542                         
15543 do
15544 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15545 echo "configure:15546: checking for $ac_func" >&5
15546 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15547   echo $ac_n "(cached) $ac_c" 1>&6
15548 else
15549   cat > conftest.$ac_ext <<EOF
15550 #line 15551 "configure"
15551 #include "confdefs.h"
15552 /* System header to define __stub macros and hopefully few prototypes,
15553     which can conflict with char $ac_func(); below.  */
15554 #include <assert.h>
15555 /* Override any gcc2 internal prototype to avoid an error.  */
15556 /* We use char because int might match the return type of a gcc2
15557     builtin and then its argument prototype would still apply.  */
15558 char $ac_func();
15559 char (*f)();
15560
15561 int main() {
15562
15563 /* The GNU C library defines this for functions which it implements
15564     to always fail with ENOSYS.  Some functions are actually named
15565     something starting with __ and the normal name is an alias.  */
15566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15567 choke me
15568 #else
15569 f = $ac_func;
15570 #endif
15571
15572 ; return 0; }
15573 EOF
15574 if { (eval echo configure:15575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15575   rm -rf conftest*
15576   eval "ac_cv_func_$ac_func=yes"
15577 else
15578   echo "configure: failed program was:" >&5
15579   cat conftest.$ac_ext >&5
15580   rm -rf conftest*
15581   eval "ac_cv_func_$ac_func=no"
15582 fi
15583 rm -f conftest*
15584 fi
15585
15586 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15587   echo "$ac_t""yes" 1>&6
15588     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15589   cat >> confdefs.h <<EOF
15590 #define $ac_tr_func 1
15591 EOF
15592  
15593 else
15594   echo "$ac_t""no" 1>&6
15595 fi
15596 done
15597
15598                 fi
15599         fi
15600
15601                 for ac_hdr in lwp/lwp.h
15602 do
15603 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15604 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15605 echo "configure:15606: checking for $ac_hdr" >&5
15606 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15607   echo $ac_n "(cached) $ac_c" 1>&6
15608 else
15609   cat > conftest.$ac_ext <<EOF
15610 #line 15611 "configure"
15611 #include "confdefs.h"
15612 #include <$ac_hdr>
15613 EOF
15614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15615 { (eval echo configure:15616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15617 if test -z "$ac_err"; then
15618   rm -rf conftest*
15619   eval "ac_cv_header_$ac_safe=yes"
15620 else
15621   echo "$ac_err" >&5
15622   echo "configure: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   rm -rf conftest*
15625   eval "ac_cv_header_$ac_safe=no"
15626 fi
15627 rm -f conftest*
15628 fi
15629 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15630   echo "$ac_t""yes" 1>&6
15631     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15632   cat >> confdefs.h <<EOF
15633 #define $ac_tr_hdr 1
15634 EOF
15635  
15636 else
15637   echo "$ac_t""no" 1>&6
15638 fi
15639 done
15640
15641         if test $ac_cv_header_lwp_lwp_h = yes ; then
15642                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15643 echo "configure:15644: checking for lwp_create in -llwp" >&5
15644 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15645 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15646   echo $ac_n "(cached) $ac_c" 1>&6
15647 else
15648   ac_save_LIBS="$LIBS"
15649 LIBS="-llwp  $LIBS"
15650 cat > conftest.$ac_ext <<EOF
15651 #line 15652 "configure"
15652 #include "confdefs.h"
15653 /* Override any gcc2 internal prototype to avoid an error.  */
15654 /* We use char because int might match the return type of a gcc2
15655     builtin and then its argument prototype would still apply.  */
15656 char lwp_create();
15657
15658 int main() {
15659 lwp_create()
15660 ; return 0; }
15661 EOF
15662 if { (eval echo configure:15663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15663   rm -rf conftest*
15664   eval "ac_cv_lib_$ac_lib_var=yes"
15665 else
15666   echo "configure: failed program was:" >&5
15667   cat conftest.$ac_ext >&5
15668   rm -rf conftest*
15669   eval "ac_cv_lib_$ac_lib_var=no"
15670 fi
15671 rm -f conftest*
15672 LIBS="$ac_save_LIBS"
15673
15674 fi
15675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15676   echo "$ac_t""yes" 1>&6
15677   have_lwp=yes
15678 else
15679   echo "$ac_t""no" 1>&6
15680 have_lwp=no
15681 fi
15682
15683
15684                 if test $have_lwp = yes ; then
15685                         cat >> confdefs.h <<\EOF
15686 #define HAVE_LWP 1
15687 EOF
15688
15689                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15690                         ol_link_threads=lwp
15691
15692                         if test $ol_with_yielding_select = auto ; then
15693                                 ol_with_yielding_select=no
15694                         fi
15695                 fi
15696         fi
15697 fi
15698
15699 if test $ol_with_yielding_select = yes ; then
15700         cat >> confdefs.h <<\EOF
15701 #define HAVE_YIELDING_SELECT 1
15702 EOF
15703
15704 fi
15705
15706 if test $ol_with_threads = manual ; then
15707                 ol_link_threads=yes
15708
15709         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15710
15711         for ac_hdr in pthread.h sched.h
15712 do
15713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15715 echo "configure:15716: checking for $ac_hdr" >&5
15716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15717   echo $ac_n "(cached) $ac_c" 1>&6
15718 else
15719   cat > conftest.$ac_ext <<EOF
15720 #line 15721 "configure"
15721 #include "confdefs.h"
15722 #include <$ac_hdr>
15723 EOF
15724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15725 { (eval echo configure:15726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15727 if test -z "$ac_err"; then
15728   rm -rf conftest*
15729   eval "ac_cv_header_$ac_safe=yes"
15730 else
15731   echo "$ac_err" >&5
15732   echo "configure: failed program was:" >&5
15733   cat conftest.$ac_ext >&5
15734   rm -rf conftest*
15735   eval "ac_cv_header_$ac_safe=no"
15736 fi
15737 rm -f conftest*
15738 fi
15739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15740   echo "$ac_t""yes" 1>&6
15741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15742   cat >> confdefs.h <<EOF
15743 #define $ac_tr_hdr 1
15744 EOF
15745  
15746 else
15747   echo "$ac_t""no" 1>&6
15748 fi
15749 done
15750
15751         for ac_func in sched_yield pthread_yield
15752 do
15753 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15754 echo "configure:15755: checking for $ac_func" >&5
15755 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15756   echo $ac_n "(cached) $ac_c" 1>&6
15757 else
15758   cat > conftest.$ac_ext <<EOF
15759 #line 15760 "configure"
15760 #include "confdefs.h"
15761 /* System header to define __stub macros and hopefully few prototypes,
15762     which can conflict with char $ac_func(); below.  */
15763 #include <assert.h>
15764 /* Override any gcc2 internal prototype to avoid an error.  */
15765 /* We use char because int might match the return type of a gcc2
15766     builtin and then its argument prototype would still apply.  */
15767 char $ac_func();
15768 char (*f)();
15769
15770 int main() {
15771
15772 /* The GNU C library defines this for functions which it implements
15773     to always fail with ENOSYS.  Some functions are actually named
15774     something starting with __ and the normal name is an alias.  */
15775 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15776 choke me
15777 #else
15778 f = $ac_func;
15779 #endif
15780
15781 ; return 0; }
15782 EOF
15783 if { (eval echo configure:15784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15784   rm -rf conftest*
15785   eval "ac_cv_func_$ac_func=yes"
15786 else
15787   echo "configure: failed program was:" >&5
15788   cat conftest.$ac_ext >&5
15789   rm -rf conftest*
15790   eval "ac_cv_func_$ac_func=no"
15791 fi
15792 rm -f conftest*
15793 fi
15794
15795 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15796   echo "$ac_t""yes" 1>&6
15797     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15798   cat >> confdefs.h <<EOF
15799 #define $ac_tr_func 1
15800 EOF
15801  
15802 else
15803   echo "$ac_t""no" 1>&6
15804 fi
15805 done
15806
15807         
15808         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15809 echo "configure:15810: checking for LinuxThreads pthread.h" >&5
15810 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15811   echo $ac_n "(cached) $ac_c" 1>&6
15812 else
15813   cat > conftest.$ac_ext <<EOF
15814 #line 15815 "configure"
15815 #include "confdefs.h"
15816 #include <pthread.h>
15817 EOF
15818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15819   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15820   rm -rf conftest*
15821   ol_cv_header_linux_threads=yes
15822 else
15823   rm -rf conftest*
15824   ol_cv_header_linux_threads=no
15825 fi
15826 rm -f conftest*
15827
15828                 
15829 fi
15830
15831 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15832         if test $ol_cv_header_linux_threads = yes; then
15833                 cat >> confdefs.h <<\EOF
15834 #define HAVE_LINUX_THREADS 1
15835 EOF
15836
15837         fi
15838
15839
15840         for ac_hdr in mach/cthreads.h
15841 do
15842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15844 echo "configure:15845: checking for $ac_hdr" >&5
15845 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15846   echo $ac_n "(cached) $ac_c" 1>&6
15847 else
15848   cat > conftest.$ac_ext <<EOF
15849 #line 15850 "configure"
15850 #include "confdefs.h"
15851 #include <$ac_hdr>
15852 EOF
15853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15854 { (eval echo configure:15855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15856 if test -z "$ac_err"; then
15857   rm -rf conftest*
15858   eval "ac_cv_header_$ac_safe=yes"
15859 else
15860   echo "$ac_err" >&5
15861   echo "configure: failed program was:" >&5
15862   cat conftest.$ac_ext >&5
15863   rm -rf conftest*
15864   eval "ac_cv_header_$ac_safe=no"
15865 fi
15866 rm -f conftest*
15867 fi
15868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15869   echo "$ac_t""yes" 1>&6
15870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15871   cat >> confdefs.h <<EOF
15872 #define $ac_tr_hdr 1
15873 EOF
15874  
15875 else
15876   echo "$ac_t""no" 1>&6
15877 fi
15878 done
15879
15880         for ac_hdr in lwp/lwp.h
15881 do
15882 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15883 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15884 echo "configure:15885: checking for $ac_hdr" >&5
15885 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15886   echo $ac_n "(cached) $ac_c" 1>&6
15887 else
15888   cat > conftest.$ac_ext <<EOF
15889 #line 15890 "configure"
15890 #include "confdefs.h"
15891 #include <$ac_hdr>
15892 EOF
15893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15894 { (eval echo configure:15895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15896 if test -z "$ac_err"; then
15897   rm -rf conftest*
15898   eval "ac_cv_header_$ac_safe=yes"
15899 else
15900   echo "$ac_err" >&5
15901   echo "configure: failed program was:" >&5
15902   cat conftest.$ac_ext >&5
15903   rm -rf conftest*
15904   eval "ac_cv_header_$ac_safe=no"
15905 fi
15906 rm -f conftest*
15907 fi
15908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15909   echo "$ac_t""yes" 1>&6
15910     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15911   cat >> confdefs.h <<EOF
15912 #define $ac_tr_hdr 1
15913 EOF
15914  
15915 else
15916   echo "$ac_t""no" 1>&6
15917 fi
15918 done
15919
15920         for ac_hdr in thread.h synch.h
15921 do
15922 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15923 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15924 echo "configure:15925: checking for $ac_hdr" >&5
15925 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15926   echo $ac_n "(cached) $ac_c" 1>&6
15927 else
15928   cat > conftest.$ac_ext <<EOF
15929 #line 15930 "configure"
15930 #include "confdefs.h"
15931 #include <$ac_hdr>
15932 EOF
15933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15934 { (eval echo configure:15935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15936 if test -z "$ac_err"; then
15937   rm -rf conftest*
15938   eval "ac_cv_header_$ac_safe=yes"
15939 else
15940   echo "$ac_err" >&5
15941   echo "configure: failed program was:" >&5
15942   cat conftest.$ac_ext >&5
15943   rm -rf conftest*
15944   eval "ac_cv_header_$ac_safe=no"
15945 fi
15946 rm -f conftest*
15947 fi
15948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15949   echo "$ac_t""yes" 1>&6
15950     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15951   cat >> confdefs.h <<EOF
15952 #define $ac_tr_hdr 1
15953 EOF
15954  
15955 else
15956   echo "$ac_t""no" 1>&6
15957 fi
15958 done
15959
15960 fi
15961
15962 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15963                         cat >> confdefs.h <<\EOF
15964 #define REENTRANT 1
15965 EOF
15966
15967         cat >> confdefs.h <<\EOF
15968 #define _REENTRANT 1
15969 EOF
15970
15971         cat >> confdefs.h <<\EOF
15972 #define THREAD_SAFE 1
15973 EOF
15974
15975         cat >> confdefs.h <<\EOF
15976 #define _THREAD_SAFE 1
15977 EOF
15978
15979         cat >> confdefs.h <<\EOF
15980 #define THREADSAFE 1
15981 EOF
15982
15983         cat >> confdefs.h <<\EOF
15984 #define _THREADSAFE 1
15985 EOF
15986
15987         cat >> confdefs.h <<\EOF
15988 #define _SGI_MP_SOURCE 1
15989 EOF
15990
15991
15992                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15993 echo "configure:15994: checking for thread specific errno" >&5
15994 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15995   echo $ac_n "(cached) $ac_c" 1>&6
15996 else
15997   
15998                 cat > conftest.$ac_ext <<EOF
15999 #line 16000 "configure"
16000 #include "confdefs.h"
16001 #include <errno.h>
16002 int main() {
16003 errno = 0;
16004 ; return 0; }
16005 EOF
16006 if { (eval echo configure:16007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16007   rm -rf conftest*
16008   ol_cv_errno_thread_specific=yes
16009 else
16010   echo "configure: failed program was:" >&5
16011   cat conftest.$ac_ext >&5
16012   rm -rf conftest*
16013   ol_cv_errno_thread_specific=no
16014 fi
16015 rm -f conftest*
16016         
16017 fi
16018
16019 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16020
16021                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16022 echo "configure:16023: checking for thread specific h_errno" >&5
16023 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16024   echo $ac_n "(cached) $ac_c" 1>&6
16025 else
16026   
16027                 cat > conftest.$ac_ext <<EOF
16028 #line 16029 "configure"
16029 #include "confdefs.h"
16030 #include <netdb.h>
16031 int main() {
16032 h_errno = 0;
16033 ; return 0; }
16034 EOF
16035 if { (eval echo configure:16036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16036   rm -rf conftest*
16037   ol_cv_h_errno_thread_specific=yes
16038 else
16039   echo "configure: failed program was:" >&5
16040   cat conftest.$ac_ext >&5
16041   rm -rf conftest*
16042   ol_cv_h_errno_thread_specific=no
16043 fi
16044 rm -f conftest*
16045         
16046 fi
16047
16048 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16049
16050         if test $ol_cv_errno_thread_specific != yes \
16051                 -o $ol_cv_h_errno_thread_specific != yes ; then
16052                 LIBS="$LTHREAD_LIBS $LIBS"
16053                 LTHREAD_LIBS=""
16054         fi
16055
16056 fi  
16057
16058 if test $ol_link_threads = no ; then
16059         if test $ol_with_threads = yes ; then
16060                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16061         fi
16062
16063         if test $ol_with_threads = auto ; then
16064                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16065                 ol_with_threads=no
16066         fi
16067
16068         cat >> confdefs.h <<\EOF
16069 #define NO_THREADS 1
16070 EOF
16071
16072         LTHREAD_LIBS=""
16073 fi
16074
16075 if test $ol_link_threads != no ; then
16076         cat >> confdefs.h <<\EOF
16077 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16078 EOF
16079
16080 fi
16081
16082 for ac_func in \
16083         ctime_r                 \
16084         gethostbyname_r gethostbyaddr_r \
16085
16086 do
16087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16088 echo "configure:16089: checking for $ac_func" >&5
16089 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16090   echo $ac_n "(cached) $ac_c" 1>&6
16091 else
16092   cat > conftest.$ac_ext <<EOF
16093 #line 16094 "configure"
16094 #include "confdefs.h"
16095 /* System header to define __stub macros and hopefully few prototypes,
16096     which can conflict with char $ac_func(); below.  */
16097 #include <assert.h>
16098 /* Override any gcc2 internal prototype to avoid an error.  */
16099 /* We use char because int might match the return type of a gcc2
16100     builtin and then its argument prototype would still apply.  */
16101 char $ac_func();
16102 char (*f)();
16103
16104 int main() {
16105
16106 /* The GNU C library defines this for functions which it implements
16107     to always fail with ENOSYS.  Some functions are actually named
16108     something starting with __ and the normal name is an alias.  */
16109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16110 choke me
16111 #else
16112 f = $ac_func;
16113 #endif
16114
16115 ; return 0; }
16116 EOF
16117 if { (eval echo configure:16118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16118   rm -rf conftest*
16119   eval "ac_cv_func_$ac_func=yes"
16120 else
16121   echo "configure: failed program was:" >&5
16122   cat conftest.$ac_ext >&5
16123   rm -rf conftest*
16124   eval "ac_cv_func_$ac_func=no"
16125 fi
16126 rm -f conftest*
16127 fi
16128
16129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16130   echo "$ac_t""yes" 1>&6
16131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16132   cat >> confdefs.h <<EOF
16133 #define $ac_tr_func 1
16134 EOF
16135  
16136 else
16137   echo "$ac_t""no" 1>&6
16138 fi
16139 done
16140
16141
16142 if test "$ac_cv_func_ctime_r" = no ; then
16143         ol_cv_func_ctime_r_nargs=0
16144 else
16145         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16146 echo "configure:16147: checking number of arguments of ctime_r" >&5
16147 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16148   echo $ac_n "(cached) $ac_c" 1>&6
16149 else
16150   cat > conftest.$ac_ext <<EOF
16151 #line 16152 "configure"
16152 #include "confdefs.h"
16153 #include <time.h>
16154 int main() {
16155 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16156 ; return 0; }
16157 EOF
16158 if { (eval echo configure:16159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16159   rm -rf conftest*
16160   ol_cv_func_ctime_r_nargs3=yes
16161 else
16162   echo "configure: failed program was:" >&5
16163   cat conftest.$ac_ext >&5
16164   rm -rf conftest*
16165   ol_cv_func_ctime_r_nargs3=no
16166 fi
16167 rm -f conftest*
16168
16169         cat > conftest.$ac_ext <<EOF
16170 #line 16171 "configure"
16171 #include "confdefs.h"
16172 #include <time.h>
16173 int main() {
16174 time_t ti; char *buffer; ctime_r(&ti,buffer);
16175 ; return 0; }
16176 EOF
16177 if { (eval echo configure:16178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16178   rm -rf conftest*
16179   ol_cv_func_ctime_r_nargs2=yes
16180 else
16181   echo "configure: failed program was:" >&5
16182   cat conftest.$ac_ext >&5
16183   rm -rf conftest*
16184   ol_cv_func_ctime_r_nargs2=no
16185 fi
16186 rm -f conftest*
16187
16188         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16189                 $ol_cv_func_ctime_r_nargs2 = no ; then
16190
16191                 ol_cv_func_ctime_r_nargs=3
16192
16193         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16194                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16195
16196                 ol_cv_func_ctime_r_nargs=2
16197
16198         else
16199                 ol_cv_func_ctime_r_nargs=0
16200         fi
16201   
16202 fi
16203
16204 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16205
16206   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16207         cat >> confdefs.h <<EOF
16208 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16209 EOF
16210
16211   fi
16212
16213 fi
16214
16215 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16216         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16217 echo "configure:16218: checking number of arguments of gethostbyname_r" >&5
16218 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   cat > conftest.$ac_ext <<EOF
16222 #line 16223 "configure"
16223 #include "confdefs.h"
16224 #include <sys/types.h>
16225 #include <sys/socket.h>
16226 #include <netinet/in.h>
16227 #include <netdb.h>
16228 #define BUFSIZE (sizeof(struct hostent)+10)
16229 int main() {
16230 struct hostent hent; char buffer[BUFSIZE];
16231                 int bufsize=BUFSIZE;int h_errno;
16232                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16233                         buffer, bufsize, &h_errno);
16234 ; return 0; }
16235 EOF
16236 if { (eval echo configure:16237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16237   rm -rf conftest*
16238   ol_cv_func_gethostbyname_r_nargs5=yes
16239 else
16240   echo "configure: failed program was:" >&5
16241   cat conftest.$ac_ext >&5
16242   rm -rf conftest*
16243   ol_cv_func_gethostbyname_r_nargs5=no
16244 fi
16245 rm -f conftest*
16246
16247         cat > conftest.$ac_ext <<EOF
16248 #line 16249 "configure"
16249 #include "confdefs.h"
16250 #include <sys/types.h>
16251 #include <sys/socket.h>
16252 #include <netinet/in.h>
16253 #include <netdb.h>
16254 #define BUFSIZE (sizeof(struct hostent)+10)
16255 int main() {
16256 struct hostent hent;struct hostent *rhent;
16257                 char buffer[BUFSIZE];
16258                 int bufsize=BUFSIZE;int h_errno;
16259                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16260                         &rhent, &h_errno);
16261 ; return 0; }
16262 EOF
16263 if { (eval echo configure:16264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16264   rm -rf conftest*
16265   ol_cv_func_gethostbyname_r_nargs6=yes
16266 else
16267   echo "configure: failed program was:" >&5
16268   cat conftest.$ac_ext >&5
16269   rm -rf conftest*
16270   ol_cv_func_gethostbyname_r_nargs6=no
16271 fi
16272 rm -f conftest*
16273
16274         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16275                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16276
16277                 ol_cv_func_gethostbyname_r_nargs=5
16278
16279         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16280                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16281
16282                 ol_cv_func_gethostbyname_r_nargs=6
16283
16284         else
16285                 ol_cv_func_gethostbyname_r_nargs=0
16286         fi
16287   
16288 fi
16289
16290 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16291   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16292         cat >> confdefs.h <<EOF
16293 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16294 EOF
16295
16296   fi
16297
16298 else
16299         ol_cv_func_gethostbyname_r_nargs=0
16300 fi
16301  
16302 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16303         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16304 echo "configure:16305: checking number of arguments of gethostbyaddr_r" >&5
16305 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16306   echo $ac_n "(cached) $ac_c" 1>&6
16307 else
16308   cat > conftest.$ac_ext <<EOF
16309 #line 16310 "configure"
16310 #include "confdefs.h"
16311 #include <sys/types.h>
16312 #include <sys/socket.h>
16313 #include <netinet/in.h>
16314 #include <netdb.h>
16315 #define BUFSIZE (sizeof(struct hostent)+10)
16316 int main() {
16317 struct hostent hent; char buffer[BUFSIZE]; 
16318             struct in_addr add;
16319             size_t alen=sizeof(struct in_addr);
16320             int bufsize=BUFSIZE;int h_errno;
16321                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16322                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16323 ; return 0; }
16324 EOF
16325 if { (eval echo configure:16326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16326   rm -rf conftest*
16327   ol_cv_func_gethostbyaddr_r_nargs7=yes
16328 else
16329   echo "configure: failed program was:" >&5
16330   cat conftest.$ac_ext >&5
16331   rm -rf conftest*
16332   ol_cv_func_gethostbyaddr_r_nargs7=no
16333 fi
16334 rm -f conftest*
16335
16336         cat > conftest.$ac_ext <<EOF
16337 #line 16338 "configure"
16338 #include "confdefs.h"
16339 #include <sys/types.h>
16340 #include <sys/socket.h>
16341 #include <netinet/in.h>
16342 #include <netdb.h>
16343 #define BUFSIZE (sizeof(struct hostent)+10)
16344 int main() {
16345 struct hostent hent;
16346                 struct hostent *rhent; char buffer[BUFSIZE]; 
16347                 struct in_addr add;
16348                 size_t alen=sizeof(struct in_addr);
16349                 int bufsize=BUFSIZE;int h_errno;
16350                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16351                         alen, AF_INET, &hent, buffer, bufsize, 
16352                         &rhent, &h_errno);
16353 ; return 0; }
16354 EOF
16355 if { (eval echo configure:16356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16356   rm -rf conftest*
16357   ol_cv_func_gethostbyaddr_r_nargs8=yes
16358 else
16359   echo "configure: failed program was:" >&5
16360   cat conftest.$ac_ext >&5
16361   rm -rf conftest*
16362   ol_cv_func_gethostbyaddr_r_nargs8=no
16363 fi
16364 rm -f conftest*
16365
16366         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16367                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16368
16369                 ol_cv_func_gethostbyaddr_r_nargs=7
16370
16371         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16372                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16373
16374                 ol_cv_func_gethostbyaddr_r_nargs=8
16375
16376         else
16377                 ol_cv_func_gethostbyaddr_r_nargs=0
16378         fi
16379   
16380 fi
16381
16382 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16383   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16384     cat >> confdefs.h <<EOF
16385 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16386 EOF
16387
16388   fi
16389
16390 else
16391         ol_cv_func_gethostbyaddr_r_nargs=0
16392 fi
16393
16394 ol_link_ldbm=no 
16395
16396 if test $ol_with_ldbm_api = auto \
16397         -o $ol_with_ldbm_api = berkeley \
16398         -o $ol_with_ldbm_api = bcompat ; then
16399
16400         if test $ol_with_ldbm_api = bcompat; then \
16401                 for ac_hdr in db_185.h db.h
16402 do
16403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16405 echo "configure:16406: checking for $ac_hdr" >&5
16406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16407   echo $ac_n "(cached) $ac_c" 1>&6
16408 else
16409   cat > conftest.$ac_ext <<EOF
16410 #line 16411 "configure"
16411 #include "confdefs.h"
16412 #include <$ac_hdr>
16413 EOF
16414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16415 { (eval echo configure:16416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16417 if test -z "$ac_err"; then
16418   rm -rf conftest*
16419   eval "ac_cv_header_$ac_safe=yes"
16420 else
16421   echo "$ac_err" >&5
16422   echo "configure: failed program was:" >&5
16423   cat conftest.$ac_ext >&5
16424   rm -rf conftest*
16425   eval "ac_cv_header_$ac_safe=no"
16426 fi
16427 rm -f conftest*
16428 fi
16429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16430   echo "$ac_t""yes" 1>&6
16431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16432   cat >> confdefs.h <<EOF
16433 #define $ac_tr_hdr 1
16434 EOF
16435  
16436 else
16437   echo "$ac_t""no" 1>&6
16438 fi
16439 done
16440
16441 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16442         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16443 echo "configure:16444: checking if Berkeley DB header compatibility" >&5
16444 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16445   echo $ac_n "(cached) $ac_c" 1>&6
16446 else
16447   
16448                 cat > conftest.$ac_ext <<EOF
16449 #line 16450 "configure"
16450 #include "confdefs.h"
16451
16452 #if HAVE_DB_185_H
16453 #       include <db_185.h>
16454 #else
16455 #       include <db.h>
16456 #endif
16457
16458  /* this check could be improved */
16459 #ifndef DB_VERSION_MAJOR
16460 #       define DB_VERSION_MAJOR 1
16461 #endif
16462
16463 #if DB_VERSION_MAJOR == 1 
16464         __db_version_1
16465 #endif
16466
16467 EOF
16468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16469   egrep "__db_version_1" >/dev/null 2>&1; then
16470   rm -rf conftest*
16471   ol_cv_header_db1=yes
16472 else
16473   rm -rf conftest*
16474   ol_cv_header_db1=no
16475 fi
16476 rm -f conftest*
16477
16478 fi
16479
16480 echo "$ac_t""$ol_cv_header_db1" 1>&6
16481
16482         if test $ol_cv_header_db1 = yes ; then
16483                 ol_cv_lib_db=no
16484 if test $ol_cv_lib_db = no ; then
16485         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16486 echo "configure:16487: checking for Berkeley DB link (default)" >&5
16487 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16488   echo $ac_n "(cached) $ac_c" 1>&6
16489 else
16490   
16491         ol_DB_LIB=
16492         ol_LIBS=$LIBS
16493         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16494
16495         cat > conftest.$ac_ext <<EOF
16496 #line 16497 "configure"
16497 #include "confdefs.h"
16498
16499 #ifdef HAVE_DB_185_H
16500 # include <db_185.h>
16501 #else
16502 # include <db.h>
16503 #endif
16504
16505 #ifndef DB_VERSION_MAJOR
16506 # define DB_VERSION_MAJOR 1
16507 #endif
16508
16509 #ifndef NULL
16510 #define NULL ((void*)0)
16511 #endif
16512
16513 int main() {
16514
16515 #if DB_VERSION_MAJOR > 1
16516         {
16517                 char *version;
16518                 int major, minor, patch;
16519
16520                 version = db_version( &major, &minor, &patch );
16521
16522                 if( major != DB_VERSION_MAJOR ||
16523                         minor < DB_VERSION_MINOR )
16524                 {
16525                         printf("Berkeley DB version mismatch\n"
16526                                 "\texpected: %s\n\tgot: %s\n",
16527                                 DB_VERSION_STRING, version);
16528                         return 1;
16529                 }
16530         }
16531 #endif
16532
16533 #if DB_VERSION_MAJOR > 2
16534         db_env_create( NULL, 0 );
16535 #elif DB_VERSION_MAJOR > 1
16536         db_appexit( NULL );
16537 #else
16538         (void) dbopen( NULL, 0, 0, 0, NULL);
16539 #endif
16540
16541 ; return 0; }
16542 EOF
16543 if { (eval echo configure:16544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16544   rm -rf conftest*
16545   ol_cv_db_none=yes
16546 else
16547   echo "configure: failed program was:" >&5
16548   cat conftest.$ac_ext >&5
16549   rm -rf conftest*
16550   ol_cv_db_none=no
16551 fi
16552 rm -f conftest*
16553
16554         LIBS="$ol_LIBS"
16555
16556 fi
16557
16558 echo "$ac_t""$ol_cv_db_none" 1>&6
16559
16560         if test $ol_cv_db_none = yes ; then
16561                 ol_cv_lib_db=yes
16562         fi
16563 fi
16564
16565 if test $ol_cv_lib_db = no ; then
16566         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16567 echo "configure:16568: checking for Berkeley DB link (-ldb42)" >&5
16568 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16569   echo $ac_n "(cached) $ac_c" 1>&6
16570 else
16571   
16572         ol_DB_LIB=-ldb42
16573         ol_LIBS=$LIBS
16574         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16575
16576         cat > conftest.$ac_ext <<EOF
16577 #line 16578 "configure"
16578 #include "confdefs.h"
16579
16580 #ifdef HAVE_DB_185_H
16581 # include <db_185.h>
16582 #else
16583 # include <db.h>
16584 #endif
16585
16586 #ifndef DB_VERSION_MAJOR
16587 # define DB_VERSION_MAJOR 1
16588 #endif
16589
16590 #ifndef NULL
16591 #define NULL ((void*)0)
16592 #endif
16593
16594 int main() {
16595
16596 #if DB_VERSION_MAJOR > 1
16597         {
16598                 char *version;
16599                 int major, minor, patch;
16600
16601                 version = db_version( &major, &minor, &patch );
16602
16603                 if( major != DB_VERSION_MAJOR ||
16604                         minor < DB_VERSION_MINOR )
16605                 {
16606                         printf("Berkeley DB version mismatch\n"
16607                                 "\texpected: %s\n\tgot: %s\n",
16608                                 DB_VERSION_STRING, version);
16609                         return 1;
16610                 }
16611         }
16612 #endif
16613
16614 #if DB_VERSION_MAJOR > 2
16615         db_env_create( NULL, 0 );
16616 #elif DB_VERSION_MAJOR > 1
16617         db_appexit( NULL );
16618 #else
16619         (void) dbopen( NULL, 0, 0, 0, NULL);
16620 #endif
16621
16622 ; return 0; }
16623 EOF
16624 if { (eval echo configure:16625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16625   rm -rf conftest*
16626   ol_cv_db_db42=yes
16627 else
16628   echo "configure: failed program was:" >&5
16629   cat conftest.$ac_ext >&5
16630   rm -rf conftest*
16631   ol_cv_db_db42=no
16632 fi
16633 rm -f conftest*
16634
16635         LIBS="$ol_LIBS"
16636
16637 fi
16638
16639 echo "$ac_t""$ol_cv_db_db42" 1>&6
16640
16641         if test $ol_cv_db_db42 = yes ; then
16642                 ol_cv_lib_db=-ldb42
16643         fi
16644 fi
16645
16646 if test $ol_cv_lib_db = no ; then
16647         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16648 echo "configure:16649: checking for Berkeley DB link (-ldb-42)" >&5
16649 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16650   echo $ac_n "(cached) $ac_c" 1>&6
16651 else
16652   
16653         ol_DB_LIB=-ldb-42
16654         ol_LIBS=$LIBS
16655         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16656
16657         cat > conftest.$ac_ext <<EOF
16658 #line 16659 "configure"
16659 #include "confdefs.h"
16660
16661 #ifdef HAVE_DB_185_H
16662 # include <db_185.h>
16663 #else
16664 # include <db.h>
16665 #endif
16666
16667 #ifndef DB_VERSION_MAJOR
16668 # define DB_VERSION_MAJOR 1
16669 #endif
16670
16671 #ifndef NULL
16672 #define NULL ((void*)0)
16673 #endif
16674
16675 int main() {
16676
16677 #if DB_VERSION_MAJOR > 1
16678         {
16679                 char *version;
16680                 int major, minor, patch;
16681
16682                 version = db_version( &major, &minor, &patch );
16683
16684                 if( major != DB_VERSION_MAJOR ||
16685                         minor < DB_VERSION_MINOR )
16686                 {
16687                         printf("Berkeley DB version mismatch\n"
16688                                 "\texpected: %s\n\tgot: %s\n",
16689                                 DB_VERSION_STRING, version);
16690                         return 1;
16691                 }
16692         }
16693 #endif
16694
16695 #if DB_VERSION_MAJOR > 2
16696         db_env_create( NULL, 0 );
16697 #elif DB_VERSION_MAJOR > 1
16698         db_appexit( NULL );
16699 #else
16700         (void) dbopen( NULL, 0, 0, 0, NULL);
16701 #endif
16702
16703 ; return 0; }
16704 EOF
16705 if { (eval echo configure:16706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16706   rm -rf conftest*
16707   ol_cv_db_db_42=yes
16708 else
16709   echo "configure: failed program was:" >&5
16710   cat conftest.$ac_ext >&5
16711   rm -rf conftest*
16712   ol_cv_db_db_42=no
16713 fi
16714 rm -f conftest*
16715
16716         LIBS="$ol_LIBS"
16717
16718 fi
16719
16720 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16721
16722         if test $ol_cv_db_db_42 = yes ; then
16723                 ol_cv_lib_db=-ldb-42
16724         fi
16725 fi
16726
16727 if test $ol_cv_lib_db = no ; then
16728         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16729 echo "configure:16730: checking for Berkeley DB link (-ldb-4.2)" >&5
16730 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16731   echo $ac_n "(cached) $ac_c" 1>&6
16732 else
16733   
16734         ol_DB_LIB=-ldb-4.2
16735         ol_LIBS=$LIBS
16736         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16737
16738         cat > conftest.$ac_ext <<EOF
16739 #line 16740 "configure"
16740 #include "confdefs.h"
16741
16742 #ifdef HAVE_DB_185_H
16743 # include <db_185.h>
16744 #else
16745 # include <db.h>
16746 #endif
16747
16748 #ifndef DB_VERSION_MAJOR
16749 # define DB_VERSION_MAJOR 1
16750 #endif
16751
16752 #ifndef NULL
16753 #define NULL ((void*)0)
16754 #endif
16755
16756 int main() {
16757
16758 #if DB_VERSION_MAJOR > 1
16759         {
16760                 char *version;
16761                 int major, minor, patch;
16762
16763                 version = db_version( &major, &minor, &patch );
16764
16765                 if( major != DB_VERSION_MAJOR ||
16766                         minor < DB_VERSION_MINOR )
16767                 {
16768                         printf("Berkeley DB version mismatch\n"
16769                                 "\texpected: %s\n\tgot: %s\n",
16770                                 DB_VERSION_STRING, version);
16771                         return 1;
16772                 }
16773         }
16774 #endif
16775
16776 #if DB_VERSION_MAJOR > 2
16777         db_env_create( NULL, 0 );
16778 #elif DB_VERSION_MAJOR > 1
16779         db_appexit( NULL );
16780 #else
16781         (void) dbopen( NULL, 0, 0, 0, NULL);
16782 #endif
16783
16784 ; return 0; }
16785 EOF
16786 if { (eval echo configure:16787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16787   rm -rf conftest*
16788   ol_cv_db_db_4_dot_2=yes
16789 else
16790   echo "configure: failed program was:" >&5
16791   cat conftest.$ac_ext >&5
16792   rm -rf conftest*
16793   ol_cv_db_db_4_dot_2=no
16794 fi
16795 rm -f conftest*
16796
16797         LIBS="$ol_LIBS"
16798
16799 fi
16800
16801 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16802
16803         if test $ol_cv_db_db_4_dot_2 = yes ; then
16804                 ol_cv_lib_db=-ldb-4.2
16805         fi
16806 fi
16807
16808 if test $ol_cv_lib_db = no ; then
16809         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16810 echo "configure:16811: checking for Berkeley DB link (-ldb-4-2)" >&5
16811 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16812   echo $ac_n "(cached) $ac_c" 1>&6
16813 else
16814   
16815         ol_DB_LIB=-ldb-4-2
16816         ol_LIBS=$LIBS
16817         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16818
16819         cat > conftest.$ac_ext <<EOF
16820 #line 16821 "configure"
16821 #include "confdefs.h"
16822
16823 #ifdef HAVE_DB_185_H
16824 # include <db_185.h>
16825 #else
16826 # include <db.h>
16827 #endif
16828
16829 #ifndef DB_VERSION_MAJOR
16830 # define DB_VERSION_MAJOR 1
16831 #endif
16832
16833 #ifndef NULL
16834 #define NULL ((void*)0)
16835 #endif
16836
16837 int main() {
16838
16839 #if DB_VERSION_MAJOR > 1
16840         {
16841                 char *version;
16842                 int major, minor, patch;
16843
16844                 version = db_version( &major, &minor, &patch );
16845
16846                 if( major != DB_VERSION_MAJOR ||
16847                         minor < DB_VERSION_MINOR )
16848                 {
16849                         printf("Berkeley DB version mismatch\n"
16850                                 "\texpected: %s\n\tgot: %s\n",
16851                                 DB_VERSION_STRING, version);
16852                         return 1;
16853                 }
16854         }
16855 #endif
16856
16857 #if DB_VERSION_MAJOR > 2
16858         db_env_create( NULL, 0 );
16859 #elif DB_VERSION_MAJOR > 1
16860         db_appexit( NULL );
16861 #else
16862         (void) dbopen( NULL, 0, 0, 0, NULL);
16863 #endif
16864
16865 ; return 0; }
16866 EOF
16867 if { (eval echo configure:16868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16868   rm -rf conftest*
16869   ol_cv_db_db_4_2=yes
16870 else
16871   echo "configure: failed program was:" >&5
16872   cat conftest.$ac_ext >&5
16873   rm -rf conftest*
16874   ol_cv_db_db_4_2=no
16875 fi
16876 rm -f conftest*
16877
16878         LIBS="$ol_LIBS"
16879
16880 fi
16881
16882 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16883
16884         if test $ol_cv_db_db_4_2 = yes ; then
16885                 ol_cv_lib_db=-ldb-4-2
16886         fi
16887 fi
16888
16889 if test $ol_cv_lib_db = no ; then
16890         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16891 echo "configure:16892: checking for Berkeley DB link (-ldb-4)" >&5
16892 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16893   echo $ac_n "(cached) $ac_c" 1>&6
16894 else
16895   
16896         ol_DB_LIB=-ldb-4
16897         ol_LIBS=$LIBS
16898         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16899
16900         cat > conftest.$ac_ext <<EOF
16901 #line 16902 "configure"
16902 #include "confdefs.h"
16903
16904 #ifdef HAVE_DB_185_H
16905 # include <db_185.h>
16906 #else
16907 # include <db.h>
16908 #endif
16909
16910 #ifndef DB_VERSION_MAJOR
16911 # define DB_VERSION_MAJOR 1
16912 #endif
16913
16914 #ifndef NULL
16915 #define NULL ((void*)0)
16916 #endif
16917
16918 int main() {
16919
16920 #if DB_VERSION_MAJOR > 1
16921         {
16922                 char *version;
16923                 int major, minor, patch;
16924
16925                 version = db_version( &major, &minor, &patch );
16926
16927                 if( major != DB_VERSION_MAJOR ||
16928                         minor < DB_VERSION_MINOR )
16929                 {
16930                         printf("Berkeley DB version mismatch\n"
16931                                 "\texpected: %s\n\tgot: %s\n",
16932                                 DB_VERSION_STRING, version);
16933                         return 1;
16934                 }
16935         }
16936 #endif
16937
16938 #if DB_VERSION_MAJOR > 2
16939         db_env_create( NULL, 0 );
16940 #elif DB_VERSION_MAJOR > 1
16941         db_appexit( NULL );
16942 #else
16943         (void) dbopen( NULL, 0, 0, 0, NULL);
16944 #endif
16945
16946 ; return 0; }
16947 EOF
16948 if { (eval echo configure:16949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16949   rm -rf conftest*
16950   ol_cv_db_db_4=yes
16951 else
16952   echo "configure: failed program was:" >&5
16953   cat conftest.$ac_ext >&5
16954   rm -rf conftest*
16955   ol_cv_db_db_4=no
16956 fi
16957 rm -f conftest*
16958
16959         LIBS="$ol_LIBS"
16960
16961 fi
16962
16963 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16964
16965         if test $ol_cv_db_db_4 = yes ; then
16966                 ol_cv_lib_db=-ldb-4
16967         fi
16968 fi
16969
16970 if test $ol_cv_lib_db = no ; then
16971         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16972 echo "configure:16973: checking for Berkeley DB link (-ldb4)" >&5
16973 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16974   echo $ac_n "(cached) $ac_c" 1>&6
16975 else
16976   
16977         ol_DB_LIB=-ldb4
16978         ol_LIBS=$LIBS
16979         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16980
16981         cat > conftest.$ac_ext <<EOF
16982 #line 16983 "configure"
16983 #include "confdefs.h"
16984
16985 #ifdef HAVE_DB_185_H
16986 # include <db_185.h>
16987 #else
16988 # include <db.h>
16989 #endif
16990
16991 #ifndef DB_VERSION_MAJOR
16992 # define DB_VERSION_MAJOR 1
16993 #endif
16994
16995 #ifndef NULL
16996 #define NULL ((void*)0)
16997 #endif
16998
16999 int main() {
17000
17001 #if DB_VERSION_MAJOR > 1
17002         {
17003                 char *version;
17004                 int major, minor, patch;
17005
17006                 version = db_version( &major, &minor, &patch );
17007
17008                 if( major != DB_VERSION_MAJOR ||
17009                         minor < DB_VERSION_MINOR )
17010                 {
17011                         printf("Berkeley DB version mismatch\n"
17012                                 "\texpected: %s\n\tgot: %s\n",
17013                                 DB_VERSION_STRING, version);
17014                         return 1;
17015                 }
17016         }
17017 #endif
17018
17019 #if DB_VERSION_MAJOR > 2
17020         db_env_create( NULL, 0 );
17021 #elif DB_VERSION_MAJOR > 1
17022         db_appexit( NULL );
17023 #else
17024         (void) dbopen( NULL, 0, 0, 0, NULL);
17025 #endif
17026
17027 ; return 0; }
17028 EOF
17029 if { (eval echo configure:17030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17030   rm -rf conftest*
17031   ol_cv_db_db4=yes
17032 else
17033   echo "configure: failed program was:" >&5
17034   cat conftest.$ac_ext >&5
17035   rm -rf conftest*
17036   ol_cv_db_db4=no
17037 fi
17038 rm -f conftest*
17039
17040         LIBS="$ol_LIBS"
17041
17042 fi
17043
17044 echo "$ac_t""$ol_cv_db_db4" 1>&6
17045
17046         if test $ol_cv_db_db4 = yes ; then
17047                 ol_cv_lib_db=-ldb4
17048         fi
17049 fi
17050
17051 if test $ol_cv_lib_db = no ; then
17052         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17053 echo "configure:17054: checking for Berkeley DB link (-ldb)" >&5
17054 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17055   echo $ac_n "(cached) $ac_c" 1>&6
17056 else
17057   
17058         ol_DB_LIB=-ldb
17059         ol_LIBS=$LIBS
17060         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17061
17062         cat > conftest.$ac_ext <<EOF
17063 #line 17064 "configure"
17064 #include "confdefs.h"
17065
17066 #ifdef HAVE_DB_185_H
17067 # include <db_185.h>
17068 #else
17069 # include <db.h>
17070 #endif
17071
17072 #ifndef DB_VERSION_MAJOR
17073 # define DB_VERSION_MAJOR 1
17074 #endif
17075
17076 #ifndef NULL
17077 #define NULL ((void*)0)
17078 #endif
17079
17080 int main() {
17081
17082 #if DB_VERSION_MAJOR > 1
17083         {
17084                 char *version;
17085                 int major, minor, patch;
17086
17087                 version = db_version( &major, &minor, &patch );
17088
17089                 if( major != DB_VERSION_MAJOR ||
17090                         minor < DB_VERSION_MINOR )
17091                 {
17092                         printf("Berkeley DB version mismatch\n"
17093                                 "\texpected: %s\n\tgot: %s\n",
17094                                 DB_VERSION_STRING, version);
17095                         return 1;
17096                 }
17097         }
17098 #endif
17099
17100 #if DB_VERSION_MAJOR > 2
17101         db_env_create( NULL, 0 );
17102 #elif DB_VERSION_MAJOR > 1
17103         db_appexit( NULL );
17104 #else
17105         (void) dbopen( NULL, 0, 0, 0, NULL);
17106 #endif
17107
17108 ; return 0; }
17109 EOF
17110 if { (eval echo configure:17111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17111   rm -rf conftest*
17112   ol_cv_db_db=yes
17113 else
17114   echo "configure: failed program was:" >&5
17115   cat conftest.$ac_ext >&5
17116   rm -rf conftest*
17117   ol_cv_db_db=no
17118 fi
17119 rm -f conftest*
17120
17121         LIBS="$ol_LIBS"
17122
17123 fi
17124
17125 echo "$ac_t""$ol_cv_db_db" 1>&6
17126
17127         if test $ol_cv_db_db = yes ; then
17128                 ol_cv_lib_db=-ldb
17129         fi
17130 fi
17131
17132 if test $ol_cv_lib_db = no ; then
17133         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17134 echo "configure:17135: checking for Berkeley DB link (-ldb41)" >&5
17135 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17136   echo $ac_n "(cached) $ac_c" 1>&6
17137 else
17138   
17139         ol_DB_LIB=-ldb41
17140         ol_LIBS=$LIBS
17141         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17142
17143         cat > conftest.$ac_ext <<EOF
17144 #line 17145 "configure"
17145 #include "confdefs.h"
17146
17147 #ifdef HAVE_DB_185_H
17148 # include <db_185.h>
17149 #else
17150 # include <db.h>
17151 #endif
17152
17153 #ifndef DB_VERSION_MAJOR
17154 # define DB_VERSION_MAJOR 1
17155 #endif
17156
17157 #ifndef NULL
17158 #define NULL ((void*)0)
17159 #endif
17160
17161 int main() {
17162
17163 #if DB_VERSION_MAJOR > 1
17164         {
17165                 char *version;
17166                 int major, minor, patch;
17167
17168                 version = db_version( &major, &minor, &patch );
17169
17170                 if( major != DB_VERSION_MAJOR ||
17171                         minor < DB_VERSION_MINOR )
17172                 {
17173                         printf("Berkeley DB version mismatch\n"
17174                                 "\texpected: %s\n\tgot: %s\n",
17175                                 DB_VERSION_STRING, version);
17176                         return 1;
17177                 }
17178         }
17179 #endif
17180
17181 #if DB_VERSION_MAJOR > 2
17182         db_env_create( NULL, 0 );
17183 #elif DB_VERSION_MAJOR > 1
17184         db_appexit( NULL );
17185 #else
17186         (void) dbopen( NULL, 0, 0, 0, NULL);
17187 #endif
17188
17189 ; return 0; }
17190 EOF
17191 if { (eval echo configure:17192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17192   rm -rf conftest*
17193   ol_cv_db_db41=yes
17194 else
17195   echo "configure: failed program was:" >&5
17196   cat conftest.$ac_ext >&5
17197   rm -rf conftest*
17198   ol_cv_db_db41=no
17199 fi
17200 rm -f conftest*
17201
17202         LIBS="$ol_LIBS"
17203
17204 fi
17205
17206 echo "$ac_t""$ol_cv_db_db41" 1>&6
17207
17208         if test $ol_cv_db_db41 = yes ; then
17209                 ol_cv_lib_db=-ldb41
17210         fi
17211 fi
17212
17213 if test $ol_cv_lib_db = no ; then
17214         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17215 echo "configure:17216: checking for Berkeley DB link (-ldb-41)" >&5
17216 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17217   echo $ac_n "(cached) $ac_c" 1>&6
17218 else
17219   
17220         ol_DB_LIB=-ldb-41
17221         ol_LIBS=$LIBS
17222         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17223
17224         cat > conftest.$ac_ext <<EOF
17225 #line 17226 "configure"
17226 #include "confdefs.h"
17227
17228 #ifdef HAVE_DB_185_H
17229 # include <db_185.h>
17230 #else
17231 # include <db.h>
17232 #endif
17233
17234 #ifndef DB_VERSION_MAJOR
17235 # define DB_VERSION_MAJOR 1
17236 #endif
17237
17238 #ifndef NULL
17239 #define NULL ((void*)0)
17240 #endif
17241
17242 int main() {
17243
17244 #if DB_VERSION_MAJOR > 1
17245         {
17246                 char *version;
17247                 int major, minor, patch;
17248
17249                 version = db_version( &major, &minor, &patch );
17250
17251                 if( major != DB_VERSION_MAJOR ||
17252                         minor < DB_VERSION_MINOR )
17253                 {
17254                         printf("Berkeley DB version mismatch\n"
17255                                 "\texpected: %s\n\tgot: %s\n",
17256                                 DB_VERSION_STRING, version);
17257                         return 1;
17258                 }
17259         }
17260 #endif
17261
17262 #if DB_VERSION_MAJOR > 2
17263         db_env_create( NULL, 0 );
17264 #elif DB_VERSION_MAJOR > 1
17265         db_appexit( NULL );
17266 #else
17267         (void) dbopen( NULL, 0, 0, 0, NULL);
17268 #endif
17269
17270 ; return 0; }
17271 EOF
17272 if { (eval echo configure:17273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17273   rm -rf conftest*
17274   ol_cv_db_db_41=yes
17275 else
17276   echo "configure: failed program was:" >&5
17277   cat conftest.$ac_ext >&5
17278   rm -rf conftest*
17279   ol_cv_db_db_41=no
17280 fi
17281 rm -f conftest*
17282
17283         LIBS="$ol_LIBS"
17284
17285 fi
17286
17287 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17288
17289         if test $ol_cv_db_db_41 = yes ; then
17290                 ol_cv_lib_db=-ldb-41
17291         fi
17292 fi
17293
17294 if test $ol_cv_lib_db = no ; then
17295         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17296 echo "configure:17297: checking for Berkeley DB link (-ldb-4.1)" >&5
17297 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17298   echo $ac_n "(cached) $ac_c" 1>&6
17299 else
17300   
17301         ol_DB_LIB=-ldb-4.1
17302         ol_LIBS=$LIBS
17303         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17304
17305         cat > conftest.$ac_ext <<EOF
17306 #line 17307 "configure"
17307 #include "confdefs.h"
17308
17309 #ifdef HAVE_DB_185_H
17310 # include <db_185.h>
17311 #else
17312 # include <db.h>
17313 #endif
17314
17315 #ifndef DB_VERSION_MAJOR
17316 # define DB_VERSION_MAJOR 1
17317 #endif
17318
17319 #ifndef NULL
17320 #define NULL ((void*)0)
17321 #endif
17322
17323 int main() {
17324
17325 #if DB_VERSION_MAJOR > 1
17326         {
17327                 char *version;
17328                 int major, minor, patch;
17329
17330                 version = db_version( &major, &minor, &patch );
17331
17332                 if( major != DB_VERSION_MAJOR ||
17333                         minor < DB_VERSION_MINOR )
17334                 {
17335                         printf("Berkeley DB version mismatch\n"
17336                                 "\texpected: %s\n\tgot: %s\n",
17337                                 DB_VERSION_STRING, version);
17338                         return 1;
17339                 }
17340         }
17341 #endif
17342
17343 #if DB_VERSION_MAJOR > 2
17344         db_env_create( NULL, 0 );
17345 #elif DB_VERSION_MAJOR > 1
17346         db_appexit( NULL );
17347 #else
17348         (void) dbopen( NULL, 0, 0, 0, NULL);
17349 #endif
17350
17351 ; return 0; }
17352 EOF
17353 if { (eval echo configure:17354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17354   rm -rf conftest*
17355   ol_cv_db_db_4_dot_1=yes
17356 else
17357   echo "configure: failed program was:" >&5
17358   cat conftest.$ac_ext >&5
17359   rm -rf conftest*
17360   ol_cv_db_db_4_dot_1=no
17361 fi
17362 rm -f conftest*
17363
17364         LIBS="$ol_LIBS"
17365
17366 fi
17367
17368 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17369
17370         if test $ol_cv_db_db_4_dot_1 = yes ; then
17371                 ol_cv_lib_db=-ldb-4.1
17372         fi
17373 fi
17374
17375 if test $ol_cv_lib_db = no ; then
17376         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17377 echo "configure:17378: checking for Berkeley DB link (-ldb-4-1)" >&5
17378 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17379   echo $ac_n "(cached) $ac_c" 1>&6
17380 else
17381   
17382         ol_DB_LIB=-ldb-4-1
17383         ol_LIBS=$LIBS
17384         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17385
17386         cat > conftest.$ac_ext <<EOF
17387 #line 17388 "configure"
17388 #include "confdefs.h"
17389
17390 #ifdef HAVE_DB_185_H
17391 # include <db_185.h>
17392 #else
17393 # include <db.h>
17394 #endif
17395
17396 #ifndef DB_VERSION_MAJOR
17397 # define DB_VERSION_MAJOR 1
17398 #endif
17399
17400 #ifndef NULL
17401 #define NULL ((void*)0)
17402 #endif
17403
17404 int main() {
17405
17406 #if DB_VERSION_MAJOR > 1
17407         {
17408                 char *version;
17409                 int major, minor, patch;
17410
17411                 version = db_version( &major, &minor, &patch );
17412
17413                 if( major != DB_VERSION_MAJOR ||
17414                         minor < DB_VERSION_MINOR )
17415                 {
17416                         printf("Berkeley DB version mismatch\n"
17417                                 "\texpected: %s\n\tgot: %s\n",
17418                                 DB_VERSION_STRING, version);
17419                         return 1;
17420                 }
17421         }
17422 #endif
17423
17424 #if DB_VERSION_MAJOR > 2
17425         db_env_create( NULL, 0 );
17426 #elif DB_VERSION_MAJOR > 1
17427         db_appexit( NULL );
17428 #else
17429         (void) dbopen( NULL, 0, 0, 0, NULL);
17430 #endif
17431
17432 ; return 0; }
17433 EOF
17434 if { (eval echo configure:17435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17435   rm -rf conftest*
17436   ol_cv_db_db_4_1=yes
17437 else
17438   echo "configure: failed program was:" >&5
17439   cat conftest.$ac_ext >&5
17440   rm -rf conftest*
17441   ol_cv_db_db_4_1=no
17442 fi
17443 rm -f conftest*
17444
17445         LIBS="$ol_LIBS"
17446
17447 fi
17448
17449 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17450
17451         if test $ol_cv_db_db_4_1 = yes ; then
17452                 ol_cv_lib_db=-ldb-4-1
17453         fi
17454 fi
17455
17456 if test $ol_cv_lib_db = no ; then
17457         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17458 echo "configure:17459: checking for Berkeley DB link (-ldb3)" >&5
17459 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17460   echo $ac_n "(cached) $ac_c" 1>&6
17461 else
17462   
17463         ol_DB_LIB=-ldb3
17464         ol_LIBS=$LIBS
17465         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17466
17467         cat > conftest.$ac_ext <<EOF
17468 #line 17469 "configure"
17469 #include "confdefs.h"
17470
17471 #ifdef HAVE_DB_185_H
17472 # include <db_185.h>
17473 #else
17474 # include <db.h>
17475 #endif
17476
17477 #ifndef DB_VERSION_MAJOR
17478 # define DB_VERSION_MAJOR 1
17479 #endif
17480
17481 #ifndef NULL
17482 #define NULL ((void*)0)
17483 #endif
17484
17485 int main() {
17486
17487 #if DB_VERSION_MAJOR > 1
17488         {
17489                 char *version;
17490                 int major, minor, patch;
17491
17492                 version = db_version( &major, &minor, &patch );
17493
17494                 if( major != DB_VERSION_MAJOR ||
17495                         minor < DB_VERSION_MINOR )
17496                 {
17497                         printf("Berkeley DB version mismatch\n"
17498                                 "\texpected: %s\n\tgot: %s\n",
17499                                 DB_VERSION_STRING, version);
17500                         return 1;
17501                 }
17502         }
17503 #endif
17504
17505 #if DB_VERSION_MAJOR > 2
17506         db_env_create( NULL, 0 );
17507 #elif DB_VERSION_MAJOR > 1
17508         db_appexit( NULL );
17509 #else
17510         (void) dbopen( NULL, 0, 0, 0, NULL);
17511 #endif
17512
17513 ; return 0; }
17514 EOF
17515 if { (eval echo configure:17516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17516   rm -rf conftest*
17517   ol_cv_db_db3=yes
17518 else
17519   echo "configure: failed program was:" >&5
17520   cat conftest.$ac_ext >&5
17521   rm -rf conftest*
17522   ol_cv_db_db3=no
17523 fi
17524 rm -f conftest*
17525
17526         LIBS="$ol_LIBS"
17527
17528 fi
17529
17530 echo "$ac_t""$ol_cv_db_db3" 1>&6
17531
17532         if test $ol_cv_db_db3 = yes ; then
17533                 ol_cv_lib_db=-ldb3
17534         fi
17535 fi
17536
17537 if test $ol_cv_lib_db = no ; then
17538         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17539 echo "configure:17540: checking for Berkeley DB link (-ldb-3)" >&5
17540 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17541   echo $ac_n "(cached) $ac_c" 1>&6
17542 else
17543   
17544         ol_DB_LIB=-ldb-3
17545         ol_LIBS=$LIBS
17546         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17547
17548         cat > conftest.$ac_ext <<EOF
17549 #line 17550 "configure"
17550 #include "confdefs.h"
17551
17552 #ifdef HAVE_DB_185_H
17553 # include <db_185.h>
17554 #else
17555 # include <db.h>
17556 #endif
17557
17558 #ifndef DB_VERSION_MAJOR
17559 # define DB_VERSION_MAJOR 1
17560 #endif
17561
17562 #ifndef NULL
17563 #define NULL ((void*)0)
17564 #endif
17565
17566 int main() {
17567
17568 #if DB_VERSION_MAJOR > 1
17569         {
17570                 char *version;
17571                 int major, minor, patch;
17572
17573                 version = db_version( &major, &minor, &patch );
17574
17575                 if( major != DB_VERSION_MAJOR ||
17576                         minor < DB_VERSION_MINOR )
17577                 {
17578                         printf("Berkeley DB version mismatch\n"
17579                                 "\texpected: %s\n\tgot: %s\n",
17580                                 DB_VERSION_STRING, version);
17581                         return 1;
17582                 }
17583         }
17584 #endif
17585
17586 #if DB_VERSION_MAJOR > 2
17587         db_env_create( NULL, 0 );
17588 #elif DB_VERSION_MAJOR > 1
17589         db_appexit( NULL );
17590 #else
17591         (void) dbopen( NULL, 0, 0, 0, NULL);
17592 #endif
17593
17594 ; return 0; }
17595 EOF
17596 if { (eval echo configure:17597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17597   rm -rf conftest*
17598   ol_cv_db_db_3=yes
17599 else
17600   echo "configure: failed program was:" >&5
17601   cat conftest.$ac_ext >&5
17602   rm -rf conftest*
17603   ol_cv_db_db_3=no
17604 fi
17605 rm -f conftest*
17606
17607         LIBS="$ol_LIBS"
17608
17609 fi
17610
17611 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17612
17613         if test $ol_cv_db_db_3 = yes ; then
17614                 ol_cv_lib_db=-ldb-3
17615         fi
17616 fi
17617
17618 if test $ol_cv_lib_db = no ; then
17619         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17620 echo "configure:17621: checking for Berkeley DB link (-ldb2)" >&5
17621 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17622   echo $ac_n "(cached) $ac_c" 1>&6
17623 else
17624   
17625         ol_DB_LIB=-ldb2
17626         ol_LIBS=$LIBS
17627         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17628
17629         cat > conftest.$ac_ext <<EOF
17630 #line 17631 "configure"
17631 #include "confdefs.h"
17632
17633 #ifdef HAVE_DB_185_H
17634 # include <db_185.h>
17635 #else
17636 # include <db.h>
17637 #endif
17638
17639 #ifndef DB_VERSION_MAJOR
17640 # define DB_VERSION_MAJOR 1
17641 #endif
17642
17643 #ifndef NULL
17644 #define NULL ((void*)0)
17645 #endif
17646
17647 int main() {
17648
17649 #if DB_VERSION_MAJOR > 1
17650         {
17651                 char *version;
17652                 int major, minor, patch;
17653
17654                 version = db_version( &major, &minor, &patch );
17655
17656                 if( major != DB_VERSION_MAJOR ||
17657                         minor < DB_VERSION_MINOR )
17658                 {
17659                         printf("Berkeley DB version mismatch\n"
17660                                 "\texpected: %s\n\tgot: %s\n",
17661                                 DB_VERSION_STRING, version);
17662                         return 1;
17663                 }
17664         }
17665 #endif
17666
17667 #if DB_VERSION_MAJOR > 2
17668         db_env_create( NULL, 0 );
17669 #elif DB_VERSION_MAJOR > 1
17670         db_appexit( NULL );
17671 #else
17672         (void) dbopen( NULL, 0, 0, 0, NULL);
17673 #endif
17674
17675 ; return 0; }
17676 EOF
17677 if { (eval echo configure:17678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17678   rm -rf conftest*
17679   ol_cv_db_db2=yes
17680 else
17681   echo "configure: failed program was:" >&5
17682   cat conftest.$ac_ext >&5
17683   rm -rf conftest*
17684   ol_cv_db_db2=no
17685 fi
17686 rm -f conftest*
17687
17688         LIBS="$ol_LIBS"
17689
17690 fi
17691
17692 echo "$ac_t""$ol_cv_db_db2" 1>&6
17693
17694         if test $ol_cv_db_db2 = yes ; then
17695                 ol_cv_lib_db=-ldb2
17696         fi
17697 fi
17698
17699 if test $ol_cv_lib_db = no ; then
17700         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17701 echo "configure:17702: checking for Berkeley DB link (-ldb-2)" >&5
17702 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17703   echo $ac_n "(cached) $ac_c" 1>&6
17704 else
17705   
17706         ol_DB_LIB=-ldb-2
17707         ol_LIBS=$LIBS
17708         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17709
17710         cat > conftest.$ac_ext <<EOF
17711 #line 17712 "configure"
17712 #include "confdefs.h"
17713
17714 #ifdef HAVE_DB_185_H
17715 # include <db_185.h>
17716 #else
17717 # include <db.h>
17718 #endif
17719
17720 #ifndef DB_VERSION_MAJOR
17721 # define DB_VERSION_MAJOR 1
17722 #endif
17723
17724 #ifndef NULL
17725 #define NULL ((void*)0)
17726 #endif
17727
17728 int main() {
17729
17730 #if DB_VERSION_MAJOR > 1
17731         {
17732                 char *version;
17733                 int major, minor, patch;
17734
17735                 version = db_version( &major, &minor, &patch );
17736
17737                 if( major != DB_VERSION_MAJOR ||
17738                         minor < DB_VERSION_MINOR )
17739                 {
17740                         printf("Berkeley DB version mismatch\n"
17741                                 "\texpected: %s\n\tgot: %s\n",
17742                                 DB_VERSION_STRING, version);
17743                         return 1;
17744                 }
17745         }
17746 #endif
17747
17748 #if DB_VERSION_MAJOR > 2
17749         db_env_create( NULL, 0 );
17750 #elif DB_VERSION_MAJOR > 1
17751         db_appexit( NULL );
17752 #else
17753         (void) dbopen( NULL, 0, 0, 0, NULL);
17754 #endif
17755
17756 ; return 0; }
17757 EOF
17758 if { (eval echo configure:17759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17759   rm -rf conftest*
17760   ol_cv_db_db_2=yes
17761 else
17762   echo "configure: failed program was:" >&5
17763   cat conftest.$ac_ext >&5
17764   rm -rf conftest*
17765   ol_cv_db_db_2=no
17766 fi
17767 rm -f conftest*
17768
17769         LIBS="$ol_LIBS"
17770
17771 fi
17772
17773 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17774
17775         if test $ol_cv_db_db_2 = yes ; then
17776                 ol_cv_lib_db=-ldb-2
17777         fi
17778 fi
17779
17780 if test $ol_cv_lib_db = no ; then
17781         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17782 echo "configure:17783: checking for Berkeley DB link (-ldb1)" >&5
17783 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17784   echo $ac_n "(cached) $ac_c" 1>&6
17785 else
17786   
17787         ol_DB_LIB=-ldb1
17788         ol_LIBS=$LIBS
17789         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17790
17791         cat > conftest.$ac_ext <<EOF
17792 #line 17793 "configure"
17793 #include "confdefs.h"
17794
17795 #ifdef HAVE_DB_185_H
17796 # include <db_185.h>
17797 #else
17798 # include <db.h>
17799 #endif
17800
17801 #ifndef DB_VERSION_MAJOR
17802 # define DB_VERSION_MAJOR 1
17803 #endif
17804
17805 #ifndef NULL
17806 #define NULL ((void*)0)
17807 #endif
17808
17809 int main() {
17810
17811 #if DB_VERSION_MAJOR > 1
17812         {
17813                 char *version;
17814                 int major, minor, patch;
17815
17816                 version = db_version( &major, &minor, &patch );
17817
17818                 if( major != DB_VERSION_MAJOR ||
17819                         minor < DB_VERSION_MINOR )
17820                 {
17821                         printf("Berkeley DB version mismatch\n"
17822                                 "\texpected: %s\n\tgot: %s\n",
17823                                 DB_VERSION_STRING, version);
17824                         return 1;
17825                 }
17826         }
17827 #endif
17828
17829 #if DB_VERSION_MAJOR > 2
17830         db_env_create( NULL, 0 );
17831 #elif DB_VERSION_MAJOR > 1
17832         db_appexit( NULL );
17833 #else
17834         (void) dbopen( NULL, 0, 0, 0, NULL);
17835 #endif
17836
17837 ; return 0; }
17838 EOF
17839 if { (eval echo configure:17840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17840   rm -rf conftest*
17841   ol_cv_db_db1=yes
17842 else
17843   echo "configure: failed program was:" >&5
17844   cat conftest.$ac_ext >&5
17845   rm -rf conftest*
17846   ol_cv_db_db1=no
17847 fi
17848 rm -f conftest*
17849
17850         LIBS="$ol_LIBS"
17851
17852 fi
17853
17854 echo "$ac_t""$ol_cv_db_db1" 1>&6
17855
17856         if test $ol_cv_db_db1 = yes ; then
17857                 ol_cv_lib_db=-ldb1
17858         fi
17859 fi
17860
17861 if test $ol_cv_lib_db = no ; then
17862         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17863 echo "configure:17864: checking for Berkeley DB link (-ldb-1)" >&5
17864 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17865   echo $ac_n "(cached) $ac_c" 1>&6
17866 else
17867   
17868         ol_DB_LIB=-ldb-1
17869         ol_LIBS=$LIBS
17870         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17871
17872         cat > conftest.$ac_ext <<EOF
17873 #line 17874 "configure"
17874 #include "confdefs.h"
17875
17876 #ifdef HAVE_DB_185_H
17877 # include <db_185.h>
17878 #else
17879 # include <db.h>
17880 #endif
17881
17882 #ifndef DB_VERSION_MAJOR
17883 # define DB_VERSION_MAJOR 1
17884 #endif
17885
17886 #ifndef NULL
17887 #define NULL ((void*)0)
17888 #endif
17889
17890 int main() {
17891
17892 #if DB_VERSION_MAJOR > 1
17893         {
17894                 char *version;
17895                 int major, minor, patch;
17896
17897                 version = db_version( &major, &minor, &patch );
17898
17899                 if( major != DB_VERSION_MAJOR ||
17900                         minor < DB_VERSION_MINOR )
17901                 {
17902                         printf("Berkeley DB version mismatch\n"
17903                                 "\texpected: %s\n\tgot: %s\n",
17904                                 DB_VERSION_STRING, version);
17905                         return 1;
17906                 }
17907         }
17908 #endif
17909
17910 #if DB_VERSION_MAJOR > 2
17911         db_env_create( NULL, 0 );
17912 #elif DB_VERSION_MAJOR > 1
17913         db_appexit( NULL );
17914 #else
17915         (void) dbopen( NULL, 0, 0, 0, NULL);
17916 #endif
17917
17918 ; return 0; }
17919 EOF
17920 if { (eval echo configure:17921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17921   rm -rf conftest*
17922   ol_cv_db_db_1=yes
17923 else
17924   echo "configure: failed program was:" >&5
17925   cat conftest.$ac_ext >&5
17926   rm -rf conftest*
17927   ol_cv_db_db_1=no
17928 fi
17929 rm -f conftest*
17930
17931         LIBS="$ol_LIBS"
17932
17933 fi
17934
17935 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17936
17937         if test $ol_cv_db_db_1 = yes ; then
17938                 ol_cv_lib_db=-ldb-1
17939         fi
17940 fi
17941
17942
17943                 if test "$ol_cv_lib_db" != no ; then
17944                         ol_cv_berkeley_db=yes
17945                 fi
17946         fi
17947 fi
17948
17949         else
17950                 ol_cv_berkeley_db=no
17951 for ac_hdr in db.h
17952 do
17953 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17954 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17955 echo "configure:17956: checking for $ac_hdr" >&5
17956 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17957   echo $ac_n "(cached) $ac_c" 1>&6
17958 else
17959   cat > conftest.$ac_ext <<EOF
17960 #line 17961 "configure"
17961 #include "confdefs.h"
17962 #include <$ac_hdr>
17963 EOF
17964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17965 { (eval echo configure:17966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17967 if test -z "$ac_err"; then
17968   rm -rf conftest*
17969   eval "ac_cv_header_$ac_safe=yes"
17970 else
17971   echo "$ac_err" >&5
17972   echo "configure: failed program was:" >&5
17973   cat conftest.$ac_ext >&5
17974   rm -rf conftest*
17975   eval "ac_cv_header_$ac_safe=no"
17976 fi
17977 rm -f conftest*
17978 fi
17979 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17980   echo "$ac_t""yes" 1>&6
17981     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17982   cat >> confdefs.h <<EOF
17983 #define $ac_tr_hdr 1
17984 EOF
17985  
17986 else
17987   echo "$ac_t""no" 1>&6
17988 fi
17989 done
17990
17991 if test $ac_cv_header_db_h = yes; then
17992         ol_cv_lib_db=no
17993 if test $ol_cv_lib_db = no ; then
17994         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17995 echo "configure:17996: checking for Berkeley DB link (default)" >&5
17996 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17997   echo $ac_n "(cached) $ac_c" 1>&6
17998 else
17999   
18000         ol_DB_LIB=
18001         ol_LIBS=$LIBS
18002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18003
18004         cat > conftest.$ac_ext <<EOF
18005 #line 18006 "configure"
18006 #include "confdefs.h"
18007
18008 #ifdef HAVE_DB_185_H
18009 # include <db_185.h>
18010 #else
18011 # include <db.h>
18012 #endif
18013
18014 #ifndef DB_VERSION_MAJOR
18015 # define DB_VERSION_MAJOR 1
18016 #endif
18017
18018 #ifndef NULL
18019 #define NULL ((void*)0)
18020 #endif
18021
18022 int main() {
18023
18024 #if DB_VERSION_MAJOR > 1
18025         {
18026                 char *version;
18027                 int major, minor, patch;
18028
18029                 version = db_version( &major, &minor, &patch );
18030
18031                 if( major != DB_VERSION_MAJOR ||
18032                         minor < DB_VERSION_MINOR )
18033                 {
18034                         printf("Berkeley DB version mismatch\n"
18035                                 "\texpected: %s\n\tgot: %s\n",
18036                                 DB_VERSION_STRING, version);
18037                         return 1;
18038                 }
18039         }
18040 #endif
18041
18042 #if DB_VERSION_MAJOR > 2
18043         db_env_create( NULL, 0 );
18044 #elif DB_VERSION_MAJOR > 1
18045         db_appexit( NULL );
18046 #else
18047         (void) dbopen( NULL, 0, 0, 0, NULL);
18048 #endif
18049
18050 ; return 0; }
18051 EOF
18052 if { (eval echo configure:18053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18053   rm -rf conftest*
18054   ol_cv_db_none=yes
18055 else
18056   echo "configure: failed program was:" >&5
18057   cat conftest.$ac_ext >&5
18058   rm -rf conftest*
18059   ol_cv_db_none=no
18060 fi
18061 rm -f conftest*
18062
18063         LIBS="$ol_LIBS"
18064
18065 fi
18066
18067 echo "$ac_t""$ol_cv_db_none" 1>&6
18068
18069         if test $ol_cv_db_none = yes ; then
18070                 ol_cv_lib_db=yes
18071         fi
18072 fi
18073
18074 if test $ol_cv_lib_db = no ; then
18075         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18076 echo "configure:18077: checking for Berkeley DB link (-ldb42)" >&5
18077 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18078   echo $ac_n "(cached) $ac_c" 1>&6
18079 else
18080   
18081         ol_DB_LIB=-ldb42
18082         ol_LIBS=$LIBS
18083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18084
18085         cat > conftest.$ac_ext <<EOF
18086 #line 18087 "configure"
18087 #include "confdefs.h"
18088
18089 #ifdef HAVE_DB_185_H
18090 # include <db_185.h>
18091 #else
18092 # include <db.h>
18093 #endif
18094
18095 #ifndef DB_VERSION_MAJOR
18096 # define DB_VERSION_MAJOR 1
18097 #endif
18098
18099 #ifndef NULL
18100 #define NULL ((void*)0)
18101 #endif
18102
18103 int main() {
18104
18105 #if DB_VERSION_MAJOR > 1
18106         {
18107                 char *version;
18108                 int major, minor, patch;
18109
18110                 version = db_version( &major, &minor, &patch );
18111
18112                 if( major != DB_VERSION_MAJOR ||
18113                         minor < DB_VERSION_MINOR )
18114                 {
18115                         printf("Berkeley DB version mismatch\n"
18116                                 "\texpected: %s\n\tgot: %s\n",
18117                                 DB_VERSION_STRING, version);
18118                         return 1;
18119                 }
18120         }
18121 #endif
18122
18123 #if DB_VERSION_MAJOR > 2
18124         db_env_create( NULL, 0 );
18125 #elif DB_VERSION_MAJOR > 1
18126         db_appexit( NULL );
18127 #else
18128         (void) dbopen( NULL, 0, 0, 0, NULL);
18129 #endif
18130
18131 ; return 0; }
18132 EOF
18133 if { (eval echo configure:18134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18134   rm -rf conftest*
18135   ol_cv_db_db42=yes
18136 else
18137   echo "configure: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   rm -rf conftest*
18140   ol_cv_db_db42=no
18141 fi
18142 rm -f conftest*
18143
18144         LIBS="$ol_LIBS"
18145
18146 fi
18147
18148 echo "$ac_t""$ol_cv_db_db42" 1>&6
18149
18150         if test $ol_cv_db_db42 = yes ; then
18151                 ol_cv_lib_db=-ldb42
18152         fi
18153 fi
18154
18155 if test $ol_cv_lib_db = no ; then
18156         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18157 echo "configure:18158: checking for Berkeley DB link (-ldb-42)" >&5
18158 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   
18162         ol_DB_LIB=-ldb-42
18163         ol_LIBS=$LIBS
18164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18165
18166         cat > conftest.$ac_ext <<EOF
18167 #line 18168 "configure"
18168 #include "confdefs.h"
18169
18170 #ifdef HAVE_DB_185_H
18171 # include <db_185.h>
18172 #else
18173 # include <db.h>
18174 #endif
18175
18176 #ifndef DB_VERSION_MAJOR
18177 # define DB_VERSION_MAJOR 1
18178 #endif
18179
18180 #ifndef NULL
18181 #define NULL ((void*)0)
18182 #endif
18183
18184 int main() {
18185
18186 #if DB_VERSION_MAJOR > 1
18187         {
18188                 char *version;
18189                 int major, minor, patch;
18190
18191                 version = db_version( &major, &minor, &patch );
18192
18193                 if( major != DB_VERSION_MAJOR ||
18194                         minor < DB_VERSION_MINOR )
18195                 {
18196                         printf("Berkeley DB version mismatch\n"
18197                                 "\texpected: %s\n\tgot: %s\n",
18198                                 DB_VERSION_STRING, version);
18199                         return 1;
18200                 }
18201         }
18202 #endif
18203
18204 #if DB_VERSION_MAJOR > 2
18205         db_env_create( NULL, 0 );
18206 #elif DB_VERSION_MAJOR > 1
18207         db_appexit( NULL );
18208 #else
18209         (void) dbopen( NULL, 0, 0, 0, NULL);
18210 #endif
18211
18212 ; return 0; }
18213 EOF
18214 if { (eval echo configure:18215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18215   rm -rf conftest*
18216   ol_cv_db_db_42=yes
18217 else
18218   echo "configure: failed program was:" >&5
18219   cat conftest.$ac_ext >&5
18220   rm -rf conftest*
18221   ol_cv_db_db_42=no
18222 fi
18223 rm -f conftest*
18224
18225         LIBS="$ol_LIBS"
18226
18227 fi
18228
18229 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18230
18231         if test $ol_cv_db_db_42 = yes ; then
18232                 ol_cv_lib_db=-ldb-42
18233         fi
18234 fi
18235
18236 if test $ol_cv_lib_db = no ; then
18237         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18238 echo "configure:18239: checking for Berkeley DB link (-ldb-4.2)" >&5
18239 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18240   echo $ac_n "(cached) $ac_c" 1>&6
18241 else
18242   
18243         ol_DB_LIB=-ldb-4.2
18244         ol_LIBS=$LIBS
18245         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18246
18247         cat > conftest.$ac_ext <<EOF
18248 #line 18249 "configure"
18249 #include "confdefs.h"
18250
18251 #ifdef HAVE_DB_185_H
18252 # include <db_185.h>
18253 #else
18254 # include <db.h>
18255 #endif
18256
18257 #ifndef DB_VERSION_MAJOR
18258 # define DB_VERSION_MAJOR 1
18259 #endif
18260
18261 #ifndef NULL
18262 #define NULL ((void*)0)
18263 #endif
18264
18265 int main() {
18266
18267 #if DB_VERSION_MAJOR > 1
18268         {
18269                 char *version;
18270                 int major, minor, patch;
18271
18272                 version = db_version( &major, &minor, &patch );
18273
18274                 if( major != DB_VERSION_MAJOR ||
18275                         minor < DB_VERSION_MINOR )
18276                 {
18277                         printf("Berkeley DB version mismatch\n"
18278                                 "\texpected: %s\n\tgot: %s\n",
18279                                 DB_VERSION_STRING, version);
18280                         return 1;
18281                 }
18282         }
18283 #endif
18284
18285 #if DB_VERSION_MAJOR > 2
18286         db_env_create( NULL, 0 );
18287 #elif DB_VERSION_MAJOR > 1
18288         db_appexit( NULL );
18289 #else
18290         (void) dbopen( NULL, 0, 0, 0, NULL);
18291 #endif
18292
18293 ; return 0; }
18294 EOF
18295 if { (eval echo configure:18296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18296   rm -rf conftest*
18297   ol_cv_db_db_4_dot_2=yes
18298 else
18299   echo "configure: failed program was:" >&5
18300   cat conftest.$ac_ext >&5
18301   rm -rf conftest*
18302   ol_cv_db_db_4_dot_2=no
18303 fi
18304 rm -f conftest*
18305
18306         LIBS="$ol_LIBS"
18307
18308 fi
18309
18310 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18311
18312         if test $ol_cv_db_db_4_dot_2 = yes ; then
18313                 ol_cv_lib_db=-ldb-4.2
18314         fi
18315 fi
18316
18317 if test $ol_cv_lib_db = no ; then
18318         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18319 echo "configure:18320: checking for Berkeley DB link (-ldb-4-2)" >&5
18320 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18321   echo $ac_n "(cached) $ac_c" 1>&6
18322 else
18323   
18324         ol_DB_LIB=-ldb-4-2
18325         ol_LIBS=$LIBS
18326         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18327
18328         cat > conftest.$ac_ext <<EOF
18329 #line 18330 "configure"
18330 #include "confdefs.h"
18331
18332 #ifdef HAVE_DB_185_H
18333 # include <db_185.h>
18334 #else
18335 # include <db.h>
18336 #endif
18337
18338 #ifndef DB_VERSION_MAJOR
18339 # define DB_VERSION_MAJOR 1
18340 #endif
18341
18342 #ifndef NULL
18343 #define NULL ((void*)0)
18344 #endif
18345
18346 int main() {
18347
18348 #if DB_VERSION_MAJOR > 1
18349         {
18350                 char *version;
18351                 int major, minor, patch;
18352
18353                 version = db_version( &major, &minor, &patch );
18354
18355                 if( major != DB_VERSION_MAJOR ||
18356                         minor < DB_VERSION_MINOR )
18357                 {
18358                         printf("Berkeley DB version mismatch\n"
18359                                 "\texpected: %s\n\tgot: %s\n",
18360                                 DB_VERSION_STRING, version);
18361                         return 1;
18362                 }
18363         }
18364 #endif
18365
18366 #if DB_VERSION_MAJOR > 2
18367         db_env_create( NULL, 0 );
18368 #elif DB_VERSION_MAJOR > 1
18369         db_appexit( NULL );
18370 #else
18371         (void) dbopen( NULL, 0, 0, 0, NULL);
18372 #endif
18373
18374 ; return 0; }
18375 EOF
18376 if { (eval echo configure:18377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18377   rm -rf conftest*
18378   ol_cv_db_db_4_2=yes
18379 else
18380   echo "configure: failed program was:" >&5
18381   cat conftest.$ac_ext >&5
18382   rm -rf conftest*
18383   ol_cv_db_db_4_2=no
18384 fi
18385 rm -f conftest*
18386
18387         LIBS="$ol_LIBS"
18388
18389 fi
18390
18391 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18392
18393         if test $ol_cv_db_db_4_2 = yes ; then
18394                 ol_cv_lib_db=-ldb-4-2
18395         fi
18396 fi
18397
18398 if test $ol_cv_lib_db = no ; then
18399         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18400 echo "configure:18401: checking for Berkeley DB link (-ldb-4)" >&5
18401 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18402   echo $ac_n "(cached) $ac_c" 1>&6
18403 else
18404   
18405         ol_DB_LIB=-ldb-4
18406         ol_LIBS=$LIBS
18407         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18408
18409         cat > conftest.$ac_ext <<EOF
18410 #line 18411 "configure"
18411 #include "confdefs.h"
18412
18413 #ifdef HAVE_DB_185_H
18414 # include <db_185.h>
18415 #else
18416 # include <db.h>
18417 #endif
18418
18419 #ifndef DB_VERSION_MAJOR
18420 # define DB_VERSION_MAJOR 1
18421 #endif
18422
18423 #ifndef NULL
18424 #define NULL ((void*)0)
18425 #endif
18426
18427 int main() {
18428
18429 #if DB_VERSION_MAJOR > 1
18430         {
18431                 char *version;
18432                 int major, minor, patch;
18433
18434                 version = db_version( &major, &minor, &patch );
18435
18436                 if( major != DB_VERSION_MAJOR ||
18437                         minor < DB_VERSION_MINOR )
18438                 {
18439                         printf("Berkeley DB version mismatch\n"
18440                                 "\texpected: %s\n\tgot: %s\n",
18441                                 DB_VERSION_STRING, version);
18442                         return 1;
18443                 }
18444         }
18445 #endif
18446
18447 #if DB_VERSION_MAJOR > 2
18448         db_env_create( NULL, 0 );
18449 #elif DB_VERSION_MAJOR > 1
18450         db_appexit( NULL );
18451 #else
18452         (void) dbopen( NULL, 0, 0, 0, NULL);
18453 #endif
18454
18455 ; return 0; }
18456 EOF
18457 if { (eval echo configure:18458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18458   rm -rf conftest*
18459   ol_cv_db_db_4=yes
18460 else
18461   echo "configure: failed program was:" >&5
18462   cat conftest.$ac_ext >&5
18463   rm -rf conftest*
18464   ol_cv_db_db_4=no
18465 fi
18466 rm -f conftest*
18467
18468         LIBS="$ol_LIBS"
18469
18470 fi
18471
18472 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18473
18474         if test $ol_cv_db_db_4 = yes ; then
18475                 ol_cv_lib_db=-ldb-4
18476         fi
18477 fi
18478
18479 if test $ol_cv_lib_db = no ; then
18480         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18481 echo "configure:18482: checking for Berkeley DB link (-ldb4)" >&5
18482 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18483   echo $ac_n "(cached) $ac_c" 1>&6
18484 else
18485   
18486         ol_DB_LIB=-ldb4
18487         ol_LIBS=$LIBS
18488         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18489
18490         cat > conftest.$ac_ext <<EOF
18491 #line 18492 "configure"
18492 #include "confdefs.h"
18493
18494 #ifdef HAVE_DB_185_H
18495 # include <db_185.h>
18496 #else
18497 # include <db.h>
18498 #endif
18499
18500 #ifndef DB_VERSION_MAJOR
18501 # define DB_VERSION_MAJOR 1
18502 #endif
18503
18504 #ifndef NULL
18505 #define NULL ((void*)0)
18506 #endif
18507
18508 int main() {
18509
18510 #if DB_VERSION_MAJOR > 1
18511         {
18512                 char *version;
18513                 int major, minor, patch;
18514
18515                 version = db_version( &major, &minor, &patch );
18516
18517                 if( major != DB_VERSION_MAJOR ||
18518                         minor < DB_VERSION_MINOR )
18519                 {
18520                         printf("Berkeley DB version mismatch\n"
18521                                 "\texpected: %s\n\tgot: %s\n",
18522                                 DB_VERSION_STRING, version);
18523                         return 1;
18524                 }
18525         }
18526 #endif
18527
18528 #if DB_VERSION_MAJOR > 2
18529         db_env_create( NULL, 0 );
18530 #elif DB_VERSION_MAJOR > 1
18531         db_appexit( NULL );
18532 #else
18533         (void) dbopen( NULL, 0, 0, 0, NULL);
18534 #endif
18535
18536 ; return 0; }
18537 EOF
18538 if { (eval echo configure:18539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18539   rm -rf conftest*
18540   ol_cv_db_db4=yes
18541 else
18542   echo "configure: failed program was:" >&5
18543   cat conftest.$ac_ext >&5
18544   rm -rf conftest*
18545   ol_cv_db_db4=no
18546 fi
18547 rm -f conftest*
18548
18549         LIBS="$ol_LIBS"
18550
18551 fi
18552
18553 echo "$ac_t""$ol_cv_db_db4" 1>&6
18554
18555         if test $ol_cv_db_db4 = yes ; then
18556                 ol_cv_lib_db=-ldb4
18557         fi
18558 fi
18559
18560 if test $ol_cv_lib_db = no ; then
18561         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18562 echo "configure:18563: checking for Berkeley DB link (-ldb)" >&5
18563 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18564   echo $ac_n "(cached) $ac_c" 1>&6
18565 else
18566   
18567         ol_DB_LIB=-ldb
18568         ol_LIBS=$LIBS
18569         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18570
18571         cat > conftest.$ac_ext <<EOF
18572 #line 18573 "configure"
18573 #include "confdefs.h"
18574
18575 #ifdef HAVE_DB_185_H
18576 # include <db_185.h>
18577 #else
18578 # include <db.h>
18579 #endif
18580
18581 #ifndef DB_VERSION_MAJOR
18582 # define DB_VERSION_MAJOR 1
18583 #endif
18584
18585 #ifndef NULL
18586 #define NULL ((void*)0)
18587 #endif
18588
18589 int main() {
18590
18591 #if DB_VERSION_MAJOR > 1
18592         {
18593                 char *version;
18594                 int major, minor, patch;
18595
18596                 version = db_version( &major, &minor, &patch );
18597
18598                 if( major != DB_VERSION_MAJOR ||
18599                         minor < DB_VERSION_MINOR )
18600                 {
18601                         printf("Berkeley DB version mismatch\n"
18602                                 "\texpected: %s\n\tgot: %s\n",
18603                                 DB_VERSION_STRING, version);
18604                         return 1;
18605                 }
18606         }
18607 #endif
18608
18609 #if DB_VERSION_MAJOR > 2
18610         db_env_create( NULL, 0 );
18611 #elif DB_VERSION_MAJOR > 1
18612         db_appexit( NULL );
18613 #else
18614         (void) dbopen( NULL, 0, 0, 0, NULL);
18615 #endif
18616
18617 ; return 0; }
18618 EOF
18619 if { (eval echo configure:18620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18620   rm -rf conftest*
18621   ol_cv_db_db=yes
18622 else
18623   echo "configure: failed program was:" >&5
18624   cat conftest.$ac_ext >&5
18625   rm -rf conftest*
18626   ol_cv_db_db=no
18627 fi
18628 rm -f conftest*
18629
18630         LIBS="$ol_LIBS"
18631
18632 fi
18633
18634 echo "$ac_t""$ol_cv_db_db" 1>&6
18635
18636         if test $ol_cv_db_db = yes ; then
18637                 ol_cv_lib_db=-ldb
18638         fi
18639 fi
18640
18641 if test $ol_cv_lib_db = no ; then
18642         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18643 echo "configure:18644: checking for Berkeley DB link (-ldb41)" >&5
18644 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18645   echo $ac_n "(cached) $ac_c" 1>&6
18646 else
18647   
18648         ol_DB_LIB=-ldb41
18649         ol_LIBS=$LIBS
18650         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18651
18652         cat > conftest.$ac_ext <<EOF
18653 #line 18654 "configure"
18654 #include "confdefs.h"
18655
18656 #ifdef HAVE_DB_185_H
18657 # include <db_185.h>
18658 #else
18659 # include <db.h>
18660 #endif
18661
18662 #ifndef DB_VERSION_MAJOR
18663 # define DB_VERSION_MAJOR 1
18664 #endif
18665
18666 #ifndef NULL
18667 #define NULL ((void*)0)
18668 #endif
18669
18670 int main() {
18671
18672 #if DB_VERSION_MAJOR > 1
18673         {
18674                 char *version;
18675                 int major, minor, patch;
18676
18677                 version = db_version( &major, &minor, &patch );
18678
18679                 if( major != DB_VERSION_MAJOR ||
18680                         minor < DB_VERSION_MINOR )
18681                 {
18682                         printf("Berkeley DB version mismatch\n"
18683                                 "\texpected: %s\n\tgot: %s\n",
18684                                 DB_VERSION_STRING, version);
18685                         return 1;
18686                 }
18687         }
18688 #endif
18689
18690 #if DB_VERSION_MAJOR > 2
18691         db_env_create( NULL, 0 );
18692 #elif DB_VERSION_MAJOR > 1
18693         db_appexit( NULL );
18694 #else
18695         (void) dbopen( NULL, 0, 0, 0, NULL);
18696 #endif
18697
18698 ; return 0; }
18699 EOF
18700 if { (eval echo configure:18701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18701   rm -rf conftest*
18702   ol_cv_db_db41=yes
18703 else
18704   echo "configure: failed program was:" >&5
18705   cat conftest.$ac_ext >&5
18706   rm -rf conftest*
18707   ol_cv_db_db41=no
18708 fi
18709 rm -f conftest*
18710
18711         LIBS="$ol_LIBS"
18712
18713 fi
18714
18715 echo "$ac_t""$ol_cv_db_db41" 1>&6
18716
18717         if test $ol_cv_db_db41 = yes ; then
18718                 ol_cv_lib_db=-ldb41
18719         fi
18720 fi
18721
18722 if test $ol_cv_lib_db = no ; then
18723         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18724 echo "configure:18725: checking for Berkeley DB link (-ldb-41)" >&5
18725 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18726   echo $ac_n "(cached) $ac_c" 1>&6
18727 else
18728   
18729         ol_DB_LIB=-ldb-41
18730         ol_LIBS=$LIBS
18731         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18732
18733         cat > conftest.$ac_ext <<EOF
18734 #line 18735 "configure"
18735 #include "confdefs.h"
18736
18737 #ifdef HAVE_DB_185_H
18738 # include <db_185.h>
18739 #else
18740 # include <db.h>
18741 #endif
18742
18743 #ifndef DB_VERSION_MAJOR
18744 # define DB_VERSION_MAJOR 1
18745 #endif
18746
18747 #ifndef NULL
18748 #define NULL ((void*)0)
18749 #endif
18750
18751 int main() {
18752
18753 #if DB_VERSION_MAJOR > 1
18754         {
18755                 char *version;
18756                 int major, minor, patch;
18757
18758                 version = db_version( &major, &minor, &patch );
18759
18760                 if( major != DB_VERSION_MAJOR ||
18761                         minor < DB_VERSION_MINOR )
18762                 {
18763                         printf("Berkeley DB version mismatch\n"
18764                                 "\texpected: %s\n\tgot: %s\n",
18765                                 DB_VERSION_STRING, version);
18766                         return 1;
18767                 }
18768         }
18769 #endif
18770
18771 #if DB_VERSION_MAJOR > 2
18772         db_env_create( NULL, 0 );
18773 #elif DB_VERSION_MAJOR > 1
18774         db_appexit( NULL );
18775 #else
18776         (void) dbopen( NULL, 0, 0, 0, NULL);
18777 #endif
18778
18779 ; return 0; }
18780 EOF
18781 if { (eval echo configure:18782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18782   rm -rf conftest*
18783   ol_cv_db_db_41=yes
18784 else
18785   echo "configure: failed program was:" >&5
18786   cat conftest.$ac_ext >&5
18787   rm -rf conftest*
18788   ol_cv_db_db_41=no
18789 fi
18790 rm -f conftest*
18791
18792         LIBS="$ol_LIBS"
18793
18794 fi
18795
18796 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18797
18798         if test $ol_cv_db_db_41 = yes ; then
18799                 ol_cv_lib_db=-ldb-41
18800         fi
18801 fi
18802
18803 if test $ol_cv_lib_db = no ; then
18804         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18805 echo "configure:18806: checking for Berkeley DB link (-ldb-4.1)" >&5
18806 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18807   echo $ac_n "(cached) $ac_c" 1>&6
18808 else
18809   
18810         ol_DB_LIB=-ldb-4.1
18811         ol_LIBS=$LIBS
18812         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18813
18814         cat > conftest.$ac_ext <<EOF
18815 #line 18816 "configure"
18816 #include "confdefs.h"
18817
18818 #ifdef HAVE_DB_185_H
18819 # include <db_185.h>
18820 #else
18821 # include <db.h>
18822 #endif
18823
18824 #ifndef DB_VERSION_MAJOR
18825 # define DB_VERSION_MAJOR 1
18826 #endif
18827
18828 #ifndef NULL
18829 #define NULL ((void*)0)
18830 #endif
18831
18832 int main() {
18833
18834 #if DB_VERSION_MAJOR > 1
18835         {
18836                 char *version;
18837                 int major, minor, patch;
18838
18839                 version = db_version( &major, &minor, &patch );
18840
18841                 if( major != DB_VERSION_MAJOR ||
18842                         minor < DB_VERSION_MINOR )
18843                 {
18844                         printf("Berkeley DB version mismatch\n"
18845                                 "\texpected: %s\n\tgot: %s\n",
18846                                 DB_VERSION_STRING, version);
18847                         return 1;
18848                 }
18849         }
18850 #endif
18851
18852 #if DB_VERSION_MAJOR > 2
18853         db_env_create( NULL, 0 );
18854 #elif DB_VERSION_MAJOR > 1
18855         db_appexit( NULL );
18856 #else
18857         (void) dbopen( NULL, 0, 0, 0, NULL);
18858 #endif
18859
18860 ; return 0; }
18861 EOF
18862 if { (eval echo configure:18863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18863   rm -rf conftest*
18864   ol_cv_db_db_4_dot_1=yes
18865 else
18866   echo "configure: failed program was:" >&5
18867   cat conftest.$ac_ext >&5
18868   rm -rf conftest*
18869   ol_cv_db_db_4_dot_1=no
18870 fi
18871 rm -f conftest*
18872
18873         LIBS="$ol_LIBS"
18874
18875 fi
18876
18877 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18878
18879         if test $ol_cv_db_db_4_dot_1 = yes ; then
18880                 ol_cv_lib_db=-ldb-4.1
18881         fi
18882 fi
18883
18884 if test $ol_cv_lib_db = no ; then
18885         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18886 echo "configure:18887: checking for Berkeley DB link (-ldb-4-1)" >&5
18887 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18888   echo $ac_n "(cached) $ac_c" 1>&6
18889 else
18890   
18891         ol_DB_LIB=-ldb-4-1
18892         ol_LIBS=$LIBS
18893         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18894
18895         cat > conftest.$ac_ext <<EOF
18896 #line 18897 "configure"
18897 #include "confdefs.h"
18898
18899 #ifdef HAVE_DB_185_H
18900 # include <db_185.h>
18901 #else
18902 # include <db.h>
18903 #endif
18904
18905 #ifndef DB_VERSION_MAJOR
18906 # define DB_VERSION_MAJOR 1
18907 #endif
18908
18909 #ifndef NULL
18910 #define NULL ((void*)0)
18911 #endif
18912
18913 int main() {
18914
18915 #if DB_VERSION_MAJOR > 1
18916         {
18917                 char *version;
18918                 int major, minor, patch;
18919
18920                 version = db_version( &major, &minor, &patch );
18921
18922                 if( major != DB_VERSION_MAJOR ||
18923                         minor < DB_VERSION_MINOR )
18924                 {
18925                         printf("Berkeley DB version mismatch\n"
18926                                 "\texpected: %s\n\tgot: %s\n",
18927                                 DB_VERSION_STRING, version);
18928                         return 1;
18929                 }
18930         }
18931 #endif
18932
18933 #if DB_VERSION_MAJOR > 2
18934         db_env_create( NULL, 0 );
18935 #elif DB_VERSION_MAJOR > 1
18936         db_appexit( NULL );
18937 #else
18938         (void) dbopen( NULL, 0, 0, 0, NULL);
18939 #endif
18940
18941 ; return 0; }
18942 EOF
18943 if { (eval echo configure:18944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18944   rm -rf conftest*
18945   ol_cv_db_db_4_1=yes
18946 else
18947   echo "configure: failed program was:" >&5
18948   cat conftest.$ac_ext >&5
18949   rm -rf conftest*
18950   ol_cv_db_db_4_1=no
18951 fi
18952 rm -f conftest*
18953
18954         LIBS="$ol_LIBS"
18955
18956 fi
18957
18958 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18959
18960         if test $ol_cv_db_db_4_1 = yes ; then
18961                 ol_cv_lib_db=-ldb-4-1
18962         fi
18963 fi
18964
18965 if test $ol_cv_lib_db = no ; then
18966         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18967 echo "configure:18968: checking for Berkeley DB link (-ldb3)" >&5
18968 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18969   echo $ac_n "(cached) $ac_c" 1>&6
18970 else
18971   
18972         ol_DB_LIB=-ldb3
18973         ol_LIBS=$LIBS
18974         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18975
18976         cat > conftest.$ac_ext <<EOF
18977 #line 18978 "configure"
18978 #include "confdefs.h"
18979
18980 #ifdef HAVE_DB_185_H
18981 # include <db_185.h>
18982 #else
18983 # include <db.h>
18984 #endif
18985
18986 #ifndef DB_VERSION_MAJOR
18987 # define DB_VERSION_MAJOR 1
18988 #endif
18989
18990 #ifndef NULL
18991 #define NULL ((void*)0)
18992 #endif
18993
18994 int main() {
18995
18996 #if DB_VERSION_MAJOR > 1
18997         {
18998                 char *version;
18999                 int major, minor, patch;
19000
19001                 version = db_version( &major, &minor, &patch );
19002
19003                 if( major != DB_VERSION_MAJOR ||
19004                         minor < DB_VERSION_MINOR )
19005                 {
19006                         printf("Berkeley DB version mismatch\n"
19007                                 "\texpected: %s\n\tgot: %s\n",
19008                                 DB_VERSION_STRING, version);
19009                         return 1;
19010                 }
19011         }
19012 #endif
19013
19014 #if DB_VERSION_MAJOR > 2
19015         db_env_create( NULL, 0 );
19016 #elif DB_VERSION_MAJOR > 1
19017         db_appexit( NULL );
19018 #else
19019         (void) dbopen( NULL, 0, 0, 0, NULL);
19020 #endif
19021
19022 ; return 0; }
19023 EOF
19024 if { (eval echo configure:19025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19025   rm -rf conftest*
19026   ol_cv_db_db3=yes
19027 else
19028   echo "configure: failed program was:" >&5
19029   cat conftest.$ac_ext >&5
19030   rm -rf conftest*
19031   ol_cv_db_db3=no
19032 fi
19033 rm -f conftest*
19034
19035         LIBS="$ol_LIBS"
19036
19037 fi
19038
19039 echo "$ac_t""$ol_cv_db_db3" 1>&6
19040
19041         if test $ol_cv_db_db3 = yes ; then
19042                 ol_cv_lib_db=-ldb3
19043         fi
19044 fi
19045
19046 if test $ol_cv_lib_db = no ; then
19047         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19048 echo "configure:19049: checking for Berkeley DB link (-ldb-3)" >&5
19049 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19050   echo $ac_n "(cached) $ac_c" 1>&6
19051 else
19052   
19053         ol_DB_LIB=-ldb-3
19054         ol_LIBS=$LIBS
19055         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19056
19057         cat > conftest.$ac_ext <<EOF
19058 #line 19059 "configure"
19059 #include "confdefs.h"
19060
19061 #ifdef HAVE_DB_185_H
19062 # include <db_185.h>
19063 #else
19064 # include <db.h>
19065 #endif
19066
19067 #ifndef DB_VERSION_MAJOR
19068 # define DB_VERSION_MAJOR 1
19069 #endif
19070
19071 #ifndef NULL
19072 #define NULL ((void*)0)
19073 #endif
19074
19075 int main() {
19076
19077 #if DB_VERSION_MAJOR > 1
19078         {
19079                 char *version;
19080                 int major, minor, patch;
19081
19082                 version = db_version( &major, &minor, &patch );
19083
19084                 if( major != DB_VERSION_MAJOR ||
19085                         minor < DB_VERSION_MINOR )
19086                 {
19087                         printf("Berkeley DB version mismatch\n"
19088                                 "\texpected: %s\n\tgot: %s\n",
19089                                 DB_VERSION_STRING, version);
19090                         return 1;
19091                 }
19092         }
19093 #endif
19094
19095 #if DB_VERSION_MAJOR > 2
19096         db_env_create( NULL, 0 );
19097 #elif DB_VERSION_MAJOR > 1
19098         db_appexit( NULL );
19099 #else
19100         (void) dbopen( NULL, 0, 0, 0, NULL);
19101 #endif
19102
19103 ; return 0; }
19104 EOF
19105 if { (eval echo configure:19106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19106   rm -rf conftest*
19107   ol_cv_db_db_3=yes
19108 else
19109   echo "configure: failed program was:" >&5
19110   cat conftest.$ac_ext >&5
19111   rm -rf conftest*
19112   ol_cv_db_db_3=no
19113 fi
19114 rm -f conftest*
19115
19116         LIBS="$ol_LIBS"
19117
19118 fi
19119
19120 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19121
19122         if test $ol_cv_db_db_3 = yes ; then
19123                 ol_cv_lib_db=-ldb-3
19124         fi
19125 fi
19126
19127 if test $ol_cv_lib_db = no ; then
19128         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19129 echo "configure:19130: checking for Berkeley DB link (-ldb2)" >&5
19130 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19131   echo $ac_n "(cached) $ac_c" 1>&6
19132 else
19133   
19134         ol_DB_LIB=-ldb2
19135         ol_LIBS=$LIBS
19136         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19137
19138         cat > conftest.$ac_ext <<EOF
19139 #line 19140 "configure"
19140 #include "confdefs.h"
19141
19142 #ifdef HAVE_DB_185_H
19143 # include <db_185.h>
19144 #else
19145 # include <db.h>
19146 #endif
19147
19148 #ifndef DB_VERSION_MAJOR
19149 # define DB_VERSION_MAJOR 1
19150 #endif
19151
19152 #ifndef NULL
19153 #define NULL ((void*)0)
19154 #endif
19155
19156 int main() {
19157
19158 #if DB_VERSION_MAJOR > 1
19159         {
19160                 char *version;
19161                 int major, minor, patch;
19162
19163                 version = db_version( &major, &minor, &patch );
19164
19165                 if( major != DB_VERSION_MAJOR ||
19166                         minor < DB_VERSION_MINOR )
19167                 {
19168                         printf("Berkeley DB version mismatch\n"
19169                                 "\texpected: %s\n\tgot: %s\n",
19170                                 DB_VERSION_STRING, version);
19171                         return 1;
19172                 }
19173         }
19174 #endif
19175
19176 #if DB_VERSION_MAJOR > 2
19177         db_env_create( NULL, 0 );
19178 #elif DB_VERSION_MAJOR > 1
19179         db_appexit( NULL );
19180 #else
19181         (void) dbopen( NULL, 0, 0, 0, NULL);
19182 #endif
19183
19184 ; return 0; }
19185 EOF
19186 if { (eval echo configure:19187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19187   rm -rf conftest*
19188   ol_cv_db_db2=yes
19189 else
19190   echo "configure: failed program was:" >&5
19191   cat conftest.$ac_ext >&5
19192   rm -rf conftest*
19193   ol_cv_db_db2=no
19194 fi
19195 rm -f conftest*
19196
19197         LIBS="$ol_LIBS"
19198
19199 fi
19200
19201 echo "$ac_t""$ol_cv_db_db2" 1>&6
19202
19203         if test $ol_cv_db_db2 = yes ; then
19204                 ol_cv_lib_db=-ldb2
19205         fi
19206 fi
19207
19208 if test $ol_cv_lib_db = no ; then
19209         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19210 echo "configure:19211: checking for Berkeley DB link (-ldb-2)" >&5
19211 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19212   echo $ac_n "(cached) $ac_c" 1>&6
19213 else
19214   
19215         ol_DB_LIB=-ldb-2
19216         ol_LIBS=$LIBS
19217         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19218
19219         cat > conftest.$ac_ext <<EOF
19220 #line 19221 "configure"
19221 #include "confdefs.h"
19222
19223 #ifdef HAVE_DB_185_H
19224 # include <db_185.h>
19225 #else
19226 # include <db.h>
19227 #endif
19228
19229 #ifndef DB_VERSION_MAJOR
19230 # define DB_VERSION_MAJOR 1
19231 #endif
19232
19233 #ifndef NULL
19234 #define NULL ((void*)0)
19235 #endif
19236
19237 int main() {
19238
19239 #if DB_VERSION_MAJOR > 1
19240         {
19241                 char *version;
19242                 int major, minor, patch;
19243
19244                 version = db_version( &major, &minor, &patch );
19245
19246                 if( major != DB_VERSION_MAJOR ||
19247                         minor < DB_VERSION_MINOR )
19248                 {
19249                         printf("Berkeley DB version mismatch\n"
19250                                 "\texpected: %s\n\tgot: %s\n",
19251                                 DB_VERSION_STRING, version);
19252                         return 1;
19253                 }
19254         }
19255 #endif
19256
19257 #if DB_VERSION_MAJOR > 2
19258         db_env_create( NULL, 0 );
19259 #elif DB_VERSION_MAJOR > 1
19260         db_appexit( NULL );
19261 #else
19262         (void) dbopen( NULL, 0, 0, 0, NULL);
19263 #endif
19264
19265 ; return 0; }
19266 EOF
19267 if { (eval echo configure:19268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19268   rm -rf conftest*
19269   ol_cv_db_db_2=yes
19270 else
19271   echo "configure: failed program was:" >&5
19272   cat conftest.$ac_ext >&5
19273   rm -rf conftest*
19274   ol_cv_db_db_2=no
19275 fi
19276 rm -f conftest*
19277
19278         LIBS="$ol_LIBS"
19279
19280 fi
19281
19282 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19283
19284         if test $ol_cv_db_db_2 = yes ; then
19285                 ol_cv_lib_db=-ldb-2
19286         fi
19287 fi
19288
19289 if test $ol_cv_lib_db = no ; then
19290         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19291 echo "configure:19292: checking for Berkeley DB link (-ldb1)" >&5
19292 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19293   echo $ac_n "(cached) $ac_c" 1>&6
19294 else
19295   
19296         ol_DB_LIB=-ldb1
19297         ol_LIBS=$LIBS
19298         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19299
19300         cat > conftest.$ac_ext <<EOF
19301 #line 19302 "configure"
19302 #include "confdefs.h"
19303
19304 #ifdef HAVE_DB_185_H
19305 # include <db_185.h>
19306 #else
19307 # include <db.h>
19308 #endif
19309
19310 #ifndef DB_VERSION_MAJOR
19311 # define DB_VERSION_MAJOR 1
19312 #endif
19313
19314 #ifndef NULL
19315 #define NULL ((void*)0)
19316 #endif
19317
19318 int main() {
19319
19320 #if DB_VERSION_MAJOR > 1
19321         {
19322                 char *version;
19323                 int major, minor, patch;
19324
19325                 version = db_version( &major, &minor, &patch );
19326
19327                 if( major != DB_VERSION_MAJOR ||
19328                         minor < DB_VERSION_MINOR )
19329                 {
19330                         printf("Berkeley DB version mismatch\n"
19331                                 "\texpected: %s\n\tgot: %s\n",
19332                                 DB_VERSION_STRING, version);
19333                         return 1;
19334                 }
19335         }
19336 #endif
19337
19338 #if DB_VERSION_MAJOR > 2
19339         db_env_create( NULL, 0 );
19340 #elif DB_VERSION_MAJOR > 1
19341         db_appexit( NULL );
19342 #else
19343         (void) dbopen( NULL, 0, 0, 0, NULL);
19344 #endif
19345
19346 ; return 0; }
19347 EOF
19348 if { (eval echo configure:19349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19349   rm -rf conftest*
19350   ol_cv_db_db1=yes
19351 else
19352   echo "configure: failed program was:" >&5
19353   cat conftest.$ac_ext >&5
19354   rm -rf conftest*
19355   ol_cv_db_db1=no
19356 fi
19357 rm -f conftest*
19358
19359         LIBS="$ol_LIBS"
19360
19361 fi
19362
19363 echo "$ac_t""$ol_cv_db_db1" 1>&6
19364
19365         if test $ol_cv_db_db1 = yes ; then
19366                 ol_cv_lib_db=-ldb1
19367         fi
19368 fi
19369
19370 if test $ol_cv_lib_db = no ; then
19371         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19372 echo "configure:19373: checking for Berkeley DB link (-ldb-1)" >&5
19373 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19374   echo $ac_n "(cached) $ac_c" 1>&6
19375 else
19376   
19377         ol_DB_LIB=-ldb-1
19378         ol_LIBS=$LIBS
19379         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19380
19381         cat > conftest.$ac_ext <<EOF
19382 #line 19383 "configure"
19383 #include "confdefs.h"
19384
19385 #ifdef HAVE_DB_185_H
19386 # include <db_185.h>
19387 #else
19388 # include <db.h>
19389 #endif
19390
19391 #ifndef DB_VERSION_MAJOR
19392 # define DB_VERSION_MAJOR 1
19393 #endif
19394
19395 #ifndef NULL
19396 #define NULL ((void*)0)
19397 #endif
19398
19399 int main() {
19400
19401 #if DB_VERSION_MAJOR > 1
19402         {
19403                 char *version;
19404                 int major, minor, patch;
19405
19406                 version = db_version( &major, &minor, &patch );
19407
19408                 if( major != DB_VERSION_MAJOR ||
19409                         minor < DB_VERSION_MINOR )
19410                 {
19411                         printf("Berkeley DB version mismatch\n"
19412                                 "\texpected: %s\n\tgot: %s\n",
19413                                 DB_VERSION_STRING, version);
19414                         return 1;
19415                 }
19416         }
19417 #endif
19418
19419 #if DB_VERSION_MAJOR > 2
19420         db_env_create( NULL, 0 );
19421 #elif DB_VERSION_MAJOR > 1
19422         db_appexit( NULL );
19423 #else
19424         (void) dbopen( NULL, 0, 0, 0, NULL);
19425 #endif
19426
19427 ; return 0; }
19428 EOF
19429 if { (eval echo configure:19430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19430   rm -rf conftest*
19431   ol_cv_db_db_1=yes
19432 else
19433   echo "configure: failed program was:" >&5
19434   cat conftest.$ac_ext >&5
19435   rm -rf conftest*
19436   ol_cv_db_db_1=no
19437 fi
19438 rm -f conftest*
19439
19440         LIBS="$ol_LIBS"
19441
19442 fi
19443
19444 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19445
19446         if test $ol_cv_db_db_1 = yes ; then
19447                 ol_cv_lib_db=-ldb-1
19448         fi
19449 fi
19450
19451
19452         if test "$ol_cv_lib_db" != no ; then
19453                 ol_cv_berkeley_db=yes
19454                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19455 echo "configure:19456: checking for Berkeley DB version match" >&5
19456 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19457   echo $ac_n "(cached) $ac_c" 1>&6
19458 else
19459   
19460         ol_LIBS="$LIBS"
19461         LIBS="$LTHREAD_LIBS $LIBS"
19462         if test $ol_cv_lib_db != yes ; then
19463                 LIBS="$ol_cv_lib_db $LIBS"
19464         fi
19465
19466         if test "$cross_compiling" = yes; then
19467   ol_cv_berkeley_db_version=cross
19468 else
19469   cat > conftest.$ac_ext <<EOF
19470 #line 19471 "configure"
19471 #include "confdefs.h"
19472
19473 #ifdef HAVE_DB_185_H
19474         choke me;
19475 #else
19476 #include <db.h>
19477 #endif
19478 #ifndef DB_VERSION_MAJOR
19479 # define DB_VERSION_MAJOR 1
19480 #endif
19481 #ifndef NULL
19482 #define NULL ((void *)0)
19483 #endif
19484 main()
19485 {
19486 #if DB_VERSION_MAJOR > 1
19487         char *version;
19488         int major, minor, patch;
19489
19490         version = db_version( &major, &minor, &patch );
19491
19492         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19493                 printf("Berkeley DB version mismatch\n"
19494                         "\texpected: %s\n\tgot: %s\n",
19495                         DB_VERSION_STRING, version);
19496                 return 1;
19497         }
19498 #endif
19499
19500         return 0;
19501 }
19502 EOF
19503 if { (eval echo configure:19504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19504 then
19505   ol_cv_berkeley_db_version=yes
19506 else
19507   echo "configure: failed program was:" >&5
19508   cat conftest.$ac_ext >&5
19509   rm -fr conftest*
19510   ol_cv_berkeley_db_version=no
19511 fi
19512 rm -fr conftest*
19513 fi
19514
19515
19516         LIBS="$ol_LIBS"
19517
19518 fi
19519
19520 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19521
19522         if test $ol_cv_berkeley_db_version = no ; then
19523                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19524         fi
19525
19526                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19527 echo "configure:19528: checking for Berkeley DB thread support" >&5
19528 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19529   echo $ac_n "(cached) $ac_c" 1>&6
19530 else
19531   
19532         ol_LIBS="$LIBS"
19533         LIBS="$LTHREAD_LIBS $LIBS"
19534         if test $ol_cv_lib_db != yes ; then
19535                 LIBS="$ol_cv_lib_db $LIBS"
19536         fi
19537
19538         if test "$cross_compiling" = yes; then
19539   ol_cv_berkeley_db_thread=cross
19540 else
19541   cat > conftest.$ac_ext <<EOF
19542 #line 19543 "configure"
19543 #include "confdefs.h"
19544
19545 #ifdef HAVE_DB_185_H
19546         choke me;
19547 #else
19548 #include <db.h>
19549 #endif
19550 #ifndef NULL
19551 #define NULL ((void *)0)
19552 #endif
19553 main()
19554 {
19555         int rc;
19556         u_int32_t flags = DB_CREATE |
19557 #ifdef DB_PRIVATE
19558                 DB_PRIVATE |
19559 #endif
19560                 DB_THREAD;
19561
19562 #if DB_VERSION_MAJOR > 2
19563         DB_ENV *env = NULL;
19564
19565         rc = db_env_create( &env, 0 );
19566
19567         flags |= DB_INIT_MPOOL;
19568 #ifdef DB_MPOOL_PRIVATE
19569         flags |= DB_MPOOL_PRIVATE;
19570 #endif
19571
19572         if( rc ) {
19573                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19574                 return rc;
19575         }
19576
19577 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19578         rc = env->open( env, NULL, flags, 0 );
19579 #else
19580         rc = env->open( env, NULL, NULL, flags, 0 );
19581 #endif
19582
19583         if ( rc == 0 ) {
19584                 rc = env->close( env, 0 );
19585         }
19586
19587         if( rc ) {
19588                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19589                 return rc;
19590         }
19591
19592 #else
19593         DB_ENV env;
19594         memset( &env, '\0', sizeof(env) );
19595
19596         rc = db_appinit( NULL, NULL, &env, flags );
19597
19598         if( rc == 0 ) {
19599                 db_appexit( &env );
19600         }
19601
19602         unlink("__db_mpool.share");
19603         unlink("__db_lock.share");
19604 #endif
19605
19606         return rc;
19607 }
19608 EOF
19609 if { (eval echo configure:19610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19610 then
19611   ol_cv_berkeley_db_thread=yes
19612 else
19613   echo "configure: failed program was:" >&5
19614   cat conftest.$ac_ext >&5
19615   rm -fr conftest*
19616   ol_cv_berkeley_db_thread=no
19617 fi
19618 rm -fr conftest*
19619 fi
19620
19621
19622         LIBS="$ol_LIBS"
19623
19624 fi
19625
19626 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19627
19628         if test $ol_cv_berkeley_db_thread != no ; then
19629                 cat >> confdefs.h <<\EOF
19630 #define HAVE_BERKELEY_DB_THREAD 1
19631 EOF
19632
19633         fi
19634
19635         fi
19636 fi
19637
19638         fi
19639
19640         if test $ol_cv_berkeley_db != no ; then
19641                 cat >> confdefs.h <<\EOF
19642 #define HAVE_BERKELEY_DB 1
19643 EOF
19644
19645
19646                 ol_link_ldbm=berkeley
19647                 ol_with_ldbm_api=berkeley
19648
19649                 if test $ol_with_ldbm_type = hash ; then
19650                         cat >> confdefs.h <<\EOF
19651 #define LDBM_USE_DBHASH 1
19652 EOF
19653
19654                 else
19655                         cat >> confdefs.h <<\EOF
19656 #define LDBM_USE_DBBTREE 1
19657 EOF
19658
19659                 fi
19660
19661                                                 if test $ol_cv_lib_db != yes ; then
19662                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19663                 fi
19664         fi
19665 fi
19666
19667 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
19668         if test $ol_link_ldbm != berkeley ; then
19669                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
19670         else
19671                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19672 echo "configure:19673: checking Berkeley DB version for BDB backend" >&5
19673 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19674   echo $ac_n "(cached) $ac_c" 1>&6
19675 else
19676   
19677         cat > conftest.$ac_ext <<EOF
19678 #line 19679 "configure"
19679 #include "confdefs.h"
19680
19681 #include <db.h>
19682
19683  /* this check could be improved */
19684 #ifndef DB_VERSION_MAJOR
19685 #       define DB_VERSION_MAJOR 1
19686 #endif
19687 #ifndef DB_VERSION_MINOR
19688 #       define DB_VERSION_MINOR 0
19689 #endif
19690
19691 /* require 4.2 or later */
19692 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19693         __db_version_compat
19694 #endif
19695         
19696 EOF
19697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19698   egrep "__db_version_compat" >/dev/null 2>&1; then
19699   rm -rf conftest*
19700   ol_cv_bdb_compat=yes
19701 else
19702   rm -rf conftest*
19703   ol_cv_bdb_compat=no
19704 fi
19705 rm -f conftest*
19706
19707 fi
19708
19709 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19710
19711
19712                 if test $ol_cv_bdb_compat != yes ; then
19713                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19714                 fi
19715         fi
19716 fi
19717
19718 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19719         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19720         ol_with_ldbm_api=none
19721 fi
19722
19723 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19724         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19725 echo "configure:19726: checking for MDBM library" >&5
19726 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19727   echo $ac_n "(cached) $ac_c" 1>&6
19728 else
19729         ol_LIBS="$LIBS"
19730         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19731 echo "configure:19732: checking for mdbm_set_chain" >&5
19732 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19733   echo $ac_n "(cached) $ac_c" 1>&6
19734 else
19735   cat > conftest.$ac_ext <<EOF
19736 #line 19737 "configure"
19737 #include "confdefs.h"
19738 /* System header to define __stub macros and hopefully few prototypes,
19739     which can conflict with char mdbm_set_chain(); below.  */
19740 #include <assert.h>
19741 /* Override any gcc2 internal prototype to avoid an error.  */
19742 /* We use char because int might match the return type of a gcc2
19743     builtin and then its argument prototype would still apply.  */
19744 char mdbm_set_chain();
19745 char (*f)();
19746
19747 int main() {
19748
19749 /* The GNU C library defines this for functions which it implements
19750     to always fail with ENOSYS.  Some functions are actually named
19751     something starting with __ and the normal name is an alias.  */
19752 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19753 choke me
19754 #else
19755 f = mdbm_set_chain;
19756 #endif
19757
19758 ; return 0; }
19759 EOF
19760 if { (eval echo configure:19761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19761   rm -rf conftest*
19762   eval "ac_cv_func_mdbm_set_chain=yes"
19763 else
19764   echo "configure: failed program was:" >&5
19765   cat conftest.$ac_ext >&5
19766   rm -rf conftest*
19767   eval "ac_cv_func_mdbm_set_chain=no"
19768 fi
19769 rm -f conftest*
19770 fi
19771
19772 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19773   echo "$ac_t""yes" 1>&6
19774   ol_cv_lib_mdbm=yes
19775 else
19776   echo "$ac_t""no" 1>&6
19777
19778                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19779 echo "configure:19780: checking for mdbm_set_chain in -lmdbm" >&5
19780 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19782   echo $ac_n "(cached) $ac_c" 1>&6
19783 else
19784   ac_save_LIBS="$LIBS"
19785 LIBS="-lmdbm  $LIBS"
19786 cat > conftest.$ac_ext <<EOF
19787 #line 19788 "configure"
19788 #include "confdefs.h"
19789 /* Override any gcc2 internal prototype to avoid an error.  */
19790 /* We use char because int might match the return type of a gcc2
19791     builtin and then its argument prototype would still apply.  */
19792 char mdbm_set_chain();
19793
19794 int main() {
19795 mdbm_set_chain()
19796 ; return 0; }
19797 EOF
19798 if { (eval echo configure:19799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19799   rm -rf conftest*
19800   eval "ac_cv_lib_$ac_lib_var=yes"
19801 else
19802   echo "configure: failed program was:" >&5
19803   cat conftest.$ac_ext >&5
19804   rm -rf conftest*
19805   eval "ac_cv_lib_$ac_lib_var=no"
19806 fi
19807 rm -f conftest*
19808 LIBS="$ac_save_LIBS"
19809
19810 fi
19811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19812   echo "$ac_t""yes" 1>&6
19813   ol_cv_lib_mdbm=-lmdbm
19814 else
19815   echo "$ac_t""no" 1>&6
19816 ol_cv_lib_mdbm=no
19817 fi
19818
19819         
19820 fi
19821
19822         LIBS="$ol_LIBS"
19823
19824 fi
19825
19826 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19827
19828
19829  for ac_hdr in mdbm.h
19830 do
19831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19833 echo "configure:19834: checking for $ac_hdr" >&5
19834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19835   echo $ac_n "(cached) $ac_c" 1>&6
19836 else
19837   cat > conftest.$ac_ext <<EOF
19838 #line 19839 "configure"
19839 #include "confdefs.h"
19840 #include <$ac_hdr>
19841 EOF
19842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19843 { (eval echo configure:19844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19845 if test -z "$ac_err"; then
19846   rm -rf conftest*
19847   eval "ac_cv_header_$ac_safe=yes"
19848 else
19849   echo "$ac_err" >&5
19850   echo "configure: failed program was:" >&5
19851   cat conftest.$ac_ext >&5
19852   rm -rf conftest*
19853   eval "ac_cv_header_$ac_safe=no"
19854 fi
19855 rm -f conftest*
19856 fi
19857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19858   echo "$ac_t""yes" 1>&6
19859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19860   cat >> confdefs.h <<EOF
19861 #define $ac_tr_hdr 1
19862 EOF
19863  
19864 else
19865   echo "$ac_t""no" 1>&6
19866 fi
19867 done
19868
19869  echo $ac_n "checking for db""... $ac_c" 1>&6
19870 echo "configure:19871: checking for db" >&5
19871 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19872   echo $ac_n "(cached) $ac_c" 1>&6
19873 else
19874   
19875         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19876                 ol_cv_mdbm=no
19877         else
19878                 ol_cv_mdbm=yes
19879         fi
19880
19881 fi
19882
19883 echo "$ac_t""$ol_cv_mdbm" 1>&6
19884  if test $ol_cv_mdbm = yes ; then
19885         cat >> confdefs.h <<\EOF
19886 #define HAVE_MDBM 1
19887 EOF
19888
19889  fi
19890
19891
19892         if test $ol_cv_mdbm = yes ; then
19893                 ol_link_ldbm=mdbm
19894                 ol_with_ldbm_api=mdbm
19895                 if test $ol_cv_lib_mdbm != yes ; then
19896                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19897                 fi
19898         fi
19899 fi
19900
19901 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19902         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19903 echo "configure:19904: checking for GDBM library" >&5
19904 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19905   echo $ac_n "(cached) $ac_c" 1>&6
19906 else
19907         ol_LIBS="$LIBS"
19908         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19909 echo "configure:19910: checking for gdbm_open" >&5
19910 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19911   echo $ac_n "(cached) $ac_c" 1>&6
19912 else
19913   cat > conftest.$ac_ext <<EOF
19914 #line 19915 "configure"
19915 #include "confdefs.h"
19916 /* System header to define __stub macros and hopefully few prototypes,
19917     which can conflict with char gdbm_open(); below.  */
19918 #include <assert.h>
19919 /* Override any gcc2 internal prototype to avoid an error.  */
19920 /* We use char because int might match the return type of a gcc2
19921     builtin and then its argument prototype would still apply.  */
19922 char gdbm_open();
19923 char (*f)();
19924
19925 int main() {
19926
19927 /* The GNU C library defines this for functions which it implements
19928     to always fail with ENOSYS.  Some functions are actually named
19929     something starting with __ and the normal name is an alias.  */
19930 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19931 choke me
19932 #else
19933 f = gdbm_open;
19934 #endif
19935
19936 ; return 0; }
19937 EOF
19938 if { (eval echo configure:19939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19939   rm -rf conftest*
19940   eval "ac_cv_func_gdbm_open=yes"
19941 else
19942   echo "configure: failed program was:" >&5
19943   cat conftest.$ac_ext >&5
19944   rm -rf conftest*
19945   eval "ac_cv_func_gdbm_open=no"
19946 fi
19947 rm -f conftest*
19948 fi
19949
19950 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19951   echo "$ac_t""yes" 1>&6
19952   ol_cv_lib_gdbm=yes
19953 else
19954   echo "$ac_t""no" 1>&6
19955
19956                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19957 echo "configure:19958: checking for gdbm_open in -lgdbm" >&5
19958 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19959 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19960   echo $ac_n "(cached) $ac_c" 1>&6
19961 else
19962   ac_save_LIBS="$LIBS"
19963 LIBS="-lgdbm  $LIBS"
19964 cat > conftest.$ac_ext <<EOF
19965 #line 19966 "configure"
19966 #include "confdefs.h"
19967 /* Override any gcc2 internal prototype to avoid an error.  */
19968 /* We use char because int might match the return type of a gcc2
19969     builtin and then its argument prototype would still apply.  */
19970 char gdbm_open();
19971
19972 int main() {
19973 gdbm_open()
19974 ; return 0; }
19975 EOF
19976 if { (eval echo configure:19977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19977   rm -rf conftest*
19978   eval "ac_cv_lib_$ac_lib_var=yes"
19979 else
19980   echo "configure: failed program was:" >&5
19981   cat conftest.$ac_ext >&5
19982   rm -rf conftest*
19983   eval "ac_cv_lib_$ac_lib_var=no"
19984 fi
19985 rm -f conftest*
19986 LIBS="$ac_save_LIBS"
19987
19988 fi
19989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19990   echo "$ac_t""yes" 1>&6
19991   ol_cv_lib_gdbm=-lgdbm
19992 else
19993   echo "$ac_t""no" 1>&6
19994 ol_cv_lib_gdbm=no
19995 fi
19996
19997         
19998 fi
19999
20000         LIBS="$ol_LIBS"
20001
20002 fi
20003
20004 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20005
20006
20007  for ac_hdr in gdbm.h
20008 do
20009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20011 echo "configure:20012: checking for $ac_hdr" >&5
20012 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20013   echo $ac_n "(cached) $ac_c" 1>&6
20014 else
20015   cat > conftest.$ac_ext <<EOF
20016 #line 20017 "configure"
20017 #include "confdefs.h"
20018 #include <$ac_hdr>
20019 EOF
20020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20021 { (eval echo configure:20022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20023 if test -z "$ac_err"; then
20024   rm -rf conftest*
20025   eval "ac_cv_header_$ac_safe=yes"
20026 else
20027   echo "$ac_err" >&5
20028   echo "configure: failed program was:" >&5
20029   cat conftest.$ac_ext >&5
20030   rm -rf conftest*
20031   eval "ac_cv_header_$ac_safe=no"
20032 fi
20033 rm -f conftest*
20034 fi
20035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20036   echo "$ac_t""yes" 1>&6
20037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20038   cat >> confdefs.h <<EOF
20039 #define $ac_tr_hdr 1
20040 EOF
20041  
20042 else
20043   echo "$ac_t""no" 1>&6
20044 fi
20045 done
20046
20047  echo $ac_n "checking for db""... $ac_c" 1>&6
20048 echo "configure:20049: checking for db" >&5
20049 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20050   echo $ac_n "(cached) $ac_c" 1>&6
20051 else
20052   
20053         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20054                 ol_cv_gdbm=no
20055         else
20056                 ol_cv_gdbm=yes
20057         fi
20058
20059 fi
20060
20061 echo "$ac_t""$ol_cv_gdbm" 1>&6
20062  if test $ol_cv_gdbm = yes ; then
20063         cat >> confdefs.h <<\EOF
20064 #define HAVE_GDBM 1
20065 EOF
20066
20067  fi
20068
20069
20070         if test $ol_cv_gdbm = yes ; then
20071                 ol_link_ldbm=gdbm
20072                 ol_with_ldbm_api=gdbm
20073
20074                 if test $ol_cv_lib_gdbm != yes ; then
20075                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20076                 fi
20077         fi
20078 fi
20079
20080 if test $ol_with_ldbm_api = ndbm ; then
20081         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20082 echo "configure:20083: checking for NDBM library" >&5
20083 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20084   echo $ac_n "(cached) $ac_c" 1>&6
20085 else
20086         ol_LIBS="$LIBS"
20087         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20088 echo "configure:20089: checking for dbm_open" >&5
20089 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20090   echo $ac_n "(cached) $ac_c" 1>&6
20091 else
20092   cat > conftest.$ac_ext <<EOF
20093 #line 20094 "configure"
20094 #include "confdefs.h"
20095 /* System header to define __stub macros and hopefully few prototypes,
20096     which can conflict with char dbm_open(); below.  */
20097 #include <assert.h>
20098 /* Override any gcc2 internal prototype to avoid an error.  */
20099 /* We use char because int might match the return type of a gcc2
20100     builtin and then its argument prototype would still apply.  */
20101 char dbm_open();
20102 char (*f)();
20103
20104 int main() {
20105
20106 /* The GNU C library defines this for functions which it implements
20107     to always fail with ENOSYS.  Some functions are actually named
20108     something starting with __ and the normal name is an alias.  */
20109 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20110 choke me
20111 #else
20112 f = dbm_open;
20113 #endif
20114
20115 ; return 0; }
20116 EOF
20117 if { (eval echo configure:20118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20118   rm -rf conftest*
20119   eval "ac_cv_func_dbm_open=yes"
20120 else
20121   echo "configure: failed program was:" >&5
20122   cat conftest.$ac_ext >&5
20123   rm -rf conftest*
20124   eval "ac_cv_func_dbm_open=no"
20125 fi
20126 rm -f conftest*
20127 fi
20128
20129 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20130   echo "$ac_t""yes" 1>&6
20131   ol_cv_lib_ndbm=yes
20132 else
20133   echo "$ac_t""no" 1>&6
20134
20135                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20136 echo "configure:20137: checking for dbm_open in -lndbm" >&5
20137 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20139   echo $ac_n "(cached) $ac_c" 1>&6
20140 else
20141   ac_save_LIBS="$LIBS"
20142 LIBS="-lndbm  $LIBS"
20143 cat > conftest.$ac_ext <<EOF
20144 #line 20145 "configure"
20145 #include "confdefs.h"
20146 /* Override any gcc2 internal prototype to avoid an error.  */
20147 /* We use char because int might match the return type of a gcc2
20148     builtin and then its argument prototype would still apply.  */
20149 char dbm_open();
20150
20151 int main() {
20152 dbm_open()
20153 ; return 0; }
20154 EOF
20155 if { (eval echo configure:20156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20156   rm -rf conftest*
20157   eval "ac_cv_lib_$ac_lib_var=yes"
20158 else
20159   echo "configure: failed program was:" >&5
20160   cat conftest.$ac_ext >&5
20161   rm -rf conftest*
20162   eval "ac_cv_lib_$ac_lib_var=no"
20163 fi
20164 rm -f conftest*
20165 LIBS="$ac_save_LIBS"
20166
20167 fi
20168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20169   echo "$ac_t""yes" 1>&6
20170   ol_cv_lib_ndbm=-lndbm
20171 else
20172   echo "$ac_t""no" 1>&6
20173
20174                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20175 echo "configure:20176: checking for dbm_open in -ldbm" >&5
20176 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20178   echo $ac_n "(cached) $ac_c" 1>&6
20179 else
20180   ac_save_LIBS="$LIBS"
20181 LIBS="-ldbm  $LIBS"
20182 cat > conftest.$ac_ext <<EOF
20183 #line 20184 "configure"
20184 #include "confdefs.h"
20185 /* Override any gcc2 internal prototype to avoid an error.  */
20186 /* We use char because int might match the return type of a gcc2
20187     builtin and then its argument prototype would still apply.  */
20188 char dbm_open();
20189
20190 int main() {
20191 dbm_open()
20192 ; return 0; }
20193 EOF
20194 if { (eval echo configure:20195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20195   rm -rf conftest*
20196   eval "ac_cv_lib_$ac_lib_var=yes"
20197 else
20198   echo "configure: failed program was:" >&5
20199   cat conftest.$ac_ext >&5
20200   rm -rf conftest*
20201   eval "ac_cv_lib_$ac_lib_var=no"
20202 fi
20203 rm -f conftest*
20204 LIBS="$ac_save_LIBS"
20205
20206 fi
20207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20208   echo "$ac_t""yes" 1>&6
20209   ol_cv_lib_ndbm=-ldbm
20210 else
20211   echo "$ac_t""no" 1>&6
20212 ol_cv_lib_ndbm=no
20213 fi
20214                 
20215 fi
20216
20217         
20218 fi
20219
20220         LIBS="$ol_LIBS"
20221
20222 fi
20223
20224 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20225
20226
20227  for ac_hdr in ndbm.h
20228 do
20229 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20230 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20231 echo "configure:20232: checking for $ac_hdr" >&5
20232 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20233   echo $ac_n "(cached) $ac_c" 1>&6
20234 else
20235   cat > conftest.$ac_ext <<EOF
20236 #line 20237 "configure"
20237 #include "confdefs.h"
20238 #include <$ac_hdr>
20239 EOF
20240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20241 { (eval echo configure:20242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20243 if test -z "$ac_err"; then
20244   rm -rf conftest*
20245   eval "ac_cv_header_$ac_safe=yes"
20246 else
20247   echo "$ac_err" >&5
20248   echo "configure: failed program was:" >&5
20249   cat conftest.$ac_ext >&5
20250   rm -rf conftest*
20251   eval "ac_cv_header_$ac_safe=no"
20252 fi
20253 rm -f conftest*
20254 fi
20255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20256   echo "$ac_t""yes" 1>&6
20257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20258   cat >> confdefs.h <<EOF
20259 #define $ac_tr_hdr 1
20260 EOF
20261  
20262 else
20263   echo "$ac_t""no" 1>&6
20264 fi
20265 done
20266
20267  echo $ac_n "checking for db""... $ac_c" 1>&6
20268 echo "configure:20269: checking for db" >&5
20269 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20270   echo $ac_n "(cached) $ac_c" 1>&6
20271 else
20272   
20273         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20274                 ol_cv_ndbm=no
20275         else
20276                 ol_cv_ndbm=yes
20277         fi
20278
20279 fi
20280
20281 echo "$ac_t""$ol_cv_ndbm" 1>&6
20282  if test $ol_cv_ndbm = yes ; then
20283         cat >> confdefs.h <<\EOF
20284 #define HAVE_NDBM 1
20285 EOF
20286
20287  fi
20288
20289
20290         if test $ol_cv_ndbm = yes ; then
20291                 ol_link_ldbm=ndbm
20292                 ol_with_ldbm_api=ndbm
20293
20294                 if test $ol_cv_lib_ndbm != yes ; then
20295                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20296                 fi
20297         fi
20298 fi
20299
20300 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20301         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20302 fi
20303
20304 if test $ol_enable_bdb = yes -o \
20305         $ol_enable_hdb = yes -o \
20306         $ol_enable_ldbm = yes ; then
20307         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20308 fi
20309
20310
20311 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20312         BUILD_LIBS_DYNAMIC=shared
20313         cat >> confdefs.h <<\EOF
20314 #define LDAP_LIBS_DYNAMIC 1
20315 EOF
20316
20317         LTSTATIC=""
20318 else
20319         BUILD_LIBS_DYNAMIC=static
20320         LTSTATIC="-static"
20321 fi
20322
20323 if test $ol_enable_wrappers != no ; then
20324         for ac_hdr in tcpd.h
20325 do
20326 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20327 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20328 echo "configure:20329: checking for $ac_hdr" >&5
20329 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20330   echo $ac_n "(cached) $ac_c" 1>&6
20331 else
20332   cat > conftest.$ac_ext <<EOF
20333 #line 20334 "configure"
20334 #include "confdefs.h"
20335 #include <$ac_hdr>
20336 EOF
20337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20338 { (eval echo configure:20339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20340 if test -z "$ac_err"; then
20341   rm -rf conftest*
20342   eval "ac_cv_header_$ac_safe=yes"
20343 else
20344   echo "$ac_err" >&5
20345   echo "configure: failed program was:" >&5
20346   cat conftest.$ac_ext >&5
20347   rm -rf conftest*
20348   eval "ac_cv_header_$ac_safe=no"
20349 fi
20350 rm -f conftest*
20351 fi
20352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20353   echo "$ac_t""yes" 1>&6
20354     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20355   cat >> confdefs.h <<EOF
20356 #define $ac_tr_hdr 1
20357 EOF
20358  
20359                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20360 echo "configure:20361: checking for TCP wrappers library" >&5
20361                 save_LIBS="$LIBS"
20362                 LIBS="$LIBS -lwrap"
20363                 cat > conftest.$ac_ext <<EOF
20364 #line 20365 "configure"
20365 #include "confdefs.h"
20366
20367 #include <tcpd.h>
20368 int allow_severity = 0;
20369 int deny_severity  = 0;
20370
20371 struct request_info *req;
20372                 
20373 int main() {
20374
20375 hosts_access(req)
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   echo "$ac_t""-lwrap" 1>&6
20382                 have_wrappers=yes
20383                 LIBS="$save_LIBS"
20384 else
20385   echo "configure: failed program was:" >&5
20386   cat conftest.$ac_ext >&5
20387   rm -rf conftest*
20388   
20389                                 LIBS="$LIBS -lnsl"
20390                 cat > conftest.$ac_ext <<EOF
20391 #line 20392 "configure"
20392 #include "confdefs.h"
20393
20394 #include <tcpd.h>
20395 int allow_severity = 0;
20396 int deny_severity  = 0;
20397
20398 struct request_info *req;
20399                 
20400 int main() {
20401
20402 hosts_access(req)
20403                 
20404 ; return 0; }
20405 EOF
20406 if { (eval echo configure:20407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20407   rm -rf conftest*
20408   echo "$ac_t""-lwrap -lnsl" 1>&6
20409                 have_wrappers=yes
20410                 LIBS="$save_LIBS -lnsl"
20411 else
20412   echo "configure: failed program was:" >&5
20413   cat conftest.$ac_ext >&5
20414   rm -rf conftest*
20415   
20416                 echo "$ac_t""no" 1>&6
20417                 have_wrappers=no
20418                 LIBS=$save_LIBS
20419 fi
20420 rm -f conftest*
20421 fi
20422 rm -f conftest*
20423 else
20424   echo "$ac_t""no" 1>&6
20425 have_wrappers=no
20426 fi
20427 done
20428
20429
20430         if test $have_wrappers = yes ; then
20431                 cat >> confdefs.h <<\EOF
20432 #define HAVE_TCPD 1
20433 EOF
20434
20435                 WRAP_LIBS="-lwrap"
20436         elif test $ol_enable_wrappers = yes ; then
20437                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20438         else
20439                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20440                 WRAP_LIBS=""
20441         fi
20442 fi
20443
20444 if test $ol_enable_syslog != no ; then
20445         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20446 echo "configure:20447: checking for openlog" >&5
20447 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20448   echo $ac_n "(cached) $ac_c" 1>&6
20449 else
20450   cat > conftest.$ac_ext <<EOF
20451 #line 20452 "configure"
20452 #include "confdefs.h"
20453 /* System header to define __stub macros and hopefully few prototypes,
20454     which can conflict with char openlog(); below.  */
20455 #include <assert.h>
20456 /* Override any gcc2 internal prototype to avoid an error.  */
20457 /* We use char because int might match the return type of a gcc2
20458     builtin and then its argument prototype would still apply.  */
20459 char openlog();
20460 char (*f)();
20461
20462 int main() {
20463
20464 /* The GNU C library defines this for functions which it implements
20465     to always fail with ENOSYS.  Some functions are actually named
20466     something starting with __ and the normal name is an alias.  */
20467 #if defined (__stub_openlog) || defined (__stub___openlog)
20468 choke me
20469 #else
20470 f = openlog;
20471 #endif
20472
20473 ; return 0; }
20474 EOF
20475 if { (eval echo configure:20476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20476   rm -rf conftest*
20477   eval "ac_cv_func_openlog=yes"
20478 else
20479   echo "configure: failed program was:" >&5
20480   cat conftest.$ac_ext >&5
20481   rm -rf conftest*
20482   eval "ac_cv_func_openlog=no"
20483 fi
20484 rm -f conftest*
20485 fi
20486
20487 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20488   echo "$ac_t""yes" 1>&6
20489   :
20490 else
20491   echo "$ac_t""no" 1>&6
20492 fi
20493
20494         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20495                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20496         fi
20497         ol_enable_syslog=$ac_cv_func_openlog
20498 fi
20499
20500
20501 ol_link_sql=no
20502 if test $ol_enable_sql != no ; then
20503         for ac_hdr in sql.h sqlext.h
20504 do
20505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20506 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20507 echo "configure:20508: checking for $ac_hdr" >&5
20508 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20509   echo $ac_n "(cached) $ac_c" 1>&6
20510 else
20511   cat > conftest.$ac_ext <<EOF
20512 #line 20513 "configure"
20513 #include "confdefs.h"
20514 #include <$ac_hdr>
20515 EOF
20516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20517 { (eval echo configure:20518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20519 if test -z "$ac_err"; then
20520   rm -rf conftest*
20521   eval "ac_cv_header_$ac_safe=yes"
20522 else
20523   echo "$ac_err" >&5
20524   echo "configure: failed program was:" >&5
20525   cat conftest.$ac_ext >&5
20526   rm -rf conftest*
20527   eval "ac_cv_header_$ac_safe=no"
20528 fi
20529 rm -f conftest*
20530 fi
20531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20532   echo "$ac_t""yes" 1>&6
20533     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20534   cat >> confdefs.h <<EOF
20535 #define $ac_tr_hdr 1
20536 EOF
20537  
20538 else
20539   echo "$ac_t""no" 1>&6
20540 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20541         
20542 fi
20543 done
20544
20545
20546         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20547 echo "configure:20548: checking for SQLDriverConnect in -liodbc" >&5
20548 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20550   echo $ac_n "(cached) $ac_c" 1>&6
20551 else
20552   ac_save_LIBS="$LIBS"
20553 LIBS="-liodbc  $LIBS"
20554 cat > conftest.$ac_ext <<EOF
20555 #line 20556 "configure"
20556 #include "confdefs.h"
20557 /* Override any gcc2 internal prototype to avoid an error.  */
20558 /* We use char because int might match the return type of a gcc2
20559     builtin and then its argument prototype would still apply.  */
20560 char SQLDriverConnect();
20561
20562 int main() {
20563 SQLDriverConnect()
20564 ; return 0; }
20565 EOF
20566 if { (eval echo configure:20567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20567   rm -rf conftest*
20568   eval "ac_cv_lib_$ac_lib_var=yes"
20569 else
20570   echo "configure: failed program was:" >&5
20571   cat conftest.$ac_ext >&5
20572   rm -rf conftest*
20573   eval "ac_cv_lib_$ac_lib_var=no"
20574 fi
20575 rm -f conftest*
20576 LIBS="$ac_save_LIBS"
20577
20578 fi
20579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20580   echo "$ac_t""yes" 1>&6
20581   have_iodbc=yes
20582 else
20583   echo "$ac_t""no" 1>&6
20584 have_iodbc=no
20585 fi
20586
20587         if test $have_iodbc = yes ; then
20588                 ol_link_sql="-liodbc"
20589         else
20590                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20591 echo "configure:20592: checking for SQLDriverConnect in -lodbc" >&5
20592 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20594   echo $ac_n "(cached) $ac_c" 1>&6
20595 else
20596   ac_save_LIBS="$LIBS"
20597 LIBS="-lodbc  $LIBS"
20598 cat > conftest.$ac_ext <<EOF
20599 #line 20600 "configure"
20600 #include "confdefs.h"
20601 /* Override any gcc2 internal prototype to avoid an error.  */
20602 /* We use char because int might match the return type of a gcc2
20603     builtin and then its argument prototype would still apply.  */
20604 char SQLDriverConnect();
20605
20606 int main() {
20607 SQLDriverConnect()
20608 ; return 0; }
20609 EOF
20610 if { (eval echo configure:20611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20611   rm -rf conftest*
20612   eval "ac_cv_lib_$ac_lib_var=yes"
20613 else
20614   echo "configure: failed program was:" >&5
20615   cat conftest.$ac_ext >&5
20616   rm -rf conftest*
20617   eval "ac_cv_lib_$ac_lib_var=no"
20618 fi
20619 rm -f conftest*
20620 LIBS="$ac_save_LIBS"
20621
20622 fi
20623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20624   echo "$ac_t""yes" 1>&6
20625   have_odbc=yes
20626 else
20627   echo "$ac_t""no" 1>&6
20628 have_odbc=no
20629 fi
20630
20631                 if test $have_odbc = yes ; then
20632                         ol_link_sql="-lodbc"
20633                 fi
20634         fi
20635
20636         if test $ol_link_sql != no ; then
20637                 SLAPD_SQL_LIBS="$ol_link_sql"
20638
20639         elif test $ol_enable_sql != auto ; then
20640                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20641         fi
20642 fi
20643
20644 ol_link_sasl=no
20645 ol_link_spasswd=no
20646 if test $ol_with_cyrus_sasl != no ; then
20647         for ac_hdr in sasl/sasl.h sasl.h
20648 do
20649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20651 echo "configure:20652: checking for $ac_hdr" >&5
20652 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20653   echo $ac_n "(cached) $ac_c" 1>&6
20654 else
20655   cat > conftest.$ac_ext <<EOF
20656 #line 20657 "configure"
20657 #include "confdefs.h"
20658 #include <$ac_hdr>
20659 EOF
20660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20661 { (eval echo configure:20662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20663 if test -z "$ac_err"; then
20664   rm -rf conftest*
20665   eval "ac_cv_header_$ac_safe=yes"
20666 else
20667   echo "$ac_err" >&5
20668   echo "configure: failed program was:" >&5
20669   cat conftest.$ac_ext >&5
20670   rm -rf conftest*
20671   eval "ac_cv_header_$ac_safe=no"
20672 fi
20673 rm -f conftest*
20674 fi
20675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20676   echo "$ac_t""yes" 1>&6
20677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20678   cat >> confdefs.h <<EOF
20679 #define $ac_tr_hdr 1
20680 EOF
20681  
20682 else
20683   echo "$ac_t""no" 1>&6
20684 fi
20685 done
20686
20687
20688         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20689                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20690 echo "configure:20691: checking for sasl_client_init in -lsasl2" >&5
20691 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20693   echo $ac_n "(cached) $ac_c" 1>&6
20694 else
20695   ac_save_LIBS="$LIBS"
20696 LIBS="-lsasl2  $LIBS"
20697 cat > conftest.$ac_ext <<EOF
20698 #line 20699 "configure"
20699 #include "confdefs.h"
20700 /* Override any gcc2 internal prototype to avoid an error.  */
20701 /* We use char because int might match the return type of a gcc2
20702     builtin and then its argument prototype would still apply.  */
20703 char sasl_client_init();
20704
20705 int main() {
20706 sasl_client_init()
20707 ; return 0; }
20708 EOF
20709 if { (eval echo configure:20710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20710   rm -rf conftest*
20711   eval "ac_cv_lib_$ac_lib_var=yes"
20712 else
20713   echo "configure: failed program was:" >&5
20714   cat conftest.$ac_ext >&5
20715   rm -rf conftest*
20716   eval "ac_cv_lib_$ac_lib_var=no"
20717 fi
20718 rm -f conftest*
20719 LIBS="$ac_save_LIBS"
20720
20721 fi
20722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20723   echo "$ac_t""yes" 1>&6
20724   ol_link_sasl="-lsasl2"
20725 else
20726   echo "$ac_t""no" 1>&6
20727 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20728 echo "configure:20729: checking for sasl_client_init in -lsasl" >&5
20729 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20731   echo $ac_n "(cached) $ac_c" 1>&6
20732 else
20733   ac_save_LIBS="$LIBS"
20734 LIBS="-lsasl  $LIBS"
20735 cat > conftest.$ac_ext <<EOF
20736 #line 20737 "configure"
20737 #include "confdefs.h"
20738 /* Override any gcc2 internal prototype to avoid an error.  */
20739 /* We use char because int might match the return type of a gcc2
20740     builtin and then its argument prototype would still apply.  */
20741 char sasl_client_init();
20742
20743 int main() {
20744 sasl_client_init()
20745 ; return 0; }
20746 EOF
20747 if { (eval echo configure:20748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20748   rm -rf conftest*
20749   eval "ac_cv_lib_$ac_lib_var=yes"
20750 else
20751   echo "configure: failed program was:" >&5
20752   cat conftest.$ac_ext >&5
20753   rm -rf conftest*
20754   eval "ac_cv_lib_$ac_lib_var=no"
20755 fi
20756 rm -f conftest*
20757 LIBS="$ac_save_LIBS"
20758
20759 fi
20760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20761   echo "$ac_t""yes" 1>&6
20762   ol_link_sasl="-lsasl"
20763 else
20764   echo "$ac_t""no" 1>&6
20765 fi
20766
20767 fi
20768
20769         fi
20770
20771         if test $ol_link_sasl = no ; then
20772                 if test $ol_with_cyrus_sasl != auto ; then
20773                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20774                 else
20775                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20776                         echo "configure: warning: SASL authentication not supported!" 1>&2
20777                         if test $ol_link_tls = no ; then
20778                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20779                         fi
20780                 fi
20781         else
20782                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20783 echo "configure:20784: checking Cyrus SASL library version" >&5
20784 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20785   echo $ac_n "(cached) $ac_c" 1>&6
20786 else
20787   
20788         cat > conftest.$ac_ext <<EOF
20789 #line 20790 "configure"
20790 #include "confdefs.h"
20791
20792 #ifdef HAVE_SASL_SASL_H
20793 #include <sasl/sasl.h>
20794 #else
20795 #include <sasl.h>
20796 #endif
20797
20798 /* Require 2.1.15+ */
20799 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20800         char *__sasl_compat = "2.2+ or better okay (we guess)";
20801 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20802         && SASL_VERSION_STEP >=15
20803         char *__sasl_compat = "2.1.15+ or better okay";
20804 #endif
20805         
20806 EOF
20807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20808   egrep "__sasl_compat" >/dev/null 2>&1; then
20809   rm -rf conftest*
20810   ol_cv_sasl_compat=yes
20811 else
20812   rm -rf conftest*
20813   ol_cv_sasl_compat=no
20814 fi
20815 rm -f conftest*
20816
20817 fi
20818
20819 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20820
20821                 if test $ol_cv_sasl_compat = no ; then
20822                         ol_link_sasl=no
20823                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20824                 fi
20825
20826                 cat >> confdefs.h <<\EOF
20827 #define HAVE_CYRUS_SASL 1
20828 EOF
20829
20830                 SASL_LIBS="$ol_link_sasl"
20831                 if test $ol_enable_spasswd != no ; then
20832                         ol_link_spasswd=yes
20833                 fi
20834
20835                 ac_save_LIBS="$LIBS"
20836                 LIBS="$LIBS $ol_link_sasl"
20837                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20838 echo "configure:20839: checking for sasl_version" >&5
20839 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20840   echo $ac_n "(cached) $ac_c" 1>&6
20841 else
20842   cat > conftest.$ac_ext <<EOF
20843 #line 20844 "configure"
20844 #include "confdefs.h"
20845 /* System header to define __stub macros and hopefully few prototypes,
20846     which can conflict with char sasl_version(); below.  */
20847 #include <assert.h>
20848 /* Override any gcc2 internal prototype to avoid an error.  */
20849 /* We use char because int might match the return type of a gcc2
20850     builtin and then its argument prototype would still apply.  */
20851 char sasl_version();
20852 char (*f)();
20853
20854 int main() {
20855
20856 /* The GNU C library defines this for functions which it implements
20857     to always fail with ENOSYS.  Some functions are actually named
20858     something starting with __ and the normal name is an alias.  */
20859 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20860 choke me
20861 #else
20862 f = sasl_version;
20863 #endif
20864
20865 ; return 0; }
20866 EOF
20867 if { (eval echo configure:20868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20868   rm -rf conftest*
20869   eval "ac_cv_func_sasl_version=yes"
20870 else
20871   echo "configure: failed program was:" >&5
20872   cat conftest.$ac_ext >&5
20873   rm -rf conftest*
20874   eval "ac_cv_func_sasl_version=no"
20875 fi
20876 rm -f conftest*
20877 fi
20878
20879 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20880   echo "$ac_t""yes" 1>&6
20881   cat >> confdefs.h <<\EOF
20882 #define HAVE_SASL_VERSION 1
20883 EOF
20884
20885 else
20886   echo "$ac_t""no" 1>&6
20887 fi
20888
20889                 LIBS="$ac_save_LIBS"
20890         fi
20891
20892 else
20893         echo "configure: warning: SASL authentication not supported!" 1>&2
20894         if test $ol_link_tls = no ; then
20895                 echo "configure: warning: Strong authentication not supported!" 1>&2
20896         fi
20897 fi
20898
20899 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20900         dev=no
20901         if test -r /dev/urandom ; then
20902                 dev="/dev/urandom";
20903         elif test -r /idev/urandom ; then
20904                 dev="/idev/urandom";
20905         elif test -r /dev/srandom ; then
20906                 dev="/dev/srandom";
20907         elif test -r /dev/random ; then
20908                 dev="/dev/random";
20909         elif test -r /idev/random ; then
20910                 dev="/idev/random";
20911         fi
20912
20913         if test $dev != no ; then
20914                 cat >> confdefs.h <<EOF
20915 #define URANDOM_DEVICE "$dev"
20916 EOF
20917
20918         fi
20919 fi
20920
20921 ol_link_fetch=no
20922 if test $ol_with_fetch != no ; then
20923         ol_LIBS=$LIBS
20924 LIBS="-lfetch -lcom_err $LIBS"
20925 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20926 echo "configure:20927: checking fetch(3) library" >&5
20927 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20928   echo $ac_n "(cached) $ac_c" 1>&6
20929 else
20930   
20931         cat > conftest.$ac_ext <<EOF
20932 #line 20933 "configure"
20933 #include "confdefs.h"
20934
20935 #include <sys/param.h>
20936 #include <stdio.h>
20937 #include <fetch.h>
20938 int main() {
20939 struct url *u = fetchParseURL("file:///"); 
20940 ; return 0; }
20941 EOF
20942 if { (eval echo configure:20943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20943   rm -rf conftest*
20944   ol_cv_lib_fetch=yes
20945 else
20946   echo "configure: failed program was:" >&5
20947   cat conftest.$ac_ext >&5
20948   rm -rf conftest*
20949   ol_cv_lib_fetch=no
20950 fi
20951 rm -f conftest*
20952 fi
20953
20954 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20955 LIBS=$ol_LIBS
20956 if test $ol_cv_lib_fetch != no ; then
20957         ol_link_fetch="-lfetch -lcom_err"
20958         cat >> confdefs.h <<\EOF
20959 #define HAVE_FETCH 1
20960 EOF
20961
20962 fi
20963
20964
20965         if test $ol_cv_lib_fetch != no ; then
20966                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20967                 ol_link_fetch=freebsd
20968
20969         elif test $ol_with_fetch != auto ; then
20970                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20971         fi 
20972 fi
20973
20974 if test $ol_enable_crypt != no ; then
20975         save_LIBS="$LIBS"
20976         LIBS="$TLS_LIBS $LIBS"
20977
20978         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20979 echo "configure:20980: checking for crypt" >&5
20980 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20981   echo $ac_n "(cached) $ac_c" 1>&6
20982 else
20983   cat > conftest.$ac_ext <<EOF
20984 #line 20985 "configure"
20985 #include "confdefs.h"
20986 /* System header to define __stub macros and hopefully few prototypes,
20987     which can conflict with char crypt(); below.  */
20988 #include <assert.h>
20989 /* Override any gcc2 internal prototype to avoid an error.  */
20990 /* We use char because int might match the return type of a gcc2
20991     builtin and then its argument prototype would still apply.  */
20992 char crypt();
20993 char (*f)();
20994
20995 int main() {
20996
20997 /* The GNU C library defines this for functions which it implements
20998     to always fail with ENOSYS.  Some functions are actually named
20999     something starting with __ and the normal name is an alias.  */
21000 #if defined (__stub_crypt) || defined (__stub___crypt)
21001 choke me
21002 #else
21003 f = crypt;
21004 #endif
21005
21006 ; return 0; }
21007 EOF
21008 if { (eval echo configure:21009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21009   rm -rf conftest*
21010   eval "ac_cv_func_crypt=yes"
21011 else
21012   echo "configure: failed program was:" >&5
21013   cat conftest.$ac_ext >&5
21014   rm -rf conftest*
21015   eval "ac_cv_func_crypt=no"
21016 fi
21017 rm -f conftest*
21018 fi
21019
21020 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21021   echo "$ac_t""yes" 1>&6
21022   have_crypt=yes
21023 else
21024   echo "$ac_t""no" 1>&6
21025
21026                 LIBS="$save_LIBS"
21027                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21028 echo "configure:21029: checking for crypt in -lcrypt" >&5
21029 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21030 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21031   echo $ac_n "(cached) $ac_c" 1>&6
21032 else
21033   ac_save_LIBS="$LIBS"
21034 LIBS="-lcrypt  $LIBS"
21035 cat > conftest.$ac_ext <<EOF
21036 #line 21037 "configure"
21037 #include "confdefs.h"
21038 /* Override any gcc2 internal prototype to avoid an error.  */
21039 /* We use char because int might match the return type of a gcc2
21040     builtin and then its argument prototype would still apply.  */
21041 char crypt();
21042
21043 int main() {
21044 crypt()
21045 ; return 0; }
21046 EOF
21047 if { (eval echo configure:21048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21048   rm -rf conftest*
21049   eval "ac_cv_lib_$ac_lib_var=yes"
21050 else
21051   echo "configure: failed program was:" >&5
21052   cat conftest.$ac_ext >&5
21053   rm -rf conftest*
21054   eval "ac_cv_lib_$ac_lib_var=no"
21055 fi
21056 rm -f conftest*
21057 LIBS="$ac_save_LIBS"
21058
21059 fi
21060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21061   echo "$ac_t""yes" 1>&6
21062   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21063                         have_crypt=yes
21064 else
21065   echo "$ac_t""no" 1>&6
21066 have_crypt=no
21067 fi
21068
21069 fi
21070
21071
21072         LIBS="$save_LIBS"
21073
21074         if test $have_crypt = yes ; then
21075                 cat >> confdefs.h <<\EOF
21076 #define HAVE_CRYPT 1
21077 EOF
21078
21079         else
21080                 echo "configure: warning: could not find crypt" 1>&2
21081                 if test $ol_enable_crypt = yes ; then
21082                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21083                 fi
21084
21085                 echo "configure: warning: disabling crypt support" 1>&2
21086                 ol_enable_crypt=no
21087         fi
21088 fi
21089
21090 if test $ol_enable_proctitle != no ; then
21091         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21092 echo "configure:21093: checking for setproctitle" >&5
21093 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21094   echo $ac_n "(cached) $ac_c" 1>&6
21095 else
21096   cat > conftest.$ac_ext <<EOF
21097 #line 21098 "configure"
21098 #include "confdefs.h"
21099 /* System header to define __stub macros and hopefully few prototypes,
21100     which can conflict with char setproctitle(); below.  */
21101 #include <assert.h>
21102 /* Override any gcc2 internal prototype to avoid an error.  */
21103 /* We use char because int might match the return type of a gcc2
21104     builtin and then its argument prototype would still apply.  */
21105 char setproctitle();
21106 char (*f)();
21107
21108 int main() {
21109
21110 /* The GNU C library defines this for functions which it implements
21111     to always fail with ENOSYS.  Some functions are actually named
21112     something starting with __ and the normal name is an alias.  */
21113 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21114 choke me
21115 #else
21116 f = setproctitle;
21117 #endif
21118
21119 ; return 0; }
21120 EOF
21121 if { (eval echo configure:21122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21122   rm -rf conftest*
21123   eval "ac_cv_func_setproctitle=yes"
21124 else
21125   echo "configure: failed program was:" >&5
21126   cat conftest.$ac_ext >&5
21127   rm -rf conftest*
21128   eval "ac_cv_func_setproctitle=no"
21129 fi
21130 rm -f conftest*
21131 fi
21132
21133 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21134   echo "$ac_t""yes" 1>&6
21135   have_setproctitle=yes
21136 else
21137   echo "$ac_t""no" 1>&6
21138
21139                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21140 echo "configure:21141: checking for setproctitle in -lutil" >&5
21141 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21143   echo $ac_n "(cached) $ac_c" 1>&6
21144 else
21145   ac_save_LIBS="$LIBS"
21146 LIBS="-lutil  $LIBS"
21147 cat > conftest.$ac_ext <<EOF
21148 #line 21149 "configure"
21149 #include "confdefs.h"
21150 /* Override any gcc2 internal prototype to avoid an error.  */
21151 /* We use char because int might match the return type of a gcc2
21152     builtin and then its argument prototype would still apply.  */
21153 char setproctitle();
21154
21155 int main() {
21156 setproctitle()
21157 ; return 0; }
21158 EOF
21159 if { (eval echo configure:21160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21160   rm -rf conftest*
21161   eval "ac_cv_lib_$ac_lib_var=yes"
21162 else
21163   echo "configure: failed program was:" >&5
21164   cat conftest.$ac_ext >&5
21165   rm -rf conftest*
21166   eval "ac_cv_lib_$ac_lib_var=no"
21167 fi
21168 rm -f conftest*
21169 LIBS="$ac_save_LIBS"
21170
21171 fi
21172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21173   echo "$ac_t""yes" 1>&6
21174   have_setproctitle=yes
21175                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21176 else
21177   echo "$ac_t""no" 1>&6
21178 have_setproctitle=no
21179                         LIBOBJS="$LIBOBJS setproctitle.o"
21180                         LIBSRCS="$LIBSRCS setproctitle.c"
21181 fi
21182
21183 fi
21184
21185
21186         if test $have_setproctitle = yes ; then
21187                 cat >> confdefs.h <<\EOF
21188 #define HAVE_SETPROCTITLE 1
21189 EOF
21190
21191         fi
21192 fi
21193
21194 if test $ol_enable_slp != no ; then
21195         for ac_hdr in slp.h 
21196 do
21197 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21198 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21199 echo "configure:21200: checking for $ac_hdr" >&5
21200 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21201   echo $ac_n "(cached) $ac_c" 1>&6
21202 else
21203   cat > conftest.$ac_ext <<EOF
21204 #line 21205 "configure"
21205 #include "confdefs.h"
21206 #include <$ac_hdr>
21207 EOF
21208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21209 { (eval echo configure:21210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21211 if test -z "$ac_err"; then
21212   rm -rf conftest*
21213   eval "ac_cv_header_$ac_safe=yes"
21214 else
21215   echo "$ac_err" >&5
21216   echo "configure: failed program was:" >&5
21217   cat conftest.$ac_ext >&5
21218   rm -rf conftest*
21219   eval "ac_cv_header_$ac_safe=no"
21220 fi
21221 rm -f conftest*
21222 fi
21223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21224   echo "$ac_t""yes" 1>&6
21225     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21226   cat >> confdefs.h <<EOF
21227 #define $ac_tr_hdr 1
21228 EOF
21229  
21230 else
21231   echo "$ac_t""no" 1>&6
21232 fi
21233 done
21234
21235
21236         if test $ac_cv_header_slp_h = yes ; then
21237                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21238 echo "configure:21239: checking for SLPOpen in -lslp" >&5
21239 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21241   echo $ac_n "(cached) $ac_c" 1>&6
21242 else
21243   ac_save_LIBS="$LIBS"
21244 LIBS="-lslp  $LIBS"
21245 cat > conftest.$ac_ext <<EOF
21246 #line 21247 "configure"
21247 #include "confdefs.h"
21248 /* Override any gcc2 internal prototype to avoid an error.  */
21249 /* We use char because int might match the return type of a gcc2
21250     builtin and then its argument prototype would still apply.  */
21251 char SLPOpen();
21252
21253 int main() {
21254 SLPOpen()
21255 ; return 0; }
21256 EOF
21257 if { (eval echo configure:21258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21258   rm -rf conftest*
21259   eval "ac_cv_lib_$ac_lib_var=yes"
21260 else
21261   echo "configure: failed program was:" >&5
21262   cat conftest.$ac_ext >&5
21263   rm -rf conftest*
21264   eval "ac_cv_lib_$ac_lib_var=no"
21265 fi
21266 rm -f conftest*
21267 LIBS="$ac_save_LIBS"
21268
21269 fi
21270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21271   echo "$ac_t""yes" 1>&6
21272   have_slp=yes
21273 else
21274   echo "$ac_t""no" 1>&6
21275 have_slp=no
21276 fi
21277
21278                 if test $have_slp = yes ; then
21279                         cat >> confdefs.h <<\EOF
21280 #define HAVE_SLP 1
21281 EOF
21282
21283                         SLAPD_SLP_LIBS=-lslp
21284                 fi
21285
21286         elif test $ol_enable_slp = yes ; then
21287                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21288         fi
21289 fi
21290
21291
21292 echo $ac_n "checking long long""... $ac_c" 1>&6
21293 echo "configure:21294: checking long long" >&5
21294 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297   
21298         cat > conftest.$ac_ext <<EOF
21299 #line 21300 "configure"
21300 #include "confdefs.h"
21301
21302 int main() {
21303 long long x;
21304 ; return 0; }
21305 EOF
21306 if { (eval echo configure:21307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21307   rm -rf conftest*
21308   ol_cv_type_long_long=yes
21309 else
21310   echo "configure: failed program was:" >&5
21311   cat conftest.$ac_ext >&5
21312   rm -rf conftest*
21313   ol_cv_type_long_long=no
21314 fi
21315 rm -f conftest*
21316 fi
21317
21318 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21319 if test $ol_cv_type_long_long = yes; then
21320         cat >> confdefs.h <<\EOF
21321 #define HAVE_LONG_LONG 1
21322 EOF
21323
21324 fi
21325
21326 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21327 echo "configure:21328: checking for ANSI C header files" >&5
21328 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21329   echo $ac_n "(cached) $ac_c" 1>&6
21330 else
21331   cat > conftest.$ac_ext <<EOF
21332 #line 21333 "configure"
21333 #include "confdefs.h"
21334 #include <stdlib.h>
21335 #include <stdarg.h>
21336 #include <string.h>
21337 #include <float.h>
21338 EOF
21339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21340 { (eval echo configure:21341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21342 if test -z "$ac_err"; then
21343   rm -rf conftest*
21344   ac_cv_header_stdc=yes
21345 else
21346   echo "$ac_err" >&5
21347   echo "configure: failed program was:" >&5
21348   cat conftest.$ac_ext >&5
21349   rm -rf conftest*
21350   ac_cv_header_stdc=no
21351 fi
21352 rm -f conftest*
21353
21354 if test $ac_cv_header_stdc = yes; then
21355   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21356 cat > conftest.$ac_ext <<EOF
21357 #line 21358 "configure"
21358 #include "confdefs.h"
21359 #include <string.h>
21360 EOF
21361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21362   egrep "memchr" >/dev/null 2>&1; then
21363   :
21364 else
21365   rm -rf conftest*
21366   ac_cv_header_stdc=no
21367 fi
21368 rm -f conftest*
21369
21370 fi
21371
21372 if test $ac_cv_header_stdc = yes; then
21373   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21374 cat > conftest.$ac_ext <<EOF
21375 #line 21376 "configure"
21376 #include "confdefs.h"
21377 #include <stdlib.h>
21378 EOF
21379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21380   egrep "free" >/dev/null 2>&1; then
21381   :
21382 else
21383   rm -rf conftest*
21384   ac_cv_header_stdc=no
21385 fi
21386 rm -f conftest*
21387
21388 fi
21389
21390 if test $ac_cv_header_stdc = yes; then
21391   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21392 if test "$cross_compiling" = yes; then
21393   :
21394 else
21395   cat > conftest.$ac_ext <<EOF
21396 #line 21397 "configure"
21397 #include "confdefs.h"
21398 #include <ctype.h>
21399 #if ((' ' & 0x0FF) == 0x020)
21400 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21401 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21402 #else
21403 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21404  || ('j' <= (c) && (c) <= 'r') \
21405  || ('s' <= (c) && (c) <= 'z'))
21406 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21407 #endif
21408 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21409 int main () { int i; for (i = 0; i < 256; i++)
21410 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21411 exit (0); }
21412
21413 EOF
21414 if { (eval echo configure:21415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21415 then
21416   :
21417 else
21418   echo "configure: failed program was:" >&5
21419   cat conftest.$ac_ext >&5
21420   rm -fr conftest*
21421   ac_cv_header_stdc=no
21422 fi
21423 rm -fr conftest*
21424 fi
21425
21426 fi
21427 fi
21428
21429 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21430 if test $ac_cv_header_stdc = yes; then
21431   cat >> confdefs.h <<\EOF
21432 #define STDC_HEADERS 1
21433 EOF
21434
21435 fi
21436
21437 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21438 echo "configure:21439: checking for mode_t" >&5
21439 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21440   echo $ac_n "(cached) $ac_c" 1>&6
21441 else
21442   cat > conftest.$ac_ext <<EOF
21443 #line 21444 "configure"
21444 #include "confdefs.h"
21445 #include <sys/types.h>
21446 #if STDC_HEADERS
21447 #include <stdlib.h>
21448 #include <stddef.h>
21449 #endif
21450
21451 EOF
21452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21453   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21454   rm -rf conftest*
21455   eval "ac_cv_type_mode_t=yes"
21456 else
21457   rm -rf conftest*
21458   eval "ac_cv_type_mode_t=no"
21459 fi
21460 rm -f conftest*
21461
21462 fi
21463 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21464   echo "$ac_t""yes" 1>&6
21465 else
21466   echo "$ac_t""no" 1>&6
21467   cat >> confdefs.h <<EOF
21468 #define mode_t int
21469 EOF
21470
21471 fi
21472
21473 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21474 echo "configure:21475: checking for off_t" >&5
21475 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21476   echo $ac_n "(cached) $ac_c" 1>&6
21477 else
21478   cat > conftest.$ac_ext <<EOF
21479 #line 21480 "configure"
21480 #include "confdefs.h"
21481 #include <sys/types.h>
21482 #if STDC_HEADERS
21483 #include <stdlib.h>
21484 #include <stddef.h>
21485 #endif
21486
21487 EOF
21488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21489   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21490   rm -rf conftest*
21491   eval "ac_cv_type_off_t=yes"
21492 else
21493   rm -rf conftest*
21494   eval "ac_cv_type_off_t=no"
21495 fi
21496 rm -f conftest*
21497
21498 fi
21499 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21500   echo "$ac_t""yes" 1>&6
21501 else
21502   echo "$ac_t""no" 1>&6
21503   cat >> confdefs.h <<EOF
21504 #define off_t long
21505 EOF
21506
21507 fi
21508
21509 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21510 echo "configure:21511: checking for pid_t" >&5
21511 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21512   echo $ac_n "(cached) $ac_c" 1>&6
21513 else
21514   cat > conftest.$ac_ext <<EOF
21515 #line 21516 "configure"
21516 #include "confdefs.h"
21517 #include <sys/types.h>
21518 #if STDC_HEADERS
21519 #include <stdlib.h>
21520 #include <stddef.h>
21521 #endif
21522
21523 EOF
21524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21525   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21526   rm -rf conftest*
21527   eval "ac_cv_type_pid_t=yes"
21528 else
21529   rm -rf conftest*
21530   eval "ac_cv_type_pid_t=no"
21531 fi
21532 rm -f conftest*
21533
21534 fi
21535 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21536   echo "$ac_t""yes" 1>&6
21537 else
21538   echo "$ac_t""no" 1>&6
21539   cat >> confdefs.h <<EOF
21540 #define pid_t int
21541 EOF
21542
21543 fi
21544
21545 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21546 echo "configure:21547: checking for ptrdiff_t" >&5
21547 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21548   echo $ac_n "(cached) $ac_c" 1>&6
21549 else
21550   cat > conftest.$ac_ext <<EOF
21551 #line 21552 "configure"
21552 #include "confdefs.h"
21553 #include <stddef.h>
21554 int main() {
21555 ptrdiff_t p
21556 ; return 0; }
21557 EOF
21558 if { (eval echo configure:21559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21559   rm -rf conftest*
21560   am_cv_type_ptrdiff_t=yes
21561 else
21562   echo "configure: failed program was:" >&5
21563   cat conftest.$ac_ext >&5
21564   rm -rf conftest*
21565   am_cv_type_ptrdiff_t=no
21566 fi
21567 rm -f conftest*
21568 fi
21569
21570 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21571    if test $am_cv_type_ptrdiff_t = yes; then
21572      cat >> confdefs.h <<\EOF
21573 #define HAVE_PTRDIFF_T 1
21574 EOF
21575
21576    fi
21577
21578 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21579 echo "configure:21580: checking return type of signal handlers" >&5
21580 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21581   echo $ac_n "(cached) $ac_c" 1>&6
21582 else
21583   cat > conftest.$ac_ext <<EOF
21584 #line 21585 "configure"
21585 #include "confdefs.h"
21586 #include <sys/types.h>
21587 #include <signal.h>
21588 #ifdef signal
21589 #undef signal
21590 #endif
21591 #ifdef __cplusplus
21592 extern "C" void (*signal (int, void (*)(int)))(int);
21593 #else
21594 void (*signal ()) ();
21595 #endif
21596
21597 int main() {
21598 int i;
21599 ; return 0; }
21600 EOF
21601 if { (eval echo configure:21602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21602   rm -rf conftest*
21603   ac_cv_type_signal=void
21604 else
21605   echo "configure: failed program was:" >&5
21606   cat conftest.$ac_ext >&5
21607   rm -rf conftest*
21608   ac_cv_type_signal=int
21609 fi
21610 rm -f conftest*
21611 fi
21612
21613 echo "$ac_t""$ac_cv_type_signal" 1>&6
21614 cat >> confdefs.h <<EOF
21615 #define RETSIGTYPE $ac_cv_type_signal
21616 EOF
21617
21618
21619 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21620 echo "configure:21621: checking for size_t" >&5
21621 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21622   echo $ac_n "(cached) $ac_c" 1>&6
21623 else
21624   cat > conftest.$ac_ext <<EOF
21625 #line 21626 "configure"
21626 #include "confdefs.h"
21627 #include <sys/types.h>
21628 #if STDC_HEADERS
21629 #include <stdlib.h>
21630 #include <stddef.h>
21631 #endif
21632
21633 EOF
21634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21635   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21636   rm -rf conftest*
21637   eval "ac_cv_type_size_t=yes"
21638 else
21639   rm -rf conftest*
21640   eval "ac_cv_type_size_t=no"
21641 fi
21642 rm -f conftest*
21643
21644 fi
21645 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21646   echo "$ac_t""yes" 1>&6
21647 else
21648   echo "$ac_t""no" 1>&6
21649   cat >> confdefs.h <<EOF
21650 #define size_t unsigned
21651 EOF
21652
21653 fi
21654
21655
21656 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21657 echo "configure:21658: checking for ssize_t" >&5
21658 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21659   echo $ac_n "(cached) $ac_c" 1>&6
21660 else
21661   cat > conftest.$ac_ext <<EOF
21662 #line 21663 "configure"
21663 #include "confdefs.h"
21664 #include <sys/types.h>
21665 #if STDC_HEADERS
21666 #include <stdlib.h>
21667 #include <stddef.h>
21668 #endif
21669
21670 EOF
21671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21672   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21673   rm -rf conftest*
21674   eval "ac_cv_type_ssize_t=yes"
21675 else
21676   rm -rf conftest*
21677   eval "ac_cv_type_ssize_t=no"
21678 fi
21679 rm -f conftest*
21680
21681 fi
21682 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21683   echo "$ac_t""yes" 1>&6
21684 else
21685   echo "$ac_t""no" 1>&6
21686   cat >> confdefs.h <<EOF
21687 #define ssize_t signed int
21688 EOF
21689
21690 fi
21691
21692 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21693 echo "configure:21694: checking for caddr_t" >&5
21694 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21695   echo $ac_n "(cached) $ac_c" 1>&6
21696 else
21697   cat > conftest.$ac_ext <<EOF
21698 #line 21699 "configure"
21699 #include "confdefs.h"
21700 #include <sys/types.h>
21701 #if STDC_HEADERS
21702 #include <stdlib.h>
21703 #include <stddef.h>
21704 #endif
21705
21706 EOF
21707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21708   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21709   rm -rf conftest*
21710   eval "ac_cv_type_caddr_t=yes"
21711 else
21712   rm -rf conftest*
21713   eval "ac_cv_type_caddr_t=no"
21714 fi
21715 rm -f conftest*
21716
21717 fi
21718 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21719   echo "$ac_t""yes" 1>&6
21720 else
21721   echo "$ac_t""no" 1>&6
21722   cat >> confdefs.h <<EOF
21723 #define caddr_t char *
21724 EOF
21725
21726 fi
21727
21728
21729 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21730 echo "configure:21731: checking for socklen_t" >&5
21731 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21732   echo $ac_n "(cached) $ac_c" 1>&6
21733 else
21734   cat > conftest.$ac_ext <<EOF
21735 #line 21736 "configure"
21736 #include "confdefs.h"
21737
21738 #ifdef HAVE_SYS_TYPES_H
21739 #include <sys/types.h>
21740 #endif
21741 #ifdef HAVE_SYS_SOCKET_H
21742 #include <sys/socket.h>
21743 #endif
21744
21745 int main() {
21746 socklen_t len;
21747 ; return 0; }
21748 EOF
21749 if { (eval echo configure:21750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21750   rm -rf conftest*
21751   ol_cv_type_socklen_t=yes
21752 else
21753   echo "configure: failed program was:" >&5
21754   cat conftest.$ac_ext >&5
21755   rm -rf conftest*
21756   ol_cv_type_socklen_t=no
21757 fi
21758 rm -f conftest*
21759 fi
21760
21761 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21762   if test $ol_cv_type_socklen_t = no; then
21763     cat >> confdefs.h <<\EOF
21764 #define socklen_t int
21765 EOF
21766
21767   fi
21768  
21769 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21770 echo "configure:21771: checking for member st_blksize in aggregate type struct stat" >&5
21771 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21772   echo $ac_n "(cached) $ac_c" 1>&6
21773 else
21774   cat > conftest.$ac_ext <<EOF
21775 #line 21776 "configure"
21776 #include "confdefs.h"
21777 #include <sys/types.h>
21778 #include <sys/stat.h>
21779 int main() {
21780 struct stat foo; foo.st_blksize;
21781 ; return 0; }
21782 EOF
21783 if { (eval echo configure:21784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21784   rm -rf conftest*
21785   ac_cv_c_struct_member_st_blksize=yes
21786 else
21787   echo "configure: failed program was:" >&5
21788   cat conftest.$ac_ext >&5
21789   rm -rf conftest*
21790   ac_cv_c_struct_member_st_blksize=no
21791 fi
21792 rm -f conftest*
21793 fi
21794
21795 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21796 st_blksize="$ac_cv_c_struct_member_st_blksize"
21797 if test $ac_cv_c_struct_member_st_blksize = yes; then
21798   cat >> confdefs.h <<\EOF
21799 #define HAVE_ST_BLKSIZE 1
21800 EOF
21801
21802 fi
21803
21804 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21805 echo "configure:21806: checking whether time.h and sys/time.h may both be included" >&5
21806 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21807   echo $ac_n "(cached) $ac_c" 1>&6
21808 else
21809   cat > conftest.$ac_ext <<EOF
21810 #line 21811 "configure"
21811 #include "confdefs.h"
21812 #include <sys/types.h>
21813 #include <sys/time.h>
21814 #include <time.h>
21815 int main() {
21816 struct tm *tp;
21817 ; return 0; }
21818 EOF
21819 if { (eval echo configure:21820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21820   rm -rf conftest*
21821   ac_cv_header_time=yes
21822 else
21823   echo "configure: failed program was:" >&5
21824   cat conftest.$ac_ext >&5
21825   rm -rf conftest*
21826   ac_cv_header_time=no
21827 fi
21828 rm -f conftest*
21829 fi
21830
21831 echo "$ac_t""$ac_cv_header_time" 1>&6
21832 if test $ac_cv_header_time = yes; then
21833   cat >> confdefs.h <<\EOF
21834 #define TIME_WITH_SYS_TIME 1
21835 EOF
21836
21837 fi
21838
21839 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21840 echo "configure:21841: checking whether struct tm is in sys/time.h or time.h" >&5
21841 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21842   echo $ac_n "(cached) $ac_c" 1>&6
21843 else
21844   cat > conftest.$ac_ext <<EOF
21845 #line 21846 "configure"
21846 #include "confdefs.h"
21847 #include <sys/types.h>
21848 #include <time.h>
21849 int main() {
21850 struct tm *tp; tp->tm_sec;
21851 ; return 0; }
21852 EOF
21853 if { (eval echo configure:21854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21854   rm -rf conftest*
21855   ac_cv_struct_tm=time.h
21856 else
21857   echo "configure: failed program was:" >&5
21858   cat conftest.$ac_ext >&5
21859   rm -rf conftest*
21860   ac_cv_struct_tm=sys/time.h
21861 fi
21862 rm -f conftest*
21863 fi
21864
21865 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21866 if test $ac_cv_struct_tm = sys/time.h; then
21867   cat >> confdefs.h <<\EOF
21868 #define TM_IN_SYS_TIME 1
21869 EOF
21870
21871 fi
21872
21873 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21874 echo "configure:21875: checking for uid_t in sys/types.h" >&5
21875 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21876   echo $ac_n "(cached) $ac_c" 1>&6
21877 else
21878   cat > conftest.$ac_ext <<EOF
21879 #line 21880 "configure"
21880 #include "confdefs.h"
21881 #include <sys/types.h>
21882 EOF
21883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21884   egrep "uid_t" >/dev/null 2>&1; then
21885   rm -rf conftest*
21886   ac_cv_type_uid_t=yes
21887 else
21888   rm -rf conftest*
21889   ac_cv_type_uid_t=no
21890 fi
21891 rm -f conftest*
21892
21893 fi
21894
21895 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21896 if test $ac_cv_type_uid_t = no; then
21897   cat >> confdefs.h <<\EOF
21898 #define uid_t int
21899 EOF
21900
21901   cat >> confdefs.h <<\EOF
21902 #define gid_t int
21903 EOF
21904
21905 fi
21906
21907 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21908 echo "configure:21909: checking for sig_atomic_t" >&5
21909 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21910   echo $ac_n "(cached) $ac_c" 1>&6
21911 else
21912   cat > conftest.$ac_ext <<EOF
21913 #line 21914 "configure"
21914 #include "confdefs.h"
21915 #include <signal.h>
21916 int main() {
21917 sig_atomic_t atomic;
21918 ; return 0; }
21919 EOF
21920 if { (eval echo configure:21921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21921   rm -rf conftest*
21922   ol_cv_type_sig_atomic_t=yes
21923 else
21924   echo "configure: failed program was:" >&5
21925   cat conftest.$ac_ext >&5
21926   rm -rf conftest*
21927   ol_cv_type_sig_atomic_t=no
21928 fi
21929 rm -f conftest*
21930 fi
21931
21932 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21933   if test $ol_cv_type_sig_atomic_t = no; then
21934     cat >> confdefs.h <<\EOF
21935 #define sig_atomic_t int
21936 EOF
21937
21938   fi
21939  
21940
21941
21942 # test for pw_gecos in struct passwd
21943 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21944 echo "configure:21945: checking struct passwd for pw_gecos" >&5
21945 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21946   echo $ac_n "(cached) $ac_c" 1>&6
21947 else
21948   
21949         cat > conftest.$ac_ext <<EOF
21950 #line 21951 "configure"
21951 #include "confdefs.h"
21952 #include <pwd.h>
21953 int main() {
21954
21955         struct passwd pwd;
21956         pwd.pw_gecos = pwd.pw_name;
21957
21958 ; return 0; }
21959 EOF
21960 if { (eval echo configure:21961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21961   rm -rf conftest*
21962   ol_cv_struct_passwd_pw_gecos=yes
21963 else
21964   echo "configure: failed program was:" >&5
21965   cat conftest.$ac_ext >&5
21966   rm -rf conftest*
21967   ol_cv_struct_passwd_pw_gecos=no
21968 fi
21969 rm -f conftest*
21970 fi
21971
21972 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21973 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21974         cat >> confdefs.h <<\EOF
21975 #define HAVE_PW_GECOS 1
21976 EOF
21977
21978 fi
21979
21980 # test for pw_passwd in struct passwd
21981 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21982 echo "configure:21983: checking struct passwd for pw_passwd" >&5
21983 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   
21987         cat > conftest.$ac_ext <<EOF
21988 #line 21989 "configure"
21989 #include "confdefs.h"
21990 #include <pwd.h>
21991 int main() {
21992
21993         struct passwd pwd;
21994         pwd.pw_passwd = pwd.pw_name;
21995
21996 ; return 0; }
21997 EOF
21998 if { (eval echo configure:21999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21999   rm -rf conftest*
22000   ol_cv_struct_passwd_pw_passwd=yes
22001 else
22002   echo "configure: failed program was:" >&5
22003   cat conftest.$ac_ext >&5
22004   rm -rf conftest*
22005   ol_cv_struct_passwd_pw_passwd=no
22006 fi
22007 rm -f conftest*
22008 fi
22009
22010 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22011 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22012         cat >> confdefs.h <<\EOF
22013 #define HAVE_PW_PASSWD 1
22014 EOF
22015
22016 fi
22017
22018
22019 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22020 echo "configure:22021: checking if toupper() requires islower()" >&5
22021 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22022   echo $ac_n "(cached) $ac_c" 1>&6
22023 else
22024   
22025         if test "$cross_compiling" = yes; then
22026   ol_cv_c_upper_lower=safe
22027 else
22028   cat > conftest.$ac_ext <<EOF
22029 #line 22030 "configure"
22030 #include "confdefs.h"
22031
22032 #include <ctype.h>
22033 main()
22034 {
22035         if ('C' == toupper('C'))
22036                 exit(0);
22037         else
22038                 exit(1);
22039 }
22040 EOF
22041 if { (eval echo configure:22042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22042 then
22043   ol_cv_c_upper_lower=no
22044 else
22045   echo "configure: failed program was:" >&5
22046   cat conftest.$ac_ext >&5
22047   rm -fr conftest*
22048   ol_cv_c_upper_lower=yes
22049 fi
22050 rm -fr conftest*
22051 fi
22052
22053 fi
22054
22055 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22056 if test $ol_cv_c_upper_lower != no ; then
22057         cat >> confdefs.h <<\EOF
22058 #define C_UPPER_LOWER 1
22059 EOF
22060
22061 fi
22062
22063 echo $ac_n "checking for working const""... $ac_c" 1>&6
22064 echo "configure:22065: checking for working const" >&5
22065 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22066   echo $ac_n "(cached) $ac_c" 1>&6
22067 else
22068   cat > conftest.$ac_ext <<EOF
22069 #line 22070 "configure"
22070 #include "confdefs.h"
22071
22072 int main() {
22073
22074 /* Ultrix mips cc rejects this.  */
22075 typedef int charset[2]; const charset x;
22076 /* SunOS 4.1.1 cc rejects this.  */
22077 char const *const *ccp;
22078 char **p;
22079 /* NEC SVR4.0.2 mips cc rejects this.  */
22080 struct point {int x, y;};
22081 static struct point const zero = {0,0};
22082 /* AIX XL C 1.02.0.0 rejects this.
22083    It does not let you subtract one const X* pointer from another in an arm
22084    of an if-expression whose if-part is not a constant expression */
22085 const char *g = "string";
22086 ccp = &g + (g ? g-g : 0);
22087 /* HPUX 7.0 cc rejects these. */
22088 ++ccp;
22089 p = (char**) ccp;
22090 ccp = (char const *const *) p;
22091 { /* SCO 3.2v4 cc rejects this.  */
22092   char *t;
22093   char const *s = 0 ? (char *) 0 : (char const *) 0;
22094
22095   *t++ = 0;
22096 }
22097 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22098   int x[] = {25, 17};
22099   const int *foo = &x[0];
22100   ++foo;
22101 }
22102 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22103   typedef const int *iptr;
22104   iptr p = 0;
22105   ++p;
22106 }
22107 { /* AIX XL C 1.02.0.0 rejects this saying
22108      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22109   struct s { int j; const int *ap[3]; };
22110   struct s *b; b->j = 5;
22111 }
22112 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22113   const int foo = 10;
22114 }
22115
22116 ; return 0; }
22117 EOF
22118 if { (eval echo configure:22119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22119   rm -rf conftest*
22120   ac_cv_c_const=yes
22121 else
22122   echo "configure: failed program was:" >&5
22123   cat conftest.$ac_ext >&5
22124   rm -rf conftest*
22125   ac_cv_c_const=no
22126 fi
22127 rm -f conftest*
22128 fi
22129
22130 echo "$ac_t""$ac_cv_c_const" 1>&6
22131 if test $ac_cv_c_const = no; then
22132   cat >> confdefs.h <<\EOF
22133 #define const 
22134 EOF
22135
22136 fi
22137
22138 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22139 echo "configure:22140: checking if compiler understands volatile" >&5
22140 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22141   echo $ac_n "(cached) $ac_c" 1>&6
22142 else
22143   cat > conftest.$ac_ext <<EOF
22144 #line 22145 "configure"
22145 #include "confdefs.h"
22146 int x, y, z;
22147 int main() {
22148 volatile int a; int * volatile b = x ? &y : &z;
22149       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22150       *b = 0;
22151 ; return 0; }
22152 EOF
22153 if { (eval echo configure:22154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22154   rm -rf conftest*
22155   ol_cv_c_volatile=yes
22156 else
22157   echo "configure: failed program was:" >&5
22158   cat conftest.$ac_ext >&5
22159   rm -rf conftest*
22160   ol_cv_c_volatile=no
22161 fi
22162 rm -f conftest*
22163 fi
22164
22165 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22166   if test $ol_cv_c_volatile = yes; then
22167     : 
22168   else
22169     cat >> confdefs.h <<\EOF
22170 #define volatile 
22171 EOF
22172
22173   fi
22174  
22175
22176 if test $cross_compiling = yes ; then
22177         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22178         cat >> confdefs.h <<\EOF
22179 #define CROSS_COMPILING 1
22180 EOF
22181
22182 else
22183         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22184 echo "configure:22185: checking whether byte ordering is bigendian" >&5
22185 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22186   echo $ac_n "(cached) $ac_c" 1>&6
22187 else
22188   ac_cv_c_bigendian=unknown
22189 # See if sys/param.h defines the BYTE_ORDER macro.
22190 cat > conftest.$ac_ext <<EOF
22191 #line 22192 "configure"
22192 #include "confdefs.h"
22193 #include <sys/types.h>
22194 #include <sys/param.h>
22195 int main() {
22196
22197 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22198  bogus endian macros
22199 #endif
22200 ; return 0; }
22201 EOF
22202 if { (eval echo configure:22203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22203   rm -rf conftest*
22204   # It does; now see whether it defined to BIG_ENDIAN or not.
22205 cat > conftest.$ac_ext <<EOF
22206 #line 22207 "configure"
22207 #include "confdefs.h"
22208 #include <sys/types.h>
22209 #include <sys/param.h>
22210 int main() {
22211
22212 #if BYTE_ORDER != BIG_ENDIAN
22213  not big endian
22214 #endif
22215 ; return 0; }
22216 EOF
22217 if { (eval echo configure:22218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22218   rm -rf conftest*
22219   ac_cv_c_bigendian=yes
22220 else
22221   echo "configure: failed program was:" >&5
22222   cat conftest.$ac_ext >&5
22223   rm -rf conftest*
22224   ac_cv_c_bigendian=no
22225 fi
22226 rm -f conftest*
22227 else
22228   echo "configure: failed program was:" >&5
22229   cat conftest.$ac_ext >&5
22230 fi
22231 rm -f conftest*
22232 if test $ac_cv_c_bigendian = unknown; then
22233 if test "$cross_compiling" = yes; then
22234     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22235 else
22236   cat > conftest.$ac_ext <<EOF
22237 #line 22238 "configure"
22238 #include "confdefs.h"
22239 main () {
22240   /* Are we little or big endian?  From Harbison&Steele.  */
22241   union
22242   {
22243     long l;
22244     char c[sizeof (long)];
22245   } u;
22246   u.l = 1;
22247   exit (u.c[sizeof (long) - 1] == 1);
22248 }
22249 EOF
22250 if { (eval echo configure:22251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22251 then
22252   ac_cv_c_bigendian=no
22253 else
22254   echo "configure: failed program was:" >&5
22255   cat conftest.$ac_ext >&5
22256   rm -fr conftest*
22257   ac_cv_c_bigendian=yes
22258 fi
22259 rm -fr conftest*
22260 fi
22261
22262 fi
22263 fi
22264
22265 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22266 if test $ac_cv_c_bigendian = yes; then
22267   cat >> confdefs.h <<\EOF
22268 #define WORDS_BIGENDIAN 1
22269 EOF
22270
22271 fi
22272
22273 fi
22274
22275 echo $ac_n "checking size of short""... $ac_c" 1>&6
22276 echo "configure:22277: checking size of short" >&5 
22277 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22278   echo $ac_n "(cached) $ac_c" 1>&6
22279 else
22280   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22281   cat > conftest.$ac_ext <<EOF
22282 #line 22283 "configure"
22283 #include "confdefs.h"
22284 #include "confdefs.h" 
22285 #include <stdlib.h>
22286 #include <sys/types.h> 
22287  
22288
22289 int main() {
22290 switch (0) case 0: case (sizeof (short) == $ac_size):;
22291 ; return 0; }
22292 EOF
22293 if { (eval echo configure:22294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22294   rm -rf conftest*
22295   ac_cv_sizeof_short=$ac_size
22296 else
22297   echo "configure: failed program was:" >&5
22298   cat conftest.$ac_ext >&5
22299 fi
22300 rm -f conftest* 
22301   if test x$ac_cv_sizeof_short != x ; then break; fi 
22302 done 
22303
22304 fi
22305  
22306 if test x$ac_cv_sizeof_short = x ; then 
22307   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22308 fi 
22309 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22310 cat >> confdefs.h <<EOF
22311 #define SIZEOF_SHORT $ac_cv_sizeof_short
22312 EOF
22313  
22314  
22315 echo $ac_n "checking size of int""... $ac_c" 1>&6
22316 echo "configure:22317: checking size of int" >&5 
22317 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22318   echo $ac_n "(cached) $ac_c" 1>&6
22319 else
22320   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22321   cat > conftest.$ac_ext <<EOF
22322 #line 22323 "configure"
22323 #include "confdefs.h"
22324 #include "confdefs.h" 
22325 #include <stdlib.h>
22326 #include <sys/types.h> 
22327  
22328
22329 int main() {
22330 switch (0) case 0: case (sizeof (int) == $ac_size):;
22331 ; return 0; }
22332 EOF
22333 if { (eval echo configure:22334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22334   rm -rf conftest*
22335   ac_cv_sizeof_int=$ac_size
22336 else
22337   echo "configure: failed program was:" >&5
22338   cat conftest.$ac_ext >&5
22339 fi
22340 rm -f conftest* 
22341   if test x$ac_cv_sizeof_int != x ; then break; fi 
22342 done 
22343
22344 fi
22345  
22346 if test x$ac_cv_sizeof_int = x ; then 
22347   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22348 fi 
22349 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22350 cat >> confdefs.h <<EOF
22351 #define SIZEOF_INT $ac_cv_sizeof_int
22352 EOF
22353  
22354  
22355 echo $ac_n "checking size of long""... $ac_c" 1>&6
22356 echo "configure:22357: checking size of long" >&5 
22357 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22358   echo $ac_n "(cached) $ac_c" 1>&6
22359 else
22360   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22361   cat > conftest.$ac_ext <<EOF
22362 #line 22363 "configure"
22363 #include "confdefs.h"
22364 #include "confdefs.h" 
22365 #include <stdlib.h>
22366 #include <sys/types.h> 
22367  
22368
22369 int main() {
22370 switch (0) case 0: case (sizeof (long) == $ac_size):;
22371 ; return 0; }
22372 EOF
22373 if { (eval echo configure:22374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22374   rm -rf conftest*
22375   ac_cv_sizeof_long=$ac_size
22376 else
22377   echo "configure: failed program was:" >&5
22378   cat conftest.$ac_ext >&5
22379 fi
22380 rm -f conftest* 
22381   if test x$ac_cv_sizeof_long != x ; then break; fi 
22382 done 
22383
22384 fi
22385  
22386 if test x$ac_cv_sizeof_long = x ; then 
22387   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22388 fi 
22389 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22390 cat >> confdefs.h <<EOF
22391 #define SIZEOF_LONG $ac_cv_sizeof_long
22392 EOF
22393  
22394
22395 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22396 echo "configure:22397: checking size of wchar_t" >&5 
22397 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22398   echo $ac_n "(cached) $ac_c" 1>&6
22399 else
22400   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22401   cat > conftest.$ac_ext <<EOF
22402 #line 22403 "configure"
22403 #include "confdefs.h"
22404 #include "confdefs.h" 
22405 #include <stdlib.h>
22406 #include <sys/types.h> 
22407  
22408
22409 int main() {
22410 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22411 ; return 0; }
22412 EOF
22413 if { (eval echo configure:22414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22414   rm -rf conftest*
22415   ac_cv_sizeof_wchar_t=$ac_size
22416 else
22417   echo "configure: failed program was:" >&5
22418   cat conftest.$ac_ext >&5
22419 fi
22420 rm -f conftest* 
22421   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22422 done 
22423
22424 fi
22425  
22426 if test x$ac_cv_sizeof_wchar_t = x ; then 
22427   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22428 fi 
22429 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22430 cat >> confdefs.h <<EOF
22431 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22432 EOF
22433  
22434
22435
22436 if test "$ac_cv_sizeof_int" -lt 4 ; then
22437         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22438
22439         cat >> confdefs.h <<\EOF
22440 #define LBER_INT_T long
22441 EOF
22442
22443 else
22444         cat >> confdefs.h <<\EOF
22445 #define LBER_INT_T int
22446 EOF
22447
22448 fi
22449
22450 cat >> confdefs.h <<\EOF
22451 #define LBER_LEN_T long
22452 EOF
22453
22454 cat >> confdefs.h <<\EOF
22455 #define LBER_SOCKET_T int
22456 EOF
22457
22458 cat >> confdefs.h <<\EOF
22459 #define LBER_TAG_T long
22460 EOF
22461
22462
22463 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22464 echo "configure:22465: checking for 8-bit clean memcmp" >&5
22465 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22466   echo $ac_n "(cached) $ac_c" 1>&6
22467 else
22468   if test "$cross_compiling" = yes; then
22469   ac_cv_func_memcmp_clean=no
22470 else
22471   cat > conftest.$ac_ext <<EOF
22472 #line 22473 "configure"
22473 #include "confdefs.h"
22474
22475 main()
22476 {
22477   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22478   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22479 }
22480
22481 EOF
22482 if { (eval echo configure:22483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22483 then
22484   ac_cv_func_memcmp_clean=yes
22485 else
22486   echo "configure: failed program was:" >&5
22487   cat conftest.$ac_ext >&5
22488   rm -fr conftest*
22489   ac_cv_func_memcmp_clean=no
22490 fi
22491 rm -fr conftest*
22492 fi
22493
22494 fi
22495
22496 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22497 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22498
22499 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22500 echo "configure:22501: checking for strftime" >&5
22501 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22502   echo $ac_n "(cached) $ac_c" 1>&6
22503 else
22504   cat > conftest.$ac_ext <<EOF
22505 #line 22506 "configure"
22506 #include "confdefs.h"
22507 /* System header to define __stub macros and hopefully few prototypes,
22508     which can conflict with char strftime(); below.  */
22509 #include <assert.h>
22510 /* Override any gcc2 internal prototype to avoid an error.  */
22511 /* We use char because int might match the return type of a gcc2
22512     builtin and then its argument prototype would still apply.  */
22513 char strftime();
22514 char (*f)();
22515
22516 int main() {
22517
22518 /* The GNU C library defines this for functions which it implements
22519     to always fail with ENOSYS.  Some functions are actually named
22520     something starting with __ and the normal name is an alias.  */
22521 #if defined (__stub_strftime) || defined (__stub___strftime)
22522 choke me
22523 #else
22524 f = strftime;
22525 #endif
22526
22527 ; return 0; }
22528 EOF
22529 if { (eval echo configure:22530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22530   rm -rf conftest*
22531   eval "ac_cv_func_strftime=yes"
22532 else
22533   echo "configure: failed program was:" >&5
22534   cat conftest.$ac_ext >&5
22535   rm -rf conftest*
22536   eval "ac_cv_func_strftime=no"
22537 fi
22538 rm -f conftest*
22539 fi
22540
22541 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22542   echo "$ac_t""yes" 1>&6
22543   cat >> confdefs.h <<\EOF
22544 #define HAVE_STRFTIME 1
22545 EOF
22546
22547 else
22548   echo "$ac_t""no" 1>&6
22549 # strftime is in -lintl on SCO UNIX.
22550 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22551 echo "configure:22552: checking for strftime in -lintl" >&5
22552 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22554   echo $ac_n "(cached) $ac_c" 1>&6
22555 else
22556   ac_save_LIBS="$LIBS"
22557 LIBS="-lintl  $LIBS"
22558 cat > conftest.$ac_ext <<EOF
22559 #line 22560 "configure"
22560 #include "confdefs.h"
22561 /* Override any gcc2 internal prototype to avoid an error.  */
22562 /* We use char because int might match the return type of a gcc2
22563     builtin and then its argument prototype would still apply.  */
22564 char strftime();
22565
22566 int main() {
22567 strftime()
22568 ; return 0; }
22569 EOF
22570 if { (eval echo configure:22571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22571   rm -rf conftest*
22572   eval "ac_cv_lib_$ac_lib_var=yes"
22573 else
22574   echo "configure: failed program was:" >&5
22575   cat conftest.$ac_ext >&5
22576   rm -rf conftest*
22577   eval "ac_cv_lib_$ac_lib_var=no"
22578 fi
22579 rm -f conftest*
22580 LIBS="$ac_save_LIBS"
22581
22582 fi
22583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22584   echo "$ac_t""yes" 1>&6
22585   cat >> confdefs.h <<\EOF
22586 #define HAVE_STRFTIME 1
22587 EOF
22588
22589 LIBS="-lintl $LIBS"
22590 else
22591   echo "$ac_t""no" 1>&6
22592 fi
22593
22594 fi
22595
22596
22597 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22598 echo "configure:22599: checking for inet_aton()" >&5
22599 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22600   echo $ac_n "(cached) $ac_c" 1>&6
22601 else
22602   cat > conftest.$ac_ext <<EOF
22603 #line 22604 "configure"
22604 #include "confdefs.h"
22605
22606 #ifdef HAVE_SYS_TYPES_H
22607 #       include <sys/types.h>
22608 #endif
22609 #ifdef HAVE_SYS_SOCKET_H
22610 #       include <sys/socket.h>
22611 #       ifdef HAVE_SYS_SELECT_H
22612 #               include <sys/select.h>
22613 #       endif
22614 #       include <netinet/in.h>
22615 #       ifdef HAVE_ARPA_INET_H
22616 #               include <arpa/inet.h>
22617 #       endif
22618 #endif
22619
22620 int main() {
22621 struct in_addr in;
22622 int rc = inet_aton( "255.255.255.255", &in );
22623 ; return 0; }
22624 EOF
22625 if { (eval echo configure:22626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22626   rm -rf conftest*
22627   ol_cv_func_inet_aton=yes
22628 else
22629   echo "configure: failed program was:" >&5
22630   cat conftest.$ac_ext >&5
22631   rm -rf conftest*
22632   ol_cv_func_inet_aton=no
22633 fi
22634 rm -f conftest*
22635 fi
22636
22637 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22638   if test $ol_cv_func_inet_aton != no; then
22639     cat >> confdefs.h <<\EOF
22640 #define HAVE_INET_ATON 1
22641 EOF
22642
22643   fi
22644  
22645
22646 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22647 echo "configure:22648: checking for _spawnlp" >&5
22648 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22649   echo $ac_n "(cached) $ac_c" 1>&6
22650 else
22651   cat > conftest.$ac_ext <<EOF
22652 #line 22653 "configure"
22653 #include "confdefs.h"
22654 /* System header to define __stub macros and hopefully few prototypes,
22655     which can conflict with char _spawnlp(); below.  */
22656 #include <assert.h>
22657 /* Override any gcc2 internal prototype to avoid an error.  */
22658 /* We use char because int might match the return type of a gcc2
22659     builtin and then its argument prototype would still apply.  */
22660 char _spawnlp();
22661 char (*f)();
22662
22663 int main() {
22664
22665 /* The GNU C library defines this for functions which it implements
22666     to always fail with ENOSYS.  Some functions are actually named
22667     something starting with __ and the normal name is an alias.  */
22668 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22669 choke me
22670 #else
22671 f = _spawnlp;
22672 #endif
22673
22674 ; return 0; }
22675 EOF
22676 if { (eval echo configure:22677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22677   rm -rf conftest*
22678   eval "ac_cv_func__spawnlp=yes"
22679 else
22680   echo "configure: failed program was:" >&5
22681   cat conftest.$ac_ext >&5
22682   rm -rf conftest*
22683   eval "ac_cv_func__spawnlp=no"
22684 fi
22685 rm -f conftest*
22686 fi
22687
22688 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22689   echo "$ac_t""yes" 1>&6
22690   cat >> confdefs.h <<\EOF
22691 #define HAVE_SPAWNLP 1
22692 EOF
22693
22694 else
22695   echo "$ac_t""no" 1>&6
22696 fi
22697
22698
22699 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22700 echo "configure:22701: checking for _snprintf" >&5
22701 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22702   echo $ac_n "(cached) $ac_c" 1>&6
22703 else
22704   cat > conftest.$ac_ext <<EOF
22705 #line 22706 "configure"
22706 #include "confdefs.h"
22707 /* System header to define __stub macros and hopefully few prototypes,
22708     which can conflict with char _snprintf(); below.  */
22709 #include <assert.h>
22710 /* Override any gcc2 internal prototype to avoid an error.  */
22711 /* We use char because int might match the return type of a gcc2
22712     builtin and then its argument prototype would still apply.  */
22713 char _snprintf();
22714 char (*f)();
22715
22716 int main() {
22717
22718 /* The GNU C library defines this for functions which it implements
22719     to always fail with ENOSYS.  Some functions are actually named
22720     something starting with __ and the normal name is an alias.  */
22721 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22722 choke me
22723 #else
22724 f = _snprintf;
22725 #endif
22726
22727 ; return 0; }
22728 EOF
22729 if { (eval echo configure:22730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22730   rm -rf conftest*
22731   eval "ac_cv_func__snprintf=yes"
22732 else
22733   echo "configure: failed program was:" >&5
22734   cat conftest.$ac_ext >&5
22735   rm -rf conftest*
22736   eval "ac_cv_func__snprintf=no"
22737 fi
22738 rm -f conftest*
22739 fi
22740
22741 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22742   echo "$ac_t""yes" 1>&6
22743   ac_cv_func_snprintf=yes
22744         cat >> confdefs.h <<\EOF
22745 #define snprintf _snprintf
22746 EOF
22747
22748
22749 else
22750   echo "$ac_t""no" 1>&6
22751 fi
22752
22753
22754 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22755 echo "configure:22756: checking for _vsnprintf" >&5
22756 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22757   echo $ac_n "(cached) $ac_c" 1>&6
22758 else
22759   cat > conftest.$ac_ext <<EOF
22760 #line 22761 "configure"
22761 #include "confdefs.h"
22762 /* System header to define __stub macros and hopefully few prototypes,
22763     which can conflict with char _vsnprintf(); below.  */
22764 #include <assert.h>
22765 /* Override any gcc2 internal prototype to avoid an error.  */
22766 /* We use char because int might match the return type of a gcc2
22767     builtin and then its argument prototype would still apply.  */
22768 char _vsnprintf();
22769 char (*f)();
22770
22771 int main() {
22772
22773 /* The GNU C library defines this for functions which it implements
22774     to always fail with ENOSYS.  Some functions are actually named
22775     something starting with __ and the normal name is an alias.  */
22776 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22777 choke me
22778 #else
22779 f = _vsnprintf;
22780 #endif
22781
22782 ; return 0; }
22783 EOF
22784 if { (eval echo configure:22785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22785   rm -rf conftest*
22786   eval "ac_cv_func__vsnprintf=yes"
22787 else
22788   echo "configure: failed program was:" >&5
22789   cat conftest.$ac_ext >&5
22790   rm -rf conftest*
22791   eval "ac_cv_func__vsnprintf=no"
22792 fi
22793 rm -f conftest*
22794 fi
22795
22796 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22797   echo "$ac_t""yes" 1>&6
22798   ac_cv_func_vsnprintf=yes
22799         cat >> confdefs.h <<\EOF
22800 #define vsnprintf _vsnprintf
22801 EOF
22802
22803
22804 else
22805   echo "$ac_t""no" 1>&6
22806 fi
22807
22808
22809 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22810 echo "configure:22811: checking for vprintf" >&5
22811 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22812   echo $ac_n "(cached) $ac_c" 1>&6
22813 else
22814   cat > conftest.$ac_ext <<EOF
22815 #line 22816 "configure"
22816 #include "confdefs.h"
22817 /* System header to define __stub macros and hopefully few prototypes,
22818     which can conflict with char vprintf(); below.  */
22819 #include <assert.h>
22820 /* Override any gcc2 internal prototype to avoid an error.  */
22821 /* We use char because int might match the return type of a gcc2
22822     builtin and then its argument prototype would still apply.  */
22823 char vprintf();
22824 char (*f)();
22825
22826 int main() {
22827
22828 /* The GNU C library defines this for functions which it implements
22829     to always fail with ENOSYS.  Some functions are actually named
22830     something starting with __ and the normal name is an alias.  */
22831 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22832 choke me
22833 #else
22834 f = vprintf;
22835 #endif
22836
22837 ; return 0; }
22838 EOF
22839 if { (eval echo configure:22840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22840   rm -rf conftest*
22841   eval "ac_cv_func_vprintf=yes"
22842 else
22843   echo "configure: failed program was:" >&5
22844   cat conftest.$ac_ext >&5
22845   rm -rf conftest*
22846   eval "ac_cv_func_vprintf=no"
22847 fi
22848 rm -f conftest*
22849 fi
22850
22851 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22852   echo "$ac_t""yes" 1>&6
22853   cat >> confdefs.h <<\EOF
22854 #define HAVE_VPRINTF 1
22855 EOF
22856
22857 else
22858   echo "$ac_t""no" 1>&6
22859 fi
22860
22861 if test "$ac_cv_func_vprintf" != yes; then
22862 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22863 echo "configure:22864: checking for _doprnt" >&5
22864 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22865   echo $ac_n "(cached) $ac_c" 1>&6
22866 else
22867   cat > conftest.$ac_ext <<EOF
22868 #line 22869 "configure"
22869 #include "confdefs.h"
22870 /* System header to define __stub macros and hopefully few prototypes,
22871     which can conflict with char _doprnt(); below.  */
22872 #include <assert.h>
22873 /* Override any gcc2 internal prototype to avoid an error.  */
22874 /* We use char because int might match the return type of a gcc2
22875     builtin and then its argument prototype would still apply.  */
22876 char _doprnt();
22877 char (*f)();
22878
22879 int main() {
22880
22881 /* The GNU C library defines this for functions which it implements
22882     to always fail with ENOSYS.  Some functions are actually named
22883     something starting with __ and the normal name is an alias.  */
22884 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22885 choke me
22886 #else
22887 f = _doprnt;
22888 #endif
22889
22890 ; return 0; }
22891 EOF
22892 if { (eval echo configure:22893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22893   rm -rf conftest*
22894   eval "ac_cv_func__doprnt=yes"
22895 else
22896   echo "configure: failed program was:" >&5
22897   cat conftest.$ac_ext >&5
22898   rm -rf conftest*
22899   eval "ac_cv_func__doprnt=no"
22900 fi
22901 rm -f conftest*
22902 fi
22903
22904 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22905   echo "$ac_t""yes" 1>&6
22906   cat >> confdefs.h <<\EOF
22907 #define HAVE_DOPRNT 1
22908 EOF
22909
22910 else
22911   echo "$ac_t""no" 1>&6
22912 fi
22913
22914 fi
22915
22916
22917 if test $ac_cv_func_vprintf = yes ; then
22918                 for ac_func in snprintf vsnprintf
22919 do
22920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22921 echo "configure:22922: checking for $ac_func" >&5
22922 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22923   echo $ac_n "(cached) $ac_c" 1>&6
22924 else
22925   cat > conftest.$ac_ext <<EOF
22926 #line 22927 "configure"
22927 #include "confdefs.h"
22928 /* System header to define __stub macros and hopefully few prototypes,
22929     which can conflict with char $ac_func(); below.  */
22930 #include <assert.h>
22931 /* Override any gcc2 internal prototype to avoid an error.  */
22932 /* We use char because int might match the return type of a gcc2
22933     builtin and then its argument prototype would still apply.  */
22934 char $ac_func();
22935 char (*f)();
22936
22937 int main() {
22938
22939 /* The GNU C library defines this for functions which it implements
22940     to always fail with ENOSYS.  Some functions are actually named
22941     something starting with __ and the normal name is an alias.  */
22942 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22943 choke me
22944 #else
22945 f = $ac_func;
22946 #endif
22947
22948 ; return 0; }
22949 EOF
22950 if { (eval echo configure:22951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22951   rm -rf conftest*
22952   eval "ac_cv_func_$ac_func=yes"
22953 else
22954   echo "configure: failed program was:" >&5
22955   cat conftest.$ac_ext >&5
22956   rm -rf conftest*
22957   eval "ac_cv_func_$ac_func=no"
22958 fi
22959 rm -f conftest*
22960 fi
22961
22962 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22963   echo "$ac_t""yes" 1>&6
22964     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22965   cat >> confdefs.h <<EOF
22966 #define $ac_tr_func 1
22967 EOF
22968  
22969 else
22970   echo "$ac_t""no" 1>&6
22971 fi
22972 done
22973
22974 fi
22975
22976 for ac_func in \
22977         bcopy                   \
22978         closesocket             \
22979         chroot                  \
22980         endgrent                \
22981         endpwent                \
22982         fcntl                   \
22983         flock                   \
22984         fstat                   \
22985         getdtablesize   \
22986         getgrgid                \
22987         gethostname             \
22988         getpass                 \
22989         getpassphrase   \
22990         getpwuid                \
22991         getpwnam                \
22992         getspnam                \
22993         gettimeofday    \
22994         initgroups              \
22995         lockf                   \
22996         memcpy                  \
22997         memmove                 \
22998         mkstemp                 \
22999         mktemp                  \
23000         pipe                    \
23001         read                    \
23002         recv                    \
23003         recvfrom                \
23004         setpwfile               \
23005         setgid                  \
23006         setegid                 \
23007         setsid                  \
23008         setuid                  \
23009         seteuid                 \
23010         sigaction               \
23011         signal                  \
23012         sigset                  \
23013         strdup                  \
23014         strerror                \
23015         strpbrk                 \
23016         strrchr                 \
23017         strsep                  \
23018         strstr                  \
23019         strtol                  \
23020         strtoul                 \
23021         strtoq                  \
23022         strtouq                 \
23023         strtoll                 \
23024         strspn                  \
23025         sysconf                 \
23026         usleep                  \
23027         waitpid                 \
23028         wait4                   \
23029         write                   \
23030         send                    \
23031         sendmsg                 \
23032         sendto                  \
23033
23034 do
23035 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23036 echo "configure:23037: checking for $ac_func" >&5
23037 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23038   echo $ac_n "(cached) $ac_c" 1>&6
23039 else
23040   cat > conftest.$ac_ext <<EOF
23041 #line 23042 "configure"
23042 #include "confdefs.h"
23043 /* System header to define __stub macros and hopefully few prototypes,
23044     which can conflict with char $ac_func(); below.  */
23045 #include <assert.h>
23046 /* Override any gcc2 internal prototype to avoid an error.  */
23047 /* We use char because int might match the return type of a gcc2
23048     builtin and then its argument prototype would still apply.  */
23049 char $ac_func();
23050 char (*f)();
23051
23052 int main() {
23053
23054 /* The GNU C library defines this for functions which it implements
23055     to always fail with ENOSYS.  Some functions are actually named
23056     something starting with __ and the normal name is an alias.  */
23057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23058 choke me
23059 #else
23060 f = $ac_func;
23061 #endif
23062
23063 ; return 0; }
23064 EOF
23065 if { (eval echo configure:23066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23066   rm -rf conftest*
23067   eval "ac_cv_func_$ac_func=yes"
23068 else
23069   echo "configure: failed program was:" >&5
23070   cat conftest.$ac_ext >&5
23071   rm -rf conftest*
23072   eval "ac_cv_func_$ac_func=no"
23073 fi
23074 rm -f conftest*
23075 fi
23076
23077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23078   echo "$ac_t""yes" 1>&6
23079     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23080   cat >> confdefs.h <<EOF
23081 #define $ac_tr_func 1
23082 EOF
23083  
23084 else
23085   echo "$ac_t""no" 1>&6
23086 fi
23087 done
23088
23089
23090 for ac_func in getopt getpeereid
23091 do
23092 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23093 echo "configure:23094: checking for $ac_func" >&5
23094 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23095   echo $ac_n "(cached) $ac_c" 1>&6
23096 else
23097   cat > conftest.$ac_ext <<EOF
23098 #line 23099 "configure"
23099 #include "confdefs.h"
23100 /* System header to define __stub macros and hopefully few prototypes,
23101     which can conflict with char $ac_func(); below.  */
23102 #include <assert.h>
23103 /* Override any gcc2 internal prototype to avoid an error.  */
23104 /* We use char because int might match the return type of a gcc2
23105     builtin and then its argument prototype would still apply.  */
23106 char $ac_func();
23107 char (*f)();
23108
23109 int main() {
23110
23111 /* The GNU C library defines this for functions which it implements
23112     to always fail with ENOSYS.  Some functions are actually named
23113     something starting with __ and the normal name is an alias.  */
23114 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23115 choke me
23116 #else
23117 f = $ac_func;
23118 #endif
23119
23120 ; return 0; }
23121 EOF
23122 if { (eval echo configure:23123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23123   rm -rf conftest*
23124   eval "ac_cv_func_$ac_func=yes"
23125 else
23126   echo "configure: failed program was:" >&5
23127   cat conftest.$ac_ext >&5
23128   rm -rf conftest*
23129   eval "ac_cv_func_$ac_func=no"
23130 fi
23131 rm -f conftest*
23132 fi
23133
23134 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23135   echo "$ac_t""yes" 1>&6
23136     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23137   cat >> confdefs.h <<EOF
23138 #define $ac_tr_func 1
23139 EOF
23140  
23141 else
23142   echo "$ac_t""no" 1>&6
23143 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23144 fi
23145 done
23146
23147
23148
23149 if test "$ac_cv_func_getopt" != yes; then
23150         LIBSRCS="$LIBSRCS getopt.c"
23151 fi
23152 if test "$ac_cv_func_getpeereid" != yes; then
23153         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23154 echo "configure:23155: checking for msg_accrights in msghdr" >&5
23155 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23156   echo $ac_n "(cached) $ac_c" 1>&6
23157 else
23158   cat > conftest.$ac_ext <<EOF
23159 #line 23160 "configure"
23160 #include "confdefs.h"
23161 #include <sys/socket.h>
23162 int main() {
23163 struct msghdr m; m.msg_accrightslen=0
23164 ; return 0; }
23165 EOF
23166 if { (eval echo configure:23167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23167   rm -rf conftest*
23168   ol_cv_msghdr_msg_accrights=yes
23169 else
23170   echo "configure: failed program was:" >&5
23171   cat conftest.$ac_ext >&5
23172   rm -rf conftest*
23173   ol_cv_msghdr_msg_accrights=no
23174 fi
23175 rm -f conftest*
23176         
23177 fi
23178
23179 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23180   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23181         cat >> confdefs.h <<\EOF
23182 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23183 EOF
23184
23185   fi
23186
23187         LIBSRCS="$LIBSRCS getpeereid.c"
23188 fi
23189 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23190         if test "$ac_cv_func_snprintf" != yes; then
23191                 cat >> confdefs.h <<\EOF
23192 #define snprintf ber_pvt_snprintf
23193 EOF
23194
23195         fi
23196         if test "$ac_cv_func_vsnprintf" != yes; then
23197                 cat >> confdefs.h <<\EOF
23198 #define vsnprintf ber_pvt_vsnprintf
23199 EOF
23200
23201         fi
23202 fi
23203
23204 # Check Configuration
23205 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23206 echo "configure:23207: checking declaration of sys_errlist" >&5
23207 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23208   echo $ac_n "(cached) $ac_c" 1>&6
23209 else
23210   
23211         cat > conftest.$ac_ext <<EOF
23212 #line 23213 "configure"
23213 #include "confdefs.h"
23214
23215 #include <stdio.h>
23216 #include <sys/types.h>
23217 #include <errno.h>
23218 #ifdef WINNT
23219 #include <stdlib.h>
23220 #endif 
23221 int main() {
23222 char *c = (char *) *sys_errlist
23223 ; return 0; }
23224 EOF
23225 if { (eval echo configure:23226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23226   rm -rf conftest*
23227   ol_cv_dcl_sys_errlist=yes
23228         ol_cv_have_sys_errlist=yes
23229 else
23230   echo "configure: failed program was:" >&5
23231   cat conftest.$ac_ext >&5
23232   rm -rf conftest*
23233   ol_cv_dcl_sys_errlist=no
23234 fi
23235 rm -f conftest*
23236 fi
23237
23238 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23239 #
23240 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23241 if test $ol_cv_dcl_sys_errlist = no ; then
23242         cat >> confdefs.h <<\EOF
23243 #define DECL_SYS_ERRLIST 1
23244 EOF
23245
23246
23247         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23248 echo "configure:23249: checking existence of sys_errlist" >&5
23249 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23250   echo $ac_n "(cached) $ac_c" 1>&6
23251 else
23252   
23253                 cat > conftest.$ac_ext <<EOF
23254 #line 23255 "configure"
23255 #include "confdefs.h"
23256 #include <errno.h>
23257 int main() {
23258 char *c = (char *) *sys_errlist
23259 ; return 0; }
23260 EOF
23261 if { (eval echo configure:23262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23262   rm -rf conftest*
23263   ol_cv_have_sys_errlist=yes
23264 else
23265   echo "configure: failed program was:" >&5
23266   cat conftest.$ac_ext >&5
23267   rm -rf conftest*
23268   ol_cv_have_sys_errlist=no
23269 fi
23270 rm -f conftest*
23271 fi
23272
23273 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23274 fi
23275 if test $ol_cv_have_sys_errlist = yes ; then
23276         cat >> confdefs.h <<\EOF
23277 #define HAVE_SYS_ERRLIST 1
23278 EOF
23279
23280 fi
23281
23282
23283
23284 if test "$ol_enable_slapi" != no ; then
23285                         for ac_hdr in ltdl.h
23286 do
23287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23289 echo "configure:23290: checking for $ac_hdr" >&5
23290 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23291   echo $ac_n "(cached) $ac_c" 1>&6
23292 else
23293   cat > conftest.$ac_ext <<EOF
23294 #line 23295 "configure"
23295 #include "confdefs.h"
23296 #include <$ac_hdr>
23297 EOF
23298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23299 { (eval echo configure:23300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23301 if test -z "$ac_err"; then
23302   rm -rf conftest*
23303   eval "ac_cv_header_$ac_safe=yes"
23304 else
23305   echo "$ac_err" >&5
23306   echo "configure: failed program was:" >&5
23307   cat conftest.$ac_ext >&5
23308   rm -rf conftest*
23309   eval "ac_cv_header_$ac_safe=no"
23310 fi
23311 rm -f conftest*
23312 fi
23313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23314   echo "$ac_t""yes" 1>&6
23315     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23316   cat >> confdefs.h <<EOF
23317 #define $ac_tr_hdr 1
23318 EOF
23319  
23320 else
23321   echo "$ac_t""no" 1>&6
23322 fi
23323 done
23324
23325
23326         if test $ac_cv_header_ltdl_h != yes ; then
23327                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23328         fi
23329         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23330 echo "configure:23331: checking for lt_dlinit in -lltdl" >&5
23331 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23333   echo $ac_n "(cached) $ac_c" 1>&6
23334 else
23335   ac_save_LIBS="$LIBS"
23336 LIBS="-lltdl  $LIBS"
23337 cat > conftest.$ac_ext <<EOF
23338 #line 23339 "configure"
23339 #include "confdefs.h"
23340 /* Override any gcc2 internal prototype to avoid an error.  */
23341 /* We use char because int might match the return type of a gcc2
23342     builtin and then its argument prototype would still apply.  */
23343 char lt_dlinit();
23344
23345 int main() {
23346 lt_dlinit()
23347 ; return 0; }
23348 EOF
23349 if { (eval echo configure:23350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23350   rm -rf conftest*
23351   eval "ac_cv_lib_$ac_lib_var=yes"
23352 else
23353   echo "configure: failed program was:" >&5
23354   cat conftest.$ac_ext >&5
23355   rm -rf conftest*
23356   eval "ac_cv_lib_$ac_lib_var=no"
23357 fi
23358 rm -f conftest*
23359 LIBS="$ac_save_LIBS"
23360
23361 fi
23362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23363   echo "$ac_t""yes" 1>&6
23364   
23365                 SLAPI_LIBS=-lltdl
23366                 LIBSLAPI=libslapi.a
23367                 LIBSLAPITOOLS=../libslapi.a
23368                 cat >> confdefs.h <<\EOF
23369 #define HAVE_LIBLTDL 1
23370 EOF
23371
23372         
23373 else
23374   echo "$ac_t""no" 1>&6
23375 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23376 fi
23377
23378
23379         cat >> confdefs.h <<\EOF
23380 #define LDAP_SLAPI 1
23381 EOF
23382
23383 fi
23384
23385 if test "$ol_enable_debug" != no ; then
23386         cat >> confdefs.h <<\EOF
23387 #define LDAP_DEBUG 1
23388 EOF
23389
23390 fi
23391 if test "$ol_enable_syslog" = yes ; then
23392         cat >> confdefs.h <<\EOF
23393 #define LDAP_SYSLOG 1
23394 EOF
23395
23396 fi
23397 if test "$ol_link_kbind" != no ; then
23398         cat >> confdefs.h <<\EOF
23399 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23400 EOF
23401
23402 fi
23403 if test "$ol_enable_proctitle" != no ; then
23404         cat >> confdefs.h <<\EOF
23405 #define LDAP_PROCTITLE 1
23406 EOF
23407
23408 fi
23409 if test "$ol_enable_referrals" != no ; then
23410         cat >> confdefs.h <<\EOF
23411 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23412 EOF
23413
23414 fi
23415 if test "$ol_enable_local" != no; then
23416         cat >> confdefs.h <<\EOF
23417 #define LDAP_PF_LOCAL 1
23418 EOF
23419
23420 fi
23421 if test "$ol_link_ipv6" != no; then
23422         cat >> confdefs.h <<\EOF
23423 #define LDAP_PF_INET6 1
23424 EOF
23425
23426 fi
23427 if test "$ol_enable_cleartext" != no ; then
23428         cat >> confdefs.h <<\EOF
23429 #define SLAPD_CLEARTEXT 1
23430 EOF
23431
23432 fi
23433 if test "$ol_enable_crypt" != no ; then
23434         cat >> confdefs.h <<\EOF
23435 #define SLAPD_CRYPT 1
23436 EOF
23437
23438 fi
23439 if test "$ol_link_spasswd" != no ; then
23440         cat >> confdefs.h <<\EOF
23441 #define SLAPD_SPASSWD 1
23442 EOF
23443
23444 fi
23445 if test "$ol_enable_multimaster" != no ; then
23446         cat >> confdefs.h <<\EOF
23447 #define SLAPD_MULTIMASTER 1
23448 EOF
23449
23450 fi
23451 if test "$ol_enable_rlookups" != no ; then
23452         cat >> confdefs.h <<\EOF
23453 #define SLAPD_RLOOKUPS 1
23454 EOF
23455
23456 fi
23457 if test "$ol_enable_aci" != no ; then
23458         cat >> confdefs.h <<\EOF
23459 #define SLAPD_ACI_ENABLED 1
23460 EOF
23461
23462 fi
23463
23464 if test "$ol_link_modules" != no ; then
23465         cat >> confdefs.h <<\EOF
23466 #define SLAPD_MODULES 1
23467 EOF
23468
23469         BUILD_SLAPD=yes
23470         SLAPD_MODULES_LDFLAGS="-dlopen self"
23471 fi
23472
23473 cat >> confdefs.h <<\EOF
23474 #define SLAPD_MOD_STATIC 1
23475 EOF
23476
23477 cat >> confdefs.h <<\EOF
23478 #define SLAPD_MOD_DYNAMIC 2
23479 EOF
23480
23481
23482 if test "$ol_enable_bdb" != no ; then
23483         BUILD_SLAPD=yes
23484         BUILD_BDB=$ol_enable_bdb
23485         if test "$ol_enable_bdb" = mod ; then
23486                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23487                 MFLAG=SLAPD_MOD_DYNAMIC
23488         else
23489                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23490                 MFLAG=SLAPD_MOD_STATIC
23491         fi
23492         cat >> confdefs.h <<EOF
23493 #define SLAPD_BDB $MFLAG
23494 EOF
23495
23496 fi
23497
23498 if test "$ol_enable_dnssrv" != no ; then
23499         BUILD_SLAPD=yes
23500         BUILD_DNSSRV=$ol_enable_dnssrv
23501         if test "$ol_enable_dnssrv" = mod ; then
23502                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23503                 MFLAG=SLAPD_MOD_DYNAMIC
23504         else
23505                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23506                 MFLAG=SLAPD_MOD_STATIC
23507         fi
23508         cat >> confdefs.h <<EOF
23509 #define SLAPD_DNSSRV $MFLAG
23510 EOF
23511
23512 fi
23513
23514 if test "$ol_enable_hdb" != no ; then
23515         BUILD_SLAPD=yes
23516         BUILD_HDB=$ol_enable_hdb
23517         if test "$ol_enable_hdb" = mod ; then
23518                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23519                 MFLAG=SLAPD_MOD_DYNAMIC
23520         else
23521                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23522                 MFLAG=SLAPD_MOD_STATIC
23523         fi
23524         cat >> confdefs.h <<EOF
23525 #define SLAPD_HDB $MFLAG
23526 EOF
23527
23528 fi
23529
23530 if test "$ol_enable_ldap" != no ; then
23531         BUILD_SLAPD=yes
23532         BUILD_LDAP=$ol_enable_ldap
23533         if test "$ol_enable_ldap" = mod ; then
23534                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23535                 MFLAG=SLAPD_MOD_DYNAMIC
23536         else
23537                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23538                 MFLAG=SLAPD_MOD_STATIC
23539         fi
23540         cat >> confdefs.h <<EOF
23541 #define SLAPD_LDAP $MFLAG
23542 EOF
23543
23544 fi
23545
23546 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23547         BUILD_SLAPD=yes
23548         BUILD_LDBM=$ol_enable_ldbm
23549         if test "$ol_enable_ldbm" = mod ; then
23550                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23551                 MFLAG=SLAPD_MOD_DYNAMIC
23552         else
23553                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23554                 MFLAG=SLAPD_MOD_STATIC
23555         fi
23556         cat >> confdefs.h <<EOF
23557 #define SLAPD_LDBM $MFLAG
23558 EOF
23559
23560 fi
23561
23562 if test "$ol_enable_meta" != no ; then
23563         BUILD_SLAPD=yes
23564         BUILD_META=$ol_enable_meta
23565         BUILD_REWRITE=yes
23566         if test "$ol_enable_meta" = mod ; then
23567                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23568                 MFLAG=SLAPD_MOD_DYNAMIC
23569         else
23570                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23571                 MFLAG=SLAPD_MOD_STATIC
23572         fi
23573         cat >> confdefs.h <<EOF
23574 #define SLAPD_META $MFLAG
23575 EOF
23576
23577 fi
23578
23579 if test "$ol_enable_monitor" != no ; then
23580         BUILD_SLAPD=yes
23581         BUILD_MONITOR=$ol_enable_monitor
23582         if test "$ol_enable_monitor" = mod ; then
23583                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23584                 MFLAG=SLAPD_MOD_DYNAMIC
23585         else
23586                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23587                 MFLAG=SLAPD_MOD_STATIC
23588         fi
23589         cat >> confdefs.h <<EOF
23590 #define SLAPD_MONITOR $MFLAG
23591 EOF
23592
23593 fi
23594
23595 if test "$ol_enable_null" != no ; then
23596         BUILD_SLAPD=yes
23597         BUILD_NULL=$ol_enable_null
23598         if test "$ol_enable_null" = mod ; then
23599                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23600                 MFLAG=SLAPD_MOD_DYNAMIC
23601         else
23602                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23603                 MFLAG=SLAPD_MOD_STATIC
23604         fi
23605         cat >> confdefs.h <<EOF
23606 #define SLAPD_NULL $MFLAG
23607 EOF
23608
23609 fi
23610
23611 if test "$ol_enable_passwd" != no ; then
23612         BUILD_SLAPD=yes
23613         BUILD_PASSWD=$ol_enable_passwd
23614         if test "$ol_enable_passwd" = mod ; then
23615                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23616                 MFLAG=SLAPD_MOD_DYNAMIC
23617         else
23618                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23619                 MFLAG=SLAPD_MOD_STATIC
23620         fi
23621         cat >> confdefs.h <<EOF
23622 #define SLAPD_PASSWD $MFLAG
23623 EOF
23624
23625 fi
23626
23627 if test "$ol_link_perl" != no ; then
23628         BUILD_SLAPD=yes
23629         BUILD_PERL=$ol_enable_perl
23630         if test "$ol_enable_perl" = mod ; then
23631                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23632                 MFLAG=SLAPD_MOD_DYNAMIC
23633         else
23634                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23635                 MFLAG=SLAPD_MOD_STATIC
23636         fi
23637         cat >> confdefs.h <<EOF
23638 #define SLAPD_PERL $MFLAG
23639 EOF
23640
23641 fi
23642
23643 if test "$ol_enable_relay" != no ; then
23644         BUILD_SLAPD=yes
23645         BUILD_RELAY=$ol_enable_relay
23646         if test "$ol_enable_relay" = mod ; then
23647                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23648                 MFLAG=SLAPD_MOD_DYNAMIC
23649         else
23650                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23651                 MFLAG=SLAPD_MOD_STATIC
23652         fi
23653         cat >> confdefs.h <<EOF
23654 #define SLAPD_RELAY $MFLAG
23655 EOF
23656
23657 fi
23658
23659 if test "$ol_enable_shell" != no ; then
23660         if test "$ol_link_thread" != no ; then
23661                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23662         fi
23663         BUILD_SLAPD=yes
23664         BUILD_SHELL=$ol_enable_shell
23665         if test "$ol_enable_shell" = mod ; then
23666                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23667                 MFLAG=SLAPD_MOD_DYNAMIC
23668         else
23669                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23670                 MFLAG=SLAPD_MOD_STATIC
23671         fi
23672         cat >> confdefs.h <<EOF
23673 #define SLAPD_SHELL $MFLAG
23674 EOF
23675
23676 fi
23677
23678 if test "$ol_link_sql" != no ; then
23679         BUILD_SLAPD=yes
23680         BUILD_SQL=$ol_enable_sql
23681         if test "$ol_enable_sql" = mod; then
23682                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23683                 MFLAG=SLAPD_MOD_DYNAMIC
23684         else
23685                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23686                 MFLAG=SLAPD_MOD_STATIC
23687         fi
23688         cat >> confdefs.h <<EOF
23689 #define SLAPD_SQL $MFLAG
23690 EOF
23691
23692 fi
23693
23694 if test "$ol_enable_chain" != no ; then
23695         BUILD_CHAIN=$ol_enable_chain
23696         if test "$ol_enable_chain" = mod ; then
23697                 MFLAG=SLAPD_MOD_DYNAMIC
23698                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23699         else
23700                 MFLAG=SLAPD_MOD_STATIC
23701         fi
23702         cat >> confdefs.h <<EOF
23703 #define SLAPD_OVER_CHAIN $MFLAG
23704 EOF
23705
23706 fi
23707
23708 if test "$ol_enable_denyop" != no ; then
23709         BUILD_DENYOP=$ol_enable_denyop
23710         if test "$ol_enable_denyop" = mod ; then
23711                 MFLAG=SLAPD_MOD_DYNAMIC
23712                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23713         else
23714                 MFLAG=SLAPD_MOD_STATIC
23715         fi
23716         cat >> confdefs.h <<EOF
23717 #define SLAPD_OVER_DENYOP $MFLAG
23718 EOF
23719
23720 fi
23721
23722 if test "$ol_enable_dyngroup" != no ; then
23723         BUILD_DYNGROUP=$ol_enable_dyngroup
23724         if test "$ol_enable_dyngroup" = mod ; then
23725                 MFLAG=SLAPD_MOD_DYNAMIC
23726                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23727         else
23728                 MFLAG=SLAPD_MOD_STATIC
23729         fi
23730         cat >> confdefs.h <<EOF
23731 #define SLAPD_OVER_DYNGROUP $MFLAG
23732 EOF
23733
23734 fi
23735
23736 if test "$ol_enable_lastmod" != no ; then
23737         BUILD_LASTMOD=$ol_enable_lastmod
23738         if test "$ol_enable_lastmod" = mod ; then
23739                 MFLAG=SLAPD_MOD_DYNAMIC
23740                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23741         else
23742                 MFLAG=SLAPD_MOD_STATIC
23743         fi
23744         cat >> confdefs.h <<EOF
23745 #define SLAPD_OVER_LASTMOD $MFLAG
23746 EOF
23747
23748 fi
23749
23750 if test "$ol_enable_ppolicy" != no ; then
23751         BUILD_PPOLICY=$ol_enable_ppolicy
23752         if test "$ol_enable_ppolicy" = mod ; then
23753                 MFLAG=SLAPD_MOD_DYNAMIC
23754                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23755         else
23756                 MFLAG=SLAPD_MOD_STATIC
23757         fi
23758         cat >> confdefs.h <<EOF
23759 #define SLAPD_OVER_PPOLICY $MFLAG
23760 EOF
23761
23762 fi
23763
23764 if test "$ol_enable_proxycache" != no ; then
23765         BUILD_PROXYCACHE=$ol_enable_proxycache
23766         if test "$ol_enable_proxycache" = mod ; then
23767                 MFLAG=SLAPD_MOD_DYNAMIC
23768                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23769         else
23770                 MFLAG=SLAPD_MOD_STATIC
23771         fi
23772         cat >> confdefs.h <<EOF
23773 #define SLAPD_OVER_PROXYCACHE $MFLAG
23774 EOF
23775
23776 fi
23777
23778 if test "$ol_enable_refint" != no ; then
23779         BUILD_REFINT=$ol_enable_refint
23780         if test "$ol_enable_refint" = mod ; then
23781                 MFLAG=SLAPD_MOD_DYNAMIC
23782                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
23783         else
23784                 MFLAG=SLAPD_MOD_STATIC
23785         fi
23786         cat >> confdefs.h <<EOF
23787 #define SLAPD_OVER_REFINT $MFLAG
23788 EOF
23789
23790 fi
23791
23792 if test "$ol_enable_rwm" != no ; then
23793         BUILD_REWRITE=yes
23794         BUILD_RWM=$ol_enable_rwm
23795         if test "$ol_enable_rwm" = mod ; then
23796                 MFLAG=SLAPD_MOD_DYNAMIC
23797                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23798         else
23799                 MFLAG=SLAPD_MOD_STATIC
23800         fi
23801         cat >> confdefs.h <<EOF
23802 #define SLAPD_OVER_RWM $MFLAG
23803 EOF
23804
23805 fi
23806
23807 if test "$ol_enable_unique" != no ; then
23808         BUILD_UNIQUE=$ol_enable_unique
23809         if test "$ol_enable_unique" = mod ; then
23810                 MFLAG=SLAPD_MOD_DYNAMIC
23811                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
23812         else
23813                 MFLAG=SLAPD_MOD_STATIC
23814         fi
23815         cat >> confdefs.h <<EOF
23816 #define SLAPD_OVER_UNIQUE $MFLAG
23817 EOF
23818
23819 fi
23820
23821 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23822         $BUILD_SLAPD = yes ; then
23823         BUILD_SLURPD=yes
23824 fi
23825
23826 if test "$ol_enable_rewrite" != no ; then
23827         cat >> confdefs.h <<\EOF
23828 #define ENABLE_REWRITE 1
23829 EOF
23830
23831         BUILD_REWRITE=yes
23832 fi
23833
23834 if test "$ol_enable_slapi" != no ; then
23835         cat >> confdefs.h <<\EOF
23836 #define ENABLE_SLAPI 1
23837 EOF
23838
23839         BUILD_SLAPI=yes
23840         SLAPD_SLAPI_DEPEND=libslapi.a
23841 fi
23842
23843
23844
23845 if test "$ac_cv_mingw32" = yes ; then
23846         PLAT=NT
23847         SLAPD_MODULES_LDFLAGS=
23848 else
23849         PLAT=UNIX
23850 fi
23851
23852 if test -z "$SLAPD_STATIC_BACKENDS"; then
23853         SLAPD_NO_STATIC='#'
23854 else
23855         SLAPD_NO_STATIC=
23856 fi
23857
23858
23859
23860
23861
23862
23863
23864   
23865   
23866   
23867   
23868   
23869   
23870   
23871   
23872   
23873   
23874   
23875   
23876   
23877   
23878   
23879   
23880   
23881   
23882   
23883   
23884   
23885   
23886   
23887   
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926 # Check whether --with-xxinstall or --without-xxinstall was given.
23927 if test "${with_xxinstall+set}" = set; then
23928   withval="$with_xxinstall"
23929   :
23930 fi
23931
23932
23933
23934 trap '' 1 2 15
23935
23936 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23937
23938 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23939 # Let make expand exec_prefix.
23940 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23941
23942 # Any assignment to VPATH causes Sun make to only execute
23943 # the first set of double-colon rules, so remove it if not needed.
23944 # If there is a colon in the path, we need to keep it.
23945 if test "x$srcdir" = x.; then
23946   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23947 fi
23948
23949 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23950
23951 DEFS=-DHAVE_CONFIG_H
23952
23953 # Without the "./", some shells look in PATH for config.status.
23954 : ${CONFIG_STATUS=./config.status}
23955
23956 echo creating $CONFIG_STATUS
23957 rm -f $CONFIG_STATUS
23958 cat > $CONFIG_STATUS <<EOF
23959 #! /bin/sh
23960 # Generated automatically by configure.
23961 # Run this file to recreate the current configuration.
23962 # This directory was configured as follows,
23963 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23964 #
23965 # $0 $ac_configure_args
23966 #
23967 # Compiler output produced by configure, useful for debugging
23968 # configure, is in ./config.log if it exists.
23969
23970 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23971 for ac_option
23972 do
23973   case "\$ac_option" in
23974   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23975     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23976     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23977   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23978     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23979     exit 0 ;;
23980   -help | --help | --hel | --he | --h)
23981     echo "\$ac_cs_usage"; exit 0 ;;
23982   *) echo "\$ac_cs_usage"; exit 1 ;;
23983   esac
23984 done
23985
23986 ac_given_srcdir=$srcdir
23987 ac_given_INSTALL="$INSTALL"
23988
23989 trap 'rm -fr `echo "\
23990 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23991 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23992 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23993 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23994 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23995 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23996 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23997 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23998 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23999 include/Makefile:build/top.mk:include/Makefile.in \
24000 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24001 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24002 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24003 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24004 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24005 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24006 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24007 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24008 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24009 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24010 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24011 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24012 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24013 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24014 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24015 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24016 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24017 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24018 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24019 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24020 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24021 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24022 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24023 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24024 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24025 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24026 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24027 tests/run \
24028 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24029  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24030 EOF
24031 cat >> $CONFIG_STATUS <<EOF
24032
24033 # Protect against being on the right side of a sed subst in config.status.
24034 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24035  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24036 $ac_vpsub
24037 $extrasub
24038 s%@SHELL@%$SHELL%g
24039 s%@CFLAGS@%$CFLAGS%g
24040 s%@CPPFLAGS@%$CPPFLAGS%g
24041 s%@CXXFLAGS@%$CXXFLAGS%g
24042 s%@FFLAGS@%$FFLAGS%g
24043 s%@DEFS@%$DEFS%g
24044 s%@LDFLAGS@%$LDFLAGS%g
24045 s%@LIBS@%$LIBS%g
24046 s%@exec_prefix@%$exec_prefix%g
24047 s%@prefix@%$prefix%g
24048 s%@program_transform_name@%$program_transform_name%g
24049 s%@bindir@%$bindir%g
24050 s%@sbindir@%$sbindir%g
24051 s%@libexecdir@%$libexecdir%g
24052 s%@datadir@%$datadir%g
24053 s%@sysconfdir@%$sysconfdir%g
24054 s%@sharedstatedir@%$sharedstatedir%g
24055 s%@localstatedir@%$localstatedir%g
24056 s%@libdir@%$libdir%g
24057 s%@includedir@%$includedir%g
24058 s%@oldincludedir@%$oldincludedir%g
24059 s%@infodir@%$infodir%g
24060 s%@mandir@%$mandir%g
24061 s%@host@%$host%g
24062 s%@host_alias@%$host_alias%g
24063 s%@host_cpu@%$host_cpu%g
24064 s%@host_vendor@%$host_vendor%g
24065 s%@host_os@%$host_os%g
24066 s%@target@%$target%g
24067 s%@target_alias@%$target_alias%g
24068 s%@target_cpu@%$target_cpu%g
24069 s%@target_vendor@%$target_vendor%g
24070 s%@target_os@%$target_os%g
24071 s%@build@%$build%g
24072 s%@build_alias@%$build_alias%g
24073 s%@build_cpu@%$build_cpu%g
24074 s%@build_vendor@%$build_vendor%g
24075 s%@build_os@%$build_os%g
24076 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24077 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24078 s%@INSTALL_DATA@%$INSTALL_DATA%g
24079 s%@PACKAGE@%$PACKAGE%g
24080 s%@VERSION@%$VERSION%g
24081 s%@ACLOCAL@%$ACLOCAL%g
24082 s%@AUTOCONF@%$AUTOCONF%g
24083 s%@AUTOMAKE@%$AUTOMAKE%g
24084 s%@AUTOHEADER@%$AUTOHEADER%g
24085 s%@MAKEINFO@%$MAKEINFO%g
24086 s%@install_sh@%$install_sh%g
24087 s%@AMTAR@%$AMTAR%g
24088 s%@AWK@%$AWK%g
24089 s%@AMTARFLAGS@%$AMTARFLAGS%g
24090 s%@SET_MAKE@%$SET_MAKE%g
24091 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24092 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24093 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24094 s%@top_builddir@%$top_builddir%g
24095 s%@ldap_subdir@%$ldap_subdir%g
24096 s%@CC@%$CC%g
24097 s%@AR@%$AR%g
24098 s%@LN_S@%$LN_S%g
24099 s%@OBJEXT@%$OBJEXT%g
24100 s%@EXEEXT@%$EXEEXT%g
24101 s%@ECHO@%$ECHO%g
24102 s%@RANLIB@%$RANLIB%g
24103 s%@STRIP@%$STRIP%g
24104 s%@DLLTOOL@%$DLLTOOL%g
24105 s%@AS@%$AS%g
24106 s%@OBJDUMP@%$OBJDUMP%g
24107 s%@CPP@%$CPP%g
24108 s%@LIBTOOL@%$LIBTOOL%g
24109 s%@LN_H@%$LN_H%g
24110 s%@PERLBIN@%$PERLBIN%g
24111 s%@OL_MKDEP@%$OL_MKDEP%g
24112 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24113 s%@LTSTATIC@%$LTSTATIC%g
24114 s%@LIBOBJS@%$LIBOBJS%g
24115 s%@LIBSRCS@%$LIBSRCS%g
24116 s%@PLAT@%$PLAT%g
24117 s%@WITH_TLS@%$WITH_TLS%g
24118 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24119 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24120 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24121 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24122 s%@BUILD_BDB@%$BUILD_BDB%g
24123 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24124 s%@BUILD_HDB@%$BUILD_HDB%g
24125 s%@BUILD_LDAP@%$BUILD_LDAP%g
24126 s%@BUILD_LDBM@%$BUILD_LDBM%g
24127 s%@BUILD_META@%$BUILD_META%g
24128 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24129 s%@BUILD_NULL@%$BUILD_NULL%g
24130 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24131 s%@BUILD_RELAY@%$BUILD_RELAY%g
24132 s%@BUILD_PERL@%$BUILD_PERL%g
24133 s%@BUILD_SHELL@%$BUILD_SHELL%g
24134 s%@BUILD_SQL@%$BUILD_SQL%g
24135 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24136 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24137 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24138 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24139 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24140 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24141 s%@BUILD_REFINT@%$BUILD_REFINT%g
24142 s%@BUILD_RWM@%$BUILD_RWM%g
24143 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24144 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24145 s%@LDAP_LIBS@%$LDAP_LIBS%g
24146 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24147 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24148 s%@LDBM_LIBS@%$LDBM_LIBS%g
24149 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24150 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24151 s%@WRAP_LIBS@%$WRAP_LIBS%g
24152 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24153 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24154 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24155 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24156 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24157 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24158 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24159 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24160 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24161 s%@KRB4_LIBS@%$KRB4_LIBS%g
24162 s%@KRB5_LIBS@%$KRB5_LIBS%g
24163 s%@SASL_LIBS@%$SASL_LIBS%g
24164 s%@TLS_LIBS@%$TLS_LIBS%g
24165 s%@MODULES_LIBS@%$MODULES_LIBS%g
24166 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24167 s%@LIBSLAPI@%$LIBSLAPI%g
24168 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24169 s%@AUTH_LIBS@%$AUTH_LIBS%g
24170 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24171 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24172 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24173 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24174
24175 CEOF
24176 EOF
24177
24178 cat >> $CONFIG_STATUS <<\EOF
24179
24180 # Split the substitutions into bite-sized pieces for seds with
24181 # small command number limits, like on Digital OSF/1 and HP-UX.
24182 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24183 ac_file=1 # Number of current file.
24184 ac_beg=1 # First line for current file.
24185 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24186 ac_more_lines=:
24187 ac_sed_cmds=""
24188 while $ac_more_lines; do
24189   if test $ac_beg -gt 1; then
24190     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24191   else
24192     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24193   fi
24194   if test ! -s conftest.s$ac_file; then
24195     ac_more_lines=false
24196     rm -f conftest.s$ac_file
24197   else
24198     if test -z "$ac_sed_cmds"; then
24199       ac_sed_cmds="sed -f conftest.s$ac_file"
24200     else
24201       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24202     fi
24203     ac_file=`expr $ac_file + 1`
24204     ac_beg=$ac_end
24205     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24206   fi
24207 done
24208 if test -z "$ac_sed_cmds"; then
24209   ac_sed_cmds=cat
24210 fi
24211 EOF
24212
24213 cat >> $CONFIG_STATUS <<EOF
24214
24215 CONFIG_FILES=\${CONFIG_FILES-"\
24216 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24217 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24218 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24219 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24220 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24221 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24222 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24223 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24224 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24225 include/Makefile:build/top.mk:include/Makefile.in \
24226 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24227 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24228 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24229 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24230 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24231 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24232 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24233 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24234 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24235 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24236 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24237 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24238 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24239 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24240 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24241 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24242 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24243 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24244 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24245 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24246 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24247 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24248 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24249 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24250 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24251 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24252 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24253 tests/run \
24254 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24255 "}
24256 EOF
24257 cat >> $CONFIG_STATUS <<\EOF
24258 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24259   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24260   case "$ac_file" in
24261   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24262        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24263   *) ac_file_in="${ac_file}.in" ;;
24264   esac
24265
24266   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24267
24268   # Remove last slash and all that follows it.  Not all systems have dirname.
24269   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24270   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24271     # The file is in a subdirectory.
24272     test ! -d "$ac_dir" && mkdir "$ac_dir"
24273     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24274     # A "../" for each directory in $ac_dir_suffix.
24275     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24276   else
24277     ac_dir_suffix= ac_dots=
24278   fi
24279
24280   case "$ac_given_srcdir" in
24281   .)  srcdir=.
24282       if test -z "$ac_dots"; then top_srcdir=.
24283       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24284   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24285   *) # Relative path.
24286     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24287     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24288   esac
24289
24290   case "$ac_given_INSTALL" in
24291   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24292   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24293   esac
24294
24295   echo creating "$ac_file"
24296   rm -f "$ac_file"
24297   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24298   case "$ac_file" in
24299   *[Mm]akefile*) ac_comsub="1i\\
24300 # $configure_input" ;;
24301   *) ac_comsub= ;;
24302   esac
24303
24304   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24305   sed -e "$ac_comsub
24306 s%@configure_input@%$configure_input%g
24307 s%@srcdir@%$srcdir%g
24308 s%@top_srcdir@%$top_srcdir%g
24309 s%@INSTALL@%$INSTALL%g
24310 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24311 fi; done
24312 rm -f conftest.s*
24313
24314 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24315 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24316 #
24317 # ac_d sets the value in "#define NAME VALUE" lines.
24318 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24319 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24320 ac_dC='\3'
24321 ac_dD='%g'
24322 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24323 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24324 ac_uB='\([      ]\)%\1#\2define\3'
24325 ac_uC=' '
24326 ac_uD='\4%g'
24327 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24328 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24329 ac_eB='$%\1#\2define\3'
24330 ac_eC=' '
24331 ac_eD='%g'
24332
24333 if test "${CONFIG_HEADERS+set}" != set; then
24334 EOF
24335 cat >> $CONFIG_STATUS <<EOF
24336   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24337 EOF
24338 cat >> $CONFIG_STATUS <<\EOF
24339 fi
24340 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24341   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24342   case "$ac_file" in
24343   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24344        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24345   *) ac_file_in="${ac_file}.in" ;;
24346   esac
24347
24348   echo creating $ac_file
24349
24350   rm -f conftest.frag conftest.in conftest.out
24351   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24352   cat $ac_file_inputs > conftest.in
24353
24354 EOF
24355
24356 # Transform confdefs.h into a sed script conftest.vals that substitutes
24357 # the proper values into config.h.in to produce config.h.  And first:
24358 # Protect against being on the right side of a sed subst in config.status.
24359 # Protect against being in an unquoted here document in config.status.
24360 rm -f conftest.vals
24361 cat > conftest.hdr <<\EOF
24362 s/[\\&%]/\\&/g
24363 s%[\\$`]%\\&%g
24364 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24365 s%ac_d%ac_u%gp
24366 s%ac_u%ac_e%gp
24367 EOF
24368 sed -n -f conftest.hdr confdefs.h > conftest.vals
24369 rm -f conftest.hdr
24370
24371 # This sed command replaces #undef with comments.  This is necessary, for
24372 # example, in the case of _POSIX_SOURCE, which is predefined and required
24373 # on some systems where configure will not decide to define it.
24374 cat >> conftest.vals <<\EOF
24375 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24376 EOF
24377
24378 # Break up conftest.vals because some shells have a limit on
24379 # the size of here documents, and old seds have small limits too.
24380
24381 rm -f conftest.tail
24382 while :
24383 do
24384   ac_lines=`grep -c . conftest.vals`
24385   # grep -c gives empty output for an empty file on some AIX systems.
24386   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24387   # Write a limited-size here document to conftest.frag.
24388   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24389   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24390   echo 'CEOF
24391   sed -f conftest.frag conftest.in > conftest.out
24392   rm -f conftest.in
24393   mv conftest.out conftest.in
24394 ' >> $CONFIG_STATUS
24395   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24396   rm -f conftest.vals
24397   mv conftest.tail conftest.vals
24398 done
24399 rm -f conftest.vals
24400
24401 cat >> $CONFIG_STATUS <<\EOF
24402   rm -f conftest.frag conftest.h
24403   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24404   cat conftest.in >> conftest.h
24405   rm -f conftest.in
24406   if cmp -s $ac_file conftest.h 2>/dev/null; then
24407     echo "$ac_file is unchanged"
24408     rm -f conftest.h
24409   else
24410     # Remove last slash and all that follows it.  Not all systems have dirname.
24411       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24412       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24413       # The file is in a subdirectory.
24414       test ! -d "$ac_dir" && mkdir "$ac_dir"
24415     fi
24416     rm -f $ac_file
24417     mv conftest.h $ac_file
24418   fi
24419 fi; done
24420
24421 EOF
24422 cat >> $CONFIG_STATUS <<EOF
24423
24424 EOF
24425 cat >> $CONFIG_STATUS <<\EOF
24426
24427 chmod +x tests/run
24428 date > stamp-h
24429 echo Please run \"make depend\" to build dependencies
24430
24431 exit 0
24432 EOF
24433 chmod +x $CONFIG_STATUS
24434 rm -fr confdefs* $ac_clean_files
24435 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24436