]> git.sur5r.net Git - openldap/blob - configure
support for syncrepl attr list in file (both attrs and exattrs)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.545 2004/09/11 14:15:53 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-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 SLAPD_GMP_LIBS=
2781
2782
2783 cat >> confdefs.h <<\EOF
2784 #define HAVE_MKVERSION 1
2785 EOF
2786
2787
2788
2789
2790 ol_aix_threads=no
2791 case "$target" in
2792 *-*-aix*)       if test -z "$CC" ; then
2793                 case "$ol_with_threads" in
2794                 auto | yes |  posix) ol_aix_threads=yes ;;
2795                 esac
2796         fi
2797 ;;
2798 esac
2799
2800 if test $ol_aix_threads = yes ; then
2801         if test -z "${CC}" ; then
2802                 for ac_prog in cc_r xlc_r cc
2803 do
2804 # Extract the first word of "$ac_prog", so it can be a program name with args.
2805 set dummy $ac_prog; ac_word=$2
2806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2807 echo "configure:2808: checking for $ac_word" >&5
2808 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2809   echo $ac_n "(cached) $ac_c" 1>&6
2810 else
2811   if test -n "$CC"; then
2812   ac_cv_prog_CC="$CC" # Let the user override the test.
2813 else
2814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2815   ac_dummy="$PATH"
2816   for ac_dir in $ac_dummy; do
2817     test -z "$ac_dir" && ac_dir=.
2818     if test -f $ac_dir/$ac_word; then
2819       ac_cv_prog_CC="$ac_prog"
2820       break
2821     fi
2822   done
2823   IFS="$ac_save_ifs"
2824 fi
2825 fi
2826 CC="$ac_cv_prog_CC"
2827 if test -n "$CC"; then
2828   echo "$ac_t""$CC" 1>&6
2829 else
2830   echo "$ac_t""no" 1>&6
2831 fi
2832
2833 test -n "$CC" && break
2834 done
2835
2836
2837                 if test "$CC" = cc ; then
2838                                                 if test $ol_with_threads != auto ; then
2839                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2840                         else
2841                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2842                         fi
2843                         ol_with_threads=no
2844                 fi
2845         fi
2846
2847         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2848                 ol_with_threads=posix
2849                 ol_cv_pthread_create=yes
2850         fi
2851 fi
2852
2853 if test -z "${CC}"; then
2854         for ac_prog in cc gcc
2855 do
2856 # Extract the first word of "$ac_prog", so it can be a program name with args.
2857 set dummy $ac_prog; ac_word=$2
2858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2859 echo "configure:2860: checking for $ac_word" >&5
2860 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   if test -n "$CC"; then
2864   ac_cv_prog_CC="$CC" # Let the user override the test.
2865 else
2866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2867   ac_dummy="$PATH"
2868   for ac_dir in $ac_dummy; do
2869     test -z "$ac_dir" && ac_dir=.
2870     if test -f $ac_dir/$ac_word; then
2871       ac_cv_prog_CC="$ac_prog"
2872       break
2873     fi
2874   done
2875   IFS="$ac_save_ifs"
2876 fi
2877 fi
2878 CC="$ac_cv_prog_CC"
2879 if test -n "$CC"; then
2880   echo "$ac_t""$CC" 1>&6
2881 else
2882   echo "$ac_t""no" 1>&6
2883 fi
2884
2885 test -n "$CC" && break
2886 done
2887 test -n "$CC" || CC="missing"
2888
2889
2890         if test "${CC}" = "missing" ; then
2891                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2892         fi
2893 fi
2894
2895 if test -z "${AR}"; then
2896         for ac_prog in ar gar
2897 do
2898 # Extract the first word of "$ac_prog", so it can be a program name with args.
2899 set dummy $ac_prog; ac_word=$2
2900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2901 echo "configure:2902: checking for $ac_word" >&5
2902 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2903   echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905   if test -n "$AR"; then
2906   ac_cv_prog_AR="$AR" # Let the user override the test.
2907 else
2908   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2909   ac_dummy="$PATH"
2910   for ac_dir in $ac_dummy; do
2911     test -z "$ac_dir" && ac_dir=.
2912     if test -f $ac_dir/$ac_word; then
2913       ac_cv_prog_AR="$ac_prog"
2914       break
2915     fi
2916   done
2917   IFS="$ac_save_ifs"
2918 fi
2919 fi
2920 AR="$ac_cv_prog_AR"
2921 if test -n "$AR"; then
2922   echo "$ac_t""$AR" 1>&6
2923 else
2924   echo "$ac_t""no" 1>&6
2925 fi
2926
2927 test -n "$AR" && break
2928 done
2929 test -n "$AR" || AR="missing"
2930
2931
2932         if test "${AR}" = "missing" ; then
2933                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2934         fi
2935 fi
2936
2937
2938
2939 # Find the correct PATH separator.  Usually this is `:', but
2940 # DJGPP uses `;' like DOS.
2941 if test "X${PATH_SEPARATOR+set}" != Xset; then
2942   UNAME=${UNAME-`uname 2>/dev/null`}
2943   case X$UNAME in
2944     *-DOS) lt_cv_sys_path_separator=';' ;;
2945     *)     lt_cv_sys_path_separator=':' ;;
2946   esac
2947   PATH_SEPARATOR=$lt_cv_sys_path_separator
2948 fi
2949
2950 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2951 echo "configure:2952: checking for Cygwin environment" >&5
2952 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958
2959 int main() {
2960
2961 #ifndef __CYGWIN__
2962 #define __CYGWIN__ __CYGWIN32__
2963 #endif
2964 return __CYGWIN__;
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2968   rm -rf conftest*
2969   ac_cv_cygwin=yes
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973   rm -rf conftest*
2974   ac_cv_cygwin=no
2975 fi
2976 rm -f conftest*
2977 fi
2978
2979 echo "$ac_t""$ac_cv_cygwin" 1>&6
2980 CYGWIN=
2981 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2982 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2983 echo "configure:2984: checking for mingw32 environment" >&5
2984 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990
2991 int main() {
2992 return __MINGW32__;
2993 ; return 0; }
2994 EOF
2995 if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2996   rm -rf conftest*
2997   ac_cv_mingw32=yes
2998 else
2999   echo "configure: failed program was:" >&5
3000   cat conftest.$ac_ext >&5
3001   rm -rf conftest*
3002   ac_cv_mingw32=no
3003 fi
3004 rm -f conftest*
3005 fi
3006
3007 echo "$ac_t""$ac_cv_mingw32" 1>&6
3008 MINGW32=
3009 test "$ac_cv_mingw32" = yes && MINGW32=yes
3010 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3011 echo "configure:3012: checking for EMX OS/2 environment" >&5
3012 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018
3019 int main() {
3020 return __EMX__;
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3024   rm -rf conftest*
3025   ac_cv_emxos2=yes
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   ac_cv_emxos2=no
3031 fi
3032 rm -f conftest*
3033 fi
3034
3035 echo "$ac_t""$ac_cv_emxos2" 1>&6
3036 EMXOS2=
3037 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3038 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3039 echo "configure:3040: checking how to run the C preprocessor" >&5
3040 # On Suns, sometimes $CPP names a directory.
3041 if test -n "$CPP" && test -d "$CPP"; then
3042   CPP=
3043 fi
3044 if test -z "$CPP"; then
3045 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3046   echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048     # This must be in double quotes, not single quotes, because CPP may get
3049   # substituted into the Makefile and "${CC-cc}" will confuse make.
3050   CPP="${CC-cc} -E"
3051   # On the NeXT, cc -E runs the code through the compiler's parser,
3052   # not just through cpp.
3053   cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <assert.h>
3057 Syntax Error
3058 EOF
3059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3060 { (eval echo configure:3061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3062 if test -z "$ac_err"; then
3063   :
3064 else
3065   echo "$ac_err" >&5
3066   echo "configure: failed program was:" >&5
3067   cat conftest.$ac_ext >&5
3068   rm -rf conftest*
3069   CPP="${CC-cc} -E -traditional-cpp"
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 #include <assert.h>
3074 Syntax Error
3075 EOF
3076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3077 { (eval echo configure:3078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3079 if test -z "$ac_err"; then
3080   :
3081 else
3082   echo "$ac_err" >&5
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   CPP="${CC-cc} -nologo -E"
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 #include <assert.h>
3091 Syntax Error
3092 EOF
3093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3094 { (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3096 if test -z "$ac_err"; then
3097   :
3098 else
3099   echo "$ac_err" >&5
3100   echo "configure: failed program was:" >&5
3101   cat conftest.$ac_ext >&5
3102   rm -rf conftest*
3103   CPP=/lib/cpp
3104 fi
3105 rm -f conftest*
3106 fi
3107 rm -f conftest*
3108 fi
3109 rm -f conftest*
3110   ac_cv_prog_CPP="$CPP"
3111 fi
3112   CPP="$ac_cv_prog_CPP"
3113 else
3114   ac_cv_prog_CPP="$CPP"
3115 fi
3116 echo "$ac_t""$CPP" 1>&6
3117
3118 # Check whether --enable-fast-install or --disable-fast-install was given.
3119 if test "${enable_fast_install+set}" = set; then
3120   enableval="$enable_fast_install"
3121   p=${PACKAGE-default}
3122 case $enableval in
3123 yes) enable_fast_install=yes ;;
3124 no) enable_fast_install=no ;;
3125 *)
3126   enable_fast_install=no
3127   # Look at the argument we got.  We use all the common list separators.
3128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3129   for pkg in $enableval; do
3130     if test "X$pkg" = "X$p"; then
3131       enable_fast_install=yes
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135   ;;
3136 esac
3137 else
3138   enable_fast_install=yes
3139 fi
3140
3141 # Extract the first word of "gcc", so it can be a program name with args.
3142 set dummy gcc; ac_word=$2
3143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_word" >&5
3145 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   if test -n "$CC"; then
3149   ac_cv_prog_CC="$CC" # Let the user override the test.
3150 else
3151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3152   ac_dummy="$PATH"
3153   for ac_dir in $ac_dummy; do
3154     test -z "$ac_dir" && ac_dir=.
3155     if test -f $ac_dir/$ac_word; then
3156       ac_cv_prog_CC="gcc"
3157       break
3158     fi
3159   done
3160   IFS="$ac_save_ifs"
3161 fi
3162 fi
3163 CC="$ac_cv_prog_CC"
3164 if test -n "$CC"; then
3165   echo "$ac_t""$CC" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169
3170 if test -z "$CC"; then
3171   # Extract the first word of "cc", so it can be a program name with args.
3172 set dummy cc; ac_word=$2
3173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3174 echo "configure:3175: checking for $ac_word" >&5
3175 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   if test -n "$CC"; then
3179   ac_cv_prog_CC="$CC" # Let the user override the test.
3180 else
3181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3182   ac_prog_rejected=no
3183   ac_dummy="$PATH"
3184   for ac_dir in $ac_dummy; do
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f $ac_dir/$ac_word; then
3187       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3188         ac_prog_rejected=yes
3189         continue
3190       fi
3191       ac_cv_prog_CC="cc"
3192       break
3193     fi
3194   done
3195   IFS="$ac_save_ifs"
3196 if test $ac_prog_rejected = yes; then
3197   # We found a bogon in the path, so make sure we never use it.
3198   set dummy $ac_cv_prog_CC
3199   shift
3200   if test $# -gt 0; then
3201     # We chose a different compiler from the bogus one.
3202     # However, it has the same basename, so the bogon will be chosen
3203     # first if we set CC to just the basename; use the full file name.
3204     shift
3205     set dummy "$ac_dir/$ac_word" "$@"
3206     shift
3207     ac_cv_prog_CC="$@"
3208   fi
3209 fi
3210 fi
3211 fi
3212 CC="$ac_cv_prog_CC"
3213 if test -n "$CC"; then
3214   echo "$ac_t""$CC" 1>&6
3215 else
3216   echo "$ac_t""no" 1>&6
3217 fi
3218
3219   if test -z "$CC"; then
3220     case "`uname -s`" in
3221     *win32* | *WIN32* | *CYGWIN*)
3222       # Extract the first word of "cl", so it can be a program name with args.
3223 set dummy cl; ac_word=$2
3224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_word" >&5
3226 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   if test -n "$CC"; then
3230   ac_cv_prog_CC="$CC" # Let the user override the test.
3231 else
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3233   ac_dummy="$PATH"
3234   for ac_dir in $ac_dummy; do
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       ac_cv_prog_CC="cl"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242 fi
3243 fi
3244 CC="$ac_cv_prog_CC"
3245 if test -n "$CC"; then
3246   echo "$ac_t""$CC" 1>&6
3247 else
3248   echo "$ac_t""no" 1>&6
3249 fi
3250  ;;
3251     esac
3252   fi
3253   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3254 fi
3255
3256 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3257 echo "configure:3258: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3258
3259 ac_ext=c
3260 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3261 ac_cpp='$CPP $CPPFLAGS'
3262 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3263 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3264 cross_compiling=$ac_cv_prog_cc_cross
3265
3266 cat > conftest.$ac_ext << EOF
3267
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270
3271 main(){return(0);}
3272 EOF
3273 if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3274   ac_cv_prog_cc_works=yes
3275   # If we can't run a trivial program, we are probably using a cross compiler.
3276   if (./conftest; exit) 2>/dev/null; then
3277     ac_cv_prog_cc_cross=no
3278   else
3279     ac_cv_prog_cc_cross=yes
3280   fi
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   ac_cv_prog_cc_works=no
3285 fi
3286 rm -fr conftest*
3287 ac_ext=c
3288 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3289 ac_cpp='$CPP $CPPFLAGS'
3290 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3291 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3292 cross_compiling=$ac_cv_prog_cc_cross
3293
3294 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3295 if test $ac_cv_prog_cc_works = no; then
3296   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3297 fi
3298 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3299 echo "configure:3300: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3300 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3301 cross_compiling=$ac_cv_prog_cc_cross
3302
3303 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3304 echo "configure:3305: checking whether we are using GNU C" >&5
3305 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3306   echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308   cat > conftest.c <<EOF
3309 #ifdef __GNUC__
3310   yes;
3311 #endif
3312 EOF
3313 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3314   ac_cv_prog_gcc=yes
3315 else
3316   ac_cv_prog_gcc=no
3317 fi
3318 fi
3319
3320 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3321
3322 if test $ac_cv_prog_gcc = yes; then
3323   GCC=yes
3324 else
3325   GCC=
3326 fi
3327
3328 ac_test_CFLAGS="${CFLAGS+set}"
3329 ac_save_CFLAGS="$CFLAGS"
3330 CFLAGS=
3331 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3332 echo "configure:3333: checking whether ${CC-cc} accepts -g" >&5
3333 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3334   echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336   echo 'void f(){}' > conftest.c
3337 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3338   ac_cv_prog_cc_g=yes
3339 else
3340   ac_cv_prog_cc_g=no
3341 fi
3342 rm -f conftest*
3343
3344 fi
3345
3346 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3347 if test "$ac_test_CFLAGS" = set; then
3348   CFLAGS="$ac_save_CFLAGS"
3349 elif test $ac_cv_prog_cc_g = yes; then
3350   if test "$GCC" = yes; then
3351     CFLAGS="-g -O2"
3352   else
3353     CFLAGS="-g"
3354   fi
3355 else
3356   if test "$GCC" = yes; then
3357     CFLAGS="-O2"
3358   else
3359     CFLAGS=
3360   fi
3361 fi
3362
3363 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3364 if test "${with_gnu_ld+set}" = set; then
3365   withval="$with_gnu_ld"
3366   test "$withval" = no || with_gnu_ld=yes
3367 else
3368   with_gnu_ld=no
3369 fi
3370
3371 ac_prog=ld
3372 if test "$GCC" = yes; then
3373   # Check if gcc -print-prog-name=ld gives a path.
3374   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3375 echo "configure:3376: checking for ld used by GCC" >&5
3376   case $host in
3377   *-*-mingw*)
3378     # gcc leaves a trailing carriage return which upsets mingw
3379     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3380   *)
3381     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3382   esac
3383   case $ac_prog in
3384     # Accept absolute paths.
3385     [\\/]* | [A-Za-z]:[\\/]*)
3386       re_direlt='/[^/][^/]*/\.\./'
3387       # Canonicalize the path of ld
3388       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3389       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3390         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3391       done
3392       test -z "$LD" && LD="$ac_prog"
3393       ;;
3394   "")
3395     # If it fails, then pretend we aren't using GCC.
3396     ac_prog=ld
3397     ;;
3398   *)
3399     # If it is relative, then search for the first ld in PATH.
3400     with_gnu_ld=unknown
3401     ;;
3402   esac
3403 elif test "$with_gnu_ld" = yes; then
3404   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3405 echo "configure:3406: checking for GNU ld" >&5
3406 else
3407   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3408 echo "configure:3409: checking for non-GNU ld" >&5
3409 fi
3410 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   if test -z "$LD"; then
3414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3415   for ac_dir in $PATH; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3418       lt_cv_path_LD="$ac_dir/$ac_prog"
3419       # Check to see if the program is GNU ld.  I'd rather use --version,
3420       # but apparently some GNU ld's only accept -v.
3421       # Break only if it was the GNU/non-GNU ld that we prefer.
3422       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3423         test "$with_gnu_ld" != no && break
3424       else
3425         test "$with_gnu_ld" != yes && break
3426       fi
3427     fi
3428   done
3429   IFS="$ac_save_ifs"
3430 else
3431   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3432 fi
3433 fi
3434
3435 LD="$lt_cv_path_LD"
3436 if test -n "$LD"; then
3437   echo "$ac_t""$LD" 1>&6
3438 else
3439   echo "$ac_t""no" 1>&6
3440 fi
3441 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3442 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3443 echo "configure:3444: checking if the linker ($LD) is GNU ld" >&5
3444 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3448 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3449   lt_cv_prog_gnu_ld=yes
3450 else
3451   lt_cv_prog_gnu_ld=no
3452 fi
3453 fi
3454
3455 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3456 with_gnu_ld=$lt_cv_prog_gnu_ld
3457
3458
3459 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $LD option to reload object files" >&5
3461 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   lt_cv_ld_reload_flag='-r'
3465 fi
3466
3467 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3468 reload_flag=$lt_cv_ld_reload_flag
3469 test -n "$reload_flag" && reload_flag=" $reload_flag"
3470
3471 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3472 echo "configure:3473: checking for BSD-compatible nm" >&5
3473 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   if test -n "$NM"; then
3477   # Let the user override the test.
3478   lt_cv_path_NM="$NM"
3479 else
3480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3481   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3482     test -z "$ac_dir" && ac_dir=.
3483     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3484     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3485       # Check to see if the nm accepts a BSD-compat flag.
3486       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3487       #   nm: unknown option "B" ignored
3488       # Tru64's nm complains that /dev/null is an invalid object file
3489       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3490         lt_cv_path_NM="$tmp_nm -B"
3491         break
3492       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3493         lt_cv_path_NM="$tmp_nm -p"
3494         break
3495       else
3496         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3497         continue # so that we can try to find one that supports BSD flags
3498       fi
3499     fi
3500   done
3501   IFS="$ac_save_ifs"
3502   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3503 fi
3504 fi
3505
3506 NM="$lt_cv_path_NM"
3507 echo "$ac_t""$NM" 1>&6
3508
3509 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3510 echo "configure:3511: checking for a sed that does not truncate output" >&5
3511 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   # Loop through the user's path and test for sed and gsed.
3515 # Then use that list of sed's as ones to test for truncation.
3516 as_executable_p="test -f"
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3519 do
3520   IFS=$as_save_IFS
3521   test -z "$as_dir" && as_dir=.
3522   for ac_prog in sed gsed; do
3523     for ac_exec_ext in '' $ac_executable_extensions; do
3524       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3525         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3526       fi
3527     done
3528   done
3529 done
3530
3531   # Create a temporary directory, and hook for its removal unless debugging.
3532 $debug ||
3533 {
3534   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3535   trap '{ (exit 1); exit 1; }' 1 2 13 15
3536 }
3537
3538 # Create a (secure) tmp directory for tmp files.
3539 : ${TMPDIR=/tmp}
3540 {
3541   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3542   test -n "$tmp" && test -d "$tmp"
3543 }  ||
3544 {
3545   tmp=$TMPDIR/sed$$-$RANDOM
3546   (umask 077 && mkdir $tmp)
3547 } ||
3548 {
3549    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3550    { (exit 1); exit 1; }
3551 }
3552   _max=0
3553   _count=0
3554   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3555   # along with /bin/sed that truncates output.
3556   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3557     test ! -f ${_sed} && break
3558     cat /dev/null > "$tmp/sed.in"
3559     _count=0
3560     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3561     # Check for GNU sed and select it if it is found.
3562     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3563       lt_cv_path_SED=${_sed}
3564       break
3565     fi
3566     while true; do
3567       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3568       mv "$tmp/sed.tmp" "$tmp/sed.in"
3569       cp "$tmp/sed.in" "$tmp/sed.nl"
3570       echo >>"$tmp/sed.nl"
3571       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3572       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3573       # 40000 chars as input seems more than enough
3574       test $_count -gt 10 && break
3575       _count=`expr $_count + 1`
3576       if test $_count -gt $_max; then
3577         _max=$_count
3578         lt_cv_path_SED=$_sed
3579       fi
3580     done
3581   done
3582   rm -rf "$tmp"
3583
3584 fi
3585
3586 if test "X$SED" != "X"; then
3587   lt_cv_path_SED=$SED
3588 else
3589   SED=$lt_cv_path_SED
3590 fi
3591 echo "$ac_t""$SED" 1>&6
3592
3593 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3594 echo "configure:3595: checking whether ln -s works" >&5
3595 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   rm -f conftestdata
3599 if ln -s X conftestdata 2>/dev/null
3600 then
3601   rm -f conftestdata
3602   ac_cv_prog_LN_S="ln -s"
3603 else
3604   ac_cv_prog_LN_S=ln
3605 fi
3606 fi
3607 LN_S="$ac_cv_prog_LN_S"
3608 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3609   echo "$ac_t""yes" 1>&6
3610 else
3611   echo "$ac_t""no" 1>&6
3612 fi
3613
3614 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3615 echo "configure:3616: checking how to recognise dependent libraries" >&5
3616 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   lt_cv_file_magic_cmd='$MAGIC_CMD'
3620 lt_cv_file_magic_test_file=
3621 lt_cv_deplibs_check_method='unknown'
3622 # Need to set the preceding variable on all platforms that support
3623 # interlibrary dependencies.
3624 # 'none' -- dependencies not supported.
3625 # `unknown' -- same as none, but documents that we really don't know.
3626 # 'pass_all' -- all dependencies passed with no checks.
3627 # 'test_compile' -- check by making test program.
3628 # 'file_magic [[regex]]' -- check by looking for files in library path
3629 # which responds to the $file_magic_cmd with a given egrep regex.
3630 # If you have `file' or equivalent on your system and you're not sure
3631 # whether `pass_all' will *always* work, you probably want this one.
3632
3633 case $host_os in
3634 aix4* | aix5*)
3635   lt_cv_deplibs_check_method=pass_all
3636   ;;
3637
3638 beos*)
3639   lt_cv_deplibs_check_method=pass_all
3640   ;;
3641
3642 bsdi4*)
3643   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3644   lt_cv_file_magic_cmd='/usr/bin/file -L'
3645   lt_cv_file_magic_test_file=/shlib/libc.so
3646   ;;
3647
3648 cygwin* | mingw* | pw32*)
3649   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3650   lt_cv_file_magic_cmd='$OBJDUMP -f'
3651   ;;
3652
3653 darwin* | rhapsody*)
3654   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3655   lt_cv_file_magic_cmd='/usr/bin/file -L'
3656   case "$host_os" in
3657   rhapsody* | darwin1.[012])
3658     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3659     ;;
3660   *) # Darwin 1.3 on
3661     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3662     ;;
3663   esac
3664   ;;
3665
3666 freebsd*)
3667   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3668     case $host_cpu in
3669     i*86 )
3670       # Not sure whether the presence of OpenBSD here was a mistake.
3671       # Let's accept both of them until this is cleared up.
3672       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3673       lt_cv_file_magic_cmd=/usr/bin/file
3674       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3675       ;;
3676     esac
3677   else
3678     lt_cv_deplibs_check_method=pass_all
3679   fi
3680   ;;
3681
3682 gnu*)
3683   lt_cv_deplibs_check_method=pass_all
3684   ;;
3685
3686 hpux10.20*|hpux11*)
3687   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3688   lt_cv_file_magic_cmd=/usr/bin/file
3689   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3690   ;;
3691
3692 irix5* | irix6* | nonstopux*)
3693   case $host_os in
3694   irix5* | nonstopux*)
3695     # this will be overridden with pass_all, but let us keep it just in case
3696     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3697     ;;
3698   *)
3699     case $LD in
3700     *-32|*"-32 ") libmagic=32-bit;;
3701     *-n32|*"-n32 ") libmagic=N32;;
3702     *-64|*"-64 ") libmagic=64-bit;;
3703     *) libmagic=never-match;;
3704     esac
3705     # this will be overridden with pass_all, but let us keep it just in case
3706     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3707     ;;
3708   esac
3709   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3710   lt_cv_deplibs_check_method=pass_all
3711   ;;
3712
3713 # This must be Linux ELF.
3714 linux-gnu*)
3715   case $host_cpu in
3716   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3717     lt_cv_deplibs_check_method=pass_all ;;
3718   *)
3719     # glibc up to 2.1.1 does not perform some relocations on ARM
3720     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3721   esac
3722   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3723   ;;
3724
3725 netbsd*)
3726   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3727     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3728   else
3729     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3730   fi
3731   ;;
3732
3733 newos6*)
3734   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3735   lt_cv_file_magic_cmd=/usr/bin/file
3736   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3737   ;;
3738
3739 openbsd*)
3740   lt_cv_file_magic_cmd=/usr/bin/file
3741   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3742   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3743     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3744   else
3745     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3746   fi
3747   ;;
3748
3749 openedition*)
3750   lt_cv_deplibs_check_method=pass_all
3751   ;;
3752
3753 osf3* | osf4* | osf5*)
3754   # this will be overridden with pass_all, but let us keep it just in case
3755   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3756   lt_cv_file_magic_test_file=/shlib/libc.so
3757   lt_cv_deplibs_check_method=pass_all
3758   ;;
3759
3760 sco3.2v5*)
3761   lt_cv_deplibs_check_method=pass_all
3762   ;;
3763
3764 solaris*)
3765   lt_cv_deplibs_check_method=pass_all
3766   lt_cv_file_magic_test_file=/lib/libc.so
3767   ;;
3768
3769 sysv5uw[78]* | sysv4*uw2*)
3770   lt_cv_deplibs_check_method=pass_all
3771   ;;
3772
3773 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3774   case $host_vendor in
3775   motorola)
3776     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]'
3777     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3778     ;;
3779   ncr)
3780     lt_cv_deplibs_check_method=pass_all
3781     ;;
3782   sequent)
3783     lt_cv_file_magic_cmd='/bin/file'
3784     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3785     ;;
3786   sni)
3787     lt_cv_file_magic_cmd='/bin/file'
3788     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3789     lt_cv_file_magic_test_file=/lib/libc.so
3790     ;;
3791   siemens)
3792     lt_cv_deplibs_check_method=pass_all
3793     ;;
3794   esac
3795   ;;
3796 esac
3797
3798 fi
3799
3800 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3801 file_magic_cmd=$lt_cv_file_magic_cmd
3802 deplibs_check_method=$lt_cv_deplibs_check_method
3803
3804 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3805 echo "configure:3806: checking for object suffix" >&5
3806 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   rm -f conftest*
3810 echo 'int i = 1;' > conftest.$ac_ext
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   for ac_file in conftest.*; do
3813     case $ac_file in
3814     *.c) ;;
3815     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3816     esac
3817   done
3818 else
3819   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3820 fi
3821 rm -f conftest*
3822 fi
3823
3824 echo "$ac_t""$ac_cv_objext" 1>&6
3825 OBJEXT=$ac_cv_objext
3826 ac_objext=$ac_cv_objext
3827
3828
3829
3830
3831 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3832 echo "configure:3833: checking for executable suffix" >&5
3833 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3837   ac_cv_exeext=.exe
3838 else
3839   rm -f conftest*
3840   echo 'int main () { return 0; }' > conftest.$ac_ext
3841   ac_cv_exeext=
3842   if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3843     for file in conftest.*; do
3844       case $file in
3845       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3846       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3847       esac
3848     done
3849   else
3850     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3851   fi
3852   rm -f conftest*
3853   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3854 fi
3855 fi
3856
3857 EXEEXT=""
3858 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3859 echo "$ac_t""${ac_cv_exeext}" 1>&6
3860 ac_exeext=$EXEEXT
3861
3862 if test $host != $build; then
3863   ac_tool_prefix=${host_alias}-
3864 else
3865   ac_tool_prefix=
3866 fi
3867
3868
3869
3870
3871 # Check for command to grab the raw symbol name followed by C symbol from nm.
3872 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3873 echo "configure:3874: checking command to parse $NM output" >&5
3874 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878 # These are sane defaults that work on at least a few old systems.
3879 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3880
3881 # Character class describing NM global symbol codes.
3882 symcode='[BCDEGRST]'
3883
3884 # Regexp to match symbols that can be accessed directly from C.
3885 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3886
3887 # Transform the above into a raw symbol and a C symbol.
3888 symxfrm='\1 \2\3 \3'
3889
3890 # Transform an extracted symbol line into a proper C declaration
3891 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3892
3893 # Transform an extracted symbol line into symbol name and symbol address
3894 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'"
3895
3896 # Define system-specific variables.
3897 case $host_os in
3898 aix*)
3899   symcode='[BCDT]'
3900   ;;
3901 cygwin* | mingw* | pw32*)
3902   symcode='[ABCDGISTW]'
3903   ;;
3904 hpux*) # Its linker distinguishes data from code symbols
3905   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3906   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'"
3907   ;;
3908 irix* | nonstopux*)
3909   symcode='[BCDEGRST]'
3910   ;;
3911 osf*)
3912   symcode='[BCDEGQRST]'
3913   ;;
3914 solaris* | sysv5*)
3915   symcode='[BDT]'
3916   ;;
3917 sysv4)
3918   symcode='[DFNSTU]'
3919   ;;
3920 esac
3921
3922 # Handle CRLF in mingw tool chain
3923 opt_cr=
3924 case $host_os in
3925 mingw*)
3926   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3927   ;;
3928 esac
3929
3930 # If we're using GNU nm, then use its standard symbol codes.
3931 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3932   symcode='[ABCDGISTW]'
3933 fi
3934
3935 # Try without a prefix undercore, then with it.
3936 for ac_symprfx in "" "_"; do
3937
3938   # Write the raw and C identifiers.
3939 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3940
3941   # Check to see that the pipe works correctly.
3942   pipe_works=no
3943   rm -f conftest*
3944   cat > conftest.$ac_ext <<EOF
3945 #ifdef __cplusplus
3946 extern "C" {
3947 #endif
3948 char nm_test_var;
3949 void nm_test_func(){}
3950 #ifdef __cplusplus
3951 }
3952 #endif
3953 int main(){nm_test_var='a';nm_test_func();return(0);}
3954 EOF
3955
3956   if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3957     # Now try to grab the symbols.
3958     nlist=conftest.nm
3959     if { (eval echo configure:3960: \"$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
3960       # Try sorting and uniquifying the output.
3961       if sort "$nlist" | uniq > "$nlist"T; then
3962         mv -f "$nlist"T "$nlist"
3963       else
3964         rm -f "$nlist"T
3965       fi
3966
3967       # Make sure that we snagged all the symbols we need.
3968       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3969         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3970           cat <<EOF > conftest.$ac_ext
3971 #ifdef __cplusplus
3972 extern "C" {
3973 #endif
3974
3975 EOF
3976           # Now generate the symbol file.
3977           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3978
3979           cat <<EOF >> conftest.$ac_ext
3980 #if defined (__STDC__) && __STDC__
3981 # define lt_ptr void *
3982 #else
3983 # define lt_ptr char *
3984 # define const
3985 #endif
3986
3987 /* The mapping between symbol names and symbols. */
3988 const struct {
3989   const char *name;
3990   lt_ptr address;
3991 }
3992 lt_preloaded_symbols[] =
3993 {
3994 EOF
3995           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3996           cat <<\EOF >> conftest.$ac_ext
3997   {0, (lt_ptr) 0}
3998 };
3999
4000 #ifdef __cplusplus
4001 }
4002 #endif
4003 EOF
4004           # Now try linking the two files.
4005           mv conftest.$ac_objext conftstm.$ac_objext
4006           save_LIBS="$LIBS"
4007           save_CFLAGS="$CFLAGS"
4008           LIBS="conftstm.$ac_objext"
4009           CFLAGS="$CFLAGS$no_builtin_flag"
4010           if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4011             pipe_works=yes
4012           fi
4013           LIBS="$save_LIBS"
4014           CFLAGS="$save_CFLAGS"
4015         else
4016           echo "cannot find nm_test_func in $nlist" >&5
4017         fi
4018       else
4019         echo "cannot find nm_test_var in $nlist" >&5
4020       fi
4021     else
4022       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4023     fi
4024   else
4025     echo "$progname: failed program was:" >&5
4026     cat conftest.$ac_ext >&5
4027   fi
4028   rm -f conftest* conftst*
4029
4030   # Do not use the global_symbol_pipe unless it works.
4031   if test "$pipe_works" = yes; then
4032     break
4033   else
4034     lt_cv_sys_global_symbol_pipe=
4035   fi
4036 done
4037
4038 fi
4039
4040 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4041 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4042   global_symbol_to_cdecl=
4043   global_symbol_to_c_name_address=
4044 else
4045   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4046   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4047 fi
4048 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4049 then
4050   echo "$ac_t""failed" 1>&6
4051 else
4052   echo "$ac_t""ok" 1>&6
4053 fi
4054
4055 for ac_hdr in dlfcn.h
4056 do
4057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4059 echo "configure:4060: checking for $ac_hdr" >&5
4060 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 #include <$ac_hdr>
4067 EOF
4068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4069 { (eval echo configure:4070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4071 if test -z "$ac_err"; then
4072   rm -rf conftest*
4073   eval "ac_cv_header_$ac_safe=yes"
4074 else
4075   echo "$ac_err" >&5
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   eval "ac_cv_header_$ac_safe=no"
4080 fi
4081 rm -f conftest*
4082 fi
4083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4084   echo "$ac_t""yes" 1>&6
4085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4086   cat >> confdefs.h <<EOF
4087 #define $ac_tr_hdr 1
4088 EOF
4089  
4090 else
4091   echo "$ac_t""no" 1>&6
4092 fi
4093 done
4094
4095
4096
4097
4098
4099
4100 # Only perform the check for file, if the check method requires it
4101 case $deplibs_check_method in
4102 file_magic*)
4103   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4104     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4105 echo "configure:4106: checking for ${ac_tool_prefix}file" >&5
4106 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4107   echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109   case $MAGIC_CMD in
4110   /*)
4111   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4112   ;;
4113   ?:/*)
4114   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4115   ;;
4116   *)
4117   ac_save_MAGIC_CMD="$MAGIC_CMD"
4118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4119   ac_dummy="/usr/bin:$PATH"
4120   for ac_dir in $ac_dummy; do
4121     test -z "$ac_dir" && ac_dir=.
4122     if test -f $ac_dir/${ac_tool_prefix}file; then
4123       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4124       if test -n "$file_magic_test_file"; then
4125         case $deplibs_check_method in
4126         "file_magic "*)
4127           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4128           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4129           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4130             egrep "$file_magic_regex" > /dev/null; then
4131             :
4132           else
4133             cat <<EOF 1>&2
4134
4135 *** Warning: the command libtool uses to detect shared libraries,
4136 *** $file_magic_cmd, produces output that libtool cannot recognize.
4137 *** The result is that libtool may fail to recognize shared libraries
4138 *** as such.  This will affect the creation of libtool libraries that
4139 *** depend on shared libraries, but programs linked with such libtool
4140 *** libraries will work regardless of this problem.  Nevertheless, you
4141 *** may want to report the problem to your system manager and/or to
4142 *** bug-libtool@gnu.org
4143
4144 EOF
4145           fi ;;
4146         esac
4147       fi
4148       break
4149     fi
4150   done
4151   IFS="$ac_save_ifs"
4152   MAGIC_CMD="$ac_save_MAGIC_CMD"
4153   ;;
4154 esac
4155 fi
4156
4157 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4158 if test -n "$MAGIC_CMD"; then
4159   echo "$ac_t""$MAGIC_CMD" 1>&6
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163
4164 if test -z "$lt_cv_path_MAGIC_CMD"; then
4165   if test -n "$ac_tool_prefix"; then
4166     echo $ac_n "checking for file""... $ac_c" 1>&6
4167 echo "configure:4168: checking for file" >&5
4168 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   case $MAGIC_CMD in
4172   /*)
4173   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4174   ;;
4175   ?:/*)
4176   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4177   ;;
4178   *)
4179   ac_save_MAGIC_CMD="$MAGIC_CMD"
4180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4181   ac_dummy="/usr/bin:$PATH"
4182   for ac_dir in $ac_dummy; do
4183     test -z "$ac_dir" && ac_dir=.
4184     if test -f $ac_dir/file; then
4185       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4186       if test -n "$file_magic_test_file"; then
4187         case $deplibs_check_method in
4188         "file_magic "*)
4189           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4190           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4191           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4192             egrep "$file_magic_regex" > /dev/null; then
4193             :
4194           else
4195             cat <<EOF 1>&2
4196
4197 *** Warning: the command libtool uses to detect shared libraries,
4198 *** $file_magic_cmd, produces output that libtool cannot recognize.
4199 *** The result is that libtool may fail to recognize shared libraries
4200 *** as such.  This will affect the creation of libtool libraries that
4201 *** depend on shared libraries, but programs linked with such libtool
4202 *** libraries will work regardless of this problem.  Nevertheless, you
4203 *** may want to report the problem to your system manager and/or to
4204 *** bug-libtool@gnu.org
4205
4206 EOF
4207           fi ;;
4208         esac
4209       fi
4210       break
4211     fi
4212   done
4213   IFS="$ac_save_ifs"
4214   MAGIC_CMD="$ac_save_MAGIC_CMD"
4215   ;;
4216 esac
4217 fi
4218
4219 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4220 if test -n "$MAGIC_CMD"; then
4221   echo "$ac_t""$MAGIC_CMD" 1>&6
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225
4226   else
4227     MAGIC_CMD=:
4228   fi
4229 fi
4230
4231   fi
4232   ;;
4233 esac
4234
4235 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4236 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4237 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4238 echo "configure:4239: checking for $ac_word" >&5
4239 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4240   echo $ac_n "(cached) $ac_c" 1>&6
4241 else
4242   if test -n "$RANLIB"; then
4243   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4244 else
4245   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4246   ac_dummy="$PATH"
4247   for ac_dir in $ac_dummy; do
4248     test -z "$ac_dir" && ac_dir=.
4249     if test -f $ac_dir/$ac_word; then
4250       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4251       break
4252     fi
4253   done
4254   IFS="$ac_save_ifs"
4255 fi
4256 fi
4257 RANLIB="$ac_cv_prog_RANLIB"
4258 if test -n "$RANLIB"; then
4259   echo "$ac_t""$RANLIB" 1>&6
4260 else
4261   echo "$ac_t""no" 1>&6
4262 fi
4263
4264
4265 if test -z "$ac_cv_prog_RANLIB"; then
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "ranlib", so it can be a program name with args.
4268 set dummy ranlib; ac_word=$2
4269 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4270 echo "configure:4271: checking for $ac_word" >&5
4271 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4272   echo $ac_n "(cached) $ac_c" 1>&6
4273 else
4274   if test -n "$RANLIB"; then
4275   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4276 else
4277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4278   ac_dummy="$PATH"
4279   for ac_dir in $ac_dummy; do
4280     test -z "$ac_dir" && ac_dir=.
4281     if test -f $ac_dir/$ac_word; then
4282       ac_cv_prog_RANLIB="ranlib"
4283       break
4284     fi
4285   done
4286   IFS="$ac_save_ifs"
4287   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4288 fi
4289 fi
4290 RANLIB="$ac_cv_prog_RANLIB"
4291 if test -n "$RANLIB"; then
4292   echo "$ac_t""$RANLIB" 1>&6
4293 else
4294   echo "$ac_t""no" 1>&6
4295 fi
4296
4297 else
4298   RANLIB=":"
4299 fi
4300 fi
4301
4302 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4303 set dummy ${ac_tool_prefix}strip; ac_word=$2
4304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4305 echo "configure:4306: checking for $ac_word" >&5
4306 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   if test -n "$STRIP"; then
4310   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4311 else
4312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4313   ac_dummy="$PATH"
4314   for ac_dir in $ac_dummy; do
4315     test -z "$ac_dir" && ac_dir=.
4316     if test -f $ac_dir/$ac_word; then
4317       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4318       break
4319     fi
4320   done
4321   IFS="$ac_save_ifs"
4322 fi
4323 fi
4324 STRIP="$ac_cv_prog_STRIP"
4325 if test -n "$STRIP"; then
4326   echo "$ac_t""$STRIP" 1>&6
4327 else
4328   echo "$ac_t""no" 1>&6
4329 fi
4330
4331
4332 if test -z "$ac_cv_prog_STRIP"; then
4333 if test -n "$ac_tool_prefix"; then
4334   # Extract the first word of "strip", so it can be a program name with args.
4335 set dummy strip; ac_word=$2
4336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4337 echo "configure:4338: checking for $ac_word" >&5
4338 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   if test -n "$STRIP"; then
4342   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4343 else
4344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4345   ac_dummy="$PATH"
4346   for ac_dir in $ac_dummy; do
4347     test -z "$ac_dir" && ac_dir=.
4348     if test -f $ac_dir/$ac_word; then
4349       ac_cv_prog_STRIP="strip"
4350       break
4351     fi
4352   done
4353   IFS="$ac_save_ifs"
4354   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4355 fi
4356 fi
4357 STRIP="$ac_cv_prog_STRIP"
4358 if test -n "$STRIP"; then
4359   echo "$ac_t""$STRIP" 1>&6
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363
4364 else
4365   STRIP=":"
4366 fi
4367 fi
4368
4369
4370 enable_dlopen=yes
4371 enable_win32_dll=yes
4372
4373 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4374 if test "${enable_libtool_lock+set}" = set; then
4375   enableval="$enable_libtool_lock"
4376   :
4377 fi
4378
4379 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4380
4381 # Some flags need to be propagated to the compiler or linker for good
4382 # libtool support.
4383 case $host in
4384 *-*-irix6*)
4385   # Find out which ABI we are using.
4386   echo '#line 4387 "configure"' > conftest.$ac_ext
4387   if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4388     case `/usr/bin/file conftest.$ac_objext` in
4389     *32-bit*)
4390       LD="${LD-ld} -32"
4391       ;;
4392     *N32*)
4393       LD="${LD-ld} -n32"
4394       ;;
4395     *64-bit*)
4396       LD="${LD-ld} -64"
4397       ;;
4398     esac
4399   fi
4400   rm -rf conftest*
4401   ;;
4402
4403 *-*-sco3.2v5*)
4404   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4405   SAVE_CFLAGS="$CFLAGS"
4406   CFLAGS="$CFLAGS -belf"
4407   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4408 echo "configure:4409: checking whether the C compiler needs -belf" >&5
4409 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4410   echo $ac_n "(cached) $ac_c" 1>&6
4411 else
4412   
4413      ac_ext=c
4414 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4415 ac_cpp='$CPP $CPPFLAGS'
4416 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4417 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4418 cross_compiling=$ac_cv_prog_cc_cross
4419
4420      cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423
4424 int main() {
4425
4426 ; return 0; }
4427 EOF
4428 if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4429   rm -rf conftest*
4430   lt_cv_cc_needs_belf=yes
4431 else
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   lt_cv_cc_needs_belf=no
4436 fi
4437 rm -f conftest*
4438      ac_ext=c
4439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4440 ac_cpp='$CPP $CPPFLAGS'
4441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4443 cross_compiling=$ac_cv_prog_cc_cross
4444
4445 fi
4446
4447 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4448   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4449     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4450     CFLAGS="$SAVE_CFLAGS"
4451   fi
4452   ;;
4453
4454 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4455   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4456 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$DLLTOOL"; then
4463   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475 fi
4476 fi
4477 DLLTOOL="$ac_cv_prog_DLLTOOL"
4478 if test -n "$DLLTOOL"; then
4479   echo "$ac_t""$DLLTOOL" 1>&6
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484
4485 if test -z "$ac_cv_prog_DLLTOOL"; then
4486 if test -n "$ac_tool_prefix"; then
4487   # Extract the first word of "dlltool", so it can be a program name with args.
4488 set dummy dlltool; ac_word=$2
4489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4490 echo "configure:4491: checking for $ac_word" >&5
4491 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   if test -n "$DLLTOOL"; then
4495   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4496 else
4497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4498   ac_dummy="$PATH"
4499   for ac_dir in $ac_dummy; do
4500     test -z "$ac_dir" && ac_dir=.
4501     if test -f $ac_dir/$ac_word; then
4502       ac_cv_prog_DLLTOOL="dlltool"
4503       break
4504     fi
4505   done
4506   IFS="$ac_save_ifs"
4507   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4508 fi
4509 fi
4510 DLLTOOL="$ac_cv_prog_DLLTOOL"
4511 if test -n "$DLLTOOL"; then
4512   echo "$ac_t""$DLLTOOL" 1>&6
4513 else
4514   echo "$ac_t""no" 1>&6
4515 fi
4516
4517 else
4518   DLLTOOL="false"
4519 fi
4520 fi
4521
4522   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4523 set dummy ${ac_tool_prefix}as; ac_word=$2
4524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525 echo "configure:4526: checking for $ac_word" >&5
4526 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   if test -n "$AS"; then
4530   ac_cv_prog_AS="$AS" # Let the user override the test.
4531 else
4532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4533   ac_dummy="$PATH"
4534   for ac_dir in $ac_dummy; do
4535     test -z "$ac_dir" && ac_dir=.
4536     if test -f $ac_dir/$ac_word; then
4537       ac_cv_prog_AS="${ac_tool_prefix}as"
4538       break
4539     fi
4540   done
4541   IFS="$ac_save_ifs"
4542 fi
4543 fi
4544 AS="$ac_cv_prog_AS"
4545 if test -n "$AS"; then
4546   echo "$ac_t""$AS" 1>&6
4547 else
4548   echo "$ac_t""no" 1>&6
4549 fi
4550
4551
4552 if test -z "$ac_cv_prog_AS"; then
4553 if test -n "$ac_tool_prefix"; then
4554   # Extract the first word of "as", so it can be a program name with args.
4555 set dummy as; ac_word=$2
4556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4557 echo "configure:4558: checking for $ac_word" >&5
4558 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4559   echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561   if test -n "$AS"; then
4562   ac_cv_prog_AS="$AS" # Let the user override the test.
4563 else
4564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4565   ac_dummy="$PATH"
4566   for ac_dir in $ac_dummy; do
4567     test -z "$ac_dir" && ac_dir=.
4568     if test -f $ac_dir/$ac_word; then
4569       ac_cv_prog_AS="as"
4570       break
4571     fi
4572   done
4573   IFS="$ac_save_ifs"
4574   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4575 fi
4576 fi
4577 AS="$ac_cv_prog_AS"
4578 if test -n "$AS"; then
4579   echo "$ac_t""$AS" 1>&6
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583
4584 else
4585   AS="false"
4586 fi
4587 fi
4588
4589   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4590 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4592 echo "configure:4593: checking for $ac_word" >&5
4593 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   if test -n "$OBJDUMP"; then
4597   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4598 else
4599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4600   ac_dummy="$PATH"
4601   for ac_dir in $ac_dummy; do
4602     test -z "$ac_dir" && ac_dir=.
4603     if test -f $ac_dir/$ac_word; then
4604       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4605       break
4606     fi
4607   done
4608   IFS="$ac_save_ifs"
4609 fi
4610 fi
4611 OBJDUMP="$ac_cv_prog_OBJDUMP"
4612 if test -n "$OBJDUMP"; then
4613   echo "$ac_t""$OBJDUMP" 1>&6
4614 else
4615   echo "$ac_t""no" 1>&6
4616 fi
4617
4618
4619 if test -z "$ac_cv_prog_OBJDUMP"; then
4620 if test -n "$ac_tool_prefix"; then
4621   # Extract the first word of "objdump", so it can be a program name with args.
4622 set dummy objdump; ac_word=$2
4623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4624 echo "configure:4625: checking for $ac_word" >&5
4625 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4626   echo $ac_n "(cached) $ac_c" 1>&6
4627 else
4628   if test -n "$OBJDUMP"; then
4629   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4630 else
4631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4632   ac_dummy="$PATH"
4633   for ac_dir in $ac_dummy; do
4634     test -z "$ac_dir" && ac_dir=.
4635     if test -f $ac_dir/$ac_word; then
4636       ac_cv_prog_OBJDUMP="objdump"
4637       break
4638     fi
4639   done
4640   IFS="$ac_save_ifs"
4641   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4642 fi
4643 fi
4644 OBJDUMP="$ac_cv_prog_OBJDUMP"
4645 if test -n "$OBJDUMP"; then
4646   echo "$ac_t""$OBJDUMP" 1>&6
4647 else
4648   echo "$ac_t""no" 1>&6
4649 fi
4650
4651 else
4652   OBJDUMP="false"
4653 fi
4654 fi
4655
4656
4657   # recent cygwin and mingw systems supply a stub DllMain which the user
4658   # can override, but on older systems we have to supply one
4659   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4660 echo "configure:4661: checking if libtool should supply DllMain function" >&5
4661 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667
4668 int main() {
4669 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4670       DllMain (0, 0, 0);
4671 ; return 0; }
4672 EOF
4673 if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4674   rm -rf conftest*
4675   lt_cv_need_dllmain=no
4676 else
4677   echo "configure: failed program was:" >&5
4678   cat conftest.$ac_ext >&5
4679   rm -rf conftest*
4680   lt_cv_need_dllmain=yes
4681 fi
4682 rm -f conftest*
4683 fi
4684
4685 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4686
4687   case $host/$CC in
4688   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4689     # old mingw systems require "-dll" to link a DLL, while more recent ones
4690     # require "-mdll"
4691     SAVE_CFLAGS="$CFLAGS"
4692     CFLAGS="$CFLAGS -mdll"
4693     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4694 echo "configure:4695: checking how to link DLLs" >&5
4695 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701
4702 int main() {
4703
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4707   rm -rf conftest*
4708   lt_cv_cc_dll_switch=-mdll
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   lt_cv_cc_dll_switch=-dll
4714 fi
4715 rm -f conftest*
4716 fi
4717
4718 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4719     CFLAGS="$SAVE_CFLAGS" ;;
4720   *-*-cygwin* | *-*-pw32*)
4721     # cygwin systems need to pass --dll to the linker, and not link
4722     # crt.o which will require a WinMain@16 definition.
4723     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4724   esac
4725   ;;
4726   
4727 esac
4728
4729 # Sed substitution that helps us do robust quoting.  It backslashifies
4730 # metacharacters that are still active within double-quoted strings.
4731 Xsed='sed -e s/^X//'
4732 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4733
4734 # Same as above, but do not quote variable references.
4735 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4736
4737 # Sed substitution to delay expansion of an escaped shell variable in a
4738 # double_quote_subst'ed string.
4739 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4740
4741 # Constants:
4742 rm="rm -f"
4743
4744 # Global variables:
4745 default_ofile=libtool
4746 can_build_shared=yes
4747
4748 # All known linkers require a `.a' archive for static linking (except M$VC,
4749 # which needs '.lib').
4750 libext=a
4751 ltmain="$ac_aux_dir/ltmain.sh"
4752 ofile="$default_ofile"
4753 with_gnu_ld="$lt_cv_prog_gnu_ld"
4754 need_locks="$enable_libtool_lock"
4755
4756 old_CC="$CC"
4757 old_CFLAGS="$CFLAGS"
4758
4759 # Set sane defaults for various variables
4760 test -z "$AR" && AR=ar
4761 test -z "$AR_FLAGS" && AR_FLAGS=cru
4762 test -z "$AS" && AS=as
4763 test -z "$CC" && CC=cc
4764 test -z "$DLLTOOL" && DLLTOOL=dlltool
4765 test -z "$LD" && LD=ld
4766 test -z "$LN_S" && LN_S="ln -s"
4767 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4768 test -z "$NM" && NM=nm
4769 test -z "$OBJDUMP" && OBJDUMP=objdump
4770 test -z "$RANLIB" && RANLIB=:
4771 test -z "$STRIP" && STRIP=:
4772 test -z "$ac_objext" && ac_objext=o
4773
4774 if test x"$host" != x"$build"; then
4775   ac_tool_prefix=${host_alias}-
4776 else
4777   ac_tool_prefix=
4778 fi
4779
4780 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4781 case $host_os in
4782 linux-gnu*) ;;
4783 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4784 esac
4785
4786 case $host_os in
4787 aix3*)
4788   # AIX sometimes has problems with the GCC collect2 program.  For some
4789   # reason, if we set the COLLECT_NAMES environment variable, the problems
4790   # vanish in a puff of smoke.
4791   if test "X${COLLECT_NAMES+set}" != Xset; then
4792     COLLECT_NAMES=
4793     export COLLECT_NAMES
4794   fi
4795   ;;
4796 esac
4797
4798 # Determine commands to create old-style static archives.
4799 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4800 old_postinstall_cmds='chmod 644 $oldlib'
4801 old_postuninstall_cmds=
4802
4803 if test -n "$RANLIB"; then
4804   case $host_os in
4805   openbsd*)
4806     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4807     ;;
4808   *)
4809     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4810     ;;
4811   esac
4812   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4813 fi
4814
4815 # Allow CC to be a program name with arguments.
4816 set dummy $CC
4817 compiler="$2"
4818
4819 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4820 echo "configure:4821: checking for objdir" >&5
4821 rm -f .libs 2>/dev/null
4822 mkdir .libs 2>/dev/null
4823 if test -d .libs; then
4824   objdir=.libs
4825 else
4826   # MS-DOS does not allow filenames that begin with a dot.
4827   objdir=_libs
4828 fi
4829 rmdir .libs 2>/dev/null
4830 echo "$ac_t""$objdir" 1>&6
4831
4832
4833 # Check whether --with-pic or --without-pic was given.
4834 if test "${with_pic+set}" = set; then
4835   withval="$with_pic"
4836   pic_mode="$withval"
4837 else
4838   pic_mode=default
4839 fi
4840
4841 test -z "$pic_mode" && pic_mode=default
4842
4843 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4844 # in isolation, and that seeing it set (from the cache) indicates that
4845 # the associated values are set (in the cache) correctly too.
4846 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4847 echo "configure:4848: checking for $compiler option to produce PIC" >&5
4848 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851    lt_cv_prog_cc_pic=
4852   lt_cv_prog_cc_shlib=
4853   lt_cv_prog_cc_wl=
4854   lt_cv_prog_cc_static=
4855   lt_cv_prog_cc_no_builtin=
4856   lt_cv_prog_cc_can_build_shared=$can_build_shared
4857
4858   if test "$GCC" = yes; then
4859     lt_cv_prog_cc_wl='-Wl,'
4860     lt_cv_prog_cc_static='-static'
4861
4862     case $host_os in
4863     aix*)
4864       # Below there is a dirty hack to force normal static linking with -ldl
4865       # The problem is because libdl dynamically linked with both libc and
4866       # libC (AIX C++ library), which obviously doesn't included in libraries
4867       # list by gcc. This cause undefined symbols with -static flags.
4868       # This hack allows C programs to be linked with "-static -ldl", but
4869       # not sure about C++ programs.
4870       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4871       ;;
4872     amigaos*)
4873       # FIXME: we need at least 68020 code to build shared libraries, but
4874       # adding the `-m68020' flag to GCC prevents building anything better,
4875       # like `-m68040'.
4876       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4877       ;;
4878     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4879       # PIC is the default for these OSes.
4880       ;;
4881     darwin* | rhapsody*)
4882       # PIC is the default on this platform
4883       # Common symbols not allowed in MH_DYLIB files
4884       lt_cv_prog_cc_pic='-fno-common'
4885       ;;
4886     cygwin* | mingw* | pw32* | os2*)
4887       # This hack is so that the source file can tell whether it is being
4888       # built for inclusion in a dll (and should export symbols for example).
4889       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4890       ;;
4891     sysv4*MP*)
4892       if test -d /usr/nec; then
4893          lt_cv_prog_cc_pic=-Kconform_pic
4894       fi
4895       ;;
4896     *)
4897       lt_cv_prog_cc_pic='-fPIC'
4898       ;;
4899     esac
4900   else
4901     # PORTME Check for PIC flags for the system compiler.
4902     case $host_os in
4903     aix3* | aix4* | aix5*)
4904       lt_cv_prog_cc_wl='-Wl,'
4905       # All AIX code is PIC.
4906       if test "$host_cpu" = ia64; then
4907         # AIX 5 now supports IA64 processor
4908         lt_cv_prog_cc_static='-Bstatic'
4909       else
4910         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4911       fi
4912       ;;
4913
4914     hpux9* | hpux10* | hpux11*)
4915       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4916       lt_cv_prog_cc_wl='-Wl,'
4917       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4918       lt_cv_prog_cc_pic='+Z'
4919       ;;
4920
4921     irix5* | irix6* | nonstopux*)
4922       lt_cv_prog_cc_wl='-Wl,'
4923       lt_cv_prog_cc_static='-non_shared'
4924       # PIC (with -KPIC) is the default.
4925       ;;
4926
4927     cygwin* | mingw* | pw32* | os2*)
4928       # This hack is so that the source file can tell whether it is being
4929       # built for inclusion in a dll (and should export symbols for example).
4930       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4931       ;;
4932
4933     newsos6)
4934       lt_cv_prog_cc_pic='-KPIC'
4935       lt_cv_prog_cc_static='-Bstatic'
4936       ;;
4937     
4938     openedition)
4939       # XPLINK code is PIC by default
4940       ;;
4941
4942     osf3* | osf4* | osf5*)
4943       # All OSF/1 code is PIC.
4944       lt_cv_prog_cc_wl='-Wl,'
4945       lt_cv_prog_cc_static='-non_shared'
4946       ;;
4947
4948     sco3.2v5*)
4949       lt_cv_prog_cc_pic='-Kpic'
4950       lt_cv_prog_cc_static='-dn'
4951       lt_cv_prog_cc_shlib='-belf'
4952       ;;
4953
4954     solaris*)
4955       lt_cv_prog_cc_pic='-KPIC'
4956       lt_cv_prog_cc_static='-Bstatic'
4957       lt_cv_prog_cc_wl='-Wl,'
4958       ;;
4959
4960     sunos4*)
4961       lt_cv_prog_cc_pic='-PIC'
4962       lt_cv_prog_cc_static='-Bstatic'
4963       lt_cv_prog_cc_wl='-Qoption ld '
4964       ;;
4965
4966     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4967       lt_cv_prog_cc_pic='-KPIC'
4968       lt_cv_prog_cc_static='-Bstatic'
4969       lt_cv_prog_cc_wl='-Wl,'
4970       ;;
4971
4972     uts4*)
4973       lt_cv_prog_cc_pic='-pic'
4974       lt_cv_prog_cc_static='-Bstatic'
4975       ;;
4976
4977     sysv4*MP*)
4978       if test -d /usr/nec ;then
4979         lt_cv_prog_cc_pic='-Kconform_pic'
4980         lt_cv_prog_cc_static='-Bstatic'
4981       fi
4982       ;;
4983
4984     *)
4985       lt_cv_prog_cc_can_build_shared=no
4986       ;;
4987     esac
4988   fi
4989
4990 fi
4991
4992 if test -z "$lt_cv_prog_cc_pic"; then
4993   echo "$ac_t""none" 1>&6
4994 else
4995   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4996
4997   # Check to make sure the pic_flag actually works.
4998   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4999 echo "configure:5000: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5000   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003       save_CFLAGS="$CFLAGS"
5004     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5005     cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008
5009 int main() {
5010
5011 ; return 0; }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5014   rm -rf conftest*
5015         case $host_os in
5016       hpux9* | hpux10* | hpux11*)
5017         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5018         # they create non-PIC objects.  So, if there were any warnings, we
5019         # assume that PIC is not supported.
5020         if test -s conftest.err; then
5021           lt_cv_prog_cc_pic_works=no
5022         else
5023           lt_cv_prog_cc_pic_works=yes
5024         fi
5025         ;;
5026       *)
5027         lt_cv_prog_cc_pic_works=yes
5028         ;;
5029       esac
5030     
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035         lt_cv_prog_cc_pic_works=no
5036     
5037 fi
5038 rm -f conftest*
5039     CFLAGS="$save_CFLAGS"
5040   
5041 fi
5042
5043
5044   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5045     lt_cv_prog_cc_pic=
5046     lt_cv_prog_cc_can_build_shared=no
5047   else
5048     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5049   fi
5050
5051   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5052 fi
5053
5054 # Check for any special shared library compilation flags.
5055 if test -n "$lt_cv_prog_cc_shlib"; then
5056   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5057   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5058   else
5059    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5060     lt_cv_prog_cc_can_build_shared=no
5061   fi
5062 fi
5063
5064 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5065 echo "configure:5066: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5066 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069     lt_cv_prog_cc_static_works=no
5070   save_LDFLAGS="$LDFLAGS"
5071   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5072   cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075
5076 int main() {
5077
5078 ; return 0; }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5081   rm -rf conftest*
5082   lt_cv_prog_cc_static_works=yes
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086 fi
5087 rm -f conftest*
5088   LDFLAGS="$save_LDFLAGS"
5089
5090 fi
5091
5092
5093 # Belt *and* braces to stop my trousers falling down:
5094 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5095 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5096
5097 pic_flag="$lt_cv_prog_cc_pic"
5098 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5099 wl="$lt_cv_prog_cc_wl"
5100 link_static_flag="$lt_cv_prog_cc_static"
5101 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5102 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5103
5104
5105 # Check to see if options -o and -c are simultaneously supported by compiler
5106 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5107 echo "configure:5108: checking if $compiler supports -c -o file.$ac_objext" >&5
5108 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5109   echo $ac_n "(cached) $ac_c" 1>&6
5110 else
5111   
5112 $rm -r conftest 2>/dev/null
5113 mkdir conftest
5114 cd conftest
5115 echo "int some_variable = 0;" > conftest.$ac_ext
5116 mkdir out
5117 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5118 # that will create temporary files in the current directory regardless of
5119 # the output directory.  Thus, making CWD read-only will cause this test
5120 # to fail, enabling locking or at least warning the user not to do parallel
5121 # builds.
5122 chmod -w .
5123 save_CFLAGS="$CFLAGS"
5124 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5125 compiler_c_o=no
5126 if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5127   # The compiler can only warn and ignore the option if not recognized
5128   # So say no if there are warnings
5129   if test -s out/conftest.err; then
5130     lt_cv_compiler_c_o=no
5131   else
5132     lt_cv_compiler_c_o=yes
5133   fi
5134 else
5135   # Append any errors to the config.log.
5136   cat out/conftest.err 1>&5
5137   lt_cv_compiler_c_o=no
5138 fi
5139 CFLAGS="$save_CFLAGS"
5140 chmod u+w .
5141 $rm conftest* out/*
5142 rmdir out
5143 cd ..
5144 rmdir conftest
5145 $rm -r conftest 2>/dev/null
5146
5147 fi
5148
5149 compiler_c_o=$lt_cv_compiler_c_o
5150 echo "$ac_t""$compiler_c_o" 1>&6
5151
5152 if test x"$compiler_c_o" = x"yes"; then
5153   # Check to see if we can write to a .lo
5154   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5155 echo "configure:5156: checking if $compiler supports -c -o file.lo" >&5
5156   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159   
5160   lt_cv_compiler_o_lo=no
5161   save_CFLAGS="$CFLAGS"
5162   CFLAGS="$CFLAGS -c -o conftest.lo"
5163   save_objext="$ac_objext"
5164   ac_objext=lo
5165   cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168
5169 int main() {
5170 int some_variable = 0;
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5174   rm -rf conftest*
5175       # The compiler can only warn and ignore the option if not recognized
5176     # So say no if there are warnings
5177     if test -s conftest.err; then
5178       lt_cv_compiler_o_lo=no
5179     else
5180       lt_cv_compiler_o_lo=yes
5181     fi
5182   
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186 fi
5187 rm -f conftest*
5188   ac_objext="$save_objext"
5189   CFLAGS="$save_CFLAGS"
5190   
5191 fi
5192
5193   compiler_o_lo=$lt_cv_compiler_o_lo
5194   echo "$ac_t""$compiler_o_lo" 1>&6
5195 else
5196   compiler_o_lo=no
5197 fi
5198
5199 # Check to see if we can do hard links to lock some files if needed
5200 hard_links="nottested"
5201 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5202   # do not overwrite the value of need_locks provided by the user
5203   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5204 echo "configure:5205: checking if we can lock with hard links" >&5
5205   hard_links=yes
5206   $rm conftest*
5207   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5208   touch conftest.a
5209   ln conftest.a conftest.b 2>&5 || hard_links=no
5210   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5211   echo "$ac_t""$hard_links" 1>&6
5212   if test "$hard_links" = no; then
5213     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5214     need_locks=warn
5215   fi
5216 else
5217   need_locks=no
5218 fi
5219
5220 if test "$GCC" = yes; then
5221   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5222   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5224   echo "int some_variable = 0;" > conftest.$ac_ext
5225   save_CFLAGS="$CFLAGS"
5226   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5227   compiler_rtti_exceptions=no
5228   cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231
5232 int main() {
5233 int some_variable = 0;
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5237   rm -rf conftest*
5238       # The compiler can only warn and ignore the option if not recognized
5239     # So say no if there are warnings
5240     if test -s conftest.err; then
5241       compiler_rtti_exceptions=no
5242     else
5243       compiler_rtti_exceptions=yes
5244     fi
5245   
5246 else
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249 fi
5250 rm -f conftest*
5251   CFLAGS="$save_CFLAGS"
5252   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5253
5254   if test "$compiler_rtti_exceptions" = "yes"; then
5255     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5256   else
5257     no_builtin_flag=' -fno-builtin'
5258   fi
5259 fi
5260
5261 # See if the linker supports building shared libraries.
5262 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5263 echo "configure:5264: checking whether the linker ($LD) supports shared libraries" >&5
5264
5265 allow_undefined_flag=
5266 no_undefined_flag=
5267 need_lib_prefix=unknown
5268 need_version=unknown
5269 # when you set need_version to no, make sure it does not cause -set_version
5270 # flags to be left without arguments
5271 archive_cmds=
5272 archive_expsym_cmds=
5273 old_archive_from_new_cmds=
5274 old_archive_from_expsyms_cmds=
5275 export_dynamic_flag_spec=
5276 whole_archive_flag_spec=
5277 thread_safe_flag_spec=
5278 hardcode_into_libs=no
5279 hardcode_libdir_flag_spec=
5280 hardcode_libdir_separator=
5281 hardcode_direct=no
5282 hardcode_minus_L=no
5283 hardcode_shlibpath_var=unsupported
5284 runpath_var=
5285 link_all_deplibs=unknown
5286 always_export_symbols=no
5287 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5288 # include_expsyms should be a list of space-separated symbols to be *always*
5289 # included in the symbol list
5290 include_expsyms=
5291 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5292 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5293 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5294 # as well as any symbol that contains `d'.
5295 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5296 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5297 # platforms (ab)use it in PIC code, but their linkers get confused if
5298 # the symbol is explicitly referenced.  Since portable code cannot
5299 # rely on this symbol name, it's probably fine to never include it in
5300 # preloaded symbol tables.
5301 extract_expsyms_cmds=
5302
5303 case $host_os in
5304 cygwin* | mingw* | pw32*)
5305   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5306   # When not using gcc, we currently assume that we are using
5307   # Microsoft Visual C++.
5308   if test "$GCC" != yes; then
5309     with_gnu_ld=no
5310   fi
5311   ;;
5312 openbsd*)
5313   with_gnu_ld=no
5314   ;;
5315 esac
5316
5317 ld_shlibs=yes
5318 if test "$with_gnu_ld" = yes; then
5319   # If archive_cmds runs LD, not CC, wlarc should be empty
5320   wlarc='${wl}'
5321
5322   # See if GNU ld supports shared libraries.
5323   case $host_os in
5324   aix3* | aix4* | aix5*)
5325     # On AIX, the GNU linker is very broken
5326     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5327     ld_shlibs=no
5328     cat <<EOF 1>&2
5329
5330 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5331 *** to be unable to reliably create shared libraries on AIX.
5332 *** Therefore, libtool is disabling shared libraries support.  If you
5333 *** really care for shared libraries, you may want to modify your PATH
5334 *** so that a non-GNU linker is found, and then restart.
5335
5336 EOF
5337     ;;
5338
5339   amigaos*)
5340     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)'
5341     hardcode_libdir_flag_spec='-L$libdir'
5342     hardcode_minus_L=yes
5343
5344     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5345     # that the semantics of dynamic libraries on AmigaOS, at least up
5346     # to version 4, is to share data among multiple programs linked
5347     # with the same dynamic library.  Since this doesn't match the
5348     # behavior of shared libraries on other platforms, we can use
5349     # them.
5350     ld_shlibs=no
5351     ;;
5352
5353   beos*)
5354     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5355       allow_undefined_flag=unsupported
5356       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5357       # support --undefined.  This deserves some investigation.  FIXME
5358       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5359     else
5360       ld_shlibs=no
5361     fi
5362     ;;
5363
5364   cygwin* | mingw* | pw32*)
5365     # hardcode_libdir_flag_spec is actually meaningless, as there is
5366     # no search path for DLLs.
5367     hardcode_libdir_flag_spec='-L$libdir'
5368     allow_undefined_flag=unsupported
5369     always_export_symbols=yes
5370
5371     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5372       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5373       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5374       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5375       else $CC -o impgen impgen.c ; fi)~
5376       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5377
5378     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5379
5380     # cygwin and mingw dlls have different entry points and sets of symbols
5381     # to exclude.
5382     # FIXME: what about values for MSVC?
5383     dll_entry=__cygwin_dll_entry@12
5384     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5385     case $host_os in
5386     mingw*)
5387       # mingw values
5388       dll_entry=_DllMainCRTStartup@12
5389       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5390       ;;
5391     esac
5392
5393     # mingw and cygwin differ, and it's simplest to just exclude the union
5394     # of the two symbol sets.
5395     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5396
5397     # recent cygwin and mingw systems supply a stub DllMain which the user
5398     # can override, but on older systems we have to supply one (in ltdll.c)
5399     if test "x$lt_cv_need_dllmain" = "xyes"; then
5400       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5401       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~
5402         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5403     else
5404       ltdll_obj=
5405       ltdll_cmds=
5406     fi
5407
5408     # Extract the symbol export list from an `--export-all' def file,
5409     # then regenerate the def file from the symbol export list, so that
5410     # the compiled dll only exports the symbol export list.
5411     # Be careful not to strip the DATA tag left be newer dlltools.
5412     export_symbols_cmds="$ltdll_cmds"'
5413       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5414       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5415
5416     # If the export-symbols file already is a .def file (1st line
5417     # is EXPORTS), use it as is.
5418     # If DATA tags from a recent dlltool are present, honour them!
5419     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5420         cp $export_symbols $output_objdir/$soname-def;
5421       else
5422         echo EXPORTS > $output_objdir/$soname-def;
5423         _lt_hint=1;
5424         cat $export_symbols | while read symbol; do
5425          set dummy \$symbol;
5426          case \$# in
5427            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5428            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5429            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5430          esac;
5431          _lt_hint=`expr 1 + \$_lt_hint`;
5432         done;
5433       fi~
5434       '"$ltdll_cmds"'
5435       $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~
5436       $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~
5437       $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~
5438       $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~
5439       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5440     ;;
5441
5442   netbsd*)
5443     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5444       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5445       wlarc=
5446     else
5447       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5448       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5449     fi
5450     ;;
5451
5452   solaris* | sysv5*)
5453     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5454       ld_shlibs=no
5455       cat <<EOF 1>&2
5456
5457 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5458 *** create shared libraries on Solaris systems.  Therefore, libtool
5459 *** is disabling shared libraries support.  We urge you to upgrade GNU
5460 *** binutils to release 2.9.1 or newer.  Another option is to modify
5461 *** your PATH or compiler configuration so that the native linker is
5462 *** used, and then restart.
5463
5464 EOF
5465     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5466       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5467       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5468     else
5469       ld_shlibs=no
5470     fi
5471     ;;
5472
5473   sunos4*)
5474     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5475     wlarc=
5476     hardcode_direct=yes
5477     hardcode_shlibpath_var=no
5478     ;;
5479
5480   *)
5481     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5482       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5483       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5484     else
5485       ld_shlibs=no
5486     fi
5487     ;;
5488   esac
5489
5490   if test "$ld_shlibs" = yes; then
5491     runpath_var=LD_RUN_PATH
5492     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5493     export_dynamic_flag_spec='${wl}--export-dynamic'
5494     case $host_os in
5495     cygwin* | mingw* | pw32*)
5496       # dlltool doesn't understand --whole-archive et. al.
5497       whole_archive_flag_spec=
5498       ;;
5499     *)
5500       # ancient GNU ld didn't support --whole-archive et. al.
5501       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5502         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5503       else
5504         whole_archive_flag_spec=
5505       fi
5506       ;;
5507     esac
5508   fi
5509 else
5510   # PORTME fill in a description of your system's linker (not GNU ld)
5511   case $host_os in
5512   aix3*)
5513     allow_undefined_flag=unsupported
5514     always_export_symbols=yes
5515     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'
5516     # Note: this linker hardcodes the directories in LIBPATH if there
5517     # are no directories specified by -L.
5518     hardcode_minus_L=yes
5519     if test "$GCC" = yes && test -z "$link_static_flag"; then
5520       # Neither direct hardcoding nor static linking is supported with a
5521       # broken collect2.
5522       hardcode_direct=unsupported
5523     fi
5524     ;;
5525
5526   aix4* | aix5*)
5527     if test "$host_cpu" = ia64; then
5528       # On IA64, the linker does run time linking by default, so we don't
5529       # have to do anything special.
5530       aix_use_runtimelinking=no
5531       exp_sym_flag='-Bexport'
5532       no_entry_flag=""
5533     else
5534       aix_use_runtimelinking=no
5535
5536       # Test if we are trying to use run time linking or normal
5537       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5538       # need to do runtime linking.
5539       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5540         for ld_flag in $LDFLAGS; do
5541           case $ld_flag in
5542           *-brtl*)
5543             aix_use_runtimelinking=yes
5544             break
5545           ;;
5546           esac
5547         done
5548       esac
5549
5550       exp_sym_flag='-bexport'
5551       no_entry_flag='-bnoentry'
5552     fi
5553
5554     # When large executables or shared objects are built, AIX ld can
5555     # have problems creating the table of contents.  If linking a library
5556     # or program results in "error TOC overflow" add -mminimal-toc to
5557     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5558     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5559
5560     hardcode_direct=yes
5561     archive_cmds=''
5562     hardcode_libdir_separator=':'
5563     if test "$GCC" = yes; then
5564       case $host_os in aix4.[012]|aix4.[012].*)
5565         collect2name=`${CC} -print-prog-name=collect2`
5566         if test -f "$collect2name" && \
5567           strings "$collect2name" | grep resolve_lib_name >/dev/null
5568         then
5569           # We have reworked collect2
5570           hardcode_direct=yes
5571         else
5572           # We have old collect2
5573           hardcode_direct=unsupported
5574           # It fails to find uninstalled libraries when the uninstalled
5575           # path is not listed in the libpath.  Setting hardcode_minus_L
5576           # to unsupported forces relinking
5577           hardcode_minus_L=yes
5578           hardcode_libdir_flag_spec='-L$libdir'
5579           hardcode_libdir_separator=
5580         fi
5581       esac
5582
5583       shared_flag='-shared'
5584     else
5585       # not using gcc
5586       if test "$host_cpu" = ia64; then
5587         shared_flag='${wl}-G'
5588       else
5589         if test "$aix_use_runtimelinking" = yes; then
5590           shared_flag='${wl}-G'
5591         else
5592           shared_flag='${wl}-bM:SRE'
5593         fi
5594       fi
5595     fi
5596
5597     # It seems that -bexpall can do strange things, so it is better to
5598     # generate a list of symbols to export.
5599     always_export_symbols=yes
5600     if test "$aix_use_runtimelinking" = yes; then
5601       # Warning - without using the other runtime loading flags (-brtl),
5602       # -berok will link without error, but may produce a broken library.
5603       allow_undefined_flag='-berok'
5604       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5605       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"
5606     else
5607       if test "$host_cpu" = ia64; then
5608         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5609         allow_undefined_flag="-z nodefs"
5610         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"
5611       else
5612         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5613         # Warning - without using the other run time loading flags,
5614         # -berok will link without error, but may produce a broken library.
5615         allow_undefined_flag='${wl}-berok'
5616         # This is a bit strange, but is similar to how AIX traditionally builds
5617         # it's shared libraries.
5618         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'
5619       fi
5620     fi
5621     ;;
5622
5623   amigaos*)
5624     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)'
5625     hardcode_libdir_flag_spec='-L$libdir'
5626     hardcode_minus_L=yes
5627     # see comment about different semantics on the GNU ld section
5628     ld_shlibs=no
5629     ;;
5630
5631   cygwin* | mingw* | pw32*)
5632     # When not using gcc, we currently assume that we are using
5633     # Microsoft Visual C++.
5634     # hardcode_libdir_flag_spec is actually meaningless, as there is
5635     # no search path for DLLs.
5636     hardcode_libdir_flag_spec=' '
5637     allow_undefined_flag=unsupported
5638     # Tell ltmain to make .lib files, not .a files.
5639     libext=lib
5640     # FIXME: Setting linknames here is a bad hack.
5641     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5642     # The linker will automatically build a .lib file if we build a DLL.
5643     old_archive_from_new_cmds='true'
5644     # FIXME: Should let the user specify the lib program.
5645     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5646     fix_srcfile_path='`cygpath -w "$srcfile"`'
5647     ;;
5648
5649   darwin* | rhapsody*)
5650     case "$host_os" in
5651     rhapsody* | darwin1.[012])
5652       allow_undefined_flag='-undefined suppress'
5653       ;;
5654     *) # Darwin 1.3 on
5655       allow_undefined_flag='-flat_namespace -undefined suppress'
5656       ;;
5657     esac
5658     # FIXME: Relying on posixy $() will cause problems for
5659     #        cross-compilation, but unfortunately the echo tests do not
5660     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5661     #        `"' quotes if we put them in here... so don't!
5662     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)'
5663     # We need to add '_' to the symbols in $export_symbols first
5664     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5665     hardcode_direct=yes
5666     hardcode_shlibpath_var=no
5667     whole_archive_flag_spec='-all_load $convenience'
5668     ;;
5669
5670   freebsd1*)
5671     ld_shlibs=no
5672     ;;
5673
5674   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5675   # support.  Future versions do this automatically, but an explicit c++rt0.o
5676   # does not break anything, and helps significantly (at the cost of a little
5677   # extra space).
5678   freebsd2.2*)
5679     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5680     hardcode_libdir_flag_spec='-R$libdir'
5681     hardcode_direct=yes
5682     hardcode_shlibpath_var=no
5683     ;;
5684
5685   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5686   freebsd2*)
5687     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688     hardcode_direct=yes
5689     hardcode_minus_L=yes
5690     hardcode_shlibpath_var=no
5691     ;;
5692
5693   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5694   freebsd*)
5695     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5696     hardcode_libdir_flag_spec='-R$libdir'
5697     hardcode_direct=yes
5698     hardcode_shlibpath_var=no
5699     ;;
5700
5701   hpux9* | hpux10* | hpux11*)
5702     case $host_os in
5703     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' ;;
5704     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5705     esac
5706     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5707     hardcode_libdir_separator=:
5708     hardcode_direct=yes
5709     hardcode_minus_L=yes # Not in the search PATH, but as the default
5710                          # location of the library.
5711     export_dynamic_flag_spec='${wl}-E'
5712     ;;
5713
5714   irix5* | irix6* | nonstopux*)
5715     if test "$GCC" = yes; then
5716       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'
5717       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5718     else
5719       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'
5720       hardcode_libdir_flag_spec='-rpath $libdir'
5721     fi
5722     hardcode_libdir_separator=:
5723     link_all_deplibs=yes
5724     ;;
5725
5726   netbsd*)
5727     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5728       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5729     else
5730       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5731     fi
5732     hardcode_libdir_flag_spec='-R$libdir'
5733     hardcode_direct=yes
5734     hardcode_shlibpath_var=no
5735     ;;
5736
5737   newsos6)
5738     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5739     hardcode_direct=yes
5740     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5741     hardcode_libdir_separator=:
5742     hardcode_shlibpath_var=no
5743     ;;
5744
5745   openbsd*)
5746     hardcode_direct=yes
5747     hardcode_shlibpath_var=no
5748     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5749       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5750       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5751       export_dynamic_flag_spec='${wl}-E'
5752     else
5753       case "$host_os" in
5754       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5755         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5756         hardcode_libdir_flag_spec='-R$libdir'
5757         ;;
5758       *)
5759         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5760         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5761         ;;
5762       esac
5763     fi
5764     ;;
5765
5766   openedition*)
5767     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5768         cp \$linknames \$output_objdir && linknames=''"
5769     export_dynamic_flag_spec="-Wl,DLL"
5770     ;;
5771
5772   os2*)
5773     hardcode_libdir_flag_spec='-L$libdir'
5774     hardcode_minus_L=yes
5775     allow_undefined_flag=unsupported
5776     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'
5777     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5778     ;;
5779
5780   osf3*)
5781     if test "$GCC" = yes; then
5782       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5783       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'
5784     else
5785       allow_undefined_flag=' -expect_unresolved \*'
5786       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'
5787     fi
5788     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5789     hardcode_libdir_separator=:
5790     ;;
5791
5792   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5793     if test "$GCC" = yes; then
5794       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5795       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'
5796       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5797     else
5798       allow_undefined_flag=' -expect_unresolved \*'
5799       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'
5800       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5801       $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'
5802
5803       #Both c and cxx compiler support -rpath directly
5804       hardcode_libdir_flag_spec='-rpath $libdir'
5805     fi
5806     hardcode_libdir_separator=:
5807     ;;
5808
5809   sco3.2v5*)
5810     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5811     hardcode_shlibpath_var=no
5812     runpath_var=LD_RUN_PATH
5813     hardcode_runpath_var=yes
5814     export_dynamic_flag_spec='${wl}-Bexport'
5815     ;;
5816
5817   solaris*)
5818     # gcc --version < 3.0 without binutils cannot create self contained
5819     # shared libraries reliably, requiring libgcc.a to resolve some of
5820     # the object symbols generated in some cases.  Libraries that use
5821     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5822     # a copy of libgcc.a into every shared library to guarantee resolving
5823     # such symbols causes other problems:  According to Tim Van Holder
5824     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5825     # (to the application) exception stack for one thing.
5826     no_undefined_flag=' -z defs'
5827     if test "$GCC" = yes; then
5828       case `$CC --version 2>/dev/null` in
5829       [12].*)
5830         cat <<EOF 1>&2
5831
5832 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5833 *** create self contained shared libraries on Solaris systems, without
5834 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5835 *** -no-undefined support, which will at least allow you to build shared
5836 *** libraries.  However, you may find that when you link such libraries
5837 *** into an application without using GCC, you have to manually add
5838 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5839 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5840 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5841
5842 EOF
5843         no_undefined_flag=
5844         ;;
5845       esac
5846     fi
5847     # $CC -shared without GNU ld will not create a library from C++
5848     # object files and a static libstdc++, better avoid it by now
5849     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5850     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5851                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_shlibpath_var=no
5854     case $host_os in
5855     solaris2.[0-5] | solaris2.[0-5].*) ;;
5856     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5857       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5858     esac
5859     link_all_deplibs=yes
5860     ;;
5861
5862   sunos4*)
5863     if test "x$host_vendor" = xsequent; then
5864       # Use $CC to link under sequent, because it throws in some extra .o
5865       # files that make .init and .fini sections work.
5866       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5867     else
5868       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5869     fi
5870     hardcode_libdir_flag_spec='-L$libdir'
5871     hardcode_direct=yes
5872     hardcode_minus_L=yes
5873     hardcode_shlibpath_var=no
5874     ;;
5875
5876   sysv4)
5877     case $host_vendor in
5878       sni)
5879         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5880         hardcode_direct=yes # is this really true???
5881         ;;
5882       siemens)
5883         ## LD is ld it makes a PLAMLIB
5884         ## CC just makes a GrossModule.
5885         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5886         reload_cmds='$CC -r -o $output$reload_objs'
5887         hardcode_direct=no
5888         ;;
5889       motorola)
5890         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5891         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5892         ;;
5893     esac
5894     runpath_var='LD_RUN_PATH'
5895     hardcode_shlibpath_var=no
5896     ;;
5897
5898   sysv4.3*)
5899     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5900     hardcode_shlibpath_var=no
5901     export_dynamic_flag_spec='-Bexport'
5902     ;;
5903
5904   sysv5*)
5905     no_undefined_flag=' -z text'
5906     # $CC -shared without GNU ld will not create a library from C++
5907     # object files and a static libstdc++, better avoid it by now
5908     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5909     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5910                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5911     hardcode_libdir_flag_spec=
5912     hardcode_shlibpath_var=no
5913     runpath_var='LD_RUN_PATH'
5914     ;;
5915
5916   uts4*)
5917     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     hardcode_libdir_flag_spec='-L$libdir'
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   dgux*)
5923     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5924     hardcode_libdir_flag_spec='-L$libdir'
5925     hardcode_shlibpath_var=no
5926     ;;
5927
5928   sysv4*MP*)
5929     if test -d /usr/nec; then
5930       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931       hardcode_shlibpath_var=no
5932       runpath_var=LD_RUN_PATH
5933       hardcode_runpath_var=yes
5934       ld_shlibs=yes
5935     fi
5936     ;;
5937
5938   sysv4.2uw2*)
5939     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5940     hardcode_direct=yes
5941     hardcode_minus_L=no
5942     hardcode_shlibpath_var=no
5943     hardcode_runpath_var=yes
5944     runpath_var=LD_RUN_PATH
5945     ;;
5946
5947   sysv5uw7* | unixware7*)
5948     no_undefined_flag='${wl}-z ${wl}text'
5949     if test "$GCC" = yes; then
5950       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5951     else
5952       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5953     fi
5954     runpath_var='LD_RUN_PATH'
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   *)
5959     ld_shlibs=no
5960     ;;
5961   esac
5962 fi
5963 echo "$ac_t""$ld_shlibs" 1>&6
5964 test "$ld_shlibs" = no && can_build_shared=no
5965
5966 # Check hardcoding attributes.
5967 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5968 echo "configure:5969: checking how to hardcode library paths into programs" >&5
5969 hardcode_action=
5970 if test -n "$hardcode_libdir_flag_spec" || \
5971    test -n "$runpath_var"; then
5972
5973   # We can hardcode non-existant directories.
5974   if test "$hardcode_direct" != no &&
5975      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5976      # have to relink, otherwise we might link with an installed library
5977      # when we should be linking with a yet-to-be-installed one
5978      ## test "$hardcode_shlibpath_var" != no &&
5979      test "$hardcode_minus_L" != no; then
5980     # Linking always hardcodes the temporary library directory.
5981     hardcode_action=relink
5982   else
5983     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5984     hardcode_action=immediate
5985   fi
5986 else
5987   # We cannot hardcode anything, or else we can only hardcode existing
5988   # directories.
5989   hardcode_action=unsupported
5990 fi
5991 echo "$ac_t""$hardcode_action" 1>&6
5992
5993 striplib=
5994 old_striplib=
5995 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5996 echo "configure:5997: checking whether stripping libraries is possible" >&5
5997 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5998   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5999   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6000   echo "$ac_t""yes" 1>&6
6001 else
6002   echo "$ac_t""no" 1>&6
6003 fi
6004
6005 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6006 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6007
6008 # PORTME Fill in your ld.so characteristics
6009 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6010 echo "configure:6011: checking dynamic linker characteristics" >&5
6011 library_names_spec=
6012 libname_spec='lib$name'
6013 soname_spec=
6014 postinstall_cmds=
6015 postuninstall_cmds=
6016 finish_cmds=
6017 finish_eval=
6018 shlibpath_var=
6019 shlibpath_overrides_runpath=unknown
6020 version_type=none
6021 dynamic_linker="$host_os ld.so"
6022 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6023 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6024
6025 case $host_os in
6026 aix3*)
6027   version_type=linux
6028   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6029   shlibpath_var=LIBPATH
6030
6031   # AIX has no versioning support, so we append a major version to the name.
6032   soname_spec='${libname}${release}.so$major'
6033   ;;
6034
6035 aix4* | aix5*)
6036   version_type=linux
6037   need_lib_prefix=no
6038   need_version=no
6039   hardcode_into_libs=yes
6040   if test "$host_cpu" = ia64; then
6041     # AIX 5 supports IA64
6042     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6043     shlibpath_var=LD_LIBRARY_PATH
6044   else
6045     # With GCC up to 2.95.x, collect2 would create an import file
6046     # for dependence libraries.  The import file would start with
6047     # the line `#! .'.  This would cause the generated library to
6048     # depend on `.', always an invalid library.  This was fixed in
6049     # development snapshots of GCC prior to 3.0.
6050     case $host_os in
6051       aix4 | aix4.[01] | aix4.[01].*)
6052         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6053              echo ' yes '
6054              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6055           :
6056         else
6057           can_build_shared=no
6058         fi
6059         ;;
6060     esac
6061     # AIX (on Power*) has no versioning support, so currently we can
6062     # not hardcode correct soname into executable. Probably we can
6063     # add versioning support to collect2, so additional links can
6064     # be useful in future.
6065     if test "$aix_use_runtimelinking" = yes; then
6066       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6067       # instead of lib<name>.a to let people know that these are not
6068       # typical AIX shared libraries.
6069       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6070     else
6071       # We preserve .a as extension for shared libraries through AIX4.2
6072       # and later when we are not doing run time linking.
6073       library_names_spec='${libname}${release}.a $libname.a'
6074       soname_spec='${libname}${release}.so$major'
6075     fi
6076     shlibpath_var=LIBPATH
6077   fi
6078   hardcode_into_libs=yes
6079   ;;
6080
6081 amigaos*)
6082   library_names_spec='$libname.ixlibrary $libname.a'
6083   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6084   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'
6085   ;;
6086
6087 beos*)
6088   library_names_spec='${libname}.so'
6089   dynamic_linker="$host_os ld.so"
6090   shlibpath_var=LIBRARY_PATH
6091   ;;
6092
6093 bsdi4*)
6094   version_type=linux
6095   need_version=no
6096   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6097   soname_spec='${libname}${release}.so$major'
6098   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6099   shlibpath_var=LD_LIBRARY_PATH
6100   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6101   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6102   export_dynamic_flag_spec=-rdynamic
6103   # the default ld.so.conf also contains /usr/contrib/lib and
6104   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6105   # libtool to hard-code these into programs
6106   ;;
6107
6108 cygwin* | mingw* | pw32*)
6109   version_type=windows
6110   need_version=no
6111   need_lib_prefix=no
6112   case $GCC,$host_os in
6113   yes,cygwin*)
6114     library_names_spec='$libname.dll.a'
6115     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6116     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6117       dldir=$destdir/`dirname \$dlpath`~
6118       test -d \$dldir || mkdir -p \$dldir~
6119       $install_prog .libs/$dlname \$dldir/$dlname'
6120     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6121       dlpath=$dir/\$dldll~
6122        $rm \$dlpath'
6123     ;;
6124   yes,mingw*)
6125     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6126     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6127     ;;
6128   yes,pw32*)
6129     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6130     ;;
6131   *)
6132     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6133     ;;
6134   esac
6135   dynamic_linker='Win32 ld.exe'
6136   # FIXME: first we should search . and the directory the executable is in
6137   shlibpath_var=PATH
6138   ;;
6139
6140 darwin* | rhapsody*)
6141   dynamic_linker="$host_os dyld"
6142   version_type=darwin
6143   need_lib_prefix=no
6144   need_version=no
6145   # FIXME: Relying on posixy $() will cause problems for
6146   #        cross-compilation, but unfortunately the echo tests do not
6147   #        yet detect zsh echo's removal of \ escapes.
6148   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)'
6149   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6150   shlibpath_overrides_runpath=yes
6151   shlibpath_var=DYLD_LIBRARY_PATH
6152   ;;
6153
6154 freebsd1*)
6155   dynamic_linker=no
6156   ;;
6157
6158 freebsd*)
6159   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6160   version_type=freebsd-$objformat
6161   case $version_type in
6162     freebsd-elf*)
6163       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6164       need_version=no
6165       need_lib_prefix=no
6166       ;;
6167     freebsd-*)
6168       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6169       need_version=yes
6170       ;;
6171   esac
6172   shlibpath_var=LD_LIBRARY_PATH
6173   case $host_os in
6174   freebsd2*)
6175     shlibpath_overrides_runpath=yes
6176     ;;
6177   *)
6178     shlibpath_overrides_runpath=no
6179     hardcode_into_libs=yes
6180     ;;
6181   esac
6182   ;;
6183
6184 gnu*)
6185   version_type=linux
6186   need_lib_prefix=no
6187   need_version=no
6188   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6189   soname_spec='${libname}${release}.so$major'
6190   shlibpath_var=LD_LIBRARY_PATH
6191   hardcode_into_libs=yes
6192   ;;
6193
6194 hpux9* | hpux10* | hpux11*)
6195   # Give a soname corresponding to the major version so that dld.sl refuses to
6196   # link against other versions.
6197   dynamic_linker="$host_os dld.sl"
6198   version_type=sunos
6199   need_lib_prefix=no
6200   need_version=no
6201   shlibpath_var=SHLIB_PATH
6202   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6203   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6204   soname_spec='${libname}${release}.sl$major'
6205   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6206   postinstall_cmds='chmod 555 $lib'
6207   ;;
6208
6209 irix5* | irix6* | nonstopux*)
6210   case $host_os in
6211     nonstopux*) version_type=nonstopux ;;
6212     *)          version_type=irix ;;
6213   esac
6214   need_lib_prefix=no
6215   need_version=no
6216   soname_spec='${libname}${release}.so$major'
6217   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6218   case $host_os in
6219   irix5* | nonstopux*)
6220     libsuff= shlibsuff=
6221     ;;
6222   *)
6223     case $LD in # libtool.m4 will add one of these switches to LD
6224     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6225     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6226     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6227     *) libsuff= shlibsuff= libmagic=never-match;;
6228     esac
6229     ;;
6230   esac
6231   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6232   shlibpath_overrides_runpath=no
6233   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6234   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6235   ;;
6236
6237 # No shared lib support for Linux oldld, aout, or coff.
6238 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6239   dynamic_linker=no
6240   ;;
6241
6242 # This must be Linux ELF.
6243 linux-gnu*)
6244   version_type=linux
6245   need_lib_prefix=no
6246   need_version=no
6247   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6248   soname_spec='${libname}${release}.so$major'
6249   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6250   shlibpath_var=LD_LIBRARY_PATH
6251   shlibpath_overrides_runpath=no
6252   # This implies no fast_install, which is unacceptable.
6253   # Some rework will be needed to allow for fast_install
6254   # before this can be enabled.
6255   hardcode_into_libs=yes
6256
6257   # We used to test for /lib/ld.so.1 and disable shared libraries on
6258   # powerpc, because MkLinux only supported shared libraries with the
6259   # GNU dynamic linker.  Since this was broken with cross compilers,
6260   # most powerpc-linux boxes support dynamic linking these days and
6261   # people can always --disable-shared, the test was removed, and we
6262   # assume the GNU/Linux dynamic linker is in use.
6263   dynamic_linker='GNU/Linux ld.so'
6264   ;;
6265
6266 netbsd*)
6267   version_type=sunos
6268   need_lib_prefix=no
6269   need_version=no
6270   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6271     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6272     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6273     dynamic_linker='NetBSD (a.out) ld.so'
6274   else
6275     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6276     soname_spec='${libname}${release}.so$major'
6277     dynamic_linker='NetBSD ld.elf_so'
6278   fi
6279   shlibpath_var=LD_LIBRARY_PATH
6280   shlibpath_overrides_runpath=yes
6281   hardcode_into_libs=yes
6282   ;;
6283
6284 newsos6)
6285   version_type=linux
6286   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6287   shlibpath_var=LD_LIBRARY_PATH
6288   shlibpath_overrides_runpath=yes
6289   ;;
6290
6291 openbsd*)
6292   version_type=sunos
6293   need_lib_prefix=no
6294   need_version=no
6295   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6296     case "$host_os" in
6297     openbsd2.[89] | openbsd2.[89].*)
6298       shlibpath_overrides_runpath=no
6299       ;;
6300     *)
6301       shlibpath_overrides_runpath=yes
6302       ;;
6303     esac
6304   else
6305     shlibpath_overrides_runpath=yes
6306   fi
6307   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6308   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6309   shlibpath_var=LD_LIBRARY_PATH
6310   ;;
6311
6312 openedition*)
6313   need_lib_prefix=no
6314   need_version=no
6315   shlibpath_overrides_runpath=yes
6316   shlibpath_var=LIBPATH
6317   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6318   # the library's exports are in libname.x; this is the file that must
6319   # actually be linked with to use a DLL.
6320   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6321   ;;
6322
6323 os2*)
6324   libname_spec='$name'
6325   need_lib_prefix=no
6326   library_names_spec='$libname.dll $libname.a'
6327   dynamic_linker='OS/2 ld.exe'
6328   shlibpath_var=LIBPATH
6329   ;;
6330
6331 osf3* | osf4* | osf5*)
6332   version_type=osf
6333   need_version=no
6334   soname_spec='${libname}${release}.so$major'
6335   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6336   shlibpath_var=LD_LIBRARY_PATH
6337   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6338   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6339   hardcode_into_libs=yes
6340   ;;
6341
6342 sco3.2v5*)
6343   version_type=osf
6344   soname_spec='${libname}${release}.so$major'
6345   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6346   shlibpath_var=LD_LIBRARY_PATH
6347   ;;
6348
6349 solaris*)
6350   version_type=linux
6351   need_lib_prefix=no
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6354   soname_spec='${libname}${release}.so$major'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   shlibpath_overrides_runpath=yes
6357   hardcode_into_libs=yes
6358   # ldd complains unless libraries are executable
6359   postinstall_cmds='chmod +x $lib'
6360   ;;
6361
6362 sunos4*)
6363   version_type=sunos
6364   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6365   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6366   shlibpath_var=LD_LIBRARY_PATH
6367   shlibpath_overrides_runpath=yes
6368   if test "$with_gnu_ld" = yes; then
6369     need_lib_prefix=no
6370   fi
6371   need_version=yes
6372   ;;
6373
6374 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6375   version_type=linux
6376   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6377   soname_spec='${libname}${release}.so$major'
6378   shlibpath_var=LD_LIBRARY_PATH
6379   case $host_vendor in
6380     sni)
6381       shlibpath_overrides_runpath=no
6382       need_lib_prefix=no
6383       export_dynamic_flag_spec='${wl}-Blargedynsym'
6384       runpath_var=LD_RUN_PATH
6385       ;;
6386     siemens)
6387       need_lib_prefix=no
6388       ;;
6389     motorola)
6390       need_lib_prefix=no
6391       need_version=no
6392       shlibpath_overrides_runpath=no
6393       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6394       ;;
6395   esac
6396   ;;
6397
6398 uts4*)
6399   version_type=linux
6400   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6401   soname_spec='${libname}${release}.so$major'
6402   shlibpath_var=LD_LIBRARY_PATH
6403   ;;
6404
6405 dgux*)
6406   version_type=linux
6407   need_lib_prefix=no
6408   need_version=no
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6410   soname_spec='${libname}${release}.so$major'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   ;;
6413
6414 sysv4*MP*)
6415   if test -d /usr/nec ;then
6416     version_type=linux
6417     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6418     soname_spec='$libname.so.$major'
6419     shlibpath_var=LD_LIBRARY_PATH
6420   fi
6421   ;;
6422
6423 *)
6424   dynamic_linker=no
6425   ;;
6426 esac
6427 echo "$ac_t""$dynamic_linker" 1>&6
6428 test "$dynamic_linker" = no && can_build_shared=no
6429
6430 # Report the final consequences.
6431 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6432 echo "configure:6433: checking if libtool supports shared libraries" >&5
6433 echo "$ac_t""$can_build_shared" 1>&6
6434
6435 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6436 echo "configure:6437: checking whether to build shared libraries" >&5
6437 test "$can_build_shared" = "no" && enable_shared=no
6438
6439 # On AIX, shared libraries and static libraries use the same namespace, and
6440 # are all built from PIC.
6441 case "$host_os" in
6442 aix3*)
6443   test "$enable_shared" = yes && enable_static=no
6444   if test -n "$RANLIB"; then
6445     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6446     postinstall_cmds='$RANLIB $lib'
6447   fi
6448   ;;
6449
6450 aix4*)
6451   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6452     test "$enable_shared" = yes && enable_static=no
6453   fi
6454   ;;
6455 esac
6456 echo "$ac_t""$enable_shared" 1>&6
6457
6458 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6459 echo "configure:6460: checking whether to build static libraries" >&5
6460 # Make sure either enable_shared or enable_static is yes.
6461 test "$enable_shared" = yes || enable_static=yes
6462 echo "$ac_t""$enable_static" 1>&6
6463
6464 if test "$hardcode_action" = relink; then
6465   # Fast installation is not supported
6466   enable_fast_install=no
6467 elif test "$shlibpath_overrides_runpath" = yes ||
6468      test "$enable_shared" = no; then
6469   # Fast installation is not necessary
6470   enable_fast_install=needless
6471 fi
6472
6473 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6474 if test "$GCC" = yes; then
6475   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6476 fi
6477
6478 if test "x$enable_dlopen" != xyes; then
6479   enable_dlopen=unknown
6480   enable_dlopen_self=unknown
6481   enable_dlopen_self_static=unknown
6482 else
6483   lt_cv_dlopen=no
6484   lt_cv_dlopen_libs=
6485
6486   case $host_os in
6487   beos*)
6488     lt_cv_dlopen="load_add_on"
6489     lt_cv_dlopen_libs=
6490     lt_cv_dlopen_self=yes
6491     ;;
6492
6493   cygwin* | mingw* | pw32*)
6494     lt_cv_dlopen="LoadLibrary"
6495     lt_cv_dlopen_libs=
6496    ;;
6497
6498   *)
6499     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6500 echo "configure:6501: checking for dllload" >&5
6501 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6502   echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504   cat > conftest.$ac_ext <<EOF
6505 #line 6506 "configure"
6506 #include "confdefs.h"
6507 /* System header to define __stub macros and hopefully few prototypes,
6508     which can conflict with char dllload(); below.  */
6509 #include <assert.h>
6510 /* Override any gcc2 internal prototype to avoid an error.  */
6511 /* We use char because int might match the return type of a gcc2
6512     builtin and then its argument prototype would still apply.  */
6513 char dllload();
6514 char (*f)();
6515
6516 int main() {
6517
6518 /* The GNU C library defines this for functions which it implements
6519     to always fail with ENOSYS.  Some functions are actually named
6520     something starting with __ and the normal name is an alias.  */
6521 #if defined (__stub_dllload) || defined (__stub___dllload)
6522 choke me
6523 #else
6524 f = dllload;
6525 #endif
6526
6527 ; return 0; }
6528 EOF
6529 if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6530   rm -rf conftest*
6531   eval "ac_cv_func_dllload=yes"
6532 else
6533   echo "configure: failed program was:" >&5
6534   cat conftest.$ac_ext >&5
6535   rm -rf conftest*
6536   eval "ac_cv_func_dllload=no"
6537 fi
6538 rm -f conftest*
6539 fi
6540
6541 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6542   echo "$ac_t""yes" 1>&6
6543   lt_cv_dlopen="dllload"
6544 else
6545   echo "$ac_t""no" 1>&6
6546 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6547 echo "configure:6548: checking for shl_load" >&5
6548 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6549   echo $ac_n "(cached) $ac_c" 1>&6
6550 else
6551   cat > conftest.$ac_ext <<EOF
6552 #line 6553 "configure"
6553 #include "confdefs.h"
6554 /* System header to define __stub macros and hopefully few prototypes,
6555     which can conflict with char shl_load(); below.  */
6556 #include <assert.h>
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char shl_load();
6561 char (*f)();
6562
6563 int main() {
6564
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6569 choke me
6570 #else
6571 f = shl_load;
6572 #endif
6573
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   eval "ac_cv_func_shl_load=yes"
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_func_shl_load=no"
6584 fi
6585 rm -f conftest*
6586 fi
6587
6588 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6589   echo "$ac_t""yes" 1>&6
6590   lt_cv_dlopen="shl_load"
6591 else
6592   echo "$ac_t""no" 1>&6
6593 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6594 echo "configure:6595: checking for shl_load in -ldld" >&5
6595 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   ac_save_LIBS="$LIBS"
6600 LIBS="-ldld  $LIBS"
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char shl_load();
6608
6609 int main() {
6610 shl_load()
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=no"
6621 fi
6622 rm -f conftest*
6623 LIBS="$ac_save_LIBS"
6624
6625 fi
6626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6632 echo "configure:6633: checking for dlopen" >&5
6633 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* System header to define __stub macros and hopefully few prototypes,
6640     which can conflict with char dlopen(); below.  */
6641 #include <assert.h>
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char dlopen();
6646 char (*f)();
6647
6648 int main() {
6649
6650 /* The GNU C library defines this for functions which it implements
6651     to always fail with ENOSYS.  Some functions are actually named
6652     something starting with __ and the normal name is an alias.  */
6653 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6654 choke me
6655 #else
6656 f = dlopen;
6657 #endif
6658
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_func_dlopen=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_func_dlopen=no"
6669 fi
6670 rm -f conftest*
6671 fi
6672
6673 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6674   echo "$ac_t""yes" 1>&6
6675   lt_cv_dlopen="dlopen"
6676 else
6677   echo "$ac_t""no" 1>&6
6678 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6679 echo "configure:6680: checking for dlopen in -ldl" >&5
6680 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   ac_save_LIBS="$LIBS"
6685 LIBS="-ldl  $LIBS"
6686 cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 /* We use char because int might match the return type of a gcc2
6691     builtin and then its argument prototype would still apply.  */
6692 char dlopen();
6693
6694 int main() {
6695 dlopen()
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=no"
6706 fi
6707 rm -f conftest*
6708 LIBS="$ac_save_LIBS"
6709
6710 fi
6711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6717 echo "configure:6718: checking for dlopen in -lsvld" >&5
6718 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-lsvld  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char dlopen();
6731
6732 int main() {
6733 dlopen()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6752 else
6753   echo "$ac_t""no" 1>&6
6754 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6755 echo "configure:6756: checking for dld_link in -ldld" >&5
6756 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   ac_save_LIBS="$LIBS"
6761 LIBS="-ldld  $LIBS"
6762 cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char dld_link();
6769
6770 int main() {
6771 dld_link()
6772 ; return 0; }
6773 EOF
6774 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=yes"
6777 else
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=no"
6782 fi
6783 rm -f conftest*
6784 LIBS="$ac_save_LIBS"
6785
6786 fi
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6790 else
6791   echo "$ac_t""no" 1>&6
6792 fi
6793
6794               
6795 fi
6796
6797             
6798 fi
6799
6800           
6801 fi
6802
6803         
6804 fi
6805
6806       
6807 fi
6808
6809     
6810 fi
6811
6812     ;;
6813   esac
6814
6815   if test "x$lt_cv_dlopen" != xno; then
6816     enable_dlopen=yes
6817   else
6818     enable_dlopen=no
6819   fi
6820
6821   case $lt_cv_dlopen in
6822   dlopen)
6823     save_CPPFLAGS="$CPPFLAGS"
6824         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6825
6826     save_LDFLAGS="$LDFLAGS"
6827     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6828
6829     save_LIBS="$LIBS"
6830     LIBS="$lt_cv_dlopen_libs $LIBS"
6831
6832     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6833 echo "configure:6834: checking whether a program can dlopen itself" >&5
6834 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6835   echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837           if test "$cross_compiling" = yes; then :
6838   lt_cv_dlopen_self=cross
6839 else
6840     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6841   lt_status=$lt_dlunknown
6842   cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845
6846 #if HAVE_DLFCN_H
6847 #include <dlfcn.h>
6848 #endif
6849
6850 #include <stdio.h>
6851
6852 #ifdef RTLD_GLOBAL
6853 #  define LT_DLGLOBAL           RTLD_GLOBAL
6854 #else
6855 #  ifdef DL_GLOBAL
6856 #    define LT_DLGLOBAL         DL_GLOBAL
6857 #  else
6858 #    define LT_DLGLOBAL         0
6859 #  endif
6860 #endif
6861
6862 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6863    find out it does not work in some platform. */
6864 #ifndef LT_DLLAZY_OR_NOW
6865 #  ifdef RTLD_LAZY
6866 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6867 #  else
6868 #    ifdef DL_LAZY
6869 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6870 #    else
6871 #      ifdef RTLD_NOW
6872 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6873 #      else
6874 #        ifdef DL_NOW
6875 #          define LT_DLLAZY_OR_NOW      DL_NOW
6876 #        else
6877 #          define LT_DLLAZY_OR_NOW      0
6878 #        endif
6879 #      endif
6880 #    endif
6881 #  endif
6882 #endif
6883
6884 #ifdef __cplusplus
6885 extern "C" void exit (int);
6886 #endif
6887
6888 void fnord() { int i=42;}
6889 int main ()
6890 {
6891   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6892   int status = $lt_dlunknown;
6893
6894   if (self)
6895     {
6896       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6897       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6898       /* dlclose (self); */
6899     }
6900
6901     exit (status);
6902 }
6903 EOF
6904   if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6905     (./conftest; exit; ) 2>/dev/null
6906     lt_status=$?
6907     case x$lt_status in
6908       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6909       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6910       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6911     esac
6912   else :
6913     # compilation failed
6914     lt_cv_dlopen_self=no
6915   fi
6916 fi
6917 rm -fr conftest*
6918
6919     
6920 fi
6921
6922 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6923
6924     if test "x$lt_cv_dlopen_self" = xyes; then
6925       LDFLAGS="$LDFLAGS $link_static_flag"
6926       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6927 echo "configure:6928: checking whether a statically linked program can dlopen itself" >&5
6928 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931           if test "$cross_compiling" = yes; then :
6932   lt_cv_dlopen_self_static=cross
6933 else
6934     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6935   lt_status=$lt_dlunknown
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939
6940 #if HAVE_DLFCN_H
6941 #include <dlfcn.h>
6942 #endif
6943
6944 #include <stdio.h>
6945
6946 #ifdef RTLD_GLOBAL
6947 #  define LT_DLGLOBAL           RTLD_GLOBAL
6948 #else
6949 #  ifdef DL_GLOBAL
6950 #    define LT_DLGLOBAL         DL_GLOBAL
6951 #  else
6952 #    define LT_DLGLOBAL         0
6953 #  endif
6954 #endif
6955
6956 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6957    find out it does not work in some platform. */
6958 #ifndef LT_DLLAZY_OR_NOW
6959 #  ifdef RTLD_LAZY
6960 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6961 #  else
6962 #    ifdef DL_LAZY
6963 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6964 #    else
6965 #      ifdef RTLD_NOW
6966 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6967 #      else
6968 #        ifdef DL_NOW
6969 #          define LT_DLLAZY_OR_NOW      DL_NOW
6970 #        else
6971 #          define LT_DLLAZY_OR_NOW      0
6972 #        endif
6973 #      endif
6974 #    endif
6975 #  endif
6976 #endif
6977
6978 #ifdef __cplusplus
6979 extern "C" void exit (int);
6980 #endif
6981
6982 void fnord() { int i=42;}
6983 int main ()
6984 {
6985   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6986   int status = $lt_dlunknown;
6987
6988   if (self)
6989     {
6990       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6991       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6992       /* dlclose (self); */
6993     }
6994
6995     exit (status);
6996 }
6997 EOF
6998   if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6999     (./conftest; exit; ) 2>/dev/null
7000     lt_status=$?
7001     case x$lt_status in
7002       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7003       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7004       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7005     esac
7006   else :
7007     # compilation failed
7008     lt_cv_dlopen_self_static=no
7009   fi
7010 fi
7011 rm -fr conftest*
7012
7013       
7014 fi
7015
7016 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7017     fi
7018
7019     CPPFLAGS="$save_CPPFLAGS"
7020     LDFLAGS="$save_LDFLAGS"
7021     LIBS="$save_LIBS"
7022     ;;
7023   esac
7024
7025   case $lt_cv_dlopen_self in
7026   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7027   *) enable_dlopen_self=unknown ;;
7028   esac
7029
7030   case $lt_cv_dlopen_self_static in
7031   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7032   *) enable_dlopen_self_static=unknown ;;
7033   esac
7034 fi
7035
7036
7037 if test "$enable_shared" = yes && test "$GCC" = yes; then
7038   case $archive_cmds in
7039   *'~'*)
7040     # FIXME: we may have to deal with multi-command sequences.
7041     ;;
7042   '$CC '*)
7043     # Test whether the compiler implicitly links with -lc since on some
7044     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7045     # to ld, don't add -lc before -lgcc.
7046     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7047 echo "configure:7048: checking whether -lc should be explicitly linked in" >&5
7048     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051   $rm conftest*
7052     echo 'static int dummy;' > conftest.$ac_ext
7053
7054     if { (eval echo configure:7055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7055       soname=conftest
7056       lib=conftest
7057       libobjs=conftest.$ac_objext
7058       deplibs=
7059       wl=$lt_cv_prog_cc_wl
7060       compiler_flags=-v
7061       linker_flags=-v
7062       verstring=
7063       output_objdir=.
7064       libname=conftest
7065       save_allow_undefined_flag=$allow_undefined_flag
7066       allow_undefined_flag=
7067       if { (eval echo configure:7068: \"$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; }
7068       then
7069         lt_cv_archive_cmds_need_lc=no
7070       else
7071         lt_cv_archive_cmds_need_lc=yes
7072       fi
7073       allow_undefined_flag=$save_allow_undefined_flag
7074     else
7075       cat conftest.err 1>&5
7076     fi
7077 fi
7078
7079     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7080     ;;
7081   esac
7082 fi
7083 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7084
7085 # The second clause should only fire when bootstrapping the
7086 # libtool distribution, otherwise you forgot to ship ltmain.sh
7087 # with your package, and you will get complaints that there are
7088 # no rules to generate ltmain.sh.
7089 if test -f "$ltmain"; then
7090   :
7091 else
7092   # If there is no Makefile yet, we rely on a make rule to execute
7093   # `config.status --recheck' to rerun these tests and create the
7094   # libtool script then.
7095   test -f Makefile && make "$ltmain"
7096 fi
7097
7098 if test -f "$ltmain"; then
7099   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7100   $rm -f "${ofile}T"
7101
7102   echo creating $ofile
7103
7104   # Now quote all the things that may contain metacharacters while being
7105   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7106   # variables and quote the copies for generation of the libtool script.
7107   for var in echo old_CC old_CFLAGS SED \
7108     AR AR_FLAGS CC LD LN_S NM SHELL \
7109     reload_flag reload_cmds wl \
7110     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7111     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7112     library_names_spec soname_spec \
7113     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7114     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7115     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7116     old_striplib striplib file_magic_cmd export_symbols_cmds \
7117     deplibs_check_method allow_undefined_flag no_undefined_flag \
7118     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7119     global_symbol_to_c_name_address \
7120     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7121     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7122     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7123
7124     case $var in
7125     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7126     old_postinstall_cmds | old_postuninstall_cmds | \
7127     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7128     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7129     postinstall_cmds | postuninstall_cmds | \
7130     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7131       # Double-quote double-evaled strings.
7132       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7133       ;;
7134     *)
7135       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7136       ;;
7137     esac
7138   done
7139
7140   cat <<__EOF__ > "${ofile}T"
7141 #! $SHELL
7142
7143 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7144 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7145 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7146 #
7147 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7148 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7149 #
7150 # This program is free software; you can redistribute it and/or modify
7151 # it under the terms of the GNU General Public License as published by
7152 # the Free Software Foundation; either version 2 of the License, or
7153 # (at your option) any later version.
7154 #
7155 # This program is distributed in the hope that it will be useful, but
7156 # WITHOUT ANY WARRANTY; without even the implied warranty of
7157 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7158 # General Public License for more details.
7159 #
7160 # You should have received a copy of the GNU General Public License
7161 # along with this program; if not, write to the Free Software
7162 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7163 #
7164 # As a special exception to the GNU General Public License, if you
7165 # distribute this file as part of a program that contains a
7166 # configuration script generated by Autoconf, you may include it under
7167 # the same distribution terms that you use for the rest of that program.
7168
7169 # A sed that does not truncate output.
7170 SED=$lt_SED
7171
7172 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7173 Xsed="${SED} -e s/^X//"
7174
7175 # The HP-UX ksh and POSIX shell print the target directory to stdout
7176 # if CDPATH is set.
7177 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7178
7179 # ### BEGIN LIBTOOL CONFIG
7180
7181 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7182
7183 # Shell to use when invoking shell scripts.
7184 SHELL=$lt_SHELL
7185
7186 # Whether or not to build shared libraries.
7187 build_libtool_libs=$enable_shared
7188
7189 # Whether or not to build static libraries.
7190 build_old_libs=$enable_static
7191
7192 # Whether or not to add -lc for building shared libraries.
7193 build_libtool_need_lc=$need_lc
7194
7195 # Whether or not to optimize for fast installation.
7196 fast_install=$enable_fast_install
7197
7198 # The host system.
7199 host_alias=$host_alias
7200 host=$host
7201
7202 # An echo program that does not interpret backslashes.
7203 echo=$lt_echo
7204
7205 # The archiver.
7206 AR=$lt_AR
7207 AR_FLAGS=$lt_AR_FLAGS
7208
7209 # The default C compiler.
7210 CC=$lt_CC
7211
7212 # Is the compiler the GNU C compiler?
7213 with_gcc=$GCC
7214
7215 # The linker used to build libraries.
7216 LD=$lt_LD
7217
7218 # Whether we need hard or soft links.
7219 LN_S=$lt_LN_S
7220
7221 # A BSD-compatible nm program.
7222 NM=$lt_NM
7223
7224 # A symbol stripping program
7225 STRIP=$STRIP
7226
7227 # Used to examine libraries when file_magic_cmd begins "file"
7228 MAGIC_CMD=$MAGIC_CMD
7229
7230 # Used on cygwin: DLL creation program.
7231 DLLTOOL="$DLLTOOL"
7232
7233 # Used on cygwin: object dumper.
7234 OBJDUMP="$OBJDUMP"
7235
7236 # Used on cygwin: assembler.
7237 AS="$AS"
7238
7239 # The name of the directory that contains temporary libtool files.
7240 objdir=$objdir
7241
7242 # How to create reloadable object files.
7243 reload_flag=$lt_reload_flag
7244 reload_cmds=$lt_reload_cmds
7245
7246 # How to pass a linker flag through the compiler.
7247 wl=$lt_wl
7248
7249 # Object file suffix (normally "o").
7250 objext="$ac_objext"
7251
7252 # Old archive suffix (normally "a").
7253 libext="$libext"
7254
7255 # Executable file suffix (normally "").
7256 exeext="$exeext"
7257
7258 # Additional compiler flags for building library objects.
7259 pic_flag=$lt_pic_flag
7260 pic_mode=$pic_mode
7261
7262 # Does compiler simultaneously support -c and -o options?
7263 compiler_c_o=$lt_compiler_c_o
7264
7265 # Can we write directly to a .lo ?
7266 compiler_o_lo=$lt_compiler_o_lo
7267
7268 # Must we lock files when doing compilation ?
7269 need_locks=$lt_need_locks
7270
7271 # Do we need the lib prefix for modules?
7272 need_lib_prefix=$need_lib_prefix
7273
7274 # Do we need a version for libraries?
7275 need_version=$need_version
7276
7277 # Whether dlopen is supported.
7278 dlopen_support=$enable_dlopen
7279
7280 # Whether dlopen of programs is supported.
7281 dlopen_self=$enable_dlopen_self
7282
7283 # Whether dlopen of statically linked programs is supported.
7284 dlopen_self_static=$enable_dlopen_self_static
7285
7286 # Compiler flag to prevent dynamic linking.
7287 link_static_flag=$lt_link_static_flag
7288
7289 # Compiler flag to turn off builtin functions.
7290 no_builtin_flag=$lt_no_builtin_flag
7291
7292 # Compiler flag to allow reflexive dlopens.
7293 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7294
7295 # Compiler flag to generate shared objects directly from archives.
7296 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7297
7298 # Compiler flag to generate thread-safe objects.
7299 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7300
7301 # Library versioning type.
7302 version_type=$version_type
7303
7304 # Format of library name prefix.
7305 libname_spec=$lt_libname_spec
7306
7307 # List of archive names.  First name is the real one, the rest are links.
7308 # The last name is the one that the linker finds with -lNAME.
7309 library_names_spec=$lt_library_names_spec
7310
7311 # The coded name of the library, if different from the real name.
7312 soname_spec=$lt_soname_spec
7313
7314 # Commands used to build and install an old-style archive.
7315 RANLIB=$lt_RANLIB
7316 old_archive_cmds=$lt_old_archive_cmds
7317 old_postinstall_cmds=$lt_old_postinstall_cmds
7318 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7319
7320 # Create an old-style archive from a shared archive.
7321 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7322
7323 # Create a temporary old-style archive to link instead of a shared archive.
7324 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7325
7326 # Commands used to build and install a shared archive.
7327 archive_cmds=$lt_archive_cmds
7328 archive_expsym_cmds=$lt_archive_expsym_cmds
7329 postinstall_cmds=$lt_postinstall_cmds
7330 postuninstall_cmds=$lt_postuninstall_cmds
7331
7332 # Commands to strip libraries.
7333 old_striplib=$lt_old_striplib
7334 striplib=$lt_striplib
7335
7336 # Method to check whether dependent libraries are shared objects.
7337 deplibs_check_method=$lt_deplibs_check_method
7338
7339 # Command to use when deplibs_check_method == file_magic.
7340 file_magic_cmd=$lt_file_magic_cmd
7341
7342 # Flag that allows shared libraries with undefined symbols to be built.
7343 allow_undefined_flag=$lt_allow_undefined_flag
7344
7345 # Flag that forces no undefined symbols.
7346 no_undefined_flag=$lt_no_undefined_flag
7347
7348 # Commands used to finish a libtool library installation in a directory.
7349 finish_cmds=$lt_finish_cmds
7350
7351 # Same as above, but a single script fragment to be evaled but not shown.
7352 finish_eval=$lt_finish_eval
7353
7354 # Take the output of nm and produce a listing of raw symbols and C names.
7355 global_symbol_pipe=$lt_global_symbol_pipe
7356
7357 # Transform the output of nm in a proper C declaration
7358 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7359
7360 # Transform the output of nm in a C name address pair
7361 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7362
7363 # This is the shared library runtime path variable.
7364 runpath_var=$runpath_var
7365
7366 # This is the shared library path variable.
7367 shlibpath_var=$shlibpath_var
7368
7369 # Is shlibpath searched before the hard-coded library search path?
7370 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7371
7372 # How to hardcode a shared library path into an executable.
7373 hardcode_action=$hardcode_action
7374
7375 # Whether we should hardcode library paths into libraries.
7376 hardcode_into_libs=$hardcode_into_libs
7377
7378 # Flag to hardcode \$libdir into a binary during linking.
7379 # This must work even if \$libdir does not exist.
7380 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7381
7382 # Whether we need a single -rpath flag with a separated argument.
7383 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7384
7385 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7386 # resulting binary.
7387 hardcode_direct=$hardcode_direct
7388
7389 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7390 # resulting binary.
7391 hardcode_minus_L=$hardcode_minus_L
7392
7393 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7394 # the resulting binary.
7395 hardcode_shlibpath_var=$hardcode_shlibpath_var
7396
7397 # Variables whose values should be saved in libtool wrapper scripts and
7398 # restored at relink time.
7399 variables_saved_for_relink="$variables_saved_for_relink"
7400
7401 # Whether libtool must link a program against all its dependency libraries.
7402 link_all_deplibs=$link_all_deplibs
7403
7404 # Compile-time system search path for libraries
7405 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7406
7407 # Run-time system search path for libraries
7408 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7409
7410 # Fix the shell variable \$srcfile for the compiler.
7411 fix_srcfile_path="$fix_srcfile_path"
7412
7413 # Set to yes if exported symbols are required.
7414 always_export_symbols=$always_export_symbols
7415
7416 # The commands to list exported symbols.
7417 export_symbols_cmds=$lt_export_symbols_cmds
7418
7419 # The commands to extract the exported symbol list from a shared archive.
7420 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7421
7422 # Symbols that should not be listed in the preloaded symbols.
7423 exclude_expsyms=$lt_exclude_expsyms
7424
7425 # Symbols that must always be exported.
7426 include_expsyms=$lt_include_expsyms
7427
7428 # ### END LIBTOOL CONFIG
7429
7430 __EOF__
7431
7432   case $host_os in
7433   aix3*)
7434     cat <<\EOF >> "${ofile}T"
7435
7436 # AIX sometimes has problems with the GCC collect2 program.  For some
7437 # reason, if we set the COLLECT_NAMES environment variable, the problems
7438 # vanish in a puff of smoke.
7439 if test "X${COLLECT_NAMES+set}" != Xset; then
7440   COLLECT_NAMES=
7441   export COLLECT_NAMES
7442 fi
7443 EOF
7444     ;;
7445   esac
7446
7447   case $host_os in
7448   cygwin* | mingw* | pw32* | os2*)
7449     cat <<'EOF' >> "${ofile}T"
7450       # This is a source program that is used to create dlls on Windows
7451       # Don't remove nor modify the starting and closing comments
7452 # /* ltdll.c starts here */
7453 # #define WIN32_LEAN_AND_MEAN
7454 # #include <windows.h>
7455 # #undef WIN32_LEAN_AND_MEAN
7456 # #include <stdio.h>
7457 #
7458 # #ifndef __CYGWIN__
7459 # #  ifdef __CYGWIN32__
7460 # #    define __CYGWIN__ __CYGWIN32__
7461 # #  endif
7462 # #endif
7463 #
7464 # #ifdef __cplusplus
7465 # extern "C" {
7466 # #endif
7467 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7468 # #ifdef __cplusplus
7469 # }
7470 # #endif
7471 #
7472 # #ifdef __CYGWIN__
7473 # #include <cygwin/cygwin_dll.h>
7474 # DECLARE_CYGWIN_DLL( DllMain );
7475 # #endif
7476 # HINSTANCE __hDllInstance_base;
7477 #
7478 # BOOL APIENTRY
7479 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7480 # {
7481 #   __hDllInstance_base = hInst;
7482 #   return TRUE;
7483 # }
7484 # /* ltdll.c ends here */
7485         # This is a source program that is used to create import libraries
7486         # on Windows for dlls which lack them. Don't remove nor modify the
7487         # starting and closing comments
7488 # /* impgen.c starts here */
7489 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7490 #
7491 #  This file is part of GNU libtool.
7492 #
7493 #  This program is free software; you can redistribute it and/or modify
7494 #  it under the terms of the GNU General Public License as published by
7495 #  the Free Software Foundation; either version 2 of the License, or
7496 #  (at your option) any later version.
7497 #
7498 #  This program is distributed in the hope that it will be useful,
7499 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7500 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7501 #  GNU General Public License for more details.
7502 #
7503 #  You should have received a copy of the GNU General Public License
7504 #  along with this program; if not, write to the Free Software
7505 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7506 #  */
7507 #
7508 # #include <stdio.h>            /* for printf() */
7509 # #include <unistd.h>           /* for open(), lseek(), read() */
7510 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7511 # #include <string.h>           /* for strdup() */
7512 #
7513 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7514 # #ifndef O_BINARY
7515 # #define O_BINARY 0
7516 # #endif
7517 #
7518 # static unsigned int
7519 # pe_get16 (fd, offset)
7520 #      int fd;
7521 #      int offset;
7522 # {
7523 #   unsigned char b[2];
7524 #   lseek (fd, offset, SEEK_SET);
7525 #   read (fd, b, 2);
7526 #   return b[0] + (b[1]<<8);
7527 # }
7528 #
7529 # static unsigned int
7530 # pe_get32 (fd, offset)
7531 #     int fd;
7532 #     int offset;
7533 # {
7534 #   unsigned char b[4];
7535 #   lseek (fd, offset, SEEK_SET);
7536 #   read (fd, b, 4);
7537 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7538 # }
7539 #
7540 # static unsigned int
7541 # pe_as32 (ptr)
7542 #      void *ptr;
7543 # {
7544 #   unsigned char *b = ptr;
7545 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7546 # }
7547 #
7548 # int
7549 # main (argc, argv)
7550 #     int argc;
7551 #     char *argv[];
7552 # {
7553 #     int dll;
7554 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7555 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7556 #     unsigned long name_rvas, nexp;
7557 #     unsigned char *expdata, *erva;
7558 #     char *filename, *dll_name;
7559 #
7560 #     filename = argv[1];
7561 #
7562 #     dll = open(filename, O_RDONLY|O_BINARY);
7563 #     if (dll < 1)
7564 #       return 1;
7565 #
7566 #     dll_name = filename;
7567 #
7568 #     for (i=0; filename[i]; i++)
7569 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7570 #           dll_name = filename + i +1;
7571 #
7572 #     pe_header_offset = pe_get32 (dll, 0x3c);
7573 #     opthdr_ofs = pe_header_offset + 4 + 20;
7574 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7575 #
7576 #     if (num_entries < 1) /* no exports */
7577 #       return 1;
7578 #
7579 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7580 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7581 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7582 #     secptr = (pe_header_offset + 4 + 20 +
7583 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7584 #
7585 #     expptr = 0;
7586 #     for (i = 0; i < nsections; i++)
7587 #     {
7588 #       char sname[8];
7589 #       unsigned long secptr1 = secptr + 40 * i;
7590 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7591 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7592 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7593 #       lseek(dll, secptr1, SEEK_SET);
7594 #       read(dll, sname, 8);
7595 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7596 #       {
7597 #           expptr = fptr + (export_rva - vaddr);
7598 #           if (export_rva + export_size > vaddr + vsize)
7599 #               export_size = vsize - (export_rva - vaddr);
7600 #           break;
7601 #       }
7602 #     }
7603 #
7604 #     expdata = (unsigned char*)malloc(export_size);
7605 #     lseek (dll, expptr, SEEK_SET);
7606 #     read (dll, expdata, export_size);
7607 #     erva = expdata - export_rva;
7608 #
7609 #     nexp = pe_as32 (expdata+24);
7610 #     name_rvas = pe_as32 (expdata+32);
7611 #
7612 #     printf ("EXPORTS\n");
7613 #     for (i = 0; i<nexp; i++)
7614 #     {
7615 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7616 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7617 #     }
7618 #
7619 #     return 0;
7620 # }
7621 # /* impgen.c ends here */
7622
7623 EOF
7624     ;;
7625   esac
7626
7627   # We use sed instead of cat because bash on DJGPP gets confused if
7628   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7629   # text mode, it properly converts lines to CR/LF.  This bash problem
7630   # is reportedly fixed, but why not run on old versions too?
7631   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7632
7633   mv -f "${ofile}T" "$ofile" || \
7634     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7635   chmod +x "$ofile"
7636 fi
7637
7638
7639
7640
7641
7642 # This can be used to rebuild libtool when needed
7643 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7644
7645 # Always use our own libtool.
7646 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7647
7648 # Prevent multiple expansion
7649
7650
7651
7652 ol_link_perl=no
7653 if test $ol_enable_perl != no ; then
7654         # Extract the first word of "perl", so it can be a program name with args.
7655 set dummy perl; ac_word=$2
7656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7657 echo "configure:7658: checking for $ac_word" >&5
7658 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7659   echo $ac_n "(cached) $ac_c" 1>&6
7660 else
7661   case "$PERLBIN" in
7662   /*)
7663   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7664   ;;
7665   ?:/*)
7666   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7667   ;;
7668   *)
7669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7670   ac_dummy="$PATH"
7671   for ac_dir in $ac_dummy; do 
7672     test -z "$ac_dir" && ac_dir=.
7673     if test -f $ac_dir/$ac_word; then
7674       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7675       break
7676     fi
7677   done
7678   IFS="$ac_save_ifs"
7679   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7680   ;;
7681 esac
7682 fi
7683 PERLBIN="$ac_cv_path_PERLBIN"
7684 if test -n "$PERLBIN"; then
7685   echo "$ac_t""$PERLBIN" 1>&6
7686 else
7687   echo "$ac_t""no" 1>&6
7688 fi
7689
7690
7691         if test "no$PERLBIN" = "no" ; then
7692                 if test $ol_enable_perl = yes ; then
7693                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7694                 fi
7695
7696         else
7697                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7698                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7699
7700                 if test x"$ol_enable_perl" = "xyes" ; then
7701                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7702                 else
7703                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7704                 fi
7705                                 ol_link_perl=yes
7706         fi
7707 fi
7708
7709 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7710 echo "configure:7711: checking how to run the C preprocessor" >&5
7711 # On Suns, sometimes $CPP names a directory.
7712 if test -n "$CPP" && test -d "$CPP"; then
7713   CPP=
7714 fi
7715 if test -z "$CPP"; then
7716 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719     # This must be in double quotes, not single quotes, because CPP may get
7720   # substituted into the Makefile and "${CC-cc}" will confuse make.
7721   CPP="${CC-cc} -E"
7722   # On the NeXT, cc -E runs the code through the compiler's parser,
7723   # not just through cpp.
7724   cat > conftest.$ac_ext <<EOF
7725 #line 7726 "configure"
7726 #include "confdefs.h"
7727 #include <assert.h>
7728 Syntax Error
7729 EOF
7730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7731 { (eval echo configure:7732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7733 if test -z "$ac_err"; then
7734   :
7735 else
7736   echo "$ac_err" >&5
7737   echo "configure: failed program was:" >&5
7738   cat conftest.$ac_ext >&5
7739   rm -rf conftest*
7740   CPP="${CC-cc} -E -traditional-cpp"
7741   cat > conftest.$ac_ext <<EOF
7742 #line 7743 "configure"
7743 #include "confdefs.h"
7744 #include <assert.h>
7745 Syntax Error
7746 EOF
7747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7748 { (eval echo configure:7749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7750 if test -z "$ac_err"; then
7751   :
7752 else
7753   echo "$ac_err" >&5
7754   echo "configure: failed program was:" >&5
7755   cat conftest.$ac_ext >&5
7756   rm -rf conftest*
7757   CPP="${CC-cc} -nologo -E"
7758   cat > conftest.$ac_ext <<EOF
7759 #line 7760 "configure"
7760 #include "confdefs.h"
7761 #include <assert.h>
7762 Syntax Error
7763 EOF
7764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7765 { (eval echo configure:7766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7767 if test -z "$ac_err"; then
7768   :
7769 else
7770   echo "$ac_err" >&5
7771   echo "configure: failed program was:" >&5
7772   cat conftest.$ac_ext >&5
7773   rm -rf conftest*
7774   CPP=/lib/cpp
7775 fi
7776 rm -f conftest*
7777 fi
7778 rm -f conftest*
7779 fi
7780 rm -f conftest*
7781   ac_cv_prog_CPP="$CPP"
7782 fi
7783   CPP="$ac_cv_prog_CPP"
7784 else
7785   ac_cv_prog_CPP="$CPP"
7786 fi
7787 echo "$ac_t""$CPP" 1>&6
7788
7789
7790
7791 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7792 echo "configure:7793: checking for Cygwin environment" >&5
7793 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799
7800 int main() {
7801
7802 #ifndef __CYGWIN__
7803 #define __CYGWIN__ __CYGWIN32__
7804 #endif
7805 return __CYGWIN__;
7806 ; return 0; }
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7809   rm -rf conftest*
7810   ac_cv_cygwin=yes
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   ac_cv_cygwin=no
7816 fi
7817 rm -f conftest*
7818 fi
7819
7820 echo "$ac_t""$ac_cv_cygwin" 1>&6
7821 CYGWIN=
7822 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7823 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7824 echo "configure:7825: checking for mingw32 environment" >&5
7825 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7826   echo $ac_n "(cached) $ac_c" 1>&6
7827 else
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831
7832 int main() {
7833 return __MINGW32__;
7834 ; return 0; }
7835 EOF
7836 if { (eval echo configure:7837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7837   rm -rf conftest*
7838   ac_cv_mingw32=yes
7839 else
7840   echo "configure: failed program was:" >&5
7841   cat conftest.$ac_ext >&5
7842   rm -rf conftest*
7843   ac_cv_mingw32=no
7844 fi
7845 rm -f conftest*
7846 fi
7847
7848 echo "$ac_t""$ac_cv_mingw32" 1>&6
7849 MINGW32=
7850 test "$ac_cv_mingw32" = yes && MINGW32=yes
7851
7852
7853
7854 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7855 echo "configure:7856: checking for executable suffix" >&5
7856 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7857   echo $ac_n "(cached) $ac_c" 1>&6
7858 else
7859   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7860   ac_cv_exeext=.exe
7861 else
7862   rm -f conftest*
7863   echo 'int main () { return 0; }' > conftest.$ac_ext
7864   ac_cv_exeext=
7865   if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7866     for file in conftest.*; do
7867       case $file in
7868       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7869       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7870       esac
7871     done
7872   else
7873     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7874   fi
7875   rm -f conftest*
7876   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7877 fi
7878 fi
7879
7880 EXEEXT=""
7881 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7882 echo "$ac_t""${ac_cv_exeext}" 1>&6
7883 ac_exeext=$EXEEXT
7884
7885 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7886 echo "configure:7887: checking for object suffix" >&5
7887 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7888   echo $ac_n "(cached) $ac_c" 1>&6
7889 else
7890   rm -f conftest*
7891 echo 'int i = 1;' > conftest.$ac_ext
7892 if { (eval echo configure:7893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7893   for ac_file in conftest.*; do
7894     case $ac_file in
7895     *.c) ;;
7896     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7897     esac
7898   done
7899 else
7900   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7901 fi
7902 rm -f conftest*
7903 fi
7904
7905 echo "$ac_t""$ac_cv_objext" 1>&6
7906 OBJEXT=$ac_cv_objext
7907 ac_objext=$ac_cv_objext
7908
7909
7910 cat >> confdefs.h <<EOF
7911 #define EXEEXT "${EXEEXT}"
7912 EOF
7913
7914
7915 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7916 echo "configure:7917: checking for be_app in -lbe" >&5
7917 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7919   echo $ac_n "(cached) $ac_c" 1>&6
7920 else
7921   ac_save_LIBS="$LIBS"
7922 LIBS="-lbe -lroot -lnet $LIBS"
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* Override any gcc2 internal prototype to avoid an error.  */
7927 /* We use char because int might match the return type of a gcc2
7928     builtin and then its argument prototype would still apply.  */
7929 char be_app();
7930
7931 int main() {
7932 be_app()
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   eval "ac_cv_lib_$ac_lib_var=yes"
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   eval "ac_cv_lib_$ac_lib_var=no"
7943 fi
7944 rm -f conftest*
7945 LIBS="$ac_save_LIBS"
7946
7947 fi
7948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7949   echo "$ac_t""yes" 1>&6
7950   LIBS="$LIBS -lbe -lroot -lnet"
7951 else
7952   echo "$ac_t""no" 1>&6
7953 :
7954 fi
7955
7956
7957
7958
7959
7960 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7961 echo "configure:7962: checking for ${CC-cc} option to accept ANSI C" >&5
7962 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7963   echo $ac_n "(cached) $ac_c" 1>&6
7964 else
7965   am_cv_prog_cc_stdc=no
7966 ac_save_CC="$CC"
7967 # Don't try gcc -ansi; that turns off useful extensions and
7968 # breaks some systems' header files.
7969 # AIX                   -qlanglvl=ansi
7970 # Ultrix and OSF/1      -std1
7971 # HP-UX 10.20 and later -Ae
7972 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7973 # SVR4                  -Xc -D__EXTENSIONS__
7974 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7975 do
7976   CC="$ac_save_CC $ac_arg"
7977   cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 #include <stdarg.h>
7981 #include <stdio.h>
7982 #include <sys/types.h>
7983 #include <sys/stat.h>
7984 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7985 struct buf { int x; };
7986 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7987 static char *e (p, i)
7988      char **p;
7989      int i;
7990 {
7991   return p[i];
7992 }
7993 static char *f (char * (*g) (char **, int), char **p, ...)
7994 {
7995   char *s;
7996   va_list v;
7997   va_start (v,p);
7998   s = g (p, va_arg (v,int));
7999   va_end (v);
8000   return s;
8001 }
8002 int test (int i, double x);
8003 struct s1 {int (*f) (int a);};
8004 struct s2 {int (*f) (double a);};
8005 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8006 int argc;
8007 char **argv;
8008
8009 int main() {
8010
8011 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8012
8013 ; return 0; }
8014 EOF
8015 if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8016   rm -rf conftest*
8017   am_cv_prog_cc_stdc="$ac_arg"; break
8018 else
8019   echo "configure: failed program was:" >&5
8020   cat conftest.$ac_ext >&5
8021 fi
8022 rm -f conftest*
8023 done
8024 CC="$ac_save_CC"
8025
8026 fi
8027
8028 if test -z "$am_cv_prog_cc_stdc"; then
8029   echo "$ac_t""none needed" 1>&6
8030 else
8031   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8032 fi
8033 case "x$am_cv_prog_cc_stdc" in
8034   x|xno) ;;
8035   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8036 esac
8037
8038 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8039         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8040 fi
8041
8042 # test for make depend flag
8043 OL_MKDEP=
8044 OL_MKDEP_FLAGS=
8045 if test -z "${MKDEP}"; then
8046         OL_MKDEP="${CC-cc}"
8047         if test -z "${MKDEP_FLAGS}"; then
8048                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8049 echo "configure:8050: checking for ${OL_MKDEP} depend flag" >&5
8050 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8051   echo $ac_n "(cached) $ac_c" 1>&6
8052 else
8053   
8054                         ol_cv_mkdep=no
8055                         for flag in "-M" "-xM"; do
8056                                 cat > conftest.c <<EOF
8057  noCode;
8058 EOF
8059                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8060                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8061                                 then
8062                                         if test ! -f conftest."${ac_object}" ; then
8063                                                 ol_cv_mkdep=$flag
8064                                                 OL_MKDEP_FLAGS="$flag"
8065                                                 break
8066                                         fi
8067                                 fi
8068                         done
8069                         rm -f conftest*
8070                 
8071 fi
8072
8073 echo "$ac_t""$ol_cv_mkdep" 1>&6
8074         else
8075                 cc_cv_mkdep=yes
8076                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8077         fi
8078 else
8079         cc_cv_mkdep=yes
8080         OL_MKDEP="${MKDEP}"
8081         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8082 fi
8083
8084
8085
8086 if test "${ol_cv_mkdep}" = no ; then
8087         # this will soon become an error
8088         echo "configure: warning: do not know how to generate dependencies" 1>&2
8089 fi
8090
8091 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8092 echo "configure:8093: checking for afopen in -ls" >&5
8093 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   ac_save_LIBS="$LIBS"
8098 LIBS="-ls  $LIBS"
8099 cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102 /* Override any gcc2 internal prototype to avoid an error.  */
8103 /* We use char because int might match the return type of a gcc2
8104     builtin and then its argument prototype would still apply.  */
8105 char afopen();
8106
8107 int main() {
8108 afopen()
8109 ; return 0; }
8110 EOF
8111 if { (eval echo configure:8112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8112   rm -rf conftest*
8113   eval "ac_cv_lib_$ac_lib_var=yes"
8114 else
8115   echo "configure: failed program was:" >&5
8116   cat conftest.$ac_ext >&5
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=no"
8119 fi
8120 rm -f conftest*
8121 LIBS="$ac_save_LIBS"
8122
8123 fi
8124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8125   echo "$ac_t""yes" 1>&6
8126   
8127         AUTH_LIBS=-ls
8128         cat >> confdefs.h <<\EOF
8129 #define HAVE_AIX_SECURITY 1
8130 EOF
8131
8132
8133 else
8134   echo "$ac_t""no" 1>&6
8135 fi
8136
8137
8138 case "$target" in
8139 *-ibm-openedition)
8140         ac_cv_func_getopt=no
8141         cat >> confdefs.h <<\EOF
8142 #define BOTH_STRINGS_H 1
8143 EOF
8144
8145         ;;
8146 esac
8147
8148 ol_link_modules=no
8149 if test $ol_enable_modules != no ; then
8150         for ac_hdr in ltdl.h
8151 do
8152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8154 echo "configure:8155: checking for $ac_hdr" >&5
8155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8156   echo $ac_n "(cached) $ac_c" 1>&6
8157 else
8158   cat > conftest.$ac_ext <<EOF
8159 #line 8160 "configure"
8160 #include "confdefs.h"
8161 #include <$ac_hdr>
8162 EOF
8163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8164 { (eval echo configure:8165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8166 if test -z "$ac_err"; then
8167   rm -rf conftest*
8168   eval "ac_cv_header_$ac_safe=yes"
8169 else
8170   echo "$ac_err" >&5
8171   echo "configure: failed program was:" >&5
8172   cat conftest.$ac_ext >&5
8173   rm -rf conftest*
8174   eval "ac_cv_header_$ac_safe=no"
8175 fi
8176 rm -f conftest*
8177 fi
8178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8179   echo "$ac_t""yes" 1>&6
8180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8181   cat >> confdefs.h <<EOF
8182 #define $ac_tr_hdr 1
8183 EOF
8184  
8185 else
8186   echo "$ac_t""no" 1>&6
8187 fi
8188 done
8189
8190
8191         if test $ac_cv_header_ltdl_h = no ; then
8192                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8193         fi
8194
8195         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8196 echo "configure:8197: checking for lt_dlinit in -lltdl" >&5
8197 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8198 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8199   echo $ac_n "(cached) $ac_c" 1>&6
8200 else
8201   ac_save_LIBS="$LIBS"
8202 LIBS="-lltdl  $LIBS"
8203 cat > conftest.$ac_ext <<EOF
8204 #line 8205 "configure"
8205 #include "confdefs.h"
8206 /* Override any gcc2 internal prototype to avoid an error.  */
8207 /* We use char because int might match the return type of a gcc2
8208     builtin and then its argument prototype would still apply.  */
8209 char lt_dlinit();
8210
8211 int main() {
8212 lt_dlinit()
8213 ; return 0; }
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8216   rm -rf conftest*
8217   eval "ac_cv_lib_$ac_lib_var=yes"
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   eval "ac_cv_lib_$ac_lib_var=no"
8223 fi
8224 rm -f conftest*
8225 LIBS="$ac_save_LIBS"
8226
8227 fi
8228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8229   echo "$ac_t""yes" 1>&6
8230   
8231                 MODULES_LIBS=-lltdl
8232                 cat >> confdefs.h <<\EOF
8233 #define HAVE_LIBLTDL 1
8234 EOF
8235
8236         
8237 else
8238   echo "$ac_t""no" 1>&6
8239 fi
8240
8241
8242         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8243                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8244         fi
8245         ol_link_modules=yes
8246
8247 else
8248         for i in $Backends; do
8249                 eval "ol_tmp=\$ol_enable_$i"
8250                 if test $ol_tmp = mod ; then
8251                         echo "configure: warning: building static $i backend" 1>&2
8252                         eval "ol_enable_$i=yes"
8253                 fi
8254         done
8255         for i in $Overlays; do
8256                 eval "ol_tmp=\$ol_enable_$i"
8257                 if test $ol_tmp = mod ; then
8258                         echo "configure: warning: building static $i overlay" 1>&2
8259                         eval "ol_enable_$i=yes"
8260                 fi
8261         done
8262 fi
8263
8264 # test for EBCDIC
8265 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8266 echo "configure:8267: checking for EBCDIC" >&5
8267 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8268   echo $ac_n "(cached) $ac_c" 1>&6
8269 else
8270   
8271         cat > conftest.$ac_ext <<EOF
8272 #line 8273 "configure"
8273 #include "confdefs.h"
8274
8275 #if !('M' == 0xd4)
8276 #include <__ASCII__/generate_error.h>
8277 #endif
8278
8279 EOF
8280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8281 { (eval echo configure:8282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8283 if test -z "$ac_err"; then
8284   rm -rf conftest*
8285   ol_cv_cpp_ebcdic=yes
8286 else
8287   echo "$ac_err" >&5
8288   echo "configure: failed program was:" >&5
8289   cat conftest.$ac_ext >&5
8290   rm -rf conftest*
8291   ol_cv_cpp_ebcdic=no
8292 fi
8293 rm -f conftest*
8294 fi
8295
8296 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8297 if test $ol_cv_cpp_ebcdic = yes ; then
8298         cat >> confdefs.h <<\EOF
8299 #define HAVE_EBCDIC 1
8300 EOF
8301
8302 fi
8303
8304 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8305 echo "configure:8306: checking for ANSI C header files" >&5
8306 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8307   echo $ac_n "(cached) $ac_c" 1>&6
8308 else
8309   cat > conftest.$ac_ext <<EOF
8310 #line 8311 "configure"
8311 #include "confdefs.h"
8312 #include <stdlib.h>
8313 #include <stdarg.h>
8314 #include <string.h>
8315 #include <float.h>
8316 EOF
8317 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8318 { (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8319 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8320 if test -z "$ac_err"; then
8321   rm -rf conftest*
8322   ol_cv_header_stdc=yes
8323 else
8324   echo "$ac_err" >&5
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   ol_cv_header_stdc=no
8329 fi
8330 rm -f conftest*
8331
8332 if test $ol_cv_header_stdc = yes; then
8333   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <string.h>
8338 EOF
8339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8340   egrep "memchr" >/dev/null 2>&1; then
8341   :
8342 else
8343   rm -rf conftest*
8344   ol_cv_header_stdc=no
8345 fi
8346 rm -f conftest*
8347
8348 fi
8349
8350 if test $ol_cv_header_stdc = yes; then
8351   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8352 cat > conftest.$ac_ext <<EOF
8353 #line 8354 "configure"
8354 #include "confdefs.h"
8355 #include <stdlib.h>
8356 EOF
8357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8358   egrep "free" >/dev/null 2>&1; then
8359   :
8360 else
8361   rm -rf conftest*
8362   ol_cv_header_stdc=no
8363 fi
8364 rm -f conftest*
8365
8366 fi
8367
8368 if test $ol_cv_header_stdc = yes; then
8369   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8370 if test "$cross_compiling" = yes; then
8371   :
8372 else
8373   cat > conftest.$ac_ext <<EOF
8374 #line 8375 "configure"
8375 #include "confdefs.h"
8376 #include <ctype.h>
8377 #ifndef HAVE_EBCDIC
8378 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8379 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8380 #else
8381 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8382                 || ('j' <= (c) && (c) <= 'r') \
8383                 || ('s' <= (c) && (c) <= 'z'))
8384 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8385 #endif
8386 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8387 int main () { int i; for (i = 0; i < 256; i++)
8388 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8389 exit (0); }
8390
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8393 then
8394   :
8395 else
8396   echo "configure: failed program was:" >&5
8397   cat conftest.$ac_ext >&5
8398   rm -fr conftest*
8399   ol_cv_header_stdc=no
8400 fi
8401 rm -fr conftest*
8402 fi
8403
8404 fi
8405 fi
8406
8407 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8408 if test $ol_cv_header_stdc = yes; then
8409   cat >> confdefs.h <<\EOF
8410 #define STDC_HEADERS 1
8411 EOF
8412
8413 fi
8414 ac_cv_header_stdc=disable
8415
8416
8417 if test $ol_cv_header_stdc != yes; then
8418         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8419 fi
8420
8421 ac_header_dirent=no
8422 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8423 do
8424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8425 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8426 echo "configure:8427: checking for $ac_hdr that defines DIR" >&5
8427 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8428   echo $ac_n "(cached) $ac_c" 1>&6
8429 else
8430   cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 #include <sys/types.h>
8434 #include <$ac_hdr>
8435 int main() {
8436 DIR *dirp = 0;
8437 ; return 0; }
8438 EOF
8439 if { (eval echo configure:8440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8440   rm -rf conftest*
8441   eval "ac_cv_header_dirent_$ac_safe=yes"
8442 else
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -rf conftest*
8446   eval "ac_cv_header_dirent_$ac_safe=no"
8447 fi
8448 rm -f conftest*
8449 fi
8450 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8453   cat >> confdefs.h <<EOF
8454 #define $ac_tr_hdr 1
8455 EOF
8456  ac_header_dirent=$ac_hdr; break
8457 else
8458   echo "$ac_t""no" 1>&6
8459 fi
8460 done
8461 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8462 if test $ac_header_dirent = dirent.h; then
8463 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8464 echo "configure:8465: checking for opendir in -ldir" >&5
8465 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8466 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8467   echo $ac_n "(cached) $ac_c" 1>&6
8468 else
8469   ac_save_LIBS="$LIBS"
8470 LIBS="-ldir  $LIBS"
8471 cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 /* Override any gcc2 internal prototype to avoid an error.  */
8475 /* We use char because int might match the return type of a gcc2
8476     builtin and then its argument prototype would still apply.  */
8477 char opendir();
8478
8479 int main() {
8480 opendir()
8481 ; return 0; }
8482 EOF
8483 if { (eval echo configure:8484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8484   rm -rf conftest*
8485   eval "ac_cv_lib_$ac_lib_var=yes"
8486 else
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -rf conftest*
8490   eval "ac_cv_lib_$ac_lib_var=no"
8491 fi
8492 rm -f conftest*
8493 LIBS="$ac_save_LIBS"
8494
8495 fi
8496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8497   echo "$ac_t""yes" 1>&6
8498   LIBS="$LIBS -ldir"
8499 else
8500   echo "$ac_t""no" 1>&6
8501 fi
8502
8503 else
8504 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8505 echo "configure:8506: checking for opendir in -lx" >&5
8506 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8508   echo $ac_n "(cached) $ac_c" 1>&6
8509 else
8510   ac_save_LIBS="$LIBS"
8511 LIBS="-lx  $LIBS"
8512 cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 /* Override any gcc2 internal prototype to avoid an error.  */
8516 /* We use char because int might match the return type of a gcc2
8517     builtin and then its argument prototype would still apply.  */
8518 char opendir();
8519
8520 int main() {
8521 opendir()
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525   rm -rf conftest*
8526   eval "ac_cv_lib_$ac_lib_var=yes"
8527 else
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   eval "ac_cv_lib_$ac_lib_var=no"
8532 fi
8533 rm -f conftest*
8534 LIBS="$ac_save_LIBS"
8535
8536 fi
8537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8538   echo "$ac_t""yes" 1>&6
8539   LIBS="$LIBS -lx"
8540 else
8541   echo "$ac_t""no" 1>&6
8542 fi
8543
8544 fi
8545
8546 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8547 echo "configure:8548: checking for sys/wait.h that is POSIX.1 compatible" >&5
8548 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <sys/types.h>
8555 #include <sys/wait.h>
8556 #ifndef WEXITSTATUS
8557 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8558 #endif
8559 #ifndef WIFEXITED
8560 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8561 #endif
8562 int main() {
8563 int s;
8564 wait (&s);
8565 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8569   rm -rf conftest*
8570   ac_cv_header_sys_wait_h=yes
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   ac_cv_header_sys_wait_h=no
8576 fi
8577 rm -f conftest*
8578 fi
8579
8580 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8581 if test $ac_cv_header_sys_wait_h = yes; then
8582   cat >> confdefs.h <<\EOF
8583 #define HAVE_SYS_WAIT_H 1
8584 EOF
8585
8586 fi
8587
8588 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8589 echo "configure:8590: checking POSIX termios" >&5
8590 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 #include <sys/types.h>
8597 #include <unistd.h>
8598 #include <termios.h>
8599 int main() {
8600 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8601    tcgetattr(0, 0);
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8605   rm -rf conftest*
8606   am_cv_sys_posix_termios=yes
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   am_cv_sys_posix_termios=no
8612 fi
8613 rm -f conftest*
8614 fi
8615
8616 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8617
8618
8619  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8620 echo "configure:8621: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8621 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8625
8626   gwinsz_in_termios_h=no
8627   if test $am_cv_sys_posix_termios = yes; then
8628     cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 #include <sys/types.h>
8632 #     include <termios.h>
8633 #     ifdef TIOCGWINSZ
8634         yes
8635 #     endif
8636     
8637 EOF
8638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8639   egrep "yes" >/dev/null 2>&1; then
8640   rm -rf conftest*
8641   gwinsz_in_termios_h=yes
8642 fi
8643 rm -f conftest*
8644
8645   fi
8646
8647   if test $gwinsz_in_termios_h = no; then
8648     cat > conftest.$ac_ext <<EOF
8649 #line 8650 "configure"
8650 #include "confdefs.h"
8651 #include <sys/types.h>
8652 #     include <sys/ioctl.h>
8653 #     ifdef TIOCGWINSZ
8654         yes
8655 #     endif
8656     
8657 EOF
8658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8659   egrep "yes" >/dev/null 2>&1; then
8660   rm -rf conftest*
8661   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8662 fi
8663 rm -f conftest*
8664
8665   fi
8666   
8667 fi
8668
8669 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8670   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8671     cat >> confdefs.h <<\EOF
8672 #define GWINSZ_IN_SYS_IOCTL 1
8673 EOF
8674
8675   fi
8676
8677 if test $am_cv_sys_posix_termios = yes ; then
8678         cat >> confdefs.h <<\EOF
8679 #define HAVE_POSIX_TERMIOS 1
8680 EOF
8681
8682 fi
8683
8684 for ac_hdr in \
8685         arpa/inet.h             \
8686         arpa/nameser.h  \
8687         assert.h                \
8688         bits/types.h    \
8689         conio.h                 \
8690         crypt.h                 \
8691         direct.h                \
8692         errno.h                 \
8693         fcntl.h                 \
8694         filio.h                 \
8695         getopt.h                \
8696         grp.h                   \
8697         io.h                    \
8698         libutil.h               \
8699         limits.h                \
8700         locale.h                \
8701         netinet/tcp.h   \
8702         malloc.h                \
8703         memory.h                \
8704         psap.h                  \
8705         pwd.h                   \
8706         process.h               \
8707         resolv.h                \
8708         sgtty.h                 \
8709         shadow.h                \
8710         stddef.h                \
8711         string.h                \
8712         strings.h               \
8713         sysexits.h              \
8714         sys/file.h              \
8715         sys/filio.h             \
8716         sys/errno.h             \
8717         sys/ioctl.h             \
8718         sys/param.h             \
8719         sys/resource.h  \
8720         sys/select.h    \
8721         sys/socket.h    \
8722         sys/stat.h              \
8723         sys/syslog.h    \
8724         sys/time.h              \
8725         sys/types.h             \
8726         sys/ucred.h             \
8727         sys/uio.h               \
8728         syslog.h                \
8729         termios.h               \
8730         unistd.h                \
8731         winsock.h               \
8732         winsock2.h              \
8733
8734 do
8735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8737 echo "configure:8738: checking for $ac_hdr" >&5
8738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8739   echo $ac_n "(cached) $ac_c" 1>&6
8740 else
8741   cat > conftest.$ac_ext <<EOF
8742 #line 8743 "configure"
8743 #include "confdefs.h"
8744 #include <$ac_hdr>
8745 EOF
8746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8747 { (eval echo configure:8748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8749 if test -z "$ac_err"; then
8750   rm -rf conftest*
8751   eval "ac_cv_header_$ac_safe=yes"
8752 else
8753   echo "$ac_err" >&5
8754   echo "configure: failed program was:" >&5
8755   cat conftest.$ac_ext >&5
8756   rm -rf conftest*
8757   eval "ac_cv_header_$ac_safe=no"
8758 fi
8759 rm -f conftest*
8760 fi
8761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8762   echo "$ac_t""yes" 1>&6
8763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8764   cat >> confdefs.h <<EOF
8765 #define $ac_tr_hdr 1
8766 EOF
8767  
8768 else
8769   echo "$ac_t""no" 1>&6
8770 fi
8771 done
8772
8773
8774
8775
8776 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8777 echo "configure:8778: checking for sigset in -lV3" >&5
8778 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8779 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   ac_save_LIBS="$LIBS"
8783 LIBS="-lV3  $LIBS"
8784 cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787 /* Override any gcc2 internal prototype to avoid an error.  */
8788 /* We use char because int might match the return type of a gcc2
8789     builtin and then its argument prototype would still apply.  */
8790 char sigset();
8791
8792 int main() {
8793 sigset()
8794 ; return 0; }
8795 EOF
8796 if { (eval echo configure:8797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8797   rm -rf conftest*
8798   eval "ac_cv_lib_$ac_lib_var=yes"
8799 else
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -rf conftest*
8803   eval "ac_cv_lib_$ac_lib_var=no"
8804 fi
8805 rm -f conftest*
8806 LIBS="$ac_save_LIBS"
8807
8808 fi
8809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8810   echo "$ac_t""yes" 1>&6
8811     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8812     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8813   cat >> confdefs.h <<EOF
8814 #define $ac_tr_lib 1
8815 EOF
8816
8817   LIBS="-lV3 $LIBS"
8818
8819 else
8820   echo "$ac_t""no" 1>&6
8821 fi
8822
8823
8824 if test "$ac_cv_header_winsock_h" = yes; then
8825 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8826 echo "configure:8827: checking for winsock" >&5
8827 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8828   echo $ac_n "(cached) $ac_c" 1>&6
8829 else
8830   save_LIBS="$LIBS"
8831 for curlib in ws2_32 wsock32; do
8832         LIBS="$LIBS -l$curlib"
8833         cat > conftest.$ac_ext <<EOF
8834 #line 8835 "configure"
8835 #include "confdefs.h"
8836 #include <winsock.h>
8837                         
8838 int main() {
8839
8840                         socket(0,0,0);
8841                         select(0,NULL,NULL,NULL,NULL);
8842                         closesocket(0);
8843                         gethostname(NULL,0);
8844                         
8845 ; return 0; }
8846 EOF
8847 if { (eval echo configure:8848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8848   rm -rf conftest*
8849   ol_cv_winsock=yes
8850 else
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -rf conftest*
8854   ol_cv_winsock=no
8855 fi
8856 rm -f conftest*
8857
8858         if test $ol_cv_winsock = yes; then
8859                 cat >> confdefs.h <<\EOF
8860 #define HAVE_WINSOCK 1
8861 EOF
8862
8863                 ac_cv_func_socket=yes
8864                 ac_cv_func_select=yes
8865                 ac_cv_func_closesocket=yes
8866                 ac_cv_func_gethostname=yes
8867                 if test $curlib = ws2_32; then
8868                         ol_cv_winsock=winsock2
8869                         cat >> confdefs.h <<\EOF
8870 #define HAVE_WINSOCK2 1
8871 EOF
8872
8873                 fi
8874                 break
8875         fi
8876         LIBS="$save_LIBS"
8877 done
8878 fi
8879
8880 echo "$ac_t""$ol_cv_winsock" 1>&6
8881 fi
8882
8883
8884 echo $ac_n "checking for socket""... $ac_c" 1>&6
8885 echo "configure:8886: checking for socket" >&5
8886 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8887   echo $ac_n "(cached) $ac_c" 1>&6
8888 else
8889   cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* System header to define __stub macros and hopefully few prototypes,
8893     which can conflict with char socket(); below.  */
8894 #include <assert.h>
8895 /* Override any gcc2 internal prototype to avoid an error.  */
8896 /* We use char because int might match the return type of a gcc2
8897     builtin and then its argument prototype would still apply.  */
8898 char socket();
8899 char (*f)();
8900
8901 int main() {
8902
8903 /* The GNU C library defines this for functions which it implements
8904     to always fail with ENOSYS.  Some functions are actually named
8905     something starting with __ and the normal name is an alias.  */
8906 #if defined (__stub_socket) || defined (__stub___socket)
8907 choke me
8908 #else
8909 f = socket;
8910 #endif
8911
8912 ; return 0; }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8915   rm -rf conftest*
8916   eval "ac_cv_func_socket=yes"
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_func_socket=no"
8922 fi
8923 rm -f conftest*
8924 fi
8925
8926 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8927   echo "$ac_t""yes" 1>&6
8928   :
8929 else
8930   echo "$ac_t""no" 1>&6
8931         
8932         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8933 echo "configure:8934: checking for main in -lsocket" >&5
8934 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8936   echo $ac_n "(cached) $ac_c" 1>&6
8937 else
8938   ac_save_LIBS="$LIBS"
8939 LIBS="-lsocket  $LIBS"
8940 cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943
8944 int main() {
8945 main()
8946 ; return 0; }
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8949   rm -rf conftest*
8950   eval "ac_cv_lib_$ac_lib_var=yes"
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -rf conftest*
8955   eval "ac_cv_lib_$ac_lib_var=no"
8956 fi
8957 rm -f conftest*
8958 LIBS="$ac_save_LIBS"
8959
8960 fi
8961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8962   echo "$ac_t""yes" 1>&6
8963     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8964     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8965   cat >> confdefs.h <<EOF
8966 #define $ac_tr_lib 1
8967 EOF
8968
8969   LIBS="-lsocket $LIBS"
8970
8971 else
8972   echo "$ac_t""no" 1>&6
8973 fi
8974
8975         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8976 echo "configure:8977: checking for main in -lnet" >&5
8977 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8978 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8979   echo $ac_n "(cached) $ac_c" 1>&6
8980 else
8981   ac_save_LIBS="$LIBS"
8982 LIBS="-lnet  $LIBS"
8983 cat > conftest.$ac_ext <<EOF
8984 #line 8985 "configure"
8985 #include "confdefs.h"
8986
8987 int main() {
8988 main()
8989 ; return 0; }
8990 EOF
8991 if { (eval echo configure:8992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8992   rm -rf conftest*
8993   eval "ac_cv_lib_$ac_lib_var=yes"
8994 else
8995   echo "configure: failed program was:" >&5
8996   cat conftest.$ac_ext >&5
8997   rm -rf conftest*
8998   eval "ac_cv_lib_$ac_lib_var=no"
8999 fi
9000 rm -f conftest*
9001 LIBS="$ac_save_LIBS"
9002
9003 fi
9004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9005   echo "$ac_t""yes" 1>&6
9006     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9007     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9008   cat >> confdefs.h <<EOF
9009 #define $ac_tr_lib 1
9010 EOF
9011
9012   LIBS="-lnet $LIBS"
9013
9014 else
9015   echo "$ac_t""no" 1>&6
9016 fi
9017
9018         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9019 echo "configure:9020: checking for main in -lnsl_s" >&5
9020 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9022   echo $ac_n "(cached) $ac_c" 1>&6
9023 else
9024   ac_save_LIBS="$LIBS"
9025 LIBS="-lnsl_s  $LIBS"
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029
9030 int main() {
9031 main()
9032 ; return 0; }
9033 EOF
9034 if { (eval echo configure:9035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9035   rm -rf conftest*
9036   eval "ac_cv_lib_$ac_lib_var=yes"
9037 else
9038   echo "configure: failed program was:" >&5
9039   cat conftest.$ac_ext >&5
9040   rm -rf conftest*
9041   eval "ac_cv_lib_$ac_lib_var=no"
9042 fi
9043 rm -f conftest*
9044 LIBS="$ac_save_LIBS"
9045
9046 fi
9047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9048   echo "$ac_t""yes" 1>&6
9049     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9050     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9051   cat >> confdefs.h <<EOF
9052 #define $ac_tr_lib 1
9053 EOF
9054
9055   LIBS="-lnsl_s $LIBS"
9056
9057 else
9058   echo "$ac_t""no" 1>&6
9059 fi
9060
9061         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9062 echo "configure:9063: checking for main in -lnsl" >&5
9063 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9065   echo $ac_n "(cached) $ac_c" 1>&6
9066 else
9067   ac_save_LIBS="$LIBS"
9068 LIBS="-lnsl  $LIBS"
9069 cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072
9073 int main() {
9074 main()
9075 ; return 0; }
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9078   rm -rf conftest*
9079   eval "ac_cv_lib_$ac_lib_var=yes"
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_lib_$ac_lib_var=no"
9085 fi
9086 rm -f conftest*
9087 LIBS="$ac_save_LIBS"
9088
9089 fi
9090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9091   echo "$ac_t""yes" 1>&6
9092     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9094   cat >> confdefs.h <<EOF
9095 #define $ac_tr_lib 1
9096 EOF
9097
9098   LIBS="-lnsl $LIBS"
9099
9100 else
9101   echo "$ac_t""no" 1>&6
9102 fi
9103
9104         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9105 echo "configure:9106: checking for socket in -linet" >&5
9106 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9107 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9108   echo $ac_n "(cached) $ac_c" 1>&6
9109 else
9110   ac_save_LIBS="$LIBS"
9111 LIBS="-linet  $LIBS"
9112 cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115 /* Override any gcc2 internal prototype to avoid an error.  */
9116 /* We use char because int might match the return type of a gcc2
9117     builtin and then its argument prototype would still apply.  */
9118 char socket();
9119
9120 int main() {
9121 socket()
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   eval "ac_cv_lib_$ac_lib_var=yes"
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   eval "ac_cv_lib_$ac_lib_var=no"
9132 fi
9133 rm -f conftest*
9134 LIBS="$ac_save_LIBS"
9135
9136 fi
9137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9138   echo "$ac_t""yes" 1>&6
9139     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9141   cat >> confdefs.h <<EOF
9142 #define $ac_tr_lib 1
9143 EOF
9144
9145   LIBS="-linet $LIBS"
9146
9147 else
9148   echo "$ac_t""no" 1>&6
9149 fi
9150
9151         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9152 echo "configure:9153: checking for main in -lgen" >&5
9153 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   ac_save_LIBS="$LIBS"
9158 LIBS="-lgen  $LIBS"
9159 cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9162
9163 int main() {
9164 main()
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_lib_$ac_lib_var=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_lib_$ac_lib_var=no"
9175 fi
9176 rm -f conftest*
9177 LIBS="$ac_save_LIBS"
9178
9179 fi
9180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9181   echo "$ac_t""yes" 1>&6
9182     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9183     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9184   cat >> confdefs.h <<EOF
9185 #define $ac_tr_lib 1
9186 EOF
9187
9188   LIBS="-lgen $LIBS"
9189
9190 else
9191   echo "$ac_t""no" 1>&6
9192 fi
9193
9194
9195 fi
9196
9197
9198 echo $ac_n "checking for select""... $ac_c" 1>&6
9199 echo "configure:9200: checking for select" >&5
9200 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 /* System header to define __stub macros and hopefully few prototypes,
9207     which can conflict with char select(); below.  */
9208 #include <assert.h>
9209 /* Override any gcc2 internal prototype to avoid an error.  */
9210 /* We use char because int might match the return type of a gcc2
9211     builtin and then its argument prototype would still apply.  */
9212 char select();
9213 char (*f)();
9214
9215 int main() {
9216
9217 /* The GNU C library defines this for functions which it implements
9218     to always fail with ENOSYS.  Some functions are actually named
9219     something starting with __ and the normal name is an alias.  */
9220 #if defined (__stub_select) || defined (__stub___select)
9221 choke me
9222 #else
9223 f = select;
9224 #endif
9225
9226 ; return 0; }
9227 EOF
9228 if { (eval echo configure:9229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9229   rm -rf conftest*
9230   eval "ac_cv_func_select=yes"
9231 else
9232   echo "configure: failed program was:" >&5
9233   cat conftest.$ac_ext >&5
9234   rm -rf conftest*
9235   eval "ac_cv_func_select=no"
9236 fi
9237 rm -f conftest*
9238 fi
9239
9240 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9241   echo "$ac_t""yes" 1>&6
9242   :
9243 else
9244   echo "$ac_t""no" 1>&6
9245 { echo "configure: error: select() required." 1>&2; exit 1; }
9246 fi
9247
9248
9249 if test "${ac_cv_header_winsock_h}" != yes; then
9250                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9251 echo "configure:9252: checking types of arguments for select()" >&5
9252  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9253   echo $ac_n "(cached) $ac_c" 1>&6
9254 else
9255    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9256   echo $ac_n "(cached) $ac_c" 1>&6
9257 else
9258     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9259   echo $ac_n "(cached) $ac_c" 1>&6
9260 else
9261      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9262      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9263       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9264        cat > conftest.$ac_ext <<EOF
9265 #line 9266 "configure"
9266 #include "confdefs.h"
9267 #ifdef HAVE_SYS_TYPES_H
9268 #include <sys/types.h>
9269 #endif
9270 #ifdef HAVE_SYS_TIME_H
9271 #include <sys/time.h>
9272 #endif
9273 #ifdef HAVE_SYS_SELECT_H
9274 #include <sys/select.h>
9275 #endif
9276 #ifdef HAVE_SYS_SOCKET_H
9277 #include <sys/socket.h>
9278 #endif
9279 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);
9280 int main() {
9281
9282 ; return 0; }
9283 EOF
9284 if { (eval echo configure:9285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9285   rm -rf conftest*
9286           ac_not_found=no ; break 3
9287 else
9288   echo "configure: failed program was:" >&5
9289   cat conftest.$ac_ext >&5
9290   rm -rf conftest*
9291   ac_not_found=yes
9292 fi
9293 rm -f conftest*
9294       done
9295      done
9296     done
9297    
9298 fi
9299   
9300 fi
9301  
9302 fi
9303  if test "$ac_not_found" = yes; then
9304   ac_cv_func_select_arg1=int 
9305   ac_cv_func_select_arg234='int *' 
9306   ac_cv_func_select_arg5='struct timeval *'
9307  fi
9308  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9309  cat >> confdefs.h <<EOF
9310 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9311 EOF
9312
9313  cat >> confdefs.h <<EOF
9314 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9315 EOF
9316
9317  cat >> confdefs.h <<EOF
9318 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9319 EOF
9320
9321
9322 fi
9323
9324
9325 # strerror checks
9326 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9327 echo "configure:9328: checking declaration of sys_errlist" >&5
9328 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   
9332         cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335
9336 #include <stdio.h>
9337 #include <sys/types.h>
9338 #include <errno.h>
9339 #ifdef WINNT
9340 #include <stdlib.h>
9341 #endif 
9342 int main() {
9343 char *c = (char *) *sys_errlist
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9347   rm -rf conftest*
9348   ol_cv_dcl_sys_errlist=yes
9349         ol_cv_have_sys_errlist=yes
9350 else
9351   echo "configure: failed program was:" >&5
9352   cat conftest.$ac_ext >&5
9353   rm -rf conftest*
9354   ol_cv_dcl_sys_errlist=no
9355 fi
9356 rm -f conftest*
9357 fi
9358
9359 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9360 #
9361 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9362 if test $ol_cv_dcl_sys_errlist = no ; then
9363         cat >> confdefs.h <<\EOF
9364 #define DECL_SYS_ERRLIST 1
9365 EOF
9366
9367
9368         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9369 echo "configure:9370: checking existence of sys_errlist" >&5
9370 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   
9374                 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 #include <errno.h>
9378 int main() {
9379 char *c = (char *) *sys_errlist
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   ol_cv_have_sys_errlist=yes
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   ol_cv_have_sys_errlist=no
9390 fi
9391 rm -f conftest*
9392 fi
9393
9394 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9395 fi
9396 if test $ol_cv_have_sys_errlist = yes ; then
9397         cat >> confdefs.h <<\EOF
9398 #define HAVE_SYS_ERRLIST 1
9399 EOF
9400
9401 fi
9402  for ac_func in strerror strerror_r
9403 do
9404 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9405 echo "configure:9406: checking for $ac_func" >&5
9406 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 /* System header to define __stub macros and hopefully few prototypes,
9413     which can conflict with char $ac_func(); below.  */
9414 #include <assert.h>
9415 /* Override any gcc2 internal prototype to avoid an error.  */
9416 /* We use char because int might match the return type of a gcc2
9417     builtin and then its argument prototype would still apply.  */
9418 char $ac_func();
9419 char (*f)();
9420
9421 int main() {
9422
9423 /* The GNU C library defines this for functions which it implements
9424     to always fail with ENOSYS.  Some functions are actually named
9425     something starting with __ and the normal name is an alias.  */
9426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9427 choke me
9428 #else
9429 f = $ac_func;
9430 #endif
9431
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   eval "ac_cv_func_$ac_func=yes"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   eval "ac_cv_func_$ac_func=no"
9442 fi
9443 rm -f conftest*
9444 fi
9445
9446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9447   echo "$ac_t""yes" 1>&6
9448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9449   cat >> confdefs.h <<EOF
9450 #define $ac_tr_func 1
9451 EOF
9452  
9453 else
9454   echo "$ac_t""no" 1>&6
9455 fi
9456 done
9457
9458 ol_cv_func_strerror_r=no
9459 if test "${ac_cv_func_strerror_r}" = yes ; then
9460         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9461 echo "configure:9462: checking non-posix strerror_r" >&5
9462 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9463   echo $ac_n "(cached) $ac_c" 1>&6
9464 else
9465   
9466         cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469 #include <string.h>
9470 EOF
9471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9472   egrep "strerror_r" >/dev/null 2>&1; then
9473   rm -rf conftest*
9474   ol_decl_strerror_r=yes
9475 else
9476   rm -rf conftest*
9477   ol_decl_strerror_r=no
9478 fi
9479 rm -f conftest*
9480
9481         if test $ol_decl_strerror_r = yes ; then
9482                 cat > conftest.$ac_ext <<EOF
9483 #line 9484 "configure"
9484 #include "confdefs.h"
9485 #include <string.h>
9486 int main() {
9487    /* from autoconf 2.59 */
9488                                 char buf[100];
9489                                 char x = *strerror_r (0, buf, sizeof buf);
9490                                 char *p = strerror_r (0, buf, sizeof buf);
9491                         
9492 ; return 0; }
9493 EOF
9494 if { (eval echo configure:9495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9495   rm -rf conftest*
9496   ol_cv_nonposix_strerror_r=yes
9497 else
9498   echo "configure: failed program was:" >&5
9499   cat conftest.$ac_ext >&5
9500   rm -rf conftest*
9501   ol_cv_nonposix_strerror_r=no
9502 fi
9503 rm -f conftest*
9504         else
9505                 if test "$cross_compiling" = yes; then
9506     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9507 else
9508   cat > conftest.$ac_ext <<EOF
9509 #line 9510 "configure"
9510 #include "confdefs.h"
9511
9512                         main() {
9513                                 char buf[100];
9514                                 buf[0] = 0;
9515                                 strerror_r( 1, buf, sizeof buf );
9516                                 exit( buf[0] == 0 );
9517                         }
9518                         
9519 EOF
9520 if { (eval echo configure:9521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9521 then
9522   ol_cv_nonposix_strerror_r=yes
9523 else
9524   echo "configure: failed program was:" >&5
9525   cat conftest.$ac_ext >&5
9526   rm -fr conftest*
9527   ol_cv_nonposix_strerror=no
9528 fi
9529 rm -fr conftest*
9530 fi
9531
9532         fi
9533         
9534 fi
9535
9536 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9537 if test $ol_cv_nonposix_strerror_r = yes ; then
9538         cat >> confdefs.h <<\EOF
9539 #define HAVE_NONPOSIX_STRERROR_R 1
9540 EOF
9541
9542 fi
9543
9544 elif test "${ac_cv_func_strerror}" = no ; then
9545         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9546 echo "configure:9547: checking declaration of sys_errlist" >&5
9547 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   
9551         cat > conftest.$ac_ext <<EOF
9552 #line 9553 "configure"
9553 #include "confdefs.h"
9554
9555 #include <stdio.h>
9556 #include <sys/types.h>
9557 #include <errno.h>
9558 #ifdef WINNT
9559 #include <stdlib.h>
9560 #endif 
9561 int main() {
9562 char *c = (char *) *sys_errlist
9563 ; return 0; }
9564 EOF
9565 if { (eval echo configure:9566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9566   rm -rf conftest*
9567   ol_cv_dcl_sys_errlist=yes
9568         ol_cv_have_sys_errlist=yes
9569 else
9570   echo "configure: failed program was:" >&5
9571   cat conftest.$ac_ext >&5
9572   rm -rf conftest*
9573   ol_cv_dcl_sys_errlist=no
9574 fi
9575 rm -f conftest*
9576 fi
9577
9578 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9579 #
9580 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9581 if test $ol_cv_dcl_sys_errlist = no ; then
9582         cat >> confdefs.h <<\EOF
9583 #define DECL_SYS_ERRLIST 1
9584 EOF
9585
9586
9587         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9588 echo "configure:9589: checking existence of sys_errlist" >&5
9589 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9590   echo $ac_n "(cached) $ac_c" 1>&6
9591 else
9592   
9593                 cat > conftest.$ac_ext <<EOF
9594 #line 9595 "configure"
9595 #include "confdefs.h"
9596 #include <errno.h>
9597 int main() {
9598 char *c = (char *) *sys_errlist
9599 ; return 0; }
9600 EOF
9601 if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9602   rm -rf conftest*
9603   ol_cv_have_sys_errlist=yes
9604 else
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607   rm -rf conftest*
9608   ol_cv_have_sys_errlist=no
9609 fi
9610 rm -f conftest*
9611 fi
9612
9613 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9614 fi
9615 if test $ol_cv_have_sys_errlist = yes ; then
9616         cat >> confdefs.h <<\EOF
9617 #define HAVE_SYS_ERRLIST 1
9618 EOF
9619
9620 fi
9621
9622 fi
9623
9624
9625 for ac_hdr in regex.h 
9626 do
9627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9629 echo "configure:9630: checking for $ac_hdr" >&5
9630 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9631   echo $ac_n "(cached) $ac_c" 1>&6
9632 else
9633   cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 #include <$ac_hdr>
9637 EOF
9638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9639 { (eval echo configure:9640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9641 if test -z "$ac_err"; then
9642   rm -rf conftest*
9643   eval "ac_cv_header_$ac_safe=yes"
9644 else
9645   echo "$ac_err" >&5
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -rf conftest*
9649   eval "ac_cv_header_$ac_safe=no"
9650 fi
9651 rm -f conftest*
9652 fi
9653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9654   echo "$ac_t""yes" 1>&6
9655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9656   cat >> confdefs.h <<EOF
9657 #define $ac_tr_hdr 1
9658 EOF
9659  
9660 else
9661   echo "$ac_t""no" 1>&6
9662 fi
9663 done
9664
9665 if test "$ac_cv_header_regex_h" != yes ; then
9666         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9667 fi
9668
9669 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9670 echo "configure:9671: checking for library containing regfree" >&5
9671 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9672   echo $ac_n "(cached) $ac_c" 1>&6
9673 else
9674   ac_func_search_save_LIBS="$LIBS"
9675 ac_cv_search_regfree="no"
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 regfree();
9683
9684 int main() {
9685 regfree()
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_regfree="none required"
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694 fi
9695 rm -f conftest*
9696 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9697 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9698 cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701 /* Override any gcc2 internal prototype to avoid an error.  */
9702 /* We use char because int might match the return type of a gcc2
9703     builtin and then its argument prototype would still apply.  */
9704 char regfree();
9705
9706 int main() {
9707 regfree()
9708 ; return 0; }
9709 EOF
9710 if { (eval echo configure:9711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9711   rm -rf conftest*
9712   ac_cv_search_regfree="-l$ac_lib"
9713 break
9714 else
9715   echo "configure: failed program was:" >&5
9716   cat conftest.$ac_ext >&5
9717 fi
9718 rm -f conftest*
9719 done
9720 LIBS="$ac_func_search_save_LIBS"
9721 fi
9722
9723 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9724 if test "$ac_cv_search_regfree" != "no"; then
9725   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9726   :
9727 else :
9728   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9729 fi
9730
9731
9732 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9733 echo "configure:9734: checking for compatible POSIX regex" >&5
9734 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9735   echo $ac_n "(cached) $ac_c" 1>&6
9736 else
9737   
9738         if test "$cross_compiling" = yes; then
9739   ol_cv_c_posix_regex=cross
9740 else
9741   cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744
9745 #include <sys/types.h>
9746 #include <regex.h>
9747 static char *pattern, *string;
9748 main()
9749 {
9750         int rc;
9751         regex_t re;
9752
9753         pattern = "^A";
9754
9755         if(regcomp(&re, pattern, 0)) {
9756                 return -1;
9757         }
9758         
9759         string = "ALL MATCH";
9760         
9761         rc = regexec(&re, string, 0, (void*)0, 0);
9762
9763         regfree(&re);
9764
9765         return rc;
9766 }
9767 EOF
9768 if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9769 then
9770   ol_cv_c_posix_regex=yes
9771 else
9772   echo "configure: failed program was:" >&5
9773   cat conftest.$ac_ext >&5
9774   rm -fr conftest*
9775   ol_cv_c_posix_regex=no
9776 fi
9777 rm -fr conftest*
9778 fi
9779
9780 fi
9781
9782 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9783
9784 if test "$ol_cv_c_posix_regex" = no ; then
9785         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9786 fi
9787
9788
9789 have_uuid=no
9790 for ac_hdr in sys/uuid.h
9791 do
9792 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9793 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9794 echo "configure:9795: checking for $ac_hdr" >&5
9795 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9796   echo $ac_n "(cached) $ac_c" 1>&6
9797 else
9798   cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 #include <$ac_hdr>
9802 EOF
9803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9804 { (eval echo configure:9805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9806 if test -z "$ac_err"; then
9807   rm -rf conftest*
9808   eval "ac_cv_header_$ac_safe=yes"
9809 else
9810   echo "$ac_err" >&5
9811   echo "configure: failed program was:" >&5
9812   cat conftest.$ac_ext >&5
9813   rm -rf conftest*
9814   eval "ac_cv_header_$ac_safe=no"
9815 fi
9816 rm -f conftest*
9817 fi
9818 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9819   echo "$ac_t""yes" 1>&6
9820     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9821   cat >> confdefs.h <<EOF
9822 #define $ac_tr_hdr 1
9823 EOF
9824  
9825 else
9826   echo "$ac_t""no" 1>&6
9827 fi
9828 done
9829
9830 if test $ac_cv_header_sys_uuid_h = yes ; then
9831         save_LIBS="$LIBS"
9832         
9833 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9834 echo "configure:9835: checking for library containing uuid_to_str" >&5
9835 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9836   echo $ac_n "(cached) $ac_c" 1>&6
9837 else
9838   ac_func_search_save_LIBS="$LIBS"
9839 ac_cv_search_uuid_to_str="no"
9840 cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 /* Override any gcc2 internal prototype to avoid an error.  */
9844 /* We use char because int might match the return type of a gcc2
9845     builtin and then its argument prototype would still apply.  */
9846 char uuid_to_str();
9847
9848 int main() {
9849 uuid_to_str()
9850 ; return 0; }
9851 EOF
9852 if { (eval echo configure:9853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9853   rm -rf conftest*
9854   ac_cv_search_uuid_to_str="none required"
9855 else
9856   echo "configure: failed program was:" >&5
9857   cat conftest.$ac_ext >&5
9858 fi
9859 rm -f conftest*
9860 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9861 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9862 cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 /* Override any gcc2 internal prototype to avoid an error.  */
9866 /* We use char because int might match the return type of a gcc2
9867     builtin and then its argument prototype would still apply.  */
9868 char uuid_to_str();
9869
9870 int main() {
9871 uuid_to_str()
9872 ; return 0; }
9873 EOF
9874 if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9875   rm -rf conftest*
9876   ac_cv_search_uuid_to_str="-l$ac_lib"
9877 break
9878 else
9879   echo "configure: failed program was:" >&5
9880   cat conftest.$ac_ext >&5
9881 fi
9882 rm -f conftest*
9883 done
9884 LIBS="$ac_func_search_save_LIBS"
9885 fi
9886
9887 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9888 if test "$ac_cv_search_uuid_to_str" != "no"; then
9889   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9890   have_uuid=yes
9891 else :
9892   :
9893 fi
9894         LIBS="$save_LIBS"
9895
9896         if test have_uuid = yes ; then
9897                 cat >> confdefs.h <<\EOF
9898 #define HAVE_UUID_TO_STR 1
9899 EOF
9900
9901
9902                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9903                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9904         fi
9905 fi
9906
9907 if test $have_uuid = no ; then
9908         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9909 echo "configure:9910: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9910         save_LIBS="$LIBS"
9911         LIBS="$LIBS -lrpcrt4"
9912         cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915
9916                 int __stdcall UuidCreate(void *);
9917                 int __stdcall UuidToStringA(void *,void **);
9918                 
9919 int main() {
9920
9921                 UuidCreate(0);
9922                 UuidToStringA(0,0);
9923                 
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   need_rpcrt=yes
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   need_rpcrt=no
9934 fi
9935 rm -f conftest*
9936         if test $need_rpcrt = yes; then
9937                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9938         fi
9939         LIBS="$save_LIBS"
9940         echo "$ac_t""$need_rpcrt" 1>&6
9941 fi
9942
9943 ol_link_dnssrv=no
9944 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9945 echo "configure:9946: checking for res_query" >&5
9946 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9947   echo $ac_n "(cached) $ac_c" 1>&6
9948 else
9949   cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 /* System header to define __stub macros and hopefully few prototypes,
9953     which can conflict with char res_query(); below.  */
9954 #include <assert.h>
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 /* We use char because int might match the return type of a gcc2
9957     builtin and then its argument prototype would still apply.  */
9958 char res_query();
9959 char (*f)();
9960
9961 int main() {
9962
9963 /* The GNU C library defines this for functions which it implements
9964     to always fail with ENOSYS.  Some functions are actually named
9965     something starting with __ and the normal name is an alias.  */
9966 #if defined (__stub_res_query) || defined (__stub___res_query)
9967 choke me
9968 #else
9969 f = res_query;
9970 #endif
9971
9972 ; return 0; }
9973 EOF
9974 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9975   rm -rf conftest*
9976   eval "ac_cv_func_res_query=yes"
9977 else
9978   echo "configure: failed program was:" >&5
9979   cat conftest.$ac_ext >&5
9980   rm -rf conftest*
9981   eval "ac_cv_func_res_query=no"
9982 fi
9983 rm -f conftest*
9984 fi
9985
9986 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9987   echo "$ac_t""yes" 1>&6
9988   :
9989 else
9990   echo "$ac_t""no" 1>&6
9991 fi
9992
9993 if test $ac_cv_func_res_query = no ; then 
9994         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9995 echo "configure:9996: checking for __res_query" >&5
9996 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9997   echo $ac_n "(cached) $ac_c" 1>&6
9998 else
9999   cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002 /* System header to define __stub macros and hopefully few prototypes,
10003     which can conflict with char __res_query(); below.  */
10004 #include <assert.h>
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 /* We use char because int might match the return type of a gcc2
10007     builtin and then its argument prototype would still apply.  */
10008 char __res_query();
10009 char (*f)();
10010
10011 int main() {
10012
10013 /* The GNU C library defines this for functions which it implements
10014     to always fail with ENOSYS.  Some functions are actually named
10015     something starting with __ and the normal name is an alias.  */
10016 #if defined (__stub___res_query) || defined (__stub_____res_query)
10017 choke me
10018 #else
10019 f = __res_query;
10020 #endif
10021
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_func___res_query=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_func___res_query=no"
10032 fi
10033 rm -f conftest*
10034 fi
10035
10036 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10037   echo "$ac_t""yes" 1>&6
10038   :
10039 else
10040   echo "$ac_t""no" 1>&6
10041 fi
10042
10043         ac_cv_func_res_query=$ac_cv_func___res_query
10044 fi
10045
10046 if test $ac_cv_func_res_query = no ; then 
10047         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10048 echo "configure:10049: checking for res_query in -lbind" >&5
10049 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10051   echo $ac_n "(cached) $ac_c" 1>&6
10052 else
10053   ac_save_LIBS="$LIBS"
10054 LIBS="-lbind  $LIBS"
10055 cat > conftest.$ac_ext <<EOF
10056 #line 10057 "configure"
10057 #include "confdefs.h"
10058 /* Override any gcc2 internal prototype to avoid an error.  */
10059 /* We use char because int might match the return type of a gcc2
10060     builtin and then its argument prototype would still apply.  */
10061 char res_query();
10062
10063 int main() {
10064 res_query()
10065 ; return 0; }
10066 EOF
10067 if { (eval echo configure:10068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10068   rm -rf conftest*
10069   eval "ac_cv_lib_$ac_lib_var=yes"
10070 else
10071   echo "configure: failed program was:" >&5
10072   cat conftest.$ac_ext >&5
10073   rm -rf conftest*
10074   eval "ac_cv_lib_$ac_lib_var=no"
10075 fi
10076 rm -f conftest*
10077 LIBS="$ac_save_LIBS"
10078
10079 fi
10080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10081   echo "$ac_t""yes" 1>&6
10082     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10084   cat >> confdefs.h <<EOF
10085 #define $ac_tr_lib 1
10086 EOF
10087
10088   LIBS="-lbind $LIBS"
10089
10090 else
10091   echo "$ac_t""no" 1>&6
10092 fi
10093
10094         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10095 fi
10096
10097 if test $ac_cv_func_res_query = no ; then 
10098         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10099 echo "configure:10100: checking for __res_query in -lbind" >&5
10100 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10102   echo $ac_n "(cached) $ac_c" 1>&6
10103 else
10104   ac_save_LIBS="$LIBS"
10105 LIBS="-lbind  $LIBS"
10106 cat > conftest.$ac_ext <<EOF
10107 #line 10108 "configure"
10108 #include "confdefs.h"
10109 /* Override any gcc2 internal prototype to avoid an error.  */
10110 /* We use char because int might match the return type of a gcc2
10111     builtin and then its argument prototype would still apply.  */
10112 char __res_query();
10113
10114 int main() {
10115 __res_query()
10116 ; return 0; }
10117 EOF
10118 if { (eval echo configure:10119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10119   rm -rf conftest*
10120   eval "ac_cv_lib_$ac_lib_var=yes"
10121 else
10122   echo "configure: failed program was:" >&5
10123   cat conftest.$ac_ext >&5
10124   rm -rf conftest*
10125   eval "ac_cv_lib_$ac_lib_var=no"
10126 fi
10127 rm -f conftest*
10128 LIBS="$ac_save_LIBS"
10129
10130 fi
10131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10132   echo "$ac_t""yes" 1>&6
10133     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10134     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10135   cat >> confdefs.h <<EOF
10136 #define $ac_tr_lib 1
10137 EOF
10138
10139   LIBS="-lbind $LIBS"
10140
10141 else
10142   echo "$ac_t""no" 1>&6
10143 fi
10144
10145         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10146 fi
10147
10148 if test $ac_cv_func_res_query = no ; then 
10149         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10150 echo "configure:10151: checking for res_query in -lresolv" >&5
10151 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10153   echo $ac_n "(cached) $ac_c" 1>&6
10154 else
10155   ac_save_LIBS="$LIBS"
10156 LIBS="-lresolv  $LIBS"
10157 cat > conftest.$ac_ext <<EOF
10158 #line 10159 "configure"
10159 #include "confdefs.h"
10160 /* Override any gcc2 internal prototype to avoid an error.  */
10161 /* We use char because int might match the return type of a gcc2
10162     builtin and then its argument prototype would still apply.  */
10163 char res_query();
10164
10165 int main() {
10166 res_query()
10167 ; return 0; }
10168 EOF
10169 if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10170   rm -rf conftest*
10171   eval "ac_cv_lib_$ac_lib_var=yes"
10172 else
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -rf conftest*
10176   eval "ac_cv_lib_$ac_lib_var=no"
10177 fi
10178 rm -f conftest*
10179 LIBS="$ac_save_LIBS"
10180
10181 fi
10182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10183   echo "$ac_t""yes" 1>&6
10184     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10185     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10186   cat >> confdefs.h <<EOF
10187 #define $ac_tr_lib 1
10188 EOF
10189
10190   LIBS="-lresolv $LIBS"
10191
10192 else
10193   echo "$ac_t""no" 1>&6
10194 fi
10195
10196         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10197 fi
10198
10199 if test $ac_cv_func_res_query = no ; then 
10200         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10201 echo "configure:10202: checking for __res_query in -lresolv" >&5
10202 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10203 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   ac_save_LIBS="$LIBS"
10207 LIBS="-lresolv  $LIBS"
10208 cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 /* Override any gcc2 internal prototype to avoid an error.  */
10212 /* We use char because int might match the return type of a gcc2
10213     builtin and then its argument prototype would still apply.  */
10214 char __res_query();
10215
10216 int main() {
10217 __res_query()
10218 ; return 0; }
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10221   rm -rf conftest*
10222   eval "ac_cv_lib_$ac_lib_var=yes"
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -rf conftest*
10227   eval "ac_cv_lib_$ac_lib_var=no"
10228 fi
10229 rm -f conftest*
10230 LIBS="$ac_save_LIBS"
10231
10232 fi
10233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10234   echo "$ac_t""yes" 1>&6
10235     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10236     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10237   cat >> confdefs.h <<EOF
10238 #define $ac_tr_lib 1
10239 EOF
10240
10241   LIBS="-lresolv $LIBS"
10242
10243 else
10244   echo "$ac_t""no" 1>&6
10245 fi
10246
10247         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10248 fi
10249
10250 if test $ac_cv_func_res_query = no ; then 
10251         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10252 echo "configure:10253: checking for _res_9_query in -lresolv" >&5
10253 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10255   echo $ac_n "(cached) $ac_c" 1>&6
10256 else
10257   ac_save_LIBS="$LIBS"
10258 LIBS="-lresolv  $LIBS"
10259 cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 /* Override any gcc2 internal prototype to avoid an error.  */
10263 /* We use char because int might match the return type of a gcc2
10264     builtin and then its argument prototype would still apply.  */
10265 char _res_9_query();
10266
10267 int main() {
10268 _res_9_query()
10269 ; return 0; }
10270 EOF
10271 if { (eval echo configure:10272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10272   rm -rf conftest*
10273   eval "ac_cv_lib_$ac_lib_var=yes"
10274 else
10275   echo "configure: failed program was:" >&5
10276   cat conftest.$ac_ext >&5
10277   rm -rf conftest*
10278   eval "ac_cv_lib_$ac_lib_var=no"
10279 fi
10280 rm -f conftest*
10281 LIBS="$ac_save_LIBS"
10282
10283 fi
10284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10285   echo "$ac_t""yes" 1>&6
10286     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10287     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10288   cat >> confdefs.h <<EOF
10289 #define $ac_tr_lib 1
10290 EOF
10291
10292   LIBS="-lresolv $LIBS"
10293
10294 else
10295   echo "$ac_t""no" 1>&6
10296 fi
10297
10298         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10299 fi
10300
10301 if test "$ac_cv_func_res_query" = yes ; then
10302         cat >> confdefs.h <<\EOF
10303 #define HAVE_RES_QUERY 1
10304 EOF
10305
10306
10307         if test $ol_enable_dnssrv != no ; then
10308                 ol_link_dnssrv=yes
10309         fi
10310 fi
10311
10312 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10313         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10314 fi
10315
10316 for ac_func in hstrerror 
10317 do
10318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10319 echo "configure:10320: checking for $ac_func" >&5
10320 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10321   echo $ac_n "(cached) $ac_c" 1>&6
10322 else
10323   cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326 /* System header to define __stub macros and hopefully few prototypes,
10327     which can conflict with char $ac_func(); below.  */
10328 #include <assert.h>
10329 /* Override any gcc2 internal prototype to avoid an error.  */
10330 /* We use char because int might match the return type of a gcc2
10331     builtin and then its argument prototype would still apply.  */
10332 char $ac_func();
10333 char (*f)();
10334
10335 int main() {
10336
10337 /* The GNU C library defines this for functions which it implements
10338     to always fail with ENOSYS.  Some functions are actually named
10339     something starting with __ and the normal name is an alias.  */
10340 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10341 choke me
10342 #else
10343 f = $ac_func;
10344 #endif
10345
10346 ; return 0; }
10347 EOF
10348 if { (eval echo configure:10349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10349   rm -rf conftest*
10350   eval "ac_cv_func_$ac_func=yes"
10351 else
10352   echo "configure: failed program was:" >&5
10353   cat conftest.$ac_ext >&5
10354   rm -rf conftest*
10355   eval "ac_cv_func_$ac_func=no"
10356 fi
10357 rm -f conftest*
10358 fi
10359
10360 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10363   cat >> confdefs.h <<EOF
10364 #define $ac_tr_func 1
10365 EOF
10366  
10367 else
10368   echo "$ac_t""no" 1>&6
10369 fi
10370 done
10371
10372
10373 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10374 do
10375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10376 echo "configure:10377: checking for $ac_func" >&5
10377 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 /* System header to define __stub macros and hopefully few prototypes,
10384     which can conflict with char $ac_func(); below.  */
10385 #include <assert.h>
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 /* We use char because int might match the return type of a gcc2
10388     builtin and then its argument prototype would still apply.  */
10389 char $ac_func();
10390 char (*f)();
10391
10392 int main() {
10393
10394 /* The GNU C library defines this for functions which it implements
10395     to always fail with ENOSYS.  Some functions are actually named
10396     something starting with __ and the normal name is an alias.  */
10397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10398 choke me
10399 #else
10400 f = $ac_func;
10401 #endif
10402
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_func_$ac_func=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_func_$ac_func=no"
10413 fi
10414 rm -f conftest*
10415 fi
10416
10417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10420   cat >> confdefs.h <<EOF
10421 #define $ac_tr_func 1
10422 EOF
10423  
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427 done
10428
10429
10430 ol_link_ipv6=no
10431 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10432         if test $ol_enable_ipv6 = yes ; then
10433                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10434         fi
10435 elif test $ol_enable_ipv6 != no ; then
10436         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10437 echo "configure:10438: checking INET6_ADDRSTRLEN" >&5
10438 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   
10442                 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 #                       include <netinet/in.h>
10447 #                       ifdef INET6_ADDRSTRLEN
10448                                 __has_inet6_addrstrlen__;
10449 #                       endif
10450                 
10451 EOF
10452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10453   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10454   rm -rf conftest*
10455   ol_cv_inet6_addrstrlen=yes
10456 else
10457   rm -rf conftest*
10458   ol_cv_inet6_addrstrlen=no
10459 fi
10460 rm -f conftest*
10461
10462 fi
10463
10464 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10465
10466
10467         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10468 echo "configure:10469: checking struct sockaddr_storage" >&5
10469 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10470   echo $ac_n "(cached) $ac_c" 1>&6
10471 else
10472   
10473                 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476
10477 #include <sys/types.h>
10478 #include <sys/socket.h>
10479
10480 int main() {
10481
10482                         struct sockaddr_storage ss;
10483
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10487   rm -rf conftest*
10488   ol_cv_struct_sockaddr_storage=yes
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   ol_cv_struct_sockaddr_storage=no
10494 fi
10495 rm -f conftest*
10496 fi
10497
10498 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10499
10500         if test $ol_cv_inet6_addrstrlen = yes \
10501                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10502                 ol_link_ipv6=yes
10503         elif test $ol_enable_ipv6 = yes \
10504                         -a $ol_cv_inet6_addrstrlen = no ; then
10505                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10506         elif test $ol_enable_ipv6 = yes \
10507                         -a $ol_cv_struct_sockaddr_storage = no ; then
10508                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10509         fi
10510 fi
10511
10512 if test $ol_enable_local != no ; then
10513         for ac_hdr in sys/un.h 
10514 do
10515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10517 echo "configure:10518: checking for $ac_hdr" >&5
10518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   cat > conftest.$ac_ext <<EOF
10522 #line 10523 "configure"
10523 #include "confdefs.h"
10524 #include <$ac_hdr>
10525 EOF
10526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10527 { (eval echo configure:10528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10529 if test -z "$ac_err"; then
10530   rm -rf conftest*
10531   eval "ac_cv_header_$ac_safe=yes"
10532 else
10533   echo "$ac_err" >&5
10534   echo "configure: failed program was:" >&5
10535   cat conftest.$ac_ext >&5
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=no"
10538 fi
10539 rm -f conftest*
10540 fi
10541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10544   cat >> confdefs.h <<EOF
10545 #define $ac_tr_hdr 1
10546 EOF
10547  
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551 done
10552
10553
10554         if test $ol_enable_local = auto ; then
10555                 ol_enable_local=$ac_cv_header_sys_un_h
10556         elif test $ac_cv_header_sys_un_h = no ; then
10557                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10558         fi
10559 fi
10560
10561 ol_link_kbind=no
10562 ol_link_krb5=no
10563 ol_link_krb4=no
10564
10565 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10566         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10567         -o $ol_with_kerberos = k425 ; then
10568
10569         for ac_hdr in krb5.h
10570 do
10571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10573 echo "configure:10574: checking for $ac_hdr" >&5
10574 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580 #include <$ac_hdr>
10581 EOF
10582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10583 { (eval echo configure:10584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10585 if test -z "$ac_err"; then
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=yes"
10588 else
10589   echo "$ac_err" >&5
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=no"
10594 fi
10595 rm -f conftest*
10596 fi
10597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10598   echo "$ac_t""yes" 1>&6
10599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10600   cat >> confdefs.h <<EOF
10601 #define $ac_tr_hdr 1
10602 EOF
10603  
10604 else
10605   echo "$ac_t""no" 1>&6
10606 fi
10607 done
10608
10609
10610         if test $ac_cv_header_krb5_h = yes ; then
10611                                 for ac_hdr in heim_err.h
10612 do
10613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10615 echo "configure:10616: checking for $ac_hdr" >&5
10616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 #include <$ac_hdr>
10623 EOF
10624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10625 { (eval echo configure:10626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10627 if test -z "$ac_err"; then
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=yes"
10630 else
10631   echo "$ac_err" >&5
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_header_$ac_safe=no"
10636 fi
10637 rm -f conftest*
10638 fi
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10642   cat >> confdefs.h <<EOF
10643 #define $ac_tr_hdr 1
10644 EOF
10645  
10646 else
10647   echo "$ac_t""no" 1>&6
10648 fi
10649 done
10650
10651                 if test $ac_cv_header_heim_err_h = yes ; then
10652                         krb5_impl=heimdal
10653                 else
10654                         krb5_impl=mit
10655                 fi
10656
10657                 if test $krb5_impl = mit; then
10658                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10659 echo "configure:10660: checking for main in -lk5crypto" >&5
10660 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   ac_save_LIBS="$LIBS"
10665 LIBS="-lk5crypto  $LIBS"
10666 cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669
10670 int main() {
10671 main()
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=yes"
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_lib_$ac_lib_var=no"
10682 fi
10683 rm -f conftest*
10684 LIBS="$ac_save_LIBS"
10685
10686 fi
10687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10688   echo "$ac_t""yes" 1>&6
10689   krb5crypto=k5crypto
10690 else
10691   echo "$ac_t""no" 1>&6
10692 krb5crypto=crypto
10693 fi
10694
10695
10696                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10697 echo "configure:10698: checking for main in -lkrb5" >&5
10698 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   ac_save_LIBS="$LIBS"
10703 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707
10708 int main() {
10709 main()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_krb5=yes
10728                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_krb5=no
10732 fi
10733
10734
10735                 elif test $krb5_impl = heimdal; then
10736                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -ldes" >&5
10738 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-ldes  $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   krb5crypto=des
10768 else
10769   echo "$ac_t""no" 1>&6
10770 krb5crypto=crypto
10771 fi
10772
10773
10774                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10775 echo "configure:10776: checking for main in -lkrb5" >&5
10776 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10778   echo $ac_n "(cached) $ac_c" 1>&6
10779 else
10780   ac_save_LIBS="$LIBS"
10781 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10782 cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785
10786 int main() {
10787 main()
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_lib_$ac_lib_var=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=no"
10798 fi
10799 rm -f conftest*
10800 LIBS="$ac_save_LIBS"
10801
10802 fi
10803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805   have_krb5=yes
10806                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10807 else
10808   echo "$ac_t""no" 1>&6
10809 have_krb5=no
10810 fi
10811
10812
10813                         cat >> confdefs.h <<\EOF
10814 #define HAVE_HEIMDAL_KERBEROS 1
10815 EOF
10816
10817
10818                 else
10819                         have_krb5=no
10820                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10821                 fi
10822
10823                 if test $have_krb5 = yes ; then
10824                         ol_link_krb5=yes
10825
10826                         cat >> confdefs.h <<\EOF
10827 #define HAVE_KRB5 1
10828 EOF
10829
10830
10831                         if test $ol_with_kerberos = k5only ; then
10832                                 ol_with_kerberos=found
10833                         fi
10834
10835                 elif test $ol_with_kerberos != auto ; then
10836                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10837                 fi
10838
10839         fi
10840 fi
10841
10842 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10843         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10844
10845         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10846 do
10847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10849 echo "configure:10850: checking for $ac_hdr" >&5
10850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <$ac_hdr>
10857 EOF
10858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10859 { (eval echo configure:10860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10861 if test -z "$ac_err"; then
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=yes"
10864 else
10865   echo "$ac_err" >&5
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=no"
10870 fi
10871 rm -f conftest*
10872 fi
10873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10876   cat >> confdefs.h <<EOF
10877 #define $ac_tr_hdr 1
10878 EOF
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885
10886         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10887                 if test $krb5_impl = mit; then
10888                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10889 echo "configure:10890: checking for main in -lkrb4" >&5
10890 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   ac_save_LIBS="$LIBS"
10895 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10896 cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899
10900 int main() {
10901 main()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_k425=yes
10920                                 KRB4_LIBS="-lkrb4 -ldes425"
10921 else
10922   echo "$ac_t""no" 1>&6
10923 have_k425=no
10924 fi
10925
10926
10927                 elif test $krb5_impl = heimdal; then
10928                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10929 echo "configure:10930: checking for main in -lkrb4" >&5
10930 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   ac_save_LIBS="$LIBS"
10935 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939
10940 int main() {
10941 main()
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=no"
10952 fi
10953 rm -f conftest*
10954 LIBS="$ac_save_LIBS"
10955
10956 fi
10957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   have_k425=yes
10960                                 KRB4_LIBS="-lkrb4"
10961 else
10962   echo "$ac_t""no" 1>&6
10963 have_k425=no
10964 fi
10965
10966
10967                 else
10968                         have_425=no
10969                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10970                 fi
10971
10972                 if test $have_k425 = yes ; then
10973                         ol_with_kerberos=found
10974                         ol_link_krb4=yes
10975
10976                         cat >> confdefs.h <<\EOF
10977 #define HAVE_KRB425 1
10978 EOF
10979
10980                         cat >> confdefs.h <<\EOF
10981 #define HAVE_KRB4 1
10982 EOF
10983
10984
10985                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10986 echo "configure:10987: checking for des_debug in Kerberos libraries" >&5
10987 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   
10991                                                                 save_LIBS="$LIBS"
10992                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10993                                 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996
10997 #include <kerberosIV/krb.h>
10998 #include <kerberosIV/des.h>
10999 extern int des_debug;
11000
11001 int main() {
11002
11003 des_debug = 1;
11004
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   ol_cv_var_des_debug=yes
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   ol_cv_var_des_debug=no
11015 fi
11016 rm -f conftest*
11017                                                                 LIBS="$save_LIBS"
11018                         
11019 fi
11020
11021 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11022
11023                         if test $ol_cv_var_des_debug = yes ; then
11024                                 cat >> confdefs.h <<\EOF
11025 #define HAVE_DES_DEBUG 1
11026 EOF
11027
11028                         fi
11029
11030                         LIBS="$save_LIBS"
11031                 fi
11032         fi
11033 fi
11034
11035 if test $ol_link_krb5 = yes ; then
11036         ol_with_kerberos=found
11037 fi
11038
11039 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11040         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11041
11042         for ac_hdr in krb.h des.h krb-archaeology.h 
11043 do
11044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11046 echo "configure:11047: checking for $ac_hdr" >&5
11047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <$ac_hdr>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 fi
11070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11071   echo "$ac_t""yes" 1>&6
11072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11073   cat >> confdefs.h <<EOF
11074 #define $ac_tr_hdr 1
11075 EOF
11076  
11077 else
11078   echo "$ac_t""no" 1>&6
11079 fi
11080 done
11081
11082
11083         if test $ac_cv_header_krb_h = yes ; then
11084                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11085 echo "configure:11086: checking for main in -lkrb" >&5
11086 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11088   echo $ac_n "(cached) $ac_c" 1>&6
11089 else
11090   ac_save_LIBS="$LIBS"
11091 LIBS="-lkrb -ldes $LIBS"
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095
11096 int main() {
11097 main()
11098 ; return 0; }
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=yes"
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=no"
11108 fi
11109 rm -f conftest*
11110 LIBS="$ac_save_LIBS"
11111
11112 fi
11113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115   have_k4=yes
11116 else
11117   echo "$ac_t""no" 1>&6
11118 have_k4=no
11119 fi
11120
11121
11122                 if test $have_k4 = yes ; then
11123                         ol_with_kerberos=found
11124                         ol_link_krb4=yes
11125
11126                         cat >> confdefs.h <<\EOF
11127 #define HAVE_KRB4 1
11128 EOF
11129
11130
11131                         KRB4_LIBS="-lkrb -ldes"
11132
11133                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11134                                 cat >> confdefs.h <<\EOF
11135 #define HAVE_KTH_KERBEROS 1
11136 EOF
11137
11138                         fi
11139                 fi
11140         fi
11141 fi
11142
11143 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11144         ol_link_kbind=yes
11145
11146 elif test $ol_enable_kbind = yes ; then
11147         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11148 fi
11149
11150 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11151         cat >> confdefs.h <<\EOF
11152 #define HAVE_KERBEROS 1
11153 EOF
11154
11155
11156 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11157         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11158 fi
11159
11160 ol_link_tls=no
11161 if test $ol_with_tls != no ; then
11162         for ac_hdr in openssl/ssl.h ssl.h
11163 do
11164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_hdr" >&5
11167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <$ac_hdr>
11174 EOF
11175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11176 { (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11178 if test -z "$ac_err"; then
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=yes"
11181 else
11182   echo "$ac_err" >&5
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_header_$ac_safe=no"
11187 fi
11188 rm -f conftest*
11189 fi
11190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11193   cat >> confdefs.h <<EOF
11194 #define $ac_tr_hdr 1
11195 EOF
11196  
11197 else
11198   echo "$ac_t""no" 1>&6
11199 fi
11200 done
11201
11202         
11203         if test $ac_cv_header_openssl_ssl_h = yes \
11204                 -o $ac_cv_header_ssl_h = yes ; then
11205                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11206 echo "configure:11207: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11207 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   ac_save_LIBS="$LIBS"
11212 LIBS="-lssl -lcrypto $LIBS"
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* Override any gcc2 internal prototype to avoid an error.  */
11217 /* We use char because int might match the return type of a gcc2
11218     builtin and then its argument prototype would still apply.  */
11219 char SSLeay_add_ssl_algorithms();
11220
11221 int main() {
11222 SSLeay_add_ssl_algorithms()
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=no"
11233 fi
11234 rm -f conftest*
11235 LIBS="$ac_save_LIBS"
11236
11237 fi
11238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240   have_ssleay=yes
11241                         need_rsaref=no
11242 else
11243   echo "$ac_t""no" 1>&6
11244 have_ssleay=no
11245 fi
11246
11247                         
11248                 if test $have_ssleay = no ; then
11249                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11250 echo "configure:11251: checking for SSL_library_init in -lssl" >&5
11251 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   ac_save_LIBS="$LIBS"
11256 LIBS="-lssl -lcrypto $LIBS"
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 /* Override any gcc2 internal prototype to avoid an error.  */
11261 /* We use char because int might match the return type of a gcc2
11262     builtin and then its argument prototype would still apply.  */
11263 char SSL_library_init();
11264
11265 int main() {
11266 SSL_library_init()
11267 ; return 0; }
11268 EOF
11269 if { (eval echo configure:11270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=yes"
11272 else
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -rf conftest*
11276   eval "ac_cv_lib_$ac_lib_var=no"
11277 fi
11278 rm -f conftest*
11279 LIBS="$ac_save_LIBS"
11280
11281 fi
11282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284   have_ssleay=yes
11285                                 need_rsaref=no
11286 else
11287   echo "$ac_t""no" 1>&6
11288 have_ssleay=no
11289 fi
11290
11291                 fi
11292
11293                 if test $have_ssleay = no ; then
11294                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11295 echo "configure:11296: checking for ssl3_accept in -lssl" >&5
11296 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   ac_save_LIBS="$LIBS"
11301 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11302 cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 /* Override any gcc2 internal prototype to avoid an error.  */
11306 /* We use char because int might match the return type of a gcc2
11307     builtin and then its argument prototype would still apply.  */
11308 char ssl3_accept();
11309
11310 int main() {
11311 ssl3_accept()
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11315   rm -rf conftest*
11316   eval "ac_cv_lib_$ac_lib_var=yes"
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   eval "ac_cv_lib_$ac_lib_var=no"
11322 fi
11323 rm -f conftest*
11324 LIBS="$ac_save_LIBS"
11325
11326 fi
11327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329   have_ssleay=yes
11330                                 need_rsaref=yes
11331 else
11332   echo "$ac_t""no" 1>&6
11333 have_ssleay=no
11334 fi
11335
11336                 fi
11337
11338                 if test $have_ssleay = yes ; then
11339                         ol_with_tls=found
11340                         ol_link_tls=yes
11341
11342                         cat >> confdefs.h <<\EOF
11343 #define HAVE_SSLEAY 1
11344 EOF
11345
11346
11347                         if test $need_rsaref = yes; then
11348                                 cat >> confdefs.h <<\EOF
11349 #define HAVE_RSAREF 1
11350 EOF
11351
11352
11353                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11354                         else
11355                                 TLS_LIBS="-lssl -lcrypto"
11356                         fi
11357                 fi
11358         fi
11359
11360 else
11361         echo "configure: warning: TLS data protection not supported!" 1>&2
11362 fi
11363
11364 WITH_TLS=no
11365 if test $ol_link_tls = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define HAVE_TLS 1
11368 EOF
11369
11370         WITH_TLS=yes
11371
11372 elif test $ol_with_tls = auto ; then
11373         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11374         echo "configure: warning: TLS data protection not supported!" 1>&2
11375
11376 elif test $ol_with_tls != no ; then
11377         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11378 fi
11379
11380 if test $ol_enable_lmpasswd != no; then
11381         if test $ol_link_tls != yes ; then
11382                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11383         fi
11384
11385         cat >> confdefs.h <<\EOF
11386 #define SLAPD_LMHASH 1
11387 EOF
11388
11389 fi
11390
11391 ol_link_threads=no
11392
11393 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11394         -o $ol_with_threads = nt ; then
11395
11396         
11397         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11398 echo "configure:11399: checking for _beginthread" >&5
11399 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 /* System header to define __stub macros and hopefully few prototypes,
11406     which can conflict with char _beginthread(); below.  */
11407 #include <assert.h>
11408 /* Override any gcc2 internal prototype to avoid an error.  */
11409 /* We use char because int might match the return type of a gcc2
11410     builtin and then its argument prototype would still apply.  */
11411 char _beginthread();
11412 char (*f)();
11413
11414 int main() {
11415
11416 /* The GNU C library defines this for functions which it implements
11417     to always fail with ENOSYS.  Some functions are actually named
11418     something starting with __ and the normal name is an alias.  */
11419 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11420 choke me
11421 #else
11422 f = _beginthread;
11423 #endif
11424
11425 ; return 0; }
11426 EOF
11427 if { (eval echo configure:11428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11428   rm -rf conftest*
11429   eval "ac_cv_func__beginthread=yes"
11430 else
11431   echo "configure: failed program was:" >&5
11432   cat conftest.$ac_ext >&5
11433   rm -rf conftest*
11434   eval "ac_cv_func__beginthread=no"
11435 fi
11436 rm -f conftest*
11437 fi
11438
11439 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441   :
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445
11446
11447         if test $ac_cv_func__beginthread = yes ; then
11448                 cat >> confdefs.h <<\EOF
11449 #define HAVE_NT_THREADS 1
11450 EOF
11451
11452                 ol_cv_nt_threads=yes
11453         fi
11454
11455
11456         if test "$ol_cv_nt_threads" = yes ; then
11457                 ol_link_threads=nt
11458                 ol_with_threads=found
11459                 ol_with_yielding_select=yes
11460
11461                 cat >> confdefs.h <<\EOF
11462 #define HAVE_NT_SERVICE_MANAGER 1
11463 EOF
11464
11465                 cat >> confdefs.h <<\EOF
11466 #define HAVE_NT_EVENT_LOG 1
11467 EOF
11468
11469         fi
11470
11471         if test $ol_with_threads = nt ; then
11472                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11473         fi
11474 fi
11475
11476 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11477         -o $ol_with_threads = posix ; then
11478
11479         for ac_hdr in pthread.h
11480 do
11481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11483 echo "configure:11484: checking for $ac_hdr" >&5
11484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487   cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <$ac_hdr>
11491 EOF
11492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11493 { (eval echo configure:11494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11495 if test -z "$ac_err"; then
11496   rm -rf conftest*
11497   eval "ac_cv_header_$ac_safe=yes"
11498 else
11499   echo "$ac_err" >&5
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_header_$ac_safe=no"
11504 fi
11505 rm -f conftest*
11506 fi
11507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11508   echo "$ac_t""yes" 1>&6
11509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11510   cat >> confdefs.h <<EOF
11511 #define $ac_tr_hdr 1
11512 EOF
11513  
11514 else
11515   echo "$ac_t""no" 1>&6
11516 fi
11517 done
11518
11519
11520         if test $ac_cv_header_pthread_h = yes ; then
11521                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11522 echo "configure:11523: checking POSIX thread version" >&5
11523 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11524   echo $ac_n "(cached) $ac_c" 1>&6
11525 else
11526   
11527         cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530
11531 #               include <pthread.h>
11532         
11533 int main() {
11534
11535                 int i = PTHREAD_CREATE_JOINABLE;
11536         
11537 ; return 0; }
11538 EOF
11539 if { (eval echo configure:11540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11540   rm -rf conftest*
11541   
11542         cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 #include <pthread.h>
11546 EOF
11547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11548   egrep "pthread_detach" >/dev/null 2>&1; then
11549   rm -rf conftest*
11550   ol_cv_pthread_version=10
11551 else
11552   rm -rf conftest*
11553   ol_cv_pthread_version=8
11554 fi
11555 rm -f conftest*
11556
11557 else
11558   echo "configure: failed program was:" >&5
11559   cat conftest.$ac_ext >&5
11560   rm -rf conftest*
11561   
11562         cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565
11566 #               include <pthread.h>
11567 #               ifdef PTHREAD_CREATE_UNDETACHED
11568                 draft7
11569 #               endif
11570         
11571 EOF
11572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11573   egrep "draft7" >/dev/null 2>&1; then
11574   rm -rf conftest*
11575   ol_cv_pthread_version=7
11576 else
11577   rm -rf conftest*
11578   
11579         cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <pthread.h>
11583 EOF
11584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11585   egrep "pthread_attr_init" >/dev/null 2>&1; then
11586   rm -rf conftest*
11587   ol_cv_pthread_version=6
11588 else
11589   rm -rf conftest*
11590   
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #               include <pthread.h>
11596 #ifdef          PTHREAD_MUTEX_INITIALIZER
11597                 draft5
11598 #endif
11599         
11600 EOF
11601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11602   egrep "draft5" >/dev/null 2>&1; then
11603   rm -rf conftest*
11604   ol_cv_pthread_version=5
11605 else
11606   rm -rf conftest*
11607   ol_cv_pthread_version=4
11608 fi
11609 rm -f conftest*
11610  
11611 fi
11612 rm -f conftest*
11613  
11614 fi
11615 rm -f conftest*
11616  
11617 fi
11618 rm -f conftest*
11619
11620 fi
11621
11622 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11623
11624
11625                 if test $ol_cv_pthread_version != 0 ; then
11626                         cat >> confdefs.h <<EOF
11627 #define HAVE_PTHREADS $ol_cv_pthread_version
11628 EOF
11629
11630                 else
11631                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11632                 fi
11633
11634                 # consider threads found
11635                 ol_with_threads=found
11636
11637                 
11638         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11639 echo "configure:11640: checking for LinuxThreads pthread.h" >&5
11640 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11641   echo $ac_n "(cached) $ac_c" 1>&6
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <pthread.h>
11647 EOF
11648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11649   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11650   rm -rf conftest*
11651   ol_cv_header_linux_threads=yes
11652 else
11653   rm -rf conftest*
11654   ol_cv_header_linux_threads=no
11655 fi
11656 rm -f conftest*
11657
11658                 
11659 fi
11660
11661 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11662         if test $ol_cv_header_linux_threads = yes; then
11663                 cat >> confdefs.h <<\EOF
11664 #define HAVE_LINUX_THREADS 1
11665 EOF
11666
11667         fi
11668
11669                 
11670         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11671 echo "configure:11672: checking for GNU Pth pthread.h" >&5
11672 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11673   echo $ac_n "(cached) $ac_c" 1>&6
11674 else
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <pthread.h>
11679 #ifdef _POSIX_THREAD_IS_GNU_PTH
11680         __gnu_pth__;
11681 #endif
11682
11683 EOF
11684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11685   egrep "__gnu_pth__" >/dev/null 2>&1; then
11686   rm -rf conftest*
11687   ol_cv_header_gnu_pth_pthread_h=yes
11688 else
11689   rm -rf conftest*
11690   ol_cv_header_gnu_pth_pthread_h=no
11691 fi
11692 rm -f conftest*
11693
11694                 
11695 fi
11696
11697 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11698
11699
11700                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11701                         for ac_hdr in sched.h
11702 do
11703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11705 echo "configure:11706: checking for $ac_hdr" >&5
11706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <$ac_hdr>
11713 EOF
11714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11715 { (eval echo configure:11716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11717 if test -z "$ac_err"; then
11718   rm -rf conftest*
11719   eval "ac_cv_header_$ac_safe=yes"
11720 else
11721   echo "$ac_err" >&5
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -rf conftest*
11725   eval "ac_cv_header_$ac_safe=no"
11726 fi
11727 rm -f conftest*
11728 fi
11729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11732   cat >> confdefs.h <<EOF
11733 #define $ac_tr_hdr 1
11734 EOF
11735  
11736 else
11737   echo "$ac_t""no" 1>&6
11738 fi
11739 done
11740
11741                 fi
11742
11743                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11744                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11745 echo "configure:11746: checking for pthread_create in default libraries" >&5
11746 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750                 if test "$cross_compiling" = yes; then
11751   cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 /* pthread test headers */
11755 #include <pthread.h>
11756 #if HAVE_PTHREADS < 7
11757 #include <errno.h>
11758 #endif
11759 #ifndef NULL
11760 #define NULL (void*)0
11761 #endif
11762
11763 static void *task(p)
11764         void *p;
11765 {
11766         return (void *) (p == NULL);
11767 }
11768
11769 int main() {
11770
11771         /* pthread test function */
11772 #ifndef PTHREAD_CREATE_DETACHED
11773 #define PTHREAD_CREATE_DETACHED 1
11774 #endif
11775         pthread_t t;
11776         int status;
11777         int detach = PTHREAD_CREATE_DETACHED;
11778
11779 #if HAVE_PTHREADS > 4
11780         /* Final pthreads */
11781         pthread_attr_t attr;
11782
11783         status = pthread_attr_init(&attr);
11784         if( status ) return status;
11785
11786 #if HAVE_PTHREADS < 7
11787         status = pthread_attr_setdetachstate(&attr, &detach);
11788         if( status < 0 ) status = errno;
11789 #else
11790         status = pthread_attr_setdetachstate(&attr, detach);
11791 #endif
11792         if( status ) return status;
11793         status = pthread_create( &t, &attr, task, NULL );
11794 #if HAVE_PTHREADS < 7
11795         if( status < 0 ) status = errno;
11796 #endif
11797         if( status ) return status;
11798 #else
11799         /* Draft 4 pthreads */
11800         status = pthread_create( &t, pthread_attr_default, task, NULL );
11801         if( status ) return errno;
11802
11803         /* give thread a chance to complete */
11804         /* it should remain joinable and hence detachable */
11805         sleep( 1 );
11806
11807         status = pthread_detach( &t );
11808         if( status ) return errno;
11809 #endif
11810
11811 #ifdef HAVE_LINUX_THREADS
11812         pthread_kill_other_threads_np();
11813 #endif
11814
11815         return 0;
11816
11817 ; return 0; }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11820   rm -rf conftest*
11821   ol_cv_pthread_create=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   ol_cv_pthread_create=no
11827 fi
11828 rm -f conftest*
11829 else
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* pthread test headers */
11834 #include <pthread.h>
11835 #if HAVE_PTHREADS < 7
11836 #include <errno.h>
11837 #endif
11838 #ifndef NULL
11839 #define NULL (void*)0
11840 #endif
11841
11842 static void *task(p)
11843         void *p;
11844 {
11845         return (void *) (p == NULL);
11846 }
11847
11848
11849 int main(argc, argv)
11850         int argc;
11851         char **argv;
11852 {
11853
11854         /* pthread test function */
11855 #ifndef PTHREAD_CREATE_DETACHED
11856 #define PTHREAD_CREATE_DETACHED 1
11857 #endif
11858         pthread_t t;
11859         int status;
11860         int detach = PTHREAD_CREATE_DETACHED;
11861
11862 #if HAVE_PTHREADS > 4
11863         /* Final pthreads */
11864         pthread_attr_t attr;
11865
11866         status = pthread_attr_init(&attr);
11867         if( status ) return status;
11868
11869 #if HAVE_PTHREADS < 7
11870         status = pthread_attr_setdetachstate(&attr, &detach);
11871         if( status < 0 ) status = errno;
11872 #else
11873         status = pthread_attr_setdetachstate(&attr, detach);
11874 #endif
11875         if( status ) return status;
11876         status = pthread_create( &t, &attr, task, NULL );
11877 #if HAVE_PTHREADS < 7
11878         if( status < 0 ) status = errno;
11879 #endif
11880         if( status ) return status;
11881 #else
11882         /* Draft 4 pthreads */
11883         status = pthread_create( &t, pthread_attr_default, task, NULL );
11884         if( status ) return errno;
11885
11886         /* give thread a chance to complete */
11887         /* it should remain joinable and hence detachable */
11888         sleep( 1 );
11889
11890         status = pthread_detach( &t );
11891         if( status ) return errno;
11892 #endif
11893
11894 #ifdef HAVE_LINUX_THREADS
11895         pthread_kill_other_threads_np();
11896 #endif
11897
11898         return 0;
11899
11900 }
11901
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11904 then
11905   ol_cv_pthread_create=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -fr conftest*
11910   ol_cv_pthread_create=no
11911 fi
11912 rm -fr conftest*
11913 fi
11914
11915 fi
11916
11917 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11918
11919                 if test $ol_cv_pthread_create != no ; then
11920                         ol_link_threads=posix
11921                         ol_link_pthreads=""
11922                 fi
11923                 
11924                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11925 if test "$ol_link_threads" = no ; then
11926         # try -kthread
11927         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11928 echo "configure:11929: checking for pthread link with -kthread" >&5
11929 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11930   echo $ac_n "(cached) $ac_c" 1>&6
11931 else
11932   
11933                 # save the flags
11934                 ol_LIBS="$LIBS"
11935                 LIBS="-kthread $LIBS"
11936
11937                 if test "$cross_compiling" = yes; then
11938   cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 /* pthread test headers */
11942 #include <pthread.h>
11943 #if HAVE_PTHREADS < 7
11944 #include <errno.h>
11945 #endif
11946 #ifndef NULL
11947 #define NULL (void*)0
11948 #endif
11949
11950 static void *task(p)
11951         void *p;
11952 {
11953         return (void *) (p == NULL);
11954 }
11955
11956 int main() {
11957
11958         /* pthread test function */
11959 #ifndef PTHREAD_CREATE_DETACHED
11960 #define PTHREAD_CREATE_DETACHED 1
11961 #endif
11962         pthread_t t;
11963         int status;
11964         int detach = PTHREAD_CREATE_DETACHED;
11965
11966 #if HAVE_PTHREADS > 4
11967         /* Final pthreads */
11968         pthread_attr_t attr;
11969
11970         status = pthread_attr_init(&attr);
11971         if( status ) return status;
11972
11973 #if HAVE_PTHREADS < 7
11974         status = pthread_attr_setdetachstate(&attr, &detach);
11975         if( status < 0 ) status = errno;
11976 #else
11977         status = pthread_attr_setdetachstate(&attr, detach);
11978 #endif
11979         if( status ) return status;
11980         status = pthread_create( &t, &attr, task, NULL );
11981 #if HAVE_PTHREADS < 7
11982         if( status < 0 ) status = errno;
11983 #endif
11984         if( status ) return status;
11985 #else
11986         /* Draft 4 pthreads */
11987         status = pthread_create( &t, pthread_attr_default, task, NULL );
11988         if( status ) return errno;
11989
11990         /* give thread a chance to complete */
11991         /* it should remain joinable and hence detachable */
11992         sleep( 1 );
11993
11994         status = pthread_detach( &t );
11995         if( status ) return errno;
11996 #endif
11997
11998 #ifdef HAVE_LINUX_THREADS
11999         pthread_kill_other_threads_np();
12000 #endif
12001
12002         return 0;
12003
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   ol_cv_pthread_kthread=yes
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   ol_cv_pthread_kthread=no
12014 fi
12015 rm -f conftest*
12016 else
12017   cat > conftest.$ac_ext <<EOF
12018 #line 12019 "configure"
12019 #include "confdefs.h"
12020 /* pthread test headers */
12021 #include <pthread.h>
12022 #if HAVE_PTHREADS < 7
12023 #include <errno.h>
12024 #endif
12025 #ifndef NULL
12026 #define NULL (void*)0
12027 #endif
12028
12029 static void *task(p)
12030         void *p;
12031 {
12032         return (void *) (p == NULL);
12033 }
12034
12035
12036 int main(argc, argv)
12037         int argc;
12038         char **argv;
12039 {
12040
12041         /* pthread test function */
12042 #ifndef PTHREAD_CREATE_DETACHED
12043 #define PTHREAD_CREATE_DETACHED 1
12044 #endif
12045         pthread_t t;
12046         int status;
12047         int detach = PTHREAD_CREATE_DETACHED;
12048
12049 #if HAVE_PTHREADS > 4
12050         /* Final pthreads */
12051         pthread_attr_t attr;
12052
12053         status = pthread_attr_init(&attr);
12054         if( status ) return status;
12055
12056 #if HAVE_PTHREADS < 7
12057         status = pthread_attr_setdetachstate(&attr, &detach);
12058         if( status < 0 ) status = errno;
12059 #else
12060         status = pthread_attr_setdetachstate(&attr, detach);
12061 #endif
12062         if( status ) return status;
12063         status = pthread_create( &t, &attr, task, NULL );
12064 #if HAVE_PTHREADS < 7
12065         if( status < 0 ) status = errno;
12066 #endif
12067         if( status ) return status;
12068 #else
12069         /* Draft 4 pthreads */
12070         status = pthread_create( &t, pthread_attr_default, task, NULL );
12071         if( status ) return errno;
12072
12073         /* give thread a chance to complete */
12074         /* it should remain joinable and hence detachable */
12075         sleep( 1 );
12076
12077         status = pthread_detach( &t );
12078         if( status ) return errno;
12079 #endif
12080
12081 #ifdef HAVE_LINUX_THREADS
12082         pthread_kill_other_threads_np();
12083 #endif
12084
12085         return 0;
12086
12087 }
12088
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12091 then
12092   ol_cv_pthread_kthread=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -fr conftest*
12097   ol_cv_pthread_kthread=no
12098 fi
12099 rm -fr conftest*
12100 fi
12101
12102
12103                 # restore the LIBS
12104                 LIBS="$ol_LIBS"
12105         
12106 fi
12107
12108 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12109
12110         if test $ol_cv_pthread_kthread = yes ; then
12111                 ol_link_pthreads="-kthread"
12112                 ol_link_threads=posix
12113         fi
12114 fi
12115
12116                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12117 if test "$ol_link_threads" = no ; then
12118         # try -pthread
12119         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12120 echo "configure:12121: checking for pthread link with -pthread" >&5
12121 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12122   echo $ac_n "(cached) $ac_c" 1>&6
12123 else
12124   
12125                 # save the flags
12126                 ol_LIBS="$LIBS"
12127                 LIBS="-pthread $LIBS"
12128
12129                 if test "$cross_compiling" = yes; then
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* pthread test headers */
12134 #include <pthread.h>
12135 #if HAVE_PTHREADS < 7
12136 #include <errno.h>
12137 #endif
12138 #ifndef NULL
12139 #define NULL (void*)0
12140 #endif
12141
12142 static void *task(p)
12143         void *p;
12144 {
12145         return (void *) (p == NULL);
12146 }
12147
12148 int main() {
12149
12150         /* pthread test function */
12151 #ifndef PTHREAD_CREATE_DETACHED
12152 #define PTHREAD_CREATE_DETACHED 1
12153 #endif
12154         pthread_t t;
12155         int status;
12156         int detach = PTHREAD_CREATE_DETACHED;
12157
12158 #if HAVE_PTHREADS > 4
12159         /* Final pthreads */
12160         pthread_attr_t attr;
12161
12162         status = pthread_attr_init(&attr);
12163         if( status ) return status;
12164
12165 #if HAVE_PTHREADS < 7
12166         status = pthread_attr_setdetachstate(&attr, &detach);
12167         if( status < 0 ) status = errno;
12168 #else
12169         status = pthread_attr_setdetachstate(&attr, detach);
12170 #endif
12171         if( status ) return status;
12172         status = pthread_create( &t, &attr, task, NULL );
12173 #if HAVE_PTHREADS < 7
12174         if( status < 0 ) status = errno;
12175 #endif
12176         if( status ) return status;
12177 #else
12178         /* Draft 4 pthreads */
12179         status = pthread_create( &t, pthread_attr_default, task, NULL );
12180         if( status ) return errno;
12181
12182         /* give thread a chance to complete */
12183         /* it should remain joinable and hence detachable */
12184         sleep( 1 );
12185
12186         status = pthread_detach( &t );
12187         if( status ) return errno;
12188 #endif
12189
12190 #ifdef HAVE_LINUX_THREADS
12191         pthread_kill_other_threads_np();
12192 #endif
12193
12194         return 0;
12195
12196 ; return 0; }
12197 EOF
12198 if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12199   rm -rf conftest*
12200   ol_cv_pthread_pthread=yes
12201 else
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -rf conftest*
12205   ol_cv_pthread_pthread=no
12206 fi
12207 rm -f conftest*
12208 else
12209   cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212 /* pthread test headers */
12213 #include <pthread.h>
12214 #if HAVE_PTHREADS < 7
12215 #include <errno.h>
12216 #endif
12217 #ifndef NULL
12218 #define NULL (void*)0
12219 #endif
12220
12221 static void *task(p)
12222         void *p;
12223 {
12224         return (void *) (p == NULL);
12225 }
12226
12227
12228 int main(argc, argv)
12229         int argc;
12230         char **argv;
12231 {
12232
12233         /* pthread test function */
12234 #ifndef PTHREAD_CREATE_DETACHED
12235 #define PTHREAD_CREATE_DETACHED 1
12236 #endif
12237         pthread_t t;
12238         int status;
12239         int detach = PTHREAD_CREATE_DETACHED;
12240
12241 #if HAVE_PTHREADS > 4
12242         /* Final pthreads */
12243         pthread_attr_t attr;
12244
12245         status = pthread_attr_init(&attr);
12246         if( status ) return status;
12247
12248 #if HAVE_PTHREADS < 7
12249         status = pthread_attr_setdetachstate(&attr, &detach);
12250         if( status < 0 ) status = errno;
12251 #else
12252         status = pthread_attr_setdetachstate(&attr, detach);
12253 #endif
12254         if( status ) return status;
12255         status = pthread_create( &t, &attr, task, NULL );
12256 #if HAVE_PTHREADS < 7
12257         if( status < 0 ) status = errno;
12258 #endif
12259         if( status ) return status;
12260 #else
12261         /* Draft 4 pthreads */
12262         status = pthread_create( &t, pthread_attr_default, task, NULL );
12263         if( status ) return errno;
12264
12265         /* give thread a chance to complete */
12266         /* it should remain joinable and hence detachable */
12267         sleep( 1 );
12268
12269         status = pthread_detach( &t );
12270         if( status ) return errno;
12271 #endif
12272
12273 #ifdef HAVE_LINUX_THREADS
12274         pthread_kill_other_threads_np();
12275 #endif
12276
12277         return 0;
12278
12279 }
12280
12281 EOF
12282 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12283 then
12284   ol_cv_pthread_pthread=yes
12285 else
12286   echo "configure: failed program was:" >&5
12287   cat conftest.$ac_ext >&5
12288   rm -fr conftest*
12289   ol_cv_pthread_pthread=no
12290 fi
12291 rm -fr conftest*
12292 fi
12293
12294
12295                 # restore the LIBS
12296                 LIBS="$ol_LIBS"
12297         
12298 fi
12299
12300 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12301
12302         if test $ol_cv_pthread_pthread = yes ; then
12303                 ol_link_pthreads="-pthread"
12304                 ol_link_threads=posix
12305         fi
12306 fi
12307
12308                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12309 if test "$ol_link_threads" = no ; then
12310         # try -pthreads
12311         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12312 echo "configure:12313: checking for pthread link with -pthreads" >&5
12313 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12314   echo $ac_n "(cached) $ac_c" 1>&6
12315 else
12316   
12317                 # save the flags
12318                 ol_LIBS="$LIBS"
12319                 LIBS="-pthreads $LIBS"
12320
12321                 if test "$cross_compiling" = yes; then
12322   cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 /* pthread test headers */
12326 #include <pthread.h>
12327 #if HAVE_PTHREADS < 7
12328 #include <errno.h>
12329 #endif
12330 #ifndef NULL
12331 #define NULL (void*)0
12332 #endif
12333
12334 static void *task(p)
12335         void *p;
12336 {
12337         return (void *) (p == NULL);
12338 }
12339
12340 int main() {
12341
12342         /* pthread test function */
12343 #ifndef PTHREAD_CREATE_DETACHED
12344 #define PTHREAD_CREATE_DETACHED 1
12345 #endif
12346         pthread_t t;
12347         int status;
12348         int detach = PTHREAD_CREATE_DETACHED;
12349
12350 #if HAVE_PTHREADS > 4
12351         /* Final pthreads */
12352         pthread_attr_t attr;
12353
12354         status = pthread_attr_init(&attr);
12355         if( status ) return status;
12356
12357 #if HAVE_PTHREADS < 7
12358         status = pthread_attr_setdetachstate(&attr, &detach);
12359         if( status < 0 ) status = errno;
12360 #else
12361         status = pthread_attr_setdetachstate(&attr, detach);
12362 #endif
12363         if( status ) return status;
12364         status = pthread_create( &t, &attr, task, NULL );
12365 #if HAVE_PTHREADS < 7
12366         if( status < 0 ) status = errno;
12367 #endif
12368         if( status ) return status;
12369 #else
12370         /* Draft 4 pthreads */
12371         status = pthread_create( &t, pthread_attr_default, task, NULL );
12372         if( status ) return errno;
12373
12374         /* give thread a chance to complete */
12375         /* it should remain joinable and hence detachable */
12376         sleep( 1 );
12377
12378         status = pthread_detach( &t );
12379         if( status ) return errno;
12380 #endif
12381
12382 #ifdef HAVE_LINUX_THREADS
12383         pthread_kill_other_threads_np();
12384 #endif
12385
12386         return 0;
12387
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   ol_cv_pthread_pthreads=yes
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   ol_cv_pthread_pthreads=no
12398 fi
12399 rm -f conftest*
12400 else
12401   cat > conftest.$ac_ext <<EOF
12402 #line 12403 "configure"
12403 #include "confdefs.h"
12404 /* pthread test headers */
12405 #include <pthread.h>
12406 #if HAVE_PTHREADS < 7
12407 #include <errno.h>
12408 #endif
12409 #ifndef NULL
12410 #define NULL (void*)0
12411 #endif
12412
12413 static void *task(p)
12414         void *p;
12415 {
12416         return (void *) (p == NULL);
12417 }
12418
12419
12420 int main(argc, argv)
12421         int argc;
12422         char **argv;
12423 {
12424
12425         /* pthread test function */
12426 #ifndef PTHREAD_CREATE_DETACHED
12427 #define PTHREAD_CREATE_DETACHED 1
12428 #endif
12429         pthread_t t;
12430         int status;
12431         int detach = PTHREAD_CREATE_DETACHED;
12432
12433 #if HAVE_PTHREADS > 4
12434         /* Final pthreads */
12435         pthread_attr_t attr;
12436
12437         status = pthread_attr_init(&attr);
12438         if( status ) return status;
12439
12440 #if HAVE_PTHREADS < 7
12441         status = pthread_attr_setdetachstate(&attr, &detach);
12442         if( status < 0 ) status = errno;
12443 #else
12444         status = pthread_attr_setdetachstate(&attr, detach);
12445 #endif
12446         if( status ) return status;
12447         status = pthread_create( &t, &attr, task, NULL );
12448 #if HAVE_PTHREADS < 7
12449         if( status < 0 ) status = errno;
12450 #endif
12451         if( status ) return status;
12452 #else
12453         /* Draft 4 pthreads */
12454         status = pthread_create( &t, pthread_attr_default, task, NULL );
12455         if( status ) return errno;
12456
12457         /* give thread a chance to complete */
12458         /* it should remain joinable and hence detachable */
12459         sleep( 1 );
12460
12461         status = pthread_detach( &t );
12462         if( status ) return errno;
12463 #endif
12464
12465 #ifdef HAVE_LINUX_THREADS
12466         pthread_kill_other_threads_np();
12467 #endif
12468
12469         return 0;
12470
12471 }
12472
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12475 then
12476   ol_cv_pthread_pthreads=yes
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -fr conftest*
12481   ol_cv_pthread_pthreads=no
12482 fi
12483 rm -fr conftest*
12484 fi
12485
12486
12487                 # restore the LIBS
12488                 LIBS="$ol_LIBS"
12489         
12490 fi
12491
12492 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12493
12494         if test $ol_cv_pthread_pthreads = yes ; then
12495                 ol_link_pthreads="-pthreads"
12496                 ol_link_threads=posix
12497         fi
12498 fi
12499
12500                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12501 if test "$ol_link_threads" = no ; then
12502         # try -mthreads
12503         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12504 echo "configure:12505: checking for pthread link with -mthreads" >&5
12505 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12506   echo $ac_n "(cached) $ac_c" 1>&6
12507 else
12508   
12509                 # save the flags
12510                 ol_LIBS="$LIBS"
12511                 LIBS="-mthreads $LIBS"
12512
12513                 if test "$cross_compiling" = yes; then
12514   cat > conftest.$ac_ext <<EOF
12515 #line 12516 "configure"
12516 #include "confdefs.h"
12517 /* pthread test headers */
12518 #include <pthread.h>
12519 #if HAVE_PTHREADS < 7
12520 #include <errno.h>
12521 #endif
12522 #ifndef NULL
12523 #define NULL (void*)0
12524 #endif
12525
12526 static void *task(p)
12527         void *p;
12528 {
12529         return (void *) (p == NULL);
12530 }
12531
12532 int main() {
12533
12534         /* pthread test function */
12535 #ifndef PTHREAD_CREATE_DETACHED
12536 #define PTHREAD_CREATE_DETACHED 1
12537 #endif
12538         pthread_t t;
12539         int status;
12540         int detach = PTHREAD_CREATE_DETACHED;
12541
12542 #if HAVE_PTHREADS > 4
12543         /* Final pthreads */
12544         pthread_attr_t attr;
12545
12546         status = pthread_attr_init(&attr);
12547         if( status ) return status;
12548
12549 #if HAVE_PTHREADS < 7
12550         status = pthread_attr_setdetachstate(&attr, &detach);
12551         if( status < 0 ) status = errno;
12552 #else
12553         status = pthread_attr_setdetachstate(&attr, detach);
12554 #endif
12555         if( status ) return status;
12556         status = pthread_create( &t, &attr, task, NULL );
12557 #if HAVE_PTHREADS < 7
12558         if( status < 0 ) status = errno;
12559 #endif
12560         if( status ) return status;
12561 #else
12562         /* Draft 4 pthreads */
12563         status = pthread_create( &t, pthread_attr_default, task, NULL );
12564         if( status ) return errno;
12565
12566         /* give thread a chance to complete */
12567         /* it should remain joinable and hence detachable */
12568         sleep( 1 );
12569
12570         status = pthread_detach( &t );
12571         if( status ) return errno;
12572 #endif
12573
12574 #ifdef HAVE_LINUX_THREADS
12575         pthread_kill_other_threads_np();
12576 #endif
12577
12578         return 0;
12579
12580 ; return 0; }
12581 EOF
12582 if { (eval echo configure:12583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12583   rm -rf conftest*
12584   ol_cv_pthread_mthreads=yes
12585 else
12586   echo "configure: failed program was:" >&5
12587   cat conftest.$ac_ext >&5
12588   rm -rf conftest*
12589   ol_cv_pthread_mthreads=no
12590 fi
12591 rm -f conftest*
12592 else
12593   cat > conftest.$ac_ext <<EOF
12594 #line 12595 "configure"
12595 #include "confdefs.h"
12596 /* pthread test headers */
12597 #include <pthread.h>
12598 #if HAVE_PTHREADS < 7
12599 #include <errno.h>
12600 #endif
12601 #ifndef NULL
12602 #define NULL (void*)0
12603 #endif
12604
12605 static void *task(p)
12606         void *p;
12607 {
12608         return (void *) (p == NULL);
12609 }
12610
12611
12612 int main(argc, argv)
12613         int argc;
12614         char **argv;
12615 {
12616
12617         /* pthread test function */
12618 #ifndef PTHREAD_CREATE_DETACHED
12619 #define PTHREAD_CREATE_DETACHED 1
12620 #endif
12621         pthread_t t;
12622         int status;
12623         int detach = PTHREAD_CREATE_DETACHED;
12624
12625 #if HAVE_PTHREADS > 4
12626         /* Final pthreads */
12627         pthread_attr_t attr;
12628
12629         status = pthread_attr_init(&attr);
12630         if( status ) return status;
12631
12632 #if HAVE_PTHREADS < 7
12633         status = pthread_attr_setdetachstate(&attr, &detach);
12634         if( status < 0 ) status = errno;
12635 #else
12636         status = pthread_attr_setdetachstate(&attr, detach);
12637 #endif
12638         if( status ) return status;
12639         status = pthread_create( &t, &attr, task, NULL );
12640 #if HAVE_PTHREADS < 7
12641         if( status < 0 ) status = errno;
12642 #endif
12643         if( status ) return status;
12644 #else
12645         /* Draft 4 pthreads */
12646         status = pthread_create( &t, pthread_attr_default, task, NULL );
12647         if( status ) return errno;
12648
12649         /* give thread a chance to complete */
12650         /* it should remain joinable and hence detachable */
12651         sleep( 1 );
12652
12653         status = pthread_detach( &t );
12654         if( status ) return errno;
12655 #endif
12656
12657 #ifdef HAVE_LINUX_THREADS
12658         pthread_kill_other_threads_np();
12659 #endif
12660
12661         return 0;
12662
12663 }
12664
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12667 then
12668   ol_cv_pthread_mthreads=yes
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -fr conftest*
12673   ol_cv_pthread_mthreads=no
12674 fi
12675 rm -fr conftest*
12676 fi
12677
12678
12679                 # restore the LIBS
12680                 LIBS="$ol_LIBS"
12681         
12682 fi
12683
12684 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12685
12686         if test $ol_cv_pthread_mthreads = yes ; then
12687                 ol_link_pthreads="-mthreads"
12688                 ol_link_threads=posix
12689         fi
12690 fi
12691
12692                 # Pthread try link: -thread (ol_cv_pthread_thread)
12693 if test "$ol_link_threads" = no ; then
12694         # try -thread
12695         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12696 echo "configure:12697: checking for pthread link with -thread" >&5
12697 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12698   echo $ac_n "(cached) $ac_c" 1>&6
12699 else
12700   
12701                 # save the flags
12702                 ol_LIBS="$LIBS"
12703                 LIBS="-thread $LIBS"
12704
12705                 if test "$cross_compiling" = yes; then
12706   cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 /* pthread test headers */
12710 #include <pthread.h>
12711 #if HAVE_PTHREADS < 7
12712 #include <errno.h>
12713 #endif
12714 #ifndef NULL
12715 #define NULL (void*)0
12716 #endif
12717
12718 static void *task(p)
12719         void *p;
12720 {
12721         return (void *) (p == NULL);
12722 }
12723
12724 int main() {
12725
12726         /* pthread test function */
12727 #ifndef PTHREAD_CREATE_DETACHED
12728 #define PTHREAD_CREATE_DETACHED 1
12729 #endif
12730         pthread_t t;
12731         int status;
12732         int detach = PTHREAD_CREATE_DETACHED;
12733
12734 #if HAVE_PTHREADS > 4
12735         /* Final pthreads */
12736         pthread_attr_t attr;
12737
12738         status = pthread_attr_init(&attr);
12739         if( status ) return status;
12740
12741 #if HAVE_PTHREADS < 7
12742         status = pthread_attr_setdetachstate(&attr, &detach);
12743         if( status < 0 ) status = errno;
12744 #else
12745         status = pthread_attr_setdetachstate(&attr, detach);
12746 #endif
12747         if( status ) return status;
12748         status = pthread_create( &t, &attr, task, NULL );
12749 #if HAVE_PTHREADS < 7
12750         if( status < 0 ) status = errno;
12751 #endif
12752         if( status ) return status;
12753 #else
12754         /* Draft 4 pthreads */
12755         status = pthread_create( &t, pthread_attr_default, task, NULL );
12756         if( status ) return errno;
12757
12758         /* give thread a chance to complete */
12759         /* it should remain joinable and hence detachable */
12760         sleep( 1 );
12761
12762         status = pthread_detach( &t );
12763         if( status ) return errno;
12764 #endif
12765
12766 #ifdef HAVE_LINUX_THREADS
12767         pthread_kill_other_threads_np();
12768 #endif
12769
12770         return 0;
12771
12772 ; return 0; }
12773 EOF
12774 if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12775   rm -rf conftest*
12776   ol_cv_pthread_thread=yes
12777 else
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   ol_cv_pthread_thread=no
12782 fi
12783 rm -f conftest*
12784 else
12785   cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 /* pthread test headers */
12789 #include <pthread.h>
12790 #if HAVE_PTHREADS < 7
12791 #include <errno.h>
12792 #endif
12793 #ifndef NULL
12794 #define NULL (void*)0
12795 #endif
12796
12797 static void *task(p)
12798         void *p;
12799 {
12800         return (void *) (p == NULL);
12801 }
12802
12803
12804 int main(argc, argv)
12805         int argc;
12806         char **argv;
12807 {
12808
12809         /* pthread test function */
12810 #ifndef PTHREAD_CREATE_DETACHED
12811 #define PTHREAD_CREATE_DETACHED 1
12812 #endif
12813         pthread_t t;
12814         int status;
12815         int detach = PTHREAD_CREATE_DETACHED;
12816
12817 #if HAVE_PTHREADS > 4
12818         /* Final pthreads */
12819         pthread_attr_t attr;
12820
12821         status = pthread_attr_init(&attr);
12822         if( status ) return status;
12823
12824 #if HAVE_PTHREADS < 7
12825         status = pthread_attr_setdetachstate(&attr, &detach);
12826         if( status < 0 ) status = errno;
12827 #else
12828         status = pthread_attr_setdetachstate(&attr, detach);
12829 #endif
12830         if( status ) return status;
12831         status = pthread_create( &t, &attr, task, NULL );
12832 #if HAVE_PTHREADS < 7
12833         if( status < 0 ) status = errno;
12834 #endif
12835         if( status ) return status;
12836 #else
12837         /* Draft 4 pthreads */
12838         status = pthread_create( &t, pthread_attr_default, task, NULL );
12839         if( status ) return errno;
12840
12841         /* give thread a chance to complete */
12842         /* it should remain joinable and hence detachable */
12843         sleep( 1 );
12844
12845         status = pthread_detach( &t );
12846         if( status ) return errno;
12847 #endif
12848
12849 #ifdef HAVE_LINUX_THREADS
12850         pthread_kill_other_threads_np();
12851 #endif
12852
12853         return 0;
12854
12855 }
12856
12857 EOF
12858 if { (eval echo configure:12859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12859 then
12860   ol_cv_pthread_thread=yes
12861 else
12862   echo "configure: failed program was:" >&5
12863   cat conftest.$ac_ext >&5
12864   rm -fr conftest*
12865   ol_cv_pthread_thread=no
12866 fi
12867 rm -fr conftest*
12868 fi
12869
12870
12871                 # restore the LIBS
12872                 LIBS="$ol_LIBS"
12873         
12874 fi
12875
12876 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12877
12878         if test $ol_cv_pthread_thread = yes ; then
12879                 ol_link_pthreads="-thread"
12880                 ol_link_threads=posix
12881         fi
12882 fi
12883
12884
12885                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12886 if test "$ol_link_threads" = no ; then
12887         # try -lpthread -lmach -lexc -lc_r
12888         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12889 echo "configure:12890: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12890 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12891   echo $ac_n "(cached) $ac_c" 1>&6
12892 else
12893   
12894                 # save the flags
12895                 ol_LIBS="$LIBS"
12896                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12897
12898                 if test "$cross_compiling" = yes; then
12899   cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902 /* pthread test headers */
12903 #include <pthread.h>
12904 #if HAVE_PTHREADS < 7
12905 #include <errno.h>
12906 #endif
12907 #ifndef NULL
12908 #define NULL (void*)0
12909 #endif
12910
12911 static void *task(p)
12912         void *p;
12913 {
12914         return (void *) (p == NULL);
12915 }
12916
12917 int main() {
12918
12919         /* pthread test function */
12920 #ifndef PTHREAD_CREATE_DETACHED
12921 #define PTHREAD_CREATE_DETACHED 1
12922 #endif
12923         pthread_t t;
12924         int status;
12925         int detach = PTHREAD_CREATE_DETACHED;
12926
12927 #if HAVE_PTHREADS > 4
12928         /* Final pthreads */
12929         pthread_attr_t attr;
12930
12931         status = pthread_attr_init(&attr);
12932         if( status ) return status;
12933
12934 #if HAVE_PTHREADS < 7
12935         status = pthread_attr_setdetachstate(&attr, &detach);
12936         if( status < 0 ) status = errno;
12937 #else
12938         status = pthread_attr_setdetachstate(&attr, detach);
12939 #endif
12940         if( status ) return status;
12941         status = pthread_create( &t, &attr, task, NULL );
12942 #if HAVE_PTHREADS < 7
12943         if( status < 0 ) status = errno;
12944 #endif
12945         if( status ) return status;
12946 #else
12947         /* Draft 4 pthreads */
12948         status = pthread_create( &t, pthread_attr_default, task, NULL );
12949         if( status ) return errno;
12950
12951         /* give thread a chance to complete */
12952         /* it should remain joinable and hence detachable */
12953         sleep( 1 );
12954
12955         status = pthread_detach( &t );
12956         if( status ) return errno;
12957 #endif
12958
12959 #ifdef HAVE_LINUX_THREADS
12960         pthread_kill_other_threads_np();
12961 #endif
12962
12963         return 0;
12964
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12968   rm -rf conftest*
12969   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12975 fi
12976 rm -f conftest*
12977 else
12978   cat > conftest.$ac_ext <<EOF
12979 #line 12980 "configure"
12980 #include "confdefs.h"
12981 /* pthread test headers */
12982 #include <pthread.h>
12983 #if HAVE_PTHREADS < 7
12984 #include <errno.h>
12985 #endif
12986 #ifndef NULL
12987 #define NULL (void*)0
12988 #endif
12989
12990 static void *task(p)
12991         void *p;
12992 {
12993         return (void *) (p == NULL);
12994 }
12995
12996
12997 int main(argc, argv)
12998         int argc;
12999         char **argv;
13000 {
13001
13002         /* pthread test function */
13003 #ifndef PTHREAD_CREATE_DETACHED
13004 #define PTHREAD_CREATE_DETACHED 1
13005 #endif
13006         pthread_t t;
13007         int status;
13008         int detach = PTHREAD_CREATE_DETACHED;
13009
13010 #if HAVE_PTHREADS > 4
13011         /* Final pthreads */
13012         pthread_attr_t attr;
13013
13014         status = pthread_attr_init(&attr);
13015         if( status ) return status;
13016
13017 #if HAVE_PTHREADS < 7
13018         status = pthread_attr_setdetachstate(&attr, &detach);
13019         if( status < 0 ) status = errno;
13020 #else
13021         status = pthread_attr_setdetachstate(&attr, detach);
13022 #endif
13023         if( status ) return status;
13024         status = pthread_create( &t, &attr, task, NULL );
13025 #if HAVE_PTHREADS < 7
13026         if( status < 0 ) status = errno;
13027 #endif
13028         if( status ) return status;
13029 #else
13030         /* Draft 4 pthreads */
13031         status = pthread_create( &t, pthread_attr_default, task, NULL );
13032         if( status ) return errno;
13033
13034         /* give thread a chance to complete */
13035         /* it should remain joinable and hence detachable */
13036         sleep( 1 );
13037
13038         status = pthread_detach( &t );
13039         if( status ) return errno;
13040 #endif
13041
13042 #ifdef HAVE_LINUX_THREADS
13043         pthread_kill_other_threads_np();
13044 #endif
13045
13046         return 0;
13047
13048 }
13049
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13052 then
13053   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -fr conftest*
13058   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13059 fi
13060 rm -fr conftest*
13061 fi
13062
13063
13064                 # restore the LIBS
13065                 LIBS="$ol_LIBS"
13066         
13067 fi
13068
13069 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13070
13071         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13072                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13073                 ol_link_threads=posix
13074         fi
13075 fi
13076
13077                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13078 if test "$ol_link_threads" = no ; then
13079         # try -lpthread -lmach -lexc
13080         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13081 echo "configure:13082: checking for pthread link with -lpthread -lmach -lexc" >&5
13082 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13083   echo $ac_n "(cached) $ac_c" 1>&6
13084 else
13085   
13086                 # save the flags
13087                 ol_LIBS="$LIBS"
13088                 LIBS="-lpthread -lmach -lexc $LIBS"
13089
13090                 if test "$cross_compiling" = yes; then
13091   cat > conftest.$ac_ext <<EOF
13092 #line 13093 "configure"
13093 #include "confdefs.h"
13094 /* pthread test headers */
13095 #include <pthread.h>
13096 #if HAVE_PTHREADS < 7
13097 #include <errno.h>
13098 #endif
13099 #ifndef NULL
13100 #define NULL (void*)0
13101 #endif
13102
13103 static void *task(p)
13104         void *p;
13105 {
13106         return (void *) (p == NULL);
13107 }
13108
13109 int main() {
13110
13111         /* pthread test function */
13112 #ifndef PTHREAD_CREATE_DETACHED
13113 #define PTHREAD_CREATE_DETACHED 1
13114 #endif
13115         pthread_t t;
13116         int status;
13117         int detach = PTHREAD_CREATE_DETACHED;
13118
13119 #if HAVE_PTHREADS > 4
13120         /* Final pthreads */
13121         pthread_attr_t attr;
13122
13123         status = pthread_attr_init(&attr);
13124         if( status ) return status;
13125
13126 #if HAVE_PTHREADS < 7
13127         status = pthread_attr_setdetachstate(&attr, &detach);
13128         if( status < 0 ) status = errno;
13129 #else
13130         status = pthread_attr_setdetachstate(&attr, detach);
13131 #endif
13132         if( status ) return status;
13133         status = pthread_create( &t, &attr, task, NULL );
13134 #if HAVE_PTHREADS < 7
13135         if( status < 0 ) status = errno;
13136 #endif
13137         if( status ) return status;
13138 #else
13139         /* Draft 4 pthreads */
13140         status = pthread_create( &t, pthread_attr_default, task, NULL );
13141         if( status ) return errno;
13142
13143         /* give thread a chance to complete */
13144         /* it should remain joinable and hence detachable */
13145         sleep( 1 );
13146
13147         status = pthread_detach( &t );
13148         if( status ) return errno;
13149 #endif
13150
13151 #ifdef HAVE_LINUX_THREADS
13152         pthread_kill_other_threads_np();
13153 #endif
13154
13155         return 0;
13156
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13160   rm -rf conftest*
13161   ol_cv_pthread_lpthread_lmach_lexc=yes
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   ol_cv_pthread_lpthread_lmach_lexc=no
13167 fi
13168 rm -f conftest*
13169 else
13170   cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173 /* pthread test headers */
13174 #include <pthread.h>
13175 #if HAVE_PTHREADS < 7
13176 #include <errno.h>
13177 #endif
13178 #ifndef NULL
13179 #define NULL (void*)0
13180 #endif
13181
13182 static void *task(p)
13183         void *p;
13184 {
13185         return (void *) (p == NULL);
13186 }
13187
13188
13189 int main(argc, argv)
13190         int argc;
13191         char **argv;
13192 {
13193
13194         /* pthread test function */
13195 #ifndef PTHREAD_CREATE_DETACHED
13196 #define PTHREAD_CREATE_DETACHED 1
13197 #endif
13198         pthread_t t;
13199         int status;
13200         int detach = PTHREAD_CREATE_DETACHED;
13201
13202 #if HAVE_PTHREADS > 4
13203         /* Final pthreads */
13204         pthread_attr_t attr;
13205
13206         status = pthread_attr_init(&attr);
13207         if( status ) return status;
13208
13209 #if HAVE_PTHREADS < 7
13210         status = pthread_attr_setdetachstate(&attr, &detach);
13211         if( status < 0 ) status = errno;
13212 #else
13213         status = pthread_attr_setdetachstate(&attr, detach);
13214 #endif
13215         if( status ) return status;
13216         status = pthread_create( &t, &attr, task, NULL );
13217 #if HAVE_PTHREADS < 7
13218         if( status < 0 ) status = errno;
13219 #endif
13220         if( status ) return status;
13221 #else
13222         /* Draft 4 pthreads */
13223         status = pthread_create( &t, pthread_attr_default, task, NULL );
13224         if( status ) return errno;
13225
13226         /* give thread a chance to complete */
13227         /* it should remain joinable and hence detachable */
13228         sleep( 1 );
13229
13230         status = pthread_detach( &t );
13231         if( status ) return errno;
13232 #endif
13233
13234 #ifdef HAVE_LINUX_THREADS
13235         pthread_kill_other_threads_np();
13236 #endif
13237
13238         return 0;
13239
13240 }
13241
13242 EOF
13243 if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13244 then
13245   ol_cv_pthread_lpthread_lmach_lexc=yes
13246 else
13247   echo "configure: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   rm -fr conftest*
13250   ol_cv_pthread_lpthread_lmach_lexc=no
13251 fi
13252 rm -fr conftest*
13253 fi
13254
13255
13256                 # restore the LIBS
13257                 LIBS="$ol_LIBS"
13258         
13259 fi
13260
13261 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13262
13263         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13264                 ol_link_pthreads="-lpthread -lmach -lexc"
13265                 ol_link_threads=posix
13266         fi
13267 fi
13268
13269
13270                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13271 if test "$ol_link_threads" = no ; then
13272         # try -lpthread -Wl,-woff,85
13273         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13274 echo "configure:13275: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13275 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   
13279                 # save the flags
13280                 ol_LIBS="$LIBS"
13281                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13282
13283                 if test "$cross_compiling" = yes; then
13284   cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* pthread test headers */
13288 #include <pthread.h>
13289 #if HAVE_PTHREADS < 7
13290 #include <errno.h>
13291 #endif
13292 #ifndef NULL
13293 #define NULL (void*)0
13294 #endif
13295
13296 static void *task(p)
13297         void *p;
13298 {
13299         return (void *) (p == NULL);
13300 }
13301
13302 int main() {
13303
13304         /* pthread test function */
13305 #ifndef PTHREAD_CREATE_DETACHED
13306 #define PTHREAD_CREATE_DETACHED 1
13307 #endif
13308         pthread_t t;
13309         int status;
13310         int detach = PTHREAD_CREATE_DETACHED;
13311
13312 #if HAVE_PTHREADS > 4
13313         /* Final pthreads */
13314         pthread_attr_t attr;
13315
13316         status = pthread_attr_init(&attr);
13317         if( status ) return status;
13318
13319 #if HAVE_PTHREADS < 7
13320         status = pthread_attr_setdetachstate(&attr, &detach);
13321         if( status < 0 ) status = errno;
13322 #else
13323         status = pthread_attr_setdetachstate(&attr, detach);
13324 #endif
13325         if( status ) return status;
13326         status = pthread_create( &t, &attr, task, NULL );
13327 #if HAVE_PTHREADS < 7
13328         if( status < 0 ) status = errno;
13329 #endif
13330         if( status ) return status;
13331 #else
13332         /* Draft 4 pthreads */
13333         status = pthread_create( &t, pthread_attr_default, task, NULL );
13334         if( status ) return errno;
13335
13336         /* give thread a chance to complete */
13337         /* it should remain joinable and hence detachable */
13338         sleep( 1 );
13339
13340         status = pthread_detach( &t );
13341         if( status ) return errno;
13342 #endif
13343
13344 #ifdef HAVE_LINUX_THREADS
13345         pthread_kill_other_threads_np();
13346 #endif
13347
13348         return 0;
13349
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   ol_cv_pthread_lib_lpthread_woff=yes
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   ol_cv_pthread_lib_lpthread_woff=no
13360 fi
13361 rm -f conftest*
13362 else
13363   cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 /* pthread test headers */
13367 #include <pthread.h>
13368 #if HAVE_PTHREADS < 7
13369 #include <errno.h>
13370 #endif
13371 #ifndef NULL
13372 #define NULL (void*)0
13373 #endif
13374
13375 static void *task(p)
13376         void *p;
13377 {
13378         return (void *) (p == NULL);
13379 }
13380
13381
13382 int main(argc, argv)
13383         int argc;
13384         char **argv;
13385 {
13386
13387         /* pthread test function */
13388 #ifndef PTHREAD_CREATE_DETACHED
13389 #define PTHREAD_CREATE_DETACHED 1
13390 #endif
13391         pthread_t t;
13392         int status;
13393         int detach = PTHREAD_CREATE_DETACHED;
13394
13395 #if HAVE_PTHREADS > 4
13396         /* Final pthreads */
13397         pthread_attr_t attr;
13398
13399         status = pthread_attr_init(&attr);
13400         if( status ) return status;
13401
13402 #if HAVE_PTHREADS < 7
13403         status = pthread_attr_setdetachstate(&attr, &detach);
13404         if( status < 0 ) status = errno;
13405 #else
13406         status = pthread_attr_setdetachstate(&attr, detach);
13407 #endif
13408         if( status ) return status;
13409         status = pthread_create( &t, &attr, task, NULL );
13410 #if HAVE_PTHREADS < 7
13411         if( status < 0 ) status = errno;
13412 #endif
13413         if( status ) return status;
13414 #else
13415         /* Draft 4 pthreads */
13416         status = pthread_create( &t, pthread_attr_default, task, NULL );
13417         if( status ) return errno;
13418
13419         /* give thread a chance to complete */
13420         /* it should remain joinable and hence detachable */
13421         sleep( 1 );
13422
13423         status = pthread_detach( &t );
13424         if( status ) return errno;
13425 #endif
13426
13427 #ifdef HAVE_LINUX_THREADS
13428         pthread_kill_other_threads_np();
13429 #endif
13430
13431         return 0;
13432
13433 }
13434
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13437 then
13438   ol_cv_pthread_lib_lpthread_woff=yes
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -fr conftest*
13443   ol_cv_pthread_lib_lpthread_woff=no
13444 fi
13445 rm -fr conftest*
13446 fi
13447
13448
13449                 # restore the LIBS
13450                 LIBS="$ol_LIBS"
13451         
13452 fi
13453
13454 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13455
13456         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13457                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13458                 ol_link_threads=posix
13459         fi
13460 fi
13461
13462
13463                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13464 if test "$ol_link_threads" = no ; then
13465         # try -lpthread
13466         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13467 echo "configure:13468: checking for pthread link with -lpthread" >&5
13468 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13469   echo $ac_n "(cached) $ac_c" 1>&6
13470 else
13471   
13472                 # save the flags
13473                 ol_LIBS="$LIBS"
13474                 LIBS="-lpthread $LIBS"
13475
13476                 if test "$cross_compiling" = yes; then
13477   cat > conftest.$ac_ext <<EOF
13478 #line 13479 "configure"
13479 #include "confdefs.h"
13480 /* pthread test headers */
13481 #include <pthread.h>
13482 #if HAVE_PTHREADS < 7
13483 #include <errno.h>
13484 #endif
13485 #ifndef NULL
13486 #define NULL (void*)0
13487 #endif
13488
13489 static void *task(p)
13490         void *p;
13491 {
13492         return (void *) (p == NULL);
13493 }
13494
13495 int main() {
13496
13497         /* pthread test function */
13498 #ifndef PTHREAD_CREATE_DETACHED
13499 #define PTHREAD_CREATE_DETACHED 1
13500 #endif
13501         pthread_t t;
13502         int status;
13503         int detach = PTHREAD_CREATE_DETACHED;
13504
13505 #if HAVE_PTHREADS > 4
13506         /* Final pthreads */
13507         pthread_attr_t attr;
13508
13509         status = pthread_attr_init(&attr);
13510         if( status ) return status;
13511
13512 #if HAVE_PTHREADS < 7
13513         status = pthread_attr_setdetachstate(&attr, &detach);
13514         if( status < 0 ) status = errno;
13515 #else
13516         status = pthread_attr_setdetachstate(&attr, detach);
13517 #endif
13518         if( status ) return status;
13519         status = pthread_create( &t, &attr, task, NULL );
13520 #if HAVE_PTHREADS < 7
13521         if( status < 0 ) status = errno;
13522 #endif
13523         if( status ) return status;
13524 #else
13525         /* Draft 4 pthreads */
13526         status = pthread_create( &t, pthread_attr_default, task, NULL );
13527         if( status ) return errno;
13528
13529         /* give thread a chance to complete */
13530         /* it should remain joinable and hence detachable */
13531         sleep( 1 );
13532
13533         status = pthread_detach( &t );
13534         if( status ) return errno;
13535 #endif
13536
13537 #ifdef HAVE_LINUX_THREADS
13538         pthread_kill_other_threads_np();
13539 #endif
13540
13541         return 0;
13542
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   ol_cv_pthread_lpthread=yes
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   ol_cv_pthread_lpthread=no
13553 fi
13554 rm -f conftest*
13555 else
13556   cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 /* pthread test headers */
13560 #include <pthread.h>
13561 #if HAVE_PTHREADS < 7
13562 #include <errno.h>
13563 #endif
13564 #ifndef NULL
13565 #define NULL (void*)0
13566 #endif
13567
13568 static void *task(p)
13569         void *p;
13570 {
13571         return (void *) (p == NULL);
13572 }
13573
13574
13575 int main(argc, argv)
13576         int argc;
13577         char **argv;
13578 {
13579
13580         /* pthread test function */
13581 #ifndef PTHREAD_CREATE_DETACHED
13582 #define PTHREAD_CREATE_DETACHED 1
13583 #endif
13584         pthread_t t;
13585         int status;
13586         int detach = PTHREAD_CREATE_DETACHED;
13587
13588 #if HAVE_PTHREADS > 4
13589         /* Final pthreads */
13590         pthread_attr_t attr;
13591
13592         status = pthread_attr_init(&attr);
13593         if( status ) return status;
13594
13595 #if HAVE_PTHREADS < 7
13596         status = pthread_attr_setdetachstate(&attr, &detach);
13597         if( status < 0 ) status = errno;
13598 #else
13599         status = pthread_attr_setdetachstate(&attr, detach);
13600 #endif
13601         if( status ) return status;
13602         status = pthread_create( &t, &attr, task, NULL );
13603 #if HAVE_PTHREADS < 7
13604         if( status < 0 ) status = errno;
13605 #endif
13606         if( status ) return status;
13607 #else
13608         /* Draft 4 pthreads */
13609         status = pthread_create( &t, pthread_attr_default, task, NULL );
13610         if( status ) return errno;
13611
13612         /* give thread a chance to complete */
13613         /* it should remain joinable and hence detachable */
13614         sleep( 1 );
13615
13616         status = pthread_detach( &t );
13617         if( status ) return errno;
13618 #endif
13619
13620 #ifdef HAVE_LINUX_THREADS
13621         pthread_kill_other_threads_np();
13622 #endif
13623
13624         return 0;
13625
13626 }
13627
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13630 then
13631   ol_cv_pthread_lpthread=yes
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -fr conftest*
13636   ol_cv_pthread_lpthread=no
13637 fi
13638 rm -fr conftest*
13639 fi
13640
13641
13642                 # restore the LIBS
13643                 LIBS="$ol_LIBS"
13644         
13645 fi
13646
13647 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13648
13649         if test $ol_cv_pthread_lpthread = yes ; then
13650                 ol_link_pthreads="-lpthread"
13651                 ol_link_threads=posix
13652         fi
13653 fi
13654
13655                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13656 if test "$ol_link_threads" = no ; then
13657         # try -lc_r
13658         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13659 echo "configure:13660: checking for pthread link with -lc_r" >&5
13660 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13661   echo $ac_n "(cached) $ac_c" 1>&6
13662 else
13663   
13664                 # save the flags
13665                 ol_LIBS="$LIBS"
13666                 LIBS="-lc_r $LIBS"
13667
13668                 if test "$cross_compiling" = yes; then
13669   cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* pthread test headers */
13673 #include <pthread.h>
13674 #if HAVE_PTHREADS < 7
13675 #include <errno.h>
13676 #endif
13677 #ifndef NULL
13678 #define NULL (void*)0
13679 #endif
13680
13681 static void *task(p)
13682         void *p;
13683 {
13684         return (void *) (p == NULL);
13685 }
13686
13687 int main() {
13688
13689         /* pthread test function */
13690 #ifndef PTHREAD_CREATE_DETACHED
13691 #define PTHREAD_CREATE_DETACHED 1
13692 #endif
13693         pthread_t t;
13694         int status;
13695         int detach = PTHREAD_CREATE_DETACHED;
13696
13697 #if HAVE_PTHREADS > 4
13698         /* Final pthreads */
13699         pthread_attr_t attr;
13700
13701         status = pthread_attr_init(&attr);
13702         if( status ) return status;
13703
13704 #if HAVE_PTHREADS < 7
13705         status = pthread_attr_setdetachstate(&attr, &detach);
13706         if( status < 0 ) status = errno;
13707 #else
13708         status = pthread_attr_setdetachstate(&attr, detach);
13709 #endif
13710         if( status ) return status;
13711         status = pthread_create( &t, &attr, task, NULL );
13712 #if HAVE_PTHREADS < 7
13713         if( status < 0 ) status = errno;
13714 #endif
13715         if( status ) return status;
13716 #else
13717         /* Draft 4 pthreads */
13718         status = pthread_create( &t, pthread_attr_default, task, NULL );
13719         if( status ) return errno;
13720
13721         /* give thread a chance to complete */
13722         /* it should remain joinable and hence detachable */
13723         sleep( 1 );
13724
13725         status = pthread_detach( &t );
13726         if( status ) return errno;
13727 #endif
13728
13729 #ifdef HAVE_LINUX_THREADS
13730         pthread_kill_other_threads_np();
13731 #endif
13732
13733         return 0;
13734
13735 ; return 0; }
13736 EOF
13737 if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13738   rm -rf conftest*
13739   ol_cv_pthread_lc_r=yes
13740 else
13741   echo "configure: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   rm -rf conftest*
13744   ol_cv_pthread_lc_r=no
13745 fi
13746 rm -f conftest*
13747 else
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* pthread test headers */
13752 #include <pthread.h>
13753 #if HAVE_PTHREADS < 7
13754 #include <errno.h>
13755 #endif
13756 #ifndef NULL
13757 #define NULL (void*)0
13758 #endif
13759
13760 static void *task(p)
13761         void *p;
13762 {
13763         return (void *) (p == NULL);
13764 }
13765
13766
13767 int main(argc, argv)
13768         int argc;
13769         char **argv;
13770 {
13771
13772         /* pthread test function */
13773 #ifndef PTHREAD_CREATE_DETACHED
13774 #define PTHREAD_CREATE_DETACHED 1
13775 #endif
13776         pthread_t t;
13777         int status;
13778         int detach = PTHREAD_CREATE_DETACHED;
13779
13780 #if HAVE_PTHREADS > 4
13781         /* Final pthreads */
13782         pthread_attr_t attr;
13783
13784         status = pthread_attr_init(&attr);
13785         if( status ) return status;
13786
13787 #if HAVE_PTHREADS < 7
13788         status = pthread_attr_setdetachstate(&attr, &detach);
13789         if( status < 0 ) status = errno;
13790 #else
13791         status = pthread_attr_setdetachstate(&attr, detach);
13792 #endif
13793         if( status ) return status;
13794         status = pthread_create( &t, &attr, task, NULL );
13795 #if HAVE_PTHREADS < 7
13796         if( status < 0 ) status = errno;
13797 #endif
13798         if( status ) return status;
13799 #else
13800         /* Draft 4 pthreads */
13801         status = pthread_create( &t, pthread_attr_default, task, NULL );
13802         if( status ) return errno;
13803
13804         /* give thread a chance to complete */
13805         /* it should remain joinable and hence detachable */
13806         sleep( 1 );
13807
13808         status = pthread_detach( &t );
13809         if( status ) return errno;
13810 #endif
13811
13812 #ifdef HAVE_LINUX_THREADS
13813         pthread_kill_other_threads_np();
13814 #endif
13815
13816         return 0;
13817
13818 }
13819
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13822 then
13823   ol_cv_pthread_lc_r=yes
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -fr conftest*
13828   ol_cv_pthread_lc_r=no
13829 fi
13830 rm -fr conftest*
13831 fi
13832
13833
13834                 # restore the LIBS
13835                 LIBS="$ol_LIBS"
13836         
13837 fi
13838
13839 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13840
13841         if test $ol_cv_pthread_lc_r = yes ; then
13842                 ol_link_pthreads="-lc_r"
13843                 ol_link_threads=posix
13844         fi
13845 fi
13846
13847
13848                 # Pthread try link: -threads (ol_cv_pthread_threads)
13849 if test "$ol_link_threads" = no ; then
13850         # try -threads
13851         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13852 echo "configure:13853: checking for pthread link with -threads" >&5
13853 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13854   echo $ac_n "(cached) $ac_c" 1>&6
13855 else
13856   
13857                 # save the flags
13858                 ol_LIBS="$LIBS"
13859                 LIBS="-threads $LIBS"
13860
13861                 if test "$cross_compiling" = yes; then
13862   cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* pthread test headers */
13866 #include <pthread.h>
13867 #if HAVE_PTHREADS < 7
13868 #include <errno.h>
13869 #endif
13870 #ifndef NULL
13871 #define NULL (void*)0
13872 #endif
13873
13874 static void *task(p)
13875         void *p;
13876 {
13877         return (void *) (p == NULL);
13878 }
13879
13880 int main() {
13881
13882         /* pthread test function */
13883 #ifndef PTHREAD_CREATE_DETACHED
13884 #define PTHREAD_CREATE_DETACHED 1
13885 #endif
13886         pthread_t t;
13887         int status;
13888         int detach = PTHREAD_CREATE_DETACHED;
13889
13890 #if HAVE_PTHREADS > 4
13891         /* Final pthreads */
13892         pthread_attr_t attr;
13893
13894         status = pthread_attr_init(&attr);
13895         if( status ) return status;
13896
13897 #if HAVE_PTHREADS < 7
13898         status = pthread_attr_setdetachstate(&attr, &detach);
13899         if( status < 0 ) status = errno;
13900 #else
13901         status = pthread_attr_setdetachstate(&attr, detach);
13902 #endif
13903         if( status ) return status;
13904         status = pthread_create( &t, &attr, task, NULL );
13905 #if HAVE_PTHREADS < 7
13906         if( status < 0 ) status = errno;
13907 #endif
13908         if( status ) return status;
13909 #else
13910         /* Draft 4 pthreads */
13911         status = pthread_create( &t, pthread_attr_default, task, NULL );
13912         if( status ) return errno;
13913
13914         /* give thread a chance to complete */
13915         /* it should remain joinable and hence detachable */
13916         sleep( 1 );
13917
13918         status = pthread_detach( &t );
13919         if( status ) return errno;
13920 #endif
13921
13922 #ifdef HAVE_LINUX_THREADS
13923         pthread_kill_other_threads_np();
13924 #endif
13925
13926         return 0;
13927
13928 ; return 0; }
13929 EOF
13930 if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13931   rm -rf conftest*
13932   ol_cv_pthread_threads=yes
13933 else
13934   echo "configure: failed program was:" >&5
13935   cat conftest.$ac_ext >&5
13936   rm -rf conftest*
13937   ol_cv_pthread_threads=no
13938 fi
13939 rm -f conftest*
13940 else
13941   cat > conftest.$ac_ext <<EOF
13942 #line 13943 "configure"
13943 #include "confdefs.h"
13944 /* pthread test headers */
13945 #include <pthread.h>
13946 #if HAVE_PTHREADS < 7
13947 #include <errno.h>
13948 #endif
13949 #ifndef NULL
13950 #define NULL (void*)0
13951 #endif
13952
13953 static void *task(p)
13954         void *p;
13955 {
13956         return (void *) (p == NULL);
13957 }
13958
13959
13960 int main(argc, argv)
13961         int argc;
13962         char **argv;
13963 {
13964
13965         /* pthread test function */
13966 #ifndef PTHREAD_CREATE_DETACHED
13967 #define PTHREAD_CREATE_DETACHED 1
13968 #endif
13969         pthread_t t;
13970         int status;
13971         int detach = PTHREAD_CREATE_DETACHED;
13972
13973 #if HAVE_PTHREADS > 4
13974         /* Final pthreads */
13975         pthread_attr_t attr;
13976
13977         status = pthread_attr_init(&attr);
13978         if( status ) return status;
13979
13980 #if HAVE_PTHREADS < 7
13981         status = pthread_attr_setdetachstate(&attr, &detach);
13982         if( status < 0 ) status = errno;
13983 #else
13984         status = pthread_attr_setdetachstate(&attr, detach);
13985 #endif
13986         if( status ) return status;
13987         status = pthread_create( &t, &attr, task, NULL );
13988 #if HAVE_PTHREADS < 7
13989         if( status < 0 ) status = errno;
13990 #endif
13991         if( status ) return status;
13992 #else
13993         /* Draft 4 pthreads */
13994         status = pthread_create( &t, pthread_attr_default, task, NULL );
13995         if( status ) return errno;
13996
13997         /* give thread a chance to complete */
13998         /* it should remain joinable and hence detachable */
13999         sleep( 1 );
14000
14001         status = pthread_detach( &t );
14002         if( status ) return errno;
14003 #endif
14004
14005 #ifdef HAVE_LINUX_THREADS
14006         pthread_kill_other_threads_np();
14007 #endif
14008
14009         return 0;
14010
14011 }
14012
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14015 then
14016   ol_cv_pthread_threads=yes
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -fr conftest*
14021   ol_cv_pthread_threads=no
14022 fi
14023 rm -fr conftest*
14024 fi
14025
14026
14027                 # restore the LIBS
14028                 LIBS="$ol_LIBS"
14029         
14030 fi
14031
14032 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14033
14034         if test $ol_cv_pthread_threads = yes ; then
14035                 ol_link_pthreads="-threads"
14036                 ol_link_threads=posix
14037         fi
14038 fi
14039
14040
14041                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14042 if test "$ol_link_threads" = no ; then
14043         # try -lpthreads -lmach -lexc -lc_r
14044         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14045 echo "configure:14046: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14046 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14047   echo $ac_n "(cached) $ac_c" 1>&6
14048 else
14049   
14050                 # save the flags
14051                 ol_LIBS="$LIBS"
14052                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14053
14054                 if test "$cross_compiling" = yes; then
14055   cat > conftest.$ac_ext <<EOF
14056 #line 14057 "configure"
14057 #include "confdefs.h"
14058 /* pthread test headers */
14059 #include <pthread.h>
14060 #if HAVE_PTHREADS < 7
14061 #include <errno.h>
14062 #endif
14063 #ifndef NULL
14064 #define NULL (void*)0
14065 #endif
14066
14067 static void *task(p)
14068         void *p;
14069 {
14070         return (void *) (p == NULL);
14071 }
14072
14073 int main() {
14074
14075         /* pthread test function */
14076 #ifndef PTHREAD_CREATE_DETACHED
14077 #define PTHREAD_CREATE_DETACHED 1
14078 #endif
14079         pthread_t t;
14080         int status;
14081         int detach = PTHREAD_CREATE_DETACHED;
14082
14083 #if HAVE_PTHREADS > 4
14084         /* Final pthreads */
14085         pthread_attr_t attr;
14086
14087         status = pthread_attr_init(&attr);
14088         if( status ) return status;
14089
14090 #if HAVE_PTHREADS < 7
14091         status = pthread_attr_setdetachstate(&attr, &detach);
14092         if( status < 0 ) status = errno;
14093 #else
14094         status = pthread_attr_setdetachstate(&attr, detach);
14095 #endif
14096         if( status ) return status;
14097         status = pthread_create( &t, &attr, task, NULL );
14098 #if HAVE_PTHREADS < 7
14099         if( status < 0 ) status = errno;
14100 #endif
14101         if( status ) return status;
14102 #else
14103         /* Draft 4 pthreads */
14104         status = pthread_create( &t, pthread_attr_default, task, NULL );
14105         if( status ) return errno;
14106
14107         /* give thread a chance to complete */
14108         /* it should remain joinable and hence detachable */
14109         sleep( 1 );
14110
14111         status = pthread_detach( &t );
14112         if( status ) return errno;
14113 #endif
14114
14115 #ifdef HAVE_LINUX_THREADS
14116         pthread_kill_other_threads_np();
14117 #endif
14118
14119         return 0;
14120
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14124   rm -rf conftest*
14125   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14131 fi
14132 rm -f conftest*
14133 else
14134   cat > conftest.$ac_ext <<EOF
14135 #line 14136 "configure"
14136 #include "confdefs.h"
14137 /* pthread test headers */
14138 #include <pthread.h>
14139 #if HAVE_PTHREADS < 7
14140 #include <errno.h>
14141 #endif
14142 #ifndef NULL
14143 #define NULL (void*)0
14144 #endif
14145
14146 static void *task(p)
14147         void *p;
14148 {
14149         return (void *) (p == NULL);
14150 }
14151
14152
14153 int main(argc, argv)
14154         int argc;
14155         char **argv;
14156 {
14157
14158         /* pthread test function */
14159 #ifndef PTHREAD_CREATE_DETACHED
14160 #define PTHREAD_CREATE_DETACHED 1
14161 #endif
14162         pthread_t t;
14163         int status;
14164         int detach = PTHREAD_CREATE_DETACHED;
14165
14166 #if HAVE_PTHREADS > 4
14167         /* Final pthreads */
14168         pthread_attr_t attr;
14169
14170         status = pthread_attr_init(&attr);
14171         if( status ) return status;
14172
14173 #if HAVE_PTHREADS < 7
14174         status = pthread_attr_setdetachstate(&attr, &detach);
14175         if( status < 0 ) status = errno;
14176 #else
14177         status = pthread_attr_setdetachstate(&attr, detach);
14178 #endif
14179         if( status ) return status;
14180         status = pthread_create( &t, &attr, task, NULL );
14181 #if HAVE_PTHREADS < 7
14182         if( status < 0 ) status = errno;
14183 #endif
14184         if( status ) return status;
14185 #else
14186         /* Draft 4 pthreads */
14187         status = pthread_create( &t, pthread_attr_default, task, NULL );
14188         if( status ) return errno;
14189
14190         /* give thread a chance to complete */
14191         /* it should remain joinable and hence detachable */
14192         sleep( 1 );
14193
14194         status = pthread_detach( &t );
14195         if( status ) return errno;
14196 #endif
14197
14198 #ifdef HAVE_LINUX_THREADS
14199         pthread_kill_other_threads_np();
14200 #endif
14201
14202         return 0;
14203
14204 }
14205
14206 EOF
14207 if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14208 then
14209   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14210 else
14211   echo "configure: failed program was:" >&5
14212   cat conftest.$ac_ext >&5
14213   rm -fr conftest*
14214   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14215 fi
14216 rm -fr conftest*
14217 fi
14218
14219
14220                 # restore the LIBS
14221                 LIBS="$ol_LIBS"
14222         
14223 fi
14224
14225 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14226
14227         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14228                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14229                 ol_link_threads=posix
14230         fi
14231 fi
14232
14233                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14234 if test "$ol_link_threads" = no ; then
14235         # try -lpthreads -lmach -lexc
14236         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14237 echo "configure:14238: checking for pthread link with -lpthreads -lmach -lexc" >&5
14238 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   
14242                 # save the flags
14243                 ol_LIBS="$LIBS"
14244                 LIBS="-lpthreads -lmach -lexc $LIBS"
14245
14246                 if test "$cross_compiling" = yes; then
14247   cat > conftest.$ac_ext <<EOF
14248 #line 14249 "configure"
14249 #include "confdefs.h"
14250 /* pthread test headers */
14251 #include <pthread.h>
14252 #if HAVE_PTHREADS < 7
14253 #include <errno.h>
14254 #endif
14255 #ifndef NULL
14256 #define NULL (void*)0
14257 #endif
14258
14259 static void *task(p)
14260         void *p;
14261 {
14262         return (void *) (p == NULL);
14263 }
14264
14265 int main() {
14266
14267         /* pthread test function */
14268 #ifndef PTHREAD_CREATE_DETACHED
14269 #define PTHREAD_CREATE_DETACHED 1
14270 #endif
14271         pthread_t t;
14272         int status;
14273         int detach = PTHREAD_CREATE_DETACHED;
14274
14275 #if HAVE_PTHREADS > 4
14276         /* Final pthreads */
14277         pthread_attr_t attr;
14278
14279         status = pthread_attr_init(&attr);
14280         if( status ) return status;
14281
14282 #if HAVE_PTHREADS < 7
14283         status = pthread_attr_setdetachstate(&attr, &detach);
14284         if( status < 0 ) status = errno;
14285 #else
14286         status = pthread_attr_setdetachstate(&attr, detach);
14287 #endif
14288         if( status ) return status;
14289         status = pthread_create( &t, &attr, task, NULL );
14290 #if HAVE_PTHREADS < 7
14291         if( status < 0 ) status = errno;
14292 #endif
14293         if( status ) return status;
14294 #else
14295         /* Draft 4 pthreads */
14296         status = pthread_create( &t, pthread_attr_default, task, NULL );
14297         if( status ) return errno;
14298
14299         /* give thread a chance to complete */
14300         /* it should remain joinable and hence detachable */
14301         sleep( 1 );
14302
14303         status = pthread_detach( &t );
14304         if( status ) return errno;
14305 #endif
14306
14307 #ifdef HAVE_LINUX_THREADS
14308         pthread_kill_other_threads_np();
14309 #endif
14310
14311         return 0;
14312
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14316   rm -rf conftest*
14317   ol_cv_pthread_lpthreads_lmach_lexc=yes
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   ol_cv_pthread_lpthreads_lmach_lexc=no
14323 fi
14324 rm -f conftest*
14325 else
14326   cat > conftest.$ac_ext <<EOF
14327 #line 14328 "configure"
14328 #include "confdefs.h"
14329 /* pthread test headers */
14330 #include <pthread.h>
14331 #if HAVE_PTHREADS < 7
14332 #include <errno.h>
14333 #endif
14334 #ifndef NULL
14335 #define NULL (void*)0
14336 #endif
14337
14338 static void *task(p)
14339         void *p;
14340 {
14341         return (void *) (p == NULL);
14342 }
14343
14344
14345 int main(argc, argv)
14346         int argc;
14347         char **argv;
14348 {
14349
14350         /* pthread test function */
14351 #ifndef PTHREAD_CREATE_DETACHED
14352 #define PTHREAD_CREATE_DETACHED 1
14353 #endif
14354         pthread_t t;
14355         int status;
14356         int detach = PTHREAD_CREATE_DETACHED;
14357
14358 #if HAVE_PTHREADS > 4
14359         /* Final pthreads */
14360         pthread_attr_t attr;
14361
14362         status = pthread_attr_init(&attr);
14363         if( status ) return status;
14364
14365 #if HAVE_PTHREADS < 7
14366         status = pthread_attr_setdetachstate(&attr, &detach);
14367         if( status < 0 ) status = errno;
14368 #else
14369         status = pthread_attr_setdetachstate(&attr, detach);
14370 #endif
14371         if( status ) return status;
14372         status = pthread_create( &t, &attr, task, NULL );
14373 #if HAVE_PTHREADS < 7
14374         if( status < 0 ) status = errno;
14375 #endif
14376         if( status ) return status;
14377 #else
14378         /* Draft 4 pthreads */
14379         status = pthread_create( &t, pthread_attr_default, task, NULL );
14380         if( status ) return errno;
14381
14382         /* give thread a chance to complete */
14383         /* it should remain joinable and hence detachable */
14384         sleep( 1 );
14385
14386         status = pthread_detach( &t );
14387         if( status ) return errno;
14388 #endif
14389
14390 #ifdef HAVE_LINUX_THREADS
14391         pthread_kill_other_threads_np();
14392 #endif
14393
14394         return 0;
14395
14396 }
14397
14398 EOF
14399 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14400 then
14401   ol_cv_pthread_lpthreads_lmach_lexc=yes
14402 else
14403   echo "configure: failed program was:" >&5
14404   cat conftest.$ac_ext >&5
14405   rm -fr conftest*
14406   ol_cv_pthread_lpthreads_lmach_lexc=no
14407 fi
14408 rm -fr conftest*
14409 fi
14410
14411
14412                 # restore the LIBS
14413                 LIBS="$ol_LIBS"
14414         
14415 fi
14416
14417 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14418
14419         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14420                 ol_link_pthreads="-lpthreads -lmach -lexc"
14421                 ol_link_threads=posix
14422         fi
14423 fi
14424
14425                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14426 if test "$ol_link_threads" = no ; then
14427         # try -lpthreads -lexc
14428         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14429 echo "configure:14430: checking for pthread link with -lpthreads -lexc" >&5
14430 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   
14434                 # save the flags
14435                 ol_LIBS="$LIBS"
14436                 LIBS="-lpthreads -lexc $LIBS"
14437
14438                 if test "$cross_compiling" = yes; then
14439   cat > conftest.$ac_ext <<EOF
14440 #line 14441 "configure"
14441 #include "confdefs.h"
14442 /* pthread test headers */
14443 #include <pthread.h>
14444 #if HAVE_PTHREADS < 7
14445 #include <errno.h>
14446 #endif
14447 #ifndef NULL
14448 #define NULL (void*)0
14449 #endif
14450
14451 static void *task(p)
14452         void *p;
14453 {
14454         return (void *) (p == NULL);
14455 }
14456
14457 int main() {
14458
14459         /* pthread test function */
14460 #ifndef PTHREAD_CREATE_DETACHED
14461 #define PTHREAD_CREATE_DETACHED 1
14462 #endif
14463         pthread_t t;
14464         int status;
14465         int detach = PTHREAD_CREATE_DETACHED;
14466
14467 #if HAVE_PTHREADS > 4
14468         /* Final pthreads */
14469         pthread_attr_t attr;
14470
14471         status = pthread_attr_init(&attr);
14472         if( status ) return status;
14473
14474 #if HAVE_PTHREADS < 7
14475         status = pthread_attr_setdetachstate(&attr, &detach);
14476         if( status < 0 ) status = errno;
14477 #else
14478         status = pthread_attr_setdetachstate(&attr, detach);
14479 #endif
14480         if( status ) return status;
14481         status = pthread_create( &t, &attr, task, NULL );
14482 #if HAVE_PTHREADS < 7
14483         if( status < 0 ) status = errno;
14484 #endif
14485         if( status ) return status;
14486 #else
14487         /* Draft 4 pthreads */
14488         status = pthread_create( &t, pthread_attr_default, task, NULL );
14489         if( status ) return errno;
14490
14491         /* give thread a chance to complete */
14492         /* it should remain joinable and hence detachable */
14493         sleep( 1 );
14494
14495         status = pthread_detach( &t );
14496         if( status ) return errno;
14497 #endif
14498
14499 #ifdef HAVE_LINUX_THREADS
14500         pthread_kill_other_threads_np();
14501 #endif
14502
14503         return 0;
14504
14505 ; return 0; }
14506 EOF
14507 if { (eval echo configure:14508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14508   rm -rf conftest*
14509   ol_cv_pthread_lpthreads_lexc=yes
14510 else
14511   echo "configure: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   rm -rf conftest*
14514   ol_cv_pthread_lpthreads_lexc=no
14515 fi
14516 rm -f conftest*
14517 else
14518   cat > conftest.$ac_ext <<EOF
14519 #line 14520 "configure"
14520 #include "confdefs.h"
14521 /* pthread test headers */
14522 #include <pthread.h>
14523 #if HAVE_PTHREADS < 7
14524 #include <errno.h>
14525 #endif
14526 #ifndef NULL
14527 #define NULL (void*)0
14528 #endif
14529
14530 static void *task(p)
14531         void *p;
14532 {
14533         return (void *) (p == NULL);
14534 }
14535
14536
14537 int main(argc, argv)
14538         int argc;
14539         char **argv;
14540 {
14541
14542         /* pthread test function */
14543 #ifndef PTHREAD_CREATE_DETACHED
14544 #define PTHREAD_CREATE_DETACHED 1
14545 #endif
14546         pthread_t t;
14547         int status;
14548         int detach = PTHREAD_CREATE_DETACHED;
14549
14550 #if HAVE_PTHREADS > 4
14551         /* Final pthreads */
14552         pthread_attr_t attr;
14553
14554         status = pthread_attr_init(&attr);
14555         if( status ) return status;
14556
14557 #if HAVE_PTHREADS < 7
14558         status = pthread_attr_setdetachstate(&attr, &detach);
14559         if( status < 0 ) status = errno;
14560 #else
14561         status = pthread_attr_setdetachstate(&attr, detach);
14562 #endif
14563         if( status ) return status;
14564         status = pthread_create( &t, &attr, task, NULL );
14565 #if HAVE_PTHREADS < 7
14566         if( status < 0 ) status = errno;
14567 #endif
14568         if( status ) return status;
14569 #else
14570         /* Draft 4 pthreads */
14571         status = pthread_create( &t, pthread_attr_default, task, NULL );
14572         if( status ) return errno;
14573
14574         /* give thread a chance to complete */
14575         /* it should remain joinable and hence detachable */
14576         sleep( 1 );
14577
14578         status = pthread_detach( &t );
14579         if( status ) return errno;
14580 #endif
14581
14582 #ifdef HAVE_LINUX_THREADS
14583         pthread_kill_other_threads_np();
14584 #endif
14585
14586         return 0;
14587
14588 }
14589
14590 EOF
14591 if { (eval echo configure:14592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14592 then
14593   ol_cv_pthread_lpthreads_lexc=yes
14594 else
14595   echo "configure: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   rm -fr conftest*
14598   ol_cv_pthread_lpthreads_lexc=no
14599 fi
14600 rm -fr conftest*
14601 fi
14602
14603
14604                 # restore the LIBS
14605                 LIBS="$ol_LIBS"
14606         
14607 fi
14608
14609 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14610
14611         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14612                 ol_link_pthreads="-lpthreads -lexc"
14613                 ol_link_threads=posix
14614         fi
14615 fi
14616
14617
14618                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14619 if test "$ol_link_threads" = no ; then
14620         # try -lpthreads
14621         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14622 echo "configure:14623: checking for pthread link with -lpthreads" >&5
14623 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14624   echo $ac_n "(cached) $ac_c" 1>&6
14625 else
14626   
14627                 # save the flags
14628                 ol_LIBS="$LIBS"
14629                 LIBS="-lpthreads $LIBS"
14630
14631                 if test "$cross_compiling" = yes; then
14632   cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635 /* pthread test headers */
14636 #include <pthread.h>
14637 #if HAVE_PTHREADS < 7
14638 #include <errno.h>
14639 #endif
14640 #ifndef NULL
14641 #define NULL (void*)0
14642 #endif
14643
14644 static void *task(p)
14645         void *p;
14646 {
14647         return (void *) (p == NULL);
14648 }
14649
14650 int main() {
14651
14652         /* pthread test function */
14653 #ifndef PTHREAD_CREATE_DETACHED
14654 #define PTHREAD_CREATE_DETACHED 1
14655 #endif
14656         pthread_t t;
14657         int status;
14658         int detach = PTHREAD_CREATE_DETACHED;
14659
14660 #if HAVE_PTHREADS > 4
14661         /* Final pthreads */
14662         pthread_attr_t attr;
14663
14664         status = pthread_attr_init(&attr);
14665         if( status ) return status;
14666
14667 #if HAVE_PTHREADS < 7
14668         status = pthread_attr_setdetachstate(&attr, &detach);
14669         if( status < 0 ) status = errno;
14670 #else
14671         status = pthread_attr_setdetachstate(&attr, detach);
14672 #endif
14673         if( status ) return status;
14674         status = pthread_create( &t, &attr, task, NULL );
14675 #if HAVE_PTHREADS < 7
14676         if( status < 0 ) status = errno;
14677 #endif
14678         if( status ) return status;
14679 #else
14680         /* Draft 4 pthreads */
14681         status = pthread_create( &t, pthread_attr_default, task, NULL );
14682         if( status ) return errno;
14683
14684         /* give thread a chance to complete */
14685         /* it should remain joinable and hence detachable */
14686         sleep( 1 );
14687
14688         status = pthread_detach( &t );
14689         if( status ) return errno;
14690 #endif
14691
14692 #ifdef HAVE_LINUX_THREADS
14693         pthread_kill_other_threads_np();
14694 #endif
14695
14696         return 0;
14697
14698 ; return 0; }
14699 EOF
14700 if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14701   rm -rf conftest*
14702   ol_cv_pthread_lib_lpthreads=yes
14703 else
14704   echo "configure: failed program was:" >&5
14705   cat conftest.$ac_ext >&5
14706   rm -rf conftest*
14707   ol_cv_pthread_lib_lpthreads=no
14708 fi
14709 rm -f conftest*
14710 else
14711   cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 /* pthread test headers */
14715 #include <pthread.h>
14716 #if HAVE_PTHREADS < 7
14717 #include <errno.h>
14718 #endif
14719 #ifndef NULL
14720 #define NULL (void*)0
14721 #endif
14722
14723 static void *task(p)
14724         void *p;
14725 {
14726         return (void *) (p == NULL);
14727 }
14728
14729
14730 int main(argc, argv)
14731         int argc;
14732         char **argv;
14733 {
14734
14735         /* pthread test function */
14736 #ifndef PTHREAD_CREATE_DETACHED
14737 #define PTHREAD_CREATE_DETACHED 1
14738 #endif
14739         pthread_t t;
14740         int status;
14741         int detach = PTHREAD_CREATE_DETACHED;
14742
14743 #if HAVE_PTHREADS > 4
14744         /* Final pthreads */
14745         pthread_attr_t attr;
14746
14747         status = pthread_attr_init(&attr);
14748         if( status ) return status;
14749
14750 #if HAVE_PTHREADS < 7
14751         status = pthread_attr_setdetachstate(&attr, &detach);
14752         if( status < 0 ) status = errno;
14753 #else
14754         status = pthread_attr_setdetachstate(&attr, detach);
14755 #endif
14756         if( status ) return status;
14757         status = pthread_create( &t, &attr, task, NULL );
14758 #if HAVE_PTHREADS < 7
14759         if( status < 0 ) status = errno;
14760 #endif
14761         if( status ) return status;
14762 #else
14763         /* Draft 4 pthreads */
14764         status = pthread_create( &t, pthread_attr_default, task, NULL );
14765         if( status ) return errno;
14766
14767         /* give thread a chance to complete */
14768         /* it should remain joinable and hence detachable */
14769         sleep( 1 );
14770
14771         status = pthread_detach( &t );
14772         if( status ) return errno;
14773 #endif
14774
14775 #ifdef HAVE_LINUX_THREADS
14776         pthread_kill_other_threads_np();
14777 #endif
14778
14779         return 0;
14780
14781 }
14782
14783 EOF
14784 if { (eval echo configure:14785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14785 then
14786   ol_cv_pthread_lib_lpthreads=yes
14787 else
14788   echo "configure: failed program was:" >&5
14789   cat conftest.$ac_ext >&5
14790   rm -fr conftest*
14791   ol_cv_pthread_lib_lpthreads=no
14792 fi
14793 rm -fr conftest*
14794 fi
14795
14796
14797                 # restore the LIBS
14798                 LIBS="$ol_LIBS"
14799         
14800 fi
14801
14802 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14803
14804         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14805                 ol_link_pthreads="-lpthreads"
14806                 ol_link_threads=posix
14807         fi
14808 fi
14809
14810
14811                 if test $ol_link_threads != no ; then
14812                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14813
14814                                                 save_CPPFLAGS="$CPPFLAGS"
14815                         save_LIBS="$LIBS"
14816                         LIBS="$LTHREAD_LIBS $LIBS"
14817
14818                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14819 do
14820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14821 echo "configure:14822: checking for $ac_func" >&5
14822 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14823   echo $ac_n "(cached) $ac_c" 1>&6
14824 else
14825   cat > conftest.$ac_ext <<EOF
14826 #line 14827 "configure"
14827 #include "confdefs.h"
14828 /* System header to define __stub macros and hopefully few prototypes,
14829     which can conflict with char $ac_func(); below.  */
14830 #include <assert.h>
14831 /* Override any gcc2 internal prototype to avoid an error.  */
14832 /* We use char because int might match the return type of a gcc2
14833     builtin and then its argument prototype would still apply.  */
14834 char $ac_func();
14835 char (*f)();
14836
14837 int main() {
14838
14839 /* The GNU C library defines this for functions which it implements
14840     to always fail with ENOSYS.  Some functions are actually named
14841     something starting with __ and the normal name is an alias.  */
14842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14843 choke me
14844 #else
14845 f = $ac_func;
14846 #endif
14847
14848 ; return 0; }
14849 EOF
14850 if { (eval echo configure:14851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14851   rm -rf conftest*
14852   eval "ac_cv_func_$ac_func=yes"
14853 else
14854   echo "configure: failed program was:" >&5
14855   cat conftest.$ac_ext >&5
14856   rm -rf conftest*
14857   eval "ac_cv_func_$ac_func=no"
14858 fi
14859 rm -f conftest*
14860 fi
14861
14862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14863   echo "$ac_t""yes" 1>&6
14864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14865   cat >> confdefs.h <<EOF
14866 #define $ac_tr_func 1
14867 EOF
14868  
14869 else
14870   echo "$ac_t""no" 1>&6
14871 fi
14872 done
14873
14874
14875                         if test $ac_cv_func_sched_yield = no -a \
14876                                 $ac_cv_func_pthread_yield = no -a \
14877                                 $ac_cv_func_thr_yield = no ; then
14878                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14879 echo "configure:14880: checking for sched_yield in -lrt" >&5
14880 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14882   echo $ac_n "(cached) $ac_c" 1>&6
14883 else
14884   ac_save_LIBS="$LIBS"
14885 LIBS="-lrt  $LIBS"
14886 cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* Override any gcc2 internal prototype to avoid an error.  */
14890 /* We use char because int might match the return type of a gcc2
14891     builtin and then its argument prototype would still apply.  */
14892 char sched_yield();
14893
14894 int main() {
14895 sched_yield()
14896 ; return 0; }
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14899   rm -rf conftest*
14900   eval "ac_cv_lib_$ac_lib_var=yes"
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904   rm -rf conftest*
14905   eval "ac_cv_lib_$ac_lib_var=no"
14906 fi
14907 rm -f conftest*
14908 LIBS="$ac_save_LIBS"
14909
14910 fi
14911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14912   echo "$ac_t""yes" 1>&6
14913   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14914                                         cat >> confdefs.h <<\EOF
14915 #define HAVE_SCHED_YIELD 1
14916 EOF
14917
14918                                         ac_cv_func_sched_yield=yes
14919 else
14920   echo "$ac_t""no" 1>&6
14921 ac_cv_func_sched_yield=no
14922 fi
14923
14924                         fi
14925                         if test $ac_cv_func_sched_yield = no -a \
14926                                 $ac_cv_func_pthread_yield = no -a \
14927                                 "$ac_cv_func_thr_yield" = no ; then
14928                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14929                         fi
14930
14931                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14932 do
14933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14934 echo "configure:14935: checking for $ac_func" >&5
14935 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14936   echo $ac_n "(cached) $ac_c" 1>&6
14937 else
14938   cat > conftest.$ac_ext <<EOF
14939 #line 14940 "configure"
14940 #include "confdefs.h"
14941 /* System header to define __stub macros and hopefully few prototypes,
14942     which can conflict with char $ac_func(); below.  */
14943 #include <assert.h>
14944 /* Override any gcc2 internal prototype to avoid an error.  */
14945 /* We use char because int might match the return type of a gcc2
14946     builtin and then its argument prototype would still apply.  */
14947 char $ac_func();
14948 char (*f)();
14949
14950 int main() {
14951
14952 /* The GNU C library defines this for functions which it implements
14953     to always fail with ENOSYS.  Some functions are actually named
14954     something starting with __ and the normal name is an alias.  */
14955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14956 choke me
14957 #else
14958 f = $ac_func;
14959 #endif
14960
14961 ; return 0; }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14964   rm -rf conftest*
14965   eval "ac_cv_func_$ac_func=yes"
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   rm -rf conftest*
14970   eval "ac_cv_func_$ac_func=no"
14971 fi
14972 rm -f conftest*
14973 fi
14974
14975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14976   echo "$ac_t""yes" 1>&6
14977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14978   cat >> confdefs.h <<EOF
14979 #define $ac_tr_func 1
14980 EOF
14981  
14982 else
14983   echo "$ac_t""no" 1>&6
14984 fi
14985 done
14986
14987
14988                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14989 echo "configure:14990: checking for pthread_detach with <pthread.h>" >&5
14990 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   
14994                                                                 cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997
14998 #include <pthread.h>
14999 #ifndef NULL
15000 #define NULL (void*)0
15001 #endif
15002
15003 int main() {
15004 pthread_detach(NULL);
15005 ; return 0; }
15006 EOF
15007 if { (eval echo configure:15008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15008   rm -rf conftest*
15009   ol_cv_func_pthread_detach=yes
15010 else
15011   echo "configure: failed program was:" >&5
15012   cat conftest.$ac_ext >&5
15013   rm -rf conftest*
15014   ol_cv_func_pthread_detach=no
15015 fi
15016 rm -f conftest*
15017                         
15018 fi
15019
15020 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15021
15022                         if test $ol_cv_func_pthread_detach = no ; then
15023                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15024                         fi
15025
15026                         cat >> confdefs.h <<\EOF
15027 #define HAVE_PTHREAD_DETACH 1
15028 EOF
15029
15030
15031                                                 for ac_func in \
15032                                 pthread_setconcurrency \
15033                                 pthread_getconcurrency \
15034                                 thr_setconcurrency \
15035                                 thr_getconcurrency \
15036                         
15037 do
15038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $ac_func" >&5
15040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char $ac_func(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char $ac_func();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 f = $ac_func;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15083   cat >> confdefs.h <<EOF
15084 #define $ac_tr_func 1
15085 EOF
15086  
15087 else
15088   echo "$ac_t""no" 1>&6
15089 fi
15090 done
15091
15092
15093                         
15094         for ac_func in pthread_kill_other_threads_np
15095 do
15096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15097 echo "configure:15098: checking for $ac_func" >&5
15098 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15099   echo $ac_n "(cached) $ac_c" 1>&6
15100 else
15101   cat > conftest.$ac_ext <<EOF
15102 #line 15103 "configure"
15103 #include "confdefs.h"
15104 /* System header to define __stub macros and hopefully few prototypes,
15105     which can conflict with char $ac_func(); below.  */
15106 #include <assert.h>
15107 /* Override any gcc2 internal prototype to avoid an error.  */
15108 /* We use char because int might match the return type of a gcc2
15109     builtin and then its argument prototype would still apply.  */
15110 char $ac_func();
15111 char (*f)();
15112
15113 int main() {
15114
15115 /* The GNU C library defines this for functions which it implements
15116     to always fail with ENOSYS.  Some functions are actually named
15117     something starting with __ and the normal name is an alias.  */
15118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15119 choke me
15120 #else
15121 f = $ac_func;
15122 #endif
15123
15124 ; return 0; }
15125 EOF
15126 if { (eval echo configure:15127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15127   rm -rf conftest*
15128   eval "ac_cv_func_$ac_func=yes"
15129 else
15130   echo "configure: failed program was:" >&5
15131   cat conftest.$ac_ext >&5
15132   rm -rf conftest*
15133   eval "ac_cv_func_$ac_func=no"
15134 fi
15135 rm -f conftest*
15136 fi
15137
15138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15139   echo "$ac_t""yes" 1>&6
15140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15141   cat >> confdefs.h <<EOF
15142 #define $ac_tr_func 1
15143 EOF
15144  
15145 else
15146   echo "$ac_t""no" 1>&6
15147 fi
15148 done
15149
15150         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15151 echo "configure:15152: checking for LinuxThreads implementation" >&5
15152 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15156 fi
15157
15158 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15159
15160                         
15161         
15162         
15163         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15164 echo "configure:15165: checking for LinuxThreads consistency" >&5
15165 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15166   echo $ac_n "(cached) $ac_c" 1>&6
15167 else
15168   
15169                 if test $ol_cv_header_linux_threads = yes -a \
15170                         $ol_cv_sys_linux_threads = yes; then
15171                         ol_cv_linux_threads=yes
15172                 elif test $ol_cv_header_linux_threads = no -a \
15173                         $ol_cv_sys_linux_threads = no; then
15174                         ol_cv_linux_threads=no
15175                 else
15176                         ol_cv_linux_threads=error
15177                 fi
15178         
15179 fi
15180
15181 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15182
15183
15184                         if test $ol_cv_linux_threads = error; then
15185                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15186                         fi
15187
15188                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15189 echo "configure:15190: checking if pthread_create() works" >&5
15190 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15191   echo $ac_n "(cached) $ac_c" 1>&6
15192 else
15193   
15194                         if test "$cross_compiling" = yes; then
15195                                 ol_cv_pthread_create_works=yes
15196 else
15197   cat > conftest.$ac_ext <<EOF
15198 #line 15199 "configure"
15199 #include "confdefs.h"
15200 /* pthread test headers */
15201 #include <pthread.h>
15202 #if HAVE_PTHREADS < 7
15203 #include <errno.h>
15204 #endif
15205 #ifndef NULL
15206 #define NULL (void*)0
15207 #endif
15208
15209 static void *task(p)
15210         void *p;
15211 {
15212         return (void *) (p == NULL);
15213 }
15214
15215
15216 int main(argc, argv)
15217         int argc;
15218         char **argv;
15219 {
15220
15221         /* pthread test function */
15222 #ifndef PTHREAD_CREATE_DETACHED
15223 #define PTHREAD_CREATE_DETACHED 1
15224 #endif
15225         pthread_t t;
15226         int status;
15227         int detach = PTHREAD_CREATE_DETACHED;
15228
15229 #if HAVE_PTHREADS > 4
15230         /* Final pthreads */
15231         pthread_attr_t attr;
15232
15233         status = pthread_attr_init(&attr);
15234         if( status ) return status;
15235
15236 #if HAVE_PTHREADS < 7
15237         status = pthread_attr_setdetachstate(&attr, &detach);
15238         if( status < 0 ) status = errno;
15239 #else
15240         status = pthread_attr_setdetachstate(&attr, detach);
15241 #endif
15242         if( status ) return status;
15243         status = pthread_create( &t, &attr, task, NULL );
15244 #if HAVE_PTHREADS < 7
15245         if( status < 0 ) status = errno;
15246 #endif
15247         if( status ) return status;
15248 #else
15249         /* Draft 4 pthreads */
15250         status = pthread_create( &t, pthread_attr_default, task, NULL );
15251         if( status ) return errno;
15252
15253         /* give thread a chance to complete */
15254         /* it should remain joinable and hence detachable */
15255         sleep( 1 );
15256
15257         status = pthread_detach( &t );
15258         if( status ) return errno;
15259 #endif
15260
15261 #ifdef HAVE_LINUX_THREADS
15262         pthread_kill_other_threads_np();
15263 #endif
15264
15265         return 0;
15266
15267 }
15268
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15271 then
15272   ol_cv_pthread_create_works=yes
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -fr conftest*
15277   ol_cv_pthread_create_works=no
15278 fi
15279 rm -fr conftest*
15280 fi
15281
15282 fi
15283
15284 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15285
15286                         if test $ol_cv_pthread_create_works = no ; then
15287                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15288                         fi
15289
15290                                                 if test $ol_with_yielding_select = auto ; then
15291                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15292 echo "configure:15293: checking if select yields when using pthreads" >&5
15293 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15294   echo $ac_n "(cached) $ac_c" 1>&6
15295 else
15296   
15297                                 if test "$cross_compiling" = yes; then
15298   ol_cv_pthread_select_yields=cross
15299 else
15300   cat > conftest.$ac_ext <<EOF
15301 #line 15302 "configure"
15302 #include "confdefs.h"
15303
15304 #include <sys/types.h>
15305 #include <sys/time.h>
15306 #include <unistd.h>
15307 #include <pthread.h>
15308 #ifndef NULL
15309 #define NULL (void*) 0
15310 #endif
15311
15312 static int fildes[2];
15313
15314 static void *task(p)
15315         void *p;
15316 {
15317         int i;
15318         struct timeval tv;
15319
15320         fd_set rfds;
15321
15322         tv.tv_sec=10;
15323         tv.tv_usec=0;
15324
15325         FD_ZERO(&rfds);
15326         FD_SET(fildes[0], &rfds);
15327
15328         /* we're not interested in any fds */
15329         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15330
15331         if(i < 0) {
15332                 perror("select");
15333                 exit(10);
15334         }
15335
15336         exit(0); /* if we exit here, the select blocked the whole process */
15337 }
15338
15339 int main(argc, argv)
15340         int argc;
15341         char **argv;
15342 {
15343         pthread_t t;
15344
15345         /* create a pipe to select */
15346         if(pipe(&fildes[0])) {
15347                 perror("select");
15348                 exit(1);
15349         }
15350
15351 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15352         (void) pthread_setconcurrency(2);
15353 #else
15354 #ifdef HAVE_THR_SETCONCURRENCY
15355         /* Set Solaris LWP concurrency to 2 */
15356         thr_setconcurrency(2);
15357 #endif
15358 #endif
15359
15360 #if HAVE_PTHREADS < 6
15361         pthread_create(&t, pthread_attr_default, task, NULL);
15362 #else
15363         pthread_create(&t, NULL, task, NULL);
15364 #endif
15365
15366         /* make sure task runs first */
15367 #if HAVE_THR_YIELD
15368         thr_yield();
15369 #elif defined( HAVE_SCHED_YIELD )
15370         sched_yield();
15371 #elif defined( HAVE_PTHREAD_YIELD )
15372         pthread_yield();
15373 #endif
15374
15375         exit(2);
15376 }
15377 EOF
15378 if { (eval echo configure:15379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15379 then
15380   ol_cv_pthread_select_yields=no
15381 else
15382   echo "configure: failed program was:" >&5
15383   cat conftest.$ac_ext >&5
15384   rm -fr conftest*
15385   ol_cv_pthread_select_yields=yes
15386 fi
15387 rm -fr conftest*
15388 fi
15389
15390 fi
15391
15392 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15393
15394                                 if test $ol_cv_pthread_select_yields = cross ; then
15395                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15396                                 fi
15397
15398                                 if test $ol_cv_pthread_select_yields = yes ; then
15399                                         ol_with_yielding_select=yes
15400                                 fi
15401                         fi
15402
15403                                                 CPPFLAGS="$save_CPPFLAGS"
15404                         LIBS="$save_LIBS"
15405                 else
15406                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15407                 fi
15408         fi
15409
15410         if test $ol_with_threads = posix ; then
15411                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15412         fi
15413 fi
15414
15415 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15416         -o $ol_with_threads = mach ; then
15417
15418                 for ac_hdr in mach/cthreads.h cthreads.h
15419 do
15420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15422 echo "configure:15423: checking for $ac_hdr" >&5
15423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15424   echo $ac_n "(cached) $ac_c" 1>&6
15425 else
15426   cat > conftest.$ac_ext <<EOF
15427 #line 15428 "configure"
15428 #include "confdefs.h"
15429 #include <$ac_hdr>
15430 EOF
15431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15432 { (eval echo configure:15433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15434 if test -z "$ac_err"; then
15435   rm -rf conftest*
15436   eval "ac_cv_header_$ac_safe=yes"
15437 else
15438   echo "$ac_err" >&5
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_header_$ac_safe=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15449   cat >> confdefs.h <<EOF
15450 #define $ac_tr_hdr 1
15451 EOF
15452  
15453 else
15454   echo "$ac_t""no" 1>&6
15455 fi
15456 done
15457
15458         if test $ac_cv_header_mach_cthreads_h = yes ; then
15459                 ol_with_threads=found
15460
15461                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15462 echo "configure:15463: checking for cthread_fork" >&5
15463 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   cat > conftest.$ac_ext <<EOF
15467 #line 15468 "configure"
15468 #include "confdefs.h"
15469 /* System header to define __stub macros and hopefully few prototypes,
15470     which can conflict with char cthread_fork(); below.  */
15471 #include <assert.h>
15472 /* Override any gcc2 internal prototype to avoid an error.  */
15473 /* We use char because int might match the return type of a gcc2
15474     builtin and then its argument prototype would still apply.  */
15475 char cthread_fork();
15476 char (*f)();
15477
15478 int main() {
15479
15480 /* The GNU C library defines this for functions which it implements
15481     to always fail with ENOSYS.  Some functions are actually named
15482     something starting with __ and the normal name is an alias.  */
15483 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15484 choke me
15485 #else
15486 f = cthread_fork;
15487 #endif
15488
15489 ; return 0; }
15490 EOF
15491 if { (eval echo configure:15492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15492   rm -rf conftest*
15493   eval "ac_cv_func_cthread_fork=yes"
15494 else
15495   echo "configure: failed program was:" >&5
15496   cat conftest.$ac_ext >&5
15497   rm -rf conftest*
15498   eval "ac_cv_func_cthread_fork=no"
15499 fi
15500 rm -f conftest*
15501 fi
15502
15503 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15504   echo "$ac_t""yes" 1>&6
15505   ol_link_threads=yes
15506 else
15507   echo "$ac_t""no" 1>&6
15508 fi
15509
15510
15511                 if test $ol_link_threads = no ; then
15512                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15513 echo "configure:15514: checking for cthread_fork with -all_load" >&5
15514 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15515   echo $ac_n "(cached) $ac_c" 1>&6
15516 else
15517   
15518                                                                 save_LIBS="$LIBS"
15519                                 LIBS="-all_load $LIBS"
15520                                 cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 #include <mach/cthreads.h>
15524 int main() {
15525
15526                                         cthread_fork((void *)0, (void *)0);
15527                                         
15528 ; return 0; }
15529 EOF
15530 if { (eval echo configure:15531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15531   rm -rf conftest*
15532   ol_cv_cthread_all_load=yes
15533 else
15534   echo "configure: failed program was:" >&5
15535   cat conftest.$ac_ext >&5
15536   rm -rf conftest*
15537   ol_cv_cthread_all_load=no
15538 fi
15539 rm -f conftest*
15540                                                                 LIBS="$save_LIBS"
15541                         
15542 fi
15543
15544 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15545
15546                         if test $ol_cv_cthread_all_load = yes ; then
15547                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15548                                 ol_link_threads=mach
15549                                 ol_with_threads=found
15550                         fi
15551                 fi
15552
15553         elif test $ac_cv_header_cthreads_h = yes ; then
15554                                 
15555                 ol_with_threads=found
15556  
15557                                 save_LIBS="$LIBS"
15558                 LIBS="$LIBS -lthreads"
15559                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15560 echo "configure:15561: checking for cthread_fork" >&5
15561 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   cat > conftest.$ac_ext <<EOF
15565 #line 15566 "configure"
15566 #include "confdefs.h"
15567 /* System header to define __stub macros and hopefully few prototypes,
15568     which can conflict with char cthread_fork(); below.  */
15569 #include <assert.h>
15570 /* Override any gcc2 internal prototype to avoid an error.  */
15571 /* We use char because int might match the return type of a gcc2
15572     builtin and then its argument prototype would still apply.  */
15573 char cthread_fork();
15574 char (*f)();
15575
15576 int main() {
15577
15578 /* The GNU C library defines this for functions which it implements
15579     to always fail with ENOSYS.  Some functions are actually named
15580     something starting with __ and the normal name is an alias.  */
15581 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15582 choke me
15583 #else
15584 f = cthread_fork;
15585 #endif
15586
15587 ; return 0; }
15588 EOF
15589 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15590   rm -rf conftest*
15591   eval "ac_cv_func_cthread_fork=yes"
15592 else
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_func_cthread_fork=no"
15597 fi
15598 rm -f conftest*
15599 fi
15600
15601 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15602   echo "$ac_t""yes" 1>&6
15603   ol_link_threads=yes
15604 else
15605   echo "$ac_t""no" 1>&6
15606 fi
15607
15608                 LIBS="$save_LIBS"
15609
15610                 if test $ol_link_threads = yes ; then
15611                         LTHREAD_LIBS="-lthreads"
15612                         ol_link_threads=mach
15613                         ol_with_threads=found
15614                 else
15615                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15616                 fi
15617
15618         elif test $ol_with_threads = mach ; then
15619                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15620         fi
15621
15622         if test $ol_link_threads = mach ; then
15623                 cat >> confdefs.h <<\EOF
15624 #define HAVE_MACH_CTHREADS 1
15625 EOF
15626
15627         elif test $ol_with_threads = found ; then
15628                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15629         fi
15630 fi
15631
15632 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15633         -o $ol_with_threads = pth ; then
15634
15635         for ac_hdr in pth.h
15636 do
15637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15639 echo "configure:15640: checking for $ac_hdr" >&5
15640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15641   echo $ac_n "(cached) $ac_c" 1>&6
15642 else
15643   cat > conftest.$ac_ext <<EOF
15644 #line 15645 "configure"
15645 #include "confdefs.h"
15646 #include <$ac_hdr>
15647 EOF
15648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15649 { (eval echo configure:15650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15651 if test -z "$ac_err"; then
15652   rm -rf conftest*
15653   eval "ac_cv_header_$ac_safe=yes"
15654 else
15655   echo "$ac_err" >&5
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_header_$ac_safe=no"
15660 fi
15661 rm -f conftest*
15662 fi
15663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15664   echo "$ac_t""yes" 1>&6
15665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15666   cat >> confdefs.h <<EOF
15667 #define $ac_tr_hdr 1
15668 EOF
15669  
15670 else
15671   echo "$ac_t""no" 1>&6
15672 fi
15673 done
15674
15675
15676         if test $ac_cv_header_pth_h = yes ; then
15677                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15678 echo "configure:15679: checking for pth_version in -lpth" >&5
15679 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15681   echo $ac_n "(cached) $ac_c" 1>&6
15682 else
15683   ac_save_LIBS="$LIBS"
15684 LIBS="-lpth  $LIBS"
15685 cat > conftest.$ac_ext <<EOF
15686 #line 15687 "configure"
15687 #include "confdefs.h"
15688 /* Override any gcc2 internal prototype to avoid an error.  */
15689 /* We use char because int might match the return type of a gcc2
15690     builtin and then its argument prototype would still apply.  */
15691 char pth_version();
15692
15693 int main() {
15694 pth_version()
15695 ; return 0; }
15696 EOF
15697 if { (eval echo configure:15698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15698   rm -rf conftest*
15699   eval "ac_cv_lib_$ac_lib_var=yes"
15700 else
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_lib_$ac_lib_var=no"
15705 fi
15706 rm -f conftest*
15707 LIBS="$ac_save_LIBS"
15708
15709 fi
15710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15711   echo "$ac_t""yes" 1>&6
15712   have_pth=yes
15713 else
15714   echo "$ac_t""no" 1>&6
15715 have_pth=no
15716 fi
15717
15718
15719                 if test $have_pth = yes ; then
15720                         cat >> confdefs.h <<\EOF
15721 #define HAVE_GNU_PTH 1
15722 EOF
15723
15724                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15725                         ol_link_threads=pth
15726                         ol_with_threads=found
15727
15728                         if test $ol_with_yielding_select = auto ; then
15729                                 ol_with_yielding_select=yes
15730                         fi
15731                 fi
15732         fi
15733 fi
15734
15735 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15736         -o $ol_with_threads = lwp ; then
15737
15738                 for ac_hdr in thread.h synch.h
15739 do
15740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15742 echo "configure:15743: checking for $ac_hdr" >&5
15743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15744   echo $ac_n "(cached) $ac_c" 1>&6
15745 else
15746   cat > conftest.$ac_ext <<EOF
15747 #line 15748 "configure"
15748 #include "confdefs.h"
15749 #include <$ac_hdr>
15750 EOF
15751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15752 { (eval echo configure:15753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15754 if test -z "$ac_err"; then
15755   rm -rf conftest*
15756   eval "ac_cv_header_$ac_safe=yes"
15757 else
15758   echo "$ac_err" >&5
15759   echo "configure: failed program was:" >&5
15760   cat conftest.$ac_ext >&5
15761   rm -rf conftest*
15762   eval "ac_cv_header_$ac_safe=no"
15763 fi
15764 rm -f conftest*
15765 fi
15766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15767   echo "$ac_t""yes" 1>&6
15768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15769   cat >> confdefs.h <<EOF
15770 #define $ac_tr_hdr 1
15771 EOF
15772  
15773 else
15774   echo "$ac_t""no" 1>&6
15775 fi
15776 done
15777
15778         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15779                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15780 echo "configure:15781: checking for thr_create in -lthread" >&5
15781 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   ac_save_LIBS="$LIBS"
15786 LIBS="-lthread  $LIBS"
15787 cat > conftest.$ac_ext <<EOF
15788 #line 15789 "configure"
15789 #include "confdefs.h"
15790 /* Override any gcc2 internal prototype to avoid an error.  */
15791 /* We use char because int might match the return type of a gcc2
15792     builtin and then its argument prototype would still apply.  */
15793 char thr_create();
15794
15795 int main() {
15796 thr_create()
15797 ; return 0; }
15798 EOF
15799 if { (eval echo configure:15800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15800   rm -rf conftest*
15801   eval "ac_cv_lib_$ac_lib_var=yes"
15802 else
15803   echo "configure: failed program was:" >&5
15804   cat conftest.$ac_ext >&5
15805   rm -rf conftest*
15806   eval "ac_cv_lib_$ac_lib_var=no"
15807 fi
15808 rm -f conftest*
15809 LIBS="$ac_save_LIBS"
15810
15811 fi
15812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15813   echo "$ac_t""yes" 1>&6
15814   have_thr=yes
15815 else
15816   echo "$ac_t""no" 1>&6
15817 have_thr=no
15818 fi
15819
15820
15821                 if test $have_thr = yes ; then
15822                         cat >> confdefs.h <<\EOF
15823 #define HAVE_THR 1
15824 EOF
15825
15826                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15827                         ol_link_threads=thr
15828
15829                         if test $ol_with_yielding_select = auto ; then
15830                                 ol_with_yielding_select=yes
15831                         fi
15832
15833                                                 for ac_func in \
15834                                 thr_setconcurrency \
15835                                 thr_getconcurrency \
15836                         
15837 do
15838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15839 echo "configure:15840: checking for $ac_func" >&5
15840 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15841   echo $ac_n "(cached) $ac_c" 1>&6
15842 else
15843   cat > conftest.$ac_ext <<EOF
15844 #line 15845 "configure"
15845 #include "confdefs.h"
15846 /* System header to define __stub macros and hopefully few prototypes,
15847     which can conflict with char $ac_func(); below.  */
15848 #include <assert.h>
15849 /* Override any gcc2 internal prototype to avoid an error.  */
15850 /* We use char because int might match the return type of a gcc2
15851     builtin and then its argument prototype would still apply.  */
15852 char $ac_func();
15853 char (*f)();
15854
15855 int main() {
15856
15857 /* The GNU C library defines this for functions which it implements
15858     to always fail with ENOSYS.  Some functions are actually named
15859     something starting with __ and the normal name is an alias.  */
15860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15861 choke me
15862 #else
15863 f = $ac_func;
15864 #endif
15865
15866 ; return 0; }
15867 EOF
15868 if { (eval echo configure:15869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15869   rm -rf conftest*
15870   eval "ac_cv_func_$ac_func=yes"
15871 else
15872   echo "configure: failed program was:" >&5
15873   cat conftest.$ac_ext >&5
15874   rm -rf conftest*
15875   eval "ac_cv_func_$ac_func=no"
15876 fi
15877 rm -f conftest*
15878 fi
15879
15880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_func 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892                 fi
15893         fi
15894
15895                 for ac_hdr in lwp/lwp.h
15896 do
15897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15899 echo "configure:15900: checking for $ac_hdr" >&5
15900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15901   echo $ac_n "(cached) $ac_c" 1>&6
15902 else
15903   cat > conftest.$ac_ext <<EOF
15904 #line 15905 "configure"
15905 #include "confdefs.h"
15906 #include <$ac_hdr>
15907 EOF
15908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15909 { (eval echo configure:15910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15911 if test -z "$ac_err"; then
15912   rm -rf conftest*
15913   eval "ac_cv_header_$ac_safe=yes"
15914 else
15915   echo "$ac_err" >&5
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -rf conftest*
15919   eval "ac_cv_header_$ac_safe=no"
15920 fi
15921 rm -f conftest*
15922 fi
15923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15924   echo "$ac_t""yes" 1>&6
15925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15926   cat >> confdefs.h <<EOF
15927 #define $ac_tr_hdr 1
15928 EOF
15929  
15930 else
15931   echo "$ac_t""no" 1>&6
15932 fi
15933 done
15934
15935         if test $ac_cv_header_lwp_lwp_h = yes ; then
15936                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15937 echo "configure:15938: checking for lwp_create in -llwp" >&5
15938 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   ac_save_LIBS="$LIBS"
15943 LIBS="-llwp  $LIBS"
15944 cat > conftest.$ac_ext <<EOF
15945 #line 15946 "configure"
15946 #include "confdefs.h"
15947 /* Override any gcc2 internal prototype to avoid an error.  */
15948 /* We use char because int might match the return type of a gcc2
15949     builtin and then its argument prototype would still apply.  */
15950 char lwp_create();
15951
15952 int main() {
15953 lwp_create()
15954 ; return 0; }
15955 EOF
15956 if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15957   rm -rf conftest*
15958   eval "ac_cv_lib_$ac_lib_var=yes"
15959 else
15960   echo "configure: failed program was:" >&5
15961   cat conftest.$ac_ext >&5
15962   rm -rf conftest*
15963   eval "ac_cv_lib_$ac_lib_var=no"
15964 fi
15965 rm -f conftest*
15966 LIBS="$ac_save_LIBS"
15967
15968 fi
15969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15970   echo "$ac_t""yes" 1>&6
15971   have_lwp=yes
15972 else
15973   echo "$ac_t""no" 1>&6
15974 have_lwp=no
15975 fi
15976
15977
15978                 if test $have_lwp = yes ; then
15979                         cat >> confdefs.h <<\EOF
15980 #define HAVE_LWP 1
15981 EOF
15982
15983                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15984                         ol_link_threads=lwp
15985
15986                         if test $ol_with_yielding_select = auto ; then
15987                                 ol_with_yielding_select=no
15988                         fi
15989                 fi
15990         fi
15991 fi
15992
15993 if test $ol_with_yielding_select = yes ; then
15994         cat >> confdefs.h <<\EOF
15995 #define HAVE_YIELDING_SELECT 1
15996 EOF
15997
15998 fi
15999
16000 if test $ol_with_threads = manual ; then
16001                 ol_link_threads=yes
16002
16003         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16004
16005         for ac_hdr in pthread.h sched.h
16006 do
16007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16009 echo "configure:16010: checking for $ac_hdr" >&5
16010 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16011   echo $ac_n "(cached) $ac_c" 1>&6
16012 else
16013   cat > conftest.$ac_ext <<EOF
16014 #line 16015 "configure"
16015 #include "confdefs.h"
16016 #include <$ac_hdr>
16017 EOF
16018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16019 { (eval echo configure:16020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16021 if test -z "$ac_err"; then
16022   rm -rf conftest*
16023   eval "ac_cv_header_$ac_safe=yes"
16024 else
16025   echo "$ac_err" >&5
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -rf conftest*
16029   eval "ac_cv_header_$ac_safe=no"
16030 fi
16031 rm -f conftest*
16032 fi
16033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16034   echo "$ac_t""yes" 1>&6
16035     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16036   cat >> confdefs.h <<EOF
16037 #define $ac_tr_hdr 1
16038 EOF
16039  
16040 else
16041   echo "$ac_t""no" 1>&6
16042 fi
16043 done
16044
16045         for ac_func in sched_yield pthread_yield
16046 do
16047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16048 echo "configure:16049: checking for $ac_func" >&5
16049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16050   echo $ac_n "(cached) $ac_c" 1>&6
16051 else
16052   cat > conftest.$ac_ext <<EOF
16053 #line 16054 "configure"
16054 #include "confdefs.h"
16055 /* System header to define __stub macros and hopefully few prototypes,
16056     which can conflict with char $ac_func(); below.  */
16057 #include <assert.h>
16058 /* Override any gcc2 internal prototype to avoid an error.  */
16059 /* We use char because int might match the return type of a gcc2
16060     builtin and then its argument prototype would still apply.  */
16061 char $ac_func();
16062 char (*f)();
16063
16064 int main() {
16065
16066 /* The GNU C library defines this for functions which it implements
16067     to always fail with ENOSYS.  Some functions are actually named
16068     something starting with __ and the normal name is an alias.  */
16069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16070 choke me
16071 #else
16072 f = $ac_func;
16073 #endif
16074
16075 ; return 0; }
16076 EOF
16077 if { (eval echo configure:16078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16078   rm -rf conftest*
16079   eval "ac_cv_func_$ac_func=yes"
16080 else
16081   echo "configure: failed program was:" >&5
16082   cat conftest.$ac_ext >&5
16083   rm -rf conftest*
16084   eval "ac_cv_func_$ac_func=no"
16085 fi
16086 rm -f conftest*
16087 fi
16088
16089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16090   echo "$ac_t""yes" 1>&6
16091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16092   cat >> confdefs.h <<EOF
16093 #define $ac_tr_func 1
16094 EOF
16095  
16096 else
16097   echo "$ac_t""no" 1>&6
16098 fi
16099 done
16100
16101         
16102         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16103 echo "configure:16104: checking for LinuxThreads pthread.h" >&5
16104 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16105   echo $ac_n "(cached) $ac_c" 1>&6
16106 else
16107   cat > conftest.$ac_ext <<EOF
16108 #line 16109 "configure"
16109 #include "confdefs.h"
16110 #include <pthread.h>
16111 EOF
16112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16113   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16114   rm -rf conftest*
16115   ol_cv_header_linux_threads=yes
16116 else
16117   rm -rf conftest*
16118   ol_cv_header_linux_threads=no
16119 fi
16120 rm -f conftest*
16121
16122                 
16123 fi
16124
16125 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16126         if test $ol_cv_header_linux_threads = yes; then
16127                 cat >> confdefs.h <<\EOF
16128 #define HAVE_LINUX_THREADS 1
16129 EOF
16130
16131         fi
16132
16133
16134         for ac_hdr in mach/cthreads.h
16135 do
16136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16138 echo "configure:16139: checking for $ac_hdr" >&5
16139 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16140   echo $ac_n "(cached) $ac_c" 1>&6
16141 else
16142   cat > conftest.$ac_ext <<EOF
16143 #line 16144 "configure"
16144 #include "confdefs.h"
16145 #include <$ac_hdr>
16146 EOF
16147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16148 { (eval echo configure:16149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16150 if test -z "$ac_err"; then
16151   rm -rf conftest*
16152   eval "ac_cv_header_$ac_safe=yes"
16153 else
16154   echo "$ac_err" >&5
16155   echo "configure: failed program was:" >&5
16156   cat conftest.$ac_ext >&5
16157   rm -rf conftest*
16158   eval "ac_cv_header_$ac_safe=no"
16159 fi
16160 rm -f conftest*
16161 fi
16162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16163   echo "$ac_t""yes" 1>&6
16164     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16165   cat >> confdefs.h <<EOF
16166 #define $ac_tr_hdr 1
16167 EOF
16168  
16169 else
16170   echo "$ac_t""no" 1>&6
16171 fi
16172 done
16173
16174         for ac_hdr in lwp/lwp.h
16175 do
16176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16178 echo "configure:16179: checking for $ac_hdr" >&5
16179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16180   echo $ac_n "(cached) $ac_c" 1>&6
16181 else
16182   cat > conftest.$ac_ext <<EOF
16183 #line 16184 "configure"
16184 #include "confdefs.h"
16185 #include <$ac_hdr>
16186 EOF
16187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16188 { (eval echo configure:16189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16190 if test -z "$ac_err"; then
16191   rm -rf conftest*
16192   eval "ac_cv_header_$ac_safe=yes"
16193 else
16194   echo "$ac_err" >&5
16195   echo "configure: failed program was:" >&5
16196   cat conftest.$ac_ext >&5
16197   rm -rf conftest*
16198   eval "ac_cv_header_$ac_safe=no"
16199 fi
16200 rm -f conftest*
16201 fi
16202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16203   echo "$ac_t""yes" 1>&6
16204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16205   cat >> confdefs.h <<EOF
16206 #define $ac_tr_hdr 1
16207 EOF
16208  
16209 else
16210   echo "$ac_t""no" 1>&6
16211 fi
16212 done
16213
16214         for ac_hdr in thread.h synch.h
16215 do
16216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16218 echo "configure:16219: checking for $ac_hdr" >&5
16219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16220   echo $ac_n "(cached) $ac_c" 1>&6
16221 else
16222   cat > conftest.$ac_ext <<EOF
16223 #line 16224 "configure"
16224 #include "confdefs.h"
16225 #include <$ac_hdr>
16226 EOF
16227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16228 { (eval echo configure:16229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16230 if test -z "$ac_err"; then
16231   rm -rf conftest*
16232   eval "ac_cv_header_$ac_safe=yes"
16233 else
16234   echo "$ac_err" >&5
16235   echo "configure: failed program was:" >&5
16236   cat conftest.$ac_ext >&5
16237   rm -rf conftest*
16238   eval "ac_cv_header_$ac_safe=no"
16239 fi
16240 rm -f conftest*
16241 fi
16242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16243   echo "$ac_t""yes" 1>&6
16244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16245   cat >> confdefs.h <<EOF
16246 #define $ac_tr_hdr 1
16247 EOF
16248  
16249 else
16250   echo "$ac_t""no" 1>&6
16251 fi
16252 done
16253
16254 fi
16255
16256 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16257                         cat >> confdefs.h <<\EOF
16258 #define REENTRANT 1
16259 EOF
16260
16261         cat >> confdefs.h <<\EOF
16262 #define _REENTRANT 1
16263 EOF
16264
16265         cat >> confdefs.h <<\EOF
16266 #define THREAD_SAFE 1
16267 EOF
16268
16269         cat >> confdefs.h <<\EOF
16270 #define _THREAD_SAFE 1
16271 EOF
16272
16273         cat >> confdefs.h <<\EOF
16274 #define THREADSAFE 1
16275 EOF
16276
16277         cat >> confdefs.h <<\EOF
16278 #define _THREADSAFE 1
16279 EOF
16280
16281         cat >> confdefs.h <<\EOF
16282 #define _SGI_MP_SOURCE 1
16283 EOF
16284
16285
16286                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16287 echo "configure:16288: checking for thread specific errno" >&5
16288 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16289   echo $ac_n "(cached) $ac_c" 1>&6
16290 else
16291   
16292                 cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 #include <errno.h>
16296 int main() {
16297 errno = 0;
16298 ; return 0; }
16299 EOF
16300 if { (eval echo configure:16301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16301   rm -rf conftest*
16302   ol_cv_errno_thread_specific=yes
16303 else
16304   echo "configure: failed program was:" >&5
16305   cat conftest.$ac_ext >&5
16306   rm -rf conftest*
16307   ol_cv_errno_thread_specific=no
16308 fi
16309 rm -f conftest*
16310         
16311 fi
16312
16313 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16314
16315                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16316 echo "configure:16317: checking for thread specific h_errno" >&5
16317 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16318   echo $ac_n "(cached) $ac_c" 1>&6
16319 else
16320   
16321                 cat > conftest.$ac_ext <<EOF
16322 #line 16323 "configure"
16323 #include "confdefs.h"
16324 #include <netdb.h>
16325 int main() {
16326 h_errno = 0;
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16330   rm -rf conftest*
16331   ol_cv_h_errno_thread_specific=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_h_errno_thread_specific=no
16337 fi
16338 rm -f conftest*
16339         
16340 fi
16341
16342 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16343
16344         if test $ol_cv_errno_thread_specific != yes \
16345                 -o $ol_cv_h_errno_thread_specific != yes ; then
16346                 LIBS="$LTHREAD_LIBS $LIBS"
16347                 LTHREAD_LIBS=""
16348         fi
16349
16350 fi  
16351
16352 if test $ol_link_threads = no ; then
16353         if test $ol_with_threads = yes ; then
16354                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16355         fi
16356
16357         if test $ol_with_threads = auto ; then
16358                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16359                 ol_with_threads=no
16360         fi
16361
16362         cat >> confdefs.h <<\EOF
16363 #define NO_THREADS 1
16364 EOF
16365
16366         LTHREAD_LIBS=""
16367 fi
16368
16369 if test $ol_link_threads != no ; then
16370         cat >> confdefs.h <<\EOF
16371 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16372 EOF
16373
16374 fi
16375
16376 for ac_func in \
16377         ctime_r                 \
16378         gethostbyname_r gethostbyaddr_r \
16379
16380 do
16381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16382 echo "configure:16383: checking for $ac_func" >&5
16383 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 /* System header to define __stub macros and hopefully few prototypes,
16390     which can conflict with char $ac_func(); below.  */
16391 #include <assert.h>
16392 /* Override any gcc2 internal prototype to avoid an error.  */
16393 /* We use char because int might match the return type of a gcc2
16394     builtin and then its argument prototype would still apply.  */
16395 char $ac_func();
16396 char (*f)();
16397
16398 int main() {
16399
16400 /* The GNU C library defines this for functions which it implements
16401     to always fail with ENOSYS.  Some functions are actually named
16402     something starting with __ and the normal name is an alias.  */
16403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16404 choke me
16405 #else
16406 f = $ac_func;
16407 #endif
16408
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16412   rm -rf conftest*
16413   eval "ac_cv_func_$ac_func=yes"
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   eval "ac_cv_func_$ac_func=no"
16419 fi
16420 rm -f conftest*
16421 fi
16422
16423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16424   echo "$ac_t""yes" 1>&6
16425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16426   cat >> confdefs.h <<EOF
16427 #define $ac_tr_func 1
16428 EOF
16429  
16430 else
16431   echo "$ac_t""no" 1>&6
16432 fi
16433 done
16434
16435
16436 if test "$ac_cv_func_ctime_r" = no ; then
16437         ol_cv_func_ctime_r_nargs=0
16438 else
16439         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16440 echo "configure:16441: checking number of arguments of ctime_r" >&5
16441 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16442   echo $ac_n "(cached) $ac_c" 1>&6
16443 else
16444   cat > conftest.$ac_ext <<EOF
16445 #line 16446 "configure"
16446 #include "confdefs.h"
16447 #include <time.h>
16448 int main() {
16449 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16450 ; return 0; }
16451 EOF
16452 if { (eval echo configure:16453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16453   rm -rf conftest*
16454   ol_cv_func_ctime_r_nargs3=yes
16455 else
16456   echo "configure: failed program was:" >&5
16457   cat conftest.$ac_ext >&5
16458   rm -rf conftest*
16459   ol_cv_func_ctime_r_nargs3=no
16460 fi
16461 rm -f conftest*
16462
16463         cat > conftest.$ac_ext <<EOF
16464 #line 16465 "configure"
16465 #include "confdefs.h"
16466 #include <time.h>
16467 int main() {
16468 time_t ti; char *buffer; ctime_r(&ti,buffer);
16469 ; return 0; }
16470 EOF
16471 if { (eval echo configure:16472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16472   rm -rf conftest*
16473   ol_cv_func_ctime_r_nargs2=yes
16474 else
16475   echo "configure: failed program was:" >&5
16476   cat conftest.$ac_ext >&5
16477   rm -rf conftest*
16478   ol_cv_func_ctime_r_nargs2=no
16479 fi
16480 rm -f conftest*
16481
16482         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16483                 $ol_cv_func_ctime_r_nargs2 = no ; then
16484
16485                 ol_cv_func_ctime_r_nargs=3
16486
16487         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16488                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16489
16490                 ol_cv_func_ctime_r_nargs=2
16491
16492         else
16493                 ol_cv_func_ctime_r_nargs=0
16494         fi
16495   
16496 fi
16497
16498 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16499
16500   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16501         cat >> confdefs.h <<EOF
16502 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16503 EOF
16504
16505   fi
16506
16507 fi
16508
16509 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16510         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16511 echo "configure:16512: checking number of arguments of gethostbyname_r" >&5
16512 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   cat > conftest.$ac_ext <<EOF
16516 #line 16517 "configure"
16517 #include "confdefs.h"
16518 #include <sys/types.h>
16519 #include <sys/socket.h>
16520 #include <netinet/in.h>
16521 #include <netdb.h>
16522 #define BUFSIZE (sizeof(struct hostent)+10)
16523 int main() {
16524 struct hostent hent; char buffer[BUFSIZE];
16525                 int bufsize=BUFSIZE;int h_errno;
16526                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16527                         buffer, bufsize, &h_errno);
16528 ; return 0; }
16529 EOF
16530 if { (eval echo configure:16531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16531   rm -rf conftest*
16532   ol_cv_func_gethostbyname_r_nargs5=yes
16533 else
16534   echo "configure: failed program was:" >&5
16535   cat conftest.$ac_ext >&5
16536   rm -rf conftest*
16537   ol_cv_func_gethostbyname_r_nargs5=no
16538 fi
16539 rm -f conftest*
16540
16541         cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 #include <sys/types.h>
16545 #include <sys/socket.h>
16546 #include <netinet/in.h>
16547 #include <netdb.h>
16548 #define BUFSIZE (sizeof(struct hostent)+10)
16549 int main() {
16550 struct hostent hent;struct hostent *rhent;
16551                 char buffer[BUFSIZE];
16552                 int bufsize=BUFSIZE;int h_errno;
16553                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16554                         &rhent, &h_errno);
16555 ; return 0; }
16556 EOF
16557 if { (eval echo configure:16558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16558   rm -rf conftest*
16559   ol_cv_func_gethostbyname_r_nargs6=yes
16560 else
16561   echo "configure: failed program was:" >&5
16562   cat conftest.$ac_ext >&5
16563   rm -rf conftest*
16564   ol_cv_func_gethostbyname_r_nargs6=no
16565 fi
16566 rm -f conftest*
16567
16568         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16569                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16570
16571                 ol_cv_func_gethostbyname_r_nargs=5
16572
16573         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16574                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16575
16576                 ol_cv_func_gethostbyname_r_nargs=6
16577
16578         else
16579                 ol_cv_func_gethostbyname_r_nargs=0
16580         fi
16581   
16582 fi
16583
16584 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16585   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16586         cat >> confdefs.h <<EOF
16587 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16588 EOF
16589
16590   fi
16591
16592 else
16593         ol_cv_func_gethostbyname_r_nargs=0
16594 fi
16595  
16596 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16597         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16598 echo "configure:16599: checking number of arguments of gethostbyaddr_r" >&5
16599 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16600   echo $ac_n "(cached) $ac_c" 1>&6
16601 else
16602   cat > conftest.$ac_ext <<EOF
16603 #line 16604 "configure"
16604 #include "confdefs.h"
16605 #include <sys/types.h>
16606 #include <sys/socket.h>
16607 #include <netinet/in.h>
16608 #include <netdb.h>
16609 #define BUFSIZE (sizeof(struct hostent)+10)
16610 int main() {
16611 struct hostent hent; char buffer[BUFSIZE]; 
16612             struct in_addr add;
16613             size_t alen=sizeof(struct in_addr);
16614             int bufsize=BUFSIZE;int h_errno;
16615                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16616                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16617 ; return 0; }
16618 EOF
16619 if { (eval echo configure:16620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16620   rm -rf conftest*
16621   ol_cv_func_gethostbyaddr_r_nargs7=yes
16622 else
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   ol_cv_func_gethostbyaddr_r_nargs7=no
16627 fi
16628 rm -f conftest*
16629
16630         cat > conftest.$ac_ext <<EOF
16631 #line 16632 "configure"
16632 #include "confdefs.h"
16633 #include <sys/types.h>
16634 #include <sys/socket.h>
16635 #include <netinet/in.h>
16636 #include <netdb.h>
16637 #define BUFSIZE (sizeof(struct hostent)+10)
16638 int main() {
16639 struct hostent hent;
16640                 struct hostent *rhent; char buffer[BUFSIZE]; 
16641                 struct in_addr add;
16642                 size_t alen=sizeof(struct in_addr);
16643                 int bufsize=BUFSIZE;int h_errno;
16644                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16645                         alen, AF_INET, &hent, buffer, bufsize, 
16646                         &rhent, &h_errno);
16647 ; return 0; }
16648 EOF
16649 if { (eval echo configure:16650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16650   rm -rf conftest*
16651   ol_cv_func_gethostbyaddr_r_nargs8=yes
16652 else
16653   echo "configure: failed program was:" >&5
16654   cat conftest.$ac_ext >&5
16655   rm -rf conftest*
16656   ol_cv_func_gethostbyaddr_r_nargs8=no
16657 fi
16658 rm -f conftest*
16659
16660         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16661                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16662
16663                 ol_cv_func_gethostbyaddr_r_nargs=7
16664
16665         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16666                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16667
16668                 ol_cv_func_gethostbyaddr_r_nargs=8
16669
16670         else
16671                 ol_cv_func_gethostbyaddr_r_nargs=0
16672         fi
16673   
16674 fi
16675
16676 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16677   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16678     cat >> confdefs.h <<EOF
16679 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16680 EOF
16681
16682   fi
16683
16684 else
16685         ol_cv_func_gethostbyaddr_r_nargs=0
16686 fi
16687
16688 ol_link_ldbm=no 
16689
16690 if test $ol_with_ldbm_api = auto \
16691         -o $ol_with_ldbm_api = berkeley \
16692         -o $ol_with_ldbm_api = bcompat ; then
16693
16694         if test $ol_with_ldbm_api = bcompat; then \
16695                 for ac_hdr in db_185.h db.h
16696 do
16697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16699 echo "configure:16700: checking for $ac_hdr" >&5
16700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16701   echo $ac_n "(cached) $ac_c" 1>&6
16702 else
16703   cat > conftest.$ac_ext <<EOF
16704 #line 16705 "configure"
16705 #include "confdefs.h"
16706 #include <$ac_hdr>
16707 EOF
16708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16709 { (eval echo configure:16710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16711 if test -z "$ac_err"; then
16712   rm -rf conftest*
16713   eval "ac_cv_header_$ac_safe=yes"
16714 else
16715   echo "$ac_err" >&5
16716   echo "configure: failed program was:" >&5
16717   cat conftest.$ac_ext >&5
16718   rm -rf conftest*
16719   eval "ac_cv_header_$ac_safe=no"
16720 fi
16721 rm -f conftest*
16722 fi
16723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16724   echo "$ac_t""yes" 1>&6
16725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16726   cat >> confdefs.h <<EOF
16727 #define $ac_tr_hdr 1
16728 EOF
16729  
16730 else
16731   echo "$ac_t""no" 1>&6
16732 fi
16733 done
16734
16735 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16736         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16737 echo "configure:16738: checking if Berkeley DB header compatibility" >&5
16738 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   
16742                 cat > conftest.$ac_ext <<EOF
16743 #line 16744 "configure"
16744 #include "confdefs.h"
16745
16746 #if HAVE_DB_185_H
16747 #       include <db_185.h>
16748 #else
16749 #       include <db.h>
16750 #endif
16751
16752  /* this check could be improved */
16753 #ifndef DB_VERSION_MAJOR
16754 #       define DB_VERSION_MAJOR 1
16755 #endif
16756
16757 #if DB_VERSION_MAJOR == 1 
16758         __db_version_1
16759 #endif
16760
16761 EOF
16762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16763   egrep "__db_version_1" >/dev/null 2>&1; then
16764   rm -rf conftest*
16765   ol_cv_header_db1=yes
16766 else
16767   rm -rf conftest*
16768   ol_cv_header_db1=no
16769 fi
16770 rm -f conftest*
16771
16772 fi
16773
16774 echo "$ac_t""$ol_cv_header_db1" 1>&6
16775
16776         if test $ol_cv_header_db1 = yes ; then
16777                 ol_cv_lib_db=no
16778 if test $ol_cv_lib_db = no ; then
16779         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16780 echo "configure:16781: checking for Berkeley DB link (default)" >&5
16781 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16782   echo $ac_n "(cached) $ac_c" 1>&6
16783 else
16784   
16785         ol_DB_LIB=
16786         ol_LIBS=$LIBS
16787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16788
16789         cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792
16793 #ifdef HAVE_DB_185_H
16794 # include <db_185.h>
16795 #else
16796 # include <db.h>
16797 #endif
16798
16799 #ifndef DB_VERSION_MAJOR
16800 # define DB_VERSION_MAJOR 1
16801 #endif
16802
16803 #ifndef NULL
16804 #define NULL ((void*)0)
16805 #endif
16806
16807 int main() {
16808
16809 #if DB_VERSION_MAJOR > 1
16810         {
16811                 char *version;
16812                 int major, minor, patch;
16813
16814                 version = db_version( &major, &minor, &patch );
16815
16816                 if( major != DB_VERSION_MAJOR ||
16817                         minor < DB_VERSION_MINOR )
16818                 {
16819                         printf("Berkeley DB version mismatch\n"
16820                                 "\theader: %s\n\tlibrary: %s\n",
16821                                 DB_VERSION_STRING, version);
16822                         return 1;
16823                 }
16824         }
16825 #endif
16826
16827 #if DB_VERSION_MAJOR > 2
16828         db_env_create( NULL, 0 );
16829 #elif DB_VERSION_MAJOR > 1
16830         db_appexit( NULL );
16831 #else
16832         (void) dbopen( NULL, 0, 0, 0, NULL);
16833 #endif
16834
16835 ; return 0; }
16836 EOF
16837 if { (eval echo configure:16838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16838   rm -rf conftest*
16839   ol_cv_db_none=yes
16840 else
16841   echo "configure: failed program was:" >&5
16842   cat conftest.$ac_ext >&5
16843   rm -rf conftest*
16844   ol_cv_db_none=no
16845 fi
16846 rm -f conftest*
16847
16848         LIBS="$ol_LIBS"
16849
16850 fi
16851
16852 echo "$ac_t""$ol_cv_db_none" 1>&6
16853
16854         if test $ol_cv_db_none = yes ; then
16855                 ol_cv_lib_db=yes
16856         fi
16857 fi
16858
16859 if test $ol_cv_lib_db = no ; then
16860         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16861 echo "configure:16862: checking for Berkeley DB link (-ldb42)" >&5
16862 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16863   echo $ac_n "(cached) $ac_c" 1>&6
16864 else
16865   
16866         ol_DB_LIB=-ldb42
16867         ol_LIBS=$LIBS
16868         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16869
16870         cat > conftest.$ac_ext <<EOF
16871 #line 16872 "configure"
16872 #include "confdefs.h"
16873
16874 #ifdef HAVE_DB_185_H
16875 # include <db_185.h>
16876 #else
16877 # include <db.h>
16878 #endif
16879
16880 #ifndef DB_VERSION_MAJOR
16881 # define DB_VERSION_MAJOR 1
16882 #endif
16883
16884 #ifndef NULL
16885 #define NULL ((void*)0)
16886 #endif
16887
16888 int main() {
16889
16890 #if DB_VERSION_MAJOR > 1
16891         {
16892                 char *version;
16893                 int major, minor, patch;
16894
16895                 version = db_version( &major, &minor, &patch );
16896
16897                 if( major != DB_VERSION_MAJOR ||
16898                         minor < DB_VERSION_MINOR )
16899                 {
16900                         printf("Berkeley DB version mismatch\n"
16901                                 "\theader: %s\n\tlibrary: %s\n",
16902                                 DB_VERSION_STRING, version);
16903                         return 1;
16904                 }
16905         }
16906 #endif
16907
16908 #if DB_VERSION_MAJOR > 2
16909         db_env_create( NULL, 0 );
16910 #elif DB_VERSION_MAJOR > 1
16911         db_appexit( NULL );
16912 #else
16913         (void) dbopen( NULL, 0, 0, 0, NULL);
16914 #endif
16915
16916 ; return 0; }
16917 EOF
16918 if { (eval echo configure:16919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16919   rm -rf conftest*
16920   ol_cv_db_db42=yes
16921 else
16922   echo "configure: failed program was:" >&5
16923   cat conftest.$ac_ext >&5
16924   rm -rf conftest*
16925   ol_cv_db_db42=no
16926 fi
16927 rm -f conftest*
16928
16929         LIBS="$ol_LIBS"
16930
16931 fi
16932
16933 echo "$ac_t""$ol_cv_db_db42" 1>&6
16934
16935         if test $ol_cv_db_db42 = yes ; then
16936                 ol_cv_lib_db=-ldb42
16937         fi
16938 fi
16939
16940 if test $ol_cv_lib_db = no ; then
16941         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16942 echo "configure:16943: checking for Berkeley DB link (-ldb-42)" >&5
16943 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16944   echo $ac_n "(cached) $ac_c" 1>&6
16945 else
16946   
16947         ol_DB_LIB=-ldb-42
16948         ol_LIBS=$LIBS
16949         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16950
16951         cat > conftest.$ac_ext <<EOF
16952 #line 16953 "configure"
16953 #include "confdefs.h"
16954
16955 #ifdef HAVE_DB_185_H
16956 # include <db_185.h>
16957 #else
16958 # include <db.h>
16959 #endif
16960
16961 #ifndef DB_VERSION_MAJOR
16962 # define DB_VERSION_MAJOR 1
16963 #endif
16964
16965 #ifndef NULL
16966 #define NULL ((void*)0)
16967 #endif
16968
16969 int main() {
16970
16971 #if DB_VERSION_MAJOR > 1
16972         {
16973                 char *version;
16974                 int major, minor, patch;
16975
16976                 version = db_version( &major, &minor, &patch );
16977
16978                 if( major != DB_VERSION_MAJOR ||
16979                         minor < DB_VERSION_MINOR )
16980                 {
16981                         printf("Berkeley DB version mismatch\n"
16982                                 "\theader: %s\n\tlibrary: %s\n",
16983                                 DB_VERSION_STRING, version);
16984                         return 1;
16985                 }
16986         }
16987 #endif
16988
16989 #if DB_VERSION_MAJOR > 2
16990         db_env_create( NULL, 0 );
16991 #elif DB_VERSION_MAJOR > 1
16992         db_appexit( NULL );
16993 #else
16994         (void) dbopen( NULL, 0, 0, 0, NULL);
16995 #endif
16996
16997 ; return 0; }
16998 EOF
16999 if { (eval echo configure:17000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17000   rm -rf conftest*
17001   ol_cv_db_db_42=yes
17002 else
17003   echo "configure: failed program was:" >&5
17004   cat conftest.$ac_ext >&5
17005   rm -rf conftest*
17006   ol_cv_db_db_42=no
17007 fi
17008 rm -f conftest*
17009
17010         LIBS="$ol_LIBS"
17011
17012 fi
17013
17014 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17015
17016         if test $ol_cv_db_db_42 = yes ; then
17017                 ol_cv_lib_db=-ldb-42
17018         fi
17019 fi
17020
17021 if test $ol_cv_lib_db = no ; then
17022         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17023 echo "configure:17024: checking for Berkeley DB link (-ldb-4.2)" >&5
17024 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17025   echo $ac_n "(cached) $ac_c" 1>&6
17026 else
17027   
17028         ol_DB_LIB=-ldb-4.2
17029         ol_LIBS=$LIBS
17030         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17031
17032         cat > conftest.$ac_ext <<EOF
17033 #line 17034 "configure"
17034 #include "confdefs.h"
17035
17036 #ifdef HAVE_DB_185_H
17037 # include <db_185.h>
17038 #else
17039 # include <db.h>
17040 #endif
17041
17042 #ifndef DB_VERSION_MAJOR
17043 # define DB_VERSION_MAJOR 1
17044 #endif
17045
17046 #ifndef NULL
17047 #define NULL ((void*)0)
17048 #endif
17049
17050 int main() {
17051
17052 #if DB_VERSION_MAJOR > 1
17053         {
17054                 char *version;
17055                 int major, minor, patch;
17056
17057                 version = db_version( &major, &minor, &patch );
17058
17059                 if( major != DB_VERSION_MAJOR ||
17060                         minor < DB_VERSION_MINOR )
17061                 {
17062                         printf("Berkeley DB version mismatch\n"
17063                                 "\theader: %s\n\tlibrary: %s\n",
17064                                 DB_VERSION_STRING, version);
17065                         return 1;
17066                 }
17067         }
17068 #endif
17069
17070 #if DB_VERSION_MAJOR > 2
17071         db_env_create( NULL, 0 );
17072 #elif DB_VERSION_MAJOR > 1
17073         db_appexit( NULL );
17074 #else
17075         (void) dbopen( NULL, 0, 0, 0, NULL);
17076 #endif
17077
17078 ; return 0; }
17079 EOF
17080 if { (eval echo configure:17081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17081   rm -rf conftest*
17082   ol_cv_db_db_4_dot_2=yes
17083 else
17084   echo "configure: failed program was:" >&5
17085   cat conftest.$ac_ext >&5
17086   rm -rf conftest*
17087   ol_cv_db_db_4_dot_2=no
17088 fi
17089 rm -f conftest*
17090
17091         LIBS="$ol_LIBS"
17092
17093 fi
17094
17095 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17096
17097         if test $ol_cv_db_db_4_dot_2 = yes ; then
17098                 ol_cv_lib_db=-ldb-4.2
17099         fi
17100 fi
17101
17102 if test $ol_cv_lib_db = no ; then
17103         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17104 echo "configure:17105: checking for Berkeley DB link (-ldb-4-2)" >&5
17105 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17106   echo $ac_n "(cached) $ac_c" 1>&6
17107 else
17108   
17109         ol_DB_LIB=-ldb-4-2
17110         ol_LIBS=$LIBS
17111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17112
17113         cat > conftest.$ac_ext <<EOF
17114 #line 17115 "configure"
17115 #include "confdefs.h"
17116
17117 #ifdef HAVE_DB_185_H
17118 # include <db_185.h>
17119 #else
17120 # include <db.h>
17121 #endif
17122
17123 #ifndef DB_VERSION_MAJOR
17124 # define DB_VERSION_MAJOR 1
17125 #endif
17126
17127 #ifndef NULL
17128 #define NULL ((void*)0)
17129 #endif
17130
17131 int main() {
17132
17133 #if DB_VERSION_MAJOR > 1
17134         {
17135                 char *version;
17136                 int major, minor, patch;
17137
17138                 version = db_version( &major, &minor, &patch );
17139
17140                 if( major != DB_VERSION_MAJOR ||
17141                         minor < DB_VERSION_MINOR )
17142                 {
17143                         printf("Berkeley DB version mismatch\n"
17144                                 "\theader: %s\n\tlibrary: %s\n",
17145                                 DB_VERSION_STRING, version);
17146                         return 1;
17147                 }
17148         }
17149 #endif
17150
17151 #if DB_VERSION_MAJOR > 2
17152         db_env_create( NULL, 0 );
17153 #elif DB_VERSION_MAJOR > 1
17154         db_appexit( NULL );
17155 #else
17156         (void) dbopen( NULL, 0, 0, 0, NULL);
17157 #endif
17158
17159 ; return 0; }
17160 EOF
17161 if { (eval echo configure:17162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17162   rm -rf conftest*
17163   ol_cv_db_db_4_2=yes
17164 else
17165   echo "configure: failed program was:" >&5
17166   cat conftest.$ac_ext >&5
17167   rm -rf conftest*
17168   ol_cv_db_db_4_2=no
17169 fi
17170 rm -f conftest*
17171
17172         LIBS="$ol_LIBS"
17173
17174 fi
17175
17176 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17177
17178         if test $ol_cv_db_db_4_2 = yes ; then
17179                 ol_cv_lib_db=-ldb-4-2
17180         fi
17181 fi
17182
17183 if test $ol_cv_lib_db = no ; then
17184         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17185 echo "configure:17186: checking for Berkeley DB link (-ldb-4)" >&5
17186 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17187   echo $ac_n "(cached) $ac_c" 1>&6
17188 else
17189   
17190         ol_DB_LIB=-ldb-4
17191         ol_LIBS=$LIBS
17192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17193
17194         cat > conftest.$ac_ext <<EOF
17195 #line 17196 "configure"
17196 #include "confdefs.h"
17197
17198 #ifdef HAVE_DB_185_H
17199 # include <db_185.h>
17200 #else
17201 # include <db.h>
17202 #endif
17203
17204 #ifndef DB_VERSION_MAJOR
17205 # define DB_VERSION_MAJOR 1
17206 #endif
17207
17208 #ifndef NULL
17209 #define NULL ((void*)0)
17210 #endif
17211
17212 int main() {
17213
17214 #if DB_VERSION_MAJOR > 1
17215         {
17216                 char *version;
17217                 int major, minor, patch;
17218
17219                 version = db_version( &major, &minor, &patch );
17220
17221                 if( major != DB_VERSION_MAJOR ||
17222                         minor < DB_VERSION_MINOR )
17223                 {
17224                         printf("Berkeley DB version mismatch\n"
17225                                 "\theader: %s\n\tlibrary: %s\n",
17226                                 DB_VERSION_STRING, version);
17227                         return 1;
17228                 }
17229         }
17230 #endif
17231
17232 #if DB_VERSION_MAJOR > 2
17233         db_env_create( NULL, 0 );
17234 #elif DB_VERSION_MAJOR > 1
17235         db_appexit( NULL );
17236 #else
17237         (void) dbopen( NULL, 0, 0, 0, NULL);
17238 #endif
17239
17240 ; return 0; }
17241 EOF
17242 if { (eval echo configure:17243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17243   rm -rf conftest*
17244   ol_cv_db_db_4=yes
17245 else
17246   echo "configure: failed program was:" >&5
17247   cat conftest.$ac_ext >&5
17248   rm -rf conftest*
17249   ol_cv_db_db_4=no
17250 fi
17251 rm -f conftest*
17252
17253         LIBS="$ol_LIBS"
17254
17255 fi
17256
17257 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17258
17259         if test $ol_cv_db_db_4 = yes ; then
17260                 ol_cv_lib_db=-ldb-4
17261         fi
17262 fi
17263
17264 if test $ol_cv_lib_db = no ; then
17265         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17266 echo "configure:17267: checking for Berkeley DB link (-ldb4)" >&5
17267 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17268   echo $ac_n "(cached) $ac_c" 1>&6
17269 else
17270   
17271         ol_DB_LIB=-ldb4
17272         ol_LIBS=$LIBS
17273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17274
17275         cat > conftest.$ac_ext <<EOF
17276 #line 17277 "configure"
17277 #include "confdefs.h"
17278
17279 #ifdef HAVE_DB_185_H
17280 # include <db_185.h>
17281 #else
17282 # include <db.h>
17283 #endif
17284
17285 #ifndef DB_VERSION_MAJOR
17286 # define DB_VERSION_MAJOR 1
17287 #endif
17288
17289 #ifndef NULL
17290 #define NULL ((void*)0)
17291 #endif
17292
17293 int main() {
17294
17295 #if DB_VERSION_MAJOR > 1
17296         {
17297                 char *version;
17298                 int major, minor, patch;
17299
17300                 version = db_version( &major, &minor, &patch );
17301
17302                 if( major != DB_VERSION_MAJOR ||
17303                         minor < DB_VERSION_MINOR )
17304                 {
17305                         printf("Berkeley DB version mismatch\n"
17306                                 "\theader: %s\n\tlibrary: %s\n",
17307                                 DB_VERSION_STRING, version);
17308                         return 1;
17309                 }
17310         }
17311 #endif
17312
17313 #if DB_VERSION_MAJOR > 2
17314         db_env_create( NULL, 0 );
17315 #elif DB_VERSION_MAJOR > 1
17316         db_appexit( NULL );
17317 #else
17318         (void) dbopen( NULL, 0, 0, 0, NULL);
17319 #endif
17320
17321 ; return 0; }
17322 EOF
17323 if { (eval echo configure:17324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17324   rm -rf conftest*
17325   ol_cv_db_db4=yes
17326 else
17327   echo "configure: failed program was:" >&5
17328   cat conftest.$ac_ext >&5
17329   rm -rf conftest*
17330   ol_cv_db_db4=no
17331 fi
17332 rm -f conftest*
17333
17334         LIBS="$ol_LIBS"
17335
17336 fi
17337
17338 echo "$ac_t""$ol_cv_db_db4" 1>&6
17339
17340         if test $ol_cv_db_db4 = yes ; then
17341                 ol_cv_lib_db=-ldb4
17342         fi
17343 fi
17344
17345 if test $ol_cv_lib_db = no ; then
17346         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17347 echo "configure:17348: checking for Berkeley DB link (-ldb)" >&5
17348 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17349   echo $ac_n "(cached) $ac_c" 1>&6
17350 else
17351   
17352         ol_DB_LIB=-ldb
17353         ol_LIBS=$LIBS
17354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17355
17356         cat > conftest.$ac_ext <<EOF
17357 #line 17358 "configure"
17358 #include "confdefs.h"
17359
17360 #ifdef HAVE_DB_185_H
17361 # include <db_185.h>
17362 #else
17363 # include <db.h>
17364 #endif
17365
17366 #ifndef DB_VERSION_MAJOR
17367 # define DB_VERSION_MAJOR 1
17368 #endif
17369
17370 #ifndef NULL
17371 #define NULL ((void*)0)
17372 #endif
17373
17374 int main() {
17375
17376 #if DB_VERSION_MAJOR > 1
17377         {
17378                 char *version;
17379                 int major, minor, patch;
17380
17381                 version = db_version( &major, &minor, &patch );
17382
17383                 if( major != DB_VERSION_MAJOR ||
17384                         minor < DB_VERSION_MINOR )
17385                 {
17386                         printf("Berkeley DB version mismatch\n"
17387                                 "\theader: %s\n\tlibrary: %s\n",
17388                                 DB_VERSION_STRING, version);
17389                         return 1;
17390                 }
17391         }
17392 #endif
17393
17394 #if DB_VERSION_MAJOR > 2
17395         db_env_create( NULL, 0 );
17396 #elif DB_VERSION_MAJOR > 1
17397         db_appexit( NULL );
17398 #else
17399         (void) dbopen( NULL, 0, 0, 0, NULL);
17400 #endif
17401
17402 ; return 0; }
17403 EOF
17404 if { (eval echo configure:17405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17405   rm -rf conftest*
17406   ol_cv_db_db=yes
17407 else
17408   echo "configure: failed program was:" >&5
17409   cat conftest.$ac_ext >&5
17410   rm -rf conftest*
17411   ol_cv_db_db=no
17412 fi
17413 rm -f conftest*
17414
17415         LIBS="$ol_LIBS"
17416
17417 fi
17418
17419 echo "$ac_t""$ol_cv_db_db" 1>&6
17420
17421         if test $ol_cv_db_db = yes ; then
17422                 ol_cv_lib_db=-ldb
17423         fi
17424 fi
17425
17426 if test $ol_cv_lib_db = no ; then
17427         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17428 echo "configure:17429: checking for Berkeley DB link (-ldb41)" >&5
17429 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17430   echo $ac_n "(cached) $ac_c" 1>&6
17431 else
17432   
17433         ol_DB_LIB=-ldb41
17434         ol_LIBS=$LIBS
17435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17436
17437         cat > conftest.$ac_ext <<EOF
17438 #line 17439 "configure"
17439 #include "confdefs.h"
17440
17441 #ifdef HAVE_DB_185_H
17442 # include <db_185.h>
17443 #else
17444 # include <db.h>
17445 #endif
17446
17447 #ifndef DB_VERSION_MAJOR
17448 # define DB_VERSION_MAJOR 1
17449 #endif
17450
17451 #ifndef NULL
17452 #define NULL ((void*)0)
17453 #endif
17454
17455 int main() {
17456
17457 #if DB_VERSION_MAJOR > 1
17458         {
17459                 char *version;
17460                 int major, minor, patch;
17461
17462                 version = db_version( &major, &minor, &patch );
17463
17464                 if( major != DB_VERSION_MAJOR ||
17465                         minor < DB_VERSION_MINOR )
17466                 {
17467                         printf("Berkeley DB version mismatch\n"
17468                                 "\theader: %s\n\tlibrary: %s\n",
17469                                 DB_VERSION_STRING, version);
17470                         return 1;
17471                 }
17472         }
17473 #endif
17474
17475 #if DB_VERSION_MAJOR > 2
17476         db_env_create( NULL, 0 );
17477 #elif DB_VERSION_MAJOR > 1
17478         db_appexit( NULL );
17479 #else
17480         (void) dbopen( NULL, 0, 0, 0, NULL);
17481 #endif
17482
17483 ; return 0; }
17484 EOF
17485 if { (eval echo configure:17486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17486   rm -rf conftest*
17487   ol_cv_db_db41=yes
17488 else
17489   echo "configure: failed program was:" >&5
17490   cat conftest.$ac_ext >&5
17491   rm -rf conftest*
17492   ol_cv_db_db41=no
17493 fi
17494 rm -f conftest*
17495
17496         LIBS="$ol_LIBS"
17497
17498 fi
17499
17500 echo "$ac_t""$ol_cv_db_db41" 1>&6
17501
17502         if test $ol_cv_db_db41 = yes ; then
17503                 ol_cv_lib_db=-ldb41
17504         fi
17505 fi
17506
17507 if test $ol_cv_lib_db = no ; then
17508         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17509 echo "configure:17510: checking for Berkeley DB link (-ldb-41)" >&5
17510 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17511   echo $ac_n "(cached) $ac_c" 1>&6
17512 else
17513   
17514         ol_DB_LIB=-ldb-41
17515         ol_LIBS=$LIBS
17516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17517
17518         cat > conftest.$ac_ext <<EOF
17519 #line 17520 "configure"
17520 #include "confdefs.h"
17521
17522 #ifdef HAVE_DB_185_H
17523 # include <db_185.h>
17524 #else
17525 # include <db.h>
17526 #endif
17527
17528 #ifndef DB_VERSION_MAJOR
17529 # define DB_VERSION_MAJOR 1
17530 #endif
17531
17532 #ifndef NULL
17533 #define NULL ((void*)0)
17534 #endif
17535
17536 int main() {
17537
17538 #if DB_VERSION_MAJOR > 1
17539         {
17540                 char *version;
17541                 int major, minor, patch;
17542
17543                 version = db_version( &major, &minor, &patch );
17544
17545                 if( major != DB_VERSION_MAJOR ||
17546                         minor < DB_VERSION_MINOR )
17547                 {
17548                         printf("Berkeley DB version mismatch\n"
17549                                 "\theader: %s\n\tlibrary: %s\n",
17550                                 DB_VERSION_STRING, version);
17551                         return 1;
17552                 }
17553         }
17554 #endif
17555
17556 #if DB_VERSION_MAJOR > 2
17557         db_env_create( NULL, 0 );
17558 #elif DB_VERSION_MAJOR > 1
17559         db_appexit( NULL );
17560 #else
17561         (void) dbopen( NULL, 0, 0, 0, NULL);
17562 #endif
17563
17564 ; return 0; }
17565 EOF
17566 if { (eval echo configure:17567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17567   rm -rf conftest*
17568   ol_cv_db_db_41=yes
17569 else
17570   echo "configure: failed program was:" >&5
17571   cat conftest.$ac_ext >&5
17572   rm -rf conftest*
17573   ol_cv_db_db_41=no
17574 fi
17575 rm -f conftest*
17576
17577         LIBS="$ol_LIBS"
17578
17579 fi
17580
17581 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17582
17583         if test $ol_cv_db_db_41 = yes ; then
17584                 ol_cv_lib_db=-ldb-41
17585         fi
17586 fi
17587
17588 if test $ol_cv_lib_db = no ; then
17589         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17590 echo "configure:17591: checking for Berkeley DB link (-ldb-4.1)" >&5
17591 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17592   echo $ac_n "(cached) $ac_c" 1>&6
17593 else
17594   
17595         ol_DB_LIB=-ldb-4.1
17596         ol_LIBS=$LIBS
17597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17598
17599         cat > conftest.$ac_ext <<EOF
17600 #line 17601 "configure"
17601 #include "confdefs.h"
17602
17603 #ifdef HAVE_DB_185_H
17604 # include <db_185.h>
17605 #else
17606 # include <db.h>
17607 #endif
17608
17609 #ifndef DB_VERSION_MAJOR
17610 # define DB_VERSION_MAJOR 1
17611 #endif
17612
17613 #ifndef NULL
17614 #define NULL ((void*)0)
17615 #endif
17616
17617 int main() {
17618
17619 #if DB_VERSION_MAJOR > 1
17620         {
17621                 char *version;
17622                 int major, minor, patch;
17623
17624                 version = db_version( &major, &minor, &patch );
17625
17626                 if( major != DB_VERSION_MAJOR ||
17627                         minor < DB_VERSION_MINOR )
17628                 {
17629                         printf("Berkeley DB version mismatch\n"
17630                                 "\theader: %s\n\tlibrary: %s\n",
17631                                 DB_VERSION_STRING, version);
17632                         return 1;
17633                 }
17634         }
17635 #endif
17636
17637 #if DB_VERSION_MAJOR > 2
17638         db_env_create( NULL, 0 );
17639 #elif DB_VERSION_MAJOR > 1
17640         db_appexit( NULL );
17641 #else
17642         (void) dbopen( NULL, 0, 0, 0, NULL);
17643 #endif
17644
17645 ; return 0; }
17646 EOF
17647 if { (eval echo configure:17648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17648   rm -rf conftest*
17649   ol_cv_db_db_4_dot_1=yes
17650 else
17651   echo "configure: failed program was:" >&5
17652   cat conftest.$ac_ext >&5
17653   rm -rf conftest*
17654   ol_cv_db_db_4_dot_1=no
17655 fi
17656 rm -f conftest*
17657
17658         LIBS="$ol_LIBS"
17659
17660 fi
17661
17662 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17663
17664         if test $ol_cv_db_db_4_dot_1 = yes ; then
17665                 ol_cv_lib_db=-ldb-4.1
17666         fi
17667 fi
17668
17669 if test $ol_cv_lib_db = no ; then
17670         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17671 echo "configure:17672: checking for Berkeley DB link (-ldb-4-1)" >&5
17672 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17673   echo $ac_n "(cached) $ac_c" 1>&6
17674 else
17675   
17676         ol_DB_LIB=-ldb-4-1
17677         ol_LIBS=$LIBS
17678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17679
17680         cat > conftest.$ac_ext <<EOF
17681 #line 17682 "configure"
17682 #include "confdefs.h"
17683
17684 #ifdef HAVE_DB_185_H
17685 # include <db_185.h>
17686 #else
17687 # include <db.h>
17688 #endif
17689
17690 #ifndef DB_VERSION_MAJOR
17691 # define DB_VERSION_MAJOR 1
17692 #endif
17693
17694 #ifndef NULL
17695 #define NULL ((void*)0)
17696 #endif
17697
17698 int main() {
17699
17700 #if DB_VERSION_MAJOR > 1
17701         {
17702                 char *version;
17703                 int major, minor, patch;
17704
17705                 version = db_version( &major, &minor, &patch );
17706
17707                 if( major != DB_VERSION_MAJOR ||
17708                         minor < DB_VERSION_MINOR )
17709                 {
17710                         printf("Berkeley DB version mismatch\n"
17711                                 "\theader: %s\n\tlibrary: %s\n",
17712                                 DB_VERSION_STRING, version);
17713                         return 1;
17714                 }
17715         }
17716 #endif
17717
17718 #if DB_VERSION_MAJOR > 2
17719         db_env_create( NULL, 0 );
17720 #elif DB_VERSION_MAJOR > 1
17721         db_appexit( NULL );
17722 #else
17723         (void) dbopen( NULL, 0, 0, 0, NULL);
17724 #endif
17725
17726 ; return 0; }
17727 EOF
17728 if { (eval echo configure:17729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17729   rm -rf conftest*
17730   ol_cv_db_db_4_1=yes
17731 else
17732   echo "configure: failed program was:" >&5
17733   cat conftest.$ac_ext >&5
17734   rm -rf conftest*
17735   ol_cv_db_db_4_1=no
17736 fi
17737 rm -f conftest*
17738
17739         LIBS="$ol_LIBS"
17740
17741 fi
17742
17743 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17744
17745         if test $ol_cv_db_db_4_1 = yes ; then
17746                 ol_cv_lib_db=-ldb-4-1
17747         fi
17748 fi
17749
17750 if test $ol_cv_lib_db = no ; then
17751         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17752 echo "configure:17753: checking for Berkeley DB link (-ldb3)" >&5
17753 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17754   echo $ac_n "(cached) $ac_c" 1>&6
17755 else
17756   
17757         ol_DB_LIB=-ldb3
17758         ol_LIBS=$LIBS
17759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17760
17761         cat > conftest.$ac_ext <<EOF
17762 #line 17763 "configure"
17763 #include "confdefs.h"
17764
17765 #ifdef HAVE_DB_185_H
17766 # include <db_185.h>
17767 #else
17768 # include <db.h>
17769 #endif
17770
17771 #ifndef DB_VERSION_MAJOR
17772 # define DB_VERSION_MAJOR 1
17773 #endif
17774
17775 #ifndef NULL
17776 #define NULL ((void*)0)
17777 #endif
17778
17779 int main() {
17780
17781 #if DB_VERSION_MAJOR > 1
17782         {
17783                 char *version;
17784                 int major, minor, patch;
17785
17786                 version = db_version( &major, &minor, &patch );
17787
17788                 if( major != DB_VERSION_MAJOR ||
17789                         minor < DB_VERSION_MINOR )
17790                 {
17791                         printf("Berkeley DB version mismatch\n"
17792                                 "\theader: %s\n\tlibrary: %s\n",
17793                                 DB_VERSION_STRING, version);
17794                         return 1;
17795                 }
17796         }
17797 #endif
17798
17799 #if DB_VERSION_MAJOR > 2
17800         db_env_create( NULL, 0 );
17801 #elif DB_VERSION_MAJOR > 1
17802         db_appexit( NULL );
17803 #else
17804         (void) dbopen( NULL, 0, 0, 0, NULL);
17805 #endif
17806
17807 ; return 0; }
17808 EOF
17809 if { (eval echo configure:17810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17810   rm -rf conftest*
17811   ol_cv_db_db3=yes
17812 else
17813   echo "configure: failed program was:" >&5
17814   cat conftest.$ac_ext >&5
17815   rm -rf conftest*
17816   ol_cv_db_db3=no
17817 fi
17818 rm -f conftest*
17819
17820         LIBS="$ol_LIBS"
17821
17822 fi
17823
17824 echo "$ac_t""$ol_cv_db_db3" 1>&6
17825
17826         if test $ol_cv_db_db3 = yes ; then
17827                 ol_cv_lib_db=-ldb3
17828         fi
17829 fi
17830
17831 if test $ol_cv_lib_db = no ; then
17832         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17833 echo "configure:17834: checking for Berkeley DB link (-ldb-3)" >&5
17834 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17835   echo $ac_n "(cached) $ac_c" 1>&6
17836 else
17837   
17838         ol_DB_LIB=-ldb-3
17839         ol_LIBS=$LIBS
17840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17841
17842         cat > conftest.$ac_ext <<EOF
17843 #line 17844 "configure"
17844 #include "confdefs.h"
17845
17846 #ifdef HAVE_DB_185_H
17847 # include <db_185.h>
17848 #else
17849 # include <db.h>
17850 #endif
17851
17852 #ifndef DB_VERSION_MAJOR
17853 # define DB_VERSION_MAJOR 1
17854 #endif
17855
17856 #ifndef NULL
17857 #define NULL ((void*)0)
17858 #endif
17859
17860 int main() {
17861
17862 #if DB_VERSION_MAJOR > 1
17863         {
17864                 char *version;
17865                 int major, minor, patch;
17866
17867                 version = db_version( &major, &minor, &patch );
17868
17869                 if( major != DB_VERSION_MAJOR ||
17870                         minor < DB_VERSION_MINOR )
17871                 {
17872                         printf("Berkeley DB version mismatch\n"
17873                                 "\theader: %s\n\tlibrary: %s\n",
17874                                 DB_VERSION_STRING, version);
17875                         return 1;
17876                 }
17877         }
17878 #endif
17879
17880 #if DB_VERSION_MAJOR > 2
17881         db_env_create( NULL, 0 );
17882 #elif DB_VERSION_MAJOR > 1
17883         db_appexit( NULL );
17884 #else
17885         (void) dbopen( NULL, 0, 0, 0, NULL);
17886 #endif
17887
17888 ; return 0; }
17889 EOF
17890 if { (eval echo configure:17891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17891   rm -rf conftest*
17892   ol_cv_db_db_3=yes
17893 else
17894   echo "configure: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   rm -rf conftest*
17897   ol_cv_db_db_3=no
17898 fi
17899 rm -f conftest*
17900
17901         LIBS="$ol_LIBS"
17902
17903 fi
17904
17905 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17906
17907         if test $ol_cv_db_db_3 = yes ; then
17908                 ol_cv_lib_db=-ldb-3
17909         fi
17910 fi
17911
17912 if test $ol_cv_lib_db = no ; then
17913         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17914 echo "configure:17915: checking for Berkeley DB link (-ldb2)" >&5
17915 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17916   echo $ac_n "(cached) $ac_c" 1>&6
17917 else
17918   
17919         ol_DB_LIB=-ldb2
17920         ol_LIBS=$LIBS
17921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17922
17923         cat > conftest.$ac_ext <<EOF
17924 #line 17925 "configure"
17925 #include "confdefs.h"
17926
17927 #ifdef HAVE_DB_185_H
17928 # include <db_185.h>
17929 #else
17930 # include <db.h>
17931 #endif
17932
17933 #ifndef DB_VERSION_MAJOR
17934 # define DB_VERSION_MAJOR 1
17935 #endif
17936
17937 #ifndef NULL
17938 #define NULL ((void*)0)
17939 #endif
17940
17941 int main() {
17942
17943 #if DB_VERSION_MAJOR > 1
17944         {
17945                 char *version;
17946                 int major, minor, patch;
17947
17948                 version = db_version( &major, &minor, &patch );
17949
17950                 if( major != DB_VERSION_MAJOR ||
17951                         minor < DB_VERSION_MINOR )
17952                 {
17953                         printf("Berkeley DB version mismatch\n"
17954                                 "\theader: %s\n\tlibrary: %s\n",
17955                                 DB_VERSION_STRING, version);
17956                         return 1;
17957                 }
17958         }
17959 #endif
17960
17961 #if DB_VERSION_MAJOR > 2
17962         db_env_create( NULL, 0 );
17963 #elif DB_VERSION_MAJOR > 1
17964         db_appexit( NULL );
17965 #else
17966         (void) dbopen( NULL, 0, 0, 0, NULL);
17967 #endif
17968
17969 ; return 0; }
17970 EOF
17971 if { (eval echo configure:17972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17972   rm -rf conftest*
17973   ol_cv_db_db2=yes
17974 else
17975   echo "configure: failed program was:" >&5
17976   cat conftest.$ac_ext >&5
17977   rm -rf conftest*
17978   ol_cv_db_db2=no
17979 fi
17980 rm -f conftest*
17981
17982         LIBS="$ol_LIBS"
17983
17984 fi
17985
17986 echo "$ac_t""$ol_cv_db_db2" 1>&6
17987
17988         if test $ol_cv_db_db2 = yes ; then
17989                 ol_cv_lib_db=-ldb2
17990         fi
17991 fi
17992
17993 if test $ol_cv_lib_db = no ; then
17994         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17995 echo "configure:17996: checking for Berkeley DB link (-ldb-2)" >&5
17996 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17997   echo $ac_n "(cached) $ac_c" 1>&6
17998 else
17999   
18000         ol_DB_LIB=-ldb-2
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                                 "\theader: %s\n\tlibrary: %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_db_2=yes
18055 else
18056   echo "configure: failed program was:" >&5
18057   cat conftest.$ac_ext >&5
18058   rm -rf conftest*
18059   ol_cv_db_db_2=no
18060 fi
18061 rm -f conftest*
18062
18063         LIBS="$ol_LIBS"
18064
18065 fi
18066
18067 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18068
18069         if test $ol_cv_db_db_2 = yes ; then
18070                 ol_cv_lib_db=-ldb-2
18071         fi
18072 fi
18073
18074 if test $ol_cv_lib_db = no ; then
18075         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18076 echo "configure:18077: checking for Berkeley DB link (-ldb1)" >&5
18077 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18078   echo $ac_n "(cached) $ac_c" 1>&6
18079 else
18080   
18081         ol_DB_LIB=-ldb1
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                                 "\theader: %s\n\tlibrary: %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_db1=yes
18136 else
18137   echo "configure: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   rm -rf conftest*
18140   ol_cv_db_db1=no
18141 fi
18142 rm -f conftest*
18143
18144         LIBS="$ol_LIBS"
18145
18146 fi
18147
18148 echo "$ac_t""$ol_cv_db_db1" 1>&6
18149
18150         if test $ol_cv_db_db1 = yes ; then
18151                 ol_cv_lib_db=-ldb1
18152         fi
18153 fi
18154
18155 if test $ol_cv_lib_db = no ; then
18156         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18157 echo "configure:18158: checking for Berkeley DB link (-ldb-1)" >&5
18158 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   
18162         ol_DB_LIB=-ldb-1
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                                 "\theader: %s\n\tlibrary: %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_1=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_1=no
18222 fi
18223 rm -f conftest*
18224
18225         LIBS="$ol_LIBS"
18226
18227 fi
18228
18229 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18230
18231         if test $ol_cv_db_db_1 = yes ; then
18232                 ol_cv_lib_db=-ldb-1
18233         fi
18234 fi
18235
18236
18237                 if test "$ol_cv_lib_db" != no ; then
18238                         ol_cv_berkeley_db=yes
18239                 fi
18240         fi
18241 fi
18242
18243         else
18244                 ol_cv_berkeley_db=no
18245 for ac_hdr in db.h
18246 do
18247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18249 echo "configure:18250: checking for $ac_hdr" >&5
18250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18251   echo $ac_n "(cached) $ac_c" 1>&6
18252 else
18253   cat > conftest.$ac_ext <<EOF
18254 #line 18255 "configure"
18255 #include "confdefs.h"
18256 #include <$ac_hdr>
18257 EOF
18258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18259 { (eval echo configure:18260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18261 if test -z "$ac_err"; then
18262   rm -rf conftest*
18263   eval "ac_cv_header_$ac_safe=yes"
18264 else
18265   echo "$ac_err" >&5
18266   echo "configure: failed program was:" >&5
18267   cat conftest.$ac_ext >&5
18268   rm -rf conftest*
18269   eval "ac_cv_header_$ac_safe=no"
18270 fi
18271 rm -f conftest*
18272 fi
18273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18274   echo "$ac_t""yes" 1>&6
18275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18276   cat >> confdefs.h <<EOF
18277 #define $ac_tr_hdr 1
18278 EOF
18279  
18280 else
18281   echo "$ac_t""no" 1>&6
18282 fi
18283 done
18284
18285 if test $ac_cv_header_db_h = yes; then
18286         ol_cv_lib_db=no
18287 if test $ol_cv_lib_db = no ; then
18288         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18289 echo "configure:18290: checking for Berkeley DB link (default)" >&5
18290 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18291   echo $ac_n "(cached) $ac_c" 1>&6
18292 else
18293   
18294         ol_DB_LIB=
18295         ol_LIBS=$LIBS
18296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18297
18298         cat > conftest.$ac_ext <<EOF
18299 #line 18300 "configure"
18300 #include "confdefs.h"
18301
18302 #ifdef HAVE_DB_185_H
18303 # include <db_185.h>
18304 #else
18305 # include <db.h>
18306 #endif
18307
18308 #ifndef DB_VERSION_MAJOR
18309 # define DB_VERSION_MAJOR 1
18310 #endif
18311
18312 #ifndef NULL
18313 #define NULL ((void*)0)
18314 #endif
18315
18316 int main() {
18317
18318 #if DB_VERSION_MAJOR > 1
18319         {
18320                 char *version;
18321                 int major, minor, patch;
18322
18323                 version = db_version( &major, &minor, &patch );
18324
18325                 if( major != DB_VERSION_MAJOR ||
18326                         minor < DB_VERSION_MINOR )
18327                 {
18328                         printf("Berkeley DB version mismatch\n"
18329                                 "\theader: %s\n\tlibrary: %s\n",
18330                                 DB_VERSION_STRING, version);
18331                         return 1;
18332                 }
18333         }
18334 #endif
18335
18336 #if DB_VERSION_MAJOR > 2
18337         db_env_create( NULL, 0 );
18338 #elif DB_VERSION_MAJOR > 1
18339         db_appexit( NULL );
18340 #else
18341         (void) dbopen( NULL, 0, 0, 0, NULL);
18342 #endif
18343
18344 ; return 0; }
18345 EOF
18346 if { (eval echo configure:18347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18347   rm -rf conftest*
18348   ol_cv_db_none=yes
18349 else
18350   echo "configure: failed program was:" >&5
18351   cat conftest.$ac_ext >&5
18352   rm -rf conftest*
18353   ol_cv_db_none=no
18354 fi
18355 rm -f conftest*
18356
18357         LIBS="$ol_LIBS"
18358
18359 fi
18360
18361 echo "$ac_t""$ol_cv_db_none" 1>&6
18362
18363         if test $ol_cv_db_none = yes ; then
18364                 ol_cv_lib_db=yes
18365         fi
18366 fi
18367
18368 if test $ol_cv_lib_db = no ; then
18369         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18370 echo "configure:18371: checking for Berkeley DB link (-ldb42)" >&5
18371 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18372   echo $ac_n "(cached) $ac_c" 1>&6
18373 else
18374   
18375         ol_DB_LIB=-ldb42
18376         ol_LIBS=$LIBS
18377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18378
18379         cat > conftest.$ac_ext <<EOF
18380 #line 18381 "configure"
18381 #include "confdefs.h"
18382
18383 #ifdef HAVE_DB_185_H
18384 # include <db_185.h>
18385 #else
18386 # include <db.h>
18387 #endif
18388
18389 #ifndef DB_VERSION_MAJOR
18390 # define DB_VERSION_MAJOR 1
18391 #endif
18392
18393 #ifndef NULL
18394 #define NULL ((void*)0)
18395 #endif
18396
18397 int main() {
18398
18399 #if DB_VERSION_MAJOR > 1
18400         {
18401                 char *version;
18402                 int major, minor, patch;
18403
18404                 version = db_version( &major, &minor, &patch );
18405
18406                 if( major != DB_VERSION_MAJOR ||
18407                         minor < DB_VERSION_MINOR )
18408                 {
18409                         printf("Berkeley DB version mismatch\n"
18410                                 "\theader: %s\n\tlibrary: %s\n",
18411                                 DB_VERSION_STRING, version);
18412                         return 1;
18413                 }
18414         }
18415 #endif
18416
18417 #if DB_VERSION_MAJOR > 2
18418         db_env_create( NULL, 0 );
18419 #elif DB_VERSION_MAJOR > 1
18420         db_appexit( NULL );
18421 #else
18422         (void) dbopen( NULL, 0, 0, 0, NULL);
18423 #endif
18424
18425 ; return 0; }
18426 EOF
18427 if { (eval echo configure:18428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18428   rm -rf conftest*
18429   ol_cv_db_db42=yes
18430 else
18431   echo "configure: failed program was:" >&5
18432   cat conftest.$ac_ext >&5
18433   rm -rf conftest*
18434   ol_cv_db_db42=no
18435 fi
18436 rm -f conftest*
18437
18438         LIBS="$ol_LIBS"
18439
18440 fi
18441
18442 echo "$ac_t""$ol_cv_db_db42" 1>&6
18443
18444         if test $ol_cv_db_db42 = yes ; then
18445                 ol_cv_lib_db=-ldb42
18446         fi
18447 fi
18448
18449 if test $ol_cv_lib_db = no ; then
18450         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18451 echo "configure:18452: checking for Berkeley DB link (-ldb-42)" >&5
18452 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18453   echo $ac_n "(cached) $ac_c" 1>&6
18454 else
18455   
18456         ol_DB_LIB=-ldb-42
18457         ol_LIBS=$LIBS
18458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18459
18460         cat > conftest.$ac_ext <<EOF
18461 #line 18462 "configure"
18462 #include "confdefs.h"
18463
18464 #ifdef HAVE_DB_185_H
18465 # include <db_185.h>
18466 #else
18467 # include <db.h>
18468 #endif
18469
18470 #ifndef DB_VERSION_MAJOR
18471 # define DB_VERSION_MAJOR 1
18472 #endif
18473
18474 #ifndef NULL
18475 #define NULL ((void*)0)
18476 #endif
18477
18478 int main() {
18479
18480 #if DB_VERSION_MAJOR > 1
18481         {
18482                 char *version;
18483                 int major, minor, patch;
18484
18485                 version = db_version( &major, &minor, &patch );
18486
18487                 if( major != DB_VERSION_MAJOR ||
18488                         minor < DB_VERSION_MINOR )
18489                 {
18490                         printf("Berkeley DB version mismatch\n"
18491                                 "\theader: %s\n\tlibrary: %s\n",
18492                                 DB_VERSION_STRING, version);
18493                         return 1;
18494                 }
18495         }
18496 #endif
18497
18498 #if DB_VERSION_MAJOR > 2
18499         db_env_create( NULL, 0 );
18500 #elif DB_VERSION_MAJOR > 1
18501         db_appexit( NULL );
18502 #else
18503         (void) dbopen( NULL, 0, 0, 0, NULL);
18504 #endif
18505
18506 ; return 0; }
18507 EOF
18508 if { (eval echo configure:18509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18509   rm -rf conftest*
18510   ol_cv_db_db_42=yes
18511 else
18512   echo "configure: failed program was:" >&5
18513   cat conftest.$ac_ext >&5
18514   rm -rf conftest*
18515   ol_cv_db_db_42=no
18516 fi
18517 rm -f conftest*
18518
18519         LIBS="$ol_LIBS"
18520
18521 fi
18522
18523 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18524
18525         if test $ol_cv_db_db_42 = yes ; then
18526                 ol_cv_lib_db=-ldb-42
18527         fi
18528 fi
18529
18530 if test $ol_cv_lib_db = no ; then
18531         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18532 echo "configure:18533: checking for Berkeley DB link (-ldb-4.2)" >&5
18533 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18534   echo $ac_n "(cached) $ac_c" 1>&6
18535 else
18536   
18537         ol_DB_LIB=-ldb-4.2
18538         ol_LIBS=$LIBS
18539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18540
18541         cat > conftest.$ac_ext <<EOF
18542 #line 18543 "configure"
18543 #include "confdefs.h"
18544
18545 #ifdef HAVE_DB_185_H
18546 # include <db_185.h>
18547 #else
18548 # include <db.h>
18549 #endif
18550
18551 #ifndef DB_VERSION_MAJOR
18552 # define DB_VERSION_MAJOR 1
18553 #endif
18554
18555 #ifndef NULL
18556 #define NULL ((void*)0)
18557 #endif
18558
18559 int main() {
18560
18561 #if DB_VERSION_MAJOR > 1
18562         {
18563                 char *version;
18564                 int major, minor, patch;
18565
18566                 version = db_version( &major, &minor, &patch );
18567
18568                 if( major != DB_VERSION_MAJOR ||
18569                         minor < DB_VERSION_MINOR )
18570                 {
18571                         printf("Berkeley DB version mismatch\n"
18572                                 "\theader: %s\n\tlibrary: %s\n",
18573                                 DB_VERSION_STRING, version);
18574                         return 1;
18575                 }
18576         }
18577 #endif
18578
18579 #if DB_VERSION_MAJOR > 2
18580         db_env_create( NULL, 0 );
18581 #elif DB_VERSION_MAJOR > 1
18582         db_appexit( NULL );
18583 #else
18584         (void) dbopen( NULL, 0, 0, 0, NULL);
18585 #endif
18586
18587 ; return 0; }
18588 EOF
18589 if { (eval echo configure:18590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18590   rm -rf conftest*
18591   ol_cv_db_db_4_dot_2=yes
18592 else
18593   echo "configure: failed program was:" >&5
18594   cat conftest.$ac_ext >&5
18595   rm -rf conftest*
18596   ol_cv_db_db_4_dot_2=no
18597 fi
18598 rm -f conftest*
18599
18600         LIBS="$ol_LIBS"
18601
18602 fi
18603
18604 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18605
18606         if test $ol_cv_db_db_4_dot_2 = yes ; then
18607                 ol_cv_lib_db=-ldb-4.2
18608         fi
18609 fi
18610
18611 if test $ol_cv_lib_db = no ; then
18612         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18613 echo "configure:18614: checking for Berkeley DB link (-ldb-4-2)" >&5
18614 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18615   echo $ac_n "(cached) $ac_c" 1>&6
18616 else
18617   
18618         ol_DB_LIB=-ldb-4-2
18619         ol_LIBS=$LIBS
18620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18621
18622         cat > conftest.$ac_ext <<EOF
18623 #line 18624 "configure"
18624 #include "confdefs.h"
18625
18626 #ifdef HAVE_DB_185_H
18627 # include <db_185.h>
18628 #else
18629 # include <db.h>
18630 #endif
18631
18632 #ifndef DB_VERSION_MAJOR
18633 # define DB_VERSION_MAJOR 1
18634 #endif
18635
18636 #ifndef NULL
18637 #define NULL ((void*)0)
18638 #endif
18639
18640 int main() {
18641
18642 #if DB_VERSION_MAJOR > 1
18643         {
18644                 char *version;
18645                 int major, minor, patch;
18646
18647                 version = db_version( &major, &minor, &patch );
18648
18649                 if( major != DB_VERSION_MAJOR ||
18650                         minor < DB_VERSION_MINOR )
18651                 {
18652                         printf("Berkeley DB version mismatch\n"
18653                                 "\theader: %s\n\tlibrary: %s\n",
18654                                 DB_VERSION_STRING, version);
18655                         return 1;
18656                 }
18657         }
18658 #endif
18659
18660 #if DB_VERSION_MAJOR > 2
18661         db_env_create( NULL, 0 );
18662 #elif DB_VERSION_MAJOR > 1
18663         db_appexit( NULL );
18664 #else
18665         (void) dbopen( NULL, 0, 0, 0, NULL);
18666 #endif
18667
18668 ; return 0; }
18669 EOF
18670 if { (eval echo configure:18671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18671   rm -rf conftest*
18672   ol_cv_db_db_4_2=yes
18673 else
18674   echo "configure: failed program was:" >&5
18675   cat conftest.$ac_ext >&5
18676   rm -rf conftest*
18677   ol_cv_db_db_4_2=no
18678 fi
18679 rm -f conftest*
18680
18681         LIBS="$ol_LIBS"
18682
18683 fi
18684
18685 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18686
18687         if test $ol_cv_db_db_4_2 = yes ; then
18688                 ol_cv_lib_db=-ldb-4-2
18689         fi
18690 fi
18691
18692 if test $ol_cv_lib_db = no ; then
18693         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18694 echo "configure:18695: checking for Berkeley DB link (-ldb-4)" >&5
18695 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18696   echo $ac_n "(cached) $ac_c" 1>&6
18697 else
18698   
18699         ol_DB_LIB=-ldb-4
18700         ol_LIBS=$LIBS
18701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18702
18703         cat > conftest.$ac_ext <<EOF
18704 #line 18705 "configure"
18705 #include "confdefs.h"
18706
18707 #ifdef HAVE_DB_185_H
18708 # include <db_185.h>
18709 #else
18710 # include <db.h>
18711 #endif
18712
18713 #ifndef DB_VERSION_MAJOR
18714 # define DB_VERSION_MAJOR 1
18715 #endif
18716
18717 #ifndef NULL
18718 #define NULL ((void*)0)
18719 #endif
18720
18721 int main() {
18722
18723 #if DB_VERSION_MAJOR > 1
18724         {
18725                 char *version;
18726                 int major, minor, patch;
18727
18728                 version = db_version( &major, &minor, &patch );
18729
18730                 if( major != DB_VERSION_MAJOR ||
18731                         minor < DB_VERSION_MINOR )
18732                 {
18733                         printf("Berkeley DB version mismatch\n"
18734                                 "\theader: %s\n\tlibrary: %s\n",
18735                                 DB_VERSION_STRING, version);
18736                         return 1;
18737                 }
18738         }
18739 #endif
18740
18741 #if DB_VERSION_MAJOR > 2
18742         db_env_create( NULL, 0 );
18743 #elif DB_VERSION_MAJOR > 1
18744         db_appexit( NULL );
18745 #else
18746         (void) dbopen( NULL, 0, 0, 0, NULL);
18747 #endif
18748
18749 ; return 0; }
18750 EOF
18751 if { (eval echo configure:18752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18752   rm -rf conftest*
18753   ol_cv_db_db_4=yes
18754 else
18755   echo "configure: failed program was:" >&5
18756   cat conftest.$ac_ext >&5
18757   rm -rf conftest*
18758   ol_cv_db_db_4=no
18759 fi
18760 rm -f conftest*
18761
18762         LIBS="$ol_LIBS"
18763
18764 fi
18765
18766 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18767
18768         if test $ol_cv_db_db_4 = yes ; then
18769                 ol_cv_lib_db=-ldb-4
18770         fi
18771 fi
18772
18773 if test $ol_cv_lib_db = no ; then
18774         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18775 echo "configure:18776: checking for Berkeley DB link (-ldb4)" >&5
18776 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18777   echo $ac_n "(cached) $ac_c" 1>&6
18778 else
18779   
18780         ol_DB_LIB=-ldb4
18781         ol_LIBS=$LIBS
18782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18783
18784         cat > conftest.$ac_ext <<EOF
18785 #line 18786 "configure"
18786 #include "confdefs.h"
18787
18788 #ifdef HAVE_DB_185_H
18789 # include <db_185.h>
18790 #else
18791 # include <db.h>
18792 #endif
18793
18794 #ifndef DB_VERSION_MAJOR
18795 # define DB_VERSION_MAJOR 1
18796 #endif
18797
18798 #ifndef NULL
18799 #define NULL ((void*)0)
18800 #endif
18801
18802 int main() {
18803
18804 #if DB_VERSION_MAJOR > 1
18805         {
18806                 char *version;
18807                 int major, minor, patch;
18808
18809                 version = db_version( &major, &minor, &patch );
18810
18811                 if( major != DB_VERSION_MAJOR ||
18812                         minor < DB_VERSION_MINOR )
18813                 {
18814                         printf("Berkeley DB version mismatch\n"
18815                                 "\theader: %s\n\tlibrary: %s\n",
18816                                 DB_VERSION_STRING, version);
18817                         return 1;
18818                 }
18819         }
18820 #endif
18821
18822 #if DB_VERSION_MAJOR > 2
18823         db_env_create( NULL, 0 );
18824 #elif DB_VERSION_MAJOR > 1
18825         db_appexit( NULL );
18826 #else
18827         (void) dbopen( NULL, 0, 0, 0, NULL);
18828 #endif
18829
18830 ; return 0; }
18831 EOF
18832 if { (eval echo configure:18833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18833   rm -rf conftest*
18834   ol_cv_db_db4=yes
18835 else
18836   echo "configure: failed program was:" >&5
18837   cat conftest.$ac_ext >&5
18838   rm -rf conftest*
18839   ol_cv_db_db4=no
18840 fi
18841 rm -f conftest*
18842
18843         LIBS="$ol_LIBS"
18844
18845 fi
18846
18847 echo "$ac_t""$ol_cv_db_db4" 1>&6
18848
18849         if test $ol_cv_db_db4 = yes ; then
18850                 ol_cv_lib_db=-ldb4
18851         fi
18852 fi
18853
18854 if test $ol_cv_lib_db = no ; then
18855         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18856 echo "configure:18857: checking for Berkeley DB link (-ldb)" >&5
18857 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18858   echo $ac_n "(cached) $ac_c" 1>&6
18859 else
18860   
18861         ol_DB_LIB=-ldb
18862         ol_LIBS=$LIBS
18863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18864
18865         cat > conftest.$ac_ext <<EOF
18866 #line 18867 "configure"
18867 #include "confdefs.h"
18868
18869 #ifdef HAVE_DB_185_H
18870 # include <db_185.h>
18871 #else
18872 # include <db.h>
18873 #endif
18874
18875 #ifndef DB_VERSION_MAJOR
18876 # define DB_VERSION_MAJOR 1
18877 #endif
18878
18879 #ifndef NULL
18880 #define NULL ((void*)0)
18881 #endif
18882
18883 int main() {
18884
18885 #if DB_VERSION_MAJOR > 1
18886         {
18887                 char *version;
18888                 int major, minor, patch;
18889
18890                 version = db_version( &major, &minor, &patch );
18891
18892                 if( major != DB_VERSION_MAJOR ||
18893                         minor < DB_VERSION_MINOR )
18894                 {
18895                         printf("Berkeley DB version mismatch\n"
18896                                 "\theader: %s\n\tlibrary: %s\n",
18897                                 DB_VERSION_STRING, version);
18898                         return 1;
18899                 }
18900         }
18901 #endif
18902
18903 #if DB_VERSION_MAJOR > 2
18904         db_env_create( NULL, 0 );
18905 #elif DB_VERSION_MAJOR > 1
18906         db_appexit( NULL );
18907 #else
18908         (void) dbopen( NULL, 0, 0, 0, NULL);
18909 #endif
18910
18911 ; return 0; }
18912 EOF
18913 if { (eval echo configure:18914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18914   rm -rf conftest*
18915   ol_cv_db_db=yes
18916 else
18917   echo "configure: failed program was:" >&5
18918   cat conftest.$ac_ext >&5
18919   rm -rf conftest*
18920   ol_cv_db_db=no
18921 fi
18922 rm -f conftest*
18923
18924         LIBS="$ol_LIBS"
18925
18926 fi
18927
18928 echo "$ac_t""$ol_cv_db_db" 1>&6
18929
18930         if test $ol_cv_db_db = yes ; then
18931                 ol_cv_lib_db=-ldb
18932         fi
18933 fi
18934
18935 if test $ol_cv_lib_db = no ; then
18936         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18937 echo "configure:18938: checking for Berkeley DB link (-ldb41)" >&5
18938 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18939   echo $ac_n "(cached) $ac_c" 1>&6
18940 else
18941   
18942         ol_DB_LIB=-ldb41
18943         ol_LIBS=$LIBS
18944         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18945
18946         cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949
18950 #ifdef HAVE_DB_185_H
18951 # include <db_185.h>
18952 #else
18953 # include <db.h>
18954 #endif
18955
18956 #ifndef DB_VERSION_MAJOR
18957 # define DB_VERSION_MAJOR 1
18958 #endif
18959
18960 #ifndef NULL
18961 #define NULL ((void*)0)
18962 #endif
18963
18964 int main() {
18965
18966 #if DB_VERSION_MAJOR > 1
18967         {
18968                 char *version;
18969                 int major, minor, patch;
18970
18971                 version = db_version( &major, &minor, &patch );
18972
18973                 if( major != DB_VERSION_MAJOR ||
18974                         minor < DB_VERSION_MINOR )
18975                 {
18976                         printf("Berkeley DB version mismatch\n"
18977                                 "\theader: %s\n\tlibrary: %s\n",
18978                                 DB_VERSION_STRING, version);
18979                         return 1;
18980                 }
18981         }
18982 #endif
18983
18984 #if DB_VERSION_MAJOR > 2
18985         db_env_create( NULL, 0 );
18986 #elif DB_VERSION_MAJOR > 1
18987         db_appexit( NULL );
18988 #else
18989         (void) dbopen( NULL, 0, 0, 0, NULL);
18990 #endif
18991
18992 ; return 0; }
18993 EOF
18994 if { (eval echo configure:18995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18995   rm -rf conftest*
18996   ol_cv_db_db41=yes
18997 else
18998   echo "configure: failed program was:" >&5
18999   cat conftest.$ac_ext >&5
19000   rm -rf conftest*
19001   ol_cv_db_db41=no
19002 fi
19003 rm -f conftest*
19004
19005         LIBS="$ol_LIBS"
19006
19007 fi
19008
19009 echo "$ac_t""$ol_cv_db_db41" 1>&6
19010
19011         if test $ol_cv_db_db41 = yes ; then
19012                 ol_cv_lib_db=-ldb41
19013         fi
19014 fi
19015
19016 if test $ol_cv_lib_db = no ; then
19017         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19018 echo "configure:19019: checking for Berkeley DB link (-ldb-41)" >&5
19019 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19020   echo $ac_n "(cached) $ac_c" 1>&6
19021 else
19022   
19023         ol_DB_LIB=-ldb-41
19024         ol_LIBS=$LIBS
19025         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19026
19027         cat > conftest.$ac_ext <<EOF
19028 #line 19029 "configure"
19029 #include "confdefs.h"
19030
19031 #ifdef HAVE_DB_185_H
19032 # include <db_185.h>
19033 #else
19034 # include <db.h>
19035 #endif
19036
19037 #ifndef DB_VERSION_MAJOR
19038 # define DB_VERSION_MAJOR 1
19039 #endif
19040
19041 #ifndef NULL
19042 #define NULL ((void*)0)
19043 #endif
19044
19045 int main() {
19046
19047 #if DB_VERSION_MAJOR > 1
19048         {
19049                 char *version;
19050                 int major, minor, patch;
19051
19052                 version = db_version( &major, &minor, &patch );
19053
19054                 if( major != DB_VERSION_MAJOR ||
19055                         minor < DB_VERSION_MINOR )
19056                 {
19057                         printf("Berkeley DB version mismatch\n"
19058                                 "\theader: %s\n\tlibrary: %s\n",
19059                                 DB_VERSION_STRING, version);
19060                         return 1;
19061                 }
19062         }
19063 #endif
19064
19065 #if DB_VERSION_MAJOR > 2
19066         db_env_create( NULL, 0 );
19067 #elif DB_VERSION_MAJOR > 1
19068         db_appexit( NULL );
19069 #else
19070         (void) dbopen( NULL, 0, 0, 0, NULL);
19071 #endif
19072
19073 ; return 0; }
19074 EOF
19075 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19076   rm -rf conftest*
19077   ol_cv_db_db_41=yes
19078 else
19079   echo "configure: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   rm -rf conftest*
19082   ol_cv_db_db_41=no
19083 fi
19084 rm -f conftest*
19085
19086         LIBS="$ol_LIBS"
19087
19088 fi
19089
19090 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19091
19092         if test $ol_cv_db_db_41 = yes ; then
19093                 ol_cv_lib_db=-ldb-41
19094         fi
19095 fi
19096
19097 if test $ol_cv_lib_db = no ; then
19098         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19099 echo "configure:19100: checking for Berkeley DB link (-ldb-4.1)" >&5
19100 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   
19104         ol_DB_LIB=-ldb-4.1
19105         ol_LIBS=$LIBS
19106         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19107
19108         cat > conftest.$ac_ext <<EOF
19109 #line 19110 "configure"
19110 #include "confdefs.h"
19111
19112 #ifdef HAVE_DB_185_H
19113 # include <db_185.h>
19114 #else
19115 # include <db.h>
19116 #endif
19117
19118 #ifndef DB_VERSION_MAJOR
19119 # define DB_VERSION_MAJOR 1
19120 #endif
19121
19122 #ifndef NULL
19123 #define NULL ((void*)0)
19124 #endif
19125
19126 int main() {
19127
19128 #if DB_VERSION_MAJOR > 1
19129         {
19130                 char *version;
19131                 int major, minor, patch;
19132
19133                 version = db_version( &major, &minor, &patch );
19134
19135                 if( major != DB_VERSION_MAJOR ||
19136                         minor < DB_VERSION_MINOR )
19137                 {
19138                         printf("Berkeley DB version mismatch\n"
19139                                 "\theader: %s\n\tlibrary: %s\n",
19140                                 DB_VERSION_STRING, version);
19141                         return 1;
19142                 }
19143         }
19144 #endif
19145
19146 #if DB_VERSION_MAJOR > 2
19147         db_env_create( NULL, 0 );
19148 #elif DB_VERSION_MAJOR > 1
19149         db_appexit( NULL );
19150 #else
19151         (void) dbopen( NULL, 0, 0, 0, NULL);
19152 #endif
19153
19154 ; return 0; }
19155 EOF
19156 if { (eval echo configure:19157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19157   rm -rf conftest*
19158   ol_cv_db_db_4_dot_1=yes
19159 else
19160   echo "configure: failed program was:" >&5
19161   cat conftest.$ac_ext >&5
19162   rm -rf conftest*
19163   ol_cv_db_db_4_dot_1=no
19164 fi
19165 rm -f conftest*
19166
19167         LIBS="$ol_LIBS"
19168
19169 fi
19170
19171 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19172
19173         if test $ol_cv_db_db_4_dot_1 = yes ; then
19174                 ol_cv_lib_db=-ldb-4.1
19175         fi
19176 fi
19177
19178 if test $ol_cv_lib_db = no ; then
19179         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19180 echo "configure:19181: checking for Berkeley DB link (-ldb-4-1)" >&5
19181 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19182   echo $ac_n "(cached) $ac_c" 1>&6
19183 else
19184   
19185         ol_DB_LIB=-ldb-4-1
19186         ol_LIBS=$LIBS
19187         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19188
19189         cat > conftest.$ac_ext <<EOF
19190 #line 19191 "configure"
19191 #include "confdefs.h"
19192
19193 #ifdef HAVE_DB_185_H
19194 # include <db_185.h>
19195 #else
19196 # include <db.h>
19197 #endif
19198
19199 #ifndef DB_VERSION_MAJOR
19200 # define DB_VERSION_MAJOR 1
19201 #endif
19202
19203 #ifndef NULL
19204 #define NULL ((void*)0)
19205 #endif
19206
19207 int main() {
19208
19209 #if DB_VERSION_MAJOR > 1
19210         {
19211                 char *version;
19212                 int major, minor, patch;
19213
19214                 version = db_version( &major, &minor, &patch );
19215
19216                 if( major != DB_VERSION_MAJOR ||
19217                         minor < DB_VERSION_MINOR )
19218                 {
19219                         printf("Berkeley DB version mismatch\n"
19220                                 "\theader: %s\n\tlibrary: %s\n",
19221                                 DB_VERSION_STRING, version);
19222                         return 1;
19223                 }
19224         }
19225 #endif
19226
19227 #if DB_VERSION_MAJOR > 2
19228         db_env_create( NULL, 0 );
19229 #elif DB_VERSION_MAJOR > 1
19230         db_appexit( NULL );
19231 #else
19232         (void) dbopen( NULL, 0, 0, 0, NULL);
19233 #endif
19234
19235 ; return 0; }
19236 EOF
19237 if { (eval echo configure:19238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19238   rm -rf conftest*
19239   ol_cv_db_db_4_1=yes
19240 else
19241   echo "configure: failed program was:" >&5
19242   cat conftest.$ac_ext >&5
19243   rm -rf conftest*
19244   ol_cv_db_db_4_1=no
19245 fi
19246 rm -f conftest*
19247
19248         LIBS="$ol_LIBS"
19249
19250 fi
19251
19252 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19253
19254         if test $ol_cv_db_db_4_1 = yes ; then
19255                 ol_cv_lib_db=-ldb-4-1
19256         fi
19257 fi
19258
19259 if test $ol_cv_lib_db = no ; then
19260         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19261 echo "configure:19262: checking for Berkeley DB link (-ldb3)" >&5
19262 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19263   echo $ac_n "(cached) $ac_c" 1>&6
19264 else
19265   
19266         ol_DB_LIB=-ldb3
19267         ol_LIBS=$LIBS
19268         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19269
19270         cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273
19274 #ifdef HAVE_DB_185_H
19275 # include <db_185.h>
19276 #else
19277 # include <db.h>
19278 #endif
19279
19280 #ifndef DB_VERSION_MAJOR
19281 # define DB_VERSION_MAJOR 1
19282 #endif
19283
19284 #ifndef NULL
19285 #define NULL ((void*)0)
19286 #endif
19287
19288 int main() {
19289
19290 #if DB_VERSION_MAJOR > 1
19291         {
19292                 char *version;
19293                 int major, minor, patch;
19294
19295                 version = db_version( &major, &minor, &patch );
19296
19297                 if( major != DB_VERSION_MAJOR ||
19298                         minor < DB_VERSION_MINOR )
19299                 {
19300                         printf("Berkeley DB version mismatch\n"
19301                                 "\theader: %s\n\tlibrary: %s\n",
19302                                 DB_VERSION_STRING, version);
19303                         return 1;
19304                 }
19305         }
19306 #endif
19307
19308 #if DB_VERSION_MAJOR > 2
19309         db_env_create( NULL, 0 );
19310 #elif DB_VERSION_MAJOR > 1
19311         db_appexit( NULL );
19312 #else
19313         (void) dbopen( NULL, 0, 0, 0, NULL);
19314 #endif
19315
19316 ; return 0; }
19317 EOF
19318 if { (eval echo configure:19319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19319   rm -rf conftest*
19320   ol_cv_db_db3=yes
19321 else
19322   echo "configure: failed program was:" >&5
19323   cat conftest.$ac_ext >&5
19324   rm -rf conftest*
19325   ol_cv_db_db3=no
19326 fi
19327 rm -f conftest*
19328
19329         LIBS="$ol_LIBS"
19330
19331 fi
19332
19333 echo "$ac_t""$ol_cv_db_db3" 1>&6
19334
19335         if test $ol_cv_db_db3 = yes ; then
19336                 ol_cv_lib_db=-ldb3
19337         fi
19338 fi
19339
19340 if test $ol_cv_lib_db = no ; then
19341         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19342 echo "configure:19343: checking for Berkeley DB link (-ldb-3)" >&5
19343 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19344   echo $ac_n "(cached) $ac_c" 1>&6
19345 else
19346   
19347         ol_DB_LIB=-ldb-3
19348         ol_LIBS=$LIBS
19349         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19350
19351         cat > conftest.$ac_ext <<EOF
19352 #line 19353 "configure"
19353 #include "confdefs.h"
19354
19355 #ifdef HAVE_DB_185_H
19356 # include <db_185.h>
19357 #else
19358 # include <db.h>
19359 #endif
19360
19361 #ifndef DB_VERSION_MAJOR
19362 # define DB_VERSION_MAJOR 1
19363 #endif
19364
19365 #ifndef NULL
19366 #define NULL ((void*)0)
19367 #endif
19368
19369 int main() {
19370
19371 #if DB_VERSION_MAJOR > 1
19372         {
19373                 char *version;
19374                 int major, minor, patch;
19375
19376                 version = db_version( &major, &minor, &patch );
19377
19378                 if( major != DB_VERSION_MAJOR ||
19379                         minor < DB_VERSION_MINOR )
19380                 {
19381                         printf("Berkeley DB version mismatch\n"
19382                                 "\theader: %s\n\tlibrary: %s\n",
19383                                 DB_VERSION_STRING, version);
19384                         return 1;
19385                 }
19386         }
19387 #endif
19388
19389 #if DB_VERSION_MAJOR > 2
19390         db_env_create( NULL, 0 );
19391 #elif DB_VERSION_MAJOR > 1
19392         db_appexit( NULL );
19393 #else
19394         (void) dbopen( NULL, 0, 0, 0, NULL);
19395 #endif
19396
19397 ; return 0; }
19398 EOF
19399 if { (eval echo configure:19400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19400   rm -rf conftest*
19401   ol_cv_db_db_3=yes
19402 else
19403   echo "configure: failed program was:" >&5
19404   cat conftest.$ac_ext >&5
19405   rm -rf conftest*
19406   ol_cv_db_db_3=no
19407 fi
19408 rm -f conftest*
19409
19410         LIBS="$ol_LIBS"
19411
19412 fi
19413
19414 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19415
19416         if test $ol_cv_db_db_3 = yes ; then
19417                 ol_cv_lib_db=-ldb-3
19418         fi
19419 fi
19420
19421 if test $ol_cv_lib_db = no ; then
19422         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19423 echo "configure:19424: checking for Berkeley DB link (-ldb2)" >&5
19424 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19425   echo $ac_n "(cached) $ac_c" 1>&6
19426 else
19427   
19428         ol_DB_LIB=-ldb2
19429         ol_LIBS=$LIBS
19430         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19431
19432         cat > conftest.$ac_ext <<EOF
19433 #line 19434 "configure"
19434 #include "confdefs.h"
19435
19436 #ifdef HAVE_DB_185_H
19437 # include <db_185.h>
19438 #else
19439 # include <db.h>
19440 #endif
19441
19442 #ifndef DB_VERSION_MAJOR
19443 # define DB_VERSION_MAJOR 1
19444 #endif
19445
19446 #ifndef NULL
19447 #define NULL ((void*)0)
19448 #endif
19449
19450 int main() {
19451
19452 #if DB_VERSION_MAJOR > 1
19453         {
19454                 char *version;
19455                 int major, minor, patch;
19456
19457                 version = db_version( &major, &minor, &patch );
19458
19459                 if( major != DB_VERSION_MAJOR ||
19460                         minor < DB_VERSION_MINOR )
19461                 {
19462                         printf("Berkeley DB version mismatch\n"
19463                                 "\theader: %s\n\tlibrary: %s\n",
19464                                 DB_VERSION_STRING, version);
19465                         return 1;
19466                 }
19467         }
19468 #endif
19469
19470 #if DB_VERSION_MAJOR > 2
19471         db_env_create( NULL, 0 );
19472 #elif DB_VERSION_MAJOR > 1
19473         db_appexit( NULL );
19474 #else
19475         (void) dbopen( NULL, 0, 0, 0, NULL);
19476 #endif
19477
19478 ; return 0; }
19479 EOF
19480 if { (eval echo configure:19481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19481   rm -rf conftest*
19482   ol_cv_db_db2=yes
19483 else
19484   echo "configure: failed program was:" >&5
19485   cat conftest.$ac_ext >&5
19486   rm -rf conftest*
19487   ol_cv_db_db2=no
19488 fi
19489 rm -f conftest*
19490
19491         LIBS="$ol_LIBS"
19492
19493 fi
19494
19495 echo "$ac_t""$ol_cv_db_db2" 1>&6
19496
19497         if test $ol_cv_db_db2 = yes ; then
19498                 ol_cv_lib_db=-ldb2
19499         fi
19500 fi
19501
19502 if test $ol_cv_lib_db = no ; then
19503         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19504 echo "configure:19505: checking for Berkeley DB link (-ldb-2)" >&5
19505 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19506   echo $ac_n "(cached) $ac_c" 1>&6
19507 else
19508   
19509         ol_DB_LIB=-ldb-2
19510         ol_LIBS=$LIBS
19511         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19512
19513         cat > conftest.$ac_ext <<EOF
19514 #line 19515 "configure"
19515 #include "confdefs.h"
19516
19517 #ifdef HAVE_DB_185_H
19518 # include <db_185.h>
19519 #else
19520 # include <db.h>
19521 #endif
19522
19523 #ifndef DB_VERSION_MAJOR
19524 # define DB_VERSION_MAJOR 1
19525 #endif
19526
19527 #ifndef NULL
19528 #define NULL ((void*)0)
19529 #endif
19530
19531 int main() {
19532
19533 #if DB_VERSION_MAJOR > 1
19534         {
19535                 char *version;
19536                 int major, minor, patch;
19537
19538                 version = db_version( &major, &minor, &patch );
19539
19540                 if( major != DB_VERSION_MAJOR ||
19541                         minor < DB_VERSION_MINOR )
19542                 {
19543                         printf("Berkeley DB version mismatch\n"
19544                                 "\theader: %s\n\tlibrary: %s\n",
19545                                 DB_VERSION_STRING, version);
19546                         return 1;
19547                 }
19548         }
19549 #endif
19550
19551 #if DB_VERSION_MAJOR > 2
19552         db_env_create( NULL, 0 );
19553 #elif DB_VERSION_MAJOR > 1
19554         db_appexit( NULL );
19555 #else
19556         (void) dbopen( NULL, 0, 0, 0, NULL);
19557 #endif
19558
19559 ; return 0; }
19560 EOF
19561 if { (eval echo configure:19562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19562   rm -rf conftest*
19563   ol_cv_db_db_2=yes
19564 else
19565   echo "configure: failed program was:" >&5
19566   cat conftest.$ac_ext >&5
19567   rm -rf conftest*
19568   ol_cv_db_db_2=no
19569 fi
19570 rm -f conftest*
19571
19572         LIBS="$ol_LIBS"
19573
19574 fi
19575
19576 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19577
19578         if test $ol_cv_db_db_2 = yes ; then
19579                 ol_cv_lib_db=-ldb-2
19580         fi
19581 fi
19582
19583 if test $ol_cv_lib_db = no ; then
19584         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19585 echo "configure:19586: checking for Berkeley DB link (-ldb1)" >&5
19586 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19587   echo $ac_n "(cached) $ac_c" 1>&6
19588 else
19589   
19590         ol_DB_LIB=-ldb1
19591         ol_LIBS=$LIBS
19592         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19593
19594         cat > conftest.$ac_ext <<EOF
19595 #line 19596 "configure"
19596 #include "confdefs.h"
19597
19598 #ifdef HAVE_DB_185_H
19599 # include <db_185.h>
19600 #else
19601 # include <db.h>
19602 #endif
19603
19604 #ifndef DB_VERSION_MAJOR
19605 # define DB_VERSION_MAJOR 1
19606 #endif
19607
19608 #ifndef NULL
19609 #define NULL ((void*)0)
19610 #endif
19611
19612 int main() {
19613
19614 #if DB_VERSION_MAJOR > 1
19615         {
19616                 char *version;
19617                 int major, minor, patch;
19618
19619                 version = db_version( &major, &minor, &patch );
19620
19621                 if( major != DB_VERSION_MAJOR ||
19622                         minor < DB_VERSION_MINOR )
19623                 {
19624                         printf("Berkeley DB version mismatch\n"
19625                                 "\theader: %s\n\tlibrary: %s\n",
19626                                 DB_VERSION_STRING, version);
19627                         return 1;
19628                 }
19629         }
19630 #endif
19631
19632 #if DB_VERSION_MAJOR > 2
19633         db_env_create( NULL, 0 );
19634 #elif DB_VERSION_MAJOR > 1
19635         db_appexit( NULL );
19636 #else
19637         (void) dbopen( NULL, 0, 0, 0, NULL);
19638 #endif
19639
19640 ; return 0; }
19641 EOF
19642 if { (eval echo configure:19643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19643   rm -rf conftest*
19644   ol_cv_db_db1=yes
19645 else
19646   echo "configure: failed program was:" >&5
19647   cat conftest.$ac_ext >&5
19648   rm -rf conftest*
19649   ol_cv_db_db1=no
19650 fi
19651 rm -f conftest*
19652
19653         LIBS="$ol_LIBS"
19654
19655 fi
19656
19657 echo "$ac_t""$ol_cv_db_db1" 1>&6
19658
19659         if test $ol_cv_db_db1 = yes ; then
19660                 ol_cv_lib_db=-ldb1
19661         fi
19662 fi
19663
19664 if test $ol_cv_lib_db = no ; then
19665         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19666 echo "configure:19667: checking for Berkeley DB link (-ldb-1)" >&5
19667 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19668   echo $ac_n "(cached) $ac_c" 1>&6
19669 else
19670   
19671         ol_DB_LIB=-ldb-1
19672         ol_LIBS=$LIBS
19673         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19674
19675         cat > conftest.$ac_ext <<EOF
19676 #line 19677 "configure"
19677 #include "confdefs.h"
19678
19679 #ifdef HAVE_DB_185_H
19680 # include <db_185.h>
19681 #else
19682 # include <db.h>
19683 #endif
19684
19685 #ifndef DB_VERSION_MAJOR
19686 # define DB_VERSION_MAJOR 1
19687 #endif
19688
19689 #ifndef NULL
19690 #define NULL ((void*)0)
19691 #endif
19692
19693 int main() {
19694
19695 #if DB_VERSION_MAJOR > 1
19696         {
19697                 char *version;
19698                 int major, minor, patch;
19699
19700                 version = db_version( &major, &minor, &patch );
19701
19702                 if( major != DB_VERSION_MAJOR ||
19703                         minor < DB_VERSION_MINOR )
19704                 {
19705                         printf("Berkeley DB version mismatch\n"
19706                                 "\theader: %s\n\tlibrary: %s\n",
19707                                 DB_VERSION_STRING, version);
19708                         return 1;
19709                 }
19710         }
19711 #endif
19712
19713 #if DB_VERSION_MAJOR > 2
19714         db_env_create( NULL, 0 );
19715 #elif DB_VERSION_MAJOR > 1
19716         db_appexit( NULL );
19717 #else
19718         (void) dbopen( NULL, 0, 0, 0, NULL);
19719 #endif
19720
19721 ; return 0; }
19722 EOF
19723 if { (eval echo configure:19724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19724   rm -rf conftest*
19725   ol_cv_db_db_1=yes
19726 else
19727   echo "configure: failed program was:" >&5
19728   cat conftest.$ac_ext >&5
19729   rm -rf conftest*
19730   ol_cv_db_db_1=no
19731 fi
19732 rm -f conftest*
19733
19734         LIBS="$ol_LIBS"
19735
19736 fi
19737
19738 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19739
19740         if test $ol_cv_db_db_1 = yes ; then
19741                 ol_cv_lib_db=-ldb-1
19742         fi
19743 fi
19744
19745
19746         if test "$ol_cv_lib_db" != no ; then
19747                 ol_cv_berkeley_db=yes
19748                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19749 echo "configure:19750: checking for Berkeley DB version match" >&5
19750 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19751   echo $ac_n "(cached) $ac_c" 1>&6
19752 else
19753   
19754         ol_LIBS="$LIBS"
19755         LIBS="$LTHREAD_LIBS $LIBS"
19756         if test $ol_cv_lib_db != yes ; then
19757                 LIBS="$ol_cv_lib_db $LIBS"
19758         fi
19759
19760         if test "$cross_compiling" = yes; then
19761   ol_cv_berkeley_db_version=cross
19762 else
19763   cat > conftest.$ac_ext <<EOF
19764 #line 19765 "configure"
19765 #include "confdefs.h"
19766
19767 #ifdef HAVE_DB_185_H
19768         choke me;
19769 #else
19770 #include <db.h>
19771 #endif
19772 #ifndef DB_VERSION_MAJOR
19773 # define DB_VERSION_MAJOR 1
19774 #endif
19775 #ifndef NULL
19776 #define NULL ((void *)0)
19777 #endif
19778 main()
19779 {
19780 #if DB_VERSION_MAJOR > 1
19781         char *version;
19782         int major, minor, patch;
19783
19784         version = db_version( &major, &minor, &patch );
19785
19786         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19787                 printf("Berkeley DB version mismatch\n"
19788                         "\theader: %s\n\tlibrary: %s\n",
19789                         DB_VERSION_STRING, version);
19790                 return 1;
19791         }
19792 #endif
19793
19794         return 0;
19795 }
19796 EOF
19797 if { (eval echo configure:19798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19798 then
19799   ol_cv_berkeley_db_version=yes
19800 else
19801   echo "configure: failed program was:" >&5
19802   cat conftest.$ac_ext >&5
19803   rm -fr conftest*
19804   ol_cv_berkeley_db_version=no
19805 fi
19806 rm -fr conftest*
19807 fi
19808
19809
19810         LIBS="$ol_LIBS"
19811
19812 fi
19813
19814 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19815
19816         if test $ol_cv_berkeley_db_version = no ; then
19817                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19818         fi
19819
19820                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19821 echo "configure:19822: checking for Berkeley DB thread support" >&5
19822 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19823   echo $ac_n "(cached) $ac_c" 1>&6
19824 else
19825   
19826         ol_LIBS="$LIBS"
19827         LIBS="$LTHREAD_LIBS $LIBS"
19828         if test $ol_cv_lib_db != yes ; then
19829                 LIBS="$ol_cv_lib_db $LIBS"
19830         fi
19831
19832         if test "$cross_compiling" = yes; then
19833   ol_cv_berkeley_db_thread=cross
19834 else
19835   cat > conftest.$ac_ext <<EOF
19836 #line 19837 "configure"
19837 #include "confdefs.h"
19838
19839 #ifdef HAVE_DB_185_H
19840         choke me;
19841 #else
19842 #include <db.h>
19843 #endif
19844 #ifndef NULL
19845 #define NULL ((void *)0)
19846 #endif
19847 main()
19848 {
19849         int rc;
19850         u_int32_t flags = DB_CREATE |
19851 #ifdef DB_PRIVATE
19852                 DB_PRIVATE |
19853 #endif
19854                 DB_THREAD;
19855
19856 #if DB_VERSION_MAJOR > 2
19857         DB_ENV *env = NULL;
19858
19859         rc = db_env_create( &env, 0 );
19860
19861         flags |= DB_INIT_MPOOL;
19862 #ifdef DB_MPOOL_PRIVATE
19863         flags |= DB_MPOOL_PRIVATE;
19864 #endif
19865
19866         if( rc ) {
19867                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19868                 return rc;
19869         }
19870
19871 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19872         rc = env->open( env, NULL, flags, 0 );
19873 #else
19874         rc = env->open( env, NULL, NULL, flags, 0 );
19875 #endif
19876
19877         if ( rc == 0 ) {
19878                 rc = env->close( env, 0 );
19879         }
19880
19881         if( rc ) {
19882                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19883                 return rc;
19884         }
19885
19886 #else
19887         DB_ENV env;
19888         memset( &env, '\0', sizeof(env) );
19889
19890         rc = db_appinit( NULL, NULL, &env, flags );
19891
19892         if( rc == 0 ) {
19893                 db_appexit( &env );
19894         }
19895
19896         unlink("__db_mpool.share");
19897         unlink("__db_lock.share");
19898 #endif
19899
19900         return rc;
19901 }
19902 EOF
19903 if { (eval echo configure:19904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19904 then
19905   ol_cv_berkeley_db_thread=yes
19906 else
19907   echo "configure: failed program was:" >&5
19908   cat conftest.$ac_ext >&5
19909   rm -fr conftest*
19910   ol_cv_berkeley_db_thread=no
19911 fi
19912 rm -fr conftest*
19913 fi
19914
19915
19916         LIBS="$ol_LIBS"
19917
19918 fi
19919
19920 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19921
19922         if test $ol_cv_berkeley_db_thread != no ; then
19923                 cat >> confdefs.h <<\EOF
19924 #define HAVE_BERKELEY_DB_THREAD 1
19925 EOF
19926
19927         fi
19928
19929         fi
19930 fi
19931
19932         fi
19933
19934         if test $ol_cv_berkeley_db != no ; then
19935                 cat >> confdefs.h <<\EOF
19936 #define HAVE_BERKELEY_DB 1
19937 EOF
19938
19939
19940                 ol_link_ldbm=berkeley
19941                 ol_with_ldbm_api=berkeley
19942
19943                 if test $ol_with_ldbm_type = hash ; then
19944                         cat >> confdefs.h <<\EOF
19945 #define LDBM_USE_DBHASH 1
19946 EOF
19947
19948                 else
19949                         cat >> confdefs.h <<\EOF
19950 #define LDBM_USE_DBBTREE 1
19951 EOF
19952
19953                 fi
19954
19955                                                 if test $ol_cv_lib_db != yes ; then
19956                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19957                 fi
19958         fi
19959 fi
19960
19961 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
19962         if test $ol_link_ldbm != berkeley ; then
19963                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
19964         else
19965                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19966 echo "configure:19967: checking Berkeley DB version for BDB backend" >&5
19967 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19968   echo $ac_n "(cached) $ac_c" 1>&6
19969 else
19970   
19971         cat > conftest.$ac_ext <<EOF
19972 #line 19973 "configure"
19973 #include "confdefs.h"
19974
19975 #include <db.h>
19976
19977  /* this check could be improved */
19978 #ifndef DB_VERSION_MAJOR
19979 #       define DB_VERSION_MAJOR 1
19980 #endif
19981 #ifndef DB_VERSION_MINOR
19982 #       define DB_VERSION_MINOR 0
19983 #endif
19984
19985 /* require 4.2 or later */
19986 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19987         __db_version_compat
19988 #endif
19989         
19990 EOF
19991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19992   egrep "__db_version_compat" >/dev/null 2>&1; then
19993   rm -rf conftest*
19994   ol_cv_bdb_compat=yes
19995 else
19996   rm -rf conftest*
19997   ol_cv_bdb_compat=no
19998 fi
19999 rm -f conftest*
20000
20001 fi
20002
20003 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20004
20005
20006                 if test $ol_cv_bdb_compat != yes ; then
20007                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20008                 fi
20009         fi
20010 fi
20011
20012 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20013         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20014         ol_with_ldbm_api=none
20015 fi
20016
20017 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20018         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20019 echo "configure:20020: checking for MDBM library" >&5
20020 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20021   echo $ac_n "(cached) $ac_c" 1>&6
20022 else
20023         ol_LIBS="$LIBS"
20024         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20025 echo "configure:20026: checking for mdbm_set_chain" >&5
20026 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20027   echo $ac_n "(cached) $ac_c" 1>&6
20028 else
20029   cat > conftest.$ac_ext <<EOF
20030 #line 20031 "configure"
20031 #include "confdefs.h"
20032 /* System header to define __stub macros and hopefully few prototypes,
20033     which can conflict with char mdbm_set_chain(); below.  */
20034 #include <assert.h>
20035 /* Override any gcc2 internal prototype to avoid an error.  */
20036 /* We use char because int might match the return type of a gcc2
20037     builtin and then its argument prototype would still apply.  */
20038 char mdbm_set_chain();
20039 char (*f)();
20040
20041 int main() {
20042
20043 /* The GNU C library defines this for functions which it implements
20044     to always fail with ENOSYS.  Some functions are actually named
20045     something starting with __ and the normal name is an alias.  */
20046 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20047 choke me
20048 #else
20049 f = mdbm_set_chain;
20050 #endif
20051
20052 ; return 0; }
20053 EOF
20054 if { (eval echo configure:20055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20055   rm -rf conftest*
20056   eval "ac_cv_func_mdbm_set_chain=yes"
20057 else
20058   echo "configure: failed program was:" >&5
20059   cat conftest.$ac_ext >&5
20060   rm -rf conftest*
20061   eval "ac_cv_func_mdbm_set_chain=no"
20062 fi
20063 rm -f conftest*
20064 fi
20065
20066 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20067   echo "$ac_t""yes" 1>&6
20068   ol_cv_lib_mdbm=yes
20069 else
20070   echo "$ac_t""no" 1>&6
20071
20072                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20073 echo "configure:20074: checking for mdbm_set_chain in -lmdbm" >&5
20074 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20076   echo $ac_n "(cached) $ac_c" 1>&6
20077 else
20078   ac_save_LIBS="$LIBS"
20079 LIBS="-lmdbm  $LIBS"
20080 cat > conftest.$ac_ext <<EOF
20081 #line 20082 "configure"
20082 #include "confdefs.h"
20083 /* Override any gcc2 internal prototype to avoid an error.  */
20084 /* We use char because int might match the return type of a gcc2
20085     builtin and then its argument prototype would still apply.  */
20086 char mdbm_set_chain();
20087
20088 int main() {
20089 mdbm_set_chain()
20090 ; return 0; }
20091 EOF
20092 if { (eval echo configure:20093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20093   rm -rf conftest*
20094   eval "ac_cv_lib_$ac_lib_var=yes"
20095 else
20096   echo "configure: failed program was:" >&5
20097   cat conftest.$ac_ext >&5
20098   rm -rf conftest*
20099   eval "ac_cv_lib_$ac_lib_var=no"
20100 fi
20101 rm -f conftest*
20102 LIBS="$ac_save_LIBS"
20103
20104 fi
20105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20106   echo "$ac_t""yes" 1>&6
20107   ol_cv_lib_mdbm=-lmdbm
20108 else
20109   echo "$ac_t""no" 1>&6
20110 ol_cv_lib_mdbm=no
20111 fi
20112
20113         
20114 fi
20115
20116         LIBS="$ol_LIBS"
20117
20118 fi
20119
20120 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20121
20122
20123  for ac_hdr in mdbm.h
20124 do
20125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20127 echo "configure:20128: checking for $ac_hdr" >&5
20128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20129   echo $ac_n "(cached) $ac_c" 1>&6
20130 else
20131   cat > conftest.$ac_ext <<EOF
20132 #line 20133 "configure"
20133 #include "confdefs.h"
20134 #include <$ac_hdr>
20135 EOF
20136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20137 { (eval echo configure:20138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20139 if test -z "$ac_err"; then
20140   rm -rf conftest*
20141   eval "ac_cv_header_$ac_safe=yes"
20142 else
20143   echo "$ac_err" >&5
20144   echo "configure: failed program was:" >&5
20145   cat conftest.$ac_ext >&5
20146   rm -rf conftest*
20147   eval "ac_cv_header_$ac_safe=no"
20148 fi
20149 rm -f conftest*
20150 fi
20151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20152   echo "$ac_t""yes" 1>&6
20153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20154   cat >> confdefs.h <<EOF
20155 #define $ac_tr_hdr 1
20156 EOF
20157  
20158 else
20159   echo "$ac_t""no" 1>&6
20160 fi
20161 done
20162
20163  echo $ac_n "checking for db""... $ac_c" 1>&6
20164 echo "configure:20165: checking for db" >&5
20165 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20166   echo $ac_n "(cached) $ac_c" 1>&6
20167 else
20168   
20169         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20170                 ol_cv_mdbm=no
20171         else
20172                 ol_cv_mdbm=yes
20173         fi
20174
20175 fi
20176
20177 echo "$ac_t""$ol_cv_mdbm" 1>&6
20178  if test $ol_cv_mdbm = yes ; then
20179         cat >> confdefs.h <<\EOF
20180 #define HAVE_MDBM 1
20181 EOF
20182
20183  fi
20184
20185
20186         if test $ol_cv_mdbm = yes ; then
20187                 ol_link_ldbm=mdbm
20188                 ol_with_ldbm_api=mdbm
20189                 if test $ol_cv_lib_mdbm != yes ; then
20190                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20191                 fi
20192         fi
20193 fi
20194
20195 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20196         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20197 echo "configure:20198: checking for GDBM library" >&5
20198 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20199   echo $ac_n "(cached) $ac_c" 1>&6
20200 else
20201         ol_LIBS="$LIBS"
20202         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20203 echo "configure:20204: checking for gdbm_open" >&5
20204 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20205   echo $ac_n "(cached) $ac_c" 1>&6
20206 else
20207   cat > conftest.$ac_ext <<EOF
20208 #line 20209 "configure"
20209 #include "confdefs.h"
20210 /* System header to define __stub macros and hopefully few prototypes,
20211     which can conflict with char gdbm_open(); below.  */
20212 #include <assert.h>
20213 /* Override any gcc2 internal prototype to avoid an error.  */
20214 /* We use char because int might match the return type of a gcc2
20215     builtin and then its argument prototype would still apply.  */
20216 char gdbm_open();
20217 char (*f)();
20218
20219 int main() {
20220
20221 /* The GNU C library defines this for functions which it implements
20222     to always fail with ENOSYS.  Some functions are actually named
20223     something starting with __ and the normal name is an alias.  */
20224 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20225 choke me
20226 #else
20227 f = gdbm_open;
20228 #endif
20229
20230 ; return 0; }
20231 EOF
20232 if { (eval echo configure:20233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20233   rm -rf conftest*
20234   eval "ac_cv_func_gdbm_open=yes"
20235 else
20236   echo "configure: failed program was:" >&5
20237   cat conftest.$ac_ext >&5
20238   rm -rf conftest*
20239   eval "ac_cv_func_gdbm_open=no"
20240 fi
20241 rm -f conftest*
20242 fi
20243
20244 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20245   echo "$ac_t""yes" 1>&6
20246   ol_cv_lib_gdbm=yes
20247 else
20248   echo "$ac_t""no" 1>&6
20249
20250                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20251 echo "configure:20252: checking for gdbm_open in -lgdbm" >&5
20252 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20254   echo $ac_n "(cached) $ac_c" 1>&6
20255 else
20256   ac_save_LIBS="$LIBS"
20257 LIBS="-lgdbm  $LIBS"
20258 cat > conftest.$ac_ext <<EOF
20259 #line 20260 "configure"
20260 #include "confdefs.h"
20261 /* Override any gcc2 internal prototype to avoid an error.  */
20262 /* We use char because int might match the return type of a gcc2
20263     builtin and then its argument prototype would still apply.  */
20264 char gdbm_open();
20265
20266 int main() {
20267 gdbm_open()
20268 ; return 0; }
20269 EOF
20270 if { (eval echo configure:20271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20271   rm -rf conftest*
20272   eval "ac_cv_lib_$ac_lib_var=yes"
20273 else
20274   echo "configure: failed program was:" >&5
20275   cat conftest.$ac_ext >&5
20276   rm -rf conftest*
20277   eval "ac_cv_lib_$ac_lib_var=no"
20278 fi
20279 rm -f conftest*
20280 LIBS="$ac_save_LIBS"
20281
20282 fi
20283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20284   echo "$ac_t""yes" 1>&6
20285   ol_cv_lib_gdbm=-lgdbm
20286 else
20287   echo "$ac_t""no" 1>&6
20288 ol_cv_lib_gdbm=no
20289 fi
20290
20291         
20292 fi
20293
20294         LIBS="$ol_LIBS"
20295
20296 fi
20297
20298 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20299
20300
20301  for ac_hdr in gdbm.h
20302 do
20303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20305 echo "configure:20306: checking for $ac_hdr" >&5
20306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20307   echo $ac_n "(cached) $ac_c" 1>&6
20308 else
20309   cat > conftest.$ac_ext <<EOF
20310 #line 20311 "configure"
20311 #include "confdefs.h"
20312 #include <$ac_hdr>
20313 EOF
20314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20315 { (eval echo configure:20316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20317 if test -z "$ac_err"; then
20318   rm -rf conftest*
20319   eval "ac_cv_header_$ac_safe=yes"
20320 else
20321   echo "$ac_err" >&5
20322   echo "configure: failed program was:" >&5
20323   cat conftest.$ac_ext >&5
20324   rm -rf conftest*
20325   eval "ac_cv_header_$ac_safe=no"
20326 fi
20327 rm -f conftest*
20328 fi
20329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20330   echo "$ac_t""yes" 1>&6
20331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20332   cat >> confdefs.h <<EOF
20333 #define $ac_tr_hdr 1
20334 EOF
20335  
20336 else
20337   echo "$ac_t""no" 1>&6
20338 fi
20339 done
20340
20341  echo $ac_n "checking for db""... $ac_c" 1>&6
20342 echo "configure:20343: checking for db" >&5
20343 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20344   echo $ac_n "(cached) $ac_c" 1>&6
20345 else
20346   
20347         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20348                 ol_cv_gdbm=no
20349         else
20350                 ol_cv_gdbm=yes
20351         fi
20352
20353 fi
20354
20355 echo "$ac_t""$ol_cv_gdbm" 1>&6
20356  if test $ol_cv_gdbm = yes ; then
20357         cat >> confdefs.h <<\EOF
20358 #define HAVE_GDBM 1
20359 EOF
20360
20361  fi
20362
20363
20364         if test $ol_cv_gdbm = yes ; then
20365                 ol_link_ldbm=gdbm
20366                 ol_with_ldbm_api=gdbm
20367
20368                 if test $ol_cv_lib_gdbm != yes ; then
20369                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20370                 fi
20371         fi
20372 fi
20373
20374 if test $ol_with_ldbm_api = ndbm ; then
20375         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20376 echo "configure:20377: checking for NDBM library" >&5
20377 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20378   echo $ac_n "(cached) $ac_c" 1>&6
20379 else
20380         ol_LIBS="$LIBS"
20381         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20382 echo "configure:20383: checking for dbm_open" >&5
20383 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20384   echo $ac_n "(cached) $ac_c" 1>&6
20385 else
20386   cat > conftest.$ac_ext <<EOF
20387 #line 20388 "configure"
20388 #include "confdefs.h"
20389 /* System header to define __stub macros and hopefully few prototypes,
20390     which can conflict with char dbm_open(); below.  */
20391 #include <assert.h>
20392 /* Override any gcc2 internal prototype to avoid an error.  */
20393 /* We use char because int might match the return type of a gcc2
20394     builtin and then its argument prototype would still apply.  */
20395 char dbm_open();
20396 char (*f)();
20397
20398 int main() {
20399
20400 /* The GNU C library defines this for functions which it implements
20401     to always fail with ENOSYS.  Some functions are actually named
20402     something starting with __ and the normal name is an alias.  */
20403 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20404 choke me
20405 #else
20406 f = dbm_open;
20407 #endif
20408
20409 ; return 0; }
20410 EOF
20411 if { (eval echo configure:20412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20412   rm -rf conftest*
20413   eval "ac_cv_func_dbm_open=yes"
20414 else
20415   echo "configure: failed program was:" >&5
20416   cat conftest.$ac_ext >&5
20417   rm -rf conftest*
20418   eval "ac_cv_func_dbm_open=no"
20419 fi
20420 rm -f conftest*
20421 fi
20422
20423 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20424   echo "$ac_t""yes" 1>&6
20425   ol_cv_lib_ndbm=yes
20426 else
20427   echo "$ac_t""no" 1>&6
20428
20429                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20430 echo "configure:20431: checking for dbm_open in -lndbm" >&5
20431 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20433   echo $ac_n "(cached) $ac_c" 1>&6
20434 else
20435   ac_save_LIBS="$LIBS"
20436 LIBS="-lndbm  $LIBS"
20437 cat > conftest.$ac_ext <<EOF
20438 #line 20439 "configure"
20439 #include "confdefs.h"
20440 /* Override any gcc2 internal prototype to avoid an error.  */
20441 /* We use char because int might match the return type of a gcc2
20442     builtin and then its argument prototype would still apply.  */
20443 char dbm_open();
20444
20445 int main() {
20446 dbm_open()
20447 ; return 0; }
20448 EOF
20449 if { (eval echo configure:20450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20450   rm -rf conftest*
20451   eval "ac_cv_lib_$ac_lib_var=yes"
20452 else
20453   echo "configure: failed program was:" >&5
20454   cat conftest.$ac_ext >&5
20455   rm -rf conftest*
20456   eval "ac_cv_lib_$ac_lib_var=no"
20457 fi
20458 rm -f conftest*
20459 LIBS="$ac_save_LIBS"
20460
20461 fi
20462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20463   echo "$ac_t""yes" 1>&6
20464   ol_cv_lib_ndbm=-lndbm
20465 else
20466   echo "$ac_t""no" 1>&6
20467
20468                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20469 echo "configure:20470: checking for dbm_open in -ldbm" >&5
20470 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20472   echo $ac_n "(cached) $ac_c" 1>&6
20473 else
20474   ac_save_LIBS="$LIBS"
20475 LIBS="-ldbm  $LIBS"
20476 cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479 /* Override any gcc2 internal prototype to avoid an error.  */
20480 /* We use char because int might match the return type of a gcc2
20481     builtin and then its argument prototype would still apply.  */
20482 char dbm_open();
20483
20484 int main() {
20485 dbm_open()
20486 ; return 0; }
20487 EOF
20488 if { (eval echo configure:20489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20489   rm -rf conftest*
20490   eval "ac_cv_lib_$ac_lib_var=yes"
20491 else
20492   echo "configure: failed program was:" >&5
20493   cat conftest.$ac_ext >&5
20494   rm -rf conftest*
20495   eval "ac_cv_lib_$ac_lib_var=no"
20496 fi
20497 rm -f conftest*
20498 LIBS="$ac_save_LIBS"
20499
20500 fi
20501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20502   echo "$ac_t""yes" 1>&6
20503   ol_cv_lib_ndbm=-ldbm
20504 else
20505   echo "$ac_t""no" 1>&6
20506 ol_cv_lib_ndbm=no
20507 fi
20508                 
20509 fi
20510
20511         
20512 fi
20513
20514         LIBS="$ol_LIBS"
20515
20516 fi
20517
20518 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20519
20520
20521  for ac_hdr in ndbm.h
20522 do
20523 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20524 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20525 echo "configure:20526: checking for $ac_hdr" >&5
20526 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20527   echo $ac_n "(cached) $ac_c" 1>&6
20528 else
20529   cat > conftest.$ac_ext <<EOF
20530 #line 20531 "configure"
20531 #include "confdefs.h"
20532 #include <$ac_hdr>
20533 EOF
20534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20535 { (eval echo configure:20536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20537 if test -z "$ac_err"; then
20538   rm -rf conftest*
20539   eval "ac_cv_header_$ac_safe=yes"
20540 else
20541   echo "$ac_err" >&5
20542   echo "configure: failed program was:" >&5
20543   cat conftest.$ac_ext >&5
20544   rm -rf conftest*
20545   eval "ac_cv_header_$ac_safe=no"
20546 fi
20547 rm -f conftest*
20548 fi
20549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20550   echo "$ac_t""yes" 1>&6
20551     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20552   cat >> confdefs.h <<EOF
20553 #define $ac_tr_hdr 1
20554 EOF
20555  
20556 else
20557   echo "$ac_t""no" 1>&6
20558 fi
20559 done
20560
20561  echo $ac_n "checking for db""... $ac_c" 1>&6
20562 echo "configure:20563: checking for db" >&5
20563 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20564   echo $ac_n "(cached) $ac_c" 1>&6
20565 else
20566   
20567         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20568                 ol_cv_ndbm=no
20569         else
20570                 ol_cv_ndbm=yes
20571         fi
20572
20573 fi
20574
20575 echo "$ac_t""$ol_cv_ndbm" 1>&6
20576  if test $ol_cv_ndbm = yes ; then
20577         cat >> confdefs.h <<\EOF
20578 #define HAVE_NDBM 1
20579 EOF
20580
20581  fi
20582
20583
20584         if test $ol_cv_ndbm = yes ; then
20585                 ol_link_ldbm=ndbm
20586                 ol_with_ldbm_api=ndbm
20587
20588                 if test $ol_cv_lib_ndbm != yes ; then
20589                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20590                 fi
20591         fi
20592 fi
20593
20594 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20595         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20596 fi
20597
20598 if test $ol_enable_bdb = yes -o \
20599         $ol_enable_hdb = yes -o \
20600         $ol_enable_ldbm = yes ; then
20601         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20602 fi
20603
20604
20605 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20606         BUILD_LIBS_DYNAMIC=shared
20607         cat >> confdefs.h <<\EOF
20608 #define LDAP_LIBS_DYNAMIC 1
20609 EOF
20610
20611         LTSTATIC=""
20612 else
20613         BUILD_LIBS_DYNAMIC=static
20614         LTSTATIC="-static"
20615 fi
20616
20617 if test $ol_enable_wrappers != no ; then
20618         for ac_hdr in tcpd.h
20619 do
20620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20622 echo "configure:20623: checking for $ac_hdr" >&5
20623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20624   echo $ac_n "(cached) $ac_c" 1>&6
20625 else
20626   cat > conftest.$ac_ext <<EOF
20627 #line 20628 "configure"
20628 #include "confdefs.h"
20629 #include <$ac_hdr>
20630 EOF
20631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20632 { (eval echo configure:20633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20634 if test -z "$ac_err"; then
20635   rm -rf conftest*
20636   eval "ac_cv_header_$ac_safe=yes"
20637 else
20638   echo "$ac_err" >&5
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   eval "ac_cv_header_$ac_safe=no"
20643 fi
20644 rm -f conftest*
20645 fi
20646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20647   echo "$ac_t""yes" 1>&6
20648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20649   cat >> confdefs.h <<EOF
20650 #define $ac_tr_hdr 1
20651 EOF
20652  
20653                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20654 echo "configure:20655: checking for TCP wrappers library" >&5
20655                 save_LIBS="$LIBS"
20656                 LIBS="$LIBS -lwrap"
20657                 cat > conftest.$ac_ext <<EOF
20658 #line 20659 "configure"
20659 #include "confdefs.h"
20660
20661 #include <tcpd.h>
20662 int allow_severity = 0;
20663 int deny_severity  = 0;
20664
20665 struct request_info *req;
20666                 
20667 int main() {
20668
20669 hosts_access(req)
20670                 
20671 ; return 0; }
20672 EOF
20673 if { (eval echo configure:20674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20674   rm -rf conftest*
20675   echo "$ac_t""-lwrap" 1>&6
20676                 have_wrappers=yes
20677                 LIBS="$save_LIBS"
20678 else
20679   echo "configure: failed program was:" >&5
20680   cat conftest.$ac_ext >&5
20681   rm -rf conftest*
20682   
20683                                 LIBS="$LIBS -lnsl"
20684                 cat > conftest.$ac_ext <<EOF
20685 #line 20686 "configure"
20686 #include "confdefs.h"
20687
20688 #include <tcpd.h>
20689 int allow_severity = 0;
20690 int deny_severity  = 0;
20691
20692 struct request_info *req;
20693                 
20694 int main() {
20695
20696 hosts_access(req)
20697                 
20698 ; return 0; }
20699 EOF
20700 if { (eval echo configure:20701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20701   rm -rf conftest*
20702   echo "$ac_t""-lwrap -lnsl" 1>&6
20703                 have_wrappers=yes
20704                 LIBS="$save_LIBS -lnsl"
20705 else
20706   echo "configure: failed program was:" >&5
20707   cat conftest.$ac_ext >&5
20708   rm -rf conftest*
20709   
20710                 echo "$ac_t""no" 1>&6
20711                 have_wrappers=no
20712                 LIBS=$save_LIBS
20713 fi
20714 rm -f conftest*
20715 fi
20716 rm -f conftest*
20717 else
20718   echo "$ac_t""no" 1>&6
20719 have_wrappers=no
20720 fi
20721 done
20722
20723
20724         if test $have_wrappers = yes ; then
20725                 cat >> confdefs.h <<\EOF
20726 #define HAVE_TCPD 1
20727 EOF
20728
20729                 WRAP_LIBS="-lwrap"
20730         elif test $ol_enable_wrappers = yes ; then
20731                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20732         else
20733                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20734                 WRAP_LIBS=""
20735         fi
20736 fi
20737
20738 if test $ol_enable_syslog != no ; then
20739         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20740 echo "configure:20741: checking for openlog" >&5
20741 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20742   echo $ac_n "(cached) $ac_c" 1>&6
20743 else
20744   cat > conftest.$ac_ext <<EOF
20745 #line 20746 "configure"
20746 #include "confdefs.h"
20747 /* System header to define __stub macros and hopefully few prototypes,
20748     which can conflict with char openlog(); below.  */
20749 #include <assert.h>
20750 /* Override any gcc2 internal prototype to avoid an error.  */
20751 /* We use char because int might match the return type of a gcc2
20752     builtin and then its argument prototype would still apply.  */
20753 char openlog();
20754 char (*f)();
20755
20756 int main() {
20757
20758 /* The GNU C library defines this for functions which it implements
20759     to always fail with ENOSYS.  Some functions are actually named
20760     something starting with __ and the normal name is an alias.  */
20761 #if defined (__stub_openlog) || defined (__stub___openlog)
20762 choke me
20763 #else
20764 f = openlog;
20765 #endif
20766
20767 ; return 0; }
20768 EOF
20769 if { (eval echo configure:20770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20770   rm -rf conftest*
20771   eval "ac_cv_func_openlog=yes"
20772 else
20773   echo "configure: failed program was:" >&5
20774   cat conftest.$ac_ext >&5
20775   rm -rf conftest*
20776   eval "ac_cv_func_openlog=no"
20777 fi
20778 rm -f conftest*
20779 fi
20780
20781 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20782   echo "$ac_t""yes" 1>&6
20783   :
20784 else
20785   echo "$ac_t""no" 1>&6
20786 fi
20787
20788         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20789                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20790         fi
20791         ol_enable_syslog=$ac_cv_func_openlog
20792 fi
20793
20794
20795 ol_link_sql=no
20796 if test $ol_enable_sql != no ; then
20797         for ac_hdr in sql.h sqlext.h
20798 do
20799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20801 echo "configure:20802: checking for $ac_hdr" >&5
20802 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20803   echo $ac_n "(cached) $ac_c" 1>&6
20804 else
20805   cat > conftest.$ac_ext <<EOF
20806 #line 20807 "configure"
20807 #include "confdefs.h"
20808 #include <$ac_hdr>
20809 EOF
20810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20811 { (eval echo configure:20812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20813 if test -z "$ac_err"; then
20814   rm -rf conftest*
20815   eval "ac_cv_header_$ac_safe=yes"
20816 else
20817   echo "$ac_err" >&5
20818   echo "configure: failed program was:" >&5
20819   cat conftest.$ac_ext >&5
20820   rm -rf conftest*
20821   eval "ac_cv_header_$ac_safe=no"
20822 fi
20823 rm -f conftest*
20824 fi
20825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20826   echo "$ac_t""yes" 1>&6
20827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20828   cat >> confdefs.h <<EOF
20829 #define $ac_tr_hdr 1
20830 EOF
20831  
20832 else
20833   echo "$ac_t""no" 1>&6
20834 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20835         
20836 fi
20837 done
20838
20839
20840         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20841 echo "configure:20842: checking for SQLDriverConnect in -liodbc" >&5
20842 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20843 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20844   echo $ac_n "(cached) $ac_c" 1>&6
20845 else
20846   ac_save_LIBS="$LIBS"
20847 LIBS="-liodbc  $LIBS"
20848 cat > conftest.$ac_ext <<EOF
20849 #line 20850 "configure"
20850 #include "confdefs.h"
20851 /* Override any gcc2 internal prototype to avoid an error.  */
20852 /* We use char because int might match the return type of a gcc2
20853     builtin and then its argument prototype would still apply.  */
20854 char SQLDriverConnect();
20855
20856 int main() {
20857 SQLDriverConnect()
20858 ; return 0; }
20859 EOF
20860 if { (eval echo configure:20861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20861   rm -rf conftest*
20862   eval "ac_cv_lib_$ac_lib_var=yes"
20863 else
20864   echo "configure: failed program was:" >&5
20865   cat conftest.$ac_ext >&5
20866   rm -rf conftest*
20867   eval "ac_cv_lib_$ac_lib_var=no"
20868 fi
20869 rm -f conftest*
20870 LIBS="$ac_save_LIBS"
20871
20872 fi
20873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20874   echo "$ac_t""yes" 1>&6
20875   have_iodbc=yes
20876 else
20877   echo "$ac_t""no" 1>&6
20878 have_iodbc=no
20879 fi
20880
20881         if test $have_iodbc = yes ; then
20882                 ol_link_sql="-liodbc"
20883         else
20884                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20885 echo "configure:20886: checking for SQLDriverConnect in -lodbc" >&5
20886 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20888   echo $ac_n "(cached) $ac_c" 1>&6
20889 else
20890   ac_save_LIBS="$LIBS"
20891 LIBS="-lodbc  $LIBS"
20892 cat > conftest.$ac_ext <<EOF
20893 #line 20894 "configure"
20894 #include "confdefs.h"
20895 /* Override any gcc2 internal prototype to avoid an error.  */
20896 /* We use char because int might match the return type of a gcc2
20897     builtin and then its argument prototype would still apply.  */
20898 char SQLDriverConnect();
20899
20900 int main() {
20901 SQLDriverConnect()
20902 ; return 0; }
20903 EOF
20904 if { (eval echo configure:20905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20905   rm -rf conftest*
20906   eval "ac_cv_lib_$ac_lib_var=yes"
20907 else
20908   echo "configure: failed program was:" >&5
20909   cat conftest.$ac_ext >&5
20910   rm -rf conftest*
20911   eval "ac_cv_lib_$ac_lib_var=no"
20912 fi
20913 rm -f conftest*
20914 LIBS="$ac_save_LIBS"
20915
20916 fi
20917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20918   echo "$ac_t""yes" 1>&6
20919   have_odbc=yes
20920 else
20921   echo "$ac_t""no" 1>&6
20922 have_odbc=no
20923 fi
20924
20925                 if test $have_odbc = yes ; then
20926                         ol_link_sql="-lodbc"
20927                 fi
20928         fi
20929
20930         if test $ol_link_sql != no ; then
20931                 SLAPD_SQL_LIBS="$ol_link_sql"
20932
20933         elif test $ol_enable_sql != auto ; then
20934                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20935         fi
20936 fi
20937
20938 WITH_SASL=no
20939 ol_link_sasl=no
20940 ol_link_spasswd=no
20941 if test $ol_with_cyrus_sasl != no ; then
20942         for ac_hdr in sasl/sasl.h sasl.h
20943 do
20944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20946 echo "configure:20947: checking for $ac_hdr" >&5
20947 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20948   echo $ac_n "(cached) $ac_c" 1>&6
20949 else
20950   cat > conftest.$ac_ext <<EOF
20951 #line 20952 "configure"
20952 #include "confdefs.h"
20953 #include <$ac_hdr>
20954 EOF
20955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20956 { (eval echo configure:20957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20958 if test -z "$ac_err"; then
20959   rm -rf conftest*
20960   eval "ac_cv_header_$ac_safe=yes"
20961 else
20962   echo "$ac_err" >&5
20963   echo "configure: failed program was:" >&5
20964   cat conftest.$ac_ext >&5
20965   rm -rf conftest*
20966   eval "ac_cv_header_$ac_safe=no"
20967 fi
20968 rm -f conftest*
20969 fi
20970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20971   echo "$ac_t""yes" 1>&6
20972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20973   cat >> confdefs.h <<EOF
20974 #define $ac_tr_hdr 1
20975 EOF
20976  
20977 else
20978   echo "$ac_t""no" 1>&6
20979 fi
20980 done
20981
20982
20983         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20984                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20985 echo "configure:20986: checking for sasl_client_init in -lsasl2" >&5
20986 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20987 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20988   echo $ac_n "(cached) $ac_c" 1>&6
20989 else
20990   ac_save_LIBS="$LIBS"
20991 LIBS="-lsasl2  $LIBS"
20992 cat > conftest.$ac_ext <<EOF
20993 #line 20994 "configure"
20994 #include "confdefs.h"
20995 /* Override any gcc2 internal prototype to avoid an error.  */
20996 /* We use char because int might match the return type of a gcc2
20997     builtin and then its argument prototype would still apply.  */
20998 char sasl_client_init();
20999
21000 int main() {
21001 sasl_client_init()
21002 ; return 0; }
21003 EOF
21004 if { (eval echo configure:21005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21005   rm -rf conftest*
21006   eval "ac_cv_lib_$ac_lib_var=yes"
21007 else
21008   echo "configure: failed program was:" >&5
21009   cat conftest.$ac_ext >&5
21010   rm -rf conftest*
21011   eval "ac_cv_lib_$ac_lib_var=no"
21012 fi
21013 rm -f conftest*
21014 LIBS="$ac_save_LIBS"
21015
21016 fi
21017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21018   echo "$ac_t""yes" 1>&6
21019   ol_link_sasl="-lsasl2"
21020 else
21021   echo "$ac_t""no" 1>&6
21022 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21023 echo "configure:21024: checking for sasl_client_init in -lsasl" >&5
21024 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21026   echo $ac_n "(cached) $ac_c" 1>&6
21027 else
21028   ac_save_LIBS="$LIBS"
21029 LIBS="-lsasl  $LIBS"
21030 cat > conftest.$ac_ext <<EOF
21031 #line 21032 "configure"
21032 #include "confdefs.h"
21033 /* Override any gcc2 internal prototype to avoid an error.  */
21034 /* We use char because int might match the return type of a gcc2
21035     builtin and then its argument prototype would still apply.  */
21036 char sasl_client_init();
21037
21038 int main() {
21039 sasl_client_init()
21040 ; return 0; }
21041 EOF
21042 if { (eval echo configure:21043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21043   rm -rf conftest*
21044   eval "ac_cv_lib_$ac_lib_var=yes"
21045 else
21046   echo "configure: failed program was:" >&5
21047   cat conftest.$ac_ext >&5
21048   rm -rf conftest*
21049   eval "ac_cv_lib_$ac_lib_var=no"
21050 fi
21051 rm -f conftest*
21052 LIBS="$ac_save_LIBS"
21053
21054 fi
21055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21056   echo "$ac_t""yes" 1>&6
21057   ol_link_sasl="-lsasl"
21058 else
21059   echo "$ac_t""no" 1>&6
21060 fi
21061
21062 fi
21063
21064         fi
21065
21066         if test $ol_link_sasl = no ; then
21067                 if test $ol_with_cyrus_sasl != auto ; then
21068                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21069                 else
21070                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21071                         echo "configure: warning: SASL authentication not supported!" 1>&2
21072                         if test $ol_link_tls = no ; then
21073                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21074                         fi
21075                 fi
21076         else
21077                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21078 echo "configure:21079: checking Cyrus SASL library version" >&5
21079 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21080   echo $ac_n "(cached) $ac_c" 1>&6
21081 else
21082   
21083         cat > conftest.$ac_ext <<EOF
21084 #line 21085 "configure"
21085 #include "confdefs.h"
21086
21087 #ifdef HAVE_SASL_SASL_H
21088 #include <sasl/sasl.h>
21089 #else
21090 #include <sasl.h>
21091 #endif
21092
21093 /* Require 2.1.15+ */
21094 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21095         char *__sasl_compat = "2.2+ or better okay (we guess)";
21096 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21097         && SASL_VERSION_STEP >=15
21098         char *__sasl_compat = "2.1.15+ or better okay";
21099 #endif
21100         
21101 EOF
21102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21103   egrep "__sasl_compat" >/dev/null 2>&1; then
21104   rm -rf conftest*
21105   ol_cv_sasl_compat=yes
21106 else
21107   rm -rf conftest*
21108   ol_cv_sasl_compat=no
21109 fi
21110 rm -f conftest*
21111
21112 fi
21113
21114 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21115
21116                 if test $ol_cv_sasl_compat = no ; then
21117                         ol_link_sasl=no
21118                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21119                 fi
21120
21121                 cat >> confdefs.h <<\EOF
21122 #define HAVE_CYRUS_SASL 1
21123 EOF
21124
21125                 SASL_LIBS="$ol_link_sasl"
21126                 if test $ol_enable_spasswd != no ; then
21127                         ol_link_spasswd=yes
21128                 fi
21129
21130                 ac_save_LIBS="$LIBS"
21131                 LIBS="$LIBS $ol_link_sasl"
21132                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21133 echo "configure:21134: checking for sasl_version" >&5
21134 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21135   echo $ac_n "(cached) $ac_c" 1>&6
21136 else
21137   cat > conftest.$ac_ext <<EOF
21138 #line 21139 "configure"
21139 #include "confdefs.h"
21140 /* System header to define __stub macros and hopefully few prototypes,
21141     which can conflict with char sasl_version(); below.  */
21142 #include <assert.h>
21143 /* Override any gcc2 internal prototype to avoid an error.  */
21144 /* We use char because int might match the return type of a gcc2
21145     builtin and then its argument prototype would still apply.  */
21146 char sasl_version();
21147 char (*f)();
21148
21149 int main() {
21150
21151 /* The GNU C library defines this for functions which it implements
21152     to always fail with ENOSYS.  Some functions are actually named
21153     something starting with __ and the normal name is an alias.  */
21154 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21155 choke me
21156 #else
21157 f = sasl_version;
21158 #endif
21159
21160 ; return 0; }
21161 EOF
21162 if { (eval echo configure:21163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21163   rm -rf conftest*
21164   eval "ac_cv_func_sasl_version=yes"
21165 else
21166   echo "configure: failed program was:" >&5
21167   cat conftest.$ac_ext >&5
21168   rm -rf conftest*
21169   eval "ac_cv_func_sasl_version=no"
21170 fi
21171 rm -f conftest*
21172 fi
21173
21174 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21175   echo "$ac_t""yes" 1>&6
21176   cat >> confdefs.h <<\EOF
21177 #define HAVE_SASL_VERSION 1
21178 EOF
21179
21180 else
21181   echo "$ac_t""no" 1>&6
21182 fi
21183
21184                 LIBS="$ac_save_LIBS"
21185
21186                 WITH_SASL=yes
21187         fi
21188
21189 else
21190         echo "configure: warning: SASL authentication not supported!" 1>&2
21191         if test $ol_link_tls = no ; then
21192                 echo "configure: warning: Strong authentication not supported!" 1>&2
21193         fi
21194 fi
21195
21196 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21197         dev=no
21198         if test -r /dev/urandom ; then
21199                 dev="/dev/urandom";
21200         elif test -r /idev/urandom ; then
21201                 dev="/idev/urandom";
21202         elif test -r /dev/srandom ; then
21203                 dev="/dev/srandom";
21204         elif test -r /dev/random ; then
21205                 dev="/dev/random";
21206         elif test -r /idev/random ; then
21207                 dev="/idev/random";
21208         fi
21209
21210         if test $dev != no ; then
21211                 cat >> confdefs.h <<EOF
21212 #define URANDOM_DEVICE "$dev"
21213 EOF
21214
21215         fi
21216 fi
21217
21218 ol_link_fetch=no
21219 if test $ol_with_fetch != no ; then
21220         ol_LIBS=$LIBS
21221 LIBS="-lfetch -lcom_err $LIBS"
21222 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21223 echo "configure:21224: checking fetch(3) library" >&5
21224 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21225   echo $ac_n "(cached) $ac_c" 1>&6
21226 else
21227   
21228         cat > conftest.$ac_ext <<EOF
21229 #line 21230 "configure"
21230 #include "confdefs.h"
21231
21232 #include <sys/param.h>
21233 #include <stdio.h>
21234 #include <fetch.h>
21235 int main() {
21236 struct url *u = fetchParseURL("file:///"); 
21237 ; return 0; }
21238 EOF
21239 if { (eval echo configure:21240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21240   rm -rf conftest*
21241   ol_cv_lib_fetch=yes
21242 else
21243   echo "configure: failed program was:" >&5
21244   cat conftest.$ac_ext >&5
21245   rm -rf conftest*
21246   ol_cv_lib_fetch=no
21247 fi
21248 rm -f conftest*
21249 fi
21250
21251 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21252 LIBS=$ol_LIBS
21253 if test $ol_cv_lib_fetch != no ; then
21254         ol_link_fetch="-lfetch -lcom_err"
21255         cat >> confdefs.h <<\EOF
21256 #define HAVE_FETCH 1
21257 EOF
21258
21259 fi
21260
21261
21262         if test $ol_cv_lib_fetch != no ; then
21263                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21264                 ol_link_fetch=freebsd
21265
21266         elif test $ol_with_fetch != auto ; then
21267                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21268         fi 
21269 fi
21270
21271 if test $ol_enable_crypt != no ; then
21272         save_LIBS="$LIBS"
21273         LIBS="$TLS_LIBS $LIBS"
21274
21275         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21276 echo "configure:21277: checking for crypt" >&5
21277 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21278   echo $ac_n "(cached) $ac_c" 1>&6
21279 else
21280   cat > conftest.$ac_ext <<EOF
21281 #line 21282 "configure"
21282 #include "confdefs.h"
21283 /* System header to define __stub macros and hopefully few prototypes,
21284     which can conflict with char crypt(); below.  */
21285 #include <assert.h>
21286 /* Override any gcc2 internal prototype to avoid an error.  */
21287 /* We use char because int might match the return type of a gcc2
21288     builtin and then its argument prototype would still apply.  */
21289 char crypt();
21290 char (*f)();
21291
21292 int main() {
21293
21294 /* The GNU C library defines this for functions which it implements
21295     to always fail with ENOSYS.  Some functions are actually named
21296     something starting with __ and the normal name is an alias.  */
21297 #if defined (__stub_crypt) || defined (__stub___crypt)
21298 choke me
21299 #else
21300 f = crypt;
21301 #endif
21302
21303 ; return 0; }
21304 EOF
21305 if { (eval echo configure:21306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21306   rm -rf conftest*
21307   eval "ac_cv_func_crypt=yes"
21308 else
21309   echo "configure: failed program was:" >&5
21310   cat conftest.$ac_ext >&5
21311   rm -rf conftest*
21312   eval "ac_cv_func_crypt=no"
21313 fi
21314 rm -f conftest*
21315 fi
21316
21317 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21318   echo "$ac_t""yes" 1>&6
21319   have_crypt=yes
21320 else
21321   echo "$ac_t""no" 1>&6
21322
21323                 LIBS="$save_LIBS"
21324                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21325 echo "configure:21326: checking for crypt in -lcrypt" >&5
21326 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21328   echo $ac_n "(cached) $ac_c" 1>&6
21329 else
21330   ac_save_LIBS="$LIBS"
21331 LIBS="-lcrypt  $LIBS"
21332 cat > conftest.$ac_ext <<EOF
21333 #line 21334 "configure"
21334 #include "confdefs.h"
21335 /* Override any gcc2 internal prototype to avoid an error.  */
21336 /* We use char because int might match the return type of a gcc2
21337     builtin and then its argument prototype would still apply.  */
21338 char crypt();
21339
21340 int main() {
21341 crypt()
21342 ; return 0; }
21343 EOF
21344 if { (eval echo configure:21345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21345   rm -rf conftest*
21346   eval "ac_cv_lib_$ac_lib_var=yes"
21347 else
21348   echo "configure: failed program was:" >&5
21349   cat conftest.$ac_ext >&5
21350   rm -rf conftest*
21351   eval "ac_cv_lib_$ac_lib_var=no"
21352 fi
21353 rm -f conftest*
21354 LIBS="$ac_save_LIBS"
21355
21356 fi
21357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21358   echo "$ac_t""yes" 1>&6
21359   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21360                         have_crypt=yes
21361 else
21362   echo "$ac_t""no" 1>&6
21363 have_crypt=no
21364 fi
21365
21366 fi
21367
21368
21369         LIBS="$save_LIBS"
21370
21371         if test $have_crypt = yes ; then
21372                 cat >> confdefs.h <<\EOF
21373 #define HAVE_CRYPT 1
21374 EOF
21375
21376         else
21377                 echo "configure: warning: could not find crypt" 1>&2
21378                 if test $ol_enable_crypt = yes ; then
21379                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21380                 fi
21381
21382                 echo "configure: warning: disabling crypt support" 1>&2
21383                 ol_enable_crypt=no
21384         fi
21385 fi
21386
21387 if test $ol_enable_proctitle != no ; then
21388         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21389 echo "configure:21390: checking for setproctitle" >&5
21390 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21391   echo $ac_n "(cached) $ac_c" 1>&6
21392 else
21393   cat > conftest.$ac_ext <<EOF
21394 #line 21395 "configure"
21395 #include "confdefs.h"
21396 /* System header to define __stub macros and hopefully few prototypes,
21397     which can conflict with char setproctitle(); below.  */
21398 #include <assert.h>
21399 /* Override any gcc2 internal prototype to avoid an error.  */
21400 /* We use char because int might match the return type of a gcc2
21401     builtin and then its argument prototype would still apply.  */
21402 char setproctitle();
21403 char (*f)();
21404
21405 int main() {
21406
21407 /* The GNU C library defines this for functions which it implements
21408     to always fail with ENOSYS.  Some functions are actually named
21409     something starting with __ and the normal name is an alias.  */
21410 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21411 choke me
21412 #else
21413 f = setproctitle;
21414 #endif
21415
21416 ; return 0; }
21417 EOF
21418 if { (eval echo configure:21419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21419   rm -rf conftest*
21420   eval "ac_cv_func_setproctitle=yes"
21421 else
21422   echo "configure: failed program was:" >&5
21423   cat conftest.$ac_ext >&5
21424   rm -rf conftest*
21425   eval "ac_cv_func_setproctitle=no"
21426 fi
21427 rm -f conftest*
21428 fi
21429
21430 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21431   echo "$ac_t""yes" 1>&6
21432   have_setproctitle=yes
21433 else
21434   echo "$ac_t""no" 1>&6
21435
21436                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21437 echo "configure:21438: checking for setproctitle in -lutil" >&5
21438 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21439 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21440   echo $ac_n "(cached) $ac_c" 1>&6
21441 else
21442   ac_save_LIBS="$LIBS"
21443 LIBS="-lutil  $LIBS"
21444 cat > conftest.$ac_ext <<EOF
21445 #line 21446 "configure"
21446 #include "confdefs.h"
21447 /* Override any gcc2 internal prototype to avoid an error.  */
21448 /* We use char because int might match the return type of a gcc2
21449     builtin and then its argument prototype would still apply.  */
21450 char setproctitle();
21451
21452 int main() {
21453 setproctitle()
21454 ; return 0; }
21455 EOF
21456 if { (eval echo configure:21457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21457   rm -rf conftest*
21458   eval "ac_cv_lib_$ac_lib_var=yes"
21459 else
21460   echo "configure: failed program was:" >&5
21461   cat conftest.$ac_ext >&5
21462   rm -rf conftest*
21463   eval "ac_cv_lib_$ac_lib_var=no"
21464 fi
21465 rm -f conftest*
21466 LIBS="$ac_save_LIBS"
21467
21468 fi
21469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21470   echo "$ac_t""yes" 1>&6
21471   have_setproctitle=yes
21472                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21473 else
21474   echo "$ac_t""no" 1>&6
21475 have_setproctitle=no
21476                         LIBOBJS="$LIBOBJS setproctitle.o"
21477                         LIBSRCS="$LIBSRCS setproctitle.c"
21478 fi
21479
21480 fi
21481
21482
21483         if test $have_setproctitle = yes ; then
21484                 cat >> confdefs.h <<\EOF
21485 #define HAVE_SETPROCTITLE 1
21486 EOF
21487
21488         fi
21489 fi
21490
21491 if test $ol_enable_slp != no ; then
21492         for ac_hdr in slp.h 
21493 do
21494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21496 echo "configure:21497: checking for $ac_hdr" >&5
21497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21498   echo $ac_n "(cached) $ac_c" 1>&6
21499 else
21500   cat > conftest.$ac_ext <<EOF
21501 #line 21502 "configure"
21502 #include "confdefs.h"
21503 #include <$ac_hdr>
21504 EOF
21505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21506 { (eval echo configure:21507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21508 if test -z "$ac_err"; then
21509   rm -rf conftest*
21510   eval "ac_cv_header_$ac_safe=yes"
21511 else
21512   echo "$ac_err" >&5
21513   echo "configure: failed program was:" >&5
21514   cat conftest.$ac_ext >&5
21515   rm -rf conftest*
21516   eval "ac_cv_header_$ac_safe=no"
21517 fi
21518 rm -f conftest*
21519 fi
21520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21521   echo "$ac_t""yes" 1>&6
21522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21523   cat >> confdefs.h <<EOF
21524 #define $ac_tr_hdr 1
21525 EOF
21526  
21527 else
21528   echo "$ac_t""no" 1>&6
21529 fi
21530 done
21531
21532
21533         if test $ac_cv_header_slp_h = yes ; then
21534                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21535 echo "configure:21536: checking for SLPOpen in -lslp" >&5
21536 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21538   echo $ac_n "(cached) $ac_c" 1>&6
21539 else
21540   ac_save_LIBS="$LIBS"
21541 LIBS="-lslp  $LIBS"
21542 cat > conftest.$ac_ext <<EOF
21543 #line 21544 "configure"
21544 #include "confdefs.h"
21545 /* Override any gcc2 internal prototype to avoid an error.  */
21546 /* We use char because int might match the return type of a gcc2
21547     builtin and then its argument prototype would still apply.  */
21548 char SLPOpen();
21549
21550 int main() {
21551 SLPOpen()
21552 ; return 0; }
21553 EOF
21554 if { (eval echo configure:21555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21555   rm -rf conftest*
21556   eval "ac_cv_lib_$ac_lib_var=yes"
21557 else
21558   echo "configure: failed program was:" >&5
21559   cat conftest.$ac_ext >&5
21560   rm -rf conftest*
21561   eval "ac_cv_lib_$ac_lib_var=no"
21562 fi
21563 rm -f conftest*
21564 LIBS="$ac_save_LIBS"
21565
21566 fi
21567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21568   echo "$ac_t""yes" 1>&6
21569   have_slp=yes
21570 else
21571   echo "$ac_t""no" 1>&6
21572 have_slp=no
21573 fi
21574
21575                 if test $have_slp = yes ; then
21576                         cat >> confdefs.h <<\EOF
21577 #define HAVE_SLP 1
21578 EOF
21579
21580                         SLAPD_SLP_LIBS=-lslp
21581                 fi
21582
21583         elif test $ol_enable_slp = yes ; then
21584                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21585         fi
21586 fi
21587
21588 for ac_hdr in gmp.h 
21589 do
21590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21592 echo "configure:21593: checking for $ac_hdr" >&5
21593 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21594   echo $ac_n "(cached) $ac_c" 1>&6
21595 else
21596   cat > conftest.$ac_ext <<EOF
21597 #line 21598 "configure"
21598 #include "confdefs.h"
21599 #include <$ac_hdr>
21600 EOF
21601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21602 { (eval echo configure:21603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21604 if test -z "$ac_err"; then
21605   rm -rf conftest*
21606   eval "ac_cv_header_$ac_safe=yes"
21607 else
21608   echo "$ac_err" >&5
21609   echo "configure: failed program was:" >&5
21610   cat conftest.$ac_ext >&5
21611   rm -rf conftest*
21612   eval "ac_cv_header_$ac_safe=no"
21613 fi
21614 rm -f conftest*
21615 fi
21616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21617   echo "$ac_t""yes" 1>&6
21618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21619   cat >> confdefs.h <<EOF
21620 #define $ac_tr_hdr 1
21621 EOF
21622  
21623 else
21624   echo "$ac_t""no" 1>&6
21625 fi
21626 done
21627
21628
21629 if test $ac_cv_header_gmp_h = yes ; then
21630         echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
21631 echo "configure:21632: checking for __gmpz_add_ui in -lgmp" >&5
21632 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
21633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21634   echo $ac_n "(cached) $ac_c" 1>&6
21635 else
21636   ac_save_LIBS="$LIBS"
21637 LIBS="-lgmp  $LIBS"
21638 cat > conftest.$ac_ext <<EOF
21639 #line 21640 "configure"
21640 #include "confdefs.h"
21641 /* Override any gcc2 internal prototype to avoid an error.  */
21642 /* We use char because int might match the return type of a gcc2
21643     builtin and then its argument prototype would still apply.  */
21644 char __gmpz_add_ui();
21645
21646 int main() {
21647 __gmpz_add_ui()
21648 ; return 0; }
21649 EOF
21650 if { (eval echo configure:21651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21651   rm -rf conftest*
21652   eval "ac_cv_lib_$ac_lib_var=yes"
21653 else
21654   echo "configure: failed program was:" >&5
21655   cat conftest.$ac_ext >&5
21656   rm -rf conftest*
21657   eval "ac_cv_lib_$ac_lib_var=no"
21658 fi
21659 rm -f conftest*
21660 LIBS="$ac_save_LIBS"
21661
21662 fi
21663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21664   echo "$ac_t""yes" 1>&6
21665   have_gmp=yes
21666 else
21667   echo "$ac_t""no" 1>&6
21668 have_gmp=no
21669 fi
21670
21671         if test $have_gmp = yes ; then
21672                 cat >> confdefs.h <<\EOF
21673 #define HAVE_GMP 1
21674 EOF
21675
21676                 SLAPD_GMP_LIBS=-lgmp
21677         fi
21678 fi
21679
21680
21681 echo $ac_n "checking long long""... $ac_c" 1>&6
21682 echo "configure:21683: checking long long" >&5
21683 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21684   echo $ac_n "(cached) $ac_c" 1>&6
21685 else
21686   
21687         cat > conftest.$ac_ext <<EOF
21688 #line 21689 "configure"
21689 #include "confdefs.h"
21690
21691 int main() {
21692 long long x;
21693 ; return 0; }
21694 EOF
21695 if { (eval echo configure:21696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21696   rm -rf conftest*
21697   ol_cv_type_long_long=yes
21698 else
21699   echo "configure: failed program was:" >&5
21700   cat conftest.$ac_ext >&5
21701   rm -rf conftest*
21702   ol_cv_type_long_long=no
21703 fi
21704 rm -f conftest*
21705 fi
21706
21707 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21708 if test $ol_cv_type_long_long = yes; then
21709         cat >> confdefs.h <<\EOF
21710 #define HAVE_LONG_LONG 1
21711 EOF
21712
21713 fi
21714
21715 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21716 echo "configure:21717: checking for ANSI C header files" >&5
21717 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21718   echo $ac_n "(cached) $ac_c" 1>&6
21719 else
21720   cat > conftest.$ac_ext <<EOF
21721 #line 21722 "configure"
21722 #include "confdefs.h"
21723 #include <stdlib.h>
21724 #include <stdarg.h>
21725 #include <string.h>
21726 #include <float.h>
21727 EOF
21728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21729 { (eval echo configure:21730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21731 if test -z "$ac_err"; then
21732   rm -rf conftest*
21733   ac_cv_header_stdc=yes
21734 else
21735   echo "$ac_err" >&5
21736   echo "configure: failed program was:" >&5
21737   cat conftest.$ac_ext >&5
21738   rm -rf conftest*
21739   ac_cv_header_stdc=no
21740 fi
21741 rm -f conftest*
21742
21743 if test $ac_cv_header_stdc = yes; then
21744   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21745 cat > conftest.$ac_ext <<EOF
21746 #line 21747 "configure"
21747 #include "confdefs.h"
21748 #include <string.h>
21749 EOF
21750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21751   egrep "memchr" >/dev/null 2>&1; then
21752   :
21753 else
21754   rm -rf conftest*
21755   ac_cv_header_stdc=no
21756 fi
21757 rm -f conftest*
21758
21759 fi
21760
21761 if test $ac_cv_header_stdc = yes; then
21762   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21763 cat > conftest.$ac_ext <<EOF
21764 #line 21765 "configure"
21765 #include "confdefs.h"
21766 #include <stdlib.h>
21767 EOF
21768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21769   egrep "free" >/dev/null 2>&1; then
21770   :
21771 else
21772   rm -rf conftest*
21773   ac_cv_header_stdc=no
21774 fi
21775 rm -f conftest*
21776
21777 fi
21778
21779 if test $ac_cv_header_stdc = yes; then
21780   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21781 if test "$cross_compiling" = yes; then
21782   :
21783 else
21784   cat > conftest.$ac_ext <<EOF
21785 #line 21786 "configure"
21786 #include "confdefs.h"
21787 #include <ctype.h>
21788 #if ((' ' & 0x0FF) == 0x020)
21789 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21790 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21791 #else
21792 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21793  || ('j' <= (c) && (c) <= 'r') \
21794  || ('s' <= (c) && (c) <= 'z'))
21795 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21796 #endif
21797 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21798 int main () { int i; for (i = 0; i < 256; i++)
21799 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21800 exit (0); }
21801
21802 EOF
21803 if { (eval echo configure:21804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21804 then
21805   :
21806 else
21807   echo "configure: failed program was:" >&5
21808   cat conftest.$ac_ext >&5
21809   rm -fr conftest*
21810   ac_cv_header_stdc=no
21811 fi
21812 rm -fr conftest*
21813 fi
21814
21815 fi
21816 fi
21817
21818 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21819 if test $ac_cv_header_stdc = yes; then
21820   cat >> confdefs.h <<\EOF
21821 #define STDC_HEADERS 1
21822 EOF
21823
21824 fi
21825
21826 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21827 echo "configure:21828: checking for mode_t" >&5
21828 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21829   echo $ac_n "(cached) $ac_c" 1>&6
21830 else
21831   cat > conftest.$ac_ext <<EOF
21832 #line 21833 "configure"
21833 #include "confdefs.h"
21834 #include <sys/types.h>
21835 #if STDC_HEADERS
21836 #include <stdlib.h>
21837 #include <stddef.h>
21838 #endif
21839
21840 EOF
21841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21842   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21843   rm -rf conftest*
21844   eval "ac_cv_type_mode_t=yes"
21845 else
21846   rm -rf conftest*
21847   eval "ac_cv_type_mode_t=no"
21848 fi
21849 rm -f conftest*
21850
21851 fi
21852 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21853   echo "$ac_t""yes" 1>&6
21854 else
21855   echo "$ac_t""no" 1>&6
21856   cat >> confdefs.h <<EOF
21857 #define mode_t int
21858 EOF
21859
21860 fi
21861
21862 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21863 echo "configure:21864: checking for off_t" >&5
21864 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21865   echo $ac_n "(cached) $ac_c" 1>&6
21866 else
21867   cat > conftest.$ac_ext <<EOF
21868 #line 21869 "configure"
21869 #include "confdefs.h"
21870 #include <sys/types.h>
21871 #if STDC_HEADERS
21872 #include <stdlib.h>
21873 #include <stddef.h>
21874 #endif
21875
21876 EOF
21877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21878   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21879   rm -rf conftest*
21880   eval "ac_cv_type_off_t=yes"
21881 else
21882   rm -rf conftest*
21883   eval "ac_cv_type_off_t=no"
21884 fi
21885 rm -f conftest*
21886
21887 fi
21888 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21889   echo "$ac_t""yes" 1>&6
21890 else
21891   echo "$ac_t""no" 1>&6
21892   cat >> confdefs.h <<EOF
21893 #define off_t long
21894 EOF
21895
21896 fi
21897
21898 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21899 echo "configure:21900: checking for pid_t" >&5
21900 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21901   echo $ac_n "(cached) $ac_c" 1>&6
21902 else
21903   cat > conftest.$ac_ext <<EOF
21904 #line 21905 "configure"
21905 #include "confdefs.h"
21906 #include <sys/types.h>
21907 #if STDC_HEADERS
21908 #include <stdlib.h>
21909 #include <stddef.h>
21910 #endif
21911
21912 EOF
21913 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21914   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21915   rm -rf conftest*
21916   eval "ac_cv_type_pid_t=yes"
21917 else
21918   rm -rf conftest*
21919   eval "ac_cv_type_pid_t=no"
21920 fi
21921 rm -f conftest*
21922
21923 fi
21924 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21925   echo "$ac_t""yes" 1>&6
21926 else
21927   echo "$ac_t""no" 1>&6
21928   cat >> confdefs.h <<EOF
21929 #define pid_t int
21930 EOF
21931
21932 fi
21933
21934 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21935 echo "configure:21936: checking for ptrdiff_t" >&5
21936 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21937   echo $ac_n "(cached) $ac_c" 1>&6
21938 else
21939   cat > conftest.$ac_ext <<EOF
21940 #line 21941 "configure"
21941 #include "confdefs.h"
21942 #include <stddef.h>
21943 int main() {
21944 ptrdiff_t p
21945 ; return 0; }
21946 EOF
21947 if { (eval echo configure:21948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21948   rm -rf conftest*
21949   am_cv_type_ptrdiff_t=yes
21950 else
21951   echo "configure: failed program was:" >&5
21952   cat conftest.$ac_ext >&5
21953   rm -rf conftest*
21954   am_cv_type_ptrdiff_t=no
21955 fi
21956 rm -f conftest*
21957 fi
21958
21959 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21960    if test $am_cv_type_ptrdiff_t = yes; then
21961      cat >> confdefs.h <<\EOF
21962 #define HAVE_PTRDIFF_T 1
21963 EOF
21964
21965    fi
21966
21967 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21968 echo "configure:21969: checking return type of signal handlers" >&5
21969 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21970   echo $ac_n "(cached) $ac_c" 1>&6
21971 else
21972   cat > conftest.$ac_ext <<EOF
21973 #line 21974 "configure"
21974 #include "confdefs.h"
21975 #include <sys/types.h>
21976 #include <signal.h>
21977 #ifdef signal
21978 #undef signal
21979 #endif
21980 #ifdef __cplusplus
21981 extern "C" void (*signal (int, void (*)(int)))(int);
21982 #else
21983 void (*signal ()) ();
21984 #endif
21985
21986 int main() {
21987 int i;
21988 ; return 0; }
21989 EOF
21990 if { (eval echo configure:21991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21991   rm -rf conftest*
21992   ac_cv_type_signal=void
21993 else
21994   echo "configure: failed program was:" >&5
21995   cat conftest.$ac_ext >&5
21996   rm -rf conftest*
21997   ac_cv_type_signal=int
21998 fi
21999 rm -f conftest*
22000 fi
22001
22002 echo "$ac_t""$ac_cv_type_signal" 1>&6
22003 cat >> confdefs.h <<EOF
22004 #define RETSIGTYPE $ac_cv_type_signal
22005 EOF
22006
22007
22008 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22009 echo "configure:22010: checking for size_t" >&5
22010 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22011   echo $ac_n "(cached) $ac_c" 1>&6
22012 else
22013   cat > conftest.$ac_ext <<EOF
22014 #line 22015 "configure"
22015 #include "confdefs.h"
22016 #include <sys/types.h>
22017 #if STDC_HEADERS
22018 #include <stdlib.h>
22019 #include <stddef.h>
22020 #endif
22021
22022 EOF
22023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22024   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22025   rm -rf conftest*
22026   eval "ac_cv_type_size_t=yes"
22027 else
22028   rm -rf conftest*
22029   eval "ac_cv_type_size_t=no"
22030 fi
22031 rm -f conftest*
22032
22033 fi
22034 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22035   echo "$ac_t""yes" 1>&6
22036 else
22037   echo "$ac_t""no" 1>&6
22038   cat >> confdefs.h <<EOF
22039 #define size_t unsigned
22040 EOF
22041
22042 fi
22043
22044
22045 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22046 echo "configure:22047: checking for ssize_t" >&5
22047 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22048   echo $ac_n "(cached) $ac_c" 1>&6
22049 else
22050   cat > conftest.$ac_ext <<EOF
22051 #line 22052 "configure"
22052 #include "confdefs.h"
22053 #include <sys/types.h>
22054 #if STDC_HEADERS
22055 #include <stdlib.h>
22056 #include <stddef.h>
22057 #endif
22058
22059 EOF
22060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22061   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22062   rm -rf conftest*
22063   eval "ac_cv_type_ssize_t=yes"
22064 else
22065   rm -rf conftest*
22066   eval "ac_cv_type_ssize_t=no"
22067 fi
22068 rm -f conftest*
22069
22070 fi
22071 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22072   echo "$ac_t""yes" 1>&6
22073 else
22074   echo "$ac_t""no" 1>&6
22075   cat >> confdefs.h <<EOF
22076 #define ssize_t signed int
22077 EOF
22078
22079 fi
22080
22081 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22082 echo "configure:22083: checking for caddr_t" >&5
22083 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22084   echo $ac_n "(cached) $ac_c" 1>&6
22085 else
22086   cat > conftest.$ac_ext <<EOF
22087 #line 22088 "configure"
22088 #include "confdefs.h"
22089 #include <sys/types.h>
22090 #if STDC_HEADERS
22091 #include <stdlib.h>
22092 #include <stddef.h>
22093 #endif
22094
22095 EOF
22096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22097   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22098   rm -rf conftest*
22099   eval "ac_cv_type_caddr_t=yes"
22100 else
22101   rm -rf conftest*
22102   eval "ac_cv_type_caddr_t=no"
22103 fi
22104 rm -f conftest*
22105
22106 fi
22107 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22108   echo "$ac_t""yes" 1>&6
22109 else
22110   echo "$ac_t""no" 1>&6
22111   cat >> confdefs.h <<EOF
22112 #define caddr_t char *
22113 EOF
22114
22115 fi
22116
22117
22118 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22119 echo "configure:22120: checking for socklen_t" >&5
22120 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22121   echo $ac_n "(cached) $ac_c" 1>&6
22122 else
22123   cat > conftest.$ac_ext <<EOF
22124 #line 22125 "configure"
22125 #include "confdefs.h"
22126
22127 #ifdef HAVE_SYS_TYPES_H
22128 #include <sys/types.h>
22129 #endif
22130 #ifdef HAVE_SYS_SOCKET_H
22131 #include <sys/socket.h>
22132 #endif
22133
22134 int main() {
22135 socklen_t len;
22136 ; return 0; }
22137 EOF
22138 if { (eval echo configure:22139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22139   rm -rf conftest*
22140   ol_cv_type_socklen_t=yes
22141 else
22142   echo "configure: failed program was:" >&5
22143   cat conftest.$ac_ext >&5
22144   rm -rf conftest*
22145   ol_cv_type_socklen_t=no
22146 fi
22147 rm -f conftest*
22148 fi
22149
22150 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22151   if test $ol_cv_type_socklen_t = no; then
22152     cat >> confdefs.h <<\EOF
22153 #define socklen_t int
22154 EOF
22155
22156   fi
22157  
22158 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22159 echo "configure:22160: checking for member st_blksize in aggregate type struct stat" >&5
22160 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22161   echo $ac_n "(cached) $ac_c" 1>&6
22162 else
22163   cat > conftest.$ac_ext <<EOF
22164 #line 22165 "configure"
22165 #include "confdefs.h"
22166 #include <sys/types.h>
22167 #include <sys/stat.h>
22168 int main() {
22169 struct stat foo; foo.st_blksize;
22170 ; return 0; }
22171 EOF
22172 if { (eval echo configure:22173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22173   rm -rf conftest*
22174   ac_cv_c_struct_member_st_blksize=yes
22175 else
22176   echo "configure: failed program was:" >&5
22177   cat conftest.$ac_ext >&5
22178   rm -rf conftest*
22179   ac_cv_c_struct_member_st_blksize=no
22180 fi
22181 rm -f conftest*
22182 fi
22183
22184 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22185 st_blksize="$ac_cv_c_struct_member_st_blksize"
22186 if test $ac_cv_c_struct_member_st_blksize = yes; then
22187   cat >> confdefs.h <<\EOF
22188 #define HAVE_ST_BLKSIZE 1
22189 EOF
22190
22191 fi
22192
22193 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22194 echo "configure:22195: checking whether time.h and sys/time.h may both be included" >&5
22195 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22196   echo $ac_n "(cached) $ac_c" 1>&6
22197 else
22198   cat > conftest.$ac_ext <<EOF
22199 #line 22200 "configure"
22200 #include "confdefs.h"
22201 #include <sys/types.h>
22202 #include <sys/time.h>
22203 #include <time.h>
22204 int main() {
22205 struct tm *tp;
22206 ; return 0; }
22207 EOF
22208 if { (eval echo configure:22209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22209   rm -rf conftest*
22210   ac_cv_header_time=yes
22211 else
22212   echo "configure: failed program was:" >&5
22213   cat conftest.$ac_ext >&5
22214   rm -rf conftest*
22215   ac_cv_header_time=no
22216 fi
22217 rm -f conftest*
22218 fi
22219
22220 echo "$ac_t""$ac_cv_header_time" 1>&6
22221 if test $ac_cv_header_time = yes; then
22222   cat >> confdefs.h <<\EOF
22223 #define TIME_WITH_SYS_TIME 1
22224 EOF
22225
22226 fi
22227
22228 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22229 echo "configure:22230: checking whether struct tm is in sys/time.h or time.h" >&5
22230 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22231   echo $ac_n "(cached) $ac_c" 1>&6
22232 else
22233   cat > conftest.$ac_ext <<EOF
22234 #line 22235 "configure"
22235 #include "confdefs.h"
22236 #include <sys/types.h>
22237 #include <time.h>
22238 int main() {
22239 struct tm *tp; tp->tm_sec;
22240 ; return 0; }
22241 EOF
22242 if { (eval echo configure:22243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22243   rm -rf conftest*
22244   ac_cv_struct_tm=time.h
22245 else
22246   echo "configure: failed program was:" >&5
22247   cat conftest.$ac_ext >&5
22248   rm -rf conftest*
22249   ac_cv_struct_tm=sys/time.h
22250 fi
22251 rm -f conftest*
22252 fi
22253
22254 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22255 if test $ac_cv_struct_tm = sys/time.h; then
22256   cat >> confdefs.h <<\EOF
22257 #define TM_IN_SYS_TIME 1
22258 EOF
22259
22260 fi
22261
22262 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22263 echo "configure:22264: checking for uid_t in sys/types.h" >&5
22264 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22265   echo $ac_n "(cached) $ac_c" 1>&6
22266 else
22267   cat > conftest.$ac_ext <<EOF
22268 #line 22269 "configure"
22269 #include "confdefs.h"
22270 #include <sys/types.h>
22271 EOF
22272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22273   egrep "uid_t" >/dev/null 2>&1; then
22274   rm -rf conftest*
22275   ac_cv_type_uid_t=yes
22276 else
22277   rm -rf conftest*
22278   ac_cv_type_uid_t=no
22279 fi
22280 rm -f conftest*
22281
22282 fi
22283
22284 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22285 if test $ac_cv_type_uid_t = no; then
22286   cat >> confdefs.h <<\EOF
22287 #define uid_t int
22288 EOF
22289
22290   cat >> confdefs.h <<\EOF
22291 #define gid_t int
22292 EOF
22293
22294 fi
22295
22296 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22297 echo "configure:22298: checking for sig_atomic_t" >&5
22298 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22299   echo $ac_n "(cached) $ac_c" 1>&6
22300 else
22301   cat > conftest.$ac_ext <<EOF
22302 #line 22303 "configure"
22303 #include "confdefs.h"
22304 #include <signal.h>
22305 int main() {
22306 sig_atomic_t atomic;
22307 ; return 0; }
22308 EOF
22309 if { (eval echo configure:22310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22310   rm -rf conftest*
22311   ol_cv_type_sig_atomic_t=yes
22312 else
22313   echo "configure: failed program was:" >&5
22314   cat conftest.$ac_ext >&5
22315   rm -rf conftest*
22316   ol_cv_type_sig_atomic_t=no
22317 fi
22318 rm -f conftest*
22319 fi
22320
22321 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22322   if test $ol_cv_type_sig_atomic_t = no; then
22323     cat >> confdefs.h <<\EOF
22324 #define sig_atomic_t int
22325 EOF
22326
22327   fi
22328  
22329
22330
22331 # test for pw_gecos in struct passwd
22332 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22333 echo "configure:22334: checking struct passwd for pw_gecos" >&5
22334 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22335   echo $ac_n "(cached) $ac_c" 1>&6
22336 else
22337   
22338         cat > conftest.$ac_ext <<EOF
22339 #line 22340 "configure"
22340 #include "confdefs.h"
22341 #include <pwd.h>
22342 int main() {
22343
22344         struct passwd pwd;
22345         pwd.pw_gecos = pwd.pw_name;
22346
22347 ; return 0; }
22348 EOF
22349 if { (eval echo configure:22350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22350   rm -rf conftest*
22351   ol_cv_struct_passwd_pw_gecos=yes
22352 else
22353   echo "configure: failed program was:" >&5
22354   cat conftest.$ac_ext >&5
22355   rm -rf conftest*
22356   ol_cv_struct_passwd_pw_gecos=no
22357 fi
22358 rm -f conftest*
22359 fi
22360
22361 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22362 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22363         cat >> confdefs.h <<\EOF
22364 #define HAVE_PW_GECOS 1
22365 EOF
22366
22367 fi
22368
22369 # test for pw_passwd in struct passwd
22370 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22371 echo "configure:22372: checking struct passwd for pw_passwd" >&5
22372 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22373   echo $ac_n "(cached) $ac_c" 1>&6
22374 else
22375   
22376         cat > conftest.$ac_ext <<EOF
22377 #line 22378 "configure"
22378 #include "confdefs.h"
22379 #include <pwd.h>
22380 int main() {
22381
22382         struct passwd pwd;
22383         pwd.pw_passwd = pwd.pw_name;
22384
22385 ; return 0; }
22386 EOF
22387 if { (eval echo configure:22388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22388   rm -rf conftest*
22389   ol_cv_struct_passwd_pw_passwd=yes
22390 else
22391   echo "configure: failed program was:" >&5
22392   cat conftest.$ac_ext >&5
22393   rm -rf conftest*
22394   ol_cv_struct_passwd_pw_passwd=no
22395 fi
22396 rm -f conftest*
22397 fi
22398
22399 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22400 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22401         cat >> confdefs.h <<\EOF
22402 #define HAVE_PW_PASSWD 1
22403 EOF
22404
22405 fi
22406
22407
22408 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22409 echo "configure:22410: checking if toupper() requires islower()" >&5
22410 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22411   echo $ac_n "(cached) $ac_c" 1>&6
22412 else
22413   
22414         if test "$cross_compiling" = yes; then
22415   ol_cv_c_upper_lower=safe
22416 else
22417   cat > conftest.$ac_ext <<EOF
22418 #line 22419 "configure"
22419 #include "confdefs.h"
22420
22421 #include <ctype.h>
22422 main()
22423 {
22424         if ('C' == toupper('C'))
22425                 exit(0);
22426         else
22427                 exit(1);
22428 }
22429 EOF
22430 if { (eval echo configure:22431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22431 then
22432   ol_cv_c_upper_lower=no
22433 else
22434   echo "configure: failed program was:" >&5
22435   cat conftest.$ac_ext >&5
22436   rm -fr conftest*
22437   ol_cv_c_upper_lower=yes
22438 fi
22439 rm -fr conftest*
22440 fi
22441
22442 fi
22443
22444 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22445 if test $ol_cv_c_upper_lower != no ; then
22446         cat >> confdefs.h <<\EOF
22447 #define C_UPPER_LOWER 1
22448 EOF
22449
22450 fi
22451
22452 echo $ac_n "checking for working const""... $ac_c" 1>&6
22453 echo "configure:22454: checking for working const" >&5
22454 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22455   echo $ac_n "(cached) $ac_c" 1>&6
22456 else
22457   cat > conftest.$ac_ext <<EOF
22458 #line 22459 "configure"
22459 #include "confdefs.h"
22460
22461 int main() {
22462
22463 /* Ultrix mips cc rejects this.  */
22464 typedef int charset[2]; const charset x;
22465 /* SunOS 4.1.1 cc rejects this.  */
22466 char const *const *ccp;
22467 char **p;
22468 /* NEC SVR4.0.2 mips cc rejects this.  */
22469 struct point {int x, y;};
22470 static struct point const zero = {0,0};
22471 /* AIX XL C 1.02.0.0 rejects this.
22472    It does not let you subtract one const X* pointer from another in an arm
22473    of an if-expression whose if-part is not a constant expression */
22474 const char *g = "string";
22475 ccp = &g + (g ? g-g : 0);
22476 /* HPUX 7.0 cc rejects these. */
22477 ++ccp;
22478 p = (char**) ccp;
22479 ccp = (char const *const *) p;
22480 { /* SCO 3.2v4 cc rejects this.  */
22481   char *t;
22482   char const *s = 0 ? (char *) 0 : (char const *) 0;
22483
22484   *t++ = 0;
22485 }
22486 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22487   int x[] = {25, 17};
22488   const int *foo = &x[0];
22489   ++foo;
22490 }
22491 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22492   typedef const int *iptr;
22493   iptr p = 0;
22494   ++p;
22495 }
22496 { /* AIX XL C 1.02.0.0 rejects this saying
22497      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22498   struct s { int j; const int *ap[3]; };
22499   struct s *b; b->j = 5;
22500 }
22501 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22502   const int foo = 10;
22503 }
22504
22505 ; return 0; }
22506 EOF
22507 if { (eval echo configure:22508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22508   rm -rf conftest*
22509   ac_cv_c_const=yes
22510 else
22511   echo "configure: failed program was:" >&5
22512   cat conftest.$ac_ext >&5
22513   rm -rf conftest*
22514   ac_cv_c_const=no
22515 fi
22516 rm -f conftest*
22517 fi
22518
22519 echo "$ac_t""$ac_cv_c_const" 1>&6
22520 if test $ac_cv_c_const = no; then
22521   cat >> confdefs.h <<\EOF
22522 #define const 
22523 EOF
22524
22525 fi
22526
22527 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22528 echo "configure:22529: checking if compiler understands volatile" >&5
22529 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22530   echo $ac_n "(cached) $ac_c" 1>&6
22531 else
22532   cat > conftest.$ac_ext <<EOF
22533 #line 22534 "configure"
22534 #include "confdefs.h"
22535 int x, y, z;
22536 int main() {
22537 volatile int a; int * volatile b = x ? &y : &z;
22538       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22539       *b = 0;
22540 ; return 0; }
22541 EOF
22542 if { (eval echo configure:22543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22543   rm -rf conftest*
22544   ol_cv_c_volatile=yes
22545 else
22546   echo "configure: failed program was:" >&5
22547   cat conftest.$ac_ext >&5
22548   rm -rf conftest*
22549   ol_cv_c_volatile=no
22550 fi
22551 rm -f conftest*
22552 fi
22553
22554 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22555   if test $ol_cv_c_volatile = yes; then
22556     : 
22557   else
22558     cat >> confdefs.h <<\EOF
22559 #define volatile 
22560 EOF
22561
22562   fi
22563  
22564
22565 if test $cross_compiling = yes ; then
22566         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22567         cat >> confdefs.h <<\EOF
22568 #define CROSS_COMPILING 1
22569 EOF
22570
22571 else
22572         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22573 echo "configure:22574: checking whether byte ordering is bigendian" >&5
22574 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22575   echo $ac_n "(cached) $ac_c" 1>&6
22576 else
22577   ac_cv_c_bigendian=unknown
22578 # See if sys/param.h defines the BYTE_ORDER macro.
22579 cat > conftest.$ac_ext <<EOF
22580 #line 22581 "configure"
22581 #include "confdefs.h"
22582 #include <sys/types.h>
22583 #include <sys/param.h>
22584 int main() {
22585
22586 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22587  bogus endian macros
22588 #endif
22589 ; return 0; }
22590 EOF
22591 if { (eval echo configure:22592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22592   rm -rf conftest*
22593   # It does; now see whether it defined to BIG_ENDIAN or not.
22594 cat > conftest.$ac_ext <<EOF
22595 #line 22596 "configure"
22596 #include "confdefs.h"
22597 #include <sys/types.h>
22598 #include <sys/param.h>
22599 int main() {
22600
22601 #if BYTE_ORDER != BIG_ENDIAN
22602  not big endian
22603 #endif
22604 ; return 0; }
22605 EOF
22606 if { (eval echo configure:22607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22607   rm -rf conftest*
22608   ac_cv_c_bigendian=yes
22609 else
22610   echo "configure: failed program was:" >&5
22611   cat conftest.$ac_ext >&5
22612   rm -rf conftest*
22613   ac_cv_c_bigendian=no
22614 fi
22615 rm -f conftest*
22616 else
22617   echo "configure: failed program was:" >&5
22618   cat conftest.$ac_ext >&5
22619 fi
22620 rm -f conftest*
22621 if test $ac_cv_c_bigendian = unknown; then
22622 if test "$cross_compiling" = yes; then
22623     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22624 else
22625   cat > conftest.$ac_ext <<EOF
22626 #line 22627 "configure"
22627 #include "confdefs.h"
22628 main () {
22629   /* Are we little or big endian?  From Harbison&Steele.  */
22630   union
22631   {
22632     long l;
22633     char c[sizeof (long)];
22634   } u;
22635   u.l = 1;
22636   exit (u.c[sizeof (long) - 1] == 1);
22637 }
22638 EOF
22639 if { (eval echo configure:22640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22640 then
22641   ac_cv_c_bigendian=no
22642 else
22643   echo "configure: failed program was:" >&5
22644   cat conftest.$ac_ext >&5
22645   rm -fr conftest*
22646   ac_cv_c_bigendian=yes
22647 fi
22648 rm -fr conftest*
22649 fi
22650
22651 fi
22652 fi
22653
22654 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22655 if test $ac_cv_c_bigendian = yes; then
22656   cat >> confdefs.h <<\EOF
22657 #define WORDS_BIGENDIAN 1
22658 EOF
22659
22660 fi
22661
22662 fi
22663
22664 echo $ac_n "checking size of short""... $ac_c" 1>&6
22665 echo "configure:22666: checking size of short" >&5 
22666 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22667   echo $ac_n "(cached) $ac_c" 1>&6
22668 else
22669   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22670   cat > conftest.$ac_ext <<EOF
22671 #line 22672 "configure"
22672 #include "confdefs.h"
22673 #include "confdefs.h" 
22674 #include <stdlib.h>
22675 #include <sys/types.h> 
22676  
22677
22678 int main() {
22679 switch (0) case 0: case (sizeof (short) == $ac_size):;
22680 ; return 0; }
22681 EOF
22682 if { (eval echo configure:22683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22683   rm -rf conftest*
22684   ac_cv_sizeof_short=$ac_size
22685 else
22686   echo "configure: failed program was:" >&5
22687   cat conftest.$ac_ext >&5
22688 fi
22689 rm -f conftest* 
22690   if test x$ac_cv_sizeof_short != x ; then break; fi 
22691 done 
22692
22693 fi
22694  
22695 if test x$ac_cv_sizeof_short = x ; then 
22696   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22697 fi 
22698 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22699 cat >> confdefs.h <<EOF
22700 #define SIZEOF_SHORT $ac_cv_sizeof_short
22701 EOF
22702  
22703  
22704 echo $ac_n "checking size of int""... $ac_c" 1>&6
22705 echo "configure:22706: checking size of int" >&5 
22706 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22707   echo $ac_n "(cached) $ac_c" 1>&6
22708 else
22709   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22710   cat > conftest.$ac_ext <<EOF
22711 #line 22712 "configure"
22712 #include "confdefs.h"
22713 #include "confdefs.h" 
22714 #include <stdlib.h>
22715 #include <sys/types.h> 
22716  
22717
22718 int main() {
22719 switch (0) case 0: case (sizeof (int) == $ac_size):;
22720 ; return 0; }
22721 EOF
22722 if { (eval echo configure:22723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22723   rm -rf conftest*
22724   ac_cv_sizeof_int=$ac_size
22725 else
22726   echo "configure: failed program was:" >&5
22727   cat conftest.$ac_ext >&5
22728 fi
22729 rm -f conftest* 
22730   if test x$ac_cv_sizeof_int != x ; then break; fi 
22731 done 
22732
22733 fi
22734  
22735 if test x$ac_cv_sizeof_int = x ; then 
22736   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22737 fi 
22738 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22739 cat >> confdefs.h <<EOF
22740 #define SIZEOF_INT $ac_cv_sizeof_int
22741 EOF
22742  
22743  
22744 echo $ac_n "checking size of long""... $ac_c" 1>&6
22745 echo "configure:22746: checking size of long" >&5 
22746 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22747   echo $ac_n "(cached) $ac_c" 1>&6
22748 else
22749   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22750   cat > conftest.$ac_ext <<EOF
22751 #line 22752 "configure"
22752 #include "confdefs.h"
22753 #include "confdefs.h" 
22754 #include <stdlib.h>
22755 #include <sys/types.h> 
22756  
22757
22758 int main() {
22759 switch (0) case 0: case (sizeof (long) == $ac_size):;
22760 ; return 0; }
22761 EOF
22762 if { (eval echo configure:22763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22763   rm -rf conftest*
22764   ac_cv_sizeof_long=$ac_size
22765 else
22766   echo "configure: failed program was:" >&5
22767   cat conftest.$ac_ext >&5
22768 fi
22769 rm -f conftest* 
22770   if test x$ac_cv_sizeof_long != x ; then break; fi 
22771 done 
22772
22773 fi
22774  
22775 if test x$ac_cv_sizeof_long = x ; then 
22776   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22777 fi 
22778 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22779 cat >> confdefs.h <<EOF
22780 #define SIZEOF_LONG $ac_cv_sizeof_long
22781 EOF
22782  
22783
22784 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22785 echo "configure:22786: checking size of wchar_t" >&5 
22786 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22787   echo $ac_n "(cached) $ac_c" 1>&6
22788 else
22789   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22790   cat > conftest.$ac_ext <<EOF
22791 #line 22792 "configure"
22792 #include "confdefs.h"
22793 #include "confdefs.h" 
22794 #include <stdlib.h>
22795 #include <sys/types.h> 
22796  
22797
22798 int main() {
22799 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22800 ; return 0; }
22801 EOF
22802 if { (eval echo configure:22803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22803   rm -rf conftest*
22804   ac_cv_sizeof_wchar_t=$ac_size
22805 else
22806   echo "configure: failed program was:" >&5
22807   cat conftest.$ac_ext >&5
22808 fi
22809 rm -f conftest* 
22810   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22811 done 
22812
22813 fi
22814  
22815 if test x$ac_cv_sizeof_wchar_t = x ; then 
22816   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22817 fi 
22818 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22819 cat >> confdefs.h <<EOF
22820 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22821 EOF
22822  
22823
22824
22825 if test "$ac_cv_sizeof_int" -lt 4 ; then
22826         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22827
22828         cat >> confdefs.h <<\EOF
22829 #define LBER_INT_T long
22830 EOF
22831
22832 else
22833         cat >> confdefs.h <<\EOF
22834 #define LBER_INT_T int
22835 EOF
22836
22837 fi
22838
22839 cat >> confdefs.h <<\EOF
22840 #define LBER_LEN_T long
22841 EOF
22842
22843 cat >> confdefs.h <<\EOF
22844 #define LBER_SOCKET_T int
22845 EOF
22846
22847 cat >> confdefs.h <<\EOF
22848 #define LBER_TAG_T long
22849 EOF
22850
22851
22852 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22853 echo "configure:22854: checking for 8-bit clean memcmp" >&5
22854 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22855   echo $ac_n "(cached) $ac_c" 1>&6
22856 else
22857   if test "$cross_compiling" = yes; then
22858   ac_cv_func_memcmp_clean=no
22859 else
22860   cat > conftest.$ac_ext <<EOF
22861 #line 22862 "configure"
22862 #include "confdefs.h"
22863
22864 main()
22865 {
22866   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22867   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22868 }
22869
22870 EOF
22871 if { (eval echo configure:22872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22872 then
22873   ac_cv_func_memcmp_clean=yes
22874 else
22875   echo "configure: failed program was:" >&5
22876   cat conftest.$ac_ext >&5
22877   rm -fr conftest*
22878   ac_cv_func_memcmp_clean=no
22879 fi
22880 rm -fr conftest*
22881 fi
22882
22883 fi
22884
22885 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22886 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22887
22888 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22889 echo "configure:22890: checking for strftime" >&5
22890 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22891   echo $ac_n "(cached) $ac_c" 1>&6
22892 else
22893   cat > conftest.$ac_ext <<EOF
22894 #line 22895 "configure"
22895 #include "confdefs.h"
22896 /* System header to define __stub macros and hopefully few prototypes,
22897     which can conflict with char strftime(); below.  */
22898 #include <assert.h>
22899 /* Override any gcc2 internal prototype to avoid an error.  */
22900 /* We use char because int might match the return type of a gcc2
22901     builtin and then its argument prototype would still apply.  */
22902 char strftime();
22903 char (*f)();
22904
22905 int main() {
22906
22907 /* The GNU C library defines this for functions which it implements
22908     to always fail with ENOSYS.  Some functions are actually named
22909     something starting with __ and the normal name is an alias.  */
22910 #if defined (__stub_strftime) || defined (__stub___strftime)
22911 choke me
22912 #else
22913 f = strftime;
22914 #endif
22915
22916 ; return 0; }
22917 EOF
22918 if { (eval echo configure:22919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22919   rm -rf conftest*
22920   eval "ac_cv_func_strftime=yes"
22921 else
22922   echo "configure: failed program was:" >&5
22923   cat conftest.$ac_ext >&5
22924   rm -rf conftest*
22925   eval "ac_cv_func_strftime=no"
22926 fi
22927 rm -f conftest*
22928 fi
22929
22930 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22931   echo "$ac_t""yes" 1>&6
22932   cat >> confdefs.h <<\EOF
22933 #define HAVE_STRFTIME 1
22934 EOF
22935
22936 else
22937   echo "$ac_t""no" 1>&6
22938 # strftime is in -lintl on SCO UNIX.
22939 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22940 echo "configure:22941: checking for strftime in -lintl" >&5
22941 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22943   echo $ac_n "(cached) $ac_c" 1>&6
22944 else
22945   ac_save_LIBS="$LIBS"
22946 LIBS="-lintl  $LIBS"
22947 cat > conftest.$ac_ext <<EOF
22948 #line 22949 "configure"
22949 #include "confdefs.h"
22950 /* Override any gcc2 internal prototype to avoid an error.  */
22951 /* We use char because int might match the return type of a gcc2
22952     builtin and then its argument prototype would still apply.  */
22953 char strftime();
22954
22955 int main() {
22956 strftime()
22957 ; return 0; }
22958 EOF
22959 if { (eval echo configure:22960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22960   rm -rf conftest*
22961   eval "ac_cv_lib_$ac_lib_var=yes"
22962 else
22963   echo "configure: failed program was:" >&5
22964   cat conftest.$ac_ext >&5
22965   rm -rf conftest*
22966   eval "ac_cv_lib_$ac_lib_var=no"
22967 fi
22968 rm -f conftest*
22969 LIBS="$ac_save_LIBS"
22970
22971 fi
22972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22973   echo "$ac_t""yes" 1>&6
22974   cat >> confdefs.h <<\EOF
22975 #define HAVE_STRFTIME 1
22976 EOF
22977
22978 LIBS="-lintl $LIBS"
22979 else
22980   echo "$ac_t""no" 1>&6
22981 fi
22982
22983 fi
22984
22985
22986 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22987 echo "configure:22988: checking for inet_aton()" >&5
22988 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22989   echo $ac_n "(cached) $ac_c" 1>&6
22990 else
22991   cat > conftest.$ac_ext <<EOF
22992 #line 22993 "configure"
22993 #include "confdefs.h"
22994
22995 #ifdef HAVE_SYS_TYPES_H
22996 #       include <sys/types.h>
22997 #endif
22998 #ifdef HAVE_SYS_SOCKET_H
22999 #       include <sys/socket.h>
23000 #       ifdef HAVE_SYS_SELECT_H
23001 #               include <sys/select.h>
23002 #       endif
23003 #       include <netinet/in.h>
23004 #       ifdef HAVE_ARPA_INET_H
23005 #               include <arpa/inet.h>
23006 #       endif
23007 #endif
23008
23009 int main() {
23010 struct in_addr in;
23011 int rc = inet_aton( "255.255.255.255", &in );
23012 ; return 0; }
23013 EOF
23014 if { (eval echo configure:23015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23015   rm -rf conftest*
23016   ol_cv_func_inet_aton=yes
23017 else
23018   echo "configure: failed program was:" >&5
23019   cat conftest.$ac_ext >&5
23020   rm -rf conftest*
23021   ol_cv_func_inet_aton=no
23022 fi
23023 rm -f conftest*
23024 fi
23025
23026 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23027   if test $ol_cv_func_inet_aton != no; then
23028     cat >> confdefs.h <<\EOF
23029 #define HAVE_INET_ATON 1
23030 EOF
23031
23032   fi
23033  
23034
23035 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23036 echo "configure:23037: checking for _spawnlp" >&5
23037 if eval "test \"\${ac_cv_func__spawnlp+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 _spawnlp(); 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 _spawnlp();
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__spawnlp) || defined (__stub____spawnlp)
23058 choke me
23059 #else
23060 f = _spawnlp;
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__spawnlp=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__spawnlp=no"
23073 fi
23074 rm -f conftest*
23075 fi
23076
23077 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23078   echo "$ac_t""yes" 1>&6
23079   cat >> confdefs.h <<\EOF
23080 #define HAVE_SPAWNLP 1
23081 EOF
23082
23083 else
23084   echo "$ac_t""no" 1>&6
23085 fi
23086
23087
23088 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23089 echo "configure:23090: checking for _snprintf" >&5
23090 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23091   echo $ac_n "(cached) $ac_c" 1>&6
23092 else
23093   cat > conftest.$ac_ext <<EOF
23094 #line 23095 "configure"
23095 #include "confdefs.h"
23096 /* System header to define __stub macros and hopefully few prototypes,
23097     which can conflict with char _snprintf(); below.  */
23098 #include <assert.h>
23099 /* Override any gcc2 internal prototype to avoid an error.  */
23100 /* We use char because int might match the return type of a gcc2
23101     builtin and then its argument prototype would still apply.  */
23102 char _snprintf();
23103 char (*f)();
23104
23105 int main() {
23106
23107 /* The GNU C library defines this for functions which it implements
23108     to always fail with ENOSYS.  Some functions are actually named
23109     something starting with __ and the normal name is an alias.  */
23110 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23111 choke me
23112 #else
23113 f = _snprintf;
23114 #endif
23115
23116 ; return 0; }
23117 EOF
23118 if { (eval echo configure:23119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23119   rm -rf conftest*
23120   eval "ac_cv_func__snprintf=yes"
23121 else
23122   echo "configure: failed program was:" >&5
23123   cat conftest.$ac_ext >&5
23124   rm -rf conftest*
23125   eval "ac_cv_func__snprintf=no"
23126 fi
23127 rm -f conftest*
23128 fi
23129
23130 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23131   echo "$ac_t""yes" 1>&6
23132   ac_cv_func_snprintf=yes
23133         cat >> confdefs.h <<\EOF
23134 #define snprintf _snprintf
23135 EOF
23136
23137
23138 else
23139   echo "$ac_t""no" 1>&6
23140 fi
23141
23142
23143 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23144 echo "configure:23145: checking for _vsnprintf" >&5
23145 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23146   echo $ac_n "(cached) $ac_c" 1>&6
23147 else
23148   cat > conftest.$ac_ext <<EOF
23149 #line 23150 "configure"
23150 #include "confdefs.h"
23151 /* System header to define __stub macros and hopefully few prototypes,
23152     which can conflict with char _vsnprintf(); below.  */
23153 #include <assert.h>
23154 /* Override any gcc2 internal prototype to avoid an error.  */
23155 /* We use char because int might match the return type of a gcc2
23156     builtin and then its argument prototype would still apply.  */
23157 char _vsnprintf();
23158 char (*f)();
23159
23160 int main() {
23161
23162 /* The GNU C library defines this for functions which it implements
23163     to always fail with ENOSYS.  Some functions are actually named
23164     something starting with __ and the normal name is an alias.  */
23165 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23166 choke me
23167 #else
23168 f = _vsnprintf;
23169 #endif
23170
23171 ; return 0; }
23172 EOF
23173 if { (eval echo configure:23174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23174   rm -rf conftest*
23175   eval "ac_cv_func__vsnprintf=yes"
23176 else
23177   echo "configure: failed program was:" >&5
23178   cat conftest.$ac_ext >&5
23179   rm -rf conftest*
23180   eval "ac_cv_func__vsnprintf=no"
23181 fi
23182 rm -f conftest*
23183 fi
23184
23185 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23186   echo "$ac_t""yes" 1>&6
23187   ac_cv_func_vsnprintf=yes
23188         cat >> confdefs.h <<\EOF
23189 #define vsnprintf _vsnprintf
23190 EOF
23191
23192
23193 else
23194   echo "$ac_t""no" 1>&6
23195 fi
23196
23197
23198 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23199 echo "configure:23200: checking for vprintf" >&5
23200 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23201   echo $ac_n "(cached) $ac_c" 1>&6
23202 else
23203   cat > conftest.$ac_ext <<EOF
23204 #line 23205 "configure"
23205 #include "confdefs.h"
23206 /* System header to define __stub macros and hopefully few prototypes,
23207     which can conflict with char vprintf(); below.  */
23208 #include <assert.h>
23209 /* Override any gcc2 internal prototype to avoid an error.  */
23210 /* We use char because int might match the return type of a gcc2
23211     builtin and then its argument prototype would still apply.  */
23212 char vprintf();
23213 char (*f)();
23214
23215 int main() {
23216
23217 /* The GNU C library defines this for functions which it implements
23218     to always fail with ENOSYS.  Some functions are actually named
23219     something starting with __ and the normal name is an alias.  */
23220 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23221 choke me
23222 #else
23223 f = vprintf;
23224 #endif
23225
23226 ; return 0; }
23227 EOF
23228 if { (eval echo configure:23229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23229   rm -rf conftest*
23230   eval "ac_cv_func_vprintf=yes"
23231 else
23232   echo "configure: failed program was:" >&5
23233   cat conftest.$ac_ext >&5
23234   rm -rf conftest*
23235   eval "ac_cv_func_vprintf=no"
23236 fi
23237 rm -f conftest*
23238 fi
23239
23240 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23241   echo "$ac_t""yes" 1>&6
23242   cat >> confdefs.h <<\EOF
23243 #define HAVE_VPRINTF 1
23244 EOF
23245
23246 else
23247   echo "$ac_t""no" 1>&6
23248 fi
23249
23250 if test "$ac_cv_func_vprintf" != yes; then
23251 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23252 echo "configure:23253: checking for _doprnt" >&5
23253 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23254   echo $ac_n "(cached) $ac_c" 1>&6
23255 else
23256   cat > conftest.$ac_ext <<EOF
23257 #line 23258 "configure"
23258 #include "confdefs.h"
23259 /* System header to define __stub macros and hopefully few prototypes,
23260     which can conflict with char _doprnt(); below.  */
23261 #include <assert.h>
23262 /* Override any gcc2 internal prototype to avoid an error.  */
23263 /* We use char because int might match the return type of a gcc2
23264     builtin and then its argument prototype would still apply.  */
23265 char _doprnt();
23266 char (*f)();
23267
23268 int main() {
23269
23270 /* The GNU C library defines this for functions which it implements
23271     to always fail with ENOSYS.  Some functions are actually named
23272     something starting with __ and the normal name is an alias.  */
23273 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23274 choke me
23275 #else
23276 f = _doprnt;
23277 #endif
23278
23279 ; return 0; }
23280 EOF
23281 if { (eval echo configure:23282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23282   rm -rf conftest*
23283   eval "ac_cv_func__doprnt=yes"
23284 else
23285   echo "configure: failed program was:" >&5
23286   cat conftest.$ac_ext >&5
23287   rm -rf conftest*
23288   eval "ac_cv_func__doprnt=no"
23289 fi
23290 rm -f conftest*
23291 fi
23292
23293 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23294   echo "$ac_t""yes" 1>&6
23295   cat >> confdefs.h <<\EOF
23296 #define HAVE_DOPRNT 1
23297 EOF
23298
23299 else
23300   echo "$ac_t""no" 1>&6
23301 fi
23302
23303 fi
23304
23305
23306 if test $ac_cv_func_vprintf = yes ; then
23307                 for ac_func in snprintf vsnprintf
23308 do
23309 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23310 echo "configure:23311: checking for $ac_func" >&5
23311 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23312   echo $ac_n "(cached) $ac_c" 1>&6
23313 else
23314   cat > conftest.$ac_ext <<EOF
23315 #line 23316 "configure"
23316 #include "confdefs.h"
23317 /* System header to define __stub macros and hopefully few prototypes,
23318     which can conflict with char $ac_func(); below.  */
23319 #include <assert.h>
23320 /* Override any gcc2 internal prototype to avoid an error.  */
23321 /* We use char because int might match the return type of a gcc2
23322     builtin and then its argument prototype would still apply.  */
23323 char $ac_func();
23324 char (*f)();
23325
23326 int main() {
23327
23328 /* The GNU C library defines this for functions which it implements
23329     to always fail with ENOSYS.  Some functions are actually named
23330     something starting with __ and the normal name is an alias.  */
23331 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23332 choke me
23333 #else
23334 f = $ac_func;
23335 #endif
23336
23337 ; return 0; }
23338 EOF
23339 if { (eval echo configure:23340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23340   rm -rf conftest*
23341   eval "ac_cv_func_$ac_func=yes"
23342 else
23343   echo "configure: failed program was:" >&5
23344   cat conftest.$ac_ext >&5
23345   rm -rf conftest*
23346   eval "ac_cv_func_$ac_func=no"
23347 fi
23348 rm -f conftest*
23349 fi
23350
23351 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23352   echo "$ac_t""yes" 1>&6
23353     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23354   cat >> confdefs.h <<EOF
23355 #define $ac_tr_func 1
23356 EOF
23357  
23358 else
23359   echo "$ac_t""no" 1>&6
23360 fi
23361 done
23362
23363 fi
23364
23365 for ac_func in \
23366         bcopy                   \
23367         closesocket             \
23368         chroot                  \
23369         endgrent                \
23370         endpwent                \
23371         fcntl                   \
23372         flock                   \
23373         fstat                   \
23374         getdtablesize   \
23375         getgrgid                \
23376         gethostname             \
23377         getpass                 \
23378         getpassphrase   \
23379         getpwuid                \
23380         getpwnam                \
23381         getspnam                \
23382         gettimeofday    \
23383         initgroups              \
23384         lockf                   \
23385         memcpy                  \
23386         memmove                 \
23387         mkstemp                 \
23388         mktemp                  \
23389         pipe                    \
23390         read                    \
23391         recv                    \
23392         recvfrom                \
23393         setpwfile               \
23394         setgid                  \
23395         setegid                 \
23396         setsid                  \
23397         setuid                  \
23398         seteuid                 \
23399         sigaction               \
23400         signal                  \
23401         sigset                  \
23402         strdup                  \
23403         strpbrk                 \
23404         strrchr                 \
23405         strsep                  \
23406         strstr                  \
23407         strtol                  \
23408         strtoul                 \
23409         strtoq                  \
23410         strtouq                 \
23411         strtoll                 \
23412         strspn                  \
23413         sysconf                 \
23414         usleep                  \
23415         waitpid                 \
23416         wait4                   \
23417         write                   \
23418         send                    \
23419         sendmsg                 \
23420         sendto                  \
23421
23422 do
23423 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23424 echo "configure:23425: checking for $ac_func" >&5
23425 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23426   echo $ac_n "(cached) $ac_c" 1>&6
23427 else
23428   cat > conftest.$ac_ext <<EOF
23429 #line 23430 "configure"
23430 #include "confdefs.h"
23431 /* System header to define __stub macros and hopefully few prototypes,
23432     which can conflict with char $ac_func(); below.  */
23433 #include <assert.h>
23434 /* Override any gcc2 internal prototype to avoid an error.  */
23435 /* We use char because int might match the return type of a gcc2
23436     builtin and then its argument prototype would still apply.  */
23437 char $ac_func();
23438 char (*f)();
23439
23440 int main() {
23441
23442 /* The GNU C library defines this for functions which it implements
23443     to always fail with ENOSYS.  Some functions are actually named
23444     something starting with __ and the normal name is an alias.  */
23445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23446 choke me
23447 #else
23448 f = $ac_func;
23449 #endif
23450
23451 ; return 0; }
23452 EOF
23453 if { (eval echo configure:23454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23454   rm -rf conftest*
23455   eval "ac_cv_func_$ac_func=yes"
23456 else
23457   echo "configure: failed program was:" >&5
23458   cat conftest.$ac_ext >&5
23459   rm -rf conftest*
23460   eval "ac_cv_func_$ac_func=no"
23461 fi
23462 rm -f conftest*
23463 fi
23464
23465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23466   echo "$ac_t""yes" 1>&6
23467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23468   cat >> confdefs.h <<EOF
23469 #define $ac_tr_func 1
23470 EOF
23471  
23472 else
23473   echo "$ac_t""no" 1>&6
23474 fi
23475 done
23476
23477
23478 for ac_func in getopt getpeereid
23479 do
23480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23481 echo "configure:23482: checking for $ac_func" >&5
23482 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23483   echo $ac_n "(cached) $ac_c" 1>&6
23484 else
23485   cat > conftest.$ac_ext <<EOF
23486 #line 23487 "configure"
23487 #include "confdefs.h"
23488 /* System header to define __stub macros and hopefully few prototypes,
23489     which can conflict with char $ac_func(); below.  */
23490 #include <assert.h>
23491 /* Override any gcc2 internal prototype to avoid an error.  */
23492 /* We use char because int might match the return type of a gcc2
23493     builtin and then its argument prototype would still apply.  */
23494 char $ac_func();
23495 char (*f)();
23496
23497 int main() {
23498
23499 /* The GNU C library defines this for functions which it implements
23500     to always fail with ENOSYS.  Some functions are actually named
23501     something starting with __ and the normal name is an alias.  */
23502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23503 choke me
23504 #else
23505 f = $ac_func;
23506 #endif
23507
23508 ; return 0; }
23509 EOF
23510 if { (eval echo configure:23511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23511   rm -rf conftest*
23512   eval "ac_cv_func_$ac_func=yes"
23513 else
23514   echo "configure: failed program was:" >&5
23515   cat conftest.$ac_ext >&5
23516   rm -rf conftest*
23517   eval "ac_cv_func_$ac_func=no"
23518 fi
23519 rm -f conftest*
23520 fi
23521
23522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23523   echo "$ac_t""yes" 1>&6
23524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23525   cat >> confdefs.h <<EOF
23526 #define $ac_tr_func 1
23527 EOF
23528  
23529 else
23530   echo "$ac_t""no" 1>&6
23531 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23532 fi
23533 done
23534
23535
23536
23537 if test "$ac_cv_func_getopt" != yes; then
23538         LIBSRCS="$LIBSRCS getopt.c"
23539 fi
23540 if test "$ac_cv_func_getpeereid" != yes; then
23541         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23542 echo "configure:23543: checking for msg_accrights in msghdr" >&5
23543 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23544   echo $ac_n "(cached) $ac_c" 1>&6
23545 else
23546   cat > conftest.$ac_ext <<EOF
23547 #line 23548 "configure"
23548 #include "confdefs.h"
23549 #include <sys/socket.h>
23550 int main() {
23551 struct msghdr m; m.msg_accrightslen=0
23552 ; return 0; }
23553 EOF
23554 if { (eval echo configure:23555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23555   rm -rf conftest*
23556   ol_cv_msghdr_msg_accrights=yes
23557 else
23558   echo "configure: failed program was:" >&5
23559   cat conftest.$ac_ext >&5
23560   rm -rf conftest*
23561   ol_cv_msghdr_msg_accrights=no
23562 fi
23563 rm -f conftest*
23564         
23565 fi
23566
23567 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23568   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23569         cat >> confdefs.h <<\EOF
23570 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23571 EOF
23572
23573   fi
23574
23575         LIBSRCS="$LIBSRCS getpeereid.c"
23576 fi
23577 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23578         if test "$ac_cv_func_snprintf" != yes; then
23579                 cat >> confdefs.h <<\EOF
23580 #define snprintf ber_pvt_snprintf
23581 EOF
23582
23583         fi
23584         if test "$ac_cv_func_vsnprintf" != yes; then
23585                 cat >> confdefs.h <<\EOF
23586 #define vsnprintf ber_pvt_vsnprintf
23587 EOF
23588
23589         fi
23590 fi
23591
23592
23593 if test "$ol_enable_slapi" != no ; then
23594                         for ac_hdr in ltdl.h
23595 do
23596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23598 echo "configure:23599: checking for $ac_hdr" >&5
23599 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23600   echo $ac_n "(cached) $ac_c" 1>&6
23601 else
23602   cat > conftest.$ac_ext <<EOF
23603 #line 23604 "configure"
23604 #include "confdefs.h"
23605 #include <$ac_hdr>
23606 EOF
23607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23608 { (eval echo configure:23609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23610 if test -z "$ac_err"; then
23611   rm -rf conftest*
23612   eval "ac_cv_header_$ac_safe=yes"
23613 else
23614   echo "$ac_err" >&5
23615   echo "configure: failed program was:" >&5
23616   cat conftest.$ac_ext >&5
23617   rm -rf conftest*
23618   eval "ac_cv_header_$ac_safe=no"
23619 fi
23620 rm -f conftest*
23621 fi
23622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23623   echo "$ac_t""yes" 1>&6
23624     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23625   cat >> confdefs.h <<EOF
23626 #define $ac_tr_hdr 1
23627 EOF
23628  
23629 else
23630   echo "$ac_t""no" 1>&6
23631 fi
23632 done
23633
23634
23635         if test $ac_cv_header_ltdl_h != yes ; then
23636                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23637         fi
23638         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23639 echo "configure:23640: checking for lt_dlinit in -lltdl" >&5
23640 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23642   echo $ac_n "(cached) $ac_c" 1>&6
23643 else
23644   ac_save_LIBS="$LIBS"
23645 LIBS="-lltdl  $LIBS"
23646 cat > conftest.$ac_ext <<EOF
23647 #line 23648 "configure"
23648 #include "confdefs.h"
23649 /* Override any gcc2 internal prototype to avoid an error.  */
23650 /* We use char because int might match the return type of a gcc2
23651     builtin and then its argument prototype would still apply.  */
23652 char lt_dlinit();
23653
23654 int main() {
23655 lt_dlinit()
23656 ; return 0; }
23657 EOF
23658 if { (eval echo configure:23659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23659   rm -rf conftest*
23660   eval "ac_cv_lib_$ac_lib_var=yes"
23661 else
23662   echo "configure: failed program was:" >&5
23663   cat conftest.$ac_ext >&5
23664   rm -rf conftest*
23665   eval "ac_cv_lib_$ac_lib_var=no"
23666 fi
23667 rm -f conftest*
23668 LIBS="$ac_save_LIBS"
23669
23670 fi
23671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23672   echo "$ac_t""yes" 1>&6
23673   
23674                 SLAPI_LIBS=-lltdl
23675                 LIBSLAPI=libslapi.a
23676                 LIBSLAPITOOLS=../libslapi.a
23677                 cat >> confdefs.h <<\EOF
23678 #define HAVE_LIBLTDL 1
23679 EOF
23680
23681         
23682 else
23683   echo "$ac_t""no" 1>&6
23684 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23685 fi
23686
23687
23688         cat >> confdefs.h <<\EOF
23689 #define LDAP_SLAPI 1
23690 EOF
23691
23692 fi
23693
23694 if test "$ol_enable_debug" != no ; then
23695         cat >> confdefs.h <<\EOF
23696 #define LDAP_DEBUG 1
23697 EOF
23698
23699 fi
23700 if test "$ol_enable_syslog" = yes ; then
23701         cat >> confdefs.h <<\EOF
23702 #define LDAP_SYSLOG 1
23703 EOF
23704
23705 fi
23706 if test "$ol_link_kbind" != no ; then
23707         cat >> confdefs.h <<\EOF
23708 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23709 EOF
23710
23711 fi
23712 if test "$ol_enable_proctitle" != no ; then
23713         cat >> confdefs.h <<\EOF
23714 #define LDAP_PROCTITLE 1
23715 EOF
23716
23717 fi
23718 if test "$ol_enable_referrals" != no ; then
23719         cat >> confdefs.h <<\EOF
23720 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23721 EOF
23722
23723 fi
23724 if test "$ol_enable_local" != no; then
23725         cat >> confdefs.h <<\EOF
23726 #define LDAP_PF_LOCAL 1
23727 EOF
23728
23729 fi
23730 if test "$ol_link_ipv6" != no; then
23731         cat >> confdefs.h <<\EOF
23732 #define LDAP_PF_INET6 1
23733 EOF
23734
23735 fi
23736 if test "$ol_enable_cleartext" != no ; then
23737         cat >> confdefs.h <<\EOF
23738 #define SLAPD_CLEARTEXT 1
23739 EOF
23740
23741 fi
23742 if test "$ol_enable_crypt" != no ; then
23743         cat >> confdefs.h <<\EOF
23744 #define SLAPD_CRYPT 1
23745 EOF
23746
23747 fi
23748 if test "$ol_link_spasswd" != no ; then
23749         cat >> confdefs.h <<\EOF
23750 #define SLAPD_SPASSWD 1
23751 EOF
23752
23753 fi
23754 if test "$ol_enable_multimaster" != no ; then
23755         cat >> confdefs.h <<\EOF
23756 #define SLAPD_MULTIMASTER 1
23757 EOF
23758
23759 fi
23760 if test "$ol_enable_rlookups" != no ; then
23761         cat >> confdefs.h <<\EOF
23762 #define SLAPD_RLOOKUPS 1
23763 EOF
23764
23765 fi
23766 if test "$ol_enable_aci" != no ; then
23767         cat >> confdefs.h <<\EOF
23768 #define SLAPD_ACI_ENABLED 1
23769 EOF
23770
23771 fi
23772
23773 if test "$ol_link_modules" != no ; then
23774         cat >> confdefs.h <<\EOF
23775 #define SLAPD_MODULES 1
23776 EOF
23777
23778         BUILD_SLAPD=yes
23779         SLAPD_MODULES_LDFLAGS="-dlopen self"
23780 fi
23781
23782 cat >> confdefs.h <<\EOF
23783 #define SLAPD_MOD_STATIC 1
23784 EOF
23785
23786 cat >> confdefs.h <<\EOF
23787 #define SLAPD_MOD_DYNAMIC 2
23788 EOF
23789
23790
23791 if test "$ol_enable_bdb" != no ; then
23792         BUILD_SLAPD=yes
23793         BUILD_BDB=$ol_enable_bdb
23794         if test "$ol_enable_bdb" = mod ; then
23795                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23796                 MFLAG=SLAPD_MOD_DYNAMIC
23797         else
23798                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23799                 MFLAG=SLAPD_MOD_STATIC
23800         fi
23801         cat >> confdefs.h <<EOF
23802 #define SLAPD_BDB $MFLAG
23803 EOF
23804
23805 fi
23806
23807 if test "$ol_enable_dnssrv" != no ; then
23808         BUILD_SLAPD=yes
23809         BUILD_DNSSRV=$ol_enable_dnssrv
23810         if test "$ol_enable_dnssrv" = mod ; then
23811                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23812                 MFLAG=SLAPD_MOD_DYNAMIC
23813         else
23814                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23815                 MFLAG=SLAPD_MOD_STATIC
23816         fi
23817         cat >> confdefs.h <<EOF
23818 #define SLAPD_DNSSRV $MFLAG
23819 EOF
23820
23821 fi
23822
23823 if test "$ol_enable_hdb" != no ; then
23824         BUILD_SLAPD=yes
23825         BUILD_HDB=$ol_enable_hdb
23826         if test "$ol_enable_hdb" = mod ; then
23827                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23828                 MFLAG=SLAPD_MOD_DYNAMIC
23829         else
23830                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23831                 MFLAG=SLAPD_MOD_STATIC
23832         fi
23833         cat >> confdefs.h <<EOF
23834 #define SLAPD_HDB $MFLAG
23835 EOF
23836
23837 fi
23838
23839 if test "$ol_enable_ldap" != no ; then
23840         BUILD_SLAPD=yes
23841         BUILD_LDAP=$ol_enable_ldap
23842         if test "$ol_enable_ldap" = mod ; then
23843                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23844                 MFLAG=SLAPD_MOD_DYNAMIC
23845         else
23846                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23847                 MFLAG=SLAPD_MOD_STATIC
23848         fi
23849         cat >> confdefs.h <<EOF
23850 #define SLAPD_LDAP $MFLAG
23851 EOF
23852
23853 fi
23854
23855 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23856         BUILD_SLAPD=yes
23857         BUILD_LDBM=$ol_enable_ldbm
23858         if test "$ol_enable_ldbm" = mod ; then
23859                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23860                 MFLAG=SLAPD_MOD_DYNAMIC
23861         else
23862                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23863                 MFLAG=SLAPD_MOD_STATIC
23864         fi
23865         cat >> confdefs.h <<EOF
23866 #define SLAPD_LDBM $MFLAG
23867 EOF
23868
23869 fi
23870
23871 if test "$ol_enable_meta" != no ; then
23872         BUILD_SLAPD=yes
23873         BUILD_META=$ol_enable_meta
23874         BUILD_REWRITE=yes
23875         if test "$ol_enable_meta" = mod ; then
23876                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23877                 MFLAG=SLAPD_MOD_DYNAMIC
23878         else
23879                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23880                 MFLAG=SLAPD_MOD_STATIC
23881         fi
23882         cat >> confdefs.h <<EOF
23883 #define SLAPD_META $MFLAG
23884 EOF
23885
23886 fi
23887
23888 if test "$ol_enable_monitor" != no ; then
23889         BUILD_SLAPD=yes
23890         BUILD_MONITOR=$ol_enable_monitor
23891         if test "$ol_enable_monitor" = mod ; then
23892                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23893                 MFLAG=SLAPD_MOD_DYNAMIC
23894         else
23895                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23896                 MFLAG=SLAPD_MOD_STATIC
23897         fi
23898         cat >> confdefs.h <<EOF
23899 #define SLAPD_MONITOR $MFLAG
23900 EOF
23901
23902 fi
23903
23904 if test "$ol_enable_null" != no ; then
23905         BUILD_SLAPD=yes
23906         BUILD_NULL=$ol_enable_null
23907         if test "$ol_enable_null" = mod ; then
23908                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23909                 MFLAG=SLAPD_MOD_DYNAMIC
23910         else
23911                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23912                 MFLAG=SLAPD_MOD_STATIC
23913         fi
23914         cat >> confdefs.h <<EOF
23915 #define SLAPD_NULL $MFLAG
23916 EOF
23917
23918 fi
23919
23920 if test "$ol_enable_passwd" != no ; then
23921         BUILD_SLAPD=yes
23922         BUILD_PASSWD=$ol_enable_passwd
23923         if test "$ol_enable_passwd" = mod ; then
23924                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23925                 MFLAG=SLAPD_MOD_DYNAMIC
23926         else
23927                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23928                 MFLAG=SLAPD_MOD_STATIC
23929         fi
23930         cat >> confdefs.h <<EOF
23931 #define SLAPD_PASSWD $MFLAG
23932 EOF
23933
23934 fi
23935
23936 if test "$ol_link_perl" != no ; then
23937         BUILD_SLAPD=yes
23938         BUILD_PERL=$ol_enable_perl
23939         if test "$ol_enable_perl" = mod ; then
23940                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23941                 MFLAG=SLAPD_MOD_DYNAMIC
23942         else
23943                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23944                 MFLAG=SLAPD_MOD_STATIC
23945         fi
23946         cat >> confdefs.h <<EOF
23947 #define SLAPD_PERL $MFLAG
23948 EOF
23949
23950 fi
23951
23952 if test "$ol_enable_relay" != no ; then
23953         BUILD_SLAPD=yes
23954         BUILD_RELAY=$ol_enable_relay
23955         if test "$ol_enable_relay" = mod ; then
23956                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23957                 MFLAG=SLAPD_MOD_DYNAMIC
23958         else
23959                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23960                 MFLAG=SLAPD_MOD_STATIC
23961         fi
23962         cat >> confdefs.h <<EOF
23963 #define SLAPD_RELAY $MFLAG
23964 EOF
23965
23966 fi
23967
23968 if test "$ol_enable_shell" != no ; then
23969         if test "$ol_link_thread" != no ; then
23970                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23971         fi
23972         BUILD_SLAPD=yes
23973         BUILD_SHELL=$ol_enable_shell
23974         if test "$ol_enable_shell" = mod ; then
23975                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23976                 MFLAG=SLAPD_MOD_DYNAMIC
23977         else
23978                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23979                 MFLAG=SLAPD_MOD_STATIC
23980         fi
23981         cat >> confdefs.h <<EOF
23982 #define SLAPD_SHELL $MFLAG
23983 EOF
23984
23985 fi
23986
23987 if test "$ol_link_sql" != no ; then
23988         BUILD_SLAPD=yes
23989         BUILD_SQL=$ol_enable_sql
23990         if test "$ol_enable_sql" = mod; then
23991                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23992                 MFLAG=SLAPD_MOD_DYNAMIC
23993         else
23994                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23995                 MFLAG=SLAPD_MOD_STATIC
23996         fi
23997         cat >> confdefs.h <<EOF
23998 #define SLAPD_SQL $MFLAG
23999 EOF
24000
24001 fi
24002
24003 if test "$ol_enable_chain" != no ; then
24004         BUILD_CHAIN=$ol_enable_chain
24005         if test "$ol_enable_chain" = mod ; then
24006                 MFLAG=SLAPD_MOD_DYNAMIC
24007                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
24008         else
24009                 MFLAG=SLAPD_MOD_STATIC
24010         fi
24011         cat >> confdefs.h <<EOF
24012 #define SLAPD_OVER_CHAIN $MFLAG
24013 EOF
24014
24015 fi
24016
24017 if test "$ol_enable_denyop" != no ; then
24018         BUILD_DENYOP=$ol_enable_denyop
24019         if test "$ol_enable_denyop" = mod ; then
24020                 MFLAG=SLAPD_MOD_DYNAMIC
24021                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
24022         else
24023                 MFLAG=SLAPD_MOD_STATIC
24024         fi
24025         cat >> confdefs.h <<EOF
24026 #define SLAPD_OVER_DENYOP $MFLAG
24027 EOF
24028
24029 fi
24030
24031 if test "$ol_enable_dyngroup" != no ; then
24032         BUILD_DYNGROUP=$ol_enable_dyngroup
24033         if test "$ol_enable_dyngroup" = mod ; then
24034                 MFLAG=SLAPD_MOD_DYNAMIC
24035                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24036         else
24037                 MFLAG=SLAPD_MOD_STATIC
24038         fi
24039         cat >> confdefs.h <<EOF
24040 #define SLAPD_OVER_DYNGROUP $MFLAG
24041 EOF
24042
24043 fi
24044
24045 if test "$ol_enable_lastmod" != no ; then
24046         BUILD_LASTMOD=$ol_enable_lastmod
24047         if test "$ol_enable_lastmod" = mod ; then
24048                 MFLAG=SLAPD_MOD_DYNAMIC
24049                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
24050         else
24051                 MFLAG=SLAPD_MOD_STATIC
24052         fi
24053         cat >> confdefs.h <<EOF
24054 #define SLAPD_OVER_LASTMOD $MFLAG
24055 EOF
24056
24057 fi
24058
24059 if test "$ol_enable_ppolicy" != no ; then
24060         BUILD_PPOLICY=$ol_enable_ppolicy
24061         if test "$ol_enable_ppolicy" = mod ; then
24062                 MFLAG=SLAPD_MOD_DYNAMIC
24063                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24064         else
24065                 MFLAG=SLAPD_MOD_STATIC
24066         fi
24067         cat >> confdefs.h <<EOF
24068 #define SLAPD_OVER_PPOLICY $MFLAG
24069 EOF
24070
24071 fi
24072
24073 if test "$ol_enable_proxycache" != no ; then
24074         BUILD_PROXYCACHE=$ol_enable_proxycache
24075         if test "$ol_enable_proxycache" = mod ; then
24076                 MFLAG=SLAPD_MOD_DYNAMIC
24077                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24078         else
24079                 MFLAG=SLAPD_MOD_STATIC
24080         fi
24081         cat >> confdefs.h <<EOF
24082 #define SLAPD_OVER_PROXYCACHE $MFLAG
24083 EOF
24084
24085 fi
24086
24087 if test "$ol_enable_refint" != no ; then
24088         BUILD_REFINT=$ol_enable_refint
24089         if test "$ol_enable_refint" = mod ; then
24090                 MFLAG=SLAPD_MOD_DYNAMIC
24091                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24092         else
24093                 MFLAG=SLAPD_MOD_STATIC
24094         fi
24095         cat >> confdefs.h <<EOF
24096 #define SLAPD_OVER_REFINT $MFLAG
24097 EOF
24098
24099 fi
24100
24101 if test "$ol_enable_rwm" != no ; then
24102         BUILD_REWRITE=yes
24103         BUILD_RWM=$ol_enable_rwm
24104         if test "$ol_enable_rwm" = mod ; then
24105                 MFLAG=SLAPD_MOD_DYNAMIC
24106                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24107         else
24108                 MFLAG=SLAPD_MOD_STATIC
24109         fi
24110         cat >> confdefs.h <<EOF
24111 #define SLAPD_OVER_RWM $MFLAG
24112 EOF
24113
24114 fi
24115
24116 if test "$ol_enable_unique" != no ; then
24117         BUILD_UNIQUE=$ol_enable_unique
24118         if test "$ol_enable_unique" = mod ; then
24119                 MFLAG=SLAPD_MOD_DYNAMIC
24120                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24121         else
24122                 MFLAG=SLAPD_MOD_STATIC
24123         fi
24124         cat >> confdefs.h <<EOF
24125 #define SLAPD_OVER_UNIQUE $MFLAG
24126 EOF
24127
24128 fi
24129
24130 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24131         $BUILD_SLAPD = yes ; then
24132         BUILD_SLURPD=yes
24133 fi
24134
24135 if test "$ol_enable_rewrite" != no ; then
24136         cat >> confdefs.h <<\EOF
24137 #define ENABLE_REWRITE 1
24138 EOF
24139
24140         BUILD_REWRITE=yes
24141 fi
24142
24143 if test "$ol_enable_slapi" != no ; then
24144         cat >> confdefs.h <<\EOF
24145 #define ENABLE_SLAPI 1
24146 EOF
24147
24148         BUILD_SLAPI=yes
24149         SLAPD_SLAPI_DEPEND=libslapi.a
24150 fi
24151
24152
24153
24154 if test "$ac_cv_mingw32" = yes ; then
24155         PLAT=NT
24156         SLAPD_MODULES_LDFLAGS=
24157 else
24158         PLAT=UNIX
24159 fi
24160
24161 if test -z "$SLAPD_STATIC_BACKENDS"; then
24162         SLAPD_NO_STATIC='#'
24163 else
24164         SLAPD_NO_STATIC=
24165 fi
24166
24167
24168
24169
24170
24171
24172
24173
24174   
24175   
24176   
24177   
24178   
24179   
24180   
24181   
24182   
24183   
24184   
24185   
24186   
24187   
24188   
24189   
24190   
24191   
24192   
24193   
24194   
24195   
24196   
24197   
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237 # Check whether --with-xxinstall or --without-xxinstall was given.
24238 if test "${with_xxinstall+set}" = set; then
24239   withval="$with_xxinstall"
24240   :
24241 fi
24242
24243
24244
24245 trap '' 1 2 15
24246
24247 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24248
24249 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24250 # Let make expand exec_prefix.
24251 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24252
24253 # Any assignment to VPATH causes Sun make to only execute
24254 # the first set of double-colon rules, so remove it if not needed.
24255 # If there is a colon in the path, we need to keep it.
24256 if test "x$srcdir" = x.; then
24257   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24258 fi
24259
24260 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24261
24262 DEFS=-DHAVE_CONFIG_H
24263
24264 # Without the "./", some shells look in PATH for config.status.
24265 : ${CONFIG_STATUS=./config.status}
24266
24267 echo creating $CONFIG_STATUS
24268 rm -f $CONFIG_STATUS
24269 cat > $CONFIG_STATUS <<EOF
24270 #! /bin/sh
24271 # Generated automatically by configure.
24272 # Run this file to recreate the current configuration.
24273 # This directory was configured as follows,
24274 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24275 #
24276 # $0 $ac_configure_args
24277 #
24278 # Compiler output produced by configure, useful for debugging
24279 # configure, is in ./config.log if it exists.
24280
24281 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24282 for ac_option
24283 do
24284   case "\$ac_option" in
24285   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24286     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24287     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24288   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24289     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24290     exit 0 ;;
24291   -help | --help | --hel | --he | --h)
24292     echo "\$ac_cs_usage"; exit 0 ;;
24293   *) echo "\$ac_cs_usage"; exit 1 ;;
24294   esac
24295 done
24296
24297 ac_given_srcdir=$srcdir
24298 ac_given_INSTALL="$INSTALL"
24299
24300 trap 'rm -fr `echo "\
24301 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24302 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24303 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24304 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24305 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24306 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24307 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24308 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24309 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24310 include/Makefile:build/top.mk:include/Makefile.in \
24311 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24312 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24313 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24314 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24315 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24316 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24317 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24318 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24319 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24320 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24321 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24322 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24323 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24324 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24325 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24326 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24327 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24328 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24329 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24330 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24331 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24332 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24333 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24334 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24335 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24336 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24337 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24338 tests/run \
24339 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24340  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24341 EOF
24342 cat >> $CONFIG_STATUS <<EOF
24343
24344 # Protect against being on the right side of a sed subst in config.status.
24345 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24346  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24347 $ac_vpsub
24348 $extrasub
24349 s%@SHELL@%$SHELL%g
24350 s%@CFLAGS@%$CFLAGS%g
24351 s%@CPPFLAGS@%$CPPFLAGS%g
24352 s%@CXXFLAGS@%$CXXFLAGS%g
24353 s%@FFLAGS@%$FFLAGS%g
24354 s%@DEFS@%$DEFS%g
24355 s%@LDFLAGS@%$LDFLAGS%g
24356 s%@LIBS@%$LIBS%g
24357 s%@exec_prefix@%$exec_prefix%g
24358 s%@prefix@%$prefix%g
24359 s%@program_transform_name@%$program_transform_name%g
24360 s%@bindir@%$bindir%g
24361 s%@sbindir@%$sbindir%g
24362 s%@libexecdir@%$libexecdir%g
24363 s%@datadir@%$datadir%g
24364 s%@sysconfdir@%$sysconfdir%g
24365 s%@sharedstatedir@%$sharedstatedir%g
24366 s%@localstatedir@%$localstatedir%g
24367 s%@libdir@%$libdir%g
24368 s%@includedir@%$includedir%g
24369 s%@oldincludedir@%$oldincludedir%g
24370 s%@infodir@%$infodir%g
24371 s%@mandir@%$mandir%g
24372 s%@host@%$host%g
24373 s%@host_alias@%$host_alias%g
24374 s%@host_cpu@%$host_cpu%g
24375 s%@host_vendor@%$host_vendor%g
24376 s%@host_os@%$host_os%g
24377 s%@target@%$target%g
24378 s%@target_alias@%$target_alias%g
24379 s%@target_cpu@%$target_cpu%g
24380 s%@target_vendor@%$target_vendor%g
24381 s%@target_os@%$target_os%g
24382 s%@build@%$build%g
24383 s%@build_alias@%$build_alias%g
24384 s%@build_cpu@%$build_cpu%g
24385 s%@build_vendor@%$build_vendor%g
24386 s%@build_os@%$build_os%g
24387 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24388 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24389 s%@INSTALL_DATA@%$INSTALL_DATA%g
24390 s%@PACKAGE@%$PACKAGE%g
24391 s%@VERSION@%$VERSION%g
24392 s%@ACLOCAL@%$ACLOCAL%g
24393 s%@AUTOCONF@%$AUTOCONF%g
24394 s%@AUTOMAKE@%$AUTOMAKE%g
24395 s%@AUTOHEADER@%$AUTOHEADER%g
24396 s%@MAKEINFO@%$MAKEINFO%g
24397 s%@install_sh@%$install_sh%g
24398 s%@AMTAR@%$AMTAR%g
24399 s%@AWK@%$AWK%g
24400 s%@AMTARFLAGS@%$AMTARFLAGS%g
24401 s%@SET_MAKE@%$SET_MAKE%g
24402 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24403 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24404 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24405 s%@top_builddir@%$top_builddir%g
24406 s%@ldap_subdir@%$ldap_subdir%g
24407 s%@CC@%$CC%g
24408 s%@AR@%$AR%g
24409 s%@LN_S@%$LN_S%g
24410 s%@OBJEXT@%$OBJEXT%g
24411 s%@EXEEXT@%$EXEEXT%g
24412 s%@ECHO@%$ECHO%g
24413 s%@RANLIB@%$RANLIB%g
24414 s%@STRIP@%$STRIP%g
24415 s%@DLLTOOL@%$DLLTOOL%g
24416 s%@AS@%$AS%g
24417 s%@OBJDUMP@%$OBJDUMP%g
24418 s%@CPP@%$CPP%g
24419 s%@LIBTOOL@%$LIBTOOL%g
24420 s%@PERLBIN@%$PERLBIN%g
24421 s%@OL_MKDEP@%$OL_MKDEP%g
24422 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24423 s%@LTSTATIC@%$LTSTATIC%g
24424 s%@LIBOBJS@%$LIBOBJS%g
24425 s%@LIBSRCS@%$LIBSRCS%g
24426 s%@PLAT@%$PLAT%g
24427 s%@WITH_SASL@%$WITH_SASL%g
24428 s%@WITH_TLS@%$WITH_TLS%g
24429 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24430 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24431 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24432 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24433 s%@BUILD_BDB@%$BUILD_BDB%g
24434 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24435 s%@BUILD_HDB@%$BUILD_HDB%g
24436 s%@BUILD_LDAP@%$BUILD_LDAP%g
24437 s%@BUILD_LDBM@%$BUILD_LDBM%g
24438 s%@BUILD_META@%$BUILD_META%g
24439 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24440 s%@BUILD_NULL@%$BUILD_NULL%g
24441 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24442 s%@BUILD_RELAY@%$BUILD_RELAY%g
24443 s%@BUILD_PERL@%$BUILD_PERL%g
24444 s%@BUILD_SHELL@%$BUILD_SHELL%g
24445 s%@BUILD_SQL@%$BUILD_SQL%g
24446 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24447 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24448 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24449 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24450 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24451 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24452 s%@BUILD_REFINT@%$BUILD_REFINT%g
24453 s%@BUILD_RWM@%$BUILD_RWM%g
24454 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24455 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24456 s%@LDAP_LIBS@%$LDAP_LIBS%g
24457 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24458 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24459 s%@LDBM_LIBS@%$LDBM_LIBS%g
24460 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24461 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24462 s%@WRAP_LIBS@%$WRAP_LIBS%g
24463 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24464 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24465 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24466 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24467 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24468 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24469 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24470 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24471 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24472 s%@KRB4_LIBS@%$KRB4_LIBS%g
24473 s%@KRB5_LIBS@%$KRB5_LIBS%g
24474 s%@SASL_LIBS@%$SASL_LIBS%g
24475 s%@TLS_LIBS@%$TLS_LIBS%g
24476 s%@MODULES_LIBS@%$MODULES_LIBS%g
24477 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24478 s%@LIBSLAPI@%$LIBSLAPI%g
24479 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24480 s%@AUTH_LIBS@%$AUTH_LIBS%g
24481 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24482 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
24483 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24484 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24485 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24486
24487 CEOF
24488 EOF
24489
24490 cat >> $CONFIG_STATUS <<\EOF
24491
24492 # Split the substitutions into bite-sized pieces for seds with
24493 # small command number limits, like on Digital OSF/1 and HP-UX.
24494 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24495 ac_file=1 # Number of current file.
24496 ac_beg=1 # First line for current file.
24497 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24498 ac_more_lines=:
24499 ac_sed_cmds=""
24500 while $ac_more_lines; do
24501   if test $ac_beg -gt 1; then
24502     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24503   else
24504     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24505   fi
24506   if test ! -s conftest.s$ac_file; then
24507     ac_more_lines=false
24508     rm -f conftest.s$ac_file
24509   else
24510     if test -z "$ac_sed_cmds"; then
24511       ac_sed_cmds="sed -f conftest.s$ac_file"
24512     else
24513       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24514     fi
24515     ac_file=`expr $ac_file + 1`
24516     ac_beg=$ac_end
24517     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24518   fi
24519 done
24520 if test -z "$ac_sed_cmds"; then
24521   ac_sed_cmds=cat
24522 fi
24523 EOF
24524
24525 cat >> $CONFIG_STATUS <<EOF
24526
24527 CONFIG_FILES=\${CONFIG_FILES-"\
24528 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24529 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24530 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24531 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24532 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24533 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24534 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24535 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24536 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24537 include/Makefile:build/top.mk:include/Makefile.in \
24538 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24539 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24540 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24541 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24542 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24543 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24544 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24545 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24546 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24547 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24548 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24549 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24550 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24551 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24552 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24553 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24554 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24555 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24556 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24557 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24558 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24559 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24560 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24561 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24562 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24563 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24564 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24565 tests/run \
24566 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24567 "}
24568 EOF
24569 cat >> $CONFIG_STATUS <<\EOF
24570 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24571   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24572   case "$ac_file" in
24573   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24574        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24575   *) ac_file_in="${ac_file}.in" ;;
24576   esac
24577
24578   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24579
24580   # Remove last slash and all that follows it.  Not all systems have dirname.
24581   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24582   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24583     # The file is in a subdirectory.
24584     test ! -d "$ac_dir" && mkdir "$ac_dir"
24585     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24586     # A "../" for each directory in $ac_dir_suffix.
24587     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24588   else
24589     ac_dir_suffix= ac_dots=
24590   fi
24591
24592   case "$ac_given_srcdir" in
24593   .)  srcdir=.
24594       if test -z "$ac_dots"; then top_srcdir=.
24595       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24596   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24597   *) # Relative path.
24598     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24599     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24600   esac
24601
24602   case "$ac_given_INSTALL" in
24603   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24604   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24605   esac
24606
24607   echo creating "$ac_file"
24608   rm -f "$ac_file"
24609   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24610   case "$ac_file" in
24611   *[Mm]akefile*) ac_comsub="1i\\
24612 # $configure_input" ;;
24613   *) ac_comsub= ;;
24614   esac
24615
24616   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24617   sed -e "$ac_comsub
24618 s%@configure_input@%$configure_input%g
24619 s%@srcdir@%$srcdir%g
24620 s%@top_srcdir@%$top_srcdir%g
24621 s%@INSTALL@%$INSTALL%g
24622 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24623 fi; done
24624 rm -f conftest.s*
24625
24626 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24627 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24628 #
24629 # ac_d sets the value in "#define NAME VALUE" lines.
24630 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24631 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24632 ac_dC='\3'
24633 ac_dD='%g'
24634 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24635 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24636 ac_uB='\([      ]\)%\1#\2define\3'
24637 ac_uC=' '
24638 ac_uD='\4%g'
24639 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24640 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24641 ac_eB='$%\1#\2define\3'
24642 ac_eC=' '
24643 ac_eD='%g'
24644
24645 if test "${CONFIG_HEADERS+set}" != set; then
24646 EOF
24647 cat >> $CONFIG_STATUS <<EOF
24648   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24649 EOF
24650 cat >> $CONFIG_STATUS <<\EOF
24651 fi
24652 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24653   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24654   case "$ac_file" in
24655   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24656        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24657   *) ac_file_in="${ac_file}.in" ;;
24658   esac
24659
24660   echo creating $ac_file
24661
24662   rm -f conftest.frag conftest.in conftest.out
24663   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24664   cat $ac_file_inputs > conftest.in
24665
24666 EOF
24667
24668 # Transform confdefs.h into a sed script conftest.vals that substitutes
24669 # the proper values into config.h.in to produce config.h.  And first:
24670 # Protect against being on the right side of a sed subst in config.status.
24671 # Protect against being in an unquoted here document in config.status.
24672 rm -f conftest.vals
24673 cat > conftest.hdr <<\EOF
24674 s/[\\&%]/\\&/g
24675 s%[\\$`]%\\&%g
24676 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24677 s%ac_d%ac_u%gp
24678 s%ac_u%ac_e%gp
24679 EOF
24680 sed -n -f conftest.hdr confdefs.h > conftest.vals
24681 rm -f conftest.hdr
24682
24683 # This sed command replaces #undef with comments.  This is necessary, for
24684 # example, in the case of _POSIX_SOURCE, which is predefined and required
24685 # on some systems where configure will not decide to define it.
24686 cat >> conftest.vals <<\EOF
24687 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24688 EOF
24689
24690 # Break up conftest.vals because some shells have a limit on
24691 # the size of here documents, and old seds have small limits too.
24692
24693 rm -f conftest.tail
24694 while :
24695 do
24696   ac_lines=`grep -c . conftest.vals`
24697   # grep -c gives empty output for an empty file on some AIX systems.
24698   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24699   # Write a limited-size here document to conftest.frag.
24700   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24701   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24702   echo 'CEOF
24703   sed -f conftest.frag conftest.in > conftest.out
24704   rm -f conftest.in
24705   mv conftest.out conftest.in
24706 ' >> $CONFIG_STATUS
24707   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24708   rm -f conftest.vals
24709   mv conftest.tail conftest.vals
24710 done
24711 rm -f conftest.vals
24712
24713 cat >> $CONFIG_STATUS <<\EOF
24714   rm -f conftest.frag conftest.h
24715   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24716   cat conftest.in >> conftest.h
24717   rm -f conftest.in
24718   if cmp -s $ac_file conftest.h 2>/dev/null; then
24719     echo "$ac_file is unchanged"
24720     rm -f conftest.h
24721   else
24722     # Remove last slash and all that follows it.  Not all systems have dirname.
24723       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24724       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24725       # The file is in a subdirectory.
24726       test ! -d "$ac_dir" && mkdir "$ac_dir"
24727     fi
24728     rm -f $ac_file
24729     mv conftest.h $ac_file
24730   fi
24731 fi; done
24732
24733 EOF
24734 cat >> $CONFIG_STATUS <<EOF
24735
24736 EOF
24737 cat >> $CONFIG_STATUS <<\EOF
24738
24739 chmod +x tests/run
24740 date > stamp-h
24741 echo Please run \"make depend\" to build dependencies
24742
24743 exit 0
24744 EOF
24745 chmod +x $CONFIG_STATUS
24746 rm -fr confdefs* $ac_clean_files
24747 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24748