]> git.sur5r.net Git - openldap/blob - configure
fix unfortunate omission of [-r] in ldapdelete(1)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.552 2004/11/03 11:02:38 ralf 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   --with-multiple-precision
59                           multiple precision support for statistics
60                           auto|bignum|gmp [auto]"
61 ac_help="$ac_help
62
63 SLAPD (Standalone LDAP Daemon) Options:"
64 ac_help="$ac_help
65   --enable-slapd          enable building slapd [yes]"
66 ac_help="$ac_help
67     --enable-aci          enable per-object ACIs (experimental) [no]"
68 ac_help="$ac_help
69     --enable-cleartext    enable cleartext passwords [yes]"
70 ac_help="$ac_help
71     --enable-crypt        enable crypt(3) passwords [no]"
72 ac_help="$ac_help
73     --enable-lmpasswd     enable LAN Manager passwords [no]"
74 ac_help="$ac_help
75     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
76 ac_help="$ac_help
77     --enable-modules      enable dynamic module support [no]"
78 ac_help="$ac_help
79     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
80 ac_help="$ac_help
81     --enable-rlookups     enable reverse lookups of client hostnames [no]"
82 ac_help="$ac_help
83     --enable-slapi        enable SLAPI support (experimental) [no]"
84 ac_help="$ac_help
85     --enable-slp          enable SLPv2 support [no]"
86 ac_help="$ac_help
87     --enable-wrappers     enable tcp wrapper support [no]"
88 ac_help="$ac_help
89
90 SLAPD Backend Options:"
91 ac_help="$ac_help
92     --enable-backends     enable all available backends no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend no|yes|mod [no]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
103 ac_help="$ac_help
104       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend no|yes|mod [yes]"
111 ac_help="$ac_help
112     --enable-null         enable null backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-passwd       enable passwd backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-perl         enable perl backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-relay        enable relay backend no|yes|mod [yes]"
119 ac_help="$ac_help
120     --enable-shell        enable shell backend no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-sql          enable sql backend no|yes|mod [no]"
123 ac_help="$ac_help
124
125 SLAPD Overlay Options:"
126 ac_help="$ac_help
127     --enable-overlays     enable all available overlays no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-chain        LDAP Chain Response no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
142 ac_help="$ac_help
143     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
144 ac_help="$ac_help
145     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
146 ac_help="$ac_help
147
148 SLURPD (Replication Daemon) Options:"
149 ac_help="$ac_help
150   --enable-slurpd         enable building slurpd [auto]"
151 ac_help="$ac_help
152
153 Library Generation & Linking Options"
154 ac_help="$ac_help
155   --enable-static[=PKGS]  build static libraries [default=yes]"
156 ac_help="$ac_help
157   --enable-shared[=PKGS]  build shared libraries [default=yes]"
158 ac_help="$ac_help
159   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
160 ac_help="$ac_help
161   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
162
163 # Find the correct PATH separator.  Usually this is `:', but
164 # DJGPP uses `;' like DOS.
165 if test "X${PATH_SEPARATOR+set}" != Xset; then
166   UNAME=${UNAME-`uname 2>/dev/null`}
167   case X$UNAME in
168     *-DOS) lt_cv_sys_path_separator=';' ;;
169     *)     lt_cv_sys_path_separator=':' ;;
170   esac
171   PATH_SEPARATOR=$lt_cv_sys_path_separator
172 fi
173
174
175 # Check that we are running under the correct shell.
176 SHELL=${CONFIG_SHELL-/bin/sh}
177
178 case X$ECHO in
179 X*--fallback-echo)
180   # Remove one level of quotation (which was required for Make).
181   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
182   ;;
183 esac
184
185 echo=${ECHO-echo}
186 if test "X$1" = X--no-reexec; then
187   # Discard the --no-reexec flag, and continue.
188   shift
189 elif test "X$1" = X--fallback-echo; then
190   # Avoid inline document here, it may be left over
191   :
192 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
193   # Yippee, $echo works!
194   :
195 else
196   # Restart under the correct shell.
197   exec $SHELL "$0" --no-reexec ${1+"$@"}
198 fi
199
200 if test "X$1" = X--fallback-echo; then
201   # used as fallback echo
202   shift
203   cat <<EOF
204
205 EOF
206   exit 0
207 fi
208
209 # The HP-UX ksh and POSIX shell print the target directory to stdout
210 # if CDPATH is set.
211 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
212
213 if test -z "$ECHO"; then
214 if test "X${echo_test_string+set}" != Xset; then
215 # find a string as large as possible, as long as the shell can cope with it
216   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
217     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
218     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
219        echo_test_string="`eval $cmd`" &&
220        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
221     then
222       break
223     fi
224   done
225 fi
226
227 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
228    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
229    test "X$echo_testing_string" = "X$echo_test_string"; then
230   :
231 else
232   # The Solaris, AIX, and Digital Unix default echo programs unquote
233   # backslashes.  This makes it impossible to quote backslashes using
234   #   echo "$something" | sed 's/\\/\\\\/g'
235   #
236   # So, first we look for a working echo in the user's PATH.
237
238   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
239   for dir in $PATH /usr/ucb; do
240     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
241        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       echo="$dir/echo"
245       break
246     fi
247   done
248   IFS="$save_ifs"
249
250   if test "X$echo" = Xecho; then
251     # We didn't find a better echo, so look for alternatives.
252     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
253        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
254        test "X$echo_testing_string" = "X$echo_test_string"; then
255       # This shell has a builtin print -r that does the trick.
256       echo='print -r'
257     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
258          test "X$CONFIG_SHELL" != X/bin/ksh; then
259       # If we have ksh, try running configure again with it.
260       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
261       export ORIGINAL_CONFIG_SHELL
262       CONFIG_SHELL=/bin/ksh
263       export CONFIG_SHELL
264       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
265     else
266       # Try using printf.
267       echo='printf %s\n'
268       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
269          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
270          test "X$echo_testing_string" = "X$echo_test_string"; then
271         # Cool, printf works
272         :
273       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
278         export CONFIG_SHELL
279         SHELL="$CONFIG_SHELL"
280         export SHELL
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
283            test "X$echo_testing_string" = 'X\t' &&
284            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
285            test "X$echo_testing_string" = "X$echo_test_string"; then
286         echo="$CONFIG_SHELL $0 --fallback-echo"
287       else
288         # maybe with a smaller string...
289         prev=:
290
291         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
292           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
293           then
294             break
295           fi
296           prev="$cmd"
297         done
298
299         if test "$prev" != 'sed 50q "$0"'; then
300           echo_test_string=`eval $prev`
301           export echo_test_string
302           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
303         else
304           # Oops.  We lost completely, so just stick with echo.
305           echo=echo
306         fi
307       fi
308     fi
309   fi
310 fi
311 fi
312
313 # Copy echo and quote the copy suitably for passing to libtool from
314 # the Makefile, instead of quoting the original, which is used later.
315 ECHO=$echo
316 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
317    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
318 fi
319
320
321 ac_help="$ac_help
322   --disable-libtool-lock  avoid locking (might break parallel builds)"
323 ac_help="$ac_help
324   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
325 ac_help="$ac_help
326
327 See INSTALL file for further details."
328
329 # Initialize some variables set by options.
330 # The variables have the same names as the options, with
331 # dashes changed to underlines.
332 build=NONE
333 cache_file=./config.cache
334 exec_prefix=NONE
335 host=NONE
336 no_create=
337 nonopt=NONE
338 no_recursion=
339 prefix=NONE
340 program_prefix=NONE
341 program_suffix=NONE
342 program_transform_name=s,x,x,
343 silent=
344 site=
345 srcdir=
346 target=NONE
347 verbose=
348 x_includes=NONE
349 x_libraries=NONE
350 bindir='${exec_prefix}/bin'
351 sbindir='${exec_prefix}/sbin'
352 libexecdir='${exec_prefix}/libexec'
353 datadir='${prefix}/share'
354 sysconfdir='${prefix}/etc'
355 sharedstatedir='${prefix}/com'
356 localstatedir='${prefix}/var'
357 libdir='${exec_prefix}/lib'
358 includedir='${prefix}/include'
359 oldincludedir='/usr/include'
360 infodir='${prefix}/info'
361 mandir='${prefix}/man'
362
363 # Initialize some other variables.
364 subdirs=
365 MFLAGS= MAKEFLAGS=
366 SHELL=${CONFIG_SHELL-/bin/sh}
367 # Maximum number of lines to put in a shell here document.
368 ac_max_here_lines=12
369
370 ac_prev=
371 for ac_option
372 do
373
374   # If the previous option needs an argument, assign it.
375   if test -n "$ac_prev"; then
376     eval "$ac_prev=\$ac_option"
377     ac_prev=
378     continue
379   fi
380
381   case "$ac_option" in
382   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
383   *) ac_optarg= ;;
384   esac
385
386   # Accept the important Cygnus configure options, so we can diagnose typos.
387
388   case "$ac_option" in
389
390   -bindir | --bindir | --bindi | --bind | --bin | --bi)
391     ac_prev=bindir ;;
392   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
393     bindir="$ac_optarg" ;;
394
395   -build | --build | --buil | --bui | --bu)
396     ac_prev=build ;;
397   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
398     build="$ac_optarg" ;;
399
400   -cache-file | --cache-file | --cache-fil | --cache-fi \
401   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
402     ac_prev=cache_file ;;
403   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
404   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
405     cache_file="$ac_optarg" ;;
406
407   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
408     ac_prev=datadir ;;
409   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
410   | --da=*)
411     datadir="$ac_optarg" ;;
412
413   -disable-* | --disable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     eval "enable_${ac_feature}=no" ;;
421
422   -enable-* | --enable-*)
423     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
426       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
427     fi
428     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
429     case "$ac_option" in
430       *=*) ;;
431       *) ac_optarg=yes ;;
432     esac
433     eval "enable_${ac_feature}='$ac_optarg'" ;;
434
435   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
436   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
437   | --exec | --exe | --ex)
438     ac_prev=exec_prefix ;;
439   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
440   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
441   | --exec=* | --exe=* | --ex=*)
442     exec_prefix="$ac_optarg" ;;
443
444   -gas | --gas | --ga | --g)
445     # Obsolete; use --with-gas.
446     with_gas=yes ;;
447
448   -help | --help | --hel | --he)
449     # Omit some internal or obsolete options to make the list less imposing.
450     # This message is too long to be a string in the A/UX 3.1 sh.
451     cat << EOF
452 Usage: configure [options] [host]
453 Options: [defaults in brackets after descriptions]
454 Configuration:
455   --cache-file=FILE       cache test results in FILE
456   --help                  print this message
457   --no-create             do not create output files
458   --quiet, --silent       do not print \`checking...' messages
459   --version               print the version of autoconf that created configure
460 Directory and file names:
461   --prefix=PREFIX         install architecture-independent files in PREFIX
462                           [$ac_default_prefix]
463   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
464                           [same as prefix]
465   --bindir=DIR            user executables in DIR [EPREFIX/bin]
466   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
467   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
468   --datadir=DIR           read-only architecture-independent data in DIR
469                           [PREFIX/share]
470   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
471   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
472                           [PREFIX/com]
473   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
474   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
475   --includedir=DIR        C header files in DIR [PREFIX/include]
476   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
477   --infodir=DIR           info documentation in DIR [PREFIX/info]
478   --mandir=DIR            man documentation in DIR [PREFIX/man]
479   --srcdir=DIR            find the sources in DIR [configure dir or ..]
480   --program-prefix=PREFIX prepend PREFIX to installed program names
481   --program-suffix=SUFFIX append SUFFIX to installed program names
482   --program-transform-name=PROGRAM
483                           run sed PROGRAM on installed program names
484 EOF
485     cat << EOF
486 Host type:
487   --build=BUILD           configure for building on BUILD [BUILD=HOST]
488   --host=HOST             configure for HOST [guessed]
489   --target=TARGET         configure for TARGET [TARGET=HOST]
490 Features and packages:
491   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
492   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
493   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
494   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
495   --x-includes=DIR        X include files are in DIR
496   --x-libraries=DIR       X library files are in DIR
497 EOF
498     if test -n "$ac_help"; then
499       echo "--enable and --with options recognized:$ac_help"
500     fi
501     exit 0 ;;
502
503   -host | --host | --hos | --ho)
504     ac_prev=host ;;
505   -host=* | --host=* | --hos=* | --ho=*)
506     host="$ac_optarg" ;;
507
508   -includedir | --includedir | --includedi | --included | --include \
509   | --includ | --inclu | --incl | --inc)
510     ac_prev=includedir ;;
511   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
512   | --includ=* | --inclu=* | --incl=* | --inc=*)
513     includedir="$ac_optarg" ;;
514
515   -infodir | --infodir | --infodi | --infod | --info | --inf)
516     ac_prev=infodir ;;
517   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
518     infodir="$ac_optarg" ;;
519
520   -libdir | --libdir | --libdi | --libd)
521     ac_prev=libdir ;;
522   -libdir=* | --libdir=* | --libdi=* | --libd=*)
523     libdir="$ac_optarg" ;;
524
525   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
526   | --libexe | --libex | --libe)
527     ac_prev=libexecdir ;;
528   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
529   | --libexe=* | --libex=* | --libe=*)
530     libexecdir="$ac_optarg" ;;
531
532   -localstatedir | --localstatedir | --localstatedi | --localstated \
533   | --localstate | --localstat | --localsta | --localst \
534   | --locals | --local | --loca | --loc | --lo)
535     ac_prev=localstatedir ;;
536   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
537   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
538   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
539     localstatedir="$ac_optarg" ;;
540
541   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
542     ac_prev=mandir ;;
543   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
544     mandir="$ac_optarg" ;;
545
546   -nfp | --nfp | --nf)
547     # Obsolete; use --without-fp.
548     with_fp=no ;;
549
550   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
551   | --no-cr | --no-c)
552     no_create=yes ;;
553
554   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
555   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
556     no_recursion=yes ;;
557
558   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
559   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
560   | --oldin | --oldi | --old | --ol | --o)
561     ac_prev=oldincludedir ;;
562   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
563   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
564   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
565     oldincludedir="$ac_optarg" ;;
566
567   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
568     ac_prev=prefix ;;
569   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
570     prefix="$ac_optarg" ;;
571
572   -program-prefix | --program-prefix | --program-prefi | --program-pref \
573   | --program-pre | --program-pr | --program-p)
574     ac_prev=program_prefix ;;
575   -program-prefix=* | --program-prefix=* | --program-prefi=* \
576   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
577     program_prefix="$ac_optarg" ;;
578
579   -program-suffix | --program-suffix | --program-suffi | --program-suff \
580   | --program-suf | --program-su | --program-s)
581     ac_prev=program_suffix ;;
582   -program-suffix=* | --program-suffix=* | --program-suffi=* \
583   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
584     program_suffix="$ac_optarg" ;;
585
586   -program-transform-name | --program-transform-name \
587   | --program-transform-nam | --program-transform-na \
588   | --program-transform-n | --program-transform- \
589   | --program-transform | --program-transfor \
590   | --program-transfo | --program-transf \
591   | --program-trans | --program-tran \
592   | --progr-tra | --program-tr | --program-t)
593     ac_prev=program_transform_name ;;
594   -program-transform-name=* | --program-transform-name=* \
595   | --program-transform-nam=* | --program-transform-na=* \
596   | --program-transform-n=* | --program-transform-=* \
597   | --program-transform=* | --program-transfor=* \
598   | --program-transfo=* | --program-transf=* \
599   | --program-trans=* | --program-tran=* \
600   | --progr-tra=* | --program-tr=* | --program-t=*)
601     program_transform_name="$ac_optarg" ;;
602
603   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
604   | -silent | --silent | --silen | --sile | --sil)
605     silent=yes ;;
606
607   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
608     ac_prev=sbindir ;;
609   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
610   | --sbi=* | --sb=*)
611     sbindir="$ac_optarg" ;;
612
613   -sharedstatedir | --sharedstatedir | --sharedstatedi \
614   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
615   | --sharedst | --shareds | --shared | --share | --shar \
616   | --sha | --sh)
617     ac_prev=sharedstatedir ;;
618   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
619   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
620   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
621   | --sha=* | --sh=*)
622     sharedstatedir="$ac_optarg" ;;
623
624   -site | --site | --sit)
625     ac_prev=site ;;
626   -site=* | --site=* | --sit=*)
627     site="$ac_optarg" ;;
628
629   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
630     ac_prev=srcdir ;;
631   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
632     srcdir="$ac_optarg" ;;
633
634   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
635   | --syscon | --sysco | --sysc | --sys | --sy)
636     ac_prev=sysconfdir ;;
637   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
638   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
639     sysconfdir="$ac_optarg" ;;
640
641   -target | --target | --targe | --targ | --tar | --ta | --t)
642     ac_prev=target ;;
643   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
644     target="$ac_optarg" ;;
645
646   -v | -verbose | --verbose | --verbos | --verbo | --verb)
647     verbose=yes ;;
648
649   -version | --version | --versio | --versi | --vers)
650     echo "configure generated by autoconf version 2.13.1"
651     exit 0 ;;
652
653   -with-* | --with-*)
654     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
655     # Reject names that are not valid shell variable names.
656     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
657       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
658     fi
659     ac_package=`echo $ac_package| sed 's/-/_/g'`
660     case "$ac_option" in
661       *=*) ;;
662       *) ac_optarg=yes ;;
663     esac
664     eval "with_${ac_package}='$ac_optarg'" ;;
665
666   -without-* | --without-*)
667     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
668     # Reject names that are not valid shell variable names.
669     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
670       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
671     fi
672     ac_package=`echo $ac_package| sed 's/-/_/g'`
673     eval "with_${ac_package}=no" ;;
674
675   --x)
676     # Obsolete; use --with-x.
677     with_x=yes ;;
678
679   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
680   | --x-incl | --x-inc | --x-in | --x-i)
681     ac_prev=x_includes ;;
682   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
683   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
684     x_includes="$ac_optarg" ;;
685
686   -x-libraries | --x-libraries | --x-librarie | --x-librari \
687   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
688     ac_prev=x_libraries ;;
689   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
690   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
691     x_libraries="$ac_optarg" ;;
692
693   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
694     ;;
695
696   *)
697     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
698       echo "configure: warning: $ac_option: invalid host type" 1>&2
699     fi
700     if test "x$nonopt" != xNONE; then
701       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
702     fi
703     nonopt="$ac_option"
704     ;;
705
706   esac
707 done
708
709 if test -n "$ac_prev"; then
710   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
711 fi
712
713 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
714
715 # File descriptor usage:
716 # 0 standard input
717 # 1 file creation
718 # 2 errors and warnings
719 # 3 some systems may open it to /dev/tty
720 # 4 used on the Kubota Titan
721 # 6 checking for... messages and results
722 # 5 compiler messages saved in config.log
723 if test "$silent" = yes; then
724   exec 6>/dev/null
725 else
726   exec 6>&1
727 fi
728 exec 5>./config.log
729
730 echo "\
731 This file contains any messages produced by compilers while
732 running configure, to aid debugging if configure makes a mistake.
733 " 1>&5
734
735 # Strip out --no-create and --no-recursion so they do not pile up.
736 # Also quote any args containing shell metacharacters.
737 ac_configure_args=
738 for ac_arg
739 do
740   case "$ac_arg" in
741   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
742   | --no-cr | --no-c) ;;
743   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
744   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
745   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
746   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
747   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
748   esac
749 done
750
751 # NLS nuisances.
752 # Only set these to C if already set.  These must not be set unconditionally
753 # because not all systems understand e.g. LANG=C (notably SCO).
754 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
755 # Non-C LC_CTYPE values break the ctype check.
756 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
757 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
758 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
759 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
760
761 # confdefs.h avoids OS command line length limits that DEFS can exceed.
762 rm -rf conftest* confdefs.h
763 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
764 echo > confdefs.h
765
766 # A filename unique to this package, relative to the directory that
767 # configure is in, which we can look for to find out if srcdir is correct.
768 ac_unique_file=build/version.sh
769
770 # Find the source files, if location was not specified.
771 if test -z "$srcdir"; then
772   ac_srcdir_defaulted=yes
773   # Try the directory containing this script, then its parent.
774   ac_prog=$0
775   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
776   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
777   srcdir=$ac_confdir
778   if test ! -r $srcdir/$ac_unique_file; then
779     srcdir=..
780   fi
781 else
782   ac_srcdir_defaulted=no
783 fi
784 if test ! -r $srcdir/$ac_unique_file; then
785   if test "$ac_srcdir_defaulted" = yes; then
786     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
787   else
788     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
789   fi
790 fi
791 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
792
793 # Prefer explicitly selected file to automatically selected ones.
794 if test -z "$CONFIG_SITE"; then
795   if test "x$prefix" != xNONE; then
796     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
797   else
798     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
799   fi
800 fi
801 for ac_site_file in $CONFIG_SITE; do
802   if test -r "$ac_site_file"; then
803     echo "loading site script $ac_site_file"
804     . "$ac_site_file"
805   fi
806 done
807
808
809 ac_ext=c
810 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
811 ac_cpp='$CPP $CPPFLAGS'
812 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
813 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
814 cross_compiling=$ac_cv_prog_cc_cross
815
816 ac_exeext=
817 ac_objext=o
818 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
819   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
820   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
821     ac_n= ac_c='
822 ' ac_t='        '
823   else
824     ac_n=-n ac_c= ac_t=
825   fi
826 else
827   ac_n= ac_c='\c' ac_t=
828 fi
829
830
831 # set unset (borrowed from autoconf 2.49c)
832 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
833   ol_unset=unset
834 else
835   ol_unset=false
836 fi
837 # unset CDPATH
838 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
839
840 ac_aux_dir=
841 for ac_dir in build $srcdir/build; do
842   if 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/install.sh; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/install.sh -c"
849     break
850   elif test -f $ac_dir/shtool; then
851     ac_aux_dir=$ac_dir
852     ac_install_sh="$ac_aux_dir/shtool install -c"
853     break
854   fi
855 done
856 if test -z "$ac_aux_dir"; then
857   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
858 fi
859 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
860 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
861 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
862
863 eval `$ac_aux_dir/version.sh`
864 if test -z "$OL_STRING"; then
865         { echo "configure: error: could not determine version" 1>&2; exit 1; }
866 fi
867
868 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
869         ac_cv_shtool="$ac_aux_dir/shtool"
870 else
871         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
872 fi
873
874 SHTOOL="$ac_cv_shtool"
875
876 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
877 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
878
879 OPENLDAP_CVS=""
880 if test -d $ac_aux_dir/CVS; then
881         OPENLDAP_CVS="(from CVS sources) "
882 fi
883
884 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
885
886
887 echo $ac_n "checking host system type""... $ac_c" 1>&6
888 echo "configure:889: checking host system type" >&5
889 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
890
891 # Make sure we can run config.sub.
892   if $ac_config_sub sun4 >/dev/null 2>&1; then :
893     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
894   fi
895
896   ac_cv_host_alias=$host
897   case "$ac_cv_host_alias" in
898   NONE)
899     case $nonopt in
900     NONE)
901       if ac_cv_host_alias=`$ac_config_guess`; then :
902       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
903       fi ;;
904     *) ac_cv_host_alias=$nonopt ;;
905     esac ;;
906   esac
907
908   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
909   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
910   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
911   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
912 else
913   echo $ac_n "(cached) $ac_c" 1>&6
914 fi
915
916 echo "$ac_t""$ac_cv_host" 1>&6
917
918 host=$ac_cv_host
919 host_alias=$ac_cv_host_alias
920 host_cpu=$ac_cv_host_cpu
921 host_vendor=$ac_cv_host_vendor
922 host_os=$ac_cv_host_os
923
924
925
926
927
928 echo $ac_n "checking target system type""... $ac_c" 1>&6
929 echo "configure:930: checking target system type" >&5
930 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
931
932 # Make sure we can run config.sub.
933   if $ac_config_sub sun4 >/dev/null 2>&1; then :
934     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
935   fi
936
937   ac_cv_target_alias=$target
938   case "$ac_cv_target_alias" in
939   NONE)
940     case $nonopt in
941     NONE)
942       ac_cv_target_alias=$host_alias ;;
943
944     *) ac_cv_target_alias=$nonopt ;;
945     esac ;;
946   esac
947
948   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
949   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
950   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
951   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
952 else
953   echo $ac_n "(cached) $ac_c" 1>&6
954 fi
955
956 echo "$ac_t""$ac_cv_target" 1>&6
957
958 target=$ac_cv_target
959 target_alias=$ac_cv_target_alias
960 target_cpu=$ac_cv_target_cpu
961 target_vendor=$ac_cv_target_vendor
962 target_os=$ac_cv_target_os
963
964
965
966
967
968 echo $ac_n "checking build system type""... $ac_c" 1>&6
969 echo "configure:970: checking build system type" >&5
970 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
971
972 # Make sure we can run config.sub.
973   if $ac_config_sub sun4 >/dev/null 2>&1; then :
974     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
975   fi
976
977   ac_cv_build_alias=$build
978   case "$ac_cv_build_alias" in
979   NONE)
980     case $nonopt in
981     NONE)
982       ac_cv_build_alias=$host_alias ;;
983
984     *) ac_cv_build_alias=$nonopt ;;
985     esac ;;
986   esac
987
988   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
989   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
990   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
991   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
992 else
993   echo $ac_n "(cached) $ac_c" 1>&6
994 fi
995
996 echo "$ac_t""$ac_cv_build" 1>&6
997
998 build=$ac_cv_build
999 build_alias=$ac_cv_build_alias
1000 build_cpu=$ac_cv_build_cpu
1001 build_vendor=$ac_cv_build_vendor
1002 build_os=$ac_cv_build_os
1003
1004
1005
1006
1007
1008 # Do some error checking and defaulting for the host and target type.
1009 # The inputs are:
1010 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1011 #
1012 # The rules are:
1013 # 1. You are not allowed to specify --host, --target, and nonopt at the
1014 #    same time.
1015 # 2. Host defaults to nonopt.
1016 # 3. If nonopt is not specified, then host defaults to the current host,
1017 #    as determined by config.guess.
1018 # 4. Target and build default to nonopt.
1019 # 5. If nonopt is not specified, then target and build default to host.
1020
1021 # The aliases save the names the user supplied, while $host etc.
1022 # will get canonicalized.
1023 case $host---$target---$nonopt in
1024 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1025 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1026 esac
1027
1028 test "$host_alias" != "$target_alias" &&
1029   test "$program_prefix$program_suffix$program_transform_name" = \
1030     NONENONEs,x,x, &&
1031   program_prefix=${target_alias}-
1032
1033
1034 # Find a good install program.  We prefer a C program (faster),
1035 # so one script is as good as another.  But avoid the broken or
1036 # incompatible versions:
1037 # SysV /etc/install, /usr/sbin/install
1038 # SunOS /usr/etc/install
1039 # IRIX /sbin/install
1040 # AIX /bin/install
1041 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1042 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1043 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1044 # ./install, which can be erroneously created by make from ./install.sh.
1045 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1046 echo "configure:1047: checking for a BSD compatible install" >&5
1047 if test -z "$INSTALL"; then
1048 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1052   for ac_dir in $PATH; do
1053     # Account for people who put trailing slashes in PATH elements.
1054     case "$ac_dir/" in
1055     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1056     *)
1057       # OSF1 and SCO ODT 3.0 have their own names for install.
1058       # Don't use installbsd from OSF since it installs stuff as root
1059       # by default.
1060       for ac_prog in ginstall scoinst install; do
1061         if test -f $ac_dir/$ac_prog; then
1062           if test $ac_prog = install &&
1063             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # AIX install.  It has an incompatible calling convention.
1065             :
1066           elif test $ac_prog = install &&
1067             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1068             # program-specific install script used by HP pwplus--don't use.
1069             :
1070           else
1071             ac_cv_path_install="$ac_dir/$ac_prog -c"
1072             break 2
1073           fi
1074         fi
1075       done
1076       ;;
1077     esac
1078   done
1079   IFS="$ac_save_IFS"
1080
1081 fi
1082   if test "${ac_cv_path_install+set}" = set; then
1083     INSTALL="$ac_cv_path_install"
1084   else
1085     # As a last resort, use the slow shell script.  We don't cache a
1086     # path for INSTALL within a source directory, because that will
1087     # break other packages using the cache if that directory is
1088     # removed, or if the path is relative.
1089     INSTALL="$ac_install_sh"
1090   fi
1091 fi
1092 echo "$ac_t""$INSTALL" 1>&6
1093
1094 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1095 # It thinks the first close brace ends the variable substitution.
1096 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1097
1098 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1099
1100 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1101
1102 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1103 echo "configure:1104: checking whether build environment is sane" >&5
1104 # Just in case
1105 sleep 1
1106 echo timestamp > conftestfile
1107 # Do `set' in a subshell so we don't clobber the current shell's
1108 # arguments.  Must try -L first in case configure is actually a
1109 # symlink; some systems play weird games with the mod time of symlinks
1110 # (eg FreeBSD returns the mod time of the symlink's containing
1111 # directory).
1112 if (
1113    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1114    if test "$*" = "X"; then
1115       # -L didn't work.
1116       set X `ls -t $srcdir/configure conftestfile`
1117    fi
1118    if test "$*" != "X $srcdir/configure conftestfile" \
1119       && test "$*" != "X conftestfile $srcdir/configure"; then
1120
1121       # If neither matched, then we have a broken ls.  This can happen
1122       # if, for instance, CONFIG_SHELL is bash and it inherits a
1123       # broken ls alias from the environment.  This has actually
1124       # happened.  Such a system could not be considered "sane".
1125       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1126 alias in your environment" 1>&2; exit 1; }
1127    fi
1128
1129    test "$2" = conftestfile
1130    )
1131 then
1132    # Ok.
1133    :
1134 else
1135    { echo "configure: error: newly created file is older than distributed files!
1136 Check your system clock" 1>&2; exit 1; }
1137 fi
1138 rm -f conftest*
1139 echo "$ac_t""yes" 1>&6
1140 if test "$program_transform_name" = s,x,x,; then
1141   program_transform_name=
1142 else
1143   # Double any \ or $.  echo might interpret backslashes.
1144   cat <<\EOF_SED > conftestsed
1145 s,\\,\\\\,g; s,\$,$$,g
1146 EOF_SED
1147   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1148   rm -f conftestsed
1149 fi
1150 test "$program_prefix" != NONE &&
1151   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1152 # Use a double $ so make ignores it.
1153 test "$program_suffix" != NONE &&
1154   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1155
1156 # sed with no file args requires a program.
1157 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1158
1159 for ac_prog in mawk gawk nawk awk
1160 do
1161 # Extract the first word of "$ac_prog", so it can be a program name with args.
1162 set dummy $ac_prog; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1166   echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168   if test -n "$AWK"; then
1169   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1170 else
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1172   ac_dummy="$PATH"
1173   for ac_dir in $ac_dummy; do
1174     test -z "$ac_dir" && ac_dir=.
1175     if test -f $ac_dir/$ac_word; then
1176       ac_cv_prog_AWK="$ac_prog"
1177       break
1178     fi
1179   done
1180   IFS="$ac_save_ifs"
1181 fi
1182 fi
1183 AWK="$ac_cv_prog_AWK"
1184 if test -n "$AWK"; then
1185   echo "$ac_t""$AWK" 1>&6
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190 test -n "$AWK" && break
1191 done
1192
1193 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1194 echo "configure:1195: checking whether ${MAKE-make} sets \${MAKE}" >&5
1195 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1196 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1197   echo $ac_n "(cached) $ac_c" 1>&6
1198 else
1199   cat > conftestmake <<\EOF
1200 all:
1201         @echo 'ac_maketemp="${MAKE}"'
1202 EOF
1203 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1204 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1205 if test -n "$ac_maketemp"; then
1206   eval ac_cv_prog_make_${ac_make}_set=yes
1207 else
1208   eval ac_cv_prog_make_${ac_make}_set=no
1209 fi
1210 rm -f conftestmake
1211 fi
1212 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1213   echo "$ac_t""yes" 1>&6
1214   SET_MAKE=
1215 else
1216   echo "$ac_t""no" 1>&6
1217   SET_MAKE="MAKE=${MAKE-make}"
1218 fi
1219
1220
1221
1222 PACKAGE=$OL_PACKAGE
1223
1224 VERSION=$OL_VERSION
1225
1226 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1227   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1228 fi
1229
1230
1231
1232 missing_dir=`cd $ac_aux_dir && pwd`
1233 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1234 echo "configure:1235: checking for working aclocal" >&5
1235 # Run test in a subshell; some versions of sh will print an error if
1236 # an executable is not found, even if stderr is redirected.
1237 # Redirect stdin to placate older versions of autoconf.  Sigh.
1238 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1239    ACLOCAL=aclocal
1240    echo "$ac_t""found" 1>&6
1241 else
1242    ACLOCAL="$missing_dir/missing aclocal"
1243    echo "$ac_t""missing" 1>&6
1244 fi
1245
1246 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1247 echo "configure:1248: checking for working autoconf" >&5
1248 # Run test in a subshell; some versions of sh will print an error if
1249 # an executable is not found, even if stderr is redirected.
1250 # Redirect stdin to placate older versions of autoconf.  Sigh.
1251 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1252    AUTOCONF=autoconf
1253    echo "$ac_t""found" 1>&6
1254 else
1255    AUTOCONF="$missing_dir/missing autoconf"
1256    echo "$ac_t""missing" 1>&6
1257 fi
1258
1259 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1260 echo "configure:1261: checking for working automake" >&5
1261 # Run test in a subshell; some versions of sh will print an error if
1262 # an executable is not found, even if stderr is redirected.
1263 # Redirect stdin to placate older versions of autoconf.  Sigh.
1264 if (automake --version) < /dev/null > /dev/null 2>&1; then
1265    AUTOMAKE=automake
1266    echo "$ac_t""found" 1>&6
1267 else
1268    AUTOMAKE="$missing_dir/missing automake"
1269    echo "$ac_t""missing" 1>&6
1270 fi
1271
1272 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1273 echo "configure:1274: checking for working autoheader" >&5
1274 # Run test in a subshell; some versions of sh will print an error if
1275 # an executable is not found, even if stderr is redirected.
1276 # Redirect stdin to placate older versions of autoconf.  Sigh.
1277 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1278    AUTOHEADER=autoheader
1279    echo "$ac_t""found" 1>&6
1280 else
1281    AUTOHEADER="$missing_dir/missing autoheader"
1282    echo "$ac_t""missing" 1>&6
1283 fi
1284
1285 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1286 echo "configure:1287: checking for working makeinfo" >&5
1287 # Run test in a subshell; some versions of sh will print an error if
1288 # an executable is not found, even if stderr is redirected.
1289 # Redirect stdin to placate older versions of autoconf.  Sigh.
1290 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1291    MAKEINFO=makeinfo
1292    echo "$ac_t""found" 1>&6
1293 else
1294    MAKEINFO="$missing_dir/missing makeinfo"
1295    echo "$ac_t""missing" 1>&6
1296 fi
1297
1298 install_sh="$missing_dir/install-sh"
1299 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1300
1301 for ac_prog in gnutar gtar tar
1302 do
1303 # Extract the first word of "$ac_prog", so it can be a program name with args.
1304 set dummy $ac_prog; ac_word=$2
1305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1306 echo "configure:1307: checking for $ac_word" >&5
1307 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1308   echo $ac_n "(cached) $ac_c" 1>&6
1309 else
1310   if test -n "$AMTAR"; then
1311   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1312 else
1313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1314   ac_dummy="$PATH"
1315   for ac_dir in $ac_dummy; do
1316     test -z "$ac_dir" && ac_dir=.
1317     if test -f $ac_dir/$ac_word; then
1318       ac_cv_prog_AMTAR="$ac_prog"
1319       break
1320     fi
1321   done
1322   IFS="$ac_save_ifs"
1323 fi
1324 fi
1325 AMTAR="$ac_cv_prog_AMTAR"
1326 if test -n "$AMTAR"; then
1327   echo "$ac_t""$AMTAR" 1>&6
1328 else
1329   echo "$ac_t""no" 1>&6
1330 fi
1331
1332 test -n "$AMTAR" && break
1333 done
1334
1335
1336 AMTARFLAGS=
1337 if test -n "$AMTAR"; then
1338   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1339         AMTARFLAGS=o
1340   fi
1341 fi
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_PACKAGE "$PACKAGE"
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define OPENLDAP_VERSION "$VERSION"
1349 EOF
1350
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION $OL_API_INC
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1362 EOF
1363
1364 cat >> confdefs.h <<EOF
1365 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1366 EOF
1367
1368
1369 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1370
1371 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1372
1373 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1374
1375
1376
1377 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1378 echo "configure:1379: checking configure arguments" >&5
1379
1380
1381 top_builddir=`pwd`
1382
1383 ldap_subdir="/openldap"
1384
1385 # Check whether --with-subdir or --without-subdir was given.
1386 if test "${with_subdir+set}" = set; then
1387   withval="$with_subdir"
1388   case "$withval" in
1389         no) ldap_subdir=""
1390                 ;;
1391         yes)
1392                 ;;
1393         /*|\\*)
1394                 ldap_subdir="$withval"
1395                 ;;
1396         *)
1397                 ldap_subdir="/$withval"
1398                 ;;
1399 esac
1400
1401 fi
1402
1403
1404 # OpenLDAP --enable-debug
1405         # Check whether --enable-debug or --disable-debug was given.
1406 if test "${enable_debug+set}" = set; then
1407   enableval="$enable_debug"
1408   
1409         ol_arg=invalid
1410         for ol_val in auto yes no ; do
1411                 if test "$enableval" = "$ol_val" ; then
1412                         ol_arg="$ol_val"
1413                 fi
1414         done
1415         if test "$ol_arg" = "invalid" ; then
1416                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1417         fi
1418         ol_enable_debug="$ol_arg"
1419
1420 else
1421         ol_enable_debug="yes"
1422 fi
1423 # end --enable-debug
1424 # OpenLDAP --enable-dynamic
1425         # Check whether --enable-dynamic or --disable-dynamic was given.
1426 if test "${enable_dynamic+set}" = set; then
1427   enableval="$enable_dynamic"
1428   
1429         ol_arg=invalid
1430         for ol_val in auto yes no ; do
1431                 if test "$enableval" = "$ol_val" ; then
1432                         ol_arg="$ol_val"
1433                 fi
1434         done
1435         if test "$ol_arg" = "invalid" ; then
1436                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1437         fi
1438         ol_enable_dynamic="$ol_arg"
1439
1440 else
1441         ol_enable_dynamic="no"
1442 fi
1443 # end --enable-dynamic
1444 # OpenLDAP --enable-syslog
1445         # Check whether --enable-syslog or --disable-syslog was given.
1446 if test "${enable_syslog+set}" = set; then
1447   enableval="$enable_syslog"
1448   
1449         ol_arg=invalid
1450         for ol_val in auto yes no ; do
1451                 if test "$enableval" = "$ol_val" ; then
1452                         ol_arg="$ol_val"
1453                 fi
1454         done
1455         if test "$ol_arg" = "invalid" ; then
1456                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1457         fi
1458         ol_enable_syslog="$ol_arg"
1459
1460 else
1461         ol_enable_syslog="auto"
1462 fi
1463 # end --enable-syslog
1464 # OpenLDAP --enable-proctitle
1465         # Check whether --enable-proctitle or --disable-proctitle was given.
1466 if test "${enable_proctitle+set}" = set; then
1467   enableval="$enable_proctitle"
1468   
1469         ol_arg=invalid
1470         for ol_val in auto yes no ; do
1471                 if test "$enableval" = "$ol_val" ; then
1472                         ol_arg="$ol_val"
1473                 fi
1474         done
1475         if test "$ol_arg" = "invalid" ; then
1476                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1477         fi
1478         ol_enable_proctitle="$ol_arg"
1479
1480 else
1481         ol_enable_proctitle="yes"
1482 fi
1483 # end --enable-proctitle
1484 ol_enable_referrals=${ol_enable_referrals-no}
1485 ol_enable_kbind=${ol_enable_kbind-no}
1486 # OpenLDAP --enable-ipv6
1487         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1488 if test "${enable_ipv6+set}" = set; then
1489   enableval="$enable_ipv6"
1490   
1491         ol_arg=invalid
1492         for ol_val in auto yes no ; do
1493                 if test "$enableval" = "$ol_val" ; then
1494                         ol_arg="$ol_val"
1495                 fi
1496         done
1497         if test "$ol_arg" = "invalid" ; then
1498                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1499         fi
1500         ol_enable_ipv6="$ol_arg"
1501
1502 else
1503         ol_enable_ipv6="auto"
1504 fi
1505 # end --enable-ipv6
1506 # OpenLDAP --enable-local
1507         # Check whether --enable-local or --disable-local was given.
1508 if test "${enable_local+set}" = set; then
1509   enableval="$enable_local"
1510   
1511         ol_arg=invalid
1512         for ol_val in auto yes no ; do
1513                 if test "$enableval" = "$ol_val" ; then
1514                         ol_arg="$ol_val"
1515                 fi
1516         done
1517         if test "$ol_arg" = "invalid" ; then
1518                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1519         fi
1520         ol_enable_local="$ol_arg"
1521
1522 else
1523         ol_enable_local="auto"
1524 fi
1525 # end --enable-local
1526
1527
1528 # OpenLDAP --with-cyrus_sasl
1529         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1530 if test "${with_cyrus_sasl+set}" = set; then
1531   withval="$with_cyrus_sasl"
1532   
1533         ol_arg=invalid
1534         for ol_val in auto yes no  ; do
1535                 if test "$withval" = "$ol_val" ; then
1536                         ol_arg="$ol_val"
1537                 fi
1538         done
1539         if test "$ol_arg" = "invalid" ; then
1540                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1541         fi
1542         ol_with_cyrus_sasl="$ol_arg"
1543
1544 else
1545         ol_with_cyrus_sasl="auto"
1546 fi
1547 # end --with-cyrus_sasl
1548
1549 # OpenLDAP --with-fetch
1550         # Check whether --with-fetch or --without-fetch was given.
1551 if test "${with_fetch+set}" = set; then
1552   withval="$with_fetch"
1553   
1554         ol_arg=invalid
1555         for ol_val in auto yes no  ; do
1556                 if test "$withval" = "$ol_val" ; then
1557                         ol_arg="$ol_val"
1558                 fi
1559         done
1560         if test "$ol_arg" = "invalid" ; then
1561                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1562         fi
1563         ol_with_fetch="$ol_arg"
1564
1565 else
1566         ol_with_fetch="auto"
1567 fi
1568 # end --with-fetch
1569
1570 ol_with_kerberos=${ol_with_kerberos-auto}
1571 # OpenLDAP --with-threads
1572         # Check whether --with-threads or --without-threads was given.
1573 if test "${with_threads+set}" = set; then
1574   withval="$with_threads"
1575   
1576         ol_arg=invalid
1577         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1578                 if test "$withval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1584         fi
1585         ol_with_threads="$ol_arg"
1586
1587 else
1588         ol_with_threads="auto"
1589 fi
1590 # end --with-threads
1591
1592 # OpenLDAP --with-tls
1593         # Check whether --with-tls or --without-tls was given.
1594 if test "${with_tls+set}" = set; then
1595   withval="$with_tls"
1596   
1597         ol_arg=invalid
1598         for ol_val in auto ssleay openssl yes no  ; do
1599                 if test "$withval" = "$ol_val" ; then
1600                         ol_arg="$ol_val"
1601                 fi
1602         done
1603         if test "$ol_arg" = "invalid" ; then
1604                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1605         fi
1606         ol_with_tls="$ol_arg"
1607
1608 else
1609         ol_with_tls="auto"
1610 fi
1611 # end --with-tls
1612
1613 # OpenLDAP --with-yielding_select
1614         # Check whether --with-yielding_select or --without-yielding_select was given.
1615 if test "${with_yielding_select+set}" = set; then
1616   withval="$with_yielding_select"
1617   
1618         ol_arg=invalid
1619         for ol_val in auto yes no manual  ; do
1620                 if test "$withval" = "$ol_val" ; then
1621                         ol_arg="$ol_val"
1622                 fi
1623         done
1624         if test "$ol_arg" = "invalid" ; then
1625                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1626         fi
1627         ol_with_yielding_select="$ol_arg"
1628
1629 else
1630         ol_with_yielding_select="auto"
1631 fi
1632 # end --with-yielding_select
1633
1634 # OpenLDAP --with-multiple_precision
1635         # Check whether --with-multiple_precision or --without-multiple_precision was given.
1636 if test "${with_multiple_precision+set}" = set; then
1637   withval="$with_multiple_precision"
1638   
1639         ol_arg=invalid
1640         for ol_val in auto bignum gmp yes no  ; do
1641                 if test "$withval" = "$ol_val" ; then
1642                         ol_arg="$ol_val"
1643                 fi
1644         done
1645         if test "$ol_arg" = "invalid" ; then
1646                 { echo "configure: error: bad value $withval for --with-multiple_precision" 1>&2; exit 1; }
1647         fi
1648         ol_with_multiple_precision="$ol_arg"
1649
1650 else
1651         ol_with_multiple_precision="auto"
1652 fi
1653 # end --with-multiple_precision
1654
1655
1656
1657 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1658 if test "${with_xxslapdoptions+set}" = set; then
1659   withval="$with_xxslapdoptions"
1660   :
1661 fi
1662
1663 # OpenLDAP --enable-slapd
1664         # Check whether --enable-slapd or --disable-slapd was given.
1665 if test "${enable_slapd+set}" = set; then
1666   enableval="$enable_slapd"
1667   
1668         ol_arg=invalid
1669         for ol_val in auto yes no ; do
1670                 if test "$enableval" = "$ol_val" ; then
1671                         ol_arg="$ol_val"
1672                 fi
1673         done
1674         if test "$ol_arg" = "invalid" ; then
1675                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1676         fi
1677         ol_enable_slapd="$ol_arg"
1678
1679 else
1680         ol_enable_slapd="yes"
1681 fi
1682 # end --enable-slapd
1683 # OpenLDAP --enable-aci
1684         # Check whether --enable-aci or --disable-aci was given.
1685 if test "${enable_aci+set}" = set; then
1686   enableval="$enable_aci"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no ; do
1690                 if test "$enableval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1696         fi
1697         ol_enable_aci="$ol_arg"
1698
1699 else
1700         ol_enable_aci="no"
1701 fi
1702 # end --enable-aci
1703 # OpenLDAP --enable-cleartext
1704         # Check whether --enable-cleartext or --disable-cleartext was given.
1705 if test "${enable_cleartext+set}" = set; then
1706   enableval="$enable_cleartext"
1707   
1708         ol_arg=invalid
1709         for ol_val in auto yes no ; do
1710                 if test "$enableval" = "$ol_val" ; then
1711                         ol_arg="$ol_val"
1712                 fi
1713         done
1714         if test "$ol_arg" = "invalid" ; then
1715                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1716         fi
1717         ol_enable_cleartext="$ol_arg"
1718
1719 else
1720         ol_enable_cleartext="yes"
1721 fi
1722 # end --enable-cleartext
1723 # OpenLDAP --enable-crypt
1724         # Check whether --enable-crypt or --disable-crypt was given.
1725 if test "${enable_crypt+set}" = set; then
1726   enableval="$enable_crypt"
1727   
1728         ol_arg=invalid
1729         for ol_val in auto yes no ; do
1730                 if test "$enableval" = "$ol_val" ; then
1731                         ol_arg="$ol_val"
1732                 fi
1733         done
1734         if test "$ol_arg" = "invalid" ; then
1735                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1736         fi
1737         ol_enable_crypt="$ol_arg"
1738
1739 else
1740         ol_enable_crypt="no"
1741 fi
1742 # end --enable-crypt
1743 # OpenLDAP --enable-lmpasswd
1744         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1745 if test "${enable_lmpasswd+set}" = set; then
1746   enableval="$enable_lmpasswd"
1747   
1748         ol_arg=invalid
1749         for ol_val in auto yes no ; do
1750                 if test "$enableval" = "$ol_val" ; then
1751                         ol_arg="$ol_val"
1752                 fi
1753         done
1754         if test "$ol_arg" = "invalid" ; then
1755                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1756         fi
1757         ol_enable_lmpasswd="$ol_arg"
1758
1759 else
1760         ol_enable_lmpasswd="no"
1761 fi
1762 # end --enable-lmpasswd
1763 # OpenLDAP --enable-spasswd
1764         # Check whether --enable-spasswd or --disable-spasswd was given.
1765 if test "${enable_spasswd+set}" = set; then
1766   enableval="$enable_spasswd"
1767   
1768         ol_arg=invalid
1769         for ol_val in auto yes no ; do
1770                 if test "$enableval" = "$ol_val" ; then
1771                         ol_arg="$ol_val"
1772                 fi
1773         done
1774         if test "$ol_arg" = "invalid" ; then
1775                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1776         fi
1777         ol_enable_spasswd="$ol_arg"
1778
1779 else
1780         ol_enable_spasswd="no"
1781 fi
1782 # end --enable-spasswd
1783 # OpenLDAP --enable-modules
1784         # Check whether --enable-modules or --disable-modules was given.
1785 if test "${enable_modules+set}" = set; then
1786   enableval="$enable_modules"
1787   
1788         ol_arg=invalid
1789         for ol_val in auto yes no ; do
1790                 if test "$enableval" = "$ol_val" ; then
1791                         ol_arg="$ol_val"
1792                 fi
1793         done
1794         if test "$ol_arg" = "invalid" ; then
1795                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1796         fi
1797         ol_enable_modules="$ol_arg"
1798
1799 else
1800         ol_enable_modules="no"
1801 fi
1802 # end --enable-modules
1803 ol_enable_multimaster=${ol_enable_multimaster-no}
1804 # OpenLDAP --enable-rewrite
1805         # Check whether --enable-rewrite or --disable-rewrite was given.
1806 if test "${enable_rewrite+set}" = set; then
1807   enableval="$enable_rewrite"
1808   
1809         ol_arg=invalid
1810         for ol_val in auto yes no ; do
1811                 if test "$enableval" = "$ol_val" ; then
1812                         ol_arg="$ol_val"
1813                 fi
1814         done
1815         if test "$ol_arg" = "invalid" ; then
1816                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1817         fi
1818         ol_enable_rewrite="$ol_arg"
1819
1820 else
1821         ol_enable_rewrite="auto"
1822 fi
1823 # end --enable-rewrite
1824 # OpenLDAP --enable-rlookups
1825         # Check whether --enable-rlookups or --disable-rlookups was given.
1826 if test "${enable_rlookups+set}" = set; then
1827   enableval="$enable_rlookups"
1828   
1829         ol_arg=invalid
1830         for ol_val in auto yes no ; do
1831                 if test "$enableval" = "$ol_val" ; then
1832                         ol_arg="$ol_val"
1833                 fi
1834         done
1835         if test "$ol_arg" = "invalid" ; then
1836                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1837         fi
1838         ol_enable_rlookups="$ol_arg"
1839
1840 else
1841         ol_enable_rlookups="no"
1842 fi
1843 # end --enable-rlookups
1844 # OpenLDAP --enable-slapi
1845         # Check whether --enable-slapi or --disable-slapi was given.
1846 if test "${enable_slapi+set}" = set; then
1847   enableval="$enable_slapi"
1848   
1849         ol_arg=invalid
1850         for ol_val in auto yes no ; do
1851                 if test "$enableval" = "$ol_val" ; then
1852                         ol_arg="$ol_val"
1853                 fi
1854         done
1855         if test "$ol_arg" = "invalid" ; then
1856                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1857         fi
1858         ol_enable_slapi="$ol_arg"
1859
1860 else
1861         ol_enable_slapi="no"
1862 fi
1863 # end --enable-slapi
1864 # OpenLDAP --enable-slp
1865         # Check whether --enable-slp or --disable-slp was given.
1866 if test "${enable_slp+set}" = set; then
1867   enableval="$enable_slp"
1868   
1869         ol_arg=invalid
1870         for ol_val in auto yes no ; do
1871                 if test "$enableval" = "$ol_val" ; then
1872                         ol_arg="$ol_val"
1873                 fi
1874         done
1875         if test "$ol_arg" = "invalid" ; then
1876                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1877         fi
1878         ol_enable_slp="$ol_arg"
1879
1880 else
1881         ol_enable_slp="no"
1882 fi
1883 # end --enable-slp
1884 # OpenLDAP --enable-wrappers
1885         # Check whether --enable-wrappers or --disable-wrappers was given.
1886 if test "${enable_wrappers+set}" = set; then
1887   enableval="$enable_wrappers"
1888   
1889         ol_arg=invalid
1890         for ol_val in auto yes no ; do
1891                 if test "$enableval" = "$ol_val" ; then
1892                         ol_arg="$ol_val"
1893                 fi
1894         done
1895         if test "$ol_arg" = "invalid" ; then
1896                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1897         fi
1898         ol_enable_wrappers="$ol_arg"
1899
1900 else
1901         ol_enable_wrappers="no"
1902 fi
1903 # end --enable-wrappers
1904
1905 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1906         passwd perl relay shell sql"
1907
1908 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1909 if test "${with_xxslapbackends+set}" = set; then
1910   withval="$with_xxslapbackends"
1911   :
1912 fi
1913
1914
1915 # OpenLDAP --enable-backends
1916         # Check whether --enable-backends or --disable-backends was given.
1917 if test "${enable_backends+set}" = set; then
1918   enableval="$enable_backends"
1919   
1920         ol_arg=invalid
1921         for ol_val in no yes mod ; do
1922                 if test "$enableval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1928         fi
1929         ol_enable_backends="$ol_arg"
1930
1931 else
1932         ol_enable_backends="no"
1933 fi
1934 # end --enable-backends
1935 # OpenLDAP --enable-bdb
1936         # Check whether --enable-bdb or --disable-bdb was given.
1937 if test "${enable_bdb+set}" = set; then
1938   enableval="$enable_bdb"
1939   
1940         ol_arg=invalid
1941         for ol_val in no yes mod ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1948         fi
1949         ol_enable_bdb="$ol_arg"
1950
1951 else
1952         ol_enable_bdb="yes"
1953 fi
1954 # end --enable-bdb
1955 # OpenLDAP --enable-dnssrv
1956         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1957 if test "${enable_dnssrv+set}" = set; then
1958   enableval="$enable_dnssrv"
1959   
1960         ol_arg=invalid
1961         for ol_val in no yes mod ; do
1962                 if test "$enableval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1968         fi
1969         ol_enable_dnssrv="$ol_arg"
1970
1971 else
1972         ol_enable_dnssrv="no"
1973 fi
1974 # end --enable-dnssrv
1975 # OpenLDAP --enable-hdb
1976         # Check whether --enable-hdb or --disable-hdb was given.
1977 if test "${enable_hdb+set}" = set; then
1978   enableval="$enable_hdb"
1979   
1980         ol_arg=invalid
1981         for ol_val in no yes mod ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1988         fi
1989         ol_enable_hdb="$ol_arg"
1990
1991 else
1992         ol_enable_hdb="no"
1993 fi
1994 # end --enable-hdb
1995 # OpenLDAP --enable-ldap
1996         # Check whether --enable-ldap or --disable-ldap was given.
1997 if test "${enable_ldap+set}" = set; then
1998   enableval="$enable_ldap"
1999   
2000         ol_arg=invalid
2001         for ol_val in no yes mod ; do
2002                 if test "$enableval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2008         fi
2009         ol_enable_ldap="$ol_arg"
2010
2011 else
2012         ol_enable_ldap="no"
2013 fi
2014 # end --enable-ldap
2015 # OpenLDAP --enable-ldbm
2016         # Check whether --enable-ldbm or --disable-ldbm was given.
2017 if test "${enable_ldbm+set}" = set; then
2018   enableval="$enable_ldbm"
2019   
2020         ol_arg=invalid
2021         for ol_val in no yes mod ; do
2022                 if test "$enableval" = "$ol_val" ; then
2023                         ol_arg="$ol_val"
2024                 fi
2025         done
2026         if test "$ol_arg" = "invalid" ; then
2027                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2028         fi
2029         ol_enable_ldbm="$ol_arg"
2030
2031 else
2032         ol_enable_ldbm="no"
2033 fi
2034 # end --enable-ldbm
2035 # OpenLDAP --with-ldbm_api
2036         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2037 if test "${with_ldbm_api+set}" = set; then
2038   withval="$with_ldbm_api"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2042                 if test "$withval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2048         fi
2049         ol_with_ldbm_api="$ol_arg"
2050
2051 else
2052         ol_with_ldbm_api="auto"
2053 fi
2054 # end --with-ldbm_api
2055
2056 # OpenLDAP --with-ldbm_type
2057         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2058 if test "${with_ldbm_type+set}" = set; then
2059   withval="$with_ldbm_type"
2060   
2061         ol_arg=invalid
2062         for ol_val in auto btree hash ; do
2063                 if test "$withval" = "$ol_val" ; then
2064                         ol_arg="$ol_val"
2065                 fi
2066         done
2067         if test "$ol_arg" = "invalid" ; then
2068                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2069         fi
2070         ol_with_ldbm_type="$ol_arg"
2071
2072 else
2073         ol_with_ldbm_type="auto"
2074 fi
2075 # end --with-ldbm_type
2076
2077 # OpenLDAP --enable-meta
2078         # Check whether --enable-meta or --disable-meta was given.
2079 if test "${enable_meta+set}" = set; then
2080   enableval="$enable_meta"
2081   
2082         ol_arg=invalid
2083         for ol_val in no yes mod ; do
2084                 if test "$enableval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2090         fi
2091         ol_enable_meta="$ol_arg"
2092
2093 else
2094         ol_enable_meta="no"
2095 fi
2096 # end --enable-meta
2097 # OpenLDAP --enable-monitor
2098         # Check whether --enable-monitor or --disable-monitor was given.
2099 if test "${enable_monitor+set}" = set; then
2100   enableval="$enable_monitor"
2101   
2102         ol_arg=invalid
2103         for ol_val in no yes mod ; do
2104                 if test "$enableval" = "$ol_val" ; then
2105                         ol_arg="$ol_val"
2106                 fi
2107         done
2108         if test "$ol_arg" = "invalid" ; then
2109                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2110         fi
2111         ol_enable_monitor="$ol_arg"
2112
2113 else
2114         ol_enable_monitor="yes"
2115 fi
2116 # end --enable-monitor
2117 # OpenLDAP --enable-null
2118         # Check whether --enable-null or --disable-null was given.
2119 if test "${enable_null+set}" = set; then
2120   enableval="$enable_null"
2121   
2122         ol_arg=invalid
2123         for ol_val in no yes mod ; do
2124                 if test "$enableval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2130         fi
2131         ol_enable_null="$ol_arg"
2132
2133 else
2134         ol_enable_null="no"
2135 fi
2136 # end --enable-null
2137 # OpenLDAP --enable-passwd
2138         # Check whether --enable-passwd or --disable-passwd was given.
2139 if test "${enable_passwd+set}" = set; then
2140   enableval="$enable_passwd"
2141   
2142         ol_arg=invalid
2143         for ol_val in no yes mod ; do
2144                 if test "$enableval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2150         fi
2151         ol_enable_passwd="$ol_arg"
2152
2153 else
2154         ol_enable_passwd="no"
2155 fi
2156 # end --enable-passwd
2157 # OpenLDAP --enable-perl
2158         # Check whether --enable-perl or --disable-perl was given.
2159 if test "${enable_perl+set}" = set; then
2160   enableval="$enable_perl"
2161   
2162         ol_arg=invalid
2163         for ol_val in no yes mod ; do
2164                 if test "$enableval" = "$ol_val" ; then
2165                         ol_arg="$ol_val"
2166                 fi
2167         done
2168         if test "$ol_arg" = "invalid" ; then
2169                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2170         fi
2171         ol_enable_perl="$ol_arg"
2172
2173 else
2174         ol_enable_perl="no"
2175 fi
2176 # end --enable-perl
2177 # OpenLDAP --enable-relay
2178         # Check whether --enable-relay or --disable-relay was given.
2179 if test "${enable_relay+set}" = set; then
2180   enableval="$enable_relay"
2181   
2182         ol_arg=invalid
2183         for ol_val in no yes mod ; do
2184                 if test "$enableval" = "$ol_val" ; then
2185                         ol_arg="$ol_val"
2186                 fi
2187         done
2188         if test "$ol_arg" = "invalid" ; then
2189                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2190         fi
2191         ol_enable_relay="$ol_arg"
2192
2193 else
2194         ol_enable_relay="yes"
2195 fi
2196 # end --enable-relay
2197 # OpenLDAP --enable-shell
2198         # Check whether --enable-shell or --disable-shell was given.
2199 if test "${enable_shell+set}" = set; then
2200   enableval="$enable_shell"
2201   
2202         ol_arg=invalid
2203         for ol_val in no yes mod ; do
2204                 if test "$enableval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2210         fi
2211         ol_enable_shell="$ol_arg"
2212
2213 else
2214         ol_enable_shell="no"
2215 fi
2216 # end --enable-shell
2217 # OpenLDAP --enable-sql
2218         # Check whether --enable-sql or --disable-sql was given.
2219 if test "${enable_sql+set}" = set; then
2220   enableval="$enable_sql"
2221   
2222         ol_arg=invalid
2223         for ol_val in no yes mod ; do
2224                 if test "$enableval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2230         fi
2231         ol_enable_sql="$ol_arg"
2232
2233 else
2234         ol_enable_sql="no"
2235 fi
2236 # end --enable-sql
2237
2238 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2239         refint unique"
2240
2241 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2242 if test "${with_xxslapoverlays+set}" = set; then
2243   withval="$with_xxslapoverlays"
2244   :
2245 fi
2246
2247
2248 # OpenLDAP --enable-overlays
2249         # Check whether --enable-overlays or --disable-overlays was given.
2250 if test "${enable_overlays+set}" = set; then
2251   enableval="$enable_overlays"
2252   
2253         ol_arg=invalid
2254         for ol_val in no yes mod ; do
2255                 if test "$enableval" = "$ol_val" ; then
2256                         ol_arg="$ol_val"
2257                 fi
2258         done
2259         if test "$ol_arg" = "invalid" ; then
2260                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2261         fi
2262         ol_enable_overlays="$ol_arg"
2263
2264 else
2265         ol_enable_overlays="no"
2266 fi
2267 # end --enable-overlays
2268 # OpenLDAP --enable-chain
2269         # Check whether --enable-chain or --disable-chain was given.
2270 if test "${enable_chain+set}" = set; then
2271   enableval="$enable_chain"
2272   
2273         ol_arg=invalid
2274         for ol_val in no yes mod ; do
2275                 if test "$enableval" = "$ol_val" ; then
2276                         ol_arg="$ol_val"
2277                 fi
2278         done
2279         if test "$ol_arg" = "invalid" ; then
2280                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2281         fi
2282         ol_enable_chain="$ol_arg"
2283
2284 else
2285         ol_enable_chain="no"
2286 fi
2287 # end --enable-chain
2288
2289 # OpenLDAP --enable-denyop
2290         # Check whether --enable-denyop or --disable-denyop was given.
2291 if test "${enable_denyop+set}" = set; then
2292   enableval="$enable_denyop"
2293   
2294         ol_arg=invalid
2295         for ol_val in no yes mod ; do
2296                 if test "$enableval" = "$ol_val" ; then
2297                         ol_arg="$ol_val"
2298                 fi
2299         done
2300         if test "$ol_arg" = "invalid" ; then
2301                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2302         fi
2303         ol_enable_denyop="$ol_arg"
2304
2305 else
2306         ol_enable_denyop="no"
2307 fi
2308 # end --enable-denyop
2309
2310 # OpenLDAP --enable-dyngroup
2311         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2312 if test "${enable_dyngroup+set}" = set; then
2313   enableval="$enable_dyngroup"
2314   
2315         ol_arg=invalid
2316         for ol_val in no yes mod ; do
2317                 if test "$enableval" = "$ol_val" ; then
2318                         ol_arg="$ol_val"
2319                 fi
2320         done
2321         if test "$ol_arg" = "invalid" ; then
2322                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2323         fi
2324         ol_enable_dyngroup="$ol_arg"
2325
2326 else
2327         ol_enable_dyngroup="no"
2328 fi
2329 # end --enable-dyngroup
2330
2331 # OpenLDAP --enable-lastmod
2332         # Check whether --enable-lastmod or --disable-lastmod was given.
2333 if test "${enable_lastmod+set}" = set; then
2334   enableval="$enable_lastmod"
2335   
2336         ol_arg=invalid
2337         for ol_val in no yes mod ; do
2338                 if test "$enableval" = "$ol_val" ; then
2339                         ol_arg="$ol_val"
2340                 fi
2341         done
2342         if test "$ol_arg" = "invalid" ; then
2343                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2344         fi
2345         ol_enable_lastmod="$ol_arg"
2346
2347 else
2348         ol_enable_lastmod="no"
2349 fi
2350 # end --enable-lastmod
2351
2352 # OpenLDAP --enable-ppolicy
2353         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2354 if test "${enable_ppolicy+set}" = set; then
2355   enableval="$enable_ppolicy"
2356   
2357         ol_arg=invalid
2358         for ol_val in no yes mod ; do
2359                 if test "$enableval" = "$ol_val" ; then
2360                         ol_arg="$ol_val"
2361                 fi
2362         done
2363         if test "$ol_arg" = "invalid" ; then
2364                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2365         fi
2366         ol_enable_ppolicy="$ol_arg"
2367
2368 else
2369         ol_enable_ppolicy="no"
2370 fi
2371 # end --enable-ppolicy
2372
2373 # OpenLDAP --enable-proxycache
2374         # Check whether --enable-proxycache or --disable-proxycache was given.
2375 if test "${enable_proxycache+set}" = set; then
2376   enableval="$enable_proxycache"
2377   
2378         ol_arg=invalid
2379         for ol_val in no yes mod ; do
2380                 if test "$enableval" = "$ol_val" ; then
2381                         ol_arg="$ol_val"
2382                 fi
2383         done
2384         if test "$ol_arg" = "invalid" ; then
2385                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2386         fi
2387         ol_enable_proxycache="$ol_arg"
2388
2389 else
2390         ol_enable_proxycache="no"
2391 fi
2392 # end --enable-proxycache
2393
2394 # OpenLDAP --enable-refint
2395         # Check whether --enable-refint or --disable-refint was given.
2396 if test "${enable_refint+set}" = set; then
2397   enableval="$enable_refint"
2398   
2399         ol_arg=invalid
2400         for ol_val in no yes mod ; do
2401                 if test "$enableval" = "$ol_val" ; then
2402                         ol_arg="$ol_val"
2403                 fi
2404         done
2405         if test "$ol_arg" = "invalid" ; then
2406                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2407         fi
2408         ol_enable_refint="$ol_arg"
2409
2410 else
2411         ol_enable_refint="no"
2412 fi
2413 # end --enable-refint
2414
2415 # OpenLDAP --enable-rwm
2416         # Check whether --enable-rwm or --disable-rwm was given.
2417 if test "${enable_rwm+set}" = set; then
2418   enableval="$enable_rwm"
2419   
2420         ol_arg=invalid
2421         for ol_val in no yes mod ; do
2422                 if test "$enableval" = "$ol_val" ; then
2423                         ol_arg="$ol_val"
2424                 fi
2425         done
2426         if test "$ol_arg" = "invalid" ; then
2427                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2428         fi
2429         ol_enable_rwm="$ol_arg"
2430
2431 else
2432         ol_enable_rwm="no"
2433 fi
2434 # end --enable-rwm
2435
2436 # OpenLDAP --enable-unique
2437         # Check whether --enable-unique or --disable-unique was given.
2438 if test "${enable_unique+set}" = set; then
2439   enableval="$enable_unique"
2440   
2441         ol_arg=invalid
2442         for ol_val in no yes mod ; do
2443                 if test "$enableval" = "$ol_val" ; then
2444                         ol_arg="$ol_val"
2445                 fi
2446         done
2447         if test "$ol_arg" = "invalid" ; then
2448                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2449         fi
2450         ol_enable_unique="$ol_arg"
2451
2452 else
2453         ol_enable_unique="no"
2454 fi
2455 # end --enable-unique
2456
2457
2458
2459 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2460 if test "${with_xxslurpdoptions+set}" = set; then
2461   withval="$with_xxslurpdoptions"
2462   :
2463 fi
2464
2465 # OpenLDAP --enable-slurpd
2466         # Check whether --enable-slurpd or --disable-slurpd was given.
2467 if test "${enable_slurpd+set}" = set; then
2468   enableval="$enable_slurpd"
2469   
2470         ol_arg=invalid
2471         for ol_val in auto yes no ; do
2472                 if test "$enableval" = "$ol_val" ; then
2473                         ol_arg="$ol_val"
2474                 fi
2475         done
2476         if test "$ol_arg" = "invalid" ; then
2477                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2478         fi
2479         ol_enable_slurpd="$ol_arg"
2480
2481 else
2482         ol_enable_slurpd="auto"
2483 fi
2484 # end --enable-slurpd
2485
2486 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2487 if test "${with_xxliboptions+set}" = set; then
2488   withval="$with_xxliboptions"
2489   :
2490 fi
2491
2492 # Check whether --enable-static or --disable-static was given.
2493 if test "${enable_static+set}" = set; then
2494   enableval="$enable_static"
2495   p=${PACKAGE-default}
2496 case $enableval in
2497 yes) enable_static=yes ;;
2498 no) enable_static=no ;;
2499 *)
2500   enable_static=no
2501   # Look at the argument we got.  We use all the common list separators.
2502   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2503   for pkg in $enableval; do
2504     if test "X$pkg" = "X$p"; then
2505       enable_static=yes
2506     fi
2507   done
2508   IFS="$ac_save_ifs"
2509   ;;
2510 esac
2511 else
2512   enable_static=yes
2513 fi
2514
2515 # Check whether --enable-shared or --disable-shared was given.
2516 if test "${enable_shared+set}" = set; then
2517   enableval="$enable_shared"
2518   p=${PACKAGE-default}
2519 case $enableval in
2520 yes) enable_shared=yes ;;
2521 no) enable_shared=no ;;
2522 *)
2523   enable_shared=no
2524   # Look at the argument we got.  We use all the common list separators.
2525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2526   for pkg in $enableval; do
2527     if test "X$pkg" = "X$p"; then
2528       enable_shared=yes
2529     fi
2530   done
2531   IFS="$ac_save_ifs"
2532   ;;
2533 esac
2534 else
2535   enable_shared=yes
2536 fi
2537
2538
2539
2540 # Activate any backends that were not explicitly enabled.
2541 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2542 if test $ol_enable_backends != no ; then
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp = no ; then
2546                         eval "ol_enable_$i=$ol_enable_backends"
2547                 fi
2548         done
2549 fi
2550 # Activate the overlays
2551 if test $ol_enable_overlays != no ; then
2552         for i in $Overlays; do
2553                 eval "ol_tmp=\$ol_enable_$i"
2554                 if test $ol_tmp = no ; then
2555                         eval "ol_enable_$i=$ol_enable_overlays"
2556                 fi
2557         done
2558 fi
2559
2560 # validate options
2561 if test $ol_enable_slapd = no ; then
2562                 if test $ol_enable_slapi = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2564         fi
2565         if test $ol_enable_backends != no ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2567         fi
2568         for i in $Backends; do
2569                 eval "ol_tmp=\$ol_enable_$i"
2570                 if test $ol_tmp != no ; then
2571                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2572                         eval "ol_enable_$i=no"
2573                 fi
2574         done
2575         if test $ol_enable_modules = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2577         fi
2578         if test $ol_enable_multimaster = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2580         fi
2581         if test $ol_enable_wrappers = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2583         fi
2584         if test $ol_enable_rlookups = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2586         fi
2587         if test $ol_enable_aci = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2589         fi
2590         if test $ol_with_ldbm_api != auto ; then
2591                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2592         fi
2593         if test $ol_with_ldbm_type != auto ; then
2594                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2595         fi
2596         if test $ol_enable_slurpd = yes ; then
2597                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2598         fi
2599         if test $ol_enable_rewrite = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2601         fi
2602                 if test $ol_enable_overlays != no ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2604         fi
2605         for i in $Overlays; do
2606                 eval "ol_tmp=\$ol_enable_$i"
2607                 if test $ol_tmp != no ; then
2608                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2609                         eval "ol_enable_$i=no"
2610                 fi
2611         done
2612
2613         # force settings to no
2614         ol_enable_slapi=no
2615
2616         ol_enable_backends=no
2617         ol_enable_overlays=no
2618         ol_enable_modules=no
2619         ol_enable_multimaster=no
2620         ol_enable_rlookups=no
2621         ol_enable_aci=no
2622         ol_enable_wrappers=no
2623
2624         ol_with_ldbm_api=no
2625         ol_with_ldbm_type=no
2626
2627         ol_enable_slurpd=no
2628
2629         ol_enable_rewrite=no
2630
2631 elif test $ol_enable_ldbm = no ; then
2632         
2633         if test $ol_with_ldbm_api != auto ; then
2634                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2635         fi
2636
2637         if test $ol_with_ldbm_type != auto ; then
2638                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2639         fi
2640
2641         if test $ol_enable_modules != yes -a \
2642                 $ol_enable_bdb = no -a \
2643                 $ol_enable_dnssrv = no -a \
2644                 $ol_enable_hdb = no -a \
2645                 $ol_enable_ldap = no -a \
2646                 $ol_enable_meta = no -a \
2647                 $ol_enable_monitor = no -a \
2648                 $ol_enable_null = no -a \
2649                 $ol_enable_passwd = no -a \
2650                 $ol_enable_perl = no -a \
2651                 $ol_enable_relay = no -a \
2652                 $ol_enable_shell = no -a \
2653                 $ol_enable_sql = no ; then
2654
2655                 if test $ol_enable_slapd = yes ; then
2656                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2657                 else
2658                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2659                         ol_enable_slapd=no
2660                 fi
2661         fi
2662
2663         ol_with_ldbm_api=no
2664         ol_with_ldbm_type=no
2665
2666         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2667                 ol_with_ldbm_api=berkeley
2668         fi
2669
2670 else
2671                 if test $ol_with_ldbm_api = gdbm -a \
2672                 $ol_with_ldbm_type = btree ; then
2673                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2674         fi
2675         if test $ol_with_ldbm_api = mdbm -a \
2676                 $ol_with_ldbm_type = btree ; then
2677                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2678         fi
2679         if test $ol_with_ldbm_api = ndbm -a \
2680                 $ol_with_ldbm_type = btree ; then
2681                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2682         fi
2683
2684         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2685                 if test $ol_with_ldbm_api = auto ; then
2686                         ol_with_ldbm_api=berkeley
2687                 elif test $ol_with_ldbm_api != berkeley ; then
2688                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2689                 fi
2690         fi
2691 fi
2692
2693 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2694         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2695 fi
2696
2697 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2698         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2699 fi
2700
2701 if test $ol_enable_slurpd = yes ; then
2702                 if test $ol_with_threads = no ; then
2703                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2704         fi
2705 fi
2706
2707 if test $ol_enable_lmpasswd = yes ; then
2708         if test $ol_with_tls = no ; then
2709                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2710         fi
2711 fi
2712
2713 if test $ol_enable_kbind = yes ; then
2714         if test $ol_with_kerberos = no ; then
2715                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2716         elif test $ol_with_kerberos = auto ; then
2717                 ol_with_kerberos=yes
2718         fi
2719
2720 elif test $ol_enable_kbind = no ; then
2721         if test $ol_with_kerberos = auto ; then
2722                 ol_with_kerberos=no
2723         elif test $ol_with_kerberos != no ; then
2724                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2725                 ol_with_kerberos=no
2726         fi
2727 fi
2728
2729 if test $ol_enable_spasswd = yes ; then
2730         if test $ol_with_cyrus_sasl = no ; then
2731                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2732         fi
2733         ol_with_cyrus_sasl=yes
2734 fi
2735
2736 echo "$ac_t""done" 1>&6
2737
2738 LDAP_LIBS=
2739 LDBM_LIBS=
2740 LTHREAD_LIBS=
2741 LUTIL_LIBS=
2742
2743 SLAPD_LIBS=
2744 SLURPD_LIBS=
2745
2746 BUILD_SLAPD=no
2747 BUILD_SLURPD=no
2748
2749 BUILD_THREAD=no
2750
2751 BUILD_SLAPI=no
2752 SLAPD_SLAPI_DEPEND=
2753
2754 BUILD_BDB=no
2755 BUILD_DNSSRV=no
2756 BUILD_HDB=no
2757 BUILD_LDAP=no
2758 BUILD_LDBM=no
2759 BUILD_META=no
2760 BUILD_MONITOR=no
2761 BUILD_NULL=no
2762 BUILD_PASSWD=no
2763 BUILD_PERL=no
2764 BUILD_RELAY=no
2765 BUILD_SHELL=no
2766 BUILD_SQL=no
2767
2768 BUILD_CHAIN=no
2769 BUILD_DENYOP=no
2770 BUILD_DYNGROUP=no
2771 BUILD_LASTMOD=no
2772 BUILD_PPOLICY=no
2773 BUILD_PROXYCACHE=no
2774 BUILD_REFINT=no
2775 BUILD_RWM=no
2776 BUILD_UNIQUE=no
2777
2778 SLAPD_DYNAMIC_OVERLAYS=
2779
2780 SLAPD_MODULES_LDFLAGS=
2781 SLAPD_MODULES_CPPFLAGS=
2782
2783 SLAPD_STATIC_BACKENDS=
2784 SLAPD_DYNAMIC_BACKENDS=
2785
2786 SLAPD_PERL_LDFLAGS=
2787 MOD_PERL_LDFLAGS=
2788 PERL_CPPFLAGS=
2789
2790 SLAPD_SQL_LDFLAGS=
2791 SLAPD_SQL_LIBS=
2792 SLAPD_SQL_INCLUDES=
2793
2794 KRB4_LIBS=
2795 KRB5_LIBS=
2796 SASL_LIBS=
2797 TLS_LIBS=
2798 MODULES_LIBS=
2799 SLAPI_LIBS=
2800 LIBSLAPI=
2801 LIBSLAPITOOLS=
2802 AUTH_LIBS=
2803
2804 SLAPD_SLP_LIBS=
2805 SLAPD_GMP_LIBS=
2806
2807
2808 cat >> confdefs.h <<\EOF
2809 #define HAVE_MKVERSION 1
2810 EOF
2811
2812
2813
2814
2815 ol_aix_threads=no
2816 case "$target" in
2817 *-*-aix*)       if test -z "$CC" ; then
2818                 case "$ol_with_threads" in
2819                 auto | yes |  posix) ol_aix_threads=yes ;;
2820                 esac
2821         fi
2822 ;;
2823 esac
2824
2825 if test $ol_aix_threads = yes ; then
2826         if test -z "${CC}" ; then
2827                 for ac_prog in cc_r xlc_r cc
2828 do
2829 # Extract the first word of "$ac_prog", so it can be a program name with args.
2830 set dummy $ac_prog; ac_word=$2
2831 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2832 echo "configure:2833: checking for $ac_word" >&5
2833 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2834   echo $ac_n "(cached) $ac_c" 1>&6
2835 else
2836   if test -n "$CC"; then
2837   ac_cv_prog_CC="$CC" # Let the user override the test.
2838 else
2839   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2840   ac_dummy="$PATH"
2841   for ac_dir in $ac_dummy; do
2842     test -z "$ac_dir" && ac_dir=.
2843     if test -f $ac_dir/$ac_word; then
2844       ac_cv_prog_CC="$ac_prog"
2845       break
2846     fi
2847   done
2848   IFS="$ac_save_ifs"
2849 fi
2850 fi
2851 CC="$ac_cv_prog_CC"
2852 if test -n "$CC"; then
2853   echo "$ac_t""$CC" 1>&6
2854 else
2855   echo "$ac_t""no" 1>&6
2856 fi
2857
2858 test -n "$CC" && break
2859 done
2860
2861
2862                 if test "$CC" = cc ; then
2863                                                 if test $ol_with_threads != auto ; then
2864                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2865                         else
2866                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2867                         fi
2868                         ol_with_threads=no
2869                 fi
2870         fi
2871
2872         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2873                 ol_with_threads=posix
2874                 ol_cv_pthread_create=yes
2875         fi
2876 fi
2877
2878 if test -z "${CC}"; then
2879         for ac_prog in cc gcc
2880 do
2881 # Extract the first word of "$ac_prog", so it can be a program name with args.
2882 set dummy $ac_prog; ac_word=$2
2883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2884 echo "configure:2885: checking for $ac_word" >&5
2885 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2886   echo $ac_n "(cached) $ac_c" 1>&6
2887 else
2888   if test -n "$CC"; then
2889   ac_cv_prog_CC="$CC" # Let the user override the test.
2890 else
2891   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2892   ac_dummy="$PATH"
2893   for ac_dir in $ac_dummy; do
2894     test -z "$ac_dir" && ac_dir=.
2895     if test -f $ac_dir/$ac_word; then
2896       ac_cv_prog_CC="$ac_prog"
2897       break
2898     fi
2899   done
2900   IFS="$ac_save_ifs"
2901 fi
2902 fi
2903 CC="$ac_cv_prog_CC"
2904 if test -n "$CC"; then
2905   echo "$ac_t""$CC" 1>&6
2906 else
2907   echo "$ac_t""no" 1>&6
2908 fi
2909
2910 test -n "$CC" && break
2911 done
2912 test -n "$CC" || CC="missing"
2913
2914
2915         if test "${CC}" = "missing" ; then
2916                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2917         fi
2918 fi
2919
2920 if test -z "${AR}"; then
2921         for ac_prog in ar gar
2922 do
2923 # Extract the first word of "$ac_prog", so it can be a program name with args.
2924 set dummy $ac_prog; ac_word=$2
2925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2926 echo "configure:2927: checking for $ac_word" >&5
2927 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2928   echo $ac_n "(cached) $ac_c" 1>&6
2929 else
2930   if test -n "$AR"; then
2931   ac_cv_prog_AR="$AR" # Let the user override the test.
2932 else
2933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2934   ac_dummy="$PATH"
2935   for ac_dir in $ac_dummy; do
2936     test -z "$ac_dir" && ac_dir=.
2937     if test -f $ac_dir/$ac_word; then
2938       ac_cv_prog_AR="$ac_prog"
2939       break
2940     fi
2941   done
2942   IFS="$ac_save_ifs"
2943 fi
2944 fi
2945 AR="$ac_cv_prog_AR"
2946 if test -n "$AR"; then
2947   echo "$ac_t""$AR" 1>&6
2948 else
2949   echo "$ac_t""no" 1>&6
2950 fi
2951
2952 test -n "$AR" && break
2953 done
2954 test -n "$AR" || AR="missing"
2955
2956
2957         if test "${AR}" = "missing" ; then
2958                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2959         fi
2960 fi
2961
2962
2963
2964 # Find the correct PATH separator.  Usually this is `:', but
2965 # DJGPP uses `;' like DOS.
2966 if test "X${PATH_SEPARATOR+set}" != Xset; then
2967   UNAME=${UNAME-`uname 2>/dev/null`}
2968   case X$UNAME in
2969     *-DOS) lt_cv_sys_path_separator=';' ;;
2970     *)     lt_cv_sys_path_separator=':' ;;
2971   esac
2972   PATH_SEPARATOR=$lt_cv_sys_path_separator
2973 fi
2974
2975 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2976 echo "configure:2977: checking for Cygwin environment" >&5
2977 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983
2984 int main() {
2985
2986 #ifndef __CYGWIN__
2987 #define __CYGWIN__ __CYGWIN32__
2988 #endif
2989 return __CYGWIN__;
2990 ; return 0; }
2991 EOF
2992 if { (eval echo configure:2993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2993   rm -rf conftest*
2994   ac_cv_cygwin=yes
2995 else
2996   echo "configure: failed program was:" >&5
2997   cat conftest.$ac_ext >&5
2998   rm -rf conftest*
2999   ac_cv_cygwin=no
3000 fi
3001 rm -f conftest*
3002 fi
3003
3004 echo "$ac_t""$ac_cv_cygwin" 1>&6
3005 CYGWIN=
3006 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3007 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3008 echo "configure:3009: checking for mingw32 environment" >&5
3009 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3010   echo $ac_n "(cached) $ac_c" 1>&6
3011 else
3012   cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015
3016 int main() {
3017 return __MINGW32__;
3018 ; return 0; }
3019 EOF
3020 if { (eval echo configure:3021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3021   rm -rf conftest*
3022   ac_cv_mingw32=yes
3023 else
3024   echo "configure: failed program was:" >&5
3025   cat conftest.$ac_ext >&5
3026   rm -rf conftest*
3027   ac_cv_mingw32=no
3028 fi
3029 rm -f conftest*
3030 fi
3031
3032 echo "$ac_t""$ac_cv_mingw32" 1>&6
3033 MINGW32=
3034 test "$ac_cv_mingw32" = yes && MINGW32=yes
3035 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3036 echo "configure:3037: checking for EMX OS/2 environment" >&5
3037 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3038   echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040   cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043
3044 int main() {
3045 return __EMX__;
3046 ; return 0; }
3047 EOF
3048 if { (eval echo configure:3049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3049   rm -rf conftest*
3050   ac_cv_emxos2=yes
3051 else
3052   echo "configure: failed program was:" >&5
3053   cat conftest.$ac_ext >&5
3054   rm -rf conftest*
3055   ac_cv_emxos2=no
3056 fi
3057 rm -f conftest*
3058 fi
3059
3060 echo "$ac_t""$ac_cv_emxos2" 1>&6
3061 EMXOS2=
3062 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3063 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3064 echo "configure:3065: checking how to run the C preprocessor" >&5
3065 # On Suns, sometimes $CPP names a directory.
3066 if test -n "$CPP" && test -d "$CPP"; then
3067   CPP=
3068 fi
3069 if test -z "$CPP"; then
3070 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073     # This must be in double quotes, not single quotes, because CPP may get
3074   # substituted into the Makefile and "${CC-cc}" will confuse make.
3075   CPP="${CC-cc} -E"
3076   # On the NeXT, cc -E runs the code through the compiler's parser,
3077   # not just through cpp.
3078   cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081 #include <assert.h>
3082 Syntax Error
3083 EOF
3084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3085 { (eval echo configure:3086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3087 if test -z "$ac_err"; then
3088   :
3089 else
3090   echo "$ac_err" >&5
3091   echo "configure: failed program was:" >&5
3092   cat conftest.$ac_ext >&5
3093   rm -rf conftest*
3094   CPP="${CC-cc} -E -traditional-cpp"
3095   cat > conftest.$ac_ext <<EOF
3096 #line 3097 "configure"
3097 #include "confdefs.h"
3098 #include <assert.h>
3099 Syntax Error
3100 EOF
3101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3102 { (eval echo configure:3103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3104 if test -z "$ac_err"; then
3105   :
3106 else
3107   echo "$ac_err" >&5
3108   echo "configure: failed program was:" >&5
3109   cat conftest.$ac_ext >&5
3110   rm -rf conftest*
3111   CPP="${CC-cc} -nologo -E"
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 #include <assert.h>
3116 Syntax Error
3117 EOF
3118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3119 { (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3121 if test -z "$ac_err"; then
3122   :
3123 else
3124   echo "$ac_err" >&5
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127   rm -rf conftest*
3128   CPP=/lib/cpp
3129 fi
3130 rm -f conftest*
3131 fi
3132 rm -f conftest*
3133 fi
3134 rm -f conftest*
3135   ac_cv_prog_CPP="$CPP"
3136 fi
3137   CPP="$ac_cv_prog_CPP"
3138 else
3139   ac_cv_prog_CPP="$CPP"
3140 fi
3141 echo "$ac_t""$CPP" 1>&6
3142
3143 # Check whether --enable-fast-install or --disable-fast-install was given.
3144 if test "${enable_fast_install+set}" = set; then
3145   enableval="$enable_fast_install"
3146   p=${PACKAGE-default}
3147 case $enableval in
3148 yes) enable_fast_install=yes ;;
3149 no) enable_fast_install=no ;;
3150 *)
3151   enable_fast_install=no
3152   # Look at the argument we got.  We use all the common list separators.
3153   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3154   for pkg in $enableval; do
3155     if test "X$pkg" = "X$p"; then
3156       enable_fast_install=yes
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160   ;;
3161 esac
3162 else
3163   enable_fast_install=yes
3164 fi
3165
3166 # Extract the first word of "gcc", so it can be a program name with args.
3167 set dummy gcc; ac_word=$2
3168 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3169 echo "configure:3170: checking for $ac_word" >&5
3170 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3171   echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173   if test -n "$CC"; then
3174   ac_cv_prog_CC="$CC" # Let the user override the test.
3175 else
3176   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3177   ac_dummy="$PATH"
3178   for ac_dir in $ac_dummy; do
3179     test -z "$ac_dir" && ac_dir=.
3180     if test -f $ac_dir/$ac_word; then
3181       ac_cv_prog_CC="gcc"
3182       break
3183     fi
3184   done
3185   IFS="$ac_save_ifs"
3186 fi
3187 fi
3188 CC="$ac_cv_prog_CC"
3189 if test -n "$CC"; then
3190   echo "$ac_t""$CC" 1>&6
3191 else
3192   echo "$ac_t""no" 1>&6
3193 fi
3194
3195 if test -z "$CC"; then
3196   # Extract the first word of "cc", so it can be a program name with args.
3197 set dummy cc; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$CC"; then
3204   ac_cv_prog_CC="$CC" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_prog_rejected=no
3208   ac_dummy="$PATH"
3209   for ac_dir in $ac_dummy; do
3210     test -z "$ac_dir" && ac_dir=.
3211     if test -f $ac_dir/$ac_word; then
3212       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3213         ac_prog_rejected=yes
3214         continue
3215       fi
3216       ac_cv_prog_CC="cc"
3217       break
3218     fi
3219   done
3220   IFS="$ac_save_ifs"
3221 if test $ac_prog_rejected = yes; then
3222   # We found a bogon in the path, so make sure we never use it.
3223   set dummy $ac_cv_prog_CC
3224   shift
3225   if test $# -gt 0; then
3226     # We chose a different compiler from the bogus one.
3227     # However, it has the same basename, so the bogon will be chosen
3228     # first if we set CC to just the basename; use the full file name.
3229     shift
3230     set dummy "$ac_dir/$ac_word" "$@"
3231     shift
3232     ac_cv_prog_CC="$@"
3233   fi
3234 fi
3235 fi
3236 fi
3237 CC="$ac_cv_prog_CC"
3238 if test -n "$CC"; then
3239   echo "$ac_t""$CC" 1>&6
3240 else
3241   echo "$ac_t""no" 1>&6
3242 fi
3243
3244   if test -z "$CC"; then
3245     case "`uname -s`" in
3246     *win32* | *WIN32* | *CYGWIN*)
3247       # Extract the first word of "cl", so it can be a program name with args.
3248 set dummy cl; ac_word=$2
3249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_word" >&5
3251 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3252   echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254   if test -n "$CC"; then
3255   ac_cv_prog_CC="$CC" # Let the user override the test.
3256 else
3257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3258   ac_dummy="$PATH"
3259   for ac_dir in $ac_dummy; do
3260     test -z "$ac_dir" && ac_dir=.
3261     if test -f $ac_dir/$ac_word; then
3262       ac_cv_prog_CC="cl"
3263       break
3264     fi
3265   done
3266   IFS="$ac_save_ifs"
3267 fi
3268 fi
3269 CC="$ac_cv_prog_CC"
3270 if test -n "$CC"; then
3271   echo "$ac_t""$CC" 1>&6
3272 else
3273   echo "$ac_t""no" 1>&6
3274 fi
3275  ;;
3276     esac
3277   fi
3278   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3279 fi
3280
3281 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3282 echo "configure:3283: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3283
3284 ac_ext=c
3285 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3286 ac_cpp='$CPP $CPPFLAGS'
3287 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3288 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3289 cross_compiling=$ac_cv_prog_cc_cross
3290
3291 cat > conftest.$ac_ext << EOF
3292
3293 #line 3294 "configure"
3294 #include "confdefs.h"
3295
3296 main(){return(0);}
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3299   ac_cv_prog_cc_works=yes
3300   # If we can't run a trivial program, we are probably using a cross compiler.
3301   if (./conftest; exit) 2>/dev/null; then
3302     ac_cv_prog_cc_cross=no
3303   else
3304     ac_cv_prog_cc_cross=yes
3305   fi
3306 else
3307   echo "configure: failed program was:" >&5
3308   cat conftest.$ac_ext >&5
3309   ac_cv_prog_cc_works=no
3310 fi
3311 rm -fr conftest*
3312 ac_ext=c
3313 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3314 ac_cpp='$CPP $CPPFLAGS'
3315 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3316 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3317 cross_compiling=$ac_cv_prog_cc_cross
3318
3319 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3320 if test $ac_cv_prog_cc_works = no; then
3321   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3322 fi
3323 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3324 echo "configure:3325: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3325 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3326 cross_compiling=$ac_cv_prog_cc_cross
3327
3328 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3329 echo "configure:3330: checking whether we are using GNU C" >&5
3330 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3331   echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333   cat > conftest.c <<EOF
3334 #ifdef __GNUC__
3335   yes;
3336 #endif
3337 EOF
3338 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3339   ac_cv_prog_gcc=yes
3340 else
3341   ac_cv_prog_gcc=no
3342 fi
3343 fi
3344
3345 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3346
3347 if test $ac_cv_prog_gcc = yes; then
3348   GCC=yes
3349 else
3350   GCC=
3351 fi
3352
3353 ac_test_CFLAGS="${CFLAGS+set}"
3354 ac_save_CFLAGS="$CFLAGS"
3355 CFLAGS=
3356 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3357 echo "configure:3358: checking whether ${CC-cc} accepts -g" >&5
3358 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   echo 'void f(){}' > conftest.c
3362 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3363   ac_cv_prog_cc_g=yes
3364 else
3365   ac_cv_prog_cc_g=no
3366 fi
3367 rm -f conftest*
3368
3369 fi
3370
3371 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3372 if test "$ac_test_CFLAGS" = set; then
3373   CFLAGS="$ac_save_CFLAGS"
3374 elif test $ac_cv_prog_cc_g = yes; then
3375   if test "$GCC" = yes; then
3376     CFLAGS="-g -O2"
3377   else
3378     CFLAGS="-g"
3379   fi
3380 else
3381   if test "$GCC" = yes; then
3382     CFLAGS="-O2"
3383   else
3384     CFLAGS=
3385   fi
3386 fi
3387
3388 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3389 if test "${with_gnu_ld+set}" = set; then
3390   withval="$with_gnu_ld"
3391   test "$withval" = no || with_gnu_ld=yes
3392 else
3393   with_gnu_ld=no
3394 fi
3395
3396 ac_prog=ld
3397 if test "$GCC" = yes; then
3398   # Check if gcc -print-prog-name=ld gives a path.
3399   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3400 echo "configure:3401: checking for ld used by GCC" >&5
3401   case $host in
3402   *-*-mingw*)
3403     # gcc leaves a trailing carriage return which upsets mingw
3404     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3405   *)
3406     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3407   esac
3408   case $ac_prog in
3409     # Accept absolute paths.
3410     [\\/]* | [A-Za-z]:[\\/]*)
3411       re_direlt='/[^/][^/]*/\.\./'
3412       # Canonicalize the path of ld
3413       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3414       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3415         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3416       done
3417       test -z "$LD" && LD="$ac_prog"
3418       ;;
3419   "")
3420     # If it fails, then pretend we aren't using GCC.
3421     ac_prog=ld
3422     ;;
3423   *)
3424     # If it is relative, then search for the first ld in PATH.
3425     with_gnu_ld=unknown
3426     ;;
3427   esac
3428 elif test "$with_gnu_ld" = yes; then
3429   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3430 echo "configure:3431: checking for GNU ld" >&5
3431 else
3432   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3433 echo "configure:3434: checking for non-GNU ld" >&5
3434 fi
3435 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3436   echo $ac_n "(cached) $ac_c" 1>&6
3437 else
3438   if test -z "$LD"; then
3439   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3440   for ac_dir in $PATH; do
3441     test -z "$ac_dir" && ac_dir=.
3442     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3443       lt_cv_path_LD="$ac_dir/$ac_prog"
3444       # Check to see if the program is GNU ld.  I'd rather use --version,
3445       # but apparently some GNU ld's only accept -v.
3446       # Break only if it was the GNU/non-GNU ld that we prefer.
3447       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3448         test "$with_gnu_ld" != no && break
3449       else
3450         test "$with_gnu_ld" != yes && break
3451       fi
3452     fi
3453   done
3454   IFS="$ac_save_ifs"
3455 else
3456   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3457 fi
3458 fi
3459
3460 LD="$lt_cv_path_LD"
3461 if test -n "$LD"; then
3462   echo "$ac_t""$LD" 1>&6
3463 else
3464   echo "$ac_t""no" 1>&6
3465 fi
3466 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3467 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3468 echo "configure:3469: checking if the linker ($LD) is GNU ld" >&5
3469 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3470   echo $ac_n "(cached) $ac_c" 1>&6
3471 else
3472   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3473 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3474   lt_cv_prog_gnu_ld=yes
3475 else
3476   lt_cv_prog_gnu_ld=no
3477 fi
3478 fi
3479
3480 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3481 with_gnu_ld=$lt_cv_prog_gnu_ld
3482
3483
3484 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3485 echo "configure:3486: checking for $LD option to reload object files" >&5
3486 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   lt_cv_ld_reload_flag='-r'
3490 fi
3491
3492 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3493 reload_flag=$lt_cv_ld_reload_flag
3494 test -n "$reload_flag" && reload_flag=" $reload_flag"
3495
3496 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3497 echo "configure:3498: checking for BSD-compatible nm" >&5
3498 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   if test -n "$NM"; then
3502   # Let the user override the test.
3503   lt_cv_path_NM="$NM"
3504 else
3505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3506   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3507     test -z "$ac_dir" && ac_dir=.
3508     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3509     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3510       # Check to see if the nm accepts a BSD-compat flag.
3511       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3512       #   nm: unknown option "B" ignored
3513       # Tru64's nm complains that /dev/null is an invalid object file
3514       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3515         lt_cv_path_NM="$tmp_nm -B"
3516         break
3517       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3518         lt_cv_path_NM="$tmp_nm -p"
3519         break
3520       else
3521         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3522         continue # so that we can try to find one that supports BSD flags
3523       fi
3524     fi
3525   done
3526   IFS="$ac_save_ifs"
3527   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3528 fi
3529 fi
3530
3531 NM="$lt_cv_path_NM"
3532 echo "$ac_t""$NM" 1>&6
3533
3534 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3535 echo "configure:3536: checking for a sed that does not truncate output" >&5
3536 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   # Loop through the user's path and test for sed and gsed.
3540 # Then use that list of sed's as ones to test for truncation.
3541 as_executable_p="test -f"
3542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543 for as_dir in $PATH
3544 do
3545   IFS=$as_save_IFS
3546   test -z "$as_dir" && as_dir=.
3547   for ac_prog in sed gsed; do
3548     for ac_exec_ext in '' $ac_executable_extensions; do
3549       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3550         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3551       fi
3552     done
3553   done
3554 done
3555
3556   # Create a temporary directory, and hook for its removal unless debugging.
3557 $debug ||
3558 {
3559   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3560   trap '{ (exit 1); exit 1; }' 1 2 13 15
3561 }
3562
3563 # Create a (secure) tmp directory for tmp files.
3564 : ${TMPDIR=/tmp}
3565 {
3566   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3567   test -n "$tmp" && test -d "$tmp"
3568 }  ||
3569 {
3570   tmp=$TMPDIR/sed$$-$RANDOM
3571   (umask 077 && mkdir $tmp)
3572 } ||
3573 {
3574    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3575    { (exit 1); exit 1; }
3576 }
3577   _max=0
3578   _count=0
3579   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3580   # along with /bin/sed that truncates output.
3581   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3582     test ! -f ${_sed} && break
3583     cat /dev/null > "$tmp/sed.in"
3584     _count=0
3585     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3586     # Check for GNU sed and select it if it is found.
3587     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3588       lt_cv_path_SED=${_sed}
3589       break
3590     fi
3591     while true; do
3592       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3593       mv "$tmp/sed.tmp" "$tmp/sed.in"
3594       cp "$tmp/sed.in" "$tmp/sed.nl"
3595       echo >>"$tmp/sed.nl"
3596       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3597       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3598       # 40000 chars as input seems more than enough
3599       test $_count -gt 10 && break
3600       _count=`expr $_count + 1`
3601       if test $_count -gt $_max; then
3602         _max=$_count
3603         lt_cv_path_SED=$_sed
3604       fi
3605     done
3606   done
3607   rm -rf "$tmp"
3608
3609 fi
3610
3611 if test "X$SED" != "X"; then
3612   lt_cv_path_SED=$SED
3613 else
3614   SED=$lt_cv_path_SED
3615 fi
3616 echo "$ac_t""$SED" 1>&6
3617
3618 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3619 echo "configure:3620: checking whether ln -s works" >&5
3620 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3621   echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623   rm -f conftestdata
3624 if ln -s X conftestdata 2>/dev/null
3625 then
3626   rm -f conftestdata
3627   ac_cv_prog_LN_S="ln -s"
3628 else
3629   ac_cv_prog_LN_S=ln
3630 fi
3631 fi
3632 LN_S="$ac_cv_prog_LN_S"
3633 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3634   echo "$ac_t""yes" 1>&6
3635 else
3636   echo "$ac_t""no" 1>&6
3637 fi
3638
3639 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3640 echo "configure:3641: checking how to recognise dependent libraries" >&5
3641 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   lt_cv_file_magic_cmd='$MAGIC_CMD'
3645 lt_cv_file_magic_test_file=
3646 lt_cv_deplibs_check_method='unknown'
3647 # Need to set the preceding variable on all platforms that support
3648 # interlibrary dependencies.
3649 # 'none' -- dependencies not supported.
3650 # `unknown' -- same as none, but documents that we really don't know.
3651 # 'pass_all' -- all dependencies passed with no checks.
3652 # 'test_compile' -- check by making test program.
3653 # 'file_magic [[regex]]' -- check by looking for files in library path
3654 # which responds to the $file_magic_cmd with a given egrep regex.
3655 # If you have `file' or equivalent on your system and you're not sure
3656 # whether `pass_all' will *always* work, you probably want this one.
3657
3658 case $host_os in
3659 aix4* | aix5*)
3660   lt_cv_deplibs_check_method=pass_all
3661   ;;
3662
3663 beos*)
3664   lt_cv_deplibs_check_method=pass_all
3665   ;;
3666
3667 bsdi4*)
3668   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3669   lt_cv_file_magic_cmd='/usr/bin/file -L'
3670   lt_cv_file_magic_test_file=/shlib/libc.so
3671   ;;
3672
3673 cygwin* | mingw* | pw32*)
3674   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3675   lt_cv_file_magic_cmd='$OBJDUMP -f'
3676   ;;
3677
3678 darwin* | rhapsody*)
3679   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3680   lt_cv_file_magic_cmd='/usr/bin/file -L'
3681   case "$host_os" in
3682   rhapsody* | darwin1.[012])
3683     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3684     ;;
3685   *) # Darwin 1.3 on
3686     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3687     ;;
3688   esac
3689   ;;
3690
3691 freebsd*)
3692   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3693     case $host_cpu in
3694     i*86 )
3695       # Not sure whether the presence of OpenBSD here was a mistake.
3696       # Let's accept both of them until this is cleared up.
3697       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3698       lt_cv_file_magic_cmd=/usr/bin/file
3699       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3700       ;;
3701     esac
3702   else
3703     lt_cv_deplibs_check_method=pass_all
3704   fi
3705   ;;
3706
3707 gnu*)
3708   lt_cv_deplibs_check_method=pass_all
3709   ;;
3710
3711 hpux10.20*|hpux11*)
3712   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3713   lt_cv_file_magic_cmd=/usr/bin/file
3714   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3715   ;;
3716
3717 irix5* | irix6* | nonstopux*)
3718   case $host_os in
3719   irix5* | nonstopux*)
3720     # this will be overridden with pass_all, but let us keep it just in case
3721     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3722     ;;
3723   *)
3724     case $LD in
3725     *-32|*"-32 ") libmagic=32-bit;;
3726     *-n32|*"-n32 ") libmagic=N32;;
3727     *-64|*"-64 ") libmagic=64-bit;;
3728     *) libmagic=never-match;;
3729     esac
3730     # this will be overridden with pass_all, but let us keep it just in case
3731     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3732     ;;
3733   esac
3734   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3735   lt_cv_deplibs_check_method=pass_all
3736   ;;
3737
3738 # This must be Linux ELF.
3739 linux-gnu*)
3740   case $host_cpu in
3741   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3742     lt_cv_deplibs_check_method=pass_all ;;
3743   *)
3744     # glibc up to 2.1.1 does not perform some relocations on ARM
3745     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3746   esac
3747   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3748   ;;
3749
3750 netbsd*)
3751   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3752     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3753   else
3754     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3755   fi
3756   ;;
3757
3758 newos6*)
3759   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3760   lt_cv_file_magic_cmd=/usr/bin/file
3761   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3762   ;;
3763
3764 openbsd*)
3765   lt_cv_file_magic_cmd=/usr/bin/file
3766   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3767   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3768     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3769   else
3770     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3771   fi
3772   ;;
3773
3774 openedition*)
3775   lt_cv_deplibs_check_method=pass_all
3776   ;;
3777
3778 osf3* | osf4* | osf5*)
3779   # this will be overridden with pass_all, but let us keep it just in case
3780   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3781   lt_cv_file_magic_test_file=/shlib/libc.so
3782   lt_cv_deplibs_check_method=pass_all
3783   ;;
3784
3785 sco3.2v5*)
3786   lt_cv_deplibs_check_method=pass_all
3787   ;;
3788
3789 solaris*)
3790   lt_cv_deplibs_check_method=pass_all
3791   lt_cv_file_magic_test_file=/lib/libc.so
3792   ;;
3793
3794 sysv5uw[78]* | sysv4*uw2*)
3795   lt_cv_deplibs_check_method=pass_all
3796   ;;
3797
3798 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3799   case $host_vendor in
3800   motorola)
3801     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]'
3802     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3803     ;;
3804   ncr)
3805     lt_cv_deplibs_check_method=pass_all
3806     ;;
3807   sequent)
3808     lt_cv_file_magic_cmd='/bin/file'
3809     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3810     ;;
3811   sni)
3812     lt_cv_file_magic_cmd='/bin/file'
3813     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3814     lt_cv_file_magic_test_file=/lib/libc.so
3815     ;;
3816   siemens)
3817     lt_cv_deplibs_check_method=pass_all
3818     ;;
3819   esac
3820   ;;
3821 esac
3822
3823 fi
3824
3825 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3826 file_magic_cmd=$lt_cv_file_magic_cmd
3827 deplibs_check_method=$lt_cv_deplibs_check_method
3828
3829 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3830 echo "configure:3831: checking for object suffix" >&5
3831 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   rm -f conftest*
3835 echo 'int i = 1;' > conftest.$ac_ext
3836 if { (eval echo configure:3837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3837   for ac_file in conftest.*; do
3838     case $ac_file in
3839     *.c) ;;
3840     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3841     esac
3842   done
3843 else
3844   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3845 fi
3846 rm -f conftest*
3847 fi
3848
3849 echo "$ac_t""$ac_cv_objext" 1>&6
3850 OBJEXT=$ac_cv_objext
3851 ac_objext=$ac_cv_objext
3852
3853
3854
3855
3856 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3857 echo "configure:3858: checking for executable suffix" >&5
3858 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3859   echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3862   ac_cv_exeext=.exe
3863 else
3864   rm -f conftest*
3865   echo 'int main () { return 0; }' > conftest.$ac_ext
3866   ac_cv_exeext=
3867   if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3868     for file in conftest.*; do
3869       case $file in
3870       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3871       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3872       esac
3873     done
3874   else
3875     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3876   fi
3877   rm -f conftest*
3878   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3879 fi
3880 fi
3881
3882 EXEEXT=""
3883 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3884 echo "$ac_t""${ac_cv_exeext}" 1>&6
3885 ac_exeext=$EXEEXT
3886
3887 if test $host != $build; then
3888   ac_tool_prefix=${host_alias}-
3889 else
3890   ac_tool_prefix=
3891 fi
3892
3893
3894
3895
3896 # Check for command to grab the raw symbol name followed by C symbol from nm.
3897 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3898 echo "configure:3899: checking command to parse $NM output" >&5
3899 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   
3903 # These are sane defaults that work on at least a few old systems.
3904 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3905
3906 # Character class describing NM global symbol codes.
3907 symcode='[BCDEGRST]'
3908
3909 # Regexp to match symbols that can be accessed directly from C.
3910 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3911
3912 # Transform the above into a raw symbol and a C symbol.
3913 symxfrm='\1 \2\3 \3'
3914
3915 # Transform an extracted symbol line into a proper C declaration
3916 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3917
3918 # Transform an extracted symbol line into symbol name and symbol address
3919 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'"
3920
3921 # Define system-specific variables.
3922 case $host_os in
3923 aix*)
3924   symcode='[BCDT]'
3925   ;;
3926 cygwin* | mingw* | pw32*)
3927   symcode='[ABCDGISTW]'
3928   ;;
3929 hpux*) # Its linker distinguishes data from code symbols
3930   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3931   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'"
3932   ;;
3933 irix* | nonstopux*)
3934   symcode='[BCDEGRST]'
3935   ;;
3936 osf*)
3937   symcode='[BCDEGQRST]'
3938   ;;
3939 solaris* | sysv5*)
3940   symcode='[BDT]'
3941   ;;
3942 sysv4)
3943   symcode='[DFNSTU]'
3944   ;;
3945 esac
3946
3947 # Handle CRLF in mingw tool chain
3948 opt_cr=
3949 case $host_os in
3950 mingw*)
3951   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3952   ;;
3953 esac
3954
3955 # If we're using GNU nm, then use its standard symbol codes.
3956 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3957   symcode='[ABCDGISTW]'
3958 fi
3959
3960 # Try without a prefix undercore, then with it.
3961 for ac_symprfx in "" "_"; do
3962
3963   # Write the raw and C identifiers.
3964 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3965
3966   # Check to see that the pipe works correctly.
3967   pipe_works=no
3968   rm -f conftest*
3969   cat > conftest.$ac_ext <<EOF
3970 #ifdef __cplusplus
3971 extern "C" {
3972 #endif
3973 char nm_test_var;
3974 void nm_test_func(){}
3975 #ifdef __cplusplus
3976 }
3977 #endif
3978 int main(){nm_test_var='a';nm_test_func();return(0);}
3979 EOF
3980
3981   if { (eval echo configure:3982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3982     # Now try to grab the symbols.
3983     nlist=conftest.nm
3984     if { (eval echo configure:3985: \"$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
3985       # Try sorting and uniquifying the output.
3986       if sort "$nlist" | uniq > "$nlist"T; then
3987         mv -f "$nlist"T "$nlist"
3988       else
3989         rm -f "$nlist"T
3990       fi
3991
3992       # Make sure that we snagged all the symbols we need.
3993       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3994         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3995           cat <<EOF > conftest.$ac_ext
3996 #ifdef __cplusplus
3997 extern "C" {
3998 #endif
3999
4000 EOF
4001           # Now generate the symbol file.
4002           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4003
4004           cat <<EOF >> conftest.$ac_ext
4005 #if defined (__STDC__) && __STDC__
4006 # define lt_ptr void *
4007 #else
4008 # define lt_ptr char *
4009 # define const
4010 #endif
4011
4012 /* The mapping between symbol names and symbols. */
4013 const struct {
4014   const char *name;
4015   lt_ptr address;
4016 }
4017 lt_preloaded_symbols[] =
4018 {
4019 EOF
4020           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4021           cat <<\EOF >> conftest.$ac_ext
4022   {0, (lt_ptr) 0}
4023 };
4024
4025 #ifdef __cplusplus
4026 }
4027 #endif
4028 EOF
4029           # Now try linking the two files.
4030           mv conftest.$ac_objext conftstm.$ac_objext
4031           save_LIBS="$LIBS"
4032           save_CFLAGS="$CFLAGS"
4033           LIBS="conftstm.$ac_objext"
4034           CFLAGS="$CFLAGS$no_builtin_flag"
4035           if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4036             pipe_works=yes
4037           fi
4038           LIBS="$save_LIBS"
4039           CFLAGS="$save_CFLAGS"
4040         else
4041           echo "cannot find nm_test_func in $nlist" >&5
4042         fi
4043       else
4044         echo "cannot find nm_test_var in $nlist" >&5
4045       fi
4046     else
4047       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4048     fi
4049   else
4050     echo "$progname: failed program was:" >&5
4051     cat conftest.$ac_ext >&5
4052   fi
4053   rm -f conftest* conftst*
4054
4055   # Do not use the global_symbol_pipe unless it works.
4056   if test "$pipe_works" = yes; then
4057     break
4058   else
4059     lt_cv_sys_global_symbol_pipe=
4060   fi
4061 done
4062
4063 fi
4064
4065 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4066 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4067   global_symbol_to_cdecl=
4068   global_symbol_to_c_name_address=
4069 else
4070   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4071   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4072 fi
4073 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4074 then
4075   echo "$ac_t""failed" 1>&6
4076 else
4077   echo "$ac_t""ok" 1>&6
4078 fi
4079
4080 for ac_hdr in dlfcn.h
4081 do
4082 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4083 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4084 echo "configure:4085: checking for $ac_hdr" >&5
4085 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091 #include <$ac_hdr>
4092 EOF
4093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4094 { (eval echo configure:4095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4096 if test -z "$ac_err"; then
4097   rm -rf conftest*
4098   eval "ac_cv_header_$ac_safe=yes"
4099 else
4100   echo "$ac_err" >&5
4101   echo "configure: failed program was:" >&5
4102   cat conftest.$ac_ext >&5
4103   rm -rf conftest*
4104   eval "ac_cv_header_$ac_safe=no"
4105 fi
4106 rm -f conftest*
4107 fi
4108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4109   echo "$ac_t""yes" 1>&6
4110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4111   cat >> confdefs.h <<EOF
4112 #define $ac_tr_hdr 1
4113 EOF
4114  
4115 else
4116   echo "$ac_t""no" 1>&6
4117 fi
4118 done
4119
4120
4121
4122
4123
4124
4125 # Only perform the check for file, if the check method requires it
4126 case $deplibs_check_method in
4127 file_magic*)
4128   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4129     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4130 echo "configure:4131: checking for ${ac_tool_prefix}file" >&5
4131 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4132   echo $ac_n "(cached) $ac_c" 1>&6
4133 else
4134   case $MAGIC_CMD in
4135   /*)
4136   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4137   ;;
4138   ?:/*)
4139   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4140   ;;
4141   *)
4142   ac_save_MAGIC_CMD="$MAGIC_CMD"
4143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4144   ac_dummy="/usr/bin:$PATH"
4145   for ac_dir in $ac_dummy; do
4146     test -z "$ac_dir" && ac_dir=.
4147     if test -f $ac_dir/${ac_tool_prefix}file; then
4148       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4149       if test -n "$file_magic_test_file"; then
4150         case $deplibs_check_method in
4151         "file_magic "*)
4152           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4153           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4154           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4155             egrep "$file_magic_regex" > /dev/null; then
4156             :
4157           else
4158             cat <<EOF 1>&2
4159
4160 *** Warning: the command libtool uses to detect shared libraries,
4161 *** $file_magic_cmd, produces output that libtool cannot recognize.
4162 *** The result is that libtool may fail to recognize shared libraries
4163 *** as such.  This will affect the creation of libtool libraries that
4164 *** depend on shared libraries, but programs linked with such libtool
4165 *** libraries will work regardless of this problem.  Nevertheless, you
4166 *** may want to report the problem to your system manager and/or to
4167 *** bug-libtool@gnu.org
4168
4169 EOF
4170           fi ;;
4171         esac
4172       fi
4173       break
4174     fi
4175   done
4176   IFS="$ac_save_ifs"
4177   MAGIC_CMD="$ac_save_MAGIC_CMD"
4178   ;;
4179 esac
4180 fi
4181
4182 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4183 if test -n "$MAGIC_CMD"; then
4184   echo "$ac_t""$MAGIC_CMD" 1>&6
4185 else
4186   echo "$ac_t""no" 1>&6
4187 fi
4188
4189 if test -z "$lt_cv_path_MAGIC_CMD"; then
4190   if test -n "$ac_tool_prefix"; then
4191     echo $ac_n "checking for file""... $ac_c" 1>&6
4192 echo "configure:4193: checking for file" >&5
4193 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   case $MAGIC_CMD in
4197   /*)
4198   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4199   ;;
4200   ?:/*)
4201   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4202   ;;
4203   *)
4204   ac_save_MAGIC_CMD="$MAGIC_CMD"
4205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4206   ac_dummy="/usr/bin:$PATH"
4207   for ac_dir in $ac_dummy; do
4208     test -z "$ac_dir" && ac_dir=.
4209     if test -f $ac_dir/file; then
4210       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4211       if test -n "$file_magic_test_file"; then
4212         case $deplibs_check_method in
4213         "file_magic "*)
4214           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4215           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4216           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4217             egrep "$file_magic_regex" > /dev/null; then
4218             :
4219           else
4220             cat <<EOF 1>&2
4221
4222 *** Warning: the command libtool uses to detect shared libraries,
4223 *** $file_magic_cmd, produces output that libtool cannot recognize.
4224 *** The result is that libtool may fail to recognize shared libraries
4225 *** as such.  This will affect the creation of libtool libraries that
4226 *** depend on shared libraries, but programs linked with such libtool
4227 *** libraries will work regardless of this problem.  Nevertheless, you
4228 *** may want to report the problem to your system manager and/or to
4229 *** bug-libtool@gnu.org
4230
4231 EOF
4232           fi ;;
4233         esac
4234       fi
4235       break
4236     fi
4237   done
4238   IFS="$ac_save_ifs"
4239   MAGIC_CMD="$ac_save_MAGIC_CMD"
4240   ;;
4241 esac
4242 fi
4243
4244 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4245 if test -n "$MAGIC_CMD"; then
4246   echo "$ac_t""$MAGIC_CMD" 1>&6
4247 else
4248   echo "$ac_t""no" 1>&6
4249 fi
4250
4251   else
4252     MAGIC_CMD=:
4253   fi
4254 fi
4255
4256   fi
4257   ;;
4258 esac
4259
4260 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4261 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4263 echo "configure:4264: checking for $ac_word" >&5
4264 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   if test -n "$RANLIB"; then
4268   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4269 else
4270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4271   ac_dummy="$PATH"
4272   for ac_dir in $ac_dummy; do
4273     test -z "$ac_dir" && ac_dir=.
4274     if test -f $ac_dir/$ac_word; then
4275       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4276       break
4277     fi
4278   done
4279   IFS="$ac_save_ifs"
4280 fi
4281 fi
4282 RANLIB="$ac_cv_prog_RANLIB"
4283 if test -n "$RANLIB"; then
4284   echo "$ac_t""$RANLIB" 1>&6
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289
4290 if test -z "$ac_cv_prog_RANLIB"; then
4291 if test -n "$ac_tool_prefix"; then
4292   # Extract the first word of "ranlib", so it can be a program name with args.
4293 set dummy ranlib; ac_word=$2
4294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4295 echo "configure:4296: checking for $ac_word" >&5
4296 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   if test -n "$RANLIB"; then
4300   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4301 else
4302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4303   ac_dummy="$PATH"
4304   for ac_dir in $ac_dummy; do
4305     test -z "$ac_dir" && ac_dir=.
4306     if test -f $ac_dir/$ac_word; then
4307       ac_cv_prog_RANLIB="ranlib"
4308       break
4309     fi
4310   done
4311   IFS="$ac_save_ifs"
4312   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4313 fi
4314 fi
4315 RANLIB="$ac_cv_prog_RANLIB"
4316 if test -n "$RANLIB"; then
4317   echo "$ac_t""$RANLIB" 1>&6
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322 else
4323   RANLIB=":"
4324 fi
4325 fi
4326
4327 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4328 set dummy ${ac_tool_prefix}strip; ac_word=$2
4329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_word" >&5
4331 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4332   echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334   if test -n "$STRIP"; then
4335   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4336 else
4337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4338   ac_dummy="$PATH"
4339   for ac_dir in $ac_dummy; do
4340     test -z "$ac_dir" && ac_dir=.
4341     if test -f $ac_dir/$ac_word; then
4342       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4343       break
4344     fi
4345   done
4346   IFS="$ac_save_ifs"
4347 fi
4348 fi
4349 STRIP="$ac_cv_prog_STRIP"
4350 if test -n "$STRIP"; then
4351   echo "$ac_t""$STRIP" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356
4357 if test -z "$ac_cv_prog_STRIP"; then
4358 if test -n "$ac_tool_prefix"; then
4359   # Extract the first word of "strip", so it can be a program name with args.
4360 set dummy strip; ac_word=$2
4361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_word" >&5
4363 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   if test -n "$STRIP"; then
4367   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4368 else
4369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4370   ac_dummy="$PATH"
4371   for ac_dir in $ac_dummy; do
4372     test -z "$ac_dir" && ac_dir=.
4373     if test -f $ac_dir/$ac_word; then
4374       ac_cv_prog_STRIP="strip"
4375       break
4376     fi
4377   done
4378   IFS="$ac_save_ifs"
4379   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4380 fi
4381 fi
4382 STRIP="$ac_cv_prog_STRIP"
4383 if test -n "$STRIP"; then
4384   echo "$ac_t""$STRIP" 1>&6
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389 else
4390   STRIP=":"
4391 fi
4392 fi
4393
4394
4395 enable_dlopen=yes
4396 enable_win32_dll=yes
4397
4398 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4399 if test "${enable_libtool_lock+set}" = set; then
4400   enableval="$enable_libtool_lock"
4401   :
4402 fi
4403
4404 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4405
4406 # Some flags need to be propagated to the compiler or linker for good
4407 # libtool support.
4408 case $host in
4409 *-*-irix6*)
4410   # Find out which ABI we are using.
4411   echo '#line 4412 "configure"' > conftest.$ac_ext
4412   if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4413     case `/usr/bin/file conftest.$ac_objext` in
4414     *32-bit*)
4415       LD="${LD-ld} -32"
4416       ;;
4417     *N32*)
4418       LD="${LD-ld} -n32"
4419       ;;
4420     *64-bit*)
4421       LD="${LD-ld} -64"
4422       ;;
4423     esac
4424   fi
4425   rm -rf conftest*
4426   ;;
4427
4428 *-*-sco3.2v5*)
4429   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4430   SAVE_CFLAGS="$CFLAGS"
4431   CFLAGS="$CFLAGS -belf"
4432   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4433 echo "configure:4434: checking whether the C compiler needs -belf" >&5
4434 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   
4438      ac_ext=c
4439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4440 ac_cpp='$CPP $CPPFLAGS'
4441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4443 cross_compiling=$ac_cv_prog_cc_cross
4444
4445      cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448
4449 int main() {
4450
4451 ; return 0; }
4452 EOF
4453 if { (eval echo configure:4454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4454   rm -rf conftest*
4455   lt_cv_cc_needs_belf=yes
4456 else
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -rf conftest*
4460   lt_cv_cc_needs_belf=no
4461 fi
4462 rm -f conftest*
4463      ac_ext=c
4464 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4465 ac_cpp='$CPP $CPPFLAGS'
4466 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4467 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4468 cross_compiling=$ac_cv_prog_cc_cross
4469
4470 fi
4471
4472 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4473   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4474     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4475     CFLAGS="$SAVE_CFLAGS"
4476   fi
4477   ;;
4478
4479 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4480   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4481 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4483 echo "configure:4484: checking for $ac_word" >&5
4484 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4485   echo $ac_n "(cached) $ac_c" 1>&6
4486 else
4487   if test -n "$DLLTOOL"; then
4488   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4489 else
4490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4491   ac_dummy="$PATH"
4492   for ac_dir in $ac_dummy; do
4493     test -z "$ac_dir" && ac_dir=.
4494     if test -f $ac_dir/$ac_word; then
4495       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4496       break
4497     fi
4498   done
4499   IFS="$ac_save_ifs"
4500 fi
4501 fi
4502 DLLTOOL="$ac_cv_prog_DLLTOOL"
4503 if test -n "$DLLTOOL"; then
4504   echo "$ac_t""$DLLTOOL" 1>&6
4505 else
4506   echo "$ac_t""no" 1>&6
4507 fi
4508
4509
4510 if test -z "$ac_cv_prog_DLLTOOL"; then
4511 if test -n "$ac_tool_prefix"; then
4512   # Extract the first word of "dlltool", so it can be a program name with args.
4513 set dummy dlltool; ac_word=$2
4514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4515 echo "configure:4516: checking for $ac_word" >&5
4516 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   if test -n "$DLLTOOL"; then
4520   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4521 else
4522   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4523   ac_dummy="$PATH"
4524   for ac_dir in $ac_dummy; do
4525     test -z "$ac_dir" && ac_dir=.
4526     if test -f $ac_dir/$ac_word; then
4527       ac_cv_prog_DLLTOOL="dlltool"
4528       break
4529     fi
4530   done
4531   IFS="$ac_save_ifs"
4532   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4533 fi
4534 fi
4535 DLLTOOL="$ac_cv_prog_DLLTOOL"
4536 if test -n "$DLLTOOL"; then
4537   echo "$ac_t""$DLLTOOL" 1>&6
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541
4542 else
4543   DLLTOOL="false"
4544 fi
4545 fi
4546
4547   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4548 set dummy ${ac_tool_prefix}as; ac_word=$2
4549 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4550 echo "configure:4551: checking for $ac_word" >&5
4551 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4552   echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554   if test -n "$AS"; then
4555   ac_cv_prog_AS="$AS" # Let the user override the test.
4556 else
4557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4558   ac_dummy="$PATH"
4559   for ac_dir in $ac_dummy; do
4560     test -z "$ac_dir" && ac_dir=.
4561     if test -f $ac_dir/$ac_word; then
4562       ac_cv_prog_AS="${ac_tool_prefix}as"
4563       break
4564     fi
4565   done
4566   IFS="$ac_save_ifs"
4567 fi
4568 fi
4569 AS="$ac_cv_prog_AS"
4570 if test -n "$AS"; then
4571   echo "$ac_t""$AS" 1>&6
4572 else
4573   echo "$ac_t""no" 1>&6
4574 fi
4575
4576
4577 if test -z "$ac_cv_prog_AS"; then
4578 if test -n "$ac_tool_prefix"; then
4579   # Extract the first word of "as", so it can be a program name with args.
4580 set dummy as; ac_word=$2
4581 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4582 echo "configure:4583: checking for $ac_word" >&5
4583 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4584   echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586   if test -n "$AS"; then
4587   ac_cv_prog_AS="$AS" # Let the user override the test.
4588 else
4589   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4590   ac_dummy="$PATH"
4591   for ac_dir in $ac_dummy; do
4592     test -z "$ac_dir" && ac_dir=.
4593     if test -f $ac_dir/$ac_word; then
4594       ac_cv_prog_AS="as"
4595       break
4596     fi
4597   done
4598   IFS="$ac_save_ifs"
4599   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4600 fi
4601 fi
4602 AS="$ac_cv_prog_AS"
4603 if test -n "$AS"; then
4604   echo "$ac_t""$AS" 1>&6
4605 else
4606   echo "$ac_t""no" 1>&6
4607 fi
4608
4609 else
4610   AS="false"
4611 fi
4612 fi
4613
4614   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4615 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4617 echo "configure:4618: checking for $ac_word" >&5
4618 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4619   echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621   if test -n "$OBJDUMP"; then
4622   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4623 else
4624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4625   ac_dummy="$PATH"
4626   for ac_dir in $ac_dummy; do
4627     test -z "$ac_dir" && ac_dir=.
4628     if test -f $ac_dir/$ac_word; then
4629       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4630       break
4631     fi
4632   done
4633   IFS="$ac_save_ifs"
4634 fi
4635 fi
4636 OBJDUMP="$ac_cv_prog_OBJDUMP"
4637 if test -n "$OBJDUMP"; then
4638   echo "$ac_t""$OBJDUMP" 1>&6
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642
4643
4644 if test -z "$ac_cv_prog_OBJDUMP"; then
4645 if test -n "$ac_tool_prefix"; then
4646   # Extract the first word of "objdump", so it can be a program name with args.
4647 set dummy objdump; ac_word=$2
4648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_word" >&5
4650 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4651   echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653   if test -n "$OBJDUMP"; then
4654   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4655 else
4656   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4657   ac_dummy="$PATH"
4658   for ac_dir in $ac_dummy; do
4659     test -z "$ac_dir" && ac_dir=.
4660     if test -f $ac_dir/$ac_word; then
4661       ac_cv_prog_OBJDUMP="objdump"
4662       break
4663     fi
4664   done
4665   IFS="$ac_save_ifs"
4666   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4667 fi
4668 fi
4669 OBJDUMP="$ac_cv_prog_OBJDUMP"
4670 if test -n "$OBJDUMP"; then
4671   echo "$ac_t""$OBJDUMP" 1>&6
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675
4676 else
4677   OBJDUMP="false"
4678 fi
4679 fi
4680
4681
4682   # recent cygwin and mingw systems supply a stub DllMain which the user
4683   # can override, but on older systems we have to supply one
4684   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4685 echo "configure:4686: checking if libtool should supply DllMain function" >&5
4686 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692
4693 int main() {
4694 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4695       DllMain (0, 0, 0);
4696 ; return 0; }
4697 EOF
4698 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4699   rm -rf conftest*
4700   lt_cv_need_dllmain=no
4701 else
4702   echo "configure: failed program was:" >&5
4703   cat conftest.$ac_ext >&5
4704   rm -rf conftest*
4705   lt_cv_need_dllmain=yes
4706 fi
4707 rm -f conftest*
4708 fi
4709
4710 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4711
4712   case $host/$CC in
4713   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4714     # old mingw systems require "-dll" to link a DLL, while more recent ones
4715     # require "-mdll"
4716     SAVE_CFLAGS="$CFLAGS"
4717     CFLAGS="$CFLAGS -mdll"
4718     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4719 echo "configure:4720: checking how to link DLLs" >&5
4720 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4721   echo $ac_n "(cached) $ac_c" 1>&6
4722 else
4723   cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726
4727 int main() {
4728
4729 ; return 0; }
4730 EOF
4731 if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4732   rm -rf conftest*
4733   lt_cv_cc_dll_switch=-mdll
4734 else
4735   echo "configure: failed program was:" >&5
4736   cat conftest.$ac_ext >&5
4737   rm -rf conftest*
4738   lt_cv_cc_dll_switch=-dll
4739 fi
4740 rm -f conftest*
4741 fi
4742
4743 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4744     CFLAGS="$SAVE_CFLAGS" ;;
4745   *-*-cygwin* | *-*-pw32*)
4746     # cygwin systems need to pass --dll to the linker, and not link
4747     # crt.o which will require a WinMain@16 definition.
4748     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4749   esac
4750   ;;
4751   
4752 esac
4753
4754 # Sed substitution that helps us do robust quoting.  It backslashifies
4755 # metacharacters that are still active within double-quoted strings.
4756 Xsed='sed -e s/^X//'
4757 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4758
4759 # Same as above, but do not quote variable references.
4760 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4761
4762 # Sed substitution to delay expansion of an escaped shell variable in a
4763 # double_quote_subst'ed string.
4764 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4765
4766 # Constants:
4767 rm="rm -f"
4768
4769 # Global variables:
4770 default_ofile=libtool
4771 can_build_shared=yes
4772
4773 # All known linkers require a `.a' archive for static linking (except M$VC,
4774 # which needs '.lib').
4775 libext=a
4776 ltmain="$ac_aux_dir/ltmain.sh"
4777 ofile="$default_ofile"
4778 with_gnu_ld="$lt_cv_prog_gnu_ld"
4779 need_locks="$enable_libtool_lock"
4780
4781 old_CC="$CC"
4782 old_CFLAGS="$CFLAGS"
4783
4784 # Set sane defaults for various variables
4785 test -z "$AR" && AR=ar
4786 test -z "$AR_FLAGS" && AR_FLAGS=cru
4787 test -z "$AS" && AS=as
4788 test -z "$CC" && CC=cc
4789 test -z "$DLLTOOL" && DLLTOOL=dlltool
4790 test -z "$LD" && LD=ld
4791 test -z "$LN_S" && LN_S="ln -s"
4792 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4793 test -z "$NM" && NM=nm
4794 test -z "$OBJDUMP" && OBJDUMP=objdump
4795 test -z "$RANLIB" && RANLIB=:
4796 test -z "$STRIP" && STRIP=:
4797 test -z "$ac_objext" && ac_objext=o
4798
4799 if test x"$host" != x"$build"; then
4800   ac_tool_prefix=${host_alias}-
4801 else
4802   ac_tool_prefix=
4803 fi
4804
4805 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4806 case $host_os in
4807 linux-gnu*) ;;
4808 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4809 esac
4810
4811 case $host_os in
4812 aix3*)
4813   # AIX sometimes has problems with the GCC collect2 program.  For some
4814   # reason, if we set the COLLECT_NAMES environment variable, the problems
4815   # vanish in a puff of smoke.
4816   if test "X${COLLECT_NAMES+set}" != Xset; then
4817     COLLECT_NAMES=
4818     export COLLECT_NAMES
4819   fi
4820   ;;
4821 esac
4822
4823 # Determine commands to create old-style static archives.
4824 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4825 old_postinstall_cmds='chmod 644 $oldlib'
4826 old_postuninstall_cmds=
4827
4828 if test -n "$RANLIB"; then
4829   case $host_os in
4830   openbsd*)
4831     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4832     ;;
4833   *)
4834     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4835     ;;
4836   esac
4837   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4838 fi
4839
4840 # Allow CC to be a program name with arguments.
4841 set dummy $CC
4842 compiler="$2"
4843
4844 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4845 echo "configure:4846: checking for objdir" >&5
4846 rm -f .libs 2>/dev/null
4847 mkdir .libs 2>/dev/null
4848 if test -d .libs; then
4849   objdir=.libs
4850 else
4851   # MS-DOS does not allow filenames that begin with a dot.
4852   objdir=_libs
4853 fi
4854 rmdir .libs 2>/dev/null
4855 echo "$ac_t""$objdir" 1>&6
4856
4857
4858 # Check whether --with-pic or --without-pic was given.
4859 if test "${with_pic+set}" = set; then
4860   withval="$with_pic"
4861   pic_mode="$withval"
4862 else
4863   pic_mode=default
4864 fi
4865
4866 test -z "$pic_mode" && pic_mode=default
4867
4868 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4869 # in isolation, and that seeing it set (from the cache) indicates that
4870 # the associated values are set (in the cache) correctly too.
4871 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4872 echo "configure:4873: checking for $compiler option to produce PIC" >&5
4873 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4874   echo $ac_n "(cached) $ac_c" 1>&6
4875 else
4876    lt_cv_prog_cc_pic=
4877   lt_cv_prog_cc_shlib=
4878   lt_cv_prog_cc_wl=
4879   lt_cv_prog_cc_static=
4880   lt_cv_prog_cc_no_builtin=
4881   lt_cv_prog_cc_can_build_shared=$can_build_shared
4882
4883   if test "$GCC" = yes; then
4884     lt_cv_prog_cc_wl='-Wl,'
4885     lt_cv_prog_cc_static='-static'
4886
4887     case $host_os in
4888     aix*)
4889       # Below there is a dirty hack to force normal static linking with -ldl
4890       # The problem is because libdl dynamically linked with both libc and
4891       # libC (AIX C++ library), which obviously doesn't included in libraries
4892       # list by gcc. This cause undefined symbols with -static flags.
4893       # This hack allows C programs to be linked with "-static -ldl", but
4894       # not sure about C++ programs.
4895       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4896       ;;
4897     amigaos*)
4898       # FIXME: we need at least 68020 code to build shared libraries, but
4899       # adding the `-m68020' flag to GCC prevents building anything better,
4900       # like `-m68040'.
4901       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4902       ;;
4903     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4904       # PIC is the default for these OSes.
4905       ;;
4906     darwin* | rhapsody*)
4907       # PIC is the default on this platform
4908       # Common symbols not allowed in MH_DYLIB files
4909       lt_cv_prog_cc_pic='-fno-common'
4910       ;;
4911     cygwin* | mingw* | pw32* | os2*)
4912       # This hack is so that the source file can tell whether it is being
4913       # built for inclusion in a dll (and should export symbols for example).
4914       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4915       ;;
4916     sysv4*MP*)
4917       if test -d /usr/nec; then
4918          lt_cv_prog_cc_pic=-Kconform_pic
4919       fi
4920       ;;
4921     *)
4922       lt_cv_prog_cc_pic='-fPIC'
4923       ;;
4924     esac
4925   else
4926     # PORTME Check for PIC flags for the system compiler.
4927     case $host_os in
4928     aix3* | aix4* | aix5*)
4929       lt_cv_prog_cc_wl='-Wl,'
4930       # All AIX code is PIC.
4931       if test "$host_cpu" = ia64; then
4932         # AIX 5 now supports IA64 processor
4933         lt_cv_prog_cc_static='-Bstatic'
4934       else
4935         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4936       fi
4937       ;;
4938
4939     hpux9* | hpux10* | hpux11*)
4940       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4941       lt_cv_prog_cc_wl='-Wl,'
4942       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4943       lt_cv_prog_cc_pic='+Z'
4944       ;;
4945
4946     irix5* | irix6* | nonstopux*)
4947       lt_cv_prog_cc_wl='-Wl,'
4948       lt_cv_prog_cc_static='-non_shared'
4949       # PIC (with -KPIC) is the default.
4950       ;;
4951
4952     cygwin* | mingw* | pw32* | os2*)
4953       # This hack is so that the source file can tell whether it is being
4954       # built for inclusion in a dll (and should export symbols for example).
4955       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4956       ;;
4957
4958     newsos6)
4959       lt_cv_prog_cc_pic='-KPIC'
4960       lt_cv_prog_cc_static='-Bstatic'
4961       ;;
4962     
4963     openedition)
4964       # XPLINK code is PIC by default
4965       ;;
4966
4967     osf3* | osf4* | osf5*)
4968       # All OSF/1 code is PIC.
4969       lt_cv_prog_cc_wl='-Wl,'
4970       lt_cv_prog_cc_static='-non_shared'
4971       ;;
4972
4973     sco3.2v5*)
4974       lt_cv_prog_cc_pic='-Kpic'
4975       lt_cv_prog_cc_static='-dn'
4976       lt_cv_prog_cc_shlib='-belf'
4977       ;;
4978
4979     solaris*)
4980       lt_cv_prog_cc_pic='-KPIC'
4981       lt_cv_prog_cc_static='-Bstatic'
4982       lt_cv_prog_cc_wl='-Wl,'
4983       ;;
4984
4985     sunos4*)
4986       lt_cv_prog_cc_pic='-PIC'
4987       lt_cv_prog_cc_static='-Bstatic'
4988       lt_cv_prog_cc_wl='-Qoption ld '
4989       ;;
4990
4991     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4992       lt_cv_prog_cc_pic='-KPIC'
4993       lt_cv_prog_cc_static='-Bstatic'
4994       lt_cv_prog_cc_wl='-Wl,'
4995       ;;
4996
4997     uts4*)
4998       lt_cv_prog_cc_pic='-pic'
4999       lt_cv_prog_cc_static='-Bstatic'
5000       ;;
5001
5002     sysv4*MP*)
5003       if test -d /usr/nec ;then
5004         lt_cv_prog_cc_pic='-Kconform_pic'
5005         lt_cv_prog_cc_static='-Bstatic'
5006       fi
5007       ;;
5008
5009     *)
5010       lt_cv_prog_cc_can_build_shared=no
5011       ;;
5012     esac
5013   fi
5014
5015 fi
5016
5017 if test -z "$lt_cv_prog_cc_pic"; then
5018   echo "$ac_t""none" 1>&6
5019 else
5020   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5021
5022   # Check to make sure the pic_flag actually works.
5023   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5024 echo "configure:5025: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5025   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5026   echo $ac_n "(cached) $ac_c" 1>&6
5027 else
5028       save_CFLAGS="$CFLAGS"
5029     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5030     cat > conftest.$ac_ext <<EOF
5031 #line 5032 "configure"
5032 #include "confdefs.h"
5033
5034 int main() {
5035
5036 ; return 0; }
5037 EOF
5038 if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5039   rm -rf conftest*
5040         case $host_os in
5041       hpux9* | hpux10* | hpux11*)
5042         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5043         # they create non-PIC objects.  So, if there were any warnings, we
5044         # assume that PIC is not supported.
5045         if test -s conftest.err; then
5046           lt_cv_prog_cc_pic_works=no
5047         else
5048           lt_cv_prog_cc_pic_works=yes
5049         fi
5050         ;;
5051       *)
5052         lt_cv_prog_cc_pic_works=yes
5053         ;;
5054       esac
5055     
5056 else
5057   echo "configure: failed program was:" >&5
5058   cat conftest.$ac_ext >&5
5059   rm -rf conftest*
5060         lt_cv_prog_cc_pic_works=no
5061     
5062 fi
5063 rm -f conftest*
5064     CFLAGS="$save_CFLAGS"
5065   
5066 fi
5067
5068
5069   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5070     lt_cv_prog_cc_pic=
5071     lt_cv_prog_cc_can_build_shared=no
5072   else
5073     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5074   fi
5075
5076   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5077 fi
5078
5079 # Check for any special shared library compilation flags.
5080 if test -n "$lt_cv_prog_cc_shlib"; then
5081   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5082   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5083   else
5084    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5085     lt_cv_prog_cc_can_build_shared=no
5086   fi
5087 fi
5088
5089 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5090 echo "configure:5091: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5091 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5092   echo $ac_n "(cached) $ac_c" 1>&6
5093 else
5094     lt_cv_prog_cc_static_works=no
5095   save_LDFLAGS="$LDFLAGS"
5096   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5097   cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   lt_cv_prog_cc_static_works=yes
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111 fi
5112 rm -f conftest*
5113   LDFLAGS="$save_LDFLAGS"
5114
5115 fi
5116
5117
5118 # Belt *and* braces to stop my trousers falling down:
5119 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5120 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5121
5122 pic_flag="$lt_cv_prog_cc_pic"
5123 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5124 wl="$lt_cv_prog_cc_wl"
5125 link_static_flag="$lt_cv_prog_cc_static"
5126 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5127 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5128
5129
5130 # Check to see if options -o and -c are simultaneously supported by compiler
5131 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5132 echo "configure:5133: checking if $compiler supports -c -o file.$ac_objext" >&5
5133 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   
5137 $rm -r conftest 2>/dev/null
5138 mkdir conftest
5139 cd conftest
5140 echo "int some_variable = 0;" > conftest.$ac_ext
5141 mkdir out
5142 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5143 # that will create temporary files in the current directory regardless of
5144 # the output directory.  Thus, making CWD read-only will cause this test
5145 # to fail, enabling locking or at least warning the user not to do parallel
5146 # builds.
5147 chmod -w .
5148 save_CFLAGS="$CFLAGS"
5149 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5150 compiler_c_o=no
5151 if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5152   # The compiler can only warn and ignore the option if not recognized
5153   # So say no if there are warnings
5154   if test -s out/conftest.err; then
5155     lt_cv_compiler_c_o=no
5156   else
5157     lt_cv_compiler_c_o=yes
5158   fi
5159 else
5160   # Append any errors to the config.log.
5161   cat out/conftest.err 1>&5
5162   lt_cv_compiler_c_o=no
5163 fi
5164 CFLAGS="$save_CFLAGS"
5165 chmod u+w .
5166 $rm conftest* out/*
5167 rmdir out
5168 cd ..
5169 rmdir conftest
5170 $rm -r conftest 2>/dev/null
5171
5172 fi
5173
5174 compiler_c_o=$lt_cv_compiler_c_o
5175 echo "$ac_t""$compiler_c_o" 1>&6
5176
5177 if test x"$compiler_c_o" = x"yes"; then
5178   # Check to see if we can write to a .lo
5179   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5180 echo "configure:5181: checking if $compiler supports -c -o file.lo" >&5
5181   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5182   echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184   
5185   lt_cv_compiler_o_lo=no
5186   save_CFLAGS="$CFLAGS"
5187   CFLAGS="$CFLAGS -c -o conftest.lo"
5188   save_objext="$ac_objext"
5189   ac_objext=lo
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 int main() {
5195 int some_variable = 0;
5196 ; return 0; }
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199   rm -rf conftest*
5200       # The compiler can only warn and ignore the option if not recognized
5201     # So say no if there are warnings
5202     if test -s conftest.err; then
5203       lt_cv_compiler_o_lo=no
5204     else
5205       lt_cv_compiler_o_lo=yes
5206     fi
5207   
5208 else
5209   echo "configure: failed program was:" >&5
5210   cat conftest.$ac_ext >&5
5211 fi
5212 rm -f conftest*
5213   ac_objext="$save_objext"
5214   CFLAGS="$save_CFLAGS"
5215   
5216 fi
5217
5218   compiler_o_lo=$lt_cv_compiler_o_lo
5219   echo "$ac_t""$compiler_o_lo" 1>&6
5220 else
5221   compiler_o_lo=no
5222 fi
5223
5224 # Check to see if we can do hard links to lock some files if needed
5225 hard_links="nottested"
5226 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5227   # do not overwrite the value of need_locks provided by the user
5228   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5229 echo "configure:5230: checking if we can lock with hard links" >&5
5230   hard_links=yes
5231   $rm conftest*
5232   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5233   touch conftest.a
5234   ln conftest.a conftest.b 2>&5 || hard_links=no
5235   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5236   echo "$ac_t""$hard_links" 1>&6
5237   if test "$hard_links" = no; then
5238     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5239     need_locks=warn
5240   fi
5241 else
5242   need_locks=no
5243 fi
5244
5245 if test "$GCC" = yes; then
5246   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5247   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5248 echo "configure:5249: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5249   echo "int some_variable = 0;" > conftest.$ac_ext
5250   save_CFLAGS="$CFLAGS"
5251   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5252   compiler_rtti_exceptions=no
5253   cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256
5257 int main() {
5258 int some_variable = 0;
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5262   rm -rf conftest*
5263       # The compiler can only warn and ignore the option if not recognized
5264     # So say no if there are warnings
5265     if test -s conftest.err; then
5266       compiler_rtti_exceptions=no
5267     else
5268       compiler_rtti_exceptions=yes
5269     fi
5270   
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274 fi
5275 rm -f conftest*
5276   CFLAGS="$save_CFLAGS"
5277   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5278
5279   if test "$compiler_rtti_exceptions" = "yes"; then
5280     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5281   else
5282     no_builtin_flag=' -fno-builtin'
5283   fi
5284 fi
5285
5286 # See if the linker supports building shared libraries.
5287 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5288 echo "configure:5289: checking whether the linker ($LD) supports shared libraries" >&5
5289
5290 allow_undefined_flag=
5291 no_undefined_flag=
5292 need_lib_prefix=unknown
5293 need_version=unknown
5294 # when you set need_version to no, make sure it does not cause -set_version
5295 # flags to be left without arguments
5296 archive_cmds=
5297 archive_expsym_cmds=
5298 old_archive_from_new_cmds=
5299 old_archive_from_expsyms_cmds=
5300 export_dynamic_flag_spec=
5301 whole_archive_flag_spec=
5302 thread_safe_flag_spec=
5303 hardcode_into_libs=no
5304 hardcode_libdir_flag_spec=
5305 hardcode_libdir_separator=
5306 hardcode_direct=no
5307 hardcode_minus_L=no
5308 hardcode_shlibpath_var=unsupported
5309 runpath_var=
5310 link_all_deplibs=unknown
5311 always_export_symbols=no
5312 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5313 # include_expsyms should be a list of space-separated symbols to be *always*
5314 # included in the symbol list
5315 include_expsyms=
5316 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5317 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5318 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5319 # as well as any symbol that contains `d'.
5320 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5321 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5322 # platforms (ab)use it in PIC code, but their linkers get confused if
5323 # the symbol is explicitly referenced.  Since portable code cannot
5324 # rely on this symbol name, it's probably fine to never include it in
5325 # preloaded symbol tables.
5326 extract_expsyms_cmds=
5327
5328 case $host_os in
5329 cygwin* | mingw* | pw32*)
5330   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5331   # When not using gcc, we currently assume that we are using
5332   # Microsoft Visual C++.
5333   if test "$GCC" != yes; then
5334     with_gnu_ld=no
5335   fi
5336   ;;
5337 openbsd*)
5338   with_gnu_ld=no
5339   ;;
5340 esac
5341
5342 ld_shlibs=yes
5343 if test "$with_gnu_ld" = yes; then
5344   # If archive_cmds runs LD, not CC, wlarc should be empty
5345   wlarc='${wl}'
5346
5347   # See if GNU ld supports shared libraries.
5348   case $host_os in
5349   aix3* | aix4* | aix5*)
5350     # On AIX, the GNU linker is very broken
5351     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5352     ld_shlibs=no
5353     cat <<EOF 1>&2
5354
5355 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5356 *** to be unable to reliably create shared libraries on AIX.
5357 *** Therefore, libtool is disabling shared libraries support.  If you
5358 *** really care for shared libraries, you may want to modify your PATH
5359 *** so that a non-GNU linker is found, and then restart.
5360
5361 EOF
5362     ;;
5363
5364   amigaos*)
5365     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)'
5366     hardcode_libdir_flag_spec='-L$libdir'
5367     hardcode_minus_L=yes
5368
5369     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5370     # that the semantics of dynamic libraries on AmigaOS, at least up
5371     # to version 4, is to share data among multiple programs linked
5372     # with the same dynamic library.  Since this doesn't match the
5373     # behavior of shared libraries on other platforms, we can use
5374     # them.
5375     ld_shlibs=no
5376     ;;
5377
5378   beos*)
5379     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5380       allow_undefined_flag=unsupported
5381       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5382       # support --undefined.  This deserves some investigation.  FIXME
5383       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5384     else
5385       ld_shlibs=no
5386     fi
5387     ;;
5388
5389   cygwin* | mingw* | pw32*)
5390     # hardcode_libdir_flag_spec is actually meaningless, as there is
5391     # no search path for DLLs.
5392     hardcode_libdir_flag_spec='-L$libdir'
5393     allow_undefined_flag=unsupported
5394     always_export_symbols=yes
5395
5396     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5397       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5398       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5399       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5400       else $CC -o impgen impgen.c ; fi)~
5401       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5402
5403     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5404
5405     # cygwin and mingw dlls have different entry points and sets of symbols
5406     # to exclude.
5407     # FIXME: what about values for MSVC?
5408     dll_entry=__cygwin_dll_entry@12
5409     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5410     case $host_os in
5411     mingw*)
5412       # mingw values
5413       dll_entry=_DllMainCRTStartup@12
5414       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5415       ;;
5416     esac
5417
5418     # mingw and cygwin differ, and it's simplest to just exclude the union
5419     # of the two symbol sets.
5420     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5421
5422     # recent cygwin and mingw systems supply a stub DllMain which the user
5423     # can override, but on older systems we have to supply one (in ltdll.c)
5424     if test "x$lt_cv_need_dllmain" = "xyes"; then
5425       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5426       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~
5427         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5428     else
5429       ltdll_obj=
5430       ltdll_cmds=
5431     fi
5432
5433     # Extract the symbol export list from an `--export-all' def file,
5434     # then regenerate the def file from the symbol export list, so that
5435     # the compiled dll only exports the symbol export list.
5436     # Be careful not to strip the DATA tag left be newer dlltools.
5437     export_symbols_cmds="$ltdll_cmds"'
5438       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5439       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5440
5441     # If the export-symbols file already is a .def file (1st line
5442     # is EXPORTS), use it as is.
5443     # If DATA tags from a recent dlltool are present, honour them!
5444     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5445         cp $export_symbols $output_objdir/$soname-def;
5446       else
5447         echo EXPORTS > $output_objdir/$soname-def;
5448         _lt_hint=1;
5449         cat $export_symbols | while read symbol; do
5450          set dummy \$symbol;
5451          case \$# in
5452            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5453            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5454            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5455          esac;
5456          _lt_hint=`expr 1 + \$_lt_hint`;
5457         done;
5458       fi~
5459       '"$ltdll_cmds"'
5460       $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~
5461       $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~
5462       $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~
5463       $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~
5464       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5465     ;;
5466
5467   netbsd*)
5468     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5469       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5470       wlarc=
5471     else
5472       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5473       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5474     fi
5475     ;;
5476
5477   solaris* | sysv5*)
5478     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5479       ld_shlibs=no
5480       cat <<EOF 1>&2
5481
5482 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5483 *** create shared libraries on Solaris systems.  Therefore, libtool
5484 *** is disabling shared libraries support.  We urge you to upgrade GNU
5485 *** binutils to release 2.9.1 or newer.  Another option is to modify
5486 *** your PATH or compiler configuration so that the native linker is
5487 *** used, and then restart.
5488
5489 EOF
5490     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5491       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5492       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5493     else
5494       ld_shlibs=no
5495     fi
5496     ;;
5497
5498   sunos4*)
5499     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5500     wlarc=
5501     hardcode_direct=yes
5502     hardcode_shlibpath_var=no
5503     ;;
5504
5505   *)
5506     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5507       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5508       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5509     else
5510       ld_shlibs=no
5511     fi
5512     ;;
5513   esac
5514
5515   if test "$ld_shlibs" = yes; then
5516     runpath_var=LD_RUN_PATH
5517     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5518     export_dynamic_flag_spec='${wl}--export-dynamic'
5519     case $host_os in
5520     cygwin* | mingw* | pw32*)
5521       # dlltool doesn't understand --whole-archive et. al.
5522       whole_archive_flag_spec=
5523       ;;
5524     *)
5525       # ancient GNU ld didn't support --whole-archive et. al.
5526       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5527         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5528       else
5529         whole_archive_flag_spec=
5530       fi
5531       ;;
5532     esac
5533   fi
5534 else
5535   # PORTME fill in a description of your system's linker (not GNU ld)
5536   case $host_os in
5537   aix3*)
5538     allow_undefined_flag=unsupported
5539     always_export_symbols=yes
5540     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'
5541     # Note: this linker hardcodes the directories in LIBPATH if there
5542     # are no directories specified by -L.
5543     hardcode_minus_L=yes
5544     if test "$GCC" = yes && test -z "$link_static_flag"; then
5545       # Neither direct hardcoding nor static linking is supported with a
5546       # broken collect2.
5547       hardcode_direct=unsupported
5548     fi
5549     ;;
5550
5551   aix4* | aix5*)
5552     if test "$host_cpu" = ia64; then
5553       # On IA64, the linker does run time linking by default, so we don't
5554       # have to do anything special.
5555       aix_use_runtimelinking=no
5556       exp_sym_flag='-Bexport'
5557       no_entry_flag=""
5558     else
5559       aix_use_runtimelinking=no
5560
5561       # Test if we are trying to use run time linking or normal
5562       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5563       # need to do runtime linking.
5564       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5565         for ld_flag in $LDFLAGS; do
5566           case $ld_flag in
5567           *-brtl*)
5568             aix_use_runtimelinking=yes
5569             break
5570           ;;
5571           esac
5572         done
5573       esac
5574
5575       exp_sym_flag='-bexport'
5576       no_entry_flag='-bnoentry'
5577     fi
5578
5579     # When large executables or shared objects are built, AIX ld can
5580     # have problems creating the table of contents.  If linking a library
5581     # or program results in "error TOC overflow" add -mminimal-toc to
5582     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5583     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5584
5585     hardcode_direct=yes
5586     archive_cmds=''
5587     hardcode_libdir_separator=':'
5588     if test "$GCC" = yes; then
5589       case $host_os in aix4.[012]|aix4.[012].*)
5590         collect2name=`${CC} -print-prog-name=collect2`
5591         if test -f "$collect2name" && \
5592           strings "$collect2name" | grep resolve_lib_name >/dev/null
5593         then
5594           # We have reworked collect2
5595           hardcode_direct=yes
5596         else
5597           # We have old collect2
5598           hardcode_direct=unsupported
5599           # It fails to find uninstalled libraries when the uninstalled
5600           # path is not listed in the libpath.  Setting hardcode_minus_L
5601           # to unsupported forces relinking
5602           hardcode_minus_L=yes
5603           hardcode_libdir_flag_spec='-L$libdir'
5604           hardcode_libdir_separator=
5605         fi
5606       esac
5607
5608       shared_flag='-shared'
5609     else
5610       # not using gcc
5611       if test "$host_cpu" = ia64; then
5612         shared_flag='${wl}-G'
5613       else
5614         if test "$aix_use_runtimelinking" = yes; then
5615           shared_flag='${wl}-G'
5616         else
5617           shared_flag='${wl}-bM:SRE'
5618         fi
5619       fi
5620     fi
5621
5622     # It seems that -bexpall can do strange things, so it is better to
5623     # generate a list of symbols to export.
5624     always_export_symbols=yes
5625     if test "$aix_use_runtimelinking" = yes; then
5626       # Warning - without using the other runtime loading flags (-brtl),
5627       # -berok will link without error, but may produce a broken library.
5628       allow_undefined_flag='-berok'
5629       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5630       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"
5631     else
5632       if test "$host_cpu" = ia64; then
5633         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5634         allow_undefined_flag="-z nodefs"
5635         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"
5636       else
5637         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5638         # Warning - without using the other run time loading flags,
5639         # -berok will link without error, but may produce a broken library.
5640         allow_undefined_flag='${wl}-berok'
5641         # This is a bit strange, but is similar to how AIX traditionally builds
5642         # it's shared libraries.
5643         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'
5644       fi
5645     fi
5646     ;;
5647
5648   amigaos*)
5649     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)'
5650     hardcode_libdir_flag_spec='-L$libdir'
5651     hardcode_minus_L=yes
5652     # see comment about different semantics on the GNU ld section
5653     ld_shlibs=no
5654     ;;
5655
5656   cygwin* | mingw* | pw32*)
5657     # When not using gcc, we currently assume that we are using
5658     # Microsoft Visual C++.
5659     # hardcode_libdir_flag_spec is actually meaningless, as there is
5660     # no search path for DLLs.
5661     hardcode_libdir_flag_spec=' '
5662     allow_undefined_flag=unsupported
5663     # Tell ltmain to make .lib files, not .a files.
5664     libext=lib
5665     # FIXME: Setting linknames here is a bad hack.
5666     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5667     # The linker will automatically build a .lib file if we build a DLL.
5668     old_archive_from_new_cmds='true'
5669     # FIXME: Should let the user specify the lib program.
5670     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5671     fix_srcfile_path='`cygpath -w "$srcfile"`'
5672     ;;
5673
5674   darwin* | rhapsody*)
5675     case "$host_os" in
5676     rhapsody* | darwin1.[012])
5677       allow_undefined_flag='-undefined suppress'
5678       ;;
5679     *) # Darwin 1.3 on
5680       allow_undefined_flag='-flat_namespace -undefined suppress'
5681       ;;
5682     esac
5683     # FIXME: Relying on posixy $() will cause problems for
5684     #        cross-compilation, but unfortunately the echo tests do not
5685     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5686     #        `"' quotes if we put them in here... so don't!
5687     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)'
5688     # We need to add '_' to the symbols in $export_symbols first
5689     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5690     hardcode_direct=yes
5691     hardcode_shlibpath_var=no
5692     whole_archive_flag_spec='-all_load $convenience'
5693     ;;
5694
5695   freebsd1*)
5696     ld_shlibs=no
5697     ;;
5698
5699   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5700   # support.  Future versions do this automatically, but an explicit c++rt0.o
5701   # does not break anything, and helps significantly (at the cost of a little
5702   # extra space).
5703   freebsd2.2*)
5704     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5705     hardcode_libdir_flag_spec='-R$libdir'
5706     hardcode_direct=yes
5707     hardcode_shlibpath_var=no
5708     ;;
5709
5710   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5711   freebsd2*)
5712     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5713     hardcode_direct=yes
5714     hardcode_minus_L=yes
5715     hardcode_shlibpath_var=no
5716     ;;
5717
5718   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5719   freebsd*)
5720     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5721     hardcode_libdir_flag_spec='-R$libdir'
5722     hardcode_direct=yes
5723     hardcode_shlibpath_var=no
5724     ;;
5725
5726   hpux9* | hpux10* | hpux11*)
5727     case $host_os in
5728     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' ;;
5729     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5730     esac
5731     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5732     hardcode_libdir_separator=:
5733     hardcode_direct=yes
5734     hardcode_minus_L=yes # Not in the search PATH, but as the default
5735                          # location of the library.
5736     export_dynamic_flag_spec='${wl}-E'
5737     ;;
5738
5739   irix5* | irix6* | nonstopux*)
5740     if test "$GCC" = yes; then
5741       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'
5742       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5743     else
5744       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'
5745       hardcode_libdir_flag_spec='-rpath $libdir'
5746     fi
5747     hardcode_libdir_separator=:
5748     link_all_deplibs=yes
5749     ;;
5750
5751   netbsd*)
5752     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5753       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5754     else
5755       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5756     fi
5757     hardcode_libdir_flag_spec='-R$libdir'
5758     hardcode_direct=yes
5759     hardcode_shlibpath_var=no
5760     ;;
5761
5762   newsos6)
5763     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5764     hardcode_direct=yes
5765     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5766     hardcode_libdir_separator=:
5767     hardcode_shlibpath_var=no
5768     ;;
5769
5770   openbsd*)
5771     hardcode_direct=yes
5772     hardcode_shlibpath_var=no
5773     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5774       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5775       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5776       export_dynamic_flag_spec='${wl}-E'
5777     else
5778       case "$host_os" in
5779       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5780         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5781         hardcode_libdir_flag_spec='-R$libdir'
5782         ;;
5783       *)
5784         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5785         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5786         ;;
5787       esac
5788     fi
5789     ;;
5790
5791   openedition*)
5792     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5793         cp \$linknames \$output_objdir && linknames=''"
5794     export_dynamic_flag_spec="-Wl,DLL"
5795     ;;
5796
5797   os2*)
5798     hardcode_libdir_flag_spec='-L$libdir'
5799     hardcode_minus_L=yes
5800     allow_undefined_flag=unsupported
5801     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'
5802     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5803     ;;
5804
5805   osf3*)
5806     if test "$GCC" = yes; then
5807       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5808       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'
5809     else
5810       allow_undefined_flag=' -expect_unresolved \*'
5811       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'
5812     fi
5813     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5814     hardcode_libdir_separator=:
5815     ;;
5816
5817   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5818     if test "$GCC" = yes; then
5819       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5820       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'
5821       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5822     else
5823       allow_undefined_flag=' -expect_unresolved \*'
5824       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'
5825       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5826       $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'
5827
5828       #Both c and cxx compiler support -rpath directly
5829       hardcode_libdir_flag_spec='-rpath $libdir'
5830     fi
5831     hardcode_libdir_separator=:
5832     ;;
5833
5834   sco3.2v5*)
5835     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5836     hardcode_shlibpath_var=no
5837     runpath_var=LD_RUN_PATH
5838     hardcode_runpath_var=yes
5839     export_dynamic_flag_spec='${wl}-Bexport'
5840     ;;
5841
5842   solaris*)
5843     # gcc --version < 3.0 without binutils cannot create self contained
5844     # shared libraries reliably, requiring libgcc.a to resolve some of
5845     # the object symbols generated in some cases.  Libraries that use
5846     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5847     # a copy of libgcc.a into every shared library to guarantee resolving
5848     # such symbols causes other problems:  According to Tim Van Holder
5849     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5850     # (to the application) exception stack for one thing.
5851     no_undefined_flag=' -z defs'
5852     if test "$GCC" = yes; then
5853       case `$CC --version 2>/dev/null` in
5854       [12].*)
5855         cat <<EOF 1>&2
5856
5857 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5858 *** create self contained shared libraries on Solaris systems, without
5859 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5860 *** -no-undefined support, which will at least allow you to build shared
5861 *** libraries.  However, you may find that when you link such libraries
5862 *** into an application without using GCC, you have to manually add
5863 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5864 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5865 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5866
5867 EOF
5868         no_undefined_flag=
5869         ;;
5870       esac
5871     fi
5872     # $CC -shared without GNU ld will not create a library from C++
5873     # object files and a static libstdc++, better avoid it by now
5874     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5875     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5876                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5877     hardcode_libdir_flag_spec='-R$libdir'
5878     hardcode_shlibpath_var=no
5879     case $host_os in
5880     solaris2.[0-5] | solaris2.[0-5].*) ;;
5881     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5882       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5883     esac
5884     link_all_deplibs=yes
5885     ;;
5886
5887   sunos4*)
5888     if test "x$host_vendor" = xsequent; then
5889       # Use $CC to link under sequent, because it throws in some extra .o
5890       # files that make .init and .fini sections work.
5891       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5892     else
5893       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5894     fi
5895     hardcode_libdir_flag_spec='-L$libdir'
5896     hardcode_direct=yes
5897     hardcode_minus_L=yes
5898     hardcode_shlibpath_var=no
5899     ;;
5900
5901   sysv4)
5902     case $host_vendor in
5903       sni)
5904         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5905         hardcode_direct=yes # is this really true???
5906         ;;
5907       siemens)
5908         ## LD is ld it makes a PLAMLIB
5909         ## CC just makes a GrossModule.
5910         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5911         reload_cmds='$CC -r -o $output$reload_objs'
5912         hardcode_direct=no
5913         ;;
5914       motorola)
5915         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5916         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5917         ;;
5918     esac
5919     runpath_var='LD_RUN_PATH'
5920     hardcode_shlibpath_var=no
5921     ;;
5922
5923   sysv4.3*)
5924     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5925     hardcode_shlibpath_var=no
5926     export_dynamic_flag_spec='-Bexport'
5927     ;;
5928
5929   sysv5*)
5930     no_undefined_flag=' -z text'
5931     # $CC -shared without GNU ld will not create a library from C++
5932     # object files and a static libstdc++, better avoid it by now
5933     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5934     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5935                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5936     hardcode_libdir_flag_spec=
5937     hardcode_shlibpath_var=no
5938     runpath_var='LD_RUN_PATH'
5939     ;;
5940
5941   uts4*)
5942     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5943     hardcode_libdir_flag_spec='-L$libdir'
5944     hardcode_shlibpath_var=no
5945     ;;
5946
5947   dgux*)
5948     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5949     hardcode_libdir_flag_spec='-L$libdir'
5950     hardcode_shlibpath_var=no
5951     ;;
5952
5953   sysv4*MP*)
5954     if test -d /usr/nec; then
5955       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5956       hardcode_shlibpath_var=no
5957       runpath_var=LD_RUN_PATH
5958       hardcode_runpath_var=yes
5959       ld_shlibs=yes
5960     fi
5961     ;;
5962
5963   sysv4.2uw2*)
5964     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5965     hardcode_direct=yes
5966     hardcode_minus_L=no
5967     hardcode_shlibpath_var=no
5968     hardcode_runpath_var=yes
5969     runpath_var=LD_RUN_PATH
5970     ;;
5971
5972   sysv5uw7* | unixware7*)
5973     no_undefined_flag='${wl}-z ${wl}text'
5974     if test "$GCC" = yes; then
5975       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5976     else
5977       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5978     fi
5979     runpath_var='LD_RUN_PATH'
5980     hardcode_shlibpath_var=no
5981     ;;
5982
5983   *)
5984     ld_shlibs=no
5985     ;;
5986   esac
5987 fi
5988 echo "$ac_t""$ld_shlibs" 1>&6
5989 test "$ld_shlibs" = no && can_build_shared=no
5990
5991 # Check hardcoding attributes.
5992 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5993 echo "configure:5994: checking how to hardcode library paths into programs" >&5
5994 hardcode_action=
5995 if test -n "$hardcode_libdir_flag_spec" || \
5996    test -n "$runpath_var"; then
5997
5998   # We can hardcode non-existant directories.
5999   if test "$hardcode_direct" != no &&
6000      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6001      # have to relink, otherwise we might link with an installed library
6002      # when we should be linking with a yet-to-be-installed one
6003      ## test "$hardcode_shlibpath_var" != no &&
6004      test "$hardcode_minus_L" != no; then
6005     # Linking always hardcodes the temporary library directory.
6006     hardcode_action=relink
6007   else
6008     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6009     hardcode_action=immediate
6010   fi
6011 else
6012   # We cannot hardcode anything, or else we can only hardcode existing
6013   # directories.
6014   hardcode_action=unsupported
6015 fi
6016 echo "$ac_t""$hardcode_action" 1>&6
6017
6018 striplib=
6019 old_striplib=
6020 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6021 echo "configure:6022: checking whether stripping libraries is possible" >&5
6022 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6023   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6024   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6025   echo "$ac_t""yes" 1>&6
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029
6030 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6031 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6032
6033 # PORTME Fill in your ld.so characteristics
6034 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6035 echo "configure:6036: checking dynamic linker characteristics" >&5
6036 library_names_spec=
6037 libname_spec='lib$name'
6038 soname_spec=
6039 postinstall_cmds=
6040 postuninstall_cmds=
6041 finish_cmds=
6042 finish_eval=
6043 shlibpath_var=
6044 shlibpath_overrides_runpath=unknown
6045 version_type=none
6046 dynamic_linker="$host_os ld.so"
6047 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6048 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6049
6050 case $host_os in
6051 aix3*)
6052   version_type=linux
6053   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6054   shlibpath_var=LIBPATH
6055
6056   # AIX has no versioning support, so we append a major version to the name.
6057   soname_spec='${libname}${release}.so$major'
6058   ;;
6059
6060 aix4* | aix5*)
6061   version_type=linux
6062   need_lib_prefix=no
6063   need_version=no
6064   hardcode_into_libs=yes
6065   if test "$host_cpu" = ia64; then
6066     # AIX 5 supports IA64
6067     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6068     shlibpath_var=LD_LIBRARY_PATH
6069   else
6070     # With GCC up to 2.95.x, collect2 would create an import file
6071     # for dependence libraries.  The import file would start with
6072     # the line `#! .'.  This would cause the generated library to
6073     # depend on `.', always an invalid library.  This was fixed in
6074     # development snapshots of GCC prior to 3.0.
6075     case $host_os in
6076       aix4 | aix4.[01] | aix4.[01].*)
6077         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6078              echo ' yes '
6079              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6080           :
6081         else
6082           can_build_shared=no
6083         fi
6084         ;;
6085     esac
6086     # AIX (on Power*) has no versioning support, so currently we can
6087     # not hardcode correct soname into executable. Probably we can
6088     # add versioning support to collect2, so additional links can
6089     # be useful in future.
6090     if test "$aix_use_runtimelinking" = yes; then
6091       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6092       # instead of lib<name>.a to let people know that these are not
6093       # typical AIX shared libraries.
6094       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6095     else
6096       # We preserve .a as extension for shared libraries through AIX4.2
6097       # and later when we are not doing run time linking.
6098       library_names_spec='${libname}${release}.a $libname.a'
6099       soname_spec='${libname}${release}.so$major'
6100     fi
6101     shlibpath_var=LIBPATH
6102   fi
6103   hardcode_into_libs=yes
6104   ;;
6105
6106 amigaos*)
6107   library_names_spec='$libname.ixlibrary $libname.a'
6108   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6109   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'
6110   ;;
6111
6112 beos*)
6113   library_names_spec='${libname}.so'
6114   dynamic_linker="$host_os ld.so"
6115   shlibpath_var=LIBRARY_PATH
6116   ;;
6117
6118 bsdi4*)
6119   version_type=linux
6120   need_version=no
6121   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6122   soname_spec='${libname}${release}.so$major'
6123   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6124   shlibpath_var=LD_LIBRARY_PATH
6125   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6126   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6127   export_dynamic_flag_spec=-rdynamic
6128   # the default ld.so.conf also contains /usr/contrib/lib and
6129   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6130   # libtool to hard-code these into programs
6131   ;;
6132
6133 cygwin* | mingw* | pw32*)
6134   version_type=windows
6135   need_version=no
6136   need_lib_prefix=no
6137   case $GCC,$host_os in
6138   yes,cygwin*)
6139     library_names_spec='$libname.dll.a'
6140     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6141     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6142       dldir=$destdir/`dirname \$dlpath`~
6143       test -d \$dldir || mkdir -p \$dldir~
6144       $install_prog .libs/$dlname \$dldir/$dlname'
6145     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6146       dlpath=$dir/\$dldll~
6147        $rm \$dlpath'
6148     ;;
6149   yes,mingw*)
6150     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6151     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6152     ;;
6153   yes,pw32*)
6154     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6155     ;;
6156   *)
6157     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6158     ;;
6159   esac
6160   dynamic_linker='Win32 ld.exe'
6161   # FIXME: first we should search . and the directory the executable is in
6162   shlibpath_var=PATH
6163   ;;
6164
6165 darwin* | rhapsody*)
6166   dynamic_linker="$host_os dyld"
6167   version_type=darwin
6168   need_lib_prefix=no
6169   need_version=no
6170   # FIXME: Relying on posixy $() will cause problems for
6171   #        cross-compilation, but unfortunately the echo tests do not
6172   #        yet detect zsh echo's removal of \ escapes.
6173   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)'
6174   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6175   shlibpath_overrides_runpath=yes
6176   shlibpath_var=DYLD_LIBRARY_PATH
6177   ;;
6178
6179 freebsd1*)
6180   dynamic_linker=no
6181   ;;
6182
6183 freebsd*)
6184   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6185   version_type=freebsd-$objformat
6186   case $version_type in
6187     freebsd-elf*)
6188       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6189       need_version=no
6190       need_lib_prefix=no
6191       ;;
6192     freebsd-*)
6193       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6194       need_version=yes
6195       ;;
6196   esac
6197   shlibpath_var=LD_LIBRARY_PATH
6198   case $host_os in
6199   freebsd2*)
6200     shlibpath_overrides_runpath=yes
6201     ;;
6202   *)
6203     shlibpath_overrides_runpath=no
6204     hardcode_into_libs=yes
6205     ;;
6206   esac
6207   ;;
6208
6209 gnu*)
6210   version_type=linux
6211   need_lib_prefix=no
6212   need_version=no
6213   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6214   soname_spec='${libname}${release}.so$major'
6215   shlibpath_var=LD_LIBRARY_PATH
6216   hardcode_into_libs=yes
6217   ;;
6218
6219 hpux9* | hpux10* | hpux11*)
6220   # Give a soname corresponding to the major version so that dld.sl refuses to
6221   # link against other versions.
6222   dynamic_linker="$host_os dld.sl"
6223   version_type=sunos
6224   need_lib_prefix=no
6225   need_version=no
6226   shlibpath_var=SHLIB_PATH
6227   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6228   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6229   soname_spec='${libname}${release}.sl$major'
6230   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6231   postinstall_cmds='chmod 555 $lib'
6232   ;;
6233
6234 irix5* | irix6* | nonstopux*)
6235   case $host_os in
6236     nonstopux*) version_type=nonstopux ;;
6237     *)          version_type=irix ;;
6238   esac
6239   need_lib_prefix=no
6240   need_version=no
6241   soname_spec='${libname}${release}.so$major'
6242   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6243   case $host_os in
6244   irix5* | nonstopux*)
6245     libsuff= shlibsuff=
6246     ;;
6247   *)
6248     case $LD in # libtool.m4 will add one of these switches to LD
6249     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6250     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6251     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6252     *) libsuff= shlibsuff= libmagic=never-match;;
6253     esac
6254     ;;
6255   esac
6256   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6257   shlibpath_overrides_runpath=no
6258   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6259   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6260   ;;
6261
6262 # No shared lib support for Linux oldld, aout, or coff.
6263 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6264   dynamic_linker=no
6265   ;;
6266
6267 # This must be Linux ELF.
6268 linux-gnu*)
6269   version_type=linux
6270   need_lib_prefix=no
6271   need_version=no
6272   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6273   soname_spec='${libname}${release}.so$major'
6274   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6275   shlibpath_var=LD_LIBRARY_PATH
6276   shlibpath_overrides_runpath=no
6277   # This implies no fast_install, which is unacceptable.
6278   # Some rework will be needed to allow for fast_install
6279   # before this can be enabled.
6280   hardcode_into_libs=yes
6281
6282   # We used to test for /lib/ld.so.1 and disable shared libraries on
6283   # powerpc, because MkLinux only supported shared libraries with the
6284   # GNU dynamic linker.  Since this was broken with cross compilers,
6285   # most powerpc-linux boxes support dynamic linking these days and
6286   # people can always --disable-shared, the test was removed, and we
6287   # assume the GNU/Linux dynamic linker is in use.
6288   dynamic_linker='GNU/Linux ld.so'
6289   ;;
6290
6291 netbsd*)
6292   version_type=sunos
6293   need_lib_prefix=no
6294   need_version=no
6295   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6296     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6297     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6298     dynamic_linker='NetBSD (a.out) ld.so'
6299   else
6300     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6301     soname_spec='${libname}${release}.so$major'
6302     dynamic_linker='NetBSD ld.elf_so'
6303   fi
6304   shlibpath_var=LD_LIBRARY_PATH
6305   shlibpath_overrides_runpath=yes
6306   hardcode_into_libs=yes
6307   ;;
6308
6309 newsos6)
6310   version_type=linux
6311   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6312   shlibpath_var=LD_LIBRARY_PATH
6313   shlibpath_overrides_runpath=yes
6314   ;;
6315
6316 openbsd*)
6317   version_type=sunos
6318   need_lib_prefix=no
6319   need_version=no
6320   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6321     case "$host_os" in
6322     openbsd2.[89] | openbsd2.[89].*)
6323       shlibpath_overrides_runpath=no
6324       ;;
6325     *)
6326       shlibpath_overrides_runpath=yes
6327       ;;
6328     esac
6329   else
6330     shlibpath_overrides_runpath=yes
6331   fi
6332   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6333   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6334   shlibpath_var=LD_LIBRARY_PATH
6335   ;;
6336
6337 openedition*)
6338   need_lib_prefix=no
6339   need_version=no
6340   shlibpath_overrides_runpath=yes
6341   shlibpath_var=LIBPATH
6342   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6343   # the library's exports are in libname.x; this is the file that must
6344   # actually be linked with to use a DLL.
6345   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6346   ;;
6347
6348 os2*)
6349   libname_spec='$name'
6350   need_lib_prefix=no
6351   library_names_spec='$libname.dll $libname.a'
6352   dynamic_linker='OS/2 ld.exe'
6353   shlibpath_var=LIBPATH
6354   ;;
6355
6356 osf3* | osf4* | osf5*)
6357   version_type=osf
6358   need_version=no
6359   soname_spec='${libname}${release}.so$major'
6360   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6361   shlibpath_var=LD_LIBRARY_PATH
6362   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6363   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6364   hardcode_into_libs=yes
6365   ;;
6366
6367 sco3.2v5*)
6368   version_type=osf
6369   soname_spec='${libname}${release}.so$major'
6370   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6371   shlibpath_var=LD_LIBRARY_PATH
6372   ;;
6373
6374 solaris*)
6375   version_type=linux
6376   need_lib_prefix=no
6377   need_version=no
6378   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6379   soname_spec='${libname}${release}.so$major'
6380   shlibpath_var=LD_LIBRARY_PATH
6381   shlibpath_overrides_runpath=yes
6382   hardcode_into_libs=yes
6383   # ldd complains unless libraries are executable
6384   postinstall_cmds='chmod +x $lib'
6385   ;;
6386
6387 sunos4*)
6388   version_type=sunos
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6390   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6391   shlibpath_var=LD_LIBRARY_PATH
6392   shlibpath_overrides_runpath=yes
6393   if test "$with_gnu_ld" = yes; then
6394     need_lib_prefix=no
6395   fi
6396   need_version=yes
6397   ;;
6398
6399 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6400   version_type=linux
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6402   soname_spec='${libname}${release}.so$major'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   case $host_vendor in
6405     sni)
6406       shlibpath_overrides_runpath=no
6407       need_lib_prefix=no
6408       export_dynamic_flag_spec='${wl}-Blargedynsym'
6409       runpath_var=LD_RUN_PATH
6410       ;;
6411     siemens)
6412       need_lib_prefix=no
6413       ;;
6414     motorola)
6415       need_lib_prefix=no
6416       need_version=no
6417       shlibpath_overrides_runpath=no
6418       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6419       ;;
6420   esac
6421   ;;
6422
6423 uts4*)
6424   version_type=linux
6425   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6426   soname_spec='${libname}${release}.so$major'
6427   shlibpath_var=LD_LIBRARY_PATH
6428   ;;
6429
6430 dgux*)
6431   version_type=linux
6432   need_lib_prefix=no
6433   need_version=no
6434   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6435   soname_spec='${libname}${release}.so$major'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   ;;
6438
6439 sysv4*MP*)
6440   if test -d /usr/nec ;then
6441     version_type=linux
6442     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6443     soname_spec='$libname.so.$major'
6444     shlibpath_var=LD_LIBRARY_PATH
6445   fi
6446   ;;
6447
6448 *)
6449   dynamic_linker=no
6450   ;;
6451 esac
6452 echo "$ac_t""$dynamic_linker" 1>&6
6453 test "$dynamic_linker" = no && can_build_shared=no
6454
6455 # Report the final consequences.
6456 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6457 echo "configure:6458: checking if libtool supports shared libraries" >&5
6458 echo "$ac_t""$can_build_shared" 1>&6
6459
6460 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6461 echo "configure:6462: checking whether to build shared libraries" >&5
6462 test "$can_build_shared" = "no" && enable_shared=no
6463
6464 # On AIX, shared libraries and static libraries use the same namespace, and
6465 # are all built from PIC.
6466 case "$host_os" in
6467 aix3*)
6468   test "$enable_shared" = yes && enable_static=no
6469   if test -n "$RANLIB"; then
6470     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6471     postinstall_cmds='$RANLIB $lib'
6472   fi
6473   ;;
6474
6475 aix4*)
6476   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6477     test "$enable_shared" = yes && enable_static=no
6478   fi
6479   ;;
6480 esac
6481 echo "$ac_t""$enable_shared" 1>&6
6482
6483 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6484 echo "configure:6485: checking whether to build static libraries" >&5
6485 # Make sure either enable_shared or enable_static is yes.
6486 test "$enable_shared" = yes || enable_static=yes
6487 echo "$ac_t""$enable_static" 1>&6
6488
6489 if test "$hardcode_action" = relink; then
6490   # Fast installation is not supported
6491   enable_fast_install=no
6492 elif test "$shlibpath_overrides_runpath" = yes ||
6493      test "$enable_shared" = no; then
6494   # Fast installation is not necessary
6495   enable_fast_install=needless
6496 fi
6497
6498 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6499 if test "$GCC" = yes; then
6500   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6501 fi
6502
6503 if test "x$enable_dlopen" != xyes; then
6504   enable_dlopen=unknown
6505   enable_dlopen_self=unknown
6506   enable_dlopen_self_static=unknown
6507 else
6508   lt_cv_dlopen=no
6509   lt_cv_dlopen_libs=
6510
6511   case $host_os in
6512   beos*)
6513     lt_cv_dlopen="load_add_on"
6514     lt_cv_dlopen_libs=
6515     lt_cv_dlopen_self=yes
6516     ;;
6517
6518   cygwin* | mingw* | pw32*)
6519     lt_cv_dlopen="LoadLibrary"
6520     lt_cv_dlopen_libs=
6521    ;;
6522
6523   *)
6524     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6525 echo "configure:6526: checking for dllload" >&5
6526 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6527   echo $ac_n "(cached) $ac_c" 1>&6
6528 else
6529   cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* System header to define __stub macros and hopefully few prototypes,
6533     which can conflict with char dllload(); below.  */
6534 #include <assert.h>
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 /* We use char because int might match the return type of a gcc2
6537     builtin and then its argument prototype would still apply.  */
6538 char dllload();
6539 char (*f)();
6540
6541 int main() {
6542
6543 /* The GNU C library defines this for functions which it implements
6544     to always fail with ENOSYS.  Some functions are actually named
6545     something starting with __ and the normal name is an alias.  */
6546 #if defined (__stub_dllload) || defined (__stub___dllload)
6547 choke me
6548 #else
6549 f = dllload;
6550 #endif
6551
6552 ; return 0; }
6553 EOF
6554 if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6555   rm -rf conftest*
6556   eval "ac_cv_func_dllload=yes"
6557 else
6558   echo "configure: failed program was:" >&5
6559   cat conftest.$ac_ext >&5
6560   rm -rf conftest*
6561   eval "ac_cv_func_dllload=no"
6562 fi
6563 rm -f conftest*
6564 fi
6565
6566 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6567   echo "$ac_t""yes" 1>&6
6568   lt_cv_dlopen="dllload"
6569 else
6570   echo "$ac_t""no" 1>&6
6571 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6572 echo "configure:6573: checking for shl_load" >&5
6573 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6574   echo $ac_n "(cached) $ac_c" 1>&6
6575 else
6576   cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* System header to define __stub macros and hopefully few prototypes,
6580     which can conflict with char shl_load(); below.  */
6581 #include <assert.h>
6582 /* Override any gcc2 internal prototype to avoid an error.  */
6583 /* We use char because int might match the return type of a gcc2
6584     builtin and then its argument prototype would still apply.  */
6585 char shl_load();
6586 char (*f)();
6587
6588 int main() {
6589
6590 /* The GNU C library defines this for functions which it implements
6591     to always fail with ENOSYS.  Some functions are actually named
6592     something starting with __ and the normal name is an alias.  */
6593 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6594 choke me
6595 #else
6596 f = shl_load;
6597 #endif
6598
6599 ; return 0; }
6600 EOF
6601 if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6602   rm -rf conftest*
6603   eval "ac_cv_func_shl_load=yes"
6604 else
6605   echo "configure: failed program was:" >&5
6606   cat conftest.$ac_ext >&5
6607   rm -rf conftest*
6608   eval "ac_cv_func_shl_load=no"
6609 fi
6610 rm -f conftest*
6611 fi
6612
6613 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6614   echo "$ac_t""yes" 1>&6
6615   lt_cv_dlopen="shl_load"
6616 else
6617   echo "$ac_t""no" 1>&6
6618 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6619 echo "configure:6620: checking for shl_load in -ldld" >&5
6620 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6622   echo $ac_n "(cached) $ac_c" 1>&6
6623 else
6624   ac_save_LIBS="$LIBS"
6625 LIBS="-ldld  $LIBS"
6626 cat > conftest.$ac_ext <<EOF
6627 #line 6628 "configure"
6628 #include "confdefs.h"
6629 /* Override any gcc2 internal prototype to avoid an error.  */
6630 /* We use char because int might match the return type of a gcc2
6631     builtin and then its argument prototype would still apply.  */
6632 char shl_load();
6633
6634 int main() {
6635 shl_load()
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   eval "ac_cv_lib_$ac_lib_var=yes"
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   eval "ac_cv_lib_$ac_lib_var=no"
6646 fi
6647 rm -f conftest*
6648 LIBS="$ac_save_LIBS"
6649
6650 fi
6651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6652   echo "$ac_t""yes" 1>&6
6653   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6654 else
6655   echo "$ac_t""no" 1>&6
6656 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6657 echo "configure:6658: checking for dlopen" >&5
6658 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665     which can conflict with char dlopen(); below.  */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error.  */
6668 /* We use char because int might match the return type of a gcc2
6669     builtin and then its argument prototype would still apply.  */
6670 char dlopen();
6671 char (*f)();
6672
6673 int main() {
6674
6675 /* The GNU C library defines this for functions which it implements
6676     to always fail with ENOSYS.  Some functions are actually named
6677     something starting with __ and the normal name is an alias.  */
6678 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6679 choke me
6680 #else
6681 f = dlopen;
6682 #endif
6683
6684 ; return 0; }
6685 EOF
6686 if { (eval echo configure:6687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6687   rm -rf conftest*
6688   eval "ac_cv_func_dlopen=yes"
6689 else
6690   echo "configure: failed program was:" >&5
6691   cat conftest.$ac_ext >&5
6692   rm -rf conftest*
6693   eval "ac_cv_func_dlopen=no"
6694 fi
6695 rm -f conftest*
6696 fi
6697
6698 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6699   echo "$ac_t""yes" 1>&6
6700   lt_cv_dlopen="dlopen"
6701 else
6702   echo "$ac_t""no" 1>&6
6703 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6704 echo "configure:6705: checking for dlopen in -ldl" >&5
6705 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6707   echo $ac_n "(cached) $ac_c" 1>&6
6708 else
6709   ac_save_LIBS="$LIBS"
6710 LIBS="-ldl  $LIBS"
6711 cat > conftest.$ac_ext <<EOF
6712 #line 6713 "configure"
6713 #include "confdefs.h"
6714 /* Override any gcc2 internal prototype to avoid an error.  */
6715 /* We use char because int might match the return type of a gcc2
6716     builtin and then its argument prototype would still apply.  */
6717 char dlopen();
6718
6719 int main() {
6720 dlopen()
6721 ; return 0; }
6722 EOF
6723 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=yes"
6726 else
6727   echo "configure: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   rm -rf conftest*
6730   eval "ac_cv_lib_$ac_lib_var=no"
6731 fi
6732 rm -f conftest*
6733 LIBS="$ac_save_LIBS"
6734
6735 fi
6736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6737   echo "$ac_t""yes" 1>&6
6738   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6739 else
6740   echo "$ac_t""no" 1>&6
6741 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6742 echo "configure:6743: checking for dlopen in -lsvld" >&5
6743 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6745   echo $ac_n "(cached) $ac_c" 1>&6
6746 else
6747   ac_save_LIBS="$LIBS"
6748 LIBS="-lsvld  $LIBS"
6749 cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char dlopen();
6756
6757 int main() {
6758 dlopen()
6759 ; return 0; }
6760 EOF
6761 if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6762   rm -rf conftest*
6763   eval "ac_cv_lib_$ac_lib_var=yes"
6764 else
6765   echo "configure: failed program was:" >&5
6766   cat conftest.$ac_ext >&5
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=no"
6769 fi
6770 rm -f conftest*
6771 LIBS="$ac_save_LIBS"
6772
6773 fi
6774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6775   echo "$ac_t""yes" 1>&6
6776   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6777 else
6778   echo "$ac_t""no" 1>&6
6779 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6780 echo "configure:6781: checking for dld_link in -ldld" >&5
6781 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   ac_save_LIBS="$LIBS"
6786 LIBS="-ldld  $LIBS"
6787 cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 /* We use char because int might match the return type of a gcc2
6792     builtin and then its argument prototype would still apply.  */
6793 char dld_link();
6794
6795 int main() {
6796 dld_link()
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_lib_$ac_lib_var=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=no"
6807 fi
6808 rm -f conftest*
6809 LIBS="$ac_save_LIBS"
6810
6811 fi
6812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6815 else
6816   echo "$ac_t""no" 1>&6
6817 fi
6818
6819               
6820 fi
6821
6822             
6823 fi
6824
6825           
6826 fi
6827
6828         
6829 fi
6830
6831       
6832 fi
6833
6834     
6835 fi
6836
6837     ;;
6838   esac
6839
6840   if test "x$lt_cv_dlopen" != xno; then
6841     enable_dlopen=yes
6842   else
6843     enable_dlopen=no
6844   fi
6845
6846   case $lt_cv_dlopen in
6847   dlopen)
6848     save_CPPFLAGS="$CPPFLAGS"
6849         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6850
6851     save_LDFLAGS="$LDFLAGS"
6852     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6853
6854     save_LIBS="$LIBS"
6855     LIBS="$lt_cv_dlopen_libs $LIBS"
6856
6857     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6858 echo "configure:6859: checking whether a program can dlopen itself" >&5
6859 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862           if test "$cross_compiling" = yes; then :
6863   lt_cv_dlopen_self=cross
6864 else
6865     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6866   lt_status=$lt_dlunknown
6867   cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6870
6871 #if HAVE_DLFCN_H
6872 #include <dlfcn.h>
6873 #endif
6874
6875 #include <stdio.h>
6876
6877 #ifdef RTLD_GLOBAL
6878 #  define LT_DLGLOBAL           RTLD_GLOBAL
6879 #else
6880 #  ifdef DL_GLOBAL
6881 #    define LT_DLGLOBAL         DL_GLOBAL
6882 #  else
6883 #    define LT_DLGLOBAL         0
6884 #  endif
6885 #endif
6886
6887 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6888    find out it does not work in some platform. */
6889 #ifndef LT_DLLAZY_OR_NOW
6890 #  ifdef RTLD_LAZY
6891 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6892 #  else
6893 #    ifdef DL_LAZY
6894 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6895 #    else
6896 #      ifdef RTLD_NOW
6897 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6898 #      else
6899 #        ifdef DL_NOW
6900 #          define LT_DLLAZY_OR_NOW      DL_NOW
6901 #        else
6902 #          define LT_DLLAZY_OR_NOW      0
6903 #        endif
6904 #      endif
6905 #    endif
6906 #  endif
6907 #endif
6908
6909 #ifdef __cplusplus
6910 extern "C" void exit (int);
6911 #endif
6912
6913 void fnord() { int i=42;}
6914 int main ()
6915 {
6916   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6917   int status = $lt_dlunknown;
6918
6919   if (self)
6920     {
6921       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6922       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6923       /* dlclose (self); */
6924     }
6925
6926     exit (status);
6927 }
6928 EOF
6929   if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6930     (./conftest; exit; ) 2>/dev/null
6931     lt_status=$?
6932     case x$lt_status in
6933       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6934       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6935       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6936     esac
6937   else :
6938     # compilation failed
6939     lt_cv_dlopen_self=no
6940   fi
6941 fi
6942 rm -fr conftest*
6943
6944     
6945 fi
6946
6947 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6948
6949     if test "x$lt_cv_dlopen_self" = xyes; then
6950       LDFLAGS="$LDFLAGS $link_static_flag"
6951       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6952 echo "configure:6953: checking whether a statically linked program can dlopen itself" >&5
6953 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6954   echo $ac_n "(cached) $ac_c" 1>&6
6955 else
6956           if test "$cross_compiling" = yes; then :
6957   lt_cv_dlopen_self_static=cross
6958 else
6959     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6960   lt_status=$lt_dlunknown
6961   cat > conftest.$ac_ext <<EOF
6962 #line 6963 "configure"
6963 #include "confdefs.h"
6964
6965 #if HAVE_DLFCN_H
6966 #include <dlfcn.h>
6967 #endif
6968
6969 #include <stdio.h>
6970
6971 #ifdef RTLD_GLOBAL
6972 #  define LT_DLGLOBAL           RTLD_GLOBAL
6973 #else
6974 #  ifdef DL_GLOBAL
6975 #    define LT_DLGLOBAL         DL_GLOBAL
6976 #  else
6977 #    define LT_DLGLOBAL         0
6978 #  endif
6979 #endif
6980
6981 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6982    find out it does not work in some platform. */
6983 #ifndef LT_DLLAZY_OR_NOW
6984 #  ifdef RTLD_LAZY
6985 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6986 #  else
6987 #    ifdef DL_LAZY
6988 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6989 #    else
6990 #      ifdef RTLD_NOW
6991 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6992 #      else
6993 #        ifdef DL_NOW
6994 #          define LT_DLLAZY_OR_NOW      DL_NOW
6995 #        else
6996 #          define LT_DLLAZY_OR_NOW      0
6997 #        endif
6998 #      endif
6999 #    endif
7000 #  endif
7001 #endif
7002
7003 #ifdef __cplusplus
7004 extern "C" void exit (int);
7005 #endif
7006
7007 void fnord() { int i=42;}
7008 int main ()
7009 {
7010   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7011   int status = $lt_dlunknown;
7012
7013   if (self)
7014     {
7015       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7016       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7017       /* dlclose (self); */
7018     }
7019
7020     exit (status);
7021 }
7022 EOF
7023   if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7024     (./conftest; exit; ) 2>/dev/null
7025     lt_status=$?
7026     case x$lt_status in
7027       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7028       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7029       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7030     esac
7031   else :
7032     # compilation failed
7033     lt_cv_dlopen_self_static=no
7034   fi
7035 fi
7036 rm -fr conftest*
7037
7038       
7039 fi
7040
7041 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7042     fi
7043
7044     CPPFLAGS="$save_CPPFLAGS"
7045     LDFLAGS="$save_LDFLAGS"
7046     LIBS="$save_LIBS"
7047     ;;
7048   esac
7049
7050   case $lt_cv_dlopen_self in
7051   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7052   *) enable_dlopen_self=unknown ;;
7053   esac
7054
7055   case $lt_cv_dlopen_self_static in
7056   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7057   *) enable_dlopen_self_static=unknown ;;
7058   esac
7059 fi
7060
7061
7062 if test "$enable_shared" = yes && test "$GCC" = yes; then
7063   case $archive_cmds in
7064   *'~'*)
7065     # FIXME: we may have to deal with multi-command sequences.
7066     ;;
7067   '$CC '*)
7068     # Test whether the compiler implicitly links with -lc since on some
7069     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7070     # to ld, don't add -lc before -lgcc.
7071     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7072 echo "configure:7073: checking whether -lc should be explicitly linked in" >&5
7073     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7074   echo $ac_n "(cached) $ac_c" 1>&6
7075 else
7076   $rm conftest*
7077     echo 'static int dummy;' > conftest.$ac_ext
7078
7079     if { (eval echo configure:7080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7080       soname=conftest
7081       lib=conftest
7082       libobjs=conftest.$ac_objext
7083       deplibs=
7084       wl=$lt_cv_prog_cc_wl
7085       compiler_flags=-v
7086       linker_flags=-v
7087       verstring=
7088       output_objdir=.
7089       libname=conftest
7090       save_allow_undefined_flag=$allow_undefined_flag
7091       allow_undefined_flag=
7092       if { (eval echo configure:7093: \"$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; }
7093       then
7094         lt_cv_archive_cmds_need_lc=no
7095       else
7096         lt_cv_archive_cmds_need_lc=yes
7097       fi
7098       allow_undefined_flag=$save_allow_undefined_flag
7099     else
7100       cat conftest.err 1>&5
7101     fi
7102 fi
7103
7104     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7105     ;;
7106   esac
7107 fi
7108 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7109
7110 # The second clause should only fire when bootstrapping the
7111 # libtool distribution, otherwise you forgot to ship ltmain.sh
7112 # with your package, and you will get complaints that there are
7113 # no rules to generate ltmain.sh.
7114 if test -f "$ltmain"; then
7115   :
7116 else
7117   # If there is no Makefile yet, we rely on a make rule to execute
7118   # `config.status --recheck' to rerun these tests and create the
7119   # libtool script then.
7120   test -f Makefile && make "$ltmain"
7121 fi
7122
7123 if test -f "$ltmain"; then
7124   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7125   $rm -f "${ofile}T"
7126
7127   echo creating $ofile
7128
7129   # Now quote all the things that may contain metacharacters while being
7130   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7131   # variables and quote the copies for generation of the libtool script.
7132   for var in echo old_CC old_CFLAGS SED \
7133     AR AR_FLAGS CC LD LN_S NM SHELL \
7134     reload_flag reload_cmds wl \
7135     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7136     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7137     library_names_spec soname_spec \
7138     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7139     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7140     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7141     old_striplib striplib file_magic_cmd export_symbols_cmds \
7142     deplibs_check_method allow_undefined_flag no_undefined_flag \
7143     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7144     global_symbol_to_c_name_address \
7145     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7146     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7147     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7148
7149     case $var in
7150     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7151     old_postinstall_cmds | old_postuninstall_cmds | \
7152     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7153     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7154     postinstall_cmds | postuninstall_cmds | \
7155     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7156       # Double-quote double-evaled strings.
7157       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7158       ;;
7159     *)
7160       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7161       ;;
7162     esac
7163   done
7164
7165   cat <<__EOF__ > "${ofile}T"
7166 #! $SHELL
7167
7168 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7169 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7170 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7171 #
7172 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7173 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7174 #
7175 # This program is free software; you can redistribute it and/or modify
7176 # it under the terms of the GNU General Public License as published by
7177 # the Free Software Foundation; either version 2 of the License, or
7178 # (at your option) any later version.
7179 #
7180 # This program is distributed in the hope that it will be useful, but
7181 # WITHOUT ANY WARRANTY; without even the implied warranty of
7182 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7183 # General Public License for more details.
7184 #
7185 # You should have received a copy of the GNU General Public License
7186 # along with this program; if not, write to the Free Software
7187 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7188 #
7189 # As a special exception to the GNU General Public License, if you
7190 # distribute this file as part of a program that contains a
7191 # configuration script generated by Autoconf, you may include it under
7192 # the same distribution terms that you use for the rest of that program.
7193
7194 # A sed that does not truncate output.
7195 SED=$lt_SED
7196
7197 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7198 Xsed="${SED} -e s/^X//"
7199
7200 # The HP-UX ksh and POSIX shell print the target directory to stdout
7201 # if CDPATH is set.
7202 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7203
7204 # ### BEGIN LIBTOOL CONFIG
7205
7206 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7207
7208 # Shell to use when invoking shell scripts.
7209 SHELL=$lt_SHELL
7210
7211 # Whether or not to build shared libraries.
7212 build_libtool_libs=$enable_shared
7213
7214 # Whether or not to build static libraries.
7215 build_old_libs=$enable_static
7216
7217 # Whether or not to add -lc for building shared libraries.
7218 build_libtool_need_lc=$need_lc
7219
7220 # Whether or not to optimize for fast installation.
7221 fast_install=$enable_fast_install
7222
7223 # The host system.
7224 host_alias=$host_alias
7225 host=$host
7226
7227 # An echo program that does not interpret backslashes.
7228 echo=$lt_echo
7229
7230 # The archiver.
7231 AR=$lt_AR
7232 AR_FLAGS=$lt_AR_FLAGS
7233
7234 # The default C compiler.
7235 CC=$lt_CC
7236
7237 # Is the compiler the GNU C compiler?
7238 with_gcc=$GCC
7239
7240 # The linker used to build libraries.
7241 LD=$lt_LD
7242
7243 # Whether we need hard or soft links.
7244 LN_S=$lt_LN_S
7245
7246 # A BSD-compatible nm program.
7247 NM=$lt_NM
7248
7249 # A symbol stripping program
7250 STRIP=$STRIP
7251
7252 # Used to examine libraries when file_magic_cmd begins "file"
7253 MAGIC_CMD=$MAGIC_CMD
7254
7255 # Used on cygwin: DLL creation program.
7256 DLLTOOL="$DLLTOOL"
7257
7258 # Used on cygwin: object dumper.
7259 OBJDUMP="$OBJDUMP"
7260
7261 # Used on cygwin: assembler.
7262 AS="$AS"
7263
7264 # The name of the directory that contains temporary libtool files.
7265 objdir=$objdir
7266
7267 # How to create reloadable object files.
7268 reload_flag=$lt_reload_flag
7269 reload_cmds=$lt_reload_cmds
7270
7271 # How to pass a linker flag through the compiler.
7272 wl=$lt_wl
7273
7274 # Object file suffix (normally "o").
7275 objext="$ac_objext"
7276
7277 # Old archive suffix (normally "a").
7278 libext="$libext"
7279
7280 # Executable file suffix (normally "").
7281 exeext="$exeext"
7282
7283 # Additional compiler flags for building library objects.
7284 pic_flag=$lt_pic_flag
7285 pic_mode=$pic_mode
7286
7287 # Does compiler simultaneously support -c and -o options?
7288 compiler_c_o=$lt_compiler_c_o
7289
7290 # Can we write directly to a .lo ?
7291 compiler_o_lo=$lt_compiler_o_lo
7292
7293 # Must we lock files when doing compilation ?
7294 need_locks=$lt_need_locks
7295
7296 # Do we need the lib prefix for modules?
7297 need_lib_prefix=$need_lib_prefix
7298
7299 # Do we need a version for libraries?
7300 need_version=$need_version
7301
7302 # Whether dlopen is supported.
7303 dlopen_support=$enable_dlopen
7304
7305 # Whether dlopen of programs is supported.
7306 dlopen_self=$enable_dlopen_self
7307
7308 # Whether dlopen of statically linked programs is supported.
7309 dlopen_self_static=$enable_dlopen_self_static
7310
7311 # Compiler flag to prevent dynamic linking.
7312 link_static_flag=$lt_link_static_flag
7313
7314 # Compiler flag to turn off builtin functions.
7315 no_builtin_flag=$lt_no_builtin_flag
7316
7317 # Compiler flag to allow reflexive dlopens.
7318 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7319
7320 # Compiler flag to generate shared objects directly from archives.
7321 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7322
7323 # Compiler flag to generate thread-safe objects.
7324 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7325
7326 # Library versioning type.
7327 version_type=$version_type
7328
7329 # Format of library name prefix.
7330 libname_spec=$lt_libname_spec
7331
7332 # List of archive names.  First name is the real one, the rest are links.
7333 # The last name is the one that the linker finds with -lNAME.
7334 library_names_spec=$lt_library_names_spec
7335
7336 # The coded name of the library, if different from the real name.
7337 soname_spec=$lt_soname_spec
7338
7339 # Commands used to build and install an old-style archive.
7340 RANLIB=$lt_RANLIB
7341 old_archive_cmds=$lt_old_archive_cmds
7342 old_postinstall_cmds=$lt_old_postinstall_cmds
7343 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7344
7345 # Create an old-style archive from a shared archive.
7346 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7347
7348 # Create a temporary old-style archive to link instead of a shared archive.
7349 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7350
7351 # Commands used to build and install a shared archive.
7352 archive_cmds=$lt_archive_cmds
7353 archive_expsym_cmds=$lt_archive_expsym_cmds
7354 postinstall_cmds=$lt_postinstall_cmds
7355 postuninstall_cmds=$lt_postuninstall_cmds
7356
7357 # Commands to strip libraries.
7358 old_striplib=$lt_old_striplib
7359 striplib=$lt_striplib
7360
7361 # Method to check whether dependent libraries are shared objects.
7362 deplibs_check_method=$lt_deplibs_check_method
7363
7364 # Command to use when deplibs_check_method == file_magic.
7365 file_magic_cmd=$lt_file_magic_cmd
7366
7367 # Flag that allows shared libraries with undefined symbols to be built.
7368 allow_undefined_flag=$lt_allow_undefined_flag
7369
7370 # Flag that forces no undefined symbols.
7371 no_undefined_flag=$lt_no_undefined_flag
7372
7373 # Commands used to finish a libtool library installation in a directory.
7374 finish_cmds=$lt_finish_cmds
7375
7376 # Same as above, but a single script fragment to be evaled but not shown.
7377 finish_eval=$lt_finish_eval
7378
7379 # Take the output of nm and produce a listing of raw symbols and C names.
7380 global_symbol_pipe=$lt_global_symbol_pipe
7381
7382 # Transform the output of nm in a proper C declaration
7383 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7384
7385 # Transform the output of nm in a C name address pair
7386 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7387
7388 # This is the shared library runtime path variable.
7389 runpath_var=$runpath_var
7390
7391 # This is the shared library path variable.
7392 shlibpath_var=$shlibpath_var
7393
7394 # Is shlibpath searched before the hard-coded library search path?
7395 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7396
7397 # How to hardcode a shared library path into an executable.
7398 hardcode_action=$hardcode_action
7399
7400 # Whether we should hardcode library paths into libraries.
7401 hardcode_into_libs=$hardcode_into_libs
7402
7403 # Flag to hardcode \$libdir into a binary during linking.
7404 # This must work even if \$libdir does not exist.
7405 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7406
7407 # Whether we need a single -rpath flag with a separated argument.
7408 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7409
7410 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7411 # resulting binary.
7412 hardcode_direct=$hardcode_direct
7413
7414 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7415 # resulting binary.
7416 hardcode_minus_L=$hardcode_minus_L
7417
7418 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7419 # the resulting binary.
7420 hardcode_shlibpath_var=$hardcode_shlibpath_var
7421
7422 # Variables whose values should be saved in libtool wrapper scripts and
7423 # restored at relink time.
7424 variables_saved_for_relink="$variables_saved_for_relink"
7425
7426 # Whether libtool must link a program against all its dependency libraries.
7427 link_all_deplibs=$link_all_deplibs
7428
7429 # Compile-time system search path for libraries
7430 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7431
7432 # Run-time system search path for libraries
7433 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7434
7435 # Fix the shell variable \$srcfile for the compiler.
7436 fix_srcfile_path="$fix_srcfile_path"
7437
7438 # Set to yes if exported symbols are required.
7439 always_export_symbols=$always_export_symbols
7440
7441 # The commands to list exported symbols.
7442 export_symbols_cmds=$lt_export_symbols_cmds
7443
7444 # The commands to extract the exported symbol list from a shared archive.
7445 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7446
7447 # Symbols that should not be listed in the preloaded symbols.
7448 exclude_expsyms=$lt_exclude_expsyms
7449
7450 # Symbols that must always be exported.
7451 include_expsyms=$lt_include_expsyms
7452
7453 # ### END LIBTOOL CONFIG
7454
7455 __EOF__
7456
7457   case $host_os in
7458   aix3*)
7459     cat <<\EOF >> "${ofile}T"
7460
7461 # AIX sometimes has problems with the GCC collect2 program.  For some
7462 # reason, if we set the COLLECT_NAMES environment variable, the problems
7463 # vanish in a puff of smoke.
7464 if test "X${COLLECT_NAMES+set}" != Xset; then
7465   COLLECT_NAMES=
7466   export COLLECT_NAMES
7467 fi
7468 EOF
7469     ;;
7470   esac
7471
7472   case $host_os in
7473   cygwin* | mingw* | pw32* | os2*)
7474     cat <<'EOF' >> "${ofile}T"
7475       # This is a source program that is used to create dlls on Windows
7476       # Don't remove nor modify the starting and closing comments
7477 # /* ltdll.c starts here */
7478 # #define WIN32_LEAN_AND_MEAN
7479 # #include <windows.h>
7480 # #undef WIN32_LEAN_AND_MEAN
7481 # #include <stdio.h>
7482 #
7483 # #ifndef __CYGWIN__
7484 # #  ifdef __CYGWIN32__
7485 # #    define __CYGWIN__ __CYGWIN32__
7486 # #  endif
7487 # #endif
7488 #
7489 # #ifdef __cplusplus
7490 # extern "C" {
7491 # #endif
7492 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7493 # #ifdef __cplusplus
7494 # }
7495 # #endif
7496 #
7497 # #ifdef __CYGWIN__
7498 # #include <cygwin/cygwin_dll.h>
7499 # DECLARE_CYGWIN_DLL( DllMain );
7500 # #endif
7501 # HINSTANCE __hDllInstance_base;
7502 #
7503 # BOOL APIENTRY
7504 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7505 # {
7506 #   __hDllInstance_base = hInst;
7507 #   return TRUE;
7508 # }
7509 # /* ltdll.c ends here */
7510         # This is a source program that is used to create import libraries
7511         # on Windows for dlls which lack them. Don't remove nor modify the
7512         # starting and closing comments
7513 # /* impgen.c starts here */
7514 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7515 #
7516 #  This file is part of GNU libtool.
7517 #
7518 #  This program is free software; you can redistribute it and/or modify
7519 #  it under the terms of the GNU General Public License as published by
7520 #  the Free Software Foundation; either version 2 of the License, or
7521 #  (at your option) any later version.
7522 #
7523 #  This program is distributed in the hope that it will be useful,
7524 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7525 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7526 #  GNU General Public License for more details.
7527 #
7528 #  You should have received a copy of the GNU General Public License
7529 #  along with this program; if not, write to the Free Software
7530 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7531 #  */
7532 #
7533 # #include <stdio.h>            /* for printf() */
7534 # #include <unistd.h>           /* for open(), lseek(), read() */
7535 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7536 # #include <string.h>           /* for strdup() */
7537 #
7538 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7539 # #ifndef O_BINARY
7540 # #define O_BINARY 0
7541 # #endif
7542 #
7543 # static unsigned int
7544 # pe_get16 (fd, offset)
7545 #      int fd;
7546 #      int offset;
7547 # {
7548 #   unsigned char b[2];
7549 #   lseek (fd, offset, SEEK_SET);
7550 #   read (fd, b, 2);
7551 #   return b[0] + (b[1]<<8);
7552 # }
7553 #
7554 # static unsigned int
7555 # pe_get32 (fd, offset)
7556 #     int fd;
7557 #     int offset;
7558 # {
7559 #   unsigned char b[4];
7560 #   lseek (fd, offset, SEEK_SET);
7561 #   read (fd, b, 4);
7562 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7563 # }
7564 #
7565 # static unsigned int
7566 # pe_as32 (ptr)
7567 #      void *ptr;
7568 # {
7569 #   unsigned char *b = ptr;
7570 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7571 # }
7572 #
7573 # int
7574 # main (argc, argv)
7575 #     int argc;
7576 #     char *argv[];
7577 # {
7578 #     int dll;
7579 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7580 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7581 #     unsigned long name_rvas, nexp;
7582 #     unsigned char *expdata, *erva;
7583 #     char *filename, *dll_name;
7584 #
7585 #     filename = argv[1];
7586 #
7587 #     dll = open(filename, O_RDONLY|O_BINARY);
7588 #     if (dll < 1)
7589 #       return 1;
7590 #
7591 #     dll_name = filename;
7592 #
7593 #     for (i=0; filename[i]; i++)
7594 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7595 #           dll_name = filename + i +1;
7596 #
7597 #     pe_header_offset = pe_get32 (dll, 0x3c);
7598 #     opthdr_ofs = pe_header_offset + 4 + 20;
7599 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7600 #
7601 #     if (num_entries < 1) /* no exports */
7602 #       return 1;
7603 #
7604 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7605 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7606 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7607 #     secptr = (pe_header_offset + 4 + 20 +
7608 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7609 #
7610 #     expptr = 0;
7611 #     for (i = 0; i < nsections; i++)
7612 #     {
7613 #       char sname[8];
7614 #       unsigned long secptr1 = secptr + 40 * i;
7615 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7616 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7617 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7618 #       lseek(dll, secptr1, SEEK_SET);
7619 #       read(dll, sname, 8);
7620 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7621 #       {
7622 #           expptr = fptr + (export_rva - vaddr);
7623 #           if (export_rva + export_size > vaddr + vsize)
7624 #               export_size = vsize - (export_rva - vaddr);
7625 #           break;
7626 #       }
7627 #     }
7628 #
7629 #     expdata = (unsigned char*)malloc(export_size);
7630 #     lseek (dll, expptr, SEEK_SET);
7631 #     read (dll, expdata, export_size);
7632 #     erva = expdata - export_rva;
7633 #
7634 #     nexp = pe_as32 (expdata+24);
7635 #     name_rvas = pe_as32 (expdata+32);
7636 #
7637 #     printf ("EXPORTS\n");
7638 #     for (i = 0; i<nexp; i++)
7639 #     {
7640 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7641 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7642 #     }
7643 #
7644 #     return 0;
7645 # }
7646 # /* impgen.c ends here */
7647
7648 EOF
7649     ;;
7650   esac
7651
7652   # We use sed instead of cat because bash on DJGPP gets confused if
7653   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7654   # text mode, it properly converts lines to CR/LF.  This bash problem
7655   # is reportedly fixed, but why not run on old versions too?
7656   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7657
7658   mv -f "${ofile}T" "$ofile" || \
7659     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7660   chmod +x "$ofile"
7661 fi
7662
7663
7664
7665
7666
7667 # This can be used to rebuild libtool when needed
7668 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7669
7670 # Always use our own libtool.
7671 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7672
7673 # Prevent multiple expansion
7674
7675
7676
7677 ol_link_perl=no
7678 if test $ol_enable_perl != no ; then
7679         # Extract the first word of "perl", so it can be a program name with args.
7680 set dummy perl; ac_word=$2
7681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7682 echo "configure:7683: checking for $ac_word" >&5
7683 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7684   echo $ac_n "(cached) $ac_c" 1>&6
7685 else
7686   case "$PERLBIN" in
7687   /*)
7688   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7689   ;;
7690   ?:/*)
7691   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7692   ;;
7693   *)
7694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7695   ac_dummy="$PATH"
7696   for ac_dir in $ac_dummy; do 
7697     test -z "$ac_dir" && ac_dir=.
7698     if test -f $ac_dir/$ac_word; then
7699       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7700       break
7701     fi
7702   done
7703   IFS="$ac_save_ifs"
7704   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7705   ;;
7706 esac
7707 fi
7708 PERLBIN="$ac_cv_path_PERLBIN"
7709 if test -n "$PERLBIN"; then
7710   echo "$ac_t""$PERLBIN" 1>&6
7711 else
7712   echo "$ac_t""no" 1>&6
7713 fi
7714
7715
7716         if test "no$PERLBIN" = "no" ; then
7717                 if test $ol_enable_perl = yes ; then
7718                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7719                 fi
7720
7721         else
7722                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7723                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7724
7725                 if test x"$ol_enable_perl" = "xyes" ; then
7726                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7727                 else
7728                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7729                 fi
7730                                 ol_link_perl=yes
7731         fi
7732 fi
7733
7734 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7735 echo "configure:7736: checking how to run the C preprocessor" >&5
7736 # On Suns, sometimes $CPP names a directory.
7737 if test -n "$CPP" && test -d "$CPP"; then
7738   CPP=
7739 fi
7740 if test -z "$CPP"; then
7741 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7742   echo $ac_n "(cached) $ac_c" 1>&6
7743 else
7744     # This must be in double quotes, not single quotes, because CPP may get
7745   # substituted into the Makefile and "${CC-cc}" will confuse make.
7746   CPP="${CC-cc} -E"
7747   # On the NeXT, cc -E runs the code through the compiler's parser,
7748   # not just through cpp.
7749   cat > conftest.$ac_ext <<EOF
7750 #line 7751 "configure"
7751 #include "confdefs.h"
7752 #include <assert.h>
7753 Syntax Error
7754 EOF
7755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7756 { (eval echo configure:7757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7758 if test -z "$ac_err"; then
7759   :
7760 else
7761   echo "$ac_err" >&5
7762   echo "configure: failed program was:" >&5
7763   cat conftest.$ac_ext >&5
7764   rm -rf conftest*
7765   CPP="${CC-cc} -E -traditional-cpp"
7766   cat > conftest.$ac_ext <<EOF
7767 #line 7768 "configure"
7768 #include "confdefs.h"
7769 #include <assert.h>
7770 Syntax Error
7771 EOF
7772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7773 { (eval echo configure:7774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7775 if test -z "$ac_err"; then
7776   :
7777 else
7778   echo "$ac_err" >&5
7779   echo "configure: failed program was:" >&5
7780   cat conftest.$ac_ext >&5
7781   rm -rf conftest*
7782   CPP="${CC-cc} -nologo -E"
7783   cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786 #include <assert.h>
7787 Syntax Error
7788 EOF
7789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7790 { (eval echo configure:7791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7792 if test -z "$ac_err"; then
7793   :
7794 else
7795   echo "$ac_err" >&5
7796   echo "configure: failed program was:" >&5
7797   cat conftest.$ac_ext >&5
7798   rm -rf conftest*
7799   CPP=/lib/cpp
7800 fi
7801 rm -f conftest*
7802 fi
7803 rm -f conftest*
7804 fi
7805 rm -f conftest*
7806   ac_cv_prog_CPP="$CPP"
7807 fi
7808   CPP="$ac_cv_prog_CPP"
7809 else
7810   ac_cv_prog_CPP="$CPP"
7811 fi
7812 echo "$ac_t""$CPP" 1>&6
7813
7814
7815
7816 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7817 echo "configure:7818: checking for Cygwin environment" >&5
7818 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7819   echo $ac_n "(cached) $ac_c" 1>&6
7820 else
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824
7825 int main() {
7826
7827 #ifndef __CYGWIN__
7828 #define __CYGWIN__ __CYGWIN32__
7829 #endif
7830 return __CYGWIN__;
7831 ; return 0; }
7832 EOF
7833 if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7834   rm -rf conftest*
7835   ac_cv_cygwin=yes
7836 else
7837   echo "configure: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   rm -rf conftest*
7840   ac_cv_cygwin=no
7841 fi
7842 rm -f conftest*
7843 fi
7844
7845 echo "$ac_t""$ac_cv_cygwin" 1>&6
7846 CYGWIN=
7847 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7848 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7849 echo "configure:7850: checking for mingw32 environment" >&5
7850 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856
7857 int main() {
7858 return __MINGW32__;
7859 ; return 0; }
7860 EOF
7861 if { (eval echo configure:7862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7862   rm -rf conftest*
7863   ac_cv_mingw32=yes
7864 else
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   ac_cv_mingw32=no
7869 fi
7870 rm -f conftest*
7871 fi
7872
7873 echo "$ac_t""$ac_cv_mingw32" 1>&6
7874 MINGW32=
7875 test "$ac_cv_mingw32" = yes && MINGW32=yes
7876
7877
7878
7879 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7880 echo "configure:7881: checking for executable suffix" >&5
7881 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7882   echo $ac_n "(cached) $ac_c" 1>&6
7883 else
7884   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7885   ac_cv_exeext=.exe
7886 else
7887   rm -f conftest*
7888   echo 'int main () { return 0; }' > conftest.$ac_ext
7889   ac_cv_exeext=
7890   if { (eval echo configure:7891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7891     for file in conftest.*; do
7892       case $file in
7893       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7894       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7895       esac
7896     done
7897   else
7898     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7899   fi
7900   rm -f conftest*
7901   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7902 fi
7903 fi
7904
7905 EXEEXT=""
7906 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7907 echo "$ac_t""${ac_cv_exeext}" 1>&6
7908 ac_exeext=$EXEEXT
7909
7910 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7911 echo "configure:7912: checking for object suffix" >&5
7912 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7913   echo $ac_n "(cached) $ac_c" 1>&6
7914 else
7915   rm -f conftest*
7916 echo 'int i = 1;' > conftest.$ac_ext
7917 if { (eval echo configure:7918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7918   for ac_file in conftest.*; do
7919     case $ac_file in
7920     *.c) ;;
7921     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7922     esac
7923   done
7924 else
7925   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7926 fi
7927 rm -f conftest*
7928 fi
7929
7930 echo "$ac_t""$ac_cv_objext" 1>&6
7931 OBJEXT=$ac_cv_objext
7932 ac_objext=$ac_cv_objext
7933
7934
7935 cat >> confdefs.h <<EOF
7936 #define EXEEXT "${EXEEXT}"
7937 EOF
7938
7939
7940 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7941 echo "configure:7942: checking for be_app in -lbe" >&5
7942 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   ac_save_LIBS="$LIBS"
7947 LIBS="-lbe -lroot -lnet $LIBS"
7948 cat > conftest.$ac_ext <<EOF
7949 #line 7950 "configure"
7950 #include "confdefs.h"
7951 /* Override any gcc2 internal prototype to avoid an error.  */
7952 /* We use char because int might match the return type of a gcc2
7953     builtin and then its argument prototype would still apply.  */
7954 char be_app();
7955
7956 int main() {
7957 be_app()
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7961   rm -rf conftest*
7962   eval "ac_cv_lib_$ac_lib_var=yes"
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   eval "ac_cv_lib_$ac_lib_var=no"
7968 fi
7969 rm -f conftest*
7970 LIBS="$ac_save_LIBS"
7971
7972 fi
7973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975   LIBS="$LIBS -lbe -lroot -lnet"
7976 else
7977   echo "$ac_t""no" 1>&6
7978 :
7979 fi
7980
7981
7982
7983
7984
7985 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7986 echo "configure:7987: checking for ${CC-cc} option to accept ANSI C" >&5
7987 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   am_cv_prog_cc_stdc=no
7991 ac_save_CC="$CC"
7992 # Don't try gcc -ansi; that turns off useful extensions and
7993 # breaks some systems' header files.
7994 # AIX                   -qlanglvl=ansi
7995 # Ultrix and OSF/1      -std1
7996 # HP-UX 10.20 and later -Ae
7997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7998 # SVR4                  -Xc -D__EXTENSIONS__
7999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8000 do
8001   CC="$ac_save_CC $ac_arg"
8002   cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 #include <stdarg.h>
8006 #include <stdio.h>
8007 #include <sys/types.h>
8008 #include <sys/stat.h>
8009 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8010 struct buf { int x; };
8011 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8012 static char *e (p, i)
8013      char **p;
8014      int i;
8015 {
8016   return p[i];
8017 }
8018 static char *f (char * (*g) (char **, int), char **p, ...)
8019 {
8020   char *s;
8021   va_list v;
8022   va_start (v,p);
8023   s = g (p, va_arg (v,int));
8024   va_end (v);
8025   return s;
8026 }
8027 int test (int i, double x);
8028 struct s1 {int (*f) (int a);};
8029 struct s2 {int (*f) (double a);};
8030 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8031 int argc;
8032 char **argv;
8033
8034 int main() {
8035
8036 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8037
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8041   rm -rf conftest*
8042   am_cv_prog_cc_stdc="$ac_arg"; break
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046 fi
8047 rm -f conftest*
8048 done
8049 CC="$ac_save_CC"
8050
8051 fi
8052
8053 if test -z "$am_cv_prog_cc_stdc"; then
8054   echo "$ac_t""none needed" 1>&6
8055 else
8056   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8057 fi
8058 case "x$am_cv_prog_cc_stdc" in
8059   x|xno) ;;
8060   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8061 esac
8062
8063 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8064         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8065 fi
8066
8067 # test for make depend flag
8068 OL_MKDEP=
8069 OL_MKDEP_FLAGS=
8070 if test -z "${MKDEP}"; then
8071         OL_MKDEP="${CC-cc}"
8072         if test -z "${MKDEP_FLAGS}"; then
8073                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8074 echo "configure:8075: checking for ${OL_MKDEP} depend flag" >&5
8075 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8076   echo $ac_n "(cached) $ac_c" 1>&6
8077 else
8078   
8079                         ol_cv_mkdep=no
8080                         for flag in "-M" "-xM"; do
8081                                 cat > conftest.c <<EOF
8082  noCode;
8083 EOF
8084                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8085                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8086                                 then
8087                                         if test ! -f conftest."${ac_object}" ; then
8088                                                 ol_cv_mkdep=$flag
8089                                                 OL_MKDEP_FLAGS="$flag"
8090                                                 break
8091                                         fi
8092                                 fi
8093                         done
8094                         rm -f conftest*
8095                 
8096 fi
8097
8098 echo "$ac_t""$ol_cv_mkdep" 1>&6
8099         else
8100                 cc_cv_mkdep=yes
8101                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8102         fi
8103 else
8104         cc_cv_mkdep=yes
8105         OL_MKDEP="${MKDEP}"
8106         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8107 fi
8108
8109
8110
8111 if test "${ol_cv_mkdep}" = no ; then
8112         # this will soon become an error
8113         echo "configure: warning: do not know how to generate dependencies" 1>&2
8114 fi
8115
8116 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8117 echo "configure:8118: checking for afopen in -ls" >&5
8118 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   ac_save_LIBS="$LIBS"
8123 LIBS="-ls  $LIBS"
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127 /* Override any gcc2 internal prototype to avoid an error.  */
8128 /* We use char because int might match the return type of a gcc2
8129     builtin and then its argument prototype would still apply.  */
8130 char afopen();
8131
8132 int main() {
8133 afopen()
8134 ; return 0; }
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137   rm -rf conftest*
8138   eval "ac_cv_lib_$ac_lib_var=yes"
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_lib_$ac_lib_var=no"
8144 fi
8145 rm -f conftest*
8146 LIBS="$ac_save_LIBS"
8147
8148 fi
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8150   echo "$ac_t""yes" 1>&6
8151   
8152         AUTH_LIBS=-ls
8153         cat >> confdefs.h <<\EOF
8154 #define HAVE_AIX_SECURITY 1
8155 EOF
8156
8157
8158 else
8159   echo "$ac_t""no" 1>&6
8160 fi
8161
8162
8163 case "$target" in
8164 *-ibm-openedition)
8165         ac_cv_func_getopt=no
8166         cat >> confdefs.h <<\EOF
8167 #define BOTH_STRINGS_H 1
8168 EOF
8169
8170         ;;
8171 esac
8172
8173 ol_link_modules=no
8174 if test $ol_enable_modules != no ; then
8175         for ac_hdr in ltdl.h
8176 do
8177 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8178 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8179 echo "configure:8180: checking for $ac_hdr" >&5
8180 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8181   echo $ac_n "(cached) $ac_c" 1>&6
8182 else
8183   cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 #include <$ac_hdr>
8187 EOF
8188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8189 { (eval echo configure:8190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8191 if test -z "$ac_err"; then
8192   rm -rf conftest*
8193   eval "ac_cv_header_$ac_safe=yes"
8194 else
8195   echo "$ac_err" >&5
8196   echo "configure: failed program was:" >&5
8197   cat conftest.$ac_ext >&5
8198   rm -rf conftest*
8199   eval "ac_cv_header_$ac_safe=no"
8200 fi
8201 rm -f conftest*
8202 fi
8203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8204   echo "$ac_t""yes" 1>&6
8205     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8206   cat >> confdefs.h <<EOF
8207 #define $ac_tr_hdr 1
8208 EOF
8209  
8210 else
8211   echo "$ac_t""no" 1>&6
8212 fi
8213 done
8214
8215
8216         if test $ac_cv_header_ltdl_h = no ; then
8217                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8218         fi
8219
8220         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8221 echo "configure:8222: checking for lt_dlinit in -lltdl" >&5
8222 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   ac_save_LIBS="$LIBS"
8227 LIBS="-lltdl  $LIBS"
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char lt_dlinit();
8235
8236 int main() {
8237 lt_dlinit()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 LIBS="$ac_save_LIBS"
8251
8252 fi
8253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255   
8256                 MODULES_LIBS=-lltdl
8257                 cat >> confdefs.h <<\EOF
8258 #define HAVE_LIBLTDL 1
8259 EOF
8260
8261         
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265
8266
8267         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8268                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8269         fi
8270         ol_link_modules=yes
8271
8272 else
8273         for i in $Backends; do
8274                 eval "ol_tmp=\$ol_enable_$i"
8275                 if test $ol_tmp = mod ; then
8276                         echo "configure: warning: building static $i backend" 1>&2
8277                         eval "ol_enable_$i=yes"
8278                 fi
8279         done
8280         for i in $Overlays; do
8281                 eval "ol_tmp=\$ol_enable_$i"
8282                 if test $ol_tmp = mod ; then
8283                         echo "configure: warning: building static $i overlay" 1>&2
8284                         eval "ol_enable_$i=yes"
8285                 fi
8286         done
8287 fi
8288
8289 # test for EBCDIC
8290 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8291 echo "configure:8292: checking for EBCDIC" >&5
8292 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8293   echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295   
8296         cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299
8300 #if !('M' == 0xd4)
8301 #include <__ASCII__/generate_error.h>
8302 #endif
8303
8304 EOF
8305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8306 { (eval echo configure:8307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8308 if test -z "$ac_err"; then
8309   rm -rf conftest*
8310   ol_cv_cpp_ebcdic=yes
8311 else
8312   echo "$ac_err" >&5
8313   echo "configure: failed program was:" >&5
8314   cat conftest.$ac_ext >&5
8315   rm -rf conftest*
8316   ol_cv_cpp_ebcdic=no
8317 fi
8318 rm -f conftest*
8319 fi
8320
8321 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8322 if test $ol_cv_cpp_ebcdic = yes ; then
8323         cat >> confdefs.h <<\EOF
8324 #define HAVE_EBCDIC 1
8325 EOF
8326
8327 fi
8328
8329 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8330 echo "configure:8331: checking for ANSI C header files" >&5
8331 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8332   echo $ac_n "(cached) $ac_c" 1>&6
8333 else
8334   cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337 #include <stdlib.h>
8338 #include <stdarg.h>
8339 #include <string.h>
8340 #include <float.h>
8341 EOF
8342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8343 { (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8345 if test -z "$ac_err"; then
8346   rm -rf conftest*
8347   ol_cv_header_stdc=yes
8348 else
8349   echo "$ac_err" >&5
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   ol_cv_header_stdc=no
8354 fi
8355 rm -f conftest*
8356
8357 if test $ol_cv_header_stdc = yes; then
8358   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8359 cat > conftest.$ac_ext <<EOF
8360 #line 8361 "configure"
8361 #include "confdefs.h"
8362 #include <string.h>
8363 EOF
8364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8365   egrep "memchr" >/dev/null 2>&1; then
8366   :
8367 else
8368   rm -rf conftest*
8369   ol_cv_header_stdc=no
8370 fi
8371 rm -f conftest*
8372
8373 fi
8374
8375 if test $ol_cv_header_stdc = yes; then
8376   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8377 cat > conftest.$ac_ext <<EOF
8378 #line 8379 "configure"
8379 #include "confdefs.h"
8380 #include <stdlib.h>
8381 EOF
8382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8383   egrep "free" >/dev/null 2>&1; then
8384   :
8385 else
8386   rm -rf conftest*
8387   ol_cv_header_stdc=no
8388 fi
8389 rm -f conftest*
8390
8391 fi
8392
8393 if test $ol_cv_header_stdc = yes; then
8394   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8395 if test "$cross_compiling" = yes; then
8396   :
8397 else
8398   cat > conftest.$ac_ext <<EOF
8399 #line 8400 "configure"
8400 #include "confdefs.h"
8401 #include <ctype.h>
8402 #ifndef HAVE_EBCDIC
8403 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8404 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8405 #else
8406 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8407                 || ('j' <= (c) && (c) <= 'r') \
8408                 || ('s' <= (c) && (c) <= 'z'))
8409 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8410 #endif
8411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8412 int main () { int i; for (i = 0; i < 256; i++)
8413 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8414 exit (0); }
8415
8416 EOF
8417 if { (eval echo configure:8418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8418 then
8419   :
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -fr conftest*
8424   ol_cv_header_stdc=no
8425 fi
8426 rm -fr conftest*
8427 fi
8428
8429 fi
8430 fi
8431
8432 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8433 if test $ol_cv_header_stdc = yes; then
8434   cat >> confdefs.h <<\EOF
8435 #define STDC_HEADERS 1
8436 EOF
8437
8438 fi
8439 ac_cv_header_stdc=disable
8440
8441
8442 if test $ol_cv_header_stdc != yes; then
8443         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8444 fi
8445
8446 ac_header_dirent=no
8447 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8448 do
8449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8450 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8451 echo "configure:8452: checking for $ac_hdr that defines DIR" >&5
8452 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8453   echo $ac_n "(cached) $ac_c" 1>&6
8454 else
8455   cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 #include <sys/types.h>
8459 #include <$ac_hdr>
8460 int main() {
8461 DIR *dirp = 0;
8462 ; return 0; }
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8465   rm -rf conftest*
8466   eval "ac_cv_header_dirent_$ac_safe=yes"
8467 else
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -rf conftest*
8471   eval "ac_cv_header_dirent_$ac_safe=no"
8472 fi
8473 rm -f conftest*
8474 fi
8475 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8476   echo "$ac_t""yes" 1>&6
8477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8478   cat >> confdefs.h <<EOF
8479 #define $ac_tr_hdr 1
8480 EOF
8481  ac_header_dirent=$ac_hdr; break
8482 else
8483   echo "$ac_t""no" 1>&6
8484 fi
8485 done
8486 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8487 if test $ac_header_dirent = dirent.h; then
8488 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8489 echo "configure:8490: checking for opendir in -ldir" >&5
8490 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8492   echo $ac_n "(cached) $ac_c" 1>&6
8493 else
8494   ac_save_LIBS="$LIBS"
8495 LIBS="-ldir  $LIBS"
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 /* We use char because int might match the return type of a gcc2
8501     builtin and then its argument prototype would still apply.  */
8502 char opendir();
8503
8504 int main() {
8505 opendir()
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   eval "ac_cv_lib_$ac_lib_var=yes"
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_lib_$ac_lib_var=no"
8516 fi
8517 rm -f conftest*
8518 LIBS="$ac_save_LIBS"
8519
8520 fi
8521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523   LIBS="$LIBS -ldir"
8524 else
8525   echo "$ac_t""no" 1>&6
8526 fi
8527
8528 else
8529 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8530 echo "configure:8531: checking for opendir in -lx" >&5
8531 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8533   echo $ac_n "(cached) $ac_c" 1>&6
8534 else
8535   ac_save_LIBS="$LIBS"
8536 LIBS="-lx  $LIBS"
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 /* We use char because int might match the return type of a gcc2
8542     builtin and then its argument prototype would still apply.  */
8543 char opendir();
8544
8545 int main() {
8546 opendir()
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=no"
8557 fi
8558 rm -f conftest*
8559 LIBS="$ac_save_LIBS"
8560
8561 fi
8562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8563   echo "$ac_t""yes" 1>&6
8564   LIBS="$LIBS -lx"
8565 else
8566   echo "$ac_t""no" 1>&6
8567 fi
8568
8569 fi
8570
8571 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8572 echo "configure:8573: checking for sys/wait.h that is POSIX.1 compatible" >&5
8573 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8574   echo $ac_n "(cached) $ac_c" 1>&6
8575 else
8576   cat > conftest.$ac_ext <<EOF
8577 #line 8578 "configure"
8578 #include "confdefs.h"
8579 #include <sys/types.h>
8580 #include <sys/wait.h>
8581 #ifndef WEXITSTATUS
8582 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8583 #endif
8584 #ifndef WIFEXITED
8585 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8586 #endif
8587 int main() {
8588 int s;
8589 wait (&s);
8590 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8591 ; return 0; }
8592 EOF
8593 if { (eval echo configure:8594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8594   rm -rf conftest*
8595   ac_cv_header_sys_wait_h=yes
8596 else
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   ac_cv_header_sys_wait_h=no
8601 fi
8602 rm -f conftest*
8603 fi
8604
8605 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8606 if test $ac_cv_header_sys_wait_h = yes; then
8607   cat >> confdefs.h <<\EOF
8608 #define HAVE_SYS_WAIT_H 1
8609 EOF
8610
8611 fi
8612
8613 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8614 echo "configure:8615: checking POSIX termios" >&5
8615 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8616   echo $ac_n "(cached) $ac_c" 1>&6
8617 else
8618   cat > conftest.$ac_ext <<EOF
8619 #line 8620 "configure"
8620 #include "confdefs.h"
8621 #include <sys/types.h>
8622 #include <unistd.h>
8623 #include <termios.h>
8624 int main() {
8625 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8626    tcgetattr(0, 0);
8627 ; return 0; }
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8630   rm -rf conftest*
8631   am_cv_sys_posix_termios=yes
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -rf conftest*
8636   am_cv_sys_posix_termios=no
8637 fi
8638 rm -f conftest*
8639 fi
8640
8641 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8642
8643
8644  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8645 echo "configure:8646: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8646 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8650
8651   gwinsz_in_termios_h=no
8652   if test $am_cv_sys_posix_termios = yes; then
8653     cat > conftest.$ac_ext <<EOF
8654 #line 8655 "configure"
8655 #include "confdefs.h"
8656 #include <sys/types.h>
8657 #     include <termios.h>
8658 #     ifdef TIOCGWINSZ
8659         yes
8660 #     endif
8661     
8662 EOF
8663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8664   egrep "yes" >/dev/null 2>&1; then
8665   rm -rf conftest*
8666   gwinsz_in_termios_h=yes
8667 fi
8668 rm -f conftest*
8669
8670   fi
8671
8672   if test $gwinsz_in_termios_h = no; then
8673     cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 #include <sys/types.h>
8677 #     include <sys/ioctl.h>
8678 #     ifdef TIOCGWINSZ
8679         yes
8680 #     endif
8681     
8682 EOF
8683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8684   egrep "yes" >/dev/null 2>&1; then
8685   rm -rf conftest*
8686   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8687 fi
8688 rm -f conftest*
8689
8690   fi
8691   
8692 fi
8693
8694 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8695   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8696     cat >> confdefs.h <<\EOF
8697 #define GWINSZ_IN_SYS_IOCTL 1
8698 EOF
8699
8700   fi
8701
8702 if test $am_cv_sys_posix_termios = yes ; then
8703         cat >> confdefs.h <<\EOF
8704 #define HAVE_POSIX_TERMIOS 1
8705 EOF
8706
8707 fi
8708
8709 for ac_hdr in \
8710         arpa/inet.h             \
8711         arpa/nameser.h  \
8712         assert.h                \
8713         bits/types.h    \
8714         conio.h                 \
8715         crypt.h                 \
8716         direct.h                \
8717         errno.h                 \
8718         fcntl.h                 \
8719         filio.h                 \
8720         getopt.h                \
8721         grp.h                   \
8722         io.h                    \
8723         libutil.h               \
8724         limits.h                \
8725         locale.h                \
8726         netinet/tcp.h   \
8727         malloc.h                \
8728         memory.h                \
8729         psap.h                  \
8730         pwd.h                   \
8731         process.h               \
8732         resolv.h                \
8733         sgtty.h                 \
8734         shadow.h                \
8735         stddef.h                \
8736         string.h                \
8737         strings.h               \
8738         sysexits.h              \
8739         sys/file.h              \
8740         sys/filio.h             \
8741         sys/errno.h             \
8742         sys/ioctl.h             \
8743         sys/param.h             \
8744         sys/resource.h  \
8745         sys/select.h    \
8746         sys/socket.h    \
8747         sys/stat.h              \
8748         sys/syslog.h    \
8749         sys/time.h              \
8750         sys/types.h             \
8751         sys/ucred.h             \
8752         sys/uio.h               \
8753         syslog.h                \
8754         termios.h               \
8755         unistd.h                \
8756         winsock.h               \
8757         winsock2.h              \
8758
8759 do
8760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8762 echo "configure:8763: checking for $ac_hdr" >&5
8763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8764   echo $ac_n "(cached) $ac_c" 1>&6
8765 else
8766   cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <$ac_hdr>
8770 EOF
8771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8772 { (eval echo configure:8773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8774 if test -z "$ac_err"; then
8775   rm -rf conftest*
8776   eval "ac_cv_header_$ac_safe=yes"
8777 else
8778   echo "$ac_err" >&5
8779   echo "configure: failed program was:" >&5
8780   cat conftest.$ac_ext >&5
8781   rm -rf conftest*
8782   eval "ac_cv_header_$ac_safe=no"
8783 fi
8784 rm -f conftest*
8785 fi
8786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8787   echo "$ac_t""yes" 1>&6
8788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8789   cat >> confdefs.h <<EOF
8790 #define $ac_tr_hdr 1
8791 EOF
8792  
8793 else
8794   echo "$ac_t""no" 1>&6
8795 fi
8796 done
8797
8798
8799
8800
8801 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8802 echo "configure:8803: checking for sigset in -lV3" >&5
8803 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8804 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   ac_save_LIBS="$LIBS"
8808 LIBS="-lV3  $LIBS"
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 /* Override any gcc2 internal prototype to avoid an error.  */
8813 /* We use char because int might match the return type of a gcc2
8814     builtin and then its argument prototype would still apply.  */
8815 char sigset();
8816
8817 int main() {
8818 sigset()
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   eval "ac_cv_lib_$ac_lib_var=yes"
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_lib_$ac_lib_var=no"
8829 fi
8830 rm -f conftest*
8831 LIBS="$ac_save_LIBS"
8832
8833 fi
8834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8835   echo "$ac_t""yes" 1>&6
8836     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8837     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8838   cat >> confdefs.h <<EOF
8839 #define $ac_tr_lib 1
8840 EOF
8841
8842   LIBS="-lV3 $LIBS"
8843
8844 else
8845   echo "$ac_t""no" 1>&6
8846 fi
8847
8848
8849 if test "$ac_cv_header_winsock_h" = yes; then
8850 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8851 echo "configure:8852: checking for winsock" >&5
8852 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   save_LIBS="$LIBS"
8856 for curlib in ws2_32 wsock32; do
8857         LIBS="$LIBS -l$curlib"
8858         cat > conftest.$ac_ext <<EOF
8859 #line 8860 "configure"
8860 #include "confdefs.h"
8861 #include <winsock.h>
8862                         
8863 int main() {
8864
8865                         socket(0,0,0);
8866                         select(0,NULL,NULL,NULL,NULL);
8867                         closesocket(0);
8868                         gethostname(NULL,0);
8869                         
8870 ; return 0; }
8871 EOF
8872 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8873   rm -rf conftest*
8874   ol_cv_winsock=yes
8875 else
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -rf conftest*
8879   ol_cv_winsock=no
8880 fi
8881 rm -f conftest*
8882
8883         if test $ol_cv_winsock = yes; then
8884                 cat >> confdefs.h <<\EOF
8885 #define HAVE_WINSOCK 1
8886 EOF
8887
8888                 ac_cv_func_socket=yes
8889                 ac_cv_func_select=yes
8890                 ac_cv_func_closesocket=yes
8891                 ac_cv_func_gethostname=yes
8892                 if test $curlib = ws2_32; then
8893                         ol_cv_winsock=winsock2
8894                         cat >> confdefs.h <<\EOF
8895 #define HAVE_WINSOCK2 1
8896 EOF
8897
8898                 fi
8899                 break
8900         fi
8901         LIBS="$save_LIBS"
8902 done
8903 fi
8904
8905 echo "$ac_t""$ol_cv_winsock" 1>&6
8906 fi
8907
8908
8909 echo $ac_n "checking for socket""... $ac_c" 1>&6
8910 echo "configure:8911: checking for socket" >&5
8911 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   cat > conftest.$ac_ext <<EOF
8915 #line 8916 "configure"
8916 #include "confdefs.h"
8917 /* System header to define __stub macros and hopefully few prototypes,
8918     which can conflict with char socket(); below.  */
8919 #include <assert.h>
8920 /* Override any gcc2 internal prototype to avoid an error.  */
8921 /* We use char because int might match the return type of a gcc2
8922     builtin and then its argument prototype would still apply.  */
8923 char socket();
8924 char (*f)();
8925
8926 int main() {
8927
8928 /* The GNU C library defines this for functions which it implements
8929     to always fail with ENOSYS.  Some functions are actually named
8930     something starting with __ and the normal name is an alias.  */
8931 #if defined (__stub_socket) || defined (__stub___socket)
8932 choke me
8933 #else
8934 f = socket;
8935 #endif
8936
8937 ; return 0; }
8938 EOF
8939 if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8940   rm -rf conftest*
8941   eval "ac_cv_func_socket=yes"
8942 else
8943   echo "configure: failed program was:" >&5
8944   cat conftest.$ac_ext >&5
8945   rm -rf conftest*
8946   eval "ac_cv_func_socket=no"
8947 fi
8948 rm -f conftest*
8949 fi
8950
8951 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8952   echo "$ac_t""yes" 1>&6
8953   :
8954 else
8955   echo "$ac_t""no" 1>&6
8956         
8957         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8958 echo "configure:8959: checking for main in -lsocket" >&5
8959 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8960 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8961   echo $ac_n "(cached) $ac_c" 1>&6
8962 else
8963   ac_save_LIBS="$LIBS"
8964 LIBS="-lsocket  $LIBS"
8965 cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968
8969 int main() {
8970 main()
8971 ; return 0; }
8972 EOF
8973 if { (eval echo configure:8974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8974   rm -rf conftest*
8975   eval "ac_cv_lib_$ac_lib_var=yes"
8976 else
8977   echo "configure: failed program was:" >&5
8978   cat conftest.$ac_ext >&5
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=no"
8981 fi
8982 rm -f conftest*
8983 LIBS="$ac_save_LIBS"
8984
8985 fi
8986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8987   echo "$ac_t""yes" 1>&6
8988     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8990   cat >> confdefs.h <<EOF
8991 #define $ac_tr_lib 1
8992 EOF
8993
8994   LIBS="-lsocket $LIBS"
8995
8996 else
8997   echo "$ac_t""no" 1>&6
8998 fi
8999
9000         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9001 echo "configure:9002: checking for main in -lnet" >&5
9002 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9004   echo $ac_n "(cached) $ac_c" 1>&6
9005 else
9006   ac_save_LIBS="$LIBS"
9007 LIBS="-lnet  $LIBS"
9008 cat > conftest.$ac_ext <<EOF
9009 #line 9010 "configure"
9010 #include "confdefs.h"
9011
9012 int main() {
9013 main()
9014 ; return 0; }
9015 EOF
9016 if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9017   rm -rf conftest*
9018   eval "ac_cv_lib_$ac_lib_var=yes"
9019 else
9020   echo "configure: failed program was:" >&5
9021   cat conftest.$ac_ext >&5
9022   rm -rf conftest*
9023   eval "ac_cv_lib_$ac_lib_var=no"
9024 fi
9025 rm -f conftest*
9026 LIBS="$ac_save_LIBS"
9027
9028 fi
9029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9030   echo "$ac_t""yes" 1>&6
9031     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9032     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9033   cat >> confdefs.h <<EOF
9034 #define $ac_tr_lib 1
9035 EOF
9036
9037   LIBS="-lnet $LIBS"
9038
9039 else
9040   echo "$ac_t""no" 1>&6
9041 fi
9042
9043         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9044 echo "configure:9045: checking for main in -lnsl_s" >&5
9045 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9047   echo $ac_n "(cached) $ac_c" 1>&6
9048 else
9049   ac_save_LIBS="$LIBS"
9050 LIBS="-lnsl_s  $LIBS"
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054
9055 int main() {
9056 main()
9057 ; return 0; }
9058 EOF
9059 if { (eval echo configure:9060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9060   rm -rf conftest*
9061   eval "ac_cv_lib_$ac_lib_var=yes"
9062 else
9063   echo "configure: failed program was:" >&5
9064   cat conftest.$ac_ext >&5
9065   rm -rf conftest*
9066   eval "ac_cv_lib_$ac_lib_var=no"
9067 fi
9068 rm -f conftest*
9069 LIBS="$ac_save_LIBS"
9070
9071 fi
9072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9073   echo "$ac_t""yes" 1>&6
9074     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9076   cat >> confdefs.h <<EOF
9077 #define $ac_tr_lib 1
9078 EOF
9079
9080   LIBS="-lnsl_s $LIBS"
9081
9082 else
9083   echo "$ac_t""no" 1>&6
9084 fi
9085
9086         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9087 echo "configure:9088: checking for main in -lnsl" >&5
9088 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   ac_save_LIBS="$LIBS"
9093 LIBS="-lnsl  $LIBS"
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097
9098 int main() {
9099 main()
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   eval "ac_cv_lib_$ac_lib_var=yes"
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   eval "ac_cv_lib_$ac_lib_var=no"
9110 fi
9111 rm -f conftest*
9112 LIBS="$ac_save_LIBS"
9113
9114 fi
9115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9116   echo "$ac_t""yes" 1>&6
9117     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9118     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9119   cat >> confdefs.h <<EOF
9120 #define $ac_tr_lib 1
9121 EOF
9122
9123   LIBS="-lnsl $LIBS"
9124
9125 else
9126   echo "$ac_t""no" 1>&6
9127 fi
9128
9129         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9130 echo "configure:9131: checking for socket in -linet" >&5
9131 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9132 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9133   echo $ac_n "(cached) $ac_c" 1>&6
9134 else
9135   ac_save_LIBS="$LIBS"
9136 LIBS="-linet  $LIBS"
9137 cat > conftest.$ac_ext <<EOF
9138 #line 9139 "configure"
9139 #include "confdefs.h"
9140 /* Override any gcc2 internal prototype to avoid an error.  */
9141 /* We use char because int might match the return type of a gcc2
9142     builtin and then its argument prototype would still apply.  */
9143 char socket();
9144
9145 int main() {
9146 socket()
9147 ; return 0; }
9148 EOF
9149 if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9150   rm -rf conftest*
9151   eval "ac_cv_lib_$ac_lib_var=yes"
9152 else
9153   echo "configure: failed program was:" >&5
9154   cat conftest.$ac_ext >&5
9155   rm -rf conftest*
9156   eval "ac_cv_lib_$ac_lib_var=no"
9157 fi
9158 rm -f conftest*
9159 LIBS="$ac_save_LIBS"
9160
9161 fi
9162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9165     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9166   cat >> confdefs.h <<EOF
9167 #define $ac_tr_lib 1
9168 EOF
9169
9170   LIBS="-linet $LIBS"
9171
9172 else
9173   echo "$ac_t""no" 1>&6
9174 fi
9175
9176         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9177 echo "configure:9178: checking for main in -lgen" >&5
9178 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9180   echo $ac_n "(cached) $ac_c" 1>&6
9181 else
9182   ac_save_LIBS="$LIBS"
9183 LIBS="-lgen  $LIBS"
9184 cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187
9188 int main() {
9189 main()
9190 ; return 0; }
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9193   rm -rf conftest*
9194   eval "ac_cv_lib_$ac_lib_var=yes"
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_lib_$ac_lib_var=no"
9200 fi
9201 rm -f conftest*
9202 LIBS="$ac_save_LIBS"
9203
9204 fi
9205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9206   echo "$ac_t""yes" 1>&6
9207     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9208     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9209   cat >> confdefs.h <<EOF
9210 #define $ac_tr_lib 1
9211 EOF
9212
9213   LIBS="-lgen $LIBS"
9214
9215 else
9216   echo "$ac_t""no" 1>&6
9217 fi
9218
9219
9220 fi
9221
9222
9223 echo $ac_n "checking for select""... $ac_c" 1>&6
9224 echo "configure:9225: checking for select" >&5
9225 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231 /* System header to define __stub macros and hopefully few prototypes,
9232     which can conflict with char select(); below.  */
9233 #include <assert.h>
9234 /* Override any gcc2 internal prototype to avoid an error.  */
9235 /* We use char because int might match the return type of a gcc2
9236     builtin and then its argument prototype would still apply.  */
9237 char select();
9238 char (*f)();
9239
9240 int main() {
9241
9242 /* The GNU C library defines this for functions which it implements
9243     to always fail with ENOSYS.  Some functions are actually named
9244     something starting with __ and the normal name is an alias.  */
9245 #if defined (__stub_select) || defined (__stub___select)
9246 choke me
9247 #else
9248 f = select;
9249 #endif
9250
9251 ; return 0; }
9252 EOF
9253 if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9254   rm -rf conftest*
9255   eval "ac_cv_func_select=yes"
9256 else
9257   echo "configure: failed program was:" >&5
9258   cat conftest.$ac_ext >&5
9259   rm -rf conftest*
9260   eval "ac_cv_func_select=no"
9261 fi
9262 rm -f conftest*
9263 fi
9264
9265 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267   :
9268 else
9269   echo "$ac_t""no" 1>&6
9270 { echo "configure: error: select() required." 1>&2; exit 1; }
9271 fi
9272
9273
9274 if test "${ac_cv_header_winsock_h}" != yes; then
9275                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9276 echo "configure:9277: checking types of arguments for select()" >&5
9277  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9278   echo $ac_n "(cached) $ac_c" 1>&6
9279 else
9280    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9281   echo $ac_n "(cached) $ac_c" 1>&6
9282 else
9283     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9284   echo $ac_n "(cached) $ac_c" 1>&6
9285 else
9286      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9287      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9288       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9289        cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #ifdef HAVE_SYS_TYPES_H
9293 #include <sys/types.h>
9294 #endif
9295 #ifdef HAVE_SYS_TIME_H
9296 #include <sys/time.h>
9297 #endif
9298 #ifdef HAVE_SYS_SELECT_H
9299 #include <sys/select.h>
9300 #endif
9301 #ifdef HAVE_SYS_SOCKET_H
9302 #include <sys/socket.h>
9303 #endif
9304 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);
9305 int main() {
9306
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9310   rm -rf conftest*
9311           ac_not_found=no ; break 3
9312 else
9313   echo "configure: failed program was:" >&5
9314   cat conftest.$ac_ext >&5
9315   rm -rf conftest*
9316   ac_not_found=yes
9317 fi
9318 rm -f conftest*
9319       done
9320      done
9321     done
9322    
9323 fi
9324   
9325 fi
9326  
9327 fi
9328  if test "$ac_not_found" = yes; then
9329   ac_cv_func_select_arg1=int 
9330   ac_cv_func_select_arg234='int *' 
9331   ac_cv_func_select_arg5='struct timeval *'
9332  fi
9333  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9334  cat >> confdefs.h <<EOF
9335 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9336 EOF
9337
9338  cat >> confdefs.h <<EOF
9339 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9340 EOF
9341
9342  cat >> confdefs.h <<EOF
9343 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9344 EOF
9345
9346
9347 fi
9348
9349
9350 for ac_func in poll 
9351 do
9352 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9353 echo "configure:9354: checking for $ac_func" >&5
9354 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9355   echo $ac_n "(cached) $ac_c" 1>&6
9356 else
9357   cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 /* System header to define __stub macros and hopefully few prototypes,
9361     which can conflict with char $ac_func(); below.  */
9362 #include <assert.h>
9363 /* Override any gcc2 internal prototype to avoid an error.  */
9364 /* We use char because int might match the return type of a gcc2
9365     builtin and then its argument prototype would still apply.  */
9366 char $ac_func();
9367 char (*f)();
9368
9369 int main() {
9370
9371 /* The GNU C library defines this for functions which it implements
9372     to always fail with ENOSYS.  Some functions are actually named
9373     something starting with __ and the normal name is an alias.  */
9374 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9375 choke me
9376 #else
9377 f = $ac_func;
9378 #endif
9379
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_func_$ac_func=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_func_$ac_func=no"
9390 fi
9391 rm -f conftest*
9392 fi
9393
9394 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9397   cat >> confdefs.h <<EOF
9398 #define $ac_tr_func 1
9399 EOF
9400  
9401 else
9402   echo "$ac_t""no" 1>&6
9403 fi
9404 done
9405
9406 for ac_hdr in poll.h 
9407 do
9408 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9409 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9410 echo "configure:9411: checking for $ac_hdr" >&5
9411 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414   cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417 #include <$ac_hdr>
9418 EOF
9419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9420 { (eval echo configure:9421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9422 if test -z "$ac_err"; then
9423   rm -rf conftest*
9424   eval "ac_cv_header_$ac_safe=yes"
9425 else
9426   echo "$ac_err" >&5
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -rf conftest*
9430   eval "ac_cv_header_$ac_safe=no"
9431 fi
9432 rm -f conftest*
9433 fi
9434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9435   echo "$ac_t""yes" 1>&6
9436     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_hdr 1
9439 EOF
9440  
9441 else
9442   echo "$ac_t""no" 1>&6
9443 fi
9444 done
9445
9446
9447 # strerror checks
9448 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9449 echo "configure:9450: checking declaration of sys_errlist" >&5
9450 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9451   echo $ac_n "(cached) $ac_c" 1>&6
9452 else
9453   
9454         cat > conftest.$ac_ext <<EOF
9455 #line 9456 "configure"
9456 #include "confdefs.h"
9457
9458 #include <stdio.h>
9459 #include <sys/types.h>
9460 #include <errno.h>
9461 #ifdef WINNT
9462 #include <stdlib.h>
9463 #endif 
9464 int main() {
9465 char *c = (char *) *sys_errlist
9466 ; return 0; }
9467 EOF
9468 if { (eval echo configure:9469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9469   rm -rf conftest*
9470   ol_cv_dcl_sys_errlist=yes
9471         ol_cv_have_sys_errlist=yes
9472 else
9473   echo "configure: failed program was:" >&5
9474   cat conftest.$ac_ext >&5
9475   rm -rf conftest*
9476   ol_cv_dcl_sys_errlist=no
9477 fi
9478 rm -f conftest*
9479 fi
9480
9481 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9482 #
9483 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9484 if test $ol_cv_dcl_sys_errlist = no ; then
9485         cat >> confdefs.h <<\EOF
9486 #define DECL_SYS_ERRLIST 1
9487 EOF
9488
9489
9490         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9491 echo "configure:9492: checking existence of sys_errlist" >&5
9492 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9493   echo $ac_n "(cached) $ac_c" 1>&6
9494 else
9495   
9496                 cat > conftest.$ac_ext <<EOF
9497 #line 9498 "configure"
9498 #include "confdefs.h"
9499 #include <errno.h>
9500 int main() {
9501 char *c = (char *) *sys_errlist
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   ol_cv_have_sys_errlist=yes
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   ol_cv_have_sys_errlist=no
9512 fi
9513 rm -f conftest*
9514 fi
9515
9516 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9517 fi
9518 if test $ol_cv_have_sys_errlist = yes ; then
9519         cat >> confdefs.h <<\EOF
9520 #define HAVE_SYS_ERRLIST 1
9521 EOF
9522
9523 fi
9524  for ac_func in strerror strerror_r
9525 do
9526 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9527 echo "configure:9528: checking for $ac_func" >&5
9528 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531   cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 /* System header to define __stub macros and hopefully few prototypes,
9535     which can conflict with char $ac_func(); below.  */
9536 #include <assert.h>
9537 /* Override any gcc2 internal prototype to avoid an error.  */
9538 /* We use char because int might match the return type of a gcc2
9539     builtin and then its argument prototype would still apply.  */
9540 char $ac_func();
9541 char (*f)();
9542
9543 int main() {
9544
9545 /* The GNU C library defines this for functions which it implements
9546     to always fail with ENOSYS.  Some functions are actually named
9547     something starting with __ and the normal name is an alias.  */
9548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9549 choke me
9550 #else
9551 f = $ac_func;
9552 #endif
9553
9554 ; return 0; }
9555 EOF
9556 if { (eval echo configure:9557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9557   rm -rf conftest*
9558   eval "ac_cv_func_$ac_func=yes"
9559 else
9560   echo "configure: failed program was:" >&5
9561   cat conftest.$ac_ext >&5
9562   rm -rf conftest*
9563   eval "ac_cv_func_$ac_func=no"
9564 fi
9565 rm -f conftest*
9566 fi
9567
9568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9569   echo "$ac_t""yes" 1>&6
9570     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9571   cat >> confdefs.h <<EOF
9572 #define $ac_tr_func 1
9573 EOF
9574  
9575 else
9576   echo "$ac_t""no" 1>&6
9577 fi
9578 done
9579
9580 ol_cv_func_strerror_r=no
9581 if test "${ac_cv_func_strerror_r}" = yes ; then
9582         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9583 echo "configure:9584: checking non-posix strerror_r" >&5
9584 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9585   echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587   
9588         cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 #include <string.h>
9592 EOF
9593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9594   egrep "strerror_r" >/dev/null 2>&1; then
9595   rm -rf conftest*
9596   ol_decl_strerror_r=yes
9597 else
9598   rm -rf conftest*
9599   ol_decl_strerror_r=no
9600 fi
9601 rm -f conftest*
9602
9603         if test $ol_decl_strerror_r = yes ; then
9604                 cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 #include <string.h>
9608 int main() {
9609    /* from autoconf 2.59 */
9610                                 char buf[100];
9611                                 char x = *strerror_r (0, buf, sizeof buf);
9612                                 char *p = strerror_r (0, buf, sizeof buf);
9613                         
9614 ; return 0; }
9615 EOF
9616 if { (eval echo configure:9617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9617   rm -rf conftest*
9618   ol_cv_nonposix_strerror_r=yes
9619 else
9620   echo "configure: failed program was:" >&5
9621   cat conftest.$ac_ext >&5
9622   rm -rf conftest*
9623   ol_cv_nonposix_strerror_r=no
9624 fi
9625 rm -f conftest*
9626         else
9627                 if test "$cross_compiling" = yes; then
9628     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9629 else
9630   cat > conftest.$ac_ext <<EOF
9631 #line 9632 "configure"
9632 #include "confdefs.h"
9633
9634                         main() {
9635                                 char buf[100];
9636                                 buf[0] = 0;
9637                                 strerror_r( 1, buf, sizeof buf );
9638                                 exit( buf[0] == 0 );
9639                         }
9640                         
9641 EOF
9642 if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9643 then
9644   ol_cv_nonposix_strerror_r=yes
9645 else
9646   echo "configure: failed program was:" >&5
9647   cat conftest.$ac_ext >&5
9648   rm -fr conftest*
9649   ol_cv_nonposix_strerror=no
9650 fi
9651 rm -fr conftest*
9652 fi
9653
9654         fi
9655         
9656 fi
9657
9658 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9659 if test $ol_cv_nonposix_strerror_r = yes ; then
9660         cat >> confdefs.h <<\EOF
9661 #define HAVE_NONPOSIX_STRERROR_R 1
9662 EOF
9663
9664 fi
9665
9666 elif test "${ac_cv_func_strerror}" = no ; then
9667         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9668 echo "configure:9669: checking declaration of sys_errlist" >&5
9669 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672   
9673         cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676
9677 #include <stdio.h>
9678 #include <sys/types.h>
9679 #include <errno.h>
9680 #ifdef WINNT
9681 #include <stdlib.h>
9682 #endif 
9683 int main() {
9684 char *c = (char *) *sys_errlist
9685 ; return 0; }
9686 EOF
9687 if { (eval echo configure:9688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9688   rm -rf conftest*
9689   ol_cv_dcl_sys_errlist=yes
9690         ol_cv_have_sys_errlist=yes
9691 else
9692   echo "configure: failed program was:" >&5
9693   cat conftest.$ac_ext >&5
9694   rm -rf conftest*
9695   ol_cv_dcl_sys_errlist=no
9696 fi
9697 rm -f conftest*
9698 fi
9699
9700 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9701 #
9702 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9703 if test $ol_cv_dcl_sys_errlist = no ; then
9704         cat >> confdefs.h <<\EOF
9705 #define DECL_SYS_ERRLIST 1
9706 EOF
9707
9708
9709         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9710 echo "configure:9711: checking existence of sys_errlist" >&5
9711 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9712   echo $ac_n "(cached) $ac_c" 1>&6
9713 else
9714   
9715                 cat > conftest.$ac_ext <<EOF
9716 #line 9717 "configure"
9717 #include "confdefs.h"
9718 #include <errno.h>
9719 int main() {
9720 char *c = (char *) *sys_errlist
9721 ; return 0; }
9722 EOF
9723 if { (eval echo configure:9724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9724   rm -rf conftest*
9725   ol_cv_have_sys_errlist=yes
9726 else
9727   echo "configure: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   rm -rf conftest*
9730   ol_cv_have_sys_errlist=no
9731 fi
9732 rm -f conftest*
9733 fi
9734
9735 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9736 fi
9737 if test $ol_cv_have_sys_errlist = yes ; then
9738         cat >> confdefs.h <<\EOF
9739 #define HAVE_SYS_ERRLIST 1
9740 EOF
9741
9742 fi
9743
9744 fi
9745
9746
9747 for ac_hdr in regex.h 
9748 do
9749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9751 echo "configure:9752: checking for $ac_hdr" >&5
9752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   cat > conftest.$ac_ext <<EOF
9756 #line 9757 "configure"
9757 #include "confdefs.h"
9758 #include <$ac_hdr>
9759 EOF
9760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9761 { (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9763 if test -z "$ac_err"; then
9764   rm -rf conftest*
9765   eval "ac_cv_header_$ac_safe=yes"
9766 else
9767   echo "$ac_err" >&5
9768   echo "configure: failed program was:" >&5
9769   cat conftest.$ac_ext >&5
9770   rm -rf conftest*
9771   eval "ac_cv_header_$ac_safe=no"
9772 fi
9773 rm -f conftest*
9774 fi
9775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9776   echo "$ac_t""yes" 1>&6
9777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9778   cat >> confdefs.h <<EOF
9779 #define $ac_tr_hdr 1
9780 EOF
9781  
9782 else
9783   echo "$ac_t""no" 1>&6
9784 fi
9785 done
9786
9787 if test "$ac_cv_header_regex_h" != yes ; then
9788         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9789 fi
9790
9791 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9792 echo "configure:9793: checking for library containing regfree" >&5
9793 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9794   echo $ac_n "(cached) $ac_c" 1>&6
9795 else
9796   ac_func_search_save_LIBS="$LIBS"
9797 ac_cv_search_regfree="no"
9798 cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 /* Override any gcc2 internal prototype to avoid an error.  */
9802 /* We use char because int might match the return type of a gcc2
9803     builtin and then its argument prototype would still apply.  */
9804 char regfree();
9805
9806 int main() {
9807 regfree()
9808 ; return 0; }
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9811   rm -rf conftest*
9812   ac_cv_search_regfree="none required"
9813 else
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816 fi
9817 rm -f conftest*
9818 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9819 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9820 cat > conftest.$ac_ext <<EOF
9821 #line 9822 "configure"
9822 #include "confdefs.h"
9823 /* Override any gcc2 internal prototype to avoid an error.  */
9824 /* We use char because int might match the return type of a gcc2
9825     builtin and then its argument prototype would still apply.  */
9826 char regfree();
9827
9828 int main() {
9829 regfree()
9830 ; return 0; }
9831 EOF
9832 if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9833   rm -rf conftest*
9834   ac_cv_search_regfree="-l$ac_lib"
9835 break
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839 fi
9840 rm -f conftest*
9841 done
9842 LIBS="$ac_func_search_save_LIBS"
9843 fi
9844
9845 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9846 if test "$ac_cv_search_regfree" != "no"; then
9847   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9848   :
9849 else :
9850   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9851 fi
9852
9853
9854 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9855 echo "configure:9856: checking for compatible POSIX regex" >&5
9856 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9857   echo $ac_n "(cached) $ac_c" 1>&6
9858 else
9859   
9860         if test "$cross_compiling" = yes; then
9861   ol_cv_c_posix_regex=cross
9862 else
9863   cat > conftest.$ac_ext <<EOF
9864 #line 9865 "configure"
9865 #include "confdefs.h"
9866
9867 #include <sys/types.h>
9868 #include <regex.h>
9869 static char *pattern, *string;
9870 main()
9871 {
9872         int rc;
9873         regex_t re;
9874
9875         pattern = "^A";
9876
9877         if(regcomp(&re, pattern, 0)) {
9878                 return -1;
9879         }
9880         
9881         string = "ALL MATCH";
9882         
9883         rc = regexec(&re, string, 0, (void*)0, 0);
9884
9885         regfree(&re);
9886
9887         return rc;
9888 }
9889 EOF
9890 if { (eval echo configure:9891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9891 then
9892   ol_cv_c_posix_regex=yes
9893 else
9894   echo "configure: failed program was:" >&5
9895   cat conftest.$ac_ext >&5
9896   rm -fr conftest*
9897   ol_cv_c_posix_regex=no
9898 fi
9899 rm -fr conftest*
9900 fi
9901
9902 fi
9903
9904 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9905
9906 if test "$ol_cv_c_posix_regex" = no ; then
9907         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9908 fi
9909
9910
9911 have_uuid=no
9912 for ac_hdr in sys/uuid.h
9913 do
9914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9916 echo "configure:9917: checking for $ac_hdr" >&5
9917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9918   echo $ac_n "(cached) $ac_c" 1>&6
9919 else
9920   cat > conftest.$ac_ext <<EOF
9921 #line 9922 "configure"
9922 #include "confdefs.h"
9923 #include <$ac_hdr>
9924 EOF
9925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9926 { (eval echo configure:9927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9928 if test -z "$ac_err"; then
9929   rm -rf conftest*
9930   eval "ac_cv_header_$ac_safe=yes"
9931 else
9932   echo "$ac_err" >&5
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   eval "ac_cv_header_$ac_safe=no"
9937 fi
9938 rm -f conftest*
9939 fi
9940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9941   echo "$ac_t""yes" 1>&6
9942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9943   cat >> confdefs.h <<EOF
9944 #define $ac_tr_hdr 1
9945 EOF
9946  
9947 else
9948   echo "$ac_t""no" 1>&6
9949 fi
9950 done
9951
9952 if test $ac_cv_header_sys_uuid_h = yes ; then
9953         save_LIBS="$LIBS"
9954         
9955 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9956 echo "configure:9957: checking for library containing uuid_to_str" >&5
9957 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9958   echo $ac_n "(cached) $ac_c" 1>&6
9959 else
9960   ac_func_search_save_LIBS="$LIBS"
9961 ac_cv_search_uuid_to_str="no"
9962 cat > conftest.$ac_ext <<EOF
9963 #line 9964 "configure"
9964 #include "confdefs.h"
9965 /* Override any gcc2 internal prototype to avoid an error.  */
9966 /* We use char because int might match the return type of a gcc2
9967     builtin and then its argument prototype would still apply.  */
9968 char uuid_to_str();
9969
9970 int main() {
9971 uuid_to_str()
9972 ; return 0; }
9973 EOF
9974 if { (eval echo configure:9975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9975   rm -rf conftest*
9976   ac_cv_search_uuid_to_str="none required"
9977 else
9978   echo "configure: failed program was:" >&5
9979   cat conftest.$ac_ext >&5
9980 fi
9981 rm -f conftest*
9982 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9983 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9984 cat > conftest.$ac_ext <<EOF
9985 #line 9986 "configure"
9986 #include "confdefs.h"
9987 /* Override any gcc2 internal prototype to avoid an error.  */
9988 /* We use char because int might match the return type of a gcc2
9989     builtin and then its argument prototype would still apply.  */
9990 char uuid_to_str();
9991
9992 int main() {
9993 uuid_to_str()
9994 ; return 0; }
9995 EOF
9996 if { (eval echo configure:9997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9997   rm -rf conftest*
9998   ac_cv_search_uuid_to_str="-l$ac_lib"
9999 break
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003 fi
10004 rm -f conftest*
10005 done
10006 LIBS="$ac_func_search_save_LIBS"
10007 fi
10008
10009 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10010 if test "$ac_cv_search_uuid_to_str" != "no"; then
10011   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10012   have_uuid=yes
10013 else :
10014   :
10015 fi
10016         LIBS="$save_LIBS"
10017
10018         if test have_uuid = yes ; then
10019                 cat >> confdefs.h <<\EOF
10020 #define HAVE_UUID_TO_STR 1
10021 EOF
10022
10023
10024                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10025                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10026         fi
10027 fi
10028
10029 if test $have_uuid = no ; then
10030         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10031 echo "configure:10032: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10032         save_LIBS="$LIBS"
10033         LIBS="$LIBS -lrpcrt4"
10034         cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037
10038                 int __stdcall UuidCreate(void *);
10039                 int __stdcall UuidToStringA(void *,void **);
10040                 
10041 int main() {
10042
10043                 UuidCreate(0);
10044                 UuidToStringA(0,0);
10045                 
10046 ; return 0; }
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10049   rm -rf conftest*
10050   need_rpcrt=yes
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -rf conftest*
10055   need_rpcrt=no
10056 fi
10057 rm -f conftest*
10058         if test $need_rpcrt = yes; then
10059                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10060         fi
10061         LIBS="$save_LIBS"
10062         echo "$ac_t""$need_rpcrt" 1>&6
10063 fi
10064
10065 ol_link_dnssrv=no
10066 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10067 echo "configure:10068: checking for res_query" >&5
10068 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10069   echo $ac_n "(cached) $ac_c" 1>&6
10070 else
10071   cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 /* System header to define __stub macros and hopefully few prototypes,
10075     which can conflict with char res_query(); below.  */
10076 #include <assert.h>
10077 /* Override any gcc2 internal prototype to avoid an error.  */
10078 /* We use char because int might match the return type of a gcc2
10079     builtin and then its argument prototype would still apply.  */
10080 char res_query();
10081 char (*f)();
10082
10083 int main() {
10084
10085 /* The GNU C library defines this for functions which it implements
10086     to always fail with ENOSYS.  Some functions are actually named
10087     something starting with __ and the normal name is an alias.  */
10088 #if defined (__stub_res_query) || defined (__stub___res_query)
10089 choke me
10090 #else
10091 f = res_query;
10092 #endif
10093
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10097   rm -rf conftest*
10098   eval "ac_cv_func_res_query=yes"
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   eval "ac_cv_func_res_query=no"
10104 fi
10105 rm -f conftest*
10106 fi
10107
10108 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10109   echo "$ac_t""yes" 1>&6
10110   :
10111 else
10112   echo "$ac_t""no" 1>&6
10113 fi
10114
10115 if test $ac_cv_func_res_query = no ; then 
10116         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10117 echo "configure:10118: checking for __res_query" >&5
10118 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10119   echo $ac_n "(cached) $ac_c" 1>&6
10120 else
10121   cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 /* System header to define __stub macros and hopefully few prototypes,
10125     which can conflict with char __res_query(); below.  */
10126 #include <assert.h>
10127 /* Override any gcc2 internal prototype to avoid an error.  */
10128 /* We use char because int might match the return type of a gcc2
10129     builtin and then its argument prototype would still apply.  */
10130 char __res_query();
10131 char (*f)();
10132
10133 int main() {
10134
10135 /* The GNU C library defines this for functions which it implements
10136     to always fail with ENOSYS.  Some functions are actually named
10137     something starting with __ and the normal name is an alias.  */
10138 #if defined (__stub___res_query) || defined (__stub_____res_query)
10139 choke me
10140 #else
10141 f = __res_query;
10142 #endif
10143
10144 ; return 0; }
10145 EOF
10146 if { (eval echo configure:10147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10147   rm -rf conftest*
10148   eval "ac_cv_func___res_query=yes"
10149 else
10150   echo "configure: failed program was:" >&5
10151   cat conftest.$ac_ext >&5
10152   rm -rf conftest*
10153   eval "ac_cv_func___res_query=no"
10154 fi
10155 rm -f conftest*
10156 fi
10157
10158 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10159   echo "$ac_t""yes" 1>&6
10160   :
10161 else
10162   echo "$ac_t""no" 1>&6
10163 fi
10164
10165         ac_cv_func_res_query=$ac_cv_func___res_query
10166 fi
10167
10168 if test $ac_cv_func_res_query = no ; then 
10169         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10170 echo "configure:10171: checking for res_query in -lbind" >&5
10171 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10172 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10173   echo $ac_n "(cached) $ac_c" 1>&6
10174 else
10175   ac_save_LIBS="$LIBS"
10176 LIBS="-lbind  $LIBS"
10177 cat > conftest.$ac_ext <<EOF
10178 #line 10179 "configure"
10179 #include "confdefs.h"
10180 /* Override any gcc2 internal prototype to avoid an error.  */
10181 /* We use char because int might match the return type of a gcc2
10182     builtin and then its argument prototype would still apply.  */
10183 char res_query();
10184
10185 int main() {
10186 res_query()
10187 ; return 0; }
10188 EOF
10189 if { (eval echo configure:10190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=yes"
10192 else
10193   echo "configure: failed program was:" >&5
10194   cat conftest.$ac_ext >&5
10195   rm -rf conftest*
10196   eval "ac_cv_lib_$ac_lib_var=no"
10197 fi
10198 rm -f conftest*
10199 LIBS="$ac_save_LIBS"
10200
10201 fi
10202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10203   echo "$ac_t""yes" 1>&6
10204     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10205     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10206   cat >> confdefs.h <<EOF
10207 #define $ac_tr_lib 1
10208 EOF
10209
10210   LIBS="-lbind $LIBS"
10211
10212 else
10213   echo "$ac_t""no" 1>&6
10214 fi
10215
10216         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10217 fi
10218
10219 if test $ac_cv_func_res_query = no ; then 
10220         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10221 echo "configure:10222: checking for __res_query in -lbind" >&5
10222 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   ac_save_LIBS="$LIBS"
10227 LIBS="-lbind  $LIBS"
10228 cat > conftest.$ac_ext <<EOF
10229 #line 10230 "configure"
10230 #include "confdefs.h"
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char __res_query();
10235
10236 int main() {
10237 __res_query()
10238 ; return 0; }
10239 EOF
10240 if { (eval echo configure:10241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10241   rm -rf conftest*
10242   eval "ac_cv_lib_$ac_lib_var=yes"
10243 else
10244   echo "configure: failed program was:" >&5
10245   cat conftest.$ac_ext >&5
10246   rm -rf conftest*
10247   eval "ac_cv_lib_$ac_lib_var=no"
10248 fi
10249 rm -f conftest*
10250 LIBS="$ac_save_LIBS"
10251
10252 fi
10253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10254   echo "$ac_t""yes" 1>&6
10255     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10256     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10257   cat >> confdefs.h <<EOF
10258 #define $ac_tr_lib 1
10259 EOF
10260
10261   LIBS="-lbind $LIBS"
10262
10263 else
10264   echo "$ac_t""no" 1>&6
10265 fi
10266
10267         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10268 fi
10269
10270 if test $ac_cv_func_res_query = no ; then 
10271         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10272 echo "configure:10273: checking for res_query in -lresolv" >&5
10273 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10275   echo $ac_n "(cached) $ac_c" 1>&6
10276 else
10277   ac_save_LIBS="$LIBS"
10278 LIBS="-lresolv  $LIBS"
10279 cat > conftest.$ac_ext <<EOF
10280 #line 10281 "configure"
10281 #include "confdefs.h"
10282 /* Override any gcc2 internal prototype to avoid an error.  */
10283 /* We use char because int might match the return type of a gcc2
10284     builtin and then its argument prototype would still apply.  */
10285 char res_query();
10286
10287 int main() {
10288 res_query()
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10292   rm -rf conftest*
10293   eval "ac_cv_lib_$ac_lib_var=yes"
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   eval "ac_cv_lib_$ac_lib_var=no"
10299 fi
10300 rm -f conftest*
10301 LIBS="$ac_save_LIBS"
10302
10303 fi
10304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10305   echo "$ac_t""yes" 1>&6
10306     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10308   cat >> confdefs.h <<EOF
10309 #define $ac_tr_lib 1
10310 EOF
10311
10312   LIBS="-lresolv $LIBS"
10313
10314 else
10315   echo "$ac_t""no" 1>&6
10316 fi
10317
10318         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10319 fi
10320
10321 if test $ac_cv_func_res_query = no ; then 
10322         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10323 echo "configure:10324: checking for __res_query in -lresolv" >&5
10324 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10326   echo $ac_n "(cached) $ac_c" 1>&6
10327 else
10328   ac_save_LIBS="$LIBS"
10329 LIBS="-lresolv  $LIBS"
10330 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 /* Override any gcc2 internal prototype to avoid an error.  */
10334 /* We use char because int might match the return type of a gcc2
10335     builtin and then its argument prototype would still apply.  */
10336 char __res_query();
10337
10338 int main() {
10339 __res_query()
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10343   rm -rf conftest*
10344   eval "ac_cv_lib_$ac_lib_var=yes"
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=no"
10350 fi
10351 rm -f conftest*
10352 LIBS="$ac_save_LIBS"
10353
10354 fi
10355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10356   echo "$ac_t""yes" 1>&6
10357     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10358     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10359   cat >> confdefs.h <<EOF
10360 #define $ac_tr_lib 1
10361 EOF
10362
10363   LIBS="-lresolv $LIBS"
10364
10365 else
10366   echo "$ac_t""no" 1>&6
10367 fi
10368
10369         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10370 fi
10371
10372 if test $ac_cv_func_res_query = no ; then 
10373         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10374 echo "configure:10375: checking for _res_9_query in -lresolv" >&5
10375 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10376 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   ac_save_LIBS="$LIBS"
10380 LIBS="-lresolv  $LIBS"
10381 cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 /* Override any gcc2 internal prototype to avoid an error.  */
10385 /* We use char because int might match the return type of a gcc2
10386     builtin and then its argument prototype would still apply.  */
10387 char _res_9_query();
10388
10389 int main() {
10390 _res_9_query()
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_lib_$ac_lib_var=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=no"
10401 fi
10402 rm -f conftest*
10403 LIBS="$ac_save_LIBS"
10404
10405 fi
10406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10407   echo "$ac_t""yes" 1>&6
10408     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10409     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10410   cat >> confdefs.h <<EOF
10411 #define $ac_tr_lib 1
10412 EOF
10413
10414   LIBS="-lresolv $LIBS"
10415
10416 else
10417   echo "$ac_t""no" 1>&6
10418 fi
10419
10420         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10421 fi
10422
10423 if test "$ac_cv_func_res_query" = yes ; then
10424         cat >> confdefs.h <<\EOF
10425 #define HAVE_RES_QUERY 1
10426 EOF
10427
10428
10429         if test $ol_enable_dnssrv != no ; then
10430                 ol_link_dnssrv=yes
10431         fi
10432 fi
10433
10434 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10435         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10436 fi
10437
10438 for ac_func in hstrerror 
10439 do
10440 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10441 echo "configure:10442: checking for $ac_func" >&5
10442 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10443   echo $ac_n "(cached) $ac_c" 1>&6
10444 else
10445   cat > conftest.$ac_ext <<EOF
10446 #line 10447 "configure"
10447 #include "confdefs.h"
10448 /* System header to define __stub macros and hopefully few prototypes,
10449     which can conflict with char $ac_func(); below.  */
10450 #include <assert.h>
10451 /* Override any gcc2 internal prototype to avoid an error.  */
10452 /* We use char because int might match the return type of a gcc2
10453     builtin and then its argument prototype would still apply.  */
10454 char $ac_func();
10455 char (*f)();
10456
10457 int main() {
10458
10459 /* The GNU C library defines this for functions which it implements
10460     to always fail with ENOSYS.  Some functions are actually named
10461     something starting with __ and the normal name is an alias.  */
10462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10463 choke me
10464 #else
10465 f = $ac_func;
10466 #endif
10467
10468 ; return 0; }
10469 EOF
10470 if { (eval echo configure:10471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10471   rm -rf conftest*
10472   eval "ac_cv_func_$ac_func=yes"
10473 else
10474   echo "configure: failed program was:" >&5
10475   cat conftest.$ac_ext >&5
10476   rm -rf conftest*
10477   eval "ac_cv_func_$ac_func=no"
10478 fi
10479 rm -f conftest*
10480 fi
10481
10482 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10485   cat >> confdefs.h <<EOF
10486 #define $ac_tr_func 1
10487 EOF
10488  
10489 else
10490   echo "$ac_t""no" 1>&6
10491 fi
10492 done
10493
10494
10495 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10496 do
10497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10498 echo "configure:10499: checking for $ac_func" >&5
10499 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10500   echo $ac_n "(cached) $ac_c" 1>&6
10501 else
10502   cat > conftest.$ac_ext <<EOF
10503 #line 10504 "configure"
10504 #include "confdefs.h"
10505 /* System header to define __stub macros and hopefully few prototypes,
10506     which can conflict with char $ac_func(); below.  */
10507 #include <assert.h>
10508 /* Override any gcc2 internal prototype to avoid an error.  */
10509 /* We use char because int might match the return type of a gcc2
10510     builtin and then its argument prototype would still apply.  */
10511 char $ac_func();
10512 char (*f)();
10513
10514 int main() {
10515
10516 /* The GNU C library defines this for functions which it implements
10517     to always fail with ENOSYS.  Some functions are actually named
10518     something starting with __ and the normal name is an alias.  */
10519 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10520 choke me
10521 #else
10522 f = $ac_func;
10523 #endif
10524
10525 ; return 0; }
10526 EOF
10527 if { (eval echo configure:10528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10528   rm -rf conftest*
10529   eval "ac_cv_func_$ac_func=yes"
10530 else
10531   echo "configure: failed program was:" >&5
10532   cat conftest.$ac_ext >&5
10533   rm -rf conftest*
10534   eval "ac_cv_func_$ac_func=no"
10535 fi
10536 rm -f conftest*
10537 fi
10538
10539 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10542   cat >> confdefs.h <<EOF
10543 #define $ac_tr_func 1
10544 EOF
10545  
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549 done
10550
10551
10552 ol_link_ipv6=no
10553 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10554         if test $ol_enable_ipv6 = yes ; then
10555                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10556         fi
10557 elif test $ol_enable_ipv6 != no ; then
10558         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10559 echo "configure:10560: checking INET6_ADDRSTRLEN" >&5
10560 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   
10564                 cat > conftest.$ac_ext <<EOF
10565 #line 10566 "configure"
10566 #include "confdefs.h"
10567
10568 #                       include <netinet/in.h>
10569 #                       ifdef INET6_ADDRSTRLEN
10570                                 __has_inet6_addrstrlen__;
10571 #                       endif
10572                 
10573 EOF
10574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10575   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10576   rm -rf conftest*
10577   ol_cv_inet6_addrstrlen=yes
10578 else
10579   rm -rf conftest*
10580   ol_cv_inet6_addrstrlen=no
10581 fi
10582 rm -f conftest*
10583
10584 fi
10585
10586 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10587
10588
10589         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10590 echo "configure:10591: checking struct sockaddr_storage" >&5
10591 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10592   echo $ac_n "(cached) $ac_c" 1>&6
10593 else
10594   
10595                 cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598
10599 #include <sys/types.h>
10600 #include <sys/socket.h>
10601
10602 int main() {
10603
10604                         struct sockaddr_storage ss;
10605
10606 ; return 0; }
10607 EOF
10608 if { (eval echo configure:10609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10609   rm -rf conftest*
10610   ol_cv_struct_sockaddr_storage=yes
10611 else
10612   echo "configure: failed program was:" >&5
10613   cat conftest.$ac_ext >&5
10614   rm -rf conftest*
10615   ol_cv_struct_sockaddr_storage=no
10616 fi
10617 rm -f conftest*
10618 fi
10619
10620 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10621
10622         if test $ol_cv_inet6_addrstrlen = yes \
10623                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10624                 ol_link_ipv6=yes
10625         elif test $ol_enable_ipv6 = yes \
10626                         -a $ol_cv_inet6_addrstrlen = no ; then
10627                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10628         elif test $ol_enable_ipv6 = yes \
10629                         -a $ol_cv_struct_sockaddr_storage = no ; then
10630                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10631         fi
10632 fi
10633
10634 if test $ol_enable_local != no ; then
10635         for ac_hdr in sys/un.h 
10636 do
10637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10639 echo "configure:10640: checking for $ac_hdr" >&5
10640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646 #include <$ac_hdr>
10647 EOF
10648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10649 { (eval echo configure:10650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10651 if test -z "$ac_err"; then
10652   rm -rf conftest*
10653   eval "ac_cv_header_$ac_safe=yes"
10654 else
10655   echo "$ac_err" >&5
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -rf conftest*
10659   eval "ac_cv_header_$ac_safe=no"
10660 fi
10661 rm -f conftest*
10662 fi
10663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10664   echo "$ac_t""yes" 1>&6
10665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10666   cat >> confdefs.h <<EOF
10667 #define $ac_tr_hdr 1
10668 EOF
10669  
10670 else
10671   echo "$ac_t""no" 1>&6
10672 fi
10673 done
10674
10675
10676         if test $ol_enable_local = auto ; then
10677                 ol_enable_local=$ac_cv_header_sys_un_h
10678         elif test $ac_cv_header_sys_un_h = no ; then
10679                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10680         fi
10681 fi
10682
10683 ol_link_kbind=no
10684 ol_link_krb5=no
10685 ol_link_krb4=no
10686
10687 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10688         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10689         -o $ol_with_kerberos = k425 ; then
10690
10691         for ac_hdr in krb5.h
10692 do
10693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10695 echo "configure:10696: checking for $ac_hdr" >&5
10696 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10697   echo $ac_n "(cached) $ac_c" 1>&6
10698 else
10699   cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 #include <$ac_hdr>
10703 EOF
10704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10705 { (eval echo configure:10706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10707 if test -z "$ac_err"; then
10708   rm -rf conftest*
10709   eval "ac_cv_header_$ac_safe=yes"
10710 else
10711   echo "$ac_err" >&5
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   eval "ac_cv_header_$ac_safe=no"
10716 fi
10717 rm -f conftest*
10718 fi
10719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10720   echo "$ac_t""yes" 1>&6
10721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10722   cat >> confdefs.h <<EOF
10723 #define $ac_tr_hdr 1
10724 EOF
10725  
10726 else
10727   echo "$ac_t""no" 1>&6
10728 fi
10729 done
10730
10731
10732         if test $ac_cv_header_krb5_h = yes ; then
10733                                 for ac_hdr in heim_err.h
10734 do
10735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10737 echo "configure:10738: checking for $ac_hdr" >&5
10738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   cat > conftest.$ac_ext <<EOF
10742 #line 10743 "configure"
10743 #include "confdefs.h"
10744 #include <$ac_hdr>
10745 EOF
10746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10747 { (eval echo configure:10748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10749 if test -z "$ac_err"; then
10750   rm -rf conftest*
10751   eval "ac_cv_header_$ac_safe=yes"
10752 else
10753   echo "$ac_err" >&5
10754   echo "configure: failed program was:" >&5
10755   cat conftest.$ac_ext >&5
10756   rm -rf conftest*
10757   eval "ac_cv_header_$ac_safe=no"
10758 fi
10759 rm -f conftest*
10760 fi
10761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10762   echo "$ac_t""yes" 1>&6
10763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10764   cat >> confdefs.h <<EOF
10765 #define $ac_tr_hdr 1
10766 EOF
10767  
10768 else
10769   echo "$ac_t""no" 1>&6
10770 fi
10771 done
10772
10773                 if test $ac_cv_header_heim_err_h = yes ; then
10774                         krb5_impl=heimdal
10775                 else
10776                         krb5_impl=mit
10777                 fi
10778
10779                 if test $krb5_impl = mit; then
10780                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10781 echo "configure:10782: checking for main in -lk5crypto" >&5
10782 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10783 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10784   echo $ac_n "(cached) $ac_c" 1>&6
10785 else
10786   ac_save_LIBS="$LIBS"
10787 LIBS="-lk5crypto  $LIBS"
10788 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791
10792 int main() {
10793 main()
10794 ; return 0; }
10795 EOF
10796 if { (eval echo configure:10797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10797   rm -rf conftest*
10798   eval "ac_cv_lib_$ac_lib_var=yes"
10799 else
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_lib_$ac_lib_var=no"
10804 fi
10805 rm -f conftest*
10806 LIBS="$ac_save_LIBS"
10807
10808 fi
10809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10810   echo "$ac_t""yes" 1>&6
10811   krb5crypto=k5crypto
10812 else
10813   echo "$ac_t""no" 1>&6
10814 krb5crypto=crypto
10815 fi
10816
10817
10818                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10819 echo "configure:10820: checking for main in -lkrb5" >&5
10820 ac_lib_var=`echo krb5'_'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="-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_krb5=yes
10850                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10851 else
10852   echo "$ac_t""no" 1>&6
10853 have_krb5=no
10854 fi
10855
10856
10857                 elif test $krb5_impl = heimdal; then
10858                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10859 echo "configure:10860: checking for main in -ldes" >&5
10860 ac_lib_var=`echo des'_'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="-ldes  $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   krb5crypto=des
10890 else
10891   echo "$ac_t""no" 1>&6
10892 krb5crypto=crypto
10893 fi
10894
10895
10896                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10897 echo "configure:10898: checking for main in -lkrb5" >&5
10898 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10899 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10900   echo $ac_n "(cached) $ac_c" 1>&6
10901 else
10902   ac_save_LIBS="$LIBS"
10903 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10904 cat > conftest.$ac_ext <<EOF
10905 #line 10906 "configure"
10906 #include "confdefs.h"
10907
10908 int main() {
10909 main()
10910 ; return 0; }
10911 EOF
10912 if { (eval echo configure:10913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=yes"
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   eval "ac_cv_lib_$ac_lib_var=no"
10920 fi
10921 rm -f conftest*
10922 LIBS="$ac_save_LIBS"
10923
10924 fi
10925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10926   echo "$ac_t""yes" 1>&6
10927   have_krb5=yes
10928                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10929 else
10930   echo "$ac_t""no" 1>&6
10931 have_krb5=no
10932 fi
10933
10934
10935                         cat >> confdefs.h <<\EOF
10936 #define HAVE_HEIMDAL_KERBEROS 1
10937 EOF
10938
10939
10940                 else
10941                         have_krb5=no
10942                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10943                 fi
10944
10945                 if test $have_krb5 = yes ; then
10946                         ol_link_krb5=yes
10947
10948                         cat >> confdefs.h <<\EOF
10949 #define HAVE_KRB5 1
10950 EOF
10951
10952
10953                         if test $ol_with_kerberos = k5only ; then
10954                                 ol_with_kerberos=found
10955                         fi
10956
10957                 elif test $ol_with_kerberos != auto ; then
10958                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10959                 fi
10960
10961         fi
10962 fi
10963
10964 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10965         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10966
10967         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10968 do
10969 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10970 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10971 echo "configure:10972: checking for $ac_hdr" >&5
10972 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10973   echo $ac_n "(cached) $ac_c" 1>&6
10974 else
10975   cat > conftest.$ac_ext <<EOF
10976 #line 10977 "configure"
10977 #include "confdefs.h"
10978 #include <$ac_hdr>
10979 EOF
10980 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10981 { (eval echo configure:10982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10982 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10983 if test -z "$ac_err"; then
10984   rm -rf conftest*
10985   eval "ac_cv_header_$ac_safe=yes"
10986 else
10987   echo "$ac_err" >&5
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   eval "ac_cv_header_$ac_safe=no"
10992 fi
10993 rm -f conftest*
10994 fi
10995 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10996   echo "$ac_t""yes" 1>&6
10997     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10998   cat >> confdefs.h <<EOF
10999 #define $ac_tr_hdr 1
11000 EOF
11001  
11002 else
11003   echo "$ac_t""no" 1>&6
11004 fi
11005 done
11006
11007
11008         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11009                 if test $krb5_impl = mit; then
11010                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11011 echo "configure:11012: checking for main in -lkrb4" >&5
11012 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   ac_save_LIBS="$LIBS"
11017 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11018 cat > conftest.$ac_ext <<EOF
11019 #line 11020 "configure"
11020 #include "confdefs.h"
11021
11022 int main() {
11023 main()
11024 ; return 0; }
11025 EOF
11026 if { (eval echo configure:11027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11027   rm -rf conftest*
11028   eval "ac_cv_lib_$ac_lib_var=yes"
11029 else
11030   echo "configure: failed program was:" >&5
11031   cat conftest.$ac_ext >&5
11032   rm -rf conftest*
11033   eval "ac_cv_lib_$ac_lib_var=no"
11034 fi
11035 rm -f conftest*
11036 LIBS="$ac_save_LIBS"
11037
11038 fi
11039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11040   echo "$ac_t""yes" 1>&6
11041   have_k425=yes
11042                                 KRB4_LIBS="-lkrb4 -ldes425"
11043 else
11044   echo "$ac_t""no" 1>&6
11045 have_k425=no
11046 fi
11047
11048
11049                 elif test $krb5_impl = heimdal; then
11050                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11051 echo "configure:11052: checking for main in -lkrb4" >&5
11052 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11054   echo $ac_n "(cached) $ac_c" 1>&6
11055 else
11056   ac_save_LIBS="$LIBS"
11057 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11058 cat > conftest.$ac_ext <<EOF
11059 #line 11060 "configure"
11060 #include "confdefs.h"
11061
11062 int main() {
11063 main()
11064 ; return 0; }
11065 EOF
11066 if { (eval echo configure:11067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11067   rm -rf conftest*
11068   eval "ac_cv_lib_$ac_lib_var=yes"
11069 else
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -rf conftest*
11073   eval "ac_cv_lib_$ac_lib_var=no"
11074 fi
11075 rm -f conftest*
11076 LIBS="$ac_save_LIBS"
11077
11078 fi
11079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11080   echo "$ac_t""yes" 1>&6
11081   have_k425=yes
11082                                 KRB4_LIBS="-lkrb4"
11083 else
11084   echo "$ac_t""no" 1>&6
11085 have_k425=no
11086 fi
11087
11088
11089                 else
11090                         have_425=no
11091                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11092                 fi
11093
11094                 if test $have_k425 = yes ; then
11095                         ol_with_kerberos=found
11096                         ol_link_krb4=yes
11097
11098                         cat >> confdefs.h <<\EOF
11099 #define HAVE_KRB425 1
11100 EOF
11101
11102                         cat >> confdefs.h <<\EOF
11103 #define HAVE_KRB4 1
11104 EOF
11105
11106
11107                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11108 echo "configure:11109: checking for des_debug in Kerberos libraries" >&5
11109 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   
11113                                                                 save_LIBS="$LIBS"
11114                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11115                                 cat > conftest.$ac_ext <<EOF
11116 #line 11117 "configure"
11117 #include "confdefs.h"
11118
11119 #include <kerberosIV/krb.h>
11120 #include <kerberosIV/des.h>
11121 extern int des_debug;
11122
11123 int main() {
11124
11125 des_debug = 1;
11126
11127 ; return 0; }
11128 EOF
11129 if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11130   rm -rf conftest*
11131   ol_cv_var_des_debug=yes
11132 else
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   ol_cv_var_des_debug=no
11137 fi
11138 rm -f conftest*
11139                                                                 LIBS="$save_LIBS"
11140                         
11141 fi
11142
11143 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11144
11145                         if test $ol_cv_var_des_debug = yes ; then
11146                                 cat >> confdefs.h <<\EOF
11147 #define HAVE_DES_DEBUG 1
11148 EOF
11149
11150                         fi
11151
11152                         LIBS="$save_LIBS"
11153                 fi
11154         fi
11155 fi
11156
11157 if test $ol_link_krb5 = yes ; then
11158         ol_with_kerberos=found
11159 fi
11160
11161 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11162         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11163
11164         for ac_hdr in krb.h des.h krb-archaeology.h 
11165 do
11166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11168 echo "configure:11169: checking for $ac_hdr" >&5
11169 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11170   echo $ac_n "(cached) $ac_c" 1>&6
11171 else
11172   cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 #include <$ac_hdr>
11176 EOF
11177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11178 { (eval echo configure:11179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11180 if test -z "$ac_err"; then
11181   rm -rf conftest*
11182   eval "ac_cv_header_$ac_safe=yes"
11183 else
11184   echo "$ac_err" >&5
11185   echo "configure: failed program was:" >&5
11186   cat conftest.$ac_ext >&5
11187   rm -rf conftest*
11188   eval "ac_cv_header_$ac_safe=no"
11189 fi
11190 rm -f conftest*
11191 fi
11192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11193   echo "$ac_t""yes" 1>&6
11194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11195   cat >> confdefs.h <<EOF
11196 #define $ac_tr_hdr 1
11197 EOF
11198  
11199 else
11200   echo "$ac_t""no" 1>&6
11201 fi
11202 done
11203
11204
11205         if test $ac_cv_header_krb_h = yes ; then
11206                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11207 echo "configure:11208: checking for main in -lkrb" >&5
11208 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   ac_save_LIBS="$LIBS"
11213 LIBS="-lkrb -ldes $LIBS"
11214 cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217
11218 int main() {
11219 main()
11220 ; return 0; }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11223   rm -rf conftest*
11224   eval "ac_cv_lib_$ac_lib_var=yes"
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -rf conftest*
11229   eval "ac_cv_lib_$ac_lib_var=no"
11230 fi
11231 rm -f conftest*
11232 LIBS="$ac_save_LIBS"
11233
11234 fi
11235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237   have_k4=yes
11238 else
11239   echo "$ac_t""no" 1>&6
11240 have_k4=no
11241 fi
11242
11243
11244                 if test $have_k4 = yes ; then
11245                         ol_with_kerberos=found
11246                         ol_link_krb4=yes
11247
11248                         cat >> confdefs.h <<\EOF
11249 #define HAVE_KRB4 1
11250 EOF
11251
11252
11253                         KRB4_LIBS="-lkrb -ldes"
11254
11255                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11256                                 cat >> confdefs.h <<\EOF
11257 #define HAVE_KTH_KERBEROS 1
11258 EOF
11259
11260                         fi
11261                 fi
11262         fi
11263 fi
11264
11265 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11266         ol_link_kbind=yes
11267
11268 elif test $ol_enable_kbind = yes ; then
11269         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11270 fi
11271
11272 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11273         cat >> confdefs.h <<\EOF
11274 #define HAVE_KERBEROS 1
11275 EOF
11276
11277
11278 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11279         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11280 fi
11281
11282         
11283 ol_link_tls=no
11284 if test $ol_with_tls != no ; then
11285         for ac_hdr in openssl/ssl.h ssl.h
11286 do
11287 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11288 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11289 echo "configure:11290: checking for $ac_hdr" >&5
11290 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11291   echo $ac_n "(cached) $ac_c" 1>&6
11292 else
11293   cat > conftest.$ac_ext <<EOF
11294 #line 11295 "configure"
11295 #include "confdefs.h"
11296 #include <$ac_hdr>
11297 EOF
11298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11299 { (eval echo configure:11300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11301 if test -z "$ac_err"; then
11302   rm -rf conftest*
11303   eval "ac_cv_header_$ac_safe=yes"
11304 else
11305   echo "$ac_err" >&5
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   eval "ac_cv_header_$ac_safe=no"
11310 fi
11311 rm -f conftest*
11312 fi
11313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11314   echo "$ac_t""yes" 1>&6
11315     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11316   cat >> confdefs.h <<EOF
11317 #define $ac_tr_hdr 1
11318 EOF
11319  
11320 else
11321   echo "$ac_t""no" 1>&6
11322 fi
11323 done
11324
11325
11326         if test $ac_cv_header_openssl_ssl_h = yes \
11327                 -o $ac_cv_header_ssl_h = yes ; then
11328                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11329 echo "configure:11330: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11330 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11332   echo $ac_n "(cached) $ac_c" 1>&6
11333 else
11334   ac_save_LIBS="$LIBS"
11335 LIBS="-lssl -lcrypto $LIBS"
11336 cat > conftest.$ac_ext <<EOF
11337 #line 11338 "configure"
11338 #include "confdefs.h"
11339 /* Override any gcc2 internal prototype to avoid an error.  */
11340 /* We use char because int might match the return type of a gcc2
11341     builtin and then its argument prototype would still apply.  */
11342 char SSLeay_add_ssl_algorithms();
11343
11344 int main() {
11345 SSLeay_add_ssl_algorithms()
11346 ; return 0; }
11347 EOF
11348 if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11349   rm -rf conftest*
11350   eval "ac_cv_lib_$ac_lib_var=yes"
11351 else
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_lib_$ac_lib_var=no"
11356 fi
11357 rm -f conftest*
11358 LIBS="$ac_save_LIBS"
11359
11360 fi
11361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363   have_ssleay=yes
11364                         need_rsaref=no
11365 else
11366   echo "$ac_t""no" 1>&6
11367 have_ssleay=no
11368 fi
11369
11370                         
11371                 if test $have_ssleay = no ; then
11372                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11373 echo "configure:11374: checking for SSL_library_init in -lssl" >&5
11374 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   ac_save_LIBS="$LIBS"
11379 LIBS="-lssl -lcrypto $LIBS"
11380 cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383 /* Override any gcc2 internal prototype to avoid an error.  */
11384 /* We use char because int might match the return type of a gcc2
11385     builtin and then its argument prototype would still apply.  */
11386 char SSL_library_init();
11387
11388 int main() {
11389 SSL_library_init()
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=yes"
11395 else
11396   echo "configure: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   rm -rf conftest*
11399   eval "ac_cv_lib_$ac_lib_var=no"
11400 fi
11401 rm -f conftest*
11402 LIBS="$ac_save_LIBS"
11403
11404 fi
11405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11406   echo "$ac_t""yes" 1>&6
11407   have_ssleay=yes
11408                                 need_rsaref=no
11409 else
11410   echo "$ac_t""no" 1>&6
11411 have_ssleay=no
11412 fi
11413
11414                 fi
11415
11416                 if test $have_ssleay = no ; then
11417                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11418 echo "configure:11419: checking for ssl3_accept in -lssl" >&5
11419 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11421   echo $ac_n "(cached) $ac_c" 1>&6
11422 else
11423   ac_save_LIBS="$LIBS"
11424 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11425 cat > conftest.$ac_ext <<EOF
11426 #line 11427 "configure"
11427 #include "confdefs.h"
11428 /* Override any gcc2 internal prototype to avoid an error.  */
11429 /* We use char because int might match the return type of a gcc2
11430     builtin and then its argument prototype would still apply.  */
11431 char ssl3_accept();
11432
11433 int main() {
11434 ssl3_accept()
11435 ; return 0; }
11436 EOF
11437 if { (eval echo configure:11438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11438   rm -rf conftest*
11439   eval "ac_cv_lib_$ac_lib_var=yes"
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_lib_$ac_lib_var=no"
11445 fi
11446 rm -f conftest*
11447 LIBS="$ac_save_LIBS"
11448
11449 fi
11450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11451   echo "$ac_t""yes" 1>&6
11452   have_ssleay=yes
11453                                 need_rsaref=yes
11454 else
11455   echo "$ac_t""no" 1>&6
11456 have_ssleay=no
11457 fi
11458
11459                 fi
11460
11461                 if test $have_ssleay = yes ; then
11462                         ol_with_tls=found
11463                         ol_link_tls=yes
11464
11465                         cat >> confdefs.h <<\EOF
11466 #define HAVE_SSLEAY 1
11467 EOF
11468
11469
11470                         if test $need_rsaref = yes; then
11471                                 cat >> confdefs.h <<\EOF
11472 #define HAVE_RSAREF 1
11473 EOF
11474
11475
11476                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11477                         else
11478                                 TLS_LIBS="-lssl -lcrypto"
11479                         fi
11480                 fi
11481                 echo $ac_n "checking OpenSSL library version (CRL checking capability)""... $ac_c" 1>&6
11482 echo "configure:11483: checking OpenSSL library version (CRL checking capability)" >&5
11483 if eval "test \"\${ol_cv_ssl_crl_compat+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   
11487         cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490
11491 #ifdef HAVE_OPENSSL_SSL_H
11492 #include <openssl/ssl.h>
11493 #else
11494 #include <ssl.h>
11495 #endif
11496
11497 /* Require 0.9.7d+ */
11498 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
11499         char *__ssl_compat = "0.9.7d";
11500 #endif
11501         
11502 EOF
11503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11504   egrep "__ssl_compat" >/dev/null 2>&1; then
11505   rm -rf conftest*
11506   ol_cv_ssl_crl_compat=yes
11507 else
11508   rm -rf conftest*
11509   ol_cv_ssl_crl_compat=no
11510 fi
11511 rm -f conftest*
11512
11513 fi
11514
11515 echo "$ac_t""$ol_cv_ssl_crl_compat" 1>&6
11516
11517                 if test $ol_cv_ssl_crl_compat = no ; then
11518                         ol_link_ssl=no
11519                 else 
11520                         cat >> confdefs.h <<\EOF
11521 #define HAVE_OPENSSL_CRL 1
11522 EOF
11523
11524                 fi
11525         fi
11526
11527 else
11528         echo "configure: warning: TLS data protection not supported!" 1>&2
11529 fi
11530
11531 WITH_TLS=no
11532 if test $ol_link_tls = yes ; then
11533         cat >> confdefs.h <<\EOF
11534 #define HAVE_TLS 1
11535 EOF
11536
11537         WITH_TLS=yes
11538
11539 elif test $ol_with_tls = auto ; then
11540         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11541         echo "configure: warning: TLS data protection not supported!" 1>&2
11542
11543 elif test $ol_with_tls != no ; then
11544         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11545 fi
11546
11547 if test $ol_enable_lmpasswd != no; then
11548         if test $ol_link_tls != yes ; then
11549                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11550         fi
11551
11552         cat >> confdefs.h <<\EOF
11553 #define SLAPD_LMHASH 1
11554 EOF
11555
11556 fi
11557
11558 ol_link_threads=no
11559
11560 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11561         -o $ol_with_threads = nt ; then
11562
11563         
11564         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11565 echo "configure:11566: checking for _beginthread" >&5
11566 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 /* System header to define __stub macros and hopefully few prototypes,
11573     which can conflict with char _beginthread(); below.  */
11574 #include <assert.h>
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char _beginthread();
11579 char (*f)();
11580
11581 int main() {
11582
11583 /* The GNU C library defines this for functions which it implements
11584     to always fail with ENOSYS.  Some functions are actually named
11585     something starting with __ and the normal name is an alias.  */
11586 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11587 choke me
11588 #else
11589 f = _beginthread;
11590 #endif
11591
11592 ; return 0; }
11593 EOF
11594 if { (eval echo configure:11595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11595   rm -rf conftest*
11596   eval "ac_cv_func__beginthread=yes"
11597 else
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_func__beginthread=no"
11602 fi
11603 rm -f conftest*
11604 fi
11605
11606 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11607   echo "$ac_t""yes" 1>&6
11608   :
11609 else
11610   echo "$ac_t""no" 1>&6
11611 fi
11612
11613
11614         if test $ac_cv_func__beginthread = yes ; then
11615                 cat >> confdefs.h <<\EOF
11616 #define HAVE_NT_THREADS 1
11617 EOF
11618
11619                 ol_cv_nt_threads=yes
11620         fi
11621
11622
11623         if test "$ol_cv_nt_threads" = yes ; then
11624                 ol_link_threads=nt
11625                 ol_with_threads=found
11626                 ol_with_yielding_select=yes
11627
11628                 cat >> confdefs.h <<\EOF
11629 #define HAVE_NT_SERVICE_MANAGER 1
11630 EOF
11631
11632                 cat >> confdefs.h <<\EOF
11633 #define HAVE_NT_EVENT_LOG 1
11634 EOF
11635
11636         fi
11637
11638         if test $ol_with_threads = nt ; then
11639                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11640         fi
11641 fi
11642
11643 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11644         -o $ol_with_threads = posix ; then
11645
11646         for ac_hdr in pthread.h
11647 do
11648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11650 echo "configure:11651: checking for $ac_hdr" >&5
11651 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11652   echo $ac_n "(cached) $ac_c" 1>&6
11653 else
11654   cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 #include <$ac_hdr>
11658 EOF
11659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11660 { (eval echo configure:11661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11662 if test -z "$ac_err"; then
11663   rm -rf conftest*
11664   eval "ac_cv_header_$ac_safe=yes"
11665 else
11666   echo "$ac_err" >&5
11667   echo "configure: failed program was:" >&5
11668   cat conftest.$ac_ext >&5
11669   rm -rf conftest*
11670   eval "ac_cv_header_$ac_safe=no"
11671 fi
11672 rm -f conftest*
11673 fi
11674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11675   echo "$ac_t""yes" 1>&6
11676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11677   cat >> confdefs.h <<EOF
11678 #define $ac_tr_hdr 1
11679 EOF
11680  
11681 else
11682   echo "$ac_t""no" 1>&6
11683 fi
11684 done
11685
11686
11687         if test $ac_cv_header_pthread_h = yes ; then
11688                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11689 echo "configure:11690: checking POSIX thread version" >&5
11690 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11691   echo $ac_n "(cached) $ac_c" 1>&6
11692 else
11693   
11694         cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697
11698 #               include <pthread.h>
11699         
11700 int main() {
11701
11702                 int i = PTHREAD_CREATE_JOINABLE;
11703         
11704 ; return 0; }
11705 EOF
11706 if { (eval echo configure:11707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11707   rm -rf conftest*
11708   
11709         cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <pthread.h>
11713 EOF
11714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11715   egrep "pthread_detach" >/dev/null 2>&1; then
11716   rm -rf conftest*
11717   ol_cv_pthread_version=10
11718 else
11719   rm -rf conftest*
11720   ol_cv_pthread_version=8
11721 fi
11722 rm -f conftest*
11723
11724 else
11725   echo "configure: failed program was:" >&5
11726   cat conftest.$ac_ext >&5
11727   rm -rf conftest*
11728   
11729         cat > conftest.$ac_ext <<EOF
11730 #line 11731 "configure"
11731 #include "confdefs.h"
11732
11733 #               include <pthread.h>
11734 #               ifdef PTHREAD_CREATE_UNDETACHED
11735                 draft7
11736 #               endif
11737         
11738 EOF
11739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11740   egrep "draft7" >/dev/null 2>&1; then
11741   rm -rf conftest*
11742   ol_cv_pthread_version=7
11743 else
11744   rm -rf conftest*
11745   
11746         cat > conftest.$ac_ext <<EOF
11747 #line 11748 "configure"
11748 #include "confdefs.h"
11749 #include <pthread.h>
11750 EOF
11751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11752   egrep "pthread_attr_init" >/dev/null 2>&1; then
11753   rm -rf conftest*
11754   ol_cv_pthread_version=6
11755 else
11756   rm -rf conftest*
11757   
11758         cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761
11762 #               include <pthread.h>
11763 #ifdef          PTHREAD_MUTEX_INITIALIZER
11764                 draft5
11765 #endif
11766         
11767 EOF
11768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11769   egrep "draft5" >/dev/null 2>&1; then
11770   rm -rf conftest*
11771   ol_cv_pthread_version=5
11772 else
11773   rm -rf conftest*
11774   ol_cv_pthread_version=4
11775 fi
11776 rm -f conftest*
11777  
11778 fi
11779 rm -f conftest*
11780  
11781 fi
11782 rm -f conftest*
11783  
11784 fi
11785 rm -f conftest*
11786
11787 fi
11788
11789 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11790
11791
11792                 if test $ol_cv_pthread_version != 0 ; then
11793                         cat >> confdefs.h <<EOF
11794 #define HAVE_PTHREADS $ol_cv_pthread_version
11795 EOF
11796
11797                 else
11798                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11799                 fi
11800
11801                 # consider threads found
11802                 ol_with_threads=found
11803
11804                 
11805         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11806 echo "configure:11807: checking for LinuxThreads pthread.h" >&5
11807 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11808   echo $ac_n "(cached) $ac_c" 1>&6
11809 else
11810   cat > conftest.$ac_ext <<EOF
11811 #line 11812 "configure"
11812 #include "confdefs.h"
11813 #include <pthread.h>
11814 EOF
11815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11816   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11817   rm -rf conftest*
11818   ol_cv_header_linux_threads=yes
11819 else
11820   rm -rf conftest*
11821   ol_cv_header_linux_threads=no
11822 fi
11823 rm -f conftest*
11824
11825                 
11826 fi
11827
11828 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11829         if test $ol_cv_header_linux_threads = yes; then
11830                 cat >> confdefs.h <<\EOF
11831 #define HAVE_LINUX_THREADS 1
11832 EOF
11833
11834         fi
11835
11836                 
11837         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11838 echo "configure:11839: checking for GNU Pth pthread.h" >&5
11839 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11840   echo $ac_n "(cached) $ac_c" 1>&6
11841 else
11842   cat > conftest.$ac_ext <<EOF
11843 #line 11844 "configure"
11844 #include "confdefs.h"
11845 #include <pthread.h>
11846 #ifdef _POSIX_THREAD_IS_GNU_PTH
11847         __gnu_pth__;
11848 #endif
11849
11850 EOF
11851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11852   egrep "__gnu_pth__" >/dev/null 2>&1; then
11853   rm -rf conftest*
11854   ol_cv_header_gnu_pth_pthread_h=yes
11855 else
11856   rm -rf conftest*
11857   ol_cv_header_gnu_pth_pthread_h=no
11858 fi
11859 rm -f conftest*
11860
11861                 
11862 fi
11863
11864 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11865
11866
11867                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11868                         for ac_hdr in sched.h
11869 do
11870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11872 echo "configure:11873: checking for $ac_hdr" >&5
11873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11874   echo $ac_n "(cached) $ac_c" 1>&6
11875 else
11876   cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 #include <$ac_hdr>
11880 EOF
11881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11882 { (eval echo configure:11883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11884 if test -z "$ac_err"; then
11885   rm -rf conftest*
11886   eval "ac_cv_header_$ac_safe=yes"
11887 else
11888   echo "$ac_err" >&5
11889   echo "configure: failed program was:" >&5
11890   cat conftest.$ac_ext >&5
11891   rm -rf conftest*
11892   eval "ac_cv_header_$ac_safe=no"
11893 fi
11894 rm -f conftest*
11895 fi
11896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11897   echo "$ac_t""yes" 1>&6
11898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11899   cat >> confdefs.h <<EOF
11900 #define $ac_tr_hdr 1
11901 EOF
11902  
11903 else
11904   echo "$ac_t""no" 1>&6
11905 fi
11906 done
11907
11908                 fi
11909
11910                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11911                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11912 echo "configure:11913: checking for pthread_create in default libraries" >&5
11913 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11914   echo $ac_n "(cached) $ac_c" 1>&6
11915 else
11916   
11917                 if test "$cross_compiling" = yes; then
11918   cat > conftest.$ac_ext <<EOF
11919 #line 11920 "configure"
11920 #include "confdefs.h"
11921 /* pthread test headers */
11922 #include <pthread.h>
11923 #if HAVE_PTHREADS < 7
11924 #include <errno.h>
11925 #endif
11926 #ifndef NULL
11927 #define NULL (void*)0
11928 #endif
11929
11930 static void *task(p)
11931         void *p;
11932 {
11933         return (void *) (p == NULL);
11934 }
11935
11936 int main() {
11937
11938         /* pthread test function */
11939 #ifndef PTHREAD_CREATE_DETACHED
11940 #define PTHREAD_CREATE_DETACHED 1
11941 #endif
11942         pthread_t t;
11943         int status;
11944         int detach = PTHREAD_CREATE_DETACHED;
11945
11946 #if HAVE_PTHREADS > 4
11947         /* Final pthreads */
11948         pthread_attr_t attr;
11949
11950         status = pthread_attr_init(&attr);
11951         if( status ) return status;
11952
11953 #if HAVE_PTHREADS < 7
11954         status = pthread_attr_setdetachstate(&attr, &detach);
11955         if( status < 0 ) status = errno;
11956 #else
11957         status = pthread_attr_setdetachstate(&attr, detach);
11958 #endif
11959         if( status ) return status;
11960         status = pthread_create( &t, &attr, task, NULL );
11961 #if HAVE_PTHREADS < 7
11962         if( status < 0 ) status = errno;
11963 #endif
11964         if( status ) return status;
11965 #else
11966         /* Draft 4 pthreads */
11967         status = pthread_create( &t, pthread_attr_default, task, NULL );
11968         if( status ) return errno;
11969
11970         /* give thread a chance to complete */
11971         /* it should remain joinable and hence detachable */
11972         sleep( 1 );
11973
11974         status = pthread_detach( &t );
11975         if( status ) return errno;
11976 #endif
11977
11978 #ifdef HAVE_LINUX_THREADS
11979         pthread_kill_other_threads_np();
11980 #endif
11981
11982         return 0;
11983
11984 ; return 0; }
11985 EOF
11986 if { (eval echo configure:11987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11987   rm -rf conftest*
11988   ol_cv_pthread_create=yes
11989 else
11990   echo "configure: failed program was:" >&5
11991   cat conftest.$ac_ext >&5
11992   rm -rf conftest*
11993   ol_cv_pthread_create=no
11994 fi
11995 rm -f conftest*
11996 else
11997   cat > conftest.$ac_ext <<EOF
11998 #line 11999 "configure"
11999 #include "confdefs.h"
12000 /* pthread test headers */
12001 #include <pthread.h>
12002 #if HAVE_PTHREADS < 7
12003 #include <errno.h>
12004 #endif
12005 #ifndef NULL
12006 #define NULL (void*)0
12007 #endif
12008
12009 static void *task(p)
12010         void *p;
12011 {
12012         return (void *) (p == NULL);
12013 }
12014
12015
12016 int main(argc, argv)
12017         int argc;
12018         char **argv;
12019 {
12020
12021         /* pthread test function */
12022 #ifndef PTHREAD_CREATE_DETACHED
12023 #define PTHREAD_CREATE_DETACHED 1
12024 #endif
12025         pthread_t t;
12026         int status;
12027         int detach = PTHREAD_CREATE_DETACHED;
12028
12029 #if HAVE_PTHREADS > 4
12030         /* Final pthreads */
12031         pthread_attr_t attr;
12032
12033         status = pthread_attr_init(&attr);
12034         if( status ) return status;
12035
12036 #if HAVE_PTHREADS < 7
12037         status = pthread_attr_setdetachstate(&attr, &detach);
12038         if( status < 0 ) status = errno;
12039 #else
12040         status = pthread_attr_setdetachstate(&attr, detach);
12041 #endif
12042         if( status ) return status;
12043         status = pthread_create( &t, &attr, task, NULL );
12044 #if HAVE_PTHREADS < 7
12045         if( status < 0 ) status = errno;
12046 #endif
12047         if( status ) return status;
12048 #else
12049         /* Draft 4 pthreads */
12050         status = pthread_create( &t, pthread_attr_default, task, NULL );
12051         if( status ) return errno;
12052
12053         /* give thread a chance to complete */
12054         /* it should remain joinable and hence detachable */
12055         sleep( 1 );
12056
12057         status = pthread_detach( &t );
12058         if( status ) return errno;
12059 #endif
12060
12061 #ifdef HAVE_LINUX_THREADS
12062         pthread_kill_other_threads_np();
12063 #endif
12064
12065         return 0;
12066
12067 }
12068
12069 EOF
12070 if { (eval echo configure:12071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12071 then
12072   ol_cv_pthread_create=yes
12073 else
12074   echo "configure: failed program was:" >&5
12075   cat conftest.$ac_ext >&5
12076   rm -fr conftest*
12077   ol_cv_pthread_create=no
12078 fi
12079 rm -fr conftest*
12080 fi
12081
12082 fi
12083
12084 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12085
12086                 if test $ol_cv_pthread_create != no ; then
12087                         ol_link_threads=posix
12088                         ol_link_pthreads=""
12089                 fi
12090                 
12091                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12092 if test "$ol_link_threads" = no ; then
12093         # try -kthread
12094         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12095 echo "configure:12096: checking for pthread link with -kthread" >&5
12096 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12097   echo $ac_n "(cached) $ac_c" 1>&6
12098 else
12099   
12100                 # save the flags
12101                 ol_LIBS="$LIBS"
12102                 LIBS="-kthread $LIBS"
12103
12104                 if test "$cross_compiling" = yes; then
12105   cat > conftest.$ac_ext <<EOF
12106 #line 12107 "configure"
12107 #include "confdefs.h"
12108 /* pthread test headers */
12109 #include <pthread.h>
12110 #if HAVE_PTHREADS < 7
12111 #include <errno.h>
12112 #endif
12113 #ifndef NULL
12114 #define NULL (void*)0
12115 #endif
12116
12117 static void *task(p)
12118         void *p;
12119 {
12120         return (void *) (p == NULL);
12121 }
12122
12123 int main() {
12124
12125         /* pthread test function */
12126 #ifndef PTHREAD_CREATE_DETACHED
12127 #define PTHREAD_CREATE_DETACHED 1
12128 #endif
12129         pthread_t t;
12130         int status;
12131         int detach = PTHREAD_CREATE_DETACHED;
12132
12133 #if HAVE_PTHREADS > 4
12134         /* Final pthreads */
12135         pthread_attr_t attr;
12136
12137         status = pthread_attr_init(&attr);
12138         if( status ) return status;
12139
12140 #if HAVE_PTHREADS < 7
12141         status = pthread_attr_setdetachstate(&attr, &detach);
12142         if( status < 0 ) status = errno;
12143 #else
12144         status = pthread_attr_setdetachstate(&attr, detach);
12145 #endif
12146         if( status ) return status;
12147         status = pthread_create( &t, &attr, task, NULL );
12148 #if HAVE_PTHREADS < 7
12149         if( status < 0 ) status = errno;
12150 #endif
12151         if( status ) return status;
12152 #else
12153         /* Draft 4 pthreads */
12154         status = pthread_create( &t, pthread_attr_default, task, NULL );
12155         if( status ) return errno;
12156
12157         /* give thread a chance to complete */
12158         /* it should remain joinable and hence detachable */
12159         sleep( 1 );
12160
12161         status = pthread_detach( &t );
12162         if( status ) return errno;
12163 #endif
12164
12165 #ifdef HAVE_LINUX_THREADS
12166         pthread_kill_other_threads_np();
12167 #endif
12168
12169         return 0;
12170
12171 ; return 0; }
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12174   rm -rf conftest*
12175   ol_cv_pthread_kthread=yes
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -rf conftest*
12180   ol_cv_pthread_kthread=no
12181 fi
12182 rm -f conftest*
12183 else
12184   cat > conftest.$ac_ext <<EOF
12185 #line 12186 "configure"
12186 #include "confdefs.h"
12187 /* pthread test headers */
12188 #include <pthread.h>
12189 #if HAVE_PTHREADS < 7
12190 #include <errno.h>
12191 #endif
12192 #ifndef NULL
12193 #define NULL (void*)0
12194 #endif
12195
12196 static void *task(p)
12197         void *p;
12198 {
12199         return (void *) (p == NULL);
12200 }
12201
12202
12203 int main(argc, argv)
12204         int argc;
12205         char **argv;
12206 {
12207
12208         /* pthread test function */
12209 #ifndef PTHREAD_CREATE_DETACHED
12210 #define PTHREAD_CREATE_DETACHED 1
12211 #endif
12212         pthread_t t;
12213         int status;
12214         int detach = PTHREAD_CREATE_DETACHED;
12215
12216 #if HAVE_PTHREADS > 4
12217         /* Final pthreads */
12218         pthread_attr_t attr;
12219
12220         status = pthread_attr_init(&attr);
12221         if( status ) return status;
12222
12223 #if HAVE_PTHREADS < 7
12224         status = pthread_attr_setdetachstate(&attr, &detach);
12225         if( status < 0 ) status = errno;
12226 #else
12227         status = pthread_attr_setdetachstate(&attr, detach);
12228 #endif
12229         if( status ) return status;
12230         status = pthread_create( &t, &attr, task, NULL );
12231 #if HAVE_PTHREADS < 7
12232         if( status < 0 ) status = errno;
12233 #endif
12234         if( status ) return status;
12235 #else
12236         /* Draft 4 pthreads */
12237         status = pthread_create( &t, pthread_attr_default, task, NULL );
12238         if( status ) return errno;
12239
12240         /* give thread a chance to complete */
12241         /* it should remain joinable and hence detachable */
12242         sleep( 1 );
12243
12244         status = pthread_detach( &t );
12245         if( status ) return errno;
12246 #endif
12247
12248 #ifdef HAVE_LINUX_THREADS
12249         pthread_kill_other_threads_np();
12250 #endif
12251
12252         return 0;
12253
12254 }
12255
12256 EOF
12257 if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12258 then
12259   ol_cv_pthread_kthread=yes
12260 else
12261   echo "configure: failed program was:" >&5
12262   cat conftest.$ac_ext >&5
12263   rm -fr conftest*
12264   ol_cv_pthread_kthread=no
12265 fi
12266 rm -fr conftest*
12267 fi
12268
12269
12270                 # restore the LIBS
12271                 LIBS="$ol_LIBS"
12272         
12273 fi
12274
12275 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12276
12277         if test $ol_cv_pthread_kthread = yes ; then
12278                 ol_link_pthreads="-kthread"
12279                 ol_link_threads=posix
12280         fi
12281 fi
12282
12283                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12284 if test "$ol_link_threads" = no ; then
12285         # try -pthread
12286         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12287 echo "configure:12288: checking for pthread link with -pthread" >&5
12288 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12289   echo $ac_n "(cached) $ac_c" 1>&6
12290 else
12291   
12292                 # save the flags
12293                 ol_LIBS="$LIBS"
12294                 LIBS="-pthread $LIBS"
12295
12296                 if test "$cross_compiling" = yes; then
12297   cat > conftest.$ac_ext <<EOF
12298 #line 12299 "configure"
12299 #include "confdefs.h"
12300 /* pthread test headers */
12301 #include <pthread.h>
12302 #if HAVE_PTHREADS < 7
12303 #include <errno.h>
12304 #endif
12305 #ifndef NULL
12306 #define NULL (void*)0
12307 #endif
12308
12309 static void *task(p)
12310         void *p;
12311 {
12312         return (void *) (p == NULL);
12313 }
12314
12315 int main() {
12316
12317         /* pthread test function */
12318 #ifndef PTHREAD_CREATE_DETACHED
12319 #define PTHREAD_CREATE_DETACHED 1
12320 #endif
12321         pthread_t t;
12322         int status;
12323         int detach = PTHREAD_CREATE_DETACHED;
12324
12325 #if HAVE_PTHREADS > 4
12326         /* Final pthreads */
12327         pthread_attr_t attr;
12328
12329         status = pthread_attr_init(&attr);
12330         if( status ) return status;
12331
12332 #if HAVE_PTHREADS < 7
12333         status = pthread_attr_setdetachstate(&attr, &detach);
12334         if( status < 0 ) status = errno;
12335 #else
12336         status = pthread_attr_setdetachstate(&attr, detach);
12337 #endif
12338         if( status ) return status;
12339         status = pthread_create( &t, &attr, task, NULL );
12340 #if HAVE_PTHREADS < 7
12341         if( status < 0 ) status = errno;
12342 #endif
12343         if( status ) return status;
12344 #else
12345         /* Draft 4 pthreads */
12346         status = pthread_create( &t, pthread_attr_default, task, NULL );
12347         if( status ) return errno;
12348
12349         /* give thread a chance to complete */
12350         /* it should remain joinable and hence detachable */
12351         sleep( 1 );
12352
12353         status = pthread_detach( &t );
12354         if( status ) return errno;
12355 #endif
12356
12357 #ifdef HAVE_LINUX_THREADS
12358         pthread_kill_other_threads_np();
12359 #endif
12360
12361         return 0;
12362
12363 ; return 0; }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12366   rm -rf conftest*
12367   ol_cv_pthread_pthread=yes
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -rf conftest*
12372   ol_cv_pthread_pthread=no
12373 fi
12374 rm -f conftest*
12375 else
12376   cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* pthread test headers */
12380 #include <pthread.h>
12381 #if HAVE_PTHREADS < 7
12382 #include <errno.h>
12383 #endif
12384 #ifndef NULL
12385 #define NULL (void*)0
12386 #endif
12387
12388 static void *task(p)
12389         void *p;
12390 {
12391         return (void *) (p == NULL);
12392 }
12393
12394
12395 int main(argc, argv)
12396         int argc;
12397         char **argv;
12398 {
12399
12400         /* pthread test function */
12401 #ifndef PTHREAD_CREATE_DETACHED
12402 #define PTHREAD_CREATE_DETACHED 1
12403 #endif
12404         pthread_t t;
12405         int status;
12406         int detach = PTHREAD_CREATE_DETACHED;
12407
12408 #if HAVE_PTHREADS > 4
12409         /* Final pthreads */
12410         pthread_attr_t attr;
12411
12412         status = pthread_attr_init(&attr);
12413         if( status ) return status;
12414
12415 #if HAVE_PTHREADS < 7
12416         status = pthread_attr_setdetachstate(&attr, &detach);
12417         if( status < 0 ) status = errno;
12418 #else
12419         status = pthread_attr_setdetachstate(&attr, detach);
12420 #endif
12421         if( status ) return status;
12422         status = pthread_create( &t, &attr, task, NULL );
12423 #if HAVE_PTHREADS < 7
12424         if( status < 0 ) status = errno;
12425 #endif
12426         if( status ) return status;
12427 #else
12428         /* Draft 4 pthreads */
12429         status = pthread_create( &t, pthread_attr_default, task, NULL );
12430         if( status ) return errno;
12431
12432         /* give thread a chance to complete */
12433         /* it should remain joinable and hence detachable */
12434         sleep( 1 );
12435
12436         status = pthread_detach( &t );
12437         if( status ) return errno;
12438 #endif
12439
12440 #ifdef HAVE_LINUX_THREADS
12441         pthread_kill_other_threads_np();
12442 #endif
12443
12444         return 0;
12445
12446 }
12447
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12450 then
12451   ol_cv_pthread_pthread=yes
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -fr conftest*
12456   ol_cv_pthread_pthread=no
12457 fi
12458 rm -fr conftest*
12459 fi
12460
12461
12462                 # restore the LIBS
12463                 LIBS="$ol_LIBS"
12464         
12465 fi
12466
12467 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12468
12469         if test $ol_cv_pthread_pthread = yes ; then
12470                 ol_link_pthreads="-pthread"
12471                 ol_link_threads=posix
12472         fi
12473 fi
12474
12475                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12476 if test "$ol_link_threads" = no ; then
12477         # try -pthreads
12478         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12479 echo "configure:12480: checking for pthread link with -pthreads" >&5
12480 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12481   echo $ac_n "(cached) $ac_c" 1>&6
12482 else
12483   
12484                 # save the flags
12485                 ol_LIBS="$LIBS"
12486                 LIBS="-pthreads $LIBS"
12487
12488                 if test "$cross_compiling" = yes; then
12489   cat > conftest.$ac_ext <<EOF
12490 #line 12491 "configure"
12491 #include "confdefs.h"
12492 /* pthread test headers */
12493 #include <pthread.h>
12494 #if HAVE_PTHREADS < 7
12495 #include <errno.h>
12496 #endif
12497 #ifndef NULL
12498 #define NULL (void*)0
12499 #endif
12500
12501 static void *task(p)
12502         void *p;
12503 {
12504         return (void *) (p == NULL);
12505 }
12506
12507 int main() {
12508
12509         /* pthread test function */
12510 #ifndef PTHREAD_CREATE_DETACHED
12511 #define PTHREAD_CREATE_DETACHED 1
12512 #endif
12513         pthread_t t;
12514         int status;
12515         int detach = PTHREAD_CREATE_DETACHED;
12516
12517 #if HAVE_PTHREADS > 4
12518         /* Final pthreads */
12519         pthread_attr_t attr;
12520
12521         status = pthread_attr_init(&attr);
12522         if( status ) return status;
12523
12524 #if HAVE_PTHREADS < 7
12525         status = pthread_attr_setdetachstate(&attr, &detach);
12526         if( status < 0 ) status = errno;
12527 #else
12528         status = pthread_attr_setdetachstate(&attr, detach);
12529 #endif
12530         if( status ) return status;
12531         status = pthread_create( &t, &attr, task, NULL );
12532 #if HAVE_PTHREADS < 7
12533         if( status < 0 ) status = errno;
12534 #endif
12535         if( status ) return status;
12536 #else
12537         /* Draft 4 pthreads */
12538         status = pthread_create( &t, pthread_attr_default, task, NULL );
12539         if( status ) return errno;
12540
12541         /* give thread a chance to complete */
12542         /* it should remain joinable and hence detachable */
12543         sleep( 1 );
12544
12545         status = pthread_detach( &t );
12546         if( status ) return errno;
12547 #endif
12548
12549 #ifdef HAVE_LINUX_THREADS
12550         pthread_kill_other_threads_np();
12551 #endif
12552
12553         return 0;
12554
12555 ; return 0; }
12556 EOF
12557 if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12558   rm -rf conftest*
12559   ol_cv_pthread_pthreads=yes
12560 else
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   ol_cv_pthread_pthreads=no
12565 fi
12566 rm -f conftest*
12567 else
12568   cat > conftest.$ac_ext <<EOF
12569 #line 12570 "configure"
12570 #include "confdefs.h"
12571 /* pthread test headers */
12572 #include <pthread.h>
12573 #if HAVE_PTHREADS < 7
12574 #include <errno.h>
12575 #endif
12576 #ifndef NULL
12577 #define NULL (void*)0
12578 #endif
12579
12580 static void *task(p)
12581         void *p;
12582 {
12583         return (void *) (p == NULL);
12584 }
12585
12586
12587 int main(argc, argv)
12588         int argc;
12589         char **argv;
12590 {
12591
12592         /* pthread test function */
12593 #ifndef PTHREAD_CREATE_DETACHED
12594 #define PTHREAD_CREATE_DETACHED 1
12595 #endif
12596         pthread_t t;
12597         int status;
12598         int detach = PTHREAD_CREATE_DETACHED;
12599
12600 #if HAVE_PTHREADS > 4
12601         /* Final pthreads */
12602         pthread_attr_t attr;
12603
12604         status = pthread_attr_init(&attr);
12605         if( status ) return status;
12606
12607 #if HAVE_PTHREADS < 7
12608         status = pthread_attr_setdetachstate(&attr, &detach);
12609         if( status < 0 ) status = errno;
12610 #else
12611         status = pthread_attr_setdetachstate(&attr, detach);
12612 #endif
12613         if( status ) return status;
12614         status = pthread_create( &t, &attr, task, NULL );
12615 #if HAVE_PTHREADS < 7
12616         if( status < 0 ) status = errno;
12617 #endif
12618         if( status ) return status;
12619 #else
12620         /* Draft 4 pthreads */
12621         status = pthread_create( &t, pthread_attr_default, task, NULL );
12622         if( status ) return errno;
12623
12624         /* give thread a chance to complete */
12625         /* it should remain joinable and hence detachable */
12626         sleep( 1 );
12627
12628         status = pthread_detach( &t );
12629         if( status ) return errno;
12630 #endif
12631
12632 #ifdef HAVE_LINUX_THREADS
12633         pthread_kill_other_threads_np();
12634 #endif
12635
12636         return 0;
12637
12638 }
12639
12640 EOF
12641 if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12642 then
12643   ol_cv_pthread_pthreads=yes
12644 else
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -fr conftest*
12648   ol_cv_pthread_pthreads=no
12649 fi
12650 rm -fr conftest*
12651 fi
12652
12653
12654                 # restore the LIBS
12655                 LIBS="$ol_LIBS"
12656         
12657 fi
12658
12659 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12660
12661         if test $ol_cv_pthread_pthreads = yes ; then
12662                 ol_link_pthreads="-pthreads"
12663                 ol_link_threads=posix
12664         fi
12665 fi
12666
12667                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12668 if test "$ol_link_threads" = no ; then
12669         # try -mthreads
12670         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12671 echo "configure:12672: checking for pthread link with -mthreads" >&5
12672 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12673   echo $ac_n "(cached) $ac_c" 1>&6
12674 else
12675   
12676                 # save the flags
12677                 ol_LIBS="$LIBS"
12678                 LIBS="-mthreads $LIBS"
12679
12680                 if test "$cross_compiling" = yes; then
12681   cat > conftest.$ac_ext <<EOF
12682 #line 12683 "configure"
12683 #include "confdefs.h"
12684 /* pthread test headers */
12685 #include <pthread.h>
12686 #if HAVE_PTHREADS < 7
12687 #include <errno.h>
12688 #endif
12689 #ifndef NULL
12690 #define NULL (void*)0
12691 #endif
12692
12693 static void *task(p)
12694         void *p;
12695 {
12696         return (void *) (p == NULL);
12697 }
12698
12699 int main() {
12700
12701         /* pthread test function */
12702 #ifndef PTHREAD_CREATE_DETACHED
12703 #define PTHREAD_CREATE_DETACHED 1
12704 #endif
12705         pthread_t t;
12706         int status;
12707         int detach = PTHREAD_CREATE_DETACHED;
12708
12709 #if HAVE_PTHREADS > 4
12710         /* Final pthreads */
12711         pthread_attr_t attr;
12712
12713         status = pthread_attr_init(&attr);
12714         if( status ) return status;
12715
12716 #if HAVE_PTHREADS < 7
12717         status = pthread_attr_setdetachstate(&attr, &detach);
12718         if( status < 0 ) status = errno;
12719 #else
12720         status = pthread_attr_setdetachstate(&attr, detach);
12721 #endif
12722         if( status ) return status;
12723         status = pthread_create( &t, &attr, task, NULL );
12724 #if HAVE_PTHREADS < 7
12725         if( status < 0 ) status = errno;
12726 #endif
12727         if( status ) return status;
12728 #else
12729         /* Draft 4 pthreads */
12730         status = pthread_create( &t, pthread_attr_default, task, NULL );
12731         if( status ) return errno;
12732
12733         /* give thread a chance to complete */
12734         /* it should remain joinable and hence detachable */
12735         sleep( 1 );
12736
12737         status = pthread_detach( &t );
12738         if( status ) return errno;
12739 #endif
12740
12741 #ifdef HAVE_LINUX_THREADS
12742         pthread_kill_other_threads_np();
12743 #endif
12744
12745         return 0;
12746
12747 ; return 0; }
12748 EOF
12749 if { (eval echo configure:12750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12750   rm -rf conftest*
12751   ol_cv_pthread_mthreads=yes
12752 else
12753   echo "configure: failed program was:" >&5
12754   cat conftest.$ac_ext >&5
12755   rm -rf conftest*
12756   ol_cv_pthread_mthreads=no
12757 fi
12758 rm -f conftest*
12759 else
12760   cat > conftest.$ac_ext <<EOF
12761 #line 12762 "configure"
12762 #include "confdefs.h"
12763 /* pthread test headers */
12764 #include <pthread.h>
12765 #if HAVE_PTHREADS < 7
12766 #include <errno.h>
12767 #endif
12768 #ifndef NULL
12769 #define NULL (void*)0
12770 #endif
12771
12772 static void *task(p)
12773         void *p;
12774 {
12775         return (void *) (p == NULL);
12776 }
12777
12778
12779 int main(argc, argv)
12780         int argc;
12781         char **argv;
12782 {
12783
12784         /* pthread test function */
12785 #ifndef PTHREAD_CREATE_DETACHED
12786 #define PTHREAD_CREATE_DETACHED 1
12787 #endif
12788         pthread_t t;
12789         int status;
12790         int detach = PTHREAD_CREATE_DETACHED;
12791
12792 #if HAVE_PTHREADS > 4
12793         /* Final pthreads */
12794         pthread_attr_t attr;
12795
12796         status = pthread_attr_init(&attr);
12797         if( status ) return status;
12798
12799 #if HAVE_PTHREADS < 7
12800         status = pthread_attr_setdetachstate(&attr, &detach);
12801         if( status < 0 ) status = errno;
12802 #else
12803         status = pthread_attr_setdetachstate(&attr, detach);
12804 #endif
12805         if( status ) return status;
12806         status = pthread_create( &t, &attr, task, NULL );
12807 #if HAVE_PTHREADS < 7
12808         if( status < 0 ) status = errno;
12809 #endif
12810         if( status ) return status;
12811 #else
12812         /* Draft 4 pthreads */
12813         status = pthread_create( &t, pthread_attr_default, task, NULL );
12814         if( status ) return errno;
12815
12816         /* give thread a chance to complete */
12817         /* it should remain joinable and hence detachable */
12818         sleep( 1 );
12819
12820         status = pthread_detach( &t );
12821         if( status ) return errno;
12822 #endif
12823
12824 #ifdef HAVE_LINUX_THREADS
12825         pthread_kill_other_threads_np();
12826 #endif
12827
12828         return 0;
12829
12830 }
12831
12832 EOF
12833 if { (eval echo configure:12834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12834 then
12835   ol_cv_pthread_mthreads=yes
12836 else
12837   echo "configure: failed program was:" >&5
12838   cat conftest.$ac_ext >&5
12839   rm -fr conftest*
12840   ol_cv_pthread_mthreads=no
12841 fi
12842 rm -fr conftest*
12843 fi
12844
12845
12846                 # restore the LIBS
12847                 LIBS="$ol_LIBS"
12848         
12849 fi
12850
12851 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12852
12853         if test $ol_cv_pthread_mthreads = yes ; then
12854                 ol_link_pthreads="-mthreads"
12855                 ol_link_threads=posix
12856         fi
12857 fi
12858
12859                 # Pthread try link: -thread (ol_cv_pthread_thread)
12860 if test "$ol_link_threads" = no ; then
12861         # try -thread
12862         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12863 echo "configure:12864: checking for pthread link with -thread" >&5
12864 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12865   echo $ac_n "(cached) $ac_c" 1>&6
12866 else
12867   
12868                 # save the flags
12869                 ol_LIBS="$LIBS"
12870                 LIBS="-thread $LIBS"
12871
12872                 if test "$cross_compiling" = yes; then
12873   cat > conftest.$ac_ext <<EOF
12874 #line 12875 "configure"
12875 #include "confdefs.h"
12876 /* pthread test headers */
12877 #include <pthread.h>
12878 #if HAVE_PTHREADS < 7
12879 #include <errno.h>
12880 #endif
12881 #ifndef NULL
12882 #define NULL (void*)0
12883 #endif
12884
12885 static void *task(p)
12886         void *p;
12887 {
12888         return (void *) (p == NULL);
12889 }
12890
12891 int main() {
12892
12893         /* pthread test function */
12894 #ifndef PTHREAD_CREATE_DETACHED
12895 #define PTHREAD_CREATE_DETACHED 1
12896 #endif
12897         pthread_t t;
12898         int status;
12899         int detach = PTHREAD_CREATE_DETACHED;
12900
12901 #if HAVE_PTHREADS > 4
12902         /* Final pthreads */
12903         pthread_attr_t attr;
12904
12905         status = pthread_attr_init(&attr);
12906         if( status ) return status;
12907
12908 #if HAVE_PTHREADS < 7
12909         status = pthread_attr_setdetachstate(&attr, &detach);
12910         if( status < 0 ) status = errno;
12911 #else
12912         status = pthread_attr_setdetachstate(&attr, detach);
12913 #endif
12914         if( status ) return status;
12915         status = pthread_create( &t, &attr, task, NULL );
12916 #if HAVE_PTHREADS < 7
12917         if( status < 0 ) status = errno;
12918 #endif
12919         if( status ) return status;
12920 #else
12921         /* Draft 4 pthreads */
12922         status = pthread_create( &t, pthread_attr_default, task, NULL );
12923         if( status ) return errno;
12924
12925         /* give thread a chance to complete */
12926         /* it should remain joinable and hence detachable */
12927         sleep( 1 );
12928
12929         status = pthread_detach( &t );
12930         if( status ) return errno;
12931 #endif
12932
12933 #ifdef HAVE_LINUX_THREADS
12934         pthread_kill_other_threads_np();
12935 #endif
12936
12937         return 0;
12938
12939 ; return 0; }
12940 EOF
12941 if { (eval echo configure:12942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12942   rm -rf conftest*
12943   ol_cv_pthread_thread=yes
12944 else
12945   echo "configure: failed program was:" >&5
12946   cat conftest.$ac_ext >&5
12947   rm -rf conftest*
12948   ol_cv_pthread_thread=no
12949 fi
12950 rm -f conftest*
12951 else
12952   cat > conftest.$ac_ext <<EOF
12953 #line 12954 "configure"
12954 #include "confdefs.h"
12955 /* pthread test headers */
12956 #include <pthread.h>
12957 #if HAVE_PTHREADS < 7
12958 #include <errno.h>
12959 #endif
12960 #ifndef NULL
12961 #define NULL (void*)0
12962 #endif
12963
12964 static void *task(p)
12965         void *p;
12966 {
12967         return (void *) (p == NULL);
12968 }
12969
12970
12971 int main(argc, argv)
12972         int argc;
12973         char **argv;
12974 {
12975
12976         /* pthread test function */
12977 #ifndef PTHREAD_CREATE_DETACHED
12978 #define PTHREAD_CREATE_DETACHED 1
12979 #endif
12980         pthread_t t;
12981         int status;
12982         int detach = PTHREAD_CREATE_DETACHED;
12983
12984 #if HAVE_PTHREADS > 4
12985         /* Final pthreads */
12986         pthread_attr_t attr;
12987
12988         status = pthread_attr_init(&attr);
12989         if( status ) return status;
12990
12991 #if HAVE_PTHREADS < 7
12992         status = pthread_attr_setdetachstate(&attr, &detach);
12993         if( status < 0 ) status = errno;
12994 #else
12995         status = pthread_attr_setdetachstate(&attr, detach);
12996 #endif
12997         if( status ) return status;
12998         status = pthread_create( &t, &attr, task, NULL );
12999 #if HAVE_PTHREADS < 7
13000         if( status < 0 ) status = errno;
13001 #endif
13002         if( status ) return status;
13003 #else
13004         /* Draft 4 pthreads */
13005         status = pthread_create( &t, pthread_attr_default, task, NULL );
13006         if( status ) return errno;
13007
13008         /* give thread a chance to complete */
13009         /* it should remain joinable and hence detachable */
13010         sleep( 1 );
13011
13012         status = pthread_detach( &t );
13013         if( status ) return errno;
13014 #endif
13015
13016 #ifdef HAVE_LINUX_THREADS
13017         pthread_kill_other_threads_np();
13018 #endif
13019
13020         return 0;
13021
13022 }
13023
13024 EOF
13025 if { (eval echo configure:13026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13026 then
13027   ol_cv_pthread_thread=yes
13028 else
13029   echo "configure: failed program was:" >&5
13030   cat conftest.$ac_ext >&5
13031   rm -fr conftest*
13032   ol_cv_pthread_thread=no
13033 fi
13034 rm -fr conftest*
13035 fi
13036
13037
13038                 # restore the LIBS
13039                 LIBS="$ol_LIBS"
13040         
13041 fi
13042
13043 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13044
13045         if test $ol_cv_pthread_thread = yes ; then
13046                 ol_link_pthreads="-thread"
13047                 ol_link_threads=posix
13048         fi
13049 fi
13050
13051
13052                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13053 if test "$ol_link_threads" = no ; then
13054         # try -lpthread -lmach -lexc -lc_r
13055         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13056 echo "configure:13057: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13057 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13058   echo $ac_n "(cached) $ac_c" 1>&6
13059 else
13060   
13061                 # save the flags
13062                 ol_LIBS="$LIBS"
13063                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13064
13065                 if test "$cross_compiling" = yes; then
13066   cat > conftest.$ac_ext <<EOF
13067 #line 13068 "configure"
13068 #include "confdefs.h"
13069 /* pthread test headers */
13070 #include <pthread.h>
13071 #if HAVE_PTHREADS < 7
13072 #include <errno.h>
13073 #endif
13074 #ifndef NULL
13075 #define NULL (void*)0
13076 #endif
13077
13078 static void *task(p)
13079         void *p;
13080 {
13081         return (void *) (p == NULL);
13082 }
13083
13084 int main() {
13085
13086         /* pthread test function */
13087 #ifndef PTHREAD_CREATE_DETACHED
13088 #define PTHREAD_CREATE_DETACHED 1
13089 #endif
13090         pthread_t t;
13091         int status;
13092         int detach = PTHREAD_CREATE_DETACHED;
13093
13094 #if HAVE_PTHREADS > 4
13095         /* Final pthreads */
13096         pthread_attr_t attr;
13097
13098         status = pthread_attr_init(&attr);
13099         if( status ) return status;
13100
13101 #if HAVE_PTHREADS < 7
13102         status = pthread_attr_setdetachstate(&attr, &detach);
13103         if( status < 0 ) status = errno;
13104 #else
13105         status = pthread_attr_setdetachstate(&attr, detach);
13106 #endif
13107         if( status ) return status;
13108         status = pthread_create( &t, &attr, task, NULL );
13109 #if HAVE_PTHREADS < 7
13110         if( status < 0 ) status = errno;
13111 #endif
13112         if( status ) return status;
13113 #else
13114         /* Draft 4 pthreads */
13115         status = pthread_create( &t, pthread_attr_default, task, NULL );
13116         if( status ) return errno;
13117
13118         /* give thread a chance to complete */
13119         /* it should remain joinable and hence detachable */
13120         sleep( 1 );
13121
13122         status = pthread_detach( &t );
13123         if( status ) return errno;
13124 #endif
13125
13126 #ifdef HAVE_LINUX_THREADS
13127         pthread_kill_other_threads_np();
13128 #endif
13129
13130         return 0;
13131
13132 ; return 0; }
13133 EOF
13134 if { (eval echo configure:13135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13135   rm -rf conftest*
13136   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13137 else
13138   echo "configure: failed program was:" >&5
13139   cat conftest.$ac_ext >&5
13140   rm -rf conftest*
13141   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13142 fi
13143 rm -f conftest*
13144 else
13145   cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148 /* pthread test headers */
13149 #include <pthread.h>
13150 #if HAVE_PTHREADS < 7
13151 #include <errno.h>
13152 #endif
13153 #ifndef NULL
13154 #define NULL (void*)0
13155 #endif
13156
13157 static void *task(p)
13158         void *p;
13159 {
13160         return (void *) (p == NULL);
13161 }
13162
13163
13164 int main(argc, argv)
13165         int argc;
13166         char **argv;
13167 {
13168
13169         /* pthread test function */
13170 #ifndef PTHREAD_CREATE_DETACHED
13171 #define PTHREAD_CREATE_DETACHED 1
13172 #endif
13173         pthread_t t;
13174         int status;
13175         int detach = PTHREAD_CREATE_DETACHED;
13176
13177 #if HAVE_PTHREADS > 4
13178         /* Final pthreads */
13179         pthread_attr_t attr;
13180
13181         status = pthread_attr_init(&attr);
13182         if( status ) return status;
13183
13184 #if HAVE_PTHREADS < 7
13185         status = pthread_attr_setdetachstate(&attr, &detach);
13186         if( status < 0 ) status = errno;
13187 #else
13188         status = pthread_attr_setdetachstate(&attr, detach);
13189 #endif
13190         if( status ) return status;
13191         status = pthread_create( &t, &attr, task, NULL );
13192 #if HAVE_PTHREADS < 7
13193         if( status < 0 ) status = errno;
13194 #endif
13195         if( status ) return status;
13196 #else
13197         /* Draft 4 pthreads */
13198         status = pthread_create( &t, pthread_attr_default, task, NULL );
13199         if( status ) return errno;
13200
13201         /* give thread a chance to complete */
13202         /* it should remain joinable and hence detachable */
13203         sleep( 1 );
13204
13205         status = pthread_detach( &t );
13206         if( status ) return errno;
13207 #endif
13208
13209 #ifdef HAVE_LINUX_THREADS
13210         pthread_kill_other_threads_np();
13211 #endif
13212
13213         return 0;
13214
13215 }
13216
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13219 then
13220   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -fr conftest*
13225   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13226 fi
13227 rm -fr conftest*
13228 fi
13229
13230
13231                 # restore the LIBS
13232                 LIBS="$ol_LIBS"
13233         
13234 fi
13235
13236 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13237
13238         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13239                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13240                 ol_link_threads=posix
13241         fi
13242 fi
13243
13244                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13245 if test "$ol_link_threads" = no ; then
13246         # try -lpthread -lmach -lexc
13247         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13248 echo "configure:13249: checking for pthread link with -lpthread -lmach -lexc" >&5
13249 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13250   echo $ac_n "(cached) $ac_c" 1>&6
13251 else
13252   
13253                 # save the flags
13254                 ol_LIBS="$LIBS"
13255                 LIBS="-lpthread -lmach -lexc $LIBS"
13256
13257                 if test "$cross_compiling" = yes; then
13258   cat > conftest.$ac_ext <<EOF
13259 #line 13260 "configure"
13260 #include "confdefs.h"
13261 /* pthread test headers */
13262 #include <pthread.h>
13263 #if HAVE_PTHREADS < 7
13264 #include <errno.h>
13265 #endif
13266 #ifndef NULL
13267 #define NULL (void*)0
13268 #endif
13269
13270 static void *task(p)
13271         void *p;
13272 {
13273         return (void *) (p == NULL);
13274 }
13275
13276 int main() {
13277
13278         /* pthread test function */
13279 #ifndef PTHREAD_CREATE_DETACHED
13280 #define PTHREAD_CREATE_DETACHED 1
13281 #endif
13282         pthread_t t;
13283         int status;
13284         int detach = PTHREAD_CREATE_DETACHED;
13285
13286 #if HAVE_PTHREADS > 4
13287         /* Final pthreads */
13288         pthread_attr_t attr;
13289
13290         status = pthread_attr_init(&attr);
13291         if( status ) return status;
13292
13293 #if HAVE_PTHREADS < 7
13294         status = pthread_attr_setdetachstate(&attr, &detach);
13295         if( status < 0 ) status = errno;
13296 #else
13297         status = pthread_attr_setdetachstate(&attr, detach);
13298 #endif
13299         if( status ) return status;
13300         status = pthread_create( &t, &attr, task, NULL );
13301 #if HAVE_PTHREADS < 7
13302         if( status < 0 ) status = errno;
13303 #endif
13304         if( status ) return status;
13305 #else
13306         /* Draft 4 pthreads */
13307         status = pthread_create( &t, pthread_attr_default, task, NULL );
13308         if( status ) return errno;
13309
13310         /* give thread a chance to complete */
13311         /* it should remain joinable and hence detachable */
13312         sleep( 1 );
13313
13314         status = pthread_detach( &t );
13315         if( status ) return errno;
13316 #endif
13317
13318 #ifdef HAVE_LINUX_THREADS
13319         pthread_kill_other_threads_np();
13320 #endif
13321
13322         return 0;
13323
13324 ; return 0; }
13325 EOF
13326 if { (eval echo configure:13327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13327   rm -rf conftest*
13328   ol_cv_pthread_lpthread_lmach_lexc=yes
13329 else
13330   echo "configure: failed program was:" >&5
13331   cat conftest.$ac_ext >&5
13332   rm -rf conftest*
13333   ol_cv_pthread_lpthread_lmach_lexc=no
13334 fi
13335 rm -f conftest*
13336 else
13337   cat > conftest.$ac_ext <<EOF
13338 #line 13339 "configure"
13339 #include "confdefs.h"
13340 /* pthread test headers */
13341 #include <pthread.h>
13342 #if HAVE_PTHREADS < 7
13343 #include <errno.h>
13344 #endif
13345 #ifndef NULL
13346 #define NULL (void*)0
13347 #endif
13348
13349 static void *task(p)
13350         void *p;
13351 {
13352         return (void *) (p == NULL);
13353 }
13354
13355
13356 int main(argc, argv)
13357         int argc;
13358         char **argv;
13359 {
13360
13361         /* pthread test function */
13362 #ifndef PTHREAD_CREATE_DETACHED
13363 #define PTHREAD_CREATE_DETACHED 1
13364 #endif
13365         pthread_t t;
13366         int status;
13367         int detach = PTHREAD_CREATE_DETACHED;
13368
13369 #if HAVE_PTHREADS > 4
13370         /* Final pthreads */
13371         pthread_attr_t attr;
13372
13373         status = pthread_attr_init(&attr);
13374         if( status ) return status;
13375
13376 #if HAVE_PTHREADS < 7
13377         status = pthread_attr_setdetachstate(&attr, &detach);
13378         if( status < 0 ) status = errno;
13379 #else
13380         status = pthread_attr_setdetachstate(&attr, detach);
13381 #endif
13382         if( status ) return status;
13383         status = pthread_create( &t, &attr, task, NULL );
13384 #if HAVE_PTHREADS < 7
13385         if( status < 0 ) status = errno;
13386 #endif
13387         if( status ) return status;
13388 #else
13389         /* Draft 4 pthreads */
13390         status = pthread_create( &t, pthread_attr_default, task, NULL );
13391         if( status ) return errno;
13392
13393         /* give thread a chance to complete */
13394         /* it should remain joinable and hence detachable */
13395         sleep( 1 );
13396
13397         status = pthread_detach( &t );
13398         if( status ) return errno;
13399 #endif
13400
13401 #ifdef HAVE_LINUX_THREADS
13402         pthread_kill_other_threads_np();
13403 #endif
13404
13405         return 0;
13406
13407 }
13408
13409 EOF
13410 if { (eval echo configure:13411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13411 then
13412   ol_cv_pthread_lpthread_lmach_lexc=yes
13413 else
13414   echo "configure: failed program was:" >&5
13415   cat conftest.$ac_ext >&5
13416   rm -fr conftest*
13417   ol_cv_pthread_lpthread_lmach_lexc=no
13418 fi
13419 rm -fr conftest*
13420 fi
13421
13422
13423                 # restore the LIBS
13424                 LIBS="$ol_LIBS"
13425         
13426 fi
13427
13428 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13429
13430         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13431                 ol_link_pthreads="-lpthread -lmach -lexc"
13432                 ol_link_threads=posix
13433         fi
13434 fi
13435
13436
13437                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13438 if test "$ol_link_threads" = no ; then
13439         # try -lpthread -Wl,-woff,85
13440         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13441 echo "configure:13442: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13442 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13443   echo $ac_n "(cached) $ac_c" 1>&6
13444 else
13445   
13446                 # save the flags
13447                 ol_LIBS="$LIBS"
13448                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13449
13450                 if test "$cross_compiling" = yes; then
13451   cat > conftest.$ac_ext <<EOF
13452 #line 13453 "configure"
13453 #include "confdefs.h"
13454 /* pthread test headers */
13455 #include <pthread.h>
13456 #if HAVE_PTHREADS < 7
13457 #include <errno.h>
13458 #endif
13459 #ifndef NULL
13460 #define NULL (void*)0
13461 #endif
13462
13463 static void *task(p)
13464         void *p;
13465 {
13466         return (void *) (p == NULL);
13467 }
13468
13469 int main() {
13470
13471         /* pthread test function */
13472 #ifndef PTHREAD_CREATE_DETACHED
13473 #define PTHREAD_CREATE_DETACHED 1
13474 #endif
13475         pthread_t t;
13476         int status;
13477         int detach = PTHREAD_CREATE_DETACHED;
13478
13479 #if HAVE_PTHREADS > 4
13480         /* Final pthreads */
13481         pthread_attr_t attr;
13482
13483         status = pthread_attr_init(&attr);
13484         if( status ) return status;
13485
13486 #if HAVE_PTHREADS < 7
13487         status = pthread_attr_setdetachstate(&attr, &detach);
13488         if( status < 0 ) status = errno;
13489 #else
13490         status = pthread_attr_setdetachstate(&attr, detach);
13491 #endif
13492         if( status ) return status;
13493         status = pthread_create( &t, &attr, task, NULL );
13494 #if HAVE_PTHREADS < 7
13495         if( status < 0 ) status = errno;
13496 #endif
13497         if( status ) return status;
13498 #else
13499         /* Draft 4 pthreads */
13500         status = pthread_create( &t, pthread_attr_default, task, NULL );
13501         if( status ) return errno;
13502
13503         /* give thread a chance to complete */
13504         /* it should remain joinable and hence detachable */
13505         sleep( 1 );
13506
13507         status = pthread_detach( &t );
13508         if( status ) return errno;
13509 #endif
13510
13511 #ifdef HAVE_LINUX_THREADS
13512         pthread_kill_other_threads_np();
13513 #endif
13514
13515         return 0;
13516
13517 ; return 0; }
13518 EOF
13519 if { (eval echo configure:13520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13520   rm -rf conftest*
13521   ol_cv_pthread_lib_lpthread_woff=yes
13522 else
13523   echo "configure: failed program was:" >&5
13524   cat conftest.$ac_ext >&5
13525   rm -rf conftest*
13526   ol_cv_pthread_lib_lpthread_woff=no
13527 fi
13528 rm -f conftest*
13529 else
13530   cat > conftest.$ac_ext <<EOF
13531 #line 13532 "configure"
13532 #include "confdefs.h"
13533 /* pthread test headers */
13534 #include <pthread.h>
13535 #if HAVE_PTHREADS < 7
13536 #include <errno.h>
13537 #endif
13538 #ifndef NULL
13539 #define NULL (void*)0
13540 #endif
13541
13542 static void *task(p)
13543         void *p;
13544 {
13545         return (void *) (p == NULL);
13546 }
13547
13548
13549 int main(argc, argv)
13550         int argc;
13551         char **argv;
13552 {
13553
13554         /* pthread test function */
13555 #ifndef PTHREAD_CREATE_DETACHED
13556 #define PTHREAD_CREATE_DETACHED 1
13557 #endif
13558         pthread_t t;
13559         int status;
13560         int detach = PTHREAD_CREATE_DETACHED;
13561
13562 #if HAVE_PTHREADS > 4
13563         /* Final pthreads */
13564         pthread_attr_t attr;
13565
13566         status = pthread_attr_init(&attr);
13567         if( status ) return status;
13568
13569 #if HAVE_PTHREADS < 7
13570         status = pthread_attr_setdetachstate(&attr, &detach);
13571         if( status < 0 ) status = errno;
13572 #else
13573         status = pthread_attr_setdetachstate(&attr, detach);
13574 #endif
13575         if( status ) return status;
13576         status = pthread_create( &t, &attr, task, NULL );
13577 #if HAVE_PTHREADS < 7
13578         if( status < 0 ) status = errno;
13579 #endif
13580         if( status ) return status;
13581 #else
13582         /* Draft 4 pthreads */
13583         status = pthread_create( &t, pthread_attr_default, task, NULL );
13584         if( status ) return errno;
13585
13586         /* give thread a chance to complete */
13587         /* it should remain joinable and hence detachable */
13588         sleep( 1 );
13589
13590         status = pthread_detach( &t );
13591         if( status ) return errno;
13592 #endif
13593
13594 #ifdef HAVE_LINUX_THREADS
13595         pthread_kill_other_threads_np();
13596 #endif
13597
13598         return 0;
13599
13600 }
13601
13602 EOF
13603 if { (eval echo configure:13604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13604 then
13605   ol_cv_pthread_lib_lpthread_woff=yes
13606 else
13607   echo "configure: failed program was:" >&5
13608   cat conftest.$ac_ext >&5
13609   rm -fr conftest*
13610   ol_cv_pthread_lib_lpthread_woff=no
13611 fi
13612 rm -fr conftest*
13613 fi
13614
13615
13616                 # restore the LIBS
13617                 LIBS="$ol_LIBS"
13618         
13619 fi
13620
13621 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13622
13623         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13624                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13625                 ol_link_threads=posix
13626         fi
13627 fi
13628
13629
13630                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13631 if test "$ol_link_threads" = no ; then
13632         # try -lpthread
13633         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13634 echo "configure:13635: checking for pthread link with -lpthread" >&5
13635 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13636   echo $ac_n "(cached) $ac_c" 1>&6
13637 else
13638   
13639                 # save the flags
13640                 ol_LIBS="$LIBS"
13641                 LIBS="-lpthread $LIBS"
13642
13643                 if test "$cross_compiling" = yes; then
13644   cat > conftest.$ac_ext <<EOF
13645 #line 13646 "configure"
13646 #include "confdefs.h"
13647 /* pthread test headers */
13648 #include <pthread.h>
13649 #if HAVE_PTHREADS < 7
13650 #include <errno.h>
13651 #endif
13652 #ifndef NULL
13653 #define NULL (void*)0
13654 #endif
13655
13656 static void *task(p)
13657         void *p;
13658 {
13659         return (void *) (p == NULL);
13660 }
13661
13662 int main() {
13663
13664         /* pthread test function */
13665 #ifndef PTHREAD_CREATE_DETACHED
13666 #define PTHREAD_CREATE_DETACHED 1
13667 #endif
13668         pthread_t t;
13669         int status;
13670         int detach = PTHREAD_CREATE_DETACHED;
13671
13672 #if HAVE_PTHREADS > 4
13673         /* Final pthreads */
13674         pthread_attr_t attr;
13675
13676         status = pthread_attr_init(&attr);
13677         if( status ) return status;
13678
13679 #if HAVE_PTHREADS < 7
13680         status = pthread_attr_setdetachstate(&attr, &detach);
13681         if( status < 0 ) status = errno;
13682 #else
13683         status = pthread_attr_setdetachstate(&attr, detach);
13684 #endif
13685         if( status ) return status;
13686         status = pthread_create( &t, &attr, task, NULL );
13687 #if HAVE_PTHREADS < 7
13688         if( status < 0 ) status = errno;
13689 #endif
13690         if( status ) return status;
13691 #else
13692         /* Draft 4 pthreads */
13693         status = pthread_create( &t, pthread_attr_default, task, NULL );
13694         if( status ) return errno;
13695
13696         /* give thread a chance to complete */
13697         /* it should remain joinable and hence detachable */
13698         sleep( 1 );
13699
13700         status = pthread_detach( &t );
13701         if( status ) return errno;
13702 #endif
13703
13704 #ifdef HAVE_LINUX_THREADS
13705         pthread_kill_other_threads_np();
13706 #endif
13707
13708         return 0;
13709
13710 ; return 0; }
13711 EOF
13712 if { (eval echo configure:13713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13713   rm -rf conftest*
13714   ol_cv_pthread_lpthread=yes
13715 else
13716   echo "configure: failed program was:" >&5
13717   cat conftest.$ac_ext >&5
13718   rm -rf conftest*
13719   ol_cv_pthread_lpthread=no
13720 fi
13721 rm -f conftest*
13722 else
13723   cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 /* pthread test headers */
13727 #include <pthread.h>
13728 #if HAVE_PTHREADS < 7
13729 #include <errno.h>
13730 #endif
13731 #ifndef NULL
13732 #define NULL (void*)0
13733 #endif
13734
13735 static void *task(p)
13736         void *p;
13737 {
13738         return (void *) (p == NULL);
13739 }
13740
13741
13742 int main(argc, argv)
13743         int argc;
13744         char **argv;
13745 {
13746
13747         /* pthread test function */
13748 #ifndef PTHREAD_CREATE_DETACHED
13749 #define PTHREAD_CREATE_DETACHED 1
13750 #endif
13751         pthread_t t;
13752         int status;
13753         int detach = PTHREAD_CREATE_DETACHED;
13754
13755 #if HAVE_PTHREADS > 4
13756         /* Final pthreads */
13757         pthread_attr_t attr;
13758
13759         status = pthread_attr_init(&attr);
13760         if( status ) return status;
13761
13762 #if HAVE_PTHREADS < 7
13763         status = pthread_attr_setdetachstate(&attr, &detach);
13764         if( status < 0 ) status = errno;
13765 #else
13766         status = pthread_attr_setdetachstate(&attr, detach);
13767 #endif
13768         if( status ) return status;
13769         status = pthread_create( &t, &attr, task, NULL );
13770 #if HAVE_PTHREADS < 7
13771         if( status < 0 ) status = errno;
13772 #endif
13773         if( status ) return status;
13774 #else
13775         /* Draft 4 pthreads */
13776         status = pthread_create( &t, pthread_attr_default, task, NULL );
13777         if( status ) return errno;
13778
13779         /* give thread a chance to complete */
13780         /* it should remain joinable and hence detachable */
13781         sleep( 1 );
13782
13783         status = pthread_detach( &t );
13784         if( status ) return errno;
13785 #endif
13786
13787 #ifdef HAVE_LINUX_THREADS
13788         pthread_kill_other_threads_np();
13789 #endif
13790
13791         return 0;
13792
13793 }
13794
13795 EOF
13796 if { (eval echo configure:13797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13797 then
13798   ol_cv_pthread_lpthread=yes
13799 else
13800   echo "configure: failed program was:" >&5
13801   cat conftest.$ac_ext >&5
13802   rm -fr conftest*
13803   ol_cv_pthread_lpthread=no
13804 fi
13805 rm -fr conftest*
13806 fi
13807
13808
13809                 # restore the LIBS
13810                 LIBS="$ol_LIBS"
13811         
13812 fi
13813
13814 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13815
13816         if test $ol_cv_pthread_lpthread = yes ; then
13817                 ol_link_pthreads="-lpthread"
13818                 ol_link_threads=posix
13819         fi
13820 fi
13821
13822                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13823 if test "$ol_link_threads" = no ; then
13824         # try -lc_r
13825         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13826 echo "configure:13827: checking for pthread link with -lc_r" >&5
13827 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13828   echo $ac_n "(cached) $ac_c" 1>&6
13829 else
13830   
13831                 # save the flags
13832                 ol_LIBS="$LIBS"
13833                 LIBS="-lc_r $LIBS"
13834
13835                 if test "$cross_compiling" = yes; then
13836   cat > conftest.$ac_ext <<EOF
13837 #line 13838 "configure"
13838 #include "confdefs.h"
13839 /* pthread test headers */
13840 #include <pthread.h>
13841 #if HAVE_PTHREADS < 7
13842 #include <errno.h>
13843 #endif
13844 #ifndef NULL
13845 #define NULL (void*)0
13846 #endif
13847
13848 static void *task(p)
13849         void *p;
13850 {
13851         return (void *) (p == NULL);
13852 }
13853
13854 int main() {
13855
13856         /* pthread test function */
13857 #ifndef PTHREAD_CREATE_DETACHED
13858 #define PTHREAD_CREATE_DETACHED 1
13859 #endif
13860         pthread_t t;
13861         int status;
13862         int detach = PTHREAD_CREATE_DETACHED;
13863
13864 #if HAVE_PTHREADS > 4
13865         /* Final pthreads */
13866         pthread_attr_t attr;
13867
13868         status = pthread_attr_init(&attr);
13869         if( status ) return status;
13870
13871 #if HAVE_PTHREADS < 7
13872         status = pthread_attr_setdetachstate(&attr, &detach);
13873         if( status < 0 ) status = errno;
13874 #else
13875         status = pthread_attr_setdetachstate(&attr, detach);
13876 #endif
13877         if( status ) return status;
13878         status = pthread_create( &t, &attr, task, NULL );
13879 #if HAVE_PTHREADS < 7
13880         if( status < 0 ) status = errno;
13881 #endif
13882         if( status ) return status;
13883 #else
13884         /* Draft 4 pthreads */
13885         status = pthread_create( &t, pthread_attr_default, task, NULL );
13886         if( status ) return errno;
13887
13888         /* give thread a chance to complete */
13889         /* it should remain joinable and hence detachable */
13890         sleep( 1 );
13891
13892         status = pthread_detach( &t );
13893         if( status ) return errno;
13894 #endif
13895
13896 #ifdef HAVE_LINUX_THREADS
13897         pthread_kill_other_threads_np();
13898 #endif
13899
13900         return 0;
13901
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13905   rm -rf conftest*
13906   ol_cv_pthread_lc_r=yes
13907 else
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910   rm -rf conftest*
13911   ol_cv_pthread_lc_r=no
13912 fi
13913 rm -f conftest*
13914 else
13915   cat > conftest.$ac_ext <<EOF
13916 #line 13917 "configure"
13917 #include "confdefs.h"
13918 /* pthread test headers */
13919 #include <pthread.h>
13920 #if HAVE_PTHREADS < 7
13921 #include <errno.h>
13922 #endif
13923 #ifndef NULL
13924 #define NULL (void*)0
13925 #endif
13926
13927 static void *task(p)
13928         void *p;
13929 {
13930         return (void *) (p == NULL);
13931 }
13932
13933
13934 int main(argc, argv)
13935         int argc;
13936         char **argv;
13937 {
13938
13939         /* pthread test function */
13940 #ifndef PTHREAD_CREATE_DETACHED
13941 #define PTHREAD_CREATE_DETACHED 1
13942 #endif
13943         pthread_t t;
13944         int status;
13945         int detach = PTHREAD_CREATE_DETACHED;
13946
13947 #if HAVE_PTHREADS > 4
13948         /* Final pthreads */
13949         pthread_attr_t attr;
13950
13951         status = pthread_attr_init(&attr);
13952         if( status ) return status;
13953
13954 #if HAVE_PTHREADS < 7
13955         status = pthread_attr_setdetachstate(&attr, &detach);
13956         if( status < 0 ) status = errno;
13957 #else
13958         status = pthread_attr_setdetachstate(&attr, detach);
13959 #endif
13960         if( status ) return status;
13961         status = pthread_create( &t, &attr, task, NULL );
13962 #if HAVE_PTHREADS < 7
13963         if( status < 0 ) status = errno;
13964 #endif
13965         if( status ) return status;
13966 #else
13967         /* Draft 4 pthreads */
13968         status = pthread_create( &t, pthread_attr_default, task, NULL );
13969         if( status ) return errno;
13970
13971         /* give thread a chance to complete */
13972         /* it should remain joinable and hence detachable */
13973         sleep( 1 );
13974
13975         status = pthread_detach( &t );
13976         if( status ) return errno;
13977 #endif
13978
13979 #ifdef HAVE_LINUX_THREADS
13980         pthread_kill_other_threads_np();
13981 #endif
13982
13983         return 0;
13984
13985 }
13986
13987 EOF
13988 if { (eval echo configure:13989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13989 then
13990   ol_cv_pthread_lc_r=yes
13991 else
13992   echo "configure: failed program was:" >&5
13993   cat conftest.$ac_ext >&5
13994   rm -fr conftest*
13995   ol_cv_pthread_lc_r=no
13996 fi
13997 rm -fr conftest*
13998 fi
13999
14000
14001                 # restore the LIBS
14002                 LIBS="$ol_LIBS"
14003         
14004 fi
14005
14006 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14007
14008         if test $ol_cv_pthread_lc_r = yes ; then
14009                 ol_link_pthreads="-lc_r"
14010                 ol_link_threads=posix
14011         fi
14012 fi
14013
14014
14015                 # Pthread try link: -threads (ol_cv_pthread_threads)
14016 if test "$ol_link_threads" = no ; then
14017         # try -threads
14018         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14019 echo "configure:14020: checking for pthread link with -threads" >&5
14020 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14021   echo $ac_n "(cached) $ac_c" 1>&6
14022 else
14023   
14024                 # save the flags
14025                 ol_LIBS="$LIBS"
14026                 LIBS="-threads $LIBS"
14027
14028                 if test "$cross_compiling" = yes; then
14029   cat > conftest.$ac_ext <<EOF
14030 #line 14031 "configure"
14031 #include "confdefs.h"
14032 /* pthread test headers */
14033 #include <pthread.h>
14034 #if HAVE_PTHREADS < 7
14035 #include <errno.h>
14036 #endif
14037 #ifndef NULL
14038 #define NULL (void*)0
14039 #endif
14040
14041 static void *task(p)
14042         void *p;
14043 {
14044         return (void *) (p == NULL);
14045 }
14046
14047 int main() {
14048
14049         /* pthread test function */
14050 #ifndef PTHREAD_CREATE_DETACHED
14051 #define PTHREAD_CREATE_DETACHED 1
14052 #endif
14053         pthread_t t;
14054         int status;
14055         int detach = PTHREAD_CREATE_DETACHED;
14056
14057 #if HAVE_PTHREADS > 4
14058         /* Final pthreads */
14059         pthread_attr_t attr;
14060
14061         status = pthread_attr_init(&attr);
14062         if( status ) return status;
14063
14064 #if HAVE_PTHREADS < 7
14065         status = pthread_attr_setdetachstate(&attr, &detach);
14066         if( status < 0 ) status = errno;
14067 #else
14068         status = pthread_attr_setdetachstate(&attr, detach);
14069 #endif
14070         if( status ) return status;
14071         status = pthread_create( &t, &attr, task, NULL );
14072 #if HAVE_PTHREADS < 7
14073         if( status < 0 ) status = errno;
14074 #endif
14075         if( status ) return status;
14076 #else
14077         /* Draft 4 pthreads */
14078         status = pthread_create( &t, pthread_attr_default, task, NULL );
14079         if( status ) return errno;
14080
14081         /* give thread a chance to complete */
14082         /* it should remain joinable and hence detachable */
14083         sleep( 1 );
14084
14085         status = pthread_detach( &t );
14086         if( status ) return errno;
14087 #endif
14088
14089 #ifdef HAVE_LINUX_THREADS
14090         pthread_kill_other_threads_np();
14091 #endif
14092
14093         return 0;
14094
14095 ; return 0; }
14096 EOF
14097 if { (eval echo configure:14098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14098   rm -rf conftest*
14099   ol_cv_pthread_threads=yes
14100 else
14101   echo "configure: failed program was:" >&5
14102   cat conftest.$ac_ext >&5
14103   rm -rf conftest*
14104   ol_cv_pthread_threads=no
14105 fi
14106 rm -f conftest*
14107 else
14108   cat > conftest.$ac_ext <<EOF
14109 #line 14110 "configure"
14110 #include "confdefs.h"
14111 /* pthread test headers */
14112 #include <pthread.h>
14113 #if HAVE_PTHREADS < 7
14114 #include <errno.h>
14115 #endif
14116 #ifndef NULL
14117 #define NULL (void*)0
14118 #endif
14119
14120 static void *task(p)
14121         void *p;
14122 {
14123         return (void *) (p == NULL);
14124 }
14125
14126
14127 int main(argc, argv)
14128         int argc;
14129         char **argv;
14130 {
14131
14132         /* pthread test function */
14133 #ifndef PTHREAD_CREATE_DETACHED
14134 #define PTHREAD_CREATE_DETACHED 1
14135 #endif
14136         pthread_t t;
14137         int status;
14138         int detach = PTHREAD_CREATE_DETACHED;
14139
14140 #if HAVE_PTHREADS > 4
14141         /* Final pthreads */
14142         pthread_attr_t attr;
14143
14144         status = pthread_attr_init(&attr);
14145         if( status ) return status;
14146
14147 #if HAVE_PTHREADS < 7
14148         status = pthread_attr_setdetachstate(&attr, &detach);
14149         if( status < 0 ) status = errno;
14150 #else
14151         status = pthread_attr_setdetachstate(&attr, detach);
14152 #endif
14153         if( status ) return status;
14154         status = pthread_create( &t, &attr, task, NULL );
14155 #if HAVE_PTHREADS < 7
14156         if( status < 0 ) status = errno;
14157 #endif
14158         if( status ) return status;
14159 #else
14160         /* Draft 4 pthreads */
14161         status = pthread_create( &t, pthread_attr_default, task, NULL );
14162         if( status ) return errno;
14163
14164         /* give thread a chance to complete */
14165         /* it should remain joinable and hence detachable */
14166         sleep( 1 );
14167
14168         status = pthread_detach( &t );
14169         if( status ) return errno;
14170 #endif
14171
14172 #ifdef HAVE_LINUX_THREADS
14173         pthread_kill_other_threads_np();
14174 #endif
14175
14176         return 0;
14177
14178 }
14179
14180 EOF
14181 if { (eval echo configure:14182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14182 then
14183   ol_cv_pthread_threads=yes
14184 else
14185   echo "configure: failed program was:" >&5
14186   cat conftest.$ac_ext >&5
14187   rm -fr conftest*
14188   ol_cv_pthread_threads=no
14189 fi
14190 rm -fr conftest*
14191 fi
14192
14193
14194                 # restore the LIBS
14195                 LIBS="$ol_LIBS"
14196         
14197 fi
14198
14199 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14200
14201         if test $ol_cv_pthread_threads = yes ; then
14202                 ol_link_pthreads="-threads"
14203                 ol_link_threads=posix
14204         fi
14205 fi
14206
14207
14208                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14209 if test "$ol_link_threads" = no ; then
14210         # try -lpthreads -lmach -lexc -lc_r
14211         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14212 echo "configure:14213: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14213 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14214   echo $ac_n "(cached) $ac_c" 1>&6
14215 else
14216   
14217                 # save the flags
14218                 ol_LIBS="$LIBS"
14219                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14220
14221                 if test "$cross_compiling" = yes; then
14222   cat > conftest.$ac_ext <<EOF
14223 #line 14224 "configure"
14224 #include "confdefs.h"
14225 /* pthread test headers */
14226 #include <pthread.h>
14227 #if HAVE_PTHREADS < 7
14228 #include <errno.h>
14229 #endif
14230 #ifndef NULL
14231 #define NULL (void*)0
14232 #endif
14233
14234 static void *task(p)
14235         void *p;
14236 {
14237         return (void *) (p == NULL);
14238 }
14239
14240 int main() {
14241
14242         /* pthread test function */
14243 #ifndef PTHREAD_CREATE_DETACHED
14244 #define PTHREAD_CREATE_DETACHED 1
14245 #endif
14246         pthread_t t;
14247         int status;
14248         int detach = PTHREAD_CREATE_DETACHED;
14249
14250 #if HAVE_PTHREADS > 4
14251         /* Final pthreads */
14252         pthread_attr_t attr;
14253
14254         status = pthread_attr_init(&attr);
14255         if( status ) return status;
14256
14257 #if HAVE_PTHREADS < 7
14258         status = pthread_attr_setdetachstate(&attr, &detach);
14259         if( status < 0 ) status = errno;
14260 #else
14261         status = pthread_attr_setdetachstate(&attr, detach);
14262 #endif
14263         if( status ) return status;
14264         status = pthread_create( &t, &attr, task, NULL );
14265 #if HAVE_PTHREADS < 7
14266         if( status < 0 ) status = errno;
14267 #endif
14268         if( status ) return status;
14269 #else
14270         /* Draft 4 pthreads */
14271         status = pthread_create( &t, pthread_attr_default, task, NULL );
14272         if( status ) return errno;
14273
14274         /* give thread a chance to complete */
14275         /* it should remain joinable and hence detachable */
14276         sleep( 1 );
14277
14278         status = pthread_detach( &t );
14279         if( status ) return errno;
14280 #endif
14281
14282 #ifdef HAVE_LINUX_THREADS
14283         pthread_kill_other_threads_np();
14284 #endif
14285
14286         return 0;
14287
14288 ; return 0; }
14289 EOF
14290 if { (eval echo configure:14291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14291   rm -rf conftest*
14292   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14293 else
14294   echo "configure: failed program was:" >&5
14295   cat conftest.$ac_ext >&5
14296   rm -rf conftest*
14297   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14298 fi
14299 rm -f conftest*
14300 else
14301   cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304 /* pthread test headers */
14305 #include <pthread.h>
14306 #if HAVE_PTHREADS < 7
14307 #include <errno.h>
14308 #endif
14309 #ifndef NULL
14310 #define NULL (void*)0
14311 #endif
14312
14313 static void *task(p)
14314         void *p;
14315 {
14316         return (void *) (p == NULL);
14317 }
14318
14319
14320 int main(argc, argv)
14321         int argc;
14322         char **argv;
14323 {
14324
14325         /* pthread test function */
14326 #ifndef PTHREAD_CREATE_DETACHED
14327 #define PTHREAD_CREATE_DETACHED 1
14328 #endif
14329         pthread_t t;
14330         int status;
14331         int detach = PTHREAD_CREATE_DETACHED;
14332
14333 #if HAVE_PTHREADS > 4
14334         /* Final pthreads */
14335         pthread_attr_t attr;
14336
14337         status = pthread_attr_init(&attr);
14338         if( status ) return status;
14339
14340 #if HAVE_PTHREADS < 7
14341         status = pthread_attr_setdetachstate(&attr, &detach);
14342         if( status < 0 ) status = errno;
14343 #else
14344         status = pthread_attr_setdetachstate(&attr, detach);
14345 #endif
14346         if( status ) return status;
14347         status = pthread_create( &t, &attr, task, NULL );
14348 #if HAVE_PTHREADS < 7
14349         if( status < 0 ) status = errno;
14350 #endif
14351         if( status ) return status;
14352 #else
14353         /* Draft 4 pthreads */
14354         status = pthread_create( &t, pthread_attr_default, task, NULL );
14355         if( status ) return errno;
14356
14357         /* give thread a chance to complete */
14358         /* it should remain joinable and hence detachable */
14359         sleep( 1 );
14360
14361         status = pthread_detach( &t );
14362         if( status ) return errno;
14363 #endif
14364
14365 #ifdef HAVE_LINUX_THREADS
14366         pthread_kill_other_threads_np();
14367 #endif
14368
14369         return 0;
14370
14371 }
14372
14373 EOF
14374 if { (eval echo configure:14375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14375 then
14376   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14377 else
14378   echo "configure: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   rm -fr conftest*
14381   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14382 fi
14383 rm -fr conftest*
14384 fi
14385
14386
14387                 # restore the LIBS
14388                 LIBS="$ol_LIBS"
14389         
14390 fi
14391
14392 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14393
14394         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14395                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14396                 ol_link_threads=posix
14397         fi
14398 fi
14399
14400                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14401 if test "$ol_link_threads" = no ; then
14402         # try -lpthreads -lmach -lexc
14403         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14404 echo "configure:14405: checking for pthread link with -lpthreads -lmach -lexc" >&5
14405 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14406   echo $ac_n "(cached) $ac_c" 1>&6
14407 else
14408   
14409                 # save the flags
14410                 ol_LIBS="$LIBS"
14411                 LIBS="-lpthreads -lmach -lexc $LIBS"
14412
14413                 if test "$cross_compiling" = yes; then
14414   cat > conftest.$ac_ext <<EOF
14415 #line 14416 "configure"
14416 #include "confdefs.h"
14417 /* pthread test headers */
14418 #include <pthread.h>
14419 #if HAVE_PTHREADS < 7
14420 #include <errno.h>
14421 #endif
14422 #ifndef NULL
14423 #define NULL (void*)0
14424 #endif
14425
14426 static void *task(p)
14427         void *p;
14428 {
14429         return (void *) (p == NULL);
14430 }
14431
14432 int main() {
14433
14434         /* pthread test function */
14435 #ifndef PTHREAD_CREATE_DETACHED
14436 #define PTHREAD_CREATE_DETACHED 1
14437 #endif
14438         pthread_t t;
14439         int status;
14440         int detach = PTHREAD_CREATE_DETACHED;
14441
14442 #if HAVE_PTHREADS > 4
14443         /* Final pthreads */
14444         pthread_attr_t attr;
14445
14446         status = pthread_attr_init(&attr);
14447         if( status ) return status;
14448
14449 #if HAVE_PTHREADS < 7
14450         status = pthread_attr_setdetachstate(&attr, &detach);
14451         if( status < 0 ) status = errno;
14452 #else
14453         status = pthread_attr_setdetachstate(&attr, detach);
14454 #endif
14455         if( status ) return status;
14456         status = pthread_create( &t, &attr, task, NULL );
14457 #if HAVE_PTHREADS < 7
14458         if( status < 0 ) status = errno;
14459 #endif
14460         if( status ) return status;
14461 #else
14462         /* Draft 4 pthreads */
14463         status = pthread_create( &t, pthread_attr_default, task, NULL );
14464         if( status ) return errno;
14465
14466         /* give thread a chance to complete */
14467         /* it should remain joinable and hence detachable */
14468         sleep( 1 );
14469
14470         status = pthread_detach( &t );
14471         if( status ) return errno;
14472 #endif
14473
14474 #ifdef HAVE_LINUX_THREADS
14475         pthread_kill_other_threads_np();
14476 #endif
14477
14478         return 0;
14479
14480 ; return 0; }
14481 EOF
14482 if { (eval echo configure:14483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14483   rm -rf conftest*
14484   ol_cv_pthread_lpthreads_lmach_lexc=yes
14485 else
14486   echo "configure: failed program was:" >&5
14487   cat conftest.$ac_ext >&5
14488   rm -rf conftest*
14489   ol_cv_pthread_lpthreads_lmach_lexc=no
14490 fi
14491 rm -f conftest*
14492 else
14493   cat > conftest.$ac_ext <<EOF
14494 #line 14495 "configure"
14495 #include "confdefs.h"
14496 /* pthread test headers */
14497 #include <pthread.h>
14498 #if HAVE_PTHREADS < 7
14499 #include <errno.h>
14500 #endif
14501 #ifndef NULL
14502 #define NULL (void*)0
14503 #endif
14504
14505 static void *task(p)
14506         void *p;
14507 {
14508         return (void *) (p == NULL);
14509 }
14510
14511
14512 int main(argc, argv)
14513         int argc;
14514         char **argv;
14515 {
14516
14517         /* pthread test function */
14518 #ifndef PTHREAD_CREATE_DETACHED
14519 #define PTHREAD_CREATE_DETACHED 1
14520 #endif
14521         pthread_t t;
14522         int status;
14523         int detach = PTHREAD_CREATE_DETACHED;
14524
14525 #if HAVE_PTHREADS > 4
14526         /* Final pthreads */
14527         pthread_attr_t attr;
14528
14529         status = pthread_attr_init(&attr);
14530         if( status ) return status;
14531
14532 #if HAVE_PTHREADS < 7
14533         status = pthread_attr_setdetachstate(&attr, &detach);
14534         if( status < 0 ) status = errno;
14535 #else
14536         status = pthread_attr_setdetachstate(&attr, detach);
14537 #endif
14538         if( status ) return status;
14539         status = pthread_create( &t, &attr, task, NULL );
14540 #if HAVE_PTHREADS < 7
14541         if( status < 0 ) status = errno;
14542 #endif
14543         if( status ) return status;
14544 #else
14545         /* Draft 4 pthreads */
14546         status = pthread_create( &t, pthread_attr_default, task, NULL );
14547         if( status ) return errno;
14548
14549         /* give thread a chance to complete */
14550         /* it should remain joinable and hence detachable */
14551         sleep( 1 );
14552
14553         status = pthread_detach( &t );
14554         if( status ) return errno;
14555 #endif
14556
14557 #ifdef HAVE_LINUX_THREADS
14558         pthread_kill_other_threads_np();
14559 #endif
14560
14561         return 0;
14562
14563 }
14564
14565 EOF
14566 if { (eval echo configure:14567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14567 then
14568   ol_cv_pthread_lpthreads_lmach_lexc=yes
14569 else
14570   echo "configure: failed program was:" >&5
14571   cat conftest.$ac_ext >&5
14572   rm -fr conftest*
14573   ol_cv_pthread_lpthreads_lmach_lexc=no
14574 fi
14575 rm -fr conftest*
14576 fi
14577
14578
14579                 # restore the LIBS
14580                 LIBS="$ol_LIBS"
14581         
14582 fi
14583
14584 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14585
14586         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14587                 ol_link_pthreads="-lpthreads -lmach -lexc"
14588                 ol_link_threads=posix
14589         fi
14590 fi
14591
14592                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14593 if test "$ol_link_threads" = no ; then
14594         # try -lpthreads -lexc
14595         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14596 echo "configure:14597: checking for pthread link with -lpthreads -lexc" >&5
14597 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14598   echo $ac_n "(cached) $ac_c" 1>&6
14599 else
14600   
14601                 # save the flags
14602                 ol_LIBS="$LIBS"
14603                 LIBS="-lpthreads -lexc $LIBS"
14604
14605                 if test "$cross_compiling" = yes; then
14606   cat > conftest.$ac_ext <<EOF
14607 #line 14608 "configure"
14608 #include "confdefs.h"
14609 /* pthread test headers */
14610 #include <pthread.h>
14611 #if HAVE_PTHREADS < 7
14612 #include <errno.h>
14613 #endif
14614 #ifndef NULL
14615 #define NULL (void*)0
14616 #endif
14617
14618 static void *task(p)
14619         void *p;
14620 {
14621         return (void *) (p == NULL);
14622 }
14623
14624 int main() {
14625
14626         /* pthread test function */
14627 #ifndef PTHREAD_CREATE_DETACHED
14628 #define PTHREAD_CREATE_DETACHED 1
14629 #endif
14630         pthread_t t;
14631         int status;
14632         int detach = PTHREAD_CREATE_DETACHED;
14633
14634 #if HAVE_PTHREADS > 4
14635         /* Final pthreads */
14636         pthread_attr_t attr;
14637
14638         status = pthread_attr_init(&attr);
14639         if( status ) return status;
14640
14641 #if HAVE_PTHREADS < 7
14642         status = pthread_attr_setdetachstate(&attr, &detach);
14643         if( status < 0 ) status = errno;
14644 #else
14645         status = pthread_attr_setdetachstate(&attr, detach);
14646 #endif
14647         if( status ) return status;
14648         status = pthread_create( &t, &attr, task, NULL );
14649 #if HAVE_PTHREADS < 7
14650         if( status < 0 ) status = errno;
14651 #endif
14652         if( status ) return status;
14653 #else
14654         /* Draft 4 pthreads */
14655         status = pthread_create( &t, pthread_attr_default, task, NULL );
14656         if( status ) return errno;
14657
14658         /* give thread a chance to complete */
14659         /* it should remain joinable and hence detachable */
14660         sleep( 1 );
14661
14662         status = pthread_detach( &t );
14663         if( status ) return errno;
14664 #endif
14665
14666 #ifdef HAVE_LINUX_THREADS
14667         pthread_kill_other_threads_np();
14668 #endif
14669
14670         return 0;
14671
14672 ; return 0; }
14673 EOF
14674 if { (eval echo configure:14675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14675   rm -rf conftest*
14676   ol_cv_pthread_lpthreads_lexc=yes
14677 else
14678   echo "configure: failed program was:" >&5
14679   cat conftest.$ac_ext >&5
14680   rm -rf conftest*
14681   ol_cv_pthread_lpthreads_lexc=no
14682 fi
14683 rm -f conftest*
14684 else
14685   cat > conftest.$ac_ext <<EOF
14686 #line 14687 "configure"
14687 #include "confdefs.h"
14688 /* pthread test headers */
14689 #include <pthread.h>
14690 #if HAVE_PTHREADS < 7
14691 #include <errno.h>
14692 #endif
14693 #ifndef NULL
14694 #define NULL (void*)0
14695 #endif
14696
14697 static void *task(p)
14698         void *p;
14699 {
14700         return (void *) (p == NULL);
14701 }
14702
14703
14704 int main(argc, argv)
14705         int argc;
14706         char **argv;
14707 {
14708
14709         /* pthread test function */
14710 #ifndef PTHREAD_CREATE_DETACHED
14711 #define PTHREAD_CREATE_DETACHED 1
14712 #endif
14713         pthread_t t;
14714         int status;
14715         int detach = PTHREAD_CREATE_DETACHED;
14716
14717 #if HAVE_PTHREADS > 4
14718         /* Final pthreads */
14719         pthread_attr_t attr;
14720
14721         status = pthread_attr_init(&attr);
14722         if( status ) return status;
14723
14724 #if HAVE_PTHREADS < 7
14725         status = pthread_attr_setdetachstate(&attr, &detach);
14726         if( status < 0 ) status = errno;
14727 #else
14728         status = pthread_attr_setdetachstate(&attr, detach);
14729 #endif
14730         if( status ) return status;
14731         status = pthread_create( &t, &attr, task, NULL );
14732 #if HAVE_PTHREADS < 7
14733         if( status < 0 ) status = errno;
14734 #endif
14735         if( status ) return status;
14736 #else
14737         /* Draft 4 pthreads */
14738         status = pthread_create( &t, pthread_attr_default, task, NULL );
14739         if( status ) return errno;
14740
14741         /* give thread a chance to complete */
14742         /* it should remain joinable and hence detachable */
14743         sleep( 1 );
14744
14745         status = pthread_detach( &t );
14746         if( status ) return errno;
14747 #endif
14748
14749 #ifdef HAVE_LINUX_THREADS
14750         pthread_kill_other_threads_np();
14751 #endif
14752
14753         return 0;
14754
14755 }
14756
14757 EOF
14758 if { (eval echo configure:14759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14759 then
14760   ol_cv_pthread_lpthreads_lexc=yes
14761 else
14762   echo "configure: failed program was:" >&5
14763   cat conftest.$ac_ext >&5
14764   rm -fr conftest*
14765   ol_cv_pthread_lpthreads_lexc=no
14766 fi
14767 rm -fr conftest*
14768 fi
14769
14770
14771                 # restore the LIBS
14772                 LIBS="$ol_LIBS"
14773         
14774 fi
14775
14776 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14777
14778         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14779                 ol_link_pthreads="-lpthreads -lexc"
14780                 ol_link_threads=posix
14781         fi
14782 fi
14783
14784
14785                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14786 if test "$ol_link_threads" = no ; then
14787         # try -lpthreads
14788         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14789 echo "configure:14790: checking for pthread link with -lpthreads" >&5
14790 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14791   echo $ac_n "(cached) $ac_c" 1>&6
14792 else
14793   
14794                 # save the flags
14795                 ol_LIBS="$LIBS"
14796                 LIBS="-lpthreads $LIBS"
14797
14798                 if test "$cross_compiling" = yes; then
14799   cat > conftest.$ac_ext <<EOF
14800 #line 14801 "configure"
14801 #include "confdefs.h"
14802 /* pthread test headers */
14803 #include <pthread.h>
14804 #if HAVE_PTHREADS < 7
14805 #include <errno.h>
14806 #endif
14807 #ifndef NULL
14808 #define NULL (void*)0
14809 #endif
14810
14811 static void *task(p)
14812         void *p;
14813 {
14814         return (void *) (p == NULL);
14815 }
14816
14817 int main() {
14818
14819         /* pthread test function */
14820 #ifndef PTHREAD_CREATE_DETACHED
14821 #define PTHREAD_CREATE_DETACHED 1
14822 #endif
14823         pthread_t t;
14824         int status;
14825         int detach = PTHREAD_CREATE_DETACHED;
14826
14827 #if HAVE_PTHREADS > 4
14828         /* Final pthreads */
14829         pthread_attr_t attr;
14830
14831         status = pthread_attr_init(&attr);
14832         if( status ) return status;
14833
14834 #if HAVE_PTHREADS < 7
14835         status = pthread_attr_setdetachstate(&attr, &detach);
14836         if( status < 0 ) status = errno;
14837 #else
14838         status = pthread_attr_setdetachstate(&attr, detach);
14839 #endif
14840         if( status ) return status;
14841         status = pthread_create( &t, &attr, task, NULL );
14842 #if HAVE_PTHREADS < 7
14843         if( status < 0 ) status = errno;
14844 #endif
14845         if( status ) return status;
14846 #else
14847         /* Draft 4 pthreads */
14848         status = pthread_create( &t, pthread_attr_default, task, NULL );
14849         if( status ) return errno;
14850
14851         /* give thread a chance to complete */
14852         /* it should remain joinable and hence detachable */
14853         sleep( 1 );
14854
14855         status = pthread_detach( &t );
14856         if( status ) return errno;
14857 #endif
14858
14859 #ifdef HAVE_LINUX_THREADS
14860         pthread_kill_other_threads_np();
14861 #endif
14862
14863         return 0;
14864
14865 ; return 0; }
14866 EOF
14867 if { (eval echo configure:14868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14868   rm -rf conftest*
14869   ol_cv_pthread_lib_lpthreads=yes
14870 else
14871   echo "configure: failed program was:" >&5
14872   cat conftest.$ac_ext >&5
14873   rm -rf conftest*
14874   ol_cv_pthread_lib_lpthreads=no
14875 fi
14876 rm -f conftest*
14877 else
14878   cat > conftest.$ac_ext <<EOF
14879 #line 14880 "configure"
14880 #include "confdefs.h"
14881 /* pthread test headers */
14882 #include <pthread.h>
14883 #if HAVE_PTHREADS < 7
14884 #include <errno.h>
14885 #endif
14886 #ifndef NULL
14887 #define NULL (void*)0
14888 #endif
14889
14890 static void *task(p)
14891         void *p;
14892 {
14893         return (void *) (p == NULL);
14894 }
14895
14896
14897 int main(argc, argv)
14898         int argc;
14899         char **argv;
14900 {
14901
14902         /* pthread test function */
14903 #ifndef PTHREAD_CREATE_DETACHED
14904 #define PTHREAD_CREATE_DETACHED 1
14905 #endif
14906         pthread_t t;
14907         int status;
14908         int detach = PTHREAD_CREATE_DETACHED;
14909
14910 #if HAVE_PTHREADS > 4
14911         /* Final pthreads */
14912         pthread_attr_t attr;
14913
14914         status = pthread_attr_init(&attr);
14915         if( status ) return status;
14916
14917 #if HAVE_PTHREADS < 7
14918         status = pthread_attr_setdetachstate(&attr, &detach);
14919         if( status < 0 ) status = errno;
14920 #else
14921         status = pthread_attr_setdetachstate(&attr, detach);
14922 #endif
14923         if( status ) return status;
14924         status = pthread_create( &t, &attr, task, NULL );
14925 #if HAVE_PTHREADS < 7
14926         if( status < 0 ) status = errno;
14927 #endif
14928         if( status ) return status;
14929 #else
14930         /* Draft 4 pthreads */
14931         status = pthread_create( &t, pthread_attr_default, task, NULL );
14932         if( status ) return errno;
14933
14934         /* give thread a chance to complete */
14935         /* it should remain joinable and hence detachable */
14936         sleep( 1 );
14937
14938         status = pthread_detach( &t );
14939         if( status ) return errno;
14940 #endif
14941
14942 #ifdef HAVE_LINUX_THREADS
14943         pthread_kill_other_threads_np();
14944 #endif
14945
14946         return 0;
14947
14948 }
14949
14950 EOF
14951 if { (eval echo configure:14952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14952 then
14953   ol_cv_pthread_lib_lpthreads=yes
14954 else
14955   echo "configure: failed program was:" >&5
14956   cat conftest.$ac_ext >&5
14957   rm -fr conftest*
14958   ol_cv_pthread_lib_lpthreads=no
14959 fi
14960 rm -fr conftest*
14961 fi
14962
14963
14964                 # restore the LIBS
14965                 LIBS="$ol_LIBS"
14966         
14967 fi
14968
14969 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14970
14971         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14972                 ol_link_pthreads="-lpthreads"
14973                 ol_link_threads=posix
14974         fi
14975 fi
14976
14977
14978                 if test $ol_link_threads != no ; then
14979                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14980
14981                                                 save_CPPFLAGS="$CPPFLAGS"
14982                         save_LIBS="$LIBS"
14983                         LIBS="$LTHREAD_LIBS $LIBS"
14984
14985                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14986 do
14987 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14988 echo "configure:14989: checking for $ac_func" >&5
14989 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14990   echo $ac_n "(cached) $ac_c" 1>&6
14991 else
14992   cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 /* System header to define __stub macros and hopefully few prototypes,
14996     which can conflict with char $ac_func(); below.  */
14997 #include <assert.h>
14998 /* Override any gcc2 internal prototype to avoid an error.  */
14999 /* We use char because int might match the return type of a gcc2
15000     builtin and then its argument prototype would still apply.  */
15001 char $ac_func();
15002 char (*f)();
15003
15004 int main() {
15005
15006 /* The GNU C library defines this for functions which it implements
15007     to always fail with ENOSYS.  Some functions are actually named
15008     something starting with __ and the normal name is an alias.  */
15009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15010 choke me
15011 #else
15012 f = $ac_func;
15013 #endif
15014
15015 ; return 0; }
15016 EOF
15017 if { (eval echo configure:15018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15018   rm -rf conftest*
15019   eval "ac_cv_func_$ac_func=yes"
15020 else
15021   echo "configure: failed program was:" >&5
15022   cat conftest.$ac_ext >&5
15023   rm -rf conftest*
15024   eval "ac_cv_func_$ac_func=no"
15025 fi
15026 rm -f conftest*
15027 fi
15028
15029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15030   echo "$ac_t""yes" 1>&6
15031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15032   cat >> confdefs.h <<EOF
15033 #define $ac_tr_func 1
15034 EOF
15035  
15036 else
15037   echo "$ac_t""no" 1>&6
15038 fi
15039 done
15040
15041
15042                         if test $ac_cv_func_sched_yield = no -a \
15043                                 $ac_cv_func_pthread_yield = no -a \
15044                                 $ac_cv_func_thr_yield = no ; then
15045                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15046 echo "configure:15047: checking for sched_yield in -lrt" >&5
15047 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15049   echo $ac_n "(cached) $ac_c" 1>&6
15050 else
15051   ac_save_LIBS="$LIBS"
15052 LIBS="-lrt  $LIBS"
15053 cat > conftest.$ac_ext <<EOF
15054 #line 15055 "configure"
15055 #include "confdefs.h"
15056 /* Override any gcc2 internal prototype to avoid an error.  */
15057 /* We use char because int might match the return type of a gcc2
15058     builtin and then its argument prototype would still apply.  */
15059 char sched_yield();
15060
15061 int main() {
15062 sched_yield()
15063 ; return 0; }
15064 EOF
15065 if { (eval echo configure:15066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15066   rm -rf conftest*
15067   eval "ac_cv_lib_$ac_lib_var=yes"
15068 else
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -rf conftest*
15072   eval "ac_cv_lib_$ac_lib_var=no"
15073 fi
15074 rm -f conftest*
15075 LIBS="$ac_save_LIBS"
15076
15077 fi
15078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15079   echo "$ac_t""yes" 1>&6
15080   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15081                                         cat >> confdefs.h <<\EOF
15082 #define HAVE_SCHED_YIELD 1
15083 EOF
15084
15085                                         ac_cv_func_sched_yield=yes
15086 else
15087   echo "$ac_t""no" 1>&6
15088 ac_cv_func_sched_yield=no
15089 fi
15090
15091                         fi
15092                         if test $ac_cv_func_sched_yield = no -a \
15093                                 $ac_cv_func_pthread_yield = no -a \
15094                                 "$ac_cv_func_thr_yield" = no ; then
15095                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15096                         fi
15097
15098                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15099 do
15100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15101 echo "configure:15102: checking for $ac_func" >&5
15102 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15103   echo $ac_n "(cached) $ac_c" 1>&6
15104 else
15105   cat > conftest.$ac_ext <<EOF
15106 #line 15107 "configure"
15107 #include "confdefs.h"
15108 /* System header to define __stub macros and hopefully few prototypes,
15109     which can conflict with char $ac_func(); below.  */
15110 #include <assert.h>
15111 /* Override any gcc2 internal prototype to avoid an error.  */
15112 /* We use char because int might match the return type of a gcc2
15113     builtin and then its argument prototype would still apply.  */
15114 char $ac_func();
15115 char (*f)();
15116
15117 int main() {
15118
15119 /* The GNU C library defines this for functions which it implements
15120     to always fail with ENOSYS.  Some functions are actually named
15121     something starting with __ and the normal name is an alias.  */
15122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15123 choke me
15124 #else
15125 f = $ac_func;
15126 #endif
15127
15128 ; return 0; }
15129 EOF
15130 if { (eval echo configure:15131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15131   rm -rf conftest*
15132   eval "ac_cv_func_$ac_func=yes"
15133 else
15134   echo "configure: failed program was:" >&5
15135   cat conftest.$ac_ext >&5
15136   rm -rf conftest*
15137   eval "ac_cv_func_$ac_func=no"
15138 fi
15139 rm -f conftest*
15140 fi
15141
15142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15143   echo "$ac_t""yes" 1>&6
15144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15145   cat >> confdefs.h <<EOF
15146 #define $ac_tr_func 1
15147 EOF
15148  
15149 else
15150   echo "$ac_t""no" 1>&6
15151 fi
15152 done
15153
15154
15155                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15156 echo "configure:15157: checking for pthread_detach with <pthread.h>" >&5
15157 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15158   echo $ac_n "(cached) $ac_c" 1>&6
15159 else
15160   
15161                                                                 cat > conftest.$ac_ext <<EOF
15162 #line 15163 "configure"
15163 #include "confdefs.h"
15164
15165 #include <pthread.h>
15166 #ifndef NULL
15167 #define NULL (void*)0
15168 #endif
15169
15170 int main() {
15171 pthread_detach(NULL);
15172 ; return 0; }
15173 EOF
15174 if { (eval echo configure:15175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15175   rm -rf conftest*
15176   ol_cv_func_pthread_detach=yes
15177 else
15178   echo "configure: failed program was:" >&5
15179   cat conftest.$ac_ext >&5
15180   rm -rf conftest*
15181   ol_cv_func_pthread_detach=no
15182 fi
15183 rm -f conftest*
15184                         
15185 fi
15186
15187 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15188
15189                         if test $ol_cv_func_pthread_detach = no ; then
15190                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15191                         fi
15192
15193                         cat >> confdefs.h <<\EOF
15194 #define HAVE_PTHREAD_DETACH 1
15195 EOF
15196
15197
15198                                                 for ac_func in \
15199                                 pthread_setconcurrency \
15200                                 pthread_getconcurrency \
15201                                 thr_setconcurrency \
15202                                 thr_getconcurrency \
15203                         
15204 do
15205 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15206 echo "configure:15207: checking for $ac_func" >&5
15207 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15208   echo $ac_n "(cached) $ac_c" 1>&6
15209 else
15210   cat > conftest.$ac_ext <<EOF
15211 #line 15212 "configure"
15212 #include "confdefs.h"
15213 /* System header to define __stub macros and hopefully few prototypes,
15214     which can conflict with char $ac_func(); below.  */
15215 #include <assert.h>
15216 /* Override any gcc2 internal prototype to avoid an error.  */
15217 /* We use char because int might match the return type of a gcc2
15218     builtin and then its argument prototype would still apply.  */
15219 char $ac_func();
15220 char (*f)();
15221
15222 int main() {
15223
15224 /* The GNU C library defines this for functions which it implements
15225     to always fail with ENOSYS.  Some functions are actually named
15226     something starting with __ and the normal name is an alias.  */
15227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15228 choke me
15229 #else
15230 f = $ac_func;
15231 #endif
15232
15233 ; return 0; }
15234 EOF
15235 if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15236   rm -rf conftest*
15237   eval "ac_cv_func_$ac_func=yes"
15238 else
15239   echo "configure: failed program was:" >&5
15240   cat conftest.$ac_ext >&5
15241   rm -rf conftest*
15242   eval "ac_cv_func_$ac_func=no"
15243 fi
15244 rm -f conftest*
15245 fi
15246
15247 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15248   echo "$ac_t""yes" 1>&6
15249     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15250   cat >> confdefs.h <<EOF
15251 #define $ac_tr_func 1
15252 EOF
15253  
15254 else
15255   echo "$ac_t""no" 1>&6
15256 fi
15257 done
15258
15259
15260                         
15261         for ac_func in pthread_kill_other_threads_np
15262 do
15263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15264 echo "configure:15265: checking for $ac_func" >&5
15265 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15266   echo $ac_n "(cached) $ac_c" 1>&6
15267 else
15268   cat > conftest.$ac_ext <<EOF
15269 #line 15270 "configure"
15270 #include "confdefs.h"
15271 /* System header to define __stub macros and hopefully few prototypes,
15272     which can conflict with char $ac_func(); below.  */
15273 #include <assert.h>
15274 /* Override any gcc2 internal prototype to avoid an error.  */
15275 /* We use char because int might match the return type of a gcc2
15276     builtin and then its argument prototype would still apply.  */
15277 char $ac_func();
15278 char (*f)();
15279
15280 int main() {
15281
15282 /* The GNU C library defines this for functions which it implements
15283     to always fail with ENOSYS.  Some functions are actually named
15284     something starting with __ and the normal name is an alias.  */
15285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15286 choke me
15287 #else
15288 f = $ac_func;
15289 #endif
15290
15291 ; return 0; }
15292 EOF
15293 if { (eval echo configure:15294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15294   rm -rf conftest*
15295   eval "ac_cv_func_$ac_func=yes"
15296 else
15297   echo "configure: failed program was:" >&5
15298   cat conftest.$ac_ext >&5
15299   rm -rf conftest*
15300   eval "ac_cv_func_$ac_func=no"
15301 fi
15302 rm -f conftest*
15303 fi
15304
15305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15306   echo "$ac_t""yes" 1>&6
15307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15308   cat >> confdefs.h <<EOF
15309 #define $ac_tr_func 1
15310 EOF
15311  
15312 else
15313   echo "$ac_t""no" 1>&6
15314 fi
15315 done
15316
15317         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15318 echo "configure:15319: checking for LinuxThreads implementation" >&5
15319 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15320   echo $ac_n "(cached) $ac_c" 1>&6
15321 else
15322   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15323 fi
15324
15325 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15326
15327                         
15328         
15329         
15330         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15331 echo "configure:15332: checking for LinuxThreads consistency" >&5
15332 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15333   echo $ac_n "(cached) $ac_c" 1>&6
15334 else
15335   
15336                 if test $ol_cv_header_linux_threads = yes -a \
15337                         $ol_cv_sys_linux_threads = yes; then
15338                         ol_cv_linux_threads=yes
15339                 elif test $ol_cv_header_linux_threads = no -a \
15340                         $ol_cv_sys_linux_threads = no; then
15341                         ol_cv_linux_threads=no
15342                 else
15343                         ol_cv_linux_threads=error
15344                 fi
15345         
15346 fi
15347
15348 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15349
15350
15351                         if test $ol_cv_linux_threads = error; then
15352                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15353                         fi
15354
15355                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15356 echo "configure:15357: checking if pthread_create() works" >&5
15357 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15358   echo $ac_n "(cached) $ac_c" 1>&6
15359 else
15360   
15361                         if test "$cross_compiling" = yes; then
15362                                 ol_cv_pthread_create_works=yes
15363 else
15364   cat > conftest.$ac_ext <<EOF
15365 #line 15366 "configure"
15366 #include "confdefs.h"
15367 /* pthread test headers */
15368 #include <pthread.h>
15369 #if HAVE_PTHREADS < 7
15370 #include <errno.h>
15371 #endif
15372 #ifndef NULL
15373 #define NULL (void*)0
15374 #endif
15375
15376 static void *task(p)
15377         void *p;
15378 {
15379         return (void *) (p == NULL);
15380 }
15381
15382
15383 int main(argc, argv)
15384         int argc;
15385         char **argv;
15386 {
15387
15388         /* pthread test function */
15389 #ifndef PTHREAD_CREATE_DETACHED
15390 #define PTHREAD_CREATE_DETACHED 1
15391 #endif
15392         pthread_t t;
15393         int status;
15394         int detach = PTHREAD_CREATE_DETACHED;
15395
15396 #if HAVE_PTHREADS > 4
15397         /* Final pthreads */
15398         pthread_attr_t attr;
15399
15400         status = pthread_attr_init(&attr);
15401         if( status ) return status;
15402
15403 #if HAVE_PTHREADS < 7
15404         status = pthread_attr_setdetachstate(&attr, &detach);
15405         if( status < 0 ) status = errno;
15406 #else
15407         status = pthread_attr_setdetachstate(&attr, detach);
15408 #endif
15409         if( status ) return status;
15410         status = pthread_create( &t, &attr, task, NULL );
15411 #if HAVE_PTHREADS < 7
15412         if( status < 0 ) status = errno;
15413 #endif
15414         if( status ) return status;
15415 #else
15416         /* Draft 4 pthreads */
15417         status = pthread_create( &t, pthread_attr_default, task, NULL );
15418         if( status ) return errno;
15419
15420         /* give thread a chance to complete */
15421         /* it should remain joinable and hence detachable */
15422         sleep( 1 );
15423
15424         status = pthread_detach( &t );
15425         if( status ) return errno;
15426 #endif
15427
15428 #ifdef HAVE_LINUX_THREADS
15429         pthread_kill_other_threads_np();
15430 #endif
15431
15432         return 0;
15433
15434 }
15435
15436 EOF
15437 if { (eval echo configure:15438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15438 then
15439   ol_cv_pthread_create_works=yes
15440 else
15441   echo "configure: failed program was:" >&5
15442   cat conftest.$ac_ext >&5
15443   rm -fr conftest*
15444   ol_cv_pthread_create_works=no
15445 fi
15446 rm -fr conftest*
15447 fi
15448
15449 fi
15450
15451 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15452
15453                         if test $ol_cv_pthread_create_works = no ; then
15454                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15455                         fi
15456
15457                                                 if test $ol_with_yielding_select = auto ; then
15458                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15459 echo "configure:15460: checking if select yields when using pthreads" >&5
15460 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15461   echo $ac_n "(cached) $ac_c" 1>&6
15462 else
15463   
15464                                 if test "$cross_compiling" = yes; then
15465   ol_cv_pthread_select_yields=cross
15466 else
15467   cat > conftest.$ac_ext <<EOF
15468 #line 15469 "configure"
15469 #include "confdefs.h"
15470
15471 #include <sys/types.h>
15472 #include <sys/time.h>
15473 #include <unistd.h>
15474 #include <pthread.h>
15475 #ifndef NULL
15476 #define NULL (void*) 0
15477 #endif
15478
15479 static int fildes[2];
15480
15481 static void *task(p)
15482         void *p;
15483 {
15484         int i;
15485         struct timeval tv;
15486
15487         fd_set rfds;
15488
15489         tv.tv_sec=10;
15490         tv.tv_usec=0;
15491
15492         FD_ZERO(&rfds);
15493         FD_SET(fildes[0], &rfds);
15494
15495         /* we're not interested in any fds */
15496         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15497
15498         if(i < 0) {
15499                 perror("select");
15500                 exit(10);
15501         }
15502
15503         exit(0); /* if we exit here, the select blocked the whole process */
15504 }
15505
15506 int main(argc, argv)
15507         int argc;
15508         char **argv;
15509 {
15510         pthread_t t;
15511
15512         /* create a pipe to select */
15513         if(pipe(&fildes[0])) {
15514                 perror("select");
15515                 exit(1);
15516         }
15517
15518 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15519         (void) pthread_setconcurrency(2);
15520 #else
15521 #ifdef HAVE_THR_SETCONCURRENCY
15522         /* Set Solaris LWP concurrency to 2 */
15523         thr_setconcurrency(2);
15524 #endif
15525 #endif
15526
15527 #if HAVE_PTHREADS < 6
15528         pthread_create(&t, pthread_attr_default, task, NULL);
15529 #else
15530         pthread_create(&t, NULL, task, NULL);
15531 #endif
15532
15533         /* make sure task runs first */
15534 #if HAVE_THR_YIELD
15535         thr_yield();
15536 #elif defined( HAVE_SCHED_YIELD )
15537         sched_yield();
15538 #elif defined( HAVE_PTHREAD_YIELD )
15539         pthread_yield();
15540 #endif
15541
15542         exit(2);
15543 }
15544 EOF
15545 if { (eval echo configure:15546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15546 then
15547   ol_cv_pthread_select_yields=no
15548 else
15549   echo "configure: failed program was:" >&5
15550   cat conftest.$ac_ext >&5
15551   rm -fr conftest*
15552   ol_cv_pthread_select_yields=yes
15553 fi
15554 rm -fr conftest*
15555 fi
15556
15557 fi
15558
15559 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15560
15561                                 if test $ol_cv_pthread_select_yields = cross ; then
15562                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15563                                 fi
15564
15565                                 if test $ol_cv_pthread_select_yields = yes ; then
15566                                         ol_with_yielding_select=yes
15567                                 fi
15568                         fi
15569
15570                                                 CPPFLAGS="$save_CPPFLAGS"
15571                         LIBS="$save_LIBS"
15572                 else
15573                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15574                 fi
15575         fi
15576
15577         if test $ol_with_threads = posix ; then
15578                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15579         fi
15580 fi
15581
15582 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15583         -o $ol_with_threads = mach ; then
15584
15585                 for ac_hdr in mach/cthreads.h cthreads.h
15586 do
15587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15588 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15589 echo "configure:15590: checking for $ac_hdr" >&5
15590 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15591   echo $ac_n "(cached) $ac_c" 1>&6
15592 else
15593   cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 #include <$ac_hdr>
15597 EOF
15598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15599 { (eval echo configure:15600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15601 if test -z "$ac_err"; then
15602   rm -rf conftest*
15603   eval "ac_cv_header_$ac_safe=yes"
15604 else
15605   echo "$ac_err" >&5
15606   echo "configure: failed program was:" >&5
15607   cat conftest.$ac_ext >&5
15608   rm -rf conftest*
15609   eval "ac_cv_header_$ac_safe=no"
15610 fi
15611 rm -f conftest*
15612 fi
15613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15614   echo "$ac_t""yes" 1>&6
15615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15616   cat >> confdefs.h <<EOF
15617 #define $ac_tr_hdr 1
15618 EOF
15619  
15620 else
15621   echo "$ac_t""no" 1>&6
15622 fi
15623 done
15624
15625         if test $ac_cv_header_mach_cthreads_h = yes ; then
15626                 ol_with_threads=found
15627
15628                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15629 echo "configure:15630: checking for cthread_fork" >&5
15630 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15631   echo $ac_n "(cached) $ac_c" 1>&6
15632 else
15633   cat > conftest.$ac_ext <<EOF
15634 #line 15635 "configure"
15635 #include "confdefs.h"
15636 /* System header to define __stub macros and hopefully few prototypes,
15637     which can conflict with char cthread_fork(); below.  */
15638 #include <assert.h>
15639 /* Override any gcc2 internal prototype to avoid an error.  */
15640 /* We use char because int might match the return type of a gcc2
15641     builtin and then its argument prototype would still apply.  */
15642 char cthread_fork();
15643 char (*f)();
15644
15645 int main() {
15646
15647 /* The GNU C library defines this for functions which it implements
15648     to always fail with ENOSYS.  Some functions are actually named
15649     something starting with __ and the normal name is an alias.  */
15650 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15651 choke me
15652 #else
15653 f = cthread_fork;
15654 #endif
15655
15656 ; return 0; }
15657 EOF
15658 if { (eval echo configure:15659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15659   rm -rf conftest*
15660   eval "ac_cv_func_cthread_fork=yes"
15661 else
15662   echo "configure: failed program was:" >&5
15663   cat conftest.$ac_ext >&5
15664   rm -rf conftest*
15665   eval "ac_cv_func_cthread_fork=no"
15666 fi
15667 rm -f conftest*
15668 fi
15669
15670 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15671   echo "$ac_t""yes" 1>&6
15672   ol_link_threads=yes
15673 else
15674   echo "$ac_t""no" 1>&6
15675 fi
15676
15677
15678                 if test $ol_link_threads = no ; then
15679                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15680 echo "configure:15681: checking for cthread_fork with -all_load" >&5
15681 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15682   echo $ac_n "(cached) $ac_c" 1>&6
15683 else
15684   
15685                                                                 save_LIBS="$LIBS"
15686                                 LIBS="-all_load $LIBS"
15687                                 cat > conftest.$ac_ext <<EOF
15688 #line 15689 "configure"
15689 #include "confdefs.h"
15690 #include <mach/cthreads.h>
15691 int main() {
15692
15693                                         cthread_fork((void *)0, (void *)0);
15694                                         
15695 ; return 0; }
15696 EOF
15697 if { (eval echo configure:15698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15698   rm -rf conftest*
15699   ol_cv_cthread_all_load=yes
15700 else
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   ol_cv_cthread_all_load=no
15705 fi
15706 rm -f conftest*
15707                                                                 LIBS="$save_LIBS"
15708                         
15709 fi
15710
15711 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15712
15713                         if test $ol_cv_cthread_all_load = yes ; then
15714                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15715                                 ol_link_threads=mach
15716                                 ol_with_threads=found
15717                         fi
15718                 fi
15719
15720         elif test $ac_cv_header_cthreads_h = yes ; then
15721                                 
15722                 ol_with_threads=found
15723  
15724                                 save_LIBS="$LIBS"
15725                 LIBS="$LIBS -lthreads"
15726                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15727 echo "configure:15728: checking for cthread_fork" >&5
15728 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15729   echo $ac_n "(cached) $ac_c" 1>&6
15730 else
15731   cat > conftest.$ac_ext <<EOF
15732 #line 15733 "configure"
15733 #include "confdefs.h"
15734 /* System header to define __stub macros and hopefully few prototypes,
15735     which can conflict with char cthread_fork(); below.  */
15736 #include <assert.h>
15737 /* Override any gcc2 internal prototype to avoid an error.  */
15738 /* We use char because int might match the return type of a gcc2
15739     builtin and then its argument prototype would still apply.  */
15740 char cthread_fork();
15741 char (*f)();
15742
15743 int main() {
15744
15745 /* The GNU C library defines this for functions which it implements
15746     to always fail with ENOSYS.  Some functions are actually named
15747     something starting with __ and the normal name is an alias.  */
15748 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15749 choke me
15750 #else
15751 f = cthread_fork;
15752 #endif
15753
15754 ; return 0; }
15755 EOF
15756 if { (eval echo configure:15757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15757   rm -rf conftest*
15758   eval "ac_cv_func_cthread_fork=yes"
15759 else
15760   echo "configure: failed program was:" >&5
15761   cat conftest.$ac_ext >&5
15762   rm -rf conftest*
15763   eval "ac_cv_func_cthread_fork=no"
15764 fi
15765 rm -f conftest*
15766 fi
15767
15768 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15769   echo "$ac_t""yes" 1>&6
15770   ol_link_threads=yes
15771 else
15772   echo "$ac_t""no" 1>&6
15773 fi
15774
15775                 LIBS="$save_LIBS"
15776
15777                 if test $ol_link_threads = yes ; then
15778                         LTHREAD_LIBS="-lthreads"
15779                         ol_link_threads=mach
15780                         ol_with_threads=found
15781                 else
15782                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15783                 fi
15784
15785         elif test $ol_with_threads = mach ; then
15786                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15787         fi
15788
15789         if test $ol_link_threads = mach ; then
15790                 cat >> confdefs.h <<\EOF
15791 #define HAVE_MACH_CTHREADS 1
15792 EOF
15793
15794         elif test $ol_with_threads = found ; then
15795                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15796         fi
15797 fi
15798
15799 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15800         -o $ol_with_threads = pth ; then
15801
15802         for ac_hdr in pth.h
15803 do
15804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15806 echo "configure:15807: checking for $ac_hdr" >&5
15807 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15808   echo $ac_n "(cached) $ac_c" 1>&6
15809 else
15810   cat > conftest.$ac_ext <<EOF
15811 #line 15812 "configure"
15812 #include "confdefs.h"
15813 #include <$ac_hdr>
15814 EOF
15815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15816 { (eval echo configure:15817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15818 if test -z "$ac_err"; then
15819   rm -rf conftest*
15820   eval "ac_cv_header_$ac_safe=yes"
15821 else
15822   echo "$ac_err" >&5
15823   echo "configure: failed program was:" >&5
15824   cat conftest.$ac_ext >&5
15825   rm -rf conftest*
15826   eval "ac_cv_header_$ac_safe=no"
15827 fi
15828 rm -f conftest*
15829 fi
15830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15831   echo "$ac_t""yes" 1>&6
15832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15833   cat >> confdefs.h <<EOF
15834 #define $ac_tr_hdr 1
15835 EOF
15836  
15837 else
15838   echo "$ac_t""no" 1>&6
15839 fi
15840 done
15841
15842
15843         if test $ac_cv_header_pth_h = yes ; then
15844                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15845 echo "configure:15846: checking for pth_version in -lpth" >&5
15846 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15848   echo $ac_n "(cached) $ac_c" 1>&6
15849 else
15850   ac_save_LIBS="$LIBS"
15851 LIBS="-lpth  $LIBS"
15852 cat > conftest.$ac_ext <<EOF
15853 #line 15854 "configure"
15854 #include "confdefs.h"
15855 /* Override any gcc2 internal prototype to avoid an error.  */
15856 /* We use char because int might match the return type of a gcc2
15857     builtin and then its argument prototype would still apply.  */
15858 char pth_version();
15859
15860 int main() {
15861 pth_version()
15862 ; return 0; }
15863 EOF
15864 if { (eval echo configure:15865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15865   rm -rf conftest*
15866   eval "ac_cv_lib_$ac_lib_var=yes"
15867 else
15868   echo "configure: failed program was:" >&5
15869   cat conftest.$ac_ext >&5
15870   rm -rf conftest*
15871   eval "ac_cv_lib_$ac_lib_var=no"
15872 fi
15873 rm -f conftest*
15874 LIBS="$ac_save_LIBS"
15875
15876 fi
15877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15878   echo "$ac_t""yes" 1>&6
15879   have_pth=yes
15880 else
15881   echo "$ac_t""no" 1>&6
15882 have_pth=no
15883 fi
15884
15885
15886                 if test $have_pth = yes ; then
15887                         cat >> confdefs.h <<\EOF
15888 #define HAVE_GNU_PTH 1
15889 EOF
15890
15891                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15892                         ol_link_threads=pth
15893                         ol_with_threads=found
15894
15895                         if test $ol_with_yielding_select = auto ; then
15896                                 ol_with_yielding_select=yes
15897                         fi
15898                 fi
15899         fi
15900 fi
15901
15902 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15903         -o $ol_with_threads = lwp ; then
15904
15905                 for ac_hdr in thread.h synch.h
15906 do
15907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15909 echo "configure:15910: checking for $ac_hdr" >&5
15910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15911   echo $ac_n "(cached) $ac_c" 1>&6
15912 else
15913   cat > conftest.$ac_ext <<EOF
15914 #line 15915 "configure"
15915 #include "confdefs.h"
15916 #include <$ac_hdr>
15917 EOF
15918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15919 { (eval echo configure:15920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15921 if test -z "$ac_err"; then
15922   rm -rf conftest*
15923   eval "ac_cv_header_$ac_safe=yes"
15924 else
15925   echo "$ac_err" >&5
15926   echo "configure: failed program was:" >&5
15927   cat conftest.$ac_ext >&5
15928   rm -rf conftest*
15929   eval "ac_cv_header_$ac_safe=no"
15930 fi
15931 rm -f conftest*
15932 fi
15933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15934   echo "$ac_t""yes" 1>&6
15935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15936   cat >> confdefs.h <<EOF
15937 #define $ac_tr_hdr 1
15938 EOF
15939  
15940 else
15941   echo "$ac_t""no" 1>&6
15942 fi
15943 done
15944
15945         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15946                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15947 echo "configure:15948: checking for thr_create in -lthread" >&5
15948 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15950   echo $ac_n "(cached) $ac_c" 1>&6
15951 else
15952   ac_save_LIBS="$LIBS"
15953 LIBS="-lthread  $LIBS"
15954 cat > conftest.$ac_ext <<EOF
15955 #line 15956 "configure"
15956 #include "confdefs.h"
15957 /* Override any gcc2 internal prototype to avoid an error.  */
15958 /* We use char because int might match the return type of a gcc2
15959     builtin and then its argument prototype would still apply.  */
15960 char thr_create();
15961
15962 int main() {
15963 thr_create()
15964 ; return 0; }
15965 EOF
15966 if { (eval echo configure:15967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15967   rm -rf conftest*
15968   eval "ac_cv_lib_$ac_lib_var=yes"
15969 else
15970   echo "configure: failed program was:" >&5
15971   cat conftest.$ac_ext >&5
15972   rm -rf conftest*
15973   eval "ac_cv_lib_$ac_lib_var=no"
15974 fi
15975 rm -f conftest*
15976 LIBS="$ac_save_LIBS"
15977
15978 fi
15979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15980   echo "$ac_t""yes" 1>&6
15981   have_thr=yes
15982 else
15983   echo "$ac_t""no" 1>&6
15984 have_thr=no
15985 fi
15986
15987
15988                 if test $have_thr = yes ; then
15989                         cat >> confdefs.h <<\EOF
15990 #define HAVE_THR 1
15991 EOF
15992
15993                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15994                         ol_link_threads=thr
15995
15996                         if test $ol_with_yielding_select = auto ; then
15997                                 ol_with_yielding_select=yes
15998                         fi
15999
16000                                                 for ac_func in \
16001                                 thr_setconcurrency \
16002                                 thr_getconcurrency \
16003                         
16004 do
16005 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16006 echo "configure:16007: checking for $ac_func" >&5
16007 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16008   echo $ac_n "(cached) $ac_c" 1>&6
16009 else
16010   cat > conftest.$ac_ext <<EOF
16011 #line 16012 "configure"
16012 #include "confdefs.h"
16013 /* System header to define __stub macros and hopefully few prototypes,
16014     which can conflict with char $ac_func(); below.  */
16015 #include <assert.h>
16016 /* Override any gcc2 internal prototype to avoid an error.  */
16017 /* We use char because int might match the return type of a gcc2
16018     builtin and then its argument prototype would still apply.  */
16019 char $ac_func();
16020 char (*f)();
16021
16022 int main() {
16023
16024 /* The GNU C library defines this for functions which it implements
16025     to always fail with ENOSYS.  Some functions are actually named
16026     something starting with __ and the normal name is an alias.  */
16027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16028 choke me
16029 #else
16030 f = $ac_func;
16031 #endif
16032
16033 ; return 0; }
16034 EOF
16035 if { (eval echo configure:16036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16036   rm -rf conftest*
16037   eval "ac_cv_func_$ac_func=yes"
16038 else
16039   echo "configure: failed program was:" >&5
16040   cat conftest.$ac_ext >&5
16041   rm -rf conftest*
16042   eval "ac_cv_func_$ac_func=no"
16043 fi
16044 rm -f conftest*
16045 fi
16046
16047 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16048   echo "$ac_t""yes" 1>&6
16049     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16050   cat >> confdefs.h <<EOF
16051 #define $ac_tr_func 1
16052 EOF
16053  
16054 else
16055   echo "$ac_t""no" 1>&6
16056 fi
16057 done
16058
16059                 fi
16060         fi
16061
16062                 for ac_hdr in lwp/lwp.h
16063 do
16064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16066 echo "configure:16067: checking for $ac_hdr" >&5
16067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16068   echo $ac_n "(cached) $ac_c" 1>&6
16069 else
16070   cat > conftest.$ac_ext <<EOF
16071 #line 16072 "configure"
16072 #include "confdefs.h"
16073 #include <$ac_hdr>
16074 EOF
16075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16076 { (eval echo configure:16077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16078 if test -z "$ac_err"; then
16079   rm -rf conftest*
16080   eval "ac_cv_header_$ac_safe=yes"
16081 else
16082   echo "$ac_err" >&5
16083   echo "configure: failed program was:" >&5
16084   cat conftest.$ac_ext >&5
16085   rm -rf conftest*
16086   eval "ac_cv_header_$ac_safe=no"
16087 fi
16088 rm -f conftest*
16089 fi
16090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16091   echo "$ac_t""yes" 1>&6
16092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16093   cat >> confdefs.h <<EOF
16094 #define $ac_tr_hdr 1
16095 EOF
16096  
16097 else
16098   echo "$ac_t""no" 1>&6
16099 fi
16100 done
16101
16102         if test $ac_cv_header_lwp_lwp_h = yes ; then
16103                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16104 echo "configure:16105: checking for lwp_create in -llwp" >&5
16105 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16107   echo $ac_n "(cached) $ac_c" 1>&6
16108 else
16109   ac_save_LIBS="$LIBS"
16110 LIBS="-llwp  $LIBS"
16111 cat > conftest.$ac_ext <<EOF
16112 #line 16113 "configure"
16113 #include "confdefs.h"
16114 /* Override any gcc2 internal prototype to avoid an error.  */
16115 /* We use char because int might match the return type of a gcc2
16116     builtin and then its argument prototype would still apply.  */
16117 char lwp_create();
16118
16119 int main() {
16120 lwp_create()
16121 ; return 0; }
16122 EOF
16123 if { (eval echo configure:16124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16124   rm -rf conftest*
16125   eval "ac_cv_lib_$ac_lib_var=yes"
16126 else
16127   echo "configure: failed program was:" >&5
16128   cat conftest.$ac_ext >&5
16129   rm -rf conftest*
16130   eval "ac_cv_lib_$ac_lib_var=no"
16131 fi
16132 rm -f conftest*
16133 LIBS="$ac_save_LIBS"
16134
16135 fi
16136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16137   echo "$ac_t""yes" 1>&6
16138   have_lwp=yes
16139 else
16140   echo "$ac_t""no" 1>&6
16141 have_lwp=no
16142 fi
16143
16144
16145                 if test $have_lwp = yes ; then
16146                         cat >> confdefs.h <<\EOF
16147 #define HAVE_LWP 1
16148 EOF
16149
16150                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16151                         ol_link_threads=lwp
16152
16153                         if test $ol_with_yielding_select = auto ; then
16154                                 ol_with_yielding_select=no
16155                         fi
16156                 fi
16157         fi
16158 fi
16159
16160 if test $ol_with_yielding_select = yes ; then
16161         cat >> confdefs.h <<\EOF
16162 #define HAVE_YIELDING_SELECT 1
16163 EOF
16164
16165 fi
16166
16167 if test $ol_with_threads = manual ; then
16168                 ol_link_threads=yes
16169
16170         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16171
16172         for ac_hdr in pthread.h sched.h
16173 do
16174 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16175 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16176 echo "configure:16177: checking for $ac_hdr" >&5
16177 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16178   echo $ac_n "(cached) $ac_c" 1>&6
16179 else
16180   cat > conftest.$ac_ext <<EOF
16181 #line 16182 "configure"
16182 #include "confdefs.h"
16183 #include <$ac_hdr>
16184 EOF
16185 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16186 { (eval echo configure:16187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16187 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16188 if test -z "$ac_err"; then
16189   rm -rf conftest*
16190   eval "ac_cv_header_$ac_safe=yes"
16191 else
16192   echo "$ac_err" >&5
16193   echo "configure: failed program was:" >&5
16194   cat conftest.$ac_ext >&5
16195   rm -rf conftest*
16196   eval "ac_cv_header_$ac_safe=no"
16197 fi
16198 rm -f conftest*
16199 fi
16200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16201   echo "$ac_t""yes" 1>&6
16202     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16203   cat >> confdefs.h <<EOF
16204 #define $ac_tr_hdr 1
16205 EOF
16206  
16207 else
16208   echo "$ac_t""no" 1>&6
16209 fi
16210 done
16211
16212         for ac_func in sched_yield pthread_yield
16213 do
16214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16215 echo "configure:16216: checking for $ac_func" >&5
16216 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16217   echo $ac_n "(cached) $ac_c" 1>&6
16218 else
16219   cat > conftest.$ac_ext <<EOF
16220 #line 16221 "configure"
16221 #include "confdefs.h"
16222 /* System header to define __stub macros and hopefully few prototypes,
16223     which can conflict with char $ac_func(); below.  */
16224 #include <assert.h>
16225 /* Override any gcc2 internal prototype to avoid an error.  */
16226 /* We use char because int might match the return type of a gcc2
16227     builtin and then its argument prototype would still apply.  */
16228 char $ac_func();
16229 char (*f)();
16230
16231 int main() {
16232
16233 /* The GNU C library defines this for functions which it implements
16234     to always fail with ENOSYS.  Some functions are actually named
16235     something starting with __ and the normal name is an alias.  */
16236 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16237 choke me
16238 #else
16239 f = $ac_func;
16240 #endif
16241
16242 ; return 0; }
16243 EOF
16244 if { (eval echo configure:16245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16245   rm -rf conftest*
16246   eval "ac_cv_func_$ac_func=yes"
16247 else
16248   echo "configure: failed program was:" >&5
16249   cat conftest.$ac_ext >&5
16250   rm -rf conftest*
16251   eval "ac_cv_func_$ac_func=no"
16252 fi
16253 rm -f conftest*
16254 fi
16255
16256 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16257   echo "$ac_t""yes" 1>&6
16258     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16259   cat >> confdefs.h <<EOF
16260 #define $ac_tr_func 1
16261 EOF
16262  
16263 else
16264   echo "$ac_t""no" 1>&6
16265 fi
16266 done
16267
16268         
16269         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16270 echo "configure:16271: checking for LinuxThreads pthread.h" >&5
16271 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16272   echo $ac_n "(cached) $ac_c" 1>&6
16273 else
16274   cat > conftest.$ac_ext <<EOF
16275 #line 16276 "configure"
16276 #include "confdefs.h"
16277 #include <pthread.h>
16278 EOF
16279 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16280   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16281   rm -rf conftest*
16282   ol_cv_header_linux_threads=yes
16283 else
16284   rm -rf conftest*
16285   ol_cv_header_linux_threads=no
16286 fi
16287 rm -f conftest*
16288
16289                 
16290 fi
16291
16292 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16293         if test $ol_cv_header_linux_threads = yes; then
16294                 cat >> confdefs.h <<\EOF
16295 #define HAVE_LINUX_THREADS 1
16296 EOF
16297
16298         fi
16299
16300
16301         for ac_hdr in mach/cthreads.h
16302 do
16303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16305 echo "configure:16306: checking for $ac_hdr" >&5
16306 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16307   echo $ac_n "(cached) $ac_c" 1>&6
16308 else
16309   cat > conftest.$ac_ext <<EOF
16310 #line 16311 "configure"
16311 #include "confdefs.h"
16312 #include <$ac_hdr>
16313 EOF
16314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16315 { (eval echo configure:16316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16317 if test -z "$ac_err"; then
16318   rm -rf conftest*
16319   eval "ac_cv_header_$ac_safe=yes"
16320 else
16321   echo "$ac_err" >&5
16322   echo "configure: failed program was:" >&5
16323   cat conftest.$ac_ext >&5
16324   rm -rf conftest*
16325   eval "ac_cv_header_$ac_safe=no"
16326 fi
16327 rm -f conftest*
16328 fi
16329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16330   echo "$ac_t""yes" 1>&6
16331     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16332   cat >> confdefs.h <<EOF
16333 #define $ac_tr_hdr 1
16334 EOF
16335  
16336 else
16337   echo "$ac_t""no" 1>&6
16338 fi
16339 done
16340
16341         for ac_hdr in lwp/lwp.h
16342 do
16343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16345 echo "configure:16346: checking for $ac_hdr" >&5
16346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16347   echo $ac_n "(cached) $ac_c" 1>&6
16348 else
16349   cat > conftest.$ac_ext <<EOF
16350 #line 16351 "configure"
16351 #include "confdefs.h"
16352 #include <$ac_hdr>
16353 EOF
16354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16355 { (eval echo configure:16356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16357 if test -z "$ac_err"; then
16358   rm -rf conftest*
16359   eval "ac_cv_header_$ac_safe=yes"
16360 else
16361   echo "$ac_err" >&5
16362   echo "configure: failed program was:" >&5
16363   cat conftest.$ac_ext >&5
16364   rm -rf conftest*
16365   eval "ac_cv_header_$ac_safe=no"
16366 fi
16367 rm -f conftest*
16368 fi
16369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16370   echo "$ac_t""yes" 1>&6
16371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16372   cat >> confdefs.h <<EOF
16373 #define $ac_tr_hdr 1
16374 EOF
16375  
16376 else
16377   echo "$ac_t""no" 1>&6
16378 fi
16379 done
16380
16381         for ac_hdr in thread.h synch.h
16382 do
16383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16385 echo "configure:16386: checking for $ac_hdr" >&5
16386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16387   echo $ac_n "(cached) $ac_c" 1>&6
16388 else
16389   cat > conftest.$ac_ext <<EOF
16390 #line 16391 "configure"
16391 #include "confdefs.h"
16392 #include <$ac_hdr>
16393 EOF
16394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16395 { (eval echo configure:16396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16397 if test -z "$ac_err"; then
16398   rm -rf conftest*
16399   eval "ac_cv_header_$ac_safe=yes"
16400 else
16401   echo "$ac_err" >&5
16402   echo "configure: failed program was:" >&5
16403   cat conftest.$ac_ext >&5
16404   rm -rf conftest*
16405   eval "ac_cv_header_$ac_safe=no"
16406 fi
16407 rm -f conftest*
16408 fi
16409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16410   echo "$ac_t""yes" 1>&6
16411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16412   cat >> confdefs.h <<EOF
16413 #define $ac_tr_hdr 1
16414 EOF
16415  
16416 else
16417   echo "$ac_t""no" 1>&6
16418 fi
16419 done
16420
16421 fi
16422
16423 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16424                         cat >> confdefs.h <<\EOF
16425 #define REENTRANT 1
16426 EOF
16427
16428         cat >> confdefs.h <<\EOF
16429 #define _REENTRANT 1
16430 EOF
16431
16432         cat >> confdefs.h <<\EOF
16433 #define THREAD_SAFE 1
16434 EOF
16435
16436         cat >> confdefs.h <<\EOF
16437 #define _THREAD_SAFE 1
16438 EOF
16439
16440         cat >> confdefs.h <<\EOF
16441 #define THREADSAFE 1
16442 EOF
16443
16444         cat >> confdefs.h <<\EOF
16445 #define _THREADSAFE 1
16446 EOF
16447
16448         cat >> confdefs.h <<\EOF
16449 #define _SGI_MP_SOURCE 1
16450 EOF
16451
16452
16453                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16454 echo "configure:16455: checking for thread specific errno" >&5
16455 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16456   echo $ac_n "(cached) $ac_c" 1>&6
16457 else
16458   
16459                 cat > conftest.$ac_ext <<EOF
16460 #line 16461 "configure"
16461 #include "confdefs.h"
16462 #include <errno.h>
16463 int main() {
16464 errno = 0;
16465 ; return 0; }
16466 EOF
16467 if { (eval echo configure:16468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16468   rm -rf conftest*
16469   ol_cv_errno_thread_specific=yes
16470 else
16471   echo "configure: failed program was:" >&5
16472   cat conftest.$ac_ext >&5
16473   rm -rf conftest*
16474   ol_cv_errno_thread_specific=no
16475 fi
16476 rm -f conftest*
16477         
16478 fi
16479
16480 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16481
16482                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16483 echo "configure:16484: checking for thread specific h_errno" >&5
16484 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16485   echo $ac_n "(cached) $ac_c" 1>&6
16486 else
16487   
16488                 cat > conftest.$ac_ext <<EOF
16489 #line 16490 "configure"
16490 #include "confdefs.h"
16491 #include <netdb.h>
16492 int main() {
16493 h_errno = 0;
16494 ; return 0; }
16495 EOF
16496 if { (eval echo configure:16497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16497   rm -rf conftest*
16498   ol_cv_h_errno_thread_specific=yes
16499 else
16500   echo "configure: failed program was:" >&5
16501   cat conftest.$ac_ext >&5
16502   rm -rf conftest*
16503   ol_cv_h_errno_thread_specific=no
16504 fi
16505 rm -f conftest*
16506         
16507 fi
16508
16509 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16510
16511         if test $ol_cv_errno_thread_specific != yes \
16512                 -o $ol_cv_h_errno_thread_specific != yes ; then
16513                 LIBS="$LTHREAD_LIBS $LIBS"
16514                 LTHREAD_LIBS=""
16515         fi
16516
16517 fi  
16518
16519 if test $ol_link_threads = no ; then
16520         if test $ol_with_threads = yes ; then
16521                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16522         fi
16523
16524         if test $ol_with_threads = auto ; then
16525                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16526                 ol_with_threads=no
16527         fi
16528
16529         cat >> confdefs.h <<\EOF
16530 #define NO_THREADS 1
16531 EOF
16532
16533         LTHREAD_LIBS=""
16534 fi
16535
16536 if test $ol_link_threads != no ; then
16537         cat >> confdefs.h <<\EOF
16538 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16539 EOF
16540
16541 fi
16542
16543 for ac_func in \
16544         ctime_r                 \
16545         gethostbyname_r gethostbyaddr_r \
16546
16547 do
16548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16549 echo "configure:16550: checking for $ac_func" >&5
16550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16551   echo $ac_n "(cached) $ac_c" 1>&6
16552 else
16553   cat > conftest.$ac_ext <<EOF
16554 #line 16555 "configure"
16555 #include "confdefs.h"
16556 /* System header to define __stub macros and hopefully few prototypes,
16557     which can conflict with char $ac_func(); below.  */
16558 #include <assert.h>
16559 /* Override any gcc2 internal prototype to avoid an error.  */
16560 /* We use char because int might match the return type of a gcc2
16561     builtin and then its argument prototype would still apply.  */
16562 char $ac_func();
16563 char (*f)();
16564
16565 int main() {
16566
16567 /* The GNU C library defines this for functions which it implements
16568     to always fail with ENOSYS.  Some functions are actually named
16569     something starting with __ and the normal name is an alias.  */
16570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16571 choke me
16572 #else
16573 f = $ac_func;
16574 #endif
16575
16576 ; return 0; }
16577 EOF
16578 if { (eval echo configure:16579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16579   rm -rf conftest*
16580   eval "ac_cv_func_$ac_func=yes"
16581 else
16582   echo "configure: failed program was:" >&5
16583   cat conftest.$ac_ext >&5
16584   rm -rf conftest*
16585   eval "ac_cv_func_$ac_func=no"
16586 fi
16587 rm -f conftest*
16588 fi
16589
16590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16591   echo "$ac_t""yes" 1>&6
16592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16593   cat >> confdefs.h <<EOF
16594 #define $ac_tr_func 1
16595 EOF
16596  
16597 else
16598   echo "$ac_t""no" 1>&6
16599 fi
16600 done
16601
16602
16603 if test "$ac_cv_func_ctime_r" = no ; then
16604         ol_cv_func_ctime_r_nargs=0
16605 else
16606         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16607 echo "configure:16608: checking number of arguments of ctime_r" >&5
16608 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16609   echo $ac_n "(cached) $ac_c" 1>&6
16610 else
16611   cat > conftest.$ac_ext <<EOF
16612 #line 16613 "configure"
16613 #include "confdefs.h"
16614 #include <time.h>
16615 int main() {
16616 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16617 ; return 0; }
16618 EOF
16619 if { (eval echo configure:16620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16620   rm -rf conftest*
16621   ol_cv_func_ctime_r_nargs3=yes
16622 else
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   ol_cv_func_ctime_r_nargs3=no
16627 fi
16628 rm -f conftest*
16629
16630         cat > conftest.$ac_ext <<EOF
16631 #line 16632 "configure"
16632 #include "confdefs.h"
16633 #include <time.h>
16634 int main() {
16635 time_t ti; char *buffer; ctime_r(&ti,buffer);
16636 ; return 0; }
16637 EOF
16638 if { (eval echo configure:16639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16639   rm -rf conftest*
16640   ol_cv_func_ctime_r_nargs2=yes
16641 else
16642   echo "configure: failed program was:" >&5
16643   cat conftest.$ac_ext >&5
16644   rm -rf conftest*
16645   ol_cv_func_ctime_r_nargs2=no
16646 fi
16647 rm -f conftest*
16648
16649         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16650                 $ol_cv_func_ctime_r_nargs2 = no ; then
16651
16652                 ol_cv_func_ctime_r_nargs=3
16653
16654         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16655                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16656
16657                 ol_cv_func_ctime_r_nargs=2
16658
16659         else
16660                 ol_cv_func_ctime_r_nargs=0
16661         fi
16662   
16663 fi
16664
16665 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16666
16667   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16668         cat >> confdefs.h <<EOF
16669 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16670 EOF
16671
16672   fi
16673
16674 fi
16675
16676 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16677         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16678 echo "configure:16679: checking number of arguments of gethostbyname_r" >&5
16679 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16680   echo $ac_n "(cached) $ac_c" 1>&6
16681 else
16682   cat > conftest.$ac_ext <<EOF
16683 #line 16684 "configure"
16684 #include "confdefs.h"
16685 #include <sys/types.h>
16686 #include <sys/socket.h>
16687 #include <netinet/in.h>
16688 #include <netdb.h>
16689 #define BUFSIZE (sizeof(struct hostent)+10)
16690 int main() {
16691 struct hostent hent; char buffer[BUFSIZE];
16692                 int bufsize=BUFSIZE;int h_errno;
16693                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16694                         buffer, bufsize, &h_errno);
16695 ; return 0; }
16696 EOF
16697 if { (eval echo configure:16698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16698   rm -rf conftest*
16699   ol_cv_func_gethostbyname_r_nargs5=yes
16700 else
16701   echo "configure: failed program was:" >&5
16702   cat conftest.$ac_ext >&5
16703   rm -rf conftest*
16704   ol_cv_func_gethostbyname_r_nargs5=no
16705 fi
16706 rm -f conftest*
16707
16708         cat > conftest.$ac_ext <<EOF
16709 #line 16710 "configure"
16710 #include "confdefs.h"
16711 #include <sys/types.h>
16712 #include <sys/socket.h>
16713 #include <netinet/in.h>
16714 #include <netdb.h>
16715 #define BUFSIZE (sizeof(struct hostent)+10)
16716 int main() {
16717 struct hostent hent;struct hostent *rhent;
16718                 char buffer[BUFSIZE];
16719                 int bufsize=BUFSIZE;int h_errno;
16720                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16721                         &rhent, &h_errno);
16722 ; return 0; }
16723 EOF
16724 if { (eval echo configure:16725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16725   rm -rf conftest*
16726   ol_cv_func_gethostbyname_r_nargs6=yes
16727 else
16728   echo "configure: failed program was:" >&5
16729   cat conftest.$ac_ext >&5
16730   rm -rf conftest*
16731   ol_cv_func_gethostbyname_r_nargs6=no
16732 fi
16733 rm -f conftest*
16734
16735         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16736                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16737
16738                 ol_cv_func_gethostbyname_r_nargs=5
16739
16740         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16741                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16742
16743                 ol_cv_func_gethostbyname_r_nargs=6
16744
16745         else
16746                 ol_cv_func_gethostbyname_r_nargs=0
16747         fi
16748   
16749 fi
16750
16751 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16752   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16753         cat >> confdefs.h <<EOF
16754 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16755 EOF
16756
16757   fi
16758
16759 else
16760         ol_cv_func_gethostbyname_r_nargs=0
16761 fi
16762  
16763 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16764         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16765 echo "configure:16766: checking number of arguments of gethostbyaddr_r" >&5
16766 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16767   echo $ac_n "(cached) $ac_c" 1>&6
16768 else
16769   cat > conftest.$ac_ext <<EOF
16770 #line 16771 "configure"
16771 #include "confdefs.h"
16772 #include <sys/types.h>
16773 #include <sys/socket.h>
16774 #include <netinet/in.h>
16775 #include <netdb.h>
16776 #define BUFSIZE (sizeof(struct hostent)+10)
16777 int main() {
16778 struct hostent hent; char buffer[BUFSIZE]; 
16779             struct in_addr add;
16780             size_t alen=sizeof(struct in_addr);
16781             int bufsize=BUFSIZE;int h_errno;
16782                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16783                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16784 ; return 0; }
16785 EOF
16786 if { (eval echo configure:16787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16787   rm -rf conftest*
16788   ol_cv_func_gethostbyaddr_r_nargs7=yes
16789 else
16790   echo "configure: failed program was:" >&5
16791   cat conftest.$ac_ext >&5
16792   rm -rf conftest*
16793   ol_cv_func_gethostbyaddr_r_nargs7=no
16794 fi
16795 rm -f conftest*
16796
16797         cat > conftest.$ac_ext <<EOF
16798 #line 16799 "configure"
16799 #include "confdefs.h"
16800 #include <sys/types.h>
16801 #include <sys/socket.h>
16802 #include <netinet/in.h>
16803 #include <netdb.h>
16804 #define BUFSIZE (sizeof(struct hostent)+10)
16805 int main() {
16806 struct hostent hent;
16807                 struct hostent *rhent; char buffer[BUFSIZE]; 
16808                 struct in_addr add;
16809                 size_t alen=sizeof(struct in_addr);
16810                 int bufsize=BUFSIZE;int h_errno;
16811                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16812                         alen, AF_INET, &hent, buffer, bufsize, 
16813                         &rhent, &h_errno);
16814 ; return 0; }
16815 EOF
16816 if { (eval echo configure:16817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16817   rm -rf conftest*
16818   ol_cv_func_gethostbyaddr_r_nargs8=yes
16819 else
16820   echo "configure: failed program was:" >&5
16821   cat conftest.$ac_ext >&5
16822   rm -rf conftest*
16823   ol_cv_func_gethostbyaddr_r_nargs8=no
16824 fi
16825 rm -f conftest*
16826
16827         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16828                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16829
16830                 ol_cv_func_gethostbyaddr_r_nargs=7
16831
16832         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16833                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16834
16835                 ol_cv_func_gethostbyaddr_r_nargs=8
16836
16837         else
16838                 ol_cv_func_gethostbyaddr_r_nargs=0
16839         fi
16840   
16841 fi
16842
16843 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16844   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16845     cat >> confdefs.h <<EOF
16846 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16847 EOF
16848
16849   fi
16850
16851 else
16852         ol_cv_func_gethostbyaddr_r_nargs=0
16853 fi
16854
16855 ol_link_ldbm=no 
16856
16857 if test $ol_with_ldbm_api = auto \
16858         -o $ol_with_ldbm_api = berkeley \
16859         -o $ol_with_ldbm_api = bcompat ; then
16860
16861         if test $ol_with_ldbm_api = bcompat; then \
16862                 for ac_hdr in db_185.h db.h
16863 do
16864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16866 echo "configure:16867: checking for $ac_hdr" >&5
16867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16868   echo $ac_n "(cached) $ac_c" 1>&6
16869 else
16870   cat > conftest.$ac_ext <<EOF
16871 #line 16872 "configure"
16872 #include "confdefs.h"
16873 #include <$ac_hdr>
16874 EOF
16875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16876 { (eval echo configure:16877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16878 if test -z "$ac_err"; then
16879   rm -rf conftest*
16880   eval "ac_cv_header_$ac_safe=yes"
16881 else
16882   echo "$ac_err" >&5
16883   echo "configure: failed program was:" >&5
16884   cat conftest.$ac_ext >&5
16885   rm -rf conftest*
16886   eval "ac_cv_header_$ac_safe=no"
16887 fi
16888 rm -f conftest*
16889 fi
16890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16891   echo "$ac_t""yes" 1>&6
16892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16893   cat >> confdefs.h <<EOF
16894 #define $ac_tr_hdr 1
16895 EOF
16896  
16897 else
16898   echo "$ac_t""no" 1>&6
16899 fi
16900 done
16901
16902 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16903         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16904 echo "configure:16905: checking if Berkeley DB header compatibility" >&5
16905 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16906   echo $ac_n "(cached) $ac_c" 1>&6
16907 else
16908   
16909                 cat > conftest.$ac_ext <<EOF
16910 #line 16911 "configure"
16911 #include "confdefs.h"
16912
16913 #if HAVE_DB_185_H
16914 #       include <db_185.h>
16915 #else
16916 #       include <db.h>
16917 #endif
16918
16919  /* this check could be improved */
16920 #ifndef DB_VERSION_MAJOR
16921 #       define DB_VERSION_MAJOR 1
16922 #endif
16923
16924 #if DB_VERSION_MAJOR == 1 
16925         __db_version_1
16926 #endif
16927
16928 EOF
16929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16930   egrep "__db_version_1" >/dev/null 2>&1; then
16931   rm -rf conftest*
16932   ol_cv_header_db1=yes
16933 else
16934   rm -rf conftest*
16935   ol_cv_header_db1=no
16936 fi
16937 rm -f conftest*
16938
16939 fi
16940
16941 echo "$ac_t""$ol_cv_header_db1" 1>&6
16942
16943         if test $ol_cv_header_db1 = yes ; then
16944                 ol_cv_lib_db=no
16945 if test $ol_cv_lib_db = no ; then
16946         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16947 echo "configure:16948: checking for Berkeley DB link (default)" >&5
16948 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16949   echo $ac_n "(cached) $ac_c" 1>&6
16950 else
16951   
16952         ol_DB_LIB=
16953         ol_LIBS=$LIBS
16954         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16955
16956         cat > conftest.$ac_ext <<EOF
16957 #line 16958 "configure"
16958 #include "confdefs.h"
16959
16960 #ifdef HAVE_DB_185_H
16961 # include <db_185.h>
16962 #else
16963 # include <db.h>
16964 #endif
16965
16966 #ifndef DB_VERSION_MAJOR
16967 # define DB_VERSION_MAJOR 1
16968 #endif
16969
16970 #ifndef NULL
16971 #define NULL ((void*)0)
16972 #endif
16973
16974 int main() {
16975
16976 #if DB_VERSION_MAJOR > 1
16977         {
16978                 char *version;
16979                 int major, minor, patch;
16980
16981                 version = db_version( &major, &minor, &patch );
16982
16983                 if( major != DB_VERSION_MAJOR ||
16984                         minor < DB_VERSION_MINOR )
16985                 {
16986                         printf("Berkeley DB version mismatch\n"
16987                                 "\theader: %s\n\tlibrary: %s\n",
16988                                 DB_VERSION_STRING, version);
16989                         return 1;
16990                 }
16991         }
16992 #endif
16993
16994 #if DB_VERSION_MAJOR > 2
16995         db_env_create( NULL, 0 );
16996 #elif DB_VERSION_MAJOR > 1
16997         db_appexit( NULL );
16998 #else
16999         (void) dbopen( NULL, 0, 0, 0, NULL);
17000 #endif
17001
17002 ; return 0; }
17003 EOF
17004 if { (eval echo configure:17005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17005   rm -rf conftest*
17006   ol_cv_db_none=yes
17007 else
17008   echo "configure: failed program was:" >&5
17009   cat conftest.$ac_ext >&5
17010   rm -rf conftest*
17011   ol_cv_db_none=no
17012 fi
17013 rm -f conftest*
17014
17015         LIBS="$ol_LIBS"
17016
17017 fi
17018
17019 echo "$ac_t""$ol_cv_db_none" 1>&6
17020
17021         if test $ol_cv_db_none = yes ; then
17022                 ol_cv_lib_db=yes
17023         fi
17024 fi
17025
17026 if test $ol_cv_lib_db = no ; then
17027         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17028 echo "configure:17029: checking for Berkeley DB link (-ldb42)" >&5
17029 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17030   echo $ac_n "(cached) $ac_c" 1>&6
17031 else
17032   
17033         ol_DB_LIB=-ldb42
17034         ol_LIBS=$LIBS
17035         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17036
17037         cat > conftest.$ac_ext <<EOF
17038 #line 17039 "configure"
17039 #include "confdefs.h"
17040
17041 #ifdef HAVE_DB_185_H
17042 # include <db_185.h>
17043 #else
17044 # include <db.h>
17045 #endif
17046
17047 #ifndef DB_VERSION_MAJOR
17048 # define DB_VERSION_MAJOR 1
17049 #endif
17050
17051 #ifndef NULL
17052 #define NULL ((void*)0)
17053 #endif
17054
17055 int main() {
17056
17057 #if DB_VERSION_MAJOR > 1
17058         {
17059                 char *version;
17060                 int major, minor, patch;
17061
17062                 version = db_version( &major, &minor, &patch );
17063
17064                 if( major != DB_VERSION_MAJOR ||
17065                         minor < DB_VERSION_MINOR )
17066                 {
17067                         printf("Berkeley DB version mismatch\n"
17068                                 "\theader: %s\n\tlibrary: %s\n",
17069                                 DB_VERSION_STRING, version);
17070                         return 1;
17071                 }
17072         }
17073 #endif
17074
17075 #if DB_VERSION_MAJOR > 2
17076         db_env_create( NULL, 0 );
17077 #elif DB_VERSION_MAJOR > 1
17078         db_appexit( NULL );
17079 #else
17080         (void) dbopen( NULL, 0, 0, 0, NULL);
17081 #endif
17082
17083 ; return 0; }
17084 EOF
17085 if { (eval echo configure:17086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17086   rm -rf conftest*
17087   ol_cv_db_db42=yes
17088 else
17089   echo "configure: failed program was:" >&5
17090   cat conftest.$ac_ext >&5
17091   rm -rf conftest*
17092   ol_cv_db_db42=no
17093 fi
17094 rm -f conftest*
17095
17096         LIBS="$ol_LIBS"
17097
17098 fi
17099
17100 echo "$ac_t""$ol_cv_db_db42" 1>&6
17101
17102         if test $ol_cv_db_db42 = yes ; then
17103                 ol_cv_lib_db=-ldb42
17104         fi
17105 fi
17106
17107 if test $ol_cv_lib_db = no ; then
17108         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17109 echo "configure:17110: checking for Berkeley DB link (-ldb-42)" >&5
17110 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17111   echo $ac_n "(cached) $ac_c" 1>&6
17112 else
17113   
17114         ol_DB_LIB=-ldb-42
17115         ol_LIBS=$LIBS
17116         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17117
17118         cat > conftest.$ac_ext <<EOF
17119 #line 17120 "configure"
17120 #include "confdefs.h"
17121
17122 #ifdef HAVE_DB_185_H
17123 # include <db_185.h>
17124 #else
17125 # include <db.h>
17126 #endif
17127
17128 #ifndef DB_VERSION_MAJOR
17129 # define DB_VERSION_MAJOR 1
17130 #endif
17131
17132 #ifndef NULL
17133 #define NULL ((void*)0)
17134 #endif
17135
17136 int main() {
17137
17138 #if DB_VERSION_MAJOR > 1
17139         {
17140                 char *version;
17141                 int major, minor, patch;
17142
17143                 version = db_version( &major, &minor, &patch );
17144
17145                 if( major != DB_VERSION_MAJOR ||
17146                         minor < DB_VERSION_MINOR )
17147                 {
17148                         printf("Berkeley DB version mismatch\n"
17149                                 "\theader: %s\n\tlibrary: %s\n",
17150                                 DB_VERSION_STRING, version);
17151                         return 1;
17152                 }
17153         }
17154 #endif
17155
17156 #if DB_VERSION_MAJOR > 2
17157         db_env_create( NULL, 0 );
17158 #elif DB_VERSION_MAJOR > 1
17159         db_appexit( NULL );
17160 #else
17161         (void) dbopen( NULL, 0, 0, 0, NULL);
17162 #endif
17163
17164 ; return 0; }
17165 EOF
17166 if { (eval echo configure:17167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17167   rm -rf conftest*
17168   ol_cv_db_db_42=yes
17169 else
17170   echo "configure: failed program was:" >&5
17171   cat conftest.$ac_ext >&5
17172   rm -rf conftest*
17173   ol_cv_db_db_42=no
17174 fi
17175 rm -f conftest*
17176
17177         LIBS="$ol_LIBS"
17178
17179 fi
17180
17181 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17182
17183         if test $ol_cv_db_db_42 = yes ; then
17184                 ol_cv_lib_db=-ldb-42
17185         fi
17186 fi
17187
17188 if test $ol_cv_lib_db = no ; then
17189         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17190 echo "configure:17191: checking for Berkeley DB link (-ldb-4.2)" >&5
17191 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17192   echo $ac_n "(cached) $ac_c" 1>&6
17193 else
17194   
17195         ol_DB_LIB=-ldb-4.2
17196         ol_LIBS=$LIBS
17197         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17198
17199         cat > conftest.$ac_ext <<EOF
17200 #line 17201 "configure"
17201 #include "confdefs.h"
17202
17203 #ifdef HAVE_DB_185_H
17204 # include <db_185.h>
17205 #else
17206 # include <db.h>
17207 #endif
17208
17209 #ifndef DB_VERSION_MAJOR
17210 # define DB_VERSION_MAJOR 1
17211 #endif
17212
17213 #ifndef NULL
17214 #define NULL ((void*)0)
17215 #endif
17216
17217 int main() {
17218
17219 #if DB_VERSION_MAJOR > 1
17220         {
17221                 char *version;
17222                 int major, minor, patch;
17223
17224                 version = db_version( &major, &minor, &patch );
17225
17226                 if( major != DB_VERSION_MAJOR ||
17227                         minor < DB_VERSION_MINOR )
17228                 {
17229                         printf("Berkeley DB version mismatch\n"
17230                                 "\theader: %s\n\tlibrary: %s\n",
17231                                 DB_VERSION_STRING, version);
17232                         return 1;
17233                 }
17234         }
17235 #endif
17236
17237 #if DB_VERSION_MAJOR > 2
17238         db_env_create( NULL, 0 );
17239 #elif DB_VERSION_MAJOR > 1
17240         db_appexit( NULL );
17241 #else
17242         (void) dbopen( NULL, 0, 0, 0, NULL);
17243 #endif
17244
17245 ; return 0; }
17246 EOF
17247 if { (eval echo configure:17248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17248   rm -rf conftest*
17249   ol_cv_db_db_4_dot_2=yes
17250 else
17251   echo "configure: failed program was:" >&5
17252   cat conftest.$ac_ext >&5
17253   rm -rf conftest*
17254   ol_cv_db_db_4_dot_2=no
17255 fi
17256 rm -f conftest*
17257
17258         LIBS="$ol_LIBS"
17259
17260 fi
17261
17262 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17263
17264         if test $ol_cv_db_db_4_dot_2 = yes ; then
17265                 ol_cv_lib_db=-ldb-4.2
17266         fi
17267 fi
17268
17269 if test $ol_cv_lib_db = no ; then
17270         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17271 echo "configure:17272: checking for Berkeley DB link (-ldb-4-2)" >&5
17272 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17273   echo $ac_n "(cached) $ac_c" 1>&6
17274 else
17275   
17276         ol_DB_LIB=-ldb-4-2
17277         ol_LIBS=$LIBS
17278         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17279
17280         cat > conftest.$ac_ext <<EOF
17281 #line 17282 "configure"
17282 #include "confdefs.h"
17283
17284 #ifdef HAVE_DB_185_H
17285 # include <db_185.h>
17286 #else
17287 # include <db.h>
17288 #endif
17289
17290 #ifndef DB_VERSION_MAJOR
17291 # define DB_VERSION_MAJOR 1
17292 #endif
17293
17294 #ifndef NULL
17295 #define NULL ((void*)0)
17296 #endif
17297
17298 int main() {
17299
17300 #if DB_VERSION_MAJOR > 1
17301         {
17302                 char *version;
17303                 int major, minor, patch;
17304
17305                 version = db_version( &major, &minor, &patch );
17306
17307                 if( major != DB_VERSION_MAJOR ||
17308                         minor < DB_VERSION_MINOR )
17309                 {
17310                         printf("Berkeley DB version mismatch\n"
17311                                 "\theader: %s\n\tlibrary: %s\n",
17312                                 DB_VERSION_STRING, version);
17313                         return 1;
17314                 }
17315         }
17316 #endif
17317
17318 #if DB_VERSION_MAJOR > 2
17319         db_env_create( NULL, 0 );
17320 #elif DB_VERSION_MAJOR > 1
17321         db_appexit( NULL );
17322 #else
17323         (void) dbopen( NULL, 0, 0, 0, NULL);
17324 #endif
17325
17326 ; return 0; }
17327 EOF
17328 if { (eval echo configure:17329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17329   rm -rf conftest*
17330   ol_cv_db_db_4_2=yes
17331 else
17332   echo "configure: failed program was:" >&5
17333   cat conftest.$ac_ext >&5
17334   rm -rf conftest*
17335   ol_cv_db_db_4_2=no
17336 fi
17337 rm -f conftest*
17338
17339         LIBS="$ol_LIBS"
17340
17341 fi
17342
17343 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17344
17345         if test $ol_cv_db_db_4_2 = yes ; then
17346                 ol_cv_lib_db=-ldb-4-2
17347         fi
17348 fi
17349
17350 if test $ol_cv_lib_db = no ; then
17351         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17352 echo "configure:17353: checking for Berkeley DB link (-ldb-4)" >&5
17353 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17354   echo $ac_n "(cached) $ac_c" 1>&6
17355 else
17356   
17357         ol_DB_LIB=-ldb-4
17358         ol_LIBS=$LIBS
17359         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17360
17361         cat > conftest.$ac_ext <<EOF
17362 #line 17363 "configure"
17363 #include "confdefs.h"
17364
17365 #ifdef HAVE_DB_185_H
17366 # include <db_185.h>
17367 #else
17368 # include <db.h>
17369 #endif
17370
17371 #ifndef DB_VERSION_MAJOR
17372 # define DB_VERSION_MAJOR 1
17373 #endif
17374
17375 #ifndef NULL
17376 #define NULL ((void*)0)
17377 #endif
17378
17379 int main() {
17380
17381 #if DB_VERSION_MAJOR > 1
17382         {
17383                 char *version;
17384                 int major, minor, patch;
17385
17386                 version = db_version( &major, &minor, &patch );
17387
17388                 if( major != DB_VERSION_MAJOR ||
17389                         minor < DB_VERSION_MINOR )
17390                 {
17391                         printf("Berkeley DB version mismatch\n"
17392                                 "\theader: %s\n\tlibrary: %s\n",
17393                                 DB_VERSION_STRING, version);
17394                         return 1;
17395                 }
17396         }
17397 #endif
17398
17399 #if DB_VERSION_MAJOR > 2
17400         db_env_create( NULL, 0 );
17401 #elif DB_VERSION_MAJOR > 1
17402         db_appexit( NULL );
17403 #else
17404         (void) dbopen( NULL, 0, 0, 0, NULL);
17405 #endif
17406
17407 ; return 0; }
17408 EOF
17409 if { (eval echo configure:17410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17410   rm -rf conftest*
17411   ol_cv_db_db_4=yes
17412 else
17413   echo "configure: failed program was:" >&5
17414   cat conftest.$ac_ext >&5
17415   rm -rf conftest*
17416   ol_cv_db_db_4=no
17417 fi
17418 rm -f conftest*
17419
17420         LIBS="$ol_LIBS"
17421
17422 fi
17423
17424 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17425
17426         if test $ol_cv_db_db_4 = yes ; then
17427                 ol_cv_lib_db=-ldb-4
17428         fi
17429 fi
17430
17431 if test $ol_cv_lib_db = no ; then
17432         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17433 echo "configure:17434: checking for Berkeley DB link (-ldb4)" >&5
17434 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17435   echo $ac_n "(cached) $ac_c" 1>&6
17436 else
17437   
17438         ol_DB_LIB=-ldb4
17439         ol_LIBS=$LIBS
17440         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17441
17442         cat > conftest.$ac_ext <<EOF
17443 #line 17444 "configure"
17444 #include "confdefs.h"
17445
17446 #ifdef HAVE_DB_185_H
17447 # include <db_185.h>
17448 #else
17449 # include <db.h>
17450 #endif
17451
17452 #ifndef DB_VERSION_MAJOR
17453 # define DB_VERSION_MAJOR 1
17454 #endif
17455
17456 #ifndef NULL
17457 #define NULL ((void*)0)
17458 #endif
17459
17460 int main() {
17461
17462 #if DB_VERSION_MAJOR > 1
17463         {
17464                 char *version;
17465                 int major, minor, patch;
17466
17467                 version = db_version( &major, &minor, &patch );
17468
17469                 if( major != DB_VERSION_MAJOR ||
17470                         minor < DB_VERSION_MINOR )
17471                 {
17472                         printf("Berkeley DB version mismatch\n"
17473                                 "\theader: %s\n\tlibrary: %s\n",
17474                                 DB_VERSION_STRING, version);
17475                         return 1;
17476                 }
17477         }
17478 #endif
17479
17480 #if DB_VERSION_MAJOR > 2
17481         db_env_create( NULL, 0 );
17482 #elif DB_VERSION_MAJOR > 1
17483         db_appexit( NULL );
17484 #else
17485         (void) dbopen( NULL, 0, 0, 0, NULL);
17486 #endif
17487
17488 ; return 0; }
17489 EOF
17490 if { (eval echo configure:17491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17491   rm -rf conftest*
17492   ol_cv_db_db4=yes
17493 else
17494   echo "configure: failed program was:" >&5
17495   cat conftest.$ac_ext >&5
17496   rm -rf conftest*
17497   ol_cv_db_db4=no
17498 fi
17499 rm -f conftest*
17500
17501         LIBS="$ol_LIBS"
17502
17503 fi
17504
17505 echo "$ac_t""$ol_cv_db_db4" 1>&6
17506
17507         if test $ol_cv_db_db4 = yes ; then
17508                 ol_cv_lib_db=-ldb4
17509         fi
17510 fi
17511
17512 if test $ol_cv_lib_db = no ; then
17513         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17514 echo "configure:17515: checking for Berkeley DB link (-ldb)" >&5
17515 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17516   echo $ac_n "(cached) $ac_c" 1>&6
17517 else
17518   
17519         ol_DB_LIB=-ldb
17520         ol_LIBS=$LIBS
17521         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17522
17523         cat > conftest.$ac_ext <<EOF
17524 #line 17525 "configure"
17525 #include "confdefs.h"
17526
17527 #ifdef HAVE_DB_185_H
17528 # include <db_185.h>
17529 #else
17530 # include <db.h>
17531 #endif
17532
17533 #ifndef DB_VERSION_MAJOR
17534 # define DB_VERSION_MAJOR 1
17535 #endif
17536
17537 #ifndef NULL
17538 #define NULL ((void*)0)
17539 #endif
17540
17541 int main() {
17542
17543 #if DB_VERSION_MAJOR > 1
17544         {
17545                 char *version;
17546                 int major, minor, patch;
17547
17548                 version = db_version( &major, &minor, &patch );
17549
17550                 if( major != DB_VERSION_MAJOR ||
17551                         minor < DB_VERSION_MINOR )
17552                 {
17553                         printf("Berkeley DB version mismatch\n"
17554                                 "\theader: %s\n\tlibrary: %s\n",
17555                                 DB_VERSION_STRING, version);
17556                         return 1;
17557                 }
17558         }
17559 #endif
17560
17561 #if DB_VERSION_MAJOR > 2
17562         db_env_create( NULL, 0 );
17563 #elif DB_VERSION_MAJOR > 1
17564         db_appexit( NULL );
17565 #else
17566         (void) dbopen( NULL, 0, 0, 0, NULL);
17567 #endif
17568
17569 ; return 0; }
17570 EOF
17571 if { (eval echo configure:17572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17572   rm -rf conftest*
17573   ol_cv_db_db=yes
17574 else
17575   echo "configure: failed program was:" >&5
17576   cat conftest.$ac_ext >&5
17577   rm -rf conftest*
17578   ol_cv_db_db=no
17579 fi
17580 rm -f conftest*
17581
17582         LIBS="$ol_LIBS"
17583
17584 fi
17585
17586 echo "$ac_t""$ol_cv_db_db" 1>&6
17587
17588         if test $ol_cv_db_db = yes ; then
17589                 ol_cv_lib_db=-ldb
17590         fi
17591 fi
17592
17593 if test $ol_cv_lib_db = no ; then
17594         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17595 echo "configure:17596: checking for Berkeley DB link (-ldb41)" >&5
17596 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17597   echo $ac_n "(cached) $ac_c" 1>&6
17598 else
17599   
17600         ol_DB_LIB=-ldb41
17601         ol_LIBS=$LIBS
17602         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17603
17604         cat > conftest.$ac_ext <<EOF
17605 #line 17606 "configure"
17606 #include "confdefs.h"
17607
17608 #ifdef HAVE_DB_185_H
17609 # include <db_185.h>
17610 #else
17611 # include <db.h>
17612 #endif
17613
17614 #ifndef DB_VERSION_MAJOR
17615 # define DB_VERSION_MAJOR 1
17616 #endif
17617
17618 #ifndef NULL
17619 #define NULL ((void*)0)
17620 #endif
17621
17622 int main() {
17623
17624 #if DB_VERSION_MAJOR > 1
17625         {
17626                 char *version;
17627                 int major, minor, patch;
17628
17629                 version = db_version( &major, &minor, &patch );
17630
17631                 if( major != DB_VERSION_MAJOR ||
17632                         minor < DB_VERSION_MINOR )
17633                 {
17634                         printf("Berkeley DB version mismatch\n"
17635                                 "\theader: %s\n\tlibrary: %s\n",
17636                                 DB_VERSION_STRING, version);
17637                         return 1;
17638                 }
17639         }
17640 #endif
17641
17642 #if DB_VERSION_MAJOR > 2
17643         db_env_create( NULL, 0 );
17644 #elif DB_VERSION_MAJOR > 1
17645         db_appexit( NULL );
17646 #else
17647         (void) dbopen( NULL, 0, 0, 0, NULL);
17648 #endif
17649
17650 ; return 0; }
17651 EOF
17652 if { (eval echo configure:17653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17653   rm -rf conftest*
17654   ol_cv_db_db41=yes
17655 else
17656   echo "configure: failed program was:" >&5
17657   cat conftest.$ac_ext >&5
17658   rm -rf conftest*
17659   ol_cv_db_db41=no
17660 fi
17661 rm -f conftest*
17662
17663         LIBS="$ol_LIBS"
17664
17665 fi
17666
17667 echo "$ac_t""$ol_cv_db_db41" 1>&6
17668
17669         if test $ol_cv_db_db41 = yes ; then
17670                 ol_cv_lib_db=-ldb41
17671         fi
17672 fi
17673
17674 if test $ol_cv_lib_db = no ; then
17675         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17676 echo "configure:17677: checking for Berkeley DB link (-ldb-41)" >&5
17677 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17678   echo $ac_n "(cached) $ac_c" 1>&6
17679 else
17680   
17681         ol_DB_LIB=-ldb-41
17682         ol_LIBS=$LIBS
17683         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17684
17685         cat > conftest.$ac_ext <<EOF
17686 #line 17687 "configure"
17687 #include "confdefs.h"
17688
17689 #ifdef HAVE_DB_185_H
17690 # include <db_185.h>
17691 #else
17692 # include <db.h>
17693 #endif
17694
17695 #ifndef DB_VERSION_MAJOR
17696 # define DB_VERSION_MAJOR 1
17697 #endif
17698
17699 #ifndef NULL
17700 #define NULL ((void*)0)
17701 #endif
17702
17703 int main() {
17704
17705 #if DB_VERSION_MAJOR > 1
17706         {
17707                 char *version;
17708                 int major, minor, patch;
17709
17710                 version = db_version( &major, &minor, &patch );
17711
17712                 if( major != DB_VERSION_MAJOR ||
17713                         minor < DB_VERSION_MINOR )
17714                 {
17715                         printf("Berkeley DB version mismatch\n"
17716                                 "\theader: %s\n\tlibrary: %s\n",
17717                                 DB_VERSION_STRING, version);
17718                         return 1;
17719                 }
17720         }
17721 #endif
17722
17723 #if DB_VERSION_MAJOR > 2
17724         db_env_create( NULL, 0 );
17725 #elif DB_VERSION_MAJOR > 1
17726         db_appexit( NULL );
17727 #else
17728         (void) dbopen( NULL, 0, 0, 0, NULL);
17729 #endif
17730
17731 ; return 0; }
17732 EOF
17733 if { (eval echo configure:17734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17734   rm -rf conftest*
17735   ol_cv_db_db_41=yes
17736 else
17737   echo "configure: failed program was:" >&5
17738   cat conftest.$ac_ext >&5
17739   rm -rf conftest*
17740   ol_cv_db_db_41=no
17741 fi
17742 rm -f conftest*
17743
17744         LIBS="$ol_LIBS"
17745
17746 fi
17747
17748 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17749
17750         if test $ol_cv_db_db_41 = yes ; then
17751                 ol_cv_lib_db=-ldb-41
17752         fi
17753 fi
17754
17755 if test $ol_cv_lib_db = no ; then
17756         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17757 echo "configure:17758: checking for Berkeley DB link (-ldb-4.1)" >&5
17758 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17759   echo $ac_n "(cached) $ac_c" 1>&6
17760 else
17761   
17762         ol_DB_LIB=-ldb-4.1
17763         ol_LIBS=$LIBS
17764         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17765
17766         cat > conftest.$ac_ext <<EOF
17767 #line 17768 "configure"
17768 #include "confdefs.h"
17769
17770 #ifdef HAVE_DB_185_H
17771 # include <db_185.h>
17772 #else
17773 # include <db.h>
17774 #endif
17775
17776 #ifndef DB_VERSION_MAJOR
17777 # define DB_VERSION_MAJOR 1
17778 #endif
17779
17780 #ifndef NULL
17781 #define NULL ((void*)0)
17782 #endif
17783
17784 int main() {
17785
17786 #if DB_VERSION_MAJOR > 1
17787         {
17788                 char *version;
17789                 int major, minor, patch;
17790
17791                 version = db_version( &major, &minor, &patch );
17792
17793                 if( major != DB_VERSION_MAJOR ||
17794                         minor < DB_VERSION_MINOR )
17795                 {
17796                         printf("Berkeley DB version mismatch\n"
17797                                 "\theader: %s\n\tlibrary: %s\n",
17798                                 DB_VERSION_STRING, version);
17799                         return 1;
17800                 }
17801         }
17802 #endif
17803
17804 #if DB_VERSION_MAJOR > 2
17805         db_env_create( NULL, 0 );
17806 #elif DB_VERSION_MAJOR > 1
17807         db_appexit( NULL );
17808 #else
17809         (void) dbopen( NULL, 0, 0, 0, NULL);
17810 #endif
17811
17812 ; return 0; }
17813 EOF
17814 if { (eval echo configure:17815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17815   rm -rf conftest*
17816   ol_cv_db_db_4_dot_1=yes
17817 else
17818   echo "configure: failed program was:" >&5
17819   cat conftest.$ac_ext >&5
17820   rm -rf conftest*
17821   ol_cv_db_db_4_dot_1=no
17822 fi
17823 rm -f conftest*
17824
17825         LIBS="$ol_LIBS"
17826
17827 fi
17828
17829 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17830
17831         if test $ol_cv_db_db_4_dot_1 = yes ; then
17832                 ol_cv_lib_db=-ldb-4.1
17833         fi
17834 fi
17835
17836 if test $ol_cv_lib_db = no ; then
17837         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17838 echo "configure:17839: checking for Berkeley DB link (-ldb-4-1)" >&5
17839 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17840   echo $ac_n "(cached) $ac_c" 1>&6
17841 else
17842   
17843         ol_DB_LIB=-ldb-4-1
17844         ol_LIBS=$LIBS
17845         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17846
17847         cat > conftest.$ac_ext <<EOF
17848 #line 17849 "configure"
17849 #include "confdefs.h"
17850
17851 #ifdef HAVE_DB_185_H
17852 # include <db_185.h>
17853 #else
17854 # include <db.h>
17855 #endif
17856
17857 #ifndef DB_VERSION_MAJOR
17858 # define DB_VERSION_MAJOR 1
17859 #endif
17860
17861 #ifndef NULL
17862 #define NULL ((void*)0)
17863 #endif
17864
17865 int main() {
17866
17867 #if DB_VERSION_MAJOR > 1
17868         {
17869                 char *version;
17870                 int major, minor, patch;
17871
17872                 version = db_version( &major, &minor, &patch );
17873
17874                 if( major != DB_VERSION_MAJOR ||
17875                         minor < DB_VERSION_MINOR )
17876                 {
17877                         printf("Berkeley DB version mismatch\n"
17878                                 "\theader: %s\n\tlibrary: %s\n",
17879                                 DB_VERSION_STRING, version);
17880                         return 1;
17881                 }
17882         }
17883 #endif
17884
17885 #if DB_VERSION_MAJOR > 2
17886         db_env_create( NULL, 0 );
17887 #elif DB_VERSION_MAJOR > 1
17888         db_appexit( NULL );
17889 #else
17890         (void) dbopen( NULL, 0, 0, 0, NULL);
17891 #endif
17892
17893 ; return 0; }
17894 EOF
17895 if { (eval echo configure:17896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17896   rm -rf conftest*
17897   ol_cv_db_db_4_1=yes
17898 else
17899   echo "configure: failed program was:" >&5
17900   cat conftest.$ac_ext >&5
17901   rm -rf conftest*
17902   ol_cv_db_db_4_1=no
17903 fi
17904 rm -f conftest*
17905
17906         LIBS="$ol_LIBS"
17907
17908 fi
17909
17910 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17911
17912         if test $ol_cv_db_db_4_1 = yes ; then
17913                 ol_cv_lib_db=-ldb-4-1
17914         fi
17915 fi
17916
17917 if test $ol_cv_lib_db = no ; then
17918         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17919 echo "configure:17920: checking for Berkeley DB link (-ldb3)" >&5
17920 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17921   echo $ac_n "(cached) $ac_c" 1>&6
17922 else
17923   
17924         ol_DB_LIB=-ldb3
17925         ol_LIBS=$LIBS
17926         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17927
17928         cat > conftest.$ac_ext <<EOF
17929 #line 17930 "configure"
17930 #include "confdefs.h"
17931
17932 #ifdef HAVE_DB_185_H
17933 # include <db_185.h>
17934 #else
17935 # include <db.h>
17936 #endif
17937
17938 #ifndef DB_VERSION_MAJOR
17939 # define DB_VERSION_MAJOR 1
17940 #endif
17941
17942 #ifndef NULL
17943 #define NULL ((void*)0)
17944 #endif
17945
17946 int main() {
17947
17948 #if DB_VERSION_MAJOR > 1
17949         {
17950                 char *version;
17951                 int major, minor, patch;
17952
17953                 version = db_version( &major, &minor, &patch );
17954
17955                 if( major != DB_VERSION_MAJOR ||
17956                         minor < DB_VERSION_MINOR )
17957                 {
17958                         printf("Berkeley DB version mismatch\n"
17959                                 "\theader: %s\n\tlibrary: %s\n",
17960                                 DB_VERSION_STRING, version);
17961                         return 1;
17962                 }
17963         }
17964 #endif
17965
17966 #if DB_VERSION_MAJOR > 2
17967         db_env_create( NULL, 0 );
17968 #elif DB_VERSION_MAJOR > 1
17969         db_appexit( NULL );
17970 #else
17971         (void) dbopen( NULL, 0, 0, 0, NULL);
17972 #endif
17973
17974 ; return 0; }
17975 EOF
17976 if { (eval echo configure:17977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17977   rm -rf conftest*
17978   ol_cv_db_db3=yes
17979 else
17980   echo "configure: failed program was:" >&5
17981   cat conftest.$ac_ext >&5
17982   rm -rf conftest*
17983   ol_cv_db_db3=no
17984 fi
17985 rm -f conftest*
17986
17987         LIBS="$ol_LIBS"
17988
17989 fi
17990
17991 echo "$ac_t""$ol_cv_db_db3" 1>&6
17992
17993         if test $ol_cv_db_db3 = yes ; then
17994                 ol_cv_lib_db=-ldb3
17995         fi
17996 fi
17997
17998 if test $ol_cv_lib_db = no ; then
17999         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18000 echo "configure:18001: checking for Berkeley DB link (-ldb-3)" >&5
18001 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18002   echo $ac_n "(cached) $ac_c" 1>&6
18003 else
18004   
18005         ol_DB_LIB=-ldb-3
18006         ol_LIBS=$LIBS
18007         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18008
18009         cat > conftest.$ac_ext <<EOF
18010 #line 18011 "configure"
18011 #include "confdefs.h"
18012
18013 #ifdef HAVE_DB_185_H
18014 # include <db_185.h>
18015 #else
18016 # include <db.h>
18017 #endif
18018
18019 #ifndef DB_VERSION_MAJOR
18020 # define DB_VERSION_MAJOR 1
18021 #endif
18022
18023 #ifndef NULL
18024 #define NULL ((void*)0)
18025 #endif
18026
18027 int main() {
18028
18029 #if DB_VERSION_MAJOR > 1
18030         {
18031                 char *version;
18032                 int major, minor, patch;
18033
18034                 version = db_version( &major, &minor, &patch );
18035
18036                 if( major != DB_VERSION_MAJOR ||
18037                         minor < DB_VERSION_MINOR )
18038                 {
18039                         printf("Berkeley DB version mismatch\n"
18040                                 "\theader: %s\n\tlibrary: %s\n",
18041                                 DB_VERSION_STRING, version);
18042                         return 1;
18043                 }
18044         }
18045 #endif
18046
18047 #if DB_VERSION_MAJOR > 2
18048         db_env_create( NULL, 0 );
18049 #elif DB_VERSION_MAJOR > 1
18050         db_appexit( NULL );
18051 #else
18052         (void) dbopen( NULL, 0, 0, 0, NULL);
18053 #endif
18054
18055 ; return 0; }
18056 EOF
18057 if { (eval echo configure:18058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18058   rm -rf conftest*
18059   ol_cv_db_db_3=yes
18060 else
18061   echo "configure: failed program was:" >&5
18062   cat conftest.$ac_ext >&5
18063   rm -rf conftest*
18064   ol_cv_db_db_3=no
18065 fi
18066 rm -f conftest*
18067
18068         LIBS="$ol_LIBS"
18069
18070 fi
18071
18072 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18073
18074         if test $ol_cv_db_db_3 = yes ; then
18075                 ol_cv_lib_db=-ldb-3
18076         fi
18077 fi
18078
18079 if test $ol_cv_lib_db = no ; then
18080         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18081 echo "configure:18082: checking for Berkeley DB link (-ldb2)" >&5
18082 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18083   echo $ac_n "(cached) $ac_c" 1>&6
18084 else
18085   
18086         ol_DB_LIB=-ldb2
18087         ol_LIBS=$LIBS
18088         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18089
18090         cat > conftest.$ac_ext <<EOF
18091 #line 18092 "configure"
18092 #include "confdefs.h"
18093
18094 #ifdef HAVE_DB_185_H
18095 # include <db_185.h>
18096 #else
18097 # include <db.h>
18098 #endif
18099
18100 #ifndef DB_VERSION_MAJOR
18101 # define DB_VERSION_MAJOR 1
18102 #endif
18103
18104 #ifndef NULL
18105 #define NULL ((void*)0)
18106 #endif
18107
18108 int main() {
18109
18110 #if DB_VERSION_MAJOR > 1
18111         {
18112                 char *version;
18113                 int major, minor, patch;
18114
18115                 version = db_version( &major, &minor, &patch );
18116
18117                 if( major != DB_VERSION_MAJOR ||
18118                         minor < DB_VERSION_MINOR )
18119                 {
18120                         printf("Berkeley DB version mismatch\n"
18121                                 "\theader: %s\n\tlibrary: %s\n",
18122                                 DB_VERSION_STRING, version);
18123                         return 1;
18124                 }
18125         }
18126 #endif
18127
18128 #if DB_VERSION_MAJOR > 2
18129         db_env_create( NULL, 0 );
18130 #elif DB_VERSION_MAJOR > 1
18131         db_appexit( NULL );
18132 #else
18133         (void) dbopen( NULL, 0, 0, 0, NULL);
18134 #endif
18135
18136 ; return 0; }
18137 EOF
18138 if { (eval echo configure:18139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18139   rm -rf conftest*
18140   ol_cv_db_db2=yes
18141 else
18142   echo "configure: failed program was:" >&5
18143   cat conftest.$ac_ext >&5
18144   rm -rf conftest*
18145   ol_cv_db_db2=no
18146 fi
18147 rm -f conftest*
18148
18149         LIBS="$ol_LIBS"
18150
18151 fi
18152
18153 echo "$ac_t""$ol_cv_db_db2" 1>&6
18154
18155         if test $ol_cv_db_db2 = yes ; then
18156                 ol_cv_lib_db=-ldb2
18157         fi
18158 fi
18159
18160 if test $ol_cv_lib_db = no ; then
18161         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18162 echo "configure:18163: checking for Berkeley DB link (-ldb-2)" >&5
18163 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18164   echo $ac_n "(cached) $ac_c" 1>&6
18165 else
18166   
18167         ol_DB_LIB=-ldb-2
18168         ol_LIBS=$LIBS
18169         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18170
18171         cat > conftest.$ac_ext <<EOF
18172 #line 18173 "configure"
18173 #include "confdefs.h"
18174
18175 #ifdef HAVE_DB_185_H
18176 # include <db_185.h>
18177 #else
18178 # include <db.h>
18179 #endif
18180
18181 #ifndef DB_VERSION_MAJOR
18182 # define DB_VERSION_MAJOR 1
18183 #endif
18184
18185 #ifndef NULL
18186 #define NULL ((void*)0)
18187 #endif
18188
18189 int main() {
18190
18191 #if DB_VERSION_MAJOR > 1
18192         {
18193                 char *version;
18194                 int major, minor, patch;
18195
18196                 version = db_version( &major, &minor, &patch );
18197
18198                 if( major != DB_VERSION_MAJOR ||
18199                         minor < DB_VERSION_MINOR )
18200                 {
18201                         printf("Berkeley DB version mismatch\n"
18202                                 "\theader: %s\n\tlibrary: %s\n",
18203                                 DB_VERSION_STRING, version);
18204                         return 1;
18205                 }
18206         }
18207 #endif
18208
18209 #if DB_VERSION_MAJOR > 2
18210         db_env_create( NULL, 0 );
18211 #elif DB_VERSION_MAJOR > 1
18212         db_appexit( NULL );
18213 #else
18214         (void) dbopen( NULL, 0, 0, 0, NULL);
18215 #endif
18216
18217 ; return 0; }
18218 EOF
18219 if { (eval echo configure:18220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18220   rm -rf conftest*
18221   ol_cv_db_db_2=yes
18222 else
18223   echo "configure: failed program was:" >&5
18224   cat conftest.$ac_ext >&5
18225   rm -rf conftest*
18226   ol_cv_db_db_2=no
18227 fi
18228 rm -f conftest*
18229
18230         LIBS="$ol_LIBS"
18231
18232 fi
18233
18234 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18235
18236         if test $ol_cv_db_db_2 = yes ; then
18237                 ol_cv_lib_db=-ldb-2
18238         fi
18239 fi
18240
18241 if test $ol_cv_lib_db = no ; then
18242         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18243 echo "configure:18244: checking for Berkeley DB link (-ldb1)" >&5
18244 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18245   echo $ac_n "(cached) $ac_c" 1>&6
18246 else
18247   
18248         ol_DB_LIB=-ldb1
18249         ol_LIBS=$LIBS
18250         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18251
18252         cat > conftest.$ac_ext <<EOF
18253 #line 18254 "configure"
18254 #include "confdefs.h"
18255
18256 #ifdef HAVE_DB_185_H
18257 # include <db_185.h>
18258 #else
18259 # include <db.h>
18260 #endif
18261
18262 #ifndef DB_VERSION_MAJOR
18263 # define DB_VERSION_MAJOR 1
18264 #endif
18265
18266 #ifndef NULL
18267 #define NULL ((void*)0)
18268 #endif
18269
18270 int main() {
18271
18272 #if DB_VERSION_MAJOR > 1
18273         {
18274                 char *version;
18275                 int major, minor, patch;
18276
18277                 version = db_version( &major, &minor, &patch );
18278
18279                 if( major != DB_VERSION_MAJOR ||
18280                         minor < DB_VERSION_MINOR )
18281                 {
18282                         printf("Berkeley DB version mismatch\n"
18283                                 "\theader: %s\n\tlibrary: %s\n",
18284                                 DB_VERSION_STRING, version);
18285                         return 1;
18286                 }
18287         }
18288 #endif
18289
18290 #if DB_VERSION_MAJOR > 2
18291         db_env_create( NULL, 0 );
18292 #elif DB_VERSION_MAJOR > 1
18293         db_appexit( NULL );
18294 #else
18295         (void) dbopen( NULL, 0, 0, 0, NULL);
18296 #endif
18297
18298 ; return 0; }
18299 EOF
18300 if { (eval echo configure:18301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18301   rm -rf conftest*
18302   ol_cv_db_db1=yes
18303 else
18304   echo "configure: failed program was:" >&5
18305   cat conftest.$ac_ext >&5
18306   rm -rf conftest*
18307   ol_cv_db_db1=no
18308 fi
18309 rm -f conftest*
18310
18311         LIBS="$ol_LIBS"
18312
18313 fi
18314
18315 echo "$ac_t""$ol_cv_db_db1" 1>&6
18316
18317         if test $ol_cv_db_db1 = yes ; then
18318                 ol_cv_lib_db=-ldb1
18319         fi
18320 fi
18321
18322 if test $ol_cv_lib_db = no ; then
18323         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18324 echo "configure:18325: checking for Berkeley DB link (-ldb-1)" >&5
18325 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18326   echo $ac_n "(cached) $ac_c" 1>&6
18327 else
18328   
18329         ol_DB_LIB=-ldb-1
18330         ol_LIBS=$LIBS
18331         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18332
18333         cat > conftest.$ac_ext <<EOF
18334 #line 18335 "configure"
18335 #include "confdefs.h"
18336
18337 #ifdef HAVE_DB_185_H
18338 # include <db_185.h>
18339 #else
18340 # include <db.h>
18341 #endif
18342
18343 #ifndef DB_VERSION_MAJOR
18344 # define DB_VERSION_MAJOR 1
18345 #endif
18346
18347 #ifndef NULL
18348 #define NULL ((void*)0)
18349 #endif
18350
18351 int main() {
18352
18353 #if DB_VERSION_MAJOR > 1
18354         {
18355                 char *version;
18356                 int major, minor, patch;
18357
18358                 version = db_version( &major, &minor, &patch );
18359
18360                 if( major != DB_VERSION_MAJOR ||
18361                         minor < DB_VERSION_MINOR )
18362                 {
18363                         printf("Berkeley DB version mismatch\n"
18364                                 "\theader: %s\n\tlibrary: %s\n",
18365                                 DB_VERSION_STRING, version);
18366                         return 1;
18367                 }
18368         }
18369 #endif
18370
18371 #if DB_VERSION_MAJOR > 2
18372         db_env_create( NULL, 0 );
18373 #elif DB_VERSION_MAJOR > 1
18374         db_appexit( NULL );
18375 #else
18376         (void) dbopen( NULL, 0, 0, 0, NULL);
18377 #endif
18378
18379 ; return 0; }
18380 EOF
18381 if { (eval echo configure:18382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18382   rm -rf conftest*
18383   ol_cv_db_db_1=yes
18384 else
18385   echo "configure: failed program was:" >&5
18386   cat conftest.$ac_ext >&5
18387   rm -rf conftest*
18388   ol_cv_db_db_1=no
18389 fi
18390 rm -f conftest*
18391
18392         LIBS="$ol_LIBS"
18393
18394 fi
18395
18396 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18397
18398         if test $ol_cv_db_db_1 = yes ; then
18399                 ol_cv_lib_db=-ldb-1
18400         fi
18401 fi
18402
18403
18404                 if test "$ol_cv_lib_db" != no ; then
18405                         ol_cv_berkeley_db=yes
18406                 fi
18407         fi
18408 fi
18409
18410         else
18411                 ol_cv_berkeley_db=no
18412 for ac_hdr in db.h
18413 do
18414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18416 echo "configure:18417: checking for $ac_hdr" >&5
18417 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18418   echo $ac_n "(cached) $ac_c" 1>&6
18419 else
18420   cat > conftest.$ac_ext <<EOF
18421 #line 18422 "configure"
18422 #include "confdefs.h"
18423 #include <$ac_hdr>
18424 EOF
18425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18426 { (eval echo configure:18427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18428 if test -z "$ac_err"; then
18429   rm -rf conftest*
18430   eval "ac_cv_header_$ac_safe=yes"
18431 else
18432   echo "$ac_err" >&5
18433   echo "configure: failed program was:" >&5
18434   cat conftest.$ac_ext >&5
18435   rm -rf conftest*
18436   eval "ac_cv_header_$ac_safe=no"
18437 fi
18438 rm -f conftest*
18439 fi
18440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18441   echo "$ac_t""yes" 1>&6
18442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18443   cat >> confdefs.h <<EOF
18444 #define $ac_tr_hdr 1
18445 EOF
18446  
18447 else
18448   echo "$ac_t""no" 1>&6
18449 fi
18450 done
18451
18452 if test $ac_cv_header_db_h = yes; then
18453         ol_cv_lib_db=no
18454 if test $ol_cv_lib_db = no ; then
18455         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18456 echo "configure:18457: checking for Berkeley DB link (default)" >&5
18457 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18458   echo $ac_n "(cached) $ac_c" 1>&6
18459 else
18460   
18461         ol_DB_LIB=
18462         ol_LIBS=$LIBS
18463         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18464
18465         cat > conftest.$ac_ext <<EOF
18466 #line 18467 "configure"
18467 #include "confdefs.h"
18468
18469 #ifdef HAVE_DB_185_H
18470 # include <db_185.h>
18471 #else
18472 # include <db.h>
18473 #endif
18474
18475 #ifndef DB_VERSION_MAJOR
18476 # define DB_VERSION_MAJOR 1
18477 #endif
18478
18479 #ifndef NULL
18480 #define NULL ((void*)0)
18481 #endif
18482
18483 int main() {
18484
18485 #if DB_VERSION_MAJOR > 1
18486         {
18487                 char *version;
18488                 int major, minor, patch;
18489
18490                 version = db_version( &major, &minor, &patch );
18491
18492                 if( major != DB_VERSION_MAJOR ||
18493                         minor < DB_VERSION_MINOR )
18494                 {
18495                         printf("Berkeley DB version mismatch\n"
18496                                 "\theader: %s\n\tlibrary: %s\n",
18497                                 DB_VERSION_STRING, version);
18498                         return 1;
18499                 }
18500         }
18501 #endif
18502
18503 #if DB_VERSION_MAJOR > 2
18504         db_env_create( NULL, 0 );
18505 #elif DB_VERSION_MAJOR > 1
18506         db_appexit( NULL );
18507 #else
18508         (void) dbopen( NULL, 0, 0, 0, NULL);
18509 #endif
18510
18511 ; return 0; }
18512 EOF
18513 if { (eval echo configure:18514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18514   rm -rf conftest*
18515   ol_cv_db_none=yes
18516 else
18517   echo "configure: failed program was:" >&5
18518   cat conftest.$ac_ext >&5
18519   rm -rf conftest*
18520   ol_cv_db_none=no
18521 fi
18522 rm -f conftest*
18523
18524         LIBS="$ol_LIBS"
18525
18526 fi
18527
18528 echo "$ac_t""$ol_cv_db_none" 1>&6
18529
18530         if test $ol_cv_db_none = yes ; then
18531                 ol_cv_lib_db=yes
18532         fi
18533 fi
18534
18535 if test $ol_cv_lib_db = no ; then
18536         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18537 echo "configure:18538: checking for Berkeley DB link (-ldb42)" >&5
18538 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18539   echo $ac_n "(cached) $ac_c" 1>&6
18540 else
18541   
18542         ol_DB_LIB=-ldb42
18543         ol_LIBS=$LIBS
18544         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18545
18546         cat > conftest.$ac_ext <<EOF
18547 #line 18548 "configure"
18548 #include "confdefs.h"
18549
18550 #ifdef HAVE_DB_185_H
18551 # include <db_185.h>
18552 #else
18553 # include <db.h>
18554 #endif
18555
18556 #ifndef DB_VERSION_MAJOR
18557 # define DB_VERSION_MAJOR 1
18558 #endif
18559
18560 #ifndef NULL
18561 #define NULL ((void*)0)
18562 #endif
18563
18564 int main() {
18565
18566 #if DB_VERSION_MAJOR > 1
18567         {
18568                 char *version;
18569                 int major, minor, patch;
18570
18571                 version = db_version( &major, &minor, &patch );
18572
18573                 if( major != DB_VERSION_MAJOR ||
18574                         minor < DB_VERSION_MINOR )
18575                 {
18576                         printf("Berkeley DB version mismatch\n"
18577                                 "\theader: %s\n\tlibrary: %s\n",
18578                                 DB_VERSION_STRING, version);
18579                         return 1;
18580                 }
18581         }
18582 #endif
18583
18584 #if DB_VERSION_MAJOR > 2
18585         db_env_create( NULL, 0 );
18586 #elif DB_VERSION_MAJOR > 1
18587         db_appexit( NULL );
18588 #else
18589         (void) dbopen( NULL, 0, 0, 0, NULL);
18590 #endif
18591
18592 ; return 0; }
18593 EOF
18594 if { (eval echo configure:18595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18595   rm -rf conftest*
18596   ol_cv_db_db42=yes
18597 else
18598   echo "configure: failed program was:" >&5
18599   cat conftest.$ac_ext >&5
18600   rm -rf conftest*
18601   ol_cv_db_db42=no
18602 fi
18603 rm -f conftest*
18604
18605         LIBS="$ol_LIBS"
18606
18607 fi
18608
18609 echo "$ac_t""$ol_cv_db_db42" 1>&6
18610
18611         if test $ol_cv_db_db42 = yes ; then
18612                 ol_cv_lib_db=-ldb42
18613         fi
18614 fi
18615
18616 if test $ol_cv_lib_db = no ; then
18617         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18618 echo "configure:18619: checking for Berkeley DB link (-ldb-42)" >&5
18619 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18620   echo $ac_n "(cached) $ac_c" 1>&6
18621 else
18622   
18623         ol_DB_LIB=-ldb-42
18624         ol_LIBS=$LIBS
18625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18626
18627         cat > conftest.$ac_ext <<EOF
18628 #line 18629 "configure"
18629 #include "confdefs.h"
18630
18631 #ifdef HAVE_DB_185_H
18632 # include <db_185.h>
18633 #else
18634 # include <db.h>
18635 #endif
18636
18637 #ifndef DB_VERSION_MAJOR
18638 # define DB_VERSION_MAJOR 1
18639 #endif
18640
18641 #ifndef NULL
18642 #define NULL ((void*)0)
18643 #endif
18644
18645 int main() {
18646
18647 #if DB_VERSION_MAJOR > 1
18648         {
18649                 char *version;
18650                 int major, minor, patch;
18651
18652                 version = db_version( &major, &minor, &patch );
18653
18654                 if( major != DB_VERSION_MAJOR ||
18655                         minor < DB_VERSION_MINOR )
18656                 {
18657                         printf("Berkeley DB version mismatch\n"
18658                                 "\theader: %s\n\tlibrary: %s\n",
18659                                 DB_VERSION_STRING, version);
18660                         return 1;
18661                 }
18662         }
18663 #endif
18664
18665 #if DB_VERSION_MAJOR > 2
18666         db_env_create( NULL, 0 );
18667 #elif DB_VERSION_MAJOR > 1
18668         db_appexit( NULL );
18669 #else
18670         (void) dbopen( NULL, 0, 0, 0, NULL);
18671 #endif
18672
18673 ; return 0; }
18674 EOF
18675 if { (eval echo configure:18676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18676   rm -rf conftest*
18677   ol_cv_db_db_42=yes
18678 else
18679   echo "configure: failed program was:" >&5
18680   cat conftest.$ac_ext >&5
18681   rm -rf conftest*
18682   ol_cv_db_db_42=no
18683 fi
18684 rm -f conftest*
18685
18686         LIBS="$ol_LIBS"
18687
18688 fi
18689
18690 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18691
18692         if test $ol_cv_db_db_42 = yes ; then
18693                 ol_cv_lib_db=-ldb-42
18694         fi
18695 fi
18696
18697 if test $ol_cv_lib_db = no ; then
18698         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18699 echo "configure:18700: checking for Berkeley DB link (-ldb-4.2)" >&5
18700 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18701   echo $ac_n "(cached) $ac_c" 1>&6
18702 else
18703   
18704         ol_DB_LIB=-ldb-4.2
18705         ol_LIBS=$LIBS
18706         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18707
18708         cat > conftest.$ac_ext <<EOF
18709 #line 18710 "configure"
18710 #include "confdefs.h"
18711
18712 #ifdef HAVE_DB_185_H
18713 # include <db_185.h>
18714 #else
18715 # include <db.h>
18716 #endif
18717
18718 #ifndef DB_VERSION_MAJOR
18719 # define DB_VERSION_MAJOR 1
18720 #endif
18721
18722 #ifndef NULL
18723 #define NULL ((void*)0)
18724 #endif
18725
18726 int main() {
18727
18728 #if DB_VERSION_MAJOR > 1
18729         {
18730                 char *version;
18731                 int major, minor, patch;
18732
18733                 version = db_version( &major, &minor, &patch );
18734
18735                 if( major != DB_VERSION_MAJOR ||
18736                         minor < DB_VERSION_MINOR )
18737                 {
18738                         printf("Berkeley DB version mismatch\n"
18739                                 "\theader: %s\n\tlibrary: %s\n",
18740                                 DB_VERSION_STRING, version);
18741                         return 1;
18742                 }
18743         }
18744 #endif
18745
18746 #if DB_VERSION_MAJOR > 2
18747         db_env_create( NULL, 0 );
18748 #elif DB_VERSION_MAJOR > 1
18749         db_appexit( NULL );
18750 #else
18751         (void) dbopen( NULL, 0, 0, 0, NULL);
18752 #endif
18753
18754 ; return 0; }
18755 EOF
18756 if { (eval echo configure:18757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18757   rm -rf conftest*
18758   ol_cv_db_db_4_dot_2=yes
18759 else
18760   echo "configure: failed program was:" >&5
18761   cat conftest.$ac_ext >&5
18762   rm -rf conftest*
18763   ol_cv_db_db_4_dot_2=no
18764 fi
18765 rm -f conftest*
18766
18767         LIBS="$ol_LIBS"
18768
18769 fi
18770
18771 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18772
18773         if test $ol_cv_db_db_4_dot_2 = yes ; then
18774                 ol_cv_lib_db=-ldb-4.2
18775         fi
18776 fi
18777
18778 if test $ol_cv_lib_db = no ; then
18779         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18780 echo "configure:18781: checking for Berkeley DB link (-ldb-4-2)" >&5
18781 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18782   echo $ac_n "(cached) $ac_c" 1>&6
18783 else
18784   
18785         ol_DB_LIB=-ldb-4-2
18786         ol_LIBS=$LIBS
18787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18788
18789         cat > conftest.$ac_ext <<EOF
18790 #line 18791 "configure"
18791 #include "confdefs.h"
18792
18793 #ifdef HAVE_DB_185_H
18794 # include <db_185.h>
18795 #else
18796 # include <db.h>
18797 #endif
18798
18799 #ifndef DB_VERSION_MAJOR
18800 # define DB_VERSION_MAJOR 1
18801 #endif
18802
18803 #ifndef NULL
18804 #define NULL ((void*)0)
18805 #endif
18806
18807 int main() {
18808
18809 #if DB_VERSION_MAJOR > 1
18810         {
18811                 char *version;
18812                 int major, minor, patch;
18813
18814                 version = db_version( &major, &minor, &patch );
18815
18816                 if( major != DB_VERSION_MAJOR ||
18817                         minor < DB_VERSION_MINOR )
18818                 {
18819                         printf("Berkeley DB version mismatch\n"
18820                                 "\theader: %s\n\tlibrary: %s\n",
18821                                 DB_VERSION_STRING, version);
18822                         return 1;
18823                 }
18824         }
18825 #endif
18826
18827 #if DB_VERSION_MAJOR > 2
18828         db_env_create( NULL, 0 );
18829 #elif DB_VERSION_MAJOR > 1
18830         db_appexit( NULL );
18831 #else
18832         (void) dbopen( NULL, 0, 0, 0, NULL);
18833 #endif
18834
18835 ; return 0; }
18836 EOF
18837 if { (eval echo configure:18838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18838   rm -rf conftest*
18839   ol_cv_db_db_4_2=yes
18840 else
18841   echo "configure: failed program was:" >&5
18842   cat conftest.$ac_ext >&5
18843   rm -rf conftest*
18844   ol_cv_db_db_4_2=no
18845 fi
18846 rm -f conftest*
18847
18848         LIBS="$ol_LIBS"
18849
18850 fi
18851
18852 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18853
18854         if test $ol_cv_db_db_4_2 = yes ; then
18855                 ol_cv_lib_db=-ldb-4-2
18856         fi
18857 fi
18858
18859 if test $ol_cv_lib_db = no ; then
18860         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18861 echo "configure:18862: checking for Berkeley DB link (-ldb-4)" >&5
18862 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18863   echo $ac_n "(cached) $ac_c" 1>&6
18864 else
18865   
18866         ol_DB_LIB=-ldb-4
18867         ol_LIBS=$LIBS
18868         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18869
18870         cat > conftest.$ac_ext <<EOF
18871 #line 18872 "configure"
18872 #include "confdefs.h"
18873
18874 #ifdef HAVE_DB_185_H
18875 # include <db_185.h>
18876 #else
18877 # include <db.h>
18878 #endif
18879
18880 #ifndef DB_VERSION_MAJOR
18881 # define DB_VERSION_MAJOR 1
18882 #endif
18883
18884 #ifndef NULL
18885 #define NULL ((void*)0)
18886 #endif
18887
18888 int main() {
18889
18890 #if DB_VERSION_MAJOR > 1
18891         {
18892                 char *version;
18893                 int major, minor, patch;
18894
18895                 version = db_version( &major, &minor, &patch );
18896
18897                 if( major != DB_VERSION_MAJOR ||
18898                         minor < DB_VERSION_MINOR )
18899                 {
18900                         printf("Berkeley DB version mismatch\n"
18901                                 "\theader: %s\n\tlibrary: %s\n",
18902                                 DB_VERSION_STRING, version);
18903                         return 1;
18904                 }
18905         }
18906 #endif
18907
18908 #if DB_VERSION_MAJOR > 2
18909         db_env_create( NULL, 0 );
18910 #elif DB_VERSION_MAJOR > 1
18911         db_appexit( NULL );
18912 #else
18913         (void) dbopen( NULL, 0, 0, 0, NULL);
18914 #endif
18915
18916 ; return 0; }
18917 EOF
18918 if { (eval echo configure:18919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18919   rm -rf conftest*
18920   ol_cv_db_db_4=yes
18921 else
18922   echo "configure: failed program was:" >&5
18923   cat conftest.$ac_ext >&5
18924   rm -rf conftest*
18925   ol_cv_db_db_4=no
18926 fi
18927 rm -f conftest*
18928
18929         LIBS="$ol_LIBS"
18930
18931 fi
18932
18933 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18934
18935         if test $ol_cv_db_db_4 = yes ; then
18936                 ol_cv_lib_db=-ldb-4
18937         fi
18938 fi
18939
18940 if test $ol_cv_lib_db = no ; then
18941         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18942 echo "configure:18943: checking for Berkeley DB link (-ldb4)" >&5
18943 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18944   echo $ac_n "(cached) $ac_c" 1>&6
18945 else
18946   
18947         ol_DB_LIB=-ldb4
18948         ol_LIBS=$LIBS
18949         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18950
18951         cat > conftest.$ac_ext <<EOF
18952 #line 18953 "configure"
18953 #include "confdefs.h"
18954
18955 #ifdef HAVE_DB_185_H
18956 # include <db_185.h>
18957 #else
18958 # include <db.h>
18959 #endif
18960
18961 #ifndef DB_VERSION_MAJOR
18962 # define DB_VERSION_MAJOR 1
18963 #endif
18964
18965 #ifndef NULL
18966 #define NULL ((void*)0)
18967 #endif
18968
18969 int main() {
18970
18971 #if DB_VERSION_MAJOR > 1
18972         {
18973                 char *version;
18974                 int major, minor, patch;
18975
18976                 version = db_version( &major, &minor, &patch );
18977
18978                 if( major != DB_VERSION_MAJOR ||
18979                         minor < DB_VERSION_MINOR )
18980                 {
18981                         printf("Berkeley DB version mismatch\n"
18982                                 "\theader: %s\n\tlibrary: %s\n",
18983                                 DB_VERSION_STRING, version);
18984                         return 1;
18985                 }
18986         }
18987 #endif
18988
18989 #if DB_VERSION_MAJOR > 2
18990         db_env_create( NULL, 0 );
18991 #elif DB_VERSION_MAJOR > 1
18992         db_appexit( NULL );
18993 #else
18994         (void) dbopen( NULL, 0, 0, 0, NULL);
18995 #endif
18996
18997 ; return 0; }
18998 EOF
18999 if { (eval echo configure:19000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19000   rm -rf conftest*
19001   ol_cv_db_db4=yes
19002 else
19003   echo "configure: failed program was:" >&5
19004   cat conftest.$ac_ext >&5
19005   rm -rf conftest*
19006   ol_cv_db_db4=no
19007 fi
19008 rm -f conftest*
19009
19010         LIBS="$ol_LIBS"
19011
19012 fi
19013
19014 echo "$ac_t""$ol_cv_db_db4" 1>&6
19015
19016         if test $ol_cv_db_db4 = yes ; then
19017                 ol_cv_lib_db=-ldb4
19018         fi
19019 fi
19020
19021 if test $ol_cv_lib_db = no ; then
19022         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19023 echo "configure:19024: checking for Berkeley DB link (-ldb)" >&5
19024 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19025   echo $ac_n "(cached) $ac_c" 1>&6
19026 else
19027   
19028         ol_DB_LIB=-ldb
19029         ol_LIBS=$LIBS
19030         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19031
19032         cat > conftest.$ac_ext <<EOF
19033 #line 19034 "configure"
19034 #include "confdefs.h"
19035
19036 #ifdef HAVE_DB_185_H
19037 # include <db_185.h>
19038 #else
19039 # include <db.h>
19040 #endif
19041
19042 #ifndef DB_VERSION_MAJOR
19043 # define DB_VERSION_MAJOR 1
19044 #endif
19045
19046 #ifndef NULL
19047 #define NULL ((void*)0)
19048 #endif
19049
19050 int main() {
19051
19052 #if DB_VERSION_MAJOR > 1
19053         {
19054                 char *version;
19055                 int major, minor, patch;
19056
19057                 version = db_version( &major, &minor, &patch );
19058
19059                 if( major != DB_VERSION_MAJOR ||
19060                         minor < DB_VERSION_MINOR )
19061                 {
19062                         printf("Berkeley DB version mismatch\n"
19063                                 "\theader: %s\n\tlibrary: %s\n",
19064                                 DB_VERSION_STRING, version);
19065                         return 1;
19066                 }
19067         }
19068 #endif
19069
19070 #if DB_VERSION_MAJOR > 2
19071         db_env_create( NULL, 0 );
19072 #elif DB_VERSION_MAJOR > 1
19073         db_appexit( NULL );
19074 #else
19075         (void) dbopen( NULL, 0, 0, 0, NULL);
19076 #endif
19077
19078 ; return 0; }
19079 EOF
19080 if { (eval echo configure:19081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19081   rm -rf conftest*
19082   ol_cv_db_db=yes
19083 else
19084   echo "configure: failed program was:" >&5
19085   cat conftest.$ac_ext >&5
19086   rm -rf conftest*
19087   ol_cv_db_db=no
19088 fi
19089 rm -f conftest*
19090
19091         LIBS="$ol_LIBS"
19092
19093 fi
19094
19095 echo "$ac_t""$ol_cv_db_db" 1>&6
19096
19097         if test $ol_cv_db_db = yes ; then
19098                 ol_cv_lib_db=-ldb
19099         fi
19100 fi
19101
19102 if test $ol_cv_lib_db = no ; then
19103         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19104 echo "configure:19105: checking for Berkeley DB link (-ldb41)" >&5
19105 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19106   echo $ac_n "(cached) $ac_c" 1>&6
19107 else
19108   
19109         ol_DB_LIB=-ldb41
19110         ol_LIBS=$LIBS
19111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19112
19113         cat > conftest.$ac_ext <<EOF
19114 #line 19115 "configure"
19115 #include "confdefs.h"
19116
19117 #ifdef HAVE_DB_185_H
19118 # include <db_185.h>
19119 #else
19120 # include <db.h>
19121 #endif
19122
19123 #ifndef DB_VERSION_MAJOR
19124 # define DB_VERSION_MAJOR 1
19125 #endif
19126
19127 #ifndef NULL
19128 #define NULL ((void*)0)
19129 #endif
19130
19131 int main() {
19132
19133 #if DB_VERSION_MAJOR > 1
19134         {
19135                 char *version;
19136                 int major, minor, patch;
19137
19138                 version = db_version( &major, &minor, &patch );
19139
19140                 if( major != DB_VERSION_MAJOR ||
19141                         minor < DB_VERSION_MINOR )
19142                 {
19143                         printf("Berkeley DB version mismatch\n"
19144                                 "\theader: %s\n\tlibrary: %s\n",
19145                                 DB_VERSION_STRING, version);
19146                         return 1;
19147                 }
19148         }
19149 #endif
19150
19151 #if DB_VERSION_MAJOR > 2
19152         db_env_create( NULL, 0 );
19153 #elif DB_VERSION_MAJOR > 1
19154         db_appexit( NULL );
19155 #else
19156         (void) dbopen( NULL, 0, 0, 0, NULL);
19157 #endif
19158
19159 ; return 0; }
19160 EOF
19161 if { (eval echo configure:19162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19162   rm -rf conftest*
19163   ol_cv_db_db41=yes
19164 else
19165   echo "configure: failed program was:" >&5
19166   cat conftest.$ac_ext >&5
19167   rm -rf conftest*
19168   ol_cv_db_db41=no
19169 fi
19170 rm -f conftest*
19171
19172         LIBS="$ol_LIBS"
19173
19174 fi
19175
19176 echo "$ac_t""$ol_cv_db_db41" 1>&6
19177
19178         if test $ol_cv_db_db41 = yes ; then
19179                 ol_cv_lib_db=-ldb41
19180         fi
19181 fi
19182
19183 if test $ol_cv_lib_db = no ; then
19184         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19185 echo "configure:19186: checking for Berkeley DB link (-ldb-41)" >&5
19186 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19187   echo $ac_n "(cached) $ac_c" 1>&6
19188 else
19189   
19190         ol_DB_LIB=-ldb-41
19191         ol_LIBS=$LIBS
19192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19193
19194         cat > conftest.$ac_ext <<EOF
19195 #line 19196 "configure"
19196 #include "confdefs.h"
19197
19198 #ifdef HAVE_DB_185_H
19199 # include <db_185.h>
19200 #else
19201 # include <db.h>
19202 #endif
19203
19204 #ifndef DB_VERSION_MAJOR
19205 # define DB_VERSION_MAJOR 1
19206 #endif
19207
19208 #ifndef NULL
19209 #define NULL ((void*)0)
19210 #endif
19211
19212 int main() {
19213
19214 #if DB_VERSION_MAJOR > 1
19215         {
19216                 char *version;
19217                 int major, minor, patch;
19218
19219                 version = db_version( &major, &minor, &patch );
19220
19221                 if( major != DB_VERSION_MAJOR ||
19222                         minor < DB_VERSION_MINOR )
19223                 {
19224                         printf("Berkeley DB version mismatch\n"
19225                                 "\theader: %s\n\tlibrary: %s\n",
19226                                 DB_VERSION_STRING, version);
19227                         return 1;
19228                 }
19229         }
19230 #endif
19231
19232 #if DB_VERSION_MAJOR > 2
19233         db_env_create( NULL, 0 );
19234 #elif DB_VERSION_MAJOR > 1
19235         db_appexit( NULL );
19236 #else
19237         (void) dbopen( NULL, 0, 0, 0, NULL);
19238 #endif
19239
19240 ; return 0; }
19241 EOF
19242 if { (eval echo configure:19243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19243   rm -rf conftest*
19244   ol_cv_db_db_41=yes
19245 else
19246   echo "configure: failed program was:" >&5
19247   cat conftest.$ac_ext >&5
19248   rm -rf conftest*
19249   ol_cv_db_db_41=no
19250 fi
19251 rm -f conftest*
19252
19253         LIBS="$ol_LIBS"
19254
19255 fi
19256
19257 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19258
19259         if test $ol_cv_db_db_41 = yes ; then
19260                 ol_cv_lib_db=-ldb-41
19261         fi
19262 fi
19263
19264 if test $ol_cv_lib_db = no ; then
19265         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19266 echo "configure:19267: checking for Berkeley DB link (-ldb-4.1)" >&5
19267 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19268   echo $ac_n "(cached) $ac_c" 1>&6
19269 else
19270   
19271         ol_DB_LIB=-ldb-4.1
19272         ol_LIBS=$LIBS
19273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19274
19275         cat > conftest.$ac_ext <<EOF
19276 #line 19277 "configure"
19277 #include "confdefs.h"
19278
19279 #ifdef HAVE_DB_185_H
19280 # include <db_185.h>
19281 #else
19282 # include <db.h>
19283 #endif
19284
19285 #ifndef DB_VERSION_MAJOR
19286 # define DB_VERSION_MAJOR 1
19287 #endif
19288
19289 #ifndef NULL
19290 #define NULL ((void*)0)
19291 #endif
19292
19293 int main() {
19294
19295 #if DB_VERSION_MAJOR > 1
19296         {
19297                 char *version;
19298                 int major, minor, patch;
19299
19300                 version = db_version( &major, &minor, &patch );
19301
19302                 if( major != DB_VERSION_MAJOR ||
19303                         minor < DB_VERSION_MINOR )
19304                 {
19305                         printf("Berkeley DB version mismatch\n"
19306                                 "\theader: %s\n\tlibrary: %s\n",
19307                                 DB_VERSION_STRING, version);
19308                         return 1;
19309                 }
19310         }
19311 #endif
19312
19313 #if DB_VERSION_MAJOR > 2
19314         db_env_create( NULL, 0 );
19315 #elif DB_VERSION_MAJOR > 1
19316         db_appexit( NULL );
19317 #else
19318         (void) dbopen( NULL, 0, 0, 0, NULL);
19319 #endif
19320
19321 ; return 0; }
19322 EOF
19323 if { (eval echo configure:19324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19324   rm -rf conftest*
19325   ol_cv_db_db_4_dot_1=yes
19326 else
19327   echo "configure: failed program was:" >&5
19328   cat conftest.$ac_ext >&5
19329   rm -rf conftest*
19330   ol_cv_db_db_4_dot_1=no
19331 fi
19332 rm -f conftest*
19333
19334         LIBS="$ol_LIBS"
19335
19336 fi
19337
19338 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19339
19340         if test $ol_cv_db_db_4_dot_1 = yes ; then
19341                 ol_cv_lib_db=-ldb-4.1
19342         fi
19343 fi
19344
19345 if test $ol_cv_lib_db = no ; then
19346         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19347 echo "configure:19348: checking for Berkeley DB link (-ldb-4-1)" >&5
19348 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19349   echo $ac_n "(cached) $ac_c" 1>&6
19350 else
19351   
19352         ol_DB_LIB=-ldb-4-1
19353         ol_LIBS=$LIBS
19354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19355
19356         cat > conftest.$ac_ext <<EOF
19357 #line 19358 "configure"
19358 #include "confdefs.h"
19359
19360 #ifdef HAVE_DB_185_H
19361 # include <db_185.h>
19362 #else
19363 # include <db.h>
19364 #endif
19365
19366 #ifndef DB_VERSION_MAJOR
19367 # define DB_VERSION_MAJOR 1
19368 #endif
19369
19370 #ifndef NULL
19371 #define NULL ((void*)0)
19372 #endif
19373
19374 int main() {
19375
19376 #if DB_VERSION_MAJOR > 1
19377         {
19378                 char *version;
19379                 int major, minor, patch;
19380
19381                 version = db_version( &major, &minor, &patch );
19382
19383                 if( major != DB_VERSION_MAJOR ||
19384                         minor < DB_VERSION_MINOR )
19385                 {
19386                         printf("Berkeley DB version mismatch\n"
19387                                 "\theader: %s\n\tlibrary: %s\n",
19388                                 DB_VERSION_STRING, version);
19389                         return 1;
19390                 }
19391         }
19392 #endif
19393
19394 #if DB_VERSION_MAJOR > 2
19395         db_env_create( NULL, 0 );
19396 #elif DB_VERSION_MAJOR > 1
19397         db_appexit( NULL );
19398 #else
19399         (void) dbopen( NULL, 0, 0, 0, NULL);
19400 #endif
19401
19402 ; return 0; }
19403 EOF
19404 if { (eval echo configure:19405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19405   rm -rf conftest*
19406   ol_cv_db_db_4_1=yes
19407 else
19408   echo "configure: failed program was:" >&5
19409   cat conftest.$ac_ext >&5
19410   rm -rf conftest*
19411   ol_cv_db_db_4_1=no
19412 fi
19413 rm -f conftest*
19414
19415         LIBS="$ol_LIBS"
19416
19417 fi
19418
19419 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19420
19421         if test $ol_cv_db_db_4_1 = yes ; then
19422                 ol_cv_lib_db=-ldb-4-1
19423         fi
19424 fi
19425
19426 if test $ol_cv_lib_db = no ; then
19427         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19428 echo "configure:19429: checking for Berkeley DB link (-ldb3)" >&5
19429 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19430   echo $ac_n "(cached) $ac_c" 1>&6
19431 else
19432   
19433         ol_DB_LIB=-ldb3
19434         ol_LIBS=$LIBS
19435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19436
19437         cat > conftest.$ac_ext <<EOF
19438 #line 19439 "configure"
19439 #include "confdefs.h"
19440
19441 #ifdef HAVE_DB_185_H
19442 # include <db_185.h>
19443 #else
19444 # include <db.h>
19445 #endif
19446
19447 #ifndef DB_VERSION_MAJOR
19448 # define DB_VERSION_MAJOR 1
19449 #endif
19450
19451 #ifndef NULL
19452 #define NULL ((void*)0)
19453 #endif
19454
19455 int main() {
19456
19457 #if DB_VERSION_MAJOR > 1
19458         {
19459                 char *version;
19460                 int major, minor, patch;
19461
19462                 version = db_version( &major, &minor, &patch );
19463
19464                 if( major != DB_VERSION_MAJOR ||
19465                         minor < DB_VERSION_MINOR )
19466                 {
19467                         printf("Berkeley DB version mismatch\n"
19468                                 "\theader: %s\n\tlibrary: %s\n",
19469                                 DB_VERSION_STRING, version);
19470                         return 1;
19471                 }
19472         }
19473 #endif
19474
19475 #if DB_VERSION_MAJOR > 2
19476         db_env_create( NULL, 0 );
19477 #elif DB_VERSION_MAJOR > 1
19478         db_appexit( NULL );
19479 #else
19480         (void) dbopen( NULL, 0, 0, 0, NULL);
19481 #endif
19482
19483 ; return 0; }
19484 EOF
19485 if { (eval echo configure:19486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19486   rm -rf conftest*
19487   ol_cv_db_db3=yes
19488 else
19489   echo "configure: failed program was:" >&5
19490   cat conftest.$ac_ext >&5
19491   rm -rf conftest*
19492   ol_cv_db_db3=no
19493 fi
19494 rm -f conftest*
19495
19496         LIBS="$ol_LIBS"
19497
19498 fi
19499
19500 echo "$ac_t""$ol_cv_db_db3" 1>&6
19501
19502         if test $ol_cv_db_db3 = yes ; then
19503                 ol_cv_lib_db=-ldb3
19504         fi
19505 fi
19506
19507 if test $ol_cv_lib_db = no ; then
19508         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19509 echo "configure:19510: checking for Berkeley DB link (-ldb-3)" >&5
19510 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19511   echo $ac_n "(cached) $ac_c" 1>&6
19512 else
19513   
19514         ol_DB_LIB=-ldb-3
19515         ol_LIBS=$LIBS
19516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19517
19518         cat > conftest.$ac_ext <<EOF
19519 #line 19520 "configure"
19520 #include "confdefs.h"
19521
19522 #ifdef HAVE_DB_185_H
19523 # include <db_185.h>
19524 #else
19525 # include <db.h>
19526 #endif
19527
19528 #ifndef DB_VERSION_MAJOR
19529 # define DB_VERSION_MAJOR 1
19530 #endif
19531
19532 #ifndef NULL
19533 #define NULL ((void*)0)
19534 #endif
19535
19536 int main() {
19537
19538 #if DB_VERSION_MAJOR > 1
19539         {
19540                 char *version;
19541                 int major, minor, patch;
19542
19543                 version = db_version( &major, &minor, &patch );
19544
19545                 if( major != DB_VERSION_MAJOR ||
19546                         minor < DB_VERSION_MINOR )
19547                 {
19548                         printf("Berkeley DB version mismatch\n"
19549                                 "\theader: %s\n\tlibrary: %s\n",
19550                                 DB_VERSION_STRING, version);
19551                         return 1;
19552                 }
19553         }
19554 #endif
19555
19556 #if DB_VERSION_MAJOR > 2
19557         db_env_create( NULL, 0 );
19558 #elif DB_VERSION_MAJOR > 1
19559         db_appexit( NULL );
19560 #else
19561         (void) dbopen( NULL, 0, 0, 0, NULL);
19562 #endif
19563
19564 ; return 0; }
19565 EOF
19566 if { (eval echo configure:19567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19567   rm -rf conftest*
19568   ol_cv_db_db_3=yes
19569 else
19570   echo "configure: failed program was:" >&5
19571   cat conftest.$ac_ext >&5
19572   rm -rf conftest*
19573   ol_cv_db_db_3=no
19574 fi
19575 rm -f conftest*
19576
19577         LIBS="$ol_LIBS"
19578
19579 fi
19580
19581 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19582
19583         if test $ol_cv_db_db_3 = yes ; then
19584                 ol_cv_lib_db=-ldb-3
19585         fi
19586 fi
19587
19588 if test $ol_cv_lib_db = no ; then
19589         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19590 echo "configure:19591: checking for Berkeley DB link (-ldb2)" >&5
19591 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19592   echo $ac_n "(cached) $ac_c" 1>&6
19593 else
19594   
19595         ol_DB_LIB=-ldb2
19596         ol_LIBS=$LIBS
19597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19598
19599         cat > conftest.$ac_ext <<EOF
19600 #line 19601 "configure"
19601 #include "confdefs.h"
19602
19603 #ifdef HAVE_DB_185_H
19604 # include <db_185.h>
19605 #else
19606 # include <db.h>
19607 #endif
19608
19609 #ifndef DB_VERSION_MAJOR
19610 # define DB_VERSION_MAJOR 1
19611 #endif
19612
19613 #ifndef NULL
19614 #define NULL ((void*)0)
19615 #endif
19616
19617 int main() {
19618
19619 #if DB_VERSION_MAJOR > 1
19620         {
19621                 char *version;
19622                 int major, minor, patch;
19623
19624                 version = db_version( &major, &minor, &patch );
19625
19626                 if( major != DB_VERSION_MAJOR ||
19627                         minor < DB_VERSION_MINOR )
19628                 {
19629                         printf("Berkeley DB version mismatch\n"
19630                                 "\theader: %s\n\tlibrary: %s\n",
19631                                 DB_VERSION_STRING, version);
19632                         return 1;
19633                 }
19634         }
19635 #endif
19636
19637 #if DB_VERSION_MAJOR > 2
19638         db_env_create( NULL, 0 );
19639 #elif DB_VERSION_MAJOR > 1
19640         db_appexit( NULL );
19641 #else
19642         (void) dbopen( NULL, 0, 0, 0, NULL);
19643 #endif
19644
19645 ; return 0; }
19646 EOF
19647 if { (eval echo configure:19648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19648   rm -rf conftest*
19649   ol_cv_db_db2=yes
19650 else
19651   echo "configure: failed program was:" >&5
19652   cat conftest.$ac_ext >&5
19653   rm -rf conftest*
19654   ol_cv_db_db2=no
19655 fi
19656 rm -f conftest*
19657
19658         LIBS="$ol_LIBS"
19659
19660 fi
19661
19662 echo "$ac_t""$ol_cv_db_db2" 1>&6
19663
19664         if test $ol_cv_db_db2 = yes ; then
19665                 ol_cv_lib_db=-ldb2
19666         fi
19667 fi
19668
19669 if test $ol_cv_lib_db = no ; then
19670         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19671 echo "configure:19672: checking for Berkeley DB link (-ldb-2)" >&5
19672 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19673   echo $ac_n "(cached) $ac_c" 1>&6
19674 else
19675   
19676         ol_DB_LIB=-ldb-2
19677         ol_LIBS=$LIBS
19678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19679
19680         cat > conftest.$ac_ext <<EOF
19681 #line 19682 "configure"
19682 #include "confdefs.h"
19683
19684 #ifdef HAVE_DB_185_H
19685 # include <db_185.h>
19686 #else
19687 # include <db.h>
19688 #endif
19689
19690 #ifndef DB_VERSION_MAJOR
19691 # define DB_VERSION_MAJOR 1
19692 #endif
19693
19694 #ifndef NULL
19695 #define NULL ((void*)0)
19696 #endif
19697
19698 int main() {
19699
19700 #if DB_VERSION_MAJOR > 1
19701         {
19702                 char *version;
19703                 int major, minor, patch;
19704
19705                 version = db_version( &major, &minor, &patch );
19706
19707                 if( major != DB_VERSION_MAJOR ||
19708                         minor < DB_VERSION_MINOR )
19709                 {
19710                         printf("Berkeley DB version mismatch\n"
19711                                 "\theader: %s\n\tlibrary: %s\n",
19712                                 DB_VERSION_STRING, version);
19713                         return 1;
19714                 }
19715         }
19716 #endif
19717
19718 #if DB_VERSION_MAJOR > 2
19719         db_env_create( NULL, 0 );
19720 #elif DB_VERSION_MAJOR > 1
19721         db_appexit( NULL );
19722 #else
19723         (void) dbopen( NULL, 0, 0, 0, NULL);
19724 #endif
19725
19726 ; return 0; }
19727 EOF
19728 if { (eval echo configure:19729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19729   rm -rf conftest*
19730   ol_cv_db_db_2=yes
19731 else
19732   echo "configure: failed program was:" >&5
19733   cat conftest.$ac_ext >&5
19734   rm -rf conftest*
19735   ol_cv_db_db_2=no
19736 fi
19737 rm -f conftest*
19738
19739         LIBS="$ol_LIBS"
19740
19741 fi
19742
19743 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19744
19745         if test $ol_cv_db_db_2 = yes ; then
19746                 ol_cv_lib_db=-ldb-2
19747         fi
19748 fi
19749
19750 if test $ol_cv_lib_db = no ; then
19751         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19752 echo "configure:19753: checking for Berkeley DB link (-ldb1)" >&5
19753 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19754   echo $ac_n "(cached) $ac_c" 1>&6
19755 else
19756   
19757         ol_DB_LIB=-ldb1
19758         ol_LIBS=$LIBS
19759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19760
19761         cat > conftest.$ac_ext <<EOF
19762 #line 19763 "configure"
19763 #include "confdefs.h"
19764
19765 #ifdef HAVE_DB_185_H
19766 # include <db_185.h>
19767 #else
19768 # include <db.h>
19769 #endif
19770
19771 #ifndef DB_VERSION_MAJOR
19772 # define DB_VERSION_MAJOR 1
19773 #endif
19774
19775 #ifndef NULL
19776 #define NULL ((void*)0)
19777 #endif
19778
19779 int main() {
19780
19781 #if DB_VERSION_MAJOR > 1
19782         {
19783                 char *version;
19784                 int major, minor, patch;
19785
19786                 version = db_version( &major, &minor, &patch );
19787
19788                 if( major != DB_VERSION_MAJOR ||
19789                         minor < DB_VERSION_MINOR )
19790                 {
19791                         printf("Berkeley DB version mismatch\n"
19792                                 "\theader: %s\n\tlibrary: %s\n",
19793                                 DB_VERSION_STRING, version);
19794                         return 1;
19795                 }
19796         }
19797 #endif
19798
19799 #if DB_VERSION_MAJOR > 2
19800         db_env_create( NULL, 0 );
19801 #elif DB_VERSION_MAJOR > 1
19802         db_appexit( NULL );
19803 #else
19804         (void) dbopen( NULL, 0, 0, 0, NULL);
19805 #endif
19806
19807 ; return 0; }
19808 EOF
19809 if { (eval echo configure:19810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19810   rm -rf conftest*
19811   ol_cv_db_db1=yes
19812 else
19813   echo "configure: failed program was:" >&5
19814   cat conftest.$ac_ext >&5
19815   rm -rf conftest*
19816   ol_cv_db_db1=no
19817 fi
19818 rm -f conftest*
19819
19820         LIBS="$ol_LIBS"
19821
19822 fi
19823
19824 echo "$ac_t""$ol_cv_db_db1" 1>&6
19825
19826         if test $ol_cv_db_db1 = yes ; then
19827                 ol_cv_lib_db=-ldb1
19828         fi
19829 fi
19830
19831 if test $ol_cv_lib_db = no ; then
19832         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19833 echo "configure:19834: checking for Berkeley DB link (-ldb-1)" >&5
19834 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19835   echo $ac_n "(cached) $ac_c" 1>&6
19836 else
19837   
19838         ol_DB_LIB=-ldb-1
19839         ol_LIBS=$LIBS
19840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19841
19842         cat > conftest.$ac_ext <<EOF
19843 #line 19844 "configure"
19844 #include "confdefs.h"
19845
19846 #ifdef HAVE_DB_185_H
19847 # include <db_185.h>
19848 #else
19849 # include <db.h>
19850 #endif
19851
19852 #ifndef DB_VERSION_MAJOR
19853 # define DB_VERSION_MAJOR 1
19854 #endif
19855
19856 #ifndef NULL
19857 #define NULL ((void*)0)
19858 #endif
19859
19860 int main() {
19861
19862 #if DB_VERSION_MAJOR > 1
19863         {
19864                 char *version;
19865                 int major, minor, patch;
19866
19867                 version = db_version( &major, &minor, &patch );
19868
19869                 if( major != DB_VERSION_MAJOR ||
19870                         minor < DB_VERSION_MINOR )
19871                 {
19872                         printf("Berkeley DB version mismatch\n"
19873                                 "\theader: %s\n\tlibrary: %s\n",
19874                                 DB_VERSION_STRING, version);
19875                         return 1;
19876                 }
19877         }
19878 #endif
19879
19880 #if DB_VERSION_MAJOR > 2
19881         db_env_create( NULL, 0 );
19882 #elif DB_VERSION_MAJOR > 1
19883         db_appexit( NULL );
19884 #else
19885         (void) dbopen( NULL, 0, 0, 0, NULL);
19886 #endif
19887
19888 ; return 0; }
19889 EOF
19890 if { (eval echo configure:19891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19891   rm -rf conftest*
19892   ol_cv_db_db_1=yes
19893 else
19894   echo "configure: failed program was:" >&5
19895   cat conftest.$ac_ext >&5
19896   rm -rf conftest*
19897   ol_cv_db_db_1=no
19898 fi
19899 rm -f conftest*
19900
19901         LIBS="$ol_LIBS"
19902
19903 fi
19904
19905 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19906
19907         if test $ol_cv_db_db_1 = yes ; then
19908                 ol_cv_lib_db=-ldb-1
19909         fi
19910 fi
19911
19912
19913         if test "$ol_cv_lib_db" != no ; then
19914                 ol_cv_berkeley_db=yes
19915                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19916 echo "configure:19917: checking for Berkeley DB version match" >&5
19917 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19918   echo $ac_n "(cached) $ac_c" 1>&6
19919 else
19920   
19921         ol_LIBS="$LIBS"
19922         LIBS="$LTHREAD_LIBS $LIBS"
19923         if test $ol_cv_lib_db != yes ; then
19924                 LIBS="$ol_cv_lib_db $LIBS"
19925         fi
19926
19927         if test "$cross_compiling" = yes; then
19928   ol_cv_berkeley_db_version=cross
19929 else
19930   cat > conftest.$ac_ext <<EOF
19931 #line 19932 "configure"
19932 #include "confdefs.h"
19933
19934 #ifdef HAVE_DB_185_H
19935         choke me;
19936 #else
19937 #include <db.h>
19938 #endif
19939 #ifndef DB_VERSION_MAJOR
19940 # define DB_VERSION_MAJOR 1
19941 #endif
19942 #ifndef NULL
19943 #define NULL ((void *)0)
19944 #endif
19945 main()
19946 {
19947 #if DB_VERSION_MAJOR > 1
19948         char *version;
19949         int major, minor, patch;
19950
19951         version = db_version( &major, &minor, &patch );
19952
19953         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19954                 printf("Berkeley DB version mismatch\n"
19955                         "\theader: %s\n\tlibrary: %s\n",
19956                         DB_VERSION_STRING, version);
19957                 return 1;
19958         }
19959 #endif
19960
19961         return 0;
19962 }
19963 EOF
19964 if { (eval echo configure:19965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19965 then
19966   ol_cv_berkeley_db_version=yes
19967 else
19968   echo "configure: failed program was:" >&5
19969   cat conftest.$ac_ext >&5
19970   rm -fr conftest*
19971   ol_cv_berkeley_db_version=no
19972 fi
19973 rm -fr conftest*
19974 fi
19975
19976
19977         LIBS="$ol_LIBS"
19978
19979 fi
19980
19981 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19982
19983         if test $ol_cv_berkeley_db_version = no ; then
19984                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19985         fi
19986
19987                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19988 echo "configure:19989: checking for Berkeley DB thread support" >&5
19989 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19990   echo $ac_n "(cached) $ac_c" 1>&6
19991 else
19992   
19993         ol_LIBS="$LIBS"
19994         LIBS="$LTHREAD_LIBS $LIBS"
19995         if test $ol_cv_lib_db != yes ; then
19996                 LIBS="$ol_cv_lib_db $LIBS"
19997         fi
19998
19999         if test "$cross_compiling" = yes; then
20000   ol_cv_berkeley_db_thread=cross
20001 else
20002   cat > conftest.$ac_ext <<EOF
20003 #line 20004 "configure"
20004 #include "confdefs.h"
20005
20006 #ifdef HAVE_DB_185_H
20007         choke me;
20008 #else
20009 #include <db.h>
20010 #endif
20011 #ifndef NULL
20012 #define NULL ((void *)0)
20013 #endif
20014 main()
20015 {
20016         int rc;
20017         u_int32_t flags = DB_CREATE |
20018 #ifdef DB_PRIVATE
20019                 DB_PRIVATE |
20020 #endif
20021                 DB_THREAD;
20022
20023 #if DB_VERSION_MAJOR > 2
20024         DB_ENV *env = NULL;
20025
20026         rc = db_env_create( &env, 0 );
20027
20028         flags |= DB_INIT_MPOOL;
20029 #ifdef DB_MPOOL_PRIVATE
20030         flags |= DB_MPOOL_PRIVATE;
20031 #endif
20032
20033         if( rc ) {
20034                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20035                 return rc;
20036         }
20037
20038 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20039         rc = env->open( env, NULL, flags, 0 );
20040 #else
20041         rc = env->open( env, NULL, NULL, flags, 0 );
20042 #endif
20043
20044         if ( rc == 0 ) {
20045                 rc = env->close( env, 0 );
20046         }
20047
20048         if( rc ) {
20049                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20050                 return rc;
20051         }
20052
20053 #else
20054         DB_ENV env;
20055         memset( &env, '\0', sizeof(env) );
20056
20057         rc = db_appinit( NULL, NULL, &env, flags );
20058
20059         if( rc == 0 ) {
20060                 db_appexit( &env );
20061         }
20062
20063         unlink("__db_mpool.share");
20064         unlink("__db_lock.share");
20065 #endif
20066
20067         return rc;
20068 }
20069 EOF
20070 if { (eval echo configure:20071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20071 then
20072   ol_cv_berkeley_db_thread=yes
20073 else
20074   echo "configure: failed program was:" >&5
20075   cat conftest.$ac_ext >&5
20076   rm -fr conftest*
20077   ol_cv_berkeley_db_thread=no
20078 fi
20079 rm -fr conftest*
20080 fi
20081
20082
20083         LIBS="$ol_LIBS"
20084
20085 fi
20086
20087 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20088
20089         if test $ol_cv_berkeley_db_thread != no ; then
20090                 cat >> confdefs.h <<\EOF
20091 #define HAVE_BERKELEY_DB_THREAD 1
20092 EOF
20093
20094         fi
20095
20096         fi
20097 fi
20098
20099         fi
20100
20101         if test $ol_cv_berkeley_db != no ; then
20102                 cat >> confdefs.h <<\EOF
20103 #define HAVE_BERKELEY_DB 1
20104 EOF
20105
20106
20107                 ol_link_ldbm=berkeley
20108                 ol_with_ldbm_api=berkeley
20109
20110                 if test $ol_with_ldbm_type = hash ; then
20111                         cat >> confdefs.h <<\EOF
20112 #define LDBM_USE_DBHASH 1
20113 EOF
20114
20115                 else
20116                         cat >> confdefs.h <<\EOF
20117 #define LDBM_USE_DBBTREE 1
20118 EOF
20119
20120                 fi
20121
20122                                                 if test $ol_cv_lib_db != yes ; then
20123                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20124                 fi
20125         fi
20126 fi
20127
20128 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20129         if test $ol_link_ldbm != berkeley ; then
20130                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20131         else
20132                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20133 echo "configure:20134: checking Berkeley DB version for BDB backend" >&5
20134 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20135   echo $ac_n "(cached) $ac_c" 1>&6
20136 else
20137   
20138         cat > conftest.$ac_ext <<EOF
20139 #line 20140 "configure"
20140 #include "confdefs.h"
20141
20142 #include <db.h>
20143
20144  /* this check could be improved */
20145 #ifndef DB_VERSION_MAJOR
20146 #       define DB_VERSION_MAJOR 1
20147 #endif
20148 #ifndef DB_VERSION_MINOR
20149 #       define DB_VERSION_MINOR 0
20150 #endif
20151
20152 /* require 4.2 or later */
20153 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20154         __db_version_compat
20155 #endif
20156         
20157 EOF
20158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20159   egrep "__db_version_compat" >/dev/null 2>&1; then
20160   rm -rf conftest*
20161   ol_cv_bdb_compat=yes
20162 else
20163   rm -rf conftest*
20164   ol_cv_bdb_compat=no
20165 fi
20166 rm -f conftest*
20167
20168 fi
20169
20170 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20171
20172
20173                 if test $ol_cv_bdb_compat != yes ; then
20174                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20175                 fi
20176         fi
20177 fi
20178
20179 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20180         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20181         ol_with_ldbm_api=none
20182 fi
20183
20184 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20185         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20186 echo "configure:20187: checking for MDBM library" >&5
20187 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20188   echo $ac_n "(cached) $ac_c" 1>&6
20189 else
20190         ol_LIBS="$LIBS"
20191         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20192 echo "configure:20193: checking for mdbm_set_chain" >&5
20193 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20194   echo $ac_n "(cached) $ac_c" 1>&6
20195 else
20196   cat > conftest.$ac_ext <<EOF
20197 #line 20198 "configure"
20198 #include "confdefs.h"
20199 /* System header to define __stub macros and hopefully few prototypes,
20200     which can conflict with char mdbm_set_chain(); below.  */
20201 #include <assert.h>
20202 /* Override any gcc2 internal prototype to avoid an error.  */
20203 /* We use char because int might match the return type of a gcc2
20204     builtin and then its argument prototype would still apply.  */
20205 char mdbm_set_chain();
20206 char (*f)();
20207
20208 int main() {
20209
20210 /* The GNU C library defines this for functions which it implements
20211     to always fail with ENOSYS.  Some functions are actually named
20212     something starting with __ and the normal name is an alias.  */
20213 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20214 choke me
20215 #else
20216 f = mdbm_set_chain;
20217 #endif
20218
20219 ; return 0; }
20220 EOF
20221 if { (eval echo configure:20222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20222   rm -rf conftest*
20223   eval "ac_cv_func_mdbm_set_chain=yes"
20224 else
20225   echo "configure: failed program was:" >&5
20226   cat conftest.$ac_ext >&5
20227   rm -rf conftest*
20228   eval "ac_cv_func_mdbm_set_chain=no"
20229 fi
20230 rm -f conftest*
20231 fi
20232
20233 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20234   echo "$ac_t""yes" 1>&6
20235   ol_cv_lib_mdbm=yes
20236 else
20237   echo "$ac_t""no" 1>&6
20238
20239                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20240 echo "configure:20241: checking for mdbm_set_chain in -lmdbm" >&5
20241 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20243   echo $ac_n "(cached) $ac_c" 1>&6
20244 else
20245   ac_save_LIBS="$LIBS"
20246 LIBS="-lmdbm  $LIBS"
20247 cat > conftest.$ac_ext <<EOF
20248 #line 20249 "configure"
20249 #include "confdefs.h"
20250 /* Override any gcc2 internal prototype to avoid an error.  */
20251 /* We use char because int might match the return type of a gcc2
20252     builtin and then its argument prototype would still apply.  */
20253 char mdbm_set_chain();
20254
20255 int main() {
20256 mdbm_set_chain()
20257 ; return 0; }
20258 EOF
20259 if { (eval echo configure:20260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20260   rm -rf conftest*
20261   eval "ac_cv_lib_$ac_lib_var=yes"
20262 else
20263   echo "configure: failed program was:" >&5
20264   cat conftest.$ac_ext >&5
20265   rm -rf conftest*
20266   eval "ac_cv_lib_$ac_lib_var=no"
20267 fi
20268 rm -f conftest*
20269 LIBS="$ac_save_LIBS"
20270
20271 fi
20272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20273   echo "$ac_t""yes" 1>&6
20274   ol_cv_lib_mdbm=-lmdbm
20275 else
20276   echo "$ac_t""no" 1>&6
20277 ol_cv_lib_mdbm=no
20278 fi
20279
20280         
20281 fi
20282
20283         LIBS="$ol_LIBS"
20284
20285 fi
20286
20287 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20288
20289
20290  for ac_hdr in mdbm.h
20291 do
20292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20294 echo "configure:20295: checking for $ac_hdr" >&5
20295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20296   echo $ac_n "(cached) $ac_c" 1>&6
20297 else
20298   cat > conftest.$ac_ext <<EOF
20299 #line 20300 "configure"
20300 #include "confdefs.h"
20301 #include <$ac_hdr>
20302 EOF
20303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20304 { (eval echo configure:20305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20306 if test -z "$ac_err"; then
20307   rm -rf conftest*
20308   eval "ac_cv_header_$ac_safe=yes"
20309 else
20310   echo "$ac_err" >&5
20311   echo "configure: failed program was:" >&5
20312   cat conftest.$ac_ext >&5
20313   rm -rf conftest*
20314   eval "ac_cv_header_$ac_safe=no"
20315 fi
20316 rm -f conftest*
20317 fi
20318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20319   echo "$ac_t""yes" 1>&6
20320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20321   cat >> confdefs.h <<EOF
20322 #define $ac_tr_hdr 1
20323 EOF
20324  
20325 else
20326   echo "$ac_t""no" 1>&6
20327 fi
20328 done
20329
20330  echo $ac_n "checking for db""... $ac_c" 1>&6
20331 echo "configure:20332: checking for db" >&5
20332 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20333   echo $ac_n "(cached) $ac_c" 1>&6
20334 else
20335   
20336         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20337                 ol_cv_mdbm=no
20338         else
20339                 ol_cv_mdbm=yes
20340         fi
20341
20342 fi
20343
20344 echo "$ac_t""$ol_cv_mdbm" 1>&6
20345  if test $ol_cv_mdbm = yes ; then
20346         cat >> confdefs.h <<\EOF
20347 #define HAVE_MDBM 1
20348 EOF
20349
20350  fi
20351
20352
20353         if test $ol_cv_mdbm = yes ; then
20354                 ol_link_ldbm=mdbm
20355                 ol_with_ldbm_api=mdbm
20356                 if test $ol_cv_lib_mdbm != yes ; then
20357                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20358                 fi
20359         fi
20360 fi
20361
20362 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20363         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20364 echo "configure:20365: checking for GDBM library" >&5
20365 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20366   echo $ac_n "(cached) $ac_c" 1>&6
20367 else
20368         ol_LIBS="$LIBS"
20369         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20370 echo "configure:20371: checking for gdbm_open" >&5
20371 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20372   echo $ac_n "(cached) $ac_c" 1>&6
20373 else
20374   cat > conftest.$ac_ext <<EOF
20375 #line 20376 "configure"
20376 #include "confdefs.h"
20377 /* System header to define __stub macros and hopefully few prototypes,
20378     which can conflict with char gdbm_open(); below.  */
20379 #include <assert.h>
20380 /* Override any gcc2 internal prototype to avoid an error.  */
20381 /* We use char because int might match the return type of a gcc2
20382     builtin and then its argument prototype would still apply.  */
20383 char gdbm_open();
20384 char (*f)();
20385
20386 int main() {
20387
20388 /* The GNU C library defines this for functions which it implements
20389     to always fail with ENOSYS.  Some functions are actually named
20390     something starting with __ and the normal name is an alias.  */
20391 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20392 choke me
20393 #else
20394 f = gdbm_open;
20395 #endif
20396
20397 ; return 0; }
20398 EOF
20399 if { (eval echo configure:20400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20400   rm -rf conftest*
20401   eval "ac_cv_func_gdbm_open=yes"
20402 else
20403   echo "configure: failed program was:" >&5
20404   cat conftest.$ac_ext >&5
20405   rm -rf conftest*
20406   eval "ac_cv_func_gdbm_open=no"
20407 fi
20408 rm -f conftest*
20409 fi
20410
20411 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20412   echo "$ac_t""yes" 1>&6
20413   ol_cv_lib_gdbm=yes
20414 else
20415   echo "$ac_t""no" 1>&6
20416
20417                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20418 echo "configure:20419: checking for gdbm_open in -lgdbm" >&5
20419 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20421   echo $ac_n "(cached) $ac_c" 1>&6
20422 else
20423   ac_save_LIBS="$LIBS"
20424 LIBS="-lgdbm  $LIBS"
20425 cat > conftest.$ac_ext <<EOF
20426 #line 20427 "configure"
20427 #include "confdefs.h"
20428 /* Override any gcc2 internal prototype to avoid an error.  */
20429 /* We use char because int might match the return type of a gcc2
20430     builtin and then its argument prototype would still apply.  */
20431 char gdbm_open();
20432
20433 int main() {
20434 gdbm_open()
20435 ; return 0; }
20436 EOF
20437 if { (eval echo configure:20438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20438   rm -rf conftest*
20439   eval "ac_cv_lib_$ac_lib_var=yes"
20440 else
20441   echo "configure: failed program was:" >&5
20442   cat conftest.$ac_ext >&5
20443   rm -rf conftest*
20444   eval "ac_cv_lib_$ac_lib_var=no"
20445 fi
20446 rm -f conftest*
20447 LIBS="$ac_save_LIBS"
20448
20449 fi
20450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20451   echo "$ac_t""yes" 1>&6
20452   ol_cv_lib_gdbm=-lgdbm
20453 else
20454   echo "$ac_t""no" 1>&6
20455 ol_cv_lib_gdbm=no
20456 fi
20457
20458         
20459 fi
20460
20461         LIBS="$ol_LIBS"
20462
20463 fi
20464
20465 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20466
20467
20468  for ac_hdr in gdbm.h
20469 do
20470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20472 echo "configure:20473: checking for $ac_hdr" >&5
20473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20474   echo $ac_n "(cached) $ac_c" 1>&6
20475 else
20476   cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479 #include <$ac_hdr>
20480 EOF
20481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20482 { (eval echo configure:20483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20484 if test -z "$ac_err"; then
20485   rm -rf conftest*
20486   eval "ac_cv_header_$ac_safe=yes"
20487 else
20488   echo "$ac_err" >&5
20489   echo "configure: failed program was:" >&5
20490   cat conftest.$ac_ext >&5
20491   rm -rf conftest*
20492   eval "ac_cv_header_$ac_safe=no"
20493 fi
20494 rm -f conftest*
20495 fi
20496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20497   echo "$ac_t""yes" 1>&6
20498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20499   cat >> confdefs.h <<EOF
20500 #define $ac_tr_hdr 1
20501 EOF
20502  
20503 else
20504   echo "$ac_t""no" 1>&6
20505 fi
20506 done
20507
20508  echo $ac_n "checking for db""... $ac_c" 1>&6
20509 echo "configure:20510: checking for db" >&5
20510 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20511   echo $ac_n "(cached) $ac_c" 1>&6
20512 else
20513   
20514         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20515                 ol_cv_gdbm=no
20516         else
20517                 ol_cv_gdbm=yes
20518         fi
20519
20520 fi
20521
20522 echo "$ac_t""$ol_cv_gdbm" 1>&6
20523  if test $ol_cv_gdbm = yes ; then
20524         cat >> confdefs.h <<\EOF
20525 #define HAVE_GDBM 1
20526 EOF
20527
20528  fi
20529
20530
20531         if test $ol_cv_gdbm = yes ; then
20532                 ol_link_ldbm=gdbm
20533                 ol_with_ldbm_api=gdbm
20534
20535                 if test $ol_cv_lib_gdbm != yes ; then
20536                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20537                 fi
20538         fi
20539 fi
20540
20541 if test $ol_with_ldbm_api = ndbm ; then
20542         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20543 echo "configure:20544: checking for NDBM library" >&5
20544 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20545   echo $ac_n "(cached) $ac_c" 1>&6
20546 else
20547         ol_LIBS="$LIBS"
20548         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20549 echo "configure:20550: checking for dbm_open" >&5
20550 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20551   echo $ac_n "(cached) $ac_c" 1>&6
20552 else
20553   cat > conftest.$ac_ext <<EOF
20554 #line 20555 "configure"
20555 #include "confdefs.h"
20556 /* System header to define __stub macros and hopefully few prototypes,
20557     which can conflict with char dbm_open(); below.  */
20558 #include <assert.h>
20559 /* Override any gcc2 internal prototype to avoid an error.  */
20560 /* We use char because int might match the return type of a gcc2
20561     builtin and then its argument prototype would still apply.  */
20562 char dbm_open();
20563 char (*f)();
20564
20565 int main() {
20566
20567 /* The GNU C library defines this for functions which it implements
20568     to always fail with ENOSYS.  Some functions are actually named
20569     something starting with __ and the normal name is an alias.  */
20570 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20571 choke me
20572 #else
20573 f = dbm_open;
20574 #endif
20575
20576 ; return 0; }
20577 EOF
20578 if { (eval echo configure:20579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20579   rm -rf conftest*
20580   eval "ac_cv_func_dbm_open=yes"
20581 else
20582   echo "configure: failed program was:" >&5
20583   cat conftest.$ac_ext >&5
20584   rm -rf conftest*
20585   eval "ac_cv_func_dbm_open=no"
20586 fi
20587 rm -f conftest*
20588 fi
20589
20590 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20591   echo "$ac_t""yes" 1>&6
20592   ol_cv_lib_ndbm=yes
20593 else
20594   echo "$ac_t""no" 1>&6
20595
20596                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20597 echo "configure:20598: checking for dbm_open in -lndbm" >&5
20598 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20600   echo $ac_n "(cached) $ac_c" 1>&6
20601 else
20602   ac_save_LIBS="$LIBS"
20603 LIBS="-lndbm  $LIBS"
20604 cat > conftest.$ac_ext <<EOF
20605 #line 20606 "configure"
20606 #include "confdefs.h"
20607 /* Override any gcc2 internal prototype to avoid an error.  */
20608 /* We use char because int might match the return type of a gcc2
20609     builtin and then its argument prototype would still apply.  */
20610 char dbm_open();
20611
20612 int main() {
20613 dbm_open()
20614 ; return 0; }
20615 EOF
20616 if { (eval echo configure:20617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20617   rm -rf conftest*
20618   eval "ac_cv_lib_$ac_lib_var=yes"
20619 else
20620   echo "configure: failed program was:" >&5
20621   cat conftest.$ac_ext >&5
20622   rm -rf conftest*
20623   eval "ac_cv_lib_$ac_lib_var=no"
20624 fi
20625 rm -f conftest*
20626 LIBS="$ac_save_LIBS"
20627
20628 fi
20629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20630   echo "$ac_t""yes" 1>&6
20631   ol_cv_lib_ndbm=-lndbm
20632 else
20633   echo "$ac_t""no" 1>&6
20634
20635                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20636 echo "configure:20637: checking for dbm_open in -ldbm" >&5
20637 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20639   echo $ac_n "(cached) $ac_c" 1>&6
20640 else
20641   ac_save_LIBS="$LIBS"
20642 LIBS="-ldbm  $LIBS"
20643 cat > conftest.$ac_ext <<EOF
20644 #line 20645 "configure"
20645 #include "confdefs.h"
20646 /* Override any gcc2 internal prototype to avoid an error.  */
20647 /* We use char because int might match the return type of a gcc2
20648     builtin and then its argument prototype would still apply.  */
20649 char dbm_open();
20650
20651 int main() {
20652 dbm_open()
20653 ; return 0; }
20654 EOF
20655 if { (eval echo configure:20656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20656   rm -rf conftest*
20657   eval "ac_cv_lib_$ac_lib_var=yes"
20658 else
20659   echo "configure: failed program was:" >&5
20660   cat conftest.$ac_ext >&5
20661   rm -rf conftest*
20662   eval "ac_cv_lib_$ac_lib_var=no"
20663 fi
20664 rm -f conftest*
20665 LIBS="$ac_save_LIBS"
20666
20667 fi
20668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20669   echo "$ac_t""yes" 1>&6
20670   ol_cv_lib_ndbm=-ldbm
20671 else
20672   echo "$ac_t""no" 1>&6
20673 ol_cv_lib_ndbm=no
20674 fi
20675                 
20676 fi
20677
20678         
20679 fi
20680
20681         LIBS="$ol_LIBS"
20682
20683 fi
20684
20685 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20686
20687
20688  for ac_hdr in ndbm.h
20689 do
20690 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20691 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20692 echo "configure:20693: checking for $ac_hdr" >&5
20693 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20694   echo $ac_n "(cached) $ac_c" 1>&6
20695 else
20696   cat > conftest.$ac_ext <<EOF
20697 #line 20698 "configure"
20698 #include "confdefs.h"
20699 #include <$ac_hdr>
20700 EOF
20701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20702 { (eval echo configure:20703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20704 if test -z "$ac_err"; then
20705   rm -rf conftest*
20706   eval "ac_cv_header_$ac_safe=yes"
20707 else
20708   echo "$ac_err" >&5
20709   echo "configure: failed program was:" >&5
20710   cat conftest.$ac_ext >&5
20711   rm -rf conftest*
20712   eval "ac_cv_header_$ac_safe=no"
20713 fi
20714 rm -f conftest*
20715 fi
20716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20717   echo "$ac_t""yes" 1>&6
20718     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20719   cat >> confdefs.h <<EOF
20720 #define $ac_tr_hdr 1
20721 EOF
20722  
20723 else
20724   echo "$ac_t""no" 1>&6
20725 fi
20726 done
20727
20728  echo $ac_n "checking for db""... $ac_c" 1>&6
20729 echo "configure:20730: checking for db" >&5
20730 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20731   echo $ac_n "(cached) $ac_c" 1>&6
20732 else
20733   
20734         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20735                 ol_cv_ndbm=no
20736         else
20737                 ol_cv_ndbm=yes
20738         fi
20739
20740 fi
20741
20742 echo "$ac_t""$ol_cv_ndbm" 1>&6
20743  if test $ol_cv_ndbm = yes ; then
20744         cat >> confdefs.h <<\EOF
20745 #define HAVE_NDBM 1
20746 EOF
20747
20748  fi
20749
20750
20751         if test $ol_cv_ndbm = yes ; then
20752                 ol_link_ldbm=ndbm
20753                 ol_with_ldbm_api=ndbm
20754
20755                 if test $ol_cv_lib_ndbm != yes ; then
20756                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20757                 fi
20758         fi
20759 fi
20760
20761 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20762         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20763 fi
20764
20765 if test $ol_enable_bdb = yes -o \
20766         $ol_enable_hdb = yes -o \
20767         $ol_enable_ldbm = yes ; then
20768         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20769 fi
20770
20771
20772 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20773         BUILD_LIBS_DYNAMIC=shared
20774         cat >> confdefs.h <<\EOF
20775 #define LDAP_LIBS_DYNAMIC 1
20776 EOF
20777
20778         LTSTATIC=""
20779 else
20780         BUILD_LIBS_DYNAMIC=static
20781         LTSTATIC="-static"
20782 fi
20783
20784 if test $ol_enable_wrappers != no ; then
20785         for ac_hdr in tcpd.h
20786 do
20787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20789 echo "configure:20790: checking for $ac_hdr" >&5
20790 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20791   echo $ac_n "(cached) $ac_c" 1>&6
20792 else
20793   cat > conftest.$ac_ext <<EOF
20794 #line 20795 "configure"
20795 #include "confdefs.h"
20796 #include <$ac_hdr>
20797 EOF
20798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20799 { (eval echo configure:20800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20801 if test -z "$ac_err"; then
20802   rm -rf conftest*
20803   eval "ac_cv_header_$ac_safe=yes"
20804 else
20805   echo "$ac_err" >&5
20806   echo "configure: failed program was:" >&5
20807   cat conftest.$ac_ext >&5
20808   rm -rf conftest*
20809   eval "ac_cv_header_$ac_safe=no"
20810 fi
20811 rm -f conftest*
20812 fi
20813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20814   echo "$ac_t""yes" 1>&6
20815     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20816   cat >> confdefs.h <<EOF
20817 #define $ac_tr_hdr 1
20818 EOF
20819  
20820                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20821 echo "configure:20822: checking for TCP wrappers library" >&5
20822                 save_LIBS="$LIBS"
20823                 LIBS="$LIBS -lwrap"
20824                 cat > conftest.$ac_ext <<EOF
20825 #line 20826 "configure"
20826 #include "confdefs.h"
20827
20828 #include <tcpd.h>
20829 int allow_severity = 0;
20830 int deny_severity  = 0;
20831
20832 struct request_info *req;
20833                 
20834 int main() {
20835
20836 hosts_access(req)
20837                 
20838 ; return 0; }
20839 EOF
20840 if { (eval echo configure:20841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20841   rm -rf conftest*
20842   echo "$ac_t""-lwrap" 1>&6
20843                 have_wrappers=yes
20844                 LIBS="$save_LIBS"
20845 else
20846   echo "configure: failed program was:" >&5
20847   cat conftest.$ac_ext >&5
20848   rm -rf conftest*
20849   
20850                                 LIBS="$LIBS -lnsl"
20851                 cat > conftest.$ac_ext <<EOF
20852 #line 20853 "configure"
20853 #include "confdefs.h"
20854
20855 #include <tcpd.h>
20856 int allow_severity = 0;
20857 int deny_severity  = 0;
20858
20859 struct request_info *req;
20860                 
20861 int main() {
20862
20863 hosts_access(req)
20864                 
20865 ; return 0; }
20866 EOF
20867 if { (eval echo configure:20868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20868   rm -rf conftest*
20869   echo "$ac_t""-lwrap -lnsl" 1>&6
20870                 have_wrappers=yes
20871                 LIBS="$save_LIBS -lnsl"
20872 else
20873   echo "configure: failed program was:" >&5
20874   cat conftest.$ac_ext >&5
20875   rm -rf conftest*
20876   
20877                 echo "$ac_t""no" 1>&6
20878                 have_wrappers=no
20879                 LIBS=$save_LIBS
20880 fi
20881 rm -f conftest*
20882 fi
20883 rm -f conftest*
20884 else
20885   echo "$ac_t""no" 1>&6
20886 have_wrappers=no
20887 fi
20888 done
20889
20890
20891         if test $have_wrappers = yes ; then
20892                 cat >> confdefs.h <<\EOF
20893 #define HAVE_TCPD 1
20894 EOF
20895
20896                 WRAP_LIBS="-lwrap"
20897         elif test $ol_enable_wrappers = yes ; then
20898                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20899         else
20900                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20901                 WRAP_LIBS=""
20902         fi
20903 fi
20904
20905 if test $ol_enable_syslog != no ; then
20906         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20907 echo "configure:20908: checking for openlog" >&5
20908 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20909   echo $ac_n "(cached) $ac_c" 1>&6
20910 else
20911   cat > conftest.$ac_ext <<EOF
20912 #line 20913 "configure"
20913 #include "confdefs.h"
20914 /* System header to define __stub macros and hopefully few prototypes,
20915     which can conflict with char openlog(); below.  */
20916 #include <assert.h>
20917 /* Override any gcc2 internal prototype to avoid an error.  */
20918 /* We use char because int might match the return type of a gcc2
20919     builtin and then its argument prototype would still apply.  */
20920 char openlog();
20921 char (*f)();
20922
20923 int main() {
20924
20925 /* The GNU C library defines this for functions which it implements
20926     to always fail with ENOSYS.  Some functions are actually named
20927     something starting with __ and the normal name is an alias.  */
20928 #if defined (__stub_openlog) || defined (__stub___openlog)
20929 choke me
20930 #else
20931 f = openlog;
20932 #endif
20933
20934 ; return 0; }
20935 EOF
20936 if { (eval echo configure:20937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20937   rm -rf conftest*
20938   eval "ac_cv_func_openlog=yes"
20939 else
20940   echo "configure: failed program was:" >&5
20941   cat conftest.$ac_ext >&5
20942   rm -rf conftest*
20943   eval "ac_cv_func_openlog=no"
20944 fi
20945 rm -f conftest*
20946 fi
20947
20948 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20949   echo "$ac_t""yes" 1>&6
20950   :
20951 else
20952   echo "$ac_t""no" 1>&6
20953 fi
20954
20955         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20956                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20957         fi
20958         ol_enable_syslog=$ac_cv_func_openlog
20959 fi
20960
20961
20962 ol_link_sql=no
20963 if test $ol_enable_sql != no ; then
20964         for ac_hdr in sql.h sqlext.h
20965 do
20966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20968 echo "configure:20969: checking for $ac_hdr" >&5
20969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20970   echo $ac_n "(cached) $ac_c" 1>&6
20971 else
20972   cat > conftest.$ac_ext <<EOF
20973 #line 20974 "configure"
20974 #include "confdefs.h"
20975 #include <$ac_hdr>
20976 EOF
20977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20978 { (eval echo configure:20979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20980 if test -z "$ac_err"; then
20981   rm -rf conftest*
20982   eval "ac_cv_header_$ac_safe=yes"
20983 else
20984   echo "$ac_err" >&5
20985   echo "configure: failed program was:" >&5
20986   cat conftest.$ac_ext >&5
20987   rm -rf conftest*
20988   eval "ac_cv_header_$ac_safe=no"
20989 fi
20990 rm -f conftest*
20991 fi
20992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20993   echo "$ac_t""yes" 1>&6
20994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20995   cat >> confdefs.h <<EOF
20996 #define $ac_tr_hdr 1
20997 EOF
20998  
20999 else
21000   echo "$ac_t""no" 1>&6
21001 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
21002         
21003 fi
21004 done
21005
21006
21007         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
21008 echo "configure:21009: checking for SQLDriverConnect in -liodbc" >&5
21009 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21011   echo $ac_n "(cached) $ac_c" 1>&6
21012 else
21013   ac_save_LIBS="$LIBS"
21014 LIBS="-liodbc  $LIBS"
21015 cat > conftest.$ac_ext <<EOF
21016 #line 21017 "configure"
21017 #include "confdefs.h"
21018 /* Override any gcc2 internal prototype to avoid an error.  */
21019 /* We use char because int might match the return type of a gcc2
21020     builtin and then its argument prototype would still apply.  */
21021 char SQLDriverConnect();
21022
21023 int main() {
21024 SQLDriverConnect()
21025 ; return 0; }
21026 EOF
21027 if { (eval echo configure:21028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21028   rm -rf conftest*
21029   eval "ac_cv_lib_$ac_lib_var=yes"
21030 else
21031   echo "configure: failed program was:" >&5
21032   cat conftest.$ac_ext >&5
21033   rm -rf conftest*
21034   eval "ac_cv_lib_$ac_lib_var=no"
21035 fi
21036 rm -f conftest*
21037 LIBS="$ac_save_LIBS"
21038
21039 fi
21040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21041   echo "$ac_t""yes" 1>&6
21042   have_iodbc=yes
21043 else
21044   echo "$ac_t""no" 1>&6
21045 have_iodbc=no
21046 fi
21047
21048         if test $have_iodbc = yes ; then
21049                 ol_link_sql="-liodbc"
21050         else
21051                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
21052 echo "configure:21053: checking for SQLDriverConnect in -lodbc" >&5
21053 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21055   echo $ac_n "(cached) $ac_c" 1>&6
21056 else
21057   ac_save_LIBS="$LIBS"
21058 LIBS="-lodbc  $LIBS"
21059 cat > conftest.$ac_ext <<EOF
21060 #line 21061 "configure"
21061 #include "confdefs.h"
21062 /* Override any gcc2 internal prototype to avoid an error.  */
21063 /* We use char because int might match the return type of a gcc2
21064     builtin and then its argument prototype would still apply.  */
21065 char SQLDriverConnect();
21066
21067 int main() {
21068 SQLDriverConnect()
21069 ; return 0; }
21070 EOF
21071 if { (eval echo configure:21072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21072   rm -rf conftest*
21073   eval "ac_cv_lib_$ac_lib_var=yes"
21074 else
21075   echo "configure: failed program was:" >&5
21076   cat conftest.$ac_ext >&5
21077   rm -rf conftest*
21078   eval "ac_cv_lib_$ac_lib_var=no"
21079 fi
21080 rm -f conftest*
21081 LIBS="$ac_save_LIBS"
21082
21083 fi
21084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21085   echo "$ac_t""yes" 1>&6
21086   have_odbc=yes
21087 else
21088   echo "$ac_t""no" 1>&6
21089 have_odbc=no
21090 fi
21091
21092                 if test $have_odbc = yes ; then
21093                         ol_link_sql="-lodbc"
21094                 fi
21095         fi
21096
21097         if test $ol_link_sql != no ; then
21098                 SLAPD_SQL_LIBS="$ol_link_sql"
21099
21100         elif test $ol_enable_sql != auto ; then
21101                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21102         fi
21103 fi
21104
21105 WITH_SASL=no
21106 ol_link_sasl=no
21107 ol_link_spasswd=no
21108 if test $ol_with_cyrus_sasl != no ; then
21109         for ac_hdr in sasl/sasl.h sasl.h
21110 do
21111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21113 echo "configure:21114: checking for $ac_hdr" >&5
21114 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21115   echo $ac_n "(cached) $ac_c" 1>&6
21116 else
21117   cat > conftest.$ac_ext <<EOF
21118 #line 21119 "configure"
21119 #include "confdefs.h"
21120 #include <$ac_hdr>
21121 EOF
21122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21123 { (eval echo configure:21124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21125 if test -z "$ac_err"; then
21126   rm -rf conftest*
21127   eval "ac_cv_header_$ac_safe=yes"
21128 else
21129   echo "$ac_err" >&5
21130   echo "configure: failed program was:" >&5
21131   cat conftest.$ac_ext >&5
21132   rm -rf conftest*
21133   eval "ac_cv_header_$ac_safe=no"
21134 fi
21135 rm -f conftest*
21136 fi
21137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21138   echo "$ac_t""yes" 1>&6
21139     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21140   cat >> confdefs.h <<EOF
21141 #define $ac_tr_hdr 1
21142 EOF
21143  
21144 else
21145   echo "$ac_t""no" 1>&6
21146 fi
21147 done
21148
21149
21150         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21151                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21152 echo "configure:21153: checking for sasl_client_init in -lsasl2" >&5
21153 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21154 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21155   echo $ac_n "(cached) $ac_c" 1>&6
21156 else
21157   ac_save_LIBS="$LIBS"
21158 LIBS="-lsasl2  $LIBS"
21159 cat > conftest.$ac_ext <<EOF
21160 #line 21161 "configure"
21161 #include "confdefs.h"
21162 /* Override any gcc2 internal prototype to avoid an error.  */
21163 /* We use char because int might match the return type of a gcc2
21164     builtin and then its argument prototype would still apply.  */
21165 char sasl_client_init();
21166
21167 int main() {
21168 sasl_client_init()
21169 ; return 0; }
21170 EOF
21171 if { (eval echo configure:21172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21172   rm -rf conftest*
21173   eval "ac_cv_lib_$ac_lib_var=yes"
21174 else
21175   echo "configure: failed program was:" >&5
21176   cat conftest.$ac_ext >&5
21177   rm -rf conftest*
21178   eval "ac_cv_lib_$ac_lib_var=no"
21179 fi
21180 rm -f conftest*
21181 LIBS="$ac_save_LIBS"
21182
21183 fi
21184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21185   echo "$ac_t""yes" 1>&6
21186   ol_link_sasl="-lsasl2"
21187 else
21188   echo "$ac_t""no" 1>&6
21189 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21190 echo "configure:21191: checking for sasl_client_init in -lsasl" >&5
21191 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21193   echo $ac_n "(cached) $ac_c" 1>&6
21194 else
21195   ac_save_LIBS="$LIBS"
21196 LIBS="-lsasl  $LIBS"
21197 cat > conftest.$ac_ext <<EOF
21198 #line 21199 "configure"
21199 #include "confdefs.h"
21200 /* Override any gcc2 internal prototype to avoid an error.  */
21201 /* We use char because int might match the return type of a gcc2
21202     builtin and then its argument prototype would still apply.  */
21203 char sasl_client_init();
21204
21205 int main() {
21206 sasl_client_init()
21207 ; return 0; }
21208 EOF
21209 if { (eval echo configure:21210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21210   rm -rf conftest*
21211   eval "ac_cv_lib_$ac_lib_var=yes"
21212 else
21213   echo "configure: failed program was:" >&5
21214   cat conftest.$ac_ext >&5
21215   rm -rf conftest*
21216   eval "ac_cv_lib_$ac_lib_var=no"
21217 fi
21218 rm -f conftest*
21219 LIBS="$ac_save_LIBS"
21220
21221 fi
21222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21223   echo "$ac_t""yes" 1>&6
21224   ol_link_sasl="-lsasl"
21225 else
21226   echo "$ac_t""no" 1>&6
21227 fi
21228
21229 fi
21230
21231         fi
21232
21233         if test $ol_link_sasl = no ; then
21234                 if test $ol_with_cyrus_sasl != auto ; then
21235                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21236                 else
21237                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21238                         echo "configure: warning: SASL authentication not supported!" 1>&2
21239                         if test $ol_link_tls = no ; then
21240                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21241                         fi
21242                 fi
21243         else
21244                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21245 echo "configure:21246: checking Cyrus SASL library version" >&5
21246 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21247   echo $ac_n "(cached) $ac_c" 1>&6
21248 else
21249   
21250         cat > conftest.$ac_ext <<EOF
21251 #line 21252 "configure"
21252 #include "confdefs.h"
21253
21254 #ifdef HAVE_SASL_SASL_H
21255 #include <sasl/sasl.h>
21256 #else
21257 #include <sasl.h>
21258 #endif
21259
21260 /* Require 2.1.15+ */
21261 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21262         char *__sasl_compat = "2.2+ or better okay (we guess)";
21263 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21264         && SASL_VERSION_STEP >=15
21265         char *__sasl_compat = "2.1.15+ or better okay";
21266 #endif
21267         
21268 EOF
21269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21270   egrep "__sasl_compat" >/dev/null 2>&1; then
21271   rm -rf conftest*
21272   ol_cv_sasl_compat=yes
21273 else
21274   rm -rf conftest*
21275   ol_cv_sasl_compat=no
21276 fi
21277 rm -f conftest*
21278
21279 fi
21280
21281 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21282
21283                 if test $ol_cv_sasl_compat = no ; then
21284                         ol_link_sasl=no
21285                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21286                 fi
21287
21288                 cat >> confdefs.h <<\EOF
21289 #define HAVE_CYRUS_SASL 1
21290 EOF
21291
21292                 SASL_LIBS="$ol_link_sasl"
21293                 if test $ol_enable_spasswd != no ; then
21294                         ol_link_spasswd=yes
21295                 fi
21296
21297                 ac_save_LIBS="$LIBS"
21298                 LIBS="$LIBS $ol_link_sasl"
21299                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21300 echo "configure:21301: checking for sasl_version" >&5
21301 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21302   echo $ac_n "(cached) $ac_c" 1>&6
21303 else
21304   cat > conftest.$ac_ext <<EOF
21305 #line 21306 "configure"
21306 #include "confdefs.h"
21307 /* System header to define __stub macros and hopefully few prototypes,
21308     which can conflict with char sasl_version(); below.  */
21309 #include <assert.h>
21310 /* Override any gcc2 internal prototype to avoid an error.  */
21311 /* We use char because int might match the return type of a gcc2
21312     builtin and then its argument prototype would still apply.  */
21313 char sasl_version();
21314 char (*f)();
21315
21316 int main() {
21317
21318 /* The GNU C library defines this for functions which it implements
21319     to always fail with ENOSYS.  Some functions are actually named
21320     something starting with __ and the normal name is an alias.  */
21321 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21322 choke me
21323 #else
21324 f = sasl_version;
21325 #endif
21326
21327 ; return 0; }
21328 EOF
21329 if { (eval echo configure:21330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21330   rm -rf conftest*
21331   eval "ac_cv_func_sasl_version=yes"
21332 else
21333   echo "configure: failed program was:" >&5
21334   cat conftest.$ac_ext >&5
21335   rm -rf conftest*
21336   eval "ac_cv_func_sasl_version=no"
21337 fi
21338 rm -f conftest*
21339 fi
21340
21341 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21342   echo "$ac_t""yes" 1>&6
21343   cat >> confdefs.h <<\EOF
21344 #define HAVE_SASL_VERSION 1
21345 EOF
21346
21347 else
21348   echo "$ac_t""no" 1>&6
21349 fi
21350
21351                 LIBS="$ac_save_LIBS"
21352
21353                 WITH_SASL=yes
21354         fi
21355
21356 else
21357         echo "configure: warning: SASL authentication not supported!" 1>&2
21358         if test $ol_link_tls = no ; then
21359                 echo "configure: warning: Strong authentication not supported!" 1>&2
21360         fi
21361 fi
21362
21363 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21364         dev=no
21365         if test -r /dev/urandom ; then
21366                 dev="/dev/urandom";
21367         elif test -r /idev/urandom ; then
21368                 dev="/idev/urandom";
21369         elif test -r /dev/srandom ; then
21370                 dev="/dev/srandom";
21371         elif test -r /dev/random ; then
21372                 dev="/dev/random";
21373         elif test -r /idev/random ; then
21374                 dev="/idev/random";
21375         fi
21376
21377         if test $dev != no ; then
21378                 cat >> confdefs.h <<EOF
21379 #define URANDOM_DEVICE "$dev"
21380 EOF
21381
21382         fi
21383 fi
21384
21385 ol_link_fetch=no
21386 if test $ol_with_fetch != no ; then
21387         ol_LIBS=$LIBS
21388 LIBS="-lfetch -lcom_err $LIBS"
21389 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21390 echo "configure:21391: checking fetch(3) library" >&5
21391 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21392   echo $ac_n "(cached) $ac_c" 1>&6
21393 else
21394   
21395         cat > conftest.$ac_ext <<EOF
21396 #line 21397 "configure"
21397 #include "confdefs.h"
21398
21399 #include <sys/param.h>
21400 #include <stdio.h>
21401 #include <fetch.h>
21402 int main() {
21403 struct url *u = fetchParseURL("file:///"); 
21404 ; return 0; }
21405 EOF
21406 if { (eval echo configure:21407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21407   rm -rf conftest*
21408   ol_cv_lib_fetch=yes
21409 else
21410   echo "configure: failed program was:" >&5
21411   cat conftest.$ac_ext >&5
21412   rm -rf conftest*
21413   ol_cv_lib_fetch=no
21414 fi
21415 rm -f conftest*
21416 fi
21417
21418 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21419 LIBS=$ol_LIBS
21420 if test $ol_cv_lib_fetch != no ; then
21421         ol_link_fetch="-lfetch -lcom_err"
21422         cat >> confdefs.h <<\EOF
21423 #define HAVE_FETCH 1
21424 EOF
21425
21426 fi
21427
21428
21429         if test $ol_cv_lib_fetch != no ; then
21430                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21431                 ol_link_fetch=freebsd
21432
21433         elif test $ol_with_fetch != auto ; then
21434                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21435         fi 
21436 fi
21437
21438 if test $ol_enable_crypt != no ; then
21439         save_LIBS="$LIBS"
21440         LIBS="$TLS_LIBS $LIBS"
21441
21442         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21443 echo "configure:21444: checking for crypt" >&5
21444 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21445   echo $ac_n "(cached) $ac_c" 1>&6
21446 else
21447   cat > conftest.$ac_ext <<EOF
21448 #line 21449 "configure"
21449 #include "confdefs.h"
21450 /* System header to define __stub macros and hopefully few prototypes,
21451     which can conflict with char crypt(); below.  */
21452 #include <assert.h>
21453 /* Override any gcc2 internal prototype to avoid an error.  */
21454 /* We use char because int might match the return type of a gcc2
21455     builtin and then its argument prototype would still apply.  */
21456 char crypt();
21457 char (*f)();
21458
21459 int main() {
21460
21461 /* The GNU C library defines this for functions which it implements
21462     to always fail with ENOSYS.  Some functions are actually named
21463     something starting with __ and the normal name is an alias.  */
21464 #if defined (__stub_crypt) || defined (__stub___crypt)
21465 choke me
21466 #else
21467 f = crypt;
21468 #endif
21469
21470 ; return 0; }
21471 EOF
21472 if { (eval echo configure:21473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21473   rm -rf conftest*
21474   eval "ac_cv_func_crypt=yes"
21475 else
21476   echo "configure: failed program was:" >&5
21477   cat conftest.$ac_ext >&5
21478   rm -rf conftest*
21479   eval "ac_cv_func_crypt=no"
21480 fi
21481 rm -f conftest*
21482 fi
21483
21484 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21485   echo "$ac_t""yes" 1>&6
21486   have_crypt=yes
21487 else
21488   echo "$ac_t""no" 1>&6
21489
21490                 LIBS="$save_LIBS"
21491                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21492 echo "configure:21493: checking for crypt in -lcrypt" >&5
21493 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21495   echo $ac_n "(cached) $ac_c" 1>&6
21496 else
21497   ac_save_LIBS="$LIBS"
21498 LIBS="-lcrypt  $LIBS"
21499 cat > conftest.$ac_ext <<EOF
21500 #line 21501 "configure"
21501 #include "confdefs.h"
21502 /* Override any gcc2 internal prototype to avoid an error.  */
21503 /* We use char because int might match the return type of a gcc2
21504     builtin and then its argument prototype would still apply.  */
21505 char crypt();
21506
21507 int main() {
21508 crypt()
21509 ; return 0; }
21510 EOF
21511 if { (eval echo configure:21512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21512   rm -rf conftest*
21513   eval "ac_cv_lib_$ac_lib_var=yes"
21514 else
21515   echo "configure: failed program was:" >&5
21516   cat conftest.$ac_ext >&5
21517   rm -rf conftest*
21518   eval "ac_cv_lib_$ac_lib_var=no"
21519 fi
21520 rm -f conftest*
21521 LIBS="$ac_save_LIBS"
21522
21523 fi
21524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21525   echo "$ac_t""yes" 1>&6
21526   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21527                         have_crypt=yes
21528 else
21529   echo "$ac_t""no" 1>&6
21530 have_crypt=no
21531 fi
21532
21533 fi
21534
21535
21536         LIBS="$save_LIBS"
21537
21538         if test $have_crypt = yes ; then
21539                 cat >> confdefs.h <<\EOF
21540 #define HAVE_CRYPT 1
21541 EOF
21542
21543         else
21544                 echo "configure: warning: could not find crypt" 1>&2
21545                 if test $ol_enable_crypt = yes ; then
21546                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21547                 fi
21548
21549                 echo "configure: warning: disabling crypt support" 1>&2
21550                 ol_enable_crypt=no
21551         fi
21552 fi
21553
21554 if test $ol_enable_proctitle != no ; then
21555         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21556 echo "configure:21557: checking for setproctitle" >&5
21557 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21558   echo $ac_n "(cached) $ac_c" 1>&6
21559 else
21560   cat > conftest.$ac_ext <<EOF
21561 #line 21562 "configure"
21562 #include "confdefs.h"
21563 /* System header to define __stub macros and hopefully few prototypes,
21564     which can conflict with char setproctitle(); below.  */
21565 #include <assert.h>
21566 /* Override any gcc2 internal prototype to avoid an error.  */
21567 /* We use char because int might match the return type of a gcc2
21568     builtin and then its argument prototype would still apply.  */
21569 char setproctitle();
21570 char (*f)();
21571
21572 int main() {
21573
21574 /* The GNU C library defines this for functions which it implements
21575     to always fail with ENOSYS.  Some functions are actually named
21576     something starting with __ and the normal name is an alias.  */
21577 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21578 choke me
21579 #else
21580 f = setproctitle;
21581 #endif
21582
21583 ; return 0; }
21584 EOF
21585 if { (eval echo configure:21586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21586   rm -rf conftest*
21587   eval "ac_cv_func_setproctitle=yes"
21588 else
21589   echo "configure: failed program was:" >&5
21590   cat conftest.$ac_ext >&5
21591   rm -rf conftest*
21592   eval "ac_cv_func_setproctitle=no"
21593 fi
21594 rm -f conftest*
21595 fi
21596
21597 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21598   echo "$ac_t""yes" 1>&6
21599   have_setproctitle=yes
21600 else
21601   echo "$ac_t""no" 1>&6
21602
21603                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21604 echo "configure:21605: checking for setproctitle in -lutil" >&5
21605 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21607   echo $ac_n "(cached) $ac_c" 1>&6
21608 else
21609   ac_save_LIBS="$LIBS"
21610 LIBS="-lutil  $LIBS"
21611 cat > conftest.$ac_ext <<EOF
21612 #line 21613 "configure"
21613 #include "confdefs.h"
21614 /* Override any gcc2 internal prototype to avoid an error.  */
21615 /* We use char because int might match the return type of a gcc2
21616     builtin and then its argument prototype would still apply.  */
21617 char setproctitle();
21618
21619 int main() {
21620 setproctitle()
21621 ; return 0; }
21622 EOF
21623 if { (eval echo configure:21624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21624   rm -rf conftest*
21625   eval "ac_cv_lib_$ac_lib_var=yes"
21626 else
21627   echo "configure: failed program was:" >&5
21628   cat conftest.$ac_ext >&5
21629   rm -rf conftest*
21630   eval "ac_cv_lib_$ac_lib_var=no"
21631 fi
21632 rm -f conftest*
21633 LIBS="$ac_save_LIBS"
21634
21635 fi
21636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21637   echo "$ac_t""yes" 1>&6
21638   have_setproctitle=yes
21639                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21640 else
21641   echo "$ac_t""no" 1>&6
21642 have_setproctitle=no
21643                         LIBOBJS="$LIBOBJS setproctitle.o"
21644                         LIBSRCS="$LIBSRCS setproctitle.c"
21645 fi
21646
21647 fi
21648
21649
21650         if test $have_setproctitle = yes ; then
21651                 cat >> confdefs.h <<\EOF
21652 #define HAVE_SETPROCTITLE 1
21653 EOF
21654
21655         fi
21656 fi
21657
21658 if test $ol_enable_slp != no ; then
21659         for ac_hdr in slp.h 
21660 do
21661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21663 echo "configure:21664: checking for $ac_hdr" >&5
21664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21665   echo $ac_n "(cached) $ac_c" 1>&6
21666 else
21667   cat > conftest.$ac_ext <<EOF
21668 #line 21669 "configure"
21669 #include "confdefs.h"
21670 #include <$ac_hdr>
21671 EOF
21672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21673 { (eval echo configure:21674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21675 if test -z "$ac_err"; then
21676   rm -rf conftest*
21677   eval "ac_cv_header_$ac_safe=yes"
21678 else
21679   echo "$ac_err" >&5
21680   echo "configure: failed program was:" >&5
21681   cat conftest.$ac_ext >&5
21682   rm -rf conftest*
21683   eval "ac_cv_header_$ac_safe=no"
21684 fi
21685 rm -f conftest*
21686 fi
21687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21688   echo "$ac_t""yes" 1>&6
21689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21690   cat >> confdefs.h <<EOF
21691 #define $ac_tr_hdr 1
21692 EOF
21693  
21694 else
21695   echo "$ac_t""no" 1>&6
21696 fi
21697 done
21698
21699
21700         if test $ac_cv_header_slp_h = yes ; then
21701                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21702 echo "configure:21703: checking for SLPOpen in -lslp" >&5
21703 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21704 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21705   echo $ac_n "(cached) $ac_c" 1>&6
21706 else
21707   ac_save_LIBS="$LIBS"
21708 LIBS="-lslp  $LIBS"
21709 cat > conftest.$ac_ext <<EOF
21710 #line 21711 "configure"
21711 #include "confdefs.h"
21712 /* Override any gcc2 internal prototype to avoid an error.  */
21713 /* We use char because int might match the return type of a gcc2
21714     builtin and then its argument prototype would still apply.  */
21715 char SLPOpen();
21716
21717 int main() {
21718 SLPOpen()
21719 ; return 0; }
21720 EOF
21721 if { (eval echo configure:21722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21722   rm -rf conftest*
21723   eval "ac_cv_lib_$ac_lib_var=yes"
21724 else
21725   echo "configure: failed program was:" >&5
21726   cat conftest.$ac_ext >&5
21727   rm -rf conftest*
21728   eval "ac_cv_lib_$ac_lib_var=no"
21729 fi
21730 rm -f conftest*
21731 LIBS="$ac_save_LIBS"
21732
21733 fi
21734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21735   echo "$ac_t""yes" 1>&6
21736   have_slp=yes
21737 else
21738   echo "$ac_t""no" 1>&6
21739 have_slp=no
21740 fi
21741
21742                 if test $have_slp = yes ; then
21743                         cat >> confdefs.h <<\EOF
21744 #define HAVE_SLP 1
21745 EOF
21746
21747                         SLAPD_SLP_LIBS=-lslp
21748                 fi
21749
21750         elif test $ol_enable_slp = yes ; then
21751                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21752         fi
21753 fi
21754
21755 if test "$ol_with_multiple_precision" != "no" ; then
21756         ol_have_bignum=no
21757         ol_have_gmp=no
21758
21759         for ac_hdr in openssl/bn.h bn.h
21760 do
21761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21763 echo "configure:21764: checking for $ac_hdr" >&5
21764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21765   echo $ac_n "(cached) $ac_c" 1>&6
21766 else
21767   cat > conftest.$ac_ext <<EOF
21768 #line 21769 "configure"
21769 #include "confdefs.h"
21770 #include <$ac_hdr>
21771 EOF
21772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21773 { (eval echo configure:21774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21775 if test -z "$ac_err"; then
21776   rm -rf conftest*
21777   eval "ac_cv_header_$ac_safe=yes"
21778 else
21779   echo "$ac_err" >&5
21780   echo "configure: failed program was:" >&5
21781   cat conftest.$ac_ext >&5
21782   rm -rf conftest*
21783   eval "ac_cv_header_$ac_safe=no"
21784 fi
21785 rm -f conftest*
21786 fi
21787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21788   echo "$ac_t""yes" 1>&6
21789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21790   cat >> confdefs.h <<EOF
21791 #define $ac_tr_hdr 1
21792 EOF
21793  
21794 else
21795   echo "$ac_t""no" 1>&6
21796 fi
21797 done
21798
21799         for ac_hdr in openssl/crypto.h crypto.h
21800 do
21801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21803 echo "configure:21804: checking for $ac_hdr" >&5
21804 if eval "test \"\${ac_cv_header_$ac_safe+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 <$ac_hdr>
21811 EOF
21812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21813 { (eval echo configure:21814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21815 if test -z "$ac_err"; then
21816   rm -rf conftest*
21817   eval "ac_cv_header_$ac_safe=yes"
21818 else
21819   echo "$ac_err" >&5
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822   rm -rf conftest*
21823   eval "ac_cv_header_$ac_safe=no"
21824 fi
21825 rm -f conftest*
21826 fi
21827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21828   echo "$ac_t""yes" 1>&6
21829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21830   cat >> confdefs.h <<EOF
21831 #define $ac_tr_hdr 1
21832 EOF
21833  
21834 else
21835   echo "$ac_t""no" 1>&6
21836 fi
21837 done
21838
21839         for ac_hdr in gmp.h 
21840 do
21841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21843 echo "configure:21844: checking for $ac_hdr" >&5
21844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21845   echo $ac_n "(cached) $ac_c" 1>&6
21846 else
21847   cat > conftest.$ac_ext <<EOF
21848 #line 21849 "configure"
21849 #include "confdefs.h"
21850 #include <$ac_hdr>
21851 EOF
21852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21853 { (eval echo configure:21854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21855 if test -z "$ac_err"; then
21856   rm -rf conftest*
21857   eval "ac_cv_header_$ac_safe=yes"
21858 else
21859   echo "$ac_err" >&5
21860   echo "configure: failed program was:" >&5
21861   cat conftest.$ac_ext >&5
21862   rm -rf conftest*
21863   eval "ac_cv_header_$ac_safe=no"
21864 fi
21865 rm -f conftest*
21866 fi
21867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21868   echo "$ac_t""yes" 1>&6
21869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21870   cat >> confdefs.h <<EOF
21871 #define $ac_tr_hdr 1
21872 EOF
21873  
21874 else
21875   echo "$ac_t""no" 1>&6
21876 fi
21877 done
21878
21879
21880         if test "$ol_with_tls" = "found" ; then
21881                 ol_have_bn_h=no
21882                 ol_have_crypto_h=no
21883
21884                 if test "$ac_cv_header_openssl_bn_h" = "yes" \
21885                                 -o "$ac_cv_header_bn_h" = "yes" ; then
21886                         ol_have_bn_h=yes
21887                 fi
21888
21889                 if test "$ac_cv_header_openssl_crypto_h" = "yes" \
21890                                 -o "$ac_cv_header_crypto_h" = "yes" ; then
21891                         ol_have_crypto_h=yes
21892                 fi
21893
21894                 if test "$ol_have_bn_h" = "yes" \
21895                                 -a "$ol_have_crypto_h" = "yes" ; then
21896                         ol_have_bignum=yes
21897                 fi
21898         fi
21899
21900         if test $ac_cv_header_gmp_h = yes ; then
21901                 echo $ac_n "checking for __gmpz_add_ui in -lgmp""... $ac_c" 1>&6
21902 echo "configure:21903: checking for __gmpz_add_ui in -lgmp" >&5
21903 ac_lib_var=`echo gmp'_'__gmpz_add_ui | sed 'y%./+-:%__p__%'`
21904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21905   echo $ac_n "(cached) $ac_c" 1>&6
21906 else
21907   ac_save_LIBS="$LIBS"
21908 LIBS="-lgmp  $LIBS"
21909 cat > conftest.$ac_ext <<EOF
21910 #line 21911 "configure"
21911 #include "confdefs.h"
21912 /* Override any gcc2 internal prototype to avoid an error.  */
21913 /* We use char because int might match the return type of a gcc2
21914     builtin and then its argument prototype would still apply.  */
21915 char __gmpz_add_ui();
21916
21917 int main() {
21918 __gmpz_add_ui()
21919 ; return 0; }
21920 EOF
21921 if { (eval echo configure:21922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21922   rm -rf conftest*
21923   eval "ac_cv_lib_$ac_lib_var=yes"
21924 else
21925   echo "configure: failed program was:" >&5
21926   cat conftest.$ac_ext >&5
21927   rm -rf conftest*
21928   eval "ac_cv_lib_$ac_lib_var=no"
21929 fi
21930 rm -f conftest*
21931 LIBS="$ac_save_LIBS"
21932
21933 fi
21934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21935   echo "$ac_t""yes" 1>&6
21936   have_gmp=yes
21937 else
21938   echo "$ac_t""no" 1>&6
21939 have_gmp=no
21940 fi
21941
21942                 if test $have_gmp = yes ; then
21943                         ol_have_gmp=yes
21944                 fi
21945         fi
21946
21947         echo $ac_n "checking for multiple precision support""... $ac_c" 1>&6
21948 echo "configure:21949: checking for multiple precision support" >&5
21949
21950         ol_mp_support="none"
21951         case "$ol_with_multiple_precision" in
21952         auto)
21953                                                                                 if test "$ol_have_bignum" = "yes" ; then
21954                         ol_mp_support="bignum"
21955                 else
21956                         if test "$ol_have_gmp" = "yes" ; then
21957                                 ol_mp_support="gmp"
21958                         fi
21959                 fi
21960                 ;;
21961         bignum)
21962                 if test "$ol_have_bignum" != "yes" ; then
21963                         { echo "configure: error: OpenSSL's BIGNUM not available" 1>&2; exit 1; }
21964                 fi
21965                 ol_mp_support="bignum"
21966                 ;;
21967         gmp)
21968                 if test "$ol_have_gmp" != "yes" ; then
21969                         { echo "configure: error: GMP not available" 1>&2; exit 1; }
21970                 fi
21971                 ol_mp_support="gmp"
21972                 ;;
21973         yes)
21974                 if test "$ol_have_bignum" = "yes" ; then
21975                         ol_mp_support="bignum"
21976                 elif test "$ol_have_gmp" = "yes" ; then
21977                         ol_mp_support="gmp"
21978                 else
21979                         { echo "configure: error: not available" 1>&2; exit 1; }
21980                 fi
21981                 ;;
21982         esac
21983
21984         case "$ol_mp_support" in
21985         bignum)
21986                 cat >> confdefs.h <<\EOF
21987 #define HAVE_BIGNUM 1
21988 EOF
21989
21990                 ;;
21991         gmp)
21992                 cat >> confdefs.h <<\EOF
21993 #define HAVE_GMP 1
21994 EOF
21995
21996                 SLAPD_GMP_LIBS=-lgmp
21997                 ;;
21998         none)
21999                 ;;
22000         esac
22001
22002         echo "$ac_t""$ol_mp_support" 1>&6
22003 fi
22004
22005
22006 echo $ac_n "checking long long""... $ac_c" 1>&6
22007 echo "configure:22008: checking long long" >&5
22008 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
22009   echo $ac_n "(cached) $ac_c" 1>&6
22010 else
22011   
22012         cat > conftest.$ac_ext <<EOF
22013 #line 22014 "configure"
22014 #include "confdefs.h"
22015
22016 int main() {
22017 long long x;
22018 ; return 0; }
22019 EOF
22020 if { (eval echo configure:22021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22021   rm -rf conftest*
22022   ol_cv_type_long_long=yes
22023 else
22024   echo "configure: failed program was:" >&5
22025   cat conftest.$ac_ext >&5
22026   rm -rf conftest*
22027   ol_cv_type_long_long=no
22028 fi
22029 rm -f conftest*
22030 fi
22031
22032 echo "$ac_t""$ol_cv_type_long_long" 1>&6
22033 if test $ol_cv_type_long_long = yes; then
22034         cat >> confdefs.h <<\EOF
22035 #define HAVE_LONG_LONG 1
22036 EOF
22037
22038 fi
22039
22040 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
22041 echo "configure:22042: checking for ANSI C header files" >&5
22042 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
22043   echo $ac_n "(cached) $ac_c" 1>&6
22044 else
22045   cat > conftest.$ac_ext <<EOF
22046 #line 22047 "configure"
22047 #include "confdefs.h"
22048 #include <stdlib.h>
22049 #include <stdarg.h>
22050 #include <string.h>
22051 #include <float.h>
22052 EOF
22053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22054 { (eval echo configure:22055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22056 if test -z "$ac_err"; then
22057   rm -rf conftest*
22058   ac_cv_header_stdc=yes
22059 else
22060   echo "$ac_err" >&5
22061   echo "configure: failed program was:" >&5
22062   cat conftest.$ac_ext >&5
22063   rm -rf conftest*
22064   ac_cv_header_stdc=no
22065 fi
22066 rm -f conftest*
22067
22068 if test $ac_cv_header_stdc = yes; then
22069   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22070 cat > conftest.$ac_ext <<EOF
22071 #line 22072 "configure"
22072 #include "confdefs.h"
22073 #include <string.h>
22074 EOF
22075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22076   egrep "memchr" >/dev/null 2>&1; then
22077   :
22078 else
22079   rm -rf conftest*
22080   ac_cv_header_stdc=no
22081 fi
22082 rm -f conftest*
22083
22084 fi
22085
22086 if test $ac_cv_header_stdc = yes; then
22087   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22088 cat > conftest.$ac_ext <<EOF
22089 #line 22090 "configure"
22090 #include "confdefs.h"
22091 #include <stdlib.h>
22092 EOF
22093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22094   egrep "free" >/dev/null 2>&1; then
22095   :
22096 else
22097   rm -rf conftest*
22098   ac_cv_header_stdc=no
22099 fi
22100 rm -f conftest*
22101
22102 fi
22103
22104 if test $ac_cv_header_stdc = yes; then
22105   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22106 if test "$cross_compiling" = yes; then
22107   :
22108 else
22109   cat > conftest.$ac_ext <<EOF
22110 #line 22111 "configure"
22111 #include "confdefs.h"
22112 #include <ctype.h>
22113 #if ((' ' & 0x0FF) == 0x020)
22114 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22115 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22116 #else
22117 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22118  || ('j' <= (c) && (c) <= 'r') \
22119  || ('s' <= (c) && (c) <= 'z'))
22120 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22121 #endif
22122 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22123 int main () { int i; for (i = 0; i < 256; i++)
22124 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
22125 exit (0); }
22126
22127 EOF
22128 if { (eval echo configure:22129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22129 then
22130   :
22131 else
22132   echo "configure: failed program was:" >&5
22133   cat conftest.$ac_ext >&5
22134   rm -fr conftest*
22135   ac_cv_header_stdc=no
22136 fi
22137 rm -fr conftest*
22138 fi
22139
22140 fi
22141 fi
22142
22143 echo "$ac_t""$ac_cv_header_stdc" 1>&6
22144 if test $ac_cv_header_stdc = yes; then
22145   cat >> confdefs.h <<\EOF
22146 #define STDC_HEADERS 1
22147 EOF
22148
22149 fi
22150
22151 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
22152 echo "configure:22153: checking for mode_t" >&5
22153 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
22154   echo $ac_n "(cached) $ac_c" 1>&6
22155 else
22156   cat > conftest.$ac_ext <<EOF
22157 #line 22158 "configure"
22158 #include "confdefs.h"
22159 #include <sys/types.h>
22160 #if STDC_HEADERS
22161 #include <stdlib.h>
22162 #include <stddef.h>
22163 #endif
22164
22165 EOF
22166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22167   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22168   rm -rf conftest*
22169   eval "ac_cv_type_mode_t=yes"
22170 else
22171   rm -rf conftest*
22172   eval "ac_cv_type_mode_t=no"
22173 fi
22174 rm -f conftest*
22175
22176 fi
22177 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
22178   echo "$ac_t""yes" 1>&6
22179 else
22180   echo "$ac_t""no" 1>&6
22181   cat >> confdefs.h <<EOF
22182 #define mode_t int
22183 EOF
22184
22185 fi
22186
22187 echo $ac_n "checking for off_t""... $ac_c" 1>&6
22188 echo "configure:22189: checking for off_t" >&5
22189 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
22190   echo $ac_n "(cached) $ac_c" 1>&6
22191 else
22192   cat > conftest.$ac_ext <<EOF
22193 #line 22194 "configure"
22194 #include "confdefs.h"
22195 #include <sys/types.h>
22196 #if STDC_HEADERS
22197 #include <stdlib.h>
22198 #include <stddef.h>
22199 #endif
22200
22201 EOF
22202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22203   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22204   rm -rf conftest*
22205   eval "ac_cv_type_off_t=yes"
22206 else
22207   rm -rf conftest*
22208   eval "ac_cv_type_off_t=no"
22209 fi
22210 rm -f conftest*
22211
22212 fi
22213 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22214   echo "$ac_t""yes" 1>&6
22215 else
22216   echo "$ac_t""no" 1>&6
22217   cat >> confdefs.h <<EOF
22218 #define off_t long
22219 EOF
22220
22221 fi
22222
22223 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22224 echo "configure:22225: checking for pid_t" >&5
22225 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22226   echo $ac_n "(cached) $ac_c" 1>&6
22227 else
22228   cat > conftest.$ac_ext <<EOF
22229 #line 22230 "configure"
22230 #include "confdefs.h"
22231 #include <sys/types.h>
22232 #if STDC_HEADERS
22233 #include <stdlib.h>
22234 #include <stddef.h>
22235 #endif
22236
22237 EOF
22238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22239   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22240   rm -rf conftest*
22241   eval "ac_cv_type_pid_t=yes"
22242 else
22243   rm -rf conftest*
22244   eval "ac_cv_type_pid_t=no"
22245 fi
22246 rm -f conftest*
22247
22248 fi
22249 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22250   echo "$ac_t""yes" 1>&6
22251 else
22252   echo "$ac_t""no" 1>&6
22253   cat >> confdefs.h <<EOF
22254 #define pid_t int
22255 EOF
22256
22257 fi
22258
22259 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22260 echo "configure:22261: checking for ptrdiff_t" >&5
22261 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22262   echo $ac_n "(cached) $ac_c" 1>&6
22263 else
22264   cat > conftest.$ac_ext <<EOF
22265 #line 22266 "configure"
22266 #include "confdefs.h"
22267 #include <stddef.h>
22268 int main() {
22269 ptrdiff_t p
22270 ; return 0; }
22271 EOF
22272 if { (eval echo configure:22273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22273   rm -rf conftest*
22274   am_cv_type_ptrdiff_t=yes
22275 else
22276   echo "configure: failed program was:" >&5
22277   cat conftest.$ac_ext >&5
22278   rm -rf conftest*
22279   am_cv_type_ptrdiff_t=no
22280 fi
22281 rm -f conftest*
22282 fi
22283
22284 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22285    if test $am_cv_type_ptrdiff_t = yes; then
22286      cat >> confdefs.h <<\EOF
22287 #define HAVE_PTRDIFF_T 1
22288 EOF
22289
22290    fi
22291
22292 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22293 echo "configure:22294: checking return type of signal handlers" >&5
22294 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22295   echo $ac_n "(cached) $ac_c" 1>&6
22296 else
22297   cat > conftest.$ac_ext <<EOF
22298 #line 22299 "configure"
22299 #include "confdefs.h"
22300 #include <sys/types.h>
22301 #include <signal.h>
22302 #ifdef signal
22303 #undef signal
22304 #endif
22305 #ifdef __cplusplus
22306 extern "C" void (*signal (int, void (*)(int)))(int);
22307 #else
22308 void (*signal ()) ();
22309 #endif
22310
22311 int main() {
22312 int i;
22313 ; return 0; }
22314 EOF
22315 if { (eval echo configure:22316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22316   rm -rf conftest*
22317   ac_cv_type_signal=void
22318 else
22319   echo "configure: failed program was:" >&5
22320   cat conftest.$ac_ext >&5
22321   rm -rf conftest*
22322   ac_cv_type_signal=int
22323 fi
22324 rm -f conftest*
22325 fi
22326
22327 echo "$ac_t""$ac_cv_type_signal" 1>&6
22328 cat >> confdefs.h <<EOF
22329 #define RETSIGTYPE $ac_cv_type_signal
22330 EOF
22331
22332
22333 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22334 echo "configure:22335: checking for size_t" >&5
22335 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22336   echo $ac_n "(cached) $ac_c" 1>&6
22337 else
22338   cat > conftest.$ac_ext <<EOF
22339 #line 22340 "configure"
22340 #include "confdefs.h"
22341 #include <sys/types.h>
22342 #if STDC_HEADERS
22343 #include <stdlib.h>
22344 #include <stddef.h>
22345 #endif
22346
22347 EOF
22348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22349   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22350   rm -rf conftest*
22351   eval "ac_cv_type_size_t=yes"
22352 else
22353   rm -rf conftest*
22354   eval "ac_cv_type_size_t=no"
22355 fi
22356 rm -f conftest*
22357
22358 fi
22359 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22360   echo "$ac_t""yes" 1>&6
22361 else
22362   echo "$ac_t""no" 1>&6
22363   cat >> confdefs.h <<EOF
22364 #define size_t unsigned
22365 EOF
22366
22367 fi
22368
22369
22370 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22371 echo "configure:22372: checking for ssize_t" >&5
22372 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22373   echo $ac_n "(cached) $ac_c" 1>&6
22374 else
22375   cat > conftest.$ac_ext <<EOF
22376 #line 22377 "configure"
22377 #include "confdefs.h"
22378 #include <sys/types.h>
22379 #if STDC_HEADERS
22380 #include <stdlib.h>
22381 #include <stddef.h>
22382 #endif
22383
22384 EOF
22385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22386   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22387   rm -rf conftest*
22388   eval "ac_cv_type_ssize_t=yes"
22389 else
22390   rm -rf conftest*
22391   eval "ac_cv_type_ssize_t=no"
22392 fi
22393 rm -f conftest*
22394
22395 fi
22396 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22397   echo "$ac_t""yes" 1>&6
22398 else
22399   echo "$ac_t""no" 1>&6
22400   cat >> confdefs.h <<EOF
22401 #define ssize_t signed int
22402 EOF
22403
22404 fi
22405
22406 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22407 echo "configure:22408: checking for caddr_t" >&5
22408 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22409   echo $ac_n "(cached) $ac_c" 1>&6
22410 else
22411   cat > conftest.$ac_ext <<EOF
22412 #line 22413 "configure"
22413 #include "confdefs.h"
22414 #include <sys/types.h>
22415 #if STDC_HEADERS
22416 #include <stdlib.h>
22417 #include <stddef.h>
22418 #endif
22419
22420 EOF
22421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22422   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22423   rm -rf conftest*
22424   eval "ac_cv_type_caddr_t=yes"
22425 else
22426   rm -rf conftest*
22427   eval "ac_cv_type_caddr_t=no"
22428 fi
22429 rm -f conftest*
22430
22431 fi
22432 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22433   echo "$ac_t""yes" 1>&6
22434 else
22435   echo "$ac_t""no" 1>&6
22436   cat >> confdefs.h <<EOF
22437 #define caddr_t char *
22438 EOF
22439
22440 fi
22441
22442
22443 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22444 echo "configure:22445: checking for socklen_t" >&5
22445 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22446   echo $ac_n "(cached) $ac_c" 1>&6
22447 else
22448   cat > conftest.$ac_ext <<EOF
22449 #line 22450 "configure"
22450 #include "confdefs.h"
22451
22452 #ifdef HAVE_SYS_TYPES_H
22453 #include <sys/types.h>
22454 #endif
22455 #ifdef HAVE_SYS_SOCKET_H
22456 #include <sys/socket.h>
22457 #endif
22458
22459 int main() {
22460 socklen_t len;
22461 ; return 0; }
22462 EOF
22463 if { (eval echo configure:22464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22464   rm -rf conftest*
22465   ol_cv_type_socklen_t=yes
22466 else
22467   echo "configure: failed program was:" >&5
22468   cat conftest.$ac_ext >&5
22469   rm -rf conftest*
22470   ol_cv_type_socklen_t=no
22471 fi
22472 rm -f conftest*
22473 fi
22474
22475 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22476   if test $ol_cv_type_socklen_t = no; then
22477     cat >> confdefs.h <<\EOF
22478 #define socklen_t int
22479 EOF
22480
22481   fi
22482  
22483 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22484 echo "configure:22485: checking for member st_blksize in aggregate type struct stat" >&5
22485 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22486   echo $ac_n "(cached) $ac_c" 1>&6
22487 else
22488   cat > conftest.$ac_ext <<EOF
22489 #line 22490 "configure"
22490 #include "confdefs.h"
22491 #include <sys/types.h>
22492 #include <sys/stat.h>
22493 int main() {
22494 struct stat foo; foo.st_blksize;
22495 ; return 0; }
22496 EOF
22497 if { (eval echo configure:22498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22498   rm -rf conftest*
22499   ac_cv_c_struct_member_st_blksize=yes
22500 else
22501   echo "configure: failed program was:" >&5
22502   cat conftest.$ac_ext >&5
22503   rm -rf conftest*
22504   ac_cv_c_struct_member_st_blksize=no
22505 fi
22506 rm -f conftest*
22507 fi
22508
22509 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22510 st_blksize="$ac_cv_c_struct_member_st_blksize"
22511 if test $ac_cv_c_struct_member_st_blksize = yes; then
22512   cat >> confdefs.h <<\EOF
22513 #define HAVE_ST_BLKSIZE 1
22514 EOF
22515
22516 fi
22517
22518 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22519 echo "configure:22520: checking whether time.h and sys/time.h may both be included" >&5
22520 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22521   echo $ac_n "(cached) $ac_c" 1>&6
22522 else
22523   cat > conftest.$ac_ext <<EOF
22524 #line 22525 "configure"
22525 #include "confdefs.h"
22526 #include <sys/types.h>
22527 #include <sys/time.h>
22528 #include <time.h>
22529 int main() {
22530 struct tm *tp;
22531 ; return 0; }
22532 EOF
22533 if { (eval echo configure:22534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22534   rm -rf conftest*
22535   ac_cv_header_time=yes
22536 else
22537   echo "configure: failed program was:" >&5
22538   cat conftest.$ac_ext >&5
22539   rm -rf conftest*
22540   ac_cv_header_time=no
22541 fi
22542 rm -f conftest*
22543 fi
22544
22545 echo "$ac_t""$ac_cv_header_time" 1>&6
22546 if test $ac_cv_header_time = yes; then
22547   cat >> confdefs.h <<\EOF
22548 #define TIME_WITH_SYS_TIME 1
22549 EOF
22550
22551 fi
22552
22553 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22554 echo "configure:22555: checking whether struct tm is in sys/time.h or time.h" >&5
22555 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22556   echo $ac_n "(cached) $ac_c" 1>&6
22557 else
22558   cat > conftest.$ac_ext <<EOF
22559 #line 22560 "configure"
22560 #include "confdefs.h"
22561 #include <sys/types.h>
22562 #include <time.h>
22563 int main() {
22564 struct tm *tp; tp->tm_sec;
22565 ; return 0; }
22566 EOF
22567 if { (eval echo configure:22568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22568   rm -rf conftest*
22569   ac_cv_struct_tm=time.h
22570 else
22571   echo "configure: failed program was:" >&5
22572   cat conftest.$ac_ext >&5
22573   rm -rf conftest*
22574   ac_cv_struct_tm=sys/time.h
22575 fi
22576 rm -f conftest*
22577 fi
22578
22579 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22580 if test $ac_cv_struct_tm = sys/time.h; then
22581   cat >> confdefs.h <<\EOF
22582 #define TM_IN_SYS_TIME 1
22583 EOF
22584
22585 fi
22586
22587 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22588 echo "configure:22589: checking for uid_t in sys/types.h" >&5
22589 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22590   echo $ac_n "(cached) $ac_c" 1>&6
22591 else
22592   cat > conftest.$ac_ext <<EOF
22593 #line 22594 "configure"
22594 #include "confdefs.h"
22595 #include <sys/types.h>
22596 EOF
22597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22598   egrep "uid_t" >/dev/null 2>&1; then
22599   rm -rf conftest*
22600   ac_cv_type_uid_t=yes
22601 else
22602   rm -rf conftest*
22603   ac_cv_type_uid_t=no
22604 fi
22605 rm -f conftest*
22606
22607 fi
22608
22609 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22610 if test $ac_cv_type_uid_t = no; then
22611   cat >> confdefs.h <<\EOF
22612 #define uid_t int
22613 EOF
22614
22615   cat >> confdefs.h <<\EOF
22616 #define gid_t int
22617 EOF
22618
22619 fi
22620
22621 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22622 echo "configure:22623: checking for sig_atomic_t" >&5
22623 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22624   echo $ac_n "(cached) $ac_c" 1>&6
22625 else
22626   cat > conftest.$ac_ext <<EOF
22627 #line 22628 "configure"
22628 #include "confdefs.h"
22629 #include <signal.h>
22630 int main() {
22631 sig_atomic_t atomic;
22632 ; return 0; }
22633 EOF
22634 if { (eval echo configure:22635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22635   rm -rf conftest*
22636   ol_cv_type_sig_atomic_t=yes
22637 else
22638   echo "configure: failed program was:" >&5
22639   cat conftest.$ac_ext >&5
22640   rm -rf conftest*
22641   ol_cv_type_sig_atomic_t=no
22642 fi
22643 rm -f conftest*
22644 fi
22645
22646 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22647   if test $ol_cv_type_sig_atomic_t = no; then
22648     cat >> confdefs.h <<\EOF
22649 #define sig_atomic_t int
22650 EOF
22651
22652   fi
22653  
22654
22655
22656 # test for pw_gecos in struct passwd
22657 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22658 echo "configure:22659: checking struct passwd for pw_gecos" >&5
22659 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22660   echo $ac_n "(cached) $ac_c" 1>&6
22661 else
22662   
22663         cat > conftest.$ac_ext <<EOF
22664 #line 22665 "configure"
22665 #include "confdefs.h"
22666 #include <pwd.h>
22667 int main() {
22668
22669         struct passwd pwd;
22670         pwd.pw_gecos = pwd.pw_name;
22671
22672 ; return 0; }
22673 EOF
22674 if { (eval echo configure:22675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22675   rm -rf conftest*
22676   ol_cv_struct_passwd_pw_gecos=yes
22677 else
22678   echo "configure: failed program was:" >&5
22679   cat conftest.$ac_ext >&5
22680   rm -rf conftest*
22681   ol_cv_struct_passwd_pw_gecos=no
22682 fi
22683 rm -f conftest*
22684 fi
22685
22686 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22687 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22688         cat >> confdefs.h <<\EOF
22689 #define HAVE_PW_GECOS 1
22690 EOF
22691
22692 fi
22693
22694 # test for pw_passwd in struct passwd
22695 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22696 echo "configure:22697: checking struct passwd for pw_passwd" >&5
22697 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22698   echo $ac_n "(cached) $ac_c" 1>&6
22699 else
22700   
22701         cat > conftest.$ac_ext <<EOF
22702 #line 22703 "configure"
22703 #include "confdefs.h"
22704 #include <pwd.h>
22705 int main() {
22706
22707         struct passwd pwd;
22708         pwd.pw_passwd = pwd.pw_name;
22709
22710 ; return 0; }
22711 EOF
22712 if { (eval echo configure:22713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22713   rm -rf conftest*
22714   ol_cv_struct_passwd_pw_passwd=yes
22715 else
22716   echo "configure: failed program was:" >&5
22717   cat conftest.$ac_ext >&5
22718   rm -rf conftest*
22719   ol_cv_struct_passwd_pw_passwd=no
22720 fi
22721 rm -f conftest*
22722 fi
22723
22724 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22725 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22726         cat >> confdefs.h <<\EOF
22727 #define HAVE_PW_PASSWD 1
22728 EOF
22729
22730 fi
22731
22732
22733 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22734 echo "configure:22735: checking if toupper() requires islower()" >&5
22735 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22736   echo $ac_n "(cached) $ac_c" 1>&6
22737 else
22738   
22739         if test "$cross_compiling" = yes; then
22740   ol_cv_c_upper_lower=safe
22741 else
22742   cat > conftest.$ac_ext <<EOF
22743 #line 22744 "configure"
22744 #include "confdefs.h"
22745
22746 #include <ctype.h>
22747 main()
22748 {
22749         if ('C' == toupper('C'))
22750                 exit(0);
22751         else
22752                 exit(1);
22753 }
22754 EOF
22755 if { (eval echo configure:22756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22756 then
22757   ol_cv_c_upper_lower=no
22758 else
22759   echo "configure: failed program was:" >&5
22760   cat conftest.$ac_ext >&5
22761   rm -fr conftest*
22762   ol_cv_c_upper_lower=yes
22763 fi
22764 rm -fr conftest*
22765 fi
22766
22767 fi
22768
22769 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22770 if test $ol_cv_c_upper_lower != no ; then
22771         cat >> confdefs.h <<\EOF
22772 #define C_UPPER_LOWER 1
22773 EOF
22774
22775 fi
22776
22777 echo $ac_n "checking for working const""... $ac_c" 1>&6
22778 echo "configure:22779: checking for working const" >&5
22779 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22780   echo $ac_n "(cached) $ac_c" 1>&6
22781 else
22782   cat > conftest.$ac_ext <<EOF
22783 #line 22784 "configure"
22784 #include "confdefs.h"
22785
22786 int main() {
22787
22788 /* Ultrix mips cc rejects this.  */
22789 typedef int charset[2]; const charset x;
22790 /* SunOS 4.1.1 cc rejects this.  */
22791 char const *const *ccp;
22792 char **p;
22793 /* NEC SVR4.0.2 mips cc rejects this.  */
22794 struct point {int x, y;};
22795 static struct point const zero = {0,0};
22796 /* AIX XL C 1.02.0.0 rejects this.
22797    It does not let you subtract one const X* pointer from another in an arm
22798    of an if-expression whose if-part is not a constant expression */
22799 const char *g = "string";
22800 ccp = &g + (g ? g-g : 0);
22801 /* HPUX 7.0 cc rejects these. */
22802 ++ccp;
22803 p = (char**) ccp;
22804 ccp = (char const *const *) p;
22805 { /* SCO 3.2v4 cc rejects this.  */
22806   char *t;
22807   char const *s = 0 ? (char *) 0 : (char const *) 0;
22808
22809   *t++ = 0;
22810 }
22811 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22812   int x[] = {25, 17};
22813   const int *foo = &x[0];
22814   ++foo;
22815 }
22816 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22817   typedef const int *iptr;
22818   iptr p = 0;
22819   ++p;
22820 }
22821 { /* AIX XL C 1.02.0.0 rejects this saying
22822      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22823   struct s { int j; const int *ap[3]; };
22824   struct s *b; b->j = 5;
22825 }
22826 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22827   const int foo = 10;
22828 }
22829
22830 ; return 0; }
22831 EOF
22832 if { (eval echo configure:22833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22833   rm -rf conftest*
22834   ac_cv_c_const=yes
22835 else
22836   echo "configure: failed program was:" >&5
22837   cat conftest.$ac_ext >&5
22838   rm -rf conftest*
22839   ac_cv_c_const=no
22840 fi
22841 rm -f conftest*
22842 fi
22843
22844 echo "$ac_t""$ac_cv_c_const" 1>&6
22845 if test $ac_cv_c_const = no; then
22846   cat >> confdefs.h <<\EOF
22847 #define const 
22848 EOF
22849
22850 fi
22851
22852 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22853 echo "configure:22854: checking if compiler understands volatile" >&5
22854 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22855   echo $ac_n "(cached) $ac_c" 1>&6
22856 else
22857   cat > conftest.$ac_ext <<EOF
22858 #line 22859 "configure"
22859 #include "confdefs.h"
22860 int x, y, z;
22861 int main() {
22862 volatile int a; int * volatile b = x ? &y : &z;
22863       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22864       *b = 0;
22865 ; return 0; }
22866 EOF
22867 if { (eval echo configure:22868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22868   rm -rf conftest*
22869   ol_cv_c_volatile=yes
22870 else
22871   echo "configure: failed program was:" >&5
22872   cat conftest.$ac_ext >&5
22873   rm -rf conftest*
22874   ol_cv_c_volatile=no
22875 fi
22876 rm -f conftest*
22877 fi
22878
22879 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22880   if test $ol_cv_c_volatile = yes; then
22881     : 
22882   else
22883     cat >> confdefs.h <<\EOF
22884 #define volatile 
22885 EOF
22886
22887   fi
22888  
22889
22890 if test $cross_compiling = yes ; then
22891         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22892         cat >> confdefs.h <<\EOF
22893 #define CROSS_COMPILING 1
22894 EOF
22895
22896 else
22897         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22898 echo "configure:22899: checking whether byte ordering is bigendian" >&5
22899 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22900   echo $ac_n "(cached) $ac_c" 1>&6
22901 else
22902   ac_cv_c_bigendian=unknown
22903 # See if sys/param.h defines the BYTE_ORDER macro.
22904 cat > conftest.$ac_ext <<EOF
22905 #line 22906 "configure"
22906 #include "confdefs.h"
22907 #include <sys/types.h>
22908 #include <sys/param.h>
22909 int main() {
22910
22911 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22912  bogus endian macros
22913 #endif
22914 ; return 0; }
22915 EOF
22916 if { (eval echo configure:22917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22917   rm -rf conftest*
22918   # It does; now see whether it defined to BIG_ENDIAN or not.
22919 cat > conftest.$ac_ext <<EOF
22920 #line 22921 "configure"
22921 #include "confdefs.h"
22922 #include <sys/types.h>
22923 #include <sys/param.h>
22924 int main() {
22925
22926 #if BYTE_ORDER != BIG_ENDIAN
22927  not big endian
22928 #endif
22929 ; return 0; }
22930 EOF
22931 if { (eval echo configure:22932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22932   rm -rf conftest*
22933   ac_cv_c_bigendian=yes
22934 else
22935   echo "configure: failed program was:" >&5
22936   cat conftest.$ac_ext >&5
22937   rm -rf conftest*
22938   ac_cv_c_bigendian=no
22939 fi
22940 rm -f conftest*
22941 else
22942   echo "configure: failed program was:" >&5
22943   cat conftest.$ac_ext >&5
22944 fi
22945 rm -f conftest*
22946 if test $ac_cv_c_bigendian = unknown; then
22947 if test "$cross_compiling" = yes; then
22948     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22949 else
22950   cat > conftest.$ac_ext <<EOF
22951 #line 22952 "configure"
22952 #include "confdefs.h"
22953 main () {
22954   /* Are we little or big endian?  From Harbison&Steele.  */
22955   union
22956   {
22957     long l;
22958     char c[sizeof (long)];
22959   } u;
22960   u.l = 1;
22961   exit (u.c[sizeof (long) - 1] == 1);
22962 }
22963 EOF
22964 if { (eval echo configure:22965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22965 then
22966   ac_cv_c_bigendian=no
22967 else
22968   echo "configure: failed program was:" >&5
22969   cat conftest.$ac_ext >&5
22970   rm -fr conftest*
22971   ac_cv_c_bigendian=yes
22972 fi
22973 rm -fr conftest*
22974 fi
22975
22976 fi
22977 fi
22978
22979 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22980 if test $ac_cv_c_bigendian = yes; then
22981   cat >> confdefs.h <<\EOF
22982 #define WORDS_BIGENDIAN 1
22983 EOF
22984
22985 fi
22986
22987 fi
22988
22989 echo $ac_n "checking size of short""... $ac_c" 1>&6
22990 echo "configure:22991: checking size of short" >&5 
22991 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22992   echo $ac_n "(cached) $ac_c" 1>&6
22993 else
22994   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22995   cat > conftest.$ac_ext <<EOF
22996 #line 22997 "configure"
22997 #include "confdefs.h"
22998 #include "confdefs.h" 
22999 #include <stdlib.h>
23000 #include <sys/types.h> 
23001  
23002
23003 int main() {
23004 switch (0) case 0: case (sizeof (short) == $ac_size):;
23005 ; return 0; }
23006 EOF
23007 if { (eval echo configure:23008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23008   rm -rf conftest*
23009   ac_cv_sizeof_short=$ac_size
23010 else
23011   echo "configure: failed program was:" >&5
23012   cat conftest.$ac_ext >&5
23013 fi
23014 rm -f conftest* 
23015   if test x$ac_cv_sizeof_short != x ; then break; fi 
23016 done 
23017
23018 fi
23019  
23020 if test x$ac_cv_sizeof_short = x ; then 
23021   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
23022 fi 
23023 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
23024 cat >> confdefs.h <<EOF
23025 #define SIZEOF_SHORT $ac_cv_sizeof_short
23026 EOF
23027  
23028  
23029 echo $ac_n "checking size of int""... $ac_c" 1>&6
23030 echo "configure:23031: checking size of int" >&5 
23031 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
23032   echo $ac_n "(cached) $ac_c" 1>&6
23033 else
23034   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23035   cat > conftest.$ac_ext <<EOF
23036 #line 23037 "configure"
23037 #include "confdefs.h"
23038 #include "confdefs.h" 
23039 #include <stdlib.h>
23040 #include <sys/types.h> 
23041  
23042
23043 int main() {
23044 switch (0) case 0: case (sizeof (int) == $ac_size):;
23045 ; return 0; }
23046 EOF
23047 if { (eval echo configure:23048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23048   rm -rf conftest*
23049   ac_cv_sizeof_int=$ac_size
23050 else
23051   echo "configure: failed program was:" >&5
23052   cat conftest.$ac_ext >&5
23053 fi
23054 rm -f conftest* 
23055   if test x$ac_cv_sizeof_int != x ; then break; fi 
23056 done 
23057
23058 fi
23059  
23060 if test x$ac_cv_sizeof_int = x ; then 
23061   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
23062 fi 
23063 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
23064 cat >> confdefs.h <<EOF
23065 #define SIZEOF_INT $ac_cv_sizeof_int
23066 EOF
23067  
23068  
23069 echo $ac_n "checking size of long""... $ac_c" 1>&6
23070 echo "configure:23071: checking size of long" >&5 
23071 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
23072   echo $ac_n "(cached) $ac_c" 1>&6
23073 else
23074   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23075   cat > conftest.$ac_ext <<EOF
23076 #line 23077 "configure"
23077 #include "confdefs.h"
23078 #include "confdefs.h" 
23079 #include <stdlib.h>
23080 #include <sys/types.h> 
23081  
23082
23083 int main() {
23084 switch (0) case 0: case (sizeof (long) == $ac_size):;
23085 ; return 0; }
23086 EOF
23087 if { (eval echo configure:23088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23088   rm -rf conftest*
23089   ac_cv_sizeof_long=$ac_size
23090 else
23091   echo "configure: failed program was:" >&5
23092   cat conftest.$ac_ext >&5
23093 fi
23094 rm -f conftest* 
23095   if test x$ac_cv_sizeof_long != x ; then break; fi 
23096 done 
23097
23098 fi
23099  
23100 if test x$ac_cv_sizeof_long = x ; then 
23101   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
23102 fi 
23103 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
23104 cat >> confdefs.h <<EOF
23105 #define SIZEOF_LONG $ac_cv_sizeof_long
23106 EOF
23107  
23108
23109 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
23110 echo "configure:23111: checking size of wchar_t" >&5 
23111 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
23112   echo $ac_n "(cached) $ac_c" 1>&6
23113 else
23114   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
23115   cat > conftest.$ac_ext <<EOF
23116 #line 23117 "configure"
23117 #include "confdefs.h"
23118 #include "confdefs.h" 
23119 #include <stdlib.h>
23120 #include <sys/types.h> 
23121  
23122
23123 int main() {
23124 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
23125 ; return 0; }
23126 EOF
23127 if { (eval echo configure:23128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23128   rm -rf conftest*
23129   ac_cv_sizeof_wchar_t=$ac_size
23130 else
23131   echo "configure: failed program was:" >&5
23132   cat conftest.$ac_ext >&5
23133 fi
23134 rm -f conftest* 
23135   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
23136 done 
23137
23138 fi
23139  
23140 if test x$ac_cv_sizeof_wchar_t = x ; then 
23141   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
23142 fi 
23143 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
23144 cat >> confdefs.h <<EOF
23145 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23146 EOF
23147  
23148
23149
23150 if test "$ac_cv_sizeof_int" -lt 4 ; then
23151         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
23152
23153         cat >> confdefs.h <<\EOF
23154 #define LBER_INT_T long
23155 EOF
23156
23157 else
23158         cat >> confdefs.h <<\EOF
23159 #define LBER_INT_T int
23160 EOF
23161
23162 fi
23163
23164 cat >> confdefs.h <<\EOF
23165 #define LBER_LEN_T long
23166 EOF
23167
23168 cat >> confdefs.h <<\EOF
23169 #define LBER_SOCKET_T int
23170 EOF
23171
23172 cat >> confdefs.h <<\EOF
23173 #define LBER_TAG_T long
23174 EOF
23175
23176
23177 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
23178 echo "configure:23179: checking for 8-bit clean memcmp" >&5
23179 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
23180   echo $ac_n "(cached) $ac_c" 1>&6
23181 else
23182   if test "$cross_compiling" = yes; then
23183   ac_cv_func_memcmp_clean=no
23184 else
23185   cat > conftest.$ac_ext <<EOF
23186 #line 23187 "configure"
23187 #include "confdefs.h"
23188
23189 main()
23190 {
23191   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
23192   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
23193 }
23194
23195 EOF
23196 if { (eval echo configure:23197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
23197 then
23198   ac_cv_func_memcmp_clean=yes
23199 else
23200   echo "configure: failed program was:" >&5
23201   cat conftest.$ac_ext >&5
23202   rm -fr conftest*
23203   ac_cv_func_memcmp_clean=no
23204 fi
23205 rm -fr conftest*
23206 fi
23207
23208 fi
23209
23210 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
23211 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
23212
23213 echo $ac_n "checking for strftime""... $ac_c" 1>&6
23214 echo "configure:23215: checking for strftime" >&5
23215 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
23216   echo $ac_n "(cached) $ac_c" 1>&6
23217 else
23218   cat > conftest.$ac_ext <<EOF
23219 #line 23220 "configure"
23220 #include "confdefs.h"
23221 /* System header to define __stub macros and hopefully few prototypes,
23222     which can conflict with char strftime(); below.  */
23223 #include <assert.h>
23224 /* Override any gcc2 internal prototype to avoid an error.  */
23225 /* We use char because int might match the return type of a gcc2
23226     builtin and then its argument prototype would still apply.  */
23227 char strftime();
23228 char (*f)();
23229
23230 int main() {
23231
23232 /* The GNU C library defines this for functions which it implements
23233     to always fail with ENOSYS.  Some functions are actually named
23234     something starting with __ and the normal name is an alias.  */
23235 #if defined (__stub_strftime) || defined (__stub___strftime)
23236 choke me
23237 #else
23238 f = strftime;
23239 #endif
23240
23241 ; return 0; }
23242 EOF
23243 if { (eval echo configure:23244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23244   rm -rf conftest*
23245   eval "ac_cv_func_strftime=yes"
23246 else
23247   echo "configure: failed program was:" >&5
23248   cat conftest.$ac_ext >&5
23249   rm -rf conftest*
23250   eval "ac_cv_func_strftime=no"
23251 fi
23252 rm -f conftest*
23253 fi
23254
23255 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23256   echo "$ac_t""yes" 1>&6
23257   cat >> confdefs.h <<\EOF
23258 #define HAVE_STRFTIME 1
23259 EOF
23260
23261 else
23262   echo "$ac_t""no" 1>&6
23263 # strftime is in -lintl on SCO UNIX.
23264 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23265 echo "configure:23266: checking for strftime in -lintl" >&5
23266 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23267 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23268   echo $ac_n "(cached) $ac_c" 1>&6
23269 else
23270   ac_save_LIBS="$LIBS"
23271 LIBS="-lintl  $LIBS"
23272 cat > conftest.$ac_ext <<EOF
23273 #line 23274 "configure"
23274 #include "confdefs.h"
23275 /* Override any gcc2 internal prototype to avoid an error.  */
23276 /* We use char because int might match the return type of a gcc2
23277     builtin and then its argument prototype would still apply.  */
23278 char strftime();
23279
23280 int main() {
23281 strftime()
23282 ; return 0; }
23283 EOF
23284 if { (eval echo configure:23285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23285   rm -rf conftest*
23286   eval "ac_cv_lib_$ac_lib_var=yes"
23287 else
23288   echo "configure: failed program was:" >&5
23289   cat conftest.$ac_ext >&5
23290   rm -rf conftest*
23291   eval "ac_cv_lib_$ac_lib_var=no"
23292 fi
23293 rm -f conftest*
23294 LIBS="$ac_save_LIBS"
23295
23296 fi
23297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23298   echo "$ac_t""yes" 1>&6
23299   cat >> confdefs.h <<\EOF
23300 #define HAVE_STRFTIME 1
23301 EOF
23302
23303 LIBS="-lintl $LIBS"
23304 else
23305   echo "$ac_t""no" 1>&6
23306 fi
23307
23308 fi
23309
23310
23311 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23312 echo "configure:23313: checking for inet_aton()" >&5
23313 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23314   echo $ac_n "(cached) $ac_c" 1>&6
23315 else
23316   cat > conftest.$ac_ext <<EOF
23317 #line 23318 "configure"
23318 #include "confdefs.h"
23319
23320 #ifdef HAVE_SYS_TYPES_H
23321 #       include <sys/types.h>
23322 #endif
23323 #ifdef HAVE_SYS_SOCKET_H
23324 #       include <sys/socket.h>
23325 #       ifdef HAVE_SYS_SELECT_H
23326 #               include <sys/select.h>
23327 #       endif
23328 #       include <netinet/in.h>
23329 #       ifdef HAVE_ARPA_INET_H
23330 #               include <arpa/inet.h>
23331 #       endif
23332 #endif
23333
23334 int main() {
23335 struct in_addr in;
23336 int rc = inet_aton( "255.255.255.255", &in );
23337 ; return 0; }
23338 EOF
23339 if { (eval echo configure:23340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23340   rm -rf conftest*
23341   ol_cv_func_inet_aton=yes
23342 else
23343   echo "configure: failed program was:" >&5
23344   cat conftest.$ac_ext >&5
23345   rm -rf conftest*
23346   ol_cv_func_inet_aton=no
23347 fi
23348 rm -f conftest*
23349 fi
23350
23351 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23352   if test $ol_cv_func_inet_aton != no; then
23353     cat >> confdefs.h <<\EOF
23354 #define HAVE_INET_ATON 1
23355 EOF
23356
23357   fi
23358  
23359
23360 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23361 echo "configure:23362: checking for _spawnlp" >&5
23362 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23363   echo $ac_n "(cached) $ac_c" 1>&6
23364 else
23365   cat > conftest.$ac_ext <<EOF
23366 #line 23367 "configure"
23367 #include "confdefs.h"
23368 /* System header to define __stub macros and hopefully few prototypes,
23369     which can conflict with char _spawnlp(); below.  */
23370 #include <assert.h>
23371 /* Override any gcc2 internal prototype to avoid an error.  */
23372 /* We use char because int might match the return type of a gcc2
23373     builtin and then its argument prototype would still apply.  */
23374 char _spawnlp();
23375 char (*f)();
23376
23377 int main() {
23378
23379 /* The GNU C library defines this for functions which it implements
23380     to always fail with ENOSYS.  Some functions are actually named
23381     something starting with __ and the normal name is an alias.  */
23382 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23383 choke me
23384 #else
23385 f = _spawnlp;
23386 #endif
23387
23388 ; return 0; }
23389 EOF
23390 if { (eval echo configure:23391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23391   rm -rf conftest*
23392   eval "ac_cv_func__spawnlp=yes"
23393 else
23394   echo "configure: failed program was:" >&5
23395   cat conftest.$ac_ext >&5
23396   rm -rf conftest*
23397   eval "ac_cv_func__spawnlp=no"
23398 fi
23399 rm -f conftest*
23400 fi
23401
23402 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23403   echo "$ac_t""yes" 1>&6
23404   cat >> confdefs.h <<\EOF
23405 #define HAVE_SPAWNLP 1
23406 EOF
23407
23408 else
23409   echo "$ac_t""no" 1>&6
23410 fi
23411
23412
23413 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23414 echo "configure:23415: checking for _snprintf" >&5
23415 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23416   echo $ac_n "(cached) $ac_c" 1>&6
23417 else
23418   cat > conftest.$ac_ext <<EOF
23419 #line 23420 "configure"
23420 #include "confdefs.h"
23421 /* System header to define __stub macros and hopefully few prototypes,
23422     which can conflict with char _snprintf(); below.  */
23423 #include <assert.h>
23424 /* Override any gcc2 internal prototype to avoid an error.  */
23425 /* We use char because int might match the return type of a gcc2
23426     builtin and then its argument prototype would still apply.  */
23427 char _snprintf();
23428 char (*f)();
23429
23430 int main() {
23431
23432 /* The GNU C library defines this for functions which it implements
23433     to always fail with ENOSYS.  Some functions are actually named
23434     something starting with __ and the normal name is an alias.  */
23435 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23436 choke me
23437 #else
23438 f = _snprintf;
23439 #endif
23440
23441 ; return 0; }
23442 EOF
23443 if { (eval echo configure:23444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23444   rm -rf conftest*
23445   eval "ac_cv_func__snprintf=yes"
23446 else
23447   echo "configure: failed program was:" >&5
23448   cat conftest.$ac_ext >&5
23449   rm -rf conftest*
23450   eval "ac_cv_func__snprintf=no"
23451 fi
23452 rm -f conftest*
23453 fi
23454
23455 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23456   echo "$ac_t""yes" 1>&6
23457   ac_cv_func_snprintf=yes
23458         cat >> confdefs.h <<\EOF
23459 #define snprintf _snprintf
23460 EOF
23461
23462
23463 else
23464   echo "$ac_t""no" 1>&6
23465 fi
23466
23467
23468 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23469 echo "configure:23470: checking for _vsnprintf" >&5
23470 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23471   echo $ac_n "(cached) $ac_c" 1>&6
23472 else
23473   cat > conftest.$ac_ext <<EOF
23474 #line 23475 "configure"
23475 #include "confdefs.h"
23476 /* System header to define __stub macros and hopefully few prototypes,
23477     which can conflict with char _vsnprintf(); below.  */
23478 #include <assert.h>
23479 /* Override any gcc2 internal prototype to avoid an error.  */
23480 /* We use char because int might match the return type of a gcc2
23481     builtin and then its argument prototype would still apply.  */
23482 char _vsnprintf();
23483 char (*f)();
23484
23485 int main() {
23486
23487 /* The GNU C library defines this for functions which it implements
23488     to always fail with ENOSYS.  Some functions are actually named
23489     something starting with __ and the normal name is an alias.  */
23490 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23491 choke me
23492 #else
23493 f = _vsnprintf;
23494 #endif
23495
23496 ; return 0; }
23497 EOF
23498 if { (eval echo configure:23499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23499   rm -rf conftest*
23500   eval "ac_cv_func__vsnprintf=yes"
23501 else
23502   echo "configure: failed program was:" >&5
23503   cat conftest.$ac_ext >&5
23504   rm -rf conftest*
23505   eval "ac_cv_func__vsnprintf=no"
23506 fi
23507 rm -f conftest*
23508 fi
23509
23510 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23511   echo "$ac_t""yes" 1>&6
23512   ac_cv_func_vsnprintf=yes
23513         cat >> confdefs.h <<\EOF
23514 #define vsnprintf _vsnprintf
23515 EOF
23516
23517
23518 else
23519   echo "$ac_t""no" 1>&6
23520 fi
23521
23522
23523 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23524 echo "configure:23525: checking for vprintf" >&5
23525 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23526   echo $ac_n "(cached) $ac_c" 1>&6
23527 else
23528   cat > conftest.$ac_ext <<EOF
23529 #line 23530 "configure"
23530 #include "confdefs.h"
23531 /* System header to define __stub macros and hopefully few prototypes,
23532     which can conflict with char vprintf(); below.  */
23533 #include <assert.h>
23534 /* Override any gcc2 internal prototype to avoid an error.  */
23535 /* We use char because int might match the return type of a gcc2
23536     builtin and then its argument prototype would still apply.  */
23537 char vprintf();
23538 char (*f)();
23539
23540 int main() {
23541
23542 /* The GNU C library defines this for functions which it implements
23543     to always fail with ENOSYS.  Some functions are actually named
23544     something starting with __ and the normal name is an alias.  */
23545 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23546 choke me
23547 #else
23548 f = vprintf;
23549 #endif
23550
23551 ; return 0; }
23552 EOF
23553 if { (eval echo configure:23554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23554   rm -rf conftest*
23555   eval "ac_cv_func_vprintf=yes"
23556 else
23557   echo "configure: failed program was:" >&5
23558   cat conftest.$ac_ext >&5
23559   rm -rf conftest*
23560   eval "ac_cv_func_vprintf=no"
23561 fi
23562 rm -f conftest*
23563 fi
23564
23565 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23566   echo "$ac_t""yes" 1>&6
23567   cat >> confdefs.h <<\EOF
23568 #define HAVE_VPRINTF 1
23569 EOF
23570
23571 else
23572   echo "$ac_t""no" 1>&6
23573 fi
23574
23575 if test "$ac_cv_func_vprintf" != yes; then
23576 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23577 echo "configure:23578: checking for _doprnt" >&5
23578 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23579   echo $ac_n "(cached) $ac_c" 1>&6
23580 else
23581   cat > conftest.$ac_ext <<EOF
23582 #line 23583 "configure"
23583 #include "confdefs.h"
23584 /* System header to define __stub macros and hopefully few prototypes,
23585     which can conflict with char _doprnt(); below.  */
23586 #include <assert.h>
23587 /* Override any gcc2 internal prototype to avoid an error.  */
23588 /* We use char because int might match the return type of a gcc2
23589     builtin and then its argument prototype would still apply.  */
23590 char _doprnt();
23591 char (*f)();
23592
23593 int main() {
23594
23595 /* The GNU C library defines this for functions which it implements
23596     to always fail with ENOSYS.  Some functions are actually named
23597     something starting with __ and the normal name is an alias.  */
23598 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23599 choke me
23600 #else
23601 f = _doprnt;
23602 #endif
23603
23604 ; return 0; }
23605 EOF
23606 if { (eval echo configure:23607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23607   rm -rf conftest*
23608   eval "ac_cv_func__doprnt=yes"
23609 else
23610   echo "configure: failed program was:" >&5
23611   cat conftest.$ac_ext >&5
23612   rm -rf conftest*
23613   eval "ac_cv_func__doprnt=no"
23614 fi
23615 rm -f conftest*
23616 fi
23617
23618 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23619   echo "$ac_t""yes" 1>&6
23620   cat >> confdefs.h <<\EOF
23621 #define HAVE_DOPRNT 1
23622 EOF
23623
23624 else
23625   echo "$ac_t""no" 1>&6
23626 fi
23627
23628 fi
23629
23630
23631 if test $ac_cv_func_vprintf = yes ; then
23632                 for ac_func in snprintf vsnprintf
23633 do
23634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23635 echo "configure:23636: checking for $ac_func" >&5
23636 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23637   echo $ac_n "(cached) $ac_c" 1>&6
23638 else
23639   cat > conftest.$ac_ext <<EOF
23640 #line 23641 "configure"
23641 #include "confdefs.h"
23642 /* System header to define __stub macros and hopefully few prototypes,
23643     which can conflict with char $ac_func(); below.  */
23644 #include <assert.h>
23645 /* Override any gcc2 internal prototype to avoid an error.  */
23646 /* We use char because int might match the return type of a gcc2
23647     builtin and then its argument prototype would still apply.  */
23648 char $ac_func();
23649 char (*f)();
23650
23651 int main() {
23652
23653 /* The GNU C library defines this for functions which it implements
23654     to always fail with ENOSYS.  Some functions are actually named
23655     something starting with __ and the normal name is an alias.  */
23656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23657 choke me
23658 #else
23659 f = $ac_func;
23660 #endif
23661
23662 ; return 0; }
23663 EOF
23664 if { (eval echo configure:23665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23665   rm -rf conftest*
23666   eval "ac_cv_func_$ac_func=yes"
23667 else
23668   echo "configure: failed program was:" >&5
23669   cat conftest.$ac_ext >&5
23670   rm -rf conftest*
23671   eval "ac_cv_func_$ac_func=no"
23672 fi
23673 rm -f conftest*
23674 fi
23675
23676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23677   echo "$ac_t""yes" 1>&6
23678     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23679   cat >> confdefs.h <<EOF
23680 #define $ac_tr_func 1
23681 EOF
23682  
23683 else
23684   echo "$ac_t""no" 1>&6
23685 fi
23686 done
23687
23688 fi
23689
23690 for ac_func in \
23691         bcopy                   \
23692         closesocket             \
23693         chroot                  \
23694         endgrent                \
23695         endpwent                \
23696         fcntl                   \
23697         flock                   \
23698         fstat                   \
23699         getdtablesize   \
23700         getgrgid                \
23701         gethostname             \
23702         getpass                 \
23703         getpassphrase   \
23704         getpwuid                \
23705         getpwnam                \
23706         getspnam                \
23707         gettimeofday    \
23708         initgroups              \
23709         lockf                   \
23710         memcpy                  \
23711         memmove                 \
23712         mkstemp                 \
23713         mktemp                  \
23714         pipe                    \
23715         read                    \
23716         recv                    \
23717         recvfrom                \
23718         setpwfile               \
23719         setgid                  \
23720         setegid                 \
23721         setsid                  \
23722         setuid                  \
23723         seteuid                 \
23724         sigaction               \
23725         signal                  \
23726         sigset                  \
23727         strdup                  \
23728         strpbrk                 \
23729         strrchr                 \
23730         strsep                  \
23731         strstr                  \
23732         strtol                  \
23733         strtoul                 \
23734         strtoq                  \
23735         strtouq                 \
23736         strtoll                 \
23737         strspn                  \
23738         sysconf                 \
23739         usleep                  \
23740         waitpid                 \
23741         wait4                   \
23742         write                   \
23743         send                    \
23744         sendmsg                 \
23745         sendto                  \
23746
23747 do
23748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23749 echo "configure:23750: checking for $ac_func" >&5
23750 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23751   echo $ac_n "(cached) $ac_c" 1>&6
23752 else
23753   cat > conftest.$ac_ext <<EOF
23754 #line 23755 "configure"
23755 #include "confdefs.h"
23756 /* System header to define __stub macros and hopefully few prototypes,
23757     which can conflict with char $ac_func(); below.  */
23758 #include <assert.h>
23759 /* Override any gcc2 internal prototype to avoid an error.  */
23760 /* We use char because int might match the return type of a gcc2
23761     builtin and then its argument prototype would still apply.  */
23762 char $ac_func();
23763 char (*f)();
23764
23765 int main() {
23766
23767 /* The GNU C library defines this for functions which it implements
23768     to always fail with ENOSYS.  Some functions are actually named
23769     something starting with __ and the normal name is an alias.  */
23770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23771 choke me
23772 #else
23773 f = $ac_func;
23774 #endif
23775
23776 ; return 0; }
23777 EOF
23778 if { (eval echo configure:23779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23779   rm -rf conftest*
23780   eval "ac_cv_func_$ac_func=yes"
23781 else
23782   echo "configure: failed program was:" >&5
23783   cat conftest.$ac_ext >&5
23784   rm -rf conftest*
23785   eval "ac_cv_func_$ac_func=no"
23786 fi
23787 rm -f conftest*
23788 fi
23789
23790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23791   echo "$ac_t""yes" 1>&6
23792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23793   cat >> confdefs.h <<EOF
23794 #define $ac_tr_func 1
23795 EOF
23796  
23797 else
23798   echo "$ac_t""no" 1>&6
23799 fi
23800 done
23801
23802
23803 for ac_func in getopt getpeereid
23804 do
23805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23806 echo "configure:23807: checking for $ac_func" >&5
23807 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23808   echo $ac_n "(cached) $ac_c" 1>&6
23809 else
23810   cat > conftest.$ac_ext <<EOF
23811 #line 23812 "configure"
23812 #include "confdefs.h"
23813 /* System header to define __stub macros and hopefully few prototypes,
23814     which can conflict with char $ac_func(); below.  */
23815 #include <assert.h>
23816 /* Override any gcc2 internal prototype to avoid an error.  */
23817 /* We use char because int might match the return type of a gcc2
23818     builtin and then its argument prototype would still apply.  */
23819 char $ac_func();
23820 char (*f)();
23821
23822 int main() {
23823
23824 /* The GNU C library defines this for functions which it implements
23825     to always fail with ENOSYS.  Some functions are actually named
23826     something starting with __ and the normal name is an alias.  */
23827 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23828 choke me
23829 #else
23830 f = $ac_func;
23831 #endif
23832
23833 ; return 0; }
23834 EOF
23835 if { (eval echo configure:23836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23836   rm -rf conftest*
23837   eval "ac_cv_func_$ac_func=yes"
23838 else
23839   echo "configure: failed program was:" >&5
23840   cat conftest.$ac_ext >&5
23841   rm -rf conftest*
23842   eval "ac_cv_func_$ac_func=no"
23843 fi
23844 rm -f conftest*
23845 fi
23846
23847 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23848   echo "$ac_t""yes" 1>&6
23849     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23850   cat >> confdefs.h <<EOF
23851 #define $ac_tr_func 1
23852 EOF
23853  
23854 else
23855   echo "$ac_t""no" 1>&6
23856 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23857 fi
23858 done
23859
23860
23861
23862 if test "$ac_cv_func_getopt" != yes; then
23863         LIBSRCS="$LIBSRCS getopt.c"
23864 fi
23865 if test "$ac_cv_func_getpeereid" != yes; then
23866         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23867 echo "configure:23868: checking for msg_accrights in msghdr" >&5
23868 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23869   echo $ac_n "(cached) $ac_c" 1>&6
23870 else
23871   cat > conftest.$ac_ext <<EOF
23872 #line 23873 "configure"
23873 #include "confdefs.h"
23874 #include <sys/socket.h>
23875 int main() {
23876 struct msghdr m; m.msg_accrightslen=0
23877 ; return 0; }
23878 EOF
23879 if { (eval echo configure:23880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23880   rm -rf conftest*
23881   ol_cv_msghdr_msg_accrights=yes
23882 else
23883   echo "configure: failed program was:" >&5
23884   cat conftest.$ac_ext >&5
23885   rm -rf conftest*
23886   ol_cv_msghdr_msg_accrights=no
23887 fi
23888 rm -f conftest*
23889         
23890 fi
23891
23892 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23893   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23894         cat >> confdefs.h <<\EOF
23895 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23896 EOF
23897
23898   fi
23899
23900         LIBSRCS="$LIBSRCS getpeereid.c"
23901 fi
23902 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23903         if test "$ac_cv_func_snprintf" != yes; then
23904                 cat >> confdefs.h <<\EOF
23905 #define snprintf ber_pvt_snprintf
23906 EOF
23907
23908         fi
23909         if test "$ac_cv_func_vsnprintf" != yes; then
23910                 cat >> confdefs.h <<\EOF
23911 #define vsnprintf ber_pvt_vsnprintf
23912 EOF
23913
23914         fi
23915 fi
23916
23917
23918 if test "$ol_enable_slapi" != no ; then
23919                         for ac_hdr in ltdl.h
23920 do
23921 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23922 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23923 echo "configure:23924: checking for $ac_hdr" >&5
23924 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23925   echo $ac_n "(cached) $ac_c" 1>&6
23926 else
23927   cat > conftest.$ac_ext <<EOF
23928 #line 23929 "configure"
23929 #include "confdefs.h"
23930 #include <$ac_hdr>
23931 EOF
23932 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23933 { (eval echo configure:23934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23934 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23935 if test -z "$ac_err"; then
23936   rm -rf conftest*
23937   eval "ac_cv_header_$ac_safe=yes"
23938 else
23939   echo "$ac_err" >&5
23940   echo "configure: failed program was:" >&5
23941   cat conftest.$ac_ext >&5
23942   rm -rf conftest*
23943   eval "ac_cv_header_$ac_safe=no"
23944 fi
23945 rm -f conftest*
23946 fi
23947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23948   echo "$ac_t""yes" 1>&6
23949     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23950   cat >> confdefs.h <<EOF
23951 #define $ac_tr_hdr 1
23952 EOF
23953  
23954 else
23955   echo "$ac_t""no" 1>&6
23956 fi
23957 done
23958
23959
23960         if test $ac_cv_header_ltdl_h != yes ; then
23961                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23962         fi
23963         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23964 echo "configure:23965: checking for lt_dlinit in -lltdl" >&5
23965 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23967   echo $ac_n "(cached) $ac_c" 1>&6
23968 else
23969   ac_save_LIBS="$LIBS"
23970 LIBS="-lltdl  $LIBS"
23971 cat > conftest.$ac_ext <<EOF
23972 #line 23973 "configure"
23973 #include "confdefs.h"
23974 /* Override any gcc2 internal prototype to avoid an error.  */
23975 /* We use char because int might match the return type of a gcc2
23976     builtin and then its argument prototype would still apply.  */
23977 char lt_dlinit();
23978
23979 int main() {
23980 lt_dlinit()
23981 ; return 0; }
23982 EOF
23983 if { (eval echo configure:23984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23984   rm -rf conftest*
23985   eval "ac_cv_lib_$ac_lib_var=yes"
23986 else
23987   echo "configure: failed program was:" >&5
23988   cat conftest.$ac_ext >&5
23989   rm -rf conftest*
23990   eval "ac_cv_lib_$ac_lib_var=no"
23991 fi
23992 rm -f conftest*
23993 LIBS="$ac_save_LIBS"
23994
23995 fi
23996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23997   echo "$ac_t""yes" 1>&6
23998   
23999                 SLAPI_LIBS=-lltdl
24000                 LIBSLAPI=libslapi.a
24001                 LIBSLAPITOOLS=../libslapi.a
24002                 cat >> confdefs.h <<\EOF
24003 #define HAVE_LIBLTDL 1
24004 EOF
24005
24006         
24007 else
24008   echo "$ac_t""no" 1>&6
24009 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
24010 fi
24011
24012
24013         cat >> confdefs.h <<\EOF
24014 #define LDAP_SLAPI 1
24015 EOF
24016
24017 fi
24018
24019 if test "$ol_enable_debug" != no ; then
24020         cat >> confdefs.h <<\EOF
24021 #define LDAP_DEBUG 1
24022 EOF
24023
24024 fi
24025 if test "$ol_enable_syslog" = yes ; then
24026         cat >> confdefs.h <<\EOF
24027 #define LDAP_SYSLOG 1
24028 EOF
24029
24030 fi
24031 if test "$ol_link_kbind" != no ; then
24032         cat >> confdefs.h <<\EOF
24033 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
24034 EOF
24035
24036 fi
24037 if test "$ol_enable_proctitle" != no ; then
24038         cat >> confdefs.h <<\EOF
24039 #define LDAP_PROCTITLE 1
24040 EOF
24041
24042 fi
24043 if test "$ol_enable_referrals" != no ; then
24044         cat >> confdefs.h <<\EOF
24045 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
24046 EOF
24047
24048 fi
24049 if test "$ol_enable_local" != no; then
24050         cat >> confdefs.h <<\EOF
24051 #define LDAP_PF_LOCAL 1
24052 EOF
24053
24054 fi
24055 if test "$ol_link_ipv6" != no; then
24056         cat >> confdefs.h <<\EOF
24057 #define LDAP_PF_INET6 1
24058 EOF
24059
24060 fi
24061 if test "$ol_enable_cleartext" != no ; then
24062         cat >> confdefs.h <<\EOF
24063 #define SLAPD_CLEARTEXT 1
24064 EOF
24065
24066 fi
24067 if test "$ol_enable_crypt" != no ; then
24068         cat >> confdefs.h <<\EOF
24069 #define SLAPD_CRYPT 1
24070 EOF
24071
24072 fi
24073 if test "$ol_link_spasswd" != no ; then
24074         cat >> confdefs.h <<\EOF
24075 #define SLAPD_SPASSWD 1
24076 EOF
24077
24078 fi
24079 if test "$ol_enable_multimaster" != no ; then
24080         cat >> confdefs.h <<\EOF
24081 #define SLAPD_MULTIMASTER 1
24082 EOF
24083
24084 fi
24085 if test "$ol_enable_rlookups" != no ; then
24086         cat >> confdefs.h <<\EOF
24087 #define SLAPD_RLOOKUPS 1
24088 EOF
24089
24090 fi
24091 if test "$ol_enable_aci" != no ; then
24092         cat >> confdefs.h <<\EOF
24093 #define SLAPD_ACI_ENABLED 1
24094 EOF
24095
24096 fi
24097
24098 if test "$ol_link_modules" != no ; then
24099         cat >> confdefs.h <<\EOF
24100 #define SLAPD_MODULES 1
24101 EOF
24102
24103         BUILD_SLAPD=yes
24104         SLAPD_MODULES_LDFLAGS="-dlopen self"
24105 fi
24106
24107 cat >> confdefs.h <<\EOF
24108 #define SLAPD_MOD_STATIC 1
24109 EOF
24110
24111 cat >> confdefs.h <<\EOF
24112 #define SLAPD_MOD_DYNAMIC 2
24113 EOF
24114
24115
24116 if test "$ol_enable_bdb" != no ; then
24117         BUILD_SLAPD=yes
24118         BUILD_BDB=$ol_enable_bdb
24119         if test "$ol_enable_bdb" = mod ; then
24120                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24121                 MFLAG=SLAPD_MOD_DYNAMIC
24122         else
24123                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24124                 MFLAG=SLAPD_MOD_STATIC
24125         fi
24126         cat >> confdefs.h <<EOF
24127 #define SLAPD_BDB $MFLAG
24128 EOF
24129
24130 fi
24131
24132 if test "$ol_enable_dnssrv" != no ; then
24133         BUILD_SLAPD=yes
24134         BUILD_DNSSRV=$ol_enable_dnssrv
24135         if test "$ol_enable_dnssrv" = mod ; then
24136                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24137                 MFLAG=SLAPD_MOD_DYNAMIC
24138         else
24139                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24140                 MFLAG=SLAPD_MOD_STATIC
24141         fi
24142         cat >> confdefs.h <<EOF
24143 #define SLAPD_DNSSRV $MFLAG
24144 EOF
24145
24146 fi
24147
24148 if test "$ol_enable_hdb" != no ; then
24149         BUILD_SLAPD=yes
24150         BUILD_HDB=$ol_enable_hdb
24151         if test "$ol_enable_hdb" = mod ; then
24152                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24153                 MFLAG=SLAPD_MOD_DYNAMIC
24154         else
24155                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24156                 MFLAG=SLAPD_MOD_STATIC
24157         fi
24158         cat >> confdefs.h <<EOF
24159 #define SLAPD_HDB $MFLAG
24160 EOF
24161
24162 fi
24163
24164 if test "$ol_enable_ldap" != no ; then
24165         BUILD_SLAPD=yes
24166         BUILD_LDAP=$ol_enable_ldap
24167         if test "$ol_enable_ldap" = mod ; then
24168                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24169                 MFLAG=SLAPD_MOD_DYNAMIC
24170         else
24171                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24172                 MFLAG=SLAPD_MOD_STATIC
24173         fi
24174         cat >> confdefs.h <<EOF
24175 #define SLAPD_LDAP $MFLAG
24176 EOF
24177
24178 fi
24179
24180 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24181         BUILD_SLAPD=yes
24182         BUILD_LDBM=$ol_enable_ldbm
24183         if test "$ol_enable_ldbm" = mod ; then
24184                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24185                 MFLAG=SLAPD_MOD_DYNAMIC
24186         else
24187                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24188                 MFLAG=SLAPD_MOD_STATIC
24189         fi
24190         cat >> confdefs.h <<EOF
24191 #define SLAPD_LDBM $MFLAG
24192 EOF
24193
24194 fi
24195
24196 if test "$ol_enable_meta" != no ; then
24197         BUILD_SLAPD=yes
24198         BUILD_META=$ol_enable_meta
24199         BUILD_REWRITE=yes
24200         if test "$ol_enable_meta" = mod ; then
24201                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24202                 MFLAG=SLAPD_MOD_DYNAMIC
24203         else
24204                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24205                 MFLAG=SLAPD_MOD_STATIC
24206         fi
24207         cat >> confdefs.h <<EOF
24208 #define SLAPD_META $MFLAG
24209 EOF
24210
24211 fi
24212
24213 if test "$ol_enable_monitor" != no ; then
24214         BUILD_SLAPD=yes
24215         BUILD_MONITOR=$ol_enable_monitor
24216         if test "$ol_enable_monitor" = mod ; then
24217                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24218                 MFLAG=SLAPD_MOD_DYNAMIC
24219         else
24220                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24221                 MFLAG=SLAPD_MOD_STATIC
24222         fi
24223         cat >> confdefs.h <<EOF
24224 #define SLAPD_MONITOR $MFLAG
24225 EOF
24226
24227 fi
24228
24229 if test "$ol_enable_null" != no ; then
24230         BUILD_SLAPD=yes
24231         BUILD_NULL=$ol_enable_null
24232         if test "$ol_enable_null" = mod ; then
24233                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24234                 MFLAG=SLAPD_MOD_DYNAMIC
24235         else
24236                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24237                 MFLAG=SLAPD_MOD_STATIC
24238         fi
24239         cat >> confdefs.h <<EOF
24240 #define SLAPD_NULL $MFLAG
24241 EOF
24242
24243 fi
24244
24245 if test "$ol_enable_passwd" != no ; then
24246         BUILD_SLAPD=yes
24247         BUILD_PASSWD=$ol_enable_passwd
24248         if test "$ol_enable_passwd" = mod ; then
24249                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24250                 MFLAG=SLAPD_MOD_DYNAMIC
24251         else
24252                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24253                 MFLAG=SLAPD_MOD_STATIC
24254         fi
24255         cat >> confdefs.h <<EOF
24256 #define SLAPD_PASSWD $MFLAG
24257 EOF
24258
24259 fi
24260
24261 if test "$ol_link_perl" != no ; then
24262         BUILD_SLAPD=yes
24263         BUILD_PERL=$ol_enable_perl
24264         if test "$ol_enable_perl" = mod ; then
24265                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24266                 MFLAG=SLAPD_MOD_DYNAMIC
24267         else
24268                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24269                 MFLAG=SLAPD_MOD_STATIC
24270         fi
24271         cat >> confdefs.h <<EOF
24272 #define SLAPD_PERL $MFLAG
24273 EOF
24274
24275 fi
24276
24277 if test "$ol_enable_relay" != no ; then
24278         BUILD_SLAPD=yes
24279         BUILD_RELAY=$ol_enable_relay
24280         if test "$ol_enable_relay" = mod ; then
24281                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24282                 MFLAG=SLAPD_MOD_DYNAMIC
24283         else
24284                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24285                 MFLAG=SLAPD_MOD_STATIC
24286         fi
24287         cat >> confdefs.h <<EOF
24288 #define SLAPD_RELAY $MFLAG
24289 EOF
24290
24291 fi
24292
24293 if test "$ol_enable_shell" != no ; then
24294         if test "$ol_link_thread" != no ; then
24295                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24296         fi
24297         BUILD_SLAPD=yes
24298         BUILD_SHELL=$ol_enable_shell
24299         if test "$ol_enable_shell" = mod ; then
24300                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24301                 MFLAG=SLAPD_MOD_DYNAMIC
24302         else
24303                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24304                 MFLAG=SLAPD_MOD_STATIC
24305         fi
24306         cat >> confdefs.h <<EOF
24307 #define SLAPD_SHELL $MFLAG
24308 EOF
24309
24310 fi
24311
24312 if test "$ol_link_sql" != no ; then
24313         BUILD_SLAPD=yes
24314         BUILD_SQL=$ol_enable_sql
24315         if test "$ol_enable_sql" = mod; then
24316                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24317                 MFLAG=SLAPD_MOD_DYNAMIC
24318         else
24319                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24320                 MFLAG=SLAPD_MOD_STATIC
24321         fi
24322         cat >> confdefs.h <<EOF
24323 #define SLAPD_SQL $MFLAG
24324 EOF
24325
24326 fi
24327
24328 if test "$ol_enable_chain" != no ; then
24329         BUILD_CHAIN=$ol_enable_chain
24330         if test "$ol_enable_chain" = mod ; then
24331                 MFLAG=SLAPD_MOD_DYNAMIC
24332                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
24333         else
24334                 MFLAG=SLAPD_MOD_STATIC
24335         fi
24336         cat >> confdefs.h <<EOF
24337 #define SLAPD_OVER_CHAIN $MFLAG
24338 EOF
24339
24340 fi
24341
24342 if test "$ol_enable_denyop" != no ; then
24343         BUILD_DENYOP=$ol_enable_denyop
24344         if test "$ol_enable_denyop" = mod ; then
24345                 MFLAG=SLAPD_MOD_DYNAMIC
24346                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
24347         else
24348                 MFLAG=SLAPD_MOD_STATIC
24349         fi
24350         cat >> confdefs.h <<EOF
24351 #define SLAPD_OVER_DENYOP $MFLAG
24352 EOF
24353
24354 fi
24355
24356 if test "$ol_enable_dyngroup" != no ; then
24357         BUILD_DYNGROUP=$ol_enable_dyngroup
24358         if test "$ol_enable_dyngroup" = mod ; then
24359                 MFLAG=SLAPD_MOD_DYNAMIC
24360                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24361         else
24362                 MFLAG=SLAPD_MOD_STATIC
24363         fi
24364         cat >> confdefs.h <<EOF
24365 #define SLAPD_OVER_DYNGROUP $MFLAG
24366 EOF
24367
24368 fi
24369
24370 if test "$ol_enable_lastmod" != no ; then
24371         BUILD_LASTMOD=$ol_enable_lastmod
24372         if test "$ol_enable_lastmod" = mod ; then
24373                 MFLAG=SLAPD_MOD_DYNAMIC
24374                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
24375         else
24376                 MFLAG=SLAPD_MOD_STATIC
24377         fi
24378         cat >> confdefs.h <<EOF
24379 #define SLAPD_OVER_LASTMOD $MFLAG
24380 EOF
24381
24382 fi
24383
24384 if test "$ol_enable_ppolicy" != no ; then
24385         BUILD_PPOLICY=$ol_enable_ppolicy
24386         if test "$ol_enable_ppolicy" = mod ; then
24387                 MFLAG=SLAPD_MOD_DYNAMIC
24388                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24389         else
24390                 MFLAG=SLAPD_MOD_STATIC
24391         fi
24392         cat >> confdefs.h <<EOF
24393 #define SLAPD_OVER_PPOLICY $MFLAG
24394 EOF
24395
24396 fi
24397
24398 if test "$ol_enable_proxycache" != no ; then
24399         BUILD_PROXYCACHE=$ol_enable_proxycache
24400         if test "$ol_enable_proxycache" = mod ; then
24401                 MFLAG=SLAPD_MOD_DYNAMIC
24402                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24403         else
24404                 MFLAG=SLAPD_MOD_STATIC
24405         fi
24406         cat >> confdefs.h <<EOF
24407 #define SLAPD_OVER_PROXYCACHE $MFLAG
24408 EOF
24409
24410 fi
24411
24412 if test "$ol_enable_refint" != no ; then
24413         BUILD_REFINT=$ol_enable_refint
24414         if test "$ol_enable_refint" = mod ; then
24415                 MFLAG=SLAPD_MOD_DYNAMIC
24416                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24417         else
24418                 MFLAG=SLAPD_MOD_STATIC
24419         fi
24420         cat >> confdefs.h <<EOF
24421 #define SLAPD_OVER_REFINT $MFLAG
24422 EOF
24423
24424 fi
24425
24426 if test "$ol_enable_rwm" != no ; then
24427         BUILD_REWRITE=yes
24428         BUILD_RWM=$ol_enable_rwm
24429         if test "$ol_enable_rwm" = mod ; then
24430                 MFLAG=SLAPD_MOD_DYNAMIC
24431                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24432         else
24433                 MFLAG=SLAPD_MOD_STATIC
24434         fi
24435         cat >> confdefs.h <<EOF
24436 #define SLAPD_OVER_RWM $MFLAG
24437 EOF
24438
24439 fi
24440
24441 if test "$ol_enable_unique" != no ; then
24442         BUILD_UNIQUE=$ol_enable_unique
24443         if test "$ol_enable_unique" = mod ; then
24444                 MFLAG=SLAPD_MOD_DYNAMIC
24445                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24446         else
24447                 MFLAG=SLAPD_MOD_STATIC
24448         fi
24449         cat >> confdefs.h <<EOF
24450 #define SLAPD_OVER_UNIQUE $MFLAG
24451 EOF
24452
24453 fi
24454
24455 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24456         $BUILD_SLAPD = yes ; then
24457         BUILD_SLURPD=yes
24458 fi
24459
24460 if test "$ol_enable_rewrite" != no ; then
24461         cat >> confdefs.h <<\EOF
24462 #define ENABLE_REWRITE 1
24463 EOF
24464
24465         BUILD_REWRITE=yes
24466 fi
24467
24468 if test "$ol_enable_slapi" != no ; then
24469         cat >> confdefs.h <<\EOF
24470 #define ENABLE_SLAPI 1
24471 EOF
24472
24473         BUILD_SLAPI=yes
24474         SLAPD_SLAPI_DEPEND=libslapi.a
24475 fi
24476
24477
24478
24479 if test "$ac_cv_mingw32" = yes ; then
24480         PLAT=NT
24481         SLAPD_MODULES_LDFLAGS=
24482 else
24483         PLAT=UNIX
24484 fi
24485
24486 if test -z "$SLAPD_STATIC_BACKENDS"; then
24487         SLAPD_NO_STATIC='#'
24488 else
24489         SLAPD_NO_STATIC=
24490 fi
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500   
24501   
24502   
24503   
24504   
24505   
24506   
24507   
24508   
24509   
24510   
24511   
24512   
24513   
24514   
24515   
24516   
24517   
24518   
24519   
24520   
24521   
24522   
24523   
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563 # Check whether --with-xxinstall or --without-xxinstall was given.
24564 if test "${with_xxinstall+set}" = set; then
24565   withval="$with_xxinstall"
24566   :
24567 fi
24568
24569
24570
24571 trap '' 1 2 15
24572
24573 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24574
24575 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24576 # Let make expand exec_prefix.
24577 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24578
24579 # Any assignment to VPATH causes Sun make to only execute
24580 # the first set of double-colon rules, so remove it if not needed.
24581 # If there is a colon in the path, we need to keep it.
24582 if test "x$srcdir" = x.; then
24583   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24584 fi
24585
24586 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24587
24588 DEFS=-DHAVE_CONFIG_H
24589
24590 # Without the "./", some shells look in PATH for config.status.
24591 : ${CONFIG_STATUS=./config.status}
24592
24593 echo creating $CONFIG_STATUS
24594 rm -f $CONFIG_STATUS
24595 cat > $CONFIG_STATUS <<EOF
24596 #! /bin/sh
24597 # Generated automatically by configure.
24598 # Run this file to recreate the current configuration.
24599 # This directory was configured as follows,
24600 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24601 #
24602 # $0 $ac_configure_args
24603 #
24604 # Compiler output produced by configure, useful for debugging
24605 # configure, is in ./config.log if it exists.
24606
24607 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24608 for ac_option
24609 do
24610   case "\$ac_option" in
24611   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24612     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24613     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24614   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24615     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24616     exit 0 ;;
24617   -help | --help | --hel | --he | --h)
24618     echo "\$ac_cs_usage"; exit 0 ;;
24619   *) echo "\$ac_cs_usage"; exit 1 ;;
24620   esac
24621 done
24622
24623 ac_given_srcdir=$srcdir
24624 ac_given_INSTALL="$INSTALL"
24625
24626 trap 'rm -fr `echo "\
24627 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24628 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24629 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24630 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24631 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24632 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24633 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24634 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24635 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24636 include/Makefile:build/top.mk:include/Makefile.in \
24637 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24638 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24639 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24640 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24641 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24642 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24643 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24644 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24645 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24646 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24647 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24648 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24649 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24650 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24651 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24652 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24653 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24654 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24655 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24656 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24657 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24658 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24659 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24660 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24661 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24662 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24663 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24664 tests/run \
24665 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24666  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24667 EOF
24668 cat >> $CONFIG_STATUS <<EOF
24669
24670 # Protect against being on the right side of a sed subst in config.status.
24671 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24672  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24673 $ac_vpsub
24674 $extrasub
24675 s%@SHELL@%$SHELL%g
24676 s%@CFLAGS@%$CFLAGS%g
24677 s%@CPPFLAGS@%$CPPFLAGS%g
24678 s%@CXXFLAGS@%$CXXFLAGS%g
24679 s%@FFLAGS@%$FFLAGS%g
24680 s%@DEFS@%$DEFS%g
24681 s%@LDFLAGS@%$LDFLAGS%g
24682 s%@LIBS@%$LIBS%g
24683 s%@exec_prefix@%$exec_prefix%g
24684 s%@prefix@%$prefix%g
24685 s%@program_transform_name@%$program_transform_name%g
24686 s%@bindir@%$bindir%g
24687 s%@sbindir@%$sbindir%g
24688 s%@libexecdir@%$libexecdir%g
24689 s%@datadir@%$datadir%g
24690 s%@sysconfdir@%$sysconfdir%g
24691 s%@sharedstatedir@%$sharedstatedir%g
24692 s%@localstatedir@%$localstatedir%g
24693 s%@libdir@%$libdir%g
24694 s%@includedir@%$includedir%g
24695 s%@oldincludedir@%$oldincludedir%g
24696 s%@infodir@%$infodir%g
24697 s%@mandir@%$mandir%g
24698 s%@host@%$host%g
24699 s%@host_alias@%$host_alias%g
24700 s%@host_cpu@%$host_cpu%g
24701 s%@host_vendor@%$host_vendor%g
24702 s%@host_os@%$host_os%g
24703 s%@target@%$target%g
24704 s%@target_alias@%$target_alias%g
24705 s%@target_cpu@%$target_cpu%g
24706 s%@target_vendor@%$target_vendor%g
24707 s%@target_os@%$target_os%g
24708 s%@build@%$build%g
24709 s%@build_alias@%$build_alias%g
24710 s%@build_cpu@%$build_cpu%g
24711 s%@build_vendor@%$build_vendor%g
24712 s%@build_os@%$build_os%g
24713 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24714 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24715 s%@INSTALL_DATA@%$INSTALL_DATA%g
24716 s%@PACKAGE@%$PACKAGE%g
24717 s%@VERSION@%$VERSION%g
24718 s%@ACLOCAL@%$ACLOCAL%g
24719 s%@AUTOCONF@%$AUTOCONF%g
24720 s%@AUTOMAKE@%$AUTOMAKE%g
24721 s%@AUTOHEADER@%$AUTOHEADER%g
24722 s%@MAKEINFO@%$MAKEINFO%g
24723 s%@install_sh@%$install_sh%g
24724 s%@AMTAR@%$AMTAR%g
24725 s%@AWK@%$AWK%g
24726 s%@AMTARFLAGS@%$AMTARFLAGS%g
24727 s%@SET_MAKE@%$SET_MAKE%g
24728 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24729 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24730 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24731 s%@top_builddir@%$top_builddir%g
24732 s%@ldap_subdir@%$ldap_subdir%g
24733 s%@CC@%$CC%g
24734 s%@AR@%$AR%g
24735 s%@LN_S@%$LN_S%g
24736 s%@OBJEXT@%$OBJEXT%g
24737 s%@EXEEXT@%$EXEEXT%g
24738 s%@ECHO@%$ECHO%g
24739 s%@RANLIB@%$RANLIB%g
24740 s%@STRIP@%$STRIP%g
24741 s%@DLLTOOL@%$DLLTOOL%g
24742 s%@AS@%$AS%g
24743 s%@OBJDUMP@%$OBJDUMP%g
24744 s%@CPP@%$CPP%g
24745 s%@LIBTOOL@%$LIBTOOL%g
24746 s%@PERLBIN@%$PERLBIN%g
24747 s%@OL_MKDEP@%$OL_MKDEP%g
24748 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24749 s%@LTSTATIC@%$LTSTATIC%g
24750 s%@LIBOBJS@%$LIBOBJS%g
24751 s%@LIBSRCS@%$LIBSRCS%g
24752 s%@PLAT@%$PLAT%g
24753 s%@WITH_SASL@%$WITH_SASL%g
24754 s%@WITH_TLS@%$WITH_TLS%g
24755 s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
24756 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24757 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24758 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24759 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24760 s%@BUILD_BDB@%$BUILD_BDB%g
24761 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24762 s%@BUILD_HDB@%$BUILD_HDB%g
24763 s%@BUILD_LDAP@%$BUILD_LDAP%g
24764 s%@BUILD_LDBM@%$BUILD_LDBM%g
24765 s%@BUILD_META@%$BUILD_META%g
24766 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24767 s%@BUILD_NULL@%$BUILD_NULL%g
24768 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24769 s%@BUILD_RELAY@%$BUILD_RELAY%g
24770 s%@BUILD_PERL@%$BUILD_PERL%g
24771 s%@BUILD_SHELL@%$BUILD_SHELL%g
24772 s%@BUILD_SQL@%$BUILD_SQL%g
24773 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24774 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24775 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24776 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24777 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24778 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24779 s%@BUILD_REFINT@%$BUILD_REFINT%g
24780 s%@BUILD_RWM@%$BUILD_RWM%g
24781 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24782 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24783 s%@LDAP_LIBS@%$LDAP_LIBS%g
24784 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24785 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24786 s%@LDBM_LIBS@%$LDBM_LIBS%g
24787 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24788 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24789 s%@WRAP_LIBS@%$WRAP_LIBS%g
24790 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24791 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24792 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24793 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24794 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24795 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24796 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24797 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24798 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24799 s%@KRB4_LIBS@%$KRB4_LIBS%g
24800 s%@KRB5_LIBS@%$KRB5_LIBS%g
24801 s%@SASL_LIBS@%$SASL_LIBS%g
24802 s%@TLS_LIBS@%$TLS_LIBS%g
24803 s%@MODULES_LIBS@%$MODULES_LIBS%g
24804 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24805 s%@LIBSLAPI@%$LIBSLAPI%g
24806 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24807 s%@AUTH_LIBS@%$AUTH_LIBS%g
24808 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24809 s%@SLAPD_GMP_LIBS@%$SLAPD_GMP_LIBS%g
24810 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24811 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24812 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24813
24814 CEOF
24815 EOF
24816
24817 cat >> $CONFIG_STATUS <<\EOF
24818
24819 # Split the substitutions into bite-sized pieces for seds with
24820 # small command number limits, like on Digital OSF/1 and HP-UX.
24821 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24822 ac_file=1 # Number of current file.
24823 ac_beg=1 # First line for current file.
24824 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24825 ac_more_lines=:
24826 ac_sed_cmds=""
24827 while $ac_more_lines; do
24828   if test $ac_beg -gt 1; then
24829     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24830   else
24831     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24832   fi
24833   if test ! -s conftest.s$ac_file; then
24834     ac_more_lines=false
24835     rm -f conftest.s$ac_file
24836   else
24837     if test -z "$ac_sed_cmds"; then
24838       ac_sed_cmds="sed -f conftest.s$ac_file"
24839     else
24840       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24841     fi
24842     ac_file=`expr $ac_file + 1`
24843     ac_beg=$ac_end
24844     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24845   fi
24846 done
24847 if test -z "$ac_sed_cmds"; then
24848   ac_sed_cmds=cat
24849 fi
24850 EOF
24851
24852 cat >> $CONFIG_STATUS <<EOF
24853
24854 CONFIG_FILES=\${CONFIG_FILES-"\
24855 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24856 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24857 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24858 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24859 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24860 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24861 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24862 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24863 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24864 include/Makefile:build/top.mk:include/Makefile.in \
24865 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24866 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24867 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24868 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24869 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24870 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24871 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24872 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24873 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24874 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24875 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24876 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24877 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24878 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24879 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24880 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24881 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24882 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24883 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24884 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24885 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24886 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24887 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24888 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24889 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24890 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24891 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24892 tests/run \
24893 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24894 "}
24895 EOF
24896 cat >> $CONFIG_STATUS <<\EOF
24897 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24898   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24899   case "$ac_file" in
24900   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24901        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24902   *) ac_file_in="${ac_file}.in" ;;
24903   esac
24904
24905   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24906
24907   # Remove last slash and all that follows it.  Not all systems have dirname.
24908   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24909   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24910     # The file is in a subdirectory.
24911     test ! -d "$ac_dir" && mkdir "$ac_dir"
24912     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24913     # A "../" for each directory in $ac_dir_suffix.
24914     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24915   else
24916     ac_dir_suffix= ac_dots=
24917   fi
24918
24919   case "$ac_given_srcdir" in
24920   .)  srcdir=.
24921       if test -z "$ac_dots"; then top_srcdir=.
24922       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24923   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24924   *) # Relative path.
24925     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24926     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24927   esac
24928
24929   case "$ac_given_INSTALL" in
24930   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24931   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24932   esac
24933
24934   echo creating "$ac_file"
24935   rm -f "$ac_file"
24936   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24937   case "$ac_file" in
24938   *[Mm]akefile*) ac_comsub="1i\\
24939 # $configure_input" ;;
24940   *) ac_comsub= ;;
24941   esac
24942
24943   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24944   sed -e "$ac_comsub
24945 s%@configure_input@%$configure_input%g
24946 s%@srcdir@%$srcdir%g
24947 s%@top_srcdir@%$top_srcdir%g
24948 s%@INSTALL@%$INSTALL%g
24949 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24950 fi; done
24951 rm -f conftest.s*
24952
24953 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24954 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24955 #
24956 # ac_d sets the value in "#define NAME VALUE" lines.
24957 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24958 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24959 ac_dC='\3'
24960 ac_dD='%g'
24961 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24962 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24963 ac_uB='\([      ]\)%\1#\2define\3'
24964 ac_uC=' '
24965 ac_uD='\4%g'
24966 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24967 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24968 ac_eB='$%\1#\2define\3'
24969 ac_eC=' '
24970 ac_eD='%g'
24971
24972 if test "${CONFIG_HEADERS+set}" != set; then
24973 EOF
24974 cat >> $CONFIG_STATUS <<EOF
24975   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24976 EOF
24977 cat >> $CONFIG_STATUS <<\EOF
24978 fi
24979 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24980   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24981   case "$ac_file" in
24982   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24983        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24984   *) ac_file_in="${ac_file}.in" ;;
24985   esac
24986
24987   echo creating $ac_file
24988
24989   rm -f conftest.frag conftest.in conftest.out
24990   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24991   cat $ac_file_inputs > conftest.in
24992
24993 EOF
24994
24995 # Transform confdefs.h into a sed script conftest.vals that substitutes
24996 # the proper values into config.h.in to produce config.h.  And first:
24997 # Protect against being on the right side of a sed subst in config.status.
24998 # Protect against being in an unquoted here document in config.status.
24999 rm -f conftest.vals
25000 cat > conftest.hdr <<\EOF
25001 s/[\\&%]/\\&/g
25002 s%[\\$`]%\\&%g
25003 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
25004 s%ac_d%ac_u%gp
25005 s%ac_u%ac_e%gp
25006 EOF
25007 sed -n -f conftest.hdr confdefs.h > conftest.vals
25008 rm -f conftest.hdr
25009
25010 # This sed command replaces #undef with comments.  This is necessary, for
25011 # example, in the case of _POSIX_SOURCE, which is predefined and required
25012 # on some systems where configure will not decide to define it.
25013 cat >> conftest.vals <<\EOF
25014 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
25015 EOF
25016
25017 # Break up conftest.vals because some shells have a limit on
25018 # the size of here documents, and old seds have small limits too.
25019
25020 rm -f conftest.tail
25021 while :
25022 do
25023   ac_lines=`grep -c . conftest.vals`
25024   # grep -c gives empty output for an empty file on some AIX systems.
25025   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
25026   # Write a limited-size here document to conftest.frag.
25027   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
25028   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
25029   echo 'CEOF
25030   sed -f conftest.frag conftest.in > conftest.out
25031   rm -f conftest.in
25032   mv conftest.out conftest.in
25033 ' >> $CONFIG_STATUS
25034   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25035   rm -f conftest.vals
25036   mv conftest.tail conftest.vals
25037 done
25038 rm -f conftest.vals
25039
25040 cat >> $CONFIG_STATUS <<\EOF
25041   rm -f conftest.frag conftest.h
25042   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
25043   cat conftest.in >> conftest.h
25044   rm -f conftest.in
25045   if cmp -s $ac_file conftest.h 2>/dev/null; then
25046     echo "$ac_file is unchanged"
25047     rm -f conftest.h
25048   else
25049     # Remove last slash and all that follows it.  Not all systems have dirname.
25050       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
25051       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25052       # The file is in a subdirectory.
25053       test ! -d "$ac_dir" && mkdir "$ac_dir"
25054     fi
25055     rm -f $ac_file
25056     mv conftest.h $ac_file
25057   fi
25058 fi; done
25059
25060 EOF
25061 cat >> $CONFIG_STATUS <<EOF
25062
25063 EOF
25064 cat >> $CONFIG_STATUS <<\EOF
25065
25066 chmod +x tests/run
25067 date > stamp-h
25068 echo Please run \"make depend\" to build dependencies
25069
25070 exit 0
25071 EOF
25072 chmod +x $CONFIG_STATUS
25073 rm -fr confdefs* $ac_clean_files
25074 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
25075