]> git.sur5r.net Git - openldap/blob - configure
9f22f6bcc90731d84b2c7d592c2a28b86510305f
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.539 2004/04/19 19:36:53 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-backends     enable all available backends no|yes|mod [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
99 ac_help="$ac_help
100       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend no|yes|mod [no]"
105 ac_help="$ac_help
106     --enable-monitor      enable monitor backend no|yes|mod [yes]"
107 ac_help="$ac_help
108     --enable-null         enable null backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-relay        enable relay backend no|yes|mod [yes]"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLAPD Overlay Options:"
122 ac_help="$ac_help
123     --enable-overlays     enable all available overlays no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-chain        LDAP Chain Response no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
142 ac_help="$ac_help
143
144 SLURPD (Replication Daemon) Options:"
145 ac_help="$ac_help
146   --enable-slurpd         enable building slurpd [auto]"
147 ac_help="$ac_help
148
149 Library Generation & Linking Options"
150 ac_help="$ac_help
151   --enable-static[=PKGS]  build static libraries [default=yes]"
152 ac_help="$ac_help
153   --enable-shared[=PKGS]  build shared libraries [default=yes]"
154 ac_help="$ac_help
155   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
156 ac_help="$ac_help
157   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
158
159 # Find the correct PATH separator.  Usually this is `:', but
160 # DJGPP uses `;' like DOS.
161 if test "X${PATH_SEPARATOR+set}" != Xset; then
162   UNAME=${UNAME-`uname 2>/dev/null`}
163   case X$UNAME in
164     *-DOS) lt_cv_sys_path_separator=';' ;;
165     *)     lt_cv_sys_path_separator=':' ;;
166   esac
167   PATH_SEPARATOR=$lt_cv_sys_path_separator
168 fi
169
170
171 # Check that we are running under the correct shell.
172 SHELL=${CONFIG_SHELL-/bin/sh}
173
174 case X$ECHO in
175 X*--fallback-echo)
176   # Remove one level of quotation (which was required for Make).
177   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
178   ;;
179 esac
180
181 echo=${ECHO-echo}
182 if test "X$1" = X--no-reexec; then
183   # Discard the --no-reexec flag, and continue.
184   shift
185 elif test "X$1" = X--fallback-echo; then
186   # Avoid inline document here, it may be left over
187   :
188 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
189   # Yippee, $echo works!
190   :
191 else
192   # Restart under the correct shell.
193   exec $SHELL "$0" --no-reexec ${1+"$@"}
194 fi
195
196 if test "X$1" = X--fallback-echo; then
197   # used as fallback echo
198   shift
199   cat <<EOF
200
201 EOF
202   exit 0
203 fi
204
205 # The HP-UX ksh and POSIX shell print the target directory to stdout
206 # if CDPATH is set.
207 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
208
209 if test -z "$ECHO"; then
210 if test "X${echo_test_string+set}" != Xset; then
211 # find a string as large as possible, as long as the shell can cope with it
212   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
213     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
214     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
215        echo_test_string="`eval $cmd`" &&
216        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
217     then
218       break
219     fi
220   done
221 fi
222
223 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
224    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
225    test "X$echo_testing_string" = "X$echo_test_string"; then
226   :
227 else
228   # The Solaris, AIX, and Digital Unix default echo programs unquote
229   # backslashes.  This makes it impossible to quote backslashes using
230   #   echo "$something" | sed 's/\\/\\\\/g'
231   #
232   # So, first we look for a working echo in the user's PATH.
233
234   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
235   for dir in $PATH /usr/ucb; do
236     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
237        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
238        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
239        test "X$echo_testing_string" = "X$echo_test_string"; then
240       echo="$dir/echo"
241       break
242     fi
243   done
244   IFS="$save_ifs"
245
246   if test "X$echo" = Xecho; then
247     # We didn't find a better echo, so look for alternatives.
248     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
249        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
250        test "X$echo_testing_string" = "X$echo_test_string"; then
251       # This shell has a builtin print -r that does the trick.
252       echo='print -r'
253     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
254          test "X$CONFIG_SHELL" != X/bin/ksh; then
255       # If we have ksh, try running configure again with it.
256       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
257       export ORIGINAL_CONFIG_SHELL
258       CONFIG_SHELL=/bin/ksh
259       export CONFIG_SHELL
260       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
261     else
262       # Try using printf.
263       echo='printf %s\n'
264       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
265          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
266          test "X$echo_testing_string" = "X$echo_test_string"; then
267         # Cool, printf works
268         :
269       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
270            test "X$echo_testing_string" = 'X\t' &&
271            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
272            test "X$echo_testing_string" = "X$echo_test_string"; then
273         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
274         export CONFIG_SHELL
275         SHELL="$CONFIG_SHELL"
276         export SHELL
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
279            test "X$echo_testing_string" = 'X\t' &&
280            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
281            test "X$echo_testing_string" = "X$echo_test_string"; then
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       else
284         # maybe with a smaller string...
285         prev=:
286
287         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
288           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
289           then
290             break
291           fi
292           prev="$cmd"
293         done
294
295         if test "$prev" != 'sed 50q "$0"'; then
296           echo_test_string=`eval $prev`
297           export echo_test_string
298           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
299         else
300           # Oops.  We lost completely, so just stick with echo.
301           echo=echo
302         fi
303       fi
304     fi
305   fi
306 fi
307 fi
308
309 # Copy echo and quote the copy suitably for passing to libtool from
310 # the Makefile, instead of quoting the original, which is used later.
311 ECHO=$echo
312 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
313    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
314 fi
315
316
317 ac_help="$ac_help
318   --disable-libtool-lock  avoid locking (might break parallel builds)"
319 ac_help="$ac_help
320   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
321 ac_help="$ac_help
322
323 See INSTALL file for further details."
324
325 # Initialize some variables set by options.
326 # The variables have the same names as the options, with
327 # dashes changed to underlines.
328 build=NONE
329 cache_file=./config.cache
330 exec_prefix=NONE
331 host=NONE
332 no_create=
333 nonopt=NONE
334 no_recursion=
335 prefix=NONE
336 program_prefix=NONE
337 program_suffix=NONE
338 program_transform_name=s,x,x,
339 silent=
340 site=
341 srcdir=
342 target=NONE
343 verbose=
344 x_includes=NONE
345 x_libraries=NONE
346 bindir='${exec_prefix}/bin'
347 sbindir='${exec_prefix}/sbin'
348 libexecdir='${exec_prefix}/libexec'
349 datadir='${prefix}/share'
350 sysconfdir='${prefix}/etc'
351 sharedstatedir='${prefix}/com'
352 localstatedir='${prefix}/var'
353 libdir='${exec_prefix}/lib'
354 includedir='${prefix}/include'
355 oldincludedir='/usr/include'
356 infodir='${prefix}/info'
357 mandir='${prefix}/man'
358
359 # Initialize some other variables.
360 subdirs=
361 MFLAGS= MAKEFLAGS=
362 SHELL=${CONFIG_SHELL-/bin/sh}
363 # Maximum number of lines to put in a shell here document.
364 ac_max_here_lines=12
365
366 ac_prev=
367 for ac_option
368 do
369
370   # If the previous option needs an argument, assign it.
371   if test -n "$ac_prev"; then
372     eval "$ac_prev=\$ac_option"
373     ac_prev=
374     continue
375   fi
376
377   case "$ac_option" in
378   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
379   *) ac_optarg= ;;
380   esac
381
382   # Accept the important Cygnus configure options, so we can diagnose typos.
383
384   case "$ac_option" in
385
386   -bindir | --bindir | --bindi | --bind | --bin | --bi)
387     ac_prev=bindir ;;
388   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
389     bindir="$ac_optarg" ;;
390
391   -build | --build | --buil | --bui | --bu)
392     ac_prev=build ;;
393   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
394     build="$ac_optarg" ;;
395
396   -cache-file | --cache-file | --cache-fil | --cache-fi \
397   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
398     ac_prev=cache_file ;;
399   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
400   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
401     cache_file="$ac_optarg" ;;
402
403   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
404     ac_prev=datadir ;;
405   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
406   | --da=*)
407     datadir="$ac_optarg" ;;
408
409   -disable-* | --disable-*)
410     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
411     # Reject names that are not valid shell variable names.
412     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
413       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
414     fi
415     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
416     eval "enable_${ac_feature}=no" ;;
417
418   -enable-* | --enable-*)
419     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
422       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
423     fi
424     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
425     case "$ac_option" in
426       *=*) ;;
427       *) ac_optarg=yes ;;
428     esac
429     eval "enable_${ac_feature}='$ac_optarg'" ;;
430
431   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
432   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
433   | --exec | --exe | --ex)
434     ac_prev=exec_prefix ;;
435   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
436   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
437   | --exec=* | --exe=* | --ex=*)
438     exec_prefix="$ac_optarg" ;;
439
440   -gas | --gas | --ga | --g)
441     # Obsolete; use --with-gas.
442     with_gas=yes ;;
443
444   -help | --help | --hel | --he)
445     # Omit some internal or obsolete options to make the list less imposing.
446     # This message is too long to be a string in the A/UX 3.1 sh.
447     cat << EOF
448 Usage: configure [options] [host]
449 Options: [defaults in brackets after descriptions]
450 Configuration:
451   --cache-file=FILE       cache test results in FILE
452   --help                  print this message
453   --no-create             do not create output files
454   --quiet, --silent       do not print \`checking...' messages
455   --version               print the version of autoconf that created configure
456 Directory and file names:
457   --prefix=PREFIX         install architecture-independent files in PREFIX
458                           [$ac_default_prefix]
459   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
460                           [same as prefix]
461   --bindir=DIR            user executables in DIR [EPREFIX/bin]
462   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
463   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
464   --datadir=DIR           read-only architecture-independent data in DIR
465                           [PREFIX/share]
466   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
467   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
468                           [PREFIX/com]
469   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
470   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
471   --includedir=DIR        C header files in DIR [PREFIX/include]
472   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
473   --infodir=DIR           info documentation in DIR [PREFIX/info]
474   --mandir=DIR            man documentation in DIR [PREFIX/man]
475   --srcdir=DIR            find the sources in DIR [configure dir or ..]
476   --program-prefix=PREFIX prepend PREFIX to installed program names
477   --program-suffix=SUFFIX append SUFFIX to installed program names
478   --program-transform-name=PROGRAM
479                           run sed PROGRAM on installed program names
480 EOF
481     cat << EOF
482 Host type:
483   --build=BUILD           configure for building on BUILD [BUILD=HOST]
484   --host=HOST             configure for HOST [guessed]
485   --target=TARGET         configure for TARGET [TARGET=HOST]
486 Features and packages:
487   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
488   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
489   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
490   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
491   --x-includes=DIR        X include files are in DIR
492   --x-libraries=DIR       X library files are in DIR
493 EOF
494     if test -n "$ac_help"; then
495       echo "--enable and --with options recognized:$ac_help"
496     fi
497     exit 0 ;;
498
499   -host | --host | --hos | --ho)
500     ac_prev=host ;;
501   -host=* | --host=* | --hos=* | --ho=*)
502     host="$ac_optarg" ;;
503
504   -includedir | --includedir | --includedi | --included | --include \
505   | --includ | --inclu | --incl | --inc)
506     ac_prev=includedir ;;
507   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
508   | --includ=* | --inclu=* | --incl=* | --inc=*)
509     includedir="$ac_optarg" ;;
510
511   -infodir | --infodir | --infodi | --infod | --info | --inf)
512     ac_prev=infodir ;;
513   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
514     infodir="$ac_optarg" ;;
515
516   -libdir | --libdir | --libdi | --libd)
517     ac_prev=libdir ;;
518   -libdir=* | --libdir=* | --libdi=* | --libd=*)
519     libdir="$ac_optarg" ;;
520
521   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
522   | --libexe | --libex | --libe)
523     ac_prev=libexecdir ;;
524   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
525   | --libexe=* | --libex=* | --libe=*)
526     libexecdir="$ac_optarg" ;;
527
528   -localstatedir | --localstatedir | --localstatedi | --localstated \
529   | --localstate | --localstat | --localsta | --localst \
530   | --locals | --local | --loca | --loc | --lo)
531     ac_prev=localstatedir ;;
532   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
533   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
534   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
535     localstatedir="$ac_optarg" ;;
536
537   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
538     ac_prev=mandir ;;
539   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
540     mandir="$ac_optarg" ;;
541
542   -nfp | --nfp | --nf)
543     # Obsolete; use --without-fp.
544     with_fp=no ;;
545
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c)
548     no_create=yes ;;
549
550   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
551   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
552     no_recursion=yes ;;
553
554   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
555   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
556   | --oldin | --oldi | --old | --ol | --o)
557     ac_prev=oldincludedir ;;
558   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
559   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
560   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
561     oldincludedir="$ac_optarg" ;;
562
563   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
564     ac_prev=prefix ;;
565   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
566     prefix="$ac_optarg" ;;
567
568   -program-prefix | --program-prefix | --program-prefi | --program-pref \
569   | --program-pre | --program-pr | --program-p)
570     ac_prev=program_prefix ;;
571   -program-prefix=* | --program-prefix=* | --program-prefi=* \
572   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
573     program_prefix="$ac_optarg" ;;
574
575   -program-suffix | --program-suffix | --program-suffi | --program-suff \
576   | --program-suf | --program-su | --program-s)
577     ac_prev=program_suffix ;;
578   -program-suffix=* | --program-suffix=* | --program-suffi=* \
579   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
580     program_suffix="$ac_optarg" ;;
581
582   -program-transform-name | --program-transform-name \
583   | --program-transform-nam | --program-transform-na \
584   | --program-transform-n | --program-transform- \
585   | --program-transform | --program-transfor \
586   | --program-transfo | --program-transf \
587   | --program-trans | --program-tran \
588   | --progr-tra | --program-tr | --program-t)
589     ac_prev=program_transform_name ;;
590   -program-transform-name=* | --program-transform-name=* \
591   | --program-transform-nam=* | --program-transform-na=* \
592   | --program-transform-n=* | --program-transform-=* \
593   | --program-transform=* | --program-transfor=* \
594   | --program-transfo=* | --program-transf=* \
595   | --program-trans=* | --program-tran=* \
596   | --progr-tra=* | --program-tr=* | --program-t=*)
597     program_transform_name="$ac_optarg" ;;
598
599   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
600   | -silent | --silent | --silen | --sile | --sil)
601     silent=yes ;;
602
603   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
604     ac_prev=sbindir ;;
605   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
606   | --sbi=* | --sb=*)
607     sbindir="$ac_optarg" ;;
608
609   -sharedstatedir | --sharedstatedir | --sharedstatedi \
610   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
611   | --sharedst | --shareds | --shared | --share | --shar \
612   | --sha | --sh)
613     ac_prev=sharedstatedir ;;
614   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
615   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
616   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
617   | --sha=* | --sh=*)
618     sharedstatedir="$ac_optarg" ;;
619
620   -site | --site | --sit)
621     ac_prev=site ;;
622   -site=* | --site=* | --sit=*)
623     site="$ac_optarg" ;;
624
625   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
626     ac_prev=srcdir ;;
627   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
628     srcdir="$ac_optarg" ;;
629
630   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
631   | --syscon | --sysco | --sysc | --sys | --sy)
632     ac_prev=sysconfdir ;;
633   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
634   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
635     sysconfdir="$ac_optarg" ;;
636
637   -target | --target | --targe | --targ | --tar | --ta | --t)
638     ac_prev=target ;;
639   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
640     target="$ac_optarg" ;;
641
642   -v | -verbose | --verbose | --verbos | --verbo | --verb)
643     verbose=yes ;;
644
645   -version | --version | --versio | --versi | --vers)
646     echo "configure generated by autoconf version 2.13.1"
647     exit 0 ;;
648
649   -with-* | --with-*)
650     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
651     # Reject names that are not valid shell variable names.
652     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
653       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
654     fi
655     ac_package=`echo $ac_package| sed 's/-/_/g'`
656     case "$ac_option" in
657       *=*) ;;
658       *) ac_optarg=yes ;;
659     esac
660     eval "with_${ac_package}='$ac_optarg'" ;;
661
662   -without-* | --without-*)
663     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     eval "with_${ac_package}=no" ;;
670
671   --x)
672     # Obsolete; use --with-x.
673     with_x=yes ;;
674
675   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
676   | --x-incl | --x-inc | --x-in | --x-i)
677     ac_prev=x_includes ;;
678   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
679   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
680     x_includes="$ac_optarg" ;;
681
682   -x-libraries | --x-libraries | --x-librarie | --x-librari \
683   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
684     ac_prev=x_libraries ;;
685   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
686   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
687     x_libraries="$ac_optarg" ;;
688
689   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
690     ;;
691
692   *)
693     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
694       echo "configure: warning: $ac_option: invalid host type" 1>&2
695     fi
696     if test "x$nonopt" != xNONE; then
697       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
698     fi
699     nonopt="$ac_option"
700     ;;
701
702   esac
703 done
704
705 if test -n "$ac_prev"; then
706   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
707 fi
708
709 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
710
711 # File descriptor usage:
712 # 0 standard input
713 # 1 file creation
714 # 2 errors and warnings
715 # 3 some systems may open it to /dev/tty
716 # 4 used on the Kubota Titan
717 # 6 checking for... messages and results
718 # 5 compiler messages saved in config.log
719 if test "$silent" = yes; then
720   exec 6>/dev/null
721 else
722   exec 6>&1
723 fi
724 exec 5>./config.log
725
726 echo "\
727 This file contains any messages produced by compilers while
728 running configure, to aid debugging if configure makes a mistake.
729 " 1>&5
730
731 # Strip out --no-create and --no-recursion so they do not pile up.
732 # Also quote any args containing shell metacharacters.
733 ac_configure_args=
734 for ac_arg
735 do
736   case "$ac_arg" in
737   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
738   | --no-cr | --no-c) ;;
739   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
740   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
741   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
742   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
743   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
744   esac
745 done
746
747 # NLS nuisances.
748 # Only set these to C if already set.  These must not be set unconditionally
749 # because not all systems understand e.g. LANG=C (notably SCO).
750 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
751 # Non-C LC_CTYPE values break the ctype check.
752 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
753 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
754 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
755 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
756
757 # confdefs.h avoids OS command line length limits that DEFS can exceed.
758 rm -rf conftest* confdefs.h
759 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
760 echo > confdefs.h
761
762 # A filename unique to this package, relative to the directory that
763 # configure is in, which we can look for to find out if srcdir is correct.
764 ac_unique_file=build/version.sh
765
766 # Find the source files, if location was not specified.
767 if test -z "$srcdir"; then
768   ac_srcdir_defaulted=yes
769   # Try the directory containing this script, then its parent.
770   ac_prog=$0
771   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
772   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
773   srcdir=$ac_confdir
774   if test ! -r $srcdir/$ac_unique_file; then
775     srcdir=..
776   fi
777 else
778   ac_srcdir_defaulted=no
779 fi
780 if test ! -r $srcdir/$ac_unique_file; then
781   if test "$ac_srcdir_defaulted" = yes; then
782     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
783   else
784     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
785   fi
786 fi
787 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
788
789 # Prefer explicitly selected file to automatically selected ones.
790 if test -z "$CONFIG_SITE"; then
791   if test "x$prefix" != xNONE; then
792     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
793   else
794     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
795   fi
796 fi
797 for ac_site_file in $CONFIG_SITE; do
798   if test -r "$ac_site_file"; then
799     echo "loading site script $ac_site_file"
800     . "$ac_site_file"
801   fi
802 done
803
804
805 ac_ext=c
806 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
807 ac_cpp='$CPP $CPPFLAGS'
808 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
809 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
810 cross_compiling=$ac_cv_prog_cc_cross
811
812 ac_exeext=
813 ac_objext=o
814 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
815   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
816   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
817     ac_n= ac_c='
818 ' ac_t='        '
819   else
820     ac_n=-n ac_c= ac_t=
821   fi
822 else
823   ac_n= ac_c='\c' ac_t=
824 fi
825
826
827 # set unset (borrowed from autoconf 2.49c)
828 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
829   ol_unset=unset
830 else
831   ol_unset=false
832 fi
833 # unset CDPATH
834 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
835
836 ac_aux_dir=
837 for ac_dir in build $srcdir/build; do
838   if test -f $ac_dir/install-sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install-sh -c"
841     break
842   elif test -f $ac_dir/install.sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install.sh -c"
845     break
846   elif test -f $ac_dir/shtool; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/shtool install -c"
849     break
850   fi
851 done
852 if test -z "$ac_aux_dir"; then
853   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
854 fi
855 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
856 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
857 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
858
859 eval `$ac_aux_dir/version.sh`
860 if test -z "$OL_STRING"; then
861         { echo "configure: error: could not determine version" 1>&2; exit 1; }
862 fi
863
864 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
865         ac_cv_shtool="$ac_aux_dir/shtool"
866 else
867         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
868 fi
869
870 SHTOOL="$ac_cv_shtool"
871
872 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
873 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
874
875 OPENLDAP_CVS=""
876 if test -d $ac_aux_dir/CVS; then
877         OPENLDAP_CVS="(from CVS sources) "
878 fi
879
880 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
881
882
883 echo $ac_n "checking host system type""... $ac_c" 1>&6
884 echo "configure:885: checking host system type" >&5
885 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
886
887 # Make sure we can run config.sub.
888   if $ac_config_sub sun4 >/dev/null 2>&1; then :
889     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
890   fi
891
892   ac_cv_host_alias=$host
893   case "$ac_cv_host_alias" in
894   NONE)
895     case $nonopt in
896     NONE)
897       if ac_cv_host_alias=`$ac_config_guess`; then :
898       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
899       fi ;;
900     *) ac_cv_host_alias=$nonopt ;;
901     esac ;;
902   esac
903
904   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
905   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
906   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
907   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
908 else
909   echo $ac_n "(cached) $ac_c" 1>&6
910 fi
911
912 echo "$ac_t""$ac_cv_host" 1>&6
913
914 host=$ac_cv_host
915 host_alias=$ac_cv_host_alias
916 host_cpu=$ac_cv_host_cpu
917 host_vendor=$ac_cv_host_vendor
918 host_os=$ac_cv_host_os
919
920
921
922
923
924 echo $ac_n "checking target system type""... $ac_c" 1>&6
925 echo "configure:926: checking target system type" >&5
926 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
927
928 # Make sure we can run config.sub.
929   if $ac_config_sub sun4 >/dev/null 2>&1; then :
930     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
931   fi
932
933   ac_cv_target_alias=$target
934   case "$ac_cv_target_alias" in
935   NONE)
936     case $nonopt in
937     NONE)
938       ac_cv_target_alias=$host_alias ;;
939
940     *) ac_cv_target_alias=$nonopt ;;
941     esac ;;
942   esac
943
944   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
945   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
946   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
947   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
948 else
949   echo $ac_n "(cached) $ac_c" 1>&6
950 fi
951
952 echo "$ac_t""$ac_cv_target" 1>&6
953
954 target=$ac_cv_target
955 target_alias=$ac_cv_target_alias
956 target_cpu=$ac_cv_target_cpu
957 target_vendor=$ac_cv_target_vendor
958 target_os=$ac_cv_target_os
959
960
961
962
963
964 echo $ac_n "checking build system type""... $ac_c" 1>&6
965 echo "configure:966: checking build system type" >&5
966 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
967
968 # Make sure we can run config.sub.
969   if $ac_config_sub sun4 >/dev/null 2>&1; then :
970     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
971   fi
972
973   ac_cv_build_alias=$build
974   case "$ac_cv_build_alias" in
975   NONE)
976     case $nonopt in
977     NONE)
978       ac_cv_build_alias=$host_alias ;;
979
980     *) ac_cv_build_alias=$nonopt ;;
981     esac ;;
982   esac
983
984   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
985   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 else
989   echo $ac_n "(cached) $ac_c" 1>&6
990 fi
991
992 echo "$ac_t""$ac_cv_build" 1>&6
993
994 build=$ac_cv_build
995 build_alias=$ac_cv_build_alias
996 build_cpu=$ac_cv_build_cpu
997 build_vendor=$ac_cv_build_vendor
998 build_os=$ac_cv_build_os
999
1000
1001
1002
1003
1004 # Do some error checking and defaulting for the host and target type.
1005 # The inputs are:
1006 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1007 #
1008 # The rules are:
1009 # 1. You are not allowed to specify --host, --target, and nonopt at the
1010 #    same time.
1011 # 2. Host defaults to nonopt.
1012 # 3. If nonopt is not specified, then host defaults to the current host,
1013 #    as determined by config.guess.
1014 # 4. Target and build default to nonopt.
1015 # 5. If nonopt is not specified, then target and build default to host.
1016
1017 # The aliases save the names the user supplied, while $host etc.
1018 # will get canonicalized.
1019 case $host---$target---$nonopt in
1020 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1021 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1022 esac
1023
1024 test "$host_alias" != "$target_alias" &&
1025   test "$program_prefix$program_suffix$program_transform_name" = \
1026     NONENONEs,x,x, &&
1027   program_prefix=${target_alias}-
1028
1029
1030 # Find a good install program.  We prefer a C program (faster),
1031 # so one script is as good as another.  But avoid the broken or
1032 # incompatible versions:
1033 # SysV /etc/install, /usr/sbin/install
1034 # SunOS /usr/etc/install
1035 # IRIX /sbin/install
1036 # AIX /bin/install
1037 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1038 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1039 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1040 # ./install, which can be erroneously created by make from ./install.sh.
1041 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1042 echo "configure:1043: checking for a BSD compatible install" >&5
1043 if test -z "$INSTALL"; then
1044 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1048   for ac_dir in $PATH; do
1049     # Account for people who put trailing slashes in PATH elements.
1050     case "$ac_dir/" in
1051     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1052     *)
1053       # OSF1 and SCO ODT 3.0 have their own names for install.
1054       # Don't use installbsd from OSF since it installs stuff as root
1055       # by default.
1056       for ac_prog in ginstall scoinst install; do
1057         if test -f $ac_dir/$ac_prog; then
1058           if test $ac_prog = install &&
1059             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # AIX install.  It has an incompatible calling convention.
1061             :
1062           elif test $ac_prog = install &&
1063             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # program-specific install script used by HP pwplus--don't use.
1065             :
1066           else
1067             ac_cv_path_install="$ac_dir/$ac_prog -c"
1068             break 2
1069           fi
1070         fi
1071       done
1072       ;;
1073     esac
1074   done
1075   IFS="$ac_save_IFS"
1076
1077 fi
1078   if test "${ac_cv_path_install+set}" = set; then
1079     INSTALL="$ac_cv_path_install"
1080   else
1081     # As a last resort, use the slow shell script.  We don't cache a
1082     # path for INSTALL within a source directory, because that will
1083     # break other packages using the cache if that directory is
1084     # removed, or if the path is relative.
1085     INSTALL="$ac_install_sh"
1086   fi
1087 fi
1088 echo "$ac_t""$INSTALL" 1>&6
1089
1090 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1091 # It thinks the first close brace ends the variable substitution.
1092 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1093
1094 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1095
1096 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1097
1098 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1099 echo "configure:1100: checking whether build environment is sane" >&5
1100 # Just in case
1101 sleep 1
1102 echo timestamp > conftestfile
1103 # Do `set' in a subshell so we don't clobber the current shell's
1104 # arguments.  Must try -L first in case configure is actually a
1105 # symlink; some systems play weird games with the mod time of symlinks
1106 # (eg FreeBSD returns the mod time of the symlink's containing
1107 # directory).
1108 if (
1109    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1110    if test "$*" = "X"; then
1111       # -L didn't work.
1112       set X `ls -t $srcdir/configure conftestfile`
1113    fi
1114    if test "$*" != "X $srcdir/configure conftestfile" \
1115       && test "$*" != "X conftestfile $srcdir/configure"; then
1116
1117       # If neither matched, then we have a broken ls.  This can happen
1118       # if, for instance, CONFIG_SHELL is bash and it inherits a
1119       # broken ls alias from the environment.  This has actually
1120       # happened.  Such a system could not be considered "sane".
1121       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1122 alias in your environment" 1>&2; exit 1; }
1123    fi
1124
1125    test "$2" = conftestfile
1126    )
1127 then
1128    # Ok.
1129    :
1130 else
1131    { echo "configure: error: newly created file is older than distributed files!
1132 Check your system clock" 1>&2; exit 1; }
1133 fi
1134 rm -f conftest*
1135 echo "$ac_t""yes" 1>&6
1136 if test "$program_transform_name" = s,x,x,; then
1137   program_transform_name=
1138 else
1139   # Double any \ or $.  echo might interpret backslashes.
1140   cat <<\EOF_SED > conftestsed
1141 s,\\,\\\\,g; s,\$,$$,g
1142 EOF_SED
1143   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1144   rm -f conftestsed
1145 fi
1146 test "$program_prefix" != NONE &&
1147   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1148 # Use a double $ so make ignores it.
1149 test "$program_suffix" != NONE &&
1150   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1151
1152 # sed with no file args requires a program.
1153 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1154
1155 for ac_prog in mawk gawk nawk awk
1156 do
1157 # Extract the first word of "$ac_prog", so it can be a program name with args.
1158 set dummy $ac_prog; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_word" >&5
1161 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   if test -n "$AWK"; then
1165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1166 else
1167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1168   ac_dummy="$PATH"
1169   for ac_dir in $ac_dummy; do
1170     test -z "$ac_dir" && ac_dir=.
1171     if test -f $ac_dir/$ac_word; then
1172       ac_cv_prog_AWK="$ac_prog"
1173       break
1174     fi
1175   done
1176   IFS="$ac_save_ifs"
1177 fi
1178 fi
1179 AWK="$ac_cv_prog_AWK"
1180 if test -n "$AWK"; then
1181   echo "$ac_t""$AWK" 1>&6
1182 else
1183   echo "$ac_t""no" 1>&6
1184 fi
1185
1186 test -n "$AWK" && break
1187 done
1188
1189 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${MAKE-make} sets \${MAKE}" >&5
1191 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1192 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1193   echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195   cat > conftestmake <<\EOF
1196 all:
1197         @echo 'ac_maketemp="${MAKE}"'
1198 EOF
1199 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1200 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1201 if test -n "$ac_maketemp"; then
1202   eval ac_cv_prog_make_${ac_make}_set=yes
1203 else
1204   eval ac_cv_prog_make_${ac_make}_set=no
1205 fi
1206 rm -f conftestmake
1207 fi
1208 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1209   echo "$ac_t""yes" 1>&6
1210   SET_MAKE=
1211 else
1212   echo "$ac_t""no" 1>&6
1213   SET_MAKE="MAKE=${MAKE-make}"
1214 fi
1215
1216
1217
1218 PACKAGE=$OL_PACKAGE
1219
1220 VERSION=$OL_VERSION
1221
1222 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1223   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1224 fi
1225
1226
1227
1228 missing_dir=`cd $ac_aux_dir && pwd`
1229 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1230 echo "configure:1231: checking for working aclocal" >&5
1231 # Run test in a subshell; some versions of sh will print an error if
1232 # an executable is not found, even if stderr is redirected.
1233 # Redirect stdin to placate older versions of autoconf.  Sigh.
1234 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1235    ACLOCAL=aclocal
1236    echo "$ac_t""found" 1>&6
1237 else
1238    ACLOCAL="$missing_dir/missing aclocal"
1239    echo "$ac_t""missing" 1>&6
1240 fi
1241
1242 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working autoconf" >&5
1244 # Run test in a subshell; some versions of sh will print an error if
1245 # an executable is not found, even if stderr is redirected.
1246 # Redirect stdin to placate older versions of autoconf.  Sigh.
1247 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1248    AUTOCONF=autoconf
1249    echo "$ac_t""found" 1>&6
1250 else
1251    AUTOCONF="$missing_dir/missing autoconf"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working automake" >&5
1257 # Run test in a subshell; some versions of sh will print an error if
1258 # an executable is not found, even if stderr is redirected.
1259 # Redirect stdin to placate older versions of autoconf.  Sigh.
1260 if (automake --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOMAKE=automake
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOMAKE="$missing_dir/missing automake"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working autoheader" >&5
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf.  Sigh.
1273 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOHEADER=autoheader
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOHEADER="$missing_dir/missing autoheader"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working makeinfo" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1287    MAKEINFO=makeinfo
1288    echo "$ac_t""found" 1>&6
1289 else
1290    MAKEINFO="$missing_dir/missing makeinfo"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 install_sh="$missing_dir/install-sh"
1295 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1296
1297 for ac_prog in gnutar gtar tar
1298 do
1299 # Extract the first word of "$ac_prog", so it can be a program name with args.
1300 set dummy $ac_prog; ac_word=$2
1301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_word" >&5
1303 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1304   echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306   if test -n "$AMTAR"; then
1307   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1308 else
1309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1310   ac_dummy="$PATH"
1311   for ac_dir in $ac_dummy; do
1312     test -z "$ac_dir" && ac_dir=.
1313     if test -f $ac_dir/$ac_word; then
1314       ac_cv_prog_AMTAR="$ac_prog"
1315       break
1316     fi
1317   done
1318   IFS="$ac_save_ifs"
1319 fi
1320 fi
1321 AMTAR="$ac_cv_prog_AMTAR"
1322 if test -n "$AMTAR"; then
1323   echo "$ac_t""$AMTAR" 1>&6
1324 else
1325   echo "$ac_t""no" 1>&6
1326 fi
1327
1328 test -n "$AMTAR" && break
1329 done
1330
1331
1332 AMTARFLAGS=
1333 if test -n "$AMTAR"; then
1334   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1335         AMTARFLAGS=o
1336   fi
1337 fi
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_PACKAGE "$PACKAGE"
1341 EOF
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_VERSION "$VERSION"
1345 EOF
1346
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION $OL_API_INC
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1362 EOF
1363
1364
1365 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1366
1367 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1368
1369 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1370
1371
1372
1373 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1374 echo "configure:1375: checking configure arguments" >&5
1375
1376
1377 top_builddir=`pwd`
1378
1379 ldap_subdir="/openldap"
1380
1381 # Check whether --with-subdir or --without-subdir was given.
1382 if test "${with_subdir+set}" = set; then
1383   withval="$with_subdir"
1384   case "$withval" in
1385         no) ldap_subdir=""
1386                 ;;
1387         yes)
1388                 ;;
1389         /*|\\*)
1390                 ldap_subdir="$withval"
1391                 ;;
1392         *)
1393                 ldap_subdir="/$withval"
1394                 ;;
1395 esac
1396
1397 fi
1398
1399
1400 # OpenLDAP --enable-debug
1401         # Check whether --enable-debug or --disable-debug was given.
1402 if test "${enable_debug+set}" = set; then
1403   enableval="$enable_debug"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no ; do
1407                 if test "$enableval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1413         fi
1414         ol_enable_debug="$ol_arg"
1415
1416 else
1417         ol_enable_debug="yes"
1418 fi
1419 # end --enable-debug
1420 # OpenLDAP --enable-dynamic
1421         # Check whether --enable-dynamic or --disable-dynamic was given.
1422 if test "${enable_dynamic+set}" = set; then
1423   enableval="$enable_dynamic"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto yes no ; do
1427                 if test "$enableval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1433         fi
1434         ol_enable_dynamic="$ol_arg"
1435
1436 else
1437         ol_enable_dynamic="no"
1438 fi
1439 # end --enable-dynamic
1440 # OpenLDAP --enable-syslog
1441         # Check whether --enable-syslog or --disable-syslog was given.
1442 if test "${enable_syslog+set}" = set; then
1443   enableval="$enable_syslog"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1453         fi
1454         ol_enable_syslog="$ol_arg"
1455
1456 else
1457         ol_enable_syslog="auto"
1458 fi
1459 # end --enable-syslog
1460 # OpenLDAP --enable-proctitle
1461         # Check whether --enable-proctitle or --disable-proctitle was given.
1462 if test "${enable_proctitle+set}" = set; then
1463   enableval="$enable_proctitle"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1473         fi
1474         ol_enable_proctitle="$ol_arg"
1475
1476 else
1477         ol_enable_proctitle="yes"
1478 fi
1479 # end --enable-proctitle
1480 ol_enable_referrals=${ol_enable_referrals-no}
1481 ol_enable_kbind=${ol_enable_kbind-no}
1482 # OpenLDAP --enable-ipv6
1483         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1484 if test "${enable_ipv6+set}" = set; then
1485   enableval="$enable_ipv6"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no ; do
1489                 if test "$enableval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1495         fi
1496         ol_enable_ipv6="$ol_arg"
1497
1498 else
1499         ol_enable_ipv6="auto"
1500 fi
1501 # end --enable-ipv6
1502 # OpenLDAP --enable-local
1503         # Check whether --enable-local or --disable-local was given.
1504 if test "${enable_local+set}" = set; then
1505   enableval="$enable_local"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1515         fi
1516         ol_enable_local="$ol_arg"
1517
1518 else
1519         ol_enable_local="auto"
1520 fi
1521 # end --enable-local
1522
1523
1524 # OpenLDAP --with-cyrus_sasl
1525         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1526 if test "${with_cyrus_sasl+set}" = set; then
1527   withval="$with_cyrus_sasl"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no  ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1537         fi
1538         ol_with_cyrus_sasl="$ol_arg"
1539
1540 else
1541         ol_with_cyrus_sasl="auto"
1542 fi
1543 # end --with-cyrus_sasl
1544
1545 # OpenLDAP --with-fetch
1546         # Check whether --with-fetch or --without-fetch was given.
1547 if test "${with_fetch+set}" = set; then
1548   withval="$with_fetch"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1558         fi
1559         ol_with_fetch="$ol_arg"
1560
1561 else
1562         ol_with_fetch="auto"
1563 fi
1564 # end --with-fetch
1565
1566 ol_with_kerberos=${ol_with_kerberos-auto}
1567 # OpenLDAP --with-threads
1568         # Check whether --with-threads or --without-threads was given.
1569 if test "${with_threads+set}" = set; then
1570   withval="$with_threads"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1574                 if test "$withval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1580         fi
1581         ol_with_threads="$ol_arg"
1582
1583 else
1584         ol_with_threads="auto"
1585 fi
1586 # end --with-threads
1587
1588 # OpenLDAP --with-tls
1589         # Check whether --with-tls or --without-tls was given.
1590 if test "${with_tls+set}" = set; then
1591   withval="$with_tls"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto ssleay openssl yes no  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1601         fi
1602         ol_with_tls="$ol_arg"
1603
1604 else
1605         ol_with_tls="auto"
1606 fi
1607 # end --with-tls
1608
1609 # OpenLDAP --with-yielding_select
1610         # Check whether --with-yielding_select or --without-yielding_select was given.
1611 if test "${with_yielding_select+set}" = set; then
1612   withval="$with_yielding_select"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no manual  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1622         fi
1623         ol_with_yielding_select="$ol_arg"
1624
1625 else
1626         ol_with_yielding_select="auto"
1627 fi
1628 # end --with-yielding_select
1629
1630
1631
1632 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1633 if test "${with_xxslapdoptions+set}" = set; then
1634   withval="$with_xxslapdoptions"
1635   :
1636 fi
1637
1638 # OpenLDAP --enable-slapd
1639         # Check whether --enable-slapd or --disable-slapd was given.
1640 if test "${enable_slapd+set}" = set; then
1641   enableval="$enable_slapd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_slapd="$ol_arg"
1653
1654 else
1655         ol_enable_slapd="yes"
1656 fi
1657 # end --enable-slapd
1658 # OpenLDAP --enable-aci
1659         # Check whether --enable-aci or --disable-aci was given.
1660 if test "${enable_aci+set}" = set; then
1661   enableval="$enable_aci"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1671         fi
1672         ol_enable_aci="$ol_arg"
1673
1674 else
1675         ol_enable_aci="no"
1676 fi
1677 # end --enable-aci
1678 # OpenLDAP --enable-cleartext
1679         # Check whether --enable-cleartext or --disable-cleartext was given.
1680 if test "${enable_cleartext+set}" = set; then
1681   enableval="$enable_cleartext"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1691         fi
1692         ol_enable_cleartext="$ol_arg"
1693
1694 else
1695         ol_enable_cleartext="yes"
1696 fi
1697 # end --enable-cleartext
1698 # OpenLDAP --enable-crypt
1699         # Check whether --enable-crypt or --disable-crypt was given.
1700 if test "${enable_crypt+set}" = set; then
1701   enableval="$enable_crypt"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1711         fi
1712         ol_enable_crypt="$ol_arg"
1713
1714 else
1715         ol_enable_crypt="no"
1716 fi
1717 # end --enable-crypt
1718 # OpenLDAP --enable-lmpasswd
1719         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1720 if test "${enable_lmpasswd+set}" = set; then
1721   enableval="$enable_lmpasswd"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_lmpasswd="$ol_arg"
1733
1734 else
1735         ol_enable_lmpasswd="no"
1736 fi
1737 # end --enable-lmpasswd
1738 # OpenLDAP --enable-spasswd
1739         # Check whether --enable-spasswd or --disable-spasswd was given.
1740 if test "${enable_spasswd+set}" = set; then
1741   enableval="$enable_spasswd"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1751         fi
1752         ol_enable_spasswd="$ol_arg"
1753
1754 else
1755         ol_enable_spasswd="no"
1756 fi
1757 # end --enable-spasswd
1758 # OpenLDAP --enable-modules
1759         # Check whether --enable-modules or --disable-modules was given.
1760 if test "${enable_modules+set}" = set; then
1761   enableval="$enable_modules"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1771         fi
1772         ol_enable_modules="$ol_arg"
1773
1774 else
1775         ol_enable_modules="no"
1776 fi
1777 # end --enable-modules
1778 ol_enable_multimaster=${ol_enable_multimaster-no}
1779 # OpenLDAP --enable-rewrite
1780         # Check whether --enable-rewrite or --disable-rewrite was given.
1781 if test "${enable_rewrite+set}" = set; then
1782   enableval="$enable_rewrite"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rewrite="$ol_arg"
1794
1795 else
1796         ol_enable_rewrite="auto"
1797 fi
1798 # end --enable-rewrite
1799 # OpenLDAP --enable-rlookups
1800         # Check whether --enable-rlookups or --disable-rlookups was given.
1801 if test "${enable_rlookups+set}" = set; then
1802   enableval="$enable_rlookups"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1812         fi
1813         ol_enable_rlookups="$ol_arg"
1814
1815 else
1816         ol_enable_rlookups="no"
1817 fi
1818 # end --enable-rlookups
1819 # OpenLDAP --enable-slapi
1820         # Check whether --enable-slapi or --disable-slapi was given.
1821 if test "${enable_slapi+set}" = set; then
1822   enableval="$enable_slapi"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slapi="$ol_arg"
1834
1835 else
1836         ol_enable_slapi="no"
1837 fi
1838 # end --enable-slapi
1839 # OpenLDAP --enable-slp
1840         # Check whether --enable-slp or --disable-slp was given.
1841 if test "${enable_slp+set}" = set; then
1842   enableval="$enable_slp"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1852         fi
1853         ol_enable_slp="$ol_arg"
1854
1855 else
1856         ol_enable_slp="no"
1857 fi
1858 # end --enable-slp
1859 # OpenLDAP --enable-wrappers
1860         # Check whether --enable-wrappers or --disable-wrappers was given.
1861 if test "${enable_wrappers+set}" = set; then
1862   enableval="$enable_wrappers"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1872         fi
1873         ol_enable_wrappers="$ol_arg"
1874
1875 else
1876         ol_enable_wrappers="no"
1877 fi
1878 # end --enable-wrappers
1879
1880 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1881         passwd perl relay shell sql"
1882
1883 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1884 if test "${with_xxslapbackends+set}" = set; then
1885   withval="$with_xxslapbackends"
1886   :
1887 fi
1888
1889
1890 # OpenLDAP --enable-backends
1891         # Check whether --enable-backends or --disable-backends was given.
1892 if test "${enable_backends+set}" = set; then
1893   enableval="$enable_backends"
1894   
1895         ol_arg=invalid
1896         for ol_val in no yes mod ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1903         fi
1904         ol_enable_backends="$ol_arg"
1905
1906 else
1907         ol_enable_backends="no"
1908 fi
1909 # end --enable-backends
1910 # OpenLDAP --enable-bdb
1911         # Check whether --enable-bdb or --disable-bdb was given.
1912 if test "${enable_bdb+set}" = set; then
1913   enableval="$enable_bdb"
1914   
1915         ol_arg=invalid
1916         for ol_val in no yes mod ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_bdb="$ol_arg"
1925
1926 else
1927         ol_enable_bdb="yes"
1928 fi
1929 # end --enable-bdb
1930 # OpenLDAP --enable-dnssrv
1931         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1932 if test "${enable_dnssrv+set}" = set; then
1933   enableval="$enable_dnssrv"
1934   
1935         ol_arg=invalid
1936         for ol_val in no yes mod ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1943         fi
1944         ol_enable_dnssrv="$ol_arg"
1945
1946 else
1947         ol_enable_dnssrv="no"
1948 fi
1949 # end --enable-dnssrv
1950 # OpenLDAP --enable-hdb
1951         # Check whether --enable-hdb or --disable-hdb was given.
1952 if test "${enable_hdb+set}" = set; then
1953   enableval="$enable_hdb"
1954   
1955         ol_arg=invalid
1956         for ol_val in no yes mod ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1963         fi
1964         ol_enable_hdb="$ol_arg"
1965
1966 else
1967         ol_enable_hdb="no"
1968 fi
1969 # end --enable-hdb
1970 # OpenLDAP --enable-ldap
1971         # Check whether --enable-ldap or --disable-ldap was given.
1972 if test "${enable_ldap+set}" = set; then
1973   enableval="$enable_ldap"
1974   
1975         ol_arg=invalid
1976         for ol_val in no yes mod ; do
1977                 if test "$enableval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1983         fi
1984         ol_enable_ldap="$ol_arg"
1985
1986 else
1987         ol_enable_ldap="no"
1988 fi
1989 # end --enable-ldap
1990 # OpenLDAP --enable-ldbm
1991         # Check whether --enable-ldbm or --disable-ldbm was given.
1992 if test "${enable_ldbm+set}" = set; then
1993   enableval="$enable_ldbm"
1994   
1995         ol_arg=invalid
1996         for ol_val in no yes mod ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2003         fi
2004         ol_enable_ldbm="$ol_arg"
2005
2006 else
2007         ol_enable_ldbm="no"
2008 fi
2009 # end --enable-ldbm
2010 # OpenLDAP --with-ldbm_api
2011         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2012 if test "${with_ldbm_api+set}" = set; then
2013   withval="$with_ldbm_api"
2014   
2015         ol_arg=invalid
2016         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_api="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_api="auto"
2028 fi
2029 # end --with-ldbm_api
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-meta
2053         # Check whether --enable-meta or --disable-meta was given.
2054 if test "${enable_meta+set}" = set; then
2055   enableval="$enable_meta"
2056   
2057         ol_arg=invalid
2058         for ol_val in no yes mod ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2065         fi
2066         ol_enable_meta="$ol_arg"
2067
2068 else
2069         ol_enable_meta="no"
2070 fi
2071 # end --enable-meta
2072 # OpenLDAP --enable-monitor
2073         # Check whether --enable-monitor or --disable-monitor was given.
2074 if test "${enable_monitor+set}" = set; then
2075   enableval="$enable_monitor"
2076   
2077         ol_arg=invalid
2078         for ol_val in no yes mod ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2085         fi
2086         ol_enable_monitor="$ol_arg"
2087
2088 else
2089         ol_enable_monitor="yes"
2090 fi
2091 # end --enable-monitor
2092 # OpenLDAP --enable-null
2093         # Check whether --enable-null or --disable-null was given.
2094 if test "${enable_null+set}" = set; then
2095   enableval="$enable_null"
2096   
2097         ol_arg=invalid
2098         for ol_val in no yes mod ; do
2099                 if test "$enableval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2105         fi
2106         ol_enable_null="$ol_arg"
2107
2108 else
2109         ol_enable_null="no"
2110 fi
2111 # end --enable-null
2112 # OpenLDAP --enable-passwd
2113         # Check whether --enable-passwd or --disable-passwd was given.
2114 if test "${enable_passwd+set}" = set; then
2115   enableval="$enable_passwd"
2116   
2117         ol_arg=invalid
2118         for ol_val in no yes mod ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2125         fi
2126         ol_enable_passwd="$ol_arg"
2127
2128 else
2129         ol_enable_passwd="no"
2130 fi
2131 # end --enable-passwd
2132 # OpenLDAP --enable-perl
2133         # Check whether --enable-perl or --disable-perl was given.
2134 if test "${enable_perl+set}" = set; then
2135   enableval="$enable_perl"
2136   
2137         ol_arg=invalid
2138         for ol_val in no yes mod ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2145         fi
2146         ol_enable_perl="$ol_arg"
2147
2148 else
2149         ol_enable_perl="no"
2150 fi
2151 # end --enable-perl
2152 # OpenLDAP --enable-relay
2153         # Check whether --enable-relay or --disable-relay was given.
2154 if test "${enable_relay+set}" = set; then
2155   enableval="$enable_relay"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2165         fi
2166         ol_enable_relay="$ol_arg"
2167
2168 else
2169         ol_enable_relay="yes"
2170 fi
2171 # end --enable-relay
2172 # OpenLDAP --enable-shell
2173         # Check whether --enable-shell or --disable-shell was given.
2174 if test "${enable_shell+set}" = set; then
2175   enableval="$enable_shell"
2176   
2177         ol_arg=invalid
2178         for ol_val in no yes mod ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2185         fi
2186         ol_enable_shell="$ol_arg"
2187
2188 else
2189         ol_enable_shell="no"
2190 fi
2191 # end --enable-shell
2192 # OpenLDAP --enable-sql
2193         # Check whether --enable-sql or --disable-sql was given.
2194 if test "${enable_sql+set}" = set; then
2195   enableval="$enable_sql"
2196   
2197         ol_arg=invalid
2198         for ol_val in no yes mod ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2205         fi
2206         ol_enable_sql="$ol_arg"
2207
2208 else
2209         ol_enable_sql="no"
2210 fi
2211 # end --enable-sql
2212
2213 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2214         refint unique"
2215
2216 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2217 if test "${with_xxslapoverlays+set}" = set; then
2218   withval="$with_xxslapoverlays"
2219   :
2220 fi
2221
2222
2223 # OpenLDAP --enable-overlays
2224         # Check whether --enable-overlays or --disable-overlays was given.
2225 if test "${enable_overlays+set}" = set; then
2226   enableval="$enable_overlays"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2236         fi
2237         ol_enable_overlays="$ol_arg"
2238
2239 else
2240         ol_enable_overlays="no"
2241 fi
2242 # end --enable-overlays
2243 # OpenLDAP --enable-chain
2244         # Check whether --enable-chain or --disable-chain was given.
2245 if test "${enable_chain+set}" = set; then
2246   enableval="$enable_chain"
2247   
2248         ol_arg=invalid
2249         for ol_val in no yes mod ; do
2250                 if test "$enableval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2256         fi
2257         ol_enable_chain="$ol_arg"
2258
2259 else
2260         ol_enable_chain="no"
2261 fi
2262 # end --enable-chain
2263
2264 # OpenLDAP --enable-denyop
2265         # Check whether --enable-denyop or --disable-denyop was given.
2266 if test "${enable_denyop+set}" = set; then
2267   enableval="$enable_denyop"
2268   
2269         ol_arg=invalid
2270         for ol_val in no yes mod ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2277         fi
2278         ol_enable_denyop="$ol_arg"
2279
2280 else
2281         ol_enable_denyop="no"
2282 fi
2283 # end --enable-denyop
2284
2285 # OpenLDAP --enable-dyngroup
2286         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2287 if test "${enable_dyngroup+set}" = set; then
2288   enableval="$enable_dyngroup"
2289   
2290         ol_arg=invalid
2291         for ol_val in no yes mod ; do
2292                 if test "$enableval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2298         fi
2299         ol_enable_dyngroup="$ol_arg"
2300
2301 else
2302         ol_enable_dyngroup="no"
2303 fi
2304 # end --enable-dyngroup
2305
2306 # OpenLDAP --enable-lastmod
2307         # Check whether --enable-lastmod or --disable-lastmod was given.
2308 if test "${enable_lastmod+set}" = set; then
2309   enableval="$enable_lastmod"
2310   
2311         ol_arg=invalid
2312         for ol_val in no yes mod ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2319         fi
2320         ol_enable_lastmod="$ol_arg"
2321
2322 else
2323         ol_enable_lastmod="no"
2324 fi
2325 # end --enable-lastmod
2326
2327 # OpenLDAP --enable-ppolicy
2328         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2329 if test "${enable_ppolicy+set}" = set; then
2330   enableval="$enable_ppolicy"
2331   
2332         ol_arg=invalid
2333         for ol_val in no yes mod ; do
2334                 if test "$enableval" = "$ol_val" ; then
2335                         ol_arg="$ol_val"
2336                 fi
2337         done
2338         if test "$ol_arg" = "invalid" ; then
2339                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2340         fi
2341         ol_enable_ppolicy="$ol_arg"
2342
2343 else
2344         ol_enable_ppolicy="no"
2345 fi
2346 # end --enable-ppolicy
2347
2348 # OpenLDAP --enable-proxycache
2349         # Check whether --enable-proxycache or --disable-proxycache was given.
2350 if test "${enable_proxycache+set}" = set; then
2351   enableval="$enable_proxycache"
2352   
2353         ol_arg=invalid
2354         for ol_val in no yes mod ; do
2355                 if test "$enableval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2361         fi
2362         ol_enable_proxycache="$ol_arg"
2363
2364 else
2365         ol_enable_proxycache="no"
2366 fi
2367 # end --enable-proxycache
2368
2369 # OpenLDAP --enable-refint
2370         # Check whether --enable-refint or --disable-refint was given.
2371 if test "${enable_refint+set}" = set; then
2372   enableval="$enable_refint"
2373   
2374         ol_arg=invalid
2375         for ol_val in no yes mod ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2382         fi
2383         ol_enable_refint="$ol_arg"
2384
2385 else
2386         ol_enable_refint="no"
2387 fi
2388 # end --enable-refint
2389
2390 # OpenLDAP --enable-rwm
2391         # Check whether --enable-rwm or --disable-rwm was given.
2392 if test "${enable_rwm+set}" = set; then
2393   enableval="$enable_rwm"
2394   
2395         ol_arg=invalid
2396         for ol_val in no yes mod ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2403         fi
2404         ol_enable_rwm="$ol_arg"
2405
2406 else
2407         ol_enable_rwm="no"
2408 fi
2409 # end --enable-rwm
2410
2411 # OpenLDAP --enable-unique
2412         # Check whether --enable-unique or --disable-unique was given.
2413 if test "${enable_unique+set}" = set; then
2414   enableval="$enable_unique"
2415   
2416         ol_arg=invalid
2417         for ol_val in no yes mod ; do
2418                 if test "$enableval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2424         fi
2425         ol_enable_unique="$ol_arg"
2426
2427 else
2428         ol_enable_unique="no"
2429 fi
2430 # end --enable-unique
2431
2432
2433
2434 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2435 if test "${with_xxslurpdoptions+set}" = set; then
2436   withval="$with_xxslurpdoptions"
2437   :
2438 fi
2439
2440 # OpenLDAP --enable-slurpd
2441         # Check whether --enable-slurpd or --disable-slurpd was given.
2442 if test "${enable_slurpd+set}" = set; then
2443   enableval="$enable_slurpd"
2444   
2445         ol_arg=invalid
2446         for ol_val in auto yes no ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2453         fi
2454         ol_enable_slurpd="$ol_arg"
2455
2456 else
2457         ol_enable_slurpd="auto"
2458 fi
2459 # end --enable-slurpd
2460
2461 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2462 if test "${with_xxliboptions+set}" = set; then
2463   withval="$with_xxliboptions"
2464   :
2465 fi
2466
2467 # Check whether --enable-static or --disable-static was given.
2468 if test "${enable_static+set}" = set; then
2469   enableval="$enable_static"
2470   p=${PACKAGE-default}
2471 case $enableval in
2472 yes) enable_static=yes ;;
2473 no) enable_static=no ;;
2474 *)
2475   enable_static=no
2476   # Look at the argument we got.  We use all the common list separators.
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2478   for pkg in $enableval; do
2479     if test "X$pkg" = "X$p"; then
2480       enable_static=yes
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484   ;;
2485 esac
2486 else
2487   enable_static=yes
2488 fi
2489
2490 # Check whether --enable-shared or --disable-shared was given.
2491 if test "${enable_shared+set}" = set; then
2492   enableval="$enable_shared"
2493   p=${PACKAGE-default}
2494 case $enableval in
2495 yes) enable_shared=yes ;;
2496 no) enable_shared=no ;;
2497 *)
2498   enable_shared=no
2499   # Look at the argument we got.  We use all the common list separators.
2500   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2501   for pkg in $enableval; do
2502     if test "X$pkg" = "X$p"; then
2503       enable_shared=yes
2504     fi
2505   done
2506   IFS="$ac_save_ifs"
2507   ;;
2508 esac
2509 else
2510   enable_shared=yes
2511 fi
2512
2513
2514
2515 # Activate any backends that were not explicitly enabled.
2516 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2517 if test $ol_enable_backends != no ; then
2518         for i in $Backends; do
2519                 eval "ol_tmp=\$ol_enable_$i"
2520                 if test $ol_tmp = no ; then
2521                         eval "ol_enable_$i=$ol_enable_backends"
2522                 fi
2523         done
2524 fi
2525 # Activate the overlays
2526 if test $ol_enable_overlays != no ; then
2527         for i in $Overlays; do
2528                 eval "ol_tmp=\$ol_enable_$i"
2529                 if test $ol_tmp = no ; then
2530                         eval "ol_enable_$i=$ol_enable_overlays"
2531                 fi
2532         done
2533 fi
2534
2535 # validate options
2536 if test $ol_enable_slapd = no ; then
2537                 if test $ol_enable_slapi = yes ; then
2538                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2539         fi
2540         if test $ol_enable_backends != no ; then
2541                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2542         fi
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp != no ; then
2546                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2547                         eval "ol_enable_$i=no"
2548                 fi
2549         done
2550         if test $ol_enable_modules = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2552         fi
2553         if test $ol_enable_multimaster = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2555         fi
2556         if test $ol_enable_wrappers = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2558         fi
2559         if test $ol_enable_rlookups = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2561         fi
2562         if test $ol_enable_aci = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2564         fi
2565         if test $ol_with_ldbm_api != auto ; then
2566                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2567         fi
2568         if test $ol_with_ldbm_type != auto ; then
2569                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2570         fi
2571         if test $ol_enable_slurpd = yes ; then
2572                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2573         fi
2574         if test $ol_enable_rewrite = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2576         fi
2577                 if test $ol_enable_overlays != no ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2579         fi
2580         for i in $Overlays; do
2581                 eval "ol_tmp=\$ol_enable_$i"
2582                 if test $ol_tmp != no ; then
2583                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2584                         eval "ol_enable_$i=no"
2585                 fi
2586         done
2587
2588         # force settings to no
2589         ol_enable_slapi=no
2590
2591         ol_enable_backends=no
2592         ol_enable_overlays=no
2593         ol_enable_modules=no
2594         ol_enable_multimaster=no
2595         ol_enable_rlookups=no
2596         ol_enable_aci=no
2597         ol_enable_wrappers=no
2598
2599         ol_with_ldbm_api=no
2600         ol_with_ldbm_type=no
2601
2602         ol_enable_slurpd=no
2603
2604         ol_enable_rewrite=no
2605
2606 elif test $ol_enable_ldbm = no ; then
2607         
2608         if test $ol_with_ldbm_api != auto ; then
2609                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2610         fi
2611
2612         if test $ol_with_ldbm_type != auto ; then
2613                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2614         fi
2615
2616         if test $ol_enable_modules != yes -a \
2617                 $ol_enable_bdb = no -a \
2618                 $ol_enable_dnssrv = no -a \
2619                 $ol_enable_hdb = no -a \
2620                 $ol_enable_ldap = no -a \
2621                 $ol_enable_meta = no -a \
2622                 $ol_enable_monitor = no -a \
2623                 $ol_enable_null = no -a \
2624                 $ol_enable_passwd = no -a \
2625                 $ol_enable_perl = no -a \
2626                 $ol_enable_relay = no -a \
2627                 $ol_enable_shell = no -a \
2628                 $ol_enable_sql = no ; then
2629
2630                 if test $ol_enable_slapd = yes ; then
2631                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2632                 else
2633                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2634                         ol_enable_slapd=no
2635                 fi
2636         fi
2637
2638         ol_with_ldbm_api=no
2639         ol_with_ldbm_type=no
2640
2641         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2642                 ol_with_ldbm_api=berkeley
2643         fi
2644
2645 else
2646                 if test $ol_with_ldbm_api = gdbm -a \
2647                 $ol_with_ldbm_type = btree ; then
2648                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2649         fi
2650         if test $ol_with_ldbm_api = mdbm -a \
2651                 $ol_with_ldbm_type = btree ; then
2652                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2653         fi
2654         if test $ol_with_ldbm_api = ndbm -a \
2655                 $ol_with_ldbm_type = btree ; then
2656                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2657         fi
2658
2659         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2660                 if test $ol_with_ldbm_api = auto ; then
2661                         ol_with_ldbm_api=berkeley
2662                 elif test $ol_with_ldbm_api != berkeley ; then
2663                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2664                 fi
2665         fi
2666 fi
2667
2668 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2669         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2670 fi
2671
2672 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2673         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2674 fi
2675
2676 if test $ol_enable_slurpd = yes ; then
2677                 if test $ol_with_threads = no ; then
2678                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2679         fi
2680 fi
2681
2682 if test $ol_enable_lmpasswd = yes ; then
2683         if test $ol_with_tls = no ; then
2684                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2685         fi
2686 fi
2687
2688 if test $ol_enable_kbind = yes ; then
2689         if test $ol_with_kerberos = no ; then
2690                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2691         elif test $ol_with_kerberos = auto ; then
2692                 ol_with_kerberos=yes
2693         fi
2694
2695 elif test $ol_enable_kbind = no ; then
2696         if test $ol_with_kerberos = auto ; then
2697                 ol_with_kerberos=no
2698         elif test $ol_with_kerberos != no ; then
2699                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2700                 ol_with_kerberos=no
2701         fi
2702 fi
2703
2704 if test $ol_enable_spasswd = yes ; then
2705         if test $ol_with_cyrus_sasl = no ; then
2706                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2707         fi
2708         ol_with_cyrus_sasl=yes
2709 fi
2710
2711 echo "$ac_t""done" 1>&6
2712
2713 LDAP_LIBS=
2714 LDBM_LIBS=
2715 LTHREAD_LIBS=
2716 LUTIL_LIBS=
2717
2718 SLAPD_LIBS=
2719 SLURPD_LIBS=
2720
2721 BUILD_SLAPD=no
2722 BUILD_SLURPD=no
2723
2724 BUILD_THREAD=no
2725
2726 BUILD_SLAPI=no
2727 SLAPD_SLAPI_DEPEND=
2728
2729 BUILD_BDB=no
2730 BUILD_DNSSRV=no
2731 BUILD_HDB=no
2732 BUILD_LDAP=no
2733 BUILD_LDBM=no
2734 BUILD_META=no
2735 BUILD_MONITOR=no
2736 BUILD_NULL=no
2737 BUILD_PASSWD=no
2738 BUILD_PERL=no
2739 BUILD_RELAY=no
2740 BUILD_SHELL=no
2741 BUILD_SQL=no
2742
2743 BUILD_CHAIN=no
2744 BUILD_DENYOP=no
2745 BUILD_DYNGROUP=no
2746 BUILD_LASTMOD=no
2747 BUILD_PPOLICY=no
2748 BUILD_PROXYCACHE=no
2749 BUILD_REFINT=no
2750 BUILD_RWM=no
2751 BUILD_UNIQUE=no
2752
2753 SLAPD_DYNAMIC_OVERLAYS=
2754
2755 SLAPD_MODULES_LDFLAGS=
2756 SLAPD_MODULES_CPPFLAGS=
2757
2758 SLAPD_STATIC_BACKENDS=
2759 SLAPD_DYNAMIC_BACKENDS=
2760
2761 SLAPD_PERL_LDFLAGS=
2762 MOD_PERL_LDFLAGS=
2763 PERL_CPPFLAGS=
2764
2765 SLAPD_SQL_LDFLAGS=
2766 SLAPD_SQL_LIBS=
2767 SLAPD_SQL_INCLUDES=
2768
2769 KRB4_LIBS=
2770 KRB5_LIBS=
2771 SASL_LIBS=
2772 TLS_LIBS=
2773 MODULES_LIBS=
2774 SLAPI_LIBS=
2775 LIBSLAPI=
2776 LIBSLAPITOOLS=
2777 AUTH_LIBS=
2778
2779 SLAPD_SLP_LIBS=
2780
2781
2782 # Find a good install program.  We prefer a C program (faster),
2783 # so one script is as good as another.  But avoid the broken or
2784 # incompatible versions:
2785 # SysV /etc/install, /usr/sbin/install
2786 # SunOS /usr/etc/install
2787 # IRIX /sbin/install
2788 # AIX /bin/install
2789 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2790 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2791 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2792 # ./install, which can be erroneously created by make from ./install.sh.
2793 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2794 echo "configure:2795: checking for a BSD compatible install" >&5
2795 if test -z "$INSTALL"; then
2796 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2797   echo $ac_n "(cached) $ac_c" 1>&6
2798 else
2799     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2800   for ac_dir in $PATH; do
2801     # Account for people who put trailing slashes in PATH elements.
2802     case "$ac_dir/" in
2803     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2804     *)
2805       # OSF1 and SCO ODT 3.0 have their own names for install.
2806       # Don't use installbsd from OSF since it installs stuff as root
2807       # by default.
2808       for ac_prog in ginstall scoinst install; do
2809         if test -f $ac_dir/$ac_prog; then
2810           if test $ac_prog = install &&
2811             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2812             # AIX install.  It has an incompatible calling convention.
2813             :
2814           elif test $ac_prog = install &&
2815             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2816             # program-specific install script used by HP pwplus--don't use.
2817             :
2818           else
2819             ac_cv_path_install="$ac_dir/$ac_prog -c"
2820             break 2
2821           fi
2822         fi
2823       done
2824       ;;
2825     esac
2826   done
2827   IFS="$ac_save_IFS"
2828
2829 fi
2830   if test "${ac_cv_path_install+set}" = set; then
2831     INSTALL="$ac_cv_path_install"
2832   else
2833     # As a last resort, use the slow shell script.  We don't cache a
2834     # path for INSTALL within a source directory, because that will
2835     # break other packages using the cache if that directory is
2836     # removed, or if the path is relative.
2837     INSTALL="$ac_install_sh"
2838   fi
2839 fi
2840 echo "$ac_t""$INSTALL" 1>&6
2841
2842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2843 # It thinks the first close brace ends the variable substitution.
2844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2845
2846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2847
2848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2849
2850
2851 cat >> confdefs.h <<\EOF
2852 #define HAVE_MKVERSION 1
2853 EOF
2854
2855
2856
2857
2858 ol_aix_threads=no
2859 case "$target" in
2860 *-*-aix*)       if test -z "$CC" ; then
2861                 case "$ol_with_threads" in
2862                 auto | yes |  posix) ol_aix_threads=yes ;;
2863                 esac
2864         fi
2865 ;;
2866 esac
2867
2868 if test $ol_aix_threads = yes ; then
2869         if test -z "${CC}" ; then
2870                 for ac_prog in cc_r xlc_r cc
2871 do
2872 # Extract the first word of "$ac_prog", so it can be a program name with args.
2873 set dummy $ac_prog; ac_word=$2
2874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_word" >&5
2876 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   if test -n "$CC"; then
2880   ac_cv_prog_CC="$CC" # Let the user override the test.
2881 else
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2883   ac_dummy="$PATH"
2884   for ac_dir in $ac_dummy; do
2885     test -z "$ac_dir" && ac_dir=.
2886     if test -f $ac_dir/$ac_word; then
2887       ac_cv_prog_CC="$ac_prog"
2888       break
2889     fi
2890   done
2891   IFS="$ac_save_ifs"
2892 fi
2893 fi
2894 CC="$ac_cv_prog_CC"
2895 if test -n "$CC"; then
2896   echo "$ac_t""$CC" 1>&6
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901 test -n "$CC" && break
2902 done
2903
2904
2905                 if test "$CC" = cc ; then
2906                                                 if test $ol_with_threads != auto ; then
2907                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2908                         else
2909                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2910                         fi
2911                         ol_with_threads=no
2912                 fi
2913         fi
2914
2915         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2916                 ol_with_threads=posix
2917                 ol_cv_pthread_create=yes
2918         fi
2919 fi
2920
2921 if test -z "${CC}"; then
2922         for ac_prog in cc gcc
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$CC"; then
2932   ac_cv_prog_CC="$CC" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_CC="$ac_prog"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 CC="$ac_cv_prog_CC"
2947 if test -n "$CC"; then
2948   echo "$ac_t""$CC" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 test -n "$CC" && break
2954 done
2955 test -n "$CC" || CC="missing"
2956
2957
2958         if test "${CC}" = "missing" ; then
2959                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2960         fi
2961 fi
2962
2963 if test -z "${AR}"; then
2964         for ac_prog in ar gar
2965 do
2966 # Extract the first word of "$ac_prog", so it can be a program name with args.
2967 set dummy $ac_prog; ac_word=$2
2968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2969 echo "configure:2970: checking for $ac_word" >&5
2970 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -n "$AR"; then
2974   ac_cv_prog_AR="$AR" # Let the user override the test.
2975 else
2976   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2977   ac_dummy="$PATH"
2978   for ac_dir in $ac_dummy; do
2979     test -z "$ac_dir" && ac_dir=.
2980     if test -f $ac_dir/$ac_word; then
2981       ac_cv_prog_AR="$ac_prog"
2982       break
2983     fi
2984   done
2985   IFS="$ac_save_ifs"
2986 fi
2987 fi
2988 AR="$ac_cv_prog_AR"
2989 if test -n "$AR"; then
2990   echo "$ac_t""$AR" 1>&6
2991 else
2992   echo "$ac_t""no" 1>&6
2993 fi
2994
2995 test -n "$AR" && break
2996 done
2997 test -n "$AR" || AR="missing"
2998
2999
3000         if test "${AR}" = "missing" ; then
3001                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3002         fi
3003 fi
3004
3005
3006
3007 # Find the correct PATH separator.  Usually this is `:', but
3008 # DJGPP uses `;' like DOS.
3009 if test "X${PATH_SEPARATOR+set}" != Xset; then
3010   UNAME=${UNAME-`uname 2>/dev/null`}
3011   case X$UNAME in
3012     *-DOS) lt_cv_sys_path_separator=';' ;;
3013     *)     lt_cv_sys_path_separator=':' ;;
3014   esac
3015   PATH_SEPARATOR=$lt_cv_sys_path_separator
3016 fi
3017
3018 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3019 echo "configure:3020: checking for Cygwin environment" >&5
3020 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026
3027 int main() {
3028
3029 #ifndef __CYGWIN__
3030 #define __CYGWIN__ __CYGWIN32__
3031 #endif
3032 return __CYGWIN__;
3033 ; return 0; }
3034 EOF
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036   rm -rf conftest*
3037   ac_cv_cygwin=yes
3038 else
3039   echo "configure: failed program was:" >&5
3040   cat conftest.$ac_ext >&5
3041   rm -rf conftest*
3042   ac_cv_cygwin=no
3043 fi
3044 rm -f conftest*
3045 fi
3046
3047 echo "$ac_t""$ac_cv_cygwin" 1>&6
3048 CYGWIN=
3049 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3050 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3051 echo "configure:3052: checking for mingw32 environment" >&5
3052 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 int main() {
3060 return __MINGW32__;
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3064   rm -rf conftest*
3065   ac_cv_mingw32=yes
3066 else
3067   echo "configure: failed program was:" >&5
3068   cat conftest.$ac_ext >&5
3069   rm -rf conftest*
3070   ac_cv_mingw32=no
3071 fi
3072 rm -f conftest*
3073 fi
3074
3075 echo "$ac_t""$ac_cv_mingw32" 1>&6
3076 MINGW32=
3077 test "$ac_cv_mingw32" = yes && MINGW32=yes
3078 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3079 echo "configure:3080: checking for EMX OS/2 environment" >&5
3080 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086
3087 int main() {
3088 return __EMX__;
3089 ; return 0; }
3090 EOF
3091 if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3092   rm -rf conftest*
3093   ac_cv_emxos2=yes
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   rm -rf conftest*
3098   ac_cv_emxos2=no
3099 fi
3100 rm -f conftest*
3101 fi
3102
3103 echo "$ac_t""$ac_cv_emxos2" 1>&6
3104 EMXOS2=
3105 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3106 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3107 echo "configure:3108: checking how to run the C preprocessor" >&5
3108 # On Suns, sometimes $CPP names a directory.
3109 if test -n "$CPP" && test -d "$CPP"; then
3110   CPP=
3111 fi
3112 if test -z "$CPP"; then
3113 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116     # This must be in double quotes, not single quotes, because CPP may get
3117   # substituted into the Makefile and "${CC-cc}" will confuse make.
3118   CPP="${CC-cc} -E"
3119   # On the NeXT, cc -E runs the code through the compiler's parser,
3120   # not just through cpp.
3121   cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <assert.h>
3125 Syntax Error
3126 EOF
3127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3128 { (eval echo configure:3129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3130 if test -z "$ac_err"; then
3131   :
3132 else
3133   echo "$ac_err" >&5
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136   rm -rf conftest*
3137   CPP="${CC-cc} -E -traditional-cpp"
3138   cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <assert.h>
3142 Syntax Error
3143 EOF
3144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3145 { (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3147 if test -z "$ac_err"; then
3148   :
3149 else
3150   echo "$ac_err" >&5
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   CPP="${CC-cc} -nologo -E"
3155   cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158 #include <assert.h>
3159 Syntax Error
3160 EOF
3161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3162 { (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3164 if test -z "$ac_err"; then
3165   :
3166 else
3167   echo "$ac_err" >&5
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   CPP=/lib/cpp
3172 fi
3173 rm -f conftest*
3174 fi
3175 rm -f conftest*
3176 fi
3177 rm -f conftest*
3178   ac_cv_prog_CPP="$CPP"
3179 fi
3180   CPP="$ac_cv_prog_CPP"
3181 else
3182   ac_cv_prog_CPP="$CPP"
3183 fi
3184 echo "$ac_t""$CPP" 1>&6
3185
3186 # Check whether --enable-fast-install or --disable-fast-install was given.
3187 if test "${enable_fast_install+set}" = set; then
3188   enableval="$enable_fast_install"
3189   p=${PACKAGE-default}
3190 case $enableval in
3191 yes) enable_fast_install=yes ;;
3192 no) enable_fast_install=no ;;
3193 *)
3194   enable_fast_install=no
3195   # Look at the argument we got.  We use all the common list separators.
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3197   for pkg in $enableval; do
3198     if test "X$pkg" = "X$p"; then
3199       enable_fast_install=yes
3200     fi
3201   done
3202   IFS="$ac_save_ifs"
3203   ;;
3204 esac
3205 else
3206   enable_fast_install=yes
3207 fi
3208
3209 # Extract the first word of "gcc", so it can be a program name with args.
3210 set dummy gcc; ac_word=$2
3211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_word" >&5
3213 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   if test -n "$CC"; then
3217   ac_cv_prog_CC="$CC" # Let the user override the test.
3218 else
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3220   ac_dummy="$PATH"
3221   for ac_dir in $ac_dummy; do
3222     test -z "$ac_dir" && ac_dir=.
3223     if test -f $ac_dir/$ac_word; then
3224       ac_cv_prog_CC="gcc"
3225       break
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229 fi
3230 fi
3231 CC="$ac_cv_prog_CC"
3232 if test -n "$CC"; then
3233   echo "$ac_t""$CC" 1>&6
3234 else
3235   echo "$ac_t""no" 1>&6
3236 fi
3237
3238 if test -z "$CC"; then
3239   # Extract the first word of "cc", so it can be a program name with args.
3240 set dummy cc; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   if test -n "$CC"; then
3247   ac_cv_prog_CC="$CC" # Let the user override the test.
3248 else
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3250   ac_prog_rejected=no
3251   ac_dummy="$PATH"
3252   for ac_dir in $ac_dummy; do
3253     test -z "$ac_dir" && ac_dir=.
3254     if test -f $ac_dir/$ac_word; then
3255       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3256         ac_prog_rejected=yes
3257         continue
3258       fi
3259       ac_cv_prog_CC="cc"
3260       break
3261     fi
3262   done
3263   IFS="$ac_save_ifs"
3264 if test $ac_prog_rejected = yes; then
3265   # We found a bogon in the path, so make sure we never use it.
3266   set dummy $ac_cv_prog_CC
3267   shift
3268   if test $# -gt 0; then
3269     # We chose a different compiler from the bogus one.
3270     # However, it has the same basename, so the bogon will be chosen
3271     # first if we set CC to just the basename; use the full file name.
3272     shift
3273     set dummy "$ac_dir/$ac_word" "$@"
3274     shift
3275     ac_cv_prog_CC="$@"
3276   fi
3277 fi
3278 fi
3279 fi
3280 CC="$ac_cv_prog_CC"
3281 if test -n "$CC"; then
3282   echo "$ac_t""$CC" 1>&6
3283 else
3284   echo "$ac_t""no" 1>&6
3285 fi
3286
3287   if test -z "$CC"; then
3288     case "`uname -s`" in
3289     *win32* | *WIN32* | *CYGWIN*)
3290       # Extract the first word of "cl", so it can be a program name with args.
3291 set dummy cl; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$CC"; then
3298   ac_cv_prog_CC="$CC" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_CC="cl"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 CC="$ac_cv_prog_CC"
3313 if test -n "$CC"; then
3314   echo "$ac_t""$CC" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318  ;;
3319     esac
3320   fi
3321   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3322 fi
3323
3324 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3325 echo "configure:3326: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3326
3327 ac_ext=c
3328 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3329 ac_cpp='$CPP $CPPFLAGS'
3330 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3331 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3332 cross_compiling=$ac_cv_prog_cc_cross
3333
3334 cat > conftest.$ac_ext << EOF
3335
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338
3339 main(){return(0);}
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342   ac_cv_prog_cc_works=yes
3343   # If we can't run a trivial program, we are probably using a cross compiler.
3344   if (./conftest; exit) 2>/dev/null; then
3345     ac_cv_prog_cc_cross=no
3346   else
3347     ac_cv_prog_cc_cross=yes
3348   fi
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   ac_cv_prog_cc_works=no
3353 fi
3354 rm -fr conftest*
3355 ac_ext=c
3356 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3357 ac_cpp='$CPP $CPPFLAGS'
3358 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3359 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3360 cross_compiling=$ac_cv_prog_cc_cross
3361
3362 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3363 if test $ac_cv_prog_cc_works = no; then
3364   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3365 fi
3366 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3367 echo "configure:3368: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3368 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3369 cross_compiling=$ac_cv_prog_cc_cross
3370
3371 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3372 echo "configure:3373: checking whether we are using GNU C" >&5
3373 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.c <<EOF
3377 #ifdef __GNUC__
3378   yes;
3379 #endif
3380 EOF
3381 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3382   ac_cv_prog_gcc=yes
3383 else
3384   ac_cv_prog_gcc=no
3385 fi
3386 fi
3387
3388 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3389
3390 if test $ac_cv_prog_gcc = yes; then
3391   GCC=yes
3392 else
3393   GCC=
3394 fi
3395
3396 ac_test_CFLAGS="${CFLAGS+set}"
3397 ac_save_CFLAGS="$CFLAGS"
3398 CFLAGS=
3399 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3400 echo "configure:3401: checking whether ${CC-cc} accepts -g" >&5
3401 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   echo 'void f(){}' > conftest.c
3405 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3406   ac_cv_prog_cc_g=yes
3407 else
3408   ac_cv_prog_cc_g=no
3409 fi
3410 rm -f conftest*
3411
3412 fi
3413
3414 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3415 if test "$ac_test_CFLAGS" = set; then
3416   CFLAGS="$ac_save_CFLAGS"
3417 elif test $ac_cv_prog_cc_g = yes; then
3418   if test "$GCC" = yes; then
3419     CFLAGS="-g -O2"
3420   else
3421     CFLAGS="-g"
3422   fi
3423 else
3424   if test "$GCC" = yes; then
3425     CFLAGS="-O2"
3426   else
3427     CFLAGS=
3428   fi
3429 fi
3430
3431 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3432 if test "${with_gnu_ld+set}" = set; then
3433   withval="$with_gnu_ld"
3434   test "$withval" = no || with_gnu_ld=yes
3435 else
3436   with_gnu_ld=no
3437 fi
3438
3439 ac_prog=ld
3440 if test "$GCC" = yes; then
3441   # Check if gcc -print-prog-name=ld gives a path.
3442   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3443 echo "configure:3444: checking for ld used by GCC" >&5
3444   case $host in
3445   *-*-mingw*)
3446     # gcc leaves a trailing carriage return which upsets mingw
3447     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3448   *)
3449     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3450   esac
3451   case $ac_prog in
3452     # Accept absolute paths.
3453     [\\/]* | [A-Za-z]:[\\/]*)
3454       re_direlt='/[^/][^/]*/\.\./'
3455       # Canonicalize the path of ld
3456       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3457       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3458         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3459       done
3460       test -z "$LD" && LD="$ac_prog"
3461       ;;
3462   "")
3463     # If it fails, then pretend we aren't using GCC.
3464     ac_prog=ld
3465     ;;
3466   *)
3467     # If it is relative, then search for the first ld in PATH.
3468     with_gnu_ld=unknown
3469     ;;
3470   esac
3471 elif test "$with_gnu_ld" = yes; then
3472   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3473 echo "configure:3474: checking for GNU ld" >&5
3474 else
3475   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3476 echo "configure:3477: checking for non-GNU ld" >&5
3477 fi
3478 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   if test -z "$LD"; then
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3483   for ac_dir in $PATH; do
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3486       lt_cv_path_LD="$ac_dir/$ac_prog"
3487       # Check to see if the program is GNU ld.  I'd rather use --version,
3488       # but apparently some GNU ld's only accept -v.
3489       # Break only if it was the GNU/non-GNU ld that we prefer.
3490       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3491         test "$with_gnu_ld" != no && break
3492       else
3493         test "$with_gnu_ld" != yes && break
3494       fi
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 else
3499   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3500 fi
3501 fi
3502
3503 LD="$lt_cv_path_LD"
3504 if test -n "$LD"; then
3505   echo "$ac_t""$LD" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3510 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3511 echo "configure:3512: checking if the linker ($LD) is GNU ld" >&5
3512 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3516 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3517   lt_cv_prog_gnu_ld=yes
3518 else
3519   lt_cv_prog_gnu_ld=no
3520 fi
3521 fi
3522
3523 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3524 with_gnu_ld=$lt_cv_prog_gnu_ld
3525
3526
3527 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3528 echo "configure:3529: checking for $LD option to reload object files" >&5
3529 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   lt_cv_ld_reload_flag='-r'
3533 fi
3534
3535 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3536 reload_flag=$lt_cv_ld_reload_flag
3537 test -n "$reload_flag" && reload_flag=" $reload_flag"
3538
3539 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3540 echo "configure:3541: checking for BSD-compatible nm" >&5
3541 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   if test -n "$NM"; then
3545   # Let the user override the test.
3546   lt_cv_path_NM="$NM"
3547 else
3548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3549   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3550     test -z "$ac_dir" && ac_dir=.
3551     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3552     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3553       # Check to see if the nm accepts a BSD-compat flag.
3554       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3555       #   nm: unknown option "B" ignored
3556       # Tru64's nm complains that /dev/null is an invalid object file
3557       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3558         lt_cv_path_NM="$tmp_nm -B"
3559         break
3560       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3561         lt_cv_path_NM="$tmp_nm -p"
3562         break
3563       else
3564         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3565         continue # so that we can try to find one that supports BSD flags
3566       fi
3567     fi
3568   done
3569   IFS="$ac_save_ifs"
3570   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3571 fi
3572 fi
3573
3574 NM="$lt_cv_path_NM"
3575 echo "$ac_t""$NM" 1>&6
3576
3577 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3578 echo "configure:3579: checking for a sed that does not truncate output" >&5
3579 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   # Loop through the user's path and test for sed and gsed.
3583 # Then use that list of sed's as ones to test for truncation.
3584 as_executable_p="test -f"
3585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586 for as_dir in $PATH
3587 do
3588   IFS=$as_save_IFS
3589   test -z "$as_dir" && as_dir=.
3590   for ac_prog in sed gsed; do
3591     for ac_exec_ext in '' $ac_executable_extensions; do
3592       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3593         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3594       fi
3595     done
3596   done
3597 done
3598
3599   # Create a temporary directory, and hook for its removal unless debugging.
3600 $debug ||
3601 {
3602   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3603   trap '{ (exit 1); exit 1; }' 1 2 13 15
3604 }
3605
3606 # Create a (secure) tmp directory for tmp files.
3607 : ${TMPDIR=/tmp}
3608 {
3609   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3610   test -n "$tmp" && test -d "$tmp"
3611 }  ||
3612 {
3613   tmp=$TMPDIR/sed$$-$RANDOM
3614   (umask 077 && mkdir $tmp)
3615 } ||
3616 {
3617    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3618    { (exit 1); exit 1; }
3619 }
3620   _max=0
3621   _count=0
3622   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3623   # along with /bin/sed that truncates output.
3624   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3625     test ! -f ${_sed} && break
3626     cat /dev/null > "$tmp/sed.in"
3627     _count=0
3628     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3629     # Check for GNU sed and select it if it is found.
3630     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3631       lt_cv_path_SED=${_sed}
3632       break
3633     fi
3634     while true; do
3635       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3636       mv "$tmp/sed.tmp" "$tmp/sed.in"
3637       cp "$tmp/sed.in" "$tmp/sed.nl"
3638       echo >>"$tmp/sed.nl"
3639       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3640       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3641       # 40000 chars as input seems more than enough
3642       test $_count -gt 10 && break
3643       _count=`expr $_count + 1`
3644       if test $_count -gt $_max; then
3645         _max=$_count
3646         lt_cv_path_SED=$_sed
3647       fi
3648     done
3649   done
3650   rm -rf "$tmp"
3651
3652 fi
3653
3654 if test "X$SED" != "X"; then
3655   lt_cv_path_SED=$SED
3656 else
3657   SED=$lt_cv_path_SED
3658 fi
3659 echo "$ac_t""$SED" 1>&6
3660
3661 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3662 echo "configure:3663: checking whether ln -s works" >&5
3663 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3664   echo $ac_n "(cached) $ac_c" 1>&6
3665 else
3666   rm -f conftestdata
3667 if ln -s X conftestdata 2>/dev/null
3668 then
3669   rm -f conftestdata
3670   ac_cv_prog_LN_S="ln -s"
3671 else
3672   ac_cv_prog_LN_S=ln
3673 fi
3674 fi
3675 LN_S="$ac_cv_prog_LN_S"
3676 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3677   echo "$ac_t""yes" 1>&6
3678 else
3679   echo "$ac_t""no" 1>&6
3680 fi
3681
3682 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3683 echo "configure:3684: checking how to recognise dependent libraries" >&5
3684 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   lt_cv_file_magic_cmd='$MAGIC_CMD'
3688 lt_cv_file_magic_test_file=
3689 lt_cv_deplibs_check_method='unknown'
3690 # Need to set the preceding variable on all platforms that support
3691 # interlibrary dependencies.
3692 # 'none' -- dependencies not supported.
3693 # `unknown' -- same as none, but documents that we really don't know.
3694 # 'pass_all' -- all dependencies passed with no checks.
3695 # 'test_compile' -- check by making test program.
3696 # 'file_magic [[regex]]' -- check by looking for files in library path
3697 # which responds to the $file_magic_cmd with a given egrep regex.
3698 # If you have `file' or equivalent on your system and you're not sure
3699 # whether `pass_all' will *always* work, you probably want this one.
3700
3701 case $host_os in
3702 aix4* | aix5*)
3703   lt_cv_deplibs_check_method=pass_all
3704   ;;
3705
3706 beos*)
3707   lt_cv_deplibs_check_method=pass_all
3708   ;;
3709
3710 bsdi4*)
3711   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3712   lt_cv_file_magic_cmd='/usr/bin/file -L'
3713   lt_cv_file_magic_test_file=/shlib/libc.so
3714   ;;
3715
3716 cygwin* | mingw* | pw32*)
3717   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3718   lt_cv_file_magic_cmd='$OBJDUMP -f'
3719   ;;
3720
3721 darwin* | rhapsody*)
3722   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3723   lt_cv_file_magic_cmd='/usr/bin/file -L'
3724   case "$host_os" in
3725   rhapsody* | darwin1.[012])
3726     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3727     ;;
3728   *) # Darwin 1.3 on
3729     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3730     ;;
3731   esac
3732   ;;
3733
3734 freebsd*)
3735   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3736     case $host_cpu in
3737     i*86 )
3738       # Not sure whether the presence of OpenBSD here was a mistake.
3739       # Let's accept both of them until this is cleared up.
3740       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3741       lt_cv_file_magic_cmd=/usr/bin/file
3742       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3743       ;;
3744     esac
3745   else
3746     lt_cv_deplibs_check_method=pass_all
3747   fi
3748   ;;
3749
3750 gnu*)
3751   lt_cv_deplibs_check_method=pass_all
3752   ;;
3753
3754 hpux10.20*|hpux11*)
3755   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3756   lt_cv_file_magic_cmd=/usr/bin/file
3757   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3758   ;;
3759
3760 irix5* | irix6* | nonstopux*)
3761   case $host_os in
3762   irix5* | nonstopux*)
3763     # this will be overridden with pass_all, but let us keep it just in case
3764     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3765     ;;
3766   *)
3767     case $LD in
3768     *-32|*"-32 ") libmagic=32-bit;;
3769     *-n32|*"-n32 ") libmagic=N32;;
3770     *-64|*"-64 ") libmagic=64-bit;;
3771     *) libmagic=never-match;;
3772     esac
3773     # this will be overridden with pass_all, but let us keep it just in case
3774     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3775     ;;
3776   esac
3777   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3778   lt_cv_deplibs_check_method=pass_all
3779   ;;
3780
3781 # This must be Linux ELF.
3782 linux-gnu*)
3783   case $host_cpu in
3784   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3785     lt_cv_deplibs_check_method=pass_all ;;
3786   *)
3787     # glibc up to 2.1.1 does not perform some relocations on ARM
3788     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3789   esac
3790   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3791   ;;
3792
3793 netbsd*)
3794   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3795     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3796   else
3797     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3798   fi
3799   ;;
3800
3801 newos6*)
3802   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3803   lt_cv_file_magic_cmd=/usr/bin/file
3804   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3805   ;;
3806
3807 openbsd*)
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3810   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3811     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3812   else
3813     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3814   fi
3815   ;;
3816
3817 openedition*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 osf3* | osf4* | osf5*)
3822   # this will be overridden with pass_all, but let us keep it just in case
3823   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 sco3.2v5*)
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 solaris*)
3833   lt_cv_deplibs_check_method=pass_all
3834   lt_cv_file_magic_test_file=/lib/libc.so
3835   ;;
3836
3837 sysv5uw[78]* | sysv4*uw2*)
3838   lt_cv_deplibs_check_method=pass_all
3839   ;;
3840
3841 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3842   case $host_vendor in
3843   motorola)
3844     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
3845     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3846     ;;
3847   ncr)
3848     lt_cv_deplibs_check_method=pass_all
3849     ;;
3850   sequent)
3851     lt_cv_file_magic_cmd='/bin/file'
3852     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3853     ;;
3854   sni)
3855     lt_cv_file_magic_cmd='/bin/file'
3856     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3857     lt_cv_file_magic_test_file=/lib/libc.so
3858     ;;
3859   siemens)
3860     lt_cv_deplibs_check_method=pass_all
3861     ;;
3862   esac
3863   ;;
3864 esac
3865
3866 fi
3867
3868 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3869 file_magic_cmd=$lt_cv_file_magic_cmd
3870 deplibs_check_method=$lt_cv_deplibs_check_method
3871
3872 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3873 echo "configure:3874: checking for object suffix" >&5
3874 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   rm -f conftest*
3878 echo 'int i = 1;' > conftest.$ac_ext
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880   for ac_file in conftest.*; do
3881     case $ac_file in
3882     *.c) ;;
3883     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3884     esac
3885   done
3886 else
3887   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3888 fi
3889 rm -f conftest*
3890 fi
3891
3892 echo "$ac_t""$ac_cv_objext" 1>&6
3893 OBJEXT=$ac_cv_objext
3894 ac_objext=$ac_cv_objext
3895
3896
3897
3898
3899 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3900 echo "configure:3901: checking for executable suffix" >&5
3901 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3905   ac_cv_exeext=.exe
3906 else
3907   rm -f conftest*
3908   echo 'int main () { return 0; }' > conftest.$ac_ext
3909   ac_cv_exeext=
3910   if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3911     for file in conftest.*; do
3912       case $file in
3913       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3914       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3915       esac
3916     done
3917   else
3918     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3919   fi
3920   rm -f conftest*
3921   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3922 fi
3923 fi
3924
3925 EXEEXT=""
3926 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3927 echo "$ac_t""${ac_cv_exeext}" 1>&6
3928 ac_exeext=$EXEEXT
3929
3930 if test $host != $build; then
3931   ac_tool_prefix=${host_alias}-
3932 else
3933   ac_tool_prefix=
3934 fi
3935
3936
3937
3938
3939 # Check for command to grab the raw symbol name followed by C symbol from nm.
3940 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3941 echo "configure:3942: checking command to parse $NM output" >&5
3942 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3943   echo $ac_n "(cached) $ac_c" 1>&6
3944 else
3945   
3946 # These are sane defaults that work on at least a few old systems.
3947 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3948
3949 # Character class describing NM global symbol codes.
3950 symcode='[BCDEGRST]'
3951
3952 # Regexp to match symbols that can be accessed directly from C.
3953 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3954
3955 # Transform the above into a raw symbol and a C symbol.
3956 symxfrm='\1 \2\3 \3'
3957
3958 # Transform an extracted symbol line into a proper C declaration
3959 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3960
3961 # Transform an extracted symbol line into symbol name and symbol address
3962 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3963
3964 # Define system-specific variables.
3965 case $host_os in
3966 aix*)
3967   symcode='[BCDT]'
3968   ;;
3969 cygwin* | mingw* | pw32*)
3970   symcode='[ABCDGISTW]'
3971   ;;
3972 hpux*) # Its linker distinguishes data from code symbols
3973   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3974   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
3975   ;;
3976 irix* | nonstopux*)
3977   symcode='[BCDEGRST]'
3978   ;;
3979 osf*)
3980   symcode='[BCDEGQRST]'
3981   ;;
3982 solaris* | sysv5*)
3983   symcode='[BDT]'
3984   ;;
3985 sysv4)
3986   symcode='[DFNSTU]'
3987   ;;
3988 esac
3989
3990 # Handle CRLF in mingw tool chain
3991 opt_cr=
3992 case $host_os in
3993 mingw*)
3994   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3995   ;;
3996 esac
3997
3998 # If we're using GNU nm, then use its standard symbol codes.
3999 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4000   symcode='[ABCDGISTW]'
4001 fi
4002
4003 # Try without a prefix undercore, then with it.
4004 for ac_symprfx in "" "_"; do
4005
4006   # Write the raw and C identifiers.
4007 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4008
4009   # Check to see that the pipe works correctly.
4010   pipe_works=no
4011   rm -f conftest*
4012   cat > conftest.$ac_ext <<EOF
4013 #ifdef __cplusplus
4014 extern "C" {
4015 #endif
4016 char nm_test_var;
4017 void nm_test_func(){}
4018 #ifdef __cplusplus
4019 }
4020 #endif
4021 int main(){nm_test_var='a';nm_test_func();return(0);}
4022 EOF
4023
4024   if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4025     # Now try to grab the symbols.
4026     nlist=conftest.nm
4027     if { (eval echo configure:4028: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
4028       # Try sorting and uniquifying the output.
4029       if sort "$nlist" | uniq > "$nlist"T; then
4030         mv -f "$nlist"T "$nlist"
4031       else
4032         rm -f "$nlist"T
4033       fi
4034
4035       # Make sure that we snagged all the symbols we need.
4036       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4037         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4038           cat <<EOF > conftest.$ac_ext
4039 #ifdef __cplusplus
4040 extern "C" {
4041 #endif
4042
4043 EOF
4044           # Now generate the symbol file.
4045           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4046
4047           cat <<EOF >> conftest.$ac_ext
4048 #if defined (__STDC__) && __STDC__
4049 # define lt_ptr void *
4050 #else
4051 # define lt_ptr char *
4052 # define const
4053 #endif
4054
4055 /* The mapping between symbol names and symbols. */
4056 const struct {
4057   const char *name;
4058   lt_ptr address;
4059 }
4060 lt_preloaded_symbols[] =
4061 {
4062 EOF
4063           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4064           cat <<\EOF >> conftest.$ac_ext
4065   {0, (lt_ptr) 0}
4066 };
4067
4068 #ifdef __cplusplus
4069 }
4070 #endif
4071 EOF
4072           # Now try linking the two files.
4073           mv conftest.$ac_objext conftstm.$ac_objext
4074           save_LIBS="$LIBS"
4075           save_CFLAGS="$CFLAGS"
4076           LIBS="conftstm.$ac_objext"
4077           CFLAGS="$CFLAGS$no_builtin_flag"
4078           if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4079             pipe_works=yes
4080           fi
4081           LIBS="$save_LIBS"
4082           CFLAGS="$save_CFLAGS"
4083         else
4084           echo "cannot find nm_test_func in $nlist" >&5
4085         fi
4086       else
4087         echo "cannot find nm_test_var in $nlist" >&5
4088       fi
4089     else
4090       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4091     fi
4092   else
4093     echo "$progname: failed program was:" >&5
4094     cat conftest.$ac_ext >&5
4095   fi
4096   rm -f conftest* conftst*
4097
4098   # Do not use the global_symbol_pipe unless it works.
4099   if test "$pipe_works" = yes; then
4100     break
4101   else
4102     lt_cv_sys_global_symbol_pipe=
4103   fi
4104 done
4105
4106 fi
4107
4108 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4109 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4110   global_symbol_to_cdecl=
4111   global_symbol_to_c_name_address=
4112 else
4113   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4114   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4115 fi
4116 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4117 then
4118   echo "$ac_t""failed" 1>&6
4119 else
4120   echo "$ac_t""ok" 1>&6
4121 fi
4122
4123 for ac_hdr in dlfcn.h
4124 do
4125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4127 echo "configure:4128: checking for $ac_hdr" >&5
4128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4129   echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131   cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <$ac_hdr>
4135 EOF
4136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4137 { (eval echo configure:4138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4139 if test -z "$ac_err"; then
4140   rm -rf conftest*
4141   eval "ac_cv_header_$ac_safe=yes"
4142 else
4143   echo "$ac_err" >&5
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   eval "ac_cv_header_$ac_safe=no"
4148 fi
4149 rm -f conftest*
4150 fi
4151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4152   echo "$ac_t""yes" 1>&6
4153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4154   cat >> confdefs.h <<EOF
4155 #define $ac_tr_hdr 1
4156 EOF
4157  
4158 else
4159   echo "$ac_t""no" 1>&6
4160 fi
4161 done
4162
4163
4164
4165
4166
4167
4168 # Only perform the check for file, if the check method requires it
4169 case $deplibs_check_method in
4170 file_magic*)
4171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4173 echo "configure:4174: checking for ${ac_tool_prefix}file" >&5
4174 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   case $MAGIC_CMD in
4178   /*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4180   ;;
4181   ?:/*)
4182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4183   ;;
4184   *)
4185   ac_save_MAGIC_CMD="$MAGIC_CMD"
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="/usr/bin:$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/${ac_tool_prefix}file; then
4191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4192       if test -n "$file_magic_test_file"; then
4193         case $deplibs_check_method in
4194         "file_magic "*)
4195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4198             egrep "$file_magic_regex" > /dev/null; then
4199             :
4200           else
4201             cat <<EOF 1>&2
4202
4203 *** Warning: the command libtool uses to detect shared libraries,
4204 *** $file_magic_cmd, produces output that libtool cannot recognize.
4205 *** The result is that libtool may fail to recognize shared libraries
4206 *** as such.  This will affect the creation of libtool libraries that
4207 *** depend on shared libraries, but programs linked with such libtool
4208 *** libraries will work regardless of this problem.  Nevertheless, you
4209 *** may want to report the problem to your system manager and/or to
4210 *** bug-libtool@gnu.org
4211
4212 EOF
4213           fi ;;
4214         esac
4215       fi
4216       break
4217     fi
4218   done
4219   IFS="$ac_save_ifs"
4220   MAGIC_CMD="$ac_save_MAGIC_CMD"
4221   ;;
4222 esac
4223 fi
4224
4225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4226 if test -n "$MAGIC_CMD"; then
4227   echo "$ac_t""$MAGIC_CMD" 1>&6
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231
4232 if test -z "$lt_cv_path_MAGIC_CMD"; then
4233   if test -n "$ac_tool_prefix"; then
4234     echo $ac_n "checking for file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298
4299   fi
4300   ;;
4301 esac
4302
4303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_word" >&5
4307 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   if test -n "$RANLIB"; then
4311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4312 else
4313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4314   ac_dummy="$PATH"
4315   for ac_dir in $ac_dummy; do
4316     test -z "$ac_dir" && ac_dir=.
4317     if test -f $ac_dir/$ac_word; then
4318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4319       break
4320     fi
4321   done
4322   IFS="$ac_save_ifs"
4323 fi
4324 fi
4325 RANLIB="$ac_cv_prog_RANLIB"
4326 if test -n "$RANLIB"; then
4327   echo "$ac_t""$RANLIB" 1>&6
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331
4332
4333 if test -z "$ac_cv_prog_RANLIB"; then
4334 if test -n "$ac_tool_prefix"; then
4335   # Extract the first word of "ranlib", so it can be a program name with args.
4336 set dummy ranlib; ac_word=$2
4337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_word" >&5
4339 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4340   echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342   if test -n "$RANLIB"; then
4343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4344 else
4345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4346   ac_dummy="$PATH"
4347   for ac_dir in $ac_dummy; do
4348     test -z "$ac_dir" && ac_dir=.
4349     if test -f $ac_dir/$ac_word; then
4350       ac_cv_prog_RANLIB="ranlib"
4351       break
4352     fi
4353   done
4354   IFS="$ac_save_ifs"
4355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4356 fi
4357 fi
4358 RANLIB="$ac_cv_prog_RANLIB"
4359 if test -n "$RANLIB"; then
4360   echo "$ac_t""$RANLIB" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365 else
4366   RANLIB=":"
4367 fi
4368 fi
4369
4370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4371 set dummy ${ac_tool_prefix}strip; ac_word=$2
4372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_word" >&5
4374 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   if test -n "$STRIP"; then
4378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4379 else
4380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4381   ac_dummy="$PATH"
4382   for ac_dir in $ac_dummy; do
4383     test -z "$ac_dir" && ac_dir=.
4384     if test -f $ac_dir/$ac_word; then
4385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4386       break
4387     fi
4388   done
4389   IFS="$ac_save_ifs"
4390 fi
4391 fi
4392 STRIP="$ac_cv_prog_STRIP"
4393 if test -n "$STRIP"; then
4394   echo "$ac_t""$STRIP" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400 if test -z "$ac_cv_prog_STRIP"; then
4401 if test -n "$ac_tool_prefix"; then
4402   # Extract the first word of "strip", so it can be a program name with args.
4403 set dummy strip; ac_word=$2
4404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_word" >&5
4406 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   if test -n "$STRIP"; then
4410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4411 else
4412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4413   ac_dummy="$PATH"
4414   for ac_dir in $ac_dummy; do
4415     test -z "$ac_dir" && ac_dir=.
4416     if test -f $ac_dir/$ac_word; then
4417       ac_cv_prog_STRIP="strip"
4418       break
4419     fi
4420   done
4421   IFS="$ac_save_ifs"
4422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4423 fi
4424 fi
4425 STRIP="$ac_cv_prog_STRIP"
4426 if test -n "$STRIP"; then
4427   echo "$ac_t""$STRIP" 1>&6
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 else
4433   STRIP=":"
4434 fi
4435 fi
4436
4437
4438 enable_dlopen=yes
4439 enable_win32_dll=yes
4440
4441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4442 if test "${enable_libtool_lock+set}" = set; then
4443   enableval="$enable_libtool_lock"
4444   :
4445 fi
4446
4447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4448
4449 # Some flags need to be propagated to the compiler or linker for good
4450 # libtool support.
4451 case $host in
4452 *-*-irix6*)
4453   # Find out which ABI we are using.
4454   echo '#line 4455 "configure"' > conftest.$ac_ext
4455   if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456     case `/usr/bin/file conftest.$ac_objext` in
4457     *32-bit*)
4458       LD="${LD-ld} -32"
4459       ;;
4460     *N32*)
4461       LD="${LD-ld} -n32"
4462       ;;
4463     *64-bit*)
4464       LD="${LD-ld} -64"
4465       ;;
4466     esac
4467   fi
4468   rm -rf conftest*
4469   ;;
4470
4471 *-*-sco3.2v5*)
4472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4473   SAVE_CFLAGS="$CFLAGS"
4474   CFLAGS="$CFLAGS -belf"
4475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4476 echo "configure:4477: checking whether the C compiler needs -belf" >&5
4477 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481      ac_ext=c
4482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4486 cross_compiling=$ac_cv_prog_cc_cross
4487
4488      cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491
4492 int main() {
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497   rm -rf conftest*
4498   lt_cv_cc_needs_belf=yes
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=no
4504 fi
4505 rm -f conftest*
4506      ac_ext=c
4507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4508 ac_cpp='$CPP $CPPFLAGS'
4509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4511 cross_compiling=$ac_cv_prog_cc_cross
4512
4513 fi
4514
4515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4518     CFLAGS="$SAVE_CFLAGS"
4519   fi
4520   ;;
4521
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$DLLTOOL"; then
4531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 DLLTOOL="$ac_cv_prog_DLLTOOL"
4546 if test -n "$DLLTOOL"; then
4547   echo "$ac_t""$DLLTOOL" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_DLLTOOL"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "dlltool", so it can be a program name with args.
4556 set dummy dlltool; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$DLLTOOL"; then
4563   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_DLLTOOL="dlltool"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4576 fi
4577 fi
4578 DLLTOOL="$ac_cv_prog_DLLTOOL"
4579 if test -n "$DLLTOOL"; then
4580   echo "$ac_t""$DLLTOOL" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   DLLTOOL="false"
4587 fi
4588 fi
4589
4590   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}as; ac_word=$2
4592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_word" >&5
4594 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   if test -n "$AS"; then
4598   ac_cv_prog_AS="$AS" # Let the user override the test.
4599 else
4600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4601   ac_dummy="$PATH"
4602   for ac_dir in $ac_dummy; do
4603     test -z "$ac_dir" && ac_dir=.
4604     if test -f $ac_dir/$ac_word; then
4605       ac_cv_prog_AS="${ac_tool_prefix}as"
4606       break
4607     fi
4608   done
4609   IFS="$ac_save_ifs"
4610 fi
4611 fi
4612 AS="$ac_cv_prog_AS"
4613 if test -n "$AS"; then
4614   echo "$ac_t""$AS" 1>&6
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619
4620 if test -z "$ac_cv_prog_AS"; then
4621 if test -n "$ac_tool_prefix"; then
4622   # Extract the first word of "as", so it can be a program name with args.
4623 set dummy as; ac_word=$2
4624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_word" >&5
4626 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   if test -n "$AS"; then
4630   ac_cv_prog_AS="$AS" # Let the user override the test.
4631 else
4632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4633   ac_dummy="$PATH"
4634   for ac_dir in $ac_dummy; do
4635     test -z "$ac_dir" && ac_dir=.
4636     if test -f $ac_dir/$ac_word; then
4637       ac_cv_prog_AS="as"
4638       break
4639     fi
4640   done
4641   IFS="$ac_save_ifs"
4642   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4643 fi
4644 fi
4645 AS="$ac_cv_prog_AS"
4646 if test -n "$AS"; then
4647   echo "$ac_t""$AS" 1>&6
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651
4652 else
4653   AS="false"
4654 fi
4655 fi
4656
4657   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4658 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_word" >&5
4661 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   if test -n "$OBJDUMP"; then
4665   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4666 else
4667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4668   ac_dummy="$PATH"
4669   for ac_dir in $ac_dummy; do
4670     test -z "$ac_dir" && ac_dir=.
4671     if test -f $ac_dir/$ac_word; then
4672       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4673       break
4674     fi
4675   done
4676   IFS="$ac_save_ifs"
4677 fi
4678 fi
4679 OBJDUMP="$ac_cv_prog_OBJDUMP"
4680 if test -n "$OBJDUMP"; then
4681   echo "$ac_t""$OBJDUMP" 1>&6
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686
4687 if test -z "$ac_cv_prog_OBJDUMP"; then
4688 if test -n "$ac_tool_prefix"; then
4689   # Extract the first word of "objdump", so it can be a program name with args.
4690 set dummy objdump; ac_word=$2
4691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4692 echo "configure:4693: checking for $ac_word" >&5
4693 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   if test -n "$OBJDUMP"; then
4697   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4698 else
4699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4700   ac_dummy="$PATH"
4701   for ac_dir in $ac_dummy; do
4702     test -z "$ac_dir" && ac_dir=.
4703     if test -f $ac_dir/$ac_word; then
4704       ac_cv_prog_OBJDUMP="objdump"
4705       break
4706     fi
4707   done
4708   IFS="$ac_save_ifs"
4709   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4710 fi
4711 fi
4712 OBJDUMP="$ac_cv_prog_OBJDUMP"
4713 if test -n "$OBJDUMP"; then
4714   echo "$ac_t""$OBJDUMP" 1>&6
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719 else
4720   OBJDUMP="false"
4721 fi
4722 fi
4723
4724
4725   # recent cygwin and mingw systems supply a stub DllMain which the user
4726   # can override, but on older systems we have to supply one
4727   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4728 echo "configure:4729: checking if libtool should supply DllMain function" >&5
4729 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4738       DllMain (0, 0, 0);
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   lt_cv_need_dllmain=no
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=yes
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4754
4755   case $host/$CC in
4756   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4757     # old mingw systems require "-dll" to link a DLL, while more recent ones
4758     # require "-mdll"
4759     SAVE_CFLAGS="$CFLAGS"
4760     CFLAGS="$CFLAGS -mdll"
4761     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4762 echo "configure:4763: checking how to link DLLs" >&5
4763 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   lt_cv_cc_dll_switch=-mdll
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-dll
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4787     CFLAGS="$SAVE_CFLAGS" ;;
4788   *-*-cygwin* | *-*-pw32*)
4789     # cygwin systems need to pass --dll to the linker, and not link
4790     # crt.o which will require a WinMain@16 definition.
4791     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4792   esac
4793   ;;
4794   
4795 esac
4796
4797 # Sed substitution that helps us do robust quoting.  It backslashifies
4798 # metacharacters that are still active within double-quoted strings.
4799 Xsed='sed -e s/^X//'
4800 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4801
4802 # Same as above, but do not quote variable references.
4803 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4804
4805 # Sed substitution to delay expansion of an escaped shell variable in a
4806 # double_quote_subst'ed string.
4807 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4808
4809 # Constants:
4810 rm="rm -f"
4811
4812 # Global variables:
4813 default_ofile=libtool
4814 can_build_shared=yes
4815
4816 # All known linkers require a `.a' archive for static linking (except M$VC,
4817 # which needs '.lib').
4818 libext=a
4819 ltmain="$ac_aux_dir/ltmain.sh"
4820 ofile="$default_ofile"
4821 with_gnu_ld="$lt_cv_prog_gnu_ld"
4822 need_locks="$enable_libtool_lock"
4823
4824 old_CC="$CC"
4825 old_CFLAGS="$CFLAGS"
4826
4827 # Set sane defaults for various variables
4828 test -z "$AR" && AR=ar
4829 test -z "$AR_FLAGS" && AR_FLAGS=cru
4830 test -z "$AS" && AS=as
4831 test -z "$CC" && CC=cc
4832 test -z "$DLLTOOL" && DLLTOOL=dlltool
4833 test -z "$LD" && LD=ld
4834 test -z "$LN_S" && LN_S="ln -s"
4835 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4836 test -z "$NM" && NM=nm
4837 test -z "$OBJDUMP" && OBJDUMP=objdump
4838 test -z "$RANLIB" && RANLIB=:
4839 test -z "$STRIP" && STRIP=:
4840 test -z "$ac_objext" && ac_objext=o
4841
4842 if test x"$host" != x"$build"; then
4843   ac_tool_prefix=${host_alias}-
4844 else
4845   ac_tool_prefix=
4846 fi
4847
4848 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4849 case $host_os in
4850 linux-gnu*) ;;
4851 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4852 esac
4853
4854 case $host_os in
4855 aix3*)
4856   # AIX sometimes has problems with the GCC collect2 program.  For some
4857   # reason, if we set the COLLECT_NAMES environment variable, the problems
4858   # vanish in a puff of smoke.
4859   if test "X${COLLECT_NAMES+set}" != Xset; then
4860     COLLECT_NAMES=
4861     export COLLECT_NAMES
4862   fi
4863   ;;
4864 esac
4865
4866 # Determine commands to create old-style static archives.
4867 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4868 old_postinstall_cmds='chmod 644 $oldlib'
4869 old_postuninstall_cmds=
4870
4871 if test -n "$RANLIB"; then
4872   case $host_os in
4873   openbsd*)
4874     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   *)
4877     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4878     ;;
4879   esac
4880   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4881 fi
4882
4883 # Allow CC to be a program name with arguments.
4884 set dummy $CC
4885 compiler="$2"
4886
4887 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4888 echo "configure:4889: checking for objdir" >&5
4889 rm -f .libs 2>/dev/null
4890 mkdir .libs 2>/dev/null
4891 if test -d .libs; then
4892   objdir=.libs
4893 else
4894   # MS-DOS does not allow filenames that begin with a dot.
4895   objdir=_libs
4896 fi
4897 rmdir .libs 2>/dev/null
4898 echo "$ac_t""$objdir" 1>&6
4899
4900
4901 # Check whether --with-pic or --without-pic was given.
4902 if test "${with_pic+set}" = set; then
4903   withval="$with_pic"
4904   pic_mode="$withval"
4905 else
4906   pic_mode=default
4907 fi
4908
4909 test -z "$pic_mode" && pic_mode=default
4910
4911 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4912 # in isolation, and that seeing it set (from the cache) indicates that
4913 # the associated values are set (in the cache) correctly too.
4914 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4915 echo "configure:4916: checking for $compiler option to produce PIC" >&5
4916 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919    lt_cv_prog_cc_pic=
4920   lt_cv_prog_cc_shlib=
4921   lt_cv_prog_cc_wl=
4922   lt_cv_prog_cc_static=
4923   lt_cv_prog_cc_no_builtin=
4924   lt_cv_prog_cc_can_build_shared=$can_build_shared
4925
4926   if test "$GCC" = yes; then
4927     lt_cv_prog_cc_wl='-Wl,'
4928     lt_cv_prog_cc_static='-static'
4929
4930     case $host_os in
4931     aix*)
4932       # Below there is a dirty hack to force normal static linking with -ldl
4933       # The problem is because libdl dynamically linked with both libc and
4934       # libC (AIX C++ library), which obviously doesn't included in libraries
4935       # list by gcc. This cause undefined symbols with -static flags.
4936       # This hack allows C programs to be linked with "-static -ldl", but
4937       # not sure about C++ programs.
4938       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4939       ;;
4940     amigaos*)
4941       # FIXME: we need at least 68020 code to build shared libraries, but
4942       # adding the `-m68020' flag to GCC prevents building anything better,
4943       # like `-m68040'.
4944       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4945       ;;
4946     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4947       # PIC is the default for these OSes.
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       lt_cv_prog_cc_pic='-fno-common'
4953       ;;
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959     sysv4*MP*)
4960       if test -d /usr/nec; then
4961          lt_cv_prog_cc_pic=-Kconform_pic
4962       fi
4963       ;;
4964     *)
4965       lt_cv_prog_cc_pic='-fPIC'
4966       ;;
4967     esac
4968   else
4969     # PORTME Check for PIC flags for the system compiler.
4970     case $host_os in
4971     aix3* | aix4* | aix5*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       # All AIX code is PIC.
4974       if test "$host_cpu" = ia64; then
4975         # AIX 5 now supports IA64 processor
4976         lt_cv_prog_cc_static='-Bstatic'
4977       else
4978         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4979       fi
4980       ;;
4981
4982     hpux9* | hpux10* | hpux11*)
4983       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4984       lt_cv_prog_cc_wl='-Wl,'
4985       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4986       lt_cv_prog_cc_pic='+Z'
4987       ;;
4988
4989     irix5* | irix6* | nonstopux*)
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       # PIC (with -KPIC) is the default.
4993       ;;
4994
4995     cygwin* | mingw* | pw32* | os2*)
4996       # This hack is so that the source file can tell whether it is being
4997       # built for inclusion in a dll (and should export symbols for example).
4998       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4999       ;;
5000
5001     newsos6)
5002       lt_cv_prog_cc_pic='-KPIC'
5003       lt_cv_prog_cc_static='-Bstatic'
5004       ;;
5005     
5006     openedition)
5007       # XPLINK code is PIC by default
5008       ;;
5009
5010     osf3* | osf4* | osf5*)
5011       # All OSF/1 code is PIC.
5012       lt_cv_prog_cc_wl='-Wl,'
5013       lt_cv_prog_cc_static='-non_shared'
5014       ;;
5015
5016     sco3.2v5*)
5017       lt_cv_prog_cc_pic='-Kpic'
5018       lt_cv_prog_cc_static='-dn'
5019       lt_cv_prog_cc_shlib='-belf'
5020       ;;
5021
5022     solaris*)
5023       lt_cv_prog_cc_pic='-KPIC'
5024       lt_cv_prog_cc_static='-Bstatic'
5025       lt_cv_prog_cc_wl='-Wl,'
5026       ;;
5027
5028     sunos4*)
5029       lt_cv_prog_cc_pic='-PIC'
5030       lt_cv_prog_cc_static='-Bstatic'
5031       lt_cv_prog_cc_wl='-Qoption ld '
5032       ;;
5033
5034     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5035       lt_cv_prog_cc_pic='-KPIC'
5036       lt_cv_prog_cc_static='-Bstatic'
5037       lt_cv_prog_cc_wl='-Wl,'
5038       ;;
5039
5040     uts4*)
5041       lt_cv_prog_cc_pic='-pic'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       ;;
5044
5045     sysv4*MP*)
5046       if test -d /usr/nec ;then
5047         lt_cv_prog_cc_pic='-Kconform_pic'
5048         lt_cv_prog_cc_static='-Bstatic'
5049       fi
5050       ;;
5051
5052     *)
5053       lt_cv_prog_cc_can_build_shared=no
5054       ;;
5055     esac
5056   fi
5057
5058 fi
5059
5060 if test -z "$lt_cv_prog_cc_pic"; then
5061   echo "$ac_t""none" 1>&6
5062 else
5063   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5064
5065   # Check to make sure the pic_flag actually works.
5066   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5067 echo "configure:5068: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5068   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071       save_CFLAGS="$CFLAGS"
5072     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5073     cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082   rm -rf conftest*
5083         case $host_os in
5084       hpux9* | hpux10* | hpux11*)
5085         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5086         # they create non-PIC objects.  So, if there were any warnings, we
5087         # assume that PIC is not supported.
5088         if test -s conftest.err; then
5089           lt_cv_prog_cc_pic_works=no
5090         else
5091           lt_cv_prog_cc_pic_works=yes
5092         fi
5093         ;;
5094       *)
5095         lt_cv_prog_cc_pic_works=yes
5096         ;;
5097       esac
5098     
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103         lt_cv_prog_cc_pic_works=no
5104     
5105 fi
5106 rm -f conftest*
5107     CFLAGS="$save_CFLAGS"
5108   
5109 fi
5110
5111
5112   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5113     lt_cv_prog_cc_pic=
5114     lt_cv_prog_cc_can_build_shared=no
5115   else
5116     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5117   fi
5118
5119   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5120 fi
5121
5122 # Check for any special shared library compilation flags.
5123 if test -n "$lt_cv_prog_cc_shlib"; then
5124   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5125   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5126   else
5127    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5128     lt_cv_prog_cc_can_build_shared=no
5129   fi
5130 fi
5131
5132 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5134 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137     lt_cv_prog_cc_static_works=no
5138   save_LDFLAGS="$LDFLAGS"
5139   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5140   cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   lt_cv_prog_cc_static_works=yes
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154 fi
5155 rm -f conftest*
5156   LDFLAGS="$save_LDFLAGS"
5157
5158 fi
5159
5160
5161 # Belt *and* braces to stop my trousers falling down:
5162 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5163 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5164
5165 pic_flag="$lt_cv_prog_cc_pic"
5166 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5167 wl="$lt_cv_prog_cc_wl"
5168 link_static_flag="$lt_cv_prog_cc_static"
5169 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5170 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5171
5172
5173 # Check to see if options -o and -c are simultaneously supported by compiler
5174 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5175 echo "configure:5176: checking if $compiler supports -c -o file.$ac_objext" >&5
5176 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   
5180 $rm -r conftest 2>/dev/null
5181 mkdir conftest
5182 cd conftest
5183 echo "int some_variable = 0;" > conftest.$ac_ext
5184 mkdir out
5185 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5186 # that will create temporary files in the current directory regardless of
5187 # the output directory.  Thus, making CWD read-only will cause this test
5188 # to fail, enabling locking or at least warning the user not to do parallel
5189 # builds.
5190 chmod -w .
5191 save_CFLAGS="$CFLAGS"
5192 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5193 compiler_c_o=no
5194 if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5195   # The compiler can only warn and ignore the option if not recognized
5196   # So say no if there are warnings
5197   if test -s out/conftest.err; then
5198     lt_cv_compiler_c_o=no
5199   else
5200     lt_cv_compiler_c_o=yes
5201   fi
5202 else
5203   # Append any errors to the config.log.
5204   cat out/conftest.err 1>&5
5205   lt_cv_compiler_c_o=no
5206 fi
5207 CFLAGS="$save_CFLAGS"
5208 chmod u+w .
5209 $rm conftest* out/*
5210 rmdir out
5211 cd ..
5212 rmdir conftest
5213 $rm -r conftest 2>/dev/null
5214
5215 fi
5216
5217 compiler_c_o=$lt_cv_compiler_c_o
5218 echo "$ac_t""$compiler_c_o" 1>&6
5219
5220 if test x"$compiler_c_o" = x"yes"; then
5221   # Check to see if we can write to a .lo
5222   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -c -o file.lo" >&5
5224   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228   lt_cv_compiler_o_lo=no
5229   save_CFLAGS="$CFLAGS"
5230   CFLAGS="$CFLAGS -c -o conftest.lo"
5231   save_objext="$ac_objext"
5232   ac_objext=lo
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 int some_variable = 0;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243       # The compiler can only warn and ignore the option if not recognized
5244     # So say no if there are warnings
5245     if test -s conftest.err; then
5246       lt_cv_compiler_o_lo=no
5247     else
5248       lt_cv_compiler_o_lo=yes
5249     fi
5250   
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254 fi
5255 rm -f conftest*
5256   ac_objext="$save_objext"
5257   CFLAGS="$save_CFLAGS"
5258   
5259 fi
5260
5261   compiler_o_lo=$lt_cv_compiler_o_lo
5262   echo "$ac_t""$compiler_o_lo" 1>&6
5263 else
5264   compiler_o_lo=no
5265 fi
5266
5267 # Check to see if we can do hard links to lock some files if needed
5268 hard_links="nottested"
5269 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5270   # do not overwrite the value of need_locks provided by the user
5271   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5272 echo "configure:5273: checking if we can lock with hard links" >&5
5273   hard_links=yes
5274   $rm conftest*
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   touch conftest.a
5277   ln conftest.a conftest.b 2>&5 || hard_links=no
5278   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5279   echo "$ac_t""$hard_links" 1>&6
5280   if test "$hard_links" = no; then
5281     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5282     need_locks=warn
5283   fi
5284 else
5285   need_locks=no
5286 fi
5287
5288 if test "$GCC" = yes; then
5289   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5290   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5292   echo "int some_variable = 0;" > conftest.$ac_ext
5293   save_CFLAGS="$CFLAGS"
5294   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5295   compiler_rtti_exceptions=no
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       compiler_rtti_exceptions=no
5310     else
5311       compiler_rtti_exceptions=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   CFLAGS="$save_CFLAGS"
5320   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5321
5322   if test "$compiler_rtti_exceptions" = "yes"; then
5323     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5324   else
5325     no_builtin_flag=' -fno-builtin'
5326   fi
5327 fi
5328
5329 # See if the linker supports building shared libraries.
5330 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking whether the linker ($LD) supports shared libraries" >&5
5332
5333 allow_undefined_flag=
5334 no_undefined_flag=
5335 need_lib_prefix=unknown
5336 need_version=unknown
5337 # when you set need_version to no, make sure it does not cause -set_version
5338 # flags to be left without arguments
5339 archive_cmds=
5340 archive_expsym_cmds=
5341 old_archive_from_new_cmds=
5342 old_archive_from_expsyms_cmds=
5343 export_dynamic_flag_spec=
5344 whole_archive_flag_spec=
5345 thread_safe_flag_spec=
5346 hardcode_into_libs=no
5347 hardcode_libdir_flag_spec=
5348 hardcode_libdir_separator=
5349 hardcode_direct=no
5350 hardcode_minus_L=no
5351 hardcode_shlibpath_var=unsupported
5352 runpath_var=
5353 link_all_deplibs=unknown
5354 always_export_symbols=no
5355 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5356 # include_expsyms should be a list of space-separated symbols to be *always*
5357 # included in the symbol list
5358 include_expsyms=
5359 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5360 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5361 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5362 # as well as any symbol that contains `d'.
5363 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5364 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5365 # platforms (ab)use it in PIC code, but their linkers get confused if
5366 # the symbol is explicitly referenced.  Since portable code cannot
5367 # rely on this symbol name, it's probably fine to never include it in
5368 # preloaded symbol tables.
5369 extract_expsyms_cmds=
5370
5371 case $host_os in
5372 cygwin* | mingw* | pw32*)
5373   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5374   # When not using gcc, we currently assume that we are using
5375   # Microsoft Visual C++.
5376   if test "$GCC" != yes; then
5377     with_gnu_ld=no
5378   fi
5379   ;;
5380 openbsd*)
5381   with_gnu_ld=no
5382   ;;
5383 esac
5384
5385 ld_shlibs=yes
5386 if test "$with_gnu_ld" = yes; then
5387   # If archive_cmds runs LD, not CC, wlarc should be empty
5388   wlarc='${wl}'
5389
5390   # See if GNU ld supports shared libraries.
5391   case $host_os in
5392   aix3* | aix4* | aix5*)
5393     # On AIX, the GNU linker is very broken
5394     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5395     ld_shlibs=no
5396     cat <<EOF 1>&2
5397
5398 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5399 *** to be unable to reliably create shared libraries on AIX.
5400 *** Therefore, libtool is disabling shared libraries support.  If you
5401 *** really care for shared libraries, you may want to modify your PATH
5402 *** so that a non-GNU linker is found, and then restart.
5403
5404 EOF
5405     ;;
5406
5407   amigaos*)
5408     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5409     hardcode_libdir_flag_spec='-L$libdir'
5410     hardcode_minus_L=yes
5411
5412     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5413     # that the semantics of dynamic libraries on AmigaOS, at least up
5414     # to version 4, is to share data among multiple programs linked
5415     # with the same dynamic library.  Since this doesn't match the
5416     # behavior of shared libraries on other platforms, we can use
5417     # them.
5418     ld_shlibs=no
5419     ;;
5420
5421   beos*)
5422     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5423       allow_undefined_flag=unsupported
5424       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5425       # support --undefined.  This deserves some investigation.  FIXME
5426       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5427     else
5428       ld_shlibs=no
5429     fi
5430     ;;
5431
5432   cygwin* | mingw* | pw32*)
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     allow_undefined_flag=unsupported
5437     always_export_symbols=yes
5438
5439     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5440       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5441       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5442       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5443       else $CC -o impgen impgen.c ; fi)~
5444       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5445
5446     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5447
5448     # cygwin and mingw dlls have different entry points and sets of symbols
5449     # to exclude.
5450     # FIXME: what about values for MSVC?
5451     dll_entry=__cygwin_dll_entry@12
5452     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5453     case $host_os in
5454     mingw*)
5455       # mingw values
5456       dll_entry=_DllMainCRTStartup@12
5457       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5458       ;;
5459     esac
5460
5461     # mingw and cygwin differ, and it's simplest to just exclude the union
5462     # of the two symbol sets.
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5464
5465     # recent cygwin and mingw systems supply a stub DllMain which the user
5466     # can override, but on older systems we have to supply one (in ltdll.c)
5467     if test "x$lt_cv_need_dllmain" = "xyes"; then
5468       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5469       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
5470         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5471     else
5472       ltdll_obj=
5473       ltdll_cmds=
5474     fi
5475
5476     # Extract the symbol export list from an `--export-all' def file,
5477     # then regenerate the def file from the symbol export list, so that
5478     # the compiled dll only exports the symbol export list.
5479     # Be careful not to strip the DATA tag left be newer dlltools.
5480     export_symbols_cmds="$ltdll_cmds"'
5481       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5482       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5483
5484     # If the export-symbols file already is a .def file (1st line
5485     # is EXPORTS), use it as is.
5486     # If DATA tags from a recent dlltool are present, honour them!
5487     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5488         cp $export_symbols $output_objdir/$soname-def;
5489       else
5490         echo EXPORTS > $output_objdir/$soname-def;
5491         _lt_hint=1;
5492         cat $export_symbols | while read symbol; do
5493          set dummy \$symbol;
5494          case \$# in
5495            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5496            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5497            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5498          esac;
5499          _lt_hint=`expr 1 + \$_lt_hint`;
5500         done;
5501       fi~
5502       '"$ltdll_cmds"'
5503       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5504       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5505       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
5506       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
5507       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5508     ;;
5509
5510   netbsd*)
5511     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5512       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5513       wlarc=
5514     else
5515       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5516       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5517     fi
5518     ;;
5519
5520   solaris* | sysv5*)
5521     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5522       ld_shlibs=no
5523       cat <<EOF 1>&2
5524
5525 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5526 *** create shared libraries on Solaris systems.  Therefore, libtool
5527 *** is disabling shared libraries support.  We urge you to upgrade GNU
5528 *** binutils to release 2.9.1 or newer.  Another option is to modify
5529 *** your PATH or compiler configuration so that the native linker is
5530 *** used, and then restart.
5531
5532 EOF
5533     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5534       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5535       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5536     else
5537       ld_shlibs=no
5538     fi
5539     ;;
5540
5541   sunos4*)
5542     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5543     wlarc=
5544     hardcode_direct=yes
5545     hardcode_shlibpath_var=no
5546     ;;
5547
5548   *)
5549     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5550       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5551       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5552     else
5553       ld_shlibs=no
5554     fi
5555     ;;
5556   esac
5557
5558   if test "$ld_shlibs" = yes; then
5559     runpath_var=LD_RUN_PATH
5560     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5561     export_dynamic_flag_spec='${wl}--export-dynamic'
5562     case $host_os in
5563     cygwin* | mingw* | pw32*)
5564       # dlltool doesn't understand --whole-archive et. al.
5565       whole_archive_flag_spec=
5566       ;;
5567     *)
5568       # ancient GNU ld didn't support --whole-archive et. al.
5569       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5570         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5571       else
5572         whole_archive_flag_spec=
5573       fi
5574       ;;
5575     esac
5576   fi
5577 else
5578   # PORTME fill in a description of your system's linker (not GNU ld)
5579   case $host_os in
5580   aix3*)
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5584     # Note: this linker hardcodes the directories in LIBPATH if there
5585     # are no directories specified by -L.
5586     hardcode_minus_L=yes
5587     if test "$GCC" = yes && test -z "$link_static_flag"; then
5588       # Neither direct hardcoding nor static linking is supported with a
5589       # broken collect2.
5590       hardcode_direct=unsupported
5591     fi
5592     ;;
5593
5594   aix4* | aix5*)
5595     if test "$host_cpu" = ia64; then
5596       # On IA64, the linker does run time linking by default, so we don't
5597       # have to do anything special.
5598       aix_use_runtimelinking=no
5599       exp_sym_flag='-Bexport'
5600       no_entry_flag=""
5601     else
5602       aix_use_runtimelinking=no
5603
5604       # Test if we are trying to use run time linking or normal
5605       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5606       # need to do runtime linking.
5607       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5608         for ld_flag in $LDFLAGS; do
5609           case $ld_flag in
5610           *-brtl*)
5611             aix_use_runtimelinking=yes
5612             break
5613           ;;
5614           esac
5615         done
5616       esac
5617
5618       exp_sym_flag='-bexport'
5619       no_entry_flag='-bnoentry'
5620     fi
5621
5622     # When large executables or shared objects are built, AIX ld can
5623     # have problems creating the table of contents.  If linking a library
5624     # or program results in "error TOC overflow" add -mminimal-toc to
5625     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5626     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5627
5628     hardcode_direct=yes
5629     archive_cmds=''
5630     hardcode_libdir_separator=':'
5631     if test "$GCC" = yes; then
5632       case $host_os in aix4.[012]|aix4.[012].*)
5633         collect2name=`${CC} -print-prog-name=collect2`
5634         if test -f "$collect2name" && \
5635           strings "$collect2name" | grep resolve_lib_name >/dev/null
5636         then
5637           # We have reworked collect2
5638           hardcode_direct=yes
5639         else
5640           # We have old collect2
5641           hardcode_direct=unsupported
5642           # It fails to find uninstalled libraries when the uninstalled
5643           # path is not listed in the libpath.  Setting hardcode_minus_L
5644           # to unsupported forces relinking
5645           hardcode_minus_L=yes
5646           hardcode_libdir_flag_spec='-L$libdir'
5647           hardcode_libdir_separator=
5648         fi
5649       esac
5650
5651       shared_flag='-shared'
5652     else
5653       # not using gcc
5654       if test "$host_cpu" = ia64; then
5655         shared_flag='${wl}-G'
5656       else
5657         if test "$aix_use_runtimelinking" = yes; then
5658           shared_flag='${wl}-G'
5659         else
5660           shared_flag='${wl}-bM:SRE'
5661         fi
5662       fi
5663     fi
5664
5665     # It seems that -bexpall can do strange things, so it is better to
5666     # generate a list of symbols to export.
5667     always_export_symbols=yes
5668     if test "$aix_use_runtimelinking" = yes; then
5669       # Warning - without using the other runtime loading flags (-brtl),
5670       # -berok will link without error, but may produce a broken library.
5671       allow_undefined_flag='-berok'
5672       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5673       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5674     else
5675       if test "$host_cpu" = ia64; then
5676         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5677         allow_undefined_flag="-z nodefs"
5678         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5679       else
5680         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5681         # Warning - without using the other run time loading flags,
5682         # -berok will link without error, but may produce a broken library.
5683         allow_undefined_flag='${wl}-berok'
5684         # This is a bit strange, but is similar to how AIX traditionally builds
5685         # it's shared libraries.
5686         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
5687       fi
5688     fi
5689     ;;
5690
5691   amigaos*)
5692     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5693     hardcode_libdir_flag_spec='-L$libdir'
5694     hardcode_minus_L=yes
5695     # see comment about different semantics on the GNU ld section
5696     ld_shlibs=no
5697     ;;
5698
5699   cygwin* | mingw* | pw32*)
5700     # When not using gcc, we currently assume that we are using
5701     # Microsoft Visual C++.
5702     # hardcode_libdir_flag_spec is actually meaningless, as there is
5703     # no search path for DLLs.
5704     hardcode_libdir_flag_spec=' '
5705     allow_undefined_flag=unsupported
5706     # Tell ltmain to make .lib files, not .a files.
5707     libext=lib
5708     # FIXME: Setting linknames here is a bad hack.
5709     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5710     # The linker will automatically build a .lib file if we build a DLL.
5711     old_archive_from_new_cmds='true'
5712     # FIXME: Should let the user specify the lib program.
5713     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5714     fix_srcfile_path='`cygpath -w "$srcfile"`'
5715     ;;
5716
5717   darwin* | rhapsody*)
5718     case "$host_os" in
5719     rhapsody* | darwin1.[012])
5720       allow_undefined_flag='-undefined suppress'
5721       ;;
5722     *) # Darwin 1.3 on
5723       allow_undefined_flag='-flat_namespace -undefined suppress'
5724       ;;
5725     esac
5726     # FIXME: Relying on posixy $() will cause problems for
5727     #        cross-compilation, but unfortunately the echo tests do not
5728     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5729     #        `"' quotes if we put them in here... so don't!
5730     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
5731     # We need to add '_' to the symbols in $export_symbols first
5732     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5733     hardcode_direct=yes
5734     hardcode_shlibpath_var=no
5735     whole_archive_flag_spec='-all_load $convenience'
5736     ;;
5737
5738   freebsd1*)
5739     ld_shlibs=no
5740     ;;
5741
5742   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5743   # support.  Future versions do this automatically, but an explicit c++rt0.o
5744   # does not break anything, and helps significantly (at the cost of a little
5745   # extra space).
5746   freebsd2.2*)
5747     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5748     hardcode_libdir_flag_spec='-R$libdir'
5749     hardcode_direct=yes
5750     hardcode_shlibpath_var=no
5751     ;;
5752
5753   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5754   freebsd2*)
5755     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5756     hardcode_direct=yes
5757     hardcode_minus_L=yes
5758     hardcode_shlibpath_var=no
5759     ;;
5760
5761   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5762   freebsd*)
5763     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5764     hardcode_libdir_flag_spec='-R$libdir'
5765     hardcode_direct=yes
5766     hardcode_shlibpath_var=no
5767     ;;
5768
5769   hpux9* | hpux10* | hpux11*)
5770     case $host_os in
5771     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
5772     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5773     esac
5774     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5775     hardcode_libdir_separator=:
5776     hardcode_direct=yes
5777     hardcode_minus_L=yes # Not in the search PATH, but as the default
5778                          # location of the library.
5779     export_dynamic_flag_spec='${wl}-E'
5780     ;;
5781
5782   irix5* | irix6* | nonstopux*)
5783     if test "$GCC" = yes; then
5784       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5785       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5786     else
5787       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5788       hardcode_libdir_flag_spec='-rpath $libdir'
5789     fi
5790     hardcode_libdir_separator=:
5791     link_all_deplibs=yes
5792     ;;
5793
5794   netbsd*)
5795     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5796       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5797     else
5798       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5799     fi
5800     hardcode_libdir_flag_spec='-R$libdir'
5801     hardcode_direct=yes
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   newsos6)
5806     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5807     hardcode_direct=yes
5808     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5809     hardcode_libdir_separator=:
5810     hardcode_shlibpath_var=no
5811     ;;
5812
5813   openbsd*)
5814     hardcode_direct=yes
5815     hardcode_shlibpath_var=no
5816     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5817       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5818       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5819       export_dynamic_flag_spec='${wl}-E'
5820     else
5821       case "$host_os" in
5822       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5823         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5824         hardcode_libdir_flag_spec='-R$libdir'
5825         ;;
5826       *)
5827         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5828         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5829         ;;
5830       esac
5831     fi
5832     ;;
5833
5834   openedition*)
5835     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5836         cp \$linknames \$output_objdir && linknames=''"
5837     export_dynamic_flag_spec="-Wl,DLL"
5838     ;;
5839
5840   os2*)
5841     hardcode_libdir_flag_spec='-L$libdir'
5842     hardcode_minus_L=yes
5843     allow_undefined_flag=unsupported
5844     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5845     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5846     ;;
5847
5848   osf3*)
5849     if test "$GCC" = yes; then
5850       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5851       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5852     else
5853       allow_undefined_flag=' -expect_unresolved \*'
5854       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5855     fi
5856     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5857     hardcode_libdir_separator=:
5858     ;;
5859
5860   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5861     if test "$GCC" = yes; then
5862       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5863       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5864       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5865     else
5866       allow_undefined_flag=' -expect_unresolved \*'
5867       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5868       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5869       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5870
5871       #Both c and cxx compiler support -rpath directly
5872       hardcode_libdir_flag_spec='-rpath $libdir'
5873     fi
5874     hardcode_libdir_separator=:
5875     ;;
5876
5877   sco3.2v5*)
5878     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5879     hardcode_shlibpath_var=no
5880     runpath_var=LD_RUN_PATH
5881     hardcode_runpath_var=yes
5882     export_dynamic_flag_spec='${wl}-Bexport'
5883     ;;
5884
5885   solaris*)
5886     # gcc --version < 3.0 without binutils cannot create self contained
5887     # shared libraries reliably, requiring libgcc.a to resolve some of
5888     # the object symbols generated in some cases.  Libraries that use
5889     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5890     # a copy of libgcc.a into every shared library to guarantee resolving
5891     # such symbols causes other problems:  According to Tim Van Holder
5892     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5893     # (to the application) exception stack for one thing.
5894     no_undefined_flag=' -z defs'
5895     if test "$GCC" = yes; then
5896       case `$CC --version 2>/dev/null` in
5897       [12].*)
5898         cat <<EOF 1>&2
5899
5900 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5901 *** create self contained shared libraries on Solaris systems, without
5902 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5903 *** -no-undefined support, which will at least allow you to build shared
5904 *** libraries.  However, you may find that when you link such libraries
5905 *** into an application without using GCC, you have to manually add
5906 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5907 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5908 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5909
5910 EOF
5911         no_undefined_flag=
5912         ;;
5913       esac
5914     fi
5915     # $CC -shared without GNU ld will not create a library from C++
5916     # object files and a static libstdc++, better avoid it by now
5917     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5919                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5920     hardcode_libdir_flag_spec='-R$libdir'
5921     hardcode_shlibpath_var=no
5922     case $host_os in
5923     solaris2.[0-5] | solaris2.[0-5].*) ;;
5924     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5925       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5926     esac
5927     link_all_deplibs=yes
5928     ;;
5929
5930   sunos4*)
5931     if test "x$host_vendor" = xsequent; then
5932       # Use $CC to link under sequent, because it throws in some extra .o
5933       # files that make .init and .fini sections work.
5934       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5935     else
5936       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5937     fi
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_direct=yes
5940     hardcode_minus_L=yes
5941     hardcode_shlibpath_var=no
5942     ;;
5943
5944   sysv4)
5945     case $host_vendor in
5946       sni)
5947         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948         hardcode_direct=yes # is this really true???
5949         ;;
5950       siemens)
5951         ## LD is ld it makes a PLAMLIB
5952         ## CC just makes a GrossModule.
5953         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5954         reload_cmds='$CC -r -o $output$reload_objs'
5955         hardcode_direct=no
5956         ;;
5957       motorola)
5958         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5960         ;;
5961     esac
5962     runpath_var='LD_RUN_PATH'
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   sysv4.3*)
5967     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     hardcode_shlibpath_var=no
5969     export_dynamic_flag_spec='-Bexport'
5970     ;;
5971
5972   sysv5*)
5973     no_undefined_flag=' -z text'
5974     # $CC -shared without GNU ld will not create a library from C++
5975     # object files and a static libstdc++, better avoid it by now
5976     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5978                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5979     hardcode_libdir_flag_spec=
5980     hardcode_shlibpath_var=no
5981     runpath_var='LD_RUN_PATH'
5982     ;;
5983
5984   uts4*)
5985     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986     hardcode_libdir_flag_spec='-L$libdir'
5987     hardcode_shlibpath_var=no
5988     ;;
5989
5990   dgux*)
5991     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992     hardcode_libdir_flag_spec='-L$libdir'
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4*MP*)
5997     if test -d /usr/nec; then
5998       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999       hardcode_shlibpath_var=no
6000       runpath_var=LD_RUN_PATH
6001       hardcode_runpath_var=yes
6002       ld_shlibs=yes
6003     fi
6004     ;;
6005
6006   sysv4.2uw2*)
6007     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6008     hardcode_direct=yes
6009     hardcode_minus_L=no
6010     hardcode_shlibpath_var=no
6011     hardcode_runpath_var=yes
6012     runpath_var=LD_RUN_PATH
6013     ;;
6014
6015   sysv5uw7* | unixware7*)
6016     no_undefined_flag='${wl}-z ${wl}text'
6017     if test "$GCC" = yes; then
6018       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6019     else
6020       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6021     fi
6022     runpath_var='LD_RUN_PATH'
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   *)
6027     ld_shlibs=no
6028     ;;
6029   esac
6030 fi
6031 echo "$ac_t""$ld_shlibs" 1>&6
6032 test "$ld_shlibs" = no && can_build_shared=no
6033
6034 # Check hardcoding attributes.
6035 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6036 echo "configure:6037: checking how to hardcode library paths into programs" >&5
6037 hardcode_action=
6038 if test -n "$hardcode_libdir_flag_spec" || \
6039    test -n "$runpath_var"; then
6040
6041   # We can hardcode non-existant directories.
6042   if test "$hardcode_direct" != no &&
6043      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6044      # have to relink, otherwise we might link with an installed library
6045      # when we should be linking with a yet-to-be-installed one
6046      ## test "$hardcode_shlibpath_var" != no &&
6047      test "$hardcode_minus_L" != no; then
6048     # Linking always hardcodes the temporary library directory.
6049     hardcode_action=relink
6050   else
6051     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6052     hardcode_action=immediate
6053   fi
6054 else
6055   # We cannot hardcode anything, or else we can only hardcode existing
6056   # directories.
6057   hardcode_action=unsupported
6058 fi
6059 echo "$ac_t""$hardcode_action" 1>&6
6060
6061 striplib=
6062 old_striplib=
6063 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6064 echo "configure:6065: checking whether stripping libraries is possible" >&5
6065 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6066   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6067   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6068   echo "$ac_t""yes" 1>&6
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072
6073 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6074 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6075
6076 # PORTME Fill in your ld.so characteristics
6077 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6078 echo "configure:6079: checking dynamic linker characteristics" >&5
6079 library_names_spec=
6080 libname_spec='lib$name'
6081 soname_spec=
6082 postinstall_cmds=
6083 postuninstall_cmds=
6084 finish_cmds=
6085 finish_eval=
6086 shlibpath_var=
6087 shlibpath_overrides_runpath=unknown
6088 version_type=none
6089 dynamic_linker="$host_os ld.so"
6090 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6091 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6092
6093 case $host_os in
6094 aix3*)
6095   version_type=linux
6096   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6097   shlibpath_var=LIBPATH
6098
6099   # AIX has no versioning support, so we append a major version to the name.
6100   soname_spec='${libname}${release}.so$major'
6101   ;;
6102
6103 aix4* | aix5*)
6104   version_type=linux
6105   need_lib_prefix=no
6106   need_version=no
6107   hardcode_into_libs=yes
6108   if test "$host_cpu" = ia64; then
6109     # AIX 5 supports IA64
6110     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6111     shlibpath_var=LD_LIBRARY_PATH
6112   else
6113     # With GCC up to 2.95.x, collect2 would create an import file
6114     # for dependence libraries.  The import file would start with
6115     # the line `#! .'.  This would cause the generated library to
6116     # depend on `.', always an invalid library.  This was fixed in
6117     # development snapshots of GCC prior to 3.0.
6118     case $host_os in
6119       aix4 | aix4.[01] | aix4.[01].*)
6120         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6121              echo ' yes '
6122              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6123           :
6124         else
6125           can_build_shared=no
6126         fi
6127         ;;
6128     esac
6129     # AIX (on Power*) has no versioning support, so currently we can
6130     # not hardcode correct soname into executable. Probably we can
6131     # add versioning support to collect2, so additional links can
6132     # be useful in future.
6133     if test "$aix_use_runtimelinking" = yes; then
6134       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6135       # instead of lib<name>.a to let people know that these are not
6136       # typical AIX shared libraries.
6137       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6138     else
6139       # We preserve .a as extension for shared libraries through AIX4.2
6140       # and later when we are not doing run time linking.
6141       library_names_spec='${libname}${release}.a $libname.a'
6142       soname_spec='${libname}${release}.so$major'
6143     fi
6144     shlibpath_var=LIBPATH
6145   fi
6146   hardcode_into_libs=yes
6147   ;;
6148
6149 amigaos*)
6150   library_names_spec='$libname.ixlibrary $libname.a'
6151   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6152   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6153   ;;
6154
6155 beos*)
6156   library_names_spec='${libname}.so'
6157   dynamic_linker="$host_os ld.so"
6158   shlibpath_var=LIBRARY_PATH
6159   ;;
6160
6161 bsdi4*)
6162   version_type=linux
6163   need_version=no
6164   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6165   soname_spec='${libname}${release}.so$major'
6166   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6167   shlibpath_var=LD_LIBRARY_PATH
6168   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6169   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6170   export_dynamic_flag_spec=-rdynamic
6171   # the default ld.so.conf also contains /usr/contrib/lib and
6172   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6173   # libtool to hard-code these into programs
6174   ;;
6175
6176 cygwin* | mingw* | pw32*)
6177   version_type=windows
6178   need_version=no
6179   need_lib_prefix=no
6180   case $GCC,$host_os in
6181   yes,cygwin*)
6182     library_names_spec='$libname.dll.a'
6183     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6184     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6185       dldir=$destdir/`dirname \$dlpath`~
6186       test -d \$dldir || mkdir -p \$dldir~
6187       $install_prog .libs/$dlname \$dldir/$dlname'
6188     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6189       dlpath=$dir/\$dldll~
6190        $rm \$dlpath'
6191     ;;
6192   yes,mingw*)
6193     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6194     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6195     ;;
6196   yes,pw32*)
6197     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6198     ;;
6199   *)
6200     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6201     ;;
6202   esac
6203   dynamic_linker='Win32 ld.exe'
6204   # FIXME: first we should search . and the directory the executable is in
6205   shlibpath_var=PATH
6206   ;;
6207
6208 darwin* | rhapsody*)
6209   dynamic_linker="$host_os dyld"
6210   version_type=darwin
6211   need_lib_prefix=no
6212   need_version=no
6213   # FIXME: Relying on posixy $() will cause problems for
6214   #        cross-compilation, but unfortunately the echo tests do not
6215   #        yet detect zsh echo's removal of \ escapes.
6216   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6217   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6218   shlibpath_overrides_runpath=yes
6219   shlibpath_var=DYLD_LIBRARY_PATH
6220   ;;
6221
6222 freebsd1*)
6223   dynamic_linker=no
6224   ;;
6225
6226 freebsd*)
6227   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6228   version_type=freebsd-$objformat
6229   case $version_type in
6230     freebsd-elf*)
6231       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6232       need_version=no
6233       need_lib_prefix=no
6234       ;;
6235     freebsd-*)
6236       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6237       need_version=yes
6238       ;;
6239   esac
6240   shlibpath_var=LD_LIBRARY_PATH
6241   case $host_os in
6242   freebsd2*)
6243     shlibpath_overrides_runpath=yes
6244     ;;
6245   *)
6246     shlibpath_overrides_runpath=no
6247     hardcode_into_libs=yes
6248     ;;
6249   esac
6250   ;;
6251
6252 gnu*)
6253   version_type=linux
6254   need_lib_prefix=no
6255   need_version=no
6256   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6257   soname_spec='${libname}${release}.so$major'
6258   shlibpath_var=LD_LIBRARY_PATH
6259   hardcode_into_libs=yes
6260   ;;
6261
6262 hpux9* | hpux10* | hpux11*)
6263   # Give a soname corresponding to the major version so that dld.sl refuses to
6264   # link against other versions.
6265   dynamic_linker="$host_os dld.sl"
6266   version_type=sunos
6267   need_lib_prefix=no
6268   need_version=no
6269   shlibpath_var=SHLIB_PATH
6270   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6271   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6272   soname_spec='${libname}${release}.sl$major'
6273   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6274   postinstall_cmds='chmod 555 $lib'
6275   ;;
6276
6277 irix5* | irix6* | nonstopux*)
6278   case $host_os in
6279     nonstopux*) version_type=nonstopux ;;
6280     *)          version_type=irix ;;
6281   esac
6282   need_lib_prefix=no
6283   need_version=no
6284   soname_spec='${libname}${release}.so$major'
6285   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6286   case $host_os in
6287   irix5* | nonstopux*)
6288     libsuff= shlibsuff=
6289     ;;
6290   *)
6291     case $LD in # libtool.m4 will add one of these switches to LD
6292     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6293     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6294     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6295     *) libsuff= shlibsuff= libmagic=never-match;;
6296     esac
6297     ;;
6298   esac
6299   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6300   shlibpath_overrides_runpath=no
6301   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6302   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6303   ;;
6304
6305 # No shared lib support for Linux oldld, aout, or coff.
6306 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6307   dynamic_linker=no
6308   ;;
6309
6310 # This must be Linux ELF.
6311 linux-gnu*)
6312   version_type=linux
6313   need_lib_prefix=no
6314   need_version=no
6315   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6316   soname_spec='${libname}${release}.so$major'
6317   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6318   shlibpath_var=LD_LIBRARY_PATH
6319   shlibpath_overrides_runpath=no
6320   # This implies no fast_install, which is unacceptable.
6321   # Some rework will be needed to allow for fast_install
6322   # before this can be enabled.
6323   hardcode_into_libs=yes
6324
6325   # We used to test for /lib/ld.so.1 and disable shared libraries on
6326   # powerpc, because MkLinux only supported shared libraries with the
6327   # GNU dynamic linker.  Since this was broken with cross compilers,
6328   # most powerpc-linux boxes support dynamic linking these days and
6329   # people can always --disable-shared, the test was removed, and we
6330   # assume the GNU/Linux dynamic linker is in use.
6331   dynamic_linker='GNU/Linux ld.so'
6332   ;;
6333
6334 netbsd*)
6335   version_type=sunos
6336   need_lib_prefix=no
6337   need_version=no
6338   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6339     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6340     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6341     dynamic_linker='NetBSD (a.out) ld.so'
6342   else
6343     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6344     soname_spec='${libname}${release}.so$major'
6345     dynamic_linker='NetBSD ld.elf_so'
6346   fi
6347   shlibpath_var=LD_LIBRARY_PATH
6348   shlibpath_overrides_runpath=yes
6349   hardcode_into_libs=yes
6350   ;;
6351
6352 newsos6)
6353   version_type=linux
6354   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   shlibpath_overrides_runpath=yes
6357   ;;
6358
6359 openbsd*)
6360   version_type=sunos
6361   need_lib_prefix=no
6362   need_version=no
6363   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6364     case "$host_os" in
6365     openbsd2.[89] | openbsd2.[89].*)
6366       shlibpath_overrides_runpath=no
6367       ;;
6368     *)
6369       shlibpath_overrides_runpath=yes
6370       ;;
6371     esac
6372   else
6373     shlibpath_overrides_runpath=yes
6374   fi
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6376   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6377   shlibpath_var=LD_LIBRARY_PATH
6378   ;;
6379
6380 openedition*)
6381   need_lib_prefix=no
6382   need_version=no
6383   shlibpath_overrides_runpath=yes
6384   shlibpath_var=LIBPATH
6385   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6386   # the library's exports are in libname.x; this is the file that must
6387   # actually be linked with to use a DLL.
6388   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6389   ;;
6390
6391 os2*)
6392   libname_spec='$name'
6393   need_lib_prefix=no
6394   library_names_spec='$libname.dll $libname.a'
6395   dynamic_linker='OS/2 ld.exe'
6396   shlibpath_var=LIBPATH
6397   ;;
6398
6399 osf3* | osf4* | osf5*)
6400   version_type=osf
6401   need_version=no
6402   soname_spec='${libname}${release}.so$major'
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6404   shlibpath_var=LD_LIBRARY_PATH
6405   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6406   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6407   hardcode_into_libs=yes
6408   ;;
6409
6410 sco3.2v5*)
6411   version_type=osf
6412   soname_spec='${libname}${release}.so$major'
6413   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6414   shlibpath_var=LD_LIBRARY_PATH
6415   ;;
6416
6417 solaris*)
6418   version_type=linux
6419   need_lib_prefix=no
6420   need_version=no
6421   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6422   soname_spec='${libname}${release}.so$major'
6423   shlibpath_var=LD_LIBRARY_PATH
6424   shlibpath_overrides_runpath=yes
6425   hardcode_into_libs=yes
6426   # ldd complains unless libraries are executable
6427   postinstall_cmds='chmod +x $lib'
6428   ;;
6429
6430 sunos4*)
6431   version_type=sunos
6432   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6433   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6434   shlibpath_var=LD_LIBRARY_PATH
6435   shlibpath_overrides_runpath=yes
6436   if test "$with_gnu_ld" = yes; then
6437     need_lib_prefix=no
6438   fi
6439   need_version=yes
6440   ;;
6441
6442 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6443   version_type=linux
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   shlibpath_var=LD_LIBRARY_PATH
6447   case $host_vendor in
6448     sni)
6449       shlibpath_overrides_runpath=no
6450       need_lib_prefix=no
6451       export_dynamic_flag_spec='${wl}-Blargedynsym'
6452       runpath_var=LD_RUN_PATH
6453       ;;
6454     siemens)
6455       need_lib_prefix=no
6456       ;;
6457     motorola)
6458       need_lib_prefix=no
6459       need_version=no
6460       shlibpath_overrides_runpath=no
6461       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6462       ;;
6463   esac
6464   ;;
6465
6466 uts4*)
6467   version_type=linux
6468   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6469   soname_spec='${libname}${release}.so$major'
6470   shlibpath_var=LD_LIBRARY_PATH
6471   ;;
6472
6473 dgux*)
6474   version_type=linux
6475   need_lib_prefix=no
6476   need_version=no
6477   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6478   soname_spec='${libname}${release}.so$major'
6479   shlibpath_var=LD_LIBRARY_PATH
6480   ;;
6481
6482 sysv4*MP*)
6483   if test -d /usr/nec ;then
6484     version_type=linux
6485     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6486     soname_spec='$libname.so.$major'
6487     shlibpath_var=LD_LIBRARY_PATH
6488   fi
6489   ;;
6490
6491 *)
6492   dynamic_linker=no
6493   ;;
6494 esac
6495 echo "$ac_t""$dynamic_linker" 1>&6
6496 test "$dynamic_linker" = no && can_build_shared=no
6497
6498 # Report the final consequences.
6499 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6500 echo "configure:6501: checking if libtool supports shared libraries" >&5
6501 echo "$ac_t""$can_build_shared" 1>&6
6502
6503 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6504 echo "configure:6505: checking whether to build shared libraries" >&5
6505 test "$can_build_shared" = "no" && enable_shared=no
6506
6507 # On AIX, shared libraries and static libraries use the same namespace, and
6508 # are all built from PIC.
6509 case "$host_os" in
6510 aix3*)
6511   test "$enable_shared" = yes && enable_static=no
6512   if test -n "$RANLIB"; then
6513     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6514     postinstall_cmds='$RANLIB $lib'
6515   fi
6516   ;;
6517
6518 aix4*)
6519   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6520     test "$enable_shared" = yes && enable_static=no
6521   fi
6522   ;;
6523 esac
6524 echo "$ac_t""$enable_shared" 1>&6
6525
6526 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking whether to build static libraries" >&5
6528 # Make sure either enable_shared or enable_static is yes.
6529 test "$enable_shared" = yes || enable_static=yes
6530 echo "$ac_t""$enable_static" 1>&6
6531
6532 if test "$hardcode_action" = relink; then
6533   # Fast installation is not supported
6534   enable_fast_install=no
6535 elif test "$shlibpath_overrides_runpath" = yes ||
6536      test "$enable_shared" = no; then
6537   # Fast installation is not necessary
6538   enable_fast_install=needless
6539 fi
6540
6541 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6542 if test "$GCC" = yes; then
6543   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6544 fi
6545
6546 if test "x$enable_dlopen" != xyes; then
6547   enable_dlopen=unknown
6548   enable_dlopen_self=unknown
6549   enable_dlopen_self_static=unknown
6550 else
6551   lt_cv_dlopen=no
6552   lt_cv_dlopen_libs=
6553
6554   case $host_os in
6555   beos*)
6556     lt_cv_dlopen="load_add_on"
6557     lt_cv_dlopen_libs=
6558     lt_cv_dlopen_self=yes
6559     ;;
6560
6561   cygwin* | mingw* | pw32*)
6562     lt_cv_dlopen="LoadLibrary"
6563     lt_cv_dlopen_libs=
6564    ;;
6565
6566   *)
6567     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6568 echo "configure:6569: checking for dllload" >&5
6569 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572   cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 /* System header to define __stub macros and hopefully few prototypes,
6576     which can conflict with char dllload(); below.  */
6577 #include <assert.h>
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char dllload();
6582 char (*f)();
6583
6584 int main() {
6585
6586 /* The GNU C library defines this for functions which it implements
6587     to always fail with ENOSYS.  Some functions are actually named
6588     something starting with __ and the normal name is an alias.  */
6589 #if defined (__stub_dllload) || defined (__stub___dllload)
6590 choke me
6591 #else
6592 f = dllload;
6593 #endif
6594
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   eval "ac_cv_func_dllload=yes"
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_func_dllload=no"
6605 fi
6606 rm -f conftest*
6607 fi
6608
6609 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   lt_cv_dlopen="dllload"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6615 echo "configure:6616: checking for shl_load" >&5
6616 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char shl_load(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char shl_load();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6637 choke me
6638 #else
6639 f = shl_load;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_shl_load=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_shl_load=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658   lt_cv_dlopen="shl_load"
6659 else
6660   echo "$ac_t""no" 1>&6
6661 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6662 echo "configure:6663: checking for shl_load in -ldld" >&5
6663 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-ldld  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char shl_load();
6676
6677 int main() {
6678 shl_load()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6697 else
6698   echo "$ac_t""no" 1>&6
6699 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6700 echo "configure:6701: checking for dlopen" >&5
6701 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char dlopen(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char dlopen();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6722 choke me
6723 #else
6724 f = dlopen;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_dlopen=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_dlopen=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   lt_cv_dlopen="dlopen"
6744 else
6745   echo "$ac_t""no" 1>&6
6746 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6747 echo "configure:6748: checking for dlopen in -ldl" >&5
6748 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6750   echo $ac_n "(cached) $ac_c" 1>&6
6751 else
6752   ac_save_LIBS="$LIBS"
6753 LIBS="-ldl  $LIBS"
6754 cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 /* Override any gcc2 internal prototype to avoid an error.  */
6758 /* We use char because int might match the return type of a gcc2
6759     builtin and then its argument prototype would still apply.  */
6760 char dlopen();
6761
6762 int main() {
6763 dlopen()
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=no"
6774 fi
6775 rm -f conftest*
6776 LIBS="$ac_save_LIBS"
6777
6778 fi
6779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6780   echo "$ac_t""yes" 1>&6
6781   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6782 else
6783   echo "$ac_t""no" 1>&6
6784 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6785 echo "configure:6786: checking for dlopen in -lsvld" >&5
6786 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   ac_save_LIBS="$LIBS"
6791 LIBS="-lsvld  $LIBS"
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 /* Override any gcc2 internal prototype to avoid an error.  */
6796 /* We use char because int might match the return type of a gcc2
6797     builtin and then its argument prototype would still apply.  */
6798 char dlopen();
6799
6800 int main() {
6801 dlopen()
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=no"
6812 fi
6813 rm -f conftest*
6814 LIBS="$ac_save_LIBS"
6815
6816 fi
6817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6818   echo "$ac_t""yes" 1>&6
6819   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6820 else
6821   echo "$ac_t""no" 1>&6
6822 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6823 echo "configure:6824: checking for dld_link in -ldld" >&5
6824 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   ac_save_LIBS="$LIBS"
6829 LIBS="-ldld  $LIBS"
6830 cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* Override any gcc2 internal prototype to avoid an error.  */
6834 /* We use char because int might match the return type of a gcc2
6835     builtin and then its argument prototype would still apply.  */
6836 char dld_link();
6837
6838 int main() {
6839 dld_link()
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_lib_$ac_lib_var=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=no"
6850 fi
6851 rm -f conftest*
6852 LIBS="$ac_save_LIBS"
6853
6854 fi
6855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6856   echo "$ac_t""yes" 1>&6
6857   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862               
6863 fi
6864
6865             
6866 fi
6867
6868           
6869 fi
6870
6871         
6872 fi
6873
6874       
6875 fi
6876
6877     
6878 fi
6879
6880     ;;
6881   esac
6882
6883   if test "x$lt_cv_dlopen" != xno; then
6884     enable_dlopen=yes
6885   else
6886     enable_dlopen=no
6887   fi
6888
6889   case $lt_cv_dlopen in
6890   dlopen)
6891     save_CPPFLAGS="$CPPFLAGS"
6892         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6893
6894     save_LDFLAGS="$LDFLAGS"
6895     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6896
6897     save_LIBS="$LIBS"
6898     LIBS="$lt_cv_dlopen_libs $LIBS"
6899
6900     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6901 echo "configure:6902: checking whether a program can dlopen itself" >&5
6902 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905           if test "$cross_compiling" = yes; then :
6906   lt_cv_dlopen_self=cross
6907 else
6908     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6909   lt_status=$lt_dlunknown
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913
6914 #if HAVE_DLFCN_H
6915 #include <dlfcn.h>
6916 #endif
6917
6918 #include <stdio.h>
6919
6920 #ifdef RTLD_GLOBAL
6921 #  define LT_DLGLOBAL           RTLD_GLOBAL
6922 #else
6923 #  ifdef DL_GLOBAL
6924 #    define LT_DLGLOBAL         DL_GLOBAL
6925 #  else
6926 #    define LT_DLGLOBAL         0
6927 #  endif
6928 #endif
6929
6930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6931    find out it does not work in some platform. */
6932 #ifndef LT_DLLAZY_OR_NOW
6933 #  ifdef RTLD_LAZY
6934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6935 #  else
6936 #    ifdef DL_LAZY
6937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6938 #    else
6939 #      ifdef RTLD_NOW
6940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6941 #      else
6942 #        ifdef DL_NOW
6943 #          define LT_DLLAZY_OR_NOW      DL_NOW
6944 #        else
6945 #          define LT_DLLAZY_OR_NOW      0
6946 #        endif
6947 #      endif
6948 #    endif
6949 #  endif
6950 #endif
6951
6952 #ifdef __cplusplus
6953 extern "C" void exit (int);
6954 #endif
6955
6956 void fnord() { int i=42;}
6957 int main ()
6958 {
6959   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6960   int status = $lt_dlunknown;
6961
6962   if (self)
6963     {
6964       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6965       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6966       /* dlclose (self); */
6967     }
6968
6969     exit (status);
6970 }
6971 EOF
6972   if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6973     (./conftest; exit; ) 2>/dev/null
6974     lt_status=$?
6975     case x$lt_status in
6976       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6977       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6978       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6979     esac
6980   else :
6981     # compilation failed
6982     lt_cv_dlopen_self=no
6983   fi
6984 fi
6985 rm -fr conftest*
6986
6987     
6988 fi
6989
6990 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6991
6992     if test "x$lt_cv_dlopen_self" = xyes; then
6993       LDFLAGS="$LDFLAGS $link_static_flag"
6994       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6995 echo "configure:6996: checking whether a statically linked program can dlopen itself" >&5
6996 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999           if test "$cross_compiling" = yes; then :
7000   lt_cv_dlopen_self_static=cross
7001 else
7002     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7003   lt_status=$lt_dlunknown
7004   cat > conftest.$ac_ext <<EOF
7005 #line 7006 "configure"
7006 #include "confdefs.h"
7007
7008 #if HAVE_DLFCN_H
7009 #include <dlfcn.h>
7010 #endif
7011
7012 #include <stdio.h>
7013
7014 #ifdef RTLD_GLOBAL
7015 #  define LT_DLGLOBAL           RTLD_GLOBAL
7016 #else
7017 #  ifdef DL_GLOBAL
7018 #    define LT_DLGLOBAL         DL_GLOBAL
7019 #  else
7020 #    define LT_DLGLOBAL         0
7021 #  endif
7022 #endif
7023
7024 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7025    find out it does not work in some platform. */
7026 #ifndef LT_DLLAZY_OR_NOW
7027 #  ifdef RTLD_LAZY
7028 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7029 #  else
7030 #    ifdef DL_LAZY
7031 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7032 #    else
7033 #      ifdef RTLD_NOW
7034 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7035 #      else
7036 #        ifdef DL_NOW
7037 #          define LT_DLLAZY_OR_NOW      DL_NOW
7038 #        else
7039 #          define LT_DLLAZY_OR_NOW      0
7040 #        endif
7041 #      endif
7042 #    endif
7043 #  endif
7044 #endif
7045
7046 #ifdef __cplusplus
7047 extern "C" void exit (int);
7048 #endif
7049
7050 void fnord() { int i=42;}
7051 int main ()
7052 {
7053   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7054   int status = $lt_dlunknown;
7055
7056   if (self)
7057     {
7058       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7059       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7060       /* dlclose (self); */
7061     }
7062
7063     exit (status);
7064 }
7065 EOF
7066   if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7067     (./conftest; exit; ) 2>/dev/null
7068     lt_status=$?
7069     case x$lt_status in
7070       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7071       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7072       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7073     esac
7074   else :
7075     # compilation failed
7076     lt_cv_dlopen_self_static=no
7077   fi
7078 fi
7079 rm -fr conftest*
7080
7081       
7082 fi
7083
7084 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7085     fi
7086
7087     CPPFLAGS="$save_CPPFLAGS"
7088     LDFLAGS="$save_LDFLAGS"
7089     LIBS="$save_LIBS"
7090     ;;
7091   esac
7092
7093   case $lt_cv_dlopen_self in
7094   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7095   *) enable_dlopen_self=unknown ;;
7096   esac
7097
7098   case $lt_cv_dlopen_self_static in
7099   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7100   *) enable_dlopen_self_static=unknown ;;
7101   esac
7102 fi
7103
7104
7105 if test "$enable_shared" = yes && test "$GCC" = yes; then
7106   case $archive_cmds in
7107   *'~'*)
7108     # FIXME: we may have to deal with multi-command sequences.
7109     ;;
7110   '$CC '*)
7111     # Test whether the compiler implicitly links with -lc since on some
7112     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7113     # to ld, don't add -lc before -lgcc.
7114     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7115 echo "configure:7116: checking whether -lc should be explicitly linked in" >&5
7116     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   $rm conftest*
7120     echo 'static int dummy;' > conftest.$ac_ext
7121
7122     if { (eval echo configure:7123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7123       soname=conftest
7124       lib=conftest
7125       libobjs=conftest.$ac_objext
7126       deplibs=
7127       wl=$lt_cv_prog_cc_wl
7128       compiler_flags=-v
7129       linker_flags=-v
7130       verstring=
7131       output_objdir=.
7132       libname=conftest
7133       save_allow_undefined_flag=$allow_undefined_flag
7134       allow_undefined_flag=
7135       if { (eval echo configure:7136: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
7136       then
7137         lt_cv_archive_cmds_need_lc=no
7138       else
7139         lt_cv_archive_cmds_need_lc=yes
7140       fi
7141       allow_undefined_flag=$save_allow_undefined_flag
7142     else
7143       cat conftest.err 1>&5
7144     fi
7145 fi
7146
7147     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7148     ;;
7149   esac
7150 fi
7151 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7152
7153 # The second clause should only fire when bootstrapping the
7154 # libtool distribution, otherwise you forgot to ship ltmain.sh
7155 # with your package, and you will get complaints that there are
7156 # no rules to generate ltmain.sh.
7157 if test -f "$ltmain"; then
7158   :
7159 else
7160   # If there is no Makefile yet, we rely on a make rule to execute
7161   # `config.status --recheck' to rerun these tests and create the
7162   # libtool script then.
7163   test -f Makefile && make "$ltmain"
7164 fi
7165
7166 if test -f "$ltmain"; then
7167   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7168   $rm -f "${ofile}T"
7169
7170   echo creating $ofile
7171
7172   # Now quote all the things that may contain metacharacters while being
7173   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7174   # variables and quote the copies for generation of the libtool script.
7175   for var in echo old_CC old_CFLAGS SED \
7176     AR AR_FLAGS CC LD LN_S NM SHELL \
7177     reload_flag reload_cmds wl \
7178     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7179     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7180     library_names_spec soname_spec \
7181     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7182     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7183     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7184     old_striplib striplib file_magic_cmd export_symbols_cmds \
7185     deplibs_check_method allow_undefined_flag no_undefined_flag \
7186     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7187     global_symbol_to_c_name_address \
7188     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7189     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7190     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7191
7192     case $var in
7193     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7194     old_postinstall_cmds | old_postuninstall_cmds | \
7195     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7196     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7197     postinstall_cmds | postuninstall_cmds | \
7198     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7199       # Double-quote double-evaled strings.
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7201       ;;
7202     *)
7203       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7204       ;;
7205     esac
7206   done
7207
7208   cat <<__EOF__ > "${ofile}T"
7209 #! $SHELL
7210
7211 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7212 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7213 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7214 #
7215 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7216 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7217 #
7218 # This program is free software; you can redistribute it and/or modify
7219 # it under the terms of the GNU General Public License as published by
7220 # the Free Software Foundation; either version 2 of the License, or
7221 # (at your option) any later version.
7222 #
7223 # This program is distributed in the hope that it will be useful, but
7224 # WITHOUT ANY WARRANTY; without even the implied warranty of
7225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7226 # General Public License for more details.
7227 #
7228 # You should have received a copy of the GNU General Public License
7229 # along with this program; if not, write to the Free Software
7230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7231 #
7232 # As a special exception to the GNU General Public License, if you
7233 # distribute this file as part of a program that contains a
7234 # configuration script generated by Autoconf, you may include it under
7235 # the same distribution terms that you use for the rest of that program.
7236
7237 # A sed that does not truncate output.
7238 SED=$lt_SED
7239
7240 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7241 Xsed="${SED} -e s/^X//"
7242
7243 # The HP-UX ksh and POSIX shell print the target directory to stdout
7244 # if CDPATH is set.
7245 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7246
7247 # ### BEGIN LIBTOOL CONFIG
7248
7249 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7250
7251 # Shell to use when invoking shell scripts.
7252 SHELL=$lt_SHELL
7253
7254 # Whether or not to build shared libraries.
7255 build_libtool_libs=$enable_shared
7256
7257 # Whether or not to build static libraries.
7258 build_old_libs=$enable_static
7259
7260 # Whether or not to add -lc for building shared libraries.
7261 build_libtool_need_lc=$need_lc
7262
7263 # Whether or not to optimize for fast installation.
7264 fast_install=$enable_fast_install
7265
7266 # The host system.
7267 host_alias=$host_alias
7268 host=$host
7269
7270 # An echo program that does not interpret backslashes.
7271 echo=$lt_echo
7272
7273 # The archiver.
7274 AR=$lt_AR
7275 AR_FLAGS=$lt_AR_FLAGS
7276
7277 # The default C compiler.
7278 CC=$lt_CC
7279
7280 # Is the compiler the GNU C compiler?
7281 with_gcc=$GCC
7282
7283 # The linker used to build libraries.
7284 LD=$lt_LD
7285
7286 # Whether we need hard or soft links.
7287 LN_S=$lt_LN_S
7288
7289 # A BSD-compatible nm program.
7290 NM=$lt_NM
7291
7292 # A symbol stripping program
7293 STRIP=$STRIP
7294
7295 # Used to examine libraries when file_magic_cmd begins "file"
7296 MAGIC_CMD=$MAGIC_CMD
7297
7298 # Used on cygwin: DLL creation program.
7299 DLLTOOL="$DLLTOOL"
7300
7301 # Used on cygwin: object dumper.
7302 OBJDUMP="$OBJDUMP"
7303
7304 # Used on cygwin: assembler.
7305 AS="$AS"
7306
7307 # The name of the directory that contains temporary libtool files.
7308 objdir=$objdir
7309
7310 # How to create reloadable object files.
7311 reload_flag=$lt_reload_flag
7312 reload_cmds=$lt_reload_cmds
7313
7314 # How to pass a linker flag through the compiler.
7315 wl=$lt_wl
7316
7317 # Object file suffix (normally "o").
7318 objext="$ac_objext"
7319
7320 # Old archive suffix (normally "a").
7321 libext="$libext"
7322
7323 # Executable file suffix (normally "").
7324 exeext="$exeext"
7325
7326 # Additional compiler flags for building library objects.
7327 pic_flag=$lt_pic_flag
7328 pic_mode=$pic_mode
7329
7330 # Does compiler simultaneously support -c and -o options?
7331 compiler_c_o=$lt_compiler_c_o
7332
7333 # Can we write directly to a .lo ?
7334 compiler_o_lo=$lt_compiler_o_lo
7335
7336 # Must we lock files when doing compilation ?
7337 need_locks=$lt_need_locks
7338
7339 # Do we need the lib prefix for modules?
7340 need_lib_prefix=$need_lib_prefix
7341
7342 # Do we need a version for libraries?
7343 need_version=$need_version
7344
7345 # Whether dlopen is supported.
7346 dlopen_support=$enable_dlopen
7347
7348 # Whether dlopen of programs is supported.
7349 dlopen_self=$enable_dlopen_self
7350
7351 # Whether dlopen of statically linked programs is supported.
7352 dlopen_self_static=$enable_dlopen_self_static
7353
7354 # Compiler flag to prevent dynamic linking.
7355 link_static_flag=$lt_link_static_flag
7356
7357 # Compiler flag to turn off builtin functions.
7358 no_builtin_flag=$lt_no_builtin_flag
7359
7360 # Compiler flag to allow reflexive dlopens.
7361 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7362
7363 # Compiler flag to generate shared objects directly from archives.
7364 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7365
7366 # Compiler flag to generate thread-safe objects.
7367 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7368
7369 # Library versioning type.
7370 version_type=$version_type
7371
7372 # Format of library name prefix.
7373 libname_spec=$lt_libname_spec
7374
7375 # List of archive names.  First name is the real one, the rest are links.
7376 # The last name is the one that the linker finds with -lNAME.
7377 library_names_spec=$lt_library_names_spec
7378
7379 # The coded name of the library, if different from the real name.
7380 soname_spec=$lt_soname_spec
7381
7382 # Commands used to build and install an old-style archive.
7383 RANLIB=$lt_RANLIB
7384 old_archive_cmds=$lt_old_archive_cmds
7385 old_postinstall_cmds=$lt_old_postinstall_cmds
7386 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7387
7388 # Create an old-style archive from a shared archive.
7389 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7390
7391 # Create a temporary old-style archive to link instead of a shared archive.
7392 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7393
7394 # Commands used to build and install a shared archive.
7395 archive_cmds=$lt_archive_cmds
7396 archive_expsym_cmds=$lt_archive_expsym_cmds
7397 postinstall_cmds=$lt_postinstall_cmds
7398 postuninstall_cmds=$lt_postuninstall_cmds
7399
7400 # Commands to strip libraries.
7401 old_striplib=$lt_old_striplib
7402 striplib=$lt_striplib
7403
7404 # Method to check whether dependent libraries are shared objects.
7405 deplibs_check_method=$lt_deplibs_check_method
7406
7407 # Command to use when deplibs_check_method == file_magic.
7408 file_magic_cmd=$lt_file_magic_cmd
7409
7410 # Flag that allows shared libraries with undefined symbols to be built.
7411 allow_undefined_flag=$lt_allow_undefined_flag
7412
7413 # Flag that forces no undefined symbols.
7414 no_undefined_flag=$lt_no_undefined_flag
7415
7416 # Commands used to finish a libtool library installation in a directory.
7417 finish_cmds=$lt_finish_cmds
7418
7419 # Same as above, but a single script fragment to be evaled but not shown.
7420 finish_eval=$lt_finish_eval
7421
7422 # Take the output of nm and produce a listing of raw symbols and C names.
7423 global_symbol_pipe=$lt_global_symbol_pipe
7424
7425 # Transform the output of nm in a proper C declaration
7426 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7427
7428 # Transform the output of nm in a C name address pair
7429 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7430
7431 # This is the shared library runtime path variable.
7432 runpath_var=$runpath_var
7433
7434 # This is the shared library path variable.
7435 shlibpath_var=$shlibpath_var
7436
7437 # Is shlibpath searched before the hard-coded library search path?
7438 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7439
7440 # How to hardcode a shared library path into an executable.
7441 hardcode_action=$hardcode_action
7442
7443 # Whether we should hardcode library paths into libraries.
7444 hardcode_into_libs=$hardcode_into_libs
7445
7446 # Flag to hardcode \$libdir into a binary during linking.
7447 # This must work even if \$libdir does not exist.
7448 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7449
7450 # Whether we need a single -rpath flag with a separated argument.
7451 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7452
7453 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7454 # resulting binary.
7455 hardcode_direct=$hardcode_direct
7456
7457 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7458 # resulting binary.
7459 hardcode_minus_L=$hardcode_minus_L
7460
7461 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7462 # the resulting binary.
7463 hardcode_shlibpath_var=$hardcode_shlibpath_var
7464
7465 # Variables whose values should be saved in libtool wrapper scripts and
7466 # restored at relink time.
7467 variables_saved_for_relink="$variables_saved_for_relink"
7468
7469 # Whether libtool must link a program against all its dependency libraries.
7470 link_all_deplibs=$link_all_deplibs
7471
7472 # Compile-time system search path for libraries
7473 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7474
7475 # Run-time system search path for libraries
7476 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7477
7478 # Fix the shell variable \$srcfile for the compiler.
7479 fix_srcfile_path="$fix_srcfile_path"
7480
7481 # Set to yes if exported symbols are required.
7482 always_export_symbols=$always_export_symbols
7483
7484 # The commands to list exported symbols.
7485 export_symbols_cmds=$lt_export_symbols_cmds
7486
7487 # The commands to extract the exported symbol list from a shared archive.
7488 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7489
7490 # Symbols that should not be listed in the preloaded symbols.
7491 exclude_expsyms=$lt_exclude_expsyms
7492
7493 # Symbols that must always be exported.
7494 include_expsyms=$lt_include_expsyms
7495
7496 # ### END LIBTOOL CONFIG
7497
7498 __EOF__
7499
7500   case $host_os in
7501   aix3*)
7502     cat <<\EOF >> "${ofile}T"
7503
7504 # AIX sometimes has problems with the GCC collect2 program.  For some
7505 # reason, if we set the COLLECT_NAMES environment variable, the problems
7506 # vanish in a puff of smoke.
7507 if test "X${COLLECT_NAMES+set}" != Xset; then
7508   COLLECT_NAMES=
7509   export COLLECT_NAMES
7510 fi
7511 EOF
7512     ;;
7513   esac
7514
7515   case $host_os in
7516   cygwin* | mingw* | pw32* | os2*)
7517     cat <<'EOF' >> "${ofile}T"
7518       # This is a source program that is used to create dlls on Windows
7519       # Don't remove nor modify the starting and closing comments
7520 # /* ltdll.c starts here */
7521 # #define WIN32_LEAN_AND_MEAN
7522 # #include <windows.h>
7523 # #undef WIN32_LEAN_AND_MEAN
7524 # #include <stdio.h>
7525 #
7526 # #ifndef __CYGWIN__
7527 # #  ifdef __CYGWIN32__
7528 # #    define __CYGWIN__ __CYGWIN32__
7529 # #  endif
7530 # #endif
7531 #
7532 # #ifdef __cplusplus
7533 # extern "C" {
7534 # #endif
7535 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7536 # #ifdef __cplusplus
7537 # }
7538 # #endif
7539 #
7540 # #ifdef __CYGWIN__
7541 # #include <cygwin/cygwin_dll.h>
7542 # DECLARE_CYGWIN_DLL( DllMain );
7543 # #endif
7544 # HINSTANCE __hDllInstance_base;
7545 #
7546 # BOOL APIENTRY
7547 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7548 # {
7549 #   __hDllInstance_base = hInst;
7550 #   return TRUE;
7551 # }
7552 # /* ltdll.c ends here */
7553         # This is a source program that is used to create import libraries
7554         # on Windows for dlls which lack them. Don't remove nor modify the
7555         # starting and closing comments
7556 # /* impgen.c starts here */
7557 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7558 #
7559 #  This file is part of GNU libtool.
7560 #
7561 #  This program is free software; you can redistribute it and/or modify
7562 #  it under the terms of the GNU General Public License as published by
7563 #  the Free Software Foundation; either version 2 of the License, or
7564 #  (at your option) any later version.
7565 #
7566 #  This program is distributed in the hope that it will be useful,
7567 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7568 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7569 #  GNU General Public License for more details.
7570 #
7571 #  You should have received a copy of the GNU General Public License
7572 #  along with this program; if not, write to the Free Software
7573 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7574 #  */
7575 #
7576 # #include <stdio.h>            /* for printf() */
7577 # #include <unistd.h>           /* for open(), lseek(), read() */
7578 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7579 # #include <string.h>           /* for strdup() */
7580 #
7581 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7582 # #ifndef O_BINARY
7583 # #define O_BINARY 0
7584 # #endif
7585 #
7586 # static unsigned int
7587 # pe_get16 (fd, offset)
7588 #      int fd;
7589 #      int offset;
7590 # {
7591 #   unsigned char b[2];
7592 #   lseek (fd, offset, SEEK_SET);
7593 #   read (fd, b, 2);
7594 #   return b[0] + (b[1]<<8);
7595 # }
7596 #
7597 # static unsigned int
7598 # pe_get32 (fd, offset)
7599 #     int fd;
7600 #     int offset;
7601 # {
7602 #   unsigned char b[4];
7603 #   lseek (fd, offset, SEEK_SET);
7604 #   read (fd, b, 4);
7605 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7606 # }
7607 #
7608 # static unsigned int
7609 # pe_as32 (ptr)
7610 #      void *ptr;
7611 # {
7612 #   unsigned char *b = ptr;
7613 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7614 # }
7615 #
7616 # int
7617 # main (argc, argv)
7618 #     int argc;
7619 #     char *argv[];
7620 # {
7621 #     int dll;
7622 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7623 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7624 #     unsigned long name_rvas, nexp;
7625 #     unsigned char *expdata, *erva;
7626 #     char *filename, *dll_name;
7627 #
7628 #     filename = argv[1];
7629 #
7630 #     dll = open(filename, O_RDONLY|O_BINARY);
7631 #     if (dll < 1)
7632 #       return 1;
7633 #
7634 #     dll_name = filename;
7635 #
7636 #     for (i=0; filename[i]; i++)
7637 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7638 #           dll_name = filename + i +1;
7639 #
7640 #     pe_header_offset = pe_get32 (dll, 0x3c);
7641 #     opthdr_ofs = pe_header_offset + 4 + 20;
7642 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7643 #
7644 #     if (num_entries < 1) /* no exports */
7645 #       return 1;
7646 #
7647 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7648 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7649 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7650 #     secptr = (pe_header_offset + 4 + 20 +
7651 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7652 #
7653 #     expptr = 0;
7654 #     for (i = 0; i < nsections; i++)
7655 #     {
7656 #       char sname[8];
7657 #       unsigned long secptr1 = secptr + 40 * i;
7658 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7659 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7660 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7661 #       lseek(dll, secptr1, SEEK_SET);
7662 #       read(dll, sname, 8);
7663 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7664 #       {
7665 #           expptr = fptr + (export_rva - vaddr);
7666 #           if (export_rva + export_size > vaddr + vsize)
7667 #               export_size = vsize - (export_rva - vaddr);
7668 #           break;
7669 #       }
7670 #     }
7671 #
7672 #     expdata = (unsigned char*)malloc(export_size);
7673 #     lseek (dll, expptr, SEEK_SET);
7674 #     read (dll, expdata, export_size);
7675 #     erva = expdata - export_rva;
7676 #
7677 #     nexp = pe_as32 (expdata+24);
7678 #     name_rvas = pe_as32 (expdata+32);
7679 #
7680 #     printf ("EXPORTS\n");
7681 #     for (i = 0; i<nexp; i++)
7682 #     {
7683 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7684 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7685 #     }
7686 #
7687 #     return 0;
7688 # }
7689 # /* impgen.c ends here */
7690
7691 EOF
7692     ;;
7693   esac
7694
7695   # We use sed instead of cat because bash on DJGPP gets confused if
7696   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7697   # text mode, it properly converts lines to CR/LF.  This bash problem
7698   # is reportedly fixed, but why not run on old versions too?
7699   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7700
7701   mv -f "${ofile}T" "$ofile" || \
7702     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7703   chmod +x "$ofile"
7704 fi
7705
7706
7707
7708
7709
7710 # This can be used to rebuild libtool when needed
7711 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7712
7713 # Always use our own libtool.
7714 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7715
7716 # Prevent multiple expansion
7717
7718
7719
7720 # test for ln hardlink support
7721 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7722 echo "configure:7723: checking whether ln works" >&5
7723 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   rm -f conftest.src conftest.dst
7727 echo "conftest" > conftest.src
7728 if ln conftest.src conftest.dst 2>/dev/null
7729 then
7730   ol_cv_prog_LN_H="ln"
7731 else
7732   ol_cv_prog_LN_H="cp"
7733 fi
7734 rm -f conftest.src conftest.dst
7735
7736 fi
7737 LN_H="$ol_cv_prog_LN_H"
7738 if test "$ol_cv_prog_LN_H" = "ln"; then
7739         echo "$ac_t""yes" 1>&6
7740 else
7741         echo "$ac_t""no" 1>&6
7742 fi
7743
7744 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7745 echo "configure:7746: checking whether ln -s works" >&5
7746 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7747   echo $ac_n "(cached) $ac_c" 1>&6
7748 else
7749   rm -f conftestdata
7750 if ln -s X conftestdata 2>/dev/null
7751 then
7752   rm -f conftestdata
7753   ac_cv_prog_LN_S="ln -s"
7754 else
7755   ac_cv_prog_LN_S=ln
7756 fi
7757 fi
7758 LN_S="$ac_cv_prog_LN_S"
7759 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7760   echo "$ac_t""yes" 1>&6
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764
7765
7766 ol_link_perl=no
7767 if test $ol_enable_perl != no ; then
7768         # Extract the first word of "perl", so it can be a program name with args.
7769 set dummy perl; ac_word=$2
7770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7771 echo "configure:7772: checking for $ac_word" >&5
7772 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7773   echo $ac_n "(cached) $ac_c" 1>&6
7774 else
7775   case "$PERLBIN" in
7776   /*)
7777   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7778   ;;
7779   ?:/*)
7780   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7781   ;;
7782   *)
7783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7784   ac_dummy="$PATH"
7785   for ac_dir in $ac_dummy; do 
7786     test -z "$ac_dir" && ac_dir=.
7787     if test -f $ac_dir/$ac_word; then
7788       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7789       break
7790     fi
7791   done
7792   IFS="$ac_save_ifs"
7793   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7794   ;;
7795 esac
7796 fi
7797 PERLBIN="$ac_cv_path_PERLBIN"
7798 if test -n "$PERLBIN"; then
7799   echo "$ac_t""$PERLBIN" 1>&6
7800 else
7801   echo "$ac_t""no" 1>&6
7802 fi
7803
7804
7805         if test "no$PERLBIN" = "no" ; then
7806                 if test $ol_enable_perl = yes ; then
7807                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7808                 fi
7809
7810         else
7811                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7812                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7813
7814                 if test x"$ol_enable_perl" = "xyes" ; then
7815                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7816                 else
7817                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7818                 fi
7819                                 ol_link_perl=yes
7820         fi
7821 fi
7822
7823 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7824 echo "configure:7825: checking how to run the C preprocessor" >&5
7825 # On Suns, sometimes $CPP names a directory.
7826 if test -n "$CPP" && test -d "$CPP"; then
7827   CPP=
7828 fi
7829 if test -z "$CPP"; then
7830 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7831   echo $ac_n "(cached) $ac_c" 1>&6
7832 else
7833     # This must be in double quotes, not single quotes, because CPP may get
7834   # substituted into the Makefile and "${CC-cc}" will confuse make.
7835   CPP="${CC-cc} -E"
7836   # On the NeXT, cc -E runs the code through the compiler's parser,
7837   # not just through cpp.
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <assert.h>
7842 Syntax Error
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   :
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   CPP="${CC-cc} -E -traditional-cpp"
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <assert.h>
7859 Syntax Error
7860 EOF
7861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7862 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7864 if test -z "$ac_err"; then
7865   :
7866 else
7867   echo "$ac_err" >&5
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   CPP="${CC-cc} -nologo -E"
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <assert.h>
7876 Syntax Error
7877 EOF
7878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7879 { (eval echo configure:7880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7881 if test -z "$ac_err"; then
7882   :
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   CPP=/lib/cpp
7889 fi
7890 rm -f conftest*
7891 fi
7892 rm -f conftest*
7893 fi
7894 rm -f conftest*
7895   ac_cv_prog_CPP="$CPP"
7896 fi
7897   CPP="$ac_cv_prog_CPP"
7898 else
7899   ac_cv_prog_CPP="$CPP"
7900 fi
7901 echo "$ac_t""$CPP" 1>&6
7902
7903
7904
7905 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7906 echo "configure:7907: checking for Cygwin environment" >&5
7907 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913
7914 int main() {
7915
7916 #ifndef __CYGWIN__
7917 #define __CYGWIN__ __CYGWIN32__
7918 #endif
7919 return __CYGWIN__;
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7923   rm -rf conftest*
7924   ac_cv_cygwin=yes
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   ac_cv_cygwin=no
7930 fi
7931 rm -f conftest*
7932 fi
7933
7934 echo "$ac_t""$ac_cv_cygwin" 1>&6
7935 CYGWIN=
7936 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7937 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7938 echo "configure:7939: checking for mingw32 environment" >&5
7939 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945
7946 int main() {
7947 return __MINGW32__;
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7951   rm -rf conftest*
7952   ac_cv_mingw32=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   ac_cv_mingw32=no
7958 fi
7959 rm -f conftest*
7960 fi
7961
7962 echo "$ac_t""$ac_cv_mingw32" 1>&6
7963 MINGW32=
7964 test "$ac_cv_mingw32" = yes && MINGW32=yes
7965
7966
7967
7968 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7969 echo "configure:7970: checking for executable suffix" >&5
7970 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7974   ac_cv_exeext=.exe
7975 else
7976   rm -f conftest*
7977   echo 'int main () { return 0; }' > conftest.$ac_ext
7978   ac_cv_exeext=
7979   if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7980     for file in conftest.*; do
7981       case $file in
7982       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7983       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7984       esac
7985     done
7986   else
7987     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7988   fi
7989   rm -f conftest*
7990   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7991 fi
7992 fi
7993
7994 EXEEXT=""
7995 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7996 echo "$ac_t""${ac_cv_exeext}" 1>&6
7997 ac_exeext=$EXEEXT
7998
7999 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8000 echo "configure:8001: checking for object suffix" >&5
8001 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   rm -f conftest*
8005 echo 'int i = 1;' > conftest.$ac_ext
8006 if { (eval echo configure:8007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8007   for ac_file in conftest.*; do
8008     case $ac_file in
8009     *.c) ;;
8010     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8011     esac
8012   done
8013 else
8014   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8015 fi
8016 rm -f conftest*
8017 fi
8018
8019 echo "$ac_t""$ac_cv_objext" 1>&6
8020 OBJEXT=$ac_cv_objext
8021 ac_objext=$ac_cv_objext
8022
8023
8024 cat >> confdefs.h <<EOF
8025 #define EXEEXT "${EXEEXT}"
8026 EOF
8027
8028
8029 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8030 echo "configure:8031: checking for be_app in -lbe" >&5
8031 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   ac_save_LIBS="$LIBS"
8036 LIBS="-lbe -lroot -lnet $LIBS"
8037 cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* Override any gcc2 internal prototype to avoid an error.  */
8041 /* We use char because int might match the return type of a gcc2
8042     builtin and then its argument prototype would still apply.  */
8043 char be_app();
8044
8045 int main() {
8046 be_app()
8047 ; return 0; }
8048 EOF
8049 if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8050   rm -rf conftest*
8051   eval "ac_cv_lib_$ac_lib_var=yes"
8052 else
8053   echo "configure: failed program was:" >&5
8054   cat conftest.$ac_ext >&5
8055   rm -rf conftest*
8056   eval "ac_cv_lib_$ac_lib_var=no"
8057 fi
8058 rm -f conftest*
8059 LIBS="$ac_save_LIBS"
8060
8061 fi
8062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8063   echo "$ac_t""yes" 1>&6
8064   LIBS="$LIBS -lbe -lroot -lnet"
8065 else
8066   echo "$ac_t""no" 1>&6
8067 :
8068 fi
8069
8070
8071
8072
8073
8074 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8075 echo "configure:8076: checking for ${CC-cc} option to accept ANSI C" >&5
8076 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   am_cv_prog_cc_stdc=no
8080 ac_save_CC="$CC"
8081 # Don't try gcc -ansi; that turns off useful extensions and
8082 # breaks some systems' header files.
8083 # AIX                   -qlanglvl=ansi
8084 # Ultrix and OSF/1      -std1
8085 # HP-UX 10.20 and later -Ae
8086 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8087 # SVR4                  -Xc -D__EXTENSIONS__
8088 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8089 do
8090   CC="$ac_save_CC $ac_arg"
8091   cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 #include <stdarg.h>
8095 #include <stdio.h>
8096 #include <sys/types.h>
8097 #include <sys/stat.h>
8098 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8099 struct buf { int x; };
8100 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8101 static char *e (p, i)
8102      char **p;
8103      int i;
8104 {
8105   return p[i];
8106 }
8107 static char *f (char * (*g) (char **, int), char **p, ...)
8108 {
8109   char *s;
8110   va_list v;
8111   va_start (v,p);
8112   s = g (p, va_arg (v,int));
8113   va_end (v);
8114   return s;
8115 }
8116 int test (int i, double x);
8117 struct s1 {int (*f) (int a);};
8118 struct s2 {int (*f) (double a);};
8119 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8120 int argc;
8121 char **argv;
8122
8123 int main() {
8124
8125 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8126
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8130   rm -rf conftest*
8131   am_cv_prog_cc_stdc="$ac_arg"; break
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135 fi
8136 rm -f conftest*
8137 done
8138 CC="$ac_save_CC"
8139
8140 fi
8141
8142 if test -z "$am_cv_prog_cc_stdc"; then
8143   echo "$ac_t""none needed" 1>&6
8144 else
8145   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8146 fi
8147 case "x$am_cv_prog_cc_stdc" in
8148   x|xno) ;;
8149   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8150 esac
8151
8152 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8153         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8154 fi
8155
8156 # test for make depend flag
8157 OL_MKDEP=
8158 OL_MKDEP_FLAGS=
8159 if test -z "${MKDEP}"; then
8160         OL_MKDEP="${CC-cc}"
8161         if test -z "${MKDEP_FLAGS}"; then
8162                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8163 echo "configure:8164: checking for ${OL_MKDEP} depend flag" >&5
8164 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   
8168                         ol_cv_mkdep=no
8169                         for flag in "-M" "-xM"; do
8170                                 cat > conftest.c <<EOF
8171  noCode;
8172 EOF
8173                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8174                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8175                                 then
8176                                         if test ! -f conftest."${ac_object}" ; then
8177                                                 ol_cv_mkdep=$flag
8178                                                 OL_MKDEP_FLAGS="$flag"
8179                                                 break
8180                                         fi
8181                                 fi
8182                         done
8183                         rm -f conftest*
8184                 
8185 fi
8186
8187 echo "$ac_t""$ol_cv_mkdep" 1>&6
8188         else
8189                 cc_cv_mkdep=yes
8190                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8191         fi
8192 else
8193         cc_cv_mkdep=yes
8194         OL_MKDEP="${MKDEP}"
8195         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8196 fi
8197
8198
8199
8200 if test "${ol_cv_mkdep}" = no ; then
8201         # this will soon become an error
8202         echo "configure: warning: do not know how to generate dependencies" 1>&2
8203 fi
8204
8205 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8206 echo "configure:8207: checking for afopen in -ls" >&5
8207 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8209   echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211   ac_save_LIBS="$LIBS"
8212 LIBS="-ls  $LIBS"
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* Override any gcc2 internal prototype to avoid an error.  */
8217 /* We use char because int might match the return type of a gcc2
8218     builtin and then its argument prototype would still apply.  */
8219 char afopen();
8220
8221 int main() {
8222 afopen()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 LIBS="$ac_save_LIBS"
8236
8237 fi
8238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240   
8241         AUTH_LIBS=-ls
8242         cat >> confdefs.h <<\EOF
8243 #define HAVE_AIX_SECURITY 1
8244 EOF
8245
8246
8247 else
8248   echo "$ac_t""no" 1>&6
8249 fi
8250
8251
8252 case "$target" in
8253 *-ibm-openedition)
8254         ac_cv_func_getopt=no
8255         cat >> confdefs.h <<\EOF
8256 #define BOTH_STRINGS_H 1
8257 EOF
8258
8259         ;;
8260 esac
8261
8262 ol_link_modules=no
8263 if test $ol_enable_modules != no ; then
8264         for ac_hdr in ltdl.h
8265 do
8266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8268 echo "configure:8269: checking for $ac_hdr" >&5
8269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   cat > conftest.$ac_ext <<EOF
8273 #line 8274 "configure"
8274 #include "confdefs.h"
8275 #include <$ac_hdr>
8276 EOF
8277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8278 { (eval echo configure:8279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8280 if test -z "$ac_err"; then
8281   rm -rf conftest*
8282   eval "ac_cv_header_$ac_safe=yes"
8283 else
8284   echo "$ac_err" >&5
8285   echo "configure: failed program was:" >&5
8286   cat conftest.$ac_ext >&5
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=no"
8289 fi
8290 rm -f conftest*
8291 fi
8292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8293   echo "$ac_t""yes" 1>&6
8294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8295   cat >> confdefs.h <<EOF
8296 #define $ac_tr_hdr 1
8297 EOF
8298  
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302 done
8303
8304
8305         if test $ac_cv_header_ltdl_h = no ; then
8306                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8307         fi
8308
8309         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8310 echo "configure:8311: checking for lt_dlinit in -lltdl" >&5
8311 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   ac_save_LIBS="$LIBS"
8316 LIBS="-lltdl  $LIBS"
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char lt_dlinit();
8324
8325 int main() {
8326 lt_dlinit()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 LIBS="$ac_save_LIBS"
8340
8341 fi
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344   
8345                 MODULES_LIBS=-lltdl
8346                 cat >> confdefs.h <<\EOF
8347 #define HAVE_LIBLTDL 1
8348 EOF
8349
8350         
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354
8355
8356         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8357                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8358         fi
8359         ol_link_modules=yes
8360
8361 else
8362         for i in $Backends; do
8363                 eval "ol_tmp=\$ol_enable_$i"
8364                 if test $ol_tmp = mod ; then
8365                         echo "configure: warning: building static $i backend" 1>&2
8366                         eval "ol_enable_$i=yes"
8367                 fi
8368         done
8369         for i in $Overlays; do
8370                 eval "ol_tmp=\$ol_enable_$i"
8371                 if test $ol_tmp = mod ; then
8372                         echo "configure: warning: building static $i overlay" 1>&2
8373                         eval "ol_enable_$i=yes"
8374                 fi
8375         done
8376 fi
8377
8378 # test for EBCDIC
8379 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8380 echo "configure:8381: checking for EBCDIC" >&5
8381 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8382   echo $ac_n "(cached) $ac_c" 1>&6
8383 else
8384   
8385         cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388
8389 #if !('M' == 0xd4)
8390 #include <__ASCII__/generate_error.h>
8391 #endif
8392
8393 EOF
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8398   rm -rf conftest*
8399   ol_cv_cpp_ebcdic=yes
8400 else
8401   echo "$ac_err" >&5
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=no
8406 fi
8407 rm -f conftest*
8408 fi
8409
8410 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8411 if test $ol_cv_cpp_ebcdic = yes ; then
8412         cat >> confdefs.h <<\EOF
8413 #define HAVE_EBCDIC 1
8414 EOF
8415
8416 fi
8417
8418 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8419 echo "configure:8420: checking for ANSI C header files" >&5
8420 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <stdlib.h>
8427 #include <stdarg.h>
8428 #include <string.h>
8429 #include <float.h>
8430 EOF
8431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8432 { (eval echo configure:8433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8434 if test -z "$ac_err"; then
8435   rm -rf conftest*
8436   ol_cv_header_stdc=yes
8437 else
8438   echo "$ac_err" >&5
8439   echo "configure: failed program was:" >&5
8440   cat conftest.$ac_ext >&5
8441   rm -rf conftest*
8442   ol_cv_header_stdc=no
8443 fi
8444 rm -f conftest*
8445
8446 if test $ol_cv_header_stdc = yes; then
8447   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 #include <string.h>
8452 EOF
8453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8454   egrep "memchr" >/dev/null 2>&1; then
8455   :
8456 else
8457   rm -rf conftest*
8458   ol_cv_header_stdc=no
8459 fi
8460 rm -f conftest*
8461
8462 fi
8463
8464 if test $ol_cv_header_stdc = yes; then
8465   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8466 cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 #include <stdlib.h>
8470 EOF
8471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8472   egrep "free" >/dev/null 2>&1; then
8473   :
8474 else
8475   rm -rf conftest*
8476   ol_cv_header_stdc=no
8477 fi
8478 rm -f conftest*
8479
8480 fi
8481
8482 if test $ol_cv_header_stdc = yes; then
8483   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8484 if test "$cross_compiling" = yes; then
8485   :
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <ctype.h>
8491 #ifndef HAVE_EBCDIC
8492 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8493 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8494 #else
8495 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8496                 || ('j' <= (c) && (c) <= 'r') \
8497                 || ('s' <= (c) && (c) <= 'z'))
8498 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8499 #endif
8500 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8501 int main () { int i; for (i = 0; i < 256; i++)
8502 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8503 exit (0); }
8504
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   :
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   ol_cv_header_stdc=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518 fi
8519 fi
8520
8521 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8522 if test $ol_cv_header_stdc = yes; then
8523   cat >> confdefs.h <<\EOF
8524 #define STDC_HEADERS 1
8525 EOF
8526
8527 fi
8528 ac_cv_header_stdc=disable
8529
8530
8531 if test $ol_cv_header_stdc != yes; then
8532         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8533 fi
8534
8535 ac_header_dirent=no
8536 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8537 do
8538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8539 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_hdr that defines DIR" >&5
8541 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 #include <sys/types.h>
8548 #include <$ac_hdr>
8549 int main() {
8550 DIR *dirp = 0;
8551 ; return 0; }
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8554   rm -rf conftest*
8555   eval "ac_cv_header_dirent_$ac_safe=yes"
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -rf conftest*
8560   eval "ac_cv_header_dirent_$ac_safe=no"
8561 fi
8562 rm -f conftest*
8563 fi
8564 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8567   cat >> confdefs.h <<EOF
8568 #define $ac_tr_hdr 1
8569 EOF
8570  ac_header_dirent=$ac_hdr; break
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574 done
8575 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8576 if test $ac_header_dirent = dirent.h; then
8577 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8578 echo "configure:8579: checking for opendir in -ldir" >&5
8579 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8581   echo $ac_n "(cached) $ac_c" 1>&6
8582 else
8583   ac_save_LIBS="$LIBS"
8584 LIBS="-ldir  $LIBS"
8585 cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 /* Override any gcc2 internal prototype to avoid an error.  */
8589 /* We use char because int might match the return type of a gcc2
8590     builtin and then its argument prototype would still apply.  */
8591 char opendir();
8592
8593 int main() {
8594 opendir()
8595 ; return 0; }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8598   rm -rf conftest*
8599   eval "ac_cv_lib_$ac_lib_var=yes"
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=no"
8605 fi
8606 rm -f conftest*
8607 LIBS="$ac_save_LIBS"
8608
8609 fi
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612   LIBS="$LIBS -ldir"
8613 else
8614   echo "$ac_t""no" 1>&6
8615 fi
8616
8617 else
8618 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8619 echo "configure:8620: checking for opendir in -lx" >&5
8620 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   ac_save_LIBS="$LIBS"
8625 LIBS="-lx  $LIBS"
8626 cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 /* Override any gcc2 internal prototype to avoid an error.  */
8630 /* We use char because int might match the return type of a gcc2
8631     builtin and then its argument prototype would still apply.  */
8632 char opendir();
8633
8634 int main() {
8635 opendir()
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=no"
8646 fi
8647 rm -f conftest*
8648 LIBS="$ac_save_LIBS"
8649
8650 fi
8651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653   LIBS="$LIBS -lx"
8654 else
8655   echo "$ac_t""no" 1>&6
8656 fi
8657
8658 fi
8659
8660 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8661 echo "configure:8662: checking for sys/wait.h that is POSIX.1 compatible" >&5
8662 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669 #include <sys/wait.h>
8670 #ifndef WEXITSTATUS
8671 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8672 #endif
8673 #ifndef WIFEXITED
8674 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8675 #endif
8676 int main() {
8677 int s;
8678 wait (&s);
8679 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8683   rm -rf conftest*
8684   ac_cv_header_sys_wait_h=yes
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   ac_cv_header_sys_wait_h=no
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8695 if test $ac_cv_header_sys_wait_h = yes; then
8696   cat >> confdefs.h <<\EOF
8697 #define HAVE_SYS_WAIT_H 1
8698 EOF
8699
8700 fi
8701
8702 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8703 echo "configure:8704: checking POSIX termios" >&5
8704 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8705   echo $ac_n "(cached) $ac_c" 1>&6
8706 else
8707   cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 #include <sys/types.h>
8711 #include <unistd.h>
8712 #include <termios.h>
8713 int main() {
8714 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8715    tcgetattr(0, 0);
8716 ; return 0; }
8717 EOF
8718 if { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8719   rm -rf conftest*
8720   am_cv_sys_posix_termios=yes
8721 else
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   am_cv_sys_posix_termios=no
8726 fi
8727 rm -f conftest*
8728 fi
8729
8730 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8731
8732
8733  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8734 echo "configure:8735: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8735 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8739
8740   gwinsz_in_termios_h=no
8741   if test $am_cv_sys_posix_termios = yes; then
8742     cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <sys/types.h>
8746 #     include <termios.h>
8747 #     ifdef TIOCGWINSZ
8748         yes
8749 #     endif
8750     
8751 EOF
8752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8753   egrep "yes" >/dev/null 2>&1; then
8754   rm -rf conftest*
8755   gwinsz_in_termios_h=yes
8756 fi
8757 rm -f conftest*
8758
8759   fi
8760
8761   if test $gwinsz_in_termios_h = no; then
8762     cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 #include <sys/types.h>
8766 #     include <sys/ioctl.h>
8767 #     ifdef TIOCGWINSZ
8768         yes
8769 #     endif
8770     
8771 EOF
8772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8773   egrep "yes" >/dev/null 2>&1; then
8774   rm -rf conftest*
8775   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8776 fi
8777 rm -f conftest*
8778
8779   fi
8780   
8781 fi
8782
8783 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8784   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8785     cat >> confdefs.h <<\EOF
8786 #define GWINSZ_IN_SYS_IOCTL 1
8787 EOF
8788
8789   fi
8790
8791 if test $am_cv_sys_posix_termios = yes ; then
8792         cat >> confdefs.h <<\EOF
8793 #define HAVE_POSIX_TERMIOS 1
8794 EOF
8795
8796 fi
8797
8798 for ac_hdr in \
8799         arpa/inet.h             \
8800         arpa/nameser.h  \
8801         assert.h                \
8802         bits/types.h    \
8803         conio.h                 \
8804         crypt.h                 \
8805         direct.h                \
8806         errno.h                 \
8807         fcntl.h                 \
8808         filio.h                 \
8809         getopt.h                \
8810         grp.h                   \
8811         io.h                    \
8812         libutil.h               \
8813         limits.h                \
8814         locale.h                \
8815         netinet/tcp.h   \
8816         malloc.h                \
8817         memory.h                \
8818         psap.h                  \
8819         pwd.h                   \
8820         process.h               \
8821         resolv.h                \
8822         sgtty.h                 \
8823         shadow.h                \
8824         stddef.h                \
8825         string.h                \
8826         strings.h               \
8827         sysexits.h              \
8828         sys/file.h              \
8829         sys/filio.h             \
8830         sys/errno.h             \
8831         sys/ioctl.h             \
8832         sys/param.h             \
8833         sys/resource.h  \
8834         sys/select.h    \
8835         sys/socket.h    \
8836         sys/stat.h              \
8837         sys/syslog.h    \
8838         sys/time.h              \
8839         sys/types.h             \
8840         sys/ucred.h             \
8841         sys/uio.h               \
8842         syslog.h                \
8843         termios.h               \
8844         unistd.h                \
8845         winsock.h               \
8846         winsock2.h              \
8847
8848 do
8849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8851 echo "configure:8852: checking for $ac_hdr" >&5
8852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 #include <$ac_hdr>
8859 EOF
8860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8861 { (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8863 if test -z "$ac_err"; then
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=yes"
8866 else
8867   echo "$ac_err" >&5
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=no"
8872 fi
8873 rm -f conftest*
8874 fi
8875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8876   echo "$ac_t""yes" 1>&6
8877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8878   cat >> confdefs.h <<EOF
8879 #define $ac_tr_hdr 1
8880 EOF
8881  
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885 done
8886
8887
8888
8889
8890 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8891 echo "configure:8892: checking for sigset in -lV3" >&5
8892 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   ac_save_LIBS="$LIBS"
8897 LIBS="-lV3  $LIBS"
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* Override any gcc2 internal prototype to avoid an error.  */
8902 /* We use char because int might match the return type of a gcc2
8903     builtin and then its argument prototype would still apply.  */
8904 char sigset();
8905
8906 int main() {
8907 sigset()
8908 ; return 0; }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=yes"
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   eval "ac_cv_lib_$ac_lib_var=no"
8918 fi
8919 rm -f conftest*
8920 LIBS="$ac_save_LIBS"
8921
8922 fi
8923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8924   echo "$ac_t""yes" 1>&6
8925     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8926     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8927   cat >> confdefs.h <<EOF
8928 #define $ac_tr_lib 1
8929 EOF
8930
8931   LIBS="-lV3 $LIBS"
8932
8933 else
8934   echo "$ac_t""no" 1>&6
8935 fi
8936
8937
8938 if test "$ac_cv_header_winsock_h" = yes; then
8939 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8940 echo "configure:8941: checking for winsock" >&5
8941 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   save_LIBS="$LIBS"
8945 for curlib in ws2_32 wsock32; do
8946         LIBS="$LIBS -l$curlib"
8947         cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <winsock.h>
8951                         
8952 int main() {
8953
8954                         socket(0,0,0);
8955                         select(0,NULL,NULL,NULL,NULL);
8956                         closesocket(0);
8957                         gethostname(NULL,0);
8958                         
8959 ; return 0; }
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8962   rm -rf conftest*
8963   ol_cv_winsock=yes
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -rf conftest*
8968   ol_cv_winsock=no
8969 fi
8970 rm -f conftest*
8971
8972         if test $ol_cv_winsock = yes; then
8973                 cat >> confdefs.h <<\EOF
8974 #define HAVE_WINSOCK 1
8975 EOF
8976
8977                 ac_cv_func_socket=yes
8978                 ac_cv_func_select=yes
8979                 ac_cv_func_closesocket=yes
8980                 ac_cv_func_gethostname=yes
8981                 if test $curlib = ws2_32; then
8982                         ol_cv_winsock=winsock2
8983                         cat >> confdefs.h <<\EOF
8984 #define HAVE_WINSOCK2 1
8985 EOF
8986
8987                 fi
8988                 break
8989         fi
8990         LIBS="$save_LIBS"
8991 done
8992 fi
8993
8994 echo "$ac_t""$ol_cv_winsock" 1>&6
8995 fi
8996
8997
8998 echo $ac_n "checking for socket""... $ac_c" 1>&6
8999 echo "configure:9000: checking for socket" >&5
9000 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* System header to define __stub macros and hopefully few prototypes,
9007     which can conflict with char socket(); below.  */
9008 #include <assert.h>
9009 /* Override any gcc2 internal prototype to avoid an error.  */
9010 /* We use char because int might match the return type of a gcc2
9011     builtin and then its argument prototype would still apply.  */
9012 char socket();
9013 char (*f)();
9014
9015 int main() {
9016
9017 /* The GNU C library defines this for functions which it implements
9018     to always fail with ENOSYS.  Some functions are actually named
9019     something starting with __ and the normal name is an alias.  */
9020 #if defined (__stub_socket) || defined (__stub___socket)
9021 choke me
9022 #else
9023 f = socket;
9024 #endif
9025
9026 ; return 0; }
9027 EOF
9028 if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9029   rm -rf conftest*
9030   eval "ac_cv_func_socket=yes"
9031 else
9032   echo "configure: failed program was:" >&5
9033   cat conftest.$ac_ext >&5
9034   rm -rf conftest*
9035   eval "ac_cv_func_socket=no"
9036 fi
9037 rm -f conftest*
9038 fi
9039
9040 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042   :
9043 else
9044   echo "$ac_t""no" 1>&6
9045         
9046         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9047 echo "configure:9048: checking for main in -lsocket" >&5
9048 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   ac_save_LIBS="$LIBS"
9053 LIBS="-lsocket  $LIBS"
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057
9058 int main() {
9059 main()
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   eval "ac_cv_lib_$ac_lib_var=yes"
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=no"
9070 fi
9071 rm -f conftest*
9072 LIBS="$ac_save_LIBS"
9073
9074 fi
9075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9076   echo "$ac_t""yes" 1>&6
9077     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9078     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9079   cat >> confdefs.h <<EOF
9080 #define $ac_tr_lib 1
9081 EOF
9082
9083   LIBS="-lsocket $LIBS"
9084
9085 else
9086   echo "$ac_t""no" 1>&6
9087 fi
9088
9089         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9090 echo "configure:9091: checking for main in -lnet" >&5
9091 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   ac_save_LIBS="$LIBS"
9096 LIBS="-lnet  $LIBS"
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100
9101 int main() {
9102 main()
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9106   rm -rf conftest*
9107   eval "ac_cv_lib_$ac_lib_var=yes"
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   eval "ac_cv_lib_$ac_lib_var=no"
9113 fi
9114 rm -f conftest*
9115 LIBS="$ac_save_LIBS"
9116
9117 fi
9118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9119   echo "$ac_t""yes" 1>&6
9120     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9122   cat >> confdefs.h <<EOF
9123 #define $ac_tr_lib 1
9124 EOF
9125
9126   LIBS="-lnet $LIBS"
9127
9128 else
9129   echo "$ac_t""no" 1>&6
9130 fi
9131
9132         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9133 echo "configure:9134: checking for main in -lnsl_s" >&5
9134 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9136   echo $ac_n "(cached) $ac_c" 1>&6
9137 else
9138   ac_save_LIBS="$LIBS"
9139 LIBS="-lnsl_s  $LIBS"
9140 cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143
9144 int main() {
9145 main()
9146 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   eval "ac_cv_lib_$ac_lib_var=yes"
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_lib_$ac_lib_var=no"
9156 fi
9157 rm -f conftest*
9158 LIBS="$ac_save_LIBS"
9159
9160 fi
9161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9162   echo "$ac_t""yes" 1>&6
9163     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9165   cat >> confdefs.h <<EOF
9166 #define $ac_tr_lib 1
9167 EOF
9168
9169   LIBS="-lnsl_s $LIBS"
9170
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174
9175         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9176 echo "configure:9177: checking for main in -lnsl" >&5
9177 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9179   echo $ac_n "(cached) $ac_c" 1>&6
9180 else
9181   ac_save_LIBS="$LIBS"
9182 LIBS="-lnsl  $LIBS"
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186
9187 int main() {
9188 main()
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   eval "ac_cv_lib_$ac_lib_var=yes"
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   eval "ac_cv_lib_$ac_lib_var=no"
9199 fi
9200 rm -f conftest*
9201 LIBS="$ac_save_LIBS"
9202
9203 fi
9204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9208   cat >> confdefs.h <<EOF
9209 #define $ac_tr_lib 1
9210 EOF
9211
9212   LIBS="-lnsl $LIBS"
9213
9214 else
9215   echo "$ac_t""no" 1>&6
9216 fi
9217
9218         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9219 echo "configure:9220: checking for socket in -linet" >&5
9220 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9222   echo $ac_n "(cached) $ac_c" 1>&6
9223 else
9224   ac_save_LIBS="$LIBS"
9225 LIBS="-linet  $LIBS"
9226 cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* Override any gcc2 internal prototype to avoid an error.  */
9230 /* We use char because int might match the return type of a gcc2
9231     builtin and then its argument prototype would still apply.  */
9232 char socket();
9233
9234 int main() {
9235 socket()
9236 ; return 0; }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9239   rm -rf conftest*
9240   eval "ac_cv_lib_$ac_lib_var=yes"
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=no"
9246 fi
9247 rm -f conftest*
9248 LIBS="$ac_save_LIBS"
9249
9250 fi
9251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9252   echo "$ac_t""yes" 1>&6
9253     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9255   cat >> confdefs.h <<EOF
9256 #define $ac_tr_lib 1
9257 EOF
9258
9259   LIBS="-linet $LIBS"
9260
9261 else
9262   echo "$ac_t""no" 1>&6
9263 fi
9264
9265         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9266 echo "configure:9267: checking for main in -lgen" >&5
9267 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9269   echo $ac_n "(cached) $ac_c" 1>&6
9270 else
9271   ac_save_LIBS="$LIBS"
9272 LIBS="-lgen  $LIBS"
9273 cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276
9277 int main() {
9278 main()
9279 ; return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9282   rm -rf conftest*
9283   eval "ac_cv_lib_$ac_lib_var=yes"
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=no"
9289 fi
9290 rm -f conftest*
9291 LIBS="$ac_save_LIBS"
9292
9293 fi
9294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9295   echo "$ac_t""yes" 1>&6
9296     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9298   cat >> confdefs.h <<EOF
9299 #define $ac_tr_lib 1
9300 EOF
9301
9302   LIBS="-lgen $LIBS"
9303
9304 else
9305   echo "$ac_t""no" 1>&6
9306 fi
9307
9308
9309 fi
9310
9311
9312 echo $ac_n "checking for select""... $ac_c" 1>&6
9313 echo "configure:9314: checking for select" >&5
9314 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 /* System header to define __stub macros and hopefully few prototypes,
9321     which can conflict with char select(); below.  */
9322 #include <assert.h>
9323 /* Override any gcc2 internal prototype to avoid an error.  */
9324 /* We use char because int might match the return type of a gcc2
9325     builtin and then its argument prototype would still apply.  */
9326 char select();
9327 char (*f)();
9328
9329 int main() {
9330
9331 /* The GNU C library defines this for functions which it implements
9332     to always fail with ENOSYS.  Some functions are actually named
9333     something starting with __ and the normal name is an alias.  */
9334 #if defined (__stub_select) || defined (__stub___select)
9335 choke me
9336 #else
9337 f = select;
9338 #endif
9339
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_func_select=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_func_select=no"
9350 fi
9351 rm -f conftest*
9352 fi
9353
9354 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356   :
9357 else
9358   echo "$ac_t""no" 1>&6
9359 { echo "configure: error: select() required." 1>&2; exit 1; }
9360 fi
9361
9362
9363 if test "${ac_cv_header_winsock_h}" != yes; then
9364                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9365 echo "configure:9366: checking types of arguments for select()" >&5
9366  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9376      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9377       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9378        cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #ifdef HAVE_SYS_TYPES_H
9382 #include <sys/types.h>
9383 #endif
9384 #ifdef HAVE_SYS_TIME_H
9385 #include <sys/time.h>
9386 #endif
9387 #ifdef HAVE_SYS_SELECT_H
9388 #include <sys/select.h>
9389 #endif
9390 #ifdef HAVE_SYS_SOCKET_H
9391 #include <sys/socket.h>
9392 #endif
9393 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
9394 int main() {
9395
9396 ; return 0; }
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9399   rm -rf conftest*
9400           ac_not_found=no ; break 3
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   ac_not_found=yes
9406 fi
9407 rm -f conftest*
9408       done
9409      done
9410     done
9411    
9412 fi
9413   
9414 fi
9415  
9416 fi
9417  if test "$ac_not_found" = yes; then
9418   ac_cv_func_select_arg1=int 
9419   ac_cv_func_select_arg234='int *' 
9420   ac_cv_func_select_arg5='struct timeval *'
9421  fi
9422  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9423  cat >> confdefs.h <<EOF
9424 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9425 EOF
9426
9427  cat >> confdefs.h <<EOF
9428 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9429 EOF
9430
9431  cat >> confdefs.h <<EOF
9432 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9433 EOF
9434
9435
9436 fi
9437
9438
9439 # strerror checks
9440 for ac_func in strerror strerror_r
9441 do
9442 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9443 echo "configure:9444: checking for $ac_func" >&5
9444 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9445   echo $ac_n "(cached) $ac_c" 1>&6
9446 else
9447   cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 /* System header to define __stub macros and hopefully few prototypes,
9451     which can conflict with char $ac_func(); below.  */
9452 #include <assert.h>
9453 /* Override any gcc2 internal prototype to avoid an error.  */
9454 /* We use char because int might match the return type of a gcc2
9455     builtin and then its argument prototype would still apply.  */
9456 char $ac_func();
9457 char (*f)();
9458
9459 int main() {
9460
9461 /* The GNU C library defines this for functions which it implements
9462     to always fail with ENOSYS.  Some functions are actually named
9463     something starting with __ and the normal name is an alias.  */
9464 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9465 choke me
9466 #else
9467 f = $ac_func;
9468 #endif
9469
9470 ; return 0; }
9471 EOF
9472 if { (eval echo configure:9473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9473   rm -rf conftest*
9474   eval "ac_cv_func_$ac_func=yes"
9475 else
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -rf conftest*
9479   eval "ac_cv_func_$ac_func=no"
9480 fi
9481 rm -f conftest*
9482 fi
9483
9484 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9485   echo "$ac_t""yes" 1>&6
9486     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9487   cat >> confdefs.h <<EOF
9488 #define $ac_tr_func 1
9489 EOF
9490  
9491 else
9492   echo "$ac_t""no" 1>&6
9493 fi
9494 done
9495
9496 ol_cv_func_strerror_r=no
9497 if test "${ac_cv_func_strerror_r}" = yes ; then
9498         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9499 echo "configure:9500: checking non-posix strerror_r" >&5
9500 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   
9504         cat > conftest.$ac_ext <<EOF
9505 #line 9506 "configure"
9506 #include "confdefs.h"
9507 #include <string.h>
9508 EOF
9509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9510   egrep "strerror_r" >/dev/null 2>&1; then
9511   rm -rf conftest*
9512   ol_decl_strerror_r=yes
9513 else
9514   rm -rf conftest*
9515   ol_decl_strerror_r=no
9516 fi
9517 rm -f conftest*
9518
9519         if test $ol_decl_strerror_r = yes ; then
9520                 cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 #include <string.h>
9524 int main() {
9525    /* from autoconf 2.59 */
9526                                 char buf[100];
9527                                 char x = *strerror_r (0, buf, sizeof buf);
9528                                 char *p = strerror_r (0, buf, sizeof buf);
9529                         
9530 ; return 0; }
9531 EOF
9532 if { (eval echo configure:9533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9533   rm -rf conftest*
9534   ol_cv_nonposix_strerror_r=yes
9535 else
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   ol_cv_nonposix_strerror_r=no
9540 fi
9541 rm -f conftest*
9542         else
9543                 if test "$cross_compiling" = yes; then
9544     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9545 else
9546   cat > conftest.$ac_ext <<EOF
9547 #line 9548 "configure"
9548 #include "confdefs.h"
9549
9550                         main() {
9551                                 char buf[100];
9552                                 buf[0] = 0;
9553                                 strerror_r( 1, buf, sizeof buf );
9554                                 exit( buf[0] == 0 );
9555                         }
9556                         
9557 EOF
9558 if { (eval echo configure:9559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9559 then
9560   ol_cv_nonposix_strerror_r=yes
9561 else
9562   echo "configure: failed program was:" >&5
9563   cat conftest.$ac_ext >&5
9564   rm -fr conftest*
9565   ol_cv_nonposix_strerror=no
9566 fi
9567 rm -fr conftest*
9568 fi
9569
9570         fi
9571         
9572 fi
9573
9574 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9575 if test $ol_cv_nonposix_strerror_r = yes ; then
9576         cat >> confdefs.h <<\EOF
9577 #define HAVE_NONPOSIX_STRERROR_R 1
9578 EOF
9579
9580 fi
9581
9582 elif test "${ac_cv_func_strerror}" = no ; then
9583         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9584 echo "configure:9585: checking declaration of sys_errlist" >&5
9585 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   
9589         cat > conftest.$ac_ext <<EOF
9590 #line 9591 "configure"
9591 #include "confdefs.h"
9592
9593 #include <stdio.h>
9594 #include <sys/types.h>
9595 #include <errno.h>
9596 #ifdef WINNT
9597 #include <stdlib.h>
9598 #endif 
9599 int main() {
9600 char *c = (char *) *sys_errlist
9601 ; return 0; }
9602 EOF
9603 if { (eval echo configure:9604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9604   rm -rf conftest*
9605   ol_cv_dcl_sys_errlist=yes
9606         ol_cv_have_sys_errlist=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   ol_cv_dcl_sys_errlist=no
9612 fi
9613 rm -f conftest*
9614 fi
9615
9616 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9617 #
9618 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9619 if test $ol_cv_dcl_sys_errlist = no ; then
9620         cat >> confdefs.h <<\EOF
9621 #define DECL_SYS_ERRLIST 1
9622 EOF
9623
9624
9625         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9626 echo "configure:9627: checking existence of sys_errlist" >&5
9627 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9628   echo $ac_n "(cached) $ac_c" 1>&6
9629 else
9630   
9631                 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 #include <errno.h>
9635 int main() {
9636 char *c = (char *) *sys_errlist
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9640   rm -rf conftest*
9641   ol_cv_have_sys_errlist=yes
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645   rm -rf conftest*
9646   ol_cv_have_sys_errlist=no
9647 fi
9648 rm -f conftest*
9649 fi
9650
9651 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9652 fi
9653 if test $ol_cv_have_sys_errlist = yes ; then
9654         cat >> confdefs.h <<\EOF
9655 #define HAVE_SYS_ERRLIST 1
9656 EOF
9657
9658 fi
9659
9660 fi
9661
9662
9663 for ac_hdr in regex.h 
9664 do
9665 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9666 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9667 echo "configure:9668: checking for $ac_hdr" >&5
9668 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9669   echo $ac_n "(cached) $ac_c" 1>&6
9670 else
9671   cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 #include <$ac_hdr>
9675 EOF
9676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9677 { (eval echo configure:9678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9679 if test -z "$ac_err"; then
9680   rm -rf conftest*
9681   eval "ac_cv_header_$ac_safe=yes"
9682 else
9683   echo "$ac_err" >&5
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -rf conftest*
9687   eval "ac_cv_header_$ac_safe=no"
9688 fi
9689 rm -f conftest*
9690 fi
9691 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9692   echo "$ac_t""yes" 1>&6
9693     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9694   cat >> confdefs.h <<EOF
9695 #define $ac_tr_hdr 1
9696 EOF
9697  
9698 else
9699   echo "$ac_t""no" 1>&6
9700 fi
9701 done
9702
9703 if test "$ac_cv_header_regex_h" != yes ; then
9704         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9705 fi
9706
9707 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9708 echo "configure:9709: checking for library containing regfree" >&5
9709 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   ac_func_search_save_LIBS="$LIBS"
9713 ac_cv_search_regfree="no"
9714 cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717 /* Override any gcc2 internal prototype to avoid an error.  */
9718 /* We use char because int might match the return type of a gcc2
9719     builtin and then its argument prototype would still apply.  */
9720 char regfree();
9721
9722 int main() {
9723 regfree()
9724 ; return 0; }
9725 EOF
9726 if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9727   rm -rf conftest*
9728   ac_cv_search_regfree="none required"
9729 else
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732 fi
9733 rm -f conftest*
9734 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9735 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9736 cat > conftest.$ac_ext <<EOF
9737 #line 9738 "configure"
9738 #include "confdefs.h"
9739 /* Override any gcc2 internal prototype to avoid an error.  */
9740 /* We use char because int might match the return type of a gcc2
9741     builtin and then its argument prototype would still apply.  */
9742 char regfree();
9743
9744 int main() {
9745 regfree()
9746 ; return 0; }
9747 EOF
9748 if { (eval echo configure:9749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9749   rm -rf conftest*
9750   ac_cv_search_regfree="-l$ac_lib"
9751 break
9752 else
9753   echo "configure: failed program was:" >&5
9754   cat conftest.$ac_ext >&5
9755 fi
9756 rm -f conftest*
9757 done
9758 LIBS="$ac_func_search_save_LIBS"
9759 fi
9760
9761 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9762 if test "$ac_cv_search_regfree" != "no"; then
9763   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9764   :
9765 else :
9766   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9767 fi
9768
9769
9770 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9771 echo "configure:9772: checking for compatible POSIX regex" >&5
9772 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9773   echo $ac_n "(cached) $ac_c" 1>&6
9774 else
9775   
9776         if test "$cross_compiling" = yes; then
9777   ol_cv_c_posix_regex=cross
9778 else
9779   cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782
9783 #include <sys/types.h>
9784 #include <regex.h>
9785 static char *pattern, *string;
9786 main()
9787 {
9788         int rc;
9789         regex_t re;
9790
9791         pattern = "^A";
9792
9793         if(regcomp(&re, pattern, 0)) {
9794                 return -1;
9795         }
9796         
9797         string = "ALL MATCH";
9798         
9799         rc = regexec(&re, string, 0, (void*)0, 0);
9800
9801         regfree(&re);
9802
9803         return rc;
9804 }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9807 then
9808   ol_cv_c_posix_regex=yes
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -fr conftest*
9813   ol_cv_c_posix_regex=no
9814 fi
9815 rm -fr conftest*
9816 fi
9817
9818 fi
9819
9820 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9821
9822 if test "$ol_cv_c_posix_regex" = no ; then
9823         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9824 fi
9825
9826
9827 have_uuid=no
9828 for ac_hdr in sys/uuid.h
9829 do
9830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9832 echo "configure:9833: checking for $ac_hdr" >&5
9833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9834   echo $ac_n "(cached) $ac_c" 1>&6
9835 else
9836   cat > conftest.$ac_ext <<EOF
9837 #line 9838 "configure"
9838 #include "confdefs.h"
9839 #include <$ac_hdr>
9840 EOF
9841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9842 { (eval echo configure:9843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9844 if test -z "$ac_err"; then
9845   rm -rf conftest*
9846   eval "ac_cv_header_$ac_safe=yes"
9847 else
9848   echo "$ac_err" >&5
9849   echo "configure: failed program was:" >&5
9850   cat conftest.$ac_ext >&5
9851   rm -rf conftest*
9852   eval "ac_cv_header_$ac_safe=no"
9853 fi
9854 rm -f conftest*
9855 fi
9856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9857   echo "$ac_t""yes" 1>&6
9858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9859   cat >> confdefs.h <<EOF
9860 #define $ac_tr_hdr 1
9861 EOF
9862  
9863 else
9864   echo "$ac_t""no" 1>&6
9865 fi
9866 done
9867
9868 if test $ac_cv_header_sys_uuid_h = yes ; then
9869         save_LIBS="$LIBS"
9870         
9871 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9872 echo "configure:9873: checking for library containing uuid_to_str" >&5
9873 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9874   echo $ac_n "(cached) $ac_c" 1>&6
9875 else
9876   ac_func_search_save_LIBS="$LIBS"
9877 ac_cv_search_uuid_to_str="no"
9878 cat > conftest.$ac_ext <<EOF
9879 #line 9880 "configure"
9880 #include "confdefs.h"
9881 /* Override any gcc2 internal prototype to avoid an error.  */
9882 /* We use char because int might match the return type of a gcc2
9883     builtin and then its argument prototype would still apply.  */
9884 char uuid_to_str();
9885
9886 int main() {
9887 uuid_to_str()
9888 ; return 0; }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9891   rm -rf conftest*
9892   ac_cv_search_uuid_to_str="none required"
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896 fi
9897 rm -f conftest*
9898 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9899 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9900 cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 /* Override any gcc2 internal prototype to avoid an error.  */
9904 /* We use char because int might match the return type of a gcc2
9905     builtin and then its argument prototype would still apply.  */
9906 char uuid_to_str();
9907
9908 int main() {
9909 uuid_to_str()
9910 ; return 0; }
9911 EOF
9912 if { (eval echo configure:9913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9913   rm -rf conftest*
9914   ac_cv_search_uuid_to_str="-l$ac_lib"
9915 break
9916 else
9917   echo "configure: failed program was:" >&5
9918   cat conftest.$ac_ext >&5
9919 fi
9920 rm -f conftest*
9921 done
9922 LIBS="$ac_func_search_save_LIBS"
9923 fi
9924
9925 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9926 if test "$ac_cv_search_uuid_to_str" != "no"; then
9927   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9928   have_uuid=yes
9929 else :
9930   :
9931 fi
9932         LIBS="$save_LIBS"
9933
9934         if test have_uuid = yes ; then
9935                 cat >> confdefs.h <<\EOF
9936 #define HAVE_UUID_TO_STR 1
9937 EOF
9938
9939
9940                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9941                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9942         fi
9943 fi
9944
9945 if test $have_uuid = no ; then
9946         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9947 echo "configure:9948: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9948         save_LIBS="$LIBS"
9949         LIBS="$LIBS -lrpcrt4"
9950         cat > conftest.$ac_ext <<EOF
9951 #line 9952 "configure"
9952 #include "confdefs.h"
9953
9954                 int __stdcall UuidCreate(void *);
9955                 int __stdcall UuidToStringA(void *,void **);
9956                 
9957 int main() {
9958
9959                 UuidCreate(0);
9960                 UuidToStringA(0,0);
9961                 
9962 ; return 0; }
9963 EOF
9964 if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9965   rm -rf conftest*
9966   need_rpcrt=yes
9967 else
9968   echo "configure: failed program was:" >&5
9969   cat conftest.$ac_ext >&5
9970   rm -rf conftest*
9971   need_rpcrt=no
9972 fi
9973 rm -f conftest*
9974         if test $need_rpcrt = yes; then
9975                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9976         fi
9977         LIBS="$save_LIBS"
9978         echo "$ac_t""$need_rpcrt" 1>&6
9979 fi
9980
9981 ol_link_dnssrv=no
9982 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9983 echo "configure:9984: checking for res_query" >&5
9984 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   cat > conftest.$ac_ext <<EOF
9988 #line 9989 "configure"
9989 #include "confdefs.h"
9990 /* System header to define __stub macros and hopefully few prototypes,
9991     which can conflict with char res_query(); below.  */
9992 #include <assert.h>
9993 /* Override any gcc2 internal prototype to avoid an error.  */
9994 /* We use char because int might match the return type of a gcc2
9995     builtin and then its argument prototype would still apply.  */
9996 char res_query();
9997 char (*f)();
9998
9999 int main() {
10000
10001 /* The GNU C library defines this for functions which it implements
10002     to always fail with ENOSYS.  Some functions are actually named
10003     something starting with __ and the normal name is an alias.  */
10004 #if defined (__stub_res_query) || defined (__stub___res_query)
10005 choke me
10006 #else
10007 f = res_query;
10008 #endif
10009
10010 ; return 0; }
10011 EOF
10012 if { (eval echo configure:10013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10013   rm -rf conftest*
10014   eval "ac_cv_func_res_query=yes"
10015 else
10016   echo "configure: failed program was:" >&5
10017   cat conftest.$ac_ext >&5
10018   rm -rf conftest*
10019   eval "ac_cv_func_res_query=no"
10020 fi
10021 rm -f conftest*
10022 fi
10023
10024 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10025   echo "$ac_t""yes" 1>&6
10026   :
10027 else
10028   echo "$ac_t""no" 1>&6
10029 fi
10030
10031 if test $ac_cv_func_res_query = no ; then 
10032         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10033 echo "configure:10034: checking for __res_query" >&5
10034 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10035   echo $ac_n "(cached) $ac_c" 1>&6
10036 else
10037   cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 /* System header to define __stub macros and hopefully few prototypes,
10041     which can conflict with char __res_query(); below.  */
10042 #include <assert.h>
10043 /* Override any gcc2 internal prototype to avoid an error.  */
10044 /* We use char because int might match the return type of a gcc2
10045     builtin and then its argument prototype would still apply.  */
10046 char __res_query();
10047 char (*f)();
10048
10049 int main() {
10050
10051 /* The GNU C library defines this for functions which it implements
10052     to always fail with ENOSYS.  Some functions are actually named
10053     something starting with __ and the normal name is an alias.  */
10054 #if defined (__stub___res_query) || defined (__stub_____res_query)
10055 choke me
10056 #else
10057 f = __res_query;
10058 #endif
10059
10060 ; return 0; }
10061 EOF
10062 if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10063   rm -rf conftest*
10064   eval "ac_cv_func___res_query=yes"
10065 else
10066   echo "configure: failed program was:" >&5
10067   cat conftest.$ac_ext >&5
10068   rm -rf conftest*
10069   eval "ac_cv_func___res_query=no"
10070 fi
10071 rm -f conftest*
10072 fi
10073
10074 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10075   echo "$ac_t""yes" 1>&6
10076   :
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         ac_cv_func_res_query=$ac_cv_func___res_query
10082 fi
10083
10084 if test $ac_cv_func_res_query = no ; then 
10085         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10086 echo "configure:10087: checking for res_query in -lbind" >&5
10087 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10089   echo $ac_n "(cached) $ac_c" 1>&6
10090 else
10091   ac_save_LIBS="$LIBS"
10092 LIBS="-lbind  $LIBS"
10093 cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 /* Override any gcc2 internal prototype to avoid an error.  */
10097 /* We use char because int might match the return type of a gcc2
10098     builtin and then its argument prototype would still apply.  */
10099 char res_query();
10100
10101 int main() {
10102 res_query()
10103 ; return 0; }
10104 EOF
10105 if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10106   rm -rf conftest*
10107   eval "ac_cv_lib_$ac_lib_var=yes"
10108 else
10109   echo "configure: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   rm -rf conftest*
10112   eval "ac_cv_lib_$ac_lib_var=no"
10113 fi
10114 rm -f conftest*
10115 LIBS="$ac_save_LIBS"
10116
10117 fi
10118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10119   echo "$ac_t""yes" 1>&6
10120     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10122   cat >> confdefs.h <<EOF
10123 #define $ac_tr_lib 1
10124 EOF
10125
10126   LIBS="-lbind $LIBS"
10127
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131
10132         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10133 fi
10134
10135 if test $ac_cv_func_res_query = no ; then 
10136         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10137 echo "configure:10138: checking for __res_query in -lbind" >&5
10138 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   ac_save_LIBS="$LIBS"
10143 LIBS="-lbind  $LIBS"
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char __res_query();
10151
10152 int main() {
10153 __res_query()
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=yes"
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=no"
10164 fi
10165 rm -f conftest*
10166 LIBS="$ac_save_LIBS"
10167
10168 fi
10169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10173   cat >> confdefs.h <<EOF
10174 #define $ac_tr_lib 1
10175 EOF
10176
10177   LIBS="-lbind $LIBS"
10178
10179 else
10180   echo "$ac_t""no" 1>&6
10181 fi
10182
10183         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10184 fi
10185
10186 if test $ac_cv_func_res_query = no ; then 
10187         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10188 echo "configure:10189: checking for res_query in -lresolv" >&5
10189 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10191   echo $ac_n "(cached) $ac_c" 1>&6
10192 else
10193   ac_save_LIBS="$LIBS"
10194 LIBS="-lresolv  $LIBS"
10195 cat > conftest.$ac_ext <<EOF
10196 #line 10197 "configure"
10197 #include "confdefs.h"
10198 /* Override any gcc2 internal prototype to avoid an error.  */
10199 /* We use char because int might match the return type of a gcc2
10200     builtin and then its argument prototype would still apply.  */
10201 char res_query();
10202
10203 int main() {
10204 res_query()
10205 ; return 0; }
10206 EOF
10207 if { (eval echo configure:10208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10208   rm -rf conftest*
10209   eval "ac_cv_lib_$ac_lib_var=yes"
10210 else
10211   echo "configure: failed program was:" >&5
10212   cat conftest.$ac_ext >&5
10213   rm -rf conftest*
10214   eval "ac_cv_lib_$ac_lib_var=no"
10215 fi
10216 rm -f conftest*
10217 LIBS="$ac_save_LIBS"
10218
10219 fi
10220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10221   echo "$ac_t""yes" 1>&6
10222     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10223     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10224   cat >> confdefs.h <<EOF
10225 #define $ac_tr_lib 1
10226 EOF
10227
10228   LIBS="-lresolv $LIBS"
10229
10230 else
10231   echo "$ac_t""no" 1>&6
10232 fi
10233
10234         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10235 fi
10236
10237 if test $ac_cv_func_res_query = no ; then 
10238         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10239 echo "configure:10240: checking for __res_query in -lresolv" >&5
10240 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10241 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10242   echo $ac_n "(cached) $ac_c" 1>&6
10243 else
10244   ac_save_LIBS="$LIBS"
10245 LIBS="-lresolv  $LIBS"
10246 cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249 /* Override any gcc2 internal prototype to avoid an error.  */
10250 /* We use char because int might match the return type of a gcc2
10251     builtin and then its argument prototype would still apply.  */
10252 char __res_query();
10253
10254 int main() {
10255 __res_query()
10256 ; return 0; }
10257 EOF
10258 if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10259   rm -rf conftest*
10260   eval "ac_cv_lib_$ac_lib_var=yes"
10261 else
10262   echo "configure: failed program was:" >&5
10263   cat conftest.$ac_ext >&5
10264   rm -rf conftest*
10265   eval "ac_cv_lib_$ac_lib_var=no"
10266 fi
10267 rm -f conftest*
10268 LIBS="$ac_save_LIBS"
10269
10270 fi
10271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10272   echo "$ac_t""yes" 1>&6
10273     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10274     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10275   cat >> confdefs.h <<EOF
10276 #define $ac_tr_lib 1
10277 EOF
10278
10279   LIBS="-lresolv $LIBS"
10280
10281 else
10282   echo "$ac_t""no" 1>&6
10283 fi
10284
10285         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10286 fi
10287
10288 if test "$ac_cv_func_res_query" = yes ; then
10289         cat >> confdefs.h <<\EOF
10290 #define HAVE_RES_QUERY 1
10291 EOF
10292
10293
10294         if test $ol_enable_dnssrv != no ; then
10295                 ol_link_dnssrv=yes
10296         fi
10297 fi
10298
10299 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10300         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10301 fi
10302
10303 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10304 do
10305 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10306 echo "configure:10307: checking for $ac_func" >&5
10307 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10308   echo $ac_n "(cached) $ac_c" 1>&6
10309 else
10310   cat > conftest.$ac_ext <<EOF
10311 #line 10312 "configure"
10312 #include "confdefs.h"
10313 /* System header to define __stub macros and hopefully few prototypes,
10314     which can conflict with char $ac_func(); below.  */
10315 #include <assert.h>
10316 /* Override any gcc2 internal prototype to avoid an error.  */
10317 /* We use char because int might match the return type of a gcc2
10318     builtin and then its argument prototype would still apply.  */
10319 char $ac_func();
10320 char (*f)();
10321
10322 int main() {
10323
10324 /* The GNU C library defines this for functions which it implements
10325     to always fail with ENOSYS.  Some functions are actually named
10326     something starting with __ and the normal name is an alias.  */
10327 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10328 choke me
10329 #else
10330 f = $ac_func;
10331 #endif
10332
10333 ; return 0; }
10334 EOF
10335 if { (eval echo configure:10336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10336   rm -rf conftest*
10337   eval "ac_cv_func_$ac_func=yes"
10338 else
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   eval "ac_cv_func_$ac_func=no"
10343 fi
10344 rm -f conftest*
10345 fi
10346
10347 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10348   echo "$ac_t""yes" 1>&6
10349     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10350   cat >> confdefs.h <<EOF
10351 #define $ac_tr_func 1
10352 EOF
10353  
10354 else
10355   echo "$ac_t""no" 1>&6
10356 fi
10357 done
10358
10359
10360 ol_link_ipv6=no
10361 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10362         if test $ol_enable_ipv6 = yes ; then
10363                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10364         fi
10365 elif test $ol_enable_ipv6 != no ; then
10366         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10367 echo "configure:10368: checking INET6_ADDRSTRLEN" >&5
10368 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   
10372                 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375
10376 #                       include <netinet/in.h>
10377 #                       ifdef INET6_ADDRSTRLEN
10378                                 __has_inet6_addrstrlen__;
10379 #                       endif
10380                 
10381 EOF
10382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10383   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10384   rm -rf conftest*
10385   ol_cv_inet6_addrstrlen=yes
10386 else
10387   rm -rf conftest*
10388   ol_cv_inet6_addrstrlen=no
10389 fi
10390 rm -f conftest*
10391
10392 fi
10393
10394 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10395
10396
10397         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10398 echo "configure:10399: checking struct sockaddr_storage" >&5
10399 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10400   echo $ac_n "(cached) $ac_c" 1>&6
10401 else
10402   
10403                 cat > conftest.$ac_ext <<EOF
10404 #line 10405 "configure"
10405 #include "confdefs.h"
10406
10407 #include <sys/types.h>
10408 #include <sys/socket.h>
10409
10410 int main() {
10411
10412                         struct sockaddr_storage ss;
10413
10414 ; return 0; }
10415 EOF
10416 if { (eval echo configure:10417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10417   rm -rf conftest*
10418   ol_cv_struct_sockaddr_storage=yes
10419 else
10420   echo "configure: failed program was:" >&5
10421   cat conftest.$ac_ext >&5
10422   rm -rf conftest*
10423   ol_cv_struct_sockaddr_storage=no
10424 fi
10425 rm -f conftest*
10426 fi
10427
10428 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10429
10430         if test $ol_cv_inet6_addrstrlen = yes \
10431                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10432                 ol_link_ipv6=yes
10433         elif test $ol_enable_ipv6 = yes \
10434                         -a $ol_cv_inet6_addrstrlen = no ; then
10435                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10436         elif test $ol_enable_ipv6 = yes \
10437                         -a $ol_cv_struct_sockaddr_storage = no ; then
10438                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10439         fi
10440 fi
10441
10442 if test $ol_enable_local != no ; then
10443         for ac_hdr in sys/un.h 
10444 do
10445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10447 echo "configure:10448: checking for $ac_hdr" >&5
10448 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 #include <$ac_hdr>
10455 EOF
10456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10457 { (eval echo configure:10458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10459 if test -z "$ac_err"; then
10460   rm -rf conftest*
10461   eval "ac_cv_header_$ac_safe=yes"
10462 else
10463   echo "$ac_err" >&5
10464   echo "configure: failed program was:" >&5
10465   cat conftest.$ac_ext >&5
10466   rm -rf conftest*
10467   eval "ac_cv_header_$ac_safe=no"
10468 fi
10469 rm -f conftest*
10470 fi
10471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10472   echo "$ac_t""yes" 1>&6
10473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10474   cat >> confdefs.h <<EOF
10475 #define $ac_tr_hdr 1
10476 EOF
10477  
10478 else
10479   echo "$ac_t""no" 1>&6
10480 fi
10481 done
10482
10483
10484         if test $ol_enable_local = auto ; then
10485                 ol_enable_local=$ac_cv_header_sys_un_h
10486         elif test $ac_cv_header_sys_un_h = no ; then
10487                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10488         fi
10489 fi
10490
10491 ol_link_kbind=no
10492 ol_link_krb5=no
10493 ol_link_krb4=no
10494
10495 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10496         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10497         -o $ol_with_kerberos = k425 ; then
10498
10499         for ac_hdr in krb5.h
10500 do
10501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10503 echo "configure:10504: checking for $ac_hdr" >&5
10504 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   cat > conftest.$ac_ext <<EOF
10508 #line 10509 "configure"
10509 #include "confdefs.h"
10510 #include <$ac_hdr>
10511 EOF
10512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10513 { (eval echo configure:10514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10515 if test -z "$ac_err"; then
10516   rm -rf conftest*
10517   eval "ac_cv_header_$ac_safe=yes"
10518 else
10519   echo "$ac_err" >&5
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   eval "ac_cv_header_$ac_safe=no"
10524 fi
10525 rm -f conftest*
10526 fi
10527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10528   echo "$ac_t""yes" 1>&6
10529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10530   cat >> confdefs.h <<EOF
10531 #define $ac_tr_hdr 1
10532 EOF
10533  
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537 done
10538
10539
10540         if test $ac_cv_header_krb5_h = yes ; then
10541                                 for ac_hdr in heim_err.h
10542 do
10543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10545 echo "configure:10546: checking for $ac_hdr" >&5
10546 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552 #include <$ac_hdr>
10553 EOF
10554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10555 { (eval echo configure:10556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10557 if test -z "$ac_err"; then
10558   rm -rf conftest*
10559   eval "ac_cv_header_$ac_safe=yes"
10560 else
10561   echo "$ac_err" >&5
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_header_$ac_safe=no"
10566 fi
10567 rm -f conftest*
10568 fi
10569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10572   cat >> confdefs.h <<EOF
10573 #define $ac_tr_hdr 1
10574 EOF
10575  
10576 else
10577   echo "$ac_t""no" 1>&6
10578 fi
10579 done
10580
10581                 if test $ac_cv_header_heim_err_h = yes ; then
10582                         krb5_impl=heimdal
10583                 else
10584                         krb5_impl=mit
10585                 fi
10586
10587                 if test $krb5_impl = mit; then
10588                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10589 echo "configure:10590: checking for main in -lk5crypto" >&5
10590 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   ac_save_LIBS="$LIBS"
10595 LIBS="-lk5crypto  $LIBS"
10596 cat > conftest.$ac_ext <<EOF
10597 #line 10598 "configure"
10598 #include "confdefs.h"
10599
10600 int main() {
10601 main()
10602 ; return 0; }
10603 EOF
10604 if { (eval echo configure:10605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10605   rm -rf conftest*
10606   eval "ac_cv_lib_$ac_lib_var=yes"
10607 else
10608   echo "configure: failed program was:" >&5
10609   cat conftest.$ac_ext >&5
10610   rm -rf conftest*
10611   eval "ac_cv_lib_$ac_lib_var=no"
10612 fi
10613 rm -f conftest*
10614 LIBS="$ac_save_LIBS"
10615
10616 fi
10617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10618   echo "$ac_t""yes" 1>&6
10619   krb5crypto=k5crypto
10620 else
10621   echo "$ac_t""no" 1>&6
10622 krb5crypto=crypto
10623 fi
10624
10625
10626                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10627 echo "configure:10628: checking for main in -lkrb5" >&5
10628 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10630   echo $ac_n "(cached) $ac_c" 1>&6
10631 else
10632   ac_save_LIBS="$LIBS"
10633 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10634 cat > conftest.$ac_ext <<EOF
10635 #line 10636 "configure"
10636 #include "confdefs.h"
10637
10638 int main() {
10639 main()
10640 ; return 0; }
10641 EOF
10642 if { (eval echo configure:10643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10643   rm -rf conftest*
10644   eval "ac_cv_lib_$ac_lib_var=yes"
10645 else
10646   echo "configure: failed program was:" >&5
10647   cat conftest.$ac_ext >&5
10648   rm -rf conftest*
10649   eval "ac_cv_lib_$ac_lib_var=no"
10650 fi
10651 rm -f conftest*
10652 LIBS="$ac_save_LIBS"
10653
10654 fi
10655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657   have_krb5=yes
10658                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10659 else
10660   echo "$ac_t""no" 1>&6
10661 have_krb5=no
10662 fi
10663
10664
10665                 elif test $krb5_impl = heimdal; then
10666                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10667 echo "configure:10668: checking for main in -ldes" >&5
10668 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10670   echo $ac_n "(cached) $ac_c" 1>&6
10671 else
10672   ac_save_LIBS="$LIBS"
10673 LIBS="-ldes  $LIBS"
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677
10678 int main() {
10679 main()
10680 ; return 0; }
10681 EOF
10682 if { (eval echo configure:10683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10683   rm -rf conftest*
10684   eval "ac_cv_lib_$ac_lib_var=yes"
10685 else
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -rf conftest*
10689   eval "ac_cv_lib_$ac_lib_var=no"
10690 fi
10691 rm -f conftest*
10692 LIBS="$ac_save_LIBS"
10693
10694 fi
10695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10696   echo "$ac_t""yes" 1>&6
10697   krb5crypto=des
10698 else
10699   echo "$ac_t""no" 1>&6
10700 krb5crypto=crypto
10701 fi
10702
10703
10704                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10705 echo "configure:10706: checking for main in -lkrb5" >&5
10706 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   ac_save_LIBS="$LIBS"
10711 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715
10716 int main() {
10717 main()
10718 ; return 0; }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10721   rm -rf conftest*
10722   eval "ac_cv_lib_$ac_lib_var=yes"
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   eval "ac_cv_lib_$ac_lib_var=no"
10728 fi
10729 rm -f conftest*
10730 LIBS="$ac_save_LIBS"
10731
10732 fi
10733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10734   echo "$ac_t""yes" 1>&6
10735   have_krb5=yes
10736                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10737 else
10738   echo "$ac_t""no" 1>&6
10739 have_krb5=no
10740 fi
10741
10742
10743                         cat >> confdefs.h <<\EOF
10744 #define HAVE_HEIMDAL_KERBEROS 1
10745 EOF
10746
10747
10748                 else
10749                         have_krb5=no
10750                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10751                 fi
10752
10753                 if test $have_krb5 = yes ; then
10754                         ol_link_krb5=yes
10755
10756                         cat >> confdefs.h <<\EOF
10757 #define HAVE_KRB5 1
10758 EOF
10759
10760
10761                         if test $ol_with_kerberos = k5only ; then
10762                                 ol_with_kerberos=found
10763                         fi
10764
10765                 elif test $ol_with_kerberos != auto ; then
10766                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10767                 fi
10768
10769         fi
10770 fi
10771
10772 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10773         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10774
10775         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10776 do
10777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10779 echo "configure:10780: checking for $ac_hdr" >&5
10780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   cat > conftest.$ac_ext <<EOF
10784 #line 10785 "configure"
10785 #include "confdefs.h"
10786 #include <$ac_hdr>
10787 EOF
10788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10789 { (eval echo configure:10790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10791 if test -z "$ac_err"; then
10792   rm -rf conftest*
10793   eval "ac_cv_header_$ac_safe=yes"
10794 else
10795   echo "$ac_err" >&5
10796   echo "configure: failed program was:" >&5
10797   cat conftest.$ac_ext >&5
10798   rm -rf conftest*
10799   eval "ac_cv_header_$ac_safe=no"
10800 fi
10801 rm -f conftest*
10802 fi
10803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10806   cat >> confdefs.h <<EOF
10807 #define $ac_tr_hdr 1
10808 EOF
10809  
10810 else
10811   echo "$ac_t""no" 1>&6
10812 fi
10813 done
10814
10815
10816         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10817                 if test $krb5_impl = mit; then
10818                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10819 echo "configure:10820: checking for main in -lkrb4" >&5
10820 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10821 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10822   echo $ac_n "(cached) $ac_c" 1>&6
10823 else
10824   ac_save_LIBS="$LIBS"
10825 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10826 cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829
10830 int main() {
10831 main()
10832 ; return 0; }
10833 EOF
10834 if { (eval echo configure:10835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10835   rm -rf conftest*
10836   eval "ac_cv_lib_$ac_lib_var=yes"
10837 else
10838   echo "configure: failed program was:" >&5
10839   cat conftest.$ac_ext >&5
10840   rm -rf conftest*
10841   eval "ac_cv_lib_$ac_lib_var=no"
10842 fi
10843 rm -f conftest*
10844 LIBS="$ac_save_LIBS"
10845
10846 fi
10847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10848   echo "$ac_t""yes" 1>&6
10849   have_k425=yes
10850                                 KRB4_LIBS="-lkrb4 -ldes425"
10851 else
10852   echo "$ac_t""no" 1>&6
10853 have_k425=no
10854 fi
10855
10856
10857                 elif test $krb5_impl = heimdal; then
10858                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10859 echo "configure:10860: checking for main in -lkrb4" >&5
10860 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10861 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10862   echo $ac_n "(cached) $ac_c" 1>&6
10863 else
10864   ac_save_LIBS="$LIBS"
10865 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10866 cat > conftest.$ac_ext <<EOF
10867 #line 10868 "configure"
10868 #include "confdefs.h"
10869
10870 int main() {
10871 main()
10872 ; return 0; }
10873 EOF
10874 if { (eval echo configure:10875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10875   rm -rf conftest*
10876   eval "ac_cv_lib_$ac_lib_var=yes"
10877 else
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   eval "ac_cv_lib_$ac_lib_var=no"
10882 fi
10883 rm -f conftest*
10884 LIBS="$ac_save_LIBS"
10885
10886 fi
10887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10888   echo "$ac_t""yes" 1>&6
10889   have_k425=yes
10890                                 KRB4_LIBS="-lkrb4"
10891 else
10892   echo "$ac_t""no" 1>&6
10893 have_k425=no
10894 fi
10895
10896
10897                 else
10898                         have_425=no
10899                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10900                 fi
10901
10902                 if test $have_k425 = yes ; then
10903                         ol_with_kerberos=found
10904                         ol_link_krb4=yes
10905
10906                         cat >> confdefs.h <<\EOF
10907 #define HAVE_KRB425 1
10908 EOF
10909
10910                         cat >> confdefs.h <<\EOF
10911 #define HAVE_KRB4 1
10912 EOF
10913
10914
10915                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10916 echo "configure:10917: checking for des_debug in Kerberos libraries" >&5
10917 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10918   echo $ac_n "(cached) $ac_c" 1>&6
10919 else
10920   
10921                                                                 save_LIBS="$LIBS"
10922                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10923                                 cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926
10927 #include <kerberosIV/krb.h>
10928 #include <kerberosIV/des.h>
10929 extern int des_debug;
10930
10931 int main() {
10932
10933 des_debug = 1;
10934
10935 ; return 0; }
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10938   rm -rf conftest*
10939   ol_cv_var_des_debug=yes
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -rf conftest*
10944   ol_cv_var_des_debug=no
10945 fi
10946 rm -f conftest*
10947                                                                 LIBS="$save_LIBS"
10948                         
10949 fi
10950
10951 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10952
10953                         if test $ol_cv_var_des_debug = yes ; then
10954                                 cat >> confdefs.h <<\EOF
10955 #define HAVE_DES_DEBUG 1
10956 EOF
10957
10958                         fi
10959
10960                         LIBS="$save_LIBS"
10961                 fi
10962         fi
10963 fi
10964
10965 if test $ol_link_krb5 = yes ; then
10966         ol_with_kerberos=found
10967 fi
10968
10969 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10970         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10971
10972         for ac_hdr in krb.h des.h krb-archaeology.h 
10973 do
10974 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10975 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10976 echo "configure:10977: checking for $ac_hdr" >&5
10977 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10978   echo $ac_n "(cached) $ac_c" 1>&6
10979 else
10980   cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 #include <$ac_hdr>
10984 EOF
10985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10986 { (eval echo configure:10987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10988 if test -z "$ac_err"; then
10989   rm -rf conftest*
10990   eval "ac_cv_header_$ac_safe=yes"
10991 else
10992   echo "$ac_err" >&5
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -rf conftest*
10996   eval "ac_cv_header_$ac_safe=no"
10997 fi
10998 rm -f conftest*
10999 fi
11000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11001   echo "$ac_t""yes" 1>&6
11002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11003   cat >> confdefs.h <<EOF
11004 #define $ac_tr_hdr 1
11005 EOF
11006  
11007 else
11008   echo "$ac_t""no" 1>&6
11009 fi
11010 done
11011
11012
11013         if test $ac_cv_header_krb_h = yes ; then
11014                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11015 echo "configure:11016: checking for main in -lkrb" >&5
11016 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11018   echo $ac_n "(cached) $ac_c" 1>&6
11019 else
11020   ac_save_LIBS="$LIBS"
11021 LIBS="-lkrb -ldes $LIBS"
11022 cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025
11026 int main() {
11027 main()
11028 ; return 0; }
11029 EOF
11030 if { (eval echo configure:11031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11031   rm -rf conftest*
11032   eval "ac_cv_lib_$ac_lib_var=yes"
11033 else
11034   echo "configure: failed program was:" >&5
11035   cat conftest.$ac_ext >&5
11036   rm -rf conftest*
11037   eval "ac_cv_lib_$ac_lib_var=no"
11038 fi
11039 rm -f conftest*
11040 LIBS="$ac_save_LIBS"
11041
11042 fi
11043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11044   echo "$ac_t""yes" 1>&6
11045   have_k4=yes
11046 else
11047   echo "$ac_t""no" 1>&6
11048 have_k4=no
11049 fi
11050
11051
11052                 if test $have_k4 = yes ; then
11053                         ol_with_kerberos=found
11054                         ol_link_krb4=yes
11055
11056                         cat >> confdefs.h <<\EOF
11057 #define HAVE_KRB4 1
11058 EOF
11059
11060
11061                         KRB4_LIBS="-lkrb -ldes"
11062
11063                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11064                                 cat >> confdefs.h <<\EOF
11065 #define HAVE_KTH_KERBEROS 1
11066 EOF
11067
11068                         fi
11069                 fi
11070         fi
11071 fi
11072
11073 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11074         ol_link_kbind=yes
11075
11076 elif test $ol_enable_kbind = yes ; then
11077         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11078 fi
11079
11080 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11081         cat >> confdefs.h <<\EOF
11082 #define HAVE_KERBEROS 1
11083 EOF
11084
11085
11086 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11087         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11088 fi
11089
11090 ol_link_tls=no
11091 if test $ol_with_tls != no ; then
11092         for ac_hdr in openssl/ssl.h ssl.h
11093 do
11094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11096 echo "configure:11097: checking for $ac_hdr" >&5
11097 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11098   echo $ac_n "(cached) $ac_c" 1>&6
11099 else
11100   cat > conftest.$ac_ext <<EOF
11101 #line 11102 "configure"
11102 #include "confdefs.h"
11103 #include <$ac_hdr>
11104 EOF
11105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11106 { (eval echo configure:11107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11108 if test -z "$ac_err"; then
11109   rm -rf conftest*
11110   eval "ac_cv_header_$ac_safe=yes"
11111 else
11112   echo "$ac_err" >&5
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -rf conftest*
11116   eval "ac_cv_header_$ac_safe=no"
11117 fi
11118 rm -f conftest*
11119 fi
11120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11121   echo "$ac_t""yes" 1>&6
11122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11123   cat >> confdefs.h <<EOF
11124 #define $ac_tr_hdr 1
11125 EOF
11126  
11127 else
11128   echo "$ac_t""no" 1>&6
11129 fi
11130 done
11131
11132         
11133         if test $ac_cv_header_openssl_ssl_h = yes \
11134                 -o $ac_cv_header_ssl_h = yes ; then
11135                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11136 echo "configure:11137: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11137 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11138 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11139   echo $ac_n "(cached) $ac_c" 1>&6
11140 else
11141   ac_save_LIBS="$LIBS"
11142 LIBS="-lssl -lcrypto $LIBS"
11143 cat > conftest.$ac_ext <<EOF
11144 #line 11145 "configure"
11145 #include "confdefs.h"
11146 /* Override any gcc2 internal prototype to avoid an error.  */
11147 /* We use char because int might match the return type of a gcc2
11148     builtin and then its argument prototype would still apply.  */
11149 char SSLeay_add_ssl_algorithms();
11150
11151 int main() {
11152 SSLeay_add_ssl_algorithms()
11153 ; return 0; }
11154 EOF
11155 if { (eval echo configure:11156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11156   rm -rf conftest*
11157   eval "ac_cv_lib_$ac_lib_var=yes"
11158 else
11159   echo "configure: failed program was:" >&5
11160   cat conftest.$ac_ext >&5
11161   rm -rf conftest*
11162   eval "ac_cv_lib_$ac_lib_var=no"
11163 fi
11164 rm -f conftest*
11165 LIBS="$ac_save_LIBS"
11166
11167 fi
11168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11169   echo "$ac_t""yes" 1>&6
11170   have_ssleay=yes
11171                         need_rsaref=no
11172 else
11173   echo "$ac_t""no" 1>&6
11174 have_ssleay=no
11175 fi
11176
11177                         
11178                 if test $have_ssleay = no ; then
11179                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11180 echo "configure:11181: checking for SSL_library_init in -lssl" >&5
11181 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11183   echo $ac_n "(cached) $ac_c" 1>&6
11184 else
11185   ac_save_LIBS="$LIBS"
11186 LIBS="-lssl -lcrypto $LIBS"
11187 cat > conftest.$ac_ext <<EOF
11188 #line 11189 "configure"
11189 #include "confdefs.h"
11190 /* Override any gcc2 internal prototype to avoid an error.  */
11191 /* We use char because int might match the return type of a gcc2
11192     builtin and then its argument prototype would still apply.  */
11193 char SSL_library_init();
11194
11195 int main() {
11196 SSL_library_init()
11197 ; return 0; }
11198 EOF
11199 if { (eval echo configure:11200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11200   rm -rf conftest*
11201   eval "ac_cv_lib_$ac_lib_var=yes"
11202 else
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   eval "ac_cv_lib_$ac_lib_var=no"
11207 fi
11208 rm -f conftest*
11209 LIBS="$ac_save_LIBS"
11210
11211 fi
11212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11213   echo "$ac_t""yes" 1>&6
11214   have_ssleay=yes
11215                                 need_rsaref=no
11216 else
11217   echo "$ac_t""no" 1>&6
11218 have_ssleay=no
11219 fi
11220
11221                 fi
11222
11223                 if test $have_ssleay = no ; then
11224                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11225 echo "configure:11226: checking for ssl3_accept in -lssl" >&5
11226 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11228   echo $ac_n "(cached) $ac_c" 1>&6
11229 else
11230   ac_save_LIBS="$LIBS"
11231 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11232 cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 /* Override any gcc2 internal prototype to avoid an error.  */
11236 /* We use char because int might match the return type of a gcc2
11237     builtin and then its argument prototype would still apply.  */
11238 char ssl3_accept();
11239
11240 int main() {
11241 ssl3_accept()
11242 ; return 0; }
11243 EOF
11244 if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11245   rm -rf conftest*
11246   eval "ac_cv_lib_$ac_lib_var=yes"
11247 else
11248   echo "configure: failed program was:" >&5
11249   cat conftest.$ac_ext >&5
11250   rm -rf conftest*
11251   eval "ac_cv_lib_$ac_lib_var=no"
11252 fi
11253 rm -f conftest*
11254 LIBS="$ac_save_LIBS"
11255
11256 fi
11257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11258   echo "$ac_t""yes" 1>&6
11259   have_ssleay=yes
11260                                 need_rsaref=yes
11261 else
11262   echo "$ac_t""no" 1>&6
11263 have_ssleay=no
11264 fi
11265
11266                 fi
11267
11268                 if test $have_ssleay = yes ; then
11269                         ol_with_tls=found
11270                         ol_link_tls=yes
11271
11272                         cat >> confdefs.h <<\EOF
11273 #define HAVE_SSLEAY 1
11274 EOF
11275
11276
11277                         if test $need_rsaref = yes; then
11278                                 cat >> confdefs.h <<\EOF
11279 #define HAVE_RSAREF 1
11280 EOF
11281
11282
11283                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11284                         else
11285                                 TLS_LIBS="-lssl -lcrypto"
11286                         fi
11287                 fi
11288         fi
11289
11290 else
11291         echo "configure: warning: TLS data protection not supported!" 1>&2
11292 fi
11293
11294 WITH_TLS=no
11295 if test $ol_link_tls = yes ; then
11296         cat >> confdefs.h <<\EOF
11297 #define HAVE_TLS 1
11298 EOF
11299
11300         WITH_TLS=yes
11301
11302 elif test $ol_with_tls = auto ; then
11303         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11304         echo "configure: warning: TLS data protection not supported!" 1>&2
11305
11306 elif test $ol_with_tls != no ; then
11307         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11308 fi
11309
11310 if test $ol_enable_lmpasswd != no; then
11311         if test $ol_link_tls != yes ; then
11312                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11313         fi
11314
11315         cat >> confdefs.h <<\EOF
11316 #define SLAPD_LMHASH 1
11317 EOF
11318
11319 fi
11320
11321 ol_link_threads=no
11322
11323 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11324         -o $ol_with_threads = nt ; then
11325
11326         
11327         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11328 echo "configure:11329: checking for _beginthread" >&5
11329 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11330   echo $ac_n "(cached) $ac_c" 1>&6
11331 else
11332   cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335 /* System header to define __stub macros and hopefully few prototypes,
11336     which can conflict with char _beginthread(); below.  */
11337 #include <assert.h>
11338 /* Override any gcc2 internal prototype to avoid an error.  */
11339 /* We use char because int might match the return type of a gcc2
11340     builtin and then its argument prototype would still apply.  */
11341 char _beginthread();
11342 char (*f)();
11343
11344 int main() {
11345
11346 /* The GNU C library defines this for functions which it implements
11347     to always fail with ENOSYS.  Some functions are actually named
11348     something starting with __ and the normal name is an alias.  */
11349 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11350 choke me
11351 #else
11352 f = _beginthread;
11353 #endif
11354
11355 ; return 0; }
11356 EOF
11357 if { (eval echo configure:11358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11358   rm -rf conftest*
11359   eval "ac_cv_func__beginthread=yes"
11360 else
11361   echo "configure: failed program was:" >&5
11362   cat conftest.$ac_ext >&5
11363   rm -rf conftest*
11364   eval "ac_cv_func__beginthread=no"
11365 fi
11366 rm -f conftest*
11367 fi
11368
11369 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11370   echo "$ac_t""yes" 1>&6
11371   :
11372 else
11373   echo "$ac_t""no" 1>&6
11374 fi
11375
11376
11377         if test $ac_cv_func__beginthread = yes ; then
11378                 cat >> confdefs.h <<\EOF
11379 #define HAVE_NT_THREADS 1
11380 EOF
11381
11382                 ol_cv_nt_threads=yes
11383         fi
11384
11385
11386         if test "$ol_cv_nt_threads" = yes ; then
11387                 ol_link_threads=nt
11388                 ol_with_threads=found
11389                 ol_with_yielding_select=yes
11390
11391                 cat >> confdefs.h <<\EOF
11392 #define HAVE_NT_SERVICE_MANAGER 1
11393 EOF
11394
11395                 cat >> confdefs.h <<\EOF
11396 #define HAVE_NT_EVENT_LOG 1
11397 EOF
11398
11399         fi
11400
11401         if test $ol_with_threads = nt ; then
11402                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11403         fi
11404 fi
11405
11406 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11407         -o $ol_with_threads = posix ; then
11408
11409         for ac_hdr in pthread.h
11410 do
11411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11413 echo "configure:11414: checking for $ac_hdr" >&5
11414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11415   echo $ac_n "(cached) $ac_c" 1>&6
11416 else
11417   cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420 #include <$ac_hdr>
11421 EOF
11422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11423 { (eval echo configure:11424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11425 if test -z "$ac_err"; then
11426   rm -rf conftest*
11427   eval "ac_cv_header_$ac_safe=yes"
11428 else
11429   echo "$ac_err" >&5
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   eval "ac_cv_header_$ac_safe=no"
11434 fi
11435 rm -f conftest*
11436 fi
11437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11438   echo "$ac_t""yes" 1>&6
11439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11440   cat >> confdefs.h <<EOF
11441 #define $ac_tr_hdr 1
11442 EOF
11443  
11444 else
11445   echo "$ac_t""no" 1>&6
11446 fi
11447 done
11448
11449
11450         if test $ac_cv_header_pthread_h = yes ; then
11451                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11452 echo "configure:11453: checking POSIX thread version" >&5
11453 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11454   echo $ac_n "(cached) $ac_c" 1>&6
11455 else
11456   
11457         cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460
11461 #               include <pthread.h>
11462         
11463 int main() {
11464
11465                 int i = PTHREAD_CREATE_JOINABLE;
11466         
11467 ; return 0; }
11468 EOF
11469 if { (eval echo configure:11470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11470   rm -rf conftest*
11471   
11472         cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475 #include <pthread.h>
11476 EOF
11477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11478   egrep "pthread_detach" >/dev/null 2>&1; then
11479   rm -rf conftest*
11480   ol_cv_pthread_version=10
11481 else
11482   rm -rf conftest*
11483   ol_cv_pthread_version=8
11484 fi
11485 rm -f conftest*
11486
11487 else
11488   echo "configure: failed program was:" >&5
11489   cat conftest.$ac_ext >&5
11490   rm -rf conftest*
11491   
11492         cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495
11496 #               include <pthread.h>
11497 #               ifdef PTHREAD_CREATE_UNDETACHED
11498                 draft7
11499 #               endif
11500         
11501 EOF
11502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11503   egrep "draft7" >/dev/null 2>&1; then
11504   rm -rf conftest*
11505   ol_cv_pthread_version=7
11506 else
11507   rm -rf conftest*
11508   
11509         cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 #include <pthread.h>
11513 EOF
11514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11515   egrep "pthread_attr_init" >/dev/null 2>&1; then
11516   rm -rf conftest*
11517   ol_cv_pthread_version=6
11518 else
11519   rm -rf conftest*
11520   
11521         cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524
11525 #               include <pthread.h>
11526 #ifdef          PTHREAD_MUTEX_INITIALIZER
11527                 draft5
11528 #endif
11529         
11530 EOF
11531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11532   egrep "draft5" >/dev/null 2>&1; then
11533   rm -rf conftest*
11534   ol_cv_pthread_version=5
11535 else
11536   rm -rf conftest*
11537   ol_cv_pthread_version=4
11538 fi
11539 rm -f conftest*
11540  
11541 fi
11542 rm -f conftest*
11543  
11544 fi
11545 rm -f conftest*
11546  
11547 fi
11548 rm -f conftest*
11549
11550 fi
11551
11552 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11553
11554
11555                 if test $ol_cv_pthread_version != 0 ; then
11556                         cat >> confdefs.h <<EOF
11557 #define HAVE_PTHREADS $ol_cv_pthread_version
11558 EOF
11559
11560                 else
11561                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11562                 fi
11563
11564                 # consider threads found
11565                 ol_with_threads=found
11566
11567                 
11568         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11569 echo "configure:11570: checking for LinuxThreads pthread.h" >&5
11570 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11571   echo $ac_n "(cached) $ac_c" 1>&6
11572 else
11573   cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 #include <pthread.h>
11577 EOF
11578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11579   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11580   rm -rf conftest*
11581   ol_cv_header_linux_threads=yes
11582 else
11583   rm -rf conftest*
11584   ol_cv_header_linux_threads=no
11585 fi
11586 rm -f conftest*
11587
11588                 
11589 fi
11590
11591 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11592         if test $ol_cv_header_linux_threads = yes; then
11593                 cat >> confdefs.h <<\EOF
11594 #define HAVE_LINUX_THREADS 1
11595 EOF
11596
11597         fi
11598
11599                 
11600         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11601 echo "configure:11602: checking for GNU Pth pthread.h" >&5
11602 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11603   echo $ac_n "(cached) $ac_c" 1>&6
11604 else
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 #include <pthread.h>
11609 #ifdef _POSIX_THREAD_IS_GNU_PTH
11610         __gnu_pth__;
11611 #endif
11612
11613 EOF
11614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11615   egrep "__gnu_pth__" >/dev/null 2>&1; then
11616   rm -rf conftest*
11617   ol_cv_header_gnu_pth_pthread_h=yes
11618 else
11619   rm -rf conftest*
11620   ol_cv_header_gnu_pth_pthread_h=no
11621 fi
11622 rm -f conftest*
11623
11624                 
11625 fi
11626
11627 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11628
11629
11630                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11631                         for ac_hdr in sched.h
11632 do
11633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11635 echo "configure:11636: checking for $ac_hdr" >&5
11636 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11637   echo $ac_n "(cached) $ac_c" 1>&6
11638 else
11639   cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642 #include <$ac_hdr>
11643 EOF
11644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11645 { (eval echo configure:11646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11647 if test -z "$ac_err"; then
11648   rm -rf conftest*
11649   eval "ac_cv_header_$ac_safe=yes"
11650 else
11651   echo "$ac_err" >&5
11652   echo "configure: failed program was:" >&5
11653   cat conftest.$ac_ext >&5
11654   rm -rf conftest*
11655   eval "ac_cv_header_$ac_safe=no"
11656 fi
11657 rm -f conftest*
11658 fi
11659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11660   echo "$ac_t""yes" 1>&6
11661     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11662   cat >> confdefs.h <<EOF
11663 #define $ac_tr_hdr 1
11664 EOF
11665  
11666 else
11667   echo "$ac_t""no" 1>&6
11668 fi
11669 done
11670
11671                 fi
11672
11673                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11674                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11675 echo "configure:11676: checking for pthread_create in default libraries" >&5
11676 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11677   echo $ac_n "(cached) $ac_c" 1>&6
11678 else
11679   
11680                 if test "$cross_compiling" = yes; then
11681   cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684 /* pthread test headers */
11685 #include <pthread.h>
11686 #if HAVE_PTHREADS < 7
11687 #include <errno.h>
11688 #endif
11689 #ifndef NULL
11690 #define NULL (void*)0
11691 #endif
11692
11693 static void *task(p)
11694         void *p;
11695 {
11696         return (void *) (p == NULL);
11697 }
11698
11699 int main() {
11700
11701         /* pthread test function */
11702 #ifndef PTHREAD_CREATE_DETACHED
11703 #define PTHREAD_CREATE_DETACHED 1
11704 #endif
11705         pthread_t t;
11706         int status;
11707         int detach = PTHREAD_CREATE_DETACHED;
11708
11709 #if HAVE_PTHREADS > 4
11710         /* Final pthreads */
11711         pthread_attr_t attr;
11712
11713         status = pthread_attr_init(&attr);
11714         if( status ) return status;
11715
11716 #if HAVE_PTHREADS < 7
11717         status = pthread_attr_setdetachstate(&attr, &detach);
11718         if( status < 0 ) status = errno;
11719 #else
11720         status = pthread_attr_setdetachstate(&attr, detach);
11721 #endif
11722         if( status ) return status;
11723         status = pthread_create( &t, &attr, task, NULL );
11724 #if HAVE_PTHREADS < 7
11725         if( status < 0 ) status = errno;
11726 #endif
11727         if( status ) return status;
11728 #else
11729         /* Draft 4 pthreads */
11730         status = pthread_create( &t, pthread_attr_default, task, NULL );
11731         if( status ) return errno;
11732
11733         /* give thread a chance to complete */
11734         /* it should remain joinable and hence detachable */
11735         sleep( 1 );
11736
11737         status = pthread_detach( &t );
11738         if( status ) return errno;
11739 #endif
11740
11741 #ifdef HAVE_LINUX_THREADS
11742         pthread_kill_other_threads_np();
11743 #endif
11744
11745         return 0;
11746
11747 ; return 0; }
11748 EOF
11749 if { (eval echo configure:11750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11750   rm -rf conftest*
11751   ol_cv_pthread_create=yes
11752 else
11753   echo "configure: failed program was:" >&5
11754   cat conftest.$ac_ext >&5
11755   rm -rf conftest*
11756   ol_cv_pthread_create=no
11757 fi
11758 rm -f conftest*
11759 else
11760   cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763 /* pthread test headers */
11764 #include <pthread.h>
11765 #if HAVE_PTHREADS < 7
11766 #include <errno.h>
11767 #endif
11768 #ifndef NULL
11769 #define NULL (void*)0
11770 #endif
11771
11772 static void *task(p)
11773         void *p;
11774 {
11775         return (void *) (p == NULL);
11776 }
11777
11778
11779 int main(argc, argv)
11780         int argc;
11781         char **argv;
11782 {
11783
11784         /* pthread test function */
11785 #ifndef PTHREAD_CREATE_DETACHED
11786 #define PTHREAD_CREATE_DETACHED 1
11787 #endif
11788         pthread_t t;
11789         int status;
11790         int detach = PTHREAD_CREATE_DETACHED;
11791
11792 #if HAVE_PTHREADS > 4
11793         /* Final pthreads */
11794         pthread_attr_t attr;
11795
11796         status = pthread_attr_init(&attr);
11797         if( status ) return status;
11798
11799 #if HAVE_PTHREADS < 7
11800         status = pthread_attr_setdetachstate(&attr, &detach);
11801         if( status < 0 ) status = errno;
11802 #else
11803         status = pthread_attr_setdetachstate(&attr, detach);
11804 #endif
11805         if( status ) return status;
11806         status = pthread_create( &t, &attr, task, NULL );
11807 #if HAVE_PTHREADS < 7
11808         if( status < 0 ) status = errno;
11809 #endif
11810         if( status ) return status;
11811 #else
11812         /* Draft 4 pthreads */
11813         status = pthread_create( &t, pthread_attr_default, task, NULL );
11814         if( status ) return errno;
11815
11816         /* give thread a chance to complete */
11817         /* it should remain joinable and hence detachable */
11818         sleep( 1 );
11819
11820         status = pthread_detach( &t );
11821         if( status ) return errno;
11822 #endif
11823
11824 #ifdef HAVE_LINUX_THREADS
11825         pthread_kill_other_threads_np();
11826 #endif
11827
11828         return 0;
11829
11830 }
11831
11832 EOF
11833 if { (eval echo configure:11834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11834 then
11835   ol_cv_pthread_create=yes
11836 else
11837   echo "configure: failed program was:" >&5
11838   cat conftest.$ac_ext >&5
11839   rm -fr conftest*
11840   ol_cv_pthread_create=no
11841 fi
11842 rm -fr conftest*
11843 fi
11844
11845 fi
11846
11847 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11848
11849                 if test $ol_cv_pthread_create != no ; then
11850                         ol_link_threads=posix
11851                         ol_link_pthreads=""
11852                 fi
11853                 
11854                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11855 if test "$ol_link_threads" = no ; then
11856         # try -kthread
11857         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11858 echo "configure:11859: checking for pthread link with -kthread" >&5
11859 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11860   echo $ac_n "(cached) $ac_c" 1>&6
11861 else
11862   
11863                 # save the flags
11864                 ol_LIBS="$LIBS"
11865                 LIBS="-kthread $LIBS"
11866
11867                 if test "$cross_compiling" = yes; then
11868   cat > conftest.$ac_ext <<EOF
11869 #line 11870 "configure"
11870 #include "confdefs.h"
11871 /* pthread test headers */
11872 #include <pthread.h>
11873 #if HAVE_PTHREADS < 7
11874 #include <errno.h>
11875 #endif
11876 #ifndef NULL
11877 #define NULL (void*)0
11878 #endif
11879
11880 static void *task(p)
11881         void *p;
11882 {
11883         return (void *) (p == NULL);
11884 }
11885
11886 int main() {
11887
11888         /* pthread test function */
11889 #ifndef PTHREAD_CREATE_DETACHED
11890 #define PTHREAD_CREATE_DETACHED 1
11891 #endif
11892         pthread_t t;
11893         int status;
11894         int detach = PTHREAD_CREATE_DETACHED;
11895
11896 #if HAVE_PTHREADS > 4
11897         /* Final pthreads */
11898         pthread_attr_t attr;
11899
11900         status = pthread_attr_init(&attr);
11901         if( status ) return status;
11902
11903 #if HAVE_PTHREADS < 7
11904         status = pthread_attr_setdetachstate(&attr, &detach);
11905         if( status < 0 ) status = errno;
11906 #else
11907         status = pthread_attr_setdetachstate(&attr, detach);
11908 #endif
11909         if( status ) return status;
11910         status = pthread_create( &t, &attr, task, NULL );
11911 #if HAVE_PTHREADS < 7
11912         if( status < 0 ) status = errno;
11913 #endif
11914         if( status ) return status;
11915 #else
11916         /* Draft 4 pthreads */
11917         status = pthread_create( &t, pthread_attr_default, task, NULL );
11918         if( status ) return errno;
11919
11920         /* give thread a chance to complete */
11921         /* it should remain joinable and hence detachable */
11922         sleep( 1 );
11923
11924         status = pthread_detach( &t );
11925         if( status ) return errno;
11926 #endif
11927
11928 #ifdef HAVE_LINUX_THREADS
11929         pthread_kill_other_threads_np();
11930 #endif
11931
11932         return 0;
11933
11934 ; return 0; }
11935 EOF
11936 if { (eval echo configure:11937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11937   rm -rf conftest*
11938   ol_cv_pthread_kthread=yes
11939 else
11940   echo "configure: failed program was:" >&5
11941   cat conftest.$ac_ext >&5
11942   rm -rf conftest*
11943   ol_cv_pthread_kthread=no
11944 fi
11945 rm -f conftest*
11946 else
11947   cat > conftest.$ac_ext <<EOF
11948 #line 11949 "configure"
11949 #include "confdefs.h"
11950 /* pthread test headers */
11951 #include <pthread.h>
11952 #if HAVE_PTHREADS < 7
11953 #include <errno.h>
11954 #endif
11955 #ifndef NULL
11956 #define NULL (void*)0
11957 #endif
11958
11959 static void *task(p)
11960         void *p;
11961 {
11962         return (void *) (p == NULL);
11963 }
11964
11965
11966 int main(argc, argv)
11967         int argc;
11968         char **argv;
11969 {
11970
11971         /* pthread test function */
11972 #ifndef PTHREAD_CREATE_DETACHED
11973 #define PTHREAD_CREATE_DETACHED 1
11974 #endif
11975         pthread_t t;
11976         int status;
11977         int detach = PTHREAD_CREATE_DETACHED;
11978
11979 #if HAVE_PTHREADS > 4
11980         /* Final pthreads */
11981         pthread_attr_t attr;
11982
11983         status = pthread_attr_init(&attr);
11984         if( status ) return status;
11985
11986 #if HAVE_PTHREADS < 7
11987         status = pthread_attr_setdetachstate(&attr, &detach);
11988         if( status < 0 ) status = errno;
11989 #else
11990         status = pthread_attr_setdetachstate(&attr, detach);
11991 #endif
11992         if( status ) return status;
11993         status = pthread_create( &t, &attr, task, NULL );
11994 #if HAVE_PTHREADS < 7
11995         if( status < 0 ) status = errno;
11996 #endif
11997         if( status ) return status;
11998 #else
11999         /* Draft 4 pthreads */
12000         status = pthread_create( &t, pthread_attr_default, task, NULL );
12001         if( status ) return errno;
12002
12003         /* give thread a chance to complete */
12004         /* it should remain joinable and hence detachable */
12005         sleep( 1 );
12006
12007         status = pthread_detach( &t );
12008         if( status ) return errno;
12009 #endif
12010
12011 #ifdef HAVE_LINUX_THREADS
12012         pthread_kill_other_threads_np();
12013 #endif
12014
12015         return 0;
12016
12017 }
12018
12019 EOF
12020 if { (eval echo configure:12021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12021 then
12022   ol_cv_pthread_kthread=yes
12023 else
12024   echo "configure: failed program was:" >&5
12025   cat conftest.$ac_ext >&5
12026   rm -fr conftest*
12027   ol_cv_pthread_kthread=no
12028 fi
12029 rm -fr conftest*
12030 fi
12031
12032
12033                 # restore the LIBS
12034                 LIBS="$ol_LIBS"
12035         
12036 fi
12037
12038 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12039
12040         if test $ol_cv_pthread_kthread = yes ; then
12041                 ol_link_pthreads="-kthread"
12042                 ol_link_threads=posix
12043         fi
12044 fi
12045
12046                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12047 if test "$ol_link_threads" = no ; then
12048         # try -pthread
12049         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12050 echo "configure:12051: checking for pthread link with -pthread" >&5
12051 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12052   echo $ac_n "(cached) $ac_c" 1>&6
12053 else
12054   
12055                 # save the flags
12056                 ol_LIBS="$LIBS"
12057                 LIBS="-pthread $LIBS"
12058
12059                 if test "$cross_compiling" = yes; then
12060   cat > conftest.$ac_ext <<EOF
12061 #line 12062 "configure"
12062 #include "confdefs.h"
12063 /* pthread test headers */
12064 #include <pthread.h>
12065 #if HAVE_PTHREADS < 7
12066 #include <errno.h>
12067 #endif
12068 #ifndef NULL
12069 #define NULL (void*)0
12070 #endif
12071
12072 static void *task(p)
12073         void *p;
12074 {
12075         return (void *) (p == NULL);
12076 }
12077
12078 int main() {
12079
12080         /* pthread test function */
12081 #ifndef PTHREAD_CREATE_DETACHED
12082 #define PTHREAD_CREATE_DETACHED 1
12083 #endif
12084         pthread_t t;
12085         int status;
12086         int detach = PTHREAD_CREATE_DETACHED;
12087
12088 #if HAVE_PTHREADS > 4
12089         /* Final pthreads */
12090         pthread_attr_t attr;
12091
12092         status = pthread_attr_init(&attr);
12093         if( status ) return status;
12094
12095 #if HAVE_PTHREADS < 7
12096         status = pthread_attr_setdetachstate(&attr, &detach);
12097         if( status < 0 ) status = errno;
12098 #else
12099         status = pthread_attr_setdetachstate(&attr, detach);
12100 #endif
12101         if( status ) return status;
12102         status = pthread_create( &t, &attr, task, NULL );
12103 #if HAVE_PTHREADS < 7
12104         if( status < 0 ) status = errno;
12105 #endif
12106         if( status ) return status;
12107 #else
12108         /* Draft 4 pthreads */
12109         status = pthread_create( &t, pthread_attr_default, task, NULL );
12110         if( status ) return errno;
12111
12112         /* give thread a chance to complete */
12113         /* it should remain joinable and hence detachable */
12114         sleep( 1 );
12115
12116         status = pthread_detach( &t );
12117         if( status ) return errno;
12118 #endif
12119
12120 #ifdef HAVE_LINUX_THREADS
12121         pthread_kill_other_threads_np();
12122 #endif
12123
12124         return 0;
12125
12126 ; return 0; }
12127 EOF
12128 if { (eval echo configure:12129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12129   rm -rf conftest*
12130   ol_cv_pthread_pthread=yes
12131 else
12132   echo "configure: failed program was:" >&5
12133   cat conftest.$ac_ext >&5
12134   rm -rf conftest*
12135   ol_cv_pthread_pthread=no
12136 fi
12137 rm -f conftest*
12138 else
12139   cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 /* pthread test headers */
12143 #include <pthread.h>
12144 #if HAVE_PTHREADS < 7
12145 #include <errno.h>
12146 #endif
12147 #ifndef NULL
12148 #define NULL (void*)0
12149 #endif
12150
12151 static void *task(p)
12152         void *p;
12153 {
12154         return (void *) (p == NULL);
12155 }
12156
12157
12158 int main(argc, argv)
12159         int argc;
12160         char **argv;
12161 {
12162
12163         /* pthread test function */
12164 #ifndef PTHREAD_CREATE_DETACHED
12165 #define PTHREAD_CREATE_DETACHED 1
12166 #endif
12167         pthread_t t;
12168         int status;
12169         int detach = PTHREAD_CREATE_DETACHED;
12170
12171 #if HAVE_PTHREADS > 4
12172         /* Final pthreads */
12173         pthread_attr_t attr;
12174
12175         status = pthread_attr_init(&attr);
12176         if( status ) return status;
12177
12178 #if HAVE_PTHREADS < 7
12179         status = pthread_attr_setdetachstate(&attr, &detach);
12180         if( status < 0 ) status = errno;
12181 #else
12182         status = pthread_attr_setdetachstate(&attr, detach);
12183 #endif
12184         if( status ) return status;
12185         status = pthread_create( &t, &attr, task, NULL );
12186 #if HAVE_PTHREADS < 7
12187         if( status < 0 ) status = errno;
12188 #endif
12189         if( status ) return status;
12190 #else
12191         /* Draft 4 pthreads */
12192         status = pthread_create( &t, pthread_attr_default, task, NULL );
12193         if( status ) return errno;
12194
12195         /* give thread a chance to complete */
12196         /* it should remain joinable and hence detachable */
12197         sleep( 1 );
12198
12199         status = pthread_detach( &t );
12200         if( status ) return errno;
12201 #endif
12202
12203 #ifdef HAVE_LINUX_THREADS
12204         pthread_kill_other_threads_np();
12205 #endif
12206
12207         return 0;
12208
12209 }
12210
12211 EOF
12212 if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12213 then
12214   ol_cv_pthread_pthread=yes
12215 else
12216   echo "configure: failed program was:" >&5
12217   cat conftest.$ac_ext >&5
12218   rm -fr conftest*
12219   ol_cv_pthread_pthread=no
12220 fi
12221 rm -fr conftest*
12222 fi
12223
12224
12225                 # restore the LIBS
12226                 LIBS="$ol_LIBS"
12227         
12228 fi
12229
12230 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12231
12232         if test $ol_cv_pthread_pthread = yes ; then
12233                 ol_link_pthreads="-pthread"
12234                 ol_link_threads=posix
12235         fi
12236 fi
12237
12238                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12239 if test "$ol_link_threads" = no ; then
12240         # try -pthreads
12241         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12242 echo "configure:12243: checking for pthread link with -pthreads" >&5
12243 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12244   echo $ac_n "(cached) $ac_c" 1>&6
12245 else
12246   
12247                 # save the flags
12248                 ol_LIBS="$LIBS"
12249                 LIBS="-pthreads $LIBS"
12250
12251                 if test "$cross_compiling" = yes; then
12252   cat > conftest.$ac_ext <<EOF
12253 #line 12254 "configure"
12254 #include "confdefs.h"
12255 /* pthread test headers */
12256 #include <pthread.h>
12257 #if HAVE_PTHREADS < 7
12258 #include <errno.h>
12259 #endif
12260 #ifndef NULL
12261 #define NULL (void*)0
12262 #endif
12263
12264 static void *task(p)
12265         void *p;
12266 {
12267         return (void *) (p == NULL);
12268 }
12269
12270 int main() {
12271
12272         /* pthread test function */
12273 #ifndef PTHREAD_CREATE_DETACHED
12274 #define PTHREAD_CREATE_DETACHED 1
12275 #endif
12276         pthread_t t;
12277         int status;
12278         int detach = PTHREAD_CREATE_DETACHED;
12279
12280 #if HAVE_PTHREADS > 4
12281         /* Final pthreads */
12282         pthread_attr_t attr;
12283
12284         status = pthread_attr_init(&attr);
12285         if( status ) return status;
12286
12287 #if HAVE_PTHREADS < 7
12288         status = pthread_attr_setdetachstate(&attr, &detach);
12289         if( status < 0 ) status = errno;
12290 #else
12291         status = pthread_attr_setdetachstate(&attr, detach);
12292 #endif
12293         if( status ) return status;
12294         status = pthread_create( &t, &attr, task, NULL );
12295 #if HAVE_PTHREADS < 7
12296         if( status < 0 ) status = errno;
12297 #endif
12298         if( status ) return status;
12299 #else
12300         /* Draft 4 pthreads */
12301         status = pthread_create( &t, pthread_attr_default, task, NULL );
12302         if( status ) return errno;
12303
12304         /* give thread a chance to complete */
12305         /* it should remain joinable and hence detachable */
12306         sleep( 1 );
12307
12308         status = pthread_detach( &t );
12309         if( status ) return errno;
12310 #endif
12311
12312 #ifdef HAVE_LINUX_THREADS
12313         pthread_kill_other_threads_np();
12314 #endif
12315
12316         return 0;
12317
12318 ; return 0; }
12319 EOF
12320 if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12321   rm -rf conftest*
12322   ol_cv_pthread_pthreads=yes
12323 else
12324   echo "configure: failed program was:" >&5
12325   cat conftest.$ac_ext >&5
12326   rm -rf conftest*
12327   ol_cv_pthread_pthreads=no
12328 fi
12329 rm -f conftest*
12330 else
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* pthread test headers */
12335 #include <pthread.h>
12336 #if HAVE_PTHREADS < 7
12337 #include <errno.h>
12338 #endif
12339 #ifndef NULL
12340 #define NULL (void*)0
12341 #endif
12342
12343 static void *task(p)
12344         void *p;
12345 {
12346         return (void *) (p == NULL);
12347 }
12348
12349
12350 int main(argc, argv)
12351         int argc;
12352         char **argv;
12353 {
12354
12355         /* pthread test function */
12356 #ifndef PTHREAD_CREATE_DETACHED
12357 #define PTHREAD_CREATE_DETACHED 1
12358 #endif
12359         pthread_t t;
12360         int status;
12361         int detach = PTHREAD_CREATE_DETACHED;
12362
12363 #if HAVE_PTHREADS > 4
12364         /* Final pthreads */
12365         pthread_attr_t attr;
12366
12367         status = pthread_attr_init(&attr);
12368         if( status ) return status;
12369
12370 #if HAVE_PTHREADS < 7
12371         status = pthread_attr_setdetachstate(&attr, &detach);
12372         if( status < 0 ) status = errno;
12373 #else
12374         status = pthread_attr_setdetachstate(&attr, detach);
12375 #endif
12376         if( status ) return status;
12377         status = pthread_create( &t, &attr, task, NULL );
12378 #if HAVE_PTHREADS < 7
12379         if( status < 0 ) status = errno;
12380 #endif
12381         if( status ) return status;
12382 #else
12383         /* Draft 4 pthreads */
12384         status = pthread_create( &t, pthread_attr_default, task, NULL );
12385         if( status ) return errno;
12386
12387         /* give thread a chance to complete */
12388         /* it should remain joinable and hence detachable */
12389         sleep( 1 );
12390
12391         status = pthread_detach( &t );
12392         if( status ) return errno;
12393 #endif
12394
12395 #ifdef HAVE_LINUX_THREADS
12396         pthread_kill_other_threads_np();
12397 #endif
12398
12399         return 0;
12400
12401 }
12402
12403 EOF
12404 if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12405 then
12406   ol_cv_pthread_pthreads=yes
12407 else
12408   echo "configure: failed program was:" >&5
12409   cat conftest.$ac_ext >&5
12410   rm -fr conftest*
12411   ol_cv_pthread_pthreads=no
12412 fi
12413 rm -fr conftest*
12414 fi
12415
12416
12417                 # restore the LIBS
12418                 LIBS="$ol_LIBS"
12419         
12420 fi
12421
12422 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12423
12424         if test $ol_cv_pthread_pthreads = yes ; then
12425                 ol_link_pthreads="-pthreads"
12426                 ol_link_threads=posix
12427         fi
12428 fi
12429
12430                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12431 if test "$ol_link_threads" = no ; then
12432         # try -mthreads
12433         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12434 echo "configure:12435: checking for pthread link with -mthreads" >&5
12435 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12436   echo $ac_n "(cached) $ac_c" 1>&6
12437 else
12438   
12439                 # save the flags
12440                 ol_LIBS="$LIBS"
12441                 LIBS="-mthreads $LIBS"
12442
12443                 if test "$cross_compiling" = yes; then
12444   cat > conftest.$ac_ext <<EOF
12445 #line 12446 "configure"
12446 #include "confdefs.h"
12447 /* pthread test headers */
12448 #include <pthread.h>
12449 #if HAVE_PTHREADS < 7
12450 #include <errno.h>
12451 #endif
12452 #ifndef NULL
12453 #define NULL (void*)0
12454 #endif
12455
12456 static void *task(p)
12457         void *p;
12458 {
12459         return (void *) (p == NULL);
12460 }
12461
12462 int main() {
12463
12464         /* pthread test function */
12465 #ifndef PTHREAD_CREATE_DETACHED
12466 #define PTHREAD_CREATE_DETACHED 1
12467 #endif
12468         pthread_t t;
12469         int status;
12470         int detach = PTHREAD_CREATE_DETACHED;
12471
12472 #if HAVE_PTHREADS > 4
12473         /* Final pthreads */
12474         pthread_attr_t attr;
12475
12476         status = pthread_attr_init(&attr);
12477         if( status ) return status;
12478
12479 #if HAVE_PTHREADS < 7
12480         status = pthread_attr_setdetachstate(&attr, &detach);
12481         if( status < 0 ) status = errno;
12482 #else
12483         status = pthread_attr_setdetachstate(&attr, detach);
12484 #endif
12485         if( status ) return status;
12486         status = pthread_create( &t, &attr, task, NULL );
12487 #if HAVE_PTHREADS < 7
12488         if( status < 0 ) status = errno;
12489 #endif
12490         if( status ) return status;
12491 #else
12492         /* Draft 4 pthreads */
12493         status = pthread_create( &t, pthread_attr_default, task, NULL );
12494         if( status ) return errno;
12495
12496         /* give thread a chance to complete */
12497         /* it should remain joinable and hence detachable */
12498         sleep( 1 );
12499
12500         status = pthread_detach( &t );
12501         if( status ) return errno;
12502 #endif
12503
12504 #ifdef HAVE_LINUX_THREADS
12505         pthread_kill_other_threads_np();
12506 #endif
12507
12508         return 0;
12509
12510 ; return 0; }
12511 EOF
12512 if { (eval echo configure:12513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12513   rm -rf conftest*
12514   ol_cv_pthread_mthreads=yes
12515 else
12516   echo "configure: failed program was:" >&5
12517   cat conftest.$ac_ext >&5
12518   rm -rf conftest*
12519   ol_cv_pthread_mthreads=no
12520 fi
12521 rm -f conftest*
12522 else
12523   cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 /* pthread test headers */
12527 #include <pthread.h>
12528 #if HAVE_PTHREADS < 7
12529 #include <errno.h>
12530 #endif
12531 #ifndef NULL
12532 #define NULL (void*)0
12533 #endif
12534
12535 static void *task(p)
12536         void *p;
12537 {
12538         return (void *) (p == NULL);
12539 }
12540
12541
12542 int main(argc, argv)
12543         int argc;
12544         char **argv;
12545 {
12546
12547         /* pthread test function */
12548 #ifndef PTHREAD_CREATE_DETACHED
12549 #define PTHREAD_CREATE_DETACHED 1
12550 #endif
12551         pthread_t t;
12552         int status;
12553         int detach = PTHREAD_CREATE_DETACHED;
12554
12555 #if HAVE_PTHREADS > 4
12556         /* Final pthreads */
12557         pthread_attr_t attr;
12558
12559         status = pthread_attr_init(&attr);
12560         if( status ) return status;
12561
12562 #if HAVE_PTHREADS < 7
12563         status = pthread_attr_setdetachstate(&attr, &detach);
12564         if( status < 0 ) status = errno;
12565 #else
12566         status = pthread_attr_setdetachstate(&attr, detach);
12567 #endif
12568         if( status ) return status;
12569         status = pthread_create( &t, &attr, task, NULL );
12570 #if HAVE_PTHREADS < 7
12571         if( status < 0 ) status = errno;
12572 #endif
12573         if( status ) return status;
12574 #else
12575         /* Draft 4 pthreads */
12576         status = pthread_create( &t, pthread_attr_default, task, NULL );
12577         if( status ) return errno;
12578
12579         /* give thread a chance to complete */
12580         /* it should remain joinable and hence detachable */
12581         sleep( 1 );
12582
12583         status = pthread_detach( &t );
12584         if( status ) return errno;
12585 #endif
12586
12587 #ifdef HAVE_LINUX_THREADS
12588         pthread_kill_other_threads_np();
12589 #endif
12590
12591         return 0;
12592
12593 }
12594
12595 EOF
12596 if { (eval echo configure:12597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12597 then
12598   ol_cv_pthread_mthreads=yes
12599 else
12600   echo "configure: failed program was:" >&5
12601   cat conftest.$ac_ext >&5
12602   rm -fr conftest*
12603   ol_cv_pthread_mthreads=no
12604 fi
12605 rm -fr conftest*
12606 fi
12607
12608
12609                 # restore the LIBS
12610                 LIBS="$ol_LIBS"
12611         
12612 fi
12613
12614 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12615
12616         if test $ol_cv_pthread_mthreads = yes ; then
12617                 ol_link_pthreads="-mthreads"
12618                 ol_link_threads=posix
12619         fi
12620 fi
12621
12622                 # Pthread try link: -thread (ol_cv_pthread_thread)
12623 if test "$ol_link_threads" = no ; then
12624         # try -thread
12625         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12626 echo "configure:12627: checking for pthread link with -thread" >&5
12627 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12628   echo $ac_n "(cached) $ac_c" 1>&6
12629 else
12630   
12631                 # save the flags
12632                 ol_LIBS="$LIBS"
12633                 LIBS="-thread $LIBS"
12634
12635                 if test "$cross_compiling" = yes; then
12636   cat > conftest.$ac_ext <<EOF
12637 #line 12638 "configure"
12638 #include "confdefs.h"
12639 /* pthread test headers */
12640 #include <pthread.h>
12641 #if HAVE_PTHREADS < 7
12642 #include <errno.h>
12643 #endif
12644 #ifndef NULL
12645 #define NULL (void*)0
12646 #endif
12647
12648 static void *task(p)
12649         void *p;
12650 {
12651         return (void *) (p == NULL);
12652 }
12653
12654 int main() {
12655
12656         /* pthread test function */
12657 #ifndef PTHREAD_CREATE_DETACHED
12658 #define PTHREAD_CREATE_DETACHED 1
12659 #endif
12660         pthread_t t;
12661         int status;
12662         int detach = PTHREAD_CREATE_DETACHED;
12663
12664 #if HAVE_PTHREADS > 4
12665         /* Final pthreads */
12666         pthread_attr_t attr;
12667
12668         status = pthread_attr_init(&attr);
12669         if( status ) return status;
12670
12671 #if HAVE_PTHREADS < 7
12672         status = pthread_attr_setdetachstate(&attr, &detach);
12673         if( status < 0 ) status = errno;
12674 #else
12675         status = pthread_attr_setdetachstate(&attr, detach);
12676 #endif
12677         if( status ) return status;
12678         status = pthread_create( &t, &attr, task, NULL );
12679 #if HAVE_PTHREADS < 7
12680         if( status < 0 ) status = errno;
12681 #endif
12682         if( status ) return status;
12683 #else
12684         /* Draft 4 pthreads */
12685         status = pthread_create( &t, pthread_attr_default, task, NULL );
12686         if( status ) return errno;
12687
12688         /* give thread a chance to complete */
12689         /* it should remain joinable and hence detachable */
12690         sleep( 1 );
12691
12692         status = pthread_detach( &t );
12693         if( status ) return errno;
12694 #endif
12695
12696 #ifdef HAVE_LINUX_THREADS
12697         pthread_kill_other_threads_np();
12698 #endif
12699
12700         return 0;
12701
12702 ; return 0; }
12703 EOF
12704 if { (eval echo configure:12705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12705   rm -rf conftest*
12706   ol_cv_pthread_thread=yes
12707 else
12708   echo "configure: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   rm -rf conftest*
12711   ol_cv_pthread_thread=no
12712 fi
12713 rm -f conftest*
12714 else
12715   cat > conftest.$ac_ext <<EOF
12716 #line 12717 "configure"
12717 #include "confdefs.h"
12718 /* pthread test headers */
12719 #include <pthread.h>
12720 #if HAVE_PTHREADS < 7
12721 #include <errno.h>
12722 #endif
12723 #ifndef NULL
12724 #define NULL (void*)0
12725 #endif
12726
12727 static void *task(p)
12728         void *p;
12729 {
12730         return (void *) (p == NULL);
12731 }
12732
12733
12734 int main(argc, argv)
12735         int argc;
12736         char **argv;
12737 {
12738
12739         /* pthread test function */
12740 #ifndef PTHREAD_CREATE_DETACHED
12741 #define PTHREAD_CREATE_DETACHED 1
12742 #endif
12743         pthread_t t;
12744         int status;
12745         int detach = PTHREAD_CREATE_DETACHED;
12746
12747 #if HAVE_PTHREADS > 4
12748         /* Final pthreads */
12749         pthread_attr_t attr;
12750
12751         status = pthread_attr_init(&attr);
12752         if( status ) return status;
12753
12754 #if HAVE_PTHREADS < 7
12755         status = pthread_attr_setdetachstate(&attr, &detach);
12756         if( status < 0 ) status = errno;
12757 #else
12758         status = pthread_attr_setdetachstate(&attr, detach);
12759 #endif
12760         if( status ) return status;
12761         status = pthread_create( &t, &attr, task, NULL );
12762 #if HAVE_PTHREADS < 7
12763         if( status < 0 ) status = errno;
12764 #endif
12765         if( status ) return status;
12766 #else
12767         /* Draft 4 pthreads */
12768         status = pthread_create( &t, pthread_attr_default, task, NULL );
12769         if( status ) return errno;
12770
12771         /* give thread a chance to complete */
12772         /* it should remain joinable and hence detachable */
12773         sleep( 1 );
12774
12775         status = pthread_detach( &t );
12776         if( status ) return errno;
12777 #endif
12778
12779 #ifdef HAVE_LINUX_THREADS
12780         pthread_kill_other_threads_np();
12781 #endif
12782
12783         return 0;
12784
12785 }
12786
12787 EOF
12788 if { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12789 then
12790   ol_cv_pthread_thread=yes
12791 else
12792   echo "configure: failed program was:" >&5
12793   cat conftest.$ac_ext >&5
12794   rm -fr conftest*
12795   ol_cv_pthread_thread=no
12796 fi
12797 rm -fr conftest*
12798 fi
12799
12800
12801                 # restore the LIBS
12802                 LIBS="$ol_LIBS"
12803         
12804 fi
12805
12806 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12807
12808         if test $ol_cv_pthread_thread = yes ; then
12809                 ol_link_pthreads="-thread"
12810                 ol_link_threads=posix
12811         fi
12812 fi
12813
12814
12815                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12816 if test "$ol_link_threads" = no ; then
12817         # try -lpthread -lmach -lexc -lc_r
12818         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12819 echo "configure:12820: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12820 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12821   echo $ac_n "(cached) $ac_c" 1>&6
12822 else
12823   
12824                 # save the flags
12825                 ol_LIBS="$LIBS"
12826                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12827
12828                 if test "$cross_compiling" = yes; then
12829   cat > conftest.$ac_ext <<EOF
12830 #line 12831 "configure"
12831 #include "confdefs.h"
12832 /* pthread test headers */
12833 #include <pthread.h>
12834 #if HAVE_PTHREADS < 7
12835 #include <errno.h>
12836 #endif
12837 #ifndef NULL
12838 #define NULL (void*)0
12839 #endif
12840
12841 static void *task(p)
12842         void *p;
12843 {
12844         return (void *) (p == NULL);
12845 }
12846
12847 int main() {
12848
12849         /* pthread test function */
12850 #ifndef PTHREAD_CREATE_DETACHED
12851 #define PTHREAD_CREATE_DETACHED 1
12852 #endif
12853         pthread_t t;
12854         int status;
12855         int detach = PTHREAD_CREATE_DETACHED;
12856
12857 #if HAVE_PTHREADS > 4
12858         /* Final pthreads */
12859         pthread_attr_t attr;
12860
12861         status = pthread_attr_init(&attr);
12862         if( status ) return status;
12863
12864 #if HAVE_PTHREADS < 7
12865         status = pthread_attr_setdetachstate(&attr, &detach);
12866         if( status < 0 ) status = errno;
12867 #else
12868         status = pthread_attr_setdetachstate(&attr, detach);
12869 #endif
12870         if( status ) return status;
12871         status = pthread_create( &t, &attr, task, NULL );
12872 #if HAVE_PTHREADS < 7
12873         if( status < 0 ) status = errno;
12874 #endif
12875         if( status ) return status;
12876 #else
12877         /* Draft 4 pthreads */
12878         status = pthread_create( &t, pthread_attr_default, task, NULL );
12879         if( status ) return errno;
12880
12881         /* give thread a chance to complete */
12882         /* it should remain joinable and hence detachable */
12883         sleep( 1 );
12884
12885         status = pthread_detach( &t );
12886         if( status ) return errno;
12887 #endif
12888
12889 #ifdef HAVE_LINUX_THREADS
12890         pthread_kill_other_threads_np();
12891 #endif
12892
12893         return 0;
12894
12895 ; return 0; }
12896 EOF
12897 if { (eval echo configure:12898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12898   rm -rf conftest*
12899   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12900 else
12901   echo "configure: failed program was:" >&5
12902   cat conftest.$ac_ext >&5
12903   rm -rf conftest*
12904   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12905 fi
12906 rm -f conftest*
12907 else
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 /* pthread test headers */
12912 #include <pthread.h>
12913 #if HAVE_PTHREADS < 7
12914 #include <errno.h>
12915 #endif
12916 #ifndef NULL
12917 #define NULL (void*)0
12918 #endif
12919
12920 static void *task(p)
12921         void *p;
12922 {
12923         return (void *) (p == NULL);
12924 }
12925
12926
12927 int main(argc, argv)
12928         int argc;
12929         char **argv;
12930 {
12931
12932         /* pthread test function */
12933 #ifndef PTHREAD_CREATE_DETACHED
12934 #define PTHREAD_CREATE_DETACHED 1
12935 #endif
12936         pthread_t t;
12937         int status;
12938         int detach = PTHREAD_CREATE_DETACHED;
12939
12940 #if HAVE_PTHREADS > 4
12941         /* Final pthreads */
12942         pthread_attr_t attr;
12943
12944         status = pthread_attr_init(&attr);
12945         if( status ) return status;
12946
12947 #if HAVE_PTHREADS < 7
12948         status = pthread_attr_setdetachstate(&attr, &detach);
12949         if( status < 0 ) status = errno;
12950 #else
12951         status = pthread_attr_setdetachstate(&attr, detach);
12952 #endif
12953         if( status ) return status;
12954         status = pthread_create( &t, &attr, task, NULL );
12955 #if HAVE_PTHREADS < 7
12956         if( status < 0 ) status = errno;
12957 #endif
12958         if( status ) return status;
12959 #else
12960         /* Draft 4 pthreads */
12961         status = pthread_create( &t, pthread_attr_default, task, NULL );
12962         if( status ) return errno;
12963
12964         /* give thread a chance to complete */
12965         /* it should remain joinable and hence detachable */
12966         sleep( 1 );
12967
12968         status = pthread_detach( &t );
12969         if( status ) return errno;
12970 #endif
12971
12972 #ifdef HAVE_LINUX_THREADS
12973         pthread_kill_other_threads_np();
12974 #endif
12975
12976         return 0;
12977
12978 }
12979
12980 EOF
12981 if { (eval echo configure:12982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12982 then
12983   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12984 else
12985   echo "configure: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   rm -fr conftest*
12988   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12989 fi
12990 rm -fr conftest*
12991 fi
12992
12993
12994                 # restore the LIBS
12995                 LIBS="$ol_LIBS"
12996         
12997 fi
12998
12999 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13000
13001         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13002                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13003                 ol_link_threads=posix
13004         fi
13005 fi
13006
13007                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13008 if test "$ol_link_threads" = no ; then
13009         # try -lpthread -lmach -lexc
13010         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13011 echo "configure:13012: checking for pthread link with -lpthread -lmach -lexc" >&5
13012 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13013   echo $ac_n "(cached) $ac_c" 1>&6
13014 else
13015   
13016                 # save the flags
13017                 ol_LIBS="$LIBS"
13018                 LIBS="-lpthread -lmach -lexc $LIBS"
13019
13020                 if test "$cross_compiling" = yes; then
13021   cat > conftest.$ac_ext <<EOF
13022 #line 13023 "configure"
13023 #include "confdefs.h"
13024 /* pthread test headers */
13025 #include <pthread.h>
13026 #if HAVE_PTHREADS < 7
13027 #include <errno.h>
13028 #endif
13029 #ifndef NULL
13030 #define NULL (void*)0
13031 #endif
13032
13033 static void *task(p)
13034         void *p;
13035 {
13036         return (void *) (p == NULL);
13037 }
13038
13039 int main() {
13040
13041         /* pthread test function */
13042 #ifndef PTHREAD_CREATE_DETACHED
13043 #define PTHREAD_CREATE_DETACHED 1
13044 #endif
13045         pthread_t t;
13046         int status;
13047         int detach = PTHREAD_CREATE_DETACHED;
13048
13049 #if HAVE_PTHREADS > 4
13050         /* Final pthreads */
13051         pthread_attr_t attr;
13052
13053         status = pthread_attr_init(&attr);
13054         if( status ) return status;
13055
13056 #if HAVE_PTHREADS < 7
13057         status = pthread_attr_setdetachstate(&attr, &detach);
13058         if( status < 0 ) status = errno;
13059 #else
13060         status = pthread_attr_setdetachstate(&attr, detach);
13061 #endif
13062         if( status ) return status;
13063         status = pthread_create( &t, &attr, task, NULL );
13064 #if HAVE_PTHREADS < 7
13065         if( status < 0 ) status = errno;
13066 #endif
13067         if( status ) return status;
13068 #else
13069         /* Draft 4 pthreads */
13070         status = pthread_create( &t, pthread_attr_default, task, NULL );
13071         if( status ) return errno;
13072
13073         /* give thread a chance to complete */
13074         /* it should remain joinable and hence detachable */
13075         sleep( 1 );
13076
13077         status = pthread_detach( &t );
13078         if( status ) return errno;
13079 #endif
13080
13081 #ifdef HAVE_LINUX_THREADS
13082         pthread_kill_other_threads_np();
13083 #endif
13084
13085         return 0;
13086
13087 ; return 0; }
13088 EOF
13089 if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13090   rm -rf conftest*
13091   ol_cv_pthread_lpthread_lmach_lexc=yes
13092 else
13093   echo "configure: failed program was:" >&5
13094   cat conftest.$ac_ext >&5
13095   rm -rf conftest*
13096   ol_cv_pthread_lpthread_lmach_lexc=no
13097 fi
13098 rm -f conftest*
13099 else
13100   cat > conftest.$ac_ext <<EOF
13101 #line 13102 "configure"
13102 #include "confdefs.h"
13103 /* pthread test headers */
13104 #include <pthread.h>
13105 #if HAVE_PTHREADS < 7
13106 #include <errno.h>
13107 #endif
13108 #ifndef NULL
13109 #define NULL (void*)0
13110 #endif
13111
13112 static void *task(p)
13113         void *p;
13114 {
13115         return (void *) (p == NULL);
13116 }
13117
13118
13119 int main(argc, argv)
13120         int argc;
13121         char **argv;
13122 {
13123
13124         /* pthread test function */
13125 #ifndef PTHREAD_CREATE_DETACHED
13126 #define PTHREAD_CREATE_DETACHED 1
13127 #endif
13128         pthread_t t;
13129         int status;
13130         int detach = PTHREAD_CREATE_DETACHED;
13131
13132 #if HAVE_PTHREADS > 4
13133         /* Final pthreads */
13134         pthread_attr_t attr;
13135
13136         status = pthread_attr_init(&attr);
13137         if( status ) return status;
13138
13139 #if HAVE_PTHREADS < 7
13140         status = pthread_attr_setdetachstate(&attr, &detach);
13141         if( status < 0 ) status = errno;
13142 #else
13143         status = pthread_attr_setdetachstate(&attr, detach);
13144 #endif
13145         if( status ) return status;
13146         status = pthread_create( &t, &attr, task, NULL );
13147 #if HAVE_PTHREADS < 7
13148         if( status < 0 ) status = errno;
13149 #endif
13150         if( status ) return status;
13151 #else
13152         /* Draft 4 pthreads */
13153         status = pthread_create( &t, pthread_attr_default, task, NULL );
13154         if( status ) return errno;
13155
13156         /* give thread a chance to complete */
13157         /* it should remain joinable and hence detachable */
13158         sleep( 1 );
13159
13160         status = pthread_detach( &t );
13161         if( status ) return errno;
13162 #endif
13163
13164 #ifdef HAVE_LINUX_THREADS
13165         pthread_kill_other_threads_np();
13166 #endif
13167
13168         return 0;
13169
13170 }
13171
13172 EOF
13173 if { (eval echo configure:13174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13174 then
13175   ol_cv_pthread_lpthread_lmach_lexc=yes
13176 else
13177   echo "configure: failed program was:" >&5
13178   cat conftest.$ac_ext >&5
13179   rm -fr conftest*
13180   ol_cv_pthread_lpthread_lmach_lexc=no
13181 fi
13182 rm -fr conftest*
13183 fi
13184
13185
13186                 # restore the LIBS
13187                 LIBS="$ol_LIBS"
13188         
13189 fi
13190
13191 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13192
13193         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13194                 ol_link_pthreads="-lpthread -lmach -lexc"
13195                 ol_link_threads=posix
13196         fi
13197 fi
13198
13199
13200                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13201 if test "$ol_link_threads" = no ; then
13202         # try -lpthread -Wl,-woff,85
13203         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13204 echo "configure:13205: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13205 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13206   echo $ac_n "(cached) $ac_c" 1>&6
13207 else
13208   
13209                 # save the flags
13210                 ol_LIBS="$LIBS"
13211                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13212
13213                 if test "$cross_compiling" = yes; then
13214   cat > conftest.$ac_ext <<EOF
13215 #line 13216 "configure"
13216 #include "confdefs.h"
13217 /* pthread test headers */
13218 #include <pthread.h>
13219 #if HAVE_PTHREADS < 7
13220 #include <errno.h>
13221 #endif
13222 #ifndef NULL
13223 #define NULL (void*)0
13224 #endif
13225
13226 static void *task(p)
13227         void *p;
13228 {
13229         return (void *) (p == NULL);
13230 }
13231
13232 int main() {
13233
13234         /* pthread test function */
13235 #ifndef PTHREAD_CREATE_DETACHED
13236 #define PTHREAD_CREATE_DETACHED 1
13237 #endif
13238         pthread_t t;
13239         int status;
13240         int detach = PTHREAD_CREATE_DETACHED;
13241
13242 #if HAVE_PTHREADS > 4
13243         /* Final pthreads */
13244         pthread_attr_t attr;
13245
13246         status = pthread_attr_init(&attr);
13247         if( status ) return status;
13248
13249 #if HAVE_PTHREADS < 7
13250         status = pthread_attr_setdetachstate(&attr, &detach);
13251         if( status < 0 ) status = errno;
13252 #else
13253         status = pthread_attr_setdetachstate(&attr, detach);
13254 #endif
13255         if( status ) return status;
13256         status = pthread_create( &t, &attr, task, NULL );
13257 #if HAVE_PTHREADS < 7
13258         if( status < 0 ) status = errno;
13259 #endif
13260         if( status ) return status;
13261 #else
13262         /* Draft 4 pthreads */
13263         status = pthread_create( &t, pthread_attr_default, task, NULL );
13264         if( status ) return errno;
13265
13266         /* give thread a chance to complete */
13267         /* it should remain joinable and hence detachable */
13268         sleep( 1 );
13269
13270         status = pthread_detach( &t );
13271         if( status ) return errno;
13272 #endif
13273
13274 #ifdef HAVE_LINUX_THREADS
13275         pthread_kill_other_threads_np();
13276 #endif
13277
13278         return 0;
13279
13280 ; return 0; }
13281 EOF
13282 if { (eval echo configure:13283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13283   rm -rf conftest*
13284   ol_cv_pthread_lib_lpthread_woff=yes
13285 else
13286   echo "configure: failed program was:" >&5
13287   cat conftest.$ac_ext >&5
13288   rm -rf conftest*
13289   ol_cv_pthread_lib_lpthread_woff=no
13290 fi
13291 rm -f conftest*
13292 else
13293   cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 /* pthread test headers */
13297 #include <pthread.h>
13298 #if HAVE_PTHREADS < 7
13299 #include <errno.h>
13300 #endif
13301 #ifndef NULL
13302 #define NULL (void*)0
13303 #endif
13304
13305 static void *task(p)
13306         void *p;
13307 {
13308         return (void *) (p == NULL);
13309 }
13310
13311
13312 int main(argc, argv)
13313         int argc;
13314         char **argv;
13315 {
13316
13317         /* pthread test function */
13318 #ifndef PTHREAD_CREATE_DETACHED
13319 #define PTHREAD_CREATE_DETACHED 1
13320 #endif
13321         pthread_t t;
13322         int status;
13323         int detach = PTHREAD_CREATE_DETACHED;
13324
13325 #if HAVE_PTHREADS > 4
13326         /* Final pthreads */
13327         pthread_attr_t attr;
13328
13329         status = pthread_attr_init(&attr);
13330         if( status ) return status;
13331
13332 #if HAVE_PTHREADS < 7
13333         status = pthread_attr_setdetachstate(&attr, &detach);
13334         if( status < 0 ) status = errno;
13335 #else
13336         status = pthread_attr_setdetachstate(&attr, detach);
13337 #endif
13338         if( status ) return status;
13339         status = pthread_create( &t, &attr, task, NULL );
13340 #if HAVE_PTHREADS < 7
13341         if( status < 0 ) status = errno;
13342 #endif
13343         if( status ) return status;
13344 #else
13345         /* Draft 4 pthreads */
13346         status = pthread_create( &t, pthread_attr_default, task, NULL );
13347         if( status ) return errno;
13348
13349         /* give thread a chance to complete */
13350         /* it should remain joinable and hence detachable */
13351         sleep( 1 );
13352
13353         status = pthread_detach( &t );
13354         if( status ) return errno;
13355 #endif
13356
13357 #ifdef HAVE_LINUX_THREADS
13358         pthread_kill_other_threads_np();
13359 #endif
13360
13361         return 0;
13362
13363 }
13364
13365 EOF
13366 if { (eval echo configure:13367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13367 then
13368   ol_cv_pthread_lib_lpthread_woff=yes
13369 else
13370   echo "configure: failed program was:" >&5
13371   cat conftest.$ac_ext >&5
13372   rm -fr conftest*
13373   ol_cv_pthread_lib_lpthread_woff=no
13374 fi
13375 rm -fr conftest*
13376 fi
13377
13378
13379                 # restore the LIBS
13380                 LIBS="$ol_LIBS"
13381         
13382 fi
13383
13384 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13385
13386         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13387                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13388                 ol_link_threads=posix
13389         fi
13390 fi
13391
13392
13393                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13394 if test "$ol_link_threads" = no ; then
13395         # try -lpthread
13396         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13397 echo "configure:13398: checking for pthread link with -lpthread" >&5
13398 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13399   echo $ac_n "(cached) $ac_c" 1>&6
13400 else
13401   
13402                 # save the flags
13403                 ol_LIBS="$LIBS"
13404                 LIBS="-lpthread $LIBS"
13405
13406                 if test "$cross_compiling" = yes; then
13407   cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 /* pthread test headers */
13411 #include <pthread.h>
13412 #if HAVE_PTHREADS < 7
13413 #include <errno.h>
13414 #endif
13415 #ifndef NULL
13416 #define NULL (void*)0
13417 #endif
13418
13419 static void *task(p)
13420         void *p;
13421 {
13422         return (void *) (p == NULL);
13423 }
13424
13425 int main() {
13426
13427         /* pthread test function */
13428 #ifndef PTHREAD_CREATE_DETACHED
13429 #define PTHREAD_CREATE_DETACHED 1
13430 #endif
13431         pthread_t t;
13432         int status;
13433         int detach = PTHREAD_CREATE_DETACHED;
13434
13435 #if HAVE_PTHREADS > 4
13436         /* Final pthreads */
13437         pthread_attr_t attr;
13438
13439         status = pthread_attr_init(&attr);
13440         if( status ) return status;
13441
13442 #if HAVE_PTHREADS < 7
13443         status = pthread_attr_setdetachstate(&attr, &detach);
13444         if( status < 0 ) status = errno;
13445 #else
13446         status = pthread_attr_setdetachstate(&attr, detach);
13447 #endif
13448         if( status ) return status;
13449         status = pthread_create( &t, &attr, task, NULL );
13450 #if HAVE_PTHREADS < 7
13451         if( status < 0 ) status = errno;
13452 #endif
13453         if( status ) return status;
13454 #else
13455         /* Draft 4 pthreads */
13456         status = pthread_create( &t, pthread_attr_default, task, NULL );
13457         if( status ) return errno;
13458
13459         /* give thread a chance to complete */
13460         /* it should remain joinable and hence detachable */
13461         sleep( 1 );
13462
13463         status = pthread_detach( &t );
13464         if( status ) return errno;
13465 #endif
13466
13467 #ifdef HAVE_LINUX_THREADS
13468         pthread_kill_other_threads_np();
13469 #endif
13470
13471         return 0;
13472
13473 ; return 0; }
13474 EOF
13475 if { (eval echo configure:13476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13476   rm -rf conftest*
13477   ol_cv_pthread_lpthread=yes
13478 else
13479   echo "configure: failed program was:" >&5
13480   cat conftest.$ac_ext >&5
13481   rm -rf conftest*
13482   ol_cv_pthread_lpthread=no
13483 fi
13484 rm -f conftest*
13485 else
13486   cat > conftest.$ac_ext <<EOF
13487 #line 13488 "configure"
13488 #include "confdefs.h"
13489 /* pthread test headers */
13490 #include <pthread.h>
13491 #if HAVE_PTHREADS < 7
13492 #include <errno.h>
13493 #endif
13494 #ifndef NULL
13495 #define NULL (void*)0
13496 #endif
13497
13498 static void *task(p)
13499         void *p;
13500 {
13501         return (void *) (p == NULL);
13502 }
13503
13504
13505 int main(argc, argv)
13506         int argc;
13507         char **argv;
13508 {
13509
13510         /* pthread test function */
13511 #ifndef PTHREAD_CREATE_DETACHED
13512 #define PTHREAD_CREATE_DETACHED 1
13513 #endif
13514         pthread_t t;
13515         int status;
13516         int detach = PTHREAD_CREATE_DETACHED;
13517
13518 #if HAVE_PTHREADS > 4
13519         /* Final pthreads */
13520         pthread_attr_t attr;
13521
13522         status = pthread_attr_init(&attr);
13523         if( status ) return status;
13524
13525 #if HAVE_PTHREADS < 7
13526         status = pthread_attr_setdetachstate(&attr, &detach);
13527         if( status < 0 ) status = errno;
13528 #else
13529         status = pthread_attr_setdetachstate(&attr, detach);
13530 #endif
13531         if( status ) return status;
13532         status = pthread_create( &t, &attr, task, NULL );
13533 #if HAVE_PTHREADS < 7
13534         if( status < 0 ) status = errno;
13535 #endif
13536         if( status ) return status;
13537 #else
13538         /* Draft 4 pthreads */
13539         status = pthread_create( &t, pthread_attr_default, task, NULL );
13540         if( status ) return errno;
13541
13542         /* give thread a chance to complete */
13543         /* it should remain joinable and hence detachable */
13544         sleep( 1 );
13545
13546         status = pthread_detach( &t );
13547         if( status ) return errno;
13548 #endif
13549
13550 #ifdef HAVE_LINUX_THREADS
13551         pthread_kill_other_threads_np();
13552 #endif
13553
13554         return 0;
13555
13556 }
13557
13558 EOF
13559 if { (eval echo configure:13560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13560 then
13561   ol_cv_pthread_lpthread=yes
13562 else
13563   echo "configure: failed program was:" >&5
13564   cat conftest.$ac_ext >&5
13565   rm -fr conftest*
13566   ol_cv_pthread_lpthread=no
13567 fi
13568 rm -fr conftest*
13569 fi
13570
13571
13572                 # restore the LIBS
13573                 LIBS="$ol_LIBS"
13574         
13575 fi
13576
13577 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13578
13579         if test $ol_cv_pthread_lpthread = yes ; then
13580                 ol_link_pthreads="-lpthread"
13581                 ol_link_threads=posix
13582         fi
13583 fi
13584
13585                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13586 if test "$ol_link_threads" = no ; then
13587         # try -lc_r
13588         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13589 echo "configure:13590: checking for pthread link with -lc_r" >&5
13590 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13591   echo $ac_n "(cached) $ac_c" 1>&6
13592 else
13593   
13594                 # save the flags
13595                 ol_LIBS="$LIBS"
13596                 LIBS="-lc_r $LIBS"
13597
13598                 if test "$cross_compiling" = yes; then
13599   cat > conftest.$ac_ext <<EOF
13600 #line 13601 "configure"
13601 #include "confdefs.h"
13602 /* pthread test headers */
13603 #include <pthread.h>
13604 #if HAVE_PTHREADS < 7
13605 #include <errno.h>
13606 #endif
13607 #ifndef NULL
13608 #define NULL (void*)0
13609 #endif
13610
13611 static void *task(p)
13612         void *p;
13613 {
13614         return (void *) (p == NULL);
13615 }
13616
13617 int main() {
13618
13619         /* pthread test function */
13620 #ifndef PTHREAD_CREATE_DETACHED
13621 #define PTHREAD_CREATE_DETACHED 1
13622 #endif
13623         pthread_t t;
13624         int status;
13625         int detach = PTHREAD_CREATE_DETACHED;
13626
13627 #if HAVE_PTHREADS > 4
13628         /* Final pthreads */
13629         pthread_attr_t attr;
13630
13631         status = pthread_attr_init(&attr);
13632         if( status ) return status;
13633
13634 #if HAVE_PTHREADS < 7
13635         status = pthread_attr_setdetachstate(&attr, &detach);
13636         if( status < 0 ) status = errno;
13637 #else
13638         status = pthread_attr_setdetachstate(&attr, detach);
13639 #endif
13640         if( status ) return status;
13641         status = pthread_create( &t, &attr, task, NULL );
13642 #if HAVE_PTHREADS < 7
13643         if( status < 0 ) status = errno;
13644 #endif
13645         if( status ) return status;
13646 #else
13647         /* Draft 4 pthreads */
13648         status = pthread_create( &t, pthread_attr_default, task, NULL );
13649         if( status ) return errno;
13650
13651         /* give thread a chance to complete */
13652         /* it should remain joinable and hence detachable */
13653         sleep( 1 );
13654
13655         status = pthread_detach( &t );
13656         if( status ) return errno;
13657 #endif
13658
13659 #ifdef HAVE_LINUX_THREADS
13660         pthread_kill_other_threads_np();
13661 #endif
13662
13663         return 0;
13664
13665 ; return 0; }
13666 EOF
13667 if { (eval echo configure:13668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13668   rm -rf conftest*
13669   ol_cv_pthread_lc_r=yes
13670 else
13671   echo "configure: failed program was:" >&5
13672   cat conftest.$ac_ext >&5
13673   rm -rf conftest*
13674   ol_cv_pthread_lc_r=no
13675 fi
13676 rm -f conftest*
13677 else
13678   cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* pthread test headers */
13682 #include <pthread.h>
13683 #if HAVE_PTHREADS < 7
13684 #include <errno.h>
13685 #endif
13686 #ifndef NULL
13687 #define NULL (void*)0
13688 #endif
13689
13690 static void *task(p)
13691         void *p;
13692 {
13693         return (void *) (p == NULL);
13694 }
13695
13696
13697 int main(argc, argv)
13698         int argc;
13699         char **argv;
13700 {
13701
13702         /* pthread test function */
13703 #ifndef PTHREAD_CREATE_DETACHED
13704 #define PTHREAD_CREATE_DETACHED 1
13705 #endif
13706         pthread_t t;
13707         int status;
13708         int detach = PTHREAD_CREATE_DETACHED;
13709
13710 #if HAVE_PTHREADS > 4
13711         /* Final pthreads */
13712         pthread_attr_t attr;
13713
13714         status = pthread_attr_init(&attr);
13715         if( status ) return status;
13716
13717 #if HAVE_PTHREADS < 7
13718         status = pthread_attr_setdetachstate(&attr, &detach);
13719         if( status < 0 ) status = errno;
13720 #else
13721         status = pthread_attr_setdetachstate(&attr, detach);
13722 #endif
13723         if( status ) return status;
13724         status = pthread_create( &t, &attr, task, NULL );
13725 #if HAVE_PTHREADS < 7
13726         if( status < 0 ) status = errno;
13727 #endif
13728         if( status ) return status;
13729 #else
13730         /* Draft 4 pthreads */
13731         status = pthread_create( &t, pthread_attr_default, task, NULL );
13732         if( status ) return errno;
13733
13734         /* give thread a chance to complete */
13735         /* it should remain joinable and hence detachable */
13736         sleep( 1 );
13737
13738         status = pthread_detach( &t );
13739         if( status ) return errno;
13740 #endif
13741
13742 #ifdef HAVE_LINUX_THREADS
13743         pthread_kill_other_threads_np();
13744 #endif
13745
13746         return 0;
13747
13748 }
13749
13750 EOF
13751 if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13752 then
13753   ol_cv_pthread_lc_r=yes
13754 else
13755   echo "configure: failed program was:" >&5
13756   cat conftest.$ac_ext >&5
13757   rm -fr conftest*
13758   ol_cv_pthread_lc_r=no
13759 fi
13760 rm -fr conftest*
13761 fi
13762
13763
13764                 # restore the LIBS
13765                 LIBS="$ol_LIBS"
13766         
13767 fi
13768
13769 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13770
13771         if test $ol_cv_pthread_lc_r = yes ; then
13772                 ol_link_pthreads="-lc_r"
13773                 ol_link_threads=posix
13774         fi
13775 fi
13776
13777
13778                 # Pthread try link: -threads (ol_cv_pthread_threads)
13779 if test "$ol_link_threads" = no ; then
13780         # try -threads
13781         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13782 echo "configure:13783: checking for pthread link with -threads" >&5
13783 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13784   echo $ac_n "(cached) $ac_c" 1>&6
13785 else
13786   
13787                 # save the flags
13788                 ol_LIBS="$LIBS"
13789                 LIBS="-threads $LIBS"
13790
13791                 if test "$cross_compiling" = yes; then
13792   cat > conftest.$ac_ext <<EOF
13793 #line 13794 "configure"
13794 #include "confdefs.h"
13795 /* pthread test headers */
13796 #include <pthread.h>
13797 #if HAVE_PTHREADS < 7
13798 #include <errno.h>
13799 #endif
13800 #ifndef NULL
13801 #define NULL (void*)0
13802 #endif
13803
13804 static void *task(p)
13805         void *p;
13806 {
13807         return (void *) (p == NULL);
13808 }
13809
13810 int main() {
13811
13812         /* pthread test function */
13813 #ifndef PTHREAD_CREATE_DETACHED
13814 #define PTHREAD_CREATE_DETACHED 1
13815 #endif
13816         pthread_t t;
13817         int status;
13818         int detach = PTHREAD_CREATE_DETACHED;
13819
13820 #if HAVE_PTHREADS > 4
13821         /* Final pthreads */
13822         pthread_attr_t attr;
13823
13824         status = pthread_attr_init(&attr);
13825         if( status ) return status;
13826
13827 #if HAVE_PTHREADS < 7
13828         status = pthread_attr_setdetachstate(&attr, &detach);
13829         if( status < 0 ) status = errno;
13830 #else
13831         status = pthread_attr_setdetachstate(&attr, detach);
13832 #endif
13833         if( status ) return status;
13834         status = pthread_create( &t, &attr, task, NULL );
13835 #if HAVE_PTHREADS < 7
13836         if( status < 0 ) status = errno;
13837 #endif
13838         if( status ) return status;
13839 #else
13840         /* Draft 4 pthreads */
13841         status = pthread_create( &t, pthread_attr_default, task, NULL );
13842         if( status ) return errno;
13843
13844         /* give thread a chance to complete */
13845         /* it should remain joinable and hence detachable */
13846         sleep( 1 );
13847
13848         status = pthread_detach( &t );
13849         if( status ) return errno;
13850 #endif
13851
13852 #ifdef HAVE_LINUX_THREADS
13853         pthread_kill_other_threads_np();
13854 #endif
13855
13856         return 0;
13857
13858 ; return 0; }
13859 EOF
13860 if { (eval echo configure:13861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13861   rm -rf conftest*
13862   ol_cv_pthread_threads=yes
13863 else
13864   echo "configure: failed program was:" >&5
13865   cat conftest.$ac_ext >&5
13866   rm -rf conftest*
13867   ol_cv_pthread_threads=no
13868 fi
13869 rm -f conftest*
13870 else
13871   cat > conftest.$ac_ext <<EOF
13872 #line 13873 "configure"
13873 #include "confdefs.h"
13874 /* pthread test headers */
13875 #include <pthread.h>
13876 #if HAVE_PTHREADS < 7
13877 #include <errno.h>
13878 #endif
13879 #ifndef NULL
13880 #define NULL (void*)0
13881 #endif
13882
13883 static void *task(p)
13884         void *p;
13885 {
13886         return (void *) (p == NULL);
13887 }
13888
13889
13890 int main(argc, argv)
13891         int argc;
13892         char **argv;
13893 {
13894
13895         /* pthread test function */
13896 #ifndef PTHREAD_CREATE_DETACHED
13897 #define PTHREAD_CREATE_DETACHED 1
13898 #endif
13899         pthread_t t;
13900         int status;
13901         int detach = PTHREAD_CREATE_DETACHED;
13902
13903 #if HAVE_PTHREADS > 4
13904         /* Final pthreads */
13905         pthread_attr_t attr;
13906
13907         status = pthread_attr_init(&attr);
13908         if( status ) return status;
13909
13910 #if HAVE_PTHREADS < 7
13911         status = pthread_attr_setdetachstate(&attr, &detach);
13912         if( status < 0 ) status = errno;
13913 #else
13914         status = pthread_attr_setdetachstate(&attr, detach);
13915 #endif
13916         if( status ) return status;
13917         status = pthread_create( &t, &attr, task, NULL );
13918 #if HAVE_PTHREADS < 7
13919         if( status < 0 ) status = errno;
13920 #endif
13921         if( status ) return status;
13922 #else
13923         /* Draft 4 pthreads */
13924         status = pthread_create( &t, pthread_attr_default, task, NULL );
13925         if( status ) return errno;
13926
13927         /* give thread a chance to complete */
13928         /* it should remain joinable and hence detachable */
13929         sleep( 1 );
13930
13931         status = pthread_detach( &t );
13932         if( status ) return errno;
13933 #endif
13934
13935 #ifdef HAVE_LINUX_THREADS
13936         pthread_kill_other_threads_np();
13937 #endif
13938
13939         return 0;
13940
13941 }
13942
13943 EOF
13944 if { (eval echo configure:13945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13945 then
13946   ol_cv_pthread_threads=yes
13947 else
13948   echo "configure: failed program was:" >&5
13949   cat conftest.$ac_ext >&5
13950   rm -fr conftest*
13951   ol_cv_pthread_threads=no
13952 fi
13953 rm -fr conftest*
13954 fi
13955
13956
13957                 # restore the LIBS
13958                 LIBS="$ol_LIBS"
13959         
13960 fi
13961
13962 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13963
13964         if test $ol_cv_pthread_threads = yes ; then
13965                 ol_link_pthreads="-threads"
13966                 ol_link_threads=posix
13967         fi
13968 fi
13969
13970
13971                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13972 if test "$ol_link_threads" = no ; then
13973         # try -lpthreads -lmach -lexc -lc_r
13974         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13975 echo "configure:13976: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13976 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13977   echo $ac_n "(cached) $ac_c" 1>&6
13978 else
13979   
13980                 # save the flags
13981                 ol_LIBS="$LIBS"
13982                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13983
13984                 if test "$cross_compiling" = yes; then
13985   cat > conftest.$ac_ext <<EOF
13986 #line 13987 "configure"
13987 #include "confdefs.h"
13988 /* pthread test headers */
13989 #include <pthread.h>
13990 #if HAVE_PTHREADS < 7
13991 #include <errno.h>
13992 #endif
13993 #ifndef NULL
13994 #define NULL (void*)0
13995 #endif
13996
13997 static void *task(p)
13998         void *p;
13999 {
14000         return (void *) (p == NULL);
14001 }
14002
14003 int main() {
14004
14005         /* pthread test function */
14006 #ifndef PTHREAD_CREATE_DETACHED
14007 #define PTHREAD_CREATE_DETACHED 1
14008 #endif
14009         pthread_t t;
14010         int status;
14011         int detach = PTHREAD_CREATE_DETACHED;
14012
14013 #if HAVE_PTHREADS > 4
14014         /* Final pthreads */
14015         pthread_attr_t attr;
14016
14017         status = pthread_attr_init(&attr);
14018         if( status ) return status;
14019
14020 #if HAVE_PTHREADS < 7
14021         status = pthread_attr_setdetachstate(&attr, &detach);
14022         if( status < 0 ) status = errno;
14023 #else
14024         status = pthread_attr_setdetachstate(&attr, detach);
14025 #endif
14026         if( status ) return status;
14027         status = pthread_create( &t, &attr, task, NULL );
14028 #if HAVE_PTHREADS < 7
14029         if( status < 0 ) status = errno;
14030 #endif
14031         if( status ) return status;
14032 #else
14033         /* Draft 4 pthreads */
14034         status = pthread_create( &t, pthread_attr_default, task, NULL );
14035         if( status ) return errno;
14036
14037         /* give thread a chance to complete */
14038         /* it should remain joinable and hence detachable */
14039         sleep( 1 );
14040
14041         status = pthread_detach( &t );
14042         if( status ) return errno;
14043 #endif
14044
14045 #ifdef HAVE_LINUX_THREADS
14046         pthread_kill_other_threads_np();
14047 #endif
14048
14049         return 0;
14050
14051 ; return 0; }
14052 EOF
14053 if { (eval echo configure:14054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14054   rm -rf conftest*
14055   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14056 else
14057   echo "configure: failed program was:" >&5
14058   cat conftest.$ac_ext >&5
14059   rm -rf conftest*
14060   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14061 fi
14062 rm -f conftest*
14063 else
14064   cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067 /* pthread test headers */
14068 #include <pthread.h>
14069 #if HAVE_PTHREADS < 7
14070 #include <errno.h>
14071 #endif
14072 #ifndef NULL
14073 #define NULL (void*)0
14074 #endif
14075
14076 static void *task(p)
14077         void *p;
14078 {
14079         return (void *) (p == NULL);
14080 }
14081
14082
14083 int main(argc, argv)
14084         int argc;
14085         char **argv;
14086 {
14087
14088         /* pthread test function */
14089 #ifndef PTHREAD_CREATE_DETACHED
14090 #define PTHREAD_CREATE_DETACHED 1
14091 #endif
14092         pthread_t t;
14093         int status;
14094         int detach = PTHREAD_CREATE_DETACHED;
14095
14096 #if HAVE_PTHREADS > 4
14097         /* Final pthreads */
14098         pthread_attr_t attr;
14099
14100         status = pthread_attr_init(&attr);
14101         if( status ) return status;
14102
14103 #if HAVE_PTHREADS < 7
14104         status = pthread_attr_setdetachstate(&attr, &detach);
14105         if( status < 0 ) status = errno;
14106 #else
14107         status = pthread_attr_setdetachstate(&attr, detach);
14108 #endif
14109         if( status ) return status;
14110         status = pthread_create( &t, &attr, task, NULL );
14111 #if HAVE_PTHREADS < 7
14112         if( status < 0 ) status = errno;
14113 #endif
14114         if( status ) return status;
14115 #else
14116         /* Draft 4 pthreads */
14117         status = pthread_create( &t, pthread_attr_default, task, NULL );
14118         if( status ) return errno;
14119
14120         /* give thread a chance to complete */
14121         /* it should remain joinable and hence detachable */
14122         sleep( 1 );
14123
14124         status = pthread_detach( &t );
14125         if( status ) return errno;
14126 #endif
14127
14128 #ifdef HAVE_LINUX_THREADS
14129         pthread_kill_other_threads_np();
14130 #endif
14131
14132         return 0;
14133
14134 }
14135
14136 EOF
14137 if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14138 then
14139   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14140 else
14141   echo "configure: failed program was:" >&5
14142   cat conftest.$ac_ext >&5
14143   rm -fr conftest*
14144   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14145 fi
14146 rm -fr conftest*
14147 fi
14148
14149
14150                 # restore the LIBS
14151                 LIBS="$ol_LIBS"
14152         
14153 fi
14154
14155 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14156
14157         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14158                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14159                 ol_link_threads=posix
14160         fi
14161 fi
14162
14163                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14164 if test "$ol_link_threads" = no ; then
14165         # try -lpthreads -lmach -lexc
14166         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14167 echo "configure:14168: checking for pthread link with -lpthreads -lmach -lexc" >&5
14168 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14169   echo $ac_n "(cached) $ac_c" 1>&6
14170 else
14171   
14172                 # save the flags
14173                 ol_LIBS="$LIBS"
14174                 LIBS="-lpthreads -lmach -lexc $LIBS"
14175
14176                 if test "$cross_compiling" = yes; then
14177   cat > conftest.$ac_ext <<EOF
14178 #line 14179 "configure"
14179 #include "confdefs.h"
14180 /* pthread test headers */
14181 #include <pthread.h>
14182 #if HAVE_PTHREADS < 7
14183 #include <errno.h>
14184 #endif
14185 #ifndef NULL
14186 #define NULL (void*)0
14187 #endif
14188
14189 static void *task(p)
14190         void *p;
14191 {
14192         return (void *) (p == NULL);
14193 }
14194
14195 int main() {
14196
14197         /* pthread test function */
14198 #ifndef PTHREAD_CREATE_DETACHED
14199 #define PTHREAD_CREATE_DETACHED 1
14200 #endif
14201         pthread_t t;
14202         int status;
14203         int detach = PTHREAD_CREATE_DETACHED;
14204
14205 #if HAVE_PTHREADS > 4
14206         /* Final pthreads */
14207         pthread_attr_t attr;
14208
14209         status = pthread_attr_init(&attr);
14210         if( status ) return status;
14211
14212 #if HAVE_PTHREADS < 7
14213         status = pthread_attr_setdetachstate(&attr, &detach);
14214         if( status < 0 ) status = errno;
14215 #else
14216         status = pthread_attr_setdetachstate(&attr, detach);
14217 #endif
14218         if( status ) return status;
14219         status = pthread_create( &t, &attr, task, NULL );
14220 #if HAVE_PTHREADS < 7
14221         if( status < 0 ) status = errno;
14222 #endif
14223         if( status ) return status;
14224 #else
14225         /* Draft 4 pthreads */
14226         status = pthread_create( &t, pthread_attr_default, task, NULL );
14227         if( status ) return errno;
14228
14229         /* give thread a chance to complete */
14230         /* it should remain joinable and hence detachable */
14231         sleep( 1 );
14232
14233         status = pthread_detach( &t );
14234         if( status ) return errno;
14235 #endif
14236
14237 #ifdef HAVE_LINUX_THREADS
14238         pthread_kill_other_threads_np();
14239 #endif
14240
14241         return 0;
14242
14243 ; return 0; }
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14246   rm -rf conftest*
14247   ol_cv_pthread_lpthreads_lmach_lexc=yes
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -rf conftest*
14252   ol_cv_pthread_lpthreads_lmach_lexc=no
14253 fi
14254 rm -f conftest*
14255 else
14256   cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 /* pthread test headers */
14260 #include <pthread.h>
14261 #if HAVE_PTHREADS < 7
14262 #include <errno.h>
14263 #endif
14264 #ifndef NULL
14265 #define NULL (void*)0
14266 #endif
14267
14268 static void *task(p)
14269         void *p;
14270 {
14271         return (void *) (p == NULL);
14272 }
14273
14274
14275 int main(argc, argv)
14276         int argc;
14277         char **argv;
14278 {
14279
14280         /* pthread test function */
14281 #ifndef PTHREAD_CREATE_DETACHED
14282 #define PTHREAD_CREATE_DETACHED 1
14283 #endif
14284         pthread_t t;
14285         int status;
14286         int detach = PTHREAD_CREATE_DETACHED;
14287
14288 #if HAVE_PTHREADS > 4
14289         /* Final pthreads */
14290         pthread_attr_t attr;
14291
14292         status = pthread_attr_init(&attr);
14293         if( status ) return status;
14294
14295 #if HAVE_PTHREADS < 7
14296         status = pthread_attr_setdetachstate(&attr, &detach);
14297         if( status < 0 ) status = errno;
14298 #else
14299         status = pthread_attr_setdetachstate(&attr, detach);
14300 #endif
14301         if( status ) return status;
14302         status = pthread_create( &t, &attr, task, NULL );
14303 #if HAVE_PTHREADS < 7
14304         if( status < 0 ) status = errno;
14305 #endif
14306         if( status ) return status;
14307 #else
14308         /* Draft 4 pthreads */
14309         status = pthread_create( &t, pthread_attr_default, task, NULL );
14310         if( status ) return errno;
14311
14312         /* give thread a chance to complete */
14313         /* it should remain joinable and hence detachable */
14314         sleep( 1 );
14315
14316         status = pthread_detach( &t );
14317         if( status ) return errno;
14318 #endif
14319
14320 #ifdef HAVE_LINUX_THREADS
14321         pthread_kill_other_threads_np();
14322 #endif
14323
14324         return 0;
14325
14326 }
14327
14328 EOF
14329 if { (eval echo configure:14330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14330 then
14331   ol_cv_pthread_lpthreads_lmach_lexc=yes
14332 else
14333   echo "configure: failed program was:" >&5
14334   cat conftest.$ac_ext >&5
14335   rm -fr conftest*
14336   ol_cv_pthread_lpthreads_lmach_lexc=no
14337 fi
14338 rm -fr conftest*
14339 fi
14340
14341
14342                 # restore the LIBS
14343                 LIBS="$ol_LIBS"
14344         
14345 fi
14346
14347 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14348
14349         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14350                 ol_link_pthreads="-lpthreads -lmach -lexc"
14351                 ol_link_threads=posix
14352         fi
14353 fi
14354
14355                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14356 if test "$ol_link_threads" = no ; then
14357         # try -lpthreads -lexc
14358         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14359 echo "configure:14360: checking for pthread link with -lpthreads -lexc" >&5
14360 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14361   echo $ac_n "(cached) $ac_c" 1>&6
14362 else
14363   
14364                 # save the flags
14365                 ol_LIBS="$LIBS"
14366                 LIBS="-lpthreads -lexc $LIBS"
14367
14368                 if test "$cross_compiling" = yes; then
14369   cat > conftest.$ac_ext <<EOF
14370 #line 14371 "configure"
14371 #include "confdefs.h"
14372 /* pthread test headers */
14373 #include <pthread.h>
14374 #if HAVE_PTHREADS < 7
14375 #include <errno.h>
14376 #endif
14377 #ifndef NULL
14378 #define NULL (void*)0
14379 #endif
14380
14381 static void *task(p)
14382         void *p;
14383 {
14384         return (void *) (p == NULL);
14385 }
14386
14387 int main() {
14388
14389         /* pthread test function */
14390 #ifndef PTHREAD_CREATE_DETACHED
14391 #define PTHREAD_CREATE_DETACHED 1
14392 #endif
14393         pthread_t t;
14394         int status;
14395         int detach = PTHREAD_CREATE_DETACHED;
14396
14397 #if HAVE_PTHREADS > 4
14398         /* Final pthreads */
14399         pthread_attr_t attr;
14400
14401         status = pthread_attr_init(&attr);
14402         if( status ) return status;
14403
14404 #if HAVE_PTHREADS < 7
14405         status = pthread_attr_setdetachstate(&attr, &detach);
14406         if( status < 0 ) status = errno;
14407 #else
14408         status = pthread_attr_setdetachstate(&attr, detach);
14409 #endif
14410         if( status ) return status;
14411         status = pthread_create( &t, &attr, task, NULL );
14412 #if HAVE_PTHREADS < 7
14413         if( status < 0 ) status = errno;
14414 #endif
14415         if( status ) return status;
14416 #else
14417         /* Draft 4 pthreads */
14418         status = pthread_create( &t, pthread_attr_default, task, NULL );
14419         if( status ) return errno;
14420
14421         /* give thread a chance to complete */
14422         /* it should remain joinable and hence detachable */
14423         sleep( 1 );
14424
14425         status = pthread_detach( &t );
14426         if( status ) return errno;
14427 #endif
14428
14429 #ifdef HAVE_LINUX_THREADS
14430         pthread_kill_other_threads_np();
14431 #endif
14432
14433         return 0;
14434
14435 ; return 0; }
14436 EOF
14437 if { (eval echo configure:14438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14438   rm -rf conftest*
14439   ol_cv_pthread_lpthreads_lexc=yes
14440 else
14441   echo "configure: failed program was:" >&5
14442   cat conftest.$ac_ext >&5
14443   rm -rf conftest*
14444   ol_cv_pthread_lpthreads_lexc=no
14445 fi
14446 rm -f conftest*
14447 else
14448   cat > conftest.$ac_ext <<EOF
14449 #line 14450 "configure"
14450 #include "confdefs.h"
14451 /* pthread test headers */
14452 #include <pthread.h>
14453 #if HAVE_PTHREADS < 7
14454 #include <errno.h>
14455 #endif
14456 #ifndef NULL
14457 #define NULL (void*)0
14458 #endif
14459
14460 static void *task(p)
14461         void *p;
14462 {
14463         return (void *) (p == NULL);
14464 }
14465
14466
14467 int main(argc, argv)
14468         int argc;
14469         char **argv;
14470 {
14471
14472         /* pthread test function */
14473 #ifndef PTHREAD_CREATE_DETACHED
14474 #define PTHREAD_CREATE_DETACHED 1
14475 #endif
14476         pthread_t t;
14477         int status;
14478         int detach = PTHREAD_CREATE_DETACHED;
14479
14480 #if HAVE_PTHREADS > 4
14481         /* Final pthreads */
14482         pthread_attr_t attr;
14483
14484         status = pthread_attr_init(&attr);
14485         if( status ) return status;
14486
14487 #if HAVE_PTHREADS < 7
14488         status = pthread_attr_setdetachstate(&attr, &detach);
14489         if( status < 0 ) status = errno;
14490 #else
14491         status = pthread_attr_setdetachstate(&attr, detach);
14492 #endif
14493         if( status ) return status;
14494         status = pthread_create( &t, &attr, task, NULL );
14495 #if HAVE_PTHREADS < 7
14496         if( status < 0 ) status = errno;
14497 #endif
14498         if( status ) return status;
14499 #else
14500         /* Draft 4 pthreads */
14501         status = pthread_create( &t, pthread_attr_default, task, NULL );
14502         if( status ) return errno;
14503
14504         /* give thread a chance to complete */
14505         /* it should remain joinable and hence detachable */
14506         sleep( 1 );
14507
14508         status = pthread_detach( &t );
14509         if( status ) return errno;
14510 #endif
14511
14512 #ifdef HAVE_LINUX_THREADS
14513         pthread_kill_other_threads_np();
14514 #endif
14515
14516         return 0;
14517
14518 }
14519
14520 EOF
14521 if { (eval echo configure:14522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14522 then
14523   ol_cv_pthread_lpthreads_lexc=yes
14524 else
14525   echo "configure: failed program was:" >&5
14526   cat conftest.$ac_ext >&5
14527   rm -fr conftest*
14528   ol_cv_pthread_lpthreads_lexc=no
14529 fi
14530 rm -fr conftest*
14531 fi
14532
14533
14534                 # restore the LIBS
14535                 LIBS="$ol_LIBS"
14536         
14537 fi
14538
14539 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14540
14541         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14542                 ol_link_pthreads="-lpthreads -lexc"
14543                 ol_link_threads=posix
14544         fi
14545 fi
14546
14547
14548                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14549 if test "$ol_link_threads" = no ; then
14550         # try -lpthreads
14551         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14552 echo "configure:14553: checking for pthread link with -lpthreads" >&5
14553 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14554   echo $ac_n "(cached) $ac_c" 1>&6
14555 else
14556   
14557                 # save the flags
14558                 ol_LIBS="$LIBS"
14559                 LIBS="-lpthreads $LIBS"
14560
14561                 if test "$cross_compiling" = yes; then
14562   cat > conftest.$ac_ext <<EOF
14563 #line 14564 "configure"
14564 #include "confdefs.h"
14565 /* pthread test headers */
14566 #include <pthread.h>
14567 #if HAVE_PTHREADS < 7
14568 #include <errno.h>
14569 #endif
14570 #ifndef NULL
14571 #define NULL (void*)0
14572 #endif
14573
14574 static void *task(p)
14575         void *p;
14576 {
14577         return (void *) (p == NULL);
14578 }
14579
14580 int main() {
14581
14582         /* pthread test function */
14583 #ifndef PTHREAD_CREATE_DETACHED
14584 #define PTHREAD_CREATE_DETACHED 1
14585 #endif
14586         pthread_t t;
14587         int status;
14588         int detach = PTHREAD_CREATE_DETACHED;
14589
14590 #if HAVE_PTHREADS > 4
14591         /* Final pthreads */
14592         pthread_attr_t attr;
14593
14594         status = pthread_attr_init(&attr);
14595         if( status ) return status;
14596
14597 #if HAVE_PTHREADS < 7
14598         status = pthread_attr_setdetachstate(&attr, &detach);
14599         if( status < 0 ) status = errno;
14600 #else
14601         status = pthread_attr_setdetachstate(&attr, detach);
14602 #endif
14603         if( status ) return status;
14604         status = pthread_create( &t, &attr, task, NULL );
14605 #if HAVE_PTHREADS < 7
14606         if( status < 0 ) status = errno;
14607 #endif
14608         if( status ) return status;
14609 #else
14610         /* Draft 4 pthreads */
14611         status = pthread_create( &t, pthread_attr_default, task, NULL );
14612         if( status ) return errno;
14613
14614         /* give thread a chance to complete */
14615         /* it should remain joinable and hence detachable */
14616         sleep( 1 );
14617
14618         status = pthread_detach( &t );
14619         if( status ) return errno;
14620 #endif
14621
14622 #ifdef HAVE_LINUX_THREADS
14623         pthread_kill_other_threads_np();
14624 #endif
14625
14626         return 0;
14627
14628 ; return 0; }
14629 EOF
14630 if { (eval echo configure:14631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14631   rm -rf conftest*
14632   ol_cv_pthread_lib_lpthreads=yes
14633 else
14634   echo "configure: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   rm -rf conftest*
14637   ol_cv_pthread_lib_lpthreads=no
14638 fi
14639 rm -f conftest*
14640 else
14641   cat > conftest.$ac_ext <<EOF
14642 #line 14643 "configure"
14643 #include "confdefs.h"
14644 /* pthread test headers */
14645 #include <pthread.h>
14646 #if HAVE_PTHREADS < 7
14647 #include <errno.h>
14648 #endif
14649 #ifndef NULL
14650 #define NULL (void*)0
14651 #endif
14652
14653 static void *task(p)
14654         void *p;
14655 {
14656         return (void *) (p == NULL);
14657 }
14658
14659
14660 int main(argc, argv)
14661         int argc;
14662         char **argv;
14663 {
14664
14665         /* pthread test function */
14666 #ifndef PTHREAD_CREATE_DETACHED
14667 #define PTHREAD_CREATE_DETACHED 1
14668 #endif
14669         pthread_t t;
14670         int status;
14671         int detach = PTHREAD_CREATE_DETACHED;
14672
14673 #if HAVE_PTHREADS > 4
14674         /* Final pthreads */
14675         pthread_attr_t attr;
14676
14677         status = pthread_attr_init(&attr);
14678         if( status ) return status;
14679
14680 #if HAVE_PTHREADS < 7
14681         status = pthread_attr_setdetachstate(&attr, &detach);
14682         if( status < 0 ) status = errno;
14683 #else
14684         status = pthread_attr_setdetachstate(&attr, detach);
14685 #endif
14686         if( status ) return status;
14687         status = pthread_create( &t, &attr, task, NULL );
14688 #if HAVE_PTHREADS < 7
14689         if( status < 0 ) status = errno;
14690 #endif
14691         if( status ) return status;
14692 #else
14693         /* Draft 4 pthreads */
14694         status = pthread_create( &t, pthread_attr_default, task, NULL );
14695         if( status ) return errno;
14696
14697         /* give thread a chance to complete */
14698         /* it should remain joinable and hence detachable */
14699         sleep( 1 );
14700
14701         status = pthread_detach( &t );
14702         if( status ) return errno;
14703 #endif
14704
14705 #ifdef HAVE_LINUX_THREADS
14706         pthread_kill_other_threads_np();
14707 #endif
14708
14709         return 0;
14710
14711 }
14712
14713 EOF
14714 if { (eval echo configure:14715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14715 then
14716   ol_cv_pthread_lib_lpthreads=yes
14717 else
14718   echo "configure: failed program was:" >&5
14719   cat conftest.$ac_ext >&5
14720   rm -fr conftest*
14721   ol_cv_pthread_lib_lpthreads=no
14722 fi
14723 rm -fr conftest*
14724 fi
14725
14726
14727                 # restore the LIBS
14728                 LIBS="$ol_LIBS"
14729         
14730 fi
14731
14732 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14733
14734         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14735                 ol_link_pthreads="-lpthreads"
14736                 ol_link_threads=posix
14737         fi
14738 fi
14739
14740
14741                 if test $ol_link_threads != no ; then
14742                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14743
14744                                                 save_CPPFLAGS="$CPPFLAGS"
14745                         save_LIBS="$LIBS"
14746                         LIBS="$LTHREAD_LIBS $LIBS"
14747
14748                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14749 do
14750 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14751 echo "configure:14752: checking for $ac_func" >&5
14752 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14753   echo $ac_n "(cached) $ac_c" 1>&6
14754 else
14755   cat > conftest.$ac_ext <<EOF
14756 #line 14757 "configure"
14757 #include "confdefs.h"
14758 /* System header to define __stub macros and hopefully few prototypes,
14759     which can conflict with char $ac_func(); below.  */
14760 #include <assert.h>
14761 /* Override any gcc2 internal prototype to avoid an error.  */
14762 /* We use char because int might match the return type of a gcc2
14763     builtin and then its argument prototype would still apply.  */
14764 char $ac_func();
14765 char (*f)();
14766
14767 int main() {
14768
14769 /* The GNU C library defines this for functions which it implements
14770     to always fail with ENOSYS.  Some functions are actually named
14771     something starting with __ and the normal name is an alias.  */
14772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14773 choke me
14774 #else
14775 f = $ac_func;
14776 #endif
14777
14778 ; return 0; }
14779 EOF
14780 if { (eval echo configure:14781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14781   rm -rf conftest*
14782   eval "ac_cv_func_$ac_func=yes"
14783 else
14784   echo "configure: failed program was:" >&5
14785   cat conftest.$ac_ext >&5
14786   rm -rf conftest*
14787   eval "ac_cv_func_$ac_func=no"
14788 fi
14789 rm -f conftest*
14790 fi
14791
14792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14793   echo "$ac_t""yes" 1>&6
14794     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14795   cat >> confdefs.h <<EOF
14796 #define $ac_tr_func 1
14797 EOF
14798  
14799 else
14800   echo "$ac_t""no" 1>&6
14801 fi
14802 done
14803
14804
14805                         if test $ac_cv_func_sched_yield = no -a \
14806                                 $ac_cv_func_pthread_yield = no -a \
14807                                 $ac_cv_func_thr_yield = no ; then
14808                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14809 echo "configure:14810: checking for sched_yield in -lrt" >&5
14810 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14811 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14812   echo $ac_n "(cached) $ac_c" 1>&6
14813 else
14814   ac_save_LIBS="$LIBS"
14815 LIBS="-lrt  $LIBS"
14816 cat > conftest.$ac_ext <<EOF
14817 #line 14818 "configure"
14818 #include "confdefs.h"
14819 /* Override any gcc2 internal prototype to avoid an error.  */
14820 /* We use char because int might match the return type of a gcc2
14821     builtin and then its argument prototype would still apply.  */
14822 char sched_yield();
14823
14824 int main() {
14825 sched_yield()
14826 ; return 0; }
14827 EOF
14828 if { (eval echo configure:14829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14829   rm -rf conftest*
14830   eval "ac_cv_lib_$ac_lib_var=yes"
14831 else
14832   echo "configure: failed program was:" >&5
14833   cat conftest.$ac_ext >&5
14834   rm -rf conftest*
14835   eval "ac_cv_lib_$ac_lib_var=no"
14836 fi
14837 rm -f conftest*
14838 LIBS="$ac_save_LIBS"
14839
14840 fi
14841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14842   echo "$ac_t""yes" 1>&6
14843   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14844                                         cat >> confdefs.h <<\EOF
14845 #define HAVE_SCHED_YIELD 1
14846 EOF
14847
14848                                         ac_cv_func_sched_yield=yes
14849 else
14850   echo "$ac_t""no" 1>&6
14851 ac_cv_func_sched_yield=no
14852 fi
14853
14854                         fi
14855                         if test $ac_cv_func_sched_yield = no -a \
14856                                 $ac_cv_func_pthread_yield = no -a \
14857                                 "$ac_cv_func_thr_yield" = no ; then
14858                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14859                         fi
14860
14861                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14862 do
14863 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14864 echo "configure:14865: checking for $ac_func" >&5
14865 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14866   echo $ac_n "(cached) $ac_c" 1>&6
14867 else
14868   cat > conftest.$ac_ext <<EOF
14869 #line 14870 "configure"
14870 #include "confdefs.h"
14871 /* System header to define __stub macros and hopefully few prototypes,
14872     which can conflict with char $ac_func(); below.  */
14873 #include <assert.h>
14874 /* Override any gcc2 internal prototype to avoid an error.  */
14875 /* We use char because int might match the return type of a gcc2
14876     builtin and then its argument prototype would still apply.  */
14877 char $ac_func();
14878 char (*f)();
14879
14880 int main() {
14881
14882 /* The GNU C library defines this for functions which it implements
14883     to always fail with ENOSYS.  Some functions are actually named
14884     something starting with __ and the normal name is an alias.  */
14885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14886 choke me
14887 #else
14888 f = $ac_func;
14889 #endif
14890
14891 ; return 0; }
14892 EOF
14893 if { (eval echo configure:14894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14894   rm -rf conftest*
14895   eval "ac_cv_func_$ac_func=yes"
14896 else
14897   echo "configure: failed program was:" >&5
14898   cat conftest.$ac_ext >&5
14899   rm -rf conftest*
14900   eval "ac_cv_func_$ac_func=no"
14901 fi
14902 rm -f conftest*
14903 fi
14904
14905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14906   echo "$ac_t""yes" 1>&6
14907     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14908   cat >> confdefs.h <<EOF
14909 #define $ac_tr_func 1
14910 EOF
14911  
14912 else
14913   echo "$ac_t""no" 1>&6
14914 fi
14915 done
14916
14917
14918                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14919 echo "configure:14920: checking for pthread_detach with <pthread.h>" >&5
14920 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14921   echo $ac_n "(cached) $ac_c" 1>&6
14922 else
14923   
14924                                                                 cat > conftest.$ac_ext <<EOF
14925 #line 14926 "configure"
14926 #include "confdefs.h"
14927
14928 #include <pthread.h>
14929 #ifndef NULL
14930 #define NULL (void*)0
14931 #endif
14932
14933 int main() {
14934 pthread_detach(NULL);
14935 ; return 0; }
14936 EOF
14937 if { (eval echo configure:14938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14938   rm -rf conftest*
14939   ol_cv_func_pthread_detach=yes
14940 else
14941   echo "configure: failed program was:" >&5
14942   cat conftest.$ac_ext >&5
14943   rm -rf conftest*
14944   ol_cv_func_pthread_detach=no
14945 fi
14946 rm -f conftest*
14947                         
14948 fi
14949
14950 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14951
14952                         if test $ol_cv_func_pthread_detach = no ; then
14953                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14954                         fi
14955
14956                         cat >> confdefs.h <<\EOF
14957 #define HAVE_PTHREAD_DETACH 1
14958 EOF
14959
14960
14961                                                 for ac_func in \
14962                                 pthread_setconcurrency \
14963                                 pthread_getconcurrency \
14964                                 thr_setconcurrency \
14965                                 thr_getconcurrency \
14966                         
14967 do
14968 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14969 echo "configure:14970: checking for $ac_func" >&5
14970 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14971   echo $ac_n "(cached) $ac_c" 1>&6
14972 else
14973   cat > conftest.$ac_ext <<EOF
14974 #line 14975 "configure"
14975 #include "confdefs.h"
14976 /* System header to define __stub macros and hopefully few prototypes,
14977     which can conflict with char $ac_func(); below.  */
14978 #include <assert.h>
14979 /* Override any gcc2 internal prototype to avoid an error.  */
14980 /* We use char because int might match the return type of a gcc2
14981     builtin and then its argument prototype would still apply.  */
14982 char $ac_func();
14983 char (*f)();
14984
14985 int main() {
14986
14987 /* The GNU C library defines this for functions which it implements
14988     to always fail with ENOSYS.  Some functions are actually named
14989     something starting with __ and the normal name is an alias.  */
14990 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14991 choke me
14992 #else
14993 f = $ac_func;
14994 #endif
14995
14996 ; return 0; }
14997 EOF
14998 if { (eval echo configure:14999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14999   rm -rf conftest*
15000   eval "ac_cv_func_$ac_func=yes"
15001 else
15002   echo "configure: failed program was:" >&5
15003   cat conftest.$ac_ext >&5
15004   rm -rf conftest*
15005   eval "ac_cv_func_$ac_func=no"
15006 fi
15007 rm -f conftest*
15008 fi
15009
15010 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15011   echo "$ac_t""yes" 1>&6
15012     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15013   cat >> confdefs.h <<EOF
15014 #define $ac_tr_func 1
15015 EOF
15016  
15017 else
15018   echo "$ac_t""no" 1>&6
15019 fi
15020 done
15021
15022
15023                         
15024         for ac_func in pthread_kill_other_threads_np
15025 do
15026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15027 echo "configure:15028: checking for $ac_func" >&5
15028 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15029   echo $ac_n "(cached) $ac_c" 1>&6
15030 else
15031   cat > conftest.$ac_ext <<EOF
15032 #line 15033 "configure"
15033 #include "confdefs.h"
15034 /* System header to define __stub macros and hopefully few prototypes,
15035     which can conflict with char $ac_func(); below.  */
15036 #include <assert.h>
15037 /* Override any gcc2 internal prototype to avoid an error.  */
15038 /* We use char because int might match the return type of a gcc2
15039     builtin and then its argument prototype would still apply.  */
15040 char $ac_func();
15041 char (*f)();
15042
15043 int main() {
15044
15045 /* The GNU C library defines this for functions which it implements
15046     to always fail with ENOSYS.  Some functions are actually named
15047     something starting with __ and the normal name is an alias.  */
15048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15049 choke me
15050 #else
15051 f = $ac_func;
15052 #endif
15053
15054 ; return 0; }
15055 EOF
15056 if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15057   rm -rf conftest*
15058   eval "ac_cv_func_$ac_func=yes"
15059 else
15060   echo "configure: failed program was:" >&5
15061   cat conftest.$ac_ext >&5
15062   rm -rf conftest*
15063   eval "ac_cv_func_$ac_func=no"
15064 fi
15065 rm -f conftest*
15066 fi
15067
15068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15069   echo "$ac_t""yes" 1>&6
15070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15071   cat >> confdefs.h <<EOF
15072 #define $ac_tr_func 1
15073 EOF
15074  
15075 else
15076   echo "$ac_t""no" 1>&6
15077 fi
15078 done
15079
15080         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15081 echo "configure:15082: checking for LinuxThreads implementation" >&5
15082 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15083   echo $ac_n "(cached) $ac_c" 1>&6
15084 else
15085   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15086 fi
15087
15088 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15089
15090                         
15091         
15092         
15093         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15094 echo "configure:15095: checking for LinuxThreads consistency" >&5
15095 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15096   echo $ac_n "(cached) $ac_c" 1>&6
15097 else
15098   
15099                 if test $ol_cv_header_linux_threads = yes -a \
15100                         $ol_cv_sys_linux_threads = yes; then
15101                         ol_cv_linux_threads=yes
15102                 elif test $ol_cv_header_linux_threads = no -a \
15103                         $ol_cv_sys_linux_threads = no; then
15104                         ol_cv_linux_threads=no
15105                 else
15106                         ol_cv_linux_threads=error
15107                 fi
15108         
15109 fi
15110
15111 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15112
15113
15114                         if test $ol_cv_linux_threads = error; then
15115                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15116                         fi
15117
15118                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15119 echo "configure:15120: checking if pthread_create() works" >&5
15120 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15121   echo $ac_n "(cached) $ac_c" 1>&6
15122 else
15123   
15124                         if test "$cross_compiling" = yes; then
15125                                 ol_cv_pthread_create_works=yes
15126 else
15127   cat > conftest.$ac_ext <<EOF
15128 #line 15129 "configure"
15129 #include "confdefs.h"
15130 /* pthread test headers */
15131 #include <pthread.h>
15132 #if HAVE_PTHREADS < 7
15133 #include <errno.h>
15134 #endif
15135 #ifndef NULL
15136 #define NULL (void*)0
15137 #endif
15138
15139 static void *task(p)
15140         void *p;
15141 {
15142         return (void *) (p == NULL);
15143 }
15144
15145
15146 int main(argc, argv)
15147         int argc;
15148         char **argv;
15149 {
15150
15151         /* pthread test function */
15152 #ifndef PTHREAD_CREATE_DETACHED
15153 #define PTHREAD_CREATE_DETACHED 1
15154 #endif
15155         pthread_t t;
15156         int status;
15157         int detach = PTHREAD_CREATE_DETACHED;
15158
15159 #if HAVE_PTHREADS > 4
15160         /* Final pthreads */
15161         pthread_attr_t attr;
15162
15163         status = pthread_attr_init(&attr);
15164         if( status ) return status;
15165
15166 #if HAVE_PTHREADS < 7
15167         status = pthread_attr_setdetachstate(&attr, &detach);
15168         if( status < 0 ) status = errno;
15169 #else
15170         status = pthread_attr_setdetachstate(&attr, detach);
15171 #endif
15172         if( status ) return status;
15173         status = pthread_create( &t, &attr, task, NULL );
15174 #if HAVE_PTHREADS < 7
15175         if( status < 0 ) status = errno;
15176 #endif
15177         if( status ) return status;
15178 #else
15179         /* Draft 4 pthreads */
15180         status = pthread_create( &t, pthread_attr_default, task, NULL );
15181         if( status ) return errno;
15182
15183         /* give thread a chance to complete */
15184         /* it should remain joinable and hence detachable */
15185         sleep( 1 );
15186
15187         status = pthread_detach( &t );
15188         if( status ) return errno;
15189 #endif
15190
15191 #ifdef HAVE_LINUX_THREADS
15192         pthread_kill_other_threads_np();
15193 #endif
15194
15195         return 0;
15196
15197 }
15198
15199 EOF
15200 if { (eval echo configure:15201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15201 then
15202   ol_cv_pthread_create_works=yes
15203 else
15204   echo "configure: failed program was:" >&5
15205   cat conftest.$ac_ext >&5
15206   rm -fr conftest*
15207   ol_cv_pthread_create_works=no
15208 fi
15209 rm -fr conftest*
15210 fi
15211
15212 fi
15213
15214 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15215
15216                         if test $ol_cv_pthread_create_works = no ; then
15217                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15218                         fi
15219
15220                                                 if test $ol_with_yielding_select = auto ; then
15221                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15222 echo "configure:15223: checking if select yields when using pthreads" >&5
15223 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15224   echo $ac_n "(cached) $ac_c" 1>&6
15225 else
15226   
15227                                 if test "$cross_compiling" = yes; then
15228   ol_cv_pthread_select_yields=cross
15229 else
15230   cat > conftest.$ac_ext <<EOF
15231 #line 15232 "configure"
15232 #include "confdefs.h"
15233
15234 #include <sys/types.h>
15235 #include <sys/time.h>
15236 #include <unistd.h>
15237 #include <pthread.h>
15238 #ifndef NULL
15239 #define NULL (void*) 0
15240 #endif
15241
15242 static int fildes[2];
15243
15244 static void *task(p)
15245         void *p;
15246 {
15247         int i;
15248         struct timeval tv;
15249
15250         fd_set rfds;
15251
15252         tv.tv_sec=10;
15253         tv.tv_usec=0;
15254
15255         FD_ZERO(&rfds);
15256         FD_SET(fildes[0], &rfds);
15257
15258         /* we're not interested in any fds */
15259         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15260
15261         if(i < 0) {
15262                 perror("select");
15263                 exit(10);
15264         }
15265
15266         exit(0); /* if we exit here, the select blocked the whole process */
15267 }
15268
15269 int main(argc, argv)
15270         int argc;
15271         char **argv;
15272 {
15273         pthread_t t;
15274
15275         /* create a pipe to select */
15276         if(pipe(&fildes[0])) {
15277                 perror("select");
15278                 exit(1);
15279         }
15280
15281 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15282         (void) pthread_setconcurrency(2);
15283 #else
15284 #ifdef HAVE_THR_SETCONCURRENCY
15285         /* Set Solaris LWP concurrency to 2 */
15286         thr_setconcurrency(2);
15287 #endif
15288 #endif
15289
15290 #if HAVE_PTHREADS < 6
15291         pthread_create(&t, pthread_attr_default, task, NULL);
15292 #else
15293         pthread_create(&t, NULL, task, NULL);
15294 #endif
15295
15296         /* make sure task runs first */
15297 #if HAVE_THR_YIELD
15298         thr_yield();
15299 #elif defined( HAVE_SCHED_YIELD )
15300         sched_yield();
15301 #elif defined( HAVE_PTHREAD_YIELD )
15302         pthread_yield();
15303 #endif
15304
15305         exit(2);
15306 }
15307 EOF
15308 if { (eval echo configure:15309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15309 then
15310   ol_cv_pthread_select_yields=no
15311 else
15312   echo "configure: failed program was:" >&5
15313   cat conftest.$ac_ext >&5
15314   rm -fr conftest*
15315   ol_cv_pthread_select_yields=yes
15316 fi
15317 rm -fr conftest*
15318 fi
15319
15320 fi
15321
15322 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15323
15324                                 if test $ol_cv_pthread_select_yields = cross ; then
15325                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15326                                 fi
15327
15328                                 if test $ol_cv_pthread_select_yields = yes ; then
15329                                         ol_with_yielding_select=yes
15330                                 fi
15331                         fi
15332
15333                                                 CPPFLAGS="$save_CPPFLAGS"
15334                         LIBS="$save_LIBS"
15335                 else
15336                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15337                 fi
15338         fi
15339
15340         if test $ol_with_threads = posix ; then
15341                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15342         fi
15343 fi
15344
15345 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15346         -o $ol_with_threads = mach ; then
15347
15348                 for ac_hdr in mach/cthreads.h cthreads.h
15349 do
15350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15352 echo "configure:15353: checking for $ac_hdr" >&5
15353 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15354   echo $ac_n "(cached) $ac_c" 1>&6
15355 else
15356   cat > conftest.$ac_ext <<EOF
15357 #line 15358 "configure"
15358 #include "confdefs.h"
15359 #include <$ac_hdr>
15360 EOF
15361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15362 { (eval echo configure:15363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15364 if test -z "$ac_err"; then
15365   rm -rf conftest*
15366   eval "ac_cv_header_$ac_safe=yes"
15367 else
15368   echo "$ac_err" >&5
15369   echo "configure: failed program was:" >&5
15370   cat conftest.$ac_ext >&5
15371   rm -rf conftest*
15372   eval "ac_cv_header_$ac_safe=no"
15373 fi
15374 rm -f conftest*
15375 fi
15376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15377   echo "$ac_t""yes" 1>&6
15378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15379   cat >> confdefs.h <<EOF
15380 #define $ac_tr_hdr 1
15381 EOF
15382  
15383 else
15384   echo "$ac_t""no" 1>&6
15385 fi
15386 done
15387
15388         if test $ac_cv_header_mach_cthreads_h = yes ; then
15389                 ol_with_threads=found
15390
15391                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15392 echo "configure:15393: checking for cthread_fork" >&5
15393 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15394   echo $ac_n "(cached) $ac_c" 1>&6
15395 else
15396   cat > conftest.$ac_ext <<EOF
15397 #line 15398 "configure"
15398 #include "confdefs.h"
15399 /* System header to define __stub macros and hopefully few prototypes,
15400     which can conflict with char cthread_fork(); below.  */
15401 #include <assert.h>
15402 /* Override any gcc2 internal prototype to avoid an error.  */
15403 /* We use char because int might match the return type of a gcc2
15404     builtin and then its argument prototype would still apply.  */
15405 char cthread_fork();
15406 char (*f)();
15407
15408 int main() {
15409
15410 /* The GNU C library defines this for functions which it implements
15411     to always fail with ENOSYS.  Some functions are actually named
15412     something starting with __ and the normal name is an alias.  */
15413 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15414 choke me
15415 #else
15416 f = cthread_fork;
15417 #endif
15418
15419 ; return 0; }
15420 EOF
15421 if { (eval echo configure:15422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15422   rm -rf conftest*
15423   eval "ac_cv_func_cthread_fork=yes"
15424 else
15425   echo "configure: failed program was:" >&5
15426   cat conftest.$ac_ext >&5
15427   rm -rf conftest*
15428   eval "ac_cv_func_cthread_fork=no"
15429 fi
15430 rm -f conftest*
15431 fi
15432
15433 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15434   echo "$ac_t""yes" 1>&6
15435   ol_link_threads=yes
15436 else
15437   echo "$ac_t""no" 1>&6
15438 fi
15439
15440
15441                 if test $ol_link_threads = no ; then
15442                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15443 echo "configure:15444: checking for cthread_fork with -all_load" >&5
15444 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15445   echo $ac_n "(cached) $ac_c" 1>&6
15446 else
15447   
15448                                                                 save_LIBS="$LIBS"
15449                                 LIBS="-all_load $LIBS"
15450                                 cat > conftest.$ac_ext <<EOF
15451 #line 15452 "configure"
15452 #include "confdefs.h"
15453 #include <mach/cthreads.h>
15454 int main() {
15455
15456                                         cthread_fork((void *)0, (void *)0);
15457                                         
15458 ; return 0; }
15459 EOF
15460 if { (eval echo configure:15461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15461   rm -rf conftest*
15462   ol_cv_cthread_all_load=yes
15463 else
15464   echo "configure: failed program was:" >&5
15465   cat conftest.$ac_ext >&5
15466   rm -rf conftest*
15467   ol_cv_cthread_all_load=no
15468 fi
15469 rm -f conftest*
15470                                                                 LIBS="$save_LIBS"
15471                         
15472 fi
15473
15474 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15475
15476                         if test $ol_cv_cthread_all_load = yes ; then
15477                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15478                                 ol_link_threads=mach
15479                                 ol_with_threads=found
15480                         fi
15481                 fi
15482
15483         elif test $ac_cv_header_cthreads_h = yes ; then
15484                                 
15485                 ol_with_threads=found
15486  
15487                                 save_LIBS="$LIBS"
15488                 LIBS="$LIBS -lthreads"
15489                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15490 echo "configure:15491: checking for cthread_fork" >&5
15491 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15492   echo $ac_n "(cached) $ac_c" 1>&6
15493 else
15494   cat > conftest.$ac_ext <<EOF
15495 #line 15496 "configure"
15496 #include "confdefs.h"
15497 /* System header to define __stub macros and hopefully few prototypes,
15498     which can conflict with char cthread_fork(); below.  */
15499 #include <assert.h>
15500 /* Override any gcc2 internal prototype to avoid an error.  */
15501 /* We use char because int might match the return type of a gcc2
15502     builtin and then its argument prototype would still apply.  */
15503 char cthread_fork();
15504 char (*f)();
15505
15506 int main() {
15507
15508 /* The GNU C library defines this for functions which it implements
15509     to always fail with ENOSYS.  Some functions are actually named
15510     something starting with __ and the normal name is an alias.  */
15511 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15512 choke me
15513 #else
15514 f = cthread_fork;
15515 #endif
15516
15517 ; return 0; }
15518 EOF
15519 if { (eval echo configure:15520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15520   rm -rf conftest*
15521   eval "ac_cv_func_cthread_fork=yes"
15522 else
15523   echo "configure: failed program was:" >&5
15524   cat conftest.$ac_ext >&5
15525   rm -rf conftest*
15526   eval "ac_cv_func_cthread_fork=no"
15527 fi
15528 rm -f conftest*
15529 fi
15530
15531 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15532   echo "$ac_t""yes" 1>&6
15533   ol_link_threads=yes
15534 else
15535   echo "$ac_t""no" 1>&6
15536 fi
15537
15538                 LIBS="$save_LIBS"
15539
15540                 if test $ol_link_threads = yes ; then
15541                         LTHREAD_LIBS="-lthreads"
15542                         ol_link_threads=mach
15543                         ol_with_threads=found
15544                 else
15545                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15546                 fi
15547
15548         elif test $ol_with_threads = mach ; then
15549                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15550         fi
15551
15552         if test $ol_link_threads = mach ; then
15553                 cat >> confdefs.h <<\EOF
15554 #define HAVE_MACH_CTHREADS 1
15555 EOF
15556
15557         elif test $ol_with_threads = found ; then
15558                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15559         fi
15560 fi
15561
15562 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15563         -o $ol_with_threads = pth ; then
15564
15565         for ac_hdr in pth.h
15566 do
15567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15568 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15569 echo "configure:15570: checking for $ac_hdr" >&5
15570 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15571   echo $ac_n "(cached) $ac_c" 1>&6
15572 else
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 #include <$ac_hdr>
15577 EOF
15578 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15579 { (eval echo configure:15580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15580 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15581 if test -z "$ac_err"; then
15582   rm -rf conftest*
15583   eval "ac_cv_header_$ac_safe=yes"
15584 else
15585   echo "$ac_err" >&5
15586   echo "configure: failed program was:" >&5
15587   cat conftest.$ac_ext >&5
15588   rm -rf conftest*
15589   eval "ac_cv_header_$ac_safe=no"
15590 fi
15591 rm -f conftest*
15592 fi
15593 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15594   echo "$ac_t""yes" 1>&6
15595     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15596   cat >> confdefs.h <<EOF
15597 #define $ac_tr_hdr 1
15598 EOF
15599  
15600 else
15601   echo "$ac_t""no" 1>&6
15602 fi
15603 done
15604
15605
15606         if test $ac_cv_header_pth_h = yes ; then
15607                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15608 echo "configure:15609: checking for pth_version in -lpth" >&5
15609 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15611   echo $ac_n "(cached) $ac_c" 1>&6
15612 else
15613   ac_save_LIBS="$LIBS"
15614 LIBS="-lpth  $LIBS"
15615 cat > conftest.$ac_ext <<EOF
15616 #line 15617 "configure"
15617 #include "confdefs.h"
15618 /* Override any gcc2 internal prototype to avoid an error.  */
15619 /* We use char because int might match the return type of a gcc2
15620     builtin and then its argument prototype would still apply.  */
15621 char pth_version();
15622
15623 int main() {
15624 pth_version()
15625 ; return 0; }
15626 EOF
15627 if { (eval echo configure:15628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15628   rm -rf conftest*
15629   eval "ac_cv_lib_$ac_lib_var=yes"
15630 else
15631   echo "configure: failed program was:" >&5
15632   cat conftest.$ac_ext >&5
15633   rm -rf conftest*
15634   eval "ac_cv_lib_$ac_lib_var=no"
15635 fi
15636 rm -f conftest*
15637 LIBS="$ac_save_LIBS"
15638
15639 fi
15640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15641   echo "$ac_t""yes" 1>&6
15642   have_pth=yes
15643 else
15644   echo "$ac_t""no" 1>&6
15645 have_pth=no
15646 fi
15647
15648
15649                 if test $have_pth = yes ; then
15650                         cat >> confdefs.h <<\EOF
15651 #define HAVE_GNU_PTH 1
15652 EOF
15653
15654                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15655                         ol_link_threads=pth
15656                         ol_with_threads=found
15657
15658                         if test $ol_with_yielding_select = auto ; then
15659                                 ol_with_yielding_select=yes
15660                         fi
15661                 fi
15662         fi
15663 fi
15664
15665 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15666         -o $ol_with_threads = lwp ; then
15667
15668                 for ac_hdr in thread.h synch.h
15669 do
15670 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15671 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15672 echo "configure:15673: checking for $ac_hdr" >&5
15673 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15674   echo $ac_n "(cached) $ac_c" 1>&6
15675 else
15676   cat > conftest.$ac_ext <<EOF
15677 #line 15678 "configure"
15678 #include "confdefs.h"
15679 #include <$ac_hdr>
15680 EOF
15681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15682 { (eval echo configure:15683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15684 if test -z "$ac_err"; then
15685   rm -rf conftest*
15686   eval "ac_cv_header_$ac_safe=yes"
15687 else
15688   echo "$ac_err" >&5
15689   echo "configure: failed program was:" >&5
15690   cat conftest.$ac_ext >&5
15691   rm -rf conftest*
15692   eval "ac_cv_header_$ac_safe=no"
15693 fi
15694 rm -f conftest*
15695 fi
15696 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15697   echo "$ac_t""yes" 1>&6
15698     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15699   cat >> confdefs.h <<EOF
15700 #define $ac_tr_hdr 1
15701 EOF
15702  
15703 else
15704   echo "$ac_t""no" 1>&6
15705 fi
15706 done
15707
15708         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15709                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15710 echo "configure:15711: checking for thr_create in -lthread" >&5
15711 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15712 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15713   echo $ac_n "(cached) $ac_c" 1>&6
15714 else
15715   ac_save_LIBS="$LIBS"
15716 LIBS="-lthread  $LIBS"
15717 cat > conftest.$ac_ext <<EOF
15718 #line 15719 "configure"
15719 #include "confdefs.h"
15720 /* Override any gcc2 internal prototype to avoid an error.  */
15721 /* We use char because int might match the return type of a gcc2
15722     builtin and then its argument prototype would still apply.  */
15723 char thr_create();
15724
15725 int main() {
15726 thr_create()
15727 ; return 0; }
15728 EOF
15729 if { (eval echo configure:15730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15730   rm -rf conftest*
15731   eval "ac_cv_lib_$ac_lib_var=yes"
15732 else
15733   echo "configure: failed program was:" >&5
15734   cat conftest.$ac_ext >&5
15735   rm -rf conftest*
15736   eval "ac_cv_lib_$ac_lib_var=no"
15737 fi
15738 rm -f conftest*
15739 LIBS="$ac_save_LIBS"
15740
15741 fi
15742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15743   echo "$ac_t""yes" 1>&6
15744   have_thr=yes
15745 else
15746   echo "$ac_t""no" 1>&6
15747 have_thr=no
15748 fi
15749
15750
15751                 if test $have_thr = yes ; then
15752                         cat >> confdefs.h <<\EOF
15753 #define HAVE_THR 1
15754 EOF
15755
15756                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15757                         ol_link_threads=thr
15758
15759                         if test $ol_with_yielding_select = auto ; then
15760                                 ol_with_yielding_select=yes
15761                         fi
15762
15763                                                 for ac_func in \
15764                                 thr_setconcurrency \
15765                                 thr_getconcurrency \
15766                         
15767 do
15768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15769 echo "configure:15770: checking for $ac_func" >&5
15770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15771   echo $ac_n "(cached) $ac_c" 1>&6
15772 else
15773   cat > conftest.$ac_ext <<EOF
15774 #line 15775 "configure"
15775 #include "confdefs.h"
15776 /* System header to define __stub macros and hopefully few prototypes,
15777     which can conflict with char $ac_func(); below.  */
15778 #include <assert.h>
15779 /* Override any gcc2 internal prototype to avoid an error.  */
15780 /* We use char because int might match the return type of a gcc2
15781     builtin and then its argument prototype would still apply.  */
15782 char $ac_func();
15783 char (*f)();
15784
15785 int main() {
15786
15787 /* The GNU C library defines this for functions which it implements
15788     to always fail with ENOSYS.  Some functions are actually named
15789     something starting with __ and the normal name is an alias.  */
15790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15791 choke me
15792 #else
15793 f = $ac_func;
15794 #endif
15795
15796 ; return 0; }
15797 EOF
15798 if { (eval echo configure:15799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15799   rm -rf conftest*
15800   eval "ac_cv_func_$ac_func=yes"
15801 else
15802   echo "configure: failed program was:" >&5
15803   cat conftest.$ac_ext >&5
15804   rm -rf conftest*
15805   eval "ac_cv_func_$ac_func=no"
15806 fi
15807 rm -f conftest*
15808 fi
15809
15810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15811   echo "$ac_t""yes" 1>&6
15812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15813   cat >> confdefs.h <<EOF
15814 #define $ac_tr_func 1
15815 EOF
15816  
15817 else
15818   echo "$ac_t""no" 1>&6
15819 fi
15820 done
15821
15822                 fi
15823         fi
15824
15825                 for ac_hdr in lwp/lwp.h
15826 do
15827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15829 echo "configure:15830: checking for $ac_hdr" >&5
15830 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15831   echo $ac_n "(cached) $ac_c" 1>&6
15832 else
15833   cat > conftest.$ac_ext <<EOF
15834 #line 15835 "configure"
15835 #include "confdefs.h"
15836 #include <$ac_hdr>
15837 EOF
15838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15839 { (eval echo configure:15840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15841 if test -z "$ac_err"; then
15842   rm -rf conftest*
15843   eval "ac_cv_header_$ac_safe=yes"
15844 else
15845   echo "$ac_err" >&5
15846   echo "configure: failed program was:" >&5
15847   cat conftest.$ac_ext >&5
15848   rm -rf conftest*
15849   eval "ac_cv_header_$ac_safe=no"
15850 fi
15851 rm -f conftest*
15852 fi
15853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15854   echo "$ac_t""yes" 1>&6
15855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15856   cat >> confdefs.h <<EOF
15857 #define $ac_tr_hdr 1
15858 EOF
15859  
15860 else
15861   echo "$ac_t""no" 1>&6
15862 fi
15863 done
15864
15865         if test $ac_cv_header_lwp_lwp_h = yes ; then
15866                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15867 echo "configure:15868: checking for lwp_create in -llwp" >&5
15868 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15869 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15870   echo $ac_n "(cached) $ac_c" 1>&6
15871 else
15872   ac_save_LIBS="$LIBS"
15873 LIBS="-llwp  $LIBS"
15874 cat > conftest.$ac_ext <<EOF
15875 #line 15876 "configure"
15876 #include "confdefs.h"
15877 /* Override any gcc2 internal prototype to avoid an error.  */
15878 /* We use char because int might match the return type of a gcc2
15879     builtin and then its argument prototype would still apply.  */
15880 char lwp_create();
15881
15882 int main() {
15883 lwp_create()
15884 ; return 0; }
15885 EOF
15886 if { (eval echo configure:15887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15887   rm -rf conftest*
15888   eval "ac_cv_lib_$ac_lib_var=yes"
15889 else
15890   echo "configure: failed program was:" >&5
15891   cat conftest.$ac_ext >&5
15892   rm -rf conftest*
15893   eval "ac_cv_lib_$ac_lib_var=no"
15894 fi
15895 rm -f conftest*
15896 LIBS="$ac_save_LIBS"
15897
15898 fi
15899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15900   echo "$ac_t""yes" 1>&6
15901   have_lwp=yes
15902 else
15903   echo "$ac_t""no" 1>&6
15904 have_lwp=no
15905 fi
15906
15907
15908                 if test $have_lwp = yes ; then
15909                         cat >> confdefs.h <<\EOF
15910 #define HAVE_LWP 1
15911 EOF
15912
15913                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15914                         ol_link_threads=lwp
15915
15916                         if test $ol_with_yielding_select = auto ; then
15917                                 ol_with_yielding_select=no
15918                         fi
15919                 fi
15920         fi
15921 fi
15922
15923 if test $ol_with_yielding_select = yes ; then
15924         cat >> confdefs.h <<\EOF
15925 #define HAVE_YIELDING_SELECT 1
15926 EOF
15927
15928 fi
15929
15930 if test $ol_with_threads = manual ; then
15931                 ol_link_threads=yes
15932
15933         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15934
15935         for ac_hdr in pthread.h sched.h
15936 do
15937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15939 echo "configure:15940: checking for $ac_hdr" >&5
15940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15941   echo $ac_n "(cached) $ac_c" 1>&6
15942 else
15943   cat > conftest.$ac_ext <<EOF
15944 #line 15945 "configure"
15945 #include "confdefs.h"
15946 #include <$ac_hdr>
15947 EOF
15948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15949 { (eval echo configure:15950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15951 if test -z "$ac_err"; then
15952   rm -rf conftest*
15953   eval "ac_cv_header_$ac_safe=yes"
15954 else
15955   echo "$ac_err" >&5
15956   echo "configure: failed program was:" >&5
15957   cat conftest.$ac_ext >&5
15958   rm -rf conftest*
15959   eval "ac_cv_header_$ac_safe=no"
15960 fi
15961 rm -f conftest*
15962 fi
15963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15964   echo "$ac_t""yes" 1>&6
15965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15966   cat >> confdefs.h <<EOF
15967 #define $ac_tr_hdr 1
15968 EOF
15969  
15970 else
15971   echo "$ac_t""no" 1>&6
15972 fi
15973 done
15974
15975         for ac_func in sched_yield pthread_yield
15976 do
15977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15978 echo "configure:15979: checking for $ac_func" >&5
15979 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15980   echo $ac_n "(cached) $ac_c" 1>&6
15981 else
15982   cat > conftest.$ac_ext <<EOF
15983 #line 15984 "configure"
15984 #include "confdefs.h"
15985 /* System header to define __stub macros and hopefully few prototypes,
15986     which can conflict with char $ac_func(); below.  */
15987 #include <assert.h>
15988 /* Override any gcc2 internal prototype to avoid an error.  */
15989 /* We use char because int might match the return type of a gcc2
15990     builtin and then its argument prototype would still apply.  */
15991 char $ac_func();
15992 char (*f)();
15993
15994 int main() {
15995
15996 /* The GNU C library defines this for functions which it implements
15997     to always fail with ENOSYS.  Some functions are actually named
15998     something starting with __ and the normal name is an alias.  */
15999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16000 choke me
16001 #else
16002 f = $ac_func;
16003 #endif
16004
16005 ; return 0; }
16006 EOF
16007 if { (eval echo configure:16008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16008   rm -rf conftest*
16009   eval "ac_cv_func_$ac_func=yes"
16010 else
16011   echo "configure: failed program was:" >&5
16012   cat conftest.$ac_ext >&5
16013   rm -rf conftest*
16014   eval "ac_cv_func_$ac_func=no"
16015 fi
16016 rm -f conftest*
16017 fi
16018
16019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16020   echo "$ac_t""yes" 1>&6
16021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16022   cat >> confdefs.h <<EOF
16023 #define $ac_tr_func 1
16024 EOF
16025  
16026 else
16027   echo "$ac_t""no" 1>&6
16028 fi
16029 done
16030
16031         
16032         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16033 echo "configure:16034: checking for LinuxThreads pthread.h" >&5
16034 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16035   echo $ac_n "(cached) $ac_c" 1>&6
16036 else
16037   cat > conftest.$ac_ext <<EOF
16038 #line 16039 "configure"
16039 #include "confdefs.h"
16040 #include <pthread.h>
16041 EOF
16042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16043   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16044   rm -rf conftest*
16045   ol_cv_header_linux_threads=yes
16046 else
16047   rm -rf conftest*
16048   ol_cv_header_linux_threads=no
16049 fi
16050 rm -f conftest*
16051
16052                 
16053 fi
16054
16055 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16056         if test $ol_cv_header_linux_threads = yes; then
16057                 cat >> confdefs.h <<\EOF
16058 #define HAVE_LINUX_THREADS 1
16059 EOF
16060
16061         fi
16062
16063
16064         for ac_hdr in mach/cthreads.h
16065 do
16066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16068 echo "configure:16069: checking for $ac_hdr" >&5
16069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16070   echo $ac_n "(cached) $ac_c" 1>&6
16071 else
16072   cat > conftest.$ac_ext <<EOF
16073 #line 16074 "configure"
16074 #include "confdefs.h"
16075 #include <$ac_hdr>
16076 EOF
16077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16078 { (eval echo configure:16079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16080 if test -z "$ac_err"; then
16081   rm -rf conftest*
16082   eval "ac_cv_header_$ac_safe=yes"
16083 else
16084   echo "$ac_err" >&5
16085   echo "configure: failed program was:" >&5
16086   cat conftest.$ac_ext >&5
16087   rm -rf conftest*
16088   eval "ac_cv_header_$ac_safe=no"
16089 fi
16090 rm -f conftest*
16091 fi
16092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16093   echo "$ac_t""yes" 1>&6
16094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16095   cat >> confdefs.h <<EOF
16096 #define $ac_tr_hdr 1
16097 EOF
16098  
16099 else
16100   echo "$ac_t""no" 1>&6
16101 fi
16102 done
16103
16104         for ac_hdr in lwp/lwp.h
16105 do
16106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16108 echo "configure:16109: checking for $ac_hdr" >&5
16109 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16110   echo $ac_n "(cached) $ac_c" 1>&6
16111 else
16112   cat > conftest.$ac_ext <<EOF
16113 #line 16114 "configure"
16114 #include "confdefs.h"
16115 #include <$ac_hdr>
16116 EOF
16117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16118 { (eval echo configure:16119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16120 if test -z "$ac_err"; then
16121   rm -rf conftest*
16122   eval "ac_cv_header_$ac_safe=yes"
16123 else
16124   echo "$ac_err" >&5
16125   echo "configure: failed program was:" >&5
16126   cat conftest.$ac_ext >&5
16127   rm -rf conftest*
16128   eval "ac_cv_header_$ac_safe=no"
16129 fi
16130 rm -f conftest*
16131 fi
16132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16133   echo "$ac_t""yes" 1>&6
16134     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16135   cat >> confdefs.h <<EOF
16136 #define $ac_tr_hdr 1
16137 EOF
16138  
16139 else
16140   echo "$ac_t""no" 1>&6
16141 fi
16142 done
16143
16144         for ac_hdr in thread.h synch.h
16145 do
16146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16148 echo "configure:16149: checking for $ac_hdr" >&5
16149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16150   echo $ac_n "(cached) $ac_c" 1>&6
16151 else
16152   cat > conftest.$ac_ext <<EOF
16153 #line 16154 "configure"
16154 #include "confdefs.h"
16155 #include <$ac_hdr>
16156 EOF
16157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16158 { (eval echo configure:16159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16160 if test -z "$ac_err"; then
16161   rm -rf conftest*
16162   eval "ac_cv_header_$ac_safe=yes"
16163 else
16164   echo "$ac_err" >&5
16165   echo "configure: failed program was:" >&5
16166   cat conftest.$ac_ext >&5
16167   rm -rf conftest*
16168   eval "ac_cv_header_$ac_safe=no"
16169 fi
16170 rm -f conftest*
16171 fi
16172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16173   echo "$ac_t""yes" 1>&6
16174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16175   cat >> confdefs.h <<EOF
16176 #define $ac_tr_hdr 1
16177 EOF
16178  
16179 else
16180   echo "$ac_t""no" 1>&6
16181 fi
16182 done
16183
16184 fi
16185
16186 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16187                         cat >> confdefs.h <<\EOF
16188 #define REENTRANT 1
16189 EOF
16190
16191         cat >> confdefs.h <<\EOF
16192 #define _REENTRANT 1
16193 EOF
16194
16195         cat >> confdefs.h <<\EOF
16196 #define THREAD_SAFE 1
16197 EOF
16198
16199         cat >> confdefs.h <<\EOF
16200 #define _THREAD_SAFE 1
16201 EOF
16202
16203         cat >> confdefs.h <<\EOF
16204 #define THREADSAFE 1
16205 EOF
16206
16207         cat >> confdefs.h <<\EOF
16208 #define _THREADSAFE 1
16209 EOF
16210
16211         cat >> confdefs.h <<\EOF
16212 #define _SGI_MP_SOURCE 1
16213 EOF
16214
16215
16216                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16217 echo "configure:16218: checking for thread specific errno" >&5
16218 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   
16222                 cat > conftest.$ac_ext <<EOF
16223 #line 16224 "configure"
16224 #include "confdefs.h"
16225 #include <errno.h>
16226 int main() {
16227 errno = 0;
16228 ; return 0; }
16229 EOF
16230 if { (eval echo configure:16231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16231   rm -rf conftest*
16232   ol_cv_errno_thread_specific=yes
16233 else
16234   echo "configure: failed program was:" >&5
16235   cat conftest.$ac_ext >&5
16236   rm -rf conftest*
16237   ol_cv_errno_thread_specific=no
16238 fi
16239 rm -f conftest*
16240         
16241 fi
16242
16243 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16244
16245                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16246 echo "configure:16247: checking for thread specific h_errno" >&5
16247 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16248   echo $ac_n "(cached) $ac_c" 1>&6
16249 else
16250   
16251                 cat > conftest.$ac_ext <<EOF
16252 #line 16253 "configure"
16253 #include "confdefs.h"
16254 #include <netdb.h>
16255 int main() {
16256 h_errno = 0;
16257 ; return 0; }
16258 EOF
16259 if { (eval echo configure:16260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16260   rm -rf conftest*
16261   ol_cv_h_errno_thread_specific=yes
16262 else
16263   echo "configure: failed program was:" >&5
16264   cat conftest.$ac_ext >&5
16265   rm -rf conftest*
16266   ol_cv_h_errno_thread_specific=no
16267 fi
16268 rm -f conftest*
16269         
16270 fi
16271
16272 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16273
16274         if test $ol_cv_errno_thread_specific != yes \
16275                 -o $ol_cv_h_errno_thread_specific != yes ; then
16276                 LIBS="$LTHREAD_LIBS $LIBS"
16277                 LTHREAD_LIBS=""
16278         fi
16279
16280 fi  
16281
16282 if test $ol_link_threads = no ; then
16283         if test $ol_with_threads = yes ; then
16284                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16285         fi
16286
16287         if test $ol_with_threads = auto ; then
16288                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16289                 ol_with_threads=no
16290         fi
16291
16292         cat >> confdefs.h <<\EOF
16293 #define NO_THREADS 1
16294 EOF
16295
16296         LTHREAD_LIBS=""
16297 fi
16298
16299 if test $ol_link_threads != no ; then
16300         cat >> confdefs.h <<\EOF
16301 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16302 EOF
16303
16304 fi
16305
16306 for ac_func in \
16307         ctime_r                 \
16308         gethostbyname_r gethostbyaddr_r \
16309
16310 do
16311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16312 echo "configure:16313: checking for $ac_func" >&5
16313 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16314   echo $ac_n "(cached) $ac_c" 1>&6
16315 else
16316   cat > conftest.$ac_ext <<EOF
16317 #line 16318 "configure"
16318 #include "confdefs.h"
16319 /* System header to define __stub macros and hopefully few prototypes,
16320     which can conflict with char $ac_func(); below.  */
16321 #include <assert.h>
16322 /* Override any gcc2 internal prototype to avoid an error.  */
16323 /* We use char because int might match the return type of a gcc2
16324     builtin and then its argument prototype would still apply.  */
16325 char $ac_func();
16326 char (*f)();
16327
16328 int main() {
16329
16330 /* The GNU C library defines this for functions which it implements
16331     to always fail with ENOSYS.  Some functions are actually named
16332     something starting with __ and the normal name is an alias.  */
16333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16334 choke me
16335 #else
16336 f = $ac_func;
16337 #endif
16338
16339 ; return 0; }
16340 EOF
16341 if { (eval echo configure:16342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16342   rm -rf conftest*
16343   eval "ac_cv_func_$ac_func=yes"
16344 else
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   eval "ac_cv_func_$ac_func=no"
16349 fi
16350 rm -f conftest*
16351 fi
16352
16353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16354   echo "$ac_t""yes" 1>&6
16355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16356   cat >> confdefs.h <<EOF
16357 #define $ac_tr_func 1
16358 EOF
16359  
16360 else
16361   echo "$ac_t""no" 1>&6
16362 fi
16363 done
16364
16365
16366 if test "$ac_cv_func_ctime_r" = no ; then
16367         ol_cv_func_ctime_r_nargs=0
16368 else
16369         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16370 echo "configure:16371: checking number of arguments of ctime_r" >&5
16371 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16372   echo $ac_n "(cached) $ac_c" 1>&6
16373 else
16374   cat > conftest.$ac_ext <<EOF
16375 #line 16376 "configure"
16376 #include "confdefs.h"
16377 #include <time.h>
16378 int main() {
16379 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16380 ; return 0; }
16381 EOF
16382 if { (eval echo configure:16383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16383   rm -rf conftest*
16384   ol_cv_func_ctime_r_nargs3=yes
16385 else
16386   echo "configure: failed program was:" >&5
16387   cat conftest.$ac_ext >&5
16388   rm -rf conftest*
16389   ol_cv_func_ctime_r_nargs3=no
16390 fi
16391 rm -f conftest*
16392
16393         cat > conftest.$ac_ext <<EOF
16394 #line 16395 "configure"
16395 #include "confdefs.h"
16396 #include <time.h>
16397 int main() {
16398 time_t ti; char *buffer; ctime_r(&ti,buffer);
16399 ; return 0; }
16400 EOF
16401 if { (eval echo configure:16402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16402   rm -rf conftest*
16403   ol_cv_func_ctime_r_nargs2=yes
16404 else
16405   echo "configure: failed program was:" >&5
16406   cat conftest.$ac_ext >&5
16407   rm -rf conftest*
16408   ol_cv_func_ctime_r_nargs2=no
16409 fi
16410 rm -f conftest*
16411
16412         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16413                 $ol_cv_func_ctime_r_nargs2 = no ; then
16414
16415                 ol_cv_func_ctime_r_nargs=3
16416
16417         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16418                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16419
16420                 ol_cv_func_ctime_r_nargs=2
16421
16422         else
16423                 ol_cv_func_ctime_r_nargs=0
16424         fi
16425   
16426 fi
16427
16428 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16429
16430   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16431         cat >> confdefs.h <<EOF
16432 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16433 EOF
16434
16435   fi
16436
16437 fi
16438
16439 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16440         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16441 echo "configure:16442: checking number of arguments of gethostbyname_r" >&5
16442 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16443   echo $ac_n "(cached) $ac_c" 1>&6
16444 else
16445   cat > conftest.$ac_ext <<EOF
16446 #line 16447 "configure"
16447 #include "confdefs.h"
16448 #include <sys/types.h>
16449 #include <sys/socket.h>
16450 #include <netinet/in.h>
16451 #include <netdb.h>
16452 #define BUFSIZE (sizeof(struct hostent)+10)
16453 int main() {
16454 struct hostent hent; char buffer[BUFSIZE];
16455                 int bufsize=BUFSIZE;int h_errno;
16456                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16457                         buffer, bufsize, &h_errno);
16458 ; return 0; }
16459 EOF
16460 if { (eval echo configure:16461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16461   rm -rf conftest*
16462   ol_cv_func_gethostbyname_r_nargs5=yes
16463 else
16464   echo "configure: failed program was:" >&5
16465   cat conftest.$ac_ext >&5
16466   rm -rf conftest*
16467   ol_cv_func_gethostbyname_r_nargs5=no
16468 fi
16469 rm -f conftest*
16470
16471         cat > conftest.$ac_ext <<EOF
16472 #line 16473 "configure"
16473 #include "confdefs.h"
16474 #include <sys/types.h>
16475 #include <sys/socket.h>
16476 #include <netinet/in.h>
16477 #include <netdb.h>
16478 #define BUFSIZE (sizeof(struct hostent)+10)
16479 int main() {
16480 struct hostent hent;struct hostent *rhent;
16481                 char buffer[BUFSIZE];
16482                 int bufsize=BUFSIZE;int h_errno;
16483                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16484                         &rhent, &h_errno);
16485 ; return 0; }
16486 EOF
16487 if { (eval echo configure:16488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16488   rm -rf conftest*
16489   ol_cv_func_gethostbyname_r_nargs6=yes
16490 else
16491   echo "configure: failed program was:" >&5
16492   cat conftest.$ac_ext >&5
16493   rm -rf conftest*
16494   ol_cv_func_gethostbyname_r_nargs6=no
16495 fi
16496 rm -f conftest*
16497
16498         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16499                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16500
16501                 ol_cv_func_gethostbyname_r_nargs=5
16502
16503         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16504                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16505
16506                 ol_cv_func_gethostbyname_r_nargs=6
16507
16508         else
16509                 ol_cv_func_gethostbyname_r_nargs=0
16510         fi
16511   
16512 fi
16513
16514 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16515   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16516         cat >> confdefs.h <<EOF
16517 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16518 EOF
16519
16520   fi
16521
16522 else
16523         ol_cv_func_gethostbyname_r_nargs=0
16524 fi
16525  
16526 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16527         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16528 echo "configure:16529: checking number of arguments of gethostbyaddr_r" >&5
16529 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16530   echo $ac_n "(cached) $ac_c" 1>&6
16531 else
16532   cat > conftest.$ac_ext <<EOF
16533 #line 16534 "configure"
16534 #include "confdefs.h"
16535 #include <sys/types.h>
16536 #include <sys/socket.h>
16537 #include <netinet/in.h>
16538 #include <netdb.h>
16539 #define BUFSIZE (sizeof(struct hostent)+10)
16540 int main() {
16541 struct hostent hent; char buffer[BUFSIZE]; 
16542             struct in_addr add;
16543             size_t alen=sizeof(struct in_addr);
16544             int bufsize=BUFSIZE;int h_errno;
16545                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16546                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16547 ; return 0; }
16548 EOF
16549 if { (eval echo configure:16550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16550   rm -rf conftest*
16551   ol_cv_func_gethostbyaddr_r_nargs7=yes
16552 else
16553   echo "configure: failed program was:" >&5
16554   cat conftest.$ac_ext >&5
16555   rm -rf conftest*
16556   ol_cv_func_gethostbyaddr_r_nargs7=no
16557 fi
16558 rm -f conftest*
16559
16560         cat > conftest.$ac_ext <<EOF
16561 #line 16562 "configure"
16562 #include "confdefs.h"
16563 #include <sys/types.h>
16564 #include <sys/socket.h>
16565 #include <netinet/in.h>
16566 #include <netdb.h>
16567 #define BUFSIZE (sizeof(struct hostent)+10)
16568 int main() {
16569 struct hostent hent;
16570                 struct hostent *rhent; char buffer[BUFSIZE]; 
16571                 struct in_addr add;
16572                 size_t alen=sizeof(struct in_addr);
16573                 int bufsize=BUFSIZE;int h_errno;
16574                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16575                         alen, AF_INET, &hent, buffer, bufsize, 
16576                         &rhent, &h_errno);
16577 ; return 0; }
16578 EOF
16579 if { (eval echo configure:16580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16580   rm -rf conftest*
16581   ol_cv_func_gethostbyaddr_r_nargs8=yes
16582 else
16583   echo "configure: failed program was:" >&5
16584   cat conftest.$ac_ext >&5
16585   rm -rf conftest*
16586   ol_cv_func_gethostbyaddr_r_nargs8=no
16587 fi
16588 rm -f conftest*
16589
16590         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16591                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16592
16593                 ol_cv_func_gethostbyaddr_r_nargs=7
16594
16595         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16596                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16597
16598                 ol_cv_func_gethostbyaddr_r_nargs=8
16599
16600         else
16601                 ol_cv_func_gethostbyaddr_r_nargs=0
16602         fi
16603   
16604 fi
16605
16606 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16607   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16608     cat >> confdefs.h <<EOF
16609 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16610 EOF
16611
16612   fi
16613
16614 else
16615         ol_cv_func_gethostbyaddr_r_nargs=0
16616 fi
16617
16618 ol_link_ldbm=no 
16619
16620 if test $ol_with_ldbm_api = auto \
16621         -o $ol_with_ldbm_api = berkeley \
16622         -o $ol_with_ldbm_api = bcompat ; then
16623
16624         if test $ol_with_ldbm_api = bcompat; then \
16625                 for ac_hdr in db_185.h db.h
16626 do
16627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16629 echo "configure:16630: checking for $ac_hdr" >&5
16630 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16631   echo $ac_n "(cached) $ac_c" 1>&6
16632 else
16633   cat > conftest.$ac_ext <<EOF
16634 #line 16635 "configure"
16635 #include "confdefs.h"
16636 #include <$ac_hdr>
16637 EOF
16638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16639 { (eval echo configure:16640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16641 if test -z "$ac_err"; then
16642   rm -rf conftest*
16643   eval "ac_cv_header_$ac_safe=yes"
16644 else
16645   echo "$ac_err" >&5
16646   echo "configure: failed program was:" >&5
16647   cat conftest.$ac_ext >&5
16648   rm -rf conftest*
16649   eval "ac_cv_header_$ac_safe=no"
16650 fi
16651 rm -f conftest*
16652 fi
16653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16654   echo "$ac_t""yes" 1>&6
16655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16656   cat >> confdefs.h <<EOF
16657 #define $ac_tr_hdr 1
16658 EOF
16659  
16660 else
16661   echo "$ac_t""no" 1>&6
16662 fi
16663 done
16664
16665 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16666         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16667 echo "configure:16668: checking if Berkeley DB header compatibility" >&5
16668 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16669   echo $ac_n "(cached) $ac_c" 1>&6
16670 else
16671   
16672                 cat > conftest.$ac_ext <<EOF
16673 #line 16674 "configure"
16674 #include "confdefs.h"
16675
16676 #if HAVE_DB_185_H
16677 #       include <db_185.h>
16678 #else
16679 #       include <db.h>
16680 #endif
16681
16682  /* this check could be improved */
16683 #ifndef DB_VERSION_MAJOR
16684 #       define DB_VERSION_MAJOR 1
16685 #endif
16686
16687 #if DB_VERSION_MAJOR == 1 
16688         __db_version_1
16689 #endif
16690
16691 EOF
16692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16693   egrep "__db_version_1" >/dev/null 2>&1; then
16694   rm -rf conftest*
16695   ol_cv_header_db1=yes
16696 else
16697   rm -rf conftest*
16698   ol_cv_header_db1=no
16699 fi
16700 rm -f conftest*
16701
16702 fi
16703
16704 echo "$ac_t""$ol_cv_header_db1" 1>&6
16705
16706         if test $ol_cv_header_db1 = yes ; then
16707                 ol_cv_lib_db=no
16708 if test $ol_cv_lib_db = no ; then
16709         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16710 echo "configure:16711: checking for Berkeley DB link (default)" >&5
16711 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16712   echo $ac_n "(cached) $ac_c" 1>&6
16713 else
16714   
16715         ol_DB_LIB=
16716         ol_LIBS=$LIBS
16717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16718
16719         cat > conftest.$ac_ext <<EOF
16720 #line 16721 "configure"
16721 #include "confdefs.h"
16722
16723 #ifdef HAVE_DB_185_H
16724 # include <db_185.h>
16725 #else
16726 # include <db.h>
16727 #endif
16728
16729 #ifndef DB_VERSION_MAJOR
16730 # define DB_VERSION_MAJOR 1
16731 #endif
16732
16733 #ifndef NULL
16734 #define NULL ((void*)0)
16735 #endif
16736
16737 int main() {
16738
16739 #if DB_VERSION_MAJOR > 1
16740         {
16741                 char *version;
16742                 int major, minor, patch;
16743
16744                 version = db_version( &major, &minor, &patch );
16745
16746                 if( major != DB_VERSION_MAJOR ||
16747                         minor < DB_VERSION_MINOR )
16748                 {
16749                         printf("Berkeley DB version mismatch\n"
16750                                 "\texpected: %s\n\tgot: %s\n",
16751                                 DB_VERSION_STRING, version);
16752                         return 1;
16753                 }
16754         }
16755 #endif
16756
16757 #if DB_VERSION_MAJOR > 2
16758         db_env_create( NULL, 0 );
16759 #elif DB_VERSION_MAJOR > 1
16760         db_appexit( NULL );
16761 #else
16762         (void) dbopen( NULL, 0, 0, 0, NULL);
16763 #endif
16764
16765 ; return 0; }
16766 EOF
16767 if { (eval echo configure:16768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16768   rm -rf conftest*
16769   ol_cv_db_none=yes
16770 else
16771   echo "configure: failed program was:" >&5
16772   cat conftest.$ac_ext >&5
16773   rm -rf conftest*
16774   ol_cv_db_none=no
16775 fi
16776 rm -f conftest*
16777
16778         LIBS="$ol_LIBS"
16779
16780 fi
16781
16782 echo "$ac_t""$ol_cv_db_none" 1>&6
16783
16784         if test $ol_cv_db_none = yes ; then
16785                 ol_cv_lib_db=yes
16786         fi
16787 fi
16788
16789 if test $ol_cv_lib_db = no ; then
16790         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16791 echo "configure:16792: checking for Berkeley DB link (-ldb42)" >&5
16792 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16793   echo $ac_n "(cached) $ac_c" 1>&6
16794 else
16795   
16796         ol_DB_LIB=-ldb42
16797         ol_LIBS=$LIBS
16798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16799
16800         cat > conftest.$ac_ext <<EOF
16801 #line 16802 "configure"
16802 #include "confdefs.h"
16803
16804 #ifdef HAVE_DB_185_H
16805 # include <db_185.h>
16806 #else
16807 # include <db.h>
16808 #endif
16809
16810 #ifndef DB_VERSION_MAJOR
16811 # define DB_VERSION_MAJOR 1
16812 #endif
16813
16814 #ifndef NULL
16815 #define NULL ((void*)0)
16816 #endif
16817
16818 int main() {
16819
16820 #if DB_VERSION_MAJOR > 1
16821         {
16822                 char *version;
16823                 int major, minor, patch;
16824
16825                 version = db_version( &major, &minor, &patch );
16826
16827                 if( major != DB_VERSION_MAJOR ||
16828                         minor < DB_VERSION_MINOR )
16829                 {
16830                         printf("Berkeley DB version mismatch\n"
16831                                 "\texpected: %s\n\tgot: %s\n",
16832                                 DB_VERSION_STRING, version);
16833                         return 1;
16834                 }
16835         }
16836 #endif
16837
16838 #if DB_VERSION_MAJOR > 2
16839         db_env_create( NULL, 0 );
16840 #elif DB_VERSION_MAJOR > 1
16841         db_appexit( NULL );
16842 #else
16843         (void) dbopen( NULL, 0, 0, 0, NULL);
16844 #endif
16845
16846 ; return 0; }
16847 EOF
16848 if { (eval echo configure:16849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16849   rm -rf conftest*
16850   ol_cv_db_db42=yes
16851 else
16852   echo "configure: failed program was:" >&5
16853   cat conftest.$ac_ext >&5
16854   rm -rf conftest*
16855   ol_cv_db_db42=no
16856 fi
16857 rm -f conftest*
16858
16859         LIBS="$ol_LIBS"
16860
16861 fi
16862
16863 echo "$ac_t""$ol_cv_db_db42" 1>&6
16864
16865         if test $ol_cv_db_db42 = yes ; then
16866                 ol_cv_lib_db=-ldb42
16867         fi
16868 fi
16869
16870 if test $ol_cv_lib_db = no ; then
16871         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16872 echo "configure:16873: checking for Berkeley DB link (-ldb-42)" >&5
16873 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16874   echo $ac_n "(cached) $ac_c" 1>&6
16875 else
16876   
16877         ol_DB_LIB=-ldb-42
16878         ol_LIBS=$LIBS
16879         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16880
16881         cat > conftest.$ac_ext <<EOF
16882 #line 16883 "configure"
16883 #include "confdefs.h"
16884
16885 #ifdef HAVE_DB_185_H
16886 # include <db_185.h>
16887 #else
16888 # include <db.h>
16889 #endif
16890
16891 #ifndef DB_VERSION_MAJOR
16892 # define DB_VERSION_MAJOR 1
16893 #endif
16894
16895 #ifndef NULL
16896 #define NULL ((void*)0)
16897 #endif
16898
16899 int main() {
16900
16901 #if DB_VERSION_MAJOR > 1
16902         {
16903                 char *version;
16904                 int major, minor, patch;
16905
16906                 version = db_version( &major, &minor, &patch );
16907
16908                 if( major != DB_VERSION_MAJOR ||
16909                         minor < DB_VERSION_MINOR )
16910                 {
16911                         printf("Berkeley DB version mismatch\n"
16912                                 "\texpected: %s\n\tgot: %s\n",
16913                                 DB_VERSION_STRING, version);
16914                         return 1;
16915                 }
16916         }
16917 #endif
16918
16919 #if DB_VERSION_MAJOR > 2
16920         db_env_create( NULL, 0 );
16921 #elif DB_VERSION_MAJOR > 1
16922         db_appexit( NULL );
16923 #else
16924         (void) dbopen( NULL, 0, 0, 0, NULL);
16925 #endif
16926
16927 ; return 0; }
16928 EOF
16929 if { (eval echo configure:16930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16930   rm -rf conftest*
16931   ol_cv_db_db_42=yes
16932 else
16933   echo "configure: failed program was:" >&5
16934   cat conftest.$ac_ext >&5
16935   rm -rf conftest*
16936   ol_cv_db_db_42=no
16937 fi
16938 rm -f conftest*
16939
16940         LIBS="$ol_LIBS"
16941
16942 fi
16943
16944 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16945
16946         if test $ol_cv_db_db_42 = yes ; then
16947                 ol_cv_lib_db=-ldb-42
16948         fi
16949 fi
16950
16951 if test $ol_cv_lib_db = no ; then
16952         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16953 echo "configure:16954: checking for Berkeley DB link (-ldb-4.2)" >&5
16954 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16955   echo $ac_n "(cached) $ac_c" 1>&6
16956 else
16957   
16958         ol_DB_LIB=-ldb-4.2
16959         ol_LIBS=$LIBS
16960         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16961
16962         cat > conftest.$ac_ext <<EOF
16963 #line 16964 "configure"
16964 #include "confdefs.h"
16965
16966 #ifdef HAVE_DB_185_H
16967 # include <db_185.h>
16968 #else
16969 # include <db.h>
16970 #endif
16971
16972 #ifndef DB_VERSION_MAJOR
16973 # define DB_VERSION_MAJOR 1
16974 #endif
16975
16976 #ifndef NULL
16977 #define NULL ((void*)0)
16978 #endif
16979
16980 int main() {
16981
16982 #if DB_VERSION_MAJOR > 1
16983         {
16984                 char *version;
16985                 int major, minor, patch;
16986
16987                 version = db_version( &major, &minor, &patch );
16988
16989                 if( major != DB_VERSION_MAJOR ||
16990                         minor < DB_VERSION_MINOR )
16991                 {
16992                         printf("Berkeley DB version mismatch\n"
16993                                 "\texpected: %s\n\tgot: %s\n",
16994                                 DB_VERSION_STRING, version);
16995                         return 1;
16996                 }
16997         }
16998 #endif
16999
17000 #if DB_VERSION_MAJOR > 2
17001         db_env_create( NULL, 0 );
17002 #elif DB_VERSION_MAJOR > 1
17003         db_appexit( NULL );
17004 #else
17005         (void) dbopen( NULL, 0, 0, 0, NULL);
17006 #endif
17007
17008 ; return 0; }
17009 EOF
17010 if { (eval echo configure:17011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17011   rm -rf conftest*
17012   ol_cv_db_db_4_dot_2=yes
17013 else
17014   echo "configure: failed program was:" >&5
17015   cat conftest.$ac_ext >&5
17016   rm -rf conftest*
17017   ol_cv_db_db_4_dot_2=no
17018 fi
17019 rm -f conftest*
17020
17021         LIBS="$ol_LIBS"
17022
17023 fi
17024
17025 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17026
17027         if test $ol_cv_db_db_4_dot_2 = yes ; then
17028                 ol_cv_lib_db=-ldb-4.2
17029         fi
17030 fi
17031
17032 if test $ol_cv_lib_db = no ; then
17033         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17034 echo "configure:17035: checking for Berkeley DB link (-ldb-4-2)" >&5
17035 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17036   echo $ac_n "(cached) $ac_c" 1>&6
17037 else
17038   
17039         ol_DB_LIB=-ldb-4-2
17040         ol_LIBS=$LIBS
17041         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17042
17043         cat > conftest.$ac_ext <<EOF
17044 #line 17045 "configure"
17045 #include "confdefs.h"
17046
17047 #ifdef HAVE_DB_185_H
17048 # include <db_185.h>
17049 #else
17050 # include <db.h>
17051 #endif
17052
17053 #ifndef DB_VERSION_MAJOR
17054 # define DB_VERSION_MAJOR 1
17055 #endif
17056
17057 #ifndef NULL
17058 #define NULL ((void*)0)
17059 #endif
17060
17061 int main() {
17062
17063 #if DB_VERSION_MAJOR > 1
17064         {
17065                 char *version;
17066                 int major, minor, patch;
17067
17068                 version = db_version( &major, &minor, &patch );
17069
17070                 if( major != DB_VERSION_MAJOR ||
17071                         minor < DB_VERSION_MINOR )
17072                 {
17073                         printf("Berkeley DB version mismatch\n"
17074                                 "\texpected: %s\n\tgot: %s\n",
17075                                 DB_VERSION_STRING, version);
17076                         return 1;
17077                 }
17078         }
17079 #endif
17080
17081 #if DB_VERSION_MAJOR > 2
17082         db_env_create( NULL, 0 );
17083 #elif DB_VERSION_MAJOR > 1
17084         db_appexit( NULL );
17085 #else
17086         (void) dbopen( NULL, 0, 0, 0, NULL);
17087 #endif
17088
17089 ; return 0; }
17090 EOF
17091 if { (eval echo configure:17092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17092   rm -rf conftest*
17093   ol_cv_db_db_4_2=yes
17094 else
17095   echo "configure: failed program was:" >&5
17096   cat conftest.$ac_ext >&5
17097   rm -rf conftest*
17098   ol_cv_db_db_4_2=no
17099 fi
17100 rm -f conftest*
17101
17102         LIBS="$ol_LIBS"
17103
17104 fi
17105
17106 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17107
17108         if test $ol_cv_db_db_4_2 = yes ; then
17109                 ol_cv_lib_db=-ldb-4-2
17110         fi
17111 fi
17112
17113 if test $ol_cv_lib_db = no ; then
17114         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17115 echo "configure:17116: checking for Berkeley DB link (-ldb-4)" >&5
17116 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17117   echo $ac_n "(cached) $ac_c" 1>&6
17118 else
17119   
17120         ol_DB_LIB=-ldb-4
17121         ol_LIBS=$LIBS
17122         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17123
17124         cat > conftest.$ac_ext <<EOF
17125 #line 17126 "configure"
17126 #include "confdefs.h"
17127
17128 #ifdef HAVE_DB_185_H
17129 # include <db_185.h>
17130 #else
17131 # include <db.h>
17132 #endif
17133
17134 #ifndef DB_VERSION_MAJOR
17135 # define DB_VERSION_MAJOR 1
17136 #endif
17137
17138 #ifndef NULL
17139 #define NULL ((void*)0)
17140 #endif
17141
17142 int main() {
17143
17144 #if DB_VERSION_MAJOR > 1
17145         {
17146                 char *version;
17147                 int major, minor, patch;
17148
17149                 version = db_version( &major, &minor, &patch );
17150
17151                 if( major != DB_VERSION_MAJOR ||
17152                         minor < DB_VERSION_MINOR )
17153                 {
17154                         printf("Berkeley DB version mismatch\n"
17155                                 "\texpected: %s\n\tgot: %s\n",
17156                                 DB_VERSION_STRING, version);
17157                         return 1;
17158                 }
17159         }
17160 #endif
17161
17162 #if DB_VERSION_MAJOR > 2
17163         db_env_create( NULL, 0 );
17164 #elif DB_VERSION_MAJOR > 1
17165         db_appexit( NULL );
17166 #else
17167         (void) dbopen( NULL, 0, 0, 0, NULL);
17168 #endif
17169
17170 ; return 0; }
17171 EOF
17172 if { (eval echo configure:17173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17173   rm -rf conftest*
17174   ol_cv_db_db_4=yes
17175 else
17176   echo "configure: failed program was:" >&5
17177   cat conftest.$ac_ext >&5
17178   rm -rf conftest*
17179   ol_cv_db_db_4=no
17180 fi
17181 rm -f conftest*
17182
17183         LIBS="$ol_LIBS"
17184
17185 fi
17186
17187 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17188
17189         if test $ol_cv_db_db_4 = yes ; then
17190                 ol_cv_lib_db=-ldb-4
17191         fi
17192 fi
17193
17194 if test $ol_cv_lib_db = no ; then
17195         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17196 echo "configure:17197: checking for Berkeley DB link (-ldb4)" >&5
17197 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17198   echo $ac_n "(cached) $ac_c" 1>&6
17199 else
17200   
17201         ol_DB_LIB=-ldb4
17202         ol_LIBS=$LIBS
17203         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17204
17205         cat > conftest.$ac_ext <<EOF
17206 #line 17207 "configure"
17207 #include "confdefs.h"
17208
17209 #ifdef HAVE_DB_185_H
17210 # include <db_185.h>
17211 #else
17212 # include <db.h>
17213 #endif
17214
17215 #ifndef DB_VERSION_MAJOR
17216 # define DB_VERSION_MAJOR 1
17217 #endif
17218
17219 #ifndef NULL
17220 #define NULL ((void*)0)
17221 #endif
17222
17223 int main() {
17224
17225 #if DB_VERSION_MAJOR > 1
17226         {
17227                 char *version;
17228                 int major, minor, patch;
17229
17230                 version = db_version( &major, &minor, &patch );
17231
17232                 if( major != DB_VERSION_MAJOR ||
17233                         minor < DB_VERSION_MINOR )
17234                 {
17235                         printf("Berkeley DB version mismatch\n"
17236                                 "\texpected: %s\n\tgot: %s\n",
17237                                 DB_VERSION_STRING, version);
17238                         return 1;
17239                 }
17240         }
17241 #endif
17242
17243 #if DB_VERSION_MAJOR > 2
17244         db_env_create( NULL, 0 );
17245 #elif DB_VERSION_MAJOR > 1
17246         db_appexit( NULL );
17247 #else
17248         (void) dbopen( NULL, 0, 0, 0, NULL);
17249 #endif
17250
17251 ; return 0; }
17252 EOF
17253 if { (eval echo configure:17254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17254   rm -rf conftest*
17255   ol_cv_db_db4=yes
17256 else
17257   echo "configure: failed program was:" >&5
17258   cat conftest.$ac_ext >&5
17259   rm -rf conftest*
17260   ol_cv_db_db4=no
17261 fi
17262 rm -f conftest*
17263
17264         LIBS="$ol_LIBS"
17265
17266 fi
17267
17268 echo "$ac_t""$ol_cv_db_db4" 1>&6
17269
17270         if test $ol_cv_db_db4 = yes ; then
17271                 ol_cv_lib_db=-ldb4
17272         fi
17273 fi
17274
17275 if test $ol_cv_lib_db = no ; then
17276         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17277 echo "configure:17278: checking for Berkeley DB link (-ldb)" >&5
17278 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17279   echo $ac_n "(cached) $ac_c" 1>&6
17280 else
17281   
17282         ol_DB_LIB=-ldb
17283         ol_LIBS=$LIBS
17284         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17285
17286         cat > conftest.$ac_ext <<EOF
17287 #line 17288 "configure"
17288 #include "confdefs.h"
17289
17290 #ifdef HAVE_DB_185_H
17291 # include <db_185.h>
17292 #else
17293 # include <db.h>
17294 #endif
17295
17296 #ifndef DB_VERSION_MAJOR
17297 # define DB_VERSION_MAJOR 1
17298 #endif
17299
17300 #ifndef NULL
17301 #define NULL ((void*)0)
17302 #endif
17303
17304 int main() {
17305
17306 #if DB_VERSION_MAJOR > 1
17307         {
17308                 char *version;
17309                 int major, minor, patch;
17310
17311                 version = db_version( &major, &minor, &patch );
17312
17313                 if( major != DB_VERSION_MAJOR ||
17314                         minor < DB_VERSION_MINOR )
17315                 {
17316                         printf("Berkeley DB version mismatch\n"
17317                                 "\texpected: %s\n\tgot: %s\n",
17318                                 DB_VERSION_STRING, version);
17319                         return 1;
17320                 }
17321         }
17322 #endif
17323
17324 #if DB_VERSION_MAJOR > 2
17325         db_env_create( NULL, 0 );
17326 #elif DB_VERSION_MAJOR > 1
17327         db_appexit( NULL );
17328 #else
17329         (void) dbopen( NULL, 0, 0, 0, NULL);
17330 #endif
17331
17332 ; return 0; }
17333 EOF
17334 if { (eval echo configure:17335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17335   rm -rf conftest*
17336   ol_cv_db_db=yes
17337 else
17338   echo "configure: failed program was:" >&5
17339   cat conftest.$ac_ext >&5
17340   rm -rf conftest*
17341   ol_cv_db_db=no
17342 fi
17343 rm -f conftest*
17344
17345         LIBS="$ol_LIBS"
17346
17347 fi
17348
17349 echo "$ac_t""$ol_cv_db_db" 1>&6
17350
17351         if test $ol_cv_db_db = yes ; then
17352                 ol_cv_lib_db=-ldb
17353         fi
17354 fi
17355
17356 if test $ol_cv_lib_db = no ; then
17357         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17358 echo "configure:17359: checking for Berkeley DB link (-ldb41)" >&5
17359 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17360   echo $ac_n "(cached) $ac_c" 1>&6
17361 else
17362   
17363         ol_DB_LIB=-ldb41
17364         ol_LIBS=$LIBS
17365         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17366
17367         cat > conftest.$ac_ext <<EOF
17368 #line 17369 "configure"
17369 #include "confdefs.h"
17370
17371 #ifdef HAVE_DB_185_H
17372 # include <db_185.h>
17373 #else
17374 # include <db.h>
17375 #endif
17376
17377 #ifndef DB_VERSION_MAJOR
17378 # define DB_VERSION_MAJOR 1
17379 #endif
17380
17381 #ifndef NULL
17382 #define NULL ((void*)0)
17383 #endif
17384
17385 int main() {
17386
17387 #if DB_VERSION_MAJOR > 1
17388         {
17389                 char *version;
17390                 int major, minor, patch;
17391
17392                 version = db_version( &major, &minor, &patch );
17393
17394                 if( major != DB_VERSION_MAJOR ||
17395                         minor < DB_VERSION_MINOR )
17396                 {
17397                         printf("Berkeley DB version mismatch\n"
17398                                 "\texpected: %s\n\tgot: %s\n",
17399                                 DB_VERSION_STRING, version);
17400                         return 1;
17401                 }
17402         }
17403 #endif
17404
17405 #if DB_VERSION_MAJOR > 2
17406         db_env_create( NULL, 0 );
17407 #elif DB_VERSION_MAJOR > 1
17408         db_appexit( NULL );
17409 #else
17410         (void) dbopen( NULL, 0, 0, 0, NULL);
17411 #endif
17412
17413 ; return 0; }
17414 EOF
17415 if { (eval echo configure:17416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17416   rm -rf conftest*
17417   ol_cv_db_db41=yes
17418 else
17419   echo "configure: failed program was:" >&5
17420   cat conftest.$ac_ext >&5
17421   rm -rf conftest*
17422   ol_cv_db_db41=no
17423 fi
17424 rm -f conftest*
17425
17426         LIBS="$ol_LIBS"
17427
17428 fi
17429
17430 echo "$ac_t""$ol_cv_db_db41" 1>&6
17431
17432         if test $ol_cv_db_db41 = yes ; then
17433                 ol_cv_lib_db=-ldb41
17434         fi
17435 fi
17436
17437 if test $ol_cv_lib_db = no ; then
17438         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17439 echo "configure:17440: checking for Berkeley DB link (-ldb-41)" >&5
17440 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17441   echo $ac_n "(cached) $ac_c" 1>&6
17442 else
17443   
17444         ol_DB_LIB=-ldb-41
17445         ol_LIBS=$LIBS
17446         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17447
17448         cat > conftest.$ac_ext <<EOF
17449 #line 17450 "configure"
17450 #include "confdefs.h"
17451
17452 #ifdef HAVE_DB_185_H
17453 # include <db_185.h>
17454 #else
17455 # include <db.h>
17456 #endif
17457
17458 #ifndef DB_VERSION_MAJOR
17459 # define DB_VERSION_MAJOR 1
17460 #endif
17461
17462 #ifndef NULL
17463 #define NULL ((void*)0)
17464 #endif
17465
17466 int main() {
17467
17468 #if DB_VERSION_MAJOR > 1
17469         {
17470                 char *version;
17471                 int major, minor, patch;
17472
17473                 version = db_version( &major, &minor, &patch );
17474
17475                 if( major != DB_VERSION_MAJOR ||
17476                         minor < DB_VERSION_MINOR )
17477                 {
17478                         printf("Berkeley DB version mismatch\n"
17479                                 "\texpected: %s\n\tgot: %s\n",
17480                                 DB_VERSION_STRING, version);
17481                         return 1;
17482                 }
17483         }
17484 #endif
17485
17486 #if DB_VERSION_MAJOR > 2
17487         db_env_create( NULL, 0 );
17488 #elif DB_VERSION_MAJOR > 1
17489         db_appexit( NULL );
17490 #else
17491         (void) dbopen( NULL, 0, 0, 0, NULL);
17492 #endif
17493
17494 ; return 0; }
17495 EOF
17496 if { (eval echo configure:17497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17497   rm -rf conftest*
17498   ol_cv_db_db_41=yes
17499 else
17500   echo "configure: failed program was:" >&5
17501   cat conftest.$ac_ext >&5
17502   rm -rf conftest*
17503   ol_cv_db_db_41=no
17504 fi
17505 rm -f conftest*
17506
17507         LIBS="$ol_LIBS"
17508
17509 fi
17510
17511 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17512
17513         if test $ol_cv_db_db_41 = yes ; then
17514                 ol_cv_lib_db=-ldb-41
17515         fi
17516 fi
17517
17518 if test $ol_cv_lib_db = no ; then
17519         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17520 echo "configure:17521: checking for Berkeley DB link (-ldb-4.1)" >&5
17521 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17522   echo $ac_n "(cached) $ac_c" 1>&6
17523 else
17524   
17525         ol_DB_LIB=-ldb-4.1
17526         ol_LIBS=$LIBS
17527         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17528
17529         cat > conftest.$ac_ext <<EOF
17530 #line 17531 "configure"
17531 #include "confdefs.h"
17532
17533 #ifdef HAVE_DB_185_H
17534 # include <db_185.h>
17535 #else
17536 # include <db.h>
17537 #endif
17538
17539 #ifndef DB_VERSION_MAJOR
17540 # define DB_VERSION_MAJOR 1
17541 #endif
17542
17543 #ifndef NULL
17544 #define NULL ((void*)0)
17545 #endif
17546
17547 int main() {
17548
17549 #if DB_VERSION_MAJOR > 1
17550         {
17551                 char *version;
17552                 int major, minor, patch;
17553
17554                 version = db_version( &major, &minor, &patch );
17555
17556                 if( major != DB_VERSION_MAJOR ||
17557                         minor < DB_VERSION_MINOR )
17558                 {
17559                         printf("Berkeley DB version mismatch\n"
17560                                 "\texpected: %s\n\tgot: %s\n",
17561                                 DB_VERSION_STRING, version);
17562                         return 1;
17563                 }
17564         }
17565 #endif
17566
17567 #if DB_VERSION_MAJOR > 2
17568         db_env_create( NULL, 0 );
17569 #elif DB_VERSION_MAJOR > 1
17570         db_appexit( NULL );
17571 #else
17572         (void) dbopen( NULL, 0, 0, 0, NULL);
17573 #endif
17574
17575 ; return 0; }
17576 EOF
17577 if { (eval echo configure:17578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17578   rm -rf conftest*
17579   ol_cv_db_db_4_dot_1=yes
17580 else
17581   echo "configure: failed program was:" >&5
17582   cat conftest.$ac_ext >&5
17583   rm -rf conftest*
17584   ol_cv_db_db_4_dot_1=no
17585 fi
17586 rm -f conftest*
17587
17588         LIBS="$ol_LIBS"
17589
17590 fi
17591
17592 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17593
17594         if test $ol_cv_db_db_4_dot_1 = yes ; then
17595                 ol_cv_lib_db=-ldb-4.1
17596         fi
17597 fi
17598
17599 if test $ol_cv_lib_db = no ; then
17600         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17601 echo "configure:17602: checking for Berkeley DB link (-ldb-4-1)" >&5
17602 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17603   echo $ac_n "(cached) $ac_c" 1>&6
17604 else
17605   
17606         ol_DB_LIB=-ldb-4-1
17607         ol_LIBS=$LIBS
17608         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17609
17610         cat > conftest.$ac_ext <<EOF
17611 #line 17612 "configure"
17612 #include "confdefs.h"
17613
17614 #ifdef HAVE_DB_185_H
17615 # include <db_185.h>
17616 #else
17617 # include <db.h>
17618 #endif
17619
17620 #ifndef DB_VERSION_MAJOR
17621 # define DB_VERSION_MAJOR 1
17622 #endif
17623
17624 #ifndef NULL
17625 #define NULL ((void*)0)
17626 #endif
17627
17628 int main() {
17629
17630 #if DB_VERSION_MAJOR > 1
17631         {
17632                 char *version;
17633                 int major, minor, patch;
17634
17635                 version = db_version( &major, &minor, &patch );
17636
17637                 if( major != DB_VERSION_MAJOR ||
17638                         minor < DB_VERSION_MINOR )
17639                 {
17640                         printf("Berkeley DB version mismatch\n"
17641                                 "\texpected: %s\n\tgot: %s\n",
17642                                 DB_VERSION_STRING, version);
17643                         return 1;
17644                 }
17645         }
17646 #endif
17647
17648 #if DB_VERSION_MAJOR > 2
17649         db_env_create( NULL, 0 );
17650 #elif DB_VERSION_MAJOR > 1
17651         db_appexit( NULL );
17652 #else
17653         (void) dbopen( NULL, 0, 0, 0, NULL);
17654 #endif
17655
17656 ; return 0; }
17657 EOF
17658 if { (eval echo configure:17659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17659   rm -rf conftest*
17660   ol_cv_db_db_4_1=yes
17661 else
17662   echo "configure: failed program was:" >&5
17663   cat conftest.$ac_ext >&5
17664   rm -rf conftest*
17665   ol_cv_db_db_4_1=no
17666 fi
17667 rm -f conftest*
17668
17669         LIBS="$ol_LIBS"
17670
17671 fi
17672
17673 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17674
17675         if test $ol_cv_db_db_4_1 = yes ; then
17676                 ol_cv_lib_db=-ldb-4-1
17677         fi
17678 fi
17679
17680 if test $ol_cv_lib_db = no ; then
17681         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17682 echo "configure:17683: checking for Berkeley DB link (-ldb3)" >&5
17683 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17684   echo $ac_n "(cached) $ac_c" 1>&6
17685 else
17686   
17687         ol_DB_LIB=-ldb3
17688         ol_LIBS=$LIBS
17689         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17690
17691         cat > conftest.$ac_ext <<EOF
17692 #line 17693 "configure"
17693 #include "confdefs.h"
17694
17695 #ifdef HAVE_DB_185_H
17696 # include <db_185.h>
17697 #else
17698 # include <db.h>
17699 #endif
17700
17701 #ifndef DB_VERSION_MAJOR
17702 # define DB_VERSION_MAJOR 1
17703 #endif
17704
17705 #ifndef NULL
17706 #define NULL ((void*)0)
17707 #endif
17708
17709 int main() {
17710
17711 #if DB_VERSION_MAJOR > 1
17712         {
17713                 char *version;
17714                 int major, minor, patch;
17715
17716                 version = db_version( &major, &minor, &patch );
17717
17718                 if( major != DB_VERSION_MAJOR ||
17719                         minor < DB_VERSION_MINOR )
17720                 {
17721                         printf("Berkeley DB version mismatch\n"
17722                                 "\texpected: %s\n\tgot: %s\n",
17723                                 DB_VERSION_STRING, version);
17724                         return 1;
17725                 }
17726         }
17727 #endif
17728
17729 #if DB_VERSION_MAJOR > 2
17730         db_env_create( NULL, 0 );
17731 #elif DB_VERSION_MAJOR > 1
17732         db_appexit( NULL );
17733 #else
17734         (void) dbopen( NULL, 0, 0, 0, NULL);
17735 #endif
17736
17737 ; return 0; }
17738 EOF
17739 if { (eval echo configure:17740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17740   rm -rf conftest*
17741   ol_cv_db_db3=yes
17742 else
17743   echo "configure: failed program was:" >&5
17744   cat conftest.$ac_ext >&5
17745   rm -rf conftest*
17746   ol_cv_db_db3=no
17747 fi
17748 rm -f conftest*
17749
17750         LIBS="$ol_LIBS"
17751
17752 fi
17753
17754 echo "$ac_t""$ol_cv_db_db3" 1>&6
17755
17756         if test $ol_cv_db_db3 = yes ; then
17757                 ol_cv_lib_db=-ldb3
17758         fi
17759 fi
17760
17761 if test $ol_cv_lib_db = no ; then
17762         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17763 echo "configure:17764: checking for Berkeley DB link (-ldb-3)" >&5
17764 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17765   echo $ac_n "(cached) $ac_c" 1>&6
17766 else
17767   
17768         ol_DB_LIB=-ldb-3
17769         ol_LIBS=$LIBS
17770         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17771
17772         cat > conftest.$ac_ext <<EOF
17773 #line 17774 "configure"
17774 #include "confdefs.h"
17775
17776 #ifdef HAVE_DB_185_H
17777 # include <db_185.h>
17778 #else
17779 # include <db.h>
17780 #endif
17781
17782 #ifndef DB_VERSION_MAJOR
17783 # define DB_VERSION_MAJOR 1
17784 #endif
17785
17786 #ifndef NULL
17787 #define NULL ((void*)0)
17788 #endif
17789
17790 int main() {
17791
17792 #if DB_VERSION_MAJOR > 1
17793         {
17794                 char *version;
17795                 int major, minor, patch;
17796
17797                 version = db_version( &major, &minor, &patch );
17798
17799                 if( major != DB_VERSION_MAJOR ||
17800                         minor < DB_VERSION_MINOR )
17801                 {
17802                         printf("Berkeley DB version mismatch\n"
17803                                 "\texpected: %s\n\tgot: %s\n",
17804                                 DB_VERSION_STRING, version);
17805                         return 1;
17806                 }
17807         }
17808 #endif
17809
17810 #if DB_VERSION_MAJOR > 2
17811         db_env_create( NULL, 0 );
17812 #elif DB_VERSION_MAJOR > 1
17813         db_appexit( NULL );
17814 #else
17815         (void) dbopen( NULL, 0, 0, 0, NULL);
17816 #endif
17817
17818 ; return 0; }
17819 EOF
17820 if { (eval echo configure:17821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17821   rm -rf conftest*
17822   ol_cv_db_db_3=yes
17823 else
17824   echo "configure: failed program was:" >&5
17825   cat conftest.$ac_ext >&5
17826   rm -rf conftest*
17827   ol_cv_db_db_3=no
17828 fi
17829 rm -f conftest*
17830
17831         LIBS="$ol_LIBS"
17832
17833 fi
17834
17835 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17836
17837         if test $ol_cv_db_db_3 = yes ; then
17838                 ol_cv_lib_db=-ldb-3
17839         fi
17840 fi
17841
17842 if test $ol_cv_lib_db = no ; then
17843         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17844 echo "configure:17845: checking for Berkeley DB link (-ldb2)" >&5
17845 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17846   echo $ac_n "(cached) $ac_c" 1>&6
17847 else
17848   
17849         ol_DB_LIB=-ldb2
17850         ol_LIBS=$LIBS
17851         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17852
17853         cat > conftest.$ac_ext <<EOF
17854 #line 17855 "configure"
17855 #include "confdefs.h"
17856
17857 #ifdef HAVE_DB_185_H
17858 # include <db_185.h>
17859 #else
17860 # include <db.h>
17861 #endif
17862
17863 #ifndef DB_VERSION_MAJOR
17864 # define DB_VERSION_MAJOR 1
17865 #endif
17866
17867 #ifndef NULL
17868 #define NULL ((void*)0)
17869 #endif
17870
17871 int main() {
17872
17873 #if DB_VERSION_MAJOR > 1
17874         {
17875                 char *version;
17876                 int major, minor, patch;
17877
17878                 version = db_version( &major, &minor, &patch );
17879
17880                 if( major != DB_VERSION_MAJOR ||
17881                         minor < DB_VERSION_MINOR )
17882                 {
17883                         printf("Berkeley DB version mismatch\n"
17884                                 "\texpected: %s\n\tgot: %s\n",
17885                                 DB_VERSION_STRING, version);
17886                         return 1;
17887                 }
17888         }
17889 #endif
17890
17891 #if DB_VERSION_MAJOR > 2
17892         db_env_create( NULL, 0 );
17893 #elif DB_VERSION_MAJOR > 1
17894         db_appexit( NULL );
17895 #else
17896         (void) dbopen( NULL, 0, 0, 0, NULL);
17897 #endif
17898
17899 ; return 0; }
17900 EOF
17901 if { (eval echo configure:17902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17902   rm -rf conftest*
17903   ol_cv_db_db2=yes
17904 else
17905   echo "configure: failed program was:" >&5
17906   cat conftest.$ac_ext >&5
17907   rm -rf conftest*
17908   ol_cv_db_db2=no
17909 fi
17910 rm -f conftest*
17911
17912         LIBS="$ol_LIBS"
17913
17914 fi
17915
17916 echo "$ac_t""$ol_cv_db_db2" 1>&6
17917
17918         if test $ol_cv_db_db2 = yes ; then
17919                 ol_cv_lib_db=-ldb2
17920         fi
17921 fi
17922
17923 if test $ol_cv_lib_db = no ; then
17924         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17925 echo "configure:17926: checking for Berkeley DB link (-ldb-2)" >&5
17926 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17927   echo $ac_n "(cached) $ac_c" 1>&6
17928 else
17929   
17930         ol_DB_LIB=-ldb-2
17931         ol_LIBS=$LIBS
17932         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17933
17934         cat > conftest.$ac_ext <<EOF
17935 #line 17936 "configure"
17936 #include "confdefs.h"
17937
17938 #ifdef HAVE_DB_185_H
17939 # include <db_185.h>
17940 #else
17941 # include <db.h>
17942 #endif
17943
17944 #ifndef DB_VERSION_MAJOR
17945 # define DB_VERSION_MAJOR 1
17946 #endif
17947
17948 #ifndef NULL
17949 #define NULL ((void*)0)
17950 #endif
17951
17952 int main() {
17953
17954 #if DB_VERSION_MAJOR > 1
17955         {
17956                 char *version;
17957                 int major, minor, patch;
17958
17959                 version = db_version( &major, &minor, &patch );
17960
17961                 if( major != DB_VERSION_MAJOR ||
17962                         minor < DB_VERSION_MINOR )
17963                 {
17964                         printf("Berkeley DB version mismatch\n"
17965                                 "\texpected: %s\n\tgot: %s\n",
17966                                 DB_VERSION_STRING, version);
17967                         return 1;
17968                 }
17969         }
17970 #endif
17971
17972 #if DB_VERSION_MAJOR > 2
17973         db_env_create( NULL, 0 );
17974 #elif DB_VERSION_MAJOR > 1
17975         db_appexit( NULL );
17976 #else
17977         (void) dbopen( NULL, 0, 0, 0, NULL);
17978 #endif
17979
17980 ; return 0; }
17981 EOF
17982 if { (eval echo configure:17983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17983   rm -rf conftest*
17984   ol_cv_db_db_2=yes
17985 else
17986   echo "configure: failed program was:" >&5
17987   cat conftest.$ac_ext >&5
17988   rm -rf conftest*
17989   ol_cv_db_db_2=no
17990 fi
17991 rm -f conftest*
17992
17993         LIBS="$ol_LIBS"
17994
17995 fi
17996
17997 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17998
17999         if test $ol_cv_db_db_2 = yes ; then
18000                 ol_cv_lib_db=-ldb-2
18001         fi
18002 fi
18003
18004 if test $ol_cv_lib_db = no ; then
18005         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18006 echo "configure:18007: checking for Berkeley DB link (-ldb1)" >&5
18007 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18008   echo $ac_n "(cached) $ac_c" 1>&6
18009 else
18010   
18011         ol_DB_LIB=-ldb1
18012         ol_LIBS=$LIBS
18013         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18014
18015         cat > conftest.$ac_ext <<EOF
18016 #line 18017 "configure"
18017 #include "confdefs.h"
18018
18019 #ifdef HAVE_DB_185_H
18020 # include <db_185.h>
18021 #else
18022 # include <db.h>
18023 #endif
18024
18025 #ifndef DB_VERSION_MAJOR
18026 # define DB_VERSION_MAJOR 1
18027 #endif
18028
18029 #ifndef NULL
18030 #define NULL ((void*)0)
18031 #endif
18032
18033 int main() {
18034
18035 #if DB_VERSION_MAJOR > 1
18036         {
18037                 char *version;
18038                 int major, minor, patch;
18039
18040                 version = db_version( &major, &minor, &patch );
18041
18042                 if( major != DB_VERSION_MAJOR ||
18043                         minor < DB_VERSION_MINOR )
18044                 {
18045                         printf("Berkeley DB version mismatch\n"
18046                                 "\texpected: %s\n\tgot: %s\n",
18047                                 DB_VERSION_STRING, version);
18048                         return 1;
18049                 }
18050         }
18051 #endif
18052
18053 #if DB_VERSION_MAJOR > 2
18054         db_env_create( NULL, 0 );
18055 #elif DB_VERSION_MAJOR > 1
18056         db_appexit( NULL );
18057 #else
18058         (void) dbopen( NULL, 0, 0, 0, NULL);
18059 #endif
18060
18061 ; return 0; }
18062 EOF
18063 if { (eval echo configure:18064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18064   rm -rf conftest*
18065   ol_cv_db_db1=yes
18066 else
18067   echo "configure: failed program was:" >&5
18068   cat conftest.$ac_ext >&5
18069   rm -rf conftest*
18070   ol_cv_db_db1=no
18071 fi
18072 rm -f conftest*
18073
18074         LIBS="$ol_LIBS"
18075
18076 fi
18077
18078 echo "$ac_t""$ol_cv_db_db1" 1>&6
18079
18080         if test $ol_cv_db_db1 = yes ; then
18081                 ol_cv_lib_db=-ldb1
18082         fi
18083 fi
18084
18085 if test $ol_cv_lib_db = no ; then
18086         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18087 echo "configure:18088: checking for Berkeley DB link (-ldb-1)" >&5
18088 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18089   echo $ac_n "(cached) $ac_c" 1>&6
18090 else
18091   
18092         ol_DB_LIB=-ldb-1
18093         ol_LIBS=$LIBS
18094         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18095
18096         cat > conftest.$ac_ext <<EOF
18097 #line 18098 "configure"
18098 #include "confdefs.h"
18099
18100 #ifdef HAVE_DB_185_H
18101 # include <db_185.h>
18102 #else
18103 # include <db.h>
18104 #endif
18105
18106 #ifndef DB_VERSION_MAJOR
18107 # define DB_VERSION_MAJOR 1
18108 #endif
18109
18110 #ifndef NULL
18111 #define NULL ((void*)0)
18112 #endif
18113
18114 int main() {
18115
18116 #if DB_VERSION_MAJOR > 1
18117         {
18118                 char *version;
18119                 int major, minor, patch;
18120
18121                 version = db_version( &major, &minor, &patch );
18122
18123                 if( major != DB_VERSION_MAJOR ||
18124                         minor < DB_VERSION_MINOR )
18125                 {
18126                         printf("Berkeley DB version mismatch\n"
18127                                 "\texpected: %s\n\tgot: %s\n",
18128                                 DB_VERSION_STRING, version);
18129                         return 1;
18130                 }
18131         }
18132 #endif
18133
18134 #if DB_VERSION_MAJOR > 2
18135         db_env_create( NULL, 0 );
18136 #elif DB_VERSION_MAJOR > 1
18137         db_appexit( NULL );
18138 #else
18139         (void) dbopen( NULL, 0, 0, 0, NULL);
18140 #endif
18141
18142 ; return 0; }
18143 EOF
18144 if { (eval echo configure:18145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18145   rm -rf conftest*
18146   ol_cv_db_db_1=yes
18147 else
18148   echo "configure: failed program was:" >&5
18149   cat conftest.$ac_ext >&5
18150   rm -rf conftest*
18151   ol_cv_db_db_1=no
18152 fi
18153 rm -f conftest*
18154
18155         LIBS="$ol_LIBS"
18156
18157 fi
18158
18159 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18160
18161         if test $ol_cv_db_db_1 = yes ; then
18162                 ol_cv_lib_db=-ldb-1
18163         fi
18164 fi
18165
18166
18167                 if test "$ol_cv_lib_db" != no ; then
18168                         ol_cv_berkeley_db=yes
18169                 fi
18170         fi
18171 fi
18172
18173         else
18174                 ol_cv_berkeley_db=no
18175 for ac_hdr in db.h
18176 do
18177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18179 echo "configure:18180: checking for $ac_hdr" >&5
18180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18181   echo $ac_n "(cached) $ac_c" 1>&6
18182 else
18183   cat > conftest.$ac_ext <<EOF
18184 #line 18185 "configure"
18185 #include "confdefs.h"
18186 #include <$ac_hdr>
18187 EOF
18188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18189 { (eval echo configure:18190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18191 if test -z "$ac_err"; then
18192   rm -rf conftest*
18193   eval "ac_cv_header_$ac_safe=yes"
18194 else
18195   echo "$ac_err" >&5
18196   echo "configure: failed program was:" >&5
18197   cat conftest.$ac_ext >&5
18198   rm -rf conftest*
18199   eval "ac_cv_header_$ac_safe=no"
18200 fi
18201 rm -f conftest*
18202 fi
18203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18204   echo "$ac_t""yes" 1>&6
18205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18206   cat >> confdefs.h <<EOF
18207 #define $ac_tr_hdr 1
18208 EOF
18209  
18210 else
18211   echo "$ac_t""no" 1>&6
18212 fi
18213 done
18214
18215 if test $ac_cv_header_db_h = yes; then
18216         ol_cv_lib_db=no
18217 if test $ol_cv_lib_db = no ; then
18218         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18219 echo "configure:18220: checking for Berkeley DB link (default)" >&5
18220 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18221   echo $ac_n "(cached) $ac_c" 1>&6
18222 else
18223   
18224         ol_DB_LIB=
18225         ol_LIBS=$LIBS
18226         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18227
18228         cat > conftest.$ac_ext <<EOF
18229 #line 18230 "configure"
18230 #include "confdefs.h"
18231
18232 #ifdef HAVE_DB_185_H
18233 # include <db_185.h>
18234 #else
18235 # include <db.h>
18236 #endif
18237
18238 #ifndef DB_VERSION_MAJOR
18239 # define DB_VERSION_MAJOR 1
18240 #endif
18241
18242 #ifndef NULL
18243 #define NULL ((void*)0)
18244 #endif
18245
18246 int main() {
18247
18248 #if DB_VERSION_MAJOR > 1
18249         {
18250                 char *version;
18251                 int major, minor, patch;
18252
18253                 version = db_version( &major, &minor, &patch );
18254
18255                 if( major != DB_VERSION_MAJOR ||
18256                         minor < DB_VERSION_MINOR )
18257                 {
18258                         printf("Berkeley DB version mismatch\n"
18259                                 "\texpected: %s\n\tgot: %s\n",
18260                                 DB_VERSION_STRING, version);
18261                         return 1;
18262                 }
18263         }
18264 #endif
18265
18266 #if DB_VERSION_MAJOR > 2
18267         db_env_create( NULL, 0 );
18268 #elif DB_VERSION_MAJOR > 1
18269         db_appexit( NULL );
18270 #else
18271         (void) dbopen( NULL, 0, 0, 0, NULL);
18272 #endif
18273
18274 ; return 0; }
18275 EOF
18276 if { (eval echo configure:18277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18277   rm -rf conftest*
18278   ol_cv_db_none=yes
18279 else
18280   echo "configure: failed program was:" >&5
18281   cat conftest.$ac_ext >&5
18282   rm -rf conftest*
18283   ol_cv_db_none=no
18284 fi
18285 rm -f conftest*
18286
18287         LIBS="$ol_LIBS"
18288
18289 fi
18290
18291 echo "$ac_t""$ol_cv_db_none" 1>&6
18292
18293         if test $ol_cv_db_none = yes ; then
18294                 ol_cv_lib_db=yes
18295         fi
18296 fi
18297
18298 if test $ol_cv_lib_db = no ; then
18299         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18300 echo "configure:18301: checking for Berkeley DB link (-ldb42)" >&5
18301 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18302   echo $ac_n "(cached) $ac_c" 1>&6
18303 else
18304   
18305         ol_DB_LIB=-ldb42
18306         ol_LIBS=$LIBS
18307         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18308
18309         cat > conftest.$ac_ext <<EOF
18310 #line 18311 "configure"
18311 #include "confdefs.h"
18312
18313 #ifdef HAVE_DB_185_H
18314 # include <db_185.h>
18315 #else
18316 # include <db.h>
18317 #endif
18318
18319 #ifndef DB_VERSION_MAJOR
18320 # define DB_VERSION_MAJOR 1
18321 #endif
18322
18323 #ifndef NULL
18324 #define NULL ((void*)0)
18325 #endif
18326
18327 int main() {
18328
18329 #if DB_VERSION_MAJOR > 1
18330         {
18331                 char *version;
18332                 int major, minor, patch;
18333
18334                 version = db_version( &major, &minor, &patch );
18335
18336                 if( major != DB_VERSION_MAJOR ||
18337                         minor < DB_VERSION_MINOR )
18338                 {
18339                         printf("Berkeley DB version mismatch\n"
18340                                 "\texpected: %s\n\tgot: %s\n",
18341                                 DB_VERSION_STRING, version);
18342                         return 1;
18343                 }
18344         }
18345 #endif
18346
18347 #if DB_VERSION_MAJOR > 2
18348         db_env_create( NULL, 0 );
18349 #elif DB_VERSION_MAJOR > 1
18350         db_appexit( NULL );
18351 #else
18352         (void) dbopen( NULL, 0, 0, 0, NULL);
18353 #endif
18354
18355 ; return 0; }
18356 EOF
18357 if { (eval echo configure:18358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18358   rm -rf conftest*
18359   ol_cv_db_db42=yes
18360 else
18361   echo "configure: failed program was:" >&5
18362   cat conftest.$ac_ext >&5
18363   rm -rf conftest*
18364   ol_cv_db_db42=no
18365 fi
18366 rm -f conftest*
18367
18368         LIBS="$ol_LIBS"
18369
18370 fi
18371
18372 echo "$ac_t""$ol_cv_db_db42" 1>&6
18373
18374         if test $ol_cv_db_db42 = yes ; then
18375                 ol_cv_lib_db=-ldb42
18376         fi
18377 fi
18378
18379 if test $ol_cv_lib_db = no ; then
18380         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18381 echo "configure:18382: checking for Berkeley DB link (-ldb-42)" >&5
18382 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18383   echo $ac_n "(cached) $ac_c" 1>&6
18384 else
18385   
18386         ol_DB_LIB=-ldb-42
18387         ol_LIBS=$LIBS
18388         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18389
18390         cat > conftest.$ac_ext <<EOF
18391 #line 18392 "configure"
18392 #include "confdefs.h"
18393
18394 #ifdef HAVE_DB_185_H
18395 # include <db_185.h>
18396 #else
18397 # include <db.h>
18398 #endif
18399
18400 #ifndef DB_VERSION_MAJOR
18401 # define DB_VERSION_MAJOR 1
18402 #endif
18403
18404 #ifndef NULL
18405 #define NULL ((void*)0)
18406 #endif
18407
18408 int main() {
18409
18410 #if DB_VERSION_MAJOR > 1
18411         {
18412                 char *version;
18413                 int major, minor, patch;
18414
18415                 version = db_version( &major, &minor, &patch );
18416
18417                 if( major != DB_VERSION_MAJOR ||
18418                         minor < DB_VERSION_MINOR )
18419                 {
18420                         printf("Berkeley DB version mismatch\n"
18421                                 "\texpected: %s\n\tgot: %s\n",
18422                                 DB_VERSION_STRING, version);
18423                         return 1;
18424                 }
18425         }
18426 #endif
18427
18428 #if DB_VERSION_MAJOR > 2
18429         db_env_create( NULL, 0 );
18430 #elif DB_VERSION_MAJOR > 1
18431         db_appexit( NULL );
18432 #else
18433         (void) dbopen( NULL, 0, 0, 0, NULL);
18434 #endif
18435
18436 ; return 0; }
18437 EOF
18438 if { (eval echo configure:18439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18439   rm -rf conftest*
18440   ol_cv_db_db_42=yes
18441 else
18442   echo "configure: failed program was:" >&5
18443   cat conftest.$ac_ext >&5
18444   rm -rf conftest*
18445   ol_cv_db_db_42=no
18446 fi
18447 rm -f conftest*
18448
18449         LIBS="$ol_LIBS"
18450
18451 fi
18452
18453 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18454
18455         if test $ol_cv_db_db_42 = yes ; then
18456                 ol_cv_lib_db=-ldb-42
18457         fi
18458 fi
18459
18460 if test $ol_cv_lib_db = no ; then
18461         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18462 echo "configure:18463: checking for Berkeley DB link (-ldb-4.2)" >&5
18463 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18464   echo $ac_n "(cached) $ac_c" 1>&6
18465 else
18466   
18467         ol_DB_LIB=-ldb-4.2
18468         ol_LIBS=$LIBS
18469         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18470
18471         cat > conftest.$ac_ext <<EOF
18472 #line 18473 "configure"
18473 #include "confdefs.h"
18474
18475 #ifdef HAVE_DB_185_H
18476 # include <db_185.h>
18477 #else
18478 # include <db.h>
18479 #endif
18480
18481 #ifndef DB_VERSION_MAJOR
18482 # define DB_VERSION_MAJOR 1
18483 #endif
18484
18485 #ifndef NULL
18486 #define NULL ((void*)0)
18487 #endif
18488
18489 int main() {
18490
18491 #if DB_VERSION_MAJOR > 1
18492         {
18493                 char *version;
18494                 int major, minor, patch;
18495
18496                 version = db_version( &major, &minor, &patch );
18497
18498                 if( major != DB_VERSION_MAJOR ||
18499                         minor < DB_VERSION_MINOR )
18500                 {
18501                         printf("Berkeley DB version mismatch\n"
18502                                 "\texpected: %s\n\tgot: %s\n",
18503                                 DB_VERSION_STRING, version);
18504                         return 1;
18505                 }
18506         }
18507 #endif
18508
18509 #if DB_VERSION_MAJOR > 2
18510         db_env_create( NULL, 0 );
18511 #elif DB_VERSION_MAJOR > 1
18512         db_appexit( NULL );
18513 #else
18514         (void) dbopen( NULL, 0, 0, 0, NULL);
18515 #endif
18516
18517 ; return 0; }
18518 EOF
18519 if { (eval echo configure:18520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18520   rm -rf conftest*
18521   ol_cv_db_db_4_dot_2=yes
18522 else
18523   echo "configure: failed program was:" >&5
18524   cat conftest.$ac_ext >&5
18525   rm -rf conftest*
18526   ol_cv_db_db_4_dot_2=no
18527 fi
18528 rm -f conftest*
18529
18530         LIBS="$ol_LIBS"
18531
18532 fi
18533
18534 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18535
18536         if test $ol_cv_db_db_4_dot_2 = yes ; then
18537                 ol_cv_lib_db=-ldb-4.2
18538         fi
18539 fi
18540
18541 if test $ol_cv_lib_db = no ; then
18542         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18543 echo "configure:18544: checking for Berkeley DB link (-ldb-4-2)" >&5
18544 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18545   echo $ac_n "(cached) $ac_c" 1>&6
18546 else
18547   
18548         ol_DB_LIB=-ldb-4-2
18549         ol_LIBS=$LIBS
18550         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18551
18552         cat > conftest.$ac_ext <<EOF
18553 #line 18554 "configure"
18554 #include "confdefs.h"
18555
18556 #ifdef HAVE_DB_185_H
18557 # include <db_185.h>
18558 #else
18559 # include <db.h>
18560 #endif
18561
18562 #ifndef DB_VERSION_MAJOR
18563 # define DB_VERSION_MAJOR 1
18564 #endif
18565
18566 #ifndef NULL
18567 #define NULL ((void*)0)
18568 #endif
18569
18570 int main() {
18571
18572 #if DB_VERSION_MAJOR > 1
18573         {
18574                 char *version;
18575                 int major, minor, patch;
18576
18577                 version = db_version( &major, &minor, &patch );
18578
18579                 if( major != DB_VERSION_MAJOR ||
18580                         minor < DB_VERSION_MINOR )
18581                 {
18582                         printf("Berkeley DB version mismatch\n"
18583                                 "\texpected: %s\n\tgot: %s\n",
18584                                 DB_VERSION_STRING, version);
18585                         return 1;
18586                 }
18587         }
18588 #endif
18589
18590 #if DB_VERSION_MAJOR > 2
18591         db_env_create( NULL, 0 );
18592 #elif DB_VERSION_MAJOR > 1
18593         db_appexit( NULL );
18594 #else
18595         (void) dbopen( NULL, 0, 0, 0, NULL);
18596 #endif
18597
18598 ; return 0; }
18599 EOF
18600 if { (eval echo configure:18601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18601   rm -rf conftest*
18602   ol_cv_db_db_4_2=yes
18603 else
18604   echo "configure: failed program was:" >&5
18605   cat conftest.$ac_ext >&5
18606   rm -rf conftest*
18607   ol_cv_db_db_4_2=no
18608 fi
18609 rm -f conftest*
18610
18611         LIBS="$ol_LIBS"
18612
18613 fi
18614
18615 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18616
18617         if test $ol_cv_db_db_4_2 = yes ; then
18618                 ol_cv_lib_db=-ldb-4-2
18619         fi
18620 fi
18621
18622 if test $ol_cv_lib_db = no ; then
18623         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18624 echo "configure:18625: checking for Berkeley DB link (-ldb-4)" >&5
18625 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18626   echo $ac_n "(cached) $ac_c" 1>&6
18627 else
18628   
18629         ol_DB_LIB=-ldb-4
18630         ol_LIBS=$LIBS
18631         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18632
18633         cat > conftest.$ac_ext <<EOF
18634 #line 18635 "configure"
18635 #include "confdefs.h"
18636
18637 #ifdef HAVE_DB_185_H
18638 # include <db_185.h>
18639 #else
18640 # include <db.h>
18641 #endif
18642
18643 #ifndef DB_VERSION_MAJOR
18644 # define DB_VERSION_MAJOR 1
18645 #endif
18646
18647 #ifndef NULL
18648 #define NULL ((void*)0)
18649 #endif
18650
18651 int main() {
18652
18653 #if DB_VERSION_MAJOR > 1
18654         {
18655                 char *version;
18656                 int major, minor, patch;
18657
18658                 version = db_version( &major, &minor, &patch );
18659
18660                 if( major != DB_VERSION_MAJOR ||
18661                         minor < DB_VERSION_MINOR )
18662                 {
18663                         printf("Berkeley DB version mismatch\n"
18664                                 "\texpected: %s\n\tgot: %s\n",
18665                                 DB_VERSION_STRING, version);
18666                         return 1;
18667                 }
18668         }
18669 #endif
18670
18671 #if DB_VERSION_MAJOR > 2
18672         db_env_create( NULL, 0 );
18673 #elif DB_VERSION_MAJOR > 1
18674         db_appexit( NULL );
18675 #else
18676         (void) dbopen( NULL, 0, 0, 0, NULL);
18677 #endif
18678
18679 ; return 0; }
18680 EOF
18681 if { (eval echo configure:18682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18682   rm -rf conftest*
18683   ol_cv_db_db_4=yes
18684 else
18685   echo "configure: failed program was:" >&5
18686   cat conftest.$ac_ext >&5
18687   rm -rf conftest*
18688   ol_cv_db_db_4=no
18689 fi
18690 rm -f conftest*
18691
18692         LIBS="$ol_LIBS"
18693
18694 fi
18695
18696 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18697
18698         if test $ol_cv_db_db_4 = yes ; then
18699                 ol_cv_lib_db=-ldb-4
18700         fi
18701 fi
18702
18703 if test $ol_cv_lib_db = no ; then
18704         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18705 echo "configure:18706: checking for Berkeley DB link (-ldb4)" >&5
18706 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18707   echo $ac_n "(cached) $ac_c" 1>&6
18708 else
18709   
18710         ol_DB_LIB=-ldb4
18711         ol_LIBS=$LIBS
18712         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18713
18714         cat > conftest.$ac_ext <<EOF
18715 #line 18716 "configure"
18716 #include "confdefs.h"
18717
18718 #ifdef HAVE_DB_185_H
18719 # include <db_185.h>
18720 #else
18721 # include <db.h>
18722 #endif
18723
18724 #ifndef DB_VERSION_MAJOR
18725 # define DB_VERSION_MAJOR 1
18726 #endif
18727
18728 #ifndef NULL
18729 #define NULL ((void*)0)
18730 #endif
18731
18732 int main() {
18733
18734 #if DB_VERSION_MAJOR > 1
18735         {
18736                 char *version;
18737                 int major, minor, patch;
18738
18739                 version = db_version( &major, &minor, &patch );
18740
18741                 if( major != DB_VERSION_MAJOR ||
18742                         minor < DB_VERSION_MINOR )
18743                 {
18744                         printf("Berkeley DB version mismatch\n"
18745                                 "\texpected: %s\n\tgot: %s\n",
18746                                 DB_VERSION_STRING, version);
18747                         return 1;
18748                 }
18749         }
18750 #endif
18751
18752 #if DB_VERSION_MAJOR > 2
18753         db_env_create( NULL, 0 );
18754 #elif DB_VERSION_MAJOR > 1
18755         db_appexit( NULL );
18756 #else
18757         (void) dbopen( NULL, 0, 0, 0, NULL);
18758 #endif
18759
18760 ; return 0; }
18761 EOF
18762 if { (eval echo configure:18763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18763   rm -rf conftest*
18764   ol_cv_db_db4=yes
18765 else
18766   echo "configure: failed program was:" >&5
18767   cat conftest.$ac_ext >&5
18768   rm -rf conftest*
18769   ol_cv_db_db4=no
18770 fi
18771 rm -f conftest*
18772
18773         LIBS="$ol_LIBS"
18774
18775 fi
18776
18777 echo "$ac_t""$ol_cv_db_db4" 1>&6
18778
18779         if test $ol_cv_db_db4 = yes ; then
18780                 ol_cv_lib_db=-ldb4
18781         fi
18782 fi
18783
18784 if test $ol_cv_lib_db = no ; then
18785         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18786 echo "configure:18787: checking for Berkeley DB link (-ldb)" >&5
18787 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18788   echo $ac_n "(cached) $ac_c" 1>&6
18789 else
18790   
18791         ol_DB_LIB=-ldb
18792         ol_LIBS=$LIBS
18793         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18794
18795         cat > conftest.$ac_ext <<EOF
18796 #line 18797 "configure"
18797 #include "confdefs.h"
18798
18799 #ifdef HAVE_DB_185_H
18800 # include <db_185.h>
18801 #else
18802 # include <db.h>
18803 #endif
18804
18805 #ifndef DB_VERSION_MAJOR
18806 # define DB_VERSION_MAJOR 1
18807 #endif
18808
18809 #ifndef NULL
18810 #define NULL ((void*)0)
18811 #endif
18812
18813 int main() {
18814
18815 #if DB_VERSION_MAJOR > 1
18816         {
18817                 char *version;
18818                 int major, minor, patch;
18819
18820                 version = db_version( &major, &minor, &patch );
18821
18822                 if( major != DB_VERSION_MAJOR ||
18823                         minor < DB_VERSION_MINOR )
18824                 {
18825                         printf("Berkeley DB version mismatch\n"
18826                                 "\texpected: %s\n\tgot: %s\n",
18827                                 DB_VERSION_STRING, version);
18828                         return 1;
18829                 }
18830         }
18831 #endif
18832
18833 #if DB_VERSION_MAJOR > 2
18834         db_env_create( NULL, 0 );
18835 #elif DB_VERSION_MAJOR > 1
18836         db_appexit( NULL );
18837 #else
18838         (void) dbopen( NULL, 0, 0, 0, NULL);
18839 #endif
18840
18841 ; return 0; }
18842 EOF
18843 if { (eval echo configure:18844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18844   rm -rf conftest*
18845   ol_cv_db_db=yes
18846 else
18847   echo "configure: failed program was:" >&5
18848   cat conftest.$ac_ext >&5
18849   rm -rf conftest*
18850   ol_cv_db_db=no
18851 fi
18852 rm -f conftest*
18853
18854         LIBS="$ol_LIBS"
18855
18856 fi
18857
18858 echo "$ac_t""$ol_cv_db_db" 1>&6
18859
18860         if test $ol_cv_db_db = yes ; then
18861                 ol_cv_lib_db=-ldb
18862         fi
18863 fi
18864
18865 if test $ol_cv_lib_db = no ; then
18866         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18867 echo "configure:18868: checking for Berkeley DB link (-ldb41)" >&5
18868 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18869   echo $ac_n "(cached) $ac_c" 1>&6
18870 else
18871   
18872         ol_DB_LIB=-ldb41
18873         ol_LIBS=$LIBS
18874         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18875
18876         cat > conftest.$ac_ext <<EOF
18877 #line 18878 "configure"
18878 #include "confdefs.h"
18879
18880 #ifdef HAVE_DB_185_H
18881 # include <db_185.h>
18882 #else
18883 # include <db.h>
18884 #endif
18885
18886 #ifndef DB_VERSION_MAJOR
18887 # define DB_VERSION_MAJOR 1
18888 #endif
18889
18890 #ifndef NULL
18891 #define NULL ((void*)0)
18892 #endif
18893
18894 int main() {
18895
18896 #if DB_VERSION_MAJOR > 1
18897         {
18898                 char *version;
18899                 int major, minor, patch;
18900
18901                 version = db_version( &major, &minor, &patch );
18902
18903                 if( major != DB_VERSION_MAJOR ||
18904                         minor < DB_VERSION_MINOR )
18905                 {
18906                         printf("Berkeley DB version mismatch\n"
18907                                 "\texpected: %s\n\tgot: %s\n",
18908                                 DB_VERSION_STRING, version);
18909                         return 1;
18910                 }
18911         }
18912 #endif
18913
18914 #if DB_VERSION_MAJOR > 2
18915         db_env_create( NULL, 0 );
18916 #elif DB_VERSION_MAJOR > 1
18917         db_appexit( NULL );
18918 #else
18919         (void) dbopen( NULL, 0, 0, 0, NULL);
18920 #endif
18921
18922 ; return 0; }
18923 EOF
18924 if { (eval echo configure:18925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18925   rm -rf conftest*
18926   ol_cv_db_db41=yes
18927 else
18928   echo "configure: failed program was:" >&5
18929   cat conftest.$ac_ext >&5
18930   rm -rf conftest*
18931   ol_cv_db_db41=no
18932 fi
18933 rm -f conftest*
18934
18935         LIBS="$ol_LIBS"
18936
18937 fi
18938
18939 echo "$ac_t""$ol_cv_db_db41" 1>&6
18940
18941         if test $ol_cv_db_db41 = yes ; then
18942                 ol_cv_lib_db=-ldb41
18943         fi
18944 fi
18945
18946 if test $ol_cv_lib_db = no ; then
18947         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18948 echo "configure:18949: checking for Berkeley DB link (-ldb-41)" >&5
18949 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18950   echo $ac_n "(cached) $ac_c" 1>&6
18951 else
18952   
18953         ol_DB_LIB=-ldb-41
18954         ol_LIBS=$LIBS
18955         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18956
18957         cat > conftest.$ac_ext <<EOF
18958 #line 18959 "configure"
18959 #include "confdefs.h"
18960
18961 #ifdef HAVE_DB_185_H
18962 # include <db_185.h>
18963 #else
18964 # include <db.h>
18965 #endif
18966
18967 #ifndef DB_VERSION_MAJOR
18968 # define DB_VERSION_MAJOR 1
18969 #endif
18970
18971 #ifndef NULL
18972 #define NULL ((void*)0)
18973 #endif
18974
18975 int main() {
18976
18977 #if DB_VERSION_MAJOR > 1
18978         {
18979                 char *version;
18980                 int major, minor, patch;
18981
18982                 version = db_version( &major, &minor, &patch );
18983
18984                 if( major != DB_VERSION_MAJOR ||
18985                         minor < DB_VERSION_MINOR )
18986                 {
18987                         printf("Berkeley DB version mismatch\n"
18988                                 "\texpected: %s\n\tgot: %s\n",
18989                                 DB_VERSION_STRING, version);
18990                         return 1;
18991                 }
18992         }
18993 #endif
18994
18995 #if DB_VERSION_MAJOR > 2
18996         db_env_create( NULL, 0 );
18997 #elif DB_VERSION_MAJOR > 1
18998         db_appexit( NULL );
18999 #else
19000         (void) dbopen( NULL, 0, 0, 0, NULL);
19001 #endif
19002
19003 ; return 0; }
19004 EOF
19005 if { (eval echo configure:19006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19006   rm -rf conftest*
19007   ol_cv_db_db_41=yes
19008 else
19009   echo "configure: failed program was:" >&5
19010   cat conftest.$ac_ext >&5
19011   rm -rf conftest*
19012   ol_cv_db_db_41=no
19013 fi
19014 rm -f conftest*
19015
19016         LIBS="$ol_LIBS"
19017
19018 fi
19019
19020 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19021
19022         if test $ol_cv_db_db_41 = yes ; then
19023                 ol_cv_lib_db=-ldb-41
19024         fi
19025 fi
19026
19027 if test $ol_cv_lib_db = no ; then
19028         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19029 echo "configure:19030: checking for Berkeley DB link (-ldb-4.1)" >&5
19030 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19031   echo $ac_n "(cached) $ac_c" 1>&6
19032 else
19033   
19034         ol_DB_LIB=-ldb-4.1
19035         ol_LIBS=$LIBS
19036         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19037
19038         cat > conftest.$ac_ext <<EOF
19039 #line 19040 "configure"
19040 #include "confdefs.h"
19041
19042 #ifdef HAVE_DB_185_H
19043 # include <db_185.h>
19044 #else
19045 # include <db.h>
19046 #endif
19047
19048 #ifndef DB_VERSION_MAJOR
19049 # define DB_VERSION_MAJOR 1
19050 #endif
19051
19052 #ifndef NULL
19053 #define NULL ((void*)0)
19054 #endif
19055
19056 int main() {
19057
19058 #if DB_VERSION_MAJOR > 1
19059         {
19060                 char *version;
19061                 int major, minor, patch;
19062
19063                 version = db_version( &major, &minor, &patch );
19064
19065                 if( major != DB_VERSION_MAJOR ||
19066                         minor < DB_VERSION_MINOR )
19067                 {
19068                         printf("Berkeley DB version mismatch\n"
19069                                 "\texpected: %s\n\tgot: %s\n",
19070                                 DB_VERSION_STRING, version);
19071                         return 1;
19072                 }
19073         }
19074 #endif
19075
19076 #if DB_VERSION_MAJOR > 2
19077         db_env_create( NULL, 0 );
19078 #elif DB_VERSION_MAJOR > 1
19079         db_appexit( NULL );
19080 #else
19081         (void) dbopen( NULL, 0, 0, 0, NULL);
19082 #endif
19083
19084 ; return 0; }
19085 EOF
19086 if { (eval echo configure:19087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19087   rm -rf conftest*
19088   ol_cv_db_db_4_dot_1=yes
19089 else
19090   echo "configure: failed program was:" >&5
19091   cat conftest.$ac_ext >&5
19092   rm -rf conftest*
19093   ol_cv_db_db_4_dot_1=no
19094 fi
19095 rm -f conftest*
19096
19097         LIBS="$ol_LIBS"
19098
19099 fi
19100
19101 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19102
19103         if test $ol_cv_db_db_4_dot_1 = yes ; then
19104                 ol_cv_lib_db=-ldb-4.1
19105         fi
19106 fi
19107
19108 if test $ol_cv_lib_db = no ; then
19109         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19110 echo "configure:19111: checking for Berkeley DB link (-ldb-4-1)" >&5
19111 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19112   echo $ac_n "(cached) $ac_c" 1>&6
19113 else
19114   
19115         ol_DB_LIB=-ldb-4-1
19116         ol_LIBS=$LIBS
19117         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19118
19119         cat > conftest.$ac_ext <<EOF
19120 #line 19121 "configure"
19121 #include "confdefs.h"
19122
19123 #ifdef HAVE_DB_185_H
19124 # include <db_185.h>
19125 #else
19126 # include <db.h>
19127 #endif
19128
19129 #ifndef DB_VERSION_MAJOR
19130 # define DB_VERSION_MAJOR 1
19131 #endif
19132
19133 #ifndef NULL
19134 #define NULL ((void*)0)
19135 #endif
19136
19137 int main() {
19138
19139 #if DB_VERSION_MAJOR > 1
19140         {
19141                 char *version;
19142                 int major, minor, patch;
19143
19144                 version = db_version( &major, &minor, &patch );
19145
19146                 if( major != DB_VERSION_MAJOR ||
19147                         minor < DB_VERSION_MINOR )
19148                 {
19149                         printf("Berkeley DB version mismatch\n"
19150                                 "\texpected: %s\n\tgot: %s\n",
19151                                 DB_VERSION_STRING, version);
19152                         return 1;
19153                 }
19154         }
19155 #endif
19156
19157 #if DB_VERSION_MAJOR > 2
19158         db_env_create( NULL, 0 );
19159 #elif DB_VERSION_MAJOR > 1
19160         db_appexit( NULL );
19161 #else
19162         (void) dbopen( NULL, 0, 0, 0, NULL);
19163 #endif
19164
19165 ; return 0; }
19166 EOF
19167 if { (eval echo configure:19168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19168   rm -rf conftest*
19169   ol_cv_db_db_4_1=yes
19170 else
19171   echo "configure: failed program was:" >&5
19172   cat conftest.$ac_ext >&5
19173   rm -rf conftest*
19174   ol_cv_db_db_4_1=no
19175 fi
19176 rm -f conftest*
19177
19178         LIBS="$ol_LIBS"
19179
19180 fi
19181
19182 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19183
19184         if test $ol_cv_db_db_4_1 = yes ; then
19185                 ol_cv_lib_db=-ldb-4-1
19186         fi
19187 fi
19188
19189 if test $ol_cv_lib_db = no ; then
19190         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19191 echo "configure:19192: checking for Berkeley DB link (-ldb3)" >&5
19192 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19193   echo $ac_n "(cached) $ac_c" 1>&6
19194 else
19195   
19196         ol_DB_LIB=-ldb3
19197         ol_LIBS=$LIBS
19198         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19199
19200         cat > conftest.$ac_ext <<EOF
19201 #line 19202 "configure"
19202 #include "confdefs.h"
19203
19204 #ifdef HAVE_DB_185_H
19205 # include <db_185.h>
19206 #else
19207 # include <db.h>
19208 #endif
19209
19210 #ifndef DB_VERSION_MAJOR
19211 # define DB_VERSION_MAJOR 1
19212 #endif
19213
19214 #ifndef NULL
19215 #define NULL ((void*)0)
19216 #endif
19217
19218 int main() {
19219
19220 #if DB_VERSION_MAJOR > 1
19221         {
19222                 char *version;
19223                 int major, minor, patch;
19224
19225                 version = db_version( &major, &minor, &patch );
19226
19227                 if( major != DB_VERSION_MAJOR ||
19228                         minor < DB_VERSION_MINOR )
19229                 {
19230                         printf("Berkeley DB version mismatch\n"
19231                                 "\texpected: %s\n\tgot: %s\n",
19232                                 DB_VERSION_STRING, version);
19233                         return 1;
19234                 }
19235         }
19236 #endif
19237
19238 #if DB_VERSION_MAJOR > 2
19239         db_env_create( NULL, 0 );
19240 #elif DB_VERSION_MAJOR > 1
19241         db_appexit( NULL );
19242 #else
19243         (void) dbopen( NULL, 0, 0, 0, NULL);
19244 #endif
19245
19246 ; return 0; }
19247 EOF
19248 if { (eval echo configure:19249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19249   rm -rf conftest*
19250   ol_cv_db_db3=yes
19251 else
19252   echo "configure: failed program was:" >&5
19253   cat conftest.$ac_ext >&5
19254   rm -rf conftest*
19255   ol_cv_db_db3=no
19256 fi
19257 rm -f conftest*
19258
19259         LIBS="$ol_LIBS"
19260
19261 fi
19262
19263 echo "$ac_t""$ol_cv_db_db3" 1>&6
19264
19265         if test $ol_cv_db_db3 = yes ; then
19266                 ol_cv_lib_db=-ldb3
19267         fi
19268 fi
19269
19270 if test $ol_cv_lib_db = no ; then
19271         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19272 echo "configure:19273: checking for Berkeley DB link (-ldb-3)" >&5
19273 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19274   echo $ac_n "(cached) $ac_c" 1>&6
19275 else
19276   
19277         ol_DB_LIB=-ldb-3
19278         ol_LIBS=$LIBS
19279         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19280
19281         cat > conftest.$ac_ext <<EOF
19282 #line 19283 "configure"
19283 #include "confdefs.h"
19284
19285 #ifdef HAVE_DB_185_H
19286 # include <db_185.h>
19287 #else
19288 # include <db.h>
19289 #endif
19290
19291 #ifndef DB_VERSION_MAJOR
19292 # define DB_VERSION_MAJOR 1
19293 #endif
19294
19295 #ifndef NULL
19296 #define NULL ((void*)0)
19297 #endif
19298
19299 int main() {
19300
19301 #if DB_VERSION_MAJOR > 1
19302         {
19303                 char *version;
19304                 int major, minor, patch;
19305
19306                 version = db_version( &major, &minor, &patch );
19307
19308                 if( major != DB_VERSION_MAJOR ||
19309                         minor < DB_VERSION_MINOR )
19310                 {
19311                         printf("Berkeley DB version mismatch\n"
19312                                 "\texpected: %s\n\tgot: %s\n",
19313                                 DB_VERSION_STRING, version);
19314                         return 1;
19315                 }
19316         }
19317 #endif
19318
19319 #if DB_VERSION_MAJOR > 2
19320         db_env_create( NULL, 0 );
19321 #elif DB_VERSION_MAJOR > 1
19322         db_appexit( NULL );
19323 #else
19324         (void) dbopen( NULL, 0, 0, 0, NULL);
19325 #endif
19326
19327 ; return 0; }
19328 EOF
19329 if { (eval echo configure:19330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19330   rm -rf conftest*
19331   ol_cv_db_db_3=yes
19332 else
19333   echo "configure: failed program was:" >&5
19334   cat conftest.$ac_ext >&5
19335   rm -rf conftest*
19336   ol_cv_db_db_3=no
19337 fi
19338 rm -f conftest*
19339
19340         LIBS="$ol_LIBS"
19341
19342 fi
19343
19344 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19345
19346         if test $ol_cv_db_db_3 = yes ; then
19347                 ol_cv_lib_db=-ldb-3
19348         fi
19349 fi
19350
19351 if test $ol_cv_lib_db = no ; then
19352         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19353 echo "configure:19354: checking for Berkeley DB link (-ldb2)" >&5
19354 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19355   echo $ac_n "(cached) $ac_c" 1>&6
19356 else
19357   
19358         ol_DB_LIB=-ldb2
19359         ol_LIBS=$LIBS
19360         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19361
19362         cat > conftest.$ac_ext <<EOF
19363 #line 19364 "configure"
19364 #include "confdefs.h"
19365
19366 #ifdef HAVE_DB_185_H
19367 # include <db_185.h>
19368 #else
19369 # include <db.h>
19370 #endif
19371
19372 #ifndef DB_VERSION_MAJOR
19373 # define DB_VERSION_MAJOR 1
19374 #endif
19375
19376 #ifndef NULL
19377 #define NULL ((void*)0)
19378 #endif
19379
19380 int main() {
19381
19382 #if DB_VERSION_MAJOR > 1
19383         {
19384                 char *version;
19385                 int major, minor, patch;
19386
19387                 version = db_version( &major, &minor, &patch );
19388
19389                 if( major != DB_VERSION_MAJOR ||
19390                         minor < DB_VERSION_MINOR )
19391                 {
19392                         printf("Berkeley DB version mismatch\n"
19393                                 "\texpected: %s\n\tgot: %s\n",
19394                                 DB_VERSION_STRING, version);
19395                         return 1;
19396                 }
19397         }
19398 #endif
19399
19400 #if DB_VERSION_MAJOR > 2
19401         db_env_create( NULL, 0 );
19402 #elif DB_VERSION_MAJOR > 1
19403         db_appexit( NULL );
19404 #else
19405         (void) dbopen( NULL, 0, 0, 0, NULL);
19406 #endif
19407
19408 ; return 0; }
19409 EOF
19410 if { (eval echo configure:19411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19411   rm -rf conftest*
19412   ol_cv_db_db2=yes
19413 else
19414   echo "configure: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   rm -rf conftest*
19417   ol_cv_db_db2=no
19418 fi
19419 rm -f conftest*
19420
19421         LIBS="$ol_LIBS"
19422
19423 fi
19424
19425 echo "$ac_t""$ol_cv_db_db2" 1>&6
19426
19427         if test $ol_cv_db_db2 = yes ; then
19428                 ol_cv_lib_db=-ldb2
19429         fi
19430 fi
19431
19432 if test $ol_cv_lib_db = no ; then
19433         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19434 echo "configure:19435: checking for Berkeley DB link (-ldb-2)" >&5
19435 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19436   echo $ac_n "(cached) $ac_c" 1>&6
19437 else
19438   
19439         ol_DB_LIB=-ldb-2
19440         ol_LIBS=$LIBS
19441         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19442
19443         cat > conftest.$ac_ext <<EOF
19444 #line 19445 "configure"
19445 #include "confdefs.h"
19446
19447 #ifdef HAVE_DB_185_H
19448 # include <db_185.h>
19449 #else
19450 # include <db.h>
19451 #endif
19452
19453 #ifndef DB_VERSION_MAJOR
19454 # define DB_VERSION_MAJOR 1
19455 #endif
19456
19457 #ifndef NULL
19458 #define NULL ((void*)0)
19459 #endif
19460
19461 int main() {
19462
19463 #if DB_VERSION_MAJOR > 1
19464         {
19465                 char *version;
19466                 int major, minor, patch;
19467
19468                 version = db_version( &major, &minor, &patch );
19469
19470                 if( major != DB_VERSION_MAJOR ||
19471                         minor < DB_VERSION_MINOR )
19472                 {
19473                         printf("Berkeley DB version mismatch\n"
19474                                 "\texpected: %s\n\tgot: %s\n",
19475                                 DB_VERSION_STRING, version);
19476                         return 1;
19477                 }
19478         }
19479 #endif
19480
19481 #if DB_VERSION_MAJOR > 2
19482         db_env_create( NULL, 0 );
19483 #elif DB_VERSION_MAJOR > 1
19484         db_appexit( NULL );
19485 #else
19486         (void) dbopen( NULL, 0, 0, 0, NULL);
19487 #endif
19488
19489 ; return 0; }
19490 EOF
19491 if { (eval echo configure:19492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19492   rm -rf conftest*
19493   ol_cv_db_db_2=yes
19494 else
19495   echo "configure: failed program was:" >&5
19496   cat conftest.$ac_ext >&5
19497   rm -rf conftest*
19498   ol_cv_db_db_2=no
19499 fi
19500 rm -f conftest*
19501
19502         LIBS="$ol_LIBS"
19503
19504 fi
19505
19506 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19507
19508         if test $ol_cv_db_db_2 = yes ; then
19509                 ol_cv_lib_db=-ldb-2
19510         fi
19511 fi
19512
19513 if test $ol_cv_lib_db = no ; then
19514         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19515 echo "configure:19516: checking for Berkeley DB link (-ldb1)" >&5
19516 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19517   echo $ac_n "(cached) $ac_c" 1>&6
19518 else
19519   
19520         ol_DB_LIB=-ldb1
19521         ol_LIBS=$LIBS
19522         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19523
19524         cat > conftest.$ac_ext <<EOF
19525 #line 19526 "configure"
19526 #include "confdefs.h"
19527
19528 #ifdef HAVE_DB_185_H
19529 # include <db_185.h>
19530 #else
19531 # include <db.h>
19532 #endif
19533
19534 #ifndef DB_VERSION_MAJOR
19535 # define DB_VERSION_MAJOR 1
19536 #endif
19537
19538 #ifndef NULL
19539 #define NULL ((void*)0)
19540 #endif
19541
19542 int main() {
19543
19544 #if DB_VERSION_MAJOR > 1
19545         {
19546                 char *version;
19547                 int major, minor, patch;
19548
19549                 version = db_version( &major, &minor, &patch );
19550
19551                 if( major != DB_VERSION_MAJOR ||
19552                         minor < DB_VERSION_MINOR )
19553                 {
19554                         printf("Berkeley DB version mismatch\n"
19555                                 "\texpected: %s\n\tgot: %s\n",
19556                                 DB_VERSION_STRING, version);
19557                         return 1;
19558                 }
19559         }
19560 #endif
19561
19562 #if DB_VERSION_MAJOR > 2
19563         db_env_create( NULL, 0 );
19564 #elif DB_VERSION_MAJOR > 1
19565         db_appexit( NULL );
19566 #else
19567         (void) dbopen( NULL, 0, 0, 0, NULL);
19568 #endif
19569
19570 ; return 0; }
19571 EOF
19572 if { (eval echo configure:19573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19573   rm -rf conftest*
19574   ol_cv_db_db1=yes
19575 else
19576   echo "configure: failed program was:" >&5
19577   cat conftest.$ac_ext >&5
19578   rm -rf conftest*
19579   ol_cv_db_db1=no
19580 fi
19581 rm -f conftest*
19582
19583         LIBS="$ol_LIBS"
19584
19585 fi
19586
19587 echo "$ac_t""$ol_cv_db_db1" 1>&6
19588
19589         if test $ol_cv_db_db1 = yes ; then
19590                 ol_cv_lib_db=-ldb1
19591         fi
19592 fi
19593
19594 if test $ol_cv_lib_db = no ; then
19595         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19596 echo "configure:19597: checking for Berkeley DB link (-ldb-1)" >&5
19597 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19598   echo $ac_n "(cached) $ac_c" 1>&6
19599 else
19600   
19601         ol_DB_LIB=-ldb-1
19602         ol_LIBS=$LIBS
19603         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19604
19605         cat > conftest.$ac_ext <<EOF
19606 #line 19607 "configure"
19607 #include "confdefs.h"
19608
19609 #ifdef HAVE_DB_185_H
19610 # include <db_185.h>
19611 #else
19612 # include <db.h>
19613 #endif
19614
19615 #ifndef DB_VERSION_MAJOR
19616 # define DB_VERSION_MAJOR 1
19617 #endif
19618
19619 #ifndef NULL
19620 #define NULL ((void*)0)
19621 #endif
19622
19623 int main() {
19624
19625 #if DB_VERSION_MAJOR > 1
19626         {
19627                 char *version;
19628                 int major, minor, patch;
19629
19630                 version = db_version( &major, &minor, &patch );
19631
19632                 if( major != DB_VERSION_MAJOR ||
19633                         minor < DB_VERSION_MINOR )
19634                 {
19635                         printf("Berkeley DB version mismatch\n"
19636                                 "\texpected: %s\n\tgot: %s\n",
19637                                 DB_VERSION_STRING, version);
19638                         return 1;
19639                 }
19640         }
19641 #endif
19642
19643 #if DB_VERSION_MAJOR > 2
19644         db_env_create( NULL, 0 );
19645 #elif DB_VERSION_MAJOR > 1
19646         db_appexit( NULL );
19647 #else
19648         (void) dbopen( NULL, 0, 0, 0, NULL);
19649 #endif
19650
19651 ; return 0; }
19652 EOF
19653 if { (eval echo configure:19654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19654   rm -rf conftest*
19655   ol_cv_db_db_1=yes
19656 else
19657   echo "configure: failed program was:" >&5
19658   cat conftest.$ac_ext >&5
19659   rm -rf conftest*
19660   ol_cv_db_db_1=no
19661 fi
19662 rm -f conftest*
19663
19664         LIBS="$ol_LIBS"
19665
19666 fi
19667
19668 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19669
19670         if test $ol_cv_db_db_1 = yes ; then
19671                 ol_cv_lib_db=-ldb-1
19672         fi
19673 fi
19674
19675
19676         if test "$ol_cv_lib_db" != no ; then
19677                 ol_cv_berkeley_db=yes
19678                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19679 echo "configure:19680: checking for Berkeley DB version match" >&5
19680 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19681   echo $ac_n "(cached) $ac_c" 1>&6
19682 else
19683   
19684         ol_LIBS="$LIBS"
19685         LIBS="$LTHREAD_LIBS $LIBS"
19686         if test $ol_cv_lib_db != yes ; then
19687                 LIBS="$ol_cv_lib_db $LIBS"
19688         fi
19689
19690         if test "$cross_compiling" = yes; then
19691   ol_cv_berkeley_db_version=cross
19692 else
19693   cat > conftest.$ac_ext <<EOF
19694 #line 19695 "configure"
19695 #include "confdefs.h"
19696
19697 #ifdef HAVE_DB_185_H
19698         choke me;
19699 #else
19700 #include <db.h>
19701 #endif
19702 #ifndef DB_VERSION_MAJOR
19703 # define DB_VERSION_MAJOR 1
19704 #endif
19705 #ifndef NULL
19706 #define NULL ((void *)0)
19707 #endif
19708 main()
19709 {
19710 #if DB_VERSION_MAJOR > 1
19711         char *version;
19712         int major, minor, patch;
19713
19714         version = db_version( &major, &minor, &patch );
19715
19716         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19717                 printf("Berkeley DB version mismatch\n"
19718                         "\texpected: %s\n\tgot: %s\n",
19719                         DB_VERSION_STRING, version);
19720                 return 1;
19721         }
19722 #endif
19723
19724         return 0;
19725 }
19726 EOF
19727 if { (eval echo configure:19728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19728 then
19729   ol_cv_berkeley_db_version=yes
19730 else
19731   echo "configure: failed program was:" >&5
19732   cat conftest.$ac_ext >&5
19733   rm -fr conftest*
19734   ol_cv_berkeley_db_version=no
19735 fi
19736 rm -fr conftest*
19737 fi
19738
19739
19740         LIBS="$ol_LIBS"
19741
19742 fi
19743
19744 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19745
19746         if test $ol_cv_berkeley_db_version = no ; then
19747                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19748         fi
19749
19750                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19751 echo "configure:19752: checking for Berkeley DB thread support" >&5
19752 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19753   echo $ac_n "(cached) $ac_c" 1>&6
19754 else
19755   
19756         ol_LIBS="$LIBS"
19757         LIBS="$LTHREAD_LIBS $LIBS"
19758         if test $ol_cv_lib_db != yes ; then
19759                 LIBS="$ol_cv_lib_db $LIBS"
19760         fi
19761
19762         if test "$cross_compiling" = yes; then
19763   ol_cv_berkeley_db_thread=cross
19764 else
19765   cat > conftest.$ac_ext <<EOF
19766 #line 19767 "configure"
19767 #include "confdefs.h"
19768
19769 #ifdef HAVE_DB_185_H
19770         choke me;
19771 #else
19772 #include <db.h>
19773 #endif
19774 #ifndef NULL
19775 #define NULL ((void *)0)
19776 #endif
19777 main()
19778 {
19779         int rc;
19780         u_int32_t flags = DB_CREATE |
19781 #ifdef DB_PRIVATE
19782                 DB_PRIVATE |
19783 #endif
19784                 DB_THREAD;
19785
19786 #if DB_VERSION_MAJOR > 2
19787         DB_ENV *env = NULL;
19788
19789         rc = db_env_create( &env, 0 );
19790
19791         flags |= DB_INIT_MPOOL;
19792 #ifdef DB_MPOOL_PRIVATE
19793         flags |= DB_MPOOL_PRIVATE;
19794 #endif
19795
19796         if( rc ) {
19797                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19798                 return rc;
19799         }
19800
19801 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19802         rc = env->open( env, NULL, flags, 0 );
19803 #else
19804         rc = env->open( env, NULL, NULL, flags, 0 );
19805 #endif
19806
19807         if ( rc == 0 ) {
19808                 rc = env->close( env, 0 );
19809         }
19810
19811         if( rc ) {
19812                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19813                 return rc;
19814         }
19815
19816 #else
19817         DB_ENV env;
19818         memset( &env, '\0', sizeof(env) );
19819
19820         rc = db_appinit( NULL, NULL, &env, flags );
19821
19822         if( rc == 0 ) {
19823                 db_appexit( &env );
19824         }
19825
19826         unlink("__db_mpool.share");
19827         unlink("__db_lock.share");
19828 #endif
19829
19830         return rc;
19831 }
19832 EOF
19833 if { (eval echo configure:19834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19834 then
19835   ol_cv_berkeley_db_thread=yes
19836 else
19837   echo "configure: failed program was:" >&5
19838   cat conftest.$ac_ext >&5
19839   rm -fr conftest*
19840   ol_cv_berkeley_db_thread=no
19841 fi
19842 rm -fr conftest*
19843 fi
19844
19845
19846         LIBS="$ol_LIBS"
19847
19848 fi
19849
19850 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19851
19852         if test $ol_cv_berkeley_db_thread != no ; then
19853                 cat >> confdefs.h <<\EOF
19854 #define HAVE_BERKELEY_DB_THREAD 1
19855 EOF
19856
19857         fi
19858
19859         fi
19860 fi
19861
19862         fi
19863
19864         if test $ol_cv_berkeley_db != no ; then
19865                 cat >> confdefs.h <<\EOF
19866 #define HAVE_BERKELEY_DB 1
19867 EOF
19868
19869
19870                 ol_link_ldbm=berkeley
19871                 ol_with_ldbm_api=berkeley
19872
19873                 if test $ol_with_ldbm_type = hash ; then
19874                         cat >> confdefs.h <<\EOF
19875 #define LDBM_USE_DBHASH 1
19876 EOF
19877
19878                 else
19879                         cat >> confdefs.h <<\EOF
19880 #define LDBM_USE_DBBTREE 1
19881 EOF
19882
19883                 fi
19884
19885                                                 if test $ol_cv_lib_db != yes ; then
19886                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19887                 fi
19888         fi
19889 fi
19890
19891 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
19892         if test $ol_link_ldbm != berkeley ; then
19893                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
19894         else
19895                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19896 echo "configure:19897: checking Berkeley DB version for BDB backend" >&5
19897 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19898   echo $ac_n "(cached) $ac_c" 1>&6
19899 else
19900   
19901         cat > conftest.$ac_ext <<EOF
19902 #line 19903 "configure"
19903 #include "confdefs.h"
19904
19905 #include <db.h>
19906
19907  /* this check could be improved */
19908 #ifndef DB_VERSION_MAJOR
19909 #       define DB_VERSION_MAJOR 1
19910 #endif
19911 #ifndef DB_VERSION_MINOR
19912 #       define DB_VERSION_MINOR 0
19913 #endif
19914
19915 /* require 4.2 or later */
19916 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19917         __db_version_compat
19918 #endif
19919         
19920 EOF
19921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19922   egrep "__db_version_compat" >/dev/null 2>&1; then
19923   rm -rf conftest*
19924   ol_cv_bdb_compat=yes
19925 else
19926   rm -rf conftest*
19927   ol_cv_bdb_compat=no
19928 fi
19929 rm -f conftest*
19930
19931 fi
19932
19933 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19934
19935
19936                 if test $ol_cv_bdb_compat != yes ; then
19937                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19938                 fi
19939         fi
19940 fi
19941
19942 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19943         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19944         ol_with_ldbm_api=none
19945 fi
19946
19947 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19948         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19949 echo "configure:19950: checking for MDBM library" >&5
19950 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19951   echo $ac_n "(cached) $ac_c" 1>&6
19952 else
19953         ol_LIBS="$LIBS"
19954         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19955 echo "configure:19956: checking for mdbm_set_chain" >&5
19956 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19957   echo $ac_n "(cached) $ac_c" 1>&6
19958 else
19959   cat > conftest.$ac_ext <<EOF
19960 #line 19961 "configure"
19961 #include "confdefs.h"
19962 /* System header to define __stub macros and hopefully few prototypes,
19963     which can conflict with char mdbm_set_chain(); below.  */
19964 #include <assert.h>
19965 /* Override any gcc2 internal prototype to avoid an error.  */
19966 /* We use char because int might match the return type of a gcc2
19967     builtin and then its argument prototype would still apply.  */
19968 char mdbm_set_chain();
19969 char (*f)();
19970
19971 int main() {
19972
19973 /* The GNU C library defines this for functions which it implements
19974     to always fail with ENOSYS.  Some functions are actually named
19975     something starting with __ and the normal name is an alias.  */
19976 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19977 choke me
19978 #else
19979 f = mdbm_set_chain;
19980 #endif
19981
19982 ; return 0; }
19983 EOF
19984 if { (eval echo configure:19985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19985   rm -rf conftest*
19986   eval "ac_cv_func_mdbm_set_chain=yes"
19987 else
19988   echo "configure: failed program was:" >&5
19989   cat conftest.$ac_ext >&5
19990   rm -rf conftest*
19991   eval "ac_cv_func_mdbm_set_chain=no"
19992 fi
19993 rm -f conftest*
19994 fi
19995
19996 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19997   echo "$ac_t""yes" 1>&6
19998   ol_cv_lib_mdbm=yes
19999 else
20000   echo "$ac_t""no" 1>&6
20001
20002                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20003 echo "configure:20004: checking for mdbm_set_chain in -lmdbm" >&5
20004 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20006   echo $ac_n "(cached) $ac_c" 1>&6
20007 else
20008   ac_save_LIBS="$LIBS"
20009 LIBS="-lmdbm  $LIBS"
20010 cat > conftest.$ac_ext <<EOF
20011 #line 20012 "configure"
20012 #include "confdefs.h"
20013 /* Override any gcc2 internal prototype to avoid an error.  */
20014 /* We use char because int might match the return type of a gcc2
20015     builtin and then its argument prototype would still apply.  */
20016 char mdbm_set_chain();
20017
20018 int main() {
20019 mdbm_set_chain()
20020 ; return 0; }
20021 EOF
20022 if { (eval echo configure:20023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20023   rm -rf conftest*
20024   eval "ac_cv_lib_$ac_lib_var=yes"
20025 else
20026   echo "configure: failed program was:" >&5
20027   cat conftest.$ac_ext >&5
20028   rm -rf conftest*
20029   eval "ac_cv_lib_$ac_lib_var=no"
20030 fi
20031 rm -f conftest*
20032 LIBS="$ac_save_LIBS"
20033
20034 fi
20035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20036   echo "$ac_t""yes" 1>&6
20037   ol_cv_lib_mdbm=-lmdbm
20038 else
20039   echo "$ac_t""no" 1>&6
20040 ol_cv_lib_mdbm=no
20041 fi
20042
20043         
20044 fi
20045
20046         LIBS="$ol_LIBS"
20047
20048 fi
20049
20050 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20051
20052
20053  for ac_hdr in mdbm.h
20054 do
20055 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20056 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20057 echo "configure:20058: checking for $ac_hdr" >&5
20058 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20059   echo $ac_n "(cached) $ac_c" 1>&6
20060 else
20061   cat > conftest.$ac_ext <<EOF
20062 #line 20063 "configure"
20063 #include "confdefs.h"
20064 #include <$ac_hdr>
20065 EOF
20066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20067 { (eval echo configure:20068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20068 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20069 if test -z "$ac_err"; then
20070   rm -rf conftest*
20071   eval "ac_cv_header_$ac_safe=yes"
20072 else
20073   echo "$ac_err" >&5
20074   echo "configure: failed program was:" >&5
20075   cat conftest.$ac_ext >&5
20076   rm -rf conftest*
20077   eval "ac_cv_header_$ac_safe=no"
20078 fi
20079 rm -f conftest*
20080 fi
20081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20082   echo "$ac_t""yes" 1>&6
20083     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20084   cat >> confdefs.h <<EOF
20085 #define $ac_tr_hdr 1
20086 EOF
20087  
20088 else
20089   echo "$ac_t""no" 1>&6
20090 fi
20091 done
20092
20093  echo $ac_n "checking for db""... $ac_c" 1>&6
20094 echo "configure:20095: checking for db" >&5
20095 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20096   echo $ac_n "(cached) $ac_c" 1>&6
20097 else
20098   
20099         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20100                 ol_cv_mdbm=no
20101         else
20102                 ol_cv_mdbm=yes
20103         fi
20104
20105 fi
20106
20107 echo "$ac_t""$ol_cv_mdbm" 1>&6
20108  if test $ol_cv_mdbm = yes ; then
20109         cat >> confdefs.h <<\EOF
20110 #define HAVE_MDBM 1
20111 EOF
20112
20113  fi
20114
20115
20116         if test $ol_cv_mdbm = yes ; then
20117                 ol_link_ldbm=mdbm
20118                 ol_with_ldbm_api=mdbm
20119                 if test $ol_cv_lib_mdbm != yes ; then
20120                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20121                 fi
20122         fi
20123 fi
20124
20125 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20126         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20127 echo "configure:20128: checking for GDBM library" >&5
20128 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20129   echo $ac_n "(cached) $ac_c" 1>&6
20130 else
20131         ol_LIBS="$LIBS"
20132         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20133 echo "configure:20134: checking for gdbm_open" >&5
20134 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20135   echo $ac_n "(cached) $ac_c" 1>&6
20136 else
20137   cat > conftest.$ac_ext <<EOF
20138 #line 20139 "configure"
20139 #include "confdefs.h"
20140 /* System header to define __stub macros and hopefully few prototypes,
20141     which can conflict with char gdbm_open(); below.  */
20142 #include <assert.h>
20143 /* Override any gcc2 internal prototype to avoid an error.  */
20144 /* We use char because int might match the return type of a gcc2
20145     builtin and then its argument prototype would still apply.  */
20146 char gdbm_open();
20147 char (*f)();
20148
20149 int main() {
20150
20151 /* The GNU C library defines this for functions which it implements
20152     to always fail with ENOSYS.  Some functions are actually named
20153     something starting with __ and the normal name is an alias.  */
20154 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20155 choke me
20156 #else
20157 f = gdbm_open;
20158 #endif
20159
20160 ; return 0; }
20161 EOF
20162 if { (eval echo configure:20163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20163   rm -rf conftest*
20164   eval "ac_cv_func_gdbm_open=yes"
20165 else
20166   echo "configure: failed program was:" >&5
20167   cat conftest.$ac_ext >&5
20168   rm -rf conftest*
20169   eval "ac_cv_func_gdbm_open=no"
20170 fi
20171 rm -f conftest*
20172 fi
20173
20174 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20175   echo "$ac_t""yes" 1>&6
20176   ol_cv_lib_gdbm=yes
20177 else
20178   echo "$ac_t""no" 1>&6
20179
20180                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20181 echo "configure:20182: checking for gdbm_open in -lgdbm" >&5
20182 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20183 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20184   echo $ac_n "(cached) $ac_c" 1>&6
20185 else
20186   ac_save_LIBS="$LIBS"
20187 LIBS="-lgdbm  $LIBS"
20188 cat > conftest.$ac_ext <<EOF
20189 #line 20190 "configure"
20190 #include "confdefs.h"
20191 /* Override any gcc2 internal prototype to avoid an error.  */
20192 /* We use char because int might match the return type of a gcc2
20193     builtin and then its argument prototype would still apply.  */
20194 char gdbm_open();
20195
20196 int main() {
20197 gdbm_open()
20198 ; return 0; }
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20201   rm -rf conftest*
20202   eval "ac_cv_lib_$ac_lib_var=yes"
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -rf conftest*
20207   eval "ac_cv_lib_$ac_lib_var=no"
20208 fi
20209 rm -f conftest*
20210 LIBS="$ac_save_LIBS"
20211
20212 fi
20213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20214   echo "$ac_t""yes" 1>&6
20215   ol_cv_lib_gdbm=-lgdbm
20216 else
20217   echo "$ac_t""no" 1>&6
20218 ol_cv_lib_gdbm=no
20219 fi
20220
20221         
20222 fi
20223
20224         LIBS="$ol_LIBS"
20225
20226 fi
20227
20228 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20229
20230
20231  for ac_hdr in gdbm.h
20232 do
20233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20235 echo "configure:20236: checking for $ac_hdr" >&5
20236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20237   echo $ac_n "(cached) $ac_c" 1>&6
20238 else
20239   cat > conftest.$ac_ext <<EOF
20240 #line 20241 "configure"
20241 #include "confdefs.h"
20242 #include <$ac_hdr>
20243 EOF
20244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20245 { (eval echo configure:20246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20247 if test -z "$ac_err"; then
20248   rm -rf conftest*
20249   eval "ac_cv_header_$ac_safe=yes"
20250 else
20251   echo "$ac_err" >&5
20252   echo "configure: failed program was:" >&5
20253   cat conftest.$ac_ext >&5
20254   rm -rf conftest*
20255   eval "ac_cv_header_$ac_safe=no"
20256 fi
20257 rm -f conftest*
20258 fi
20259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20260   echo "$ac_t""yes" 1>&6
20261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20262   cat >> confdefs.h <<EOF
20263 #define $ac_tr_hdr 1
20264 EOF
20265  
20266 else
20267   echo "$ac_t""no" 1>&6
20268 fi
20269 done
20270
20271  echo $ac_n "checking for db""... $ac_c" 1>&6
20272 echo "configure:20273: checking for db" >&5
20273 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20274   echo $ac_n "(cached) $ac_c" 1>&6
20275 else
20276   
20277         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20278                 ol_cv_gdbm=no
20279         else
20280                 ol_cv_gdbm=yes
20281         fi
20282
20283 fi
20284
20285 echo "$ac_t""$ol_cv_gdbm" 1>&6
20286  if test $ol_cv_gdbm = yes ; then
20287         cat >> confdefs.h <<\EOF
20288 #define HAVE_GDBM 1
20289 EOF
20290
20291  fi
20292
20293
20294         if test $ol_cv_gdbm = yes ; then
20295                 ol_link_ldbm=gdbm
20296                 ol_with_ldbm_api=gdbm
20297
20298                 if test $ol_cv_lib_gdbm != yes ; then
20299                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20300                 fi
20301         fi
20302 fi
20303
20304 if test $ol_with_ldbm_api = ndbm ; then
20305         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20306 echo "configure:20307: checking for NDBM library" >&5
20307 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20308   echo $ac_n "(cached) $ac_c" 1>&6
20309 else
20310         ol_LIBS="$LIBS"
20311         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20312 echo "configure:20313: checking for dbm_open" >&5
20313 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20314   echo $ac_n "(cached) $ac_c" 1>&6
20315 else
20316   cat > conftest.$ac_ext <<EOF
20317 #line 20318 "configure"
20318 #include "confdefs.h"
20319 /* System header to define __stub macros and hopefully few prototypes,
20320     which can conflict with char dbm_open(); below.  */
20321 #include <assert.h>
20322 /* Override any gcc2 internal prototype to avoid an error.  */
20323 /* We use char because int might match the return type of a gcc2
20324     builtin and then its argument prototype would still apply.  */
20325 char dbm_open();
20326 char (*f)();
20327
20328 int main() {
20329
20330 /* The GNU C library defines this for functions which it implements
20331     to always fail with ENOSYS.  Some functions are actually named
20332     something starting with __ and the normal name is an alias.  */
20333 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20334 choke me
20335 #else
20336 f = dbm_open;
20337 #endif
20338
20339 ; return 0; }
20340 EOF
20341 if { (eval echo configure:20342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20342   rm -rf conftest*
20343   eval "ac_cv_func_dbm_open=yes"
20344 else
20345   echo "configure: failed program was:" >&5
20346   cat conftest.$ac_ext >&5
20347   rm -rf conftest*
20348   eval "ac_cv_func_dbm_open=no"
20349 fi
20350 rm -f conftest*
20351 fi
20352
20353 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20354   echo "$ac_t""yes" 1>&6
20355   ol_cv_lib_ndbm=yes
20356 else
20357   echo "$ac_t""no" 1>&6
20358
20359                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20360 echo "configure:20361: checking for dbm_open in -lndbm" >&5
20361 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   ac_save_LIBS="$LIBS"
20366 LIBS="-lndbm  $LIBS"
20367 cat > conftest.$ac_ext <<EOF
20368 #line 20369 "configure"
20369 #include "confdefs.h"
20370 /* Override any gcc2 internal prototype to avoid an error.  */
20371 /* We use char because int might match the return type of a gcc2
20372     builtin and then its argument prototype would still apply.  */
20373 char dbm_open();
20374
20375 int main() {
20376 dbm_open()
20377 ; return 0; }
20378 EOF
20379 if { (eval echo configure:20380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20380   rm -rf conftest*
20381   eval "ac_cv_lib_$ac_lib_var=yes"
20382 else
20383   echo "configure: failed program was:" >&5
20384   cat conftest.$ac_ext >&5
20385   rm -rf conftest*
20386   eval "ac_cv_lib_$ac_lib_var=no"
20387 fi
20388 rm -f conftest*
20389 LIBS="$ac_save_LIBS"
20390
20391 fi
20392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20393   echo "$ac_t""yes" 1>&6
20394   ol_cv_lib_ndbm=-lndbm
20395 else
20396   echo "$ac_t""no" 1>&6
20397
20398                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20399 echo "configure:20400: checking for dbm_open in -ldbm" >&5
20400 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20402   echo $ac_n "(cached) $ac_c" 1>&6
20403 else
20404   ac_save_LIBS="$LIBS"
20405 LIBS="-ldbm  $LIBS"
20406 cat > conftest.$ac_ext <<EOF
20407 #line 20408 "configure"
20408 #include "confdefs.h"
20409 /* Override any gcc2 internal prototype to avoid an error.  */
20410 /* We use char because int might match the return type of a gcc2
20411     builtin and then its argument prototype would still apply.  */
20412 char dbm_open();
20413
20414 int main() {
20415 dbm_open()
20416 ; return 0; }
20417 EOF
20418 if { (eval echo configure:20419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20419   rm -rf conftest*
20420   eval "ac_cv_lib_$ac_lib_var=yes"
20421 else
20422   echo "configure: failed program was:" >&5
20423   cat conftest.$ac_ext >&5
20424   rm -rf conftest*
20425   eval "ac_cv_lib_$ac_lib_var=no"
20426 fi
20427 rm -f conftest*
20428 LIBS="$ac_save_LIBS"
20429
20430 fi
20431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20432   echo "$ac_t""yes" 1>&6
20433   ol_cv_lib_ndbm=-ldbm
20434 else
20435   echo "$ac_t""no" 1>&6
20436 ol_cv_lib_ndbm=no
20437 fi
20438                 
20439 fi
20440
20441         
20442 fi
20443
20444         LIBS="$ol_LIBS"
20445
20446 fi
20447
20448 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20449
20450
20451  for ac_hdr in ndbm.h
20452 do
20453 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20454 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20455 echo "configure:20456: checking for $ac_hdr" >&5
20456 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20457   echo $ac_n "(cached) $ac_c" 1>&6
20458 else
20459   cat > conftest.$ac_ext <<EOF
20460 #line 20461 "configure"
20461 #include "confdefs.h"
20462 #include <$ac_hdr>
20463 EOF
20464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20465 { (eval echo configure:20466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20467 if test -z "$ac_err"; then
20468   rm -rf conftest*
20469   eval "ac_cv_header_$ac_safe=yes"
20470 else
20471   echo "$ac_err" >&5
20472   echo "configure: failed program was:" >&5
20473   cat conftest.$ac_ext >&5
20474   rm -rf conftest*
20475   eval "ac_cv_header_$ac_safe=no"
20476 fi
20477 rm -f conftest*
20478 fi
20479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20480   echo "$ac_t""yes" 1>&6
20481     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20482   cat >> confdefs.h <<EOF
20483 #define $ac_tr_hdr 1
20484 EOF
20485  
20486 else
20487   echo "$ac_t""no" 1>&6
20488 fi
20489 done
20490
20491  echo $ac_n "checking for db""... $ac_c" 1>&6
20492 echo "configure:20493: checking for db" >&5
20493 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20494   echo $ac_n "(cached) $ac_c" 1>&6
20495 else
20496   
20497         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20498                 ol_cv_ndbm=no
20499         else
20500                 ol_cv_ndbm=yes
20501         fi
20502
20503 fi
20504
20505 echo "$ac_t""$ol_cv_ndbm" 1>&6
20506  if test $ol_cv_ndbm = yes ; then
20507         cat >> confdefs.h <<\EOF
20508 #define HAVE_NDBM 1
20509 EOF
20510
20511  fi
20512
20513
20514         if test $ol_cv_ndbm = yes ; then
20515                 ol_link_ldbm=ndbm
20516                 ol_with_ldbm_api=ndbm
20517
20518                 if test $ol_cv_lib_ndbm != yes ; then
20519                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20520                 fi
20521         fi
20522 fi
20523
20524 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20525         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20526 fi
20527
20528 if test $ol_enable_bdb = yes -o \
20529         $ol_enable_hdb = yes -o \
20530         $ol_enable_ldbm = yes ; then
20531         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20532 fi
20533
20534
20535 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20536         BUILD_LIBS_DYNAMIC=shared
20537         cat >> confdefs.h <<\EOF
20538 #define LDAP_LIBS_DYNAMIC 1
20539 EOF
20540
20541         LTSTATIC=""
20542 else
20543         BUILD_LIBS_DYNAMIC=static
20544         LTSTATIC="-static"
20545 fi
20546
20547 if test $ol_enable_wrappers != no ; then
20548         for ac_hdr in tcpd.h
20549 do
20550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20552 echo "configure:20553: checking for $ac_hdr" >&5
20553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20554   echo $ac_n "(cached) $ac_c" 1>&6
20555 else
20556   cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559 #include <$ac_hdr>
20560 EOF
20561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20562 { (eval echo configure:20563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20564 if test -z "$ac_err"; then
20565   rm -rf conftest*
20566   eval "ac_cv_header_$ac_safe=yes"
20567 else
20568   echo "$ac_err" >&5
20569   echo "configure: failed program was:" >&5
20570   cat conftest.$ac_ext >&5
20571   rm -rf conftest*
20572   eval "ac_cv_header_$ac_safe=no"
20573 fi
20574 rm -f conftest*
20575 fi
20576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20577   echo "$ac_t""yes" 1>&6
20578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20579   cat >> confdefs.h <<EOF
20580 #define $ac_tr_hdr 1
20581 EOF
20582  
20583                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20584 echo "configure:20585: checking for TCP wrappers library" >&5
20585                 save_LIBS="$LIBS"
20586                 LIBS="$LIBS -lwrap"
20587                 cat > conftest.$ac_ext <<EOF
20588 #line 20589 "configure"
20589 #include "confdefs.h"
20590
20591 #include <tcpd.h>
20592 int allow_severity = 0;
20593 int deny_severity  = 0;
20594
20595 struct request_info *req;
20596                 
20597 int main() {
20598
20599 hosts_access(req)
20600                 
20601 ; return 0; }
20602 EOF
20603 if { (eval echo configure:20604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20604   rm -rf conftest*
20605   echo "$ac_t""-lwrap" 1>&6
20606                 have_wrappers=yes
20607                 LIBS="$save_LIBS"
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   
20613                                 LIBS="$LIBS -lnsl"
20614                 cat > conftest.$ac_ext <<EOF
20615 #line 20616 "configure"
20616 #include "confdefs.h"
20617
20618 #include <tcpd.h>
20619 int allow_severity = 0;
20620 int deny_severity  = 0;
20621
20622 struct request_info *req;
20623                 
20624 int main() {
20625
20626 hosts_access(req)
20627                 
20628 ; return 0; }
20629 EOF
20630 if { (eval echo configure:20631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20631   rm -rf conftest*
20632   echo "$ac_t""-lwrap -lnsl" 1>&6
20633                 have_wrappers=yes
20634                 LIBS="$save_LIBS -lnsl"
20635 else
20636   echo "configure: failed program was:" >&5
20637   cat conftest.$ac_ext >&5
20638   rm -rf conftest*
20639   
20640                 echo "$ac_t""no" 1>&6
20641                 have_wrappers=no
20642                 LIBS=$save_LIBS
20643 fi
20644 rm -f conftest*
20645 fi
20646 rm -f conftest*
20647 else
20648   echo "$ac_t""no" 1>&6
20649 have_wrappers=no
20650 fi
20651 done
20652
20653
20654         if test $have_wrappers = yes ; then
20655                 cat >> confdefs.h <<\EOF
20656 #define HAVE_TCPD 1
20657 EOF
20658
20659                 WRAP_LIBS="-lwrap"
20660         elif test $ol_enable_wrappers = yes ; then
20661                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20662         else
20663                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20664                 WRAP_LIBS=""
20665         fi
20666 fi
20667
20668 if test $ol_enable_syslog != no ; then
20669         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20670 echo "configure:20671: checking for openlog" >&5
20671 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20672   echo $ac_n "(cached) $ac_c" 1>&6
20673 else
20674   cat > conftest.$ac_ext <<EOF
20675 #line 20676 "configure"
20676 #include "confdefs.h"
20677 /* System header to define __stub macros and hopefully few prototypes,
20678     which can conflict with char openlog(); below.  */
20679 #include <assert.h>
20680 /* Override any gcc2 internal prototype to avoid an error.  */
20681 /* We use char because int might match the return type of a gcc2
20682     builtin and then its argument prototype would still apply.  */
20683 char openlog();
20684 char (*f)();
20685
20686 int main() {
20687
20688 /* The GNU C library defines this for functions which it implements
20689     to always fail with ENOSYS.  Some functions are actually named
20690     something starting with __ and the normal name is an alias.  */
20691 #if defined (__stub_openlog) || defined (__stub___openlog)
20692 choke me
20693 #else
20694 f = openlog;
20695 #endif
20696
20697 ; return 0; }
20698 EOF
20699 if { (eval echo configure:20700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20700   rm -rf conftest*
20701   eval "ac_cv_func_openlog=yes"
20702 else
20703   echo "configure: failed program was:" >&5
20704   cat conftest.$ac_ext >&5
20705   rm -rf conftest*
20706   eval "ac_cv_func_openlog=no"
20707 fi
20708 rm -f conftest*
20709 fi
20710
20711 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20712   echo "$ac_t""yes" 1>&6
20713   :
20714 else
20715   echo "$ac_t""no" 1>&6
20716 fi
20717
20718         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20719                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20720         fi
20721         ol_enable_syslog=$ac_cv_func_openlog
20722 fi
20723
20724
20725 ol_link_sql=no
20726 if test $ol_enable_sql != no ; then
20727         for ac_hdr in sql.h sqlext.h
20728 do
20729 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20730 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20731 echo "configure:20732: checking for $ac_hdr" >&5
20732 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20733   echo $ac_n "(cached) $ac_c" 1>&6
20734 else
20735   cat > conftest.$ac_ext <<EOF
20736 #line 20737 "configure"
20737 #include "confdefs.h"
20738 #include <$ac_hdr>
20739 EOF
20740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20741 { (eval echo configure:20742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20743 if test -z "$ac_err"; then
20744   rm -rf conftest*
20745   eval "ac_cv_header_$ac_safe=yes"
20746 else
20747   echo "$ac_err" >&5
20748   echo "configure: failed program was:" >&5
20749   cat conftest.$ac_ext >&5
20750   rm -rf conftest*
20751   eval "ac_cv_header_$ac_safe=no"
20752 fi
20753 rm -f conftest*
20754 fi
20755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20756   echo "$ac_t""yes" 1>&6
20757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20758   cat >> confdefs.h <<EOF
20759 #define $ac_tr_hdr 1
20760 EOF
20761  
20762 else
20763   echo "$ac_t""no" 1>&6
20764 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20765         
20766 fi
20767 done
20768
20769
20770         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20771 echo "configure:20772: checking for SQLDriverConnect in -liodbc" >&5
20772 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20773 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20774   echo $ac_n "(cached) $ac_c" 1>&6
20775 else
20776   ac_save_LIBS="$LIBS"
20777 LIBS="-liodbc  $LIBS"
20778 cat > conftest.$ac_ext <<EOF
20779 #line 20780 "configure"
20780 #include "confdefs.h"
20781 /* Override any gcc2 internal prototype to avoid an error.  */
20782 /* We use char because int might match the return type of a gcc2
20783     builtin and then its argument prototype would still apply.  */
20784 char SQLDriverConnect();
20785
20786 int main() {
20787 SQLDriverConnect()
20788 ; return 0; }
20789 EOF
20790 if { (eval echo configure:20791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20791   rm -rf conftest*
20792   eval "ac_cv_lib_$ac_lib_var=yes"
20793 else
20794   echo "configure: failed program was:" >&5
20795   cat conftest.$ac_ext >&5
20796   rm -rf conftest*
20797   eval "ac_cv_lib_$ac_lib_var=no"
20798 fi
20799 rm -f conftest*
20800 LIBS="$ac_save_LIBS"
20801
20802 fi
20803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20804   echo "$ac_t""yes" 1>&6
20805   have_iodbc=yes
20806 else
20807   echo "$ac_t""no" 1>&6
20808 have_iodbc=no
20809 fi
20810
20811         if test $have_iodbc = yes ; then
20812                 ol_link_sql="-liodbc"
20813         else
20814                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20815 echo "configure:20816: checking for SQLDriverConnect in -lodbc" >&5
20816 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20817 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20818   echo $ac_n "(cached) $ac_c" 1>&6
20819 else
20820   ac_save_LIBS="$LIBS"
20821 LIBS="-lodbc  $LIBS"
20822 cat > conftest.$ac_ext <<EOF
20823 #line 20824 "configure"
20824 #include "confdefs.h"
20825 /* Override any gcc2 internal prototype to avoid an error.  */
20826 /* We use char because int might match the return type of a gcc2
20827     builtin and then its argument prototype would still apply.  */
20828 char SQLDriverConnect();
20829
20830 int main() {
20831 SQLDriverConnect()
20832 ; return 0; }
20833 EOF
20834 if { (eval echo configure:20835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20835   rm -rf conftest*
20836   eval "ac_cv_lib_$ac_lib_var=yes"
20837 else
20838   echo "configure: failed program was:" >&5
20839   cat conftest.$ac_ext >&5
20840   rm -rf conftest*
20841   eval "ac_cv_lib_$ac_lib_var=no"
20842 fi
20843 rm -f conftest*
20844 LIBS="$ac_save_LIBS"
20845
20846 fi
20847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20848   echo "$ac_t""yes" 1>&6
20849   have_odbc=yes
20850 else
20851   echo "$ac_t""no" 1>&6
20852 have_odbc=no
20853 fi
20854
20855                 if test $have_odbc = yes ; then
20856                         ol_link_sql="-lodbc"
20857                 fi
20858         fi
20859
20860         if test $ol_link_sql != no ; then
20861                 SLAPD_SQL_LIBS="$ol_link_sql"
20862
20863         elif test $ol_enable_sql != auto ; then
20864                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20865         fi
20866 fi
20867
20868 ol_link_sasl=no
20869 ol_link_spasswd=no
20870 if test $ol_with_cyrus_sasl != no ; then
20871         for ac_hdr in sasl/sasl.h sasl.h
20872 do
20873 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20874 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20875 echo "configure:20876: checking for $ac_hdr" >&5
20876 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20877   echo $ac_n "(cached) $ac_c" 1>&6
20878 else
20879   cat > conftest.$ac_ext <<EOF
20880 #line 20881 "configure"
20881 #include "confdefs.h"
20882 #include <$ac_hdr>
20883 EOF
20884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20885 { (eval echo configure:20886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20887 if test -z "$ac_err"; then
20888   rm -rf conftest*
20889   eval "ac_cv_header_$ac_safe=yes"
20890 else
20891   echo "$ac_err" >&5
20892   echo "configure: failed program was:" >&5
20893   cat conftest.$ac_ext >&5
20894   rm -rf conftest*
20895   eval "ac_cv_header_$ac_safe=no"
20896 fi
20897 rm -f conftest*
20898 fi
20899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20900   echo "$ac_t""yes" 1>&6
20901     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20902   cat >> confdefs.h <<EOF
20903 #define $ac_tr_hdr 1
20904 EOF
20905  
20906 else
20907   echo "$ac_t""no" 1>&6
20908 fi
20909 done
20910
20911
20912         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20913                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20914 echo "configure:20915: checking for sasl_client_init in -lsasl2" >&5
20915 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20917   echo $ac_n "(cached) $ac_c" 1>&6
20918 else
20919   ac_save_LIBS="$LIBS"
20920 LIBS="-lsasl2  $LIBS"
20921 cat > conftest.$ac_ext <<EOF
20922 #line 20923 "configure"
20923 #include "confdefs.h"
20924 /* Override any gcc2 internal prototype to avoid an error.  */
20925 /* We use char because int might match the return type of a gcc2
20926     builtin and then its argument prototype would still apply.  */
20927 char sasl_client_init();
20928
20929 int main() {
20930 sasl_client_init()
20931 ; return 0; }
20932 EOF
20933 if { (eval echo configure:20934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20934   rm -rf conftest*
20935   eval "ac_cv_lib_$ac_lib_var=yes"
20936 else
20937   echo "configure: failed program was:" >&5
20938   cat conftest.$ac_ext >&5
20939   rm -rf conftest*
20940   eval "ac_cv_lib_$ac_lib_var=no"
20941 fi
20942 rm -f conftest*
20943 LIBS="$ac_save_LIBS"
20944
20945 fi
20946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20947   echo "$ac_t""yes" 1>&6
20948   ol_link_sasl="-lsasl2"
20949 else
20950   echo "$ac_t""no" 1>&6
20951 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20952 echo "configure:20953: checking for sasl_client_init in -lsasl" >&5
20953 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20955   echo $ac_n "(cached) $ac_c" 1>&6
20956 else
20957   ac_save_LIBS="$LIBS"
20958 LIBS="-lsasl  $LIBS"
20959 cat > conftest.$ac_ext <<EOF
20960 #line 20961 "configure"
20961 #include "confdefs.h"
20962 /* Override any gcc2 internal prototype to avoid an error.  */
20963 /* We use char because int might match the return type of a gcc2
20964     builtin and then its argument prototype would still apply.  */
20965 char sasl_client_init();
20966
20967 int main() {
20968 sasl_client_init()
20969 ; return 0; }
20970 EOF
20971 if { (eval echo configure:20972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20972   rm -rf conftest*
20973   eval "ac_cv_lib_$ac_lib_var=yes"
20974 else
20975   echo "configure: failed program was:" >&5
20976   cat conftest.$ac_ext >&5
20977   rm -rf conftest*
20978   eval "ac_cv_lib_$ac_lib_var=no"
20979 fi
20980 rm -f conftest*
20981 LIBS="$ac_save_LIBS"
20982
20983 fi
20984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20985   echo "$ac_t""yes" 1>&6
20986   ol_link_sasl="-lsasl"
20987 else
20988   echo "$ac_t""no" 1>&6
20989 fi
20990
20991 fi
20992
20993         fi
20994
20995         if test $ol_link_sasl = no ; then
20996                 if test $ol_with_cyrus_sasl != auto ; then
20997                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20998                 else
20999                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21000                         echo "configure: warning: SASL authentication not supported!" 1>&2
21001                         if test $ol_link_tls = no ; then
21002                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21003                         fi
21004                 fi
21005         else
21006                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21007 echo "configure:21008: checking Cyrus SASL library version" >&5
21008 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21009   echo $ac_n "(cached) $ac_c" 1>&6
21010 else
21011   
21012         cat > conftest.$ac_ext <<EOF
21013 #line 21014 "configure"
21014 #include "confdefs.h"
21015
21016 #ifdef HAVE_SASL_SASL_H
21017 #include <sasl/sasl.h>
21018 #else
21019 #include <sasl.h>
21020 #endif
21021
21022 /* Require 2.1.15+ */
21023 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21024         char *__sasl_compat = "2.2+ or better okay (we guess)";
21025 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21026         && SASL_VERSION_STEP >=15
21027         char *__sasl_compat = "2.1.15+ or better okay";
21028 #endif
21029         
21030 EOF
21031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21032   egrep "__sasl_compat" >/dev/null 2>&1; then
21033   rm -rf conftest*
21034   ol_cv_sasl_compat=yes
21035 else
21036   rm -rf conftest*
21037   ol_cv_sasl_compat=no
21038 fi
21039 rm -f conftest*
21040
21041 fi
21042
21043 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21044
21045                 if test $ol_cv_sasl_compat = no ; then
21046                         ol_link_sasl=no
21047                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21048                 fi
21049
21050                 cat >> confdefs.h <<\EOF
21051 #define HAVE_CYRUS_SASL 1
21052 EOF
21053
21054                 SASL_LIBS="$ol_link_sasl"
21055                 if test $ol_enable_spasswd != no ; then
21056                         ol_link_spasswd=yes
21057                 fi
21058
21059                 ac_save_LIBS="$LIBS"
21060                 LIBS="$LIBS $ol_link_sasl"
21061                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21062 echo "configure:21063: checking for sasl_version" >&5
21063 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21064   echo $ac_n "(cached) $ac_c" 1>&6
21065 else
21066   cat > conftest.$ac_ext <<EOF
21067 #line 21068 "configure"
21068 #include "confdefs.h"
21069 /* System header to define __stub macros and hopefully few prototypes,
21070     which can conflict with char sasl_version(); below.  */
21071 #include <assert.h>
21072 /* Override any gcc2 internal prototype to avoid an error.  */
21073 /* We use char because int might match the return type of a gcc2
21074     builtin and then its argument prototype would still apply.  */
21075 char sasl_version();
21076 char (*f)();
21077
21078 int main() {
21079
21080 /* The GNU C library defines this for functions which it implements
21081     to always fail with ENOSYS.  Some functions are actually named
21082     something starting with __ and the normal name is an alias.  */
21083 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21084 choke me
21085 #else
21086 f = sasl_version;
21087 #endif
21088
21089 ; return 0; }
21090 EOF
21091 if { (eval echo configure:21092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21092   rm -rf conftest*
21093   eval "ac_cv_func_sasl_version=yes"
21094 else
21095   echo "configure: failed program was:" >&5
21096   cat conftest.$ac_ext >&5
21097   rm -rf conftest*
21098   eval "ac_cv_func_sasl_version=no"
21099 fi
21100 rm -f conftest*
21101 fi
21102
21103 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21104   echo "$ac_t""yes" 1>&6
21105   cat >> confdefs.h <<\EOF
21106 #define HAVE_SASL_VERSION 1
21107 EOF
21108
21109 else
21110   echo "$ac_t""no" 1>&6
21111 fi
21112
21113                 LIBS="$ac_save_LIBS"
21114         fi
21115
21116 else
21117         echo "configure: warning: SASL authentication not supported!" 1>&2
21118         if test $ol_link_tls = no ; then
21119                 echo "configure: warning: Strong authentication not supported!" 1>&2
21120         fi
21121 fi
21122
21123 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21124         dev=no
21125         if test -r /dev/urandom ; then
21126                 dev="/dev/urandom";
21127         elif test -r /idev/urandom ; then
21128                 dev="/idev/urandom";
21129         elif test -r /dev/srandom ; then
21130                 dev="/dev/srandom";
21131         elif test -r /dev/random ; then
21132                 dev="/dev/random";
21133         elif test -r /idev/random ; then
21134                 dev="/idev/random";
21135         fi
21136
21137         if test $dev != no ; then
21138                 cat >> confdefs.h <<EOF
21139 #define URANDOM_DEVICE "$dev"
21140 EOF
21141
21142         fi
21143 fi
21144
21145 ol_link_fetch=no
21146 if test $ol_with_fetch != no ; then
21147         ol_LIBS=$LIBS
21148 LIBS="-lfetch -lcom_err $LIBS"
21149 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21150 echo "configure:21151: checking fetch(3) library" >&5
21151 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21152   echo $ac_n "(cached) $ac_c" 1>&6
21153 else
21154   
21155         cat > conftest.$ac_ext <<EOF
21156 #line 21157 "configure"
21157 #include "confdefs.h"
21158
21159 #include <sys/param.h>
21160 #include <stdio.h>
21161 #include <fetch.h>
21162 int main() {
21163 struct url *u = fetchParseURL("file:///"); 
21164 ; return 0; }
21165 EOF
21166 if { (eval echo configure:21167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21167   rm -rf conftest*
21168   ol_cv_lib_fetch=yes
21169 else
21170   echo "configure: failed program was:" >&5
21171   cat conftest.$ac_ext >&5
21172   rm -rf conftest*
21173   ol_cv_lib_fetch=no
21174 fi
21175 rm -f conftest*
21176 fi
21177
21178 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21179 LIBS=$ol_LIBS
21180 if test $ol_cv_lib_fetch != no ; then
21181         ol_link_fetch="-lfetch -lcom_err"
21182         cat >> confdefs.h <<\EOF
21183 #define HAVE_FETCH 1
21184 EOF
21185
21186 fi
21187
21188
21189         if test $ol_cv_lib_fetch != no ; then
21190                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21191                 ol_link_fetch=freebsd
21192
21193         elif test $ol_with_fetch != auto ; then
21194                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21195         fi 
21196 fi
21197
21198 if test $ol_enable_crypt != no ; then
21199         save_LIBS="$LIBS"
21200         LIBS="$TLS_LIBS $LIBS"
21201
21202         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21203 echo "configure:21204: checking for crypt" >&5
21204 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21205   echo $ac_n "(cached) $ac_c" 1>&6
21206 else
21207   cat > conftest.$ac_ext <<EOF
21208 #line 21209 "configure"
21209 #include "confdefs.h"
21210 /* System header to define __stub macros and hopefully few prototypes,
21211     which can conflict with char crypt(); below.  */
21212 #include <assert.h>
21213 /* Override any gcc2 internal prototype to avoid an error.  */
21214 /* We use char because int might match the return type of a gcc2
21215     builtin and then its argument prototype would still apply.  */
21216 char crypt();
21217 char (*f)();
21218
21219 int main() {
21220
21221 /* The GNU C library defines this for functions which it implements
21222     to always fail with ENOSYS.  Some functions are actually named
21223     something starting with __ and the normal name is an alias.  */
21224 #if defined (__stub_crypt) || defined (__stub___crypt)
21225 choke me
21226 #else
21227 f = crypt;
21228 #endif
21229
21230 ; return 0; }
21231 EOF
21232 if { (eval echo configure:21233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21233   rm -rf conftest*
21234   eval "ac_cv_func_crypt=yes"
21235 else
21236   echo "configure: failed program was:" >&5
21237   cat conftest.$ac_ext >&5
21238   rm -rf conftest*
21239   eval "ac_cv_func_crypt=no"
21240 fi
21241 rm -f conftest*
21242 fi
21243
21244 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21245   echo "$ac_t""yes" 1>&6
21246   have_crypt=yes
21247 else
21248   echo "$ac_t""no" 1>&6
21249
21250                 LIBS="$save_LIBS"
21251                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21252 echo "configure:21253: checking for crypt in -lcrypt" >&5
21253 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21254 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21255   echo $ac_n "(cached) $ac_c" 1>&6
21256 else
21257   ac_save_LIBS="$LIBS"
21258 LIBS="-lcrypt  $LIBS"
21259 cat > conftest.$ac_ext <<EOF
21260 #line 21261 "configure"
21261 #include "confdefs.h"
21262 /* Override any gcc2 internal prototype to avoid an error.  */
21263 /* We use char because int might match the return type of a gcc2
21264     builtin and then its argument prototype would still apply.  */
21265 char crypt();
21266
21267 int main() {
21268 crypt()
21269 ; return 0; }
21270 EOF
21271 if { (eval echo configure:21272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21272   rm -rf conftest*
21273   eval "ac_cv_lib_$ac_lib_var=yes"
21274 else
21275   echo "configure: failed program was:" >&5
21276   cat conftest.$ac_ext >&5
21277   rm -rf conftest*
21278   eval "ac_cv_lib_$ac_lib_var=no"
21279 fi
21280 rm -f conftest*
21281 LIBS="$ac_save_LIBS"
21282
21283 fi
21284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21285   echo "$ac_t""yes" 1>&6
21286   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21287                         have_crypt=yes
21288 else
21289   echo "$ac_t""no" 1>&6
21290 have_crypt=no
21291 fi
21292
21293 fi
21294
21295
21296         LIBS="$save_LIBS"
21297
21298         if test $have_crypt = yes ; then
21299                 cat >> confdefs.h <<\EOF
21300 #define HAVE_CRYPT 1
21301 EOF
21302
21303         else
21304                 echo "configure: warning: could not find crypt" 1>&2
21305                 if test $ol_enable_crypt = yes ; then
21306                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21307                 fi
21308
21309                 echo "configure: warning: disabling crypt support" 1>&2
21310                 ol_enable_crypt=no
21311         fi
21312 fi
21313
21314 if test $ol_enable_proctitle != no ; then
21315         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21316 echo "configure:21317: checking for setproctitle" >&5
21317 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21318   echo $ac_n "(cached) $ac_c" 1>&6
21319 else
21320   cat > conftest.$ac_ext <<EOF
21321 #line 21322 "configure"
21322 #include "confdefs.h"
21323 /* System header to define __stub macros and hopefully few prototypes,
21324     which can conflict with char setproctitle(); below.  */
21325 #include <assert.h>
21326 /* Override any gcc2 internal prototype to avoid an error.  */
21327 /* We use char because int might match the return type of a gcc2
21328     builtin and then its argument prototype would still apply.  */
21329 char setproctitle();
21330 char (*f)();
21331
21332 int main() {
21333
21334 /* The GNU C library defines this for functions which it implements
21335     to always fail with ENOSYS.  Some functions are actually named
21336     something starting with __ and the normal name is an alias.  */
21337 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21338 choke me
21339 #else
21340 f = setproctitle;
21341 #endif
21342
21343 ; return 0; }
21344 EOF
21345 if { (eval echo configure:21346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21346   rm -rf conftest*
21347   eval "ac_cv_func_setproctitle=yes"
21348 else
21349   echo "configure: failed program was:" >&5
21350   cat conftest.$ac_ext >&5
21351   rm -rf conftest*
21352   eval "ac_cv_func_setproctitle=no"
21353 fi
21354 rm -f conftest*
21355 fi
21356
21357 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21358   echo "$ac_t""yes" 1>&6
21359   have_setproctitle=yes
21360 else
21361   echo "$ac_t""no" 1>&6
21362
21363                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21364 echo "configure:21365: checking for setproctitle in -lutil" >&5
21365 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21367   echo $ac_n "(cached) $ac_c" 1>&6
21368 else
21369   ac_save_LIBS="$LIBS"
21370 LIBS="-lutil  $LIBS"
21371 cat > conftest.$ac_ext <<EOF
21372 #line 21373 "configure"
21373 #include "confdefs.h"
21374 /* Override any gcc2 internal prototype to avoid an error.  */
21375 /* We use char because int might match the return type of a gcc2
21376     builtin and then its argument prototype would still apply.  */
21377 char setproctitle();
21378
21379 int main() {
21380 setproctitle()
21381 ; return 0; }
21382 EOF
21383 if { (eval echo configure:21384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21384   rm -rf conftest*
21385   eval "ac_cv_lib_$ac_lib_var=yes"
21386 else
21387   echo "configure: failed program was:" >&5
21388   cat conftest.$ac_ext >&5
21389   rm -rf conftest*
21390   eval "ac_cv_lib_$ac_lib_var=no"
21391 fi
21392 rm -f conftest*
21393 LIBS="$ac_save_LIBS"
21394
21395 fi
21396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21397   echo "$ac_t""yes" 1>&6
21398   have_setproctitle=yes
21399                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21400 else
21401   echo "$ac_t""no" 1>&6
21402 have_setproctitle=no
21403                         LIBOBJS="$LIBOBJS setproctitle.o"
21404                         LIBSRCS="$LIBSRCS setproctitle.c"
21405 fi
21406
21407 fi
21408
21409
21410         if test $have_setproctitle = yes ; then
21411                 cat >> confdefs.h <<\EOF
21412 #define HAVE_SETPROCTITLE 1
21413 EOF
21414
21415         fi
21416 fi
21417
21418 if test $ol_enable_slp != no ; then
21419         for ac_hdr in slp.h 
21420 do
21421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21423 echo "configure:21424: checking for $ac_hdr" >&5
21424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21425   echo $ac_n "(cached) $ac_c" 1>&6
21426 else
21427   cat > conftest.$ac_ext <<EOF
21428 #line 21429 "configure"
21429 #include "confdefs.h"
21430 #include <$ac_hdr>
21431 EOF
21432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21433 { (eval echo configure:21434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21435 if test -z "$ac_err"; then
21436   rm -rf conftest*
21437   eval "ac_cv_header_$ac_safe=yes"
21438 else
21439   echo "$ac_err" >&5
21440   echo "configure: failed program was:" >&5
21441   cat conftest.$ac_ext >&5
21442   rm -rf conftest*
21443   eval "ac_cv_header_$ac_safe=no"
21444 fi
21445 rm -f conftest*
21446 fi
21447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21448   echo "$ac_t""yes" 1>&6
21449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21450   cat >> confdefs.h <<EOF
21451 #define $ac_tr_hdr 1
21452 EOF
21453  
21454 else
21455   echo "$ac_t""no" 1>&6
21456 fi
21457 done
21458
21459
21460         if test $ac_cv_header_slp_h = yes ; then
21461                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21462 echo "configure:21463: checking for SLPOpen in -lslp" >&5
21463 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21465   echo $ac_n "(cached) $ac_c" 1>&6
21466 else
21467   ac_save_LIBS="$LIBS"
21468 LIBS="-lslp  $LIBS"
21469 cat > conftest.$ac_ext <<EOF
21470 #line 21471 "configure"
21471 #include "confdefs.h"
21472 /* Override any gcc2 internal prototype to avoid an error.  */
21473 /* We use char because int might match the return type of a gcc2
21474     builtin and then its argument prototype would still apply.  */
21475 char SLPOpen();
21476
21477 int main() {
21478 SLPOpen()
21479 ; return 0; }
21480 EOF
21481 if { (eval echo configure:21482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21482   rm -rf conftest*
21483   eval "ac_cv_lib_$ac_lib_var=yes"
21484 else
21485   echo "configure: failed program was:" >&5
21486   cat conftest.$ac_ext >&5
21487   rm -rf conftest*
21488   eval "ac_cv_lib_$ac_lib_var=no"
21489 fi
21490 rm -f conftest*
21491 LIBS="$ac_save_LIBS"
21492
21493 fi
21494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21495   echo "$ac_t""yes" 1>&6
21496   have_slp=yes
21497 else
21498   echo "$ac_t""no" 1>&6
21499 have_slp=no
21500 fi
21501
21502                 if test $have_slp = yes ; then
21503                         cat >> confdefs.h <<\EOF
21504 #define HAVE_SLP 1
21505 EOF
21506
21507                         SLAPD_SLP_LIBS=-lslp
21508                 fi
21509
21510         elif test $ol_enable_slp = yes ; then
21511                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21512         fi
21513 fi
21514
21515
21516 echo $ac_n "checking long long""... $ac_c" 1>&6
21517 echo "configure:21518: checking long long" >&5
21518 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21519   echo $ac_n "(cached) $ac_c" 1>&6
21520 else
21521   
21522         cat > conftest.$ac_ext <<EOF
21523 #line 21524 "configure"
21524 #include "confdefs.h"
21525
21526 int main() {
21527 long long x;
21528 ; return 0; }
21529 EOF
21530 if { (eval echo configure:21531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21531   rm -rf conftest*
21532   ol_cv_type_long_long=yes
21533 else
21534   echo "configure: failed program was:" >&5
21535   cat conftest.$ac_ext >&5
21536   rm -rf conftest*
21537   ol_cv_type_long_long=no
21538 fi
21539 rm -f conftest*
21540 fi
21541
21542 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21543 if test $ol_cv_type_long_long = yes; then
21544         cat >> confdefs.h <<\EOF
21545 #define HAVE_LONG_LONG 1
21546 EOF
21547
21548 fi
21549
21550 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21551 echo "configure:21552: checking for ANSI C header files" >&5
21552 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21553   echo $ac_n "(cached) $ac_c" 1>&6
21554 else
21555   cat > conftest.$ac_ext <<EOF
21556 #line 21557 "configure"
21557 #include "confdefs.h"
21558 #include <stdlib.h>
21559 #include <stdarg.h>
21560 #include <string.h>
21561 #include <float.h>
21562 EOF
21563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21564 { (eval echo configure:21565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21566 if test -z "$ac_err"; then
21567   rm -rf conftest*
21568   ac_cv_header_stdc=yes
21569 else
21570   echo "$ac_err" >&5
21571   echo "configure: failed program was:" >&5
21572   cat conftest.$ac_ext >&5
21573   rm -rf conftest*
21574   ac_cv_header_stdc=no
21575 fi
21576 rm -f conftest*
21577
21578 if test $ac_cv_header_stdc = yes; then
21579   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21580 cat > conftest.$ac_ext <<EOF
21581 #line 21582 "configure"
21582 #include "confdefs.h"
21583 #include <string.h>
21584 EOF
21585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21586   egrep "memchr" >/dev/null 2>&1; then
21587   :
21588 else
21589   rm -rf conftest*
21590   ac_cv_header_stdc=no
21591 fi
21592 rm -f conftest*
21593
21594 fi
21595
21596 if test $ac_cv_header_stdc = yes; then
21597   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21598 cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601 #include <stdlib.h>
21602 EOF
21603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21604   egrep "free" >/dev/null 2>&1; then
21605   :
21606 else
21607   rm -rf conftest*
21608   ac_cv_header_stdc=no
21609 fi
21610 rm -f conftest*
21611
21612 fi
21613
21614 if test $ac_cv_header_stdc = yes; then
21615   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21616 if test "$cross_compiling" = yes; then
21617   :
21618 else
21619   cat > conftest.$ac_ext <<EOF
21620 #line 21621 "configure"
21621 #include "confdefs.h"
21622 #include <ctype.h>
21623 #if ((' ' & 0x0FF) == 0x020)
21624 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21625 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21626 #else
21627 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21628  || ('j' <= (c) && (c) <= 'r') \
21629  || ('s' <= (c) && (c) <= 'z'))
21630 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21631 #endif
21632 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21633 int main () { int i; for (i = 0; i < 256; i++)
21634 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21635 exit (0); }
21636
21637 EOF
21638 if { (eval echo configure:21639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21639 then
21640   :
21641 else
21642   echo "configure: failed program was:" >&5
21643   cat conftest.$ac_ext >&5
21644   rm -fr conftest*
21645   ac_cv_header_stdc=no
21646 fi
21647 rm -fr conftest*
21648 fi
21649
21650 fi
21651 fi
21652
21653 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21654 if test $ac_cv_header_stdc = yes; then
21655   cat >> confdefs.h <<\EOF
21656 #define STDC_HEADERS 1
21657 EOF
21658
21659 fi
21660
21661 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21662 echo "configure:21663: checking for mode_t" >&5
21663 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21664   echo $ac_n "(cached) $ac_c" 1>&6
21665 else
21666   cat > conftest.$ac_ext <<EOF
21667 #line 21668 "configure"
21668 #include "confdefs.h"
21669 #include <sys/types.h>
21670 #if STDC_HEADERS
21671 #include <stdlib.h>
21672 #include <stddef.h>
21673 #endif
21674
21675 EOF
21676 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21677   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21678   rm -rf conftest*
21679   eval "ac_cv_type_mode_t=yes"
21680 else
21681   rm -rf conftest*
21682   eval "ac_cv_type_mode_t=no"
21683 fi
21684 rm -f conftest*
21685
21686 fi
21687 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21688   echo "$ac_t""yes" 1>&6
21689 else
21690   echo "$ac_t""no" 1>&6
21691   cat >> confdefs.h <<EOF
21692 #define mode_t int
21693 EOF
21694
21695 fi
21696
21697 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21698 echo "configure:21699: checking for off_t" >&5
21699 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21700   echo $ac_n "(cached) $ac_c" 1>&6
21701 else
21702   cat > conftest.$ac_ext <<EOF
21703 #line 21704 "configure"
21704 #include "confdefs.h"
21705 #include <sys/types.h>
21706 #if STDC_HEADERS
21707 #include <stdlib.h>
21708 #include <stddef.h>
21709 #endif
21710
21711 EOF
21712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21713   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21714   rm -rf conftest*
21715   eval "ac_cv_type_off_t=yes"
21716 else
21717   rm -rf conftest*
21718   eval "ac_cv_type_off_t=no"
21719 fi
21720 rm -f conftest*
21721
21722 fi
21723 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21724   echo "$ac_t""yes" 1>&6
21725 else
21726   echo "$ac_t""no" 1>&6
21727   cat >> confdefs.h <<EOF
21728 #define off_t long
21729 EOF
21730
21731 fi
21732
21733 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21734 echo "configure:21735: checking for pid_t" >&5
21735 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21736   echo $ac_n "(cached) $ac_c" 1>&6
21737 else
21738   cat > conftest.$ac_ext <<EOF
21739 #line 21740 "configure"
21740 #include "confdefs.h"
21741 #include <sys/types.h>
21742 #if STDC_HEADERS
21743 #include <stdlib.h>
21744 #include <stddef.h>
21745 #endif
21746
21747 EOF
21748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21749   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21750   rm -rf conftest*
21751   eval "ac_cv_type_pid_t=yes"
21752 else
21753   rm -rf conftest*
21754   eval "ac_cv_type_pid_t=no"
21755 fi
21756 rm -f conftest*
21757
21758 fi
21759 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21760   echo "$ac_t""yes" 1>&6
21761 else
21762   echo "$ac_t""no" 1>&6
21763   cat >> confdefs.h <<EOF
21764 #define pid_t int
21765 EOF
21766
21767 fi
21768
21769 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21770 echo "configure:21771: checking for ptrdiff_t" >&5
21771 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21772   echo $ac_n "(cached) $ac_c" 1>&6
21773 else
21774   cat > conftest.$ac_ext <<EOF
21775 #line 21776 "configure"
21776 #include "confdefs.h"
21777 #include <stddef.h>
21778 int main() {
21779 ptrdiff_t p
21780 ; return 0; }
21781 EOF
21782 if { (eval echo configure:21783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21783   rm -rf conftest*
21784   am_cv_type_ptrdiff_t=yes
21785 else
21786   echo "configure: failed program was:" >&5
21787   cat conftest.$ac_ext >&5
21788   rm -rf conftest*
21789   am_cv_type_ptrdiff_t=no
21790 fi
21791 rm -f conftest*
21792 fi
21793
21794 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21795    if test $am_cv_type_ptrdiff_t = yes; then
21796      cat >> confdefs.h <<\EOF
21797 #define HAVE_PTRDIFF_T 1
21798 EOF
21799
21800    fi
21801
21802 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21803 echo "configure:21804: checking return type of signal handlers" >&5
21804 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21805   echo $ac_n "(cached) $ac_c" 1>&6
21806 else
21807   cat > conftest.$ac_ext <<EOF
21808 #line 21809 "configure"
21809 #include "confdefs.h"
21810 #include <sys/types.h>
21811 #include <signal.h>
21812 #ifdef signal
21813 #undef signal
21814 #endif
21815 #ifdef __cplusplus
21816 extern "C" void (*signal (int, void (*)(int)))(int);
21817 #else
21818 void (*signal ()) ();
21819 #endif
21820
21821 int main() {
21822 int i;
21823 ; return 0; }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21826   rm -rf conftest*
21827   ac_cv_type_signal=void
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -rf conftest*
21832   ac_cv_type_signal=int
21833 fi
21834 rm -f conftest*
21835 fi
21836
21837 echo "$ac_t""$ac_cv_type_signal" 1>&6
21838 cat >> confdefs.h <<EOF
21839 #define RETSIGTYPE $ac_cv_type_signal
21840 EOF
21841
21842
21843 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21844 echo "configure:21845: checking for size_t" >&5
21845 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21846   echo $ac_n "(cached) $ac_c" 1>&6
21847 else
21848   cat > conftest.$ac_ext <<EOF
21849 #line 21850 "configure"
21850 #include "confdefs.h"
21851 #include <sys/types.h>
21852 #if STDC_HEADERS
21853 #include <stdlib.h>
21854 #include <stddef.h>
21855 #endif
21856
21857 EOF
21858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21859   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21860   rm -rf conftest*
21861   eval "ac_cv_type_size_t=yes"
21862 else
21863   rm -rf conftest*
21864   eval "ac_cv_type_size_t=no"
21865 fi
21866 rm -f conftest*
21867
21868 fi
21869 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21870   echo "$ac_t""yes" 1>&6
21871 else
21872   echo "$ac_t""no" 1>&6
21873   cat >> confdefs.h <<EOF
21874 #define size_t unsigned
21875 EOF
21876
21877 fi
21878
21879
21880 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21881 echo "configure:21882: checking for ssize_t" >&5
21882 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21883   echo $ac_n "(cached) $ac_c" 1>&6
21884 else
21885   cat > conftest.$ac_ext <<EOF
21886 #line 21887 "configure"
21887 #include "confdefs.h"
21888 #include <sys/types.h>
21889 #if STDC_HEADERS
21890 #include <stdlib.h>
21891 #include <stddef.h>
21892 #endif
21893
21894 EOF
21895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21896   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21897   rm -rf conftest*
21898   eval "ac_cv_type_ssize_t=yes"
21899 else
21900   rm -rf conftest*
21901   eval "ac_cv_type_ssize_t=no"
21902 fi
21903 rm -f conftest*
21904
21905 fi
21906 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21907   echo "$ac_t""yes" 1>&6
21908 else
21909   echo "$ac_t""no" 1>&6
21910   cat >> confdefs.h <<EOF
21911 #define ssize_t signed int
21912 EOF
21913
21914 fi
21915
21916 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21917 echo "configure:21918: checking for caddr_t" >&5
21918 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21919   echo $ac_n "(cached) $ac_c" 1>&6
21920 else
21921   cat > conftest.$ac_ext <<EOF
21922 #line 21923 "configure"
21923 #include "confdefs.h"
21924 #include <sys/types.h>
21925 #if STDC_HEADERS
21926 #include <stdlib.h>
21927 #include <stddef.h>
21928 #endif
21929
21930 EOF
21931 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21932   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21933   rm -rf conftest*
21934   eval "ac_cv_type_caddr_t=yes"
21935 else
21936   rm -rf conftest*
21937   eval "ac_cv_type_caddr_t=no"
21938 fi
21939 rm -f conftest*
21940
21941 fi
21942 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21943   echo "$ac_t""yes" 1>&6
21944 else
21945   echo "$ac_t""no" 1>&6
21946   cat >> confdefs.h <<EOF
21947 #define caddr_t char *
21948 EOF
21949
21950 fi
21951
21952
21953 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21954 echo "configure:21955: checking for socklen_t" >&5
21955 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21956   echo $ac_n "(cached) $ac_c" 1>&6
21957 else
21958   cat > conftest.$ac_ext <<EOF
21959 #line 21960 "configure"
21960 #include "confdefs.h"
21961
21962 #ifdef HAVE_SYS_TYPES_H
21963 #include <sys/types.h>
21964 #endif
21965 #ifdef HAVE_SYS_SOCKET_H
21966 #include <sys/socket.h>
21967 #endif
21968
21969 int main() {
21970 socklen_t len;
21971 ; return 0; }
21972 EOF
21973 if { (eval echo configure:21974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21974   rm -rf conftest*
21975   ol_cv_type_socklen_t=yes
21976 else
21977   echo "configure: failed program was:" >&5
21978   cat conftest.$ac_ext >&5
21979   rm -rf conftest*
21980   ol_cv_type_socklen_t=no
21981 fi
21982 rm -f conftest*
21983 fi
21984
21985 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21986   if test $ol_cv_type_socklen_t = no; then
21987     cat >> confdefs.h <<\EOF
21988 #define socklen_t int
21989 EOF
21990
21991   fi
21992  
21993 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21994 echo "configure:21995: checking for member st_blksize in aggregate type struct stat" >&5
21995 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21996   echo $ac_n "(cached) $ac_c" 1>&6
21997 else
21998   cat > conftest.$ac_ext <<EOF
21999 #line 22000 "configure"
22000 #include "confdefs.h"
22001 #include <sys/types.h>
22002 #include <sys/stat.h>
22003 int main() {
22004 struct stat foo; foo.st_blksize;
22005 ; return 0; }
22006 EOF
22007 if { (eval echo configure:22008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22008   rm -rf conftest*
22009   ac_cv_c_struct_member_st_blksize=yes
22010 else
22011   echo "configure: failed program was:" >&5
22012   cat conftest.$ac_ext >&5
22013   rm -rf conftest*
22014   ac_cv_c_struct_member_st_blksize=no
22015 fi
22016 rm -f conftest*
22017 fi
22018
22019 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22020 st_blksize="$ac_cv_c_struct_member_st_blksize"
22021 if test $ac_cv_c_struct_member_st_blksize = yes; then
22022   cat >> confdefs.h <<\EOF
22023 #define HAVE_ST_BLKSIZE 1
22024 EOF
22025
22026 fi
22027
22028 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22029 echo "configure:22030: checking whether time.h and sys/time.h may both be included" >&5
22030 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22031   echo $ac_n "(cached) $ac_c" 1>&6
22032 else
22033   cat > conftest.$ac_ext <<EOF
22034 #line 22035 "configure"
22035 #include "confdefs.h"
22036 #include <sys/types.h>
22037 #include <sys/time.h>
22038 #include <time.h>
22039 int main() {
22040 struct tm *tp;
22041 ; return 0; }
22042 EOF
22043 if { (eval echo configure:22044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22044   rm -rf conftest*
22045   ac_cv_header_time=yes
22046 else
22047   echo "configure: failed program was:" >&5
22048   cat conftest.$ac_ext >&5
22049   rm -rf conftest*
22050   ac_cv_header_time=no
22051 fi
22052 rm -f conftest*
22053 fi
22054
22055 echo "$ac_t""$ac_cv_header_time" 1>&6
22056 if test $ac_cv_header_time = yes; then
22057   cat >> confdefs.h <<\EOF
22058 #define TIME_WITH_SYS_TIME 1
22059 EOF
22060
22061 fi
22062
22063 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22064 echo "configure:22065: checking whether struct tm is in sys/time.h or time.h" >&5
22065 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22066   echo $ac_n "(cached) $ac_c" 1>&6
22067 else
22068   cat > conftest.$ac_ext <<EOF
22069 #line 22070 "configure"
22070 #include "confdefs.h"
22071 #include <sys/types.h>
22072 #include <time.h>
22073 int main() {
22074 struct tm *tp; tp->tm_sec;
22075 ; return 0; }
22076 EOF
22077 if { (eval echo configure:22078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22078   rm -rf conftest*
22079   ac_cv_struct_tm=time.h
22080 else
22081   echo "configure: failed program was:" >&5
22082   cat conftest.$ac_ext >&5
22083   rm -rf conftest*
22084   ac_cv_struct_tm=sys/time.h
22085 fi
22086 rm -f conftest*
22087 fi
22088
22089 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22090 if test $ac_cv_struct_tm = sys/time.h; then
22091   cat >> confdefs.h <<\EOF
22092 #define TM_IN_SYS_TIME 1
22093 EOF
22094
22095 fi
22096
22097 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22098 echo "configure:22099: checking for uid_t in sys/types.h" >&5
22099 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22100   echo $ac_n "(cached) $ac_c" 1>&6
22101 else
22102   cat > conftest.$ac_ext <<EOF
22103 #line 22104 "configure"
22104 #include "confdefs.h"
22105 #include <sys/types.h>
22106 EOF
22107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22108   egrep "uid_t" >/dev/null 2>&1; then
22109   rm -rf conftest*
22110   ac_cv_type_uid_t=yes
22111 else
22112   rm -rf conftest*
22113   ac_cv_type_uid_t=no
22114 fi
22115 rm -f conftest*
22116
22117 fi
22118
22119 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22120 if test $ac_cv_type_uid_t = no; then
22121   cat >> confdefs.h <<\EOF
22122 #define uid_t int
22123 EOF
22124
22125   cat >> confdefs.h <<\EOF
22126 #define gid_t int
22127 EOF
22128
22129 fi
22130
22131 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22132 echo "configure:22133: checking for sig_atomic_t" >&5
22133 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22134   echo $ac_n "(cached) $ac_c" 1>&6
22135 else
22136   cat > conftest.$ac_ext <<EOF
22137 #line 22138 "configure"
22138 #include "confdefs.h"
22139 #include <signal.h>
22140 int main() {
22141 sig_atomic_t atomic;
22142 ; return 0; }
22143 EOF
22144 if { (eval echo configure:22145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22145   rm -rf conftest*
22146   ol_cv_type_sig_atomic_t=yes
22147 else
22148   echo "configure: failed program was:" >&5
22149   cat conftest.$ac_ext >&5
22150   rm -rf conftest*
22151   ol_cv_type_sig_atomic_t=no
22152 fi
22153 rm -f conftest*
22154 fi
22155
22156 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22157   if test $ol_cv_type_sig_atomic_t = no; then
22158     cat >> confdefs.h <<\EOF
22159 #define sig_atomic_t int
22160 EOF
22161
22162   fi
22163  
22164
22165
22166 # test for pw_gecos in struct passwd
22167 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22168 echo "configure:22169: checking struct passwd for pw_gecos" >&5
22169 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22170   echo $ac_n "(cached) $ac_c" 1>&6
22171 else
22172   
22173         cat > conftest.$ac_ext <<EOF
22174 #line 22175 "configure"
22175 #include "confdefs.h"
22176 #include <pwd.h>
22177 int main() {
22178
22179         struct passwd pwd;
22180         pwd.pw_gecos = pwd.pw_name;
22181
22182 ; return 0; }
22183 EOF
22184 if { (eval echo configure:22185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22185   rm -rf conftest*
22186   ol_cv_struct_passwd_pw_gecos=yes
22187 else
22188   echo "configure: failed program was:" >&5
22189   cat conftest.$ac_ext >&5
22190   rm -rf conftest*
22191   ol_cv_struct_passwd_pw_gecos=no
22192 fi
22193 rm -f conftest*
22194 fi
22195
22196 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22197 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22198         cat >> confdefs.h <<\EOF
22199 #define HAVE_PW_GECOS 1
22200 EOF
22201
22202 fi
22203
22204 # test for pw_passwd in struct passwd
22205 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22206 echo "configure:22207: checking struct passwd for pw_passwd" >&5
22207 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22208   echo $ac_n "(cached) $ac_c" 1>&6
22209 else
22210   
22211         cat > conftest.$ac_ext <<EOF
22212 #line 22213 "configure"
22213 #include "confdefs.h"
22214 #include <pwd.h>
22215 int main() {
22216
22217         struct passwd pwd;
22218         pwd.pw_passwd = pwd.pw_name;
22219
22220 ; return 0; }
22221 EOF
22222 if { (eval echo configure:22223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22223   rm -rf conftest*
22224   ol_cv_struct_passwd_pw_passwd=yes
22225 else
22226   echo "configure: failed program was:" >&5
22227   cat conftest.$ac_ext >&5
22228   rm -rf conftest*
22229   ol_cv_struct_passwd_pw_passwd=no
22230 fi
22231 rm -f conftest*
22232 fi
22233
22234 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22235 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22236         cat >> confdefs.h <<\EOF
22237 #define HAVE_PW_PASSWD 1
22238 EOF
22239
22240 fi
22241
22242
22243 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22244 echo "configure:22245: checking if toupper() requires islower()" >&5
22245 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22246   echo $ac_n "(cached) $ac_c" 1>&6
22247 else
22248   
22249         if test "$cross_compiling" = yes; then
22250   ol_cv_c_upper_lower=safe
22251 else
22252   cat > conftest.$ac_ext <<EOF
22253 #line 22254 "configure"
22254 #include "confdefs.h"
22255
22256 #include <ctype.h>
22257 main()
22258 {
22259         if ('C' == toupper('C'))
22260                 exit(0);
22261         else
22262                 exit(1);
22263 }
22264 EOF
22265 if { (eval echo configure:22266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22266 then
22267   ol_cv_c_upper_lower=no
22268 else
22269   echo "configure: failed program was:" >&5
22270   cat conftest.$ac_ext >&5
22271   rm -fr conftest*
22272   ol_cv_c_upper_lower=yes
22273 fi
22274 rm -fr conftest*
22275 fi
22276
22277 fi
22278
22279 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22280 if test $ol_cv_c_upper_lower != no ; then
22281         cat >> confdefs.h <<\EOF
22282 #define C_UPPER_LOWER 1
22283 EOF
22284
22285 fi
22286
22287 echo $ac_n "checking for working const""... $ac_c" 1>&6
22288 echo "configure:22289: checking for working const" >&5
22289 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22290   echo $ac_n "(cached) $ac_c" 1>&6
22291 else
22292   cat > conftest.$ac_ext <<EOF
22293 #line 22294 "configure"
22294 #include "confdefs.h"
22295
22296 int main() {
22297
22298 /* Ultrix mips cc rejects this.  */
22299 typedef int charset[2]; const charset x;
22300 /* SunOS 4.1.1 cc rejects this.  */
22301 char const *const *ccp;
22302 char **p;
22303 /* NEC SVR4.0.2 mips cc rejects this.  */
22304 struct point {int x, y;};
22305 static struct point const zero = {0,0};
22306 /* AIX XL C 1.02.0.0 rejects this.
22307    It does not let you subtract one const X* pointer from another in an arm
22308    of an if-expression whose if-part is not a constant expression */
22309 const char *g = "string";
22310 ccp = &g + (g ? g-g : 0);
22311 /* HPUX 7.0 cc rejects these. */
22312 ++ccp;
22313 p = (char**) ccp;
22314 ccp = (char const *const *) p;
22315 { /* SCO 3.2v4 cc rejects this.  */
22316   char *t;
22317   char const *s = 0 ? (char *) 0 : (char const *) 0;
22318
22319   *t++ = 0;
22320 }
22321 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22322   int x[] = {25, 17};
22323   const int *foo = &x[0];
22324   ++foo;
22325 }
22326 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22327   typedef const int *iptr;
22328   iptr p = 0;
22329   ++p;
22330 }
22331 { /* AIX XL C 1.02.0.0 rejects this saying
22332      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22333   struct s { int j; const int *ap[3]; };
22334   struct s *b; b->j = 5;
22335 }
22336 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22337   const int foo = 10;
22338 }
22339
22340 ; return 0; }
22341 EOF
22342 if { (eval echo configure:22343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22343   rm -rf conftest*
22344   ac_cv_c_const=yes
22345 else
22346   echo "configure: failed program was:" >&5
22347   cat conftest.$ac_ext >&5
22348   rm -rf conftest*
22349   ac_cv_c_const=no
22350 fi
22351 rm -f conftest*
22352 fi
22353
22354 echo "$ac_t""$ac_cv_c_const" 1>&6
22355 if test $ac_cv_c_const = no; then
22356   cat >> confdefs.h <<\EOF
22357 #define const 
22358 EOF
22359
22360 fi
22361
22362 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22363 echo "configure:22364: checking if compiler understands volatile" >&5
22364 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22365   echo $ac_n "(cached) $ac_c" 1>&6
22366 else
22367   cat > conftest.$ac_ext <<EOF
22368 #line 22369 "configure"
22369 #include "confdefs.h"
22370 int x, y, z;
22371 int main() {
22372 volatile int a; int * volatile b = x ? &y : &z;
22373       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22374       *b = 0;
22375 ; return 0; }
22376 EOF
22377 if { (eval echo configure:22378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22378   rm -rf conftest*
22379   ol_cv_c_volatile=yes
22380 else
22381   echo "configure: failed program was:" >&5
22382   cat conftest.$ac_ext >&5
22383   rm -rf conftest*
22384   ol_cv_c_volatile=no
22385 fi
22386 rm -f conftest*
22387 fi
22388
22389 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22390   if test $ol_cv_c_volatile = yes; then
22391     : 
22392   else
22393     cat >> confdefs.h <<\EOF
22394 #define volatile 
22395 EOF
22396
22397   fi
22398  
22399
22400 if test $cross_compiling = yes ; then
22401         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22402         cat >> confdefs.h <<\EOF
22403 #define CROSS_COMPILING 1
22404 EOF
22405
22406 else
22407         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22408 echo "configure:22409: checking whether byte ordering is bigendian" >&5
22409 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22410   echo $ac_n "(cached) $ac_c" 1>&6
22411 else
22412   ac_cv_c_bigendian=unknown
22413 # See if sys/param.h defines the BYTE_ORDER macro.
22414 cat > conftest.$ac_ext <<EOF
22415 #line 22416 "configure"
22416 #include "confdefs.h"
22417 #include <sys/types.h>
22418 #include <sys/param.h>
22419 int main() {
22420
22421 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22422  bogus endian macros
22423 #endif
22424 ; return 0; }
22425 EOF
22426 if { (eval echo configure:22427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22427   rm -rf conftest*
22428   # It does; now see whether it defined to BIG_ENDIAN or not.
22429 cat > conftest.$ac_ext <<EOF
22430 #line 22431 "configure"
22431 #include "confdefs.h"
22432 #include <sys/types.h>
22433 #include <sys/param.h>
22434 int main() {
22435
22436 #if BYTE_ORDER != BIG_ENDIAN
22437  not big endian
22438 #endif
22439 ; return 0; }
22440 EOF
22441 if { (eval echo configure:22442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22442   rm -rf conftest*
22443   ac_cv_c_bigendian=yes
22444 else
22445   echo "configure: failed program was:" >&5
22446   cat conftest.$ac_ext >&5
22447   rm -rf conftest*
22448   ac_cv_c_bigendian=no
22449 fi
22450 rm -f conftest*
22451 else
22452   echo "configure: failed program was:" >&5
22453   cat conftest.$ac_ext >&5
22454 fi
22455 rm -f conftest*
22456 if test $ac_cv_c_bigendian = unknown; then
22457 if test "$cross_compiling" = yes; then
22458     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22459 else
22460   cat > conftest.$ac_ext <<EOF
22461 #line 22462 "configure"
22462 #include "confdefs.h"
22463 main () {
22464   /* Are we little or big endian?  From Harbison&Steele.  */
22465   union
22466   {
22467     long l;
22468     char c[sizeof (long)];
22469   } u;
22470   u.l = 1;
22471   exit (u.c[sizeof (long) - 1] == 1);
22472 }
22473 EOF
22474 if { (eval echo configure:22475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22475 then
22476   ac_cv_c_bigendian=no
22477 else
22478   echo "configure: failed program was:" >&5
22479   cat conftest.$ac_ext >&5
22480   rm -fr conftest*
22481   ac_cv_c_bigendian=yes
22482 fi
22483 rm -fr conftest*
22484 fi
22485
22486 fi
22487 fi
22488
22489 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22490 if test $ac_cv_c_bigendian = yes; then
22491   cat >> confdefs.h <<\EOF
22492 #define WORDS_BIGENDIAN 1
22493 EOF
22494
22495 fi
22496
22497 fi
22498
22499 echo $ac_n "checking size of short""... $ac_c" 1>&6
22500 echo "configure:22501: checking size of short" >&5 
22501 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22502   echo $ac_n "(cached) $ac_c" 1>&6
22503 else
22504   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22505   cat > conftest.$ac_ext <<EOF
22506 #line 22507 "configure"
22507 #include "confdefs.h"
22508 #include "confdefs.h" 
22509 #include <stdlib.h>
22510 #include <sys/types.h> 
22511  
22512
22513 int main() {
22514 switch (0) case 0: case (sizeof (short) == $ac_size):;
22515 ; return 0; }
22516 EOF
22517 if { (eval echo configure:22518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22518   rm -rf conftest*
22519   ac_cv_sizeof_short=$ac_size
22520 else
22521   echo "configure: failed program was:" >&5
22522   cat conftest.$ac_ext >&5
22523 fi
22524 rm -f conftest* 
22525   if test x$ac_cv_sizeof_short != x ; then break; fi 
22526 done 
22527
22528 fi
22529  
22530 if test x$ac_cv_sizeof_short = x ; then 
22531   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22532 fi 
22533 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22534 cat >> confdefs.h <<EOF
22535 #define SIZEOF_SHORT $ac_cv_sizeof_short
22536 EOF
22537  
22538  
22539 echo $ac_n "checking size of int""... $ac_c" 1>&6
22540 echo "configure:22541: checking size of int" >&5 
22541 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22542   echo $ac_n "(cached) $ac_c" 1>&6
22543 else
22544   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22545   cat > conftest.$ac_ext <<EOF
22546 #line 22547 "configure"
22547 #include "confdefs.h"
22548 #include "confdefs.h" 
22549 #include <stdlib.h>
22550 #include <sys/types.h> 
22551  
22552
22553 int main() {
22554 switch (0) case 0: case (sizeof (int) == $ac_size):;
22555 ; return 0; }
22556 EOF
22557 if { (eval echo configure:22558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22558   rm -rf conftest*
22559   ac_cv_sizeof_int=$ac_size
22560 else
22561   echo "configure: failed program was:" >&5
22562   cat conftest.$ac_ext >&5
22563 fi
22564 rm -f conftest* 
22565   if test x$ac_cv_sizeof_int != x ; then break; fi 
22566 done 
22567
22568 fi
22569  
22570 if test x$ac_cv_sizeof_int = x ; then 
22571   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22572 fi 
22573 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22574 cat >> confdefs.h <<EOF
22575 #define SIZEOF_INT $ac_cv_sizeof_int
22576 EOF
22577  
22578  
22579 echo $ac_n "checking size of long""... $ac_c" 1>&6
22580 echo "configure:22581: checking size of long" >&5 
22581 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22582   echo $ac_n "(cached) $ac_c" 1>&6
22583 else
22584   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22585   cat > conftest.$ac_ext <<EOF
22586 #line 22587 "configure"
22587 #include "confdefs.h"
22588 #include "confdefs.h" 
22589 #include <stdlib.h>
22590 #include <sys/types.h> 
22591  
22592
22593 int main() {
22594 switch (0) case 0: case (sizeof (long) == $ac_size):;
22595 ; return 0; }
22596 EOF
22597 if { (eval echo configure:22598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22598   rm -rf conftest*
22599   ac_cv_sizeof_long=$ac_size
22600 else
22601   echo "configure: failed program was:" >&5
22602   cat conftest.$ac_ext >&5
22603 fi
22604 rm -f conftest* 
22605   if test x$ac_cv_sizeof_long != x ; then break; fi 
22606 done 
22607
22608 fi
22609  
22610 if test x$ac_cv_sizeof_long = x ; then 
22611   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22612 fi 
22613 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22614 cat >> confdefs.h <<EOF
22615 #define SIZEOF_LONG $ac_cv_sizeof_long
22616 EOF
22617  
22618
22619 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22620 echo "configure:22621: checking size of wchar_t" >&5 
22621 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22622   echo $ac_n "(cached) $ac_c" 1>&6
22623 else
22624   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22625   cat > conftest.$ac_ext <<EOF
22626 #line 22627 "configure"
22627 #include "confdefs.h"
22628 #include "confdefs.h" 
22629 #include <stdlib.h>
22630 #include <sys/types.h> 
22631  
22632
22633 int main() {
22634 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22635 ; return 0; }
22636 EOF
22637 if { (eval echo configure:22638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22638   rm -rf conftest*
22639   ac_cv_sizeof_wchar_t=$ac_size
22640 else
22641   echo "configure: failed program was:" >&5
22642   cat conftest.$ac_ext >&5
22643 fi
22644 rm -f conftest* 
22645   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22646 done 
22647
22648 fi
22649  
22650 if test x$ac_cv_sizeof_wchar_t = x ; then 
22651   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22652 fi 
22653 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22654 cat >> confdefs.h <<EOF
22655 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22656 EOF
22657  
22658
22659
22660 if test "$ac_cv_sizeof_int" -lt 4 ; then
22661         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22662
22663         cat >> confdefs.h <<\EOF
22664 #define LBER_INT_T long
22665 EOF
22666
22667 else
22668         cat >> confdefs.h <<\EOF
22669 #define LBER_INT_T int
22670 EOF
22671
22672 fi
22673
22674 cat >> confdefs.h <<\EOF
22675 #define LBER_LEN_T long
22676 EOF
22677
22678 cat >> confdefs.h <<\EOF
22679 #define LBER_SOCKET_T int
22680 EOF
22681
22682 cat >> confdefs.h <<\EOF
22683 #define LBER_TAG_T long
22684 EOF
22685
22686
22687 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22688 echo "configure:22689: checking for 8-bit clean memcmp" >&5
22689 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22690   echo $ac_n "(cached) $ac_c" 1>&6
22691 else
22692   if test "$cross_compiling" = yes; then
22693   ac_cv_func_memcmp_clean=no
22694 else
22695   cat > conftest.$ac_ext <<EOF
22696 #line 22697 "configure"
22697 #include "confdefs.h"
22698
22699 main()
22700 {
22701   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22702   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22703 }
22704
22705 EOF
22706 if { (eval echo configure:22707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22707 then
22708   ac_cv_func_memcmp_clean=yes
22709 else
22710   echo "configure: failed program was:" >&5
22711   cat conftest.$ac_ext >&5
22712   rm -fr conftest*
22713   ac_cv_func_memcmp_clean=no
22714 fi
22715 rm -fr conftest*
22716 fi
22717
22718 fi
22719
22720 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22721 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22722
22723 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22724 echo "configure:22725: checking for strftime" >&5
22725 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22726   echo $ac_n "(cached) $ac_c" 1>&6
22727 else
22728   cat > conftest.$ac_ext <<EOF
22729 #line 22730 "configure"
22730 #include "confdefs.h"
22731 /* System header to define __stub macros and hopefully few prototypes,
22732     which can conflict with char strftime(); below.  */
22733 #include <assert.h>
22734 /* Override any gcc2 internal prototype to avoid an error.  */
22735 /* We use char because int might match the return type of a gcc2
22736     builtin and then its argument prototype would still apply.  */
22737 char strftime();
22738 char (*f)();
22739
22740 int main() {
22741
22742 /* The GNU C library defines this for functions which it implements
22743     to always fail with ENOSYS.  Some functions are actually named
22744     something starting with __ and the normal name is an alias.  */
22745 #if defined (__stub_strftime) || defined (__stub___strftime)
22746 choke me
22747 #else
22748 f = strftime;
22749 #endif
22750
22751 ; return 0; }
22752 EOF
22753 if { (eval echo configure:22754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22754   rm -rf conftest*
22755   eval "ac_cv_func_strftime=yes"
22756 else
22757   echo "configure: failed program was:" >&5
22758   cat conftest.$ac_ext >&5
22759   rm -rf conftest*
22760   eval "ac_cv_func_strftime=no"
22761 fi
22762 rm -f conftest*
22763 fi
22764
22765 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22766   echo "$ac_t""yes" 1>&6
22767   cat >> confdefs.h <<\EOF
22768 #define HAVE_STRFTIME 1
22769 EOF
22770
22771 else
22772   echo "$ac_t""no" 1>&6
22773 # strftime is in -lintl on SCO UNIX.
22774 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22775 echo "configure:22776: checking for strftime in -lintl" >&5
22776 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22778   echo $ac_n "(cached) $ac_c" 1>&6
22779 else
22780   ac_save_LIBS="$LIBS"
22781 LIBS="-lintl  $LIBS"
22782 cat > conftest.$ac_ext <<EOF
22783 #line 22784 "configure"
22784 #include "confdefs.h"
22785 /* Override any gcc2 internal prototype to avoid an error.  */
22786 /* We use char because int might match the return type of a gcc2
22787     builtin and then its argument prototype would still apply.  */
22788 char strftime();
22789
22790 int main() {
22791 strftime()
22792 ; return 0; }
22793 EOF
22794 if { (eval echo configure:22795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22795   rm -rf conftest*
22796   eval "ac_cv_lib_$ac_lib_var=yes"
22797 else
22798   echo "configure: failed program was:" >&5
22799   cat conftest.$ac_ext >&5
22800   rm -rf conftest*
22801   eval "ac_cv_lib_$ac_lib_var=no"
22802 fi
22803 rm -f conftest*
22804 LIBS="$ac_save_LIBS"
22805
22806 fi
22807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22808   echo "$ac_t""yes" 1>&6
22809   cat >> confdefs.h <<\EOF
22810 #define HAVE_STRFTIME 1
22811 EOF
22812
22813 LIBS="-lintl $LIBS"
22814 else
22815   echo "$ac_t""no" 1>&6
22816 fi
22817
22818 fi
22819
22820
22821 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22822 echo "configure:22823: checking for inet_aton()" >&5
22823 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22824   echo $ac_n "(cached) $ac_c" 1>&6
22825 else
22826   cat > conftest.$ac_ext <<EOF
22827 #line 22828 "configure"
22828 #include "confdefs.h"
22829
22830 #ifdef HAVE_SYS_TYPES_H
22831 #       include <sys/types.h>
22832 #endif
22833 #ifdef HAVE_SYS_SOCKET_H
22834 #       include <sys/socket.h>
22835 #       ifdef HAVE_SYS_SELECT_H
22836 #               include <sys/select.h>
22837 #       endif
22838 #       include <netinet/in.h>
22839 #       ifdef HAVE_ARPA_INET_H
22840 #               include <arpa/inet.h>
22841 #       endif
22842 #endif
22843
22844 int main() {
22845 struct in_addr in;
22846 int rc = inet_aton( "255.255.255.255", &in );
22847 ; return 0; }
22848 EOF
22849 if { (eval echo configure:22850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22850   rm -rf conftest*
22851   ol_cv_func_inet_aton=yes
22852 else
22853   echo "configure: failed program was:" >&5
22854   cat conftest.$ac_ext >&5
22855   rm -rf conftest*
22856   ol_cv_func_inet_aton=no
22857 fi
22858 rm -f conftest*
22859 fi
22860
22861 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22862   if test $ol_cv_func_inet_aton != no; then
22863     cat >> confdefs.h <<\EOF
22864 #define HAVE_INET_ATON 1
22865 EOF
22866
22867   fi
22868  
22869
22870 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22871 echo "configure:22872: checking for _spawnlp" >&5
22872 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22873   echo $ac_n "(cached) $ac_c" 1>&6
22874 else
22875   cat > conftest.$ac_ext <<EOF
22876 #line 22877 "configure"
22877 #include "confdefs.h"
22878 /* System header to define __stub macros and hopefully few prototypes,
22879     which can conflict with char _spawnlp(); below.  */
22880 #include <assert.h>
22881 /* Override any gcc2 internal prototype to avoid an error.  */
22882 /* We use char because int might match the return type of a gcc2
22883     builtin and then its argument prototype would still apply.  */
22884 char _spawnlp();
22885 char (*f)();
22886
22887 int main() {
22888
22889 /* The GNU C library defines this for functions which it implements
22890     to always fail with ENOSYS.  Some functions are actually named
22891     something starting with __ and the normal name is an alias.  */
22892 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22893 choke me
22894 #else
22895 f = _spawnlp;
22896 #endif
22897
22898 ; return 0; }
22899 EOF
22900 if { (eval echo configure:22901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22901   rm -rf conftest*
22902   eval "ac_cv_func__spawnlp=yes"
22903 else
22904   echo "configure: failed program was:" >&5
22905   cat conftest.$ac_ext >&5
22906   rm -rf conftest*
22907   eval "ac_cv_func__spawnlp=no"
22908 fi
22909 rm -f conftest*
22910 fi
22911
22912 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22913   echo "$ac_t""yes" 1>&6
22914   cat >> confdefs.h <<\EOF
22915 #define HAVE_SPAWNLP 1
22916 EOF
22917
22918 else
22919   echo "$ac_t""no" 1>&6
22920 fi
22921
22922
22923 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22924 echo "configure:22925: checking for _snprintf" >&5
22925 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22926   echo $ac_n "(cached) $ac_c" 1>&6
22927 else
22928   cat > conftest.$ac_ext <<EOF
22929 #line 22930 "configure"
22930 #include "confdefs.h"
22931 /* System header to define __stub macros and hopefully few prototypes,
22932     which can conflict with char _snprintf(); below.  */
22933 #include <assert.h>
22934 /* Override any gcc2 internal prototype to avoid an error.  */
22935 /* We use char because int might match the return type of a gcc2
22936     builtin and then its argument prototype would still apply.  */
22937 char _snprintf();
22938 char (*f)();
22939
22940 int main() {
22941
22942 /* The GNU C library defines this for functions which it implements
22943     to always fail with ENOSYS.  Some functions are actually named
22944     something starting with __ and the normal name is an alias.  */
22945 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22946 choke me
22947 #else
22948 f = _snprintf;
22949 #endif
22950
22951 ; return 0; }
22952 EOF
22953 if { (eval echo configure:22954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22954   rm -rf conftest*
22955   eval "ac_cv_func__snprintf=yes"
22956 else
22957   echo "configure: failed program was:" >&5
22958   cat conftest.$ac_ext >&5
22959   rm -rf conftest*
22960   eval "ac_cv_func__snprintf=no"
22961 fi
22962 rm -f conftest*
22963 fi
22964
22965 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22966   echo "$ac_t""yes" 1>&6
22967   ac_cv_func_snprintf=yes
22968         cat >> confdefs.h <<\EOF
22969 #define snprintf _snprintf
22970 EOF
22971
22972
22973 else
22974   echo "$ac_t""no" 1>&6
22975 fi
22976
22977
22978 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22979 echo "configure:22980: checking for _vsnprintf" >&5
22980 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22981   echo $ac_n "(cached) $ac_c" 1>&6
22982 else
22983   cat > conftest.$ac_ext <<EOF
22984 #line 22985 "configure"
22985 #include "confdefs.h"
22986 /* System header to define __stub macros and hopefully few prototypes,
22987     which can conflict with char _vsnprintf(); below.  */
22988 #include <assert.h>
22989 /* Override any gcc2 internal prototype to avoid an error.  */
22990 /* We use char because int might match the return type of a gcc2
22991     builtin and then its argument prototype would still apply.  */
22992 char _vsnprintf();
22993 char (*f)();
22994
22995 int main() {
22996
22997 /* The GNU C library defines this for functions which it implements
22998     to always fail with ENOSYS.  Some functions are actually named
22999     something starting with __ and the normal name is an alias.  */
23000 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23001 choke me
23002 #else
23003 f = _vsnprintf;
23004 #endif
23005
23006 ; return 0; }
23007 EOF
23008 if { (eval echo configure:23009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23009   rm -rf conftest*
23010   eval "ac_cv_func__vsnprintf=yes"
23011 else
23012   echo "configure: failed program was:" >&5
23013   cat conftest.$ac_ext >&5
23014   rm -rf conftest*
23015   eval "ac_cv_func__vsnprintf=no"
23016 fi
23017 rm -f conftest*
23018 fi
23019
23020 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23021   echo "$ac_t""yes" 1>&6
23022   ac_cv_func_vsnprintf=yes
23023         cat >> confdefs.h <<\EOF
23024 #define vsnprintf _vsnprintf
23025 EOF
23026
23027
23028 else
23029   echo "$ac_t""no" 1>&6
23030 fi
23031
23032
23033 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23034 echo "configure:23035: checking for vprintf" >&5
23035 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23036   echo $ac_n "(cached) $ac_c" 1>&6
23037 else
23038   cat > conftest.$ac_ext <<EOF
23039 #line 23040 "configure"
23040 #include "confdefs.h"
23041 /* System header to define __stub macros and hopefully few prototypes,
23042     which can conflict with char vprintf(); below.  */
23043 #include <assert.h>
23044 /* Override any gcc2 internal prototype to avoid an error.  */
23045 /* We use char because int might match the return type of a gcc2
23046     builtin and then its argument prototype would still apply.  */
23047 char vprintf();
23048 char (*f)();
23049
23050 int main() {
23051
23052 /* The GNU C library defines this for functions which it implements
23053     to always fail with ENOSYS.  Some functions are actually named
23054     something starting with __ and the normal name is an alias.  */
23055 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23056 choke me
23057 #else
23058 f = vprintf;
23059 #endif
23060
23061 ; return 0; }
23062 EOF
23063 if { (eval echo configure:23064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23064   rm -rf conftest*
23065   eval "ac_cv_func_vprintf=yes"
23066 else
23067   echo "configure: failed program was:" >&5
23068   cat conftest.$ac_ext >&5
23069   rm -rf conftest*
23070   eval "ac_cv_func_vprintf=no"
23071 fi
23072 rm -f conftest*
23073 fi
23074
23075 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23076   echo "$ac_t""yes" 1>&6
23077   cat >> confdefs.h <<\EOF
23078 #define HAVE_VPRINTF 1
23079 EOF
23080
23081 else
23082   echo "$ac_t""no" 1>&6
23083 fi
23084
23085 if test "$ac_cv_func_vprintf" != yes; then
23086 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23087 echo "configure:23088: checking for _doprnt" >&5
23088 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23089   echo $ac_n "(cached) $ac_c" 1>&6
23090 else
23091   cat > conftest.$ac_ext <<EOF
23092 #line 23093 "configure"
23093 #include "confdefs.h"
23094 /* System header to define __stub macros and hopefully few prototypes,
23095     which can conflict with char _doprnt(); below.  */
23096 #include <assert.h>
23097 /* Override any gcc2 internal prototype to avoid an error.  */
23098 /* We use char because int might match the return type of a gcc2
23099     builtin and then its argument prototype would still apply.  */
23100 char _doprnt();
23101 char (*f)();
23102
23103 int main() {
23104
23105 /* The GNU C library defines this for functions which it implements
23106     to always fail with ENOSYS.  Some functions are actually named
23107     something starting with __ and the normal name is an alias.  */
23108 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23109 choke me
23110 #else
23111 f = _doprnt;
23112 #endif
23113
23114 ; return 0; }
23115 EOF
23116 if { (eval echo configure:23117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23117   rm -rf conftest*
23118   eval "ac_cv_func__doprnt=yes"
23119 else
23120   echo "configure: failed program was:" >&5
23121   cat conftest.$ac_ext >&5
23122   rm -rf conftest*
23123   eval "ac_cv_func__doprnt=no"
23124 fi
23125 rm -f conftest*
23126 fi
23127
23128 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23129   echo "$ac_t""yes" 1>&6
23130   cat >> confdefs.h <<\EOF
23131 #define HAVE_DOPRNT 1
23132 EOF
23133
23134 else
23135   echo "$ac_t""no" 1>&6
23136 fi
23137
23138 fi
23139
23140
23141 if test $ac_cv_func_vprintf = yes ; then
23142                 for ac_func in snprintf vsnprintf
23143 do
23144 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23145 echo "configure:23146: checking for $ac_func" >&5
23146 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23147   echo $ac_n "(cached) $ac_c" 1>&6
23148 else
23149   cat > conftest.$ac_ext <<EOF
23150 #line 23151 "configure"
23151 #include "confdefs.h"
23152 /* System header to define __stub macros and hopefully few prototypes,
23153     which can conflict with char $ac_func(); below.  */
23154 #include <assert.h>
23155 /* Override any gcc2 internal prototype to avoid an error.  */
23156 /* We use char because int might match the return type of a gcc2
23157     builtin and then its argument prototype would still apply.  */
23158 char $ac_func();
23159 char (*f)();
23160
23161 int main() {
23162
23163 /* The GNU C library defines this for functions which it implements
23164     to always fail with ENOSYS.  Some functions are actually named
23165     something starting with __ and the normal name is an alias.  */
23166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23167 choke me
23168 #else
23169 f = $ac_func;
23170 #endif
23171
23172 ; return 0; }
23173 EOF
23174 if { (eval echo configure:23175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23175   rm -rf conftest*
23176   eval "ac_cv_func_$ac_func=yes"
23177 else
23178   echo "configure: failed program was:" >&5
23179   cat conftest.$ac_ext >&5
23180   rm -rf conftest*
23181   eval "ac_cv_func_$ac_func=no"
23182 fi
23183 rm -f conftest*
23184 fi
23185
23186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23187   echo "$ac_t""yes" 1>&6
23188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23189   cat >> confdefs.h <<EOF
23190 #define $ac_tr_func 1
23191 EOF
23192  
23193 else
23194   echo "$ac_t""no" 1>&6
23195 fi
23196 done
23197
23198 fi
23199
23200 for ac_func in \
23201         bcopy                   \
23202         closesocket             \
23203         chroot                  \
23204         endgrent                \
23205         endpwent                \
23206         fcntl                   \
23207         flock                   \
23208         fstat                   \
23209         getdtablesize   \
23210         getgrgid                \
23211         gethostname             \
23212         getpass                 \
23213         getpassphrase   \
23214         getpwuid                \
23215         getpwnam                \
23216         getspnam                \
23217         gettimeofday    \
23218         initgroups              \
23219         lockf                   \
23220         memcpy                  \
23221         memmove                 \
23222         mkstemp                 \
23223         mktemp                  \
23224         pipe                    \
23225         read                    \
23226         recv                    \
23227         recvfrom                \
23228         setpwfile               \
23229         setgid                  \
23230         setegid                 \
23231         setsid                  \
23232         setuid                  \
23233         seteuid                 \
23234         sigaction               \
23235         signal                  \
23236         sigset                  \
23237         strdup                  \
23238         strpbrk                 \
23239         strrchr                 \
23240         strsep                  \
23241         strstr                  \
23242         strtol                  \
23243         strtoul                 \
23244         strtoq                  \
23245         strtouq                 \
23246         strtoll                 \
23247         strspn                  \
23248         sysconf                 \
23249         usleep                  \
23250         waitpid                 \
23251         wait4                   \
23252         write                   \
23253         send                    \
23254         sendmsg                 \
23255         sendto                  \
23256
23257 do
23258 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23259 echo "configure:23260: checking for $ac_func" >&5
23260 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23261   echo $ac_n "(cached) $ac_c" 1>&6
23262 else
23263   cat > conftest.$ac_ext <<EOF
23264 #line 23265 "configure"
23265 #include "confdefs.h"
23266 /* System header to define __stub macros and hopefully few prototypes,
23267     which can conflict with char $ac_func(); below.  */
23268 #include <assert.h>
23269 /* Override any gcc2 internal prototype to avoid an error.  */
23270 /* We use char because int might match the return type of a gcc2
23271     builtin and then its argument prototype would still apply.  */
23272 char $ac_func();
23273 char (*f)();
23274
23275 int main() {
23276
23277 /* The GNU C library defines this for functions which it implements
23278     to always fail with ENOSYS.  Some functions are actually named
23279     something starting with __ and the normal name is an alias.  */
23280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23281 choke me
23282 #else
23283 f = $ac_func;
23284 #endif
23285
23286 ; return 0; }
23287 EOF
23288 if { (eval echo configure:23289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23289   rm -rf conftest*
23290   eval "ac_cv_func_$ac_func=yes"
23291 else
23292   echo "configure: failed program was:" >&5
23293   cat conftest.$ac_ext >&5
23294   rm -rf conftest*
23295   eval "ac_cv_func_$ac_func=no"
23296 fi
23297 rm -f conftest*
23298 fi
23299
23300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23301   echo "$ac_t""yes" 1>&6
23302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23303   cat >> confdefs.h <<EOF
23304 #define $ac_tr_func 1
23305 EOF
23306  
23307 else
23308   echo "$ac_t""no" 1>&6
23309 fi
23310 done
23311
23312
23313 for ac_func in getopt getpeereid
23314 do
23315 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23316 echo "configure:23317: checking for $ac_func" >&5
23317 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23318   echo $ac_n "(cached) $ac_c" 1>&6
23319 else
23320   cat > conftest.$ac_ext <<EOF
23321 #line 23322 "configure"
23322 #include "confdefs.h"
23323 /* System header to define __stub macros and hopefully few prototypes,
23324     which can conflict with char $ac_func(); below.  */
23325 #include <assert.h>
23326 /* Override any gcc2 internal prototype to avoid an error.  */
23327 /* We use char because int might match the return type of a gcc2
23328     builtin and then its argument prototype would still apply.  */
23329 char $ac_func();
23330 char (*f)();
23331
23332 int main() {
23333
23334 /* The GNU C library defines this for functions which it implements
23335     to always fail with ENOSYS.  Some functions are actually named
23336     something starting with __ and the normal name is an alias.  */
23337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23338 choke me
23339 #else
23340 f = $ac_func;
23341 #endif
23342
23343 ; return 0; }
23344 EOF
23345 if { (eval echo configure:23346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23346   rm -rf conftest*
23347   eval "ac_cv_func_$ac_func=yes"
23348 else
23349   echo "configure: failed program was:" >&5
23350   cat conftest.$ac_ext >&5
23351   rm -rf conftest*
23352   eval "ac_cv_func_$ac_func=no"
23353 fi
23354 rm -f conftest*
23355 fi
23356
23357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23358   echo "$ac_t""yes" 1>&6
23359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23360   cat >> confdefs.h <<EOF
23361 #define $ac_tr_func 1
23362 EOF
23363  
23364 else
23365   echo "$ac_t""no" 1>&6
23366 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23367 fi
23368 done
23369
23370
23371
23372 if test "$ac_cv_func_getopt" != yes; then
23373         LIBSRCS="$LIBSRCS getopt.c"
23374 fi
23375 if test "$ac_cv_func_getpeereid" != yes; then
23376         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23377 echo "configure:23378: checking for msg_accrights in msghdr" >&5
23378 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23379   echo $ac_n "(cached) $ac_c" 1>&6
23380 else
23381   cat > conftest.$ac_ext <<EOF
23382 #line 23383 "configure"
23383 #include "confdefs.h"
23384 #include <sys/socket.h>
23385 int main() {
23386 struct msghdr m; m.msg_accrightslen=0
23387 ; return 0; }
23388 EOF
23389 if { (eval echo configure:23390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23390   rm -rf conftest*
23391   ol_cv_msghdr_msg_accrights=yes
23392 else
23393   echo "configure: failed program was:" >&5
23394   cat conftest.$ac_ext >&5
23395   rm -rf conftest*
23396   ol_cv_msghdr_msg_accrights=no
23397 fi
23398 rm -f conftest*
23399         
23400 fi
23401
23402 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23403   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23404         cat >> confdefs.h <<\EOF
23405 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23406 EOF
23407
23408   fi
23409
23410         LIBSRCS="$LIBSRCS getpeereid.c"
23411 fi
23412 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23413         if test "$ac_cv_func_snprintf" != yes; then
23414                 cat >> confdefs.h <<\EOF
23415 #define snprintf ber_pvt_snprintf
23416 EOF
23417
23418         fi
23419         if test "$ac_cv_func_vsnprintf" != yes; then
23420                 cat >> confdefs.h <<\EOF
23421 #define vsnprintf ber_pvt_vsnprintf
23422 EOF
23423
23424         fi
23425 fi
23426
23427
23428 if test "$ol_enable_slapi" != no ; then
23429                         for ac_hdr in ltdl.h
23430 do
23431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23433 echo "configure:23434: checking for $ac_hdr" >&5
23434 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23435   echo $ac_n "(cached) $ac_c" 1>&6
23436 else
23437   cat > conftest.$ac_ext <<EOF
23438 #line 23439 "configure"
23439 #include "confdefs.h"
23440 #include <$ac_hdr>
23441 EOF
23442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23443 { (eval echo configure:23444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23445 if test -z "$ac_err"; then
23446   rm -rf conftest*
23447   eval "ac_cv_header_$ac_safe=yes"
23448 else
23449   echo "$ac_err" >&5
23450   echo "configure: failed program was:" >&5
23451   cat conftest.$ac_ext >&5
23452   rm -rf conftest*
23453   eval "ac_cv_header_$ac_safe=no"
23454 fi
23455 rm -f conftest*
23456 fi
23457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23458   echo "$ac_t""yes" 1>&6
23459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23460   cat >> confdefs.h <<EOF
23461 #define $ac_tr_hdr 1
23462 EOF
23463  
23464 else
23465   echo "$ac_t""no" 1>&6
23466 fi
23467 done
23468
23469
23470         if test $ac_cv_header_ltdl_h != yes ; then
23471                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23472         fi
23473         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23474 echo "configure:23475: checking for lt_dlinit in -lltdl" >&5
23475 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23477   echo $ac_n "(cached) $ac_c" 1>&6
23478 else
23479   ac_save_LIBS="$LIBS"
23480 LIBS="-lltdl  $LIBS"
23481 cat > conftest.$ac_ext <<EOF
23482 #line 23483 "configure"
23483 #include "confdefs.h"
23484 /* Override any gcc2 internal prototype to avoid an error.  */
23485 /* We use char because int might match the return type of a gcc2
23486     builtin and then its argument prototype would still apply.  */
23487 char lt_dlinit();
23488
23489 int main() {
23490 lt_dlinit()
23491 ; return 0; }
23492 EOF
23493 if { (eval echo configure:23494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23494   rm -rf conftest*
23495   eval "ac_cv_lib_$ac_lib_var=yes"
23496 else
23497   echo "configure: failed program was:" >&5
23498   cat conftest.$ac_ext >&5
23499   rm -rf conftest*
23500   eval "ac_cv_lib_$ac_lib_var=no"
23501 fi
23502 rm -f conftest*
23503 LIBS="$ac_save_LIBS"
23504
23505 fi
23506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23507   echo "$ac_t""yes" 1>&6
23508   
23509                 SLAPI_LIBS=-lltdl
23510                 LIBSLAPI=libslapi.a
23511                 LIBSLAPITOOLS=../libslapi.a
23512                 cat >> confdefs.h <<\EOF
23513 #define HAVE_LIBLTDL 1
23514 EOF
23515
23516         
23517 else
23518   echo "$ac_t""no" 1>&6
23519 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23520 fi
23521
23522
23523         cat >> confdefs.h <<\EOF
23524 #define LDAP_SLAPI 1
23525 EOF
23526
23527 fi
23528
23529 if test "$ol_enable_debug" != no ; then
23530         cat >> confdefs.h <<\EOF
23531 #define LDAP_DEBUG 1
23532 EOF
23533
23534 fi
23535 if test "$ol_enable_syslog" = yes ; then
23536         cat >> confdefs.h <<\EOF
23537 #define LDAP_SYSLOG 1
23538 EOF
23539
23540 fi
23541 if test "$ol_link_kbind" != no ; then
23542         cat >> confdefs.h <<\EOF
23543 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23544 EOF
23545
23546 fi
23547 if test "$ol_enable_proctitle" != no ; then
23548         cat >> confdefs.h <<\EOF
23549 #define LDAP_PROCTITLE 1
23550 EOF
23551
23552 fi
23553 if test "$ol_enable_referrals" != no ; then
23554         cat >> confdefs.h <<\EOF
23555 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23556 EOF
23557
23558 fi
23559 if test "$ol_enable_local" != no; then
23560         cat >> confdefs.h <<\EOF
23561 #define LDAP_PF_LOCAL 1
23562 EOF
23563
23564 fi
23565 if test "$ol_link_ipv6" != no; then
23566         cat >> confdefs.h <<\EOF
23567 #define LDAP_PF_INET6 1
23568 EOF
23569
23570 fi
23571 if test "$ol_enable_cleartext" != no ; then
23572         cat >> confdefs.h <<\EOF
23573 #define SLAPD_CLEARTEXT 1
23574 EOF
23575
23576 fi
23577 if test "$ol_enable_crypt" != no ; then
23578         cat >> confdefs.h <<\EOF
23579 #define SLAPD_CRYPT 1
23580 EOF
23581
23582 fi
23583 if test "$ol_link_spasswd" != no ; then
23584         cat >> confdefs.h <<\EOF
23585 #define SLAPD_SPASSWD 1
23586 EOF
23587
23588 fi
23589 if test "$ol_enable_multimaster" != no ; then
23590         cat >> confdefs.h <<\EOF
23591 #define SLAPD_MULTIMASTER 1
23592 EOF
23593
23594 fi
23595 if test "$ol_enable_rlookups" != no ; then
23596         cat >> confdefs.h <<\EOF
23597 #define SLAPD_RLOOKUPS 1
23598 EOF
23599
23600 fi
23601 if test "$ol_enable_aci" != no ; then
23602         cat >> confdefs.h <<\EOF
23603 #define SLAPD_ACI_ENABLED 1
23604 EOF
23605
23606 fi
23607
23608 if test "$ol_link_modules" != no ; then
23609         cat >> confdefs.h <<\EOF
23610 #define SLAPD_MODULES 1
23611 EOF
23612
23613         BUILD_SLAPD=yes
23614         SLAPD_MODULES_LDFLAGS="-dlopen self"
23615 fi
23616
23617 cat >> confdefs.h <<\EOF
23618 #define SLAPD_MOD_STATIC 1
23619 EOF
23620
23621 cat >> confdefs.h <<\EOF
23622 #define SLAPD_MOD_DYNAMIC 2
23623 EOF
23624
23625
23626 if test "$ol_enable_bdb" != no ; then
23627         BUILD_SLAPD=yes
23628         BUILD_BDB=$ol_enable_bdb
23629         if test "$ol_enable_bdb" = mod ; then
23630                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23631                 MFLAG=SLAPD_MOD_DYNAMIC
23632         else
23633                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23634                 MFLAG=SLAPD_MOD_STATIC
23635         fi
23636         cat >> confdefs.h <<EOF
23637 #define SLAPD_BDB $MFLAG
23638 EOF
23639
23640 fi
23641
23642 if test "$ol_enable_dnssrv" != no ; then
23643         BUILD_SLAPD=yes
23644         BUILD_DNSSRV=$ol_enable_dnssrv
23645         if test "$ol_enable_dnssrv" = mod ; then
23646                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23647                 MFLAG=SLAPD_MOD_DYNAMIC
23648         else
23649                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23650                 MFLAG=SLAPD_MOD_STATIC
23651         fi
23652         cat >> confdefs.h <<EOF
23653 #define SLAPD_DNSSRV $MFLAG
23654 EOF
23655
23656 fi
23657
23658 if test "$ol_enable_hdb" != no ; then
23659         BUILD_SLAPD=yes
23660         BUILD_HDB=$ol_enable_hdb
23661         if test "$ol_enable_hdb" = mod ; then
23662                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23663                 MFLAG=SLAPD_MOD_DYNAMIC
23664         else
23665                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23666                 MFLAG=SLAPD_MOD_STATIC
23667         fi
23668         cat >> confdefs.h <<EOF
23669 #define SLAPD_HDB $MFLAG
23670 EOF
23671
23672 fi
23673
23674 if test "$ol_enable_ldap" != no ; then
23675         BUILD_SLAPD=yes
23676         BUILD_LDAP=$ol_enable_ldap
23677         if test "$ol_enable_ldap" = mod ; then
23678                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23679                 MFLAG=SLAPD_MOD_DYNAMIC
23680         else
23681                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23682                 MFLAG=SLAPD_MOD_STATIC
23683         fi
23684         cat >> confdefs.h <<EOF
23685 #define SLAPD_LDAP $MFLAG
23686 EOF
23687
23688 fi
23689
23690 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23691         BUILD_SLAPD=yes
23692         BUILD_LDBM=$ol_enable_ldbm
23693         if test "$ol_enable_ldbm" = mod ; then
23694                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23695                 MFLAG=SLAPD_MOD_DYNAMIC
23696         else
23697                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23698                 MFLAG=SLAPD_MOD_STATIC
23699         fi
23700         cat >> confdefs.h <<EOF
23701 #define SLAPD_LDBM $MFLAG
23702 EOF
23703
23704 fi
23705
23706 if test "$ol_enable_meta" != no ; then
23707         BUILD_SLAPD=yes
23708         BUILD_META=$ol_enable_meta
23709         BUILD_REWRITE=yes
23710         if test "$ol_enable_meta" = mod ; then
23711                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23712                 MFLAG=SLAPD_MOD_DYNAMIC
23713         else
23714                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23715                 MFLAG=SLAPD_MOD_STATIC
23716         fi
23717         cat >> confdefs.h <<EOF
23718 #define SLAPD_META $MFLAG
23719 EOF
23720
23721 fi
23722
23723 if test "$ol_enable_monitor" != no ; then
23724         BUILD_SLAPD=yes
23725         BUILD_MONITOR=$ol_enable_monitor
23726         if test "$ol_enable_monitor" = mod ; then
23727                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23728                 MFLAG=SLAPD_MOD_DYNAMIC
23729         else
23730                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23731                 MFLAG=SLAPD_MOD_STATIC
23732         fi
23733         cat >> confdefs.h <<EOF
23734 #define SLAPD_MONITOR $MFLAG
23735 EOF
23736
23737 fi
23738
23739 if test "$ol_enable_null" != no ; then
23740         BUILD_SLAPD=yes
23741         BUILD_NULL=$ol_enable_null
23742         if test "$ol_enable_null" = mod ; then
23743                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23744                 MFLAG=SLAPD_MOD_DYNAMIC
23745         else
23746                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23747                 MFLAG=SLAPD_MOD_STATIC
23748         fi
23749         cat >> confdefs.h <<EOF
23750 #define SLAPD_NULL $MFLAG
23751 EOF
23752
23753 fi
23754
23755 if test "$ol_enable_passwd" != no ; then
23756         BUILD_SLAPD=yes
23757         BUILD_PASSWD=$ol_enable_passwd
23758         if test "$ol_enable_passwd" = mod ; then
23759                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23760                 MFLAG=SLAPD_MOD_DYNAMIC
23761         else
23762                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23763                 MFLAG=SLAPD_MOD_STATIC
23764         fi
23765         cat >> confdefs.h <<EOF
23766 #define SLAPD_PASSWD $MFLAG
23767 EOF
23768
23769 fi
23770
23771 if test "$ol_link_perl" != no ; then
23772         BUILD_SLAPD=yes
23773         BUILD_PERL=$ol_enable_perl
23774         if test "$ol_enable_perl" = mod ; then
23775                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23776                 MFLAG=SLAPD_MOD_DYNAMIC
23777         else
23778                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23779                 MFLAG=SLAPD_MOD_STATIC
23780         fi
23781         cat >> confdefs.h <<EOF
23782 #define SLAPD_PERL $MFLAG
23783 EOF
23784
23785 fi
23786
23787 if test "$ol_enable_relay" != no ; then
23788         BUILD_SLAPD=yes
23789         BUILD_RELAY=$ol_enable_relay
23790         if test "$ol_enable_relay" = mod ; then
23791                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23792                 MFLAG=SLAPD_MOD_DYNAMIC
23793         else
23794                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23795                 MFLAG=SLAPD_MOD_STATIC
23796         fi
23797         cat >> confdefs.h <<EOF
23798 #define SLAPD_RELAY $MFLAG
23799 EOF
23800
23801 fi
23802
23803 if test "$ol_enable_shell" != no ; then
23804         if test "$ol_link_thread" != no ; then
23805                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23806         fi
23807         BUILD_SLAPD=yes
23808         BUILD_SHELL=$ol_enable_shell
23809         if test "$ol_enable_shell" = mod ; then
23810                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23811                 MFLAG=SLAPD_MOD_DYNAMIC
23812         else
23813                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23814                 MFLAG=SLAPD_MOD_STATIC
23815         fi
23816         cat >> confdefs.h <<EOF
23817 #define SLAPD_SHELL $MFLAG
23818 EOF
23819
23820 fi
23821
23822 if test "$ol_link_sql" != no ; then
23823         BUILD_SLAPD=yes
23824         BUILD_SQL=$ol_enable_sql
23825         if test "$ol_enable_sql" = mod; then
23826                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23827                 MFLAG=SLAPD_MOD_DYNAMIC
23828         else
23829                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23830                 MFLAG=SLAPD_MOD_STATIC
23831         fi
23832         cat >> confdefs.h <<EOF
23833 #define SLAPD_SQL $MFLAG
23834 EOF
23835
23836 fi
23837
23838 if test "$ol_enable_chain" != no ; then
23839         BUILD_CHAIN=$ol_enable_chain
23840         if test "$ol_enable_chain" = mod ; then
23841                 MFLAG=SLAPD_MOD_DYNAMIC
23842                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23843         else
23844                 MFLAG=SLAPD_MOD_STATIC
23845         fi
23846         cat >> confdefs.h <<EOF
23847 #define SLAPD_OVER_CHAIN $MFLAG
23848 EOF
23849
23850 fi
23851
23852 if test "$ol_enable_denyop" != no ; then
23853         BUILD_DENYOP=$ol_enable_denyop
23854         if test "$ol_enable_denyop" = mod ; then
23855                 MFLAG=SLAPD_MOD_DYNAMIC
23856                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23857         else
23858                 MFLAG=SLAPD_MOD_STATIC
23859         fi
23860         cat >> confdefs.h <<EOF
23861 #define SLAPD_OVER_DENYOP $MFLAG
23862 EOF
23863
23864 fi
23865
23866 if test "$ol_enable_dyngroup" != no ; then
23867         BUILD_DYNGROUP=$ol_enable_dyngroup
23868         if test "$ol_enable_dyngroup" = mod ; then
23869                 MFLAG=SLAPD_MOD_DYNAMIC
23870                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23871         else
23872                 MFLAG=SLAPD_MOD_STATIC
23873         fi
23874         cat >> confdefs.h <<EOF
23875 #define SLAPD_OVER_DYNGROUP $MFLAG
23876 EOF
23877
23878 fi
23879
23880 if test "$ol_enable_lastmod" != no ; then
23881         BUILD_LASTMOD=$ol_enable_lastmod
23882         if test "$ol_enable_lastmod" = mod ; then
23883                 MFLAG=SLAPD_MOD_DYNAMIC
23884                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23885         else
23886                 MFLAG=SLAPD_MOD_STATIC
23887         fi
23888         cat >> confdefs.h <<EOF
23889 #define SLAPD_OVER_LASTMOD $MFLAG
23890 EOF
23891
23892 fi
23893
23894 if test "$ol_enable_ppolicy" != no ; then
23895         BUILD_PPOLICY=$ol_enable_ppolicy
23896         if test "$ol_enable_ppolicy" = mod ; then
23897                 MFLAG=SLAPD_MOD_DYNAMIC
23898                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23899         else
23900                 MFLAG=SLAPD_MOD_STATIC
23901         fi
23902         cat >> confdefs.h <<EOF
23903 #define SLAPD_OVER_PPOLICY $MFLAG
23904 EOF
23905
23906 fi
23907
23908 if test "$ol_enable_proxycache" != no ; then
23909         BUILD_PROXYCACHE=$ol_enable_proxycache
23910         if test "$ol_enable_proxycache" = mod ; then
23911                 MFLAG=SLAPD_MOD_DYNAMIC
23912                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23913         else
23914                 MFLAG=SLAPD_MOD_STATIC
23915         fi
23916         cat >> confdefs.h <<EOF
23917 #define SLAPD_OVER_PROXYCACHE $MFLAG
23918 EOF
23919
23920 fi
23921
23922 if test "$ol_enable_refint" != no ; then
23923         BUILD_REFINT=$ol_enable_refint
23924         if test "$ol_enable_refint" = mod ; then
23925                 MFLAG=SLAPD_MOD_DYNAMIC
23926                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
23927         else
23928                 MFLAG=SLAPD_MOD_STATIC
23929         fi
23930         cat >> confdefs.h <<EOF
23931 #define SLAPD_OVER_REFINT $MFLAG
23932 EOF
23933
23934 fi
23935
23936 if test "$ol_enable_rwm" != no ; then
23937         BUILD_REWRITE=yes
23938         BUILD_RWM=$ol_enable_rwm
23939         if test "$ol_enable_rwm" = mod ; then
23940                 MFLAG=SLAPD_MOD_DYNAMIC
23941                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23942         else
23943                 MFLAG=SLAPD_MOD_STATIC
23944         fi
23945         cat >> confdefs.h <<EOF
23946 #define SLAPD_OVER_RWM $MFLAG
23947 EOF
23948
23949 fi
23950
23951 if test "$ol_enable_unique" != no ; then
23952         BUILD_UNIQUE=$ol_enable_unique
23953         if test "$ol_enable_unique" = mod ; then
23954                 MFLAG=SLAPD_MOD_DYNAMIC
23955                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
23956         else
23957                 MFLAG=SLAPD_MOD_STATIC
23958         fi
23959         cat >> confdefs.h <<EOF
23960 #define SLAPD_OVER_UNIQUE $MFLAG
23961 EOF
23962
23963 fi
23964
23965 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23966         $BUILD_SLAPD = yes ; then
23967         BUILD_SLURPD=yes
23968 fi
23969
23970 if test "$ol_enable_rewrite" != no ; then
23971         cat >> confdefs.h <<\EOF
23972 #define ENABLE_REWRITE 1
23973 EOF
23974
23975         BUILD_REWRITE=yes
23976 fi
23977
23978 if test "$ol_enable_slapi" != no ; then
23979         cat >> confdefs.h <<\EOF
23980 #define ENABLE_SLAPI 1
23981 EOF
23982
23983         BUILD_SLAPI=yes
23984         SLAPD_SLAPI_DEPEND=libslapi.a
23985 fi
23986
23987
23988
23989 if test "$ac_cv_mingw32" = yes ; then
23990         PLAT=NT
23991         SLAPD_MODULES_LDFLAGS=
23992 else
23993         PLAT=UNIX
23994 fi
23995
23996 if test -z "$SLAPD_STATIC_BACKENDS"; then
23997         SLAPD_NO_STATIC='#'
23998 else
23999         SLAPD_NO_STATIC=
24000 fi
24001
24002
24003
24004
24005
24006
24007
24008   
24009   
24010   
24011   
24012   
24013   
24014   
24015   
24016   
24017   
24018   
24019   
24020   
24021   
24022   
24023   
24024   
24025   
24026   
24027   
24028   
24029   
24030   
24031   
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070 # Check whether --with-xxinstall or --without-xxinstall was given.
24071 if test "${with_xxinstall+set}" = set; then
24072   withval="$with_xxinstall"
24073   :
24074 fi
24075
24076
24077
24078 trap '' 1 2 15
24079
24080 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24081
24082 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24083 # Let make expand exec_prefix.
24084 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24085
24086 # Any assignment to VPATH causes Sun make to only execute
24087 # the first set of double-colon rules, so remove it if not needed.
24088 # If there is a colon in the path, we need to keep it.
24089 if test "x$srcdir" = x.; then
24090   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24091 fi
24092
24093 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24094
24095 DEFS=-DHAVE_CONFIG_H
24096
24097 # Without the "./", some shells look in PATH for config.status.
24098 : ${CONFIG_STATUS=./config.status}
24099
24100 echo creating $CONFIG_STATUS
24101 rm -f $CONFIG_STATUS
24102 cat > $CONFIG_STATUS <<EOF
24103 #! /bin/sh
24104 # Generated automatically by configure.
24105 # Run this file to recreate the current configuration.
24106 # This directory was configured as follows,
24107 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24108 #
24109 # $0 $ac_configure_args
24110 #
24111 # Compiler output produced by configure, useful for debugging
24112 # configure, is in ./config.log if it exists.
24113
24114 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24115 for ac_option
24116 do
24117   case "\$ac_option" in
24118   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24119     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24120     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24121   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24122     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24123     exit 0 ;;
24124   -help | --help | --hel | --he | --h)
24125     echo "\$ac_cs_usage"; exit 0 ;;
24126   *) echo "\$ac_cs_usage"; exit 1 ;;
24127   esac
24128 done
24129
24130 ac_given_srcdir=$srcdir
24131 ac_given_INSTALL="$INSTALL"
24132
24133 trap 'rm -fr `echo "\
24134 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24135 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24136 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24137 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24138 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24139 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24140 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24141 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24142 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24143 include/Makefile:build/top.mk:include/Makefile.in \
24144 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24145 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24146 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24147 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24148 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24149 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24150 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24151 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24152 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24153 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24154 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24155 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24156 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24157 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24158 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24159 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24160 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24161 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24162 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24163 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24164 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24165 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24166 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24167 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24168 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24169 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24170 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24171 tests/run \
24172 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24173  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24174 EOF
24175 cat >> $CONFIG_STATUS <<EOF
24176
24177 # Protect against being on the right side of a sed subst in config.status.
24178 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24179  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24180 $ac_vpsub
24181 $extrasub
24182 s%@SHELL@%$SHELL%g
24183 s%@CFLAGS@%$CFLAGS%g
24184 s%@CPPFLAGS@%$CPPFLAGS%g
24185 s%@CXXFLAGS@%$CXXFLAGS%g
24186 s%@FFLAGS@%$FFLAGS%g
24187 s%@DEFS@%$DEFS%g
24188 s%@LDFLAGS@%$LDFLAGS%g
24189 s%@LIBS@%$LIBS%g
24190 s%@exec_prefix@%$exec_prefix%g
24191 s%@prefix@%$prefix%g
24192 s%@program_transform_name@%$program_transform_name%g
24193 s%@bindir@%$bindir%g
24194 s%@sbindir@%$sbindir%g
24195 s%@libexecdir@%$libexecdir%g
24196 s%@datadir@%$datadir%g
24197 s%@sysconfdir@%$sysconfdir%g
24198 s%@sharedstatedir@%$sharedstatedir%g
24199 s%@localstatedir@%$localstatedir%g
24200 s%@libdir@%$libdir%g
24201 s%@includedir@%$includedir%g
24202 s%@oldincludedir@%$oldincludedir%g
24203 s%@infodir@%$infodir%g
24204 s%@mandir@%$mandir%g
24205 s%@host@%$host%g
24206 s%@host_alias@%$host_alias%g
24207 s%@host_cpu@%$host_cpu%g
24208 s%@host_vendor@%$host_vendor%g
24209 s%@host_os@%$host_os%g
24210 s%@target@%$target%g
24211 s%@target_alias@%$target_alias%g
24212 s%@target_cpu@%$target_cpu%g
24213 s%@target_vendor@%$target_vendor%g
24214 s%@target_os@%$target_os%g
24215 s%@build@%$build%g
24216 s%@build_alias@%$build_alias%g
24217 s%@build_cpu@%$build_cpu%g
24218 s%@build_vendor@%$build_vendor%g
24219 s%@build_os@%$build_os%g
24220 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24221 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24222 s%@INSTALL_DATA@%$INSTALL_DATA%g
24223 s%@PACKAGE@%$PACKAGE%g
24224 s%@VERSION@%$VERSION%g
24225 s%@ACLOCAL@%$ACLOCAL%g
24226 s%@AUTOCONF@%$AUTOCONF%g
24227 s%@AUTOMAKE@%$AUTOMAKE%g
24228 s%@AUTOHEADER@%$AUTOHEADER%g
24229 s%@MAKEINFO@%$MAKEINFO%g
24230 s%@install_sh@%$install_sh%g
24231 s%@AMTAR@%$AMTAR%g
24232 s%@AWK@%$AWK%g
24233 s%@AMTARFLAGS@%$AMTARFLAGS%g
24234 s%@SET_MAKE@%$SET_MAKE%g
24235 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24236 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24237 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24238 s%@top_builddir@%$top_builddir%g
24239 s%@ldap_subdir@%$ldap_subdir%g
24240 s%@CC@%$CC%g
24241 s%@AR@%$AR%g
24242 s%@LN_S@%$LN_S%g
24243 s%@OBJEXT@%$OBJEXT%g
24244 s%@EXEEXT@%$EXEEXT%g
24245 s%@ECHO@%$ECHO%g
24246 s%@RANLIB@%$RANLIB%g
24247 s%@STRIP@%$STRIP%g
24248 s%@DLLTOOL@%$DLLTOOL%g
24249 s%@AS@%$AS%g
24250 s%@OBJDUMP@%$OBJDUMP%g
24251 s%@CPP@%$CPP%g
24252 s%@LIBTOOL@%$LIBTOOL%g
24253 s%@LN_H@%$LN_H%g
24254 s%@PERLBIN@%$PERLBIN%g
24255 s%@OL_MKDEP@%$OL_MKDEP%g
24256 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24257 s%@LTSTATIC@%$LTSTATIC%g
24258 s%@LIBOBJS@%$LIBOBJS%g
24259 s%@LIBSRCS@%$LIBSRCS%g
24260 s%@PLAT@%$PLAT%g
24261 s%@WITH_TLS@%$WITH_TLS%g
24262 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24263 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24264 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24265 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24266 s%@BUILD_BDB@%$BUILD_BDB%g
24267 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24268 s%@BUILD_HDB@%$BUILD_HDB%g
24269 s%@BUILD_LDAP@%$BUILD_LDAP%g
24270 s%@BUILD_LDBM@%$BUILD_LDBM%g
24271 s%@BUILD_META@%$BUILD_META%g
24272 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24273 s%@BUILD_NULL@%$BUILD_NULL%g
24274 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24275 s%@BUILD_RELAY@%$BUILD_RELAY%g
24276 s%@BUILD_PERL@%$BUILD_PERL%g
24277 s%@BUILD_SHELL@%$BUILD_SHELL%g
24278 s%@BUILD_SQL@%$BUILD_SQL%g
24279 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24280 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24281 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24282 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24283 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24284 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24285 s%@BUILD_REFINT@%$BUILD_REFINT%g
24286 s%@BUILD_RWM@%$BUILD_RWM%g
24287 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24288 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24289 s%@LDAP_LIBS@%$LDAP_LIBS%g
24290 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24291 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24292 s%@LDBM_LIBS@%$LDBM_LIBS%g
24293 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24294 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24295 s%@WRAP_LIBS@%$WRAP_LIBS%g
24296 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24297 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24298 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24299 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24300 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24301 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24302 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24303 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24304 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24305 s%@KRB4_LIBS@%$KRB4_LIBS%g
24306 s%@KRB5_LIBS@%$KRB5_LIBS%g
24307 s%@SASL_LIBS@%$SASL_LIBS%g
24308 s%@TLS_LIBS@%$TLS_LIBS%g
24309 s%@MODULES_LIBS@%$MODULES_LIBS%g
24310 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24311 s%@LIBSLAPI@%$LIBSLAPI%g
24312 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24313 s%@AUTH_LIBS@%$AUTH_LIBS%g
24314 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24315 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24316 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24317 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24318
24319 CEOF
24320 EOF
24321
24322 cat >> $CONFIG_STATUS <<\EOF
24323
24324 # Split the substitutions into bite-sized pieces for seds with
24325 # small command number limits, like on Digital OSF/1 and HP-UX.
24326 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24327 ac_file=1 # Number of current file.
24328 ac_beg=1 # First line for current file.
24329 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24330 ac_more_lines=:
24331 ac_sed_cmds=""
24332 while $ac_more_lines; do
24333   if test $ac_beg -gt 1; then
24334     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24335   else
24336     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24337   fi
24338   if test ! -s conftest.s$ac_file; then
24339     ac_more_lines=false
24340     rm -f conftest.s$ac_file
24341   else
24342     if test -z "$ac_sed_cmds"; then
24343       ac_sed_cmds="sed -f conftest.s$ac_file"
24344     else
24345       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24346     fi
24347     ac_file=`expr $ac_file + 1`
24348     ac_beg=$ac_end
24349     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24350   fi
24351 done
24352 if test -z "$ac_sed_cmds"; then
24353   ac_sed_cmds=cat
24354 fi
24355 EOF
24356
24357 cat >> $CONFIG_STATUS <<EOF
24358
24359 CONFIG_FILES=\${CONFIG_FILES-"\
24360 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24361 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24362 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24363 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24364 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24365 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24366 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24367 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24368 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24369 include/Makefile:build/top.mk:include/Makefile.in \
24370 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24371 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24372 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24373 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24374 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24375 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24376 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24377 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24378 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24379 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24380 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24381 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24382 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24383 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24384 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24385 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24386 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24387 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24388 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24389 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24390 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24391 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24392 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24393 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24394 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24395 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24396 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24397 tests/run \
24398 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24399 "}
24400 EOF
24401 cat >> $CONFIG_STATUS <<\EOF
24402 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24403   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24404   case "$ac_file" in
24405   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24406        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24407   *) ac_file_in="${ac_file}.in" ;;
24408   esac
24409
24410   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24411
24412   # Remove last slash and all that follows it.  Not all systems have dirname.
24413   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24414   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24415     # The file is in a subdirectory.
24416     test ! -d "$ac_dir" && mkdir "$ac_dir"
24417     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24418     # A "../" for each directory in $ac_dir_suffix.
24419     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24420   else
24421     ac_dir_suffix= ac_dots=
24422   fi
24423
24424   case "$ac_given_srcdir" in
24425   .)  srcdir=.
24426       if test -z "$ac_dots"; then top_srcdir=.
24427       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24428   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24429   *) # Relative path.
24430     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24431     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24432   esac
24433
24434   case "$ac_given_INSTALL" in
24435   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24436   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24437   esac
24438
24439   echo creating "$ac_file"
24440   rm -f "$ac_file"
24441   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24442   case "$ac_file" in
24443   *[Mm]akefile*) ac_comsub="1i\\
24444 # $configure_input" ;;
24445   *) ac_comsub= ;;
24446   esac
24447
24448   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24449   sed -e "$ac_comsub
24450 s%@configure_input@%$configure_input%g
24451 s%@srcdir@%$srcdir%g
24452 s%@top_srcdir@%$top_srcdir%g
24453 s%@INSTALL@%$INSTALL%g
24454 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24455 fi; done
24456 rm -f conftest.s*
24457
24458 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24459 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24460 #
24461 # ac_d sets the value in "#define NAME VALUE" lines.
24462 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24463 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24464 ac_dC='\3'
24465 ac_dD='%g'
24466 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24467 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24468 ac_uB='\([      ]\)%\1#\2define\3'
24469 ac_uC=' '
24470 ac_uD='\4%g'
24471 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24472 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24473 ac_eB='$%\1#\2define\3'
24474 ac_eC=' '
24475 ac_eD='%g'
24476
24477 if test "${CONFIG_HEADERS+set}" != set; then
24478 EOF
24479 cat >> $CONFIG_STATUS <<EOF
24480   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24481 EOF
24482 cat >> $CONFIG_STATUS <<\EOF
24483 fi
24484 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24485   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24486   case "$ac_file" in
24487   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24488        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24489   *) ac_file_in="${ac_file}.in" ;;
24490   esac
24491
24492   echo creating $ac_file
24493
24494   rm -f conftest.frag conftest.in conftest.out
24495   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24496   cat $ac_file_inputs > conftest.in
24497
24498 EOF
24499
24500 # Transform confdefs.h into a sed script conftest.vals that substitutes
24501 # the proper values into config.h.in to produce config.h.  And first:
24502 # Protect against being on the right side of a sed subst in config.status.
24503 # Protect against being in an unquoted here document in config.status.
24504 rm -f conftest.vals
24505 cat > conftest.hdr <<\EOF
24506 s/[\\&%]/\\&/g
24507 s%[\\$`]%\\&%g
24508 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24509 s%ac_d%ac_u%gp
24510 s%ac_u%ac_e%gp
24511 EOF
24512 sed -n -f conftest.hdr confdefs.h > conftest.vals
24513 rm -f conftest.hdr
24514
24515 # This sed command replaces #undef with comments.  This is necessary, for
24516 # example, in the case of _POSIX_SOURCE, which is predefined and required
24517 # on some systems where configure will not decide to define it.
24518 cat >> conftest.vals <<\EOF
24519 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24520 EOF
24521
24522 # Break up conftest.vals because some shells have a limit on
24523 # the size of here documents, and old seds have small limits too.
24524
24525 rm -f conftest.tail
24526 while :
24527 do
24528   ac_lines=`grep -c . conftest.vals`
24529   # grep -c gives empty output for an empty file on some AIX systems.
24530   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24531   # Write a limited-size here document to conftest.frag.
24532   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24533   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24534   echo 'CEOF
24535   sed -f conftest.frag conftest.in > conftest.out
24536   rm -f conftest.in
24537   mv conftest.out conftest.in
24538 ' >> $CONFIG_STATUS
24539   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24540   rm -f conftest.vals
24541   mv conftest.tail conftest.vals
24542 done
24543 rm -f conftest.vals
24544
24545 cat >> $CONFIG_STATUS <<\EOF
24546   rm -f conftest.frag conftest.h
24547   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24548   cat conftest.in >> conftest.h
24549   rm -f conftest.in
24550   if cmp -s $ac_file conftest.h 2>/dev/null; then
24551     echo "$ac_file is unchanged"
24552     rm -f conftest.h
24553   else
24554     # Remove last slash and all that follows it.  Not all systems have dirname.
24555       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24556       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24557       # The file is in a subdirectory.
24558       test ! -d "$ac_dir" && mkdir "$ac_dir"
24559     fi
24560     rm -f $ac_file
24561     mv conftest.h $ac_file
24562   fi
24563 fi; done
24564
24565 EOF
24566 cat >> $CONFIG_STATUS <<EOF
24567
24568 EOF
24569 cat >> $CONFIG_STATUS <<\EOF
24570
24571 chmod +x tests/run
24572 date > stamp-h
24573 echo Please run \"make depend\" to build dependencies
24574
24575 exit 0
24576 EOF
24577 chmod +x $CONFIG_STATUS
24578 rm -fr confdefs* $ac_clean_files
24579 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24580