]> git.sur5r.net Git - openldap/blob - configure
allow backwards compatibility for 'T' option (single char)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.533 2004/04/17 06:45:29 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-backends     enable all available backends no|yes|mod [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
99 ac_help="$ac_help
100       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend no|yes|mod [no]"
105 ac_help="$ac_help
106     --enable-monitor      enable monitor backend no|yes|mod [yes]"
107 ac_help="$ac_help
108     --enable-null         enable null backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-relay        enable relay backend no|yes|mod [yes]"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLAPD Overlay Options:"
122 ac_help="$ac_help
123     --enable-overlays     enable all available overlays no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-chain        LDAP Chain Response no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
136 ac_help="$ac_help
137   --enable-shared[=PKGS]  build shared libraries [default=yes]"
138 ac_help="$ac_help
139   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
140 ac_help="$ac_help
141   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
142
143 # Find the correct PATH separator.  Usually this is `:', but
144 # DJGPP uses `;' like DOS.
145 if test "X${PATH_SEPARATOR+set}" != Xset; then
146   UNAME=${UNAME-`uname 2>/dev/null`}
147   case X$UNAME in
148     *-DOS) lt_cv_sys_path_separator=';' ;;
149     *)     lt_cv_sys_path_separator=':' ;;
150   esac
151   PATH_SEPARATOR=$lt_cv_sys_path_separator
152 fi
153
154
155 # Check that we are running under the correct shell.
156 SHELL=${CONFIG_SHELL-/bin/sh}
157
158 case X$ECHO in
159 X*--fallback-echo)
160   # Remove one level of quotation (which was required for Make).
161   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
162   ;;
163 esac
164
165 echo=${ECHO-echo}
166 if test "X$1" = X--no-reexec; then
167   # Discard the --no-reexec flag, and continue.
168   shift
169 elif test "X$1" = X--fallback-echo; then
170   # Avoid inline document here, it may be left over
171   :
172 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
173   # Yippee, $echo works!
174   :
175 else
176   # Restart under the correct shell.
177   exec $SHELL "$0" --no-reexec ${1+"$@"}
178 fi
179
180 if test "X$1" = X--fallback-echo; then
181   # used as fallback echo
182   shift
183   cat <<EOF
184
185 EOF
186   exit 0
187 fi
188
189 # The HP-UX ksh and POSIX shell print the target directory to stdout
190 # if CDPATH is set.
191 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
192
193 if test -z "$ECHO"; then
194 if test "X${echo_test_string+set}" != Xset; then
195 # find a string as large as possible, as long as the shell can cope with it
196   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
197     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
198     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
199        echo_test_string="`eval $cmd`" &&
200        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
201     then
202       break
203     fi
204   done
205 fi
206
207 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
208    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
209    test "X$echo_testing_string" = "X$echo_test_string"; then
210   :
211 else
212   # The Solaris, AIX, and Digital Unix default echo programs unquote
213   # backslashes.  This makes it impossible to quote backslashes using
214   #   echo "$something" | sed 's/\\/\\\\/g'
215   #
216   # So, first we look for a working echo in the user's PATH.
217
218   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
219   for dir in $PATH /usr/ucb; do
220     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
221        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
222        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
223        test "X$echo_testing_string" = "X$echo_test_string"; then
224       echo="$dir/echo"
225       break
226     fi
227   done
228   IFS="$save_ifs"
229
230   if test "X$echo" = Xecho; then
231     # We didn't find a better echo, so look for alternatives.
232     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
233        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
234        test "X$echo_testing_string" = "X$echo_test_string"; then
235       # This shell has a builtin print -r that does the trick.
236       echo='print -r'
237     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
238          test "X$CONFIG_SHELL" != X/bin/ksh; then
239       # If we have ksh, try running configure again with it.
240       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
241       export ORIGINAL_CONFIG_SHELL
242       CONFIG_SHELL=/bin/ksh
243       export CONFIG_SHELL
244       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
245     else
246       # Try using printf.
247       echo='printf %s\n'
248       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
249          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
250          test "X$echo_testing_string" = "X$echo_test_string"; then
251         # Cool, printf works
252         :
253       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
254            test "X$echo_testing_string" = 'X\t' &&
255            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
256            test "X$echo_testing_string" = "X$echo_test_string"; then
257         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
258         export CONFIG_SHELL
259         SHELL="$CONFIG_SHELL"
260         export SHELL
261         echo="$CONFIG_SHELL $0 --fallback-echo"
262       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
263            test "X$echo_testing_string" = 'X\t' &&
264            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
265            test "X$echo_testing_string" = "X$echo_test_string"; then
266         echo="$CONFIG_SHELL $0 --fallback-echo"
267       else
268         # maybe with a smaller string...
269         prev=:
270
271         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
272           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
273           then
274             break
275           fi
276           prev="$cmd"
277         done
278
279         if test "$prev" != 'sed 50q "$0"'; then
280           echo_test_string=`eval $prev`
281           export echo_test_string
282           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
283         else
284           # Oops.  We lost completely, so just stick with echo.
285           echo=echo
286         fi
287       fi
288     fi
289   fi
290 fi
291 fi
292
293 # Copy echo and quote the copy suitably for passing to libtool from
294 # the Makefile, instead of quoting the original, which is used later.
295 ECHO=$echo
296 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
297    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
298 fi
299
300
301 ac_help="$ac_help
302   --disable-libtool-lock  avoid locking (might break parallel builds)"
303 ac_help="$ac_help
304   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
305 ac_help="$ac_help
306
307 See INSTALL file for further details."
308
309 # Initialize some variables set by options.
310 # The variables have the same names as the options, with
311 # dashes changed to underlines.
312 build=NONE
313 cache_file=./config.cache
314 exec_prefix=NONE
315 host=NONE
316 no_create=
317 nonopt=NONE
318 no_recursion=
319 prefix=NONE
320 program_prefix=NONE
321 program_suffix=NONE
322 program_transform_name=s,x,x,
323 silent=
324 site=
325 srcdir=
326 target=NONE
327 verbose=
328 x_includes=NONE
329 x_libraries=NONE
330 bindir='${exec_prefix}/bin'
331 sbindir='${exec_prefix}/sbin'
332 libexecdir='${exec_prefix}/libexec'
333 datadir='${prefix}/share'
334 sysconfdir='${prefix}/etc'
335 sharedstatedir='${prefix}/com'
336 localstatedir='${prefix}/var'
337 libdir='${exec_prefix}/lib'
338 includedir='${prefix}/include'
339 oldincludedir='/usr/include'
340 infodir='${prefix}/info'
341 mandir='${prefix}/man'
342
343 # Initialize some other variables.
344 subdirs=
345 MFLAGS= MAKEFLAGS=
346 SHELL=${CONFIG_SHELL-/bin/sh}
347 # Maximum number of lines to put in a shell here document.
348 ac_max_here_lines=12
349
350 ac_prev=
351 for ac_option
352 do
353
354   # If the previous option needs an argument, assign it.
355   if test -n "$ac_prev"; then
356     eval "$ac_prev=\$ac_option"
357     ac_prev=
358     continue
359   fi
360
361   case "$ac_option" in
362   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
363   *) ac_optarg= ;;
364   esac
365
366   # Accept the important Cygnus configure options, so we can diagnose typos.
367
368   case "$ac_option" in
369
370   -bindir | --bindir | --bindi | --bind | --bin | --bi)
371     ac_prev=bindir ;;
372   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
373     bindir="$ac_optarg" ;;
374
375   -build | --build | --buil | --bui | --bu)
376     ac_prev=build ;;
377   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
378     build="$ac_optarg" ;;
379
380   -cache-file | --cache-file | --cache-fil | --cache-fi \
381   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382     ac_prev=cache_file ;;
383   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
385     cache_file="$ac_optarg" ;;
386
387   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
388     ac_prev=datadir ;;
389   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
390   | --da=*)
391     datadir="$ac_optarg" ;;
392
393   -disable-* | --disable-*)
394     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
395     # Reject names that are not valid shell variable names.
396     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
397       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
398     fi
399     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
400     eval "enable_${ac_feature}=no" ;;
401
402   -enable-* | --enable-*)
403     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
406       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
407     fi
408     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
409     case "$ac_option" in
410       *=*) ;;
411       *) ac_optarg=yes ;;
412     esac
413     eval "enable_${ac_feature}='$ac_optarg'" ;;
414
415   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
416   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
417   | --exec | --exe | --ex)
418     ac_prev=exec_prefix ;;
419   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
420   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
421   | --exec=* | --exe=* | --ex=*)
422     exec_prefix="$ac_optarg" ;;
423
424   -gas | --gas | --ga | --g)
425     # Obsolete; use --with-gas.
426     with_gas=yes ;;
427
428   -help | --help | --hel | --he)
429     # Omit some internal or obsolete options to make the list less imposing.
430     # This message is too long to be a string in the A/UX 3.1 sh.
431     cat << EOF
432 Usage: configure [options] [host]
433 Options: [defaults in brackets after descriptions]
434 Configuration:
435   --cache-file=FILE       cache test results in FILE
436   --help                  print this message
437   --no-create             do not create output files
438   --quiet, --silent       do not print \`checking...' messages
439   --version               print the version of autoconf that created configure
440 Directory and file names:
441   --prefix=PREFIX         install architecture-independent files in PREFIX
442                           [$ac_default_prefix]
443   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
444                           [same as prefix]
445   --bindir=DIR            user executables in DIR [EPREFIX/bin]
446   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
447   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
448   --datadir=DIR           read-only architecture-independent data in DIR
449                           [PREFIX/share]
450   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
451   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
452                           [PREFIX/com]
453   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
454   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
455   --includedir=DIR        C header files in DIR [PREFIX/include]
456   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
457   --infodir=DIR           info documentation in DIR [PREFIX/info]
458   --mandir=DIR            man documentation in DIR [PREFIX/man]
459   --srcdir=DIR            find the sources in DIR [configure dir or ..]
460   --program-prefix=PREFIX prepend PREFIX to installed program names
461   --program-suffix=SUFFIX append SUFFIX to installed program names
462   --program-transform-name=PROGRAM
463                           run sed PROGRAM on installed program names
464 EOF
465     cat << EOF
466 Host type:
467   --build=BUILD           configure for building on BUILD [BUILD=HOST]
468   --host=HOST             configure for HOST [guessed]
469   --target=TARGET         configure for TARGET [TARGET=HOST]
470 Features and packages:
471   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
472   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
473   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
474   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
475   --x-includes=DIR        X include files are in DIR
476   --x-libraries=DIR       X library files are in DIR
477 EOF
478     if test -n "$ac_help"; then
479       echo "--enable and --with options recognized:$ac_help"
480     fi
481     exit 0 ;;
482
483   -host | --host | --hos | --ho)
484     ac_prev=host ;;
485   -host=* | --host=* | --hos=* | --ho=*)
486     host="$ac_optarg" ;;
487
488   -includedir | --includedir | --includedi | --included | --include \
489   | --includ | --inclu | --incl | --inc)
490     ac_prev=includedir ;;
491   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
492   | --includ=* | --inclu=* | --incl=* | --inc=*)
493     includedir="$ac_optarg" ;;
494
495   -infodir | --infodir | --infodi | --infod | --info | --inf)
496     ac_prev=infodir ;;
497   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
498     infodir="$ac_optarg" ;;
499
500   -libdir | --libdir | --libdi | --libd)
501     ac_prev=libdir ;;
502   -libdir=* | --libdir=* | --libdi=* | --libd=*)
503     libdir="$ac_optarg" ;;
504
505   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
506   | --libexe | --libex | --libe)
507     ac_prev=libexecdir ;;
508   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
509   | --libexe=* | --libex=* | --libe=*)
510     libexecdir="$ac_optarg" ;;
511
512   -localstatedir | --localstatedir | --localstatedi | --localstated \
513   | --localstate | --localstat | --localsta | --localst \
514   | --locals | --local | --loca | --loc | --lo)
515     ac_prev=localstatedir ;;
516   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
517   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
518   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
519     localstatedir="$ac_optarg" ;;
520
521   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
522     ac_prev=mandir ;;
523   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
524     mandir="$ac_optarg" ;;
525
526   -nfp | --nfp | --nf)
527     # Obsolete; use --without-fp.
528     with_fp=no ;;
529
530   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
531   | --no-cr | --no-c)
532     no_create=yes ;;
533
534   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
535   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
536     no_recursion=yes ;;
537
538   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
539   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
540   | --oldin | --oldi | --old | --ol | --o)
541     ac_prev=oldincludedir ;;
542   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
543   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
544   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
545     oldincludedir="$ac_optarg" ;;
546
547   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
548     ac_prev=prefix ;;
549   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
550     prefix="$ac_optarg" ;;
551
552   -program-prefix | --program-prefix | --program-prefi | --program-pref \
553   | --program-pre | --program-pr | --program-p)
554     ac_prev=program_prefix ;;
555   -program-prefix=* | --program-prefix=* | --program-prefi=* \
556   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
557     program_prefix="$ac_optarg" ;;
558
559   -program-suffix | --program-suffix | --program-suffi | --program-suff \
560   | --program-suf | --program-su | --program-s)
561     ac_prev=program_suffix ;;
562   -program-suffix=* | --program-suffix=* | --program-suffi=* \
563   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
564     program_suffix="$ac_optarg" ;;
565
566   -program-transform-name | --program-transform-name \
567   | --program-transform-nam | --program-transform-na \
568   | --program-transform-n | --program-transform- \
569   | --program-transform | --program-transfor \
570   | --program-transfo | --program-transf \
571   | --program-trans | --program-tran \
572   | --progr-tra | --program-tr | --program-t)
573     ac_prev=program_transform_name ;;
574   -program-transform-name=* | --program-transform-name=* \
575   | --program-transform-nam=* | --program-transform-na=* \
576   | --program-transform-n=* | --program-transform-=* \
577   | --program-transform=* | --program-transfor=* \
578   | --program-transfo=* | --program-transf=* \
579   | --program-trans=* | --program-tran=* \
580   | --progr-tra=* | --program-tr=* | --program-t=*)
581     program_transform_name="$ac_optarg" ;;
582
583   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
584   | -silent | --silent | --silen | --sile | --sil)
585     silent=yes ;;
586
587   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
588     ac_prev=sbindir ;;
589   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
590   | --sbi=* | --sb=*)
591     sbindir="$ac_optarg" ;;
592
593   -sharedstatedir | --sharedstatedir | --sharedstatedi \
594   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
595   | --sharedst | --shareds | --shared | --share | --shar \
596   | --sha | --sh)
597     ac_prev=sharedstatedir ;;
598   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
599   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
600   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
601   | --sha=* | --sh=*)
602     sharedstatedir="$ac_optarg" ;;
603
604   -site | --site | --sit)
605     ac_prev=site ;;
606   -site=* | --site=* | --sit=*)
607     site="$ac_optarg" ;;
608
609   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
610     ac_prev=srcdir ;;
611   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
612     srcdir="$ac_optarg" ;;
613
614   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
615   | --syscon | --sysco | --sysc | --sys | --sy)
616     ac_prev=sysconfdir ;;
617   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
618   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
619     sysconfdir="$ac_optarg" ;;
620
621   -target | --target | --targe | --targ | --tar | --ta | --t)
622     ac_prev=target ;;
623   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
624     target="$ac_optarg" ;;
625
626   -v | -verbose | --verbose | --verbos | --verbo | --verb)
627     verbose=yes ;;
628
629   -version | --version | --versio | --versi | --vers)
630     echo "configure generated by autoconf version 2.13.1"
631     exit 0 ;;
632
633   -with-* | --with-*)
634     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
635     # Reject names that are not valid shell variable names.
636     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
637       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
638     fi
639     ac_package=`echo $ac_package| sed 's/-/_/g'`
640     case "$ac_option" in
641       *=*) ;;
642       *) ac_optarg=yes ;;
643     esac
644     eval "with_${ac_package}='$ac_optarg'" ;;
645
646   -without-* | --without-*)
647     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
648     # Reject names that are not valid shell variable names.
649     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
650       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
651     fi
652     ac_package=`echo $ac_package| sed 's/-/_/g'`
653     eval "with_${ac_package}=no" ;;
654
655   --x)
656     # Obsolete; use --with-x.
657     with_x=yes ;;
658
659   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
660   | --x-incl | --x-inc | --x-in | --x-i)
661     ac_prev=x_includes ;;
662   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
663   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
664     x_includes="$ac_optarg" ;;
665
666   -x-libraries | --x-libraries | --x-librarie | --x-librari \
667   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
668     ac_prev=x_libraries ;;
669   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
670   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
671     x_libraries="$ac_optarg" ;;
672
673   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
674     ;;
675
676   *)
677     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
678       echo "configure: warning: $ac_option: invalid host type" 1>&2
679     fi
680     if test "x$nonopt" != xNONE; then
681       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
682     fi
683     nonopt="$ac_option"
684     ;;
685
686   esac
687 done
688
689 if test -n "$ac_prev"; then
690   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
691 fi
692
693 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
694
695 # File descriptor usage:
696 # 0 standard input
697 # 1 file creation
698 # 2 errors and warnings
699 # 3 some systems may open it to /dev/tty
700 # 4 used on the Kubota Titan
701 # 6 checking for... messages and results
702 # 5 compiler messages saved in config.log
703 if test "$silent" = yes; then
704   exec 6>/dev/null
705 else
706   exec 6>&1
707 fi
708 exec 5>./config.log
709
710 echo "\
711 This file contains any messages produced by compilers while
712 running configure, to aid debugging if configure makes a mistake.
713 " 1>&5
714
715 # Strip out --no-create and --no-recursion so they do not pile up.
716 # Also quote any args containing shell metacharacters.
717 ac_configure_args=
718 for ac_arg
719 do
720   case "$ac_arg" in
721   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
722   | --no-cr | --no-c) ;;
723   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
724   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
725   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
726   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
727   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
728   esac
729 done
730
731 # NLS nuisances.
732 # Only set these to C if already set.  These must not be set unconditionally
733 # because not all systems understand e.g. LANG=C (notably SCO).
734 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
735 # Non-C LC_CTYPE values break the ctype check.
736 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
737 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
738 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
739 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
740
741 # confdefs.h avoids OS command line length limits that DEFS can exceed.
742 rm -rf conftest* confdefs.h
743 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
744 echo > confdefs.h
745
746 # A filename unique to this package, relative to the directory that
747 # configure is in, which we can look for to find out if srcdir is correct.
748 ac_unique_file=build/version.sh
749
750 # Find the source files, if location was not specified.
751 if test -z "$srcdir"; then
752   ac_srcdir_defaulted=yes
753   # Try the directory containing this script, then its parent.
754   ac_prog=$0
755   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
756   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
757   srcdir=$ac_confdir
758   if test ! -r $srcdir/$ac_unique_file; then
759     srcdir=..
760   fi
761 else
762   ac_srcdir_defaulted=no
763 fi
764 if test ! -r $srcdir/$ac_unique_file; then
765   if test "$ac_srcdir_defaulted" = yes; then
766     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
767   else
768     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
769   fi
770 fi
771 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
772
773 # Prefer explicitly selected file to automatically selected ones.
774 if test -z "$CONFIG_SITE"; then
775   if test "x$prefix" != xNONE; then
776     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
777   else
778     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
779   fi
780 fi
781 for ac_site_file in $CONFIG_SITE; do
782   if test -r "$ac_site_file"; then
783     echo "loading site script $ac_site_file"
784     . "$ac_site_file"
785   fi
786 done
787
788
789 ac_ext=c
790 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791 ac_cpp='$CPP $CPPFLAGS'
792 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794 cross_compiling=$ac_cv_prog_cc_cross
795
796 ac_exeext=
797 ac_objext=o
798 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
799   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
800   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
801     ac_n= ac_c='
802 ' ac_t='        '
803   else
804     ac_n=-n ac_c= ac_t=
805   fi
806 else
807   ac_n= ac_c='\c' ac_t=
808 fi
809
810
811 # set unset (borrowed from autoconf 2.49c)
812 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
813   ol_unset=unset
814 else
815   ol_unset=false
816 fi
817 # unset CDPATH
818 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
819
820 ac_aux_dir=
821 for ac_dir in build $srcdir/build; do
822   if test -f $ac_dir/install-sh; then
823     ac_aux_dir=$ac_dir
824     ac_install_sh="$ac_aux_dir/install-sh -c"
825     break
826   elif test -f $ac_dir/install.sh; then
827     ac_aux_dir=$ac_dir
828     ac_install_sh="$ac_aux_dir/install.sh -c"
829     break
830   elif test -f $ac_dir/shtool; then
831     ac_aux_dir=$ac_dir
832     ac_install_sh="$ac_aux_dir/shtool install -c"
833     break
834   fi
835 done
836 if test -z "$ac_aux_dir"; then
837   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
838 fi
839 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
840 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
841 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
842
843 eval `$ac_aux_dir/version.sh`
844 if test -z "$OL_STRING"; then
845         { echo "configure: error: could not determine version" 1>&2; exit 1; }
846 fi
847
848 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
849         ac_cv_shtool="$ac_aux_dir/shtool"
850 else
851         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
852 fi
853
854 SHTOOL="$ac_cv_shtool"
855
856 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
857 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
858
859 OPENLDAP_CVS=""
860 if test -d $ac_aux_dir/CVS; then
861         OPENLDAP_CVS="(from CVS sources) "
862 fi
863
864 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
865
866
867 echo $ac_n "checking host system type""... $ac_c" 1>&6
868 echo "configure:869: checking host system type" >&5
869 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
870
871 # Make sure we can run config.sub.
872   if $ac_config_sub sun4 >/dev/null 2>&1; then :
873     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
874   fi
875
876   ac_cv_host_alias=$host
877   case "$ac_cv_host_alias" in
878   NONE)
879     case $nonopt in
880     NONE)
881       if ac_cv_host_alias=`$ac_config_guess`; then :
882       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
883       fi ;;
884     *) ac_cv_host_alias=$nonopt ;;
885     esac ;;
886   esac
887
888   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
889   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
890   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
891   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
892 else
893   echo $ac_n "(cached) $ac_c" 1>&6
894 fi
895
896 echo "$ac_t""$ac_cv_host" 1>&6
897
898 host=$ac_cv_host
899 host_alias=$ac_cv_host_alias
900 host_cpu=$ac_cv_host_cpu
901 host_vendor=$ac_cv_host_vendor
902 host_os=$ac_cv_host_os
903
904
905
906
907
908 echo $ac_n "checking target system type""... $ac_c" 1>&6
909 echo "configure:910: checking target system type" >&5
910 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
911
912 # Make sure we can run config.sub.
913   if $ac_config_sub sun4 >/dev/null 2>&1; then :
914     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
915   fi
916
917   ac_cv_target_alias=$target
918   case "$ac_cv_target_alias" in
919   NONE)
920     case $nonopt in
921     NONE)
922       ac_cv_target_alias=$host_alias ;;
923
924     *) ac_cv_target_alias=$nonopt ;;
925     esac ;;
926   esac
927
928   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
929   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
930   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
931   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
932 else
933   echo $ac_n "(cached) $ac_c" 1>&6
934 fi
935
936 echo "$ac_t""$ac_cv_target" 1>&6
937
938 target=$ac_cv_target
939 target_alias=$ac_cv_target_alias
940 target_cpu=$ac_cv_target_cpu
941 target_vendor=$ac_cv_target_vendor
942 target_os=$ac_cv_target_os
943
944
945
946
947
948 echo $ac_n "checking build system type""... $ac_c" 1>&6
949 echo "configure:950: checking build system type" >&5
950 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
951
952 # Make sure we can run config.sub.
953   if $ac_config_sub sun4 >/dev/null 2>&1; then :
954     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
955   fi
956
957   ac_cv_build_alias=$build
958   case "$ac_cv_build_alias" in
959   NONE)
960     case $nonopt in
961     NONE)
962       ac_cv_build_alias=$host_alias ;;
963
964     *) ac_cv_build_alias=$nonopt ;;
965     esac ;;
966   esac
967
968   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
969   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
970   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
971   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
972 else
973   echo $ac_n "(cached) $ac_c" 1>&6
974 fi
975
976 echo "$ac_t""$ac_cv_build" 1>&6
977
978 build=$ac_cv_build
979 build_alias=$ac_cv_build_alias
980 build_cpu=$ac_cv_build_cpu
981 build_vendor=$ac_cv_build_vendor
982 build_os=$ac_cv_build_os
983
984
985
986
987
988 # Do some error checking and defaulting for the host and target type.
989 # The inputs are:
990 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
991 #
992 # The rules are:
993 # 1. You are not allowed to specify --host, --target, and nonopt at the
994 #    same time.
995 # 2. Host defaults to nonopt.
996 # 3. If nonopt is not specified, then host defaults to the current host,
997 #    as determined by config.guess.
998 # 4. Target and build default to nonopt.
999 # 5. If nonopt is not specified, then target and build default to host.
1000
1001 # The aliases save the names the user supplied, while $host etc.
1002 # will get canonicalized.
1003 case $host---$target---$nonopt in
1004 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1005 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1006 esac
1007
1008 test "$host_alias" != "$target_alias" &&
1009   test "$program_prefix$program_suffix$program_transform_name" = \
1010     NONENONEs,x,x, &&
1011   program_prefix=${target_alias}-
1012
1013
1014 # Find a good install program.  We prefer a C program (faster),
1015 # so one script is as good as another.  But avoid the broken or
1016 # incompatible versions:
1017 # SysV /etc/install, /usr/sbin/install
1018 # SunOS /usr/etc/install
1019 # IRIX /sbin/install
1020 # AIX /bin/install
1021 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1022 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1023 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1024 # ./install, which can be erroneously created by make from ./install.sh.
1025 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1026 echo "configure:1027: checking for a BSD compatible install" >&5
1027 if test -z "$INSTALL"; then
1028 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1029   echo $ac_n "(cached) $ac_c" 1>&6
1030 else
1031     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1032   for ac_dir in $PATH; do
1033     # Account for people who put trailing slashes in PATH elements.
1034     case "$ac_dir/" in
1035     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1036     *)
1037       # OSF1 and SCO ODT 3.0 have their own names for install.
1038       # Don't use installbsd from OSF since it installs stuff as root
1039       # by default.
1040       for ac_prog in ginstall scoinst install; do
1041         if test -f $ac_dir/$ac_prog; then
1042           if test $ac_prog = install &&
1043             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1044             # AIX install.  It has an incompatible calling convention.
1045             :
1046           elif test $ac_prog = install &&
1047             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1048             # program-specific install script used by HP pwplus--don't use.
1049             :
1050           else
1051             ac_cv_path_install="$ac_dir/$ac_prog -c"
1052             break 2
1053           fi
1054         fi
1055       done
1056       ;;
1057     esac
1058   done
1059   IFS="$ac_save_IFS"
1060
1061 fi
1062   if test "${ac_cv_path_install+set}" = set; then
1063     INSTALL="$ac_cv_path_install"
1064   else
1065     # As a last resort, use the slow shell script.  We don't cache a
1066     # path for INSTALL within a source directory, because that will
1067     # break other packages using the cache if that directory is
1068     # removed, or if the path is relative.
1069     INSTALL="$ac_install_sh"
1070   fi
1071 fi
1072 echo "$ac_t""$INSTALL" 1>&6
1073
1074 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1075 # It thinks the first close brace ends the variable substitution.
1076 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1077
1078 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1079
1080 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1081
1082 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1083 echo "configure:1084: checking whether build environment is sane" >&5
1084 # Just in case
1085 sleep 1
1086 echo timestamp > conftestfile
1087 # Do `set' in a subshell so we don't clobber the current shell's
1088 # arguments.  Must try -L first in case configure is actually a
1089 # symlink; some systems play weird games with the mod time of symlinks
1090 # (eg FreeBSD returns the mod time of the symlink's containing
1091 # directory).
1092 if (
1093    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1094    if test "$*" = "X"; then
1095       # -L didn't work.
1096       set X `ls -t $srcdir/configure conftestfile`
1097    fi
1098    if test "$*" != "X $srcdir/configure conftestfile" \
1099       && test "$*" != "X conftestfile $srcdir/configure"; then
1100
1101       # If neither matched, then we have a broken ls.  This can happen
1102       # if, for instance, CONFIG_SHELL is bash and it inherits a
1103       # broken ls alias from the environment.  This has actually
1104       # happened.  Such a system could not be considered "sane".
1105       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1106 alias in your environment" 1>&2; exit 1; }
1107    fi
1108
1109    test "$2" = conftestfile
1110    )
1111 then
1112    # Ok.
1113    :
1114 else
1115    { echo "configure: error: newly created file is older than distributed files!
1116 Check your system clock" 1>&2; exit 1; }
1117 fi
1118 rm -f conftest*
1119 echo "$ac_t""yes" 1>&6
1120 if test "$program_transform_name" = s,x,x,; then
1121   program_transform_name=
1122 else
1123   # Double any \ or $.  echo might interpret backslashes.
1124   cat <<\EOF_SED > conftestsed
1125 s,\\,\\\\,g; s,\$,$$,g
1126 EOF_SED
1127   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1128   rm -f conftestsed
1129 fi
1130 test "$program_prefix" != NONE &&
1131   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1132 # Use a double $ so make ignores it.
1133 test "$program_suffix" != NONE &&
1134   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1135
1136 # sed with no file args requires a program.
1137 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1138
1139 for ac_prog in mawk gawk nawk awk
1140 do
1141 # Extract the first word of "$ac_prog", so it can be a program name with args.
1142 set dummy $ac_prog; ac_word=$2
1143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1144 echo "configure:1145: checking for $ac_word" >&5
1145 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1146   echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148   if test -n "$AWK"; then
1149   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1150 else
1151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1152   ac_dummy="$PATH"
1153   for ac_dir in $ac_dummy; do
1154     test -z "$ac_dir" && ac_dir=.
1155     if test -f $ac_dir/$ac_word; then
1156       ac_cv_prog_AWK="$ac_prog"
1157       break
1158     fi
1159   done
1160   IFS="$ac_save_ifs"
1161 fi
1162 fi
1163 AWK="$ac_cv_prog_AWK"
1164 if test -n "$AWK"; then
1165   echo "$ac_t""$AWK" 1>&6
1166 else
1167   echo "$ac_t""no" 1>&6
1168 fi
1169
1170 test -n "$AWK" && break
1171 done
1172
1173 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1174 echo "configure:1175: checking whether ${MAKE-make} sets \${MAKE}" >&5
1175 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1176 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1177   echo $ac_n "(cached) $ac_c" 1>&6
1178 else
1179   cat > conftestmake <<\EOF
1180 all:
1181         @echo 'ac_maketemp="${MAKE}"'
1182 EOF
1183 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1184 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1185 if test -n "$ac_maketemp"; then
1186   eval ac_cv_prog_make_${ac_make}_set=yes
1187 else
1188   eval ac_cv_prog_make_${ac_make}_set=no
1189 fi
1190 rm -f conftestmake
1191 fi
1192 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1193   echo "$ac_t""yes" 1>&6
1194   SET_MAKE=
1195 else
1196   echo "$ac_t""no" 1>&6
1197   SET_MAKE="MAKE=${MAKE-make}"
1198 fi
1199
1200
1201
1202 PACKAGE=$OL_PACKAGE
1203
1204 VERSION=$OL_VERSION
1205
1206 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1207   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1208 fi
1209
1210
1211
1212 missing_dir=`cd $ac_aux_dir && pwd`
1213 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1214 echo "configure:1215: checking for working aclocal" >&5
1215 # Run test in a subshell; some versions of sh will print an error if
1216 # an executable is not found, even if stderr is redirected.
1217 # Redirect stdin to placate older versions of autoconf.  Sigh.
1218 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1219    ACLOCAL=aclocal
1220    echo "$ac_t""found" 1>&6
1221 else
1222    ACLOCAL="$missing_dir/missing aclocal"
1223    echo "$ac_t""missing" 1>&6
1224 fi
1225
1226 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1227 echo "configure:1228: checking for working autoconf" >&5
1228 # Run test in a subshell; some versions of sh will print an error if
1229 # an executable is not found, even if stderr is redirected.
1230 # Redirect stdin to placate older versions of autoconf.  Sigh.
1231 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1232    AUTOCONF=autoconf
1233    echo "$ac_t""found" 1>&6
1234 else
1235    AUTOCONF="$missing_dir/missing autoconf"
1236    echo "$ac_t""missing" 1>&6
1237 fi
1238
1239 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1240 echo "configure:1241: checking for working automake" >&5
1241 # Run test in a subshell; some versions of sh will print an error if
1242 # an executable is not found, even if stderr is redirected.
1243 # Redirect stdin to placate older versions of autoconf.  Sigh.
1244 if (automake --version) < /dev/null > /dev/null 2>&1; then
1245    AUTOMAKE=automake
1246    echo "$ac_t""found" 1>&6
1247 else
1248    AUTOMAKE="$missing_dir/missing automake"
1249    echo "$ac_t""missing" 1>&6
1250 fi
1251
1252 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1253 echo "configure:1254: checking for working autoheader" >&5
1254 # Run test in a subshell; some versions of sh will print an error if
1255 # an executable is not found, even if stderr is redirected.
1256 # Redirect stdin to placate older versions of autoconf.  Sigh.
1257 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1258    AUTOHEADER=autoheader
1259    echo "$ac_t""found" 1>&6
1260 else
1261    AUTOHEADER="$missing_dir/missing autoheader"
1262    echo "$ac_t""missing" 1>&6
1263 fi
1264
1265 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1266 echo "configure:1267: checking for working makeinfo" >&5
1267 # Run test in a subshell; some versions of sh will print an error if
1268 # an executable is not found, even if stderr is redirected.
1269 # Redirect stdin to placate older versions of autoconf.  Sigh.
1270 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1271    MAKEINFO=makeinfo
1272    echo "$ac_t""found" 1>&6
1273 else
1274    MAKEINFO="$missing_dir/missing makeinfo"
1275    echo "$ac_t""missing" 1>&6
1276 fi
1277
1278 install_sh="$missing_dir/install-sh"
1279 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1280
1281 for ac_prog in gnutar gtar tar
1282 do
1283 # Extract the first word of "$ac_prog", so it can be a program name with args.
1284 set dummy $ac_prog; ac_word=$2
1285 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1286 echo "configure:1287: checking for $ac_word" >&5
1287 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1288   echo $ac_n "(cached) $ac_c" 1>&6
1289 else
1290   if test -n "$AMTAR"; then
1291   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1292 else
1293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1294   ac_dummy="$PATH"
1295   for ac_dir in $ac_dummy; do
1296     test -z "$ac_dir" && ac_dir=.
1297     if test -f $ac_dir/$ac_word; then
1298       ac_cv_prog_AMTAR="$ac_prog"
1299       break
1300     fi
1301   done
1302   IFS="$ac_save_ifs"
1303 fi
1304 fi
1305 AMTAR="$ac_cv_prog_AMTAR"
1306 if test -n "$AMTAR"; then
1307   echo "$ac_t""$AMTAR" 1>&6
1308 else
1309   echo "$ac_t""no" 1>&6
1310 fi
1311
1312 test -n "$AMTAR" && break
1313 done
1314
1315
1316 AMTARFLAGS=
1317 if test -n "$AMTAR"; then
1318   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1319         AMTARFLAGS=o
1320   fi
1321 fi
1322
1323 cat >> confdefs.h <<EOF
1324 #define OPENLDAP_PACKAGE "$PACKAGE"
1325 EOF
1326
1327 cat >> confdefs.h <<EOF
1328 #define OPENLDAP_VERSION "$VERSION"
1329 EOF
1330
1331
1332 cat >> confdefs.h <<EOF
1333 #define LDAP_VENDOR_VERSION $OL_API_INC
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1338 EOF
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1346 EOF
1347
1348
1349 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1350
1351 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1352
1353 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1354
1355
1356
1357 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1358 echo "configure:1359: checking configure arguments" >&5
1359
1360
1361 top_builddir=`pwd`
1362
1363 ldap_subdir="/openldap"
1364
1365 # Check whether --with-subdir or --without-subdir was given.
1366 if test "${with_subdir+set}" = set; then
1367   withval="$with_subdir"
1368   case "$withval" in
1369         no) ldap_subdir=""
1370                 ;;
1371         yes)
1372                 ;;
1373         /*|\\*)
1374                 ldap_subdir="$withval"
1375                 ;;
1376         *)
1377                 ldap_subdir="/$withval"
1378                 ;;
1379 esac
1380
1381 fi
1382
1383
1384 # OpenLDAP --enable-debug
1385         # Check whether --enable-debug or --disable-debug was given.
1386 if test "${enable_debug+set}" = set; then
1387   enableval="$enable_debug"
1388   
1389         ol_arg=invalid
1390         for ol_val in auto yes no ; do
1391                 if test "$enableval" = "$ol_val" ; then
1392                         ol_arg="$ol_val"
1393                 fi
1394         done
1395         if test "$ol_arg" = "invalid" ; then
1396                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1397         fi
1398         ol_enable_debug="$ol_arg"
1399
1400 else
1401         ol_enable_debug="yes"
1402 fi
1403 # end --enable-debug
1404 # OpenLDAP --enable-dynamic
1405         # Check whether --enable-dynamic or --disable-dynamic was given.
1406 if test "${enable_dynamic+set}" = set; then
1407   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1417         fi
1418         ol_enable_dynamic="$ol_arg"
1419
1420 else
1421         ol_enable_dynamic="no"
1422 fi
1423 # end --enable-dynamic
1424 # OpenLDAP --enable-syslog
1425         # Check whether --enable-syslog or --disable-syslog was given.
1426 if test "${enable_syslog+set}" = set; then
1427   enableval="$enable_syslog"
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-syslog" 1>&2; exit 1; }
1437         fi
1438         ol_enable_syslog="$ol_arg"
1439
1440 else
1441         ol_enable_syslog="auto"
1442 fi
1443 # end --enable-syslog
1444 # OpenLDAP --enable-proctitle
1445         # Check whether --enable-proctitle or --disable-proctitle was given.
1446 if test "${enable_proctitle+set}" = set; then
1447   enableval="$enable_proctitle"
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-proctitle" 1>&2; exit 1; }
1457         fi
1458         ol_enable_proctitle="$ol_arg"
1459
1460 else
1461         ol_enable_proctitle="yes"
1462 fi
1463 # end --enable-proctitle
1464 ol_enable_referrals=${ol_enable_referrals-no}
1465 ol_enable_kbind=${ol_enable_kbind-no}
1466 # OpenLDAP --enable-ipv6
1467         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1468 if test "${enable_ipv6+set}" = set; then
1469   enableval="$enable_ipv6"
1470   
1471         ol_arg=invalid
1472         for ol_val in auto yes no ; do
1473                 if test "$enableval" = "$ol_val" ; then
1474                         ol_arg="$ol_val"
1475                 fi
1476         done
1477         if test "$ol_arg" = "invalid" ; then
1478                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1479         fi
1480         ol_enable_ipv6="$ol_arg"
1481
1482 else
1483         ol_enable_ipv6="auto"
1484 fi
1485 # end --enable-ipv6
1486 # OpenLDAP --enable-local
1487         # Check whether --enable-local or --disable-local was given.
1488 if test "${enable_local+set}" = set; then
1489   enableval="$enable_local"
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-local" 1>&2; exit 1; }
1499         fi
1500         ol_enable_local="$ol_arg"
1501
1502 else
1503         ol_enable_local="auto"
1504 fi
1505 # end --enable-local
1506
1507
1508 # OpenLDAP --with-cyrus_sasl
1509         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1510 if test "${with_cyrus_sasl+set}" = set; then
1511   withval="$with_cyrus_sasl"
1512   
1513         ol_arg=invalid
1514         for ol_val in auto yes no  ; do
1515                 if test "$withval" = "$ol_val" ; then
1516                         ol_arg="$ol_val"
1517                 fi
1518         done
1519         if test "$ol_arg" = "invalid" ; then
1520                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1521         fi
1522         ol_with_cyrus_sasl="$ol_arg"
1523
1524 else
1525         ol_with_cyrus_sasl="auto"
1526 fi
1527 # end --with-cyrus_sasl
1528
1529 # OpenLDAP --with-fetch
1530         # Check whether --with-fetch or --without-fetch was given.
1531 if test "${with_fetch+set}" = set; then
1532   withval="$with_fetch"
1533   
1534         ol_arg=invalid
1535         for ol_val in auto yes no  ; do
1536                 if test "$withval" = "$ol_val" ; then
1537                         ol_arg="$ol_val"
1538                 fi
1539         done
1540         if test "$ol_arg" = "invalid" ; then
1541                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1542         fi
1543         ol_with_fetch="$ol_arg"
1544
1545 else
1546         ol_with_fetch="auto"
1547 fi
1548 # end --with-fetch
1549
1550 ol_with_kerberos=${ol_with_kerberos-auto}
1551 # OpenLDAP --with-threads
1552         # Check whether --with-threads or --without-threads was given.
1553 if test "${with_threads+set}" = set; then
1554   withval="$with_threads"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1558                 if test "$withval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1564         fi
1565         ol_with_threads="$ol_arg"
1566
1567 else
1568         ol_with_threads="auto"
1569 fi
1570 # end --with-threads
1571
1572 # OpenLDAP --with-tls
1573         # Check whether --with-tls or --without-tls was given.
1574 if test "${with_tls+set}" = set; then
1575   withval="$with_tls"
1576   
1577         ol_arg=invalid
1578         for ol_val in auto ssleay openssl yes no  ; do
1579                 if test "$withval" = "$ol_val" ; then
1580                         ol_arg="$ol_val"
1581                 fi
1582         done
1583         if test "$ol_arg" = "invalid" ; then
1584                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1585         fi
1586         ol_with_tls="$ol_arg"
1587
1588 else
1589         ol_with_tls="auto"
1590 fi
1591 # end --with-tls
1592
1593 # OpenLDAP --with-yielding_select
1594         # Check whether --with-yielding_select or --without-yielding_select was given.
1595 if test "${with_yielding_select+set}" = set; then
1596   withval="$with_yielding_select"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no manual  ; do
1600                 if test "$withval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1606         fi
1607         ol_with_yielding_select="$ol_arg"
1608
1609 else
1610         ol_with_yielding_select="auto"
1611 fi
1612 # end --with-yielding_select
1613
1614
1615
1616 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1617 if test "${with_xxslapdoptions+set}" = set; then
1618   withval="$with_xxslapdoptions"
1619   :
1620 fi
1621
1622 # OpenLDAP --enable-slapd
1623         # Check whether --enable-slapd or --disable-slapd was given.
1624 if test "${enable_slapd+set}" = set; then
1625   enableval="$enable_slapd"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no ; do
1629                 if test "$enableval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1635         fi
1636         ol_enable_slapd="$ol_arg"
1637
1638 else
1639         ol_enable_slapd="yes"
1640 fi
1641 # end --enable-slapd
1642 # OpenLDAP --enable-aci
1643         # Check whether --enable-aci or --disable-aci was given.
1644 if test "${enable_aci+set}" = set; then
1645   enableval="$enable_aci"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto yes no ; do
1649                 if test "$enableval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1655         fi
1656         ol_enable_aci="$ol_arg"
1657
1658 else
1659         ol_enable_aci="no"
1660 fi
1661 # end --enable-aci
1662 # OpenLDAP --enable-cleartext
1663         # Check whether --enable-cleartext or --disable-cleartext was given.
1664 if test "${enable_cleartext+set}" = set; then
1665   enableval="$enable_cleartext"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto yes no ; do
1669                 if test "$enableval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1675         fi
1676         ol_enable_cleartext="$ol_arg"
1677
1678 else
1679         ol_enable_cleartext="yes"
1680 fi
1681 # end --enable-cleartext
1682 # OpenLDAP --enable-crypt
1683         # Check whether --enable-crypt or --disable-crypt was given.
1684 if test "${enable_crypt+set}" = set; then
1685   enableval="$enable_crypt"
1686   
1687         ol_arg=invalid
1688         for ol_val in auto yes no ; do
1689                 if test "$enableval" = "$ol_val" ; then
1690                         ol_arg="$ol_val"
1691                 fi
1692         done
1693         if test "$ol_arg" = "invalid" ; then
1694                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1695         fi
1696         ol_enable_crypt="$ol_arg"
1697
1698 else
1699         ol_enable_crypt="no"
1700 fi
1701 # end --enable-crypt
1702 # OpenLDAP --enable-lmpasswd
1703         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1704 if test "${enable_lmpasswd+set}" = set; then
1705   enableval="$enable_lmpasswd"
1706   
1707         ol_arg=invalid
1708         for ol_val in auto yes no ; do
1709                 if test "$enableval" = "$ol_val" ; then
1710                         ol_arg="$ol_val"
1711                 fi
1712         done
1713         if test "$ol_arg" = "invalid" ; then
1714                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1715         fi
1716         ol_enable_lmpasswd="$ol_arg"
1717
1718 else
1719         ol_enable_lmpasswd="no"
1720 fi
1721 # end --enable-lmpasswd
1722 # OpenLDAP --enable-spasswd
1723         # Check whether --enable-spasswd or --disable-spasswd was given.
1724 if test "${enable_spasswd+set}" = set; then
1725   enableval="$enable_spasswd"
1726   
1727         ol_arg=invalid
1728         for ol_val in auto yes no ; do
1729                 if test "$enableval" = "$ol_val" ; then
1730                         ol_arg="$ol_val"
1731                 fi
1732         done
1733         if test "$ol_arg" = "invalid" ; then
1734                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1735         fi
1736         ol_enable_spasswd="$ol_arg"
1737
1738 else
1739         ol_enable_spasswd="no"
1740 fi
1741 # end --enable-spasswd
1742 # OpenLDAP --enable-modules
1743         # Check whether --enable-modules or --disable-modules was given.
1744 if test "${enable_modules+set}" = set; then
1745   enableval="$enable_modules"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1755         fi
1756         ol_enable_modules="$ol_arg"
1757
1758 else
1759         ol_enable_modules="no"
1760 fi
1761 # end --enable-modules
1762 ol_enable_multimaster=${ol_enable_multimaster-no}
1763 # OpenLDAP --enable-rewrite
1764         # Check whether --enable-rewrite or --disable-rewrite was given.
1765 if test "${enable_rewrite+set}" = set; then
1766   enableval="$enable_rewrite"
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-rewrite" 1>&2; exit 1; }
1776         fi
1777         ol_enable_rewrite="$ol_arg"
1778
1779 else
1780         ol_enable_rewrite="auto"
1781 fi
1782 # end --enable-rewrite
1783 # OpenLDAP --enable-rlookups
1784         # Check whether --enable-rlookups or --disable-rlookups was given.
1785 if test "${enable_rlookups+set}" = set; then
1786   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1796         fi
1797         ol_enable_rlookups="$ol_arg"
1798
1799 else
1800         ol_enable_rlookups="no"
1801 fi
1802 # end --enable-rlookups
1803 # OpenLDAP --enable-slapi
1804         # Check whether --enable-slapi or --disable-slapi was given.
1805 if test "${enable_slapi+set}" = set; then
1806   enableval="$enable_slapi"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1816         fi
1817         ol_enable_slapi="$ol_arg"
1818
1819 else
1820         ol_enable_slapi="no"
1821 fi
1822 # end --enable-slapi
1823 # OpenLDAP --enable-slp
1824         # Check whether --enable-slp or --disable-slp was given.
1825 if test "${enable_slp+set}" = set; then
1826   enableval="$enable_slp"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1836         fi
1837         ol_enable_slp="$ol_arg"
1838
1839 else
1840         ol_enable_slp="no"
1841 fi
1842 # end --enable-slp
1843 # OpenLDAP --enable-wrappers
1844         # Check whether --enable-wrappers or --disable-wrappers was given.
1845 if test "${enable_wrappers+set}" = set; then
1846   enableval="$enable_wrappers"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1856         fi
1857         ol_enable_wrappers="$ol_arg"
1858
1859 else
1860         ol_enable_wrappers="no"
1861 fi
1862 # end --enable-wrappers
1863
1864 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1865         passwd perl relay shell sql"
1866
1867 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1868 if test "${with_xxslapbackends+set}" = set; then
1869   withval="$with_xxslapbackends"
1870   :
1871 fi
1872
1873
1874 # OpenLDAP --enable-backends
1875         # Check whether --enable-backends or --disable-backends was given.
1876 if test "${enable_backends+set}" = set; then
1877   enableval="$enable_backends"
1878   
1879         ol_arg=invalid
1880         for ol_val in no yes mod ; do
1881                 if test "$enableval" = "$ol_val" ; then
1882                         ol_arg="$ol_val"
1883                 fi
1884         done
1885         if test "$ol_arg" = "invalid" ; then
1886                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1887         fi
1888         ol_enable_backends="$ol_arg"
1889
1890 else
1891         ol_enable_backends="no"
1892 fi
1893 # end --enable-backends
1894 # OpenLDAP --enable-bdb
1895         # Check whether --enable-bdb or --disable-bdb was given.
1896 if test "${enable_bdb+set}" = set; then
1897   enableval="$enable_bdb"
1898   
1899         ol_arg=invalid
1900         for ol_val in no yes mod ; do
1901                 if test "$enableval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1907         fi
1908         ol_enable_bdb="$ol_arg"
1909
1910 else
1911         ol_enable_bdb="yes"
1912 fi
1913 # end --enable-bdb
1914 # OpenLDAP --enable-dnssrv
1915         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1916 if test "${enable_dnssrv+set}" = set; then
1917   enableval="$enable_dnssrv"
1918   
1919         ol_arg=invalid
1920         for ol_val in no yes mod ; do
1921                 if test "$enableval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1927         fi
1928         ol_enable_dnssrv="$ol_arg"
1929
1930 else
1931         ol_enable_dnssrv="no"
1932 fi
1933 # end --enable-dnssrv
1934 # OpenLDAP --enable-hdb
1935         # Check whether --enable-hdb or --disable-hdb was given.
1936 if test "${enable_hdb+set}" = set; then
1937   enableval="$enable_hdb"
1938   
1939         ol_arg=invalid
1940         for ol_val in no yes mod ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1947         fi
1948         ol_enable_hdb="$ol_arg"
1949
1950 else
1951         ol_enable_hdb="no"
1952 fi
1953 # end --enable-hdb
1954 # OpenLDAP --enable-ldap
1955         # Check whether --enable-ldap or --disable-ldap was given.
1956 if test "${enable_ldap+set}" = set; then
1957   enableval="$enable_ldap"
1958   
1959         ol_arg=invalid
1960         for ol_val in no yes mod ; do
1961                 if test "$enableval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1967         fi
1968         ol_enable_ldap="$ol_arg"
1969
1970 else
1971         ol_enable_ldap="no"
1972 fi
1973 # end --enable-ldap
1974 # OpenLDAP --enable-ldbm
1975         # Check whether --enable-ldbm or --disable-ldbm was given.
1976 if test "${enable_ldbm+set}" = set; then
1977   enableval="$enable_ldbm"
1978   
1979         ol_arg=invalid
1980         for ol_val in no yes mod ; do
1981                 if test "$enableval" = "$ol_val" ; then
1982                         ol_arg="$ol_val"
1983                 fi
1984         done
1985         if test "$ol_arg" = "invalid" ; then
1986                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1987         fi
1988         ol_enable_ldbm="$ol_arg"
1989
1990 else
1991         ol_enable_ldbm="no"
1992 fi
1993 # end --enable-ldbm
1994 # OpenLDAP --with-ldbm_api
1995         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1996 if test "${with_ldbm_api+set}" = set; then
1997   withval="$with_ldbm_api"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2001                 if test "$withval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2007         fi
2008         ol_with_ldbm_api="$ol_arg"
2009
2010 else
2011         ol_with_ldbm_api="auto"
2012 fi
2013 # end --with-ldbm_api
2014
2015 # OpenLDAP --with-ldbm_type
2016         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2017 if test "${with_ldbm_type+set}" = set; then
2018   withval="$with_ldbm_type"
2019   
2020         ol_arg=invalid
2021         for ol_val in auto btree hash ; do
2022                 if test "$withval" = "$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 $withval for --with-ldbm_type" 1>&2; exit 1; }
2028         fi
2029         ol_with_ldbm_type="$ol_arg"
2030
2031 else
2032         ol_with_ldbm_type="auto"
2033 fi
2034 # end --with-ldbm_type
2035
2036 # OpenLDAP --enable-meta
2037         # Check whether --enable-meta or --disable-meta was given.
2038 if test "${enable_meta+set}" = set; then
2039   enableval="$enable_meta"
2040   
2041         ol_arg=invalid
2042         for ol_val in no yes mod ; do
2043                 if test "$enableval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2049         fi
2050         ol_enable_meta="$ol_arg"
2051
2052 else
2053         ol_enable_meta="no"
2054 fi
2055 # end --enable-meta
2056 # OpenLDAP --enable-monitor
2057         # Check whether --enable-monitor or --disable-monitor was given.
2058 if test "${enable_monitor+set}" = set; then
2059   enableval="$enable_monitor"
2060   
2061         ol_arg=invalid
2062         for ol_val in no yes mod ; do
2063                 if test "$enableval" = "$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 $enableval for --enable-monitor" 1>&2; exit 1; }
2069         fi
2070         ol_enable_monitor="$ol_arg"
2071
2072 else
2073         ol_enable_monitor="yes"
2074 fi
2075 # end --enable-monitor
2076 # OpenLDAP --enable-null
2077         # Check whether --enable-null or --disable-null was given.
2078 if test "${enable_null+set}" = set; then
2079   enableval="$enable_null"
2080   
2081         ol_arg=invalid
2082         for ol_val in no yes mod ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2089         fi
2090         ol_enable_null="$ol_arg"
2091
2092 else
2093         ol_enable_null="no"
2094 fi
2095 # end --enable-null
2096 # OpenLDAP --enable-passwd
2097         # Check whether --enable-passwd or --disable-passwd was given.
2098 if test "${enable_passwd+set}" = set; then
2099   enableval="$enable_passwd"
2100   
2101         ol_arg=invalid
2102         for ol_val in no yes mod ; do
2103                 if test "$enableval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2109         fi
2110         ol_enable_passwd="$ol_arg"
2111
2112 else
2113         ol_enable_passwd="no"
2114 fi
2115 # end --enable-passwd
2116 # OpenLDAP --enable-perl
2117         # Check whether --enable-perl or --disable-perl was given.
2118 if test "${enable_perl+set}" = set; then
2119   enableval="$enable_perl"
2120   
2121         ol_arg=invalid
2122         for ol_val in no yes mod ; do
2123                 if test "$enableval" = "$ol_val" ; then
2124                         ol_arg="$ol_val"
2125                 fi
2126         done
2127         if test "$ol_arg" = "invalid" ; then
2128                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2129         fi
2130         ol_enable_perl="$ol_arg"
2131
2132 else
2133         ol_enable_perl="no"
2134 fi
2135 # end --enable-perl
2136 # OpenLDAP --enable-relay
2137         # Check whether --enable-relay or --disable-relay was given.
2138 if test "${enable_relay+set}" = set; then
2139   enableval="$enable_relay"
2140   
2141         ol_arg=invalid
2142         for ol_val in no yes mod ; do
2143                 if test "$enableval" = "$ol_val" ; then
2144                         ol_arg="$ol_val"
2145                 fi
2146         done
2147         if test "$ol_arg" = "invalid" ; then
2148                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2149         fi
2150         ol_enable_relay="$ol_arg"
2151
2152 else
2153         ol_enable_relay="yes"
2154 fi
2155 # end --enable-relay
2156 # OpenLDAP --enable-shell
2157         # Check whether --enable-shell or --disable-shell was given.
2158 if test "${enable_shell+set}" = set; then
2159   enableval="$enable_shell"
2160   
2161         ol_arg=invalid
2162         for ol_val in no yes mod ; do
2163                 if test "$enableval" = "$ol_val" ; then
2164                         ol_arg="$ol_val"
2165                 fi
2166         done
2167         if test "$ol_arg" = "invalid" ; then
2168                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2169         fi
2170         ol_enable_shell="$ol_arg"
2171
2172 else
2173         ol_enable_shell="no"
2174 fi
2175 # end --enable-shell
2176 # OpenLDAP --enable-sql
2177         # Check whether --enable-sql or --disable-sql was given.
2178 if test "${enable_sql+set}" = set; then
2179   enableval="$enable_sql"
2180   
2181         ol_arg=invalid
2182         for ol_val in no yes mod ; do
2183                 if test "$enableval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2189         fi
2190         ol_enable_sql="$ol_arg"
2191
2192 else
2193         ol_enable_sql="no"
2194 fi
2195 # end --enable-sql
2196
2197 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2198         refint unique"
2199
2200 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2201 if test "${with_xxslapoverlays+set}" = set; then
2202   withval="$with_xxslapoverlays"
2203   :
2204 fi
2205
2206
2207 # OpenLDAP --enable-overlays
2208         # Check whether --enable-overlays or --disable-overlays was given.
2209 if test "${enable_overlays+set}" = set; then
2210   enableval="$enable_overlays"
2211   
2212         ol_arg=invalid
2213         for ol_val in no yes mod ; do
2214                 if test "$enableval" = "$ol_val" ; then
2215                         ol_arg="$ol_val"
2216                 fi
2217         done
2218         if test "$ol_arg" = "invalid" ; then
2219                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2220         fi
2221         ol_enable_overlays="$ol_arg"
2222
2223 else
2224         ol_enable_overlays="no"
2225 fi
2226 # end --enable-overlays
2227 # OpenLDAP --enable-chain
2228         # Check whether --enable-chain or --disable-chain was given.
2229 if test "${enable_chain+set}" = set; then
2230   enableval="$enable_chain"
2231   
2232         ol_arg=invalid
2233         for ol_val in no yes mod ; do
2234                 if test "$enableval" = "$ol_val" ; then
2235                         ol_arg="$ol_val"
2236                 fi
2237         done
2238         if test "$ol_arg" = "invalid" ; then
2239                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2240         fi
2241         ol_enable_chain="$ol_arg"
2242
2243 else
2244         ol_enable_chain="no"
2245 fi
2246 # end --enable-chain
2247
2248 # OpenLDAP --enable-denyop
2249         # Check whether --enable-denyop or --disable-denyop was given.
2250 if test "${enable_denyop+set}" = set; then
2251   enableval="$enable_denyop"
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-denyop" 1>&2; exit 1; }
2261         fi
2262         ol_enable_denyop="$ol_arg"
2263
2264 else
2265         ol_enable_denyop="no"
2266 fi
2267 # end --enable-denyop
2268
2269 # OpenLDAP --enable-dyngroup
2270         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2271 if test "${enable_dyngroup+set}" = set; then
2272   enableval="$enable_dyngroup"
2273   
2274         ol_arg=invalid
2275         for ol_val in no yes mod ; do
2276                 if test "$enableval" = "$ol_val" ; then
2277                         ol_arg="$ol_val"
2278                 fi
2279         done
2280         if test "$ol_arg" = "invalid" ; then
2281                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2282         fi
2283         ol_enable_dyngroup="$ol_arg"
2284
2285 else
2286         ol_enable_dyngroup="no"
2287 fi
2288 # end --enable-dyngroup
2289
2290 # OpenLDAP --enable-lastmod
2291         # Check whether --enable-lastmod or --disable-lastmod was given.
2292 if test "${enable_lastmod+set}" = set; then
2293   enableval="$enable_lastmod"
2294   
2295         ol_arg=invalid
2296         for ol_val in no yes mod ; do
2297                 if test "$enableval" = "$ol_val" ; then
2298                         ol_arg="$ol_val"
2299                 fi
2300         done
2301         if test "$ol_arg" = "invalid" ; then
2302                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2303         fi
2304         ol_enable_lastmod="$ol_arg"
2305
2306 else
2307         ol_enable_lastmod="no"
2308 fi
2309 # end --enable-lastmod
2310
2311 # OpenLDAP --enable-ppolicy
2312         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2313 if test "${enable_ppolicy+set}" = set; then
2314   enableval="$enable_ppolicy"
2315   
2316         ol_arg=invalid
2317         for ol_val in no yes mod ; do
2318                 if test "$enableval" = "$ol_val" ; then
2319                         ol_arg="$ol_val"
2320                 fi
2321         done
2322         if test "$ol_arg" = "invalid" ; then
2323                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2324         fi
2325         ol_enable_ppolicy="$ol_arg"
2326
2327 else
2328         ol_enable_ppolicy="no"
2329 fi
2330 # end --enable-ppolicy
2331
2332 # OpenLDAP --enable-proxycache
2333         # Check whether --enable-proxycache or --disable-proxycache was given.
2334 if test "${enable_proxycache+set}" = set; then
2335   enableval="$enable_proxycache"
2336   
2337         ol_arg=invalid
2338         for ol_val in # OpenLDAP --enable-refint
2339         ac_help="$ac_help
2340     --enable-refint       Referential Integrity overlay no|yes|mod no"
2341 # Check whether --enable-refint or --disable-refint was given.
2342 if test "${enable_refint+set}" = set; then
2343   enableval="$enable_refint"
2344   
2345         ol_arg=invalid
2346         for ol_val in no yes mod ; do
2347                 if test "$enableval" = "$ol_val" ; then
2348                         ol_arg="$ol_val"
2349                 fi
2350         done
2351         if test "$ol_arg" = "invalid" ; then
2352                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2353         fi
2354         ol_enable_refint="$ol_arg"
2355
2356 else
2357         ol_enable_refint="no"
2358 fi
2359 # end --enable-refint
2360
2361 # OpenLDAP --enable-rwm
2362         ac_help="$ac_help
2363     --enable-rwm          Rewrite/Remap overlay no|yes|mod no"
2364 # Check whether --enable-rwm or --disable-rwm was given.
2365 if test "${enable_rwm+set}" = set; then
2366   enableval="$enable_rwm"
2367   
2368         ol_arg=invalid
2369         for ol_val in # OpenLDAP --enable-unique
2370         ac_help="$ac_help
2371     --enable-unique               Attribute Uniqueness overlay no|yes|mod no"
2372 # Check whether --enable-unique or --disable-unique was given.
2373 if test "${enable_unique+set}" = set; then
2374   enableval="$enable_unique"
2375   
2376         ol_arg=invalid
2377         for ol_val in no yes mod ; do
2378                 if test "$enableval" = "$ol_val" ; then
2379                         ol_arg="$ol_val"
2380                 fi
2381         done
2382         if test "$ol_arg" = "invalid" ; then
2383                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2384         fi
2385         ol_enable_unique="$ol_arg"
2386
2387 else
2388         ol_enable_unique="no"
2389 fi
2390 # end --enable-unique
2391
2392
2393 ac_help="$ac_help
2394
2395 SLURPD (Replication Daemon) Options:"
2396 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2397 if test "${with_xxslurpdoptions+set}" = set; then
2398   withval="$with_xxslurpdoptions"
2399   :
2400 fi
2401
2402 # OpenLDAP --enable-slurpd
2403         ac_help="$ac_help
2404   --enable-slurpd         enable building slurpd auto"
2405 # Check whether --enable-slurpd or --disable-slurpd was given.
2406 if test "${enable_slurpd+set}" = set; then
2407   enableval="$enable_slurpd"
2408   
2409         ol_arg=invalid
2410         for ol_val in auto yes no ; do
2411                 if test "$enableval" = "$ol_val" ; then
2412                         ol_arg="$ol_val"
2413                 fi
2414         done
2415         if test "$ol_arg" = "invalid" ; then
2416                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2417         fi
2418         ol_enable_slurpd="$ol_arg"
2419
2420 else
2421         ol_enable_slurpd="auto"
2422 fi
2423 # end --enable-slurpd
2424
2425 ac_help="$ac_help
2426
2427 Library Generation & Linking Options"
2428 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2429 if test "${with_xxliboptions+set}" = set; then
2430   withval="$with_xxliboptions"
2431   :
2432 fi
2433
2434 ac_help="$ac_help
2435   --enable-static=PKGS  build static libraries default=yes"
2436 # Check whether --enable-static or --disable-static was given.
2437 if test "${enable_static+set}" = set; then
2438   enableval="$enable_static"
2439   p=${PACKAGE-default}
2440 case $enableval in
2441 yes ; do
2442                 if test "$enableval" = "$ol_val" ; then
2443                         ol_arg="$ol_val"
2444                 fi
2445         done
2446         if test "$ol_arg" = "invalid" ; then
2447                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2448         fi
2449         ol_enable_rwm="$ol_arg"
2450
2451 else
2452         ol_enable_rwm="no"
2453 fi
2454 # end --enable-rwm
2455  enable_static=yes ;;
2456 no ; do
2457                 if test "$enableval" = "$ol_val" ; then
2458                         ol_arg="$ol_val"
2459                 fi
2460         done
2461         if test "$ol_arg" = "invalid" ; then
2462                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2463         fi
2464         ol_enable_proxycache="$ol_arg"
2465
2466 else
2467         ol_enable_proxycache="no"
2468 fi
2469 # end --enable-proxycache
2470  enable_static=no ;;
2471 *)
2472   enable_static=no
2473   # Look at the argument we got.  We use all the common list separators.
2474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2475   for pkg in $enableval; do
2476     if test "X$pkg" = "X$p"; then
2477       enable_static=yes
2478     fi
2479   done
2480   IFS="$ac_save_ifs"
2481   ;;
2482 esac
2483 else
2484   enable_static=yes
2485 fi
2486
2487 # Check whether --enable-shared or --disable-shared was given.
2488 if test "${enable_shared+set}" = set; then
2489   enableval="$enable_shared"
2490   p=${PACKAGE-default}
2491 case $enableval in
2492 yes) enable_shared=yes ;;
2493 no) enable_shared=no ;;
2494 *)
2495   enable_shared=no
2496   # Look at the argument we got.  We use all the common list separators.
2497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2498   for pkg in $enableval; do
2499     if test "X$pkg" = "X$p"; then
2500       enable_shared=yes
2501     fi
2502   done
2503   IFS="$ac_save_ifs"
2504   ;;
2505 esac
2506 else
2507   enable_shared=yes
2508 fi
2509
2510
2511
2512 # Activate any backends that were not explicitly enabled.
2513 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2514 if test $ol_enable_backends != no ; then
2515         for i in $Backends; do
2516                 eval "ol_tmp=\$ol_enable_$i"
2517                 if test $ol_tmp = no ; then
2518                         eval "ol_enable_$i=$ol_enable_backends"
2519                 fi
2520         done
2521 fi
2522 # Activate the overlays
2523 if test $ol_enable_overlays != no ; then
2524         for i in $Overlays; do
2525                 eval "ol_tmp=\$ol_enable_$i"
2526                 if test $ol_tmp = no ; then
2527                         eval "ol_enable_$i=$ol_enable_overlays"
2528                 fi
2529         done
2530 fi
2531
2532 # validate options
2533 if test $ol_enable_slapd = no ; then
2534                 if test $ol_enable_slapi = yes ; then
2535                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2536         fi
2537         if test $ol_enable_backends != no ; then
2538                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2539         fi
2540         for i in $Backends; do
2541                 eval "ol_tmp=\$ol_enable_$i"
2542                 if test $ol_tmp != no ; then
2543                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2544                         eval "ol_enable_$i=no"
2545                 fi
2546         done
2547         if test $ol_enable_modules = yes ; then
2548                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2549         fi
2550         if test $ol_enable_multimaster = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2552         fi
2553         if test $ol_enable_wrappers = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2555         fi
2556         if test $ol_enable_rlookups = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2558         fi
2559         if test $ol_enable_aci = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2561         fi
2562         if test $ol_with_ldbm_api != auto ; then
2563                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2564         fi
2565         if test $ol_with_ldbm_type != auto ; then
2566                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2567         fi
2568         if test $ol_enable_slurpd = yes ; then
2569                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2570         fi
2571         if test $ol_enable_rewrite = yes ; then
2572                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2573         fi
2574                 if test $ol_enable_overlays != no ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2576         fi
2577         for i in $Overlays; do
2578                 eval "ol_tmp=\$ol_enable_$i"
2579                 if test $ol_tmp != no ; then
2580                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2581                         eval "ol_enable_$i=no"
2582                 fi
2583         done
2584
2585         # force settings to no
2586         ol_enable_slapi=no
2587
2588         ol_enable_backends=no
2589         ol_enable_overlays=no
2590         ol_enable_modules=no
2591         ol_enable_multimaster=no
2592         ol_enable_rlookups=no
2593         ol_enable_aci=no
2594         ol_enable_wrappers=no
2595
2596         ol_with_ldbm_api=no
2597         ol_with_ldbm_type=no
2598
2599         ol_enable_slurpd=no
2600
2601         ol_enable_rewrite=no
2602
2603 elif test $ol_enable_ldbm = no ; then
2604         
2605         if test $ol_with_ldbm_api != auto ; then
2606                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2607         fi
2608
2609         if test $ol_with_ldbm_type != auto ; then
2610                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2611         fi
2612
2613         if test $ol_enable_modules != yes -a \
2614                 $ol_enable_bdb = no -a \
2615                 $ol_enable_dnssrv = no -a \
2616                 $ol_enable_hdb = no -a \
2617                 $ol_enable_ldap = no -a \
2618                 $ol_enable_meta = no -a \
2619                 $ol_enable_monitor = no -a \
2620                 $ol_enable_null = no -a \
2621                 $ol_enable_passwd = no -a \
2622                 $ol_enable_perl = no -a \
2623                 $ol_enable_relay = no -a \
2624                 $ol_enable_shell = no -a \
2625                 $ol_enable_sql = no ; then
2626
2627                 if test $ol_enable_slapd = yes ; then
2628                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2629                 else
2630                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2631                         ol_enable_slapd=no
2632                 fi
2633         fi
2634
2635         ol_with_ldbm_api=no
2636         ol_with_ldbm_type=no
2637
2638         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2639                 ol_with_ldbm_api=berkeley
2640         fi
2641
2642 else
2643                 if test $ol_with_ldbm_api = gdbm -a \
2644                 $ol_with_ldbm_type = btree ; then
2645                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2646         fi
2647         if test $ol_with_ldbm_api = mdbm -a \
2648                 $ol_with_ldbm_type = btree ; then
2649                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2650         fi
2651         if test $ol_with_ldbm_api = ndbm -a \
2652                 $ol_with_ldbm_type = btree ; then
2653                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2654         fi
2655
2656         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2657                 if test $ol_with_ldbm_api = auto ; then
2658                         ol_with_ldbm_api=berkeley
2659                 elif test $ol_with_ldbm_api != berkeley ; then
2660                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2661                 fi
2662
2663         elif test $ol_enable_bdb = auto ; then
2664                 if test $ol_with_ldbm_api != berkeley \
2665                         -o $ol_with_ldbm_api != auto ; then
2666                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2667                         ol_enable_bdb=no
2668                 fi
2669         fi
2670 fi
2671
2672 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2673         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2674 fi
2675
2676 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2677         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2678 fi
2679
2680 if test $ol_enable_slurpd = yes ; then
2681                 if test $ol_with_threads = no ; then
2682                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2683         fi
2684 fi
2685
2686 if test $ol_enable_lmpasswd = yes ; then
2687         if test $ol_with_tls = no ; then
2688                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2689         fi
2690 fi
2691
2692 if test $ol_enable_kbind = yes ; then
2693         if test $ol_with_kerberos = no ; then
2694                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2695         elif test $ol_with_kerberos = auto ; then
2696                 ol_with_kerberos=yes
2697         fi
2698
2699 elif test $ol_enable_kbind = no ; then
2700         if test $ol_with_kerberos = auto ; then
2701                 ol_with_kerberos=no
2702         elif test $ol_with_kerberos != no ; then
2703                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2704                 ol_with_kerberos=no
2705         fi
2706 fi
2707
2708 if test $ol_enable_spasswd = yes ; then
2709         if test $ol_with_cyrus_sasl = no ; then
2710                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2711         fi
2712         ol_with_cyrus_sasl=yes
2713 fi
2714
2715 echo "$ac_t""done" 1>&6
2716
2717 LDAP_LIBS=
2718 LDBM_LIBS=
2719 LTHREAD_LIBS=
2720 LUTIL_LIBS=
2721
2722 SLAPD_LIBS=
2723 SLURPD_LIBS=
2724
2725 BUILD_SLAPD=no
2726 BUILD_SLURPD=no
2727
2728 BUILD_THREAD=no
2729
2730 BUILD_SLAPI=no
2731 SLAPD_SLAPI_DEPEND=
2732
2733 BUILD_BDB=no
2734 BUILD_DNSSRV=no
2735 BUILD_HDB=no
2736 BUILD_LDAP=no
2737 BUILD_LDBM=no
2738 BUILD_META=no
2739 BUILD_MONITOR=no
2740 BUILD_NULL=no
2741 BUILD_PASSWD=no
2742 BUILD_PERL=no
2743 BUILD_RELAY=no
2744 BUILD_SHELL=no
2745 BUILD_SQL=no
2746
2747 BUILD_CHAIN=no
2748 BUILD_DENYOP=no
2749 BUILD_DYNGROUP=no
2750 BUILD_LASTMOD=no
2751 BUILD_PPOLICY=no
2752 BUILD_PROXYCACHE=no
2753 BUILD_REFINT=no
2754 BUILD_RWM=no
2755 BUILD_UNIQUE=no
2756
2757 SLAPD_DYNAMIC_OVERLAYS=
2758
2759 SLAPD_MODULES_LDFLAGS=
2760 SLAPD_MODULES_CPPFLAGS=
2761
2762 SLAPD_STATIC_BACKENDS=
2763 SLAPD_DYNAMIC_BACKENDS=
2764
2765 SLAPD_PERL_LDFLAGS=
2766 MOD_PERL_LDFLAGS=
2767 PERL_CPPFLAGS=
2768
2769 SLAPD_SQL_LDFLAGS=
2770 SLAPD_SQL_LIBS=
2771 SLAPD_SQL_INCLUDES=
2772
2773 KRB4_LIBS=
2774 KRB5_LIBS=
2775 SASL_LIBS=
2776 TLS_LIBS=
2777 MODULES_LIBS=
2778 SLAPI_LIBS=
2779 LIBSLAPI=
2780 LIBSLAPITOOLS=
2781 AUTH_LIBS=
2782
2783 SLAPD_SLP_LIBS=
2784
2785
2786 # Find a good install program.  We prefer a C program (faster),
2787 # so one script is as good as another.  But avoid the broken or
2788 # incompatible versions:
2789 # SysV /etc/install, /usr/sbin/install
2790 # SunOS /usr/etc/install
2791 # IRIX /sbin/install
2792 # AIX /bin/install
2793 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2794 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2795 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2796 # ./install, which can be erroneously created by make from ./install.sh.
2797 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2798 echo "configure:2799: checking for a BSD compatible install" >&5
2799 if test -z "$INSTALL"; then
2800 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2801   echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2804   for ac_dir in $PATH; do
2805     # Account for people who put trailing slashes in PATH elements.
2806     case "$ac_dir/" in
2807     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2808     *)
2809       # OSF1 and SCO ODT 3.0 have their own names for install.
2810       # Don't use installbsd from OSF since it installs stuff as root
2811       # by default.
2812       for ac_prog in ginstall scoinst install; do
2813         if test -f $ac_dir/$ac_prog; then
2814           if test $ac_prog = install &&
2815             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2816             # AIX install.  It has an incompatible calling convention.
2817             :
2818           elif test $ac_prog = install &&
2819             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2820             # program-specific install script used by HP pwplus--don't use.
2821             :
2822           else
2823             ac_cv_path_install="$ac_dir/$ac_prog -c"
2824             break 2
2825           fi
2826         fi
2827       done
2828       ;;
2829     esac
2830   done
2831   IFS="$ac_save_IFS"
2832
2833 fi
2834   if test "${ac_cv_path_install+set}" = set; then
2835     INSTALL="$ac_cv_path_install"
2836   else
2837     # As a last resort, use the slow shell script.  We don't cache a
2838     # path for INSTALL within a source directory, because that will
2839     # break other packages using the cache if that directory is
2840     # removed, or if the path is relative.
2841     INSTALL="$ac_install_sh"
2842   fi
2843 fi
2844 echo "$ac_t""$INSTALL" 1>&6
2845
2846 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2847 # It thinks the first close brace ends the variable substitution.
2848 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2849
2850 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2851
2852 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2853
2854
2855 cat >> confdefs.h <<\EOF
2856 #define HAVE_MKVERSION 1
2857 EOF
2858
2859
2860
2861
2862 ol_aix_threads=no
2863 case "$target" in
2864 *-*-aix*)       if test -z "$CC" ; then
2865                 case "$ol_with_threads" in
2866                 auto | yes |  posix) ol_aix_threads=yes ;;
2867                 esac
2868         fi
2869 ;;
2870 esac
2871
2872 if test $ol_aix_threads = yes ; then
2873         if test -z "${CC}" ; then
2874                 for ac_prog in cc_r xlc_r cc
2875 do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877 set dummy $ac_prog; ac_word=$2
2878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2879 echo "configure:2880: checking for $ac_word" >&5
2880 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2881   echo $ac_n "(cached) $ac_c" 1>&6
2882 else
2883   if test -n "$CC"; then
2884   ac_cv_prog_CC="$CC" # Let the user override the test.
2885 else
2886   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2887   ac_dummy="$PATH"
2888   for ac_dir in $ac_dummy; do
2889     test -z "$ac_dir" && ac_dir=.
2890     if test -f $ac_dir/$ac_word; then
2891       ac_cv_prog_CC="$ac_prog"
2892       break
2893     fi
2894   done
2895   IFS="$ac_save_ifs"
2896 fi
2897 fi
2898 CC="$ac_cv_prog_CC"
2899 if test -n "$CC"; then
2900   echo "$ac_t""$CC" 1>&6
2901 else
2902   echo "$ac_t""no" 1>&6
2903 fi
2904
2905 test -n "$CC" && break
2906 done
2907
2908
2909                 if test "$CC" = cc ; then
2910                                                 if test $ol_with_threads != auto ; then
2911                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2912                         else
2913                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2914                         fi
2915                         ol_with_threads=no
2916                 fi
2917         fi
2918
2919         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2920                 ol_with_threads=posix
2921                 ol_cv_pthread_create=yes
2922         fi
2923 fi
2924
2925 if test -z "${CC}"; then
2926         for ac_prog in cc gcc
2927 do
2928 # Extract the first word of "$ac_prog", so it can be a program name with args.
2929 set dummy $ac_prog; ac_word=$2
2930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2931 echo "configure:2932: checking for $ac_word" >&5
2932 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2933   echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935   if test -n "$CC"; then
2936   ac_cv_prog_CC="$CC" # Let the user override the test.
2937 else
2938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2939   ac_dummy="$PATH"
2940   for ac_dir in $ac_dummy; do
2941     test -z "$ac_dir" && ac_dir=.
2942     if test -f $ac_dir/$ac_word; then
2943       ac_cv_prog_CC="$ac_prog"
2944       break
2945     fi
2946   done
2947   IFS="$ac_save_ifs"
2948 fi
2949 fi
2950 CC="$ac_cv_prog_CC"
2951 if test -n "$CC"; then
2952   echo "$ac_t""$CC" 1>&6
2953 else
2954   echo "$ac_t""no" 1>&6
2955 fi
2956
2957 test -n "$CC" && break
2958 done
2959 test -n "$CC" || CC="missing"
2960
2961
2962         if test "${CC}" = "missing" ; then
2963                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2964         fi
2965 fi
2966
2967 if test -z "${AR}"; then
2968         for ac_prog in ar gar
2969 do
2970 # Extract the first word of "$ac_prog", so it can be a program name with args.
2971 set dummy $ac_prog; ac_word=$2
2972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_word" >&5
2974 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2975   echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977   if test -n "$AR"; then
2978   ac_cv_prog_AR="$AR" # Let the user override the test.
2979 else
2980   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2981   ac_dummy="$PATH"
2982   for ac_dir in $ac_dummy; do
2983     test -z "$ac_dir" && ac_dir=.
2984     if test -f $ac_dir/$ac_word; then
2985       ac_cv_prog_AR="$ac_prog"
2986       break
2987     fi
2988   done
2989   IFS="$ac_save_ifs"
2990 fi
2991 fi
2992 AR="$ac_cv_prog_AR"
2993 if test -n "$AR"; then
2994   echo "$ac_t""$AR" 1>&6
2995 else
2996   echo "$ac_t""no" 1>&6
2997 fi
2998
2999 test -n "$AR" && break
3000 done
3001 test -n "$AR" || AR="missing"
3002
3003
3004         if test "${AR}" = "missing" ; then
3005                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3006         fi
3007 fi
3008
3009
3010
3011 # Find the correct PATH separator.  Usually this is `:', but
3012 # DJGPP uses `;' like DOS.
3013 if test "X${PATH_SEPARATOR+set}" != Xset; then
3014   UNAME=${UNAME-`uname 2>/dev/null`}
3015   case X$UNAME in
3016     *-DOS) lt_cv_sys_path_separator=';' ;;
3017     *)     lt_cv_sys_path_separator=':' ;;
3018   esac
3019   PATH_SEPARATOR=$lt_cv_sys_path_separator
3020 fi
3021
3022 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3023 echo "configure:3024: checking for Cygwin environment" >&5
3024 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   cat > conftest.$ac_ext <<EOF
3028 #line 3029 "configure"
3029 #include "confdefs.h"
3030
3031 int main() {
3032
3033 #ifndef __CYGWIN__
3034 #define __CYGWIN__ __CYGWIN32__
3035 #endif
3036 return __CYGWIN__;
3037 ; return 0; }
3038 EOF
3039 if { (eval echo configure:3040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3040   rm -rf conftest*
3041   ac_cv_cygwin=yes
3042 else
3043   echo "configure: failed program was:" >&5
3044   cat conftest.$ac_ext >&5
3045   rm -rf conftest*
3046   ac_cv_cygwin=no
3047 fi
3048 rm -f conftest*
3049 fi
3050
3051 echo "$ac_t""$ac_cv_cygwin" 1>&6
3052 CYGWIN=
3053 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3054 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3055 echo "configure:3056: checking for mingw32 environment" >&5
3056 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062
3063 int main() {
3064 return __MINGW32__;
3065 ; return 0; }
3066 EOF
3067 if { (eval echo configure:3068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3068   rm -rf conftest*
3069   ac_cv_mingw32=yes
3070 else
3071   echo "configure: failed program was:" >&5
3072   cat conftest.$ac_ext >&5
3073   rm -rf conftest*
3074   ac_cv_mingw32=no
3075 fi
3076 rm -f conftest*
3077 fi
3078
3079 echo "$ac_t""$ac_cv_mingw32" 1>&6
3080 MINGW32=
3081 test "$ac_cv_mingw32" = yes && MINGW32=yes
3082 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3083 echo "configure:3084: checking for EMX OS/2 environment" >&5
3084 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3085   echo $ac_n "(cached) $ac_c" 1>&6
3086 else
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090
3091 int main() {
3092 return __EMX__;
3093 ; return 0; }
3094 EOF
3095 if { (eval echo configure:3096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3096   rm -rf conftest*
3097   ac_cv_emxos2=yes
3098 else
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101   rm -rf conftest*
3102   ac_cv_emxos2=no
3103 fi
3104 rm -f conftest*
3105 fi
3106
3107 echo "$ac_t""$ac_cv_emxos2" 1>&6
3108 EMXOS2=
3109 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3110 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3111 echo "configure:3112: checking how to run the C preprocessor" >&5
3112 # On Suns, sometimes $CPP names a directory.
3113 if test -n "$CPP" && test -d "$CPP"; then
3114   CPP=
3115 fi
3116 if test -z "$CPP"; then
3117 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120     # This must be in double quotes, not single quotes, because CPP may get
3121   # substituted into the Makefile and "${CC-cc}" will confuse make.
3122   CPP="${CC-cc} -E"
3123   # On the NeXT, cc -E runs the code through the compiler's parser,
3124   # not just through cpp.
3125   cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 #include <assert.h>
3129 Syntax Error
3130 EOF
3131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3132 { (eval echo configure:3133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3134 if test -z "$ac_err"; then
3135   :
3136 else
3137   echo "$ac_err" >&5
3138   echo "configure: failed program was:" >&5
3139   cat conftest.$ac_ext >&5
3140   rm -rf conftest*
3141   CPP="${CC-cc} -E -traditional-cpp"
3142   cat > conftest.$ac_ext <<EOF
3143 #line 3144 "configure"
3144 #include "confdefs.h"
3145 #include <assert.h>
3146 Syntax Error
3147 EOF
3148 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3149 { (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3150 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3151 if test -z "$ac_err"; then
3152   :
3153 else
3154   echo "$ac_err" >&5
3155   echo "configure: failed program was:" >&5
3156   cat conftest.$ac_ext >&5
3157   rm -rf conftest*
3158   CPP="${CC-cc} -nologo -E"
3159   cat > conftest.$ac_ext <<EOF
3160 #line 3161 "configure"
3161 #include "confdefs.h"
3162 #include <assert.h>
3163 Syntax Error
3164 EOF
3165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3166 { (eval echo configure:3167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3168 if test -z "$ac_err"; then
3169   :
3170 else
3171   echo "$ac_err" >&5
3172   echo "configure: failed program was:" >&5
3173   cat conftest.$ac_ext >&5
3174   rm -rf conftest*
3175   CPP=/lib/cpp
3176 fi
3177 rm -f conftest*
3178 fi
3179 rm -f conftest*
3180 fi
3181 rm -f conftest*
3182   ac_cv_prog_CPP="$CPP"
3183 fi
3184   CPP="$ac_cv_prog_CPP"
3185 else
3186   ac_cv_prog_CPP="$CPP"
3187 fi
3188 echo "$ac_t""$CPP" 1>&6
3189
3190 # Check whether --enable-fast-install or --disable-fast-install was given.
3191 if test "${enable_fast_install+set}" = set; then
3192   enableval="$enable_fast_install"
3193   p=${PACKAGE-default}
3194 case $enableval in
3195 yes) enable_fast_install=yes ;;
3196 no) enable_fast_install=no ;;
3197 *)
3198   enable_fast_install=no
3199   # Look at the argument we got.  We use all the common list separators.
3200   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3201   for pkg in $enableval; do
3202     if test "X$pkg" = "X$p"; then
3203       enable_fast_install=yes
3204     fi
3205   done
3206   IFS="$ac_save_ifs"
3207   ;;
3208 esac
3209 else
3210   enable_fast_install=yes
3211 fi
3212
3213 # Extract the first word of "gcc", so it can be a program name with args.
3214 set dummy gcc; ac_word=$2
3215 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3216 echo "configure:3217: checking for $ac_word" >&5
3217 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   if test -n "$CC"; then
3221   ac_cv_prog_CC="$CC" # Let the user override the test.
3222 else
3223   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3224   ac_dummy="$PATH"
3225   for ac_dir in $ac_dummy; do
3226     test -z "$ac_dir" && ac_dir=.
3227     if test -f $ac_dir/$ac_word; then
3228       ac_cv_prog_CC="gcc"
3229       break
3230     fi
3231   done
3232   IFS="$ac_save_ifs"
3233 fi
3234 fi
3235 CC="$ac_cv_prog_CC"
3236 if test -n "$CC"; then
3237   echo "$ac_t""$CC" 1>&6
3238 else
3239   echo "$ac_t""no" 1>&6
3240 fi
3241
3242 if test -z "$CC"; then
3243   # Extract the first word of "cc", so it can be a program name with args.
3244 set dummy cc; ac_word=$2
3245 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3246 echo "configure:3247: checking for $ac_word" >&5
3247 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3248   echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250   if test -n "$CC"; then
3251   ac_cv_prog_CC="$CC" # Let the user override the test.
3252 else
3253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3254   ac_prog_rejected=no
3255   ac_dummy="$PATH"
3256   for ac_dir in $ac_dummy; do
3257     test -z "$ac_dir" && ac_dir=.
3258     if test -f $ac_dir/$ac_word; then
3259       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3260         ac_prog_rejected=yes
3261         continue
3262       fi
3263       ac_cv_prog_CC="cc"
3264       break
3265     fi
3266   done
3267   IFS="$ac_save_ifs"
3268 if test $ac_prog_rejected = yes; then
3269   # We found a bogon in the path, so make sure we never use it.
3270   set dummy $ac_cv_prog_CC
3271   shift
3272   if test $# -gt 0; then
3273     # We chose a different compiler from the bogus one.
3274     # However, it has the same basename, so the bogon will be chosen
3275     # first if we set CC to just the basename; use the full file name.
3276     shift
3277     set dummy "$ac_dir/$ac_word" "$@"
3278     shift
3279     ac_cv_prog_CC="$@"
3280   fi
3281 fi
3282 fi
3283 fi
3284 CC="$ac_cv_prog_CC"
3285 if test -n "$CC"; then
3286   echo "$ac_t""$CC" 1>&6
3287 else
3288   echo "$ac_t""no" 1>&6
3289 fi
3290
3291   if test -z "$CC"; then
3292     case "`uname -s`" in
3293     *win32* | *WIN32* | *CYGWIN*)
3294       # Extract the first word of "cl", so it can be a program name with args.
3295 set dummy cl; ac_word=$2
3296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3297 echo "configure:3298: checking for $ac_word" >&5
3298 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   if test -n "$CC"; then
3302   ac_cv_prog_CC="$CC" # Let the user override the test.
3303 else
3304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3305   ac_dummy="$PATH"
3306   for ac_dir in $ac_dummy; do
3307     test -z "$ac_dir" && ac_dir=.
3308     if test -f $ac_dir/$ac_word; then
3309       ac_cv_prog_CC="cl"
3310       break
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314 fi
3315 fi
3316 CC="$ac_cv_prog_CC"
3317 if test -n "$CC"; then
3318   echo "$ac_t""$CC" 1>&6
3319 else
3320   echo "$ac_t""no" 1>&6
3321 fi
3322  ;;
3323     esac
3324   fi
3325   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3326 fi
3327
3328 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3329 echo "configure:3330: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3330
3331 ac_ext=c
3332 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3333 ac_cpp='$CPP $CPPFLAGS'
3334 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3335 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3336 cross_compiling=$ac_cv_prog_cc_cross
3337
3338 cat > conftest.$ac_ext << EOF
3339
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342
3343 main(){return(0);}
3344 EOF
3345 if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3346   ac_cv_prog_cc_works=yes
3347   # If we can't run a trivial program, we are probably using a cross compiler.
3348   if (./conftest; exit) 2>/dev/null; then
3349     ac_cv_prog_cc_cross=no
3350   else
3351     ac_cv_prog_cc_cross=yes
3352   fi
3353 else
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   ac_cv_prog_cc_works=no
3357 fi
3358 rm -fr conftest*
3359 ac_ext=c
3360 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3361 ac_cpp='$CPP $CPPFLAGS'
3362 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3363 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3364 cross_compiling=$ac_cv_prog_cc_cross
3365
3366 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3367 if test $ac_cv_prog_cc_works = no; then
3368   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3369 fi
3370 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3371 echo "configure:3372: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3372 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3373 cross_compiling=$ac_cv_prog_cc_cross
3374
3375 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3376 echo "configure:3377: checking whether we are using GNU C" >&5
3377 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   cat > conftest.c <<EOF
3381 #ifdef __GNUC__
3382   yes;
3383 #endif
3384 EOF
3385 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3386   ac_cv_prog_gcc=yes
3387 else
3388   ac_cv_prog_gcc=no
3389 fi
3390 fi
3391
3392 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3393
3394 if test $ac_cv_prog_gcc = yes; then
3395   GCC=yes
3396 else
3397   GCC=
3398 fi
3399
3400 ac_test_CFLAGS="${CFLAGS+set}"
3401 ac_save_CFLAGS="$CFLAGS"
3402 CFLAGS=
3403 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3404 echo "configure:3405: checking whether ${CC-cc} accepts -g" >&5
3405 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   echo 'void f(){}' > conftest.c
3409 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3410   ac_cv_prog_cc_g=yes
3411 else
3412   ac_cv_prog_cc_g=no
3413 fi
3414 rm -f conftest*
3415
3416 fi
3417
3418 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3419 if test "$ac_test_CFLAGS" = set; then
3420   CFLAGS="$ac_save_CFLAGS"
3421 elif test $ac_cv_prog_cc_g = yes; then
3422   if test "$GCC" = yes; then
3423     CFLAGS="-g -O2"
3424   else
3425     CFLAGS="-g"
3426   fi
3427 else
3428   if test "$GCC" = yes; then
3429     CFLAGS="-O2"
3430   else
3431     CFLAGS=
3432   fi
3433 fi
3434
3435 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3436 if test "${with_gnu_ld+set}" = set; then
3437   withval="$with_gnu_ld"
3438   test "$withval" = no || with_gnu_ld=yes
3439 else
3440   with_gnu_ld=no
3441 fi
3442
3443 ac_prog=ld
3444 if test "$GCC" = yes; then
3445   # Check if gcc -print-prog-name=ld gives a path.
3446   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3447 echo "configure:3448: checking for ld used by GCC" >&5
3448   case $host in
3449   *-*-mingw*)
3450     # gcc leaves a trailing carriage return which upsets mingw
3451     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3452   *)
3453     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3454   esac
3455   case $ac_prog in
3456     # Accept absolute paths.
3457     [\\/]* | [A-Za-z]:[\\/]*)
3458       re_direlt='/[^/][^/]*/\.\./'
3459       # Canonicalize the path of ld
3460       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3461       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3462         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3463       done
3464       test -z "$LD" && LD="$ac_prog"
3465       ;;
3466   "")
3467     # If it fails, then pretend we aren't using GCC.
3468     ac_prog=ld
3469     ;;
3470   *)
3471     # If it is relative, then search for the first ld in PATH.
3472     with_gnu_ld=unknown
3473     ;;
3474   esac
3475 elif test "$with_gnu_ld" = yes; then
3476   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3477 echo "configure:3478: checking for GNU ld" >&5
3478 else
3479   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3480 echo "configure:3481: checking for non-GNU ld" >&5
3481 fi
3482 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3483   echo $ac_n "(cached) $ac_c" 1>&6
3484 else
3485   if test -z "$LD"; then
3486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3487   for ac_dir in $PATH; do
3488     test -z "$ac_dir" && ac_dir=.
3489     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3490       lt_cv_path_LD="$ac_dir/$ac_prog"
3491       # Check to see if the program is GNU ld.  I'd rather use --version,
3492       # but apparently some GNU ld's only accept -v.
3493       # Break only if it was the GNU/non-GNU ld that we prefer.
3494       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3495         test "$with_gnu_ld" != no && break
3496       else
3497         test "$with_gnu_ld" != yes && break
3498       fi
3499     fi
3500   done
3501   IFS="$ac_save_ifs"
3502 else
3503   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3504 fi
3505 fi
3506
3507 LD="$lt_cv_path_LD"
3508 if test -n "$LD"; then
3509   echo "$ac_t""$LD" 1>&6
3510 else
3511   echo "$ac_t""no" 1>&6
3512 fi
3513 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3514 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3515 echo "configure:3516: checking if the linker ($LD) is GNU ld" >&5
3516 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3520 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3521   lt_cv_prog_gnu_ld=yes
3522 else
3523   lt_cv_prog_gnu_ld=no
3524 fi
3525 fi
3526
3527 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3528 with_gnu_ld=$lt_cv_prog_gnu_ld
3529
3530
3531 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3532 echo "configure:3533: checking for $LD option to reload object files" >&5
3533 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3534   echo $ac_n "(cached) $ac_c" 1>&6
3535 else
3536   lt_cv_ld_reload_flag='-r'
3537 fi
3538
3539 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3540 reload_flag=$lt_cv_ld_reload_flag
3541 test -n "$reload_flag" && reload_flag=" $reload_flag"
3542
3543 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3544 echo "configure:3545: checking for BSD-compatible nm" >&5
3545 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3546   echo $ac_n "(cached) $ac_c" 1>&6
3547 else
3548   if test -n "$NM"; then
3549   # Let the user override the test.
3550   lt_cv_path_NM="$NM"
3551 else
3552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3553   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3554     test -z "$ac_dir" && ac_dir=.
3555     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3556     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3557       # Check to see if the nm accepts a BSD-compat flag.
3558       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3559       #   nm: unknown option "B" ignored
3560       # Tru64's nm complains that /dev/null is an invalid object file
3561       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3562         lt_cv_path_NM="$tmp_nm -B"
3563         break
3564       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3565         lt_cv_path_NM="$tmp_nm -p"
3566         break
3567       else
3568         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3569         continue # so that we can try to find one that supports BSD flags
3570       fi
3571     fi
3572   done
3573   IFS="$ac_save_ifs"
3574   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3575 fi
3576 fi
3577
3578 NM="$lt_cv_path_NM"
3579 echo "$ac_t""$NM" 1>&6
3580
3581 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3582 echo "configure:3583: checking for a sed that does not truncate output" >&5
3583 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   # Loop through the user's path and test for sed and gsed.
3587 # Then use that list of sed's as ones to test for truncation.
3588 as_executable_p="test -f"
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590 for as_dir in $PATH
3591 do
3592   IFS=$as_save_IFS
3593   test -z "$as_dir" && as_dir=.
3594   for ac_prog in sed gsed; do
3595     for ac_exec_ext in '' $ac_executable_extensions; do
3596       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3597         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3598       fi
3599     done
3600   done
3601 done
3602
3603   # Create a temporary directory, and hook for its removal unless debugging.
3604 $debug ||
3605 {
3606   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3607   trap '{ (exit 1); exit 1; }' 1 2 13 15
3608 }
3609
3610 # Create a (secure) tmp directory for tmp files.
3611 : ${TMPDIR=/tmp}
3612 {
3613   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3614   test -n "$tmp" && test -d "$tmp"
3615 }  ||
3616 {
3617   tmp=$TMPDIR/sed$$-$RANDOM
3618   (umask 077 && mkdir $tmp)
3619 } ||
3620 {
3621    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3622    { (exit 1); exit 1; }
3623 }
3624   _max=0
3625   _count=0
3626   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3627   # along with /bin/sed that truncates output.
3628   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3629     test ! -f ${_sed} && break
3630     cat /dev/null > "$tmp/sed.in"
3631     _count=0
3632     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3633     # Check for GNU sed and select it if it is found.
3634     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3635       lt_cv_path_SED=${_sed}
3636       break
3637     fi
3638     while true; do
3639       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3640       mv "$tmp/sed.tmp" "$tmp/sed.in"
3641       cp "$tmp/sed.in" "$tmp/sed.nl"
3642       echo >>"$tmp/sed.nl"
3643       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3644       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3645       # 40000 chars as input seems more than enough
3646       test $_count -gt 10 && break
3647       _count=`expr $_count + 1`
3648       if test $_count -gt $_max; then
3649         _max=$_count
3650         lt_cv_path_SED=$_sed
3651       fi
3652     done
3653   done
3654   rm -rf "$tmp"
3655
3656 fi
3657
3658 if test "X$SED" != "X"; then
3659   lt_cv_path_SED=$SED
3660 else
3661   SED=$lt_cv_path_SED
3662 fi
3663 echo "$ac_t""$SED" 1>&6
3664
3665 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3666 echo "configure:3667: checking whether ln -s works" >&5
3667 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3668   echo $ac_n "(cached) $ac_c" 1>&6
3669 else
3670   rm -f conftestdata
3671 if ln -s X conftestdata 2>/dev/null
3672 then
3673   rm -f conftestdata
3674   ac_cv_prog_LN_S="ln -s"
3675 else
3676   ac_cv_prog_LN_S=ln
3677 fi
3678 fi
3679 LN_S="$ac_cv_prog_LN_S"
3680 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3681   echo "$ac_t""yes" 1>&6
3682 else
3683   echo "$ac_t""no" 1>&6
3684 fi
3685
3686 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3687 echo "configure:3688: checking how to recognise dependent libraries" >&5
3688 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3689   echo $ac_n "(cached) $ac_c" 1>&6
3690 else
3691   lt_cv_file_magic_cmd='$MAGIC_CMD'
3692 lt_cv_file_magic_test_file=
3693 lt_cv_deplibs_check_method='unknown'
3694 # Need to set the preceding variable on all platforms that support
3695 # interlibrary dependencies.
3696 # 'none' -- dependencies not supported.
3697 # `unknown' -- same as none, but documents that we really don't know.
3698 # 'pass_all' -- all dependencies passed with no checks.
3699 # 'test_compile' -- check by making test program.
3700 # 'file_magic [[regex]]' -- check by looking for files in library path
3701 # which responds to the $file_magic_cmd with a given egrep regex.
3702 # If you have `file' or equivalent on your system and you're not sure
3703 # whether `pass_all' will *always* work, you probably want this one.
3704
3705 case $host_os in
3706 aix4* | aix5*)
3707   lt_cv_deplibs_check_method=pass_all
3708   ;;
3709
3710 beos*)
3711   lt_cv_deplibs_check_method=pass_all
3712   ;;
3713
3714 bsdi4*)
3715   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3716   lt_cv_file_magic_cmd='/usr/bin/file -L'
3717   lt_cv_file_magic_test_file=/shlib/libc.so
3718   ;;
3719
3720 cygwin* | mingw* | pw32*)
3721   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3722   lt_cv_file_magic_cmd='$OBJDUMP -f'
3723   ;;
3724
3725 darwin* | rhapsody*)
3726   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3727   lt_cv_file_magic_cmd='/usr/bin/file -L'
3728   case "$host_os" in
3729   rhapsody* | darwin1.[012])
3730     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3731     ;;
3732   *) # Darwin 1.3 on
3733     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3734     ;;
3735   esac
3736   ;;
3737
3738 freebsd*)
3739   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3740     case $host_cpu in
3741     i*86 )
3742       # Not sure whether the presence of OpenBSD here was a mistake.
3743       # Let's accept both of them until this is cleared up.
3744       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3745       lt_cv_file_magic_cmd=/usr/bin/file
3746       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3747       ;;
3748     esac
3749   else
3750     lt_cv_deplibs_check_method=pass_all
3751   fi
3752   ;;
3753
3754 gnu*)
3755   lt_cv_deplibs_check_method=pass_all
3756   ;;
3757
3758 hpux10.20*|hpux11*)
3759   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3760   lt_cv_file_magic_cmd=/usr/bin/file
3761   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3762   ;;
3763
3764 irix5* | irix6* | nonstopux*)
3765   case $host_os in
3766   irix5* | nonstopux*)
3767     # this will be overridden with pass_all, but let us keep it just in case
3768     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3769     ;;
3770   *)
3771     case $LD in
3772     *-32|*"-32 ") libmagic=32-bit;;
3773     *-n32|*"-n32 ") libmagic=N32;;
3774     *-64|*"-64 ") libmagic=64-bit;;
3775     *) libmagic=never-match;;
3776     esac
3777     # this will be overridden with pass_all, but let us keep it just in case
3778     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3779     ;;
3780   esac
3781   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3782   lt_cv_deplibs_check_method=pass_all
3783   ;;
3784
3785 # This must be Linux ELF.
3786 linux-gnu*)
3787   case $host_cpu in
3788   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3789     lt_cv_deplibs_check_method=pass_all ;;
3790   *)
3791     # glibc up to 2.1.1 does not perform some relocations on ARM
3792     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3793   esac
3794   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3795   ;;
3796
3797 netbsd*)
3798   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3799     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3800   else
3801     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3802   fi
3803   ;;
3804
3805 newos6*)
3806   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3807   lt_cv_file_magic_cmd=/usr/bin/file
3808   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3809   ;;
3810
3811 openbsd*)
3812   lt_cv_file_magic_cmd=/usr/bin/file
3813   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3814   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3815     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3816   else
3817     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3818   fi
3819   ;;
3820
3821 openedition*)
3822   lt_cv_deplibs_check_method=pass_all
3823   ;;
3824
3825 osf3* | osf4* | osf5*)
3826   # this will be overridden with pass_all, but let us keep it just in case
3827   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3828   lt_cv_file_magic_test_file=/shlib/libc.so
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 sco3.2v5*)
3833   lt_cv_deplibs_check_method=pass_all
3834   ;;
3835
3836 solaris*)
3837   lt_cv_deplibs_check_method=pass_all
3838   lt_cv_file_magic_test_file=/lib/libc.so
3839   ;;
3840
3841 sysv5uw[78]* | sysv4*uw2*)
3842   lt_cv_deplibs_check_method=pass_all
3843   ;;
3844
3845 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3846   case $host_vendor in
3847   motorola)
3848     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]'
3849     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3850     ;;
3851   ncr)
3852     lt_cv_deplibs_check_method=pass_all
3853     ;;
3854   sequent)
3855     lt_cv_file_magic_cmd='/bin/file'
3856     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3857     ;;
3858   sni)
3859     lt_cv_file_magic_cmd='/bin/file'
3860     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3861     lt_cv_file_magic_test_file=/lib/libc.so
3862     ;;
3863   siemens)
3864     lt_cv_deplibs_check_method=pass_all
3865     ;;
3866   esac
3867   ;;
3868 esac
3869
3870 fi
3871
3872 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3873 file_magic_cmd=$lt_cv_file_magic_cmd
3874 deplibs_check_method=$lt_cv_deplibs_check_method
3875
3876 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3877 echo "configure:3878: checking for object suffix" >&5
3878 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   rm -f conftest*
3882 echo 'int i = 1;' > conftest.$ac_ext
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3884   for ac_file in conftest.*; do
3885     case $ac_file in
3886     *.c) ;;
3887     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3888     esac
3889   done
3890 else
3891   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3892 fi
3893 rm -f conftest*
3894 fi
3895
3896 echo "$ac_t""$ac_cv_objext" 1>&6
3897 OBJEXT=$ac_cv_objext
3898 ac_objext=$ac_cv_objext
3899
3900
3901
3902
3903 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3904 echo "configure:3905: checking for executable suffix" >&5
3905 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3909   ac_cv_exeext=.exe
3910 else
3911   rm -f conftest*
3912   echo 'int main () { return 0; }' > conftest.$ac_ext
3913   ac_cv_exeext=
3914   if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3915     for file in conftest.*; do
3916       case $file in
3917       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3918       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3919       esac
3920     done
3921   else
3922     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3923   fi
3924   rm -f conftest*
3925   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3926 fi
3927 fi
3928
3929 EXEEXT=""
3930 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3931 echo "$ac_t""${ac_cv_exeext}" 1>&6
3932 ac_exeext=$EXEEXT
3933
3934 if test $host != $build; then
3935   ac_tool_prefix=${host_alias}-
3936 else
3937   ac_tool_prefix=
3938 fi
3939
3940
3941
3942
3943 # Check for command to grab the raw symbol name followed by C symbol from nm.
3944 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3945 echo "configure:3946: checking command to parse $NM output" >&5
3946 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   
3950 # These are sane defaults that work on at least a few old systems.
3951 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3952
3953 # Character class describing NM global symbol codes.
3954 symcode='[BCDEGRST]'
3955
3956 # Regexp to match symbols that can be accessed directly from C.
3957 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3958
3959 # Transform the above into a raw symbol and a C symbol.
3960 symxfrm='\1 \2\3 \3'
3961
3962 # Transform an extracted symbol line into a proper C declaration
3963 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3964
3965 # Transform an extracted symbol line into symbol name and symbol address
3966 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'"
3967
3968 # Define system-specific variables.
3969 case $host_os in
3970 aix*)
3971   symcode='[BCDT]'
3972   ;;
3973 cygwin* | mingw* | pw32*)
3974   symcode='[ABCDGISTW]'
3975   ;;
3976 hpux*) # Its linker distinguishes data from code symbols
3977   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3978   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'"
3979   ;;
3980 irix* | nonstopux*)
3981   symcode='[BCDEGRST]'
3982   ;;
3983 osf*)
3984   symcode='[BCDEGQRST]'
3985   ;;
3986 solaris* | sysv5*)
3987   symcode='[BDT]'
3988   ;;
3989 sysv4)
3990   symcode='[DFNSTU]'
3991   ;;
3992 esac
3993
3994 # Handle CRLF in mingw tool chain
3995 opt_cr=
3996 case $host_os in
3997 mingw*)
3998   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3999   ;;
4000 esac
4001
4002 # If we're using GNU nm, then use its standard symbol codes.
4003 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4004   symcode='[ABCDGISTW]'
4005 fi
4006
4007 # Try without a prefix undercore, then with it.
4008 for ac_symprfx in "" "_"; do
4009
4010   # Write the raw and C identifiers.
4011 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4012
4013   # Check to see that the pipe works correctly.
4014   pipe_works=no
4015   rm -f conftest*
4016   cat > conftest.$ac_ext <<EOF
4017 #ifdef __cplusplus
4018 extern "C" {
4019 #endif
4020 char nm_test_var;
4021 void nm_test_func(){}
4022 #ifdef __cplusplus
4023 }
4024 #endif
4025 int main(){nm_test_var='a';nm_test_func();return(0);}
4026 EOF
4027
4028   if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4029     # Now try to grab the symbols.
4030     nlist=conftest.nm
4031     if { (eval echo configure:4032: \"$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
4032       # Try sorting and uniquifying the output.
4033       if sort "$nlist" | uniq > "$nlist"T; then
4034         mv -f "$nlist"T "$nlist"
4035       else
4036         rm -f "$nlist"T
4037       fi
4038
4039       # Make sure that we snagged all the symbols we need.
4040       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4041         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4042           cat <<EOF > conftest.$ac_ext
4043 #ifdef __cplusplus
4044 extern "C" {
4045 #endif
4046
4047 EOF
4048           # Now generate the symbol file.
4049           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4050
4051           cat <<EOF >> conftest.$ac_ext
4052 #if defined (__STDC__) && __STDC__
4053 # define lt_ptr void *
4054 #else
4055 # define lt_ptr char *
4056 # define const
4057 #endif
4058
4059 /* The mapping between symbol names and symbols. */
4060 const struct {
4061   const char *name;
4062   lt_ptr address;
4063 }
4064 lt_preloaded_symbols[] =
4065 {
4066 EOF
4067           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4068           cat <<\EOF >> conftest.$ac_ext
4069   {0, (lt_ptr) 0}
4070 };
4071
4072 #ifdef __cplusplus
4073 }
4074 #endif
4075 EOF
4076           # Now try linking the two files.
4077           mv conftest.$ac_objext conftstm.$ac_objext
4078           save_LIBS="$LIBS"
4079           save_CFLAGS="$CFLAGS"
4080           LIBS="conftstm.$ac_objext"
4081           CFLAGS="$CFLAGS$no_builtin_flag"
4082           if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4083             pipe_works=yes
4084           fi
4085           LIBS="$save_LIBS"
4086           CFLAGS="$save_CFLAGS"
4087         else
4088           echo "cannot find nm_test_func in $nlist" >&5
4089         fi
4090       else
4091         echo "cannot find nm_test_var in $nlist" >&5
4092       fi
4093     else
4094       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4095     fi
4096   else
4097     echo "$progname: failed program was:" >&5
4098     cat conftest.$ac_ext >&5
4099   fi
4100   rm -f conftest* conftst*
4101
4102   # Do not use the global_symbol_pipe unless it works.
4103   if test "$pipe_works" = yes; then
4104     break
4105   else
4106     lt_cv_sys_global_symbol_pipe=
4107   fi
4108 done
4109
4110 fi
4111
4112 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4113 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4114   global_symbol_to_cdecl=
4115   global_symbol_to_c_name_address=
4116 else
4117   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4118   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4119 fi
4120 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4121 then
4122   echo "$ac_t""failed" 1>&6
4123 else
4124   echo "$ac_t""ok" 1>&6
4125 fi
4126
4127 for ac_hdr in dlfcn.h
4128 do
4129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4131 echo "configure:4132: checking for $ac_hdr" >&5
4132 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4133   echo $ac_n "(cached) $ac_c" 1>&6
4134 else
4135   cat > conftest.$ac_ext <<EOF
4136 #line 4137 "configure"
4137 #include "confdefs.h"
4138 #include <$ac_hdr>
4139 EOF
4140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4141 { (eval echo configure:4142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4143 if test -z "$ac_err"; then
4144   rm -rf conftest*
4145   eval "ac_cv_header_$ac_safe=yes"
4146 else
4147   echo "$ac_err" >&5
4148   echo "configure: failed program was:" >&5
4149   cat conftest.$ac_ext >&5
4150   rm -rf conftest*
4151   eval "ac_cv_header_$ac_safe=no"
4152 fi
4153 rm -f conftest*
4154 fi
4155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4156   echo "$ac_t""yes" 1>&6
4157     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4158   cat >> confdefs.h <<EOF
4159 #define $ac_tr_hdr 1
4160 EOF
4161  
4162 else
4163   echo "$ac_t""no" 1>&6
4164 fi
4165 done
4166
4167
4168
4169
4170
4171
4172 # Only perform the check for file, if the check method requires it
4173 case $deplibs_check_method in
4174 file_magic*)
4175   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4176     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4177 echo "configure:4178: checking for ${ac_tool_prefix}file" >&5
4178 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4179   echo $ac_n "(cached) $ac_c" 1>&6
4180 else
4181   case $MAGIC_CMD in
4182   /*)
4183   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4184   ;;
4185   ?:/*)
4186   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4187   ;;
4188   *)
4189   ac_save_MAGIC_CMD="$MAGIC_CMD"
4190   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4191   ac_dummy="/usr/bin:$PATH"
4192   for ac_dir in $ac_dummy; do
4193     test -z "$ac_dir" && ac_dir=.
4194     if test -f $ac_dir/${ac_tool_prefix}file; then
4195       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4196       if test -n "$file_magic_test_file"; then
4197         case $deplibs_check_method in
4198         "file_magic "*)
4199           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4200           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4201           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4202             egrep "$file_magic_regex" > /dev/null; then
4203             :
4204           else
4205             cat <<EOF 1>&2
4206
4207 *** Warning: the command libtool uses to detect shared libraries,
4208 *** $file_magic_cmd, produces output that libtool cannot recognize.
4209 *** The result is that libtool may fail to recognize shared libraries
4210 *** as such.  This will affect the creation of libtool libraries that
4211 *** depend on shared libraries, but programs linked with such libtool
4212 *** libraries will work regardless of this problem.  Nevertheless, you
4213 *** may want to report the problem to your system manager and/or to
4214 *** bug-libtool@gnu.org
4215
4216 EOF
4217           fi ;;
4218         esac
4219       fi
4220       break
4221     fi
4222   done
4223   IFS="$ac_save_ifs"
4224   MAGIC_CMD="$ac_save_MAGIC_CMD"
4225   ;;
4226 esac
4227 fi
4228
4229 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4230 if test -n "$MAGIC_CMD"; then
4231   echo "$ac_t""$MAGIC_CMD" 1>&6
4232 else
4233   echo "$ac_t""no" 1>&6
4234 fi
4235
4236 if test -z "$lt_cv_path_MAGIC_CMD"; then
4237   if test -n "$ac_tool_prefix"; then
4238     echo $ac_n "checking for file""... $ac_c" 1>&6
4239 echo "configure:4240: checking for file" >&5
4240 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   case $MAGIC_CMD in
4244   /*)
4245   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4246   ;;
4247   ?:/*)
4248   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4249   ;;
4250   *)
4251   ac_save_MAGIC_CMD="$MAGIC_CMD"
4252   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4253   ac_dummy="/usr/bin:$PATH"
4254   for ac_dir in $ac_dummy; do
4255     test -z "$ac_dir" && ac_dir=.
4256     if test -f $ac_dir/file; then
4257       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4258       if test -n "$file_magic_test_file"; then
4259         case $deplibs_check_method in
4260         "file_magic "*)
4261           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4262           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4263           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4264             egrep "$file_magic_regex" > /dev/null; then
4265             :
4266           else
4267             cat <<EOF 1>&2
4268
4269 *** Warning: the command libtool uses to detect shared libraries,
4270 *** $file_magic_cmd, produces output that libtool cannot recognize.
4271 *** The result is that libtool may fail to recognize shared libraries
4272 *** as such.  This will affect the creation of libtool libraries that
4273 *** depend on shared libraries, but programs linked with such libtool
4274 *** libraries will work regardless of this problem.  Nevertheless, you
4275 *** may want to report the problem to your system manager and/or to
4276 *** bug-libtool@gnu.org
4277
4278 EOF
4279           fi ;;
4280         esac
4281       fi
4282       break
4283     fi
4284   done
4285   IFS="$ac_save_ifs"
4286   MAGIC_CMD="$ac_save_MAGIC_CMD"
4287   ;;
4288 esac
4289 fi
4290
4291 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4292 if test -n "$MAGIC_CMD"; then
4293   echo "$ac_t""$MAGIC_CMD" 1>&6
4294 else
4295   echo "$ac_t""no" 1>&6
4296 fi
4297
4298   else
4299     MAGIC_CMD=:
4300   fi
4301 fi
4302
4303   fi
4304   ;;
4305 esac
4306
4307 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4308 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4309 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4310 echo "configure:4311: checking for $ac_word" >&5
4311 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4312   echo $ac_n "(cached) $ac_c" 1>&6
4313 else
4314   if test -n "$RANLIB"; then
4315   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4316 else
4317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4318   ac_dummy="$PATH"
4319   for ac_dir in $ac_dummy; do
4320     test -z "$ac_dir" && ac_dir=.
4321     if test -f $ac_dir/$ac_word; then
4322       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4323       break
4324     fi
4325   done
4326   IFS="$ac_save_ifs"
4327 fi
4328 fi
4329 RANLIB="$ac_cv_prog_RANLIB"
4330 if test -n "$RANLIB"; then
4331   echo "$ac_t""$RANLIB" 1>&6
4332 else
4333   echo "$ac_t""no" 1>&6
4334 fi
4335
4336
4337 if test -z "$ac_cv_prog_RANLIB"; then
4338 if test -n "$ac_tool_prefix"; then
4339   # Extract the first word of "ranlib", so it can be a program name with args.
4340 set dummy ranlib; ac_word=$2
4341 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4342 echo "configure:4343: checking for $ac_word" >&5
4343 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   if test -n "$RANLIB"; then
4347   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4348 else
4349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4350   ac_dummy="$PATH"
4351   for ac_dir in $ac_dummy; do
4352     test -z "$ac_dir" && ac_dir=.
4353     if test -f $ac_dir/$ac_word; then
4354       ac_cv_prog_RANLIB="ranlib"
4355       break
4356     fi
4357   done
4358   IFS="$ac_save_ifs"
4359   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4360 fi
4361 fi
4362 RANLIB="$ac_cv_prog_RANLIB"
4363 if test -n "$RANLIB"; then
4364   echo "$ac_t""$RANLIB" 1>&6
4365 else
4366   echo "$ac_t""no" 1>&6
4367 fi
4368
4369 else
4370   RANLIB=":"
4371 fi
4372 fi
4373
4374 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4375 set dummy ${ac_tool_prefix}strip; ac_word=$2
4376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4377 echo "configure:4378: checking for $ac_word" >&5
4378 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4379   echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381   if test -n "$STRIP"; then
4382   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4383 else
4384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4385   ac_dummy="$PATH"
4386   for ac_dir in $ac_dummy; do
4387     test -z "$ac_dir" && ac_dir=.
4388     if test -f $ac_dir/$ac_word; then
4389       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4390       break
4391     fi
4392   done
4393   IFS="$ac_save_ifs"
4394 fi
4395 fi
4396 STRIP="$ac_cv_prog_STRIP"
4397 if test -n "$STRIP"; then
4398   echo "$ac_t""$STRIP" 1>&6
4399 else
4400   echo "$ac_t""no" 1>&6
4401 fi
4402
4403
4404 if test -z "$ac_cv_prog_STRIP"; then
4405 if test -n "$ac_tool_prefix"; then
4406   # Extract the first word of "strip", so it can be a program name with args.
4407 set dummy strip; ac_word=$2
4408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4409 echo "configure:4410: checking for $ac_word" >&5
4410 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   if test -n "$STRIP"; then
4414   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4415 else
4416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4417   ac_dummy="$PATH"
4418   for ac_dir in $ac_dummy; do
4419     test -z "$ac_dir" && ac_dir=.
4420     if test -f $ac_dir/$ac_word; then
4421       ac_cv_prog_STRIP="strip"
4422       break
4423     fi
4424   done
4425   IFS="$ac_save_ifs"
4426   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4427 fi
4428 fi
4429 STRIP="$ac_cv_prog_STRIP"
4430 if test -n "$STRIP"; then
4431   echo "$ac_t""$STRIP" 1>&6
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436 else
4437   STRIP=":"
4438 fi
4439 fi
4440
4441
4442 enable_dlopen=yes
4443 enable_win32_dll=yes
4444
4445 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4446 if test "${enable_libtool_lock+set}" = set; then
4447   enableval="$enable_libtool_lock"
4448   :
4449 fi
4450
4451 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4452
4453 # Some flags need to be propagated to the compiler or linker for good
4454 # libtool support.
4455 case $host in
4456 *-*-irix6*)
4457   # Find out which ABI we are using.
4458   echo '#line 4459 "configure"' > conftest.$ac_ext
4459   if { (eval echo configure:4460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4460     case `/usr/bin/file conftest.$ac_objext` in
4461     *32-bit*)
4462       LD="${LD-ld} -32"
4463       ;;
4464     *N32*)
4465       LD="${LD-ld} -n32"
4466       ;;
4467     *64-bit*)
4468       LD="${LD-ld} -64"
4469       ;;
4470     esac
4471   fi
4472   rm -rf conftest*
4473   ;;
4474
4475 *-*-sco3.2v5*)
4476   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4477   SAVE_CFLAGS="$CFLAGS"
4478   CFLAGS="$CFLAGS -belf"
4479   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4480 echo "configure:4481: checking whether the C compiler needs -belf" >&5
4481 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   
4485      ac_ext=c
4486 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4487 ac_cpp='$CPP $CPPFLAGS'
4488 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4489 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4490 cross_compiling=$ac_cv_prog_cc_cross
4491
4492      cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495
4496 int main() {
4497
4498 ; return 0; }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4501   rm -rf conftest*
4502   lt_cv_cc_needs_belf=yes
4503 else
4504   echo "configure: failed program was:" >&5
4505   cat conftest.$ac_ext >&5
4506   rm -rf conftest*
4507   lt_cv_cc_needs_belf=no
4508 fi
4509 rm -f conftest*
4510      ac_ext=c
4511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4512 ac_cpp='$CPP $CPPFLAGS'
4513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4515 cross_compiling=$ac_cv_prog_cc_cross
4516
4517 fi
4518
4519 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4520   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4521     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4522     CFLAGS="$SAVE_CFLAGS"
4523   fi
4524   ;;
4525
4526 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4527   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4528 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4529 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4530 echo "configure:4531: checking for $ac_word" >&5
4531 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4532   echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534   if test -n "$DLLTOOL"; then
4535   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4536 else
4537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4538   ac_dummy="$PATH"
4539   for ac_dir in $ac_dummy; do
4540     test -z "$ac_dir" && ac_dir=.
4541     if test -f $ac_dir/$ac_word; then
4542       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4543       break
4544     fi
4545   done
4546   IFS="$ac_save_ifs"
4547 fi
4548 fi
4549 DLLTOOL="$ac_cv_prog_DLLTOOL"
4550 if test -n "$DLLTOOL"; then
4551   echo "$ac_t""$DLLTOOL" 1>&6
4552 else
4553   echo "$ac_t""no" 1>&6
4554 fi
4555
4556
4557 if test -z "$ac_cv_prog_DLLTOOL"; then
4558 if test -n "$ac_tool_prefix"; then
4559   # Extract the first word of "dlltool", so it can be a program name with args.
4560 set dummy dlltool; ac_word=$2
4561 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4562 echo "configure:4563: checking for $ac_word" >&5
4563 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4564   echo $ac_n "(cached) $ac_c" 1>&6
4565 else
4566   if test -n "$DLLTOOL"; then
4567   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4568 else
4569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4570   ac_dummy="$PATH"
4571   for ac_dir in $ac_dummy; do
4572     test -z "$ac_dir" && ac_dir=.
4573     if test -f $ac_dir/$ac_word; then
4574       ac_cv_prog_DLLTOOL="dlltool"
4575       break
4576     fi
4577   done
4578   IFS="$ac_save_ifs"
4579   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4580 fi
4581 fi
4582 DLLTOOL="$ac_cv_prog_DLLTOOL"
4583 if test -n "$DLLTOOL"; then
4584   echo "$ac_t""$DLLTOOL" 1>&6
4585 else
4586   echo "$ac_t""no" 1>&6
4587 fi
4588
4589 else
4590   DLLTOOL="false"
4591 fi
4592 fi
4593
4594   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4595 set dummy ${ac_tool_prefix}as; ac_word=$2
4596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4597 echo "configure:4598: checking for $ac_word" >&5
4598 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4599   echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601   if test -n "$AS"; then
4602   ac_cv_prog_AS="$AS" # Let the user override the test.
4603 else
4604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4605   ac_dummy="$PATH"
4606   for ac_dir in $ac_dummy; do
4607     test -z "$ac_dir" && ac_dir=.
4608     if test -f $ac_dir/$ac_word; then
4609       ac_cv_prog_AS="${ac_tool_prefix}as"
4610       break
4611     fi
4612   done
4613   IFS="$ac_save_ifs"
4614 fi
4615 fi
4616 AS="$ac_cv_prog_AS"
4617 if test -n "$AS"; then
4618   echo "$ac_t""$AS" 1>&6
4619 else
4620   echo "$ac_t""no" 1>&6
4621 fi
4622
4623
4624 if test -z "$ac_cv_prog_AS"; then
4625 if test -n "$ac_tool_prefix"; then
4626   # Extract the first word of "as", so it can be a program name with args.
4627 set dummy as; ac_word=$2
4628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4629 echo "configure:4630: checking for $ac_word" >&5
4630 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   if test -n "$AS"; then
4634   ac_cv_prog_AS="$AS" # Let the user override the test.
4635 else
4636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4637   ac_dummy="$PATH"
4638   for ac_dir in $ac_dummy; do
4639     test -z "$ac_dir" && ac_dir=.
4640     if test -f $ac_dir/$ac_word; then
4641       ac_cv_prog_AS="as"
4642       break
4643     fi
4644   done
4645   IFS="$ac_save_ifs"
4646   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4647 fi
4648 fi
4649 AS="$ac_cv_prog_AS"
4650 if test -n "$AS"; then
4651   echo "$ac_t""$AS" 1>&6
4652 else
4653   echo "$ac_t""no" 1>&6
4654 fi
4655
4656 else
4657   AS="false"
4658 fi
4659 fi
4660
4661   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4662 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4664 echo "configure:4665: checking for $ac_word" >&5
4665 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   if test -n "$OBJDUMP"; then
4669   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4670 else
4671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4672   ac_dummy="$PATH"
4673   for ac_dir in $ac_dummy; do
4674     test -z "$ac_dir" && ac_dir=.
4675     if test -f $ac_dir/$ac_word; then
4676       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4677       break
4678     fi
4679   done
4680   IFS="$ac_save_ifs"
4681 fi
4682 fi
4683 OBJDUMP="$ac_cv_prog_OBJDUMP"
4684 if test -n "$OBJDUMP"; then
4685   echo "$ac_t""$OBJDUMP" 1>&6
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689
4690
4691 if test -z "$ac_cv_prog_OBJDUMP"; then
4692 if test -n "$ac_tool_prefix"; then
4693   # Extract the first word of "objdump", so it can be a program name with args.
4694 set dummy objdump; ac_word=$2
4695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4696 echo "configure:4697: checking for $ac_word" >&5
4697 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4698   echo $ac_n "(cached) $ac_c" 1>&6
4699 else
4700   if test -n "$OBJDUMP"; then
4701   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4702 else
4703   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4704   ac_dummy="$PATH"
4705   for ac_dir in $ac_dummy; do
4706     test -z "$ac_dir" && ac_dir=.
4707     if test -f $ac_dir/$ac_word; then
4708       ac_cv_prog_OBJDUMP="objdump"
4709       break
4710     fi
4711   done
4712   IFS="$ac_save_ifs"
4713   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4714 fi
4715 fi
4716 OBJDUMP="$ac_cv_prog_OBJDUMP"
4717 if test -n "$OBJDUMP"; then
4718   echo "$ac_t""$OBJDUMP" 1>&6
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723 else
4724   OBJDUMP="false"
4725 fi
4726 fi
4727
4728
4729   # recent cygwin and mingw systems supply a stub DllMain which the user
4730   # can override, but on older systems we have to supply one
4731   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4732 echo "configure:4733: checking if libtool should supply DllMain function" >&5
4733 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739
4740 int main() {
4741 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4742       DllMain (0, 0, 0);
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   lt_cv_need_dllmain=no
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   lt_cv_need_dllmain=yes
4753 fi
4754 rm -f conftest*
4755 fi
4756
4757 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4758
4759   case $host/$CC in
4760   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4761     # old mingw systems require "-dll" to link a DLL, while more recent ones
4762     # require "-mdll"
4763     SAVE_CFLAGS="$CFLAGS"
4764     CFLAGS="$CFLAGS -mdll"
4765     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4766 echo "configure:4767: checking how to link DLLs" >&5
4767 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770   cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773
4774 int main() {
4775
4776 ; return 0; }
4777 EOF
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4779   rm -rf conftest*
4780   lt_cv_cc_dll_switch=-mdll
4781 else
4782   echo "configure: failed program was:" >&5
4783   cat conftest.$ac_ext >&5
4784   rm -rf conftest*
4785   lt_cv_cc_dll_switch=-dll
4786 fi
4787 rm -f conftest*
4788 fi
4789
4790 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4791     CFLAGS="$SAVE_CFLAGS" ;;
4792   *-*-cygwin* | *-*-pw32*)
4793     # cygwin systems need to pass --dll to the linker, and not link
4794     # crt.o which will require a WinMain@16 definition.
4795     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4796   esac
4797   ;;
4798   
4799 esac
4800
4801 # Sed substitution that helps us do robust quoting.  It backslashifies
4802 # metacharacters that are still active within double-quoted strings.
4803 Xsed='sed -e s/^X//'
4804 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4805
4806 # Same as above, but do not quote variable references.
4807 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4808
4809 # Sed substitution to delay expansion of an escaped shell variable in a
4810 # double_quote_subst'ed string.
4811 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4812
4813 # Constants:
4814 rm="rm -f"
4815
4816 # Global variables:
4817 default_ofile=libtool
4818 can_build_shared=yes
4819
4820 # All known linkers require a `.a' archive for static linking (except M$VC,
4821 # which needs '.lib').
4822 libext=a
4823 ltmain="$ac_aux_dir/ltmain.sh"
4824 ofile="$default_ofile"
4825 with_gnu_ld="$lt_cv_prog_gnu_ld"
4826 need_locks="$enable_libtool_lock"
4827
4828 old_CC="$CC"
4829 old_CFLAGS="$CFLAGS"
4830
4831 # Set sane defaults for various variables
4832 test -z "$AR" && AR=ar
4833 test -z "$AR_FLAGS" && AR_FLAGS=cru
4834 test -z "$AS" && AS=as
4835 test -z "$CC" && CC=cc
4836 test -z "$DLLTOOL" && DLLTOOL=dlltool
4837 test -z "$LD" && LD=ld
4838 test -z "$LN_S" && LN_S="ln -s"
4839 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4840 test -z "$NM" && NM=nm
4841 test -z "$OBJDUMP" && OBJDUMP=objdump
4842 test -z "$RANLIB" && RANLIB=:
4843 test -z "$STRIP" && STRIP=:
4844 test -z "$ac_objext" && ac_objext=o
4845
4846 if test x"$host" != x"$build"; then
4847   ac_tool_prefix=${host_alias}-
4848 else
4849   ac_tool_prefix=
4850 fi
4851
4852 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4853 case $host_os in
4854 linux-gnu*) ;;
4855 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4856 esac
4857
4858 case $host_os in
4859 aix3*)
4860   # AIX sometimes has problems with the GCC collect2 program.  For some
4861   # reason, if we set the COLLECT_NAMES environment variable, the problems
4862   # vanish in a puff of smoke.
4863   if test "X${COLLECT_NAMES+set}" != Xset; then
4864     COLLECT_NAMES=
4865     export COLLECT_NAMES
4866   fi
4867   ;;
4868 esac
4869
4870 # Determine commands to create old-style static archives.
4871 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4872 old_postinstall_cmds='chmod 644 $oldlib'
4873 old_postuninstall_cmds=
4874
4875 if test -n "$RANLIB"; then
4876   case $host_os in
4877   openbsd*)
4878     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4879     ;;
4880   *)
4881     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4882     ;;
4883   esac
4884   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4885 fi
4886
4887 # Allow CC to be a program name with arguments.
4888 set dummy $CC
4889 compiler="$2"
4890
4891 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4892 echo "configure:4893: checking for objdir" >&5
4893 rm -f .libs 2>/dev/null
4894 mkdir .libs 2>/dev/null
4895 if test -d .libs; then
4896   objdir=.libs
4897 else
4898   # MS-DOS does not allow filenames that begin with a dot.
4899   objdir=_libs
4900 fi
4901 rmdir .libs 2>/dev/null
4902 echo "$ac_t""$objdir" 1>&6
4903
4904
4905 # Check whether --with-pic or --without-pic was given.
4906 if test "${with_pic+set}" = set; then
4907   withval="$with_pic"
4908   pic_mode="$withval"
4909 else
4910   pic_mode=default
4911 fi
4912
4913 test -z "$pic_mode" && pic_mode=default
4914
4915 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4916 # in isolation, and that seeing it set (from the cache) indicates that
4917 # the associated values are set (in the cache) correctly too.
4918 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4919 echo "configure:4920: checking for $compiler option to produce PIC" >&5
4920 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4921   echo $ac_n "(cached) $ac_c" 1>&6
4922 else
4923    lt_cv_prog_cc_pic=
4924   lt_cv_prog_cc_shlib=
4925   lt_cv_prog_cc_wl=
4926   lt_cv_prog_cc_static=
4927   lt_cv_prog_cc_no_builtin=
4928   lt_cv_prog_cc_can_build_shared=$can_build_shared
4929
4930   if test "$GCC" = yes; then
4931     lt_cv_prog_cc_wl='-Wl,'
4932     lt_cv_prog_cc_static='-static'
4933
4934     case $host_os in
4935     aix*)
4936       # Below there is a dirty hack to force normal static linking with -ldl
4937       # The problem is because libdl dynamically linked with both libc and
4938       # libC (AIX C++ library), which obviously doesn't included in libraries
4939       # list by gcc. This cause undefined symbols with -static flags.
4940       # This hack allows C programs to be linked with "-static -ldl", but
4941       # not sure about C++ programs.
4942       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4943       ;;
4944     amigaos*)
4945       # FIXME: we need at least 68020 code to build shared libraries, but
4946       # adding the `-m68020' flag to GCC prevents building anything better,
4947       # like `-m68040'.
4948       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4949       ;;
4950     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4951       # PIC is the default for these OSes.
4952       ;;
4953     darwin* | rhapsody*)
4954       # PIC is the default on this platform
4955       # Common symbols not allowed in MH_DYLIB files
4956       lt_cv_prog_cc_pic='-fno-common'
4957       ;;
4958     cygwin* | mingw* | pw32* | os2*)
4959       # This hack is so that the source file can tell whether it is being
4960       # built for inclusion in a dll (and should export symbols for example).
4961       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4962       ;;
4963     sysv4*MP*)
4964       if test -d /usr/nec; then
4965          lt_cv_prog_cc_pic=-Kconform_pic
4966       fi
4967       ;;
4968     *)
4969       lt_cv_prog_cc_pic='-fPIC'
4970       ;;
4971     esac
4972   else
4973     # PORTME Check for PIC flags for the system compiler.
4974     case $host_os in
4975     aix3* | aix4* | aix5*)
4976       lt_cv_prog_cc_wl='-Wl,'
4977       # All AIX code is PIC.
4978       if test "$host_cpu" = ia64; then
4979         # AIX 5 now supports IA64 processor
4980         lt_cv_prog_cc_static='-Bstatic'
4981       else
4982         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4983       fi
4984       ;;
4985
4986     hpux9* | hpux10* | hpux11*)
4987       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4988       lt_cv_prog_cc_wl='-Wl,'
4989       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4990       lt_cv_prog_cc_pic='+Z'
4991       ;;
4992
4993     irix5* | irix6* | nonstopux*)
4994       lt_cv_prog_cc_wl='-Wl,'
4995       lt_cv_prog_cc_static='-non_shared'
4996       # PIC (with -KPIC) is the default.
4997       ;;
4998
4999     cygwin* | mingw* | pw32* | os2*)
5000       # This hack is so that the source file can tell whether it is being
5001       # built for inclusion in a dll (and should export symbols for example).
5002       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5003       ;;
5004
5005     newsos6)
5006       lt_cv_prog_cc_pic='-KPIC'
5007       lt_cv_prog_cc_static='-Bstatic'
5008       ;;
5009     
5010     openedition)
5011       # XPLINK code is PIC by default
5012       ;;
5013
5014     osf3* | osf4* | osf5*)
5015       # All OSF/1 code is PIC.
5016       lt_cv_prog_cc_wl='-Wl,'
5017       lt_cv_prog_cc_static='-non_shared'
5018       ;;
5019
5020     sco3.2v5*)
5021       lt_cv_prog_cc_pic='-Kpic'
5022       lt_cv_prog_cc_static='-dn'
5023       lt_cv_prog_cc_shlib='-belf'
5024       ;;
5025
5026     solaris*)
5027       lt_cv_prog_cc_pic='-KPIC'
5028       lt_cv_prog_cc_static='-Bstatic'
5029       lt_cv_prog_cc_wl='-Wl,'
5030       ;;
5031
5032     sunos4*)
5033       lt_cv_prog_cc_pic='-PIC'
5034       lt_cv_prog_cc_static='-Bstatic'
5035       lt_cv_prog_cc_wl='-Qoption ld '
5036       ;;
5037
5038     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5039       lt_cv_prog_cc_pic='-KPIC'
5040       lt_cv_prog_cc_static='-Bstatic'
5041       lt_cv_prog_cc_wl='-Wl,'
5042       ;;
5043
5044     uts4*)
5045       lt_cv_prog_cc_pic='-pic'
5046       lt_cv_prog_cc_static='-Bstatic'
5047       ;;
5048
5049     sysv4*MP*)
5050       if test -d /usr/nec ;then
5051         lt_cv_prog_cc_pic='-Kconform_pic'
5052         lt_cv_prog_cc_static='-Bstatic'
5053       fi
5054       ;;
5055
5056     *)
5057       lt_cv_prog_cc_can_build_shared=no
5058       ;;
5059     esac
5060   fi
5061
5062 fi
5063
5064 if test -z "$lt_cv_prog_cc_pic"; then
5065   echo "$ac_t""none" 1>&6
5066 else
5067   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5068
5069   # Check to make sure the pic_flag actually works.
5070   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5071 echo "configure:5072: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5072   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5073   echo $ac_n "(cached) $ac_c" 1>&6
5074 else
5075       save_CFLAGS="$CFLAGS"
5076     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5077     cat > conftest.$ac_ext <<EOF
5078 #line 5079 "configure"
5079 #include "confdefs.h"
5080
5081 int main() {
5082
5083 ; return 0; }
5084 EOF
5085 if { (eval echo configure:5086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5086   rm -rf conftest*
5087         case $host_os in
5088       hpux9* | hpux10* | hpux11*)
5089         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5090         # they create non-PIC objects.  So, if there were any warnings, we
5091         # assume that PIC is not supported.
5092         if test -s conftest.err; then
5093           lt_cv_prog_cc_pic_works=no
5094         else
5095           lt_cv_prog_cc_pic_works=yes
5096         fi
5097         ;;
5098       *)
5099         lt_cv_prog_cc_pic_works=yes
5100         ;;
5101       esac
5102     
5103 else
5104   echo "configure: failed program was:" >&5
5105   cat conftest.$ac_ext >&5
5106   rm -rf conftest*
5107         lt_cv_prog_cc_pic_works=no
5108     
5109 fi
5110 rm -f conftest*
5111     CFLAGS="$save_CFLAGS"
5112   
5113 fi
5114
5115
5116   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5117     lt_cv_prog_cc_pic=
5118     lt_cv_prog_cc_can_build_shared=no
5119   else
5120     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5121   fi
5122
5123   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5124 fi
5125
5126 # Check for any special shared library compilation flags.
5127 if test -n "$lt_cv_prog_cc_shlib"; then
5128   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5129   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5130   else
5131    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5132     lt_cv_prog_cc_can_build_shared=no
5133   fi
5134 fi
5135
5136 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5137 echo "configure:5138: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5138 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5139   echo $ac_n "(cached) $ac_c" 1>&6
5140 else
5141     lt_cv_prog_cc_static_works=no
5142   save_LDFLAGS="$LDFLAGS"
5143   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5144   cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147
5148 int main() {
5149
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   lt_cv_prog_cc_static_works=yes
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158 fi
5159 rm -f conftest*
5160   LDFLAGS="$save_LDFLAGS"
5161
5162 fi
5163
5164
5165 # Belt *and* braces to stop my trousers falling down:
5166 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5167 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5168
5169 pic_flag="$lt_cv_prog_cc_pic"
5170 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5171 wl="$lt_cv_prog_cc_wl"
5172 link_static_flag="$lt_cv_prog_cc_static"
5173 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5174 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5175
5176
5177 # Check to see if options -o and -c are simultaneously supported by compiler
5178 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5179 echo "configure:5180: checking if $compiler supports -c -o file.$ac_objext" >&5
5180 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5181   echo $ac_n "(cached) $ac_c" 1>&6
5182 else
5183   
5184 $rm -r conftest 2>/dev/null
5185 mkdir conftest
5186 cd conftest
5187 echo "int some_variable = 0;" > conftest.$ac_ext
5188 mkdir out
5189 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5190 # that will create temporary files in the current directory regardless of
5191 # the output directory.  Thus, making CWD read-only will cause this test
5192 # to fail, enabling locking or at least warning the user not to do parallel
5193 # builds.
5194 chmod -w .
5195 save_CFLAGS="$CFLAGS"
5196 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5197 compiler_c_o=no
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5199   # The compiler can only warn and ignore the option if not recognized
5200   # So say no if there are warnings
5201   if test -s out/conftest.err; then
5202     lt_cv_compiler_c_o=no
5203   else
5204     lt_cv_compiler_c_o=yes
5205   fi
5206 else
5207   # Append any errors to the config.log.
5208   cat out/conftest.err 1>&5
5209   lt_cv_compiler_c_o=no
5210 fi
5211 CFLAGS="$save_CFLAGS"
5212 chmod u+w .
5213 $rm conftest* out/*
5214 rmdir out
5215 cd ..
5216 rmdir conftest
5217 $rm -r conftest 2>/dev/null
5218
5219 fi
5220
5221 compiler_c_o=$lt_cv_compiler_c_o
5222 echo "$ac_t""$compiler_c_o" 1>&6
5223
5224 if test x"$compiler_c_o" = x"yes"; then
5225   # Check to see if we can write to a .lo
5226   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5227 echo "configure:5228: checking if $compiler supports -c -o file.lo" >&5
5228   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   
5232   lt_cv_compiler_o_lo=no
5233   save_CFLAGS="$CFLAGS"
5234   CFLAGS="$CFLAGS -c -o conftest.lo"
5235   save_objext="$ac_objext"
5236   ac_objext=lo
5237   cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240
5241 int main() {
5242 int some_variable = 0;
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5246   rm -rf conftest*
5247       # The compiler can only warn and ignore the option if not recognized
5248     # So say no if there are warnings
5249     if test -s conftest.err; then
5250       lt_cv_compiler_o_lo=no
5251     else
5252       lt_cv_compiler_o_lo=yes
5253     fi
5254   
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258 fi
5259 rm -f conftest*
5260   ac_objext="$save_objext"
5261   CFLAGS="$save_CFLAGS"
5262   
5263 fi
5264
5265   compiler_o_lo=$lt_cv_compiler_o_lo
5266   echo "$ac_t""$compiler_o_lo" 1>&6
5267 else
5268   compiler_o_lo=no
5269 fi
5270
5271 # Check to see if we can do hard links to lock some files if needed
5272 hard_links="nottested"
5273 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5274   # do not overwrite the value of need_locks provided by the user
5275   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5276 echo "configure:5277: checking if we can lock with hard links" >&5
5277   hard_links=yes
5278   $rm conftest*
5279   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5280   touch conftest.a
5281   ln conftest.a conftest.b 2>&5 || hard_links=no
5282   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5283   echo "$ac_t""$hard_links" 1>&6
5284   if test "$hard_links" = no; then
5285     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5286     need_locks=warn
5287   fi
5288 else
5289   need_locks=no
5290 fi
5291
5292 if test "$GCC" = yes; then
5293   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5294   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5295 echo "configure:5296: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5296   echo "int some_variable = 0;" > conftest.$ac_ext
5297   save_CFLAGS="$CFLAGS"
5298   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5299   compiler_rtti_exceptions=no
5300   cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303
5304 int main() {
5305 int some_variable = 0;
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5309   rm -rf conftest*
5310       # The compiler can only warn and ignore the option if not recognized
5311     # So say no if there are warnings
5312     if test -s conftest.err; then
5313       compiler_rtti_exceptions=no
5314     else
5315       compiler_rtti_exceptions=yes
5316     fi
5317   
5318 else
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321 fi
5322 rm -f conftest*
5323   CFLAGS="$save_CFLAGS"
5324   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5325
5326   if test "$compiler_rtti_exceptions" = "yes"; then
5327     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5328   else
5329     no_builtin_flag=' -fno-builtin'
5330   fi
5331 fi
5332
5333 # See if the linker supports building shared libraries.
5334 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5335 echo "configure:5336: checking whether the linker ($LD) supports shared libraries" >&5
5336
5337 allow_undefined_flag=
5338 no_undefined_flag=
5339 need_lib_prefix=unknown
5340 need_version=unknown
5341 # when you set need_version to no, make sure it does not cause -set_version
5342 # flags to be left without arguments
5343 archive_cmds=
5344 archive_expsym_cmds=
5345 old_archive_from_new_cmds=
5346 old_archive_from_expsyms_cmds=
5347 export_dynamic_flag_spec=
5348 whole_archive_flag_spec=
5349 thread_safe_flag_spec=
5350 hardcode_into_libs=no
5351 hardcode_libdir_flag_spec=
5352 hardcode_libdir_separator=
5353 hardcode_direct=no
5354 hardcode_minus_L=no
5355 hardcode_shlibpath_var=unsupported
5356 runpath_var=
5357 link_all_deplibs=unknown
5358 always_export_symbols=no
5359 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5360 # include_expsyms should be a list of space-separated symbols to be *always*
5361 # included in the symbol list
5362 include_expsyms=
5363 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5364 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5365 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5366 # as well as any symbol that contains `d'.
5367 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5368 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5369 # platforms (ab)use it in PIC code, but their linkers get confused if
5370 # the symbol is explicitly referenced.  Since portable code cannot
5371 # rely on this symbol name, it's probably fine to never include it in
5372 # preloaded symbol tables.
5373 extract_expsyms_cmds=
5374
5375 case $host_os in
5376 cygwin* | mingw* | pw32*)
5377   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5378   # When not using gcc, we currently assume that we are using
5379   # Microsoft Visual C++.
5380   if test "$GCC" != yes; then
5381     with_gnu_ld=no
5382   fi
5383   ;;
5384 openbsd*)
5385   with_gnu_ld=no
5386   ;;
5387 esac
5388
5389 ld_shlibs=yes
5390 if test "$with_gnu_ld" = yes; then
5391   # If archive_cmds runs LD, not CC, wlarc should be empty
5392   wlarc='${wl}'
5393
5394   # See if GNU ld supports shared libraries.
5395   case $host_os in
5396   aix3* | aix4* | aix5*)
5397     # On AIX, the GNU linker is very broken
5398     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5399     ld_shlibs=no
5400     cat <<EOF 1>&2
5401
5402 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5403 *** to be unable to reliably create shared libraries on AIX.
5404 *** Therefore, libtool is disabling shared libraries support.  If you
5405 *** really care for shared libraries, you may want to modify your PATH
5406 *** so that a non-GNU linker is found, and then restart.
5407
5408 EOF
5409     ;;
5410
5411   amigaos*)
5412     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)'
5413     hardcode_libdir_flag_spec='-L$libdir'
5414     hardcode_minus_L=yes
5415
5416     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5417     # that the semantics of dynamic libraries on AmigaOS, at least up
5418     # to version 4, is to share data among multiple programs linked
5419     # with the same dynamic library.  Since this doesn't match the
5420     # behavior of shared libraries on other platforms, we can use
5421     # them.
5422     ld_shlibs=no
5423     ;;
5424
5425   beos*)
5426     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5427       allow_undefined_flag=unsupported
5428       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5429       # support --undefined.  This deserves some investigation.  FIXME
5430       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5431     else
5432       ld_shlibs=no
5433     fi
5434     ;;
5435
5436   cygwin* | mingw* | pw32*)
5437     # hardcode_libdir_flag_spec is actually meaningless, as there is
5438     # no search path for DLLs.
5439     hardcode_libdir_flag_spec='-L$libdir'
5440     allow_undefined_flag=unsupported
5441     always_export_symbols=yes
5442
5443     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5444       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5445       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5446       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5447       else $CC -o impgen impgen.c ; fi)~
5448       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5449
5450     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5451
5452     # cygwin and mingw dlls have different entry points and sets of symbols
5453     # to exclude.
5454     # FIXME: what about values for MSVC?
5455     dll_entry=__cygwin_dll_entry@12
5456     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5457     case $host_os in
5458     mingw*)
5459       # mingw values
5460       dll_entry=_DllMainCRTStartup@12
5461       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5462       ;;
5463     esac
5464
5465     # mingw and cygwin differ, and it's simplest to just exclude the union
5466     # of the two symbol sets.
5467     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5468
5469     # recent cygwin and mingw systems supply a stub DllMain which the user
5470     # can override, but on older systems we have to supply one (in ltdll.c)
5471     if test "x$lt_cv_need_dllmain" = "xyes"; then
5472       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5473       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~
5474         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5475     else
5476       ltdll_obj=
5477       ltdll_cmds=
5478     fi
5479
5480     # Extract the symbol export list from an `--export-all' def file,
5481     # then regenerate the def file from the symbol export list, so that
5482     # the compiled dll only exports the symbol export list.
5483     # Be careful not to strip the DATA tag left be newer dlltools.
5484     export_symbols_cmds="$ltdll_cmds"'
5485       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5486       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5487
5488     # If the export-symbols file already is a .def file (1st line
5489     # is EXPORTS), use it as is.
5490     # If DATA tags from a recent dlltool are present, honour them!
5491     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5492         cp $export_symbols $output_objdir/$soname-def;
5493       else
5494         echo EXPORTS > $output_objdir/$soname-def;
5495         _lt_hint=1;
5496         cat $export_symbols | while read symbol; do
5497          set dummy \$symbol;
5498          case \$# in
5499            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5500            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5501            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5502          esac;
5503          _lt_hint=`expr 1 + \$_lt_hint`;
5504         done;
5505       fi~
5506       '"$ltdll_cmds"'
5507       $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~
5508       $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~
5509       $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~
5510       $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~
5511       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5512     ;;
5513
5514   netbsd*)
5515     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5516       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5517       wlarc=
5518     else
5519       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5520       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5521     fi
5522     ;;
5523
5524   solaris* | sysv5*)
5525     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5526       ld_shlibs=no
5527       cat <<EOF 1>&2
5528
5529 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5530 *** create shared libraries on Solaris systems.  Therefore, libtool
5531 *** is disabling shared libraries support.  We urge you to upgrade GNU
5532 *** binutils to release 2.9.1 or newer.  Another option is to modify
5533 *** your PATH or compiler configuration so that the native linker is
5534 *** used, and then restart.
5535
5536 EOF
5537     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5538       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5539       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5540     else
5541       ld_shlibs=no
5542     fi
5543     ;;
5544
5545   sunos4*)
5546     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5547     wlarc=
5548     hardcode_direct=yes
5549     hardcode_shlibpath_var=no
5550     ;;
5551
5552   *)
5553     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5554       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5555       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5556     else
5557       ld_shlibs=no
5558     fi
5559     ;;
5560   esac
5561
5562   if test "$ld_shlibs" = yes; then
5563     runpath_var=LD_RUN_PATH
5564     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5565     export_dynamic_flag_spec='${wl}--export-dynamic'
5566     case $host_os in
5567     cygwin* | mingw* | pw32*)
5568       # dlltool doesn't understand --whole-archive et. al.
5569       whole_archive_flag_spec=
5570       ;;
5571     *)
5572       # ancient GNU ld didn't support --whole-archive et. al.
5573       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5574         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5575       else
5576         whole_archive_flag_spec=
5577       fi
5578       ;;
5579     esac
5580   fi
5581 else
5582   # PORTME fill in a description of your system's linker (not GNU ld)
5583   case $host_os in
5584   aix3*)
5585     allow_undefined_flag=unsupported
5586     always_export_symbols=yes
5587     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'
5588     # Note: this linker hardcodes the directories in LIBPATH if there
5589     # are no directories specified by -L.
5590     hardcode_minus_L=yes
5591     if test "$GCC" = yes && test -z "$link_static_flag"; then
5592       # Neither direct hardcoding nor static linking is supported with a
5593       # broken collect2.
5594       hardcode_direct=unsupported
5595     fi
5596     ;;
5597
5598   aix4* | aix5*)
5599     if test "$host_cpu" = ia64; then
5600       # On IA64, the linker does run time linking by default, so we don't
5601       # have to do anything special.
5602       aix_use_runtimelinking=no
5603       exp_sym_flag='-Bexport'
5604       no_entry_flag=""
5605     else
5606       aix_use_runtimelinking=no
5607
5608       # Test if we are trying to use run time linking or normal
5609       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5610       # need to do runtime linking.
5611       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5612         for ld_flag in $LDFLAGS; do
5613           case $ld_flag in
5614           *-brtl*)
5615             aix_use_runtimelinking=yes
5616             break
5617           ;;
5618           esac
5619         done
5620       esac
5621
5622       exp_sym_flag='-bexport'
5623       no_entry_flag='-bnoentry'
5624     fi
5625
5626     # When large executables or shared objects are built, AIX ld can
5627     # have problems creating the table of contents.  If linking a library
5628     # or program results in "error TOC overflow" add -mminimal-toc to
5629     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5630     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5631
5632     hardcode_direct=yes
5633     archive_cmds=''
5634     hardcode_libdir_separator=':'
5635     if test "$GCC" = yes; then
5636       case $host_os in aix4.[012]|aix4.[012].*)
5637         collect2name=`${CC} -print-prog-name=collect2`
5638         if test -f "$collect2name" && \
5639           strings "$collect2name" | grep resolve_lib_name >/dev/null
5640         then
5641           # We have reworked collect2
5642           hardcode_direct=yes
5643         else
5644           # We have old collect2
5645           hardcode_direct=unsupported
5646           # It fails to find uninstalled libraries when the uninstalled
5647           # path is not listed in the libpath.  Setting hardcode_minus_L
5648           # to unsupported forces relinking
5649           hardcode_minus_L=yes
5650           hardcode_libdir_flag_spec='-L$libdir'
5651           hardcode_libdir_separator=
5652         fi
5653       esac
5654
5655       shared_flag='-shared'
5656     else
5657       # not using gcc
5658       if test "$host_cpu" = ia64; then
5659         shared_flag='${wl}-G'
5660       else
5661         if test "$aix_use_runtimelinking" = yes; then
5662           shared_flag='${wl}-G'
5663         else
5664           shared_flag='${wl}-bM:SRE'
5665         fi
5666       fi
5667     fi
5668
5669     # It seems that -bexpall can do strange things, so it is better to
5670     # generate a list of symbols to export.
5671     always_export_symbols=yes
5672     if test "$aix_use_runtimelinking" = yes; then
5673       # Warning - without using the other runtime loading flags (-brtl),
5674       # -berok will link without error, but may produce a broken library.
5675       allow_undefined_flag='-berok'
5676       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5677       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"
5678     else
5679       if test "$host_cpu" = ia64; then
5680         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5681         allow_undefined_flag="-z nodefs"
5682         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"
5683       else
5684         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5685         # Warning - without using the other run time loading flags,
5686         # -berok will link without error, but may produce a broken library.
5687         allow_undefined_flag='${wl}-berok'
5688         # This is a bit strange, but is similar to how AIX traditionally builds
5689         # it's shared libraries.
5690         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'
5691       fi
5692     fi
5693     ;;
5694
5695   amigaos*)
5696     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)'
5697     hardcode_libdir_flag_spec='-L$libdir'
5698     hardcode_minus_L=yes
5699     # see comment about different semantics on the GNU ld section
5700     ld_shlibs=no
5701     ;;
5702
5703   cygwin* | mingw* | pw32*)
5704     # When not using gcc, we currently assume that we are using
5705     # Microsoft Visual C++.
5706     # hardcode_libdir_flag_spec is actually meaningless, as there is
5707     # no search path for DLLs.
5708     hardcode_libdir_flag_spec=' '
5709     allow_undefined_flag=unsupported
5710     # Tell ltmain to make .lib files, not .a files.
5711     libext=lib
5712     # FIXME: Setting linknames here is a bad hack.
5713     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5714     # The linker will automatically build a .lib file if we build a DLL.
5715     old_archive_from_new_cmds='true'
5716     # FIXME: Should let the user specify the lib program.
5717     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5718     fix_srcfile_path='`cygpath -w "$srcfile"`'
5719     ;;
5720
5721   darwin* | rhapsody*)
5722     case "$host_os" in
5723     rhapsody* | darwin1.[012])
5724       allow_undefined_flag='-undefined suppress'
5725       ;;
5726     *) # Darwin 1.3 on
5727       allow_undefined_flag='-flat_namespace -undefined suppress'
5728       ;;
5729     esac
5730     # FIXME: Relying on posixy $() will cause problems for
5731     #        cross-compilation, but unfortunately the echo tests do not
5732     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5733     #        `"' quotes if we put them in here... so don't!
5734     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)'
5735     # We need to add '_' to the symbols in $export_symbols first
5736     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5737     hardcode_direct=yes
5738     hardcode_shlibpath_var=no
5739     whole_archive_flag_spec='-all_load $convenience'
5740     ;;
5741
5742   freebsd1*)
5743     ld_shlibs=no
5744     ;;
5745
5746   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5747   # support.  Future versions do this automatically, but an explicit c++rt0.o
5748   # does not break anything, and helps significantly (at the cost of a little
5749   # extra space).
5750   freebsd2.2*)
5751     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5752     hardcode_libdir_flag_spec='-R$libdir'
5753     hardcode_direct=yes
5754     hardcode_shlibpath_var=no
5755     ;;
5756
5757   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5758   freebsd2*)
5759     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5760     hardcode_direct=yes
5761     hardcode_minus_L=yes
5762     hardcode_shlibpath_var=no
5763     ;;
5764
5765   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5766   freebsd*)
5767     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5768     hardcode_libdir_flag_spec='-R$libdir'
5769     hardcode_direct=yes
5770     hardcode_shlibpath_var=no
5771     ;;
5772
5773   hpux9* | hpux10* | hpux11*)
5774     case $host_os in
5775     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' ;;
5776     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5777     esac
5778     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5779     hardcode_libdir_separator=:
5780     hardcode_direct=yes
5781     hardcode_minus_L=yes # Not in the search PATH, but as the default
5782                          # location of the library.
5783     export_dynamic_flag_spec='${wl}-E'
5784     ;;
5785
5786   irix5* | irix6* | nonstopux*)
5787     if test "$GCC" = yes; then
5788       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'
5789       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5790     else
5791       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'
5792       hardcode_libdir_flag_spec='-rpath $libdir'
5793     fi
5794     hardcode_libdir_separator=:
5795     link_all_deplibs=yes
5796     ;;
5797
5798   netbsd*)
5799     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5800       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5801     else
5802       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5803     fi
5804     hardcode_libdir_flag_spec='-R$libdir'
5805     hardcode_direct=yes
5806     hardcode_shlibpath_var=no
5807     ;;
5808
5809   newsos6)
5810     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5811     hardcode_direct=yes
5812     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5813     hardcode_libdir_separator=:
5814     hardcode_shlibpath_var=no
5815     ;;
5816
5817   openbsd*)
5818     hardcode_direct=yes
5819     hardcode_shlibpath_var=no
5820     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5821       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5822       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5823       export_dynamic_flag_spec='${wl}-E'
5824     else
5825       case "$host_os" in
5826       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5827         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5828         hardcode_libdir_flag_spec='-R$libdir'
5829         ;;
5830       *)
5831         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5832         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5833         ;;
5834       esac
5835     fi
5836     ;;
5837
5838   openedition*)
5839     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5840         cp \$linknames \$output_objdir && linknames=''"
5841     export_dynamic_flag_spec="-Wl,DLL"
5842     ;;
5843
5844   os2*)
5845     hardcode_libdir_flag_spec='-L$libdir'
5846     hardcode_minus_L=yes
5847     allow_undefined_flag=unsupported
5848     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'
5849     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5850     ;;
5851
5852   osf3*)
5853     if test "$GCC" = yes; then
5854       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5855       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'
5856     else
5857       allow_undefined_flag=' -expect_unresolved \*'
5858       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'
5859     fi
5860     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     hardcode_libdir_separator=:
5862     ;;
5863
5864   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5865     if test "$GCC" = yes; then
5866       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5867       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'
5868       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5869     else
5870       allow_undefined_flag=' -expect_unresolved \*'
5871       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'
5872       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5873       $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'
5874
5875       #Both c and cxx compiler support -rpath directly
5876       hardcode_libdir_flag_spec='-rpath $libdir'
5877     fi
5878     hardcode_libdir_separator=:
5879     ;;
5880
5881   sco3.2v5*)
5882     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5883     hardcode_shlibpath_var=no
5884     runpath_var=LD_RUN_PATH
5885     hardcode_runpath_var=yes
5886     export_dynamic_flag_spec='${wl}-Bexport'
5887     ;;
5888
5889   solaris*)
5890     # gcc --version < 3.0 without binutils cannot create self contained
5891     # shared libraries reliably, requiring libgcc.a to resolve some of
5892     # the object symbols generated in some cases.  Libraries that use
5893     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5894     # a copy of libgcc.a into every shared library to guarantee resolving
5895     # such symbols causes other problems:  According to Tim Van Holder
5896     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5897     # (to the application) exception stack for one thing.
5898     no_undefined_flag=' -z defs'
5899     if test "$GCC" = yes; then
5900       case `$CC --version 2>/dev/null` in
5901       [12].*)
5902         cat <<EOF 1>&2
5903
5904 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5905 *** create self contained shared libraries on Solaris systems, without
5906 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5907 *** -no-undefined support, which will at least allow you to build shared
5908 *** libraries.  However, you may find that when you link such libraries
5909 *** into an application without using GCC, you have to manually add
5910 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5911 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5912 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5913
5914 EOF
5915         no_undefined_flag=
5916         ;;
5917       esac
5918     fi
5919     # $CC -shared without GNU ld will not create a library from C++
5920     # object files and a static libstdc++, better avoid it by now
5921     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5922     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5923                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5924     hardcode_libdir_flag_spec='-R$libdir'
5925     hardcode_shlibpath_var=no
5926     case $host_os in
5927     solaris2.[0-5] | solaris2.[0-5].*) ;;
5928     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5929       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5930     esac
5931     link_all_deplibs=yes
5932     ;;
5933
5934   sunos4*)
5935     if test "x$host_vendor" = xsequent; then
5936       # Use $CC to link under sequent, because it throws in some extra .o
5937       # files that make .init and .fini sections work.
5938       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5939     else
5940       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5941     fi
5942     hardcode_libdir_flag_spec='-L$libdir'
5943     hardcode_direct=yes
5944     hardcode_minus_L=yes
5945     hardcode_shlibpath_var=no
5946     ;;
5947
5948   sysv4)
5949     case $host_vendor in
5950       sni)
5951         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5952         hardcode_direct=yes # is this really true???
5953         ;;
5954       siemens)
5955         ## LD is ld it makes a PLAMLIB
5956         ## CC just makes a GrossModule.
5957         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5958         reload_cmds='$CC -r -o $output$reload_objs'
5959         hardcode_direct=no
5960         ;;
5961       motorola)
5962         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5963         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5964         ;;
5965     esac
5966     runpath_var='LD_RUN_PATH'
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   sysv4.3*)
5971     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5972     hardcode_shlibpath_var=no
5973     export_dynamic_flag_spec='-Bexport'
5974     ;;
5975
5976   sysv5*)
5977     no_undefined_flag=' -z text'
5978     # $CC -shared without GNU ld will not create a library from C++
5979     # object files and a static libstdc++, better avoid it by now
5980     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5982                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5983     hardcode_libdir_flag_spec=
5984     hardcode_shlibpath_var=no
5985     runpath_var='LD_RUN_PATH'
5986     ;;
5987
5988   uts4*)
5989     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990     hardcode_libdir_flag_spec='-L$libdir'
5991     hardcode_shlibpath_var=no
5992     ;;
5993
5994   dgux*)
5995     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5996     hardcode_libdir_flag_spec='-L$libdir'
5997     hardcode_shlibpath_var=no
5998     ;;
5999
6000   sysv4*MP*)
6001     if test -d /usr/nec; then
6002       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6003       hardcode_shlibpath_var=no
6004       runpath_var=LD_RUN_PATH
6005       hardcode_runpath_var=yes
6006       ld_shlibs=yes
6007     fi
6008     ;;
6009
6010   sysv4.2uw2*)
6011     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6012     hardcode_direct=yes
6013     hardcode_minus_L=no
6014     hardcode_shlibpath_var=no
6015     hardcode_runpath_var=yes
6016     runpath_var=LD_RUN_PATH
6017     ;;
6018
6019   sysv5uw7* | unixware7*)
6020     no_undefined_flag='${wl}-z ${wl}text'
6021     if test "$GCC" = yes; then
6022       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6023     else
6024       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6025     fi
6026     runpath_var='LD_RUN_PATH'
6027     hardcode_shlibpath_var=no
6028     ;;
6029
6030   *)
6031     ld_shlibs=no
6032     ;;
6033   esac
6034 fi
6035 echo "$ac_t""$ld_shlibs" 1>&6
6036 test "$ld_shlibs" = no && can_build_shared=no
6037
6038 # Check hardcoding attributes.
6039 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6040 echo "configure:6041: checking how to hardcode library paths into programs" >&5
6041 hardcode_action=
6042 if test -n "$hardcode_libdir_flag_spec" || \
6043    test -n "$runpath_var"; then
6044
6045   # We can hardcode non-existant directories.
6046   if test "$hardcode_direct" != no &&
6047      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6048      # have to relink, otherwise we might link with an installed library
6049      # when we should be linking with a yet-to-be-installed one
6050      ## test "$hardcode_shlibpath_var" != no &&
6051      test "$hardcode_minus_L" != no; then
6052     # Linking always hardcodes the temporary library directory.
6053     hardcode_action=relink
6054   else
6055     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6056     hardcode_action=immediate
6057   fi
6058 else
6059   # We cannot hardcode anything, or else we can only hardcode existing
6060   # directories.
6061   hardcode_action=unsupported
6062 fi
6063 echo "$ac_t""$hardcode_action" 1>&6
6064
6065 striplib=
6066 old_striplib=
6067 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6068 echo "configure:6069: checking whether stripping libraries is possible" >&5
6069 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6070   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6071   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6072   echo "$ac_t""yes" 1>&6
6073 else
6074   echo "$ac_t""no" 1>&6
6075 fi
6076
6077 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6078 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6079
6080 # PORTME Fill in your ld.so characteristics
6081 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6082 echo "configure:6083: checking dynamic linker characteristics" >&5
6083 library_names_spec=
6084 libname_spec='lib$name'
6085 soname_spec=
6086 postinstall_cmds=
6087 postuninstall_cmds=
6088 finish_cmds=
6089 finish_eval=
6090 shlibpath_var=
6091 shlibpath_overrides_runpath=unknown
6092 version_type=none
6093 dynamic_linker="$host_os ld.so"
6094 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6095 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6096
6097 case $host_os in
6098 aix3*)
6099   version_type=linux
6100   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6101   shlibpath_var=LIBPATH
6102
6103   # AIX has no versioning support, so we append a major version to the name.
6104   soname_spec='${libname}${release}.so$major'
6105   ;;
6106
6107 aix4* | aix5*)
6108   version_type=linux
6109   need_lib_prefix=no
6110   need_version=no
6111   hardcode_into_libs=yes
6112   if test "$host_cpu" = ia64; then
6113     # AIX 5 supports IA64
6114     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6115     shlibpath_var=LD_LIBRARY_PATH
6116   else
6117     # With GCC up to 2.95.x, collect2 would create an import file
6118     # for dependence libraries.  The import file would start with
6119     # the line `#! .'.  This would cause the generated library to
6120     # depend on `.', always an invalid library.  This was fixed in
6121     # development snapshots of GCC prior to 3.0.
6122     case $host_os in
6123       aix4 | aix4.[01] | aix4.[01].*)
6124         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6125              echo ' yes '
6126              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6127           :
6128         else
6129           can_build_shared=no
6130         fi
6131         ;;
6132     esac
6133     # AIX (on Power*) has no versioning support, so currently we can
6134     # not hardcode correct soname into executable. Probably we can
6135     # add versioning support to collect2, so additional links can
6136     # be useful in future.
6137     if test "$aix_use_runtimelinking" = yes; then
6138       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6139       # instead of lib<name>.a to let people know that these are not
6140       # typical AIX shared libraries.
6141       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6142     else
6143       # We preserve .a as extension for shared libraries through AIX4.2
6144       # and later when we are not doing run time linking.
6145       library_names_spec='${libname}${release}.a $libname.a'
6146       soname_spec='${libname}${release}.so$major'
6147     fi
6148     shlibpath_var=LIBPATH
6149   fi
6150   hardcode_into_libs=yes
6151   ;;
6152
6153 amigaos*)
6154   library_names_spec='$libname.ixlibrary $libname.a'
6155   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6156   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'
6157   ;;
6158
6159 beos*)
6160   library_names_spec='${libname}.so'
6161   dynamic_linker="$host_os ld.so"
6162   shlibpath_var=LIBRARY_PATH
6163   ;;
6164
6165 bsdi4*)
6166   version_type=linux
6167   need_version=no
6168   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6169   soname_spec='${libname}${release}.so$major'
6170   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6171   shlibpath_var=LD_LIBRARY_PATH
6172   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6173   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6174   export_dynamic_flag_spec=-rdynamic
6175   # the default ld.so.conf also contains /usr/contrib/lib and
6176   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6177   # libtool to hard-code these into programs
6178   ;;
6179
6180 cygwin* | mingw* | pw32*)
6181   version_type=windows
6182   need_version=no
6183   need_lib_prefix=no
6184   case $GCC,$host_os in
6185   yes,cygwin*)
6186     library_names_spec='$libname.dll.a'
6187     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6188     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6189       dldir=$destdir/`dirname \$dlpath`~
6190       test -d \$dldir || mkdir -p \$dldir~
6191       $install_prog .libs/$dlname \$dldir/$dlname'
6192     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6193       dlpath=$dir/\$dldll~
6194        $rm \$dlpath'
6195     ;;
6196   yes,mingw*)
6197     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6198     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6199     ;;
6200   yes,pw32*)
6201     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6202     ;;
6203   *)
6204     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6205     ;;
6206   esac
6207   dynamic_linker='Win32 ld.exe'
6208   # FIXME: first we should search . and the directory the executable is in
6209   shlibpath_var=PATH
6210   ;;
6211
6212 darwin* | rhapsody*)
6213   dynamic_linker="$host_os dyld"
6214   version_type=darwin
6215   need_lib_prefix=no
6216   need_version=no
6217   # FIXME: Relying on posixy $() will cause problems for
6218   #        cross-compilation, but unfortunately the echo tests do not
6219   #        yet detect zsh echo's removal of \ escapes.
6220   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)'
6221   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6222   shlibpath_overrides_runpath=yes
6223   shlibpath_var=DYLD_LIBRARY_PATH
6224   ;;
6225
6226 freebsd1*)
6227   dynamic_linker=no
6228   ;;
6229
6230 freebsd*)
6231   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6232   version_type=freebsd-$objformat
6233   case $version_type in
6234     freebsd-elf*)
6235       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6236       need_version=no
6237       need_lib_prefix=no
6238       ;;
6239     freebsd-*)
6240       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6241       need_version=yes
6242       ;;
6243   esac
6244   shlibpath_var=LD_LIBRARY_PATH
6245   case $host_os in
6246   freebsd2*)
6247     shlibpath_overrides_runpath=yes
6248     ;;
6249   *)
6250     shlibpath_overrides_runpath=no
6251     hardcode_into_libs=yes
6252     ;;
6253   esac
6254   ;;
6255
6256 gnu*)
6257   version_type=linux
6258   need_lib_prefix=no
6259   need_version=no
6260   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6261   soname_spec='${libname}${release}.so$major'
6262   shlibpath_var=LD_LIBRARY_PATH
6263   hardcode_into_libs=yes
6264   ;;
6265
6266 hpux9* | hpux10* | hpux11*)
6267   # Give a soname corresponding to the major version so that dld.sl refuses to
6268   # link against other versions.
6269   dynamic_linker="$host_os dld.sl"
6270   version_type=sunos
6271   need_lib_prefix=no
6272   need_version=no
6273   shlibpath_var=SHLIB_PATH
6274   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6275   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6276   soname_spec='${libname}${release}.sl$major'
6277   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6278   postinstall_cmds='chmod 555 $lib'
6279   ;;
6280
6281 irix5* | irix6* | nonstopux*)
6282   case $host_os in
6283     nonstopux*) version_type=nonstopux ;;
6284     *)          version_type=irix ;;
6285   esac
6286   need_lib_prefix=no
6287   need_version=no
6288   soname_spec='${libname}${release}.so$major'
6289   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6290   case $host_os in
6291   irix5* | nonstopux*)
6292     libsuff= shlibsuff=
6293     ;;
6294   *)
6295     case $LD in # libtool.m4 will add one of these switches to LD
6296     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6297     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6298     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6299     *) libsuff= shlibsuff= libmagic=never-match;;
6300     esac
6301     ;;
6302   esac
6303   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6304   shlibpath_overrides_runpath=no
6305   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6306   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6307   ;;
6308
6309 # No shared lib support for Linux oldld, aout, or coff.
6310 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6311   dynamic_linker=no
6312   ;;
6313
6314 # This must be Linux ELF.
6315 linux-gnu*)
6316   version_type=linux
6317   need_lib_prefix=no
6318   need_version=no
6319   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6320   soname_spec='${libname}${release}.so$major'
6321   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6322   shlibpath_var=LD_LIBRARY_PATH
6323   shlibpath_overrides_runpath=no
6324   # This implies no fast_install, which is unacceptable.
6325   # Some rework will be needed to allow for fast_install
6326   # before this can be enabled.
6327   hardcode_into_libs=yes
6328
6329   # We used to test for /lib/ld.so.1 and disable shared libraries on
6330   # powerpc, because MkLinux only supported shared libraries with the
6331   # GNU dynamic linker.  Since this was broken with cross compilers,
6332   # most powerpc-linux boxes support dynamic linking these days and
6333   # people can always --disable-shared, the test was removed, and we
6334   # assume the GNU/Linux dynamic linker is in use.
6335   dynamic_linker='GNU/Linux ld.so'
6336   ;;
6337
6338 netbsd*)
6339   version_type=sunos
6340   need_lib_prefix=no
6341   need_version=no
6342   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6343     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6344     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6345     dynamic_linker='NetBSD (a.out) ld.so'
6346   else
6347     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6348     soname_spec='${libname}${release}.so$major'
6349     dynamic_linker='NetBSD ld.elf_so'
6350   fi
6351   shlibpath_var=LD_LIBRARY_PATH
6352   shlibpath_overrides_runpath=yes
6353   hardcode_into_libs=yes
6354   ;;
6355
6356 newsos6)
6357   version_type=linux
6358   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6359   shlibpath_var=LD_LIBRARY_PATH
6360   shlibpath_overrides_runpath=yes
6361   ;;
6362
6363 openbsd*)
6364   version_type=sunos
6365   need_lib_prefix=no
6366   need_version=no
6367   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6368     case "$host_os" in
6369     openbsd2.[89] | openbsd2.[89].*)
6370       shlibpath_overrides_runpath=no
6371       ;;
6372     *)
6373       shlibpath_overrides_runpath=yes
6374       ;;
6375     esac
6376   else
6377     shlibpath_overrides_runpath=yes
6378   fi
6379   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6380   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6381   shlibpath_var=LD_LIBRARY_PATH
6382   ;;
6383
6384 openedition*)
6385   need_lib_prefix=no
6386   need_version=no
6387   shlibpath_overrides_runpath=yes
6388   shlibpath_var=LIBPATH
6389   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6390   # the library's exports are in libname.x; this is the file that must
6391   # actually be linked with to use a DLL.
6392   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6393   ;;
6394
6395 os2*)
6396   libname_spec='$name'
6397   need_lib_prefix=no
6398   library_names_spec='$libname.dll $libname.a'
6399   dynamic_linker='OS/2 ld.exe'
6400   shlibpath_var=LIBPATH
6401   ;;
6402
6403 osf3* | osf4* | osf5*)
6404   version_type=osf
6405   need_version=no
6406   soname_spec='${libname}${release}.so$major'
6407   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6408   shlibpath_var=LD_LIBRARY_PATH
6409   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6410   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6411   hardcode_into_libs=yes
6412   ;;
6413
6414 sco3.2v5*)
6415   version_type=osf
6416   soname_spec='${libname}${release}.so$major'
6417   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6418   shlibpath_var=LD_LIBRARY_PATH
6419   ;;
6420
6421 solaris*)
6422   version_type=linux
6423   need_lib_prefix=no
6424   need_version=no
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   shlibpath_overrides_runpath=yes
6429   hardcode_into_libs=yes
6430   # ldd complains unless libraries are executable
6431   postinstall_cmds='chmod +x $lib'
6432   ;;
6433
6434 sunos4*)
6435   version_type=sunos
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6437   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6438   shlibpath_var=LD_LIBRARY_PATH
6439   shlibpath_overrides_runpath=yes
6440   if test "$with_gnu_ld" = yes; then
6441     need_lib_prefix=no
6442   fi
6443   need_version=yes
6444   ;;
6445
6446 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6447   version_type=linux
6448   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6449   soname_spec='${libname}${release}.so$major'
6450   shlibpath_var=LD_LIBRARY_PATH
6451   case $host_vendor in
6452     sni)
6453       shlibpath_overrides_runpath=no
6454       need_lib_prefix=no
6455       export_dynamic_flag_spec='${wl}-Blargedynsym'
6456       runpath_var=LD_RUN_PATH
6457       ;;
6458     siemens)
6459       need_lib_prefix=no
6460       ;;
6461     motorola)
6462       need_lib_prefix=no
6463       need_version=no
6464       shlibpath_overrides_runpath=no
6465       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6466       ;;
6467   esac
6468   ;;
6469
6470 uts4*)
6471   version_type=linux
6472   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6473   soname_spec='${libname}${release}.so$major'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   ;;
6476
6477 dgux*)
6478   version_type=linux
6479   need_lib_prefix=no
6480   need_version=no
6481   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6482   soname_spec='${libname}${release}.so$major'
6483   shlibpath_var=LD_LIBRARY_PATH
6484   ;;
6485
6486 sysv4*MP*)
6487   if test -d /usr/nec ;then
6488     version_type=linux
6489     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6490     soname_spec='$libname.so.$major'
6491     shlibpath_var=LD_LIBRARY_PATH
6492   fi
6493   ;;
6494
6495 *)
6496   dynamic_linker=no
6497   ;;
6498 esac
6499 echo "$ac_t""$dynamic_linker" 1>&6
6500 test "$dynamic_linker" = no && can_build_shared=no
6501
6502 # Report the final consequences.
6503 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6504 echo "configure:6505: checking if libtool supports shared libraries" >&5
6505 echo "$ac_t""$can_build_shared" 1>&6
6506
6507 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6508 echo "configure:6509: checking whether to build shared libraries" >&5
6509 test "$can_build_shared" = "no" && enable_shared=no
6510
6511 # On AIX, shared libraries and static libraries use the same namespace, and
6512 # are all built from PIC.
6513 case "$host_os" in
6514 aix3*)
6515   test "$enable_shared" = yes && enable_static=no
6516   if test -n "$RANLIB"; then
6517     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6518     postinstall_cmds='$RANLIB $lib'
6519   fi
6520   ;;
6521
6522 aix4*)
6523   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6524     test "$enable_shared" = yes && enable_static=no
6525   fi
6526   ;;
6527 esac
6528 echo "$ac_t""$enable_shared" 1>&6
6529
6530 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6531 echo "configure:6532: checking whether to build static libraries" >&5
6532 # Make sure either enable_shared or enable_static is yes.
6533 test "$enable_shared" = yes || enable_static=yes
6534 echo "$ac_t""$enable_static" 1>&6
6535
6536 if test "$hardcode_action" = relink; then
6537   # Fast installation is not supported
6538   enable_fast_install=no
6539 elif test "$shlibpath_overrides_runpath" = yes ||
6540      test "$enable_shared" = no; then
6541   # Fast installation is not necessary
6542   enable_fast_install=needless
6543 fi
6544
6545 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6546 if test "$GCC" = yes; then
6547   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6548 fi
6549
6550 if test "x$enable_dlopen" != xyes; then
6551   enable_dlopen=unknown
6552   enable_dlopen_self=unknown
6553   enable_dlopen_self_static=unknown
6554 else
6555   lt_cv_dlopen=no
6556   lt_cv_dlopen_libs=
6557
6558   case $host_os in
6559   beos*)
6560     lt_cv_dlopen="load_add_on"
6561     lt_cv_dlopen_libs=
6562     lt_cv_dlopen_self=yes
6563     ;;
6564
6565   cygwin* | mingw* | pw32*)
6566     lt_cv_dlopen="LoadLibrary"
6567     lt_cv_dlopen_libs=
6568    ;;
6569
6570   *)
6571     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6572 echo "configure:6573: checking for dllload" >&5
6573 if eval "test \"\${ac_cv_func_dllload+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 dllload(); 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 dllload();
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_dllload) || defined (__stub___dllload)
6594 choke me
6595 #else
6596 f = dllload;
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_dllload=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_dllload=no"
6609 fi
6610 rm -f conftest*
6611 fi
6612
6613 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6614   echo "$ac_t""yes" 1>&6
6615   lt_cv_dlopen="dllload"
6616 else
6617   echo "$ac_t""no" 1>&6
6618 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6619 echo "configure:6620: checking for shl_load" >&5
6620 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6621   echo $ac_n "(cached) $ac_c" 1>&6
6622 else
6623   cat > conftest.$ac_ext <<EOF
6624 #line 6625 "configure"
6625 #include "confdefs.h"
6626 /* System header to define __stub macros and hopefully few prototypes,
6627     which can conflict with char shl_load(); below.  */
6628 #include <assert.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 char (*f)();
6634
6635 int main() {
6636
6637 /* The GNU C library defines this for functions which it implements
6638     to always fail with ENOSYS.  Some functions are actually named
6639     something starting with __ and the normal name is an alias.  */
6640 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6641 choke me
6642 #else
6643 f = shl_load;
6644 #endif
6645
6646 ; return 0; }
6647 EOF
6648 if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6649   rm -rf conftest*
6650   eval "ac_cv_func_shl_load=yes"
6651 else
6652   echo "configure: failed program was:" >&5
6653   cat conftest.$ac_ext >&5
6654   rm -rf conftest*
6655   eval "ac_cv_func_shl_load=no"
6656 fi
6657 rm -f conftest*
6658 fi
6659
6660 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6661   echo "$ac_t""yes" 1>&6
6662   lt_cv_dlopen="shl_load"
6663 else
6664   echo "$ac_t""no" 1>&6
6665 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6666 echo "configure:6667: checking for shl_load in -ldld" >&5
6667 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6668 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6669   echo $ac_n "(cached) $ac_c" 1>&6
6670 else
6671   ac_save_LIBS="$LIBS"
6672 LIBS="-ldld  $LIBS"
6673 cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 /* Override any gcc2 internal prototype to avoid an error.  */
6677 /* We use char because int might match the return type of a gcc2
6678     builtin and then its argument prototype would still apply.  */
6679 char shl_load();
6680
6681 int main() {
6682 shl_load()
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686   rm -rf conftest*
6687   eval "ac_cv_lib_$ac_lib_var=yes"
6688 else
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -rf conftest*
6692   eval "ac_cv_lib_$ac_lib_var=no"
6693 fi
6694 rm -f conftest*
6695 LIBS="$ac_save_LIBS"
6696
6697 fi
6698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6699   echo "$ac_t""yes" 1>&6
6700   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6701 else
6702   echo "$ac_t""no" 1>&6
6703 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6704 echo "configure:6705: checking for dlopen" >&5
6705 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6706   echo $ac_n "(cached) $ac_c" 1>&6
6707 else
6708   cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* System header to define __stub macros and hopefully few prototypes,
6712     which can conflict with char dlopen(); below.  */
6713 #include <assert.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 char (*f)();
6719
6720 int main() {
6721
6722 /* The GNU C library defines this for functions which it implements
6723     to always fail with ENOSYS.  Some functions are actually named
6724     something starting with __ and the normal name is an alias.  */
6725 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6726 choke me
6727 #else
6728 f = dlopen;
6729 #endif
6730
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6734   rm -rf conftest*
6735   eval "ac_cv_func_dlopen=yes"
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   eval "ac_cv_func_dlopen=no"
6741 fi
6742 rm -f conftest*
6743 fi
6744
6745 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6746   echo "$ac_t""yes" 1>&6
6747   lt_cv_dlopen="dlopen"
6748 else
6749   echo "$ac_t""no" 1>&6
6750 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6751 echo "configure:6752: checking for dlopen in -ldl" >&5
6752 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6753 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6754   echo $ac_n "(cached) $ac_c" 1>&6
6755 else
6756   ac_save_LIBS="$LIBS"
6757 LIBS="-ldl  $LIBS"
6758 cat > conftest.$ac_ext <<EOF
6759 #line 6760 "configure"
6760 #include "confdefs.h"
6761 /* Override any gcc2 internal prototype to avoid an error.  */
6762 /* We use char because int might match the return type of a gcc2
6763     builtin and then its argument prototype would still apply.  */
6764 char dlopen();
6765
6766 int main() {
6767 dlopen()
6768 ; return 0; }
6769 EOF
6770 if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771   rm -rf conftest*
6772   eval "ac_cv_lib_$ac_lib_var=yes"
6773 else
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   eval "ac_cv_lib_$ac_lib_var=no"
6778 fi
6779 rm -f conftest*
6780 LIBS="$ac_save_LIBS"
6781
6782 fi
6783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6784   echo "$ac_t""yes" 1>&6
6785   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6786 else
6787   echo "$ac_t""no" 1>&6
6788 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6789 echo "configure:6790: checking for dlopen in -lsvld" >&5
6790 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6792   echo $ac_n "(cached) $ac_c" 1>&6
6793 else
6794   ac_save_LIBS="$LIBS"
6795 LIBS="-lsvld  $LIBS"
6796 cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799 /* Override any gcc2 internal prototype to avoid an error.  */
6800 /* We use char because int might match the return type of a gcc2
6801     builtin and then its argument prototype would still apply.  */
6802 char dlopen();
6803
6804 int main() {
6805 dlopen()
6806 ; return 0; }
6807 EOF
6808 if { (eval echo configure:6809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=yes"
6811 else
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -rf conftest*
6815   eval "ac_cv_lib_$ac_lib_var=no"
6816 fi
6817 rm -f conftest*
6818 LIBS="$ac_save_LIBS"
6819
6820 fi
6821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6822   echo "$ac_t""yes" 1>&6
6823   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6824 else
6825   echo "$ac_t""no" 1>&6
6826 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6827 echo "configure:6828: checking for dld_link in -ldld" >&5
6828 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6830   echo $ac_n "(cached) $ac_c" 1>&6
6831 else
6832   ac_save_LIBS="$LIBS"
6833 LIBS="-ldld  $LIBS"
6834 cat > conftest.$ac_ext <<EOF
6835 #line 6836 "configure"
6836 #include "confdefs.h"
6837 /* Override any gcc2 internal prototype to avoid an error.  */
6838 /* We use char because int might match the return type of a gcc2
6839     builtin and then its argument prototype would still apply.  */
6840 char dld_link();
6841
6842 int main() {
6843 dld_link()
6844 ; return 0; }
6845 EOF
6846 if { (eval echo configure:6847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6847   rm -rf conftest*
6848   eval "ac_cv_lib_$ac_lib_var=yes"
6849 else
6850   echo "configure: failed program was:" >&5
6851   cat conftest.$ac_ext >&5
6852   rm -rf conftest*
6853   eval "ac_cv_lib_$ac_lib_var=no"
6854 fi
6855 rm -f conftest*
6856 LIBS="$ac_save_LIBS"
6857
6858 fi
6859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6860   echo "$ac_t""yes" 1>&6
6861   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6862 else
6863   echo "$ac_t""no" 1>&6
6864 fi
6865
6866               
6867 fi
6868
6869             
6870 fi
6871
6872           
6873 fi
6874
6875         
6876 fi
6877
6878       
6879 fi
6880
6881     
6882 fi
6883
6884     ;;
6885   esac
6886
6887   if test "x$lt_cv_dlopen" != xno; then
6888     enable_dlopen=yes
6889   else
6890     enable_dlopen=no
6891   fi
6892
6893   case $lt_cv_dlopen in
6894   dlopen)
6895     save_CPPFLAGS="$CPPFLAGS"
6896         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6897
6898     save_LDFLAGS="$LDFLAGS"
6899     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6900
6901     save_LIBS="$LIBS"
6902     LIBS="$lt_cv_dlopen_libs $LIBS"
6903
6904     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6905 echo "configure:6906: checking whether a program can dlopen itself" >&5
6906 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909           if test "$cross_compiling" = yes; then :
6910   lt_cv_dlopen_self=cross
6911 else
6912     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6913   lt_status=$lt_dlunknown
6914   cat > conftest.$ac_ext <<EOF
6915 #line 6916 "configure"
6916 #include "confdefs.h"
6917
6918 #if HAVE_DLFCN_H
6919 #include <dlfcn.h>
6920 #endif
6921
6922 #include <stdio.h>
6923
6924 #ifdef RTLD_GLOBAL
6925 #  define LT_DLGLOBAL           RTLD_GLOBAL
6926 #else
6927 #  ifdef DL_GLOBAL
6928 #    define LT_DLGLOBAL         DL_GLOBAL
6929 #  else
6930 #    define LT_DLGLOBAL         0
6931 #  endif
6932 #endif
6933
6934 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6935    find out it does not work in some platform. */
6936 #ifndef LT_DLLAZY_OR_NOW
6937 #  ifdef RTLD_LAZY
6938 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6939 #  else
6940 #    ifdef DL_LAZY
6941 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6942 #    else
6943 #      ifdef RTLD_NOW
6944 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6945 #      else
6946 #        ifdef DL_NOW
6947 #          define LT_DLLAZY_OR_NOW      DL_NOW
6948 #        else
6949 #          define LT_DLLAZY_OR_NOW      0
6950 #        endif
6951 #      endif
6952 #    endif
6953 #  endif
6954 #endif
6955
6956 #ifdef __cplusplus
6957 extern "C" void exit (int);
6958 #endif
6959
6960 void fnord() { int i=42;}
6961 int main ()
6962 {
6963   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6964   int status = $lt_dlunknown;
6965
6966   if (self)
6967     {
6968       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6969       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6970       /* dlclose (self); */
6971     }
6972
6973     exit (status);
6974 }
6975 EOF
6976   if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6977     (./conftest; exit; ) 2>/dev/null
6978     lt_status=$?
6979     case x$lt_status in
6980       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6981       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6982       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6983     esac
6984   else :
6985     # compilation failed
6986     lt_cv_dlopen_self=no
6987   fi
6988 fi
6989 rm -fr conftest*
6990
6991     
6992 fi
6993
6994 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6995
6996     if test "x$lt_cv_dlopen_self" = xyes; then
6997       LDFLAGS="$LDFLAGS $link_static_flag"
6998       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6999 echo "configure:7000: checking whether a statically linked program can dlopen itself" >&5
7000 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7001   echo $ac_n "(cached) $ac_c" 1>&6
7002 else
7003           if test "$cross_compiling" = yes; then :
7004   lt_cv_dlopen_self_static=cross
7005 else
7006     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7007   lt_status=$lt_dlunknown
7008   cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011
7012 #if HAVE_DLFCN_H
7013 #include <dlfcn.h>
7014 #endif
7015
7016 #include <stdio.h>
7017
7018 #ifdef RTLD_GLOBAL
7019 #  define LT_DLGLOBAL           RTLD_GLOBAL
7020 #else
7021 #  ifdef DL_GLOBAL
7022 #    define LT_DLGLOBAL         DL_GLOBAL
7023 #  else
7024 #    define LT_DLGLOBAL         0
7025 #  endif
7026 #endif
7027
7028 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7029    find out it does not work in some platform. */
7030 #ifndef LT_DLLAZY_OR_NOW
7031 #  ifdef RTLD_LAZY
7032 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7033 #  else
7034 #    ifdef DL_LAZY
7035 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7036 #    else
7037 #      ifdef RTLD_NOW
7038 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7039 #      else
7040 #        ifdef DL_NOW
7041 #          define LT_DLLAZY_OR_NOW      DL_NOW
7042 #        else
7043 #          define LT_DLLAZY_OR_NOW      0
7044 #        endif
7045 #      endif
7046 #    endif
7047 #  endif
7048 #endif
7049
7050 #ifdef __cplusplus
7051 extern "C" void exit (int);
7052 #endif
7053
7054 void fnord() { int i=42;}
7055 int main ()
7056 {
7057   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7058   int status = $lt_dlunknown;
7059
7060   if (self)
7061     {
7062       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7063       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7064       /* dlclose (self); */
7065     }
7066
7067     exit (status);
7068 }
7069 EOF
7070   if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7071     (./conftest; exit; ) 2>/dev/null
7072     lt_status=$?
7073     case x$lt_status in
7074       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7075       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7076       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7077     esac
7078   else :
7079     # compilation failed
7080     lt_cv_dlopen_self_static=no
7081   fi
7082 fi
7083 rm -fr conftest*
7084
7085       
7086 fi
7087
7088 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7089     fi
7090
7091     CPPFLAGS="$save_CPPFLAGS"
7092     LDFLAGS="$save_LDFLAGS"
7093     LIBS="$save_LIBS"
7094     ;;
7095   esac
7096
7097   case $lt_cv_dlopen_self in
7098   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7099   *) enable_dlopen_self=unknown ;;
7100   esac
7101
7102   case $lt_cv_dlopen_self_static in
7103   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7104   *) enable_dlopen_self_static=unknown ;;
7105   esac
7106 fi
7107
7108
7109 if test "$enable_shared" = yes && test "$GCC" = yes; then
7110   case $archive_cmds in
7111   *'~'*)
7112     # FIXME: we may have to deal with multi-command sequences.
7113     ;;
7114   '$CC '*)
7115     # Test whether the compiler implicitly links with -lc since on some
7116     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7117     # to ld, don't add -lc before -lgcc.
7118     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7119 echo "configure:7120: checking whether -lc should be explicitly linked in" >&5
7120     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123   $rm conftest*
7124     echo 'static int dummy;' > conftest.$ac_ext
7125
7126     if { (eval echo configure:7127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7127       soname=conftest
7128       lib=conftest
7129       libobjs=conftest.$ac_objext
7130       deplibs=
7131       wl=$lt_cv_prog_cc_wl
7132       compiler_flags=-v
7133       linker_flags=-v
7134       verstring=
7135       output_objdir=.
7136       libname=conftest
7137       save_allow_undefined_flag=$allow_undefined_flag
7138       allow_undefined_flag=
7139       if { (eval echo configure:7140: \"$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; }
7140       then
7141         lt_cv_archive_cmds_need_lc=no
7142       else
7143         lt_cv_archive_cmds_need_lc=yes
7144       fi
7145       allow_undefined_flag=$save_allow_undefined_flag
7146     else
7147       cat conftest.err 1>&5
7148     fi
7149 fi
7150
7151     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7152     ;;
7153   esac
7154 fi
7155 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7156
7157 # The second clause should only fire when bootstrapping the
7158 # libtool distribution, otherwise you forgot to ship ltmain.sh
7159 # with your package, and you will get complaints that there are
7160 # no rules to generate ltmain.sh.
7161 if test -f "$ltmain"; then
7162   :
7163 else
7164   # If there is no Makefile yet, we rely on a make rule to execute
7165   # `config.status --recheck' to rerun these tests and create the
7166   # libtool script then.
7167   test -f Makefile && make "$ltmain"
7168 fi
7169
7170 if test -f "$ltmain"; then
7171   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7172   $rm -f "${ofile}T"
7173
7174   echo creating $ofile
7175
7176   # Now quote all the things that may contain metacharacters while being
7177   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7178   # variables and quote the copies for generation of the libtool script.
7179   for var in echo old_CC old_CFLAGS SED \
7180     AR AR_FLAGS CC LD LN_S NM SHELL \
7181     reload_flag reload_cmds wl \
7182     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7183     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7184     library_names_spec soname_spec \
7185     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7186     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7187     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7188     old_striplib striplib file_magic_cmd export_symbols_cmds \
7189     deplibs_check_method allow_undefined_flag no_undefined_flag \
7190     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7191     global_symbol_to_c_name_address \
7192     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7193     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7194     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7195
7196     case $var in
7197     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7198     old_postinstall_cmds | old_postuninstall_cmds | \
7199     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7200     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7201     postinstall_cmds | postuninstall_cmds | \
7202     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7203       # Double-quote double-evaled strings.
7204       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7205       ;;
7206     *)
7207       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7208       ;;
7209     esac
7210   done
7211
7212   cat <<__EOF__ > "${ofile}T"
7213 #! $SHELL
7214
7215 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7216 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7217 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7218 #
7219 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7220 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7221 #
7222 # This program is free software; you can redistribute it and/or modify
7223 # it under the terms of the GNU General Public License as published by
7224 # the Free Software Foundation; either version 2 of the License, or
7225 # (at your option) any later version.
7226 #
7227 # This program is distributed in the hope that it will be useful, but
7228 # WITHOUT ANY WARRANTY; without even the implied warranty of
7229 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7230 # General Public License for more details.
7231 #
7232 # You should have received a copy of the GNU General Public License
7233 # along with this program; if not, write to the Free Software
7234 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7235 #
7236 # As a special exception to the GNU General Public License, if you
7237 # distribute this file as part of a program that contains a
7238 # configuration script generated by Autoconf, you may include it under
7239 # the same distribution terms that you use for the rest of that program.
7240
7241 # A sed that does not truncate output.
7242 SED=$lt_SED
7243
7244 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7245 Xsed="${SED} -e s/^X//"
7246
7247 # The HP-UX ksh and POSIX shell print the target directory to stdout
7248 # if CDPATH is set.
7249 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7250
7251 # ### BEGIN LIBTOOL CONFIG
7252
7253 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7254
7255 # Shell to use when invoking shell scripts.
7256 SHELL=$lt_SHELL
7257
7258 # Whether or not to build shared libraries.
7259 build_libtool_libs=$enable_shared
7260
7261 # Whether or not to build static libraries.
7262 build_old_libs=$enable_static
7263
7264 # Whether or not to add -lc for building shared libraries.
7265 build_libtool_need_lc=$need_lc
7266
7267 # Whether or not to optimize for fast installation.
7268 fast_install=$enable_fast_install
7269
7270 # The host system.
7271 host_alias=$host_alias
7272 host=$host
7273
7274 # An echo program that does not interpret backslashes.
7275 echo=$lt_echo
7276
7277 # The archiver.
7278 AR=$lt_AR
7279 AR_FLAGS=$lt_AR_FLAGS
7280
7281 # The default C compiler.
7282 CC=$lt_CC
7283
7284 # Is the compiler the GNU C compiler?
7285 with_gcc=$GCC
7286
7287 # The linker used to build libraries.
7288 LD=$lt_LD
7289
7290 # Whether we need hard or soft links.
7291 LN_S=$lt_LN_S
7292
7293 # A BSD-compatible nm program.
7294 NM=$lt_NM
7295
7296 # A symbol stripping program
7297 STRIP=$STRIP
7298
7299 # Used to examine libraries when file_magic_cmd begins "file"
7300 MAGIC_CMD=$MAGIC_CMD
7301
7302 # Used on cygwin: DLL creation program.
7303 DLLTOOL="$DLLTOOL"
7304
7305 # Used on cygwin: object dumper.
7306 OBJDUMP="$OBJDUMP"
7307
7308 # Used on cygwin: assembler.
7309 AS="$AS"
7310
7311 # The name of the directory that contains temporary libtool files.
7312 objdir=$objdir
7313
7314 # How to create reloadable object files.
7315 reload_flag=$lt_reload_flag
7316 reload_cmds=$lt_reload_cmds
7317
7318 # How to pass a linker flag through the compiler.
7319 wl=$lt_wl
7320
7321 # Object file suffix (normally "o").
7322 objext="$ac_objext"
7323
7324 # Old archive suffix (normally "a").
7325 libext="$libext"
7326
7327 # Executable file suffix (normally "").
7328 exeext="$exeext"
7329
7330 # Additional compiler flags for building library objects.
7331 pic_flag=$lt_pic_flag
7332 pic_mode=$pic_mode
7333
7334 # Does compiler simultaneously support -c and -o options?
7335 compiler_c_o=$lt_compiler_c_o
7336
7337 # Can we write directly to a .lo ?
7338 compiler_o_lo=$lt_compiler_o_lo
7339
7340 # Must we lock files when doing compilation ?
7341 need_locks=$lt_need_locks
7342
7343 # Do we need the lib prefix for modules?
7344 need_lib_prefix=$need_lib_prefix
7345
7346 # Do we need a version for libraries?
7347 need_version=$need_version
7348
7349 # Whether dlopen is supported.
7350 dlopen_support=$enable_dlopen
7351
7352 # Whether dlopen of programs is supported.
7353 dlopen_self=$enable_dlopen_self
7354
7355 # Whether dlopen of statically linked programs is supported.
7356 dlopen_self_static=$enable_dlopen_self_static
7357
7358 # Compiler flag to prevent dynamic linking.
7359 link_static_flag=$lt_link_static_flag
7360
7361 # Compiler flag to turn off builtin functions.
7362 no_builtin_flag=$lt_no_builtin_flag
7363
7364 # Compiler flag to allow reflexive dlopens.
7365 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7366
7367 # Compiler flag to generate shared objects directly from archives.
7368 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7369
7370 # Compiler flag to generate thread-safe objects.
7371 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7372
7373 # Library versioning type.
7374 version_type=$version_type
7375
7376 # Format of library name prefix.
7377 libname_spec=$lt_libname_spec
7378
7379 # List of archive names.  First name is the real one, the rest are links.
7380 # The last name is the one that the linker finds with -lNAME.
7381 library_names_spec=$lt_library_names_spec
7382
7383 # The coded name of the library, if different from the real name.
7384 soname_spec=$lt_soname_spec
7385
7386 # Commands used to build and install an old-style archive.
7387 RANLIB=$lt_RANLIB
7388 old_archive_cmds=$lt_old_archive_cmds
7389 old_postinstall_cmds=$lt_old_postinstall_cmds
7390 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7391
7392 # Create an old-style archive from a shared archive.
7393 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7394
7395 # Create a temporary old-style archive to link instead of a shared archive.
7396 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7397
7398 # Commands used to build and install a shared archive.
7399 archive_cmds=$lt_archive_cmds
7400 archive_expsym_cmds=$lt_archive_expsym_cmds
7401 postinstall_cmds=$lt_postinstall_cmds
7402 postuninstall_cmds=$lt_postuninstall_cmds
7403
7404 # Commands to strip libraries.
7405 old_striplib=$lt_old_striplib
7406 striplib=$lt_striplib
7407
7408 # Method to check whether dependent libraries are shared objects.
7409 deplibs_check_method=$lt_deplibs_check_method
7410
7411 # Command to use when deplibs_check_method == file_magic.
7412 file_magic_cmd=$lt_file_magic_cmd
7413
7414 # Flag that allows shared libraries with undefined symbols to be built.
7415 allow_undefined_flag=$lt_allow_undefined_flag
7416
7417 # Flag that forces no undefined symbols.
7418 no_undefined_flag=$lt_no_undefined_flag
7419
7420 # Commands used to finish a libtool library installation in a directory.
7421 finish_cmds=$lt_finish_cmds
7422
7423 # Same as above, but a single script fragment to be evaled but not shown.
7424 finish_eval=$lt_finish_eval
7425
7426 # Take the output of nm and produce a listing of raw symbols and C names.
7427 global_symbol_pipe=$lt_global_symbol_pipe
7428
7429 # Transform the output of nm in a proper C declaration
7430 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7431
7432 # Transform the output of nm in a C name address pair
7433 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7434
7435 # This is the shared library runtime path variable.
7436 runpath_var=$runpath_var
7437
7438 # This is the shared library path variable.
7439 shlibpath_var=$shlibpath_var
7440
7441 # Is shlibpath searched before the hard-coded library search path?
7442 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7443
7444 # How to hardcode a shared library path into an executable.
7445 hardcode_action=$hardcode_action
7446
7447 # Whether we should hardcode library paths into libraries.
7448 hardcode_into_libs=$hardcode_into_libs
7449
7450 # Flag to hardcode \$libdir into a binary during linking.
7451 # This must work even if \$libdir does not exist.
7452 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7453
7454 # Whether we need a single -rpath flag with a separated argument.
7455 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7456
7457 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7458 # resulting binary.
7459 hardcode_direct=$hardcode_direct
7460
7461 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7462 # resulting binary.
7463 hardcode_minus_L=$hardcode_minus_L
7464
7465 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7466 # the resulting binary.
7467 hardcode_shlibpath_var=$hardcode_shlibpath_var
7468
7469 # Variables whose values should be saved in libtool wrapper scripts and
7470 # restored at relink time.
7471 variables_saved_for_relink="$variables_saved_for_relink"
7472
7473 # Whether libtool must link a program against all its dependency libraries.
7474 link_all_deplibs=$link_all_deplibs
7475
7476 # Compile-time system search path for libraries
7477 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7478
7479 # Run-time system search path for libraries
7480 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7481
7482 # Fix the shell variable \$srcfile for the compiler.
7483 fix_srcfile_path="$fix_srcfile_path"
7484
7485 # Set to yes if exported symbols are required.
7486 always_export_symbols=$always_export_symbols
7487
7488 # The commands to list exported symbols.
7489 export_symbols_cmds=$lt_export_symbols_cmds
7490
7491 # The commands to extract the exported symbol list from a shared archive.
7492 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7493
7494 # Symbols that should not be listed in the preloaded symbols.
7495 exclude_expsyms=$lt_exclude_expsyms
7496
7497 # Symbols that must always be exported.
7498 include_expsyms=$lt_include_expsyms
7499
7500 # ### END LIBTOOL CONFIG
7501
7502 __EOF__
7503
7504   case $host_os in
7505   aix3*)
7506     cat <<\EOF >> "${ofile}T"
7507
7508 # AIX sometimes has problems with the GCC collect2 program.  For some
7509 # reason, if we set the COLLECT_NAMES environment variable, the problems
7510 # vanish in a puff of smoke.
7511 if test "X${COLLECT_NAMES+set}" != Xset; then
7512   COLLECT_NAMES=
7513   export COLLECT_NAMES
7514 fi
7515 EOF
7516     ;;
7517   esac
7518
7519   case $host_os in
7520   cygwin* | mingw* | pw32* | os2*)
7521     cat <<'EOF' >> "${ofile}T"
7522       # This is a source program that is used to create dlls on Windows
7523       # Don't remove nor modify the starting and closing comments
7524 # /* ltdll.c starts here */
7525 # #define WIN32_LEAN_AND_MEAN
7526 # #include <windows.h>
7527 # #undef WIN32_LEAN_AND_MEAN
7528 # #include <stdio.h>
7529 #
7530 # #ifndef __CYGWIN__
7531 # #  ifdef __CYGWIN32__
7532 # #    define __CYGWIN__ __CYGWIN32__
7533 # #  endif
7534 # #endif
7535 #
7536 # #ifdef __cplusplus
7537 # extern "C" {
7538 # #endif
7539 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7540 # #ifdef __cplusplus
7541 # }
7542 # #endif
7543 #
7544 # #ifdef __CYGWIN__
7545 # #include <cygwin/cygwin_dll.h>
7546 # DECLARE_CYGWIN_DLL( DllMain );
7547 # #endif
7548 # HINSTANCE __hDllInstance_base;
7549 #
7550 # BOOL APIENTRY
7551 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7552 # {
7553 #   __hDllInstance_base = hInst;
7554 #   return TRUE;
7555 # }
7556 # /* ltdll.c ends here */
7557         # This is a source program that is used to create import libraries
7558         # on Windows for dlls which lack them. Don't remove nor modify the
7559         # starting and closing comments
7560 # /* impgen.c starts here */
7561 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7562 #
7563 #  This file is part of GNU libtool.
7564 #
7565 #  This program is free software; you can redistribute it and/or modify
7566 #  it under the terms of the GNU General Public License as published by
7567 #  the Free Software Foundation; either version 2 of the License, or
7568 #  (at your option) any later version.
7569 #
7570 #  This program is distributed in the hope that it will be useful,
7571 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7572 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7573 #  GNU General Public License for more details.
7574 #
7575 #  You should have received a copy of the GNU General Public License
7576 #  along with this program; if not, write to the Free Software
7577 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7578 #  */
7579 #
7580 # #include <stdio.h>            /* for printf() */
7581 # #include <unistd.h>           /* for open(), lseek(), read() */
7582 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7583 # #include <string.h>           /* for strdup() */
7584 #
7585 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7586 # #ifndef O_BINARY
7587 # #define O_BINARY 0
7588 # #endif
7589 #
7590 # static unsigned int
7591 # pe_get16 (fd, offset)
7592 #      int fd;
7593 #      int offset;
7594 # {
7595 #   unsigned char b[2];
7596 #   lseek (fd, offset, SEEK_SET);
7597 #   read (fd, b, 2);
7598 #   return b[0] + (b[1]<<8);
7599 # }
7600 #
7601 # static unsigned int
7602 # pe_get32 (fd, offset)
7603 #     int fd;
7604 #     int offset;
7605 # {
7606 #   unsigned char b[4];
7607 #   lseek (fd, offset, SEEK_SET);
7608 #   read (fd, b, 4);
7609 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7610 # }
7611 #
7612 # static unsigned int
7613 # pe_as32 (ptr)
7614 #      void *ptr;
7615 # {
7616 #   unsigned char *b = ptr;
7617 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7618 # }
7619 #
7620 # int
7621 # main (argc, argv)
7622 #     int argc;
7623 #     char *argv[];
7624 # {
7625 #     int dll;
7626 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7627 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7628 #     unsigned long name_rvas, nexp;
7629 #     unsigned char *expdata, *erva;
7630 #     char *filename, *dll_name;
7631 #
7632 #     filename = argv[1];
7633 #
7634 #     dll = open(filename, O_RDONLY|O_BINARY);
7635 #     if (dll < 1)
7636 #       return 1;
7637 #
7638 #     dll_name = filename;
7639 #
7640 #     for (i=0; filename[i]; i++)
7641 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7642 #           dll_name = filename + i +1;
7643 #
7644 #     pe_header_offset = pe_get32 (dll, 0x3c);
7645 #     opthdr_ofs = pe_header_offset + 4 + 20;
7646 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7647 #
7648 #     if (num_entries < 1) /* no exports */
7649 #       return 1;
7650 #
7651 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7652 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7653 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7654 #     secptr = (pe_header_offset + 4 + 20 +
7655 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7656 #
7657 #     expptr = 0;
7658 #     for (i = 0; i < nsections; i++)
7659 #     {
7660 #       char sname[8];
7661 #       unsigned long secptr1 = secptr + 40 * i;
7662 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7663 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7664 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7665 #       lseek(dll, secptr1, SEEK_SET);
7666 #       read(dll, sname, 8);
7667 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7668 #       {
7669 #           expptr = fptr + (export_rva - vaddr);
7670 #           if (export_rva + export_size > vaddr + vsize)
7671 #               export_size = vsize - (export_rva - vaddr);
7672 #           break;
7673 #       }
7674 #     }
7675 #
7676 #     expdata = (unsigned char*)malloc(export_size);
7677 #     lseek (dll, expptr, SEEK_SET);
7678 #     read (dll, expdata, export_size);
7679 #     erva = expdata - export_rva;
7680 #
7681 #     nexp = pe_as32 (expdata+24);
7682 #     name_rvas = pe_as32 (expdata+32);
7683 #
7684 #     printf ("EXPORTS\n");
7685 #     for (i = 0; i<nexp; i++)
7686 #     {
7687 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7688 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7689 #     }
7690 #
7691 #     return 0;
7692 # }
7693 # /* impgen.c ends here */
7694
7695 EOF
7696     ;;
7697   esac
7698
7699   # We use sed instead of cat because bash on DJGPP gets confused if
7700   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7701   # text mode, it properly converts lines to CR/LF.  This bash problem
7702   # is reportedly fixed, but why not run on old versions too?
7703   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7704
7705   mv -f "${ofile}T" "$ofile" || \
7706     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7707   chmod +x "$ofile"
7708 fi
7709
7710
7711
7712
7713
7714 # This can be used to rebuild libtool when needed
7715 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7716
7717 # Always use our own libtool.
7718 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7719
7720 # Prevent multiple expansion
7721
7722
7723
7724 # test for ln hardlink support
7725 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7726 echo "configure:7727: checking whether ln works" >&5
7727 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7728   echo $ac_n "(cached) $ac_c" 1>&6
7729 else
7730   rm -f conftest.src conftest.dst
7731 echo "conftest" > conftest.src
7732 if ln conftest.src conftest.dst 2>/dev/null
7733 then
7734   ol_cv_prog_LN_H="ln"
7735 else
7736   ol_cv_prog_LN_H="cp"
7737 fi
7738 rm -f conftest.src conftest.dst
7739
7740 fi
7741 LN_H="$ol_cv_prog_LN_H"
7742 if test "$ol_cv_prog_LN_H" = "ln"; then
7743         echo "$ac_t""yes" 1>&6
7744 else
7745         echo "$ac_t""no" 1>&6
7746 fi
7747
7748 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7749 echo "configure:7750: checking whether ln -s works" >&5
7750 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7751   echo $ac_n "(cached) $ac_c" 1>&6
7752 else
7753   rm -f conftestdata
7754 if ln -s X conftestdata 2>/dev/null
7755 then
7756   rm -f conftestdata
7757   ac_cv_prog_LN_S="ln -s"
7758 else
7759   ac_cv_prog_LN_S=ln
7760 fi
7761 fi
7762 LN_S="$ac_cv_prog_LN_S"
7763 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7764   echo "$ac_t""yes" 1>&6
7765 else
7766   echo "$ac_t""no" 1>&6
7767 fi
7768
7769
7770 ol_link_perl=no
7771 if test $ol_enable_perl != no ; then
7772         # Extract the first word of "perl", so it can be a program name with args.
7773 set dummy perl; ac_word=$2
7774 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7775 echo "configure:7776: checking for $ac_word" >&5
7776 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7777   echo $ac_n "(cached) $ac_c" 1>&6
7778 else
7779   case "$PERLBIN" in
7780   /*)
7781   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7782   ;;
7783   ?:/*)
7784   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7785   ;;
7786   *)
7787   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7788   ac_dummy="$PATH"
7789   for ac_dir in $ac_dummy; do 
7790     test -z "$ac_dir" && ac_dir=.
7791     if test -f $ac_dir/$ac_word; then
7792       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7793       break
7794     fi
7795   done
7796   IFS="$ac_save_ifs"
7797   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7798   ;;
7799 esac
7800 fi
7801 PERLBIN="$ac_cv_path_PERLBIN"
7802 if test -n "$PERLBIN"; then
7803   echo "$ac_t""$PERLBIN" 1>&6
7804 else
7805   echo "$ac_t""no" 1>&6
7806 fi
7807
7808
7809         if test "no$PERLBIN" = "no" ; then
7810                 if test $ol_enable_perl = yes ; then
7811                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7812                 fi
7813
7814         else
7815                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7816                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7817
7818                 if test x"$ol_enable_perl" = "xyes" ; then
7819                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7820                 else
7821                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7822                 fi
7823                                 ol_link_perl=yes
7824         fi
7825 fi
7826
7827 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7828 echo "configure:7829: checking how to run the C preprocessor" >&5
7829 # On Suns, sometimes $CPP names a directory.
7830 if test -n "$CPP" && test -d "$CPP"; then
7831   CPP=
7832 fi
7833 if test -z "$CPP"; then
7834 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837     # This must be in double quotes, not single quotes, because CPP may get
7838   # substituted into the Makefile and "${CC-cc}" will confuse make.
7839   CPP="${CC-cc} -E"
7840   # On the NeXT, cc -E runs the code through the compiler's parser,
7841   # not just through cpp.
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845 #include <assert.h>
7846 Syntax Error
7847 EOF
7848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7849 { (eval echo configure:7850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7851 if test -z "$ac_err"; then
7852   :
7853 else
7854   echo "$ac_err" >&5
7855   echo "configure: failed program was:" >&5
7856   cat conftest.$ac_ext >&5
7857   rm -rf conftest*
7858   CPP="${CC-cc} -E -traditional-cpp"
7859   cat > conftest.$ac_ext <<EOF
7860 #line 7861 "configure"
7861 #include "confdefs.h"
7862 #include <assert.h>
7863 Syntax Error
7864 EOF
7865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7866 { (eval echo configure:7867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7868 if test -z "$ac_err"; then
7869   :
7870 else
7871   echo "$ac_err" >&5
7872   echo "configure: failed program was:" >&5
7873   cat conftest.$ac_ext >&5
7874   rm -rf conftest*
7875   CPP="${CC-cc} -nologo -E"
7876   cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 #include <assert.h>
7880 Syntax Error
7881 EOF
7882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7883 { (eval echo configure:7884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7885 if test -z "$ac_err"; then
7886   :
7887 else
7888   echo "$ac_err" >&5
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   CPP=/lib/cpp
7893 fi
7894 rm -f conftest*
7895 fi
7896 rm -f conftest*
7897 fi
7898 rm -f conftest*
7899   ac_cv_prog_CPP="$CPP"
7900 fi
7901   CPP="$ac_cv_prog_CPP"
7902 else
7903   ac_cv_prog_CPP="$CPP"
7904 fi
7905 echo "$ac_t""$CPP" 1>&6
7906
7907
7908
7909 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7910 echo "configure:7911: checking for Cygwin environment" >&5
7911 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7912   echo $ac_n "(cached) $ac_c" 1>&6
7913 else
7914   cat > conftest.$ac_ext <<EOF
7915 #line 7916 "configure"
7916 #include "confdefs.h"
7917
7918 int main() {
7919
7920 #ifndef __CYGWIN__
7921 #define __CYGWIN__ __CYGWIN32__
7922 #endif
7923 return __CYGWIN__;
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7927   rm -rf conftest*
7928   ac_cv_cygwin=yes
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   ac_cv_cygwin=no
7934 fi
7935 rm -f conftest*
7936 fi
7937
7938 echo "$ac_t""$ac_cv_cygwin" 1>&6
7939 CYGWIN=
7940 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7941 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7942 echo "configure:7943: checking for mingw32 environment" >&5
7943 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7944   echo $ac_n "(cached) $ac_c" 1>&6
7945 else
7946   cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949
7950 int main() {
7951 return __MINGW32__;
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7955   rm -rf conftest*
7956   ac_cv_mingw32=yes
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   ac_cv_mingw32=no
7962 fi
7963 rm -f conftest*
7964 fi
7965
7966 echo "$ac_t""$ac_cv_mingw32" 1>&6
7967 MINGW32=
7968 test "$ac_cv_mingw32" = yes && MINGW32=yes
7969
7970
7971
7972 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7973 echo "configure:7974: checking for executable suffix" >&5
7974 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7975   echo $ac_n "(cached) $ac_c" 1>&6
7976 else
7977   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7978   ac_cv_exeext=.exe
7979 else
7980   rm -f conftest*
7981   echo 'int main () { return 0; }' > conftest.$ac_ext
7982   ac_cv_exeext=
7983   if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7984     for file in conftest.*; do
7985       case $file in
7986       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7987       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7988       esac
7989     done
7990   else
7991     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7992   fi
7993   rm -f conftest*
7994   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7995 fi
7996 fi
7997
7998 EXEEXT=""
7999 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8000 echo "$ac_t""${ac_cv_exeext}" 1>&6
8001 ac_exeext=$EXEEXT
8002
8003 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8004 echo "configure:8005: checking for object suffix" >&5
8005 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8006   echo $ac_n "(cached) $ac_c" 1>&6
8007 else
8008   rm -f conftest*
8009 echo 'int i = 1;' > conftest.$ac_ext
8010 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8011   for ac_file in conftest.*; do
8012     case $ac_file in
8013     *.c) ;;
8014     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8015     esac
8016   done
8017 else
8018   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 echo "$ac_t""$ac_cv_objext" 1>&6
8024 OBJEXT=$ac_cv_objext
8025 ac_objext=$ac_cv_objext
8026
8027
8028 cat >> confdefs.h <<EOF
8029 #define EXEEXT "${EXEEXT}"
8030 EOF
8031
8032
8033 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8034 echo "configure:8035: checking for be_app in -lbe" >&5
8035 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   ac_save_LIBS="$LIBS"
8040 LIBS="-lbe -lroot -lnet $LIBS"
8041 cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 /* Override any gcc2 internal prototype to avoid an error.  */
8045 /* We use char because int might match the return type of a gcc2
8046     builtin and then its argument prototype would still apply.  */
8047 char be_app();
8048
8049 int main() {
8050 be_app()
8051 ; return 0; }
8052 EOF
8053 if { (eval echo configure:8054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8054   rm -rf conftest*
8055   eval "ac_cv_lib_$ac_lib_var=yes"
8056 else
8057   echo "configure: failed program was:" >&5
8058   cat conftest.$ac_ext >&5
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=no"
8061 fi
8062 rm -f conftest*
8063 LIBS="$ac_save_LIBS"
8064
8065 fi
8066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8067   echo "$ac_t""yes" 1>&6
8068   LIBS="$LIBS -lbe -lroot -lnet"
8069 else
8070   echo "$ac_t""no" 1>&6
8071 :
8072 fi
8073
8074
8075
8076
8077
8078 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8079 echo "configure:8080: checking for ${CC-cc} option to accept ANSI C" >&5
8080 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8081   echo $ac_n "(cached) $ac_c" 1>&6
8082 else
8083   am_cv_prog_cc_stdc=no
8084 ac_save_CC="$CC"
8085 # Don't try gcc -ansi; that turns off useful extensions and
8086 # breaks some systems' header files.
8087 # AIX                   -qlanglvl=ansi
8088 # Ultrix and OSF/1      -std1
8089 # HP-UX 10.20 and later -Ae
8090 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8091 # SVR4                  -Xc -D__EXTENSIONS__
8092 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8093 do
8094   CC="$ac_save_CC $ac_arg"
8095   cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 #include <stdarg.h>
8099 #include <stdio.h>
8100 #include <sys/types.h>
8101 #include <sys/stat.h>
8102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8103 struct buf { int x; };
8104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8105 static char *e (p, i)
8106      char **p;
8107      int i;
8108 {
8109   return p[i];
8110 }
8111 static char *f (char * (*g) (char **, int), char **p, ...)
8112 {
8113   char *s;
8114   va_list v;
8115   va_start (v,p);
8116   s = g (p, va_arg (v,int));
8117   va_end (v);
8118   return s;
8119 }
8120 int test (int i, double x);
8121 struct s1 {int (*f) (int a);};
8122 struct s2 {int (*f) (double a);};
8123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8124 int argc;
8125 char **argv;
8126
8127 int main() {
8128
8129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8130
8131 ; return 0; }
8132 EOF
8133 if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8134   rm -rf conftest*
8135   am_cv_prog_cc_stdc="$ac_arg"; break
8136 else
8137   echo "configure: failed program was:" >&5
8138   cat conftest.$ac_ext >&5
8139 fi
8140 rm -f conftest*
8141 done
8142 CC="$ac_save_CC"
8143
8144 fi
8145
8146 if test -z "$am_cv_prog_cc_stdc"; then
8147   echo "$ac_t""none needed" 1>&6
8148 else
8149   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8150 fi
8151 case "x$am_cv_prog_cc_stdc" in
8152   x|xno) ;;
8153   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8154 esac
8155
8156 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8157         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8158 fi
8159
8160 # test for make depend flag
8161 OL_MKDEP=
8162 OL_MKDEP_FLAGS=
8163 if test -z "${MKDEP}"; then
8164         OL_MKDEP="${CC-cc}"
8165         if test -z "${MKDEP_FLAGS}"; then
8166                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8167 echo "configure:8168: checking for ${OL_MKDEP} depend flag" >&5
8168 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8169   echo $ac_n "(cached) $ac_c" 1>&6
8170 else
8171   
8172                         ol_cv_mkdep=no
8173                         for flag in "-M" "-xM"; do
8174                                 cat > conftest.c <<EOF
8175  noCode;
8176 EOF
8177                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8178                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8179                                 then
8180                                         if test ! -f conftest."${ac_object}" ; then
8181                                                 ol_cv_mkdep=$flag
8182                                                 OL_MKDEP_FLAGS="$flag"
8183                                                 break
8184                                         fi
8185                                 fi
8186                         done
8187                         rm -f conftest*
8188                 
8189 fi
8190
8191 echo "$ac_t""$ol_cv_mkdep" 1>&6
8192         else
8193                 cc_cv_mkdep=yes
8194                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8195         fi
8196 else
8197         cc_cv_mkdep=yes
8198         OL_MKDEP="${MKDEP}"
8199         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8200 fi
8201
8202
8203
8204 if test "${ol_cv_mkdep}" = no ; then
8205         # this will soon become an error
8206         echo "configure: warning: do not know how to generate dependencies" 1>&2
8207 fi
8208
8209 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8210 echo "configure:8211: checking for afopen in -ls" >&5
8211 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   ac_save_LIBS="$LIBS"
8216 LIBS="-ls  $LIBS"
8217 cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* Override any gcc2 internal prototype to avoid an error.  */
8221 /* We use char because int might match the return type of a gcc2
8222     builtin and then its argument prototype would still apply.  */
8223 char afopen();
8224
8225 int main() {
8226 afopen()
8227 ; return 0; }
8228 EOF
8229 if { (eval echo configure:8230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8230   rm -rf conftest*
8231   eval "ac_cv_lib_$ac_lib_var=yes"
8232 else
8233   echo "configure: failed program was:" >&5
8234   cat conftest.$ac_ext >&5
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=no"
8237 fi
8238 rm -f conftest*
8239 LIBS="$ac_save_LIBS"
8240
8241 fi
8242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8243   echo "$ac_t""yes" 1>&6
8244   
8245         AUTH_LIBS=-ls
8246         cat >> confdefs.h <<\EOF
8247 #define HAVE_AIX_SECURITY 1
8248 EOF
8249
8250
8251 else
8252   echo "$ac_t""no" 1>&6
8253 fi
8254
8255
8256 case "$target" in
8257 *-ibm-openedition)
8258         ac_cv_func_getopt=no
8259         cat >> confdefs.h <<\EOF
8260 #define BOTH_STRINGS_H 1
8261 EOF
8262
8263         ;;
8264 esac
8265
8266 ol_link_modules=no
8267 if test $ol_enable_modules != no ; then
8268         for ac_hdr in ltdl.h
8269 do
8270 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8271 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8272 echo "configure:8273: checking for $ac_hdr" >&5
8273 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   cat > conftest.$ac_ext <<EOF
8277 #line 8278 "configure"
8278 #include "confdefs.h"
8279 #include <$ac_hdr>
8280 EOF
8281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8282 { (eval echo configure:8283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8284 if test -z "$ac_err"; then
8285   rm -rf conftest*
8286   eval "ac_cv_header_$ac_safe=yes"
8287 else
8288   echo "$ac_err" >&5
8289   echo "configure: failed program was:" >&5
8290   cat conftest.$ac_ext >&5
8291   rm -rf conftest*
8292   eval "ac_cv_header_$ac_safe=no"
8293 fi
8294 rm -f conftest*
8295 fi
8296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8297   echo "$ac_t""yes" 1>&6
8298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8299   cat >> confdefs.h <<EOF
8300 #define $ac_tr_hdr 1
8301 EOF
8302  
8303 else
8304   echo "$ac_t""no" 1>&6
8305 fi
8306 done
8307
8308
8309         if test $ac_cv_header_ltdl_h = no ; then
8310                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8311         fi
8312
8313         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8314 echo "configure:8315: checking for lt_dlinit in -lltdl" >&5
8315 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8317   echo $ac_n "(cached) $ac_c" 1>&6
8318 else
8319   ac_save_LIBS="$LIBS"
8320 LIBS="-lltdl  $LIBS"
8321 cat > conftest.$ac_ext <<EOF
8322 #line 8323 "configure"
8323 #include "confdefs.h"
8324 /* Override any gcc2 internal prototype to avoid an error.  */
8325 /* We use char because int might match the return type of a gcc2
8326     builtin and then its argument prototype would still apply.  */
8327 char lt_dlinit();
8328
8329 int main() {
8330 lt_dlinit()
8331 ; return 0; }
8332 EOF
8333 if { (eval echo configure:8334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8334   rm -rf conftest*
8335   eval "ac_cv_lib_$ac_lib_var=yes"
8336 else
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=no"
8341 fi
8342 rm -f conftest*
8343 LIBS="$ac_save_LIBS"
8344
8345 fi
8346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348   
8349                 MODULES_LIBS=-lltdl
8350                 cat >> confdefs.h <<\EOF
8351 #define HAVE_LIBLTDL 1
8352 EOF
8353
8354         
8355 else
8356   echo "$ac_t""no" 1>&6
8357 fi
8358
8359
8360         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8361                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8362         fi
8363         ol_link_modules=yes
8364
8365 else
8366         for i in $Backends; do
8367                 eval "ol_tmp=\$ol_enable_$i"
8368                 if test $ol_tmp = mod ; then
8369                         echo "configure: warning: building static $i backend" 1>&2
8370                         eval "ol_enable_$i=yes"
8371                 fi
8372         done
8373         for i in $Overlays; do
8374                 eval "ol_tmp=\$ol_enable_$i"
8375                 if test $ol_tmp = mod ; then
8376                         echo "configure: warning: building static $i overlay" 1>&2
8377                         eval "ol_enable_$i=yes"
8378                 fi
8379         done
8380 fi
8381
8382 # test for EBCDIC
8383 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8384 echo "configure:8385: checking for EBCDIC" >&5
8385 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8386   echo $ac_n "(cached) $ac_c" 1>&6
8387 else
8388   
8389         cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392
8393 #if !('M' == 0xd4)
8394 #include <__ASCII__/generate_error.h>
8395 #endif
8396
8397 EOF
8398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8399 { (eval echo configure:8400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8401 if test -z "$ac_err"; then
8402   rm -rf conftest*
8403   ol_cv_cpp_ebcdic=yes
8404 else
8405   echo "$ac_err" >&5
8406   echo "configure: failed program was:" >&5
8407   cat conftest.$ac_ext >&5
8408   rm -rf conftest*
8409   ol_cv_cpp_ebcdic=no
8410 fi
8411 rm -f conftest*
8412 fi
8413
8414 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8415 if test $ol_cv_cpp_ebcdic = yes ; then
8416         cat >> confdefs.h <<\EOF
8417 #define HAVE_EBCDIC 1
8418 EOF
8419
8420 fi
8421
8422 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8423 echo "configure:8424: checking for ANSI C header files" >&5
8424 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8425   echo $ac_n "(cached) $ac_c" 1>&6
8426 else
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 #include <stdlib.h>
8431 #include <stdarg.h>
8432 #include <string.h>
8433 #include <float.h>
8434 EOF
8435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8436 { (eval echo configure:8437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8438 if test -z "$ac_err"; then
8439   rm -rf conftest*
8440   ol_cv_header_stdc=yes
8441 else
8442   echo "$ac_err" >&5
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -rf conftest*
8446   ol_cv_header_stdc=no
8447 fi
8448 rm -f conftest*
8449
8450 if test $ol_cv_header_stdc = yes; then
8451   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8452 cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 #include <string.h>
8456 EOF
8457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8458   egrep "memchr" >/dev/null 2>&1; then
8459   :
8460 else
8461   rm -rf conftest*
8462   ol_cv_header_stdc=no
8463 fi
8464 rm -f conftest*
8465
8466 fi
8467
8468 if test $ol_cv_header_stdc = yes; then
8469   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <stdlib.h>
8474 EOF
8475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8476   egrep "free" >/dev/null 2>&1; then
8477   :
8478 else
8479   rm -rf conftest*
8480   ol_cv_header_stdc=no
8481 fi
8482 rm -f conftest*
8483
8484 fi
8485
8486 if test $ol_cv_header_stdc = yes; then
8487   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8488 if test "$cross_compiling" = yes; then
8489   :
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 #include <ctype.h>
8495 #ifndef HAVE_EBCDIC
8496 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8497 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8498 #else
8499 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8500                 || ('j' <= (c) && (c) <= 'r') \
8501                 || ('s' <= (c) && (c) <= 'z'))
8502 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8503 #endif
8504 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8505 int main () { int i; for (i = 0; i < 256; i++)
8506 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8507 exit (0); }
8508
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8511 then
8512   :
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -fr conftest*
8517   ol_cv_header_stdc=no
8518 fi
8519 rm -fr conftest*
8520 fi
8521
8522 fi
8523 fi
8524
8525 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8526 if test $ol_cv_header_stdc = yes; then
8527   cat >> confdefs.h <<\EOF
8528 #define STDC_HEADERS 1
8529 EOF
8530
8531 fi
8532 ac_cv_header_stdc=disable
8533
8534
8535 if test $ol_cv_header_stdc != yes; then
8536         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8537 fi
8538
8539 ac_header_dirent=no
8540 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8541 do
8542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8543 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8544 echo "configure:8545: checking for $ac_hdr that defines DIR" >&5
8545 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 #include <sys/types.h>
8552 #include <$ac_hdr>
8553 int main() {
8554 DIR *dirp = 0;
8555 ; return 0; }
8556 EOF
8557 if { (eval echo configure:8558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8558   rm -rf conftest*
8559   eval "ac_cv_header_dirent_$ac_safe=yes"
8560 else
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   eval "ac_cv_header_dirent_$ac_safe=no"
8565 fi
8566 rm -f conftest*
8567 fi
8568 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8571   cat >> confdefs.h <<EOF
8572 #define $ac_tr_hdr 1
8573 EOF
8574  ac_header_dirent=$ac_hdr; break
8575 else
8576   echo "$ac_t""no" 1>&6
8577 fi
8578 done
8579 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8580 if test $ac_header_dirent = dirent.h; then
8581 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8582 echo "configure:8583: checking for opendir in -ldir" >&5
8583 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8585   echo $ac_n "(cached) $ac_c" 1>&6
8586 else
8587   ac_save_LIBS="$LIBS"
8588 LIBS="-ldir  $LIBS"
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 /* Override any gcc2 internal prototype to avoid an error.  */
8593 /* We use char because int might match the return type of a gcc2
8594     builtin and then its argument prototype would still apply.  */
8595 char opendir();
8596
8597 int main() {
8598 opendir()
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8602   rm -rf conftest*
8603   eval "ac_cv_lib_$ac_lib_var=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_lib_$ac_lib_var=no"
8609 fi
8610 rm -f conftest*
8611 LIBS="$ac_save_LIBS"
8612
8613 fi
8614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616   LIBS="$LIBS -ldir"
8617 else
8618   echo "$ac_t""no" 1>&6
8619 fi
8620
8621 else
8622 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8623 echo "configure:8624: checking for opendir in -lx" >&5
8624 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   ac_save_LIBS="$LIBS"
8629 LIBS="-lx  $LIBS"
8630 cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char opendir();
8637
8638 int main() {
8639 opendir()
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   eval "ac_cv_lib_$ac_lib_var=yes"
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=no"
8650 fi
8651 rm -f conftest*
8652 LIBS="$ac_save_LIBS"
8653
8654 fi
8655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8656   echo "$ac_t""yes" 1>&6
8657   LIBS="$LIBS -lx"
8658 else
8659   echo "$ac_t""no" 1>&6
8660 fi
8661
8662 fi
8663
8664 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8665 echo "configure:8666: checking for sys/wait.h that is POSIX.1 compatible" >&5
8666 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672 #include <sys/types.h>
8673 #include <sys/wait.h>
8674 #ifndef WEXITSTATUS
8675 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8676 #endif
8677 #ifndef WIFEXITED
8678 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8679 #endif
8680 int main() {
8681 int s;
8682 wait (&s);
8683 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8687   rm -rf conftest*
8688   ac_cv_header_sys_wait_h=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   ac_cv_header_sys_wait_h=no
8694 fi
8695 rm -f conftest*
8696 fi
8697
8698 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8699 if test $ac_cv_header_sys_wait_h = yes; then
8700   cat >> confdefs.h <<\EOF
8701 #define HAVE_SYS_WAIT_H 1
8702 EOF
8703
8704 fi
8705
8706 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8707 echo "configure:8708: checking POSIX termios" >&5
8708 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8709   echo $ac_n "(cached) $ac_c" 1>&6
8710 else
8711   cat > conftest.$ac_ext <<EOF
8712 #line 8713 "configure"
8713 #include "confdefs.h"
8714 #include <sys/types.h>
8715 #include <unistd.h>
8716 #include <termios.h>
8717 int main() {
8718 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8719    tcgetattr(0, 0);
8720 ; return 0; }
8721 EOF
8722 if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8723   rm -rf conftest*
8724   am_cv_sys_posix_termios=yes
8725 else
8726   echo "configure: failed program was:" >&5
8727   cat conftest.$ac_ext >&5
8728   rm -rf conftest*
8729   am_cv_sys_posix_termios=no
8730 fi
8731 rm -f conftest*
8732 fi
8733
8734 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8735
8736
8737  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8738 echo "configure:8739: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8739 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8740   echo $ac_n "(cached) $ac_c" 1>&6
8741 else
8742   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8743
8744   gwinsz_in_termios_h=no
8745   if test $am_cv_sys_posix_termios = yes; then
8746     cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 #include <sys/types.h>
8750 #     include <termios.h>
8751 #     ifdef TIOCGWINSZ
8752         yes
8753 #     endif
8754     
8755 EOF
8756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8757   egrep "yes" >/dev/null 2>&1; then
8758   rm -rf conftest*
8759   gwinsz_in_termios_h=yes
8760 fi
8761 rm -f conftest*
8762
8763   fi
8764
8765   if test $gwinsz_in_termios_h = no; then
8766     cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <sys/types.h>
8770 #     include <sys/ioctl.h>
8771 #     ifdef TIOCGWINSZ
8772         yes
8773 #     endif
8774     
8775 EOF
8776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8777   egrep "yes" >/dev/null 2>&1; then
8778   rm -rf conftest*
8779   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8780 fi
8781 rm -f conftest*
8782
8783   fi
8784   
8785 fi
8786
8787 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8788   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8789     cat >> confdefs.h <<\EOF
8790 #define GWINSZ_IN_SYS_IOCTL 1
8791 EOF
8792
8793   fi
8794
8795 if test $am_cv_sys_posix_termios = yes ; then
8796         cat >> confdefs.h <<\EOF
8797 #define HAVE_POSIX_TERMIOS 1
8798 EOF
8799
8800 fi
8801
8802 for ac_hdr in \
8803         arpa/inet.h             \
8804         arpa/nameser.h  \
8805         assert.h                \
8806         bits/types.h    \
8807         conio.h                 \
8808         crypt.h                 \
8809         direct.h                \
8810         errno.h                 \
8811         fcntl.h                 \
8812         filio.h                 \
8813         getopt.h                \
8814         grp.h                   \
8815         io.h                    \
8816         libutil.h               \
8817         limits.h                \
8818         locale.h                \
8819         netinet/tcp.h   \
8820         malloc.h                \
8821         memory.h                \
8822         psap.h                  \
8823         pwd.h                   \
8824         process.h               \
8825         resolv.h                \
8826         sgtty.h                 \
8827         shadow.h                \
8828         stddef.h                \
8829         string.h                \
8830         strings.h               \
8831         sysexits.h              \
8832         sys/file.h              \
8833         sys/filio.h             \
8834         sys/errno.h             \
8835         sys/ioctl.h             \
8836         sys/param.h             \
8837         sys/resource.h  \
8838         sys/select.h    \
8839         sys/socket.h    \
8840         sys/stat.h              \
8841         sys/syslog.h    \
8842         sys/time.h              \
8843         sys/types.h             \
8844         sys/ucred.h             \
8845         sys/uio.h               \
8846         syslog.h                \
8847         termios.h               \
8848         unistd.h                \
8849         winsock.h               \
8850         winsock2.h              \
8851
8852 do
8853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8855 echo "configure:8856: checking for $ac_hdr" >&5
8856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8857   echo $ac_n "(cached) $ac_c" 1>&6
8858 else
8859   cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 #include <$ac_hdr>
8863 EOF
8864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8865 { (eval echo configure:8866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8867 if test -z "$ac_err"; then
8868   rm -rf conftest*
8869   eval "ac_cv_header_$ac_safe=yes"
8870 else
8871   echo "$ac_err" >&5
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_header_$ac_safe=no"
8876 fi
8877 rm -f conftest*
8878 fi
8879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8880   echo "$ac_t""yes" 1>&6
8881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8882   cat >> confdefs.h <<EOF
8883 #define $ac_tr_hdr 1
8884 EOF
8885  
8886 else
8887   echo "$ac_t""no" 1>&6
8888 fi
8889 done
8890
8891
8892
8893
8894 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8895 echo "configure:8896: checking for sigset in -lV3" >&5
8896 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   ac_save_LIBS="$LIBS"
8901 LIBS="-lV3  $LIBS"
8902 cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 /* Override any gcc2 internal prototype to avoid an error.  */
8906 /* We use char because int might match the return type of a gcc2
8907     builtin and then its argument prototype would still apply.  */
8908 char sigset();
8909
8910 int main() {
8911 sigset()
8912 ; return 0; }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8915   rm -rf conftest*
8916   eval "ac_cv_lib_$ac_lib_var=yes"
8917 else
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_lib_$ac_lib_var=no"
8922 fi
8923 rm -f conftest*
8924 LIBS="$ac_save_LIBS"
8925
8926 fi
8927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8928   echo "$ac_t""yes" 1>&6
8929     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8930     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8931   cat >> confdefs.h <<EOF
8932 #define $ac_tr_lib 1
8933 EOF
8934
8935   LIBS="-lV3 $LIBS"
8936
8937 else
8938   echo "$ac_t""no" 1>&6
8939 fi
8940
8941
8942 if test "$ac_cv_header_winsock_h" = yes; then
8943 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8944 echo "configure:8945: checking for winsock" >&5
8945 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   save_LIBS="$LIBS"
8949 for curlib in ws2_32 wsock32; do
8950         LIBS="$LIBS -l$curlib"
8951         cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 #include <winsock.h>
8955                         
8956 int main() {
8957
8958                         socket(0,0,0);
8959                         select(0,NULL,NULL,NULL,NULL);
8960                         closesocket(0);
8961                         gethostname(NULL,0);
8962                         
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   ol_cv_winsock=yes
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   ol_cv_winsock=no
8973 fi
8974 rm -f conftest*
8975
8976         if test $ol_cv_winsock = yes; then
8977                 cat >> confdefs.h <<\EOF
8978 #define HAVE_WINSOCK 1
8979 EOF
8980
8981                 ac_cv_func_socket=yes
8982                 ac_cv_func_select=yes
8983                 ac_cv_func_closesocket=yes
8984                 ac_cv_func_gethostname=yes
8985                 if test $curlib = ws2_32; then
8986                         ol_cv_winsock=winsock2
8987                         cat >> confdefs.h <<\EOF
8988 #define HAVE_WINSOCK2 1
8989 EOF
8990
8991                 fi
8992                 break
8993         fi
8994         LIBS="$save_LIBS"
8995 done
8996 fi
8997
8998 echo "$ac_t""$ol_cv_winsock" 1>&6
8999 fi
9000
9001
9002 echo $ac_n "checking for socket""... $ac_c" 1>&6
9003 echo "configure:9004: checking for socket" >&5
9004 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9005   echo $ac_n "(cached) $ac_c" 1>&6
9006 else
9007   cat > conftest.$ac_ext <<EOF
9008 #line 9009 "configure"
9009 #include "confdefs.h"
9010 /* System header to define __stub macros and hopefully few prototypes,
9011     which can conflict with char socket(); below.  */
9012 #include <assert.h>
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 /* We use char because int might match the return type of a gcc2
9015     builtin and then its argument prototype would still apply.  */
9016 char socket();
9017 char (*f)();
9018
9019 int main() {
9020
9021 /* The GNU C library defines this for functions which it implements
9022     to always fail with ENOSYS.  Some functions are actually named
9023     something starting with __ and the normal name is an alias.  */
9024 #if defined (__stub_socket) || defined (__stub___socket)
9025 choke me
9026 #else
9027 f = socket;
9028 #endif
9029
9030 ; return 0; }
9031 EOF
9032 if { (eval echo configure:9033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9033   rm -rf conftest*
9034   eval "ac_cv_func_socket=yes"
9035 else
9036   echo "configure: failed program was:" >&5
9037   cat conftest.$ac_ext >&5
9038   rm -rf conftest*
9039   eval "ac_cv_func_socket=no"
9040 fi
9041 rm -f conftest*
9042 fi
9043
9044 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9045   echo "$ac_t""yes" 1>&6
9046   :
9047 else
9048   echo "$ac_t""no" 1>&6
9049         
9050         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9051 echo "configure:9052: checking for main in -lsocket" >&5
9052 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9054   echo $ac_n "(cached) $ac_c" 1>&6
9055 else
9056   ac_save_LIBS="$LIBS"
9057 LIBS="-lsocket  $LIBS"
9058 cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061
9062 int main() {
9063 main()
9064 ; return 0; }
9065 EOF
9066 if { (eval echo configure:9067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9067   rm -rf conftest*
9068   eval "ac_cv_lib_$ac_lib_var=yes"
9069 else
9070   echo "configure: failed program was:" >&5
9071   cat conftest.$ac_ext >&5
9072   rm -rf conftest*
9073   eval "ac_cv_lib_$ac_lib_var=no"
9074 fi
9075 rm -f conftest*
9076 LIBS="$ac_save_LIBS"
9077
9078 fi
9079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9080   echo "$ac_t""yes" 1>&6
9081     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9082     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9083   cat >> confdefs.h <<EOF
9084 #define $ac_tr_lib 1
9085 EOF
9086
9087   LIBS="-lsocket $LIBS"
9088
9089 else
9090   echo "$ac_t""no" 1>&6
9091 fi
9092
9093         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9094 echo "configure:9095: checking for main in -lnet" >&5
9095 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9097   echo $ac_n "(cached) $ac_c" 1>&6
9098 else
9099   ac_save_LIBS="$LIBS"
9100 LIBS="-lnet  $LIBS"
9101 cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104
9105 int main() {
9106 main()
9107 ; return 0; }
9108 EOF
9109 if { (eval echo configure:9110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9110   rm -rf conftest*
9111   eval "ac_cv_lib_$ac_lib_var=yes"
9112 else
9113   echo "configure: failed program was:" >&5
9114   cat conftest.$ac_ext >&5
9115   rm -rf conftest*
9116   eval "ac_cv_lib_$ac_lib_var=no"
9117 fi
9118 rm -f conftest*
9119 LIBS="$ac_save_LIBS"
9120
9121 fi
9122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9123   echo "$ac_t""yes" 1>&6
9124     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9125     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9126   cat >> confdefs.h <<EOF
9127 #define $ac_tr_lib 1
9128 EOF
9129
9130   LIBS="-lnet $LIBS"
9131
9132 else
9133   echo "$ac_t""no" 1>&6
9134 fi
9135
9136         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9137 echo "configure:9138: checking for main in -lnsl_s" >&5
9138 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9140   echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142   ac_save_LIBS="$LIBS"
9143 LIBS="-lnsl_s  $LIBS"
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147
9148 int main() {
9149 main()
9150 ; return 0; }
9151 EOF
9152 if { (eval echo configure:9153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9153   rm -rf conftest*
9154   eval "ac_cv_lib_$ac_lib_var=yes"
9155 else
9156   echo "configure: failed program was:" >&5
9157   cat conftest.$ac_ext >&5
9158   rm -rf conftest*
9159   eval "ac_cv_lib_$ac_lib_var=no"
9160 fi
9161 rm -f conftest*
9162 LIBS="$ac_save_LIBS"
9163
9164 fi
9165 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9166   echo "$ac_t""yes" 1>&6
9167     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9168     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9169   cat >> confdefs.h <<EOF
9170 #define $ac_tr_lib 1
9171 EOF
9172
9173   LIBS="-lnsl_s $LIBS"
9174
9175 else
9176   echo "$ac_t""no" 1>&6
9177 fi
9178
9179         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9180 echo "configure:9181: checking for main in -lnsl" >&5
9181 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9183   echo $ac_n "(cached) $ac_c" 1>&6
9184 else
9185   ac_save_LIBS="$LIBS"
9186 LIBS="-lnsl  $LIBS"
9187 cat > conftest.$ac_ext <<EOF
9188 #line 9189 "configure"
9189 #include "confdefs.h"
9190
9191 int main() {
9192 main()
9193 ; return 0; }
9194 EOF
9195 if { (eval echo configure:9196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9196   rm -rf conftest*
9197   eval "ac_cv_lib_$ac_lib_var=yes"
9198 else
9199   echo "configure: failed program was:" >&5
9200   cat conftest.$ac_ext >&5
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=no"
9203 fi
9204 rm -f conftest*
9205 LIBS="$ac_save_LIBS"
9206
9207 fi
9208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9209   echo "$ac_t""yes" 1>&6
9210     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9211     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9212   cat >> confdefs.h <<EOF
9213 #define $ac_tr_lib 1
9214 EOF
9215
9216   LIBS="-lnsl $LIBS"
9217
9218 else
9219   echo "$ac_t""no" 1>&6
9220 fi
9221
9222         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9223 echo "configure:9224: checking for socket in -linet" >&5
9224 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9226   echo $ac_n "(cached) $ac_c" 1>&6
9227 else
9228   ac_save_LIBS="$LIBS"
9229 LIBS="-linet  $LIBS"
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 /* Override any gcc2 internal prototype to avoid an error.  */
9234 /* We use char because int might match the return type of a gcc2
9235     builtin and then its argument prototype would still apply.  */
9236 char socket();
9237
9238 int main() {
9239 socket()
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=yes"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=no"
9250 fi
9251 rm -f conftest*
9252 LIBS="$ac_save_LIBS"
9253
9254 fi
9255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_lib 1
9261 EOF
9262
9263   LIBS="-linet $LIBS"
9264
9265 else
9266   echo "$ac_t""no" 1>&6
9267 fi
9268
9269         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9270 echo "configure:9271: checking for main in -lgen" >&5
9271 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   ac_save_LIBS="$LIBS"
9276 LIBS="-lgen  $LIBS"
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280
9281 int main() {
9282 main()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 LIBS="$ac_save_LIBS"
9296
9297 fi
9298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_lib 1
9304 EOF
9305
9306   LIBS="-lgen $LIBS"
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312
9313 fi
9314
9315
9316 echo $ac_n "checking for select""... $ac_c" 1>&6
9317 echo "configure:9318: checking for select" >&5
9318 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9319   echo $ac_n "(cached) $ac_c" 1>&6
9320 else
9321   cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324 /* System header to define __stub macros and hopefully few prototypes,
9325     which can conflict with char select(); below.  */
9326 #include <assert.h>
9327 /* Override any gcc2 internal prototype to avoid an error.  */
9328 /* We use char because int might match the return type of a gcc2
9329     builtin and then its argument prototype would still apply.  */
9330 char select();
9331 char (*f)();
9332
9333 int main() {
9334
9335 /* The GNU C library defines this for functions which it implements
9336     to always fail with ENOSYS.  Some functions are actually named
9337     something starting with __ and the normal name is an alias.  */
9338 #if defined (__stub_select) || defined (__stub___select)
9339 choke me
9340 #else
9341 f = select;
9342 #endif
9343
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9347   rm -rf conftest*
9348   eval "ac_cv_func_select=yes"
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -rf conftest*
9353   eval "ac_cv_func_select=no"
9354 fi
9355 rm -f conftest*
9356 fi
9357
9358 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9359   echo "$ac_t""yes" 1>&6
9360   :
9361 else
9362   echo "$ac_t""no" 1>&6
9363 { echo "configure: error: select() required." 1>&2; exit 1; }
9364 fi
9365
9366
9367 if test "${ac_cv_header_winsock_h}" != yes; then
9368                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9369 echo "configure:9370: checking types of arguments for select()" >&5
9370  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9374   echo $ac_n "(cached) $ac_c" 1>&6
9375 else
9376     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9377   echo $ac_n "(cached) $ac_c" 1>&6
9378 else
9379      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9380      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9381       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9382        cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 #ifdef HAVE_SYS_TYPES_H
9386 #include <sys/types.h>
9387 #endif
9388 #ifdef HAVE_SYS_TIME_H
9389 #include <sys/time.h>
9390 #endif
9391 #ifdef HAVE_SYS_SELECT_H
9392 #include <sys/select.h>
9393 #endif
9394 #ifdef HAVE_SYS_SOCKET_H
9395 #include <sys/socket.h>
9396 #endif
9397 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);
9398 int main() {
9399
9400 ; return 0; }
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9403   rm -rf conftest*
9404           ac_not_found=no ; break 3
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -rf conftest*
9409   ac_not_found=yes
9410 fi
9411 rm -f conftest*
9412       done
9413      done
9414     done
9415    
9416 fi
9417   
9418 fi
9419  
9420 fi
9421  if test "$ac_not_found" = yes; then
9422   ac_cv_func_select_arg1=int 
9423   ac_cv_func_select_arg234='int *' 
9424   ac_cv_func_select_arg5='struct timeval *'
9425  fi
9426  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9427  cat >> confdefs.h <<EOF
9428 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9429 EOF
9430
9431  cat >> confdefs.h <<EOF
9432 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9433 EOF
9434
9435  cat >> confdefs.h <<EOF
9436 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9437 EOF
9438
9439
9440 fi
9441
9442
9443 for ac_hdr in regex.h 
9444 do
9445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9447 echo "configure:9448: checking for $ac_hdr" >&5
9448 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9449   echo $ac_n "(cached) $ac_c" 1>&6
9450 else
9451   cat > conftest.$ac_ext <<EOF
9452 #line 9453 "configure"
9453 #include "confdefs.h"
9454 #include <$ac_hdr>
9455 EOF
9456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9457 { (eval echo configure:9458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9459 if test -z "$ac_err"; then
9460   rm -rf conftest*
9461   eval "ac_cv_header_$ac_safe=yes"
9462 else
9463   echo "$ac_err" >&5
9464   echo "configure: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   rm -rf conftest*
9467   eval "ac_cv_header_$ac_safe=no"
9468 fi
9469 rm -f conftest*
9470 fi
9471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9472   echo "$ac_t""yes" 1>&6
9473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9474   cat >> confdefs.h <<EOF
9475 #define $ac_tr_hdr 1
9476 EOF
9477  
9478 else
9479   echo "$ac_t""no" 1>&6
9480 fi
9481 done
9482
9483 if test "$ac_cv_header_regex_h" != yes ; then
9484         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9485 fi
9486
9487 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9488 echo "configure:9489: checking for library containing regfree" >&5
9489 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9490   echo $ac_n "(cached) $ac_c" 1>&6
9491 else
9492   ac_func_search_save_LIBS="$LIBS"
9493 ac_cv_search_regfree="no"
9494 cat > conftest.$ac_ext <<EOF
9495 #line 9496 "configure"
9496 #include "confdefs.h"
9497 /* Override any gcc2 internal prototype to avoid an error.  */
9498 /* We use char because int might match the return type of a gcc2
9499     builtin and then its argument prototype would still apply.  */
9500 char regfree();
9501
9502 int main() {
9503 regfree()
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9507   rm -rf conftest*
9508   ac_cv_search_regfree="none required"
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512 fi
9513 rm -f conftest*
9514 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9515 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9516 cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 /* Override any gcc2 internal prototype to avoid an error.  */
9520 /* We use char because int might match the return type of a gcc2
9521     builtin and then its argument prototype would still apply.  */
9522 char regfree();
9523
9524 int main() {
9525 regfree()
9526 ; return 0; }
9527 EOF
9528 if { (eval echo configure:9529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9529   rm -rf conftest*
9530   ac_cv_search_regfree="-l$ac_lib"
9531 break
9532 else
9533   echo "configure: failed program was:" >&5
9534   cat conftest.$ac_ext >&5
9535 fi
9536 rm -f conftest*
9537 done
9538 LIBS="$ac_func_search_save_LIBS"
9539 fi
9540
9541 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9542 if test "$ac_cv_search_regfree" != "no"; then
9543   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9544   :
9545 else :
9546   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9547 fi
9548
9549
9550 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9551 echo "configure:9552: checking for compatible POSIX regex" >&5
9552 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9553   echo $ac_n "(cached) $ac_c" 1>&6
9554 else
9555   
9556         if test "$cross_compiling" = yes; then
9557   ol_cv_c_posix_regex=cross
9558 else
9559   cat > conftest.$ac_ext <<EOF
9560 #line 9561 "configure"
9561 #include "confdefs.h"
9562
9563 #include <sys/types.h>
9564 #include <regex.h>
9565 static char *pattern, *string;
9566 main()
9567 {
9568         int rc;
9569         regex_t re;
9570
9571         pattern = "^A";
9572
9573         if(regcomp(&re, pattern, 0)) {
9574                 return -1;
9575         }
9576         
9577         string = "ALL MATCH";
9578         
9579         rc = regexec(&re, string, 0, (void*)0, 0);
9580
9581         regfree(&re);
9582
9583         return rc;
9584 }
9585 EOF
9586 if { (eval echo configure:9587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9587 then
9588   ol_cv_c_posix_regex=yes
9589 else
9590   echo "configure: failed program was:" >&5
9591   cat conftest.$ac_ext >&5
9592   rm -fr conftest*
9593   ol_cv_c_posix_regex=no
9594 fi
9595 rm -fr conftest*
9596 fi
9597
9598 fi
9599
9600 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9601
9602 if test "$ol_cv_c_posix_regex" = no ; then
9603         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9604 fi
9605
9606
9607 have_uuid=no
9608 for ac_hdr in sys/uuid.h
9609 do
9610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9612 echo "configure:9613: checking for $ac_hdr" >&5
9613 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 #include <$ac_hdr>
9620 EOF
9621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9622 { (eval echo configure:9623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9624 if test -z "$ac_err"; then
9625   rm -rf conftest*
9626   eval "ac_cv_header_$ac_safe=yes"
9627 else
9628   echo "$ac_err" >&5
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   eval "ac_cv_header_$ac_safe=no"
9633 fi
9634 rm -f conftest*
9635 fi
9636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9637   echo "$ac_t""yes" 1>&6
9638     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9639   cat >> confdefs.h <<EOF
9640 #define $ac_tr_hdr 1
9641 EOF
9642  
9643 else
9644   echo "$ac_t""no" 1>&6
9645 fi
9646 done
9647
9648 if test $ac_cv_header_sys_uuid_h = yes ; then
9649         save_LIBS="$LIBS"
9650         
9651 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9652 echo "configure:9653: checking for library containing uuid_to_str" >&5
9653 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9654   echo $ac_n "(cached) $ac_c" 1>&6
9655 else
9656   ac_func_search_save_LIBS="$LIBS"
9657 ac_cv_search_uuid_to_str="no"
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* Override any gcc2 internal prototype to avoid an error.  */
9662 /* We use char because int might match the return type of a gcc2
9663     builtin and then its argument prototype would still apply.  */
9664 char uuid_to_str();
9665
9666 int main() {
9667 uuid_to_str()
9668 ; return 0; }
9669 EOF
9670 if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9671   rm -rf conftest*
9672   ac_cv_search_uuid_to_str="none required"
9673 else
9674   echo "configure: failed program was:" >&5
9675   cat conftest.$ac_ext >&5
9676 fi
9677 rm -f conftest*
9678 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9679 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9680 cat > conftest.$ac_ext <<EOF
9681 #line 9682 "configure"
9682 #include "confdefs.h"
9683 /* Override any gcc2 internal prototype to avoid an error.  */
9684 /* We use char because int might match the return type of a gcc2
9685     builtin and then its argument prototype would still apply.  */
9686 char uuid_to_str();
9687
9688 int main() {
9689 uuid_to_str()
9690 ; return 0; }
9691 EOF
9692 if { (eval echo configure:9693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9693   rm -rf conftest*
9694   ac_cv_search_uuid_to_str="-l$ac_lib"
9695 break
9696 else
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699 fi
9700 rm -f conftest*
9701 done
9702 LIBS="$ac_func_search_save_LIBS"
9703 fi
9704
9705 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9706 if test "$ac_cv_search_uuid_to_str" != "no"; then
9707   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9708   have_uuid=yes
9709 else :
9710   :
9711 fi
9712         LIBS="$save_LIBS"
9713
9714         if test have_uuid = yes ; then
9715                 cat >> confdefs.h <<\EOF
9716 #define HAVE_UUID_TO_STR 1
9717 EOF
9718
9719
9720                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9721                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9722         fi
9723 fi
9724
9725 if test $have_uuid = no ; then
9726         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9727 echo "configure:9728: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9728         save_LIBS="$LIBS"
9729         LIBS="$LIBS -lrpcrt4"
9730         cat > conftest.$ac_ext <<EOF
9731 #line 9732 "configure"
9732 #include "confdefs.h"
9733
9734                 int __stdcall UuidCreate(void *);
9735                 int __stdcall UuidToStringA(void *,void **);
9736                 
9737 int main() {
9738
9739                 UuidCreate(0);
9740                 UuidToStringA(0,0);
9741                 
9742 ; return 0; }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9745   rm -rf conftest*
9746   need_rpcrt=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -rf conftest*
9751   need_rpcrt=no
9752 fi
9753 rm -f conftest*
9754         if test $need_rpcrt = yes; then
9755                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9756         fi
9757         LIBS="$save_LIBS"
9758         echo "$ac_t""$need_rpcrt" 1>&6
9759 fi
9760
9761 ol_link_dnssrv=no
9762 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9763 echo "configure:9764: checking for res_query" >&5
9764 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9765   echo $ac_n "(cached) $ac_c" 1>&6
9766 else
9767   cat > conftest.$ac_ext <<EOF
9768 #line 9769 "configure"
9769 #include "confdefs.h"
9770 /* System header to define __stub macros and hopefully few prototypes,
9771     which can conflict with char res_query(); below.  */
9772 #include <assert.h>
9773 /* Override any gcc2 internal prototype to avoid an error.  */
9774 /* We use char because int might match the return type of a gcc2
9775     builtin and then its argument prototype would still apply.  */
9776 char res_query();
9777 char (*f)();
9778
9779 int main() {
9780
9781 /* The GNU C library defines this for functions which it implements
9782     to always fail with ENOSYS.  Some functions are actually named
9783     something starting with __ and the normal name is an alias.  */
9784 #if defined (__stub_res_query) || defined (__stub___res_query)
9785 choke me
9786 #else
9787 f = res_query;
9788 #endif
9789
9790 ; return 0; }
9791 EOF
9792 if { (eval echo configure:9793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9793   rm -rf conftest*
9794   eval "ac_cv_func_res_query=yes"
9795 else
9796   echo "configure: failed program was:" >&5
9797   cat conftest.$ac_ext >&5
9798   rm -rf conftest*
9799   eval "ac_cv_func_res_query=no"
9800 fi
9801 rm -f conftest*
9802 fi
9803
9804 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9805   echo "$ac_t""yes" 1>&6
9806   :
9807 else
9808   echo "$ac_t""no" 1>&6
9809 fi
9810
9811 if test $ac_cv_func_res_query = no ; then 
9812         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9813 echo "configure:9814: checking for __res_query" >&5
9814 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9815   echo $ac_n "(cached) $ac_c" 1>&6
9816 else
9817   cat > conftest.$ac_ext <<EOF
9818 #line 9819 "configure"
9819 #include "confdefs.h"
9820 /* System header to define __stub macros and hopefully few prototypes,
9821     which can conflict with char __res_query(); below.  */
9822 #include <assert.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 __res_query();
9827 char (*f)();
9828
9829 int main() {
9830
9831 /* The GNU C library defines this for functions which it implements
9832     to always fail with ENOSYS.  Some functions are actually named
9833     something starting with __ and the normal name is an alias.  */
9834 #if defined (__stub___res_query) || defined (__stub_____res_query)
9835 choke me
9836 #else
9837 f = __res_query;
9838 #endif
9839
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   eval "ac_cv_func___res_query=yes"
9845 else
9846   echo "configure: failed program was:" >&5
9847   cat conftest.$ac_ext >&5
9848   rm -rf conftest*
9849   eval "ac_cv_func___res_query=no"
9850 fi
9851 rm -f conftest*
9852 fi
9853
9854 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9855   echo "$ac_t""yes" 1>&6
9856   :
9857 else
9858   echo "$ac_t""no" 1>&6
9859 fi
9860
9861         ac_cv_func_res_query=$ac_cv_func___res_query
9862 fi
9863
9864 if test $ac_cv_func_res_query = no ; then 
9865         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9866 echo "configure:9867: checking for res_query in -lbind" >&5
9867 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9869   echo $ac_n "(cached) $ac_c" 1>&6
9870 else
9871   ac_save_LIBS="$LIBS"
9872 LIBS="-lbind  $LIBS"
9873 cat > conftest.$ac_ext <<EOF
9874 #line 9875 "configure"
9875 #include "confdefs.h"
9876 /* Override any gcc2 internal prototype to avoid an error.  */
9877 /* We use char because int might match the return type of a gcc2
9878     builtin and then its argument prototype would still apply.  */
9879 char res_query();
9880
9881 int main() {
9882 res_query()
9883 ; return 0; }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9886   rm -rf conftest*
9887   eval "ac_cv_lib_$ac_lib_var=yes"
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891   rm -rf conftest*
9892   eval "ac_cv_lib_$ac_lib_var=no"
9893 fi
9894 rm -f conftest*
9895 LIBS="$ac_save_LIBS"
9896
9897 fi
9898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9899   echo "$ac_t""yes" 1>&6
9900     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9902   cat >> confdefs.h <<EOF
9903 #define $ac_tr_lib 1
9904 EOF
9905
9906   LIBS="-lbind $LIBS"
9907
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911
9912         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9913 fi
9914
9915 if test $ac_cv_func_res_query = no ; then 
9916         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9917 echo "configure:9918: checking for __res_query in -lbind" >&5
9918 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   ac_save_LIBS="$LIBS"
9923 LIBS="-lbind  $LIBS"
9924 cat > conftest.$ac_ext <<EOF
9925 #line 9926 "configure"
9926 #include "confdefs.h"
9927 /* Override any gcc2 internal prototype to avoid an error.  */
9928 /* We use char because int might match the return type of a gcc2
9929     builtin and then its argument prototype would still apply.  */
9930 char __res_query();
9931
9932 int main() {
9933 __res_query()
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   eval "ac_cv_lib_$ac_lib_var=yes"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_lib_$ac_lib_var=no"
9944 fi
9945 rm -f conftest*
9946 LIBS="$ac_save_LIBS"
9947
9948 fi
9949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9950   echo "$ac_t""yes" 1>&6
9951     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9953   cat >> confdefs.h <<EOF
9954 #define $ac_tr_lib 1
9955 EOF
9956
9957   LIBS="-lbind $LIBS"
9958
9959 else
9960   echo "$ac_t""no" 1>&6
9961 fi
9962
9963         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9964 fi
9965
9966 if test $ac_cv_func_res_query = no ; then 
9967         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9968 echo "configure:9969: checking for res_query in -lresolv" >&5
9969 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9970 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9971   echo $ac_n "(cached) $ac_c" 1>&6
9972 else
9973   ac_save_LIBS="$LIBS"
9974 LIBS="-lresolv  $LIBS"
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char res_query();
9982
9983 int main() {
9984 res_query()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_lib_$ac_lib_var=no"
9995 fi
9996 rm -f conftest*
9997 LIBS="$ac_save_LIBS"
9998
9999 fi
10000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10001   echo "$ac_t""yes" 1>&6
10002     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10003     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10004   cat >> confdefs.h <<EOF
10005 #define $ac_tr_lib 1
10006 EOF
10007
10008   LIBS="-lresolv $LIBS"
10009
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10015 fi
10016
10017 if test $ac_cv_func_res_query = no ; then 
10018         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10019 echo "configure:10020: checking for __res_query in -lresolv" >&5
10020 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10022   echo $ac_n "(cached) $ac_c" 1>&6
10023 else
10024   ac_save_LIBS="$LIBS"
10025 LIBS="-lresolv  $LIBS"
10026 cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029 /* Override any gcc2 internal prototype to avoid an error.  */
10030 /* We use char because int might match the return type of a gcc2
10031     builtin and then its argument prototype would still apply.  */
10032 char __res_query();
10033
10034 int main() {
10035 __res_query()
10036 ; return 0; }
10037 EOF
10038 if { (eval echo configure:10039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10039   rm -rf conftest*
10040   eval "ac_cv_lib_$ac_lib_var=yes"
10041 else
10042   echo "configure: failed program was:" >&5
10043   cat conftest.$ac_ext >&5
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=no"
10046 fi
10047 rm -f conftest*
10048 LIBS="$ac_save_LIBS"
10049
10050 fi
10051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10052   echo "$ac_t""yes" 1>&6
10053     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10054     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10055   cat >> confdefs.h <<EOF
10056 #define $ac_tr_lib 1
10057 EOF
10058
10059   LIBS="-lresolv $LIBS"
10060
10061 else
10062   echo "$ac_t""no" 1>&6
10063 fi
10064
10065         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10066 fi
10067
10068 if test "$ac_cv_func_res_query" = yes ; then
10069         cat >> confdefs.h <<\EOF
10070 #define HAVE_RES_QUERY 1
10071 EOF
10072
10073
10074         if test $ol_enable_dnssrv != no ; then
10075                 ol_link_dnssrv=yes
10076         fi
10077 fi
10078
10079 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10080         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10081 fi
10082
10083 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10084 do
10085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10086 echo "configure:10087: checking for $ac_func" >&5
10087 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10088   echo $ac_n "(cached) $ac_c" 1>&6
10089 else
10090   cat > conftest.$ac_ext <<EOF
10091 #line 10092 "configure"
10092 #include "confdefs.h"
10093 /* System header to define __stub macros and hopefully few prototypes,
10094     which can conflict with char $ac_func(); below.  */
10095 #include <assert.h>
10096 /* Override any gcc2 internal prototype to avoid an error.  */
10097 /* We use char because int might match the return type of a gcc2
10098     builtin and then its argument prototype would still apply.  */
10099 char $ac_func();
10100 char (*f)();
10101
10102 int main() {
10103
10104 /* The GNU C library defines this for functions which it implements
10105     to always fail with ENOSYS.  Some functions are actually named
10106     something starting with __ and the normal name is an alias.  */
10107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10108 choke me
10109 #else
10110 f = $ac_func;
10111 #endif
10112
10113 ; return 0; }
10114 EOF
10115 if { (eval echo configure:10116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10116   rm -rf conftest*
10117   eval "ac_cv_func_$ac_func=yes"
10118 else
10119   echo "configure: failed program was:" >&5
10120   cat conftest.$ac_ext >&5
10121   rm -rf conftest*
10122   eval "ac_cv_func_$ac_func=no"
10123 fi
10124 rm -f conftest*
10125 fi
10126
10127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10128   echo "$ac_t""yes" 1>&6
10129     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10130   cat >> confdefs.h <<EOF
10131 #define $ac_tr_func 1
10132 EOF
10133  
10134 else
10135   echo "$ac_t""no" 1>&6
10136 fi
10137 done
10138
10139
10140 ol_link_ipv6=no
10141 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10142         if test $ol_enable_ipv6 = yes ; then
10143                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10144         fi
10145 elif test $ol_enable_ipv6 != no ; then
10146         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10147 echo "configure:10148: checking INET6_ADDRSTRLEN" >&5
10148 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   
10152                 cat > conftest.$ac_ext <<EOF
10153 #line 10154 "configure"
10154 #include "confdefs.h"
10155
10156 #                       include <netinet/in.h>
10157 #                       ifdef INET6_ADDRSTRLEN
10158                                 __has_inet6_addrstrlen__;
10159 #                       endif
10160                 
10161 EOF
10162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10163   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10164   rm -rf conftest*
10165   ol_cv_inet6_addrstrlen=yes
10166 else
10167   rm -rf conftest*
10168   ol_cv_inet6_addrstrlen=no
10169 fi
10170 rm -f conftest*
10171
10172 fi
10173
10174 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10175
10176
10177         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10178 echo "configure:10179: checking struct sockaddr_storage" >&5
10179 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10180   echo $ac_n "(cached) $ac_c" 1>&6
10181 else
10182   
10183                 cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186
10187 #include <sys/types.h>
10188 #include <sys/socket.h>
10189
10190 int main() {
10191
10192                         struct sockaddr_storage ss;
10193
10194 ; return 0; }
10195 EOF
10196 if { (eval echo configure:10197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10197   rm -rf conftest*
10198   ol_cv_struct_sockaddr_storage=yes
10199 else
10200   echo "configure: failed program was:" >&5
10201   cat conftest.$ac_ext >&5
10202   rm -rf conftest*
10203   ol_cv_struct_sockaddr_storage=no
10204 fi
10205 rm -f conftest*
10206 fi
10207
10208 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10209
10210         if test $ol_cv_inet6_addrstrlen = yes \
10211                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10212                 ol_link_ipv6=yes
10213         elif test $ol_enable_ipv6 = yes \
10214                         -a $ol_cv_inet6_addrstrlen = no ; then
10215                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10216         elif test $ol_enable_ipv6 = yes \
10217                         -a $ol_cv_struct_sockaddr_storage = no ; then
10218                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10219         fi
10220 fi
10221
10222 if test $ol_enable_local != no ; then
10223         for ac_hdr in sys/un.h 
10224 do
10225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10227 echo "configure:10228: checking for $ac_hdr" >&5
10228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10229   echo $ac_n "(cached) $ac_c" 1>&6
10230 else
10231   cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include <$ac_hdr>
10235 EOF
10236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10237 { (eval echo configure:10238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10239 if test -z "$ac_err"; then
10240   rm -rf conftest*
10241   eval "ac_cv_header_$ac_safe=yes"
10242 else
10243   echo "$ac_err" >&5
10244   echo "configure: failed program was:" >&5
10245   cat conftest.$ac_ext >&5
10246   rm -rf conftest*
10247   eval "ac_cv_header_$ac_safe=no"
10248 fi
10249 rm -f conftest*
10250 fi
10251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10252   echo "$ac_t""yes" 1>&6
10253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10254   cat >> confdefs.h <<EOF
10255 #define $ac_tr_hdr 1
10256 EOF
10257  
10258 else
10259   echo "$ac_t""no" 1>&6
10260 fi
10261 done
10262
10263
10264         if test $ol_enable_local = auto ; then
10265                 ol_enable_local=$ac_cv_header_sys_un_h
10266         elif test $ac_cv_header_sys_un_h = no ; then
10267                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10268         fi
10269 fi
10270
10271 ol_link_kbind=no
10272 ol_link_krb5=no
10273 ol_link_krb4=no
10274
10275 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10276         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10277         -o $ol_with_kerberos = k425 ; then
10278
10279         for ac_hdr in krb5.h
10280 do
10281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10283 echo "configure:10284: checking for $ac_hdr" >&5
10284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10285   echo $ac_n "(cached) $ac_c" 1>&6
10286 else
10287   cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290 #include <$ac_hdr>
10291 EOF
10292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10293 { (eval echo configure:10294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10295 if test -z "$ac_err"; then
10296   rm -rf conftest*
10297   eval "ac_cv_header_$ac_safe=yes"
10298 else
10299   echo "$ac_err" >&5
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302   rm -rf conftest*
10303   eval "ac_cv_header_$ac_safe=no"
10304 fi
10305 rm -f conftest*
10306 fi
10307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10308   echo "$ac_t""yes" 1>&6
10309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10310   cat >> confdefs.h <<EOF
10311 #define $ac_tr_hdr 1
10312 EOF
10313  
10314 else
10315   echo "$ac_t""no" 1>&6
10316 fi
10317 done
10318
10319
10320         if test $ac_cv_header_krb5_h = yes ; then
10321                                 for ac_hdr in heim_err.h
10322 do
10323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10325 echo "configure:10326: checking for $ac_hdr" >&5
10326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   cat > conftest.$ac_ext <<EOF
10330 #line 10331 "configure"
10331 #include "confdefs.h"
10332 #include <$ac_hdr>
10333 EOF
10334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10335 { (eval echo configure:10336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10337 if test -z "$ac_err"; then
10338   rm -rf conftest*
10339   eval "ac_cv_header_$ac_safe=yes"
10340 else
10341   echo "$ac_err" >&5
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -rf conftest*
10345   eval "ac_cv_header_$ac_safe=no"
10346 fi
10347 rm -f conftest*
10348 fi
10349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10350   echo "$ac_t""yes" 1>&6
10351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10352   cat >> confdefs.h <<EOF
10353 #define $ac_tr_hdr 1
10354 EOF
10355  
10356 else
10357   echo "$ac_t""no" 1>&6
10358 fi
10359 done
10360
10361                 if test $ac_cv_header_heim_err_h = yes ; then
10362                         krb5_impl=heimdal
10363                 else
10364                         krb5_impl=mit
10365                 fi
10366
10367                 if test $krb5_impl = mit; then
10368                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10369 echo "configure:10370: checking for main in -lk5crypto" >&5
10370 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10372   echo $ac_n "(cached) $ac_c" 1>&6
10373 else
10374   ac_save_LIBS="$LIBS"
10375 LIBS="-lk5crypto  $LIBS"
10376 cat > conftest.$ac_ext <<EOF
10377 #line 10378 "configure"
10378 #include "confdefs.h"
10379
10380 int main() {
10381 main()
10382 ; return 0; }
10383 EOF
10384 if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10385   rm -rf conftest*
10386   eval "ac_cv_lib_$ac_lib_var=yes"
10387 else
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   eval "ac_cv_lib_$ac_lib_var=no"
10392 fi
10393 rm -f conftest*
10394 LIBS="$ac_save_LIBS"
10395
10396 fi
10397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10398   echo "$ac_t""yes" 1>&6
10399   krb5crypto=k5crypto
10400 else
10401   echo "$ac_t""no" 1>&6
10402 krb5crypto=crypto
10403 fi
10404
10405
10406                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10407 echo "configure:10408: checking for main in -lkrb5" >&5
10408 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10410   echo $ac_n "(cached) $ac_c" 1>&6
10411 else
10412   ac_save_LIBS="$LIBS"
10413 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10414 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417
10418 int main() {
10419 main()
10420 ; return 0; }
10421 EOF
10422 if { (eval echo configure:10423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10423   rm -rf conftest*
10424   eval "ac_cv_lib_$ac_lib_var=yes"
10425 else
10426   echo "configure: failed program was:" >&5
10427   cat conftest.$ac_ext >&5
10428   rm -rf conftest*
10429   eval "ac_cv_lib_$ac_lib_var=no"
10430 fi
10431 rm -f conftest*
10432 LIBS="$ac_save_LIBS"
10433
10434 fi
10435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10436   echo "$ac_t""yes" 1>&6
10437   have_krb5=yes
10438                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10439 else
10440   echo "$ac_t""no" 1>&6
10441 have_krb5=no
10442 fi
10443
10444
10445                 elif test $krb5_impl = heimdal; then
10446                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10447 echo "configure:10448: checking for main in -ldes" >&5
10448 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10449 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   ac_save_LIBS="$LIBS"
10453 LIBS="-ldes  $LIBS"
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10456 "configure"
10456 #include "confdefs.h"
10457
10458 int main() {
10459 main()
10460 ; return 0; }
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10463   rm -rf conftest*
10464   eval "ac_cv_lib_$ac_lib_var=yes"
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -rf conftest*
10469   eval "ac_cv_lib_$ac_lib_var=no"
10470 fi
10471 rm -f conftest*
10472 LIBS="$ac_save_LIBS"
10473
10474 fi
10475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10476   echo "$ac_t""yes" 1>&6
10477   krb5crypto=des
10478 else
10479   echo "$ac_t""no" 1>&6
10480 krb5crypto=crypto
10481 fi
10482
10483
10484                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10485 echo "configure:10486: checking for main in -lkrb5" >&5
10486 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10487 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10488   echo $ac_n "(cached) $ac_c" 1>&6
10489 else
10490   ac_save_LIBS="$LIBS"
10491 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10492 cat > conftest.$ac_ext <<EOF
10493 #line 10494 "configure"
10494 #include "confdefs.h"
10495
10496 int main() {
10497 main()
10498 ; return 0; }
10499 EOF
10500 if { (eval echo configure:10501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10501   rm -rf conftest*
10502   eval "ac_cv_lib_$ac_lib_var=yes"
10503 else
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -rf conftest*
10507   eval "ac_cv_lib_$ac_lib_var=no"
10508 fi
10509 rm -f conftest*
10510 LIBS="$ac_save_LIBS"
10511
10512 fi
10513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10514   echo "$ac_t""yes" 1>&6
10515   have_krb5=yes
10516                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10517 else
10518   echo "$ac_t""no" 1>&6
10519 have_krb5=no
10520 fi
10521
10522
10523                         cat >> confdefs.h <<\EOF
10524 #define HAVE_HEIMDAL_KERBEROS 1
10525 EOF
10526
10527
10528                 else
10529                         have_krb5=no
10530                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10531                 fi
10532
10533                 if test $have_krb5 = yes ; then
10534                         ol_link_krb5=yes
10535
10536                         cat >> confdefs.h <<\EOF
10537 #define HAVE_KRB5 1
10538 EOF
10539
10540
10541                         if test $ol_with_kerberos = k5only ; then
10542                                 ol_with_kerberos=found
10543                         fi
10544
10545                 elif test $ol_with_kerberos != auto ; then
10546                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10547                 fi
10548
10549         fi
10550 fi
10551
10552 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10553         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10554
10555         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10556 do
10557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10559 echo "configure:10560: checking for $ac_hdr" >&5
10560 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10561   echo $ac_n "(cached) $ac_c" 1>&6
10562 else
10563   cat > conftest.$ac_ext <<EOF
10564 #line 10565 "configure"
10565 #include "confdefs.h"
10566 #include <$ac_hdr>
10567 EOF
10568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10569 { (eval echo configure:10570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10571 if test -z "$ac_err"; then
10572   rm -rf conftest*
10573   eval "ac_cv_header_$ac_safe=yes"
10574 else
10575   echo "$ac_err" >&5
10576   echo "configure: failed program was:" >&5
10577   cat conftest.$ac_ext >&5
10578   rm -rf conftest*
10579   eval "ac_cv_header_$ac_safe=no"
10580 fi
10581 rm -f conftest*
10582 fi
10583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10584   echo "$ac_t""yes" 1>&6
10585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10586   cat >> confdefs.h <<EOF
10587 #define $ac_tr_hdr 1
10588 EOF
10589  
10590 else
10591   echo "$ac_t""no" 1>&6
10592 fi
10593 done
10594
10595
10596         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10597                 if test $krb5_impl = mit; then
10598                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10599 echo "configure:10600: checking for main in -lkrb4" >&5
10600 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10602   echo $ac_n "(cached) $ac_c" 1>&6
10603 else
10604   ac_save_LIBS="$LIBS"
10605 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10606 cat > conftest.$ac_ext <<EOF
10607 #line 10608 "configure"
10608 #include "confdefs.h"
10609
10610 int main() {
10611 main()
10612 ; return 0; }
10613 EOF
10614 if { (eval echo configure:10615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10615   rm -rf conftest*
10616   eval "ac_cv_lib_$ac_lib_var=yes"
10617 else
10618   echo "configure: failed program was:" >&5
10619   cat conftest.$ac_ext >&5
10620   rm -rf conftest*
10621   eval "ac_cv_lib_$ac_lib_var=no"
10622 fi
10623 rm -f conftest*
10624 LIBS="$ac_save_LIBS"
10625
10626 fi
10627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629   have_k425=yes
10630                                 KRB4_LIBS="-lkrb4 -ldes425"
10631 else
10632   echo "$ac_t""no" 1>&6
10633 have_k425=no
10634 fi
10635
10636
10637                 elif test $krb5_impl = heimdal; then
10638                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10639 echo "configure:10640: checking for main in -lkrb4" >&5
10640 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   ac_save_LIBS="$LIBS"
10645 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10646 cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649
10650 int main() {
10651 main()
10652 ; return 0; }
10653 EOF
10654 if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10655   rm -rf conftest*
10656   eval "ac_cv_lib_$ac_lib_var=yes"
10657 else
10658   echo "configure: failed program was:" >&5
10659   cat conftest.$ac_ext >&5
10660   rm -rf conftest*
10661   eval "ac_cv_lib_$ac_lib_var=no"
10662 fi
10663 rm -f conftest*
10664 LIBS="$ac_save_LIBS"
10665
10666 fi
10667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10668   echo "$ac_t""yes" 1>&6
10669   have_k425=yes
10670                                 KRB4_LIBS="-lkrb4"
10671 else
10672   echo "$ac_t""no" 1>&6
10673 have_k425=no
10674 fi
10675
10676
10677                 else
10678                         have_425=no
10679                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10680                 fi
10681
10682                 if test $have_k425 = yes ; then
10683                         ol_with_kerberos=found
10684                         ol_link_krb4=yes
10685
10686                         cat >> confdefs.h <<\EOF
10687 #define HAVE_KRB425 1
10688 EOF
10689
10690                         cat >> confdefs.h <<\EOF
10691 #define HAVE_KRB4 1
10692 EOF
10693
10694
10695                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10696 echo "configure:10697: checking for des_debug in Kerberos libraries" >&5
10697 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10698   echo $ac_n "(cached) $ac_c" 1>&6
10699 else
10700   
10701                                                                 save_LIBS="$LIBS"
10702                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10703                                 cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706
10707 #include <kerberosIV/krb.h>
10708 #include <kerberosIV/des.h>
10709 extern int des_debug;
10710
10711 int main() {
10712
10713 des_debug = 1;
10714
10715 ; return 0; }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10718   rm -rf conftest*
10719   ol_cv_var_des_debug=yes
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   ol_cv_var_des_debug=no
10725 fi
10726 rm -f conftest*
10727                                                                 LIBS="$save_LIBS"
10728                         
10729 fi
10730
10731 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10732
10733                         if test $ol_cv_var_des_debug = yes ; then
10734                                 cat >> confdefs.h <<\EOF
10735 #define HAVE_DES_DEBUG 1
10736 EOF
10737
10738                         fi
10739
10740                         LIBS="$save_LIBS"
10741                 fi
10742         fi
10743 fi
10744
10745 if test $ol_link_krb5 = yes ; then
10746         ol_with_kerberos=found
10747 fi
10748
10749 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10750         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10751
10752         for ac_hdr in krb.h des.h krb-archaeology.h 
10753 do
10754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10756 echo "configure:10757: checking for $ac_hdr" >&5
10757 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10758   echo $ac_n "(cached) $ac_c" 1>&6
10759 else
10760   cat > conftest.$ac_ext <<EOF
10761 #line 10762 "configure"
10762 #include "confdefs.h"
10763 #include <$ac_hdr>
10764 EOF
10765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10766 { (eval echo configure:10767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10768 if test -z "$ac_err"; then
10769   rm -rf conftest*
10770   eval "ac_cv_header_$ac_safe=yes"
10771 else
10772   echo "$ac_err" >&5
10773   echo "configure: failed program was:" >&5
10774   cat conftest.$ac_ext >&5
10775   rm -rf conftest*
10776   eval "ac_cv_header_$ac_safe=no"
10777 fi
10778 rm -f conftest*
10779 fi
10780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10781   echo "$ac_t""yes" 1>&6
10782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10783   cat >> confdefs.h <<EOF
10784 #define $ac_tr_hdr 1
10785 EOF
10786  
10787 else
10788   echo "$ac_t""no" 1>&6
10789 fi
10790 done
10791
10792
10793         if test $ac_cv_header_krb_h = yes ; then
10794                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10795 echo "configure:10796: checking for main in -lkrb" >&5
10796 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10798   echo $ac_n "(cached) $ac_c" 1>&6
10799 else
10800   ac_save_LIBS="$LIBS"
10801 LIBS="-lkrb -ldes $LIBS"
10802 cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805
10806 int main() {
10807 main()
10808 ; return 0; }
10809 EOF
10810 if { (eval echo configure:10811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10811   rm -rf conftest*
10812   eval "ac_cv_lib_$ac_lib_var=yes"
10813 else
10814   echo "configure: failed program was:" >&5
10815   cat conftest.$ac_ext >&5
10816   rm -rf conftest*
10817   eval "ac_cv_lib_$ac_lib_var=no"
10818 fi
10819 rm -f conftest*
10820 LIBS="$ac_save_LIBS"
10821
10822 fi
10823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10824   echo "$ac_t""yes" 1>&6
10825   have_k4=yes
10826 else
10827   echo "$ac_t""no" 1>&6
10828 have_k4=no
10829 fi
10830
10831
10832                 if test $have_k4 = yes ; then
10833                         ol_with_kerberos=found
10834                         ol_link_krb4=yes
10835
10836                         cat >> confdefs.h <<\EOF
10837 #define HAVE_KRB4 1
10838 EOF
10839
10840
10841                         KRB4_LIBS="-lkrb -ldes"
10842
10843                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10844                                 cat >> confdefs.h <<\EOF
10845 #define HAVE_KTH_KERBEROS 1
10846 EOF
10847
10848                         fi
10849                 fi
10850         fi
10851 fi
10852
10853 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10854         ol_link_kbind=yes
10855
10856 elif test $ol_enable_kbind = yes ; then
10857         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10858 fi
10859
10860 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10861         cat >> confdefs.h <<\EOF
10862 #define HAVE_KERBEROS 1
10863 EOF
10864
10865
10866 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10867         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10868 fi
10869
10870 ol_link_tls=no
10871 if test $ol_with_tls != no ; then
10872         for ac_hdr in openssl/ssl.h ssl.h
10873 do
10874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10876 echo "configure:10877: checking for $ac_hdr" >&5
10877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 #include <$ac_hdr>
10884 EOF
10885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10886 { (eval echo configure:10887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10888 if test -z "$ac_err"; then
10889   rm -rf conftest*
10890   eval "ac_cv_header_$ac_safe=yes"
10891 else
10892   echo "$ac_err" >&5
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=no"
10897 fi
10898 rm -f conftest*
10899 fi
10900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10903   cat >> confdefs.h <<EOF
10904 #define $ac_tr_hdr 1
10905 EOF
10906  
10907 else
10908   echo "$ac_t""no" 1>&6
10909 fi
10910 done
10911
10912         
10913         if test $ac_cv_header_openssl_ssl_h = yes \
10914                 -o $ac_cv_header_ssl_h = yes ; then
10915                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10916 echo "configure:10917: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10917 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10919   echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921   ac_save_LIBS="$LIBS"
10922 LIBS="-lssl -lcrypto $LIBS"
10923 cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926 /* Override any gcc2 internal prototype to avoid an error.  */
10927 /* We use char because int might match the return type of a gcc2
10928     builtin and then its argument prototype would still apply.  */
10929 char SSLeay_add_ssl_algorithms();
10930
10931 int main() {
10932 SSLeay_add_ssl_algorithms()
10933 ; return 0; }
10934 EOF
10935 if { (eval echo configure:10936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10936   rm -rf conftest*
10937   eval "ac_cv_lib_$ac_lib_var=yes"
10938 else
10939   echo "configure: failed program was:" >&5
10940   cat conftest.$ac_ext >&5
10941   rm -rf conftest*
10942   eval "ac_cv_lib_$ac_lib_var=no"
10943 fi
10944 rm -f conftest*
10945 LIBS="$ac_save_LIBS"
10946
10947 fi
10948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10949   echo "$ac_t""yes" 1>&6
10950   have_ssleay=yes
10951                         need_rsaref=no
10952 else
10953   echo "$ac_t""no" 1>&6
10954 have_ssleay=no
10955 fi
10956
10957                         
10958                 if test $have_ssleay = no ; then
10959                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10960 echo "configure:10961: checking for SSL_library_init in -lssl" >&5
10961 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10963   echo $ac_n "(cached) $ac_c" 1>&6
10964 else
10965   ac_save_LIBS="$LIBS"
10966 LIBS="-lssl -lcrypto $LIBS"
10967 cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970 /* Override any gcc2 internal prototype to avoid an error.  */
10971 /* We use char because int might match the return type of a gcc2
10972     builtin and then its argument prototype would still apply.  */
10973 char SSL_library_init();
10974
10975 int main() {
10976 SSL_library_init()
10977 ; return 0; }
10978 EOF
10979 if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10980   rm -rf conftest*
10981   eval "ac_cv_lib_$ac_lib_var=yes"
10982 else
10983   echo "configure: failed program was:" >&5
10984   cat conftest.$ac_ext >&5
10985   rm -rf conftest*
10986   eval "ac_cv_lib_$ac_lib_var=no"
10987 fi
10988 rm -f conftest*
10989 LIBS="$ac_save_LIBS"
10990
10991 fi
10992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10993   echo "$ac_t""yes" 1>&6
10994   have_ssleay=yes
10995                                 need_rsaref=no
10996 else
10997   echo "$ac_t""no" 1>&6
10998 have_ssleay=no
10999 fi
11000
11001                 fi
11002
11003                 if test $have_ssleay = no ; then
11004                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11005 echo "configure:11006: checking for ssl3_accept in -lssl" >&5
11006 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11008   echo $ac_n "(cached) $ac_c" 1>&6
11009 else
11010   ac_save_LIBS="$LIBS"
11011 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11012 cat > conftest.$ac_ext <<EOF
11013 #line 11014 "configure"
11014 #include "confdefs.h"
11015 /* Override any gcc2 internal prototype to avoid an error.  */
11016 /* We use char because int might match the return type of a gcc2
11017     builtin and then its argument prototype would still apply.  */
11018 char ssl3_accept();
11019
11020 int main() {
11021 ssl3_accept()
11022 ; return 0; }
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11025   rm -rf conftest*
11026   eval "ac_cv_lib_$ac_lib_var=yes"
11027 else
11028   echo "configure: failed program was:" >&5
11029   cat conftest.$ac_ext >&5
11030   rm -rf conftest*
11031   eval "ac_cv_lib_$ac_lib_var=no"
11032 fi
11033 rm -f conftest*
11034 LIBS="$ac_save_LIBS"
11035
11036 fi
11037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11038   echo "$ac_t""yes" 1>&6
11039   have_ssleay=yes
11040                                 need_rsaref=yes
11041 else
11042   echo "$ac_t""no" 1>&6
11043 have_ssleay=no
11044 fi
11045
11046                 fi
11047
11048                 if test $have_ssleay = yes ; then
11049                         ol_with_tls=found
11050                         ol_link_tls=yes
11051
11052                         cat >> confdefs.h <<\EOF
11053 #define HAVE_SSLEAY 1
11054 EOF
11055
11056
11057                         if test $need_rsaref = yes; then
11058                                 cat >> confdefs.h <<\EOF
11059 #define HAVE_RSAREF 1
11060 EOF
11061
11062
11063                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11064                         else
11065                                 TLS_LIBS="-lssl -lcrypto"
11066                         fi
11067                 fi
11068         fi
11069
11070 else
11071         echo "configure: warning: TLS data protection not supported!" 1>&2
11072 fi
11073
11074 WITH_TLS=no
11075 if test $ol_link_tls = yes ; then
11076         cat >> confdefs.h <<\EOF
11077 #define HAVE_TLS 1
11078 EOF
11079
11080         WITH_TLS=yes
11081
11082 elif test $ol_with_tls = auto ; then
11083         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11084         echo "configure: warning: TLS data protection not supported!" 1>&2
11085
11086 elif test $ol_with_tls != no ; then
11087         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11088 fi
11089
11090 if test $ol_enable_lmpasswd != no; then
11091         if test $ol_link_tls != yes ; then
11092                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11093         fi
11094
11095         cat >> confdefs.h <<\EOF
11096 #define SLAPD_LMHASH 1
11097 EOF
11098
11099 fi
11100
11101 ol_link_threads=no
11102
11103 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11104         -o $ol_with_threads = nt ; then
11105
11106         
11107         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11108 echo "configure:11109: checking for _beginthread" >&5
11109 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 /* System header to define __stub macros and hopefully few prototypes,
11116     which can conflict with char _beginthread(); below.  */
11117 #include <assert.h>
11118 /* Override any gcc2 internal prototype to avoid an error.  */
11119 /* We use char because int might match the return type of a gcc2
11120     builtin and then its argument prototype would still apply.  */
11121 char _beginthread();
11122 char (*f)();
11123
11124 int main() {
11125
11126 /* The GNU C library defines this for functions which it implements
11127     to always fail with ENOSYS.  Some functions are actually named
11128     something starting with __ and the normal name is an alias.  */
11129 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11130 choke me
11131 #else
11132 f = _beginthread;
11133 #endif
11134
11135 ; return 0; }
11136 EOF
11137 if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11138   rm -rf conftest*
11139   eval "ac_cv_func__beginthread=yes"
11140 else
11141   echo "configure: failed program was:" >&5
11142   cat conftest.$ac_ext >&5
11143   rm -rf conftest*
11144   eval "ac_cv_func__beginthread=no"
11145 fi
11146 rm -f conftest*
11147 fi
11148
11149 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151   :
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155
11156
11157         if test $ac_cv_func__beginthread = yes ; then
11158                 cat >> confdefs.h <<\EOF
11159 #define HAVE_NT_THREADS 1
11160 EOF
11161
11162                 ol_cv_nt_threads=yes
11163         fi
11164
11165
11166         if test "$ol_cv_nt_threads" = yes ; then
11167                 ol_link_threads=nt
11168                 ol_with_threads=found
11169                 ol_with_yielding_select=yes
11170
11171                 cat >> confdefs.h <<\EOF
11172 #define HAVE_NT_SERVICE_MANAGER 1
11173 EOF
11174
11175                 cat >> confdefs.h <<\EOF
11176 #define HAVE_NT_EVENT_LOG 1
11177 EOF
11178
11179         fi
11180
11181         if test $ol_with_threads = nt ; then
11182                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11183         fi
11184 fi
11185
11186 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11187         -o $ol_with_threads = posix ; then
11188
11189         for ac_hdr in pthread.h
11190 do
11191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11193 echo "configure:11194: checking for $ac_hdr" >&5
11194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11195   echo $ac_n "(cached) $ac_c" 1>&6
11196 else
11197   cat > conftest.$ac_ext <<EOF
11198 #line 11199 "configure"
11199 #include "confdefs.h"
11200 #include <$ac_hdr>
11201 EOF
11202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11203 { (eval echo configure:11204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11205 if test -z "$ac_err"; then
11206   rm -rf conftest*
11207   eval "ac_cv_header_$ac_safe=yes"
11208 else
11209   echo "$ac_err" >&5
11210   echo "configure: failed program was:" >&5
11211   cat conftest.$ac_ext >&5
11212   rm -rf conftest*
11213   eval "ac_cv_header_$ac_safe=no"
11214 fi
11215 rm -f conftest*
11216 fi
11217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11218   echo "$ac_t""yes" 1>&6
11219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11220   cat >> confdefs.h <<EOF
11221 #define $ac_tr_hdr 1
11222 EOF
11223  
11224 else
11225   echo "$ac_t""no" 1>&6
11226 fi
11227 done
11228
11229
11230         if test $ac_cv_header_pthread_h = yes ; then
11231                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11232 echo "configure:11233: checking POSIX thread version" >&5
11233 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11234   echo $ac_n "(cached) $ac_c" 1>&6
11235 else
11236   
11237         cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240
11241 #               include <pthread.h>
11242         
11243 int main() {
11244
11245                 int i = PTHREAD_CREATE_JOINABLE;
11246         
11247 ; return 0; }
11248 EOF
11249 if { (eval echo configure:11250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11250   rm -rf conftest*
11251   
11252         cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 #include <pthread.h>
11256 EOF
11257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11258   egrep "pthread_detach" >/dev/null 2>&1; then
11259   rm -rf conftest*
11260   ol_cv_pthread_version=10
11261 else
11262   rm -rf conftest*
11263   ol_cv_pthread_version=8
11264 fi
11265 rm -f conftest*
11266
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   
11272         cat > conftest.$ac_ext <<EOF
11273 #line 11274 "configure"
11274 #include "confdefs.h"
11275
11276 #               include <pthread.h>
11277 #               ifdef PTHREAD_CREATE_UNDETACHED
11278                 draft7
11279 #               endif
11280         
11281 EOF
11282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11283   egrep "draft7" >/dev/null 2>&1; then
11284   rm -rf conftest*
11285   ol_cv_pthread_version=7
11286 else
11287   rm -rf conftest*
11288   
11289         cat > conftest.$ac_ext <<EOF
11290 #line 11291 "configure"
11291 #include "confdefs.h"
11292 #include <pthread.h>
11293 EOF
11294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11295   egrep "pthread_attr_init" >/dev/null 2>&1; then
11296   rm -rf conftest*
11297   ol_cv_pthread_version=6
11298 else
11299   rm -rf conftest*
11300   
11301         cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304
11305 #               include <pthread.h>
11306 #ifdef          PTHREAD_MUTEX_INITIALIZER
11307                 draft5
11308 #endif
11309         
11310 EOF
11311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11312   egrep "draft5" >/dev/null 2>&1; then
11313   rm -rf conftest*
11314   ol_cv_pthread_version=5
11315 else
11316   rm -rf conftest*
11317   ol_cv_pthread_version=4
11318 fi
11319 rm -f conftest*
11320  
11321 fi
11322 rm -f conftest*
11323  
11324 fi
11325 rm -f conftest*
11326  
11327 fi
11328 rm -f conftest*
11329
11330 fi
11331
11332 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11333
11334
11335                 if test $ol_cv_pthread_version != 0 ; then
11336                         cat >> confdefs.h <<EOF
11337 #define HAVE_PTHREADS $ol_cv_pthread_version
11338 EOF
11339
11340                 else
11341                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11342                 fi
11343
11344                 # consider threads found
11345                 ol_with_threads=found
11346
11347                 
11348         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11349 echo "configure:11350: checking for LinuxThreads pthread.h" >&5
11350 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11351   echo $ac_n "(cached) $ac_c" 1>&6
11352 else
11353   cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 #include <pthread.h>
11357 EOF
11358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11359   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11360   rm -rf conftest*
11361   ol_cv_header_linux_threads=yes
11362 else
11363   rm -rf conftest*
11364   ol_cv_header_linux_threads=no
11365 fi
11366 rm -f conftest*
11367
11368                 
11369 fi
11370
11371 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11372         if test $ol_cv_header_linux_threads = yes; then
11373                 cat >> confdefs.h <<\EOF
11374 #define HAVE_LINUX_THREADS 1
11375 EOF
11376
11377         fi
11378
11379                 
11380         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11381 echo "configure:11382: checking for GNU Pth pthread.h" >&5
11382 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11383   echo $ac_n "(cached) $ac_c" 1>&6
11384 else
11385   cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 #include <pthread.h>
11389 #ifdef _POSIX_THREAD_IS_GNU_PTH
11390         __gnu_pth__;
11391 #endif
11392
11393 EOF
11394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11395   egrep "__gnu_pth__" >/dev/null 2>&1; then
11396   rm -rf conftest*
11397   ol_cv_header_gnu_pth_pthread_h=yes
11398 else
11399   rm -rf conftest*
11400   ol_cv_header_gnu_pth_pthread_h=no
11401 fi
11402 rm -f conftest*
11403
11404                 
11405 fi
11406
11407 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11408
11409
11410                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11411                         for ac_hdr in sched.h
11412 do
11413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11415 echo "configure:11416: checking for $ac_hdr" >&5
11416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11417   echo $ac_n "(cached) $ac_c" 1>&6
11418 else
11419   cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422 #include <$ac_hdr>
11423 EOF
11424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11425 { (eval echo configure:11426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11427 if test -z "$ac_err"; then
11428   rm -rf conftest*
11429   eval "ac_cv_header_$ac_safe=yes"
11430 else
11431   echo "$ac_err" >&5
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_header_$ac_safe=no"
11436 fi
11437 rm -f conftest*
11438 fi
11439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11442   cat >> confdefs.h <<EOF
11443 #define $ac_tr_hdr 1
11444 EOF
11445  
11446 else
11447   echo "$ac_t""no" 1>&6
11448 fi
11449 done
11450
11451                 fi
11452
11453                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11454                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11455 echo "configure:11456: checking for pthread_create in default libraries" >&5
11456 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11457   echo $ac_n "(cached) $ac_c" 1>&6
11458 else
11459   
11460                 if test "$cross_compiling" = yes; then
11461   cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 /* pthread test headers */
11465 #include <pthread.h>
11466 #if HAVE_PTHREADS < 7
11467 #include <errno.h>
11468 #endif
11469 #ifndef NULL
11470 #define NULL (void*)0
11471 #endif
11472
11473 static void *task(p)
11474         void *p;
11475 {
11476         return (void *) (p == NULL);
11477 }
11478
11479 int main() {
11480
11481         /* pthread test function */
11482 #ifndef PTHREAD_CREATE_DETACHED
11483 #define PTHREAD_CREATE_DETACHED 1
11484 #endif
11485         pthread_t t;
11486         int status;
11487         int detach = PTHREAD_CREATE_DETACHED;
11488
11489 #if HAVE_PTHREADS > 4
11490         /* Final pthreads */
11491         pthread_attr_t attr;
11492
11493         status = pthread_attr_init(&attr);
11494         if( status ) return status;
11495
11496 #if HAVE_PTHREADS < 7
11497         status = pthread_attr_setdetachstate(&attr, &detach);
11498         if( status < 0 ) status = errno;
11499 #else
11500         status = pthread_attr_setdetachstate(&attr, detach);
11501 #endif
11502         if( status ) return status;
11503         status = pthread_create( &t, &attr, task, NULL );
11504 #if HAVE_PTHREADS < 7
11505         if( status < 0 ) status = errno;
11506 #endif
11507         if( status ) return status;
11508 #else
11509         /* Draft 4 pthreads */
11510         status = pthread_create( &t, pthread_attr_default, task, NULL );
11511         if( status ) return errno;
11512
11513         /* give thread a chance to complete */
11514         /* it should remain joinable and hence detachable */
11515         sleep( 1 );
11516
11517         status = pthread_detach( &t );
11518         if( status ) return errno;
11519 #endif
11520
11521 #ifdef HAVE_LINUX_THREADS
11522         pthread_kill_other_threads_np();
11523 #endif
11524
11525         return 0;
11526
11527 ; return 0; }
11528 EOF
11529 if { (eval echo configure:11530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11530   rm -rf conftest*
11531   ol_cv_pthread_create=yes
11532 else
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   ol_cv_pthread_create=no
11537 fi
11538 rm -f conftest*
11539 else
11540   cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543 /* pthread test headers */
11544 #include <pthread.h>
11545 #if HAVE_PTHREADS < 7
11546 #include <errno.h>
11547 #endif
11548 #ifndef NULL
11549 #define NULL (void*)0
11550 #endif
11551
11552 static void *task(p)
11553         void *p;
11554 {
11555         return (void *) (p == NULL);
11556 }
11557
11558
11559 int main(argc, argv)
11560         int argc;
11561         char **argv;
11562 {
11563
11564         /* pthread test function */
11565 #ifndef PTHREAD_CREATE_DETACHED
11566 #define PTHREAD_CREATE_DETACHED 1
11567 #endif
11568         pthread_t t;
11569         int status;
11570         int detach = PTHREAD_CREATE_DETACHED;
11571
11572 #if HAVE_PTHREADS > 4
11573         /* Final pthreads */
11574         pthread_attr_t attr;
11575
11576         status = pthread_attr_init(&attr);
11577         if( status ) return status;
11578
11579 #if HAVE_PTHREADS < 7
11580         status = pthread_attr_setdetachstate(&attr, &detach);
11581         if( status < 0 ) status = errno;
11582 #else
11583         status = pthread_attr_setdetachstate(&attr, detach);
11584 #endif
11585         if( status ) return status;
11586         status = pthread_create( &t, &attr, task, NULL );
11587 #if HAVE_PTHREADS < 7
11588         if( status < 0 ) status = errno;
11589 #endif
11590         if( status ) return status;
11591 #else
11592         /* Draft 4 pthreads */
11593         status = pthread_create( &t, pthread_attr_default, task, NULL );
11594         if( status ) return errno;
11595
11596         /* give thread a chance to complete */
11597         /* it should remain joinable and hence detachable */
11598         sleep( 1 );
11599
11600         status = pthread_detach( &t );
11601         if( status ) return errno;
11602 #endif
11603
11604 #ifdef HAVE_LINUX_THREADS
11605         pthread_kill_other_threads_np();
11606 #endif
11607
11608         return 0;
11609
11610 }
11611
11612 EOF
11613 if { (eval echo configure:11614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11614 then
11615   ol_cv_pthread_create=yes
11616 else
11617   echo "configure: failed program was:" >&5
11618   cat conftest.$ac_ext >&5
11619   rm -fr conftest*
11620   ol_cv_pthread_create=no
11621 fi
11622 rm -fr conftest*
11623 fi
11624
11625 fi
11626
11627 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11628
11629                 if test $ol_cv_pthread_create != no ; then
11630                         ol_link_threads=posix
11631                         ol_link_pthreads=""
11632                 fi
11633                 
11634                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11635 if test "$ol_link_threads" = no ; then
11636         # try -kthread
11637         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11638 echo "configure:11639: checking for pthread link with -kthread" >&5
11639 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11640   echo $ac_n "(cached) $ac_c" 1>&6
11641 else
11642   
11643                 # save the flags
11644                 ol_LIBS="$LIBS"
11645                 LIBS="-kthread $LIBS"
11646
11647                 if test "$cross_compiling" = yes; then
11648   cat > conftest.$ac_ext <<EOF
11649 #line 11650 "configure"
11650 #include "confdefs.h"
11651 /* pthread test headers */
11652 #include <pthread.h>
11653 #if HAVE_PTHREADS < 7
11654 #include <errno.h>
11655 #endif
11656 #ifndef NULL
11657 #define NULL (void*)0
11658 #endif
11659
11660 static void *task(p)
11661         void *p;
11662 {
11663         return (void *) (p == NULL);
11664 }
11665
11666 int main() {
11667
11668         /* pthread test function */
11669 #ifndef PTHREAD_CREATE_DETACHED
11670 #define PTHREAD_CREATE_DETACHED 1
11671 #endif
11672         pthread_t t;
11673         int status;
11674         int detach = PTHREAD_CREATE_DETACHED;
11675
11676 #if HAVE_PTHREADS > 4
11677         /* Final pthreads */
11678         pthread_attr_t attr;
11679
11680         status = pthread_attr_init(&attr);
11681         if( status ) return status;
11682
11683 #if HAVE_PTHREADS < 7
11684         status = pthread_attr_setdetachstate(&attr, &detach);
11685         if( status < 0 ) status = errno;
11686 #else
11687         status = pthread_attr_setdetachstate(&attr, detach);
11688 #endif
11689         if( status ) return status;
11690         status = pthread_create( &t, &attr, task, NULL );
11691 #if HAVE_PTHREADS < 7
11692         if( status < 0 ) status = errno;
11693 #endif
11694         if( status ) return status;
11695 #else
11696         /* Draft 4 pthreads */
11697         status = pthread_create( &t, pthread_attr_default, task, NULL );
11698         if( status ) return errno;
11699
11700         /* give thread a chance to complete */
11701         /* it should remain joinable and hence detachable */
11702         sleep( 1 );
11703
11704         status = pthread_detach( &t );
11705         if( status ) return errno;
11706 #endif
11707
11708 #ifdef HAVE_LINUX_THREADS
11709         pthread_kill_other_threads_np();
11710 #endif
11711
11712         return 0;
11713
11714 ; return 0; }
11715 EOF
11716 if { (eval echo configure:11717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11717   rm -rf conftest*
11718   ol_cv_pthread_kthread=yes
11719 else
11720   echo "configure: failed program was:" >&5
11721   cat conftest.$ac_ext >&5
11722   rm -rf conftest*
11723   ol_cv_pthread_kthread=no
11724 fi
11725 rm -f conftest*
11726 else
11727   cat > conftest.$ac_ext <<EOF
11728 #line 11729 "configure"
11729 #include "confdefs.h"
11730 /* pthread test headers */
11731 #include <pthread.h>
11732 #if HAVE_PTHREADS < 7
11733 #include <errno.h>
11734 #endif
11735 #ifndef NULL
11736 #define NULL (void*)0
11737 #endif
11738
11739 static void *task(p)
11740         void *p;
11741 {
11742         return (void *) (p == NULL);
11743 }
11744
11745
11746 int main(argc, argv)
11747         int argc;
11748         char **argv;
11749 {
11750
11751         /* pthread test function */
11752 #ifndef PTHREAD_CREATE_DETACHED
11753 #define PTHREAD_CREATE_DETACHED 1
11754 #endif
11755         pthread_t t;
11756         int status;
11757         int detach = PTHREAD_CREATE_DETACHED;
11758
11759 #if HAVE_PTHREADS > 4
11760         /* Final pthreads */
11761         pthread_attr_t attr;
11762
11763         status = pthread_attr_init(&attr);
11764         if( status ) return status;
11765
11766 #if HAVE_PTHREADS < 7
11767         status = pthread_attr_setdetachstate(&attr, &detach);
11768         if( status < 0 ) status = errno;
11769 #else
11770         status = pthread_attr_setdetachstate(&attr, detach);
11771 #endif
11772         if( status ) return status;
11773         status = pthread_create( &t, &attr, task, NULL );
11774 #if HAVE_PTHREADS < 7
11775         if( status < 0 ) status = errno;
11776 #endif
11777         if( status ) return status;
11778 #else
11779         /* Draft 4 pthreads */
11780         status = pthread_create( &t, pthread_attr_default, task, NULL );
11781         if( status ) return errno;
11782
11783         /* give thread a chance to complete */
11784         /* it should remain joinable and hence detachable */
11785         sleep( 1 );
11786
11787         status = pthread_detach( &t );
11788         if( status ) return errno;
11789 #endif
11790
11791 #ifdef HAVE_LINUX_THREADS
11792         pthread_kill_other_threads_np();
11793 #endif
11794
11795         return 0;
11796
11797 }
11798
11799 EOF
11800 if { (eval echo configure:11801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11801 then
11802   ol_cv_pthread_kthread=yes
11803 else
11804   echo "configure: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   rm -fr conftest*
11807   ol_cv_pthread_kthread=no
11808 fi
11809 rm -fr conftest*
11810 fi
11811
11812
11813                 # restore the LIBS
11814                 LIBS="$ol_LIBS"
11815         
11816 fi
11817
11818 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11819
11820         if test $ol_cv_pthread_kthread = yes ; then
11821                 ol_link_pthreads="-kthread"
11822                 ol_link_threads=posix
11823         fi
11824 fi
11825
11826                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11827 if test "$ol_link_threads" = no ; then
11828         # try -pthread
11829         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11830 echo "configure:11831: checking for pthread link with -pthread" >&5
11831 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   
11835                 # save the flags
11836                 ol_LIBS="$LIBS"
11837                 LIBS="-pthread $LIBS"
11838
11839                 if test "$cross_compiling" = yes; then
11840   cat > conftest.$ac_ext <<EOF
11841 #line 11842 "configure"
11842 #include "confdefs.h"
11843 /* pthread test headers */
11844 #include <pthread.h>
11845 #if HAVE_PTHREADS < 7
11846 #include <errno.h>
11847 #endif
11848 #ifndef NULL
11849 #define NULL (void*)0
11850 #endif
11851
11852 static void *task(p)
11853         void *p;
11854 {
11855         return (void *) (p == NULL);
11856 }
11857
11858 int main() {
11859
11860         /* pthread test function */
11861 #ifndef PTHREAD_CREATE_DETACHED
11862 #define PTHREAD_CREATE_DETACHED 1
11863 #endif
11864         pthread_t t;
11865         int status;
11866         int detach = PTHREAD_CREATE_DETACHED;
11867
11868 #if HAVE_PTHREADS > 4
11869         /* Final pthreads */
11870         pthread_attr_t attr;
11871
11872         status = pthread_attr_init(&attr);
11873         if( status ) return status;
11874
11875 #if HAVE_PTHREADS < 7
11876         status = pthread_attr_setdetachstate(&attr, &detach);
11877         if( status < 0 ) status = errno;
11878 #else
11879         status = pthread_attr_setdetachstate(&attr, detach);
11880 #endif
11881         if( status ) return status;
11882         status = pthread_create( &t, &attr, task, NULL );
11883 #if HAVE_PTHREADS < 7
11884         if( status < 0 ) status = errno;
11885 #endif
11886         if( status ) return status;
11887 #else
11888         /* Draft 4 pthreads */
11889         status = pthread_create( &t, pthread_attr_default, task, NULL );
11890         if( status ) return errno;
11891
11892         /* give thread a chance to complete */
11893         /* it should remain joinable and hence detachable */
11894         sleep( 1 );
11895
11896         status = pthread_detach( &t );
11897         if( status ) return errno;
11898 #endif
11899
11900 #ifdef HAVE_LINUX_THREADS
11901         pthread_kill_other_threads_np();
11902 #endif
11903
11904         return 0;
11905
11906 ; return 0; }
11907 EOF
11908 if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11909   rm -rf conftest*
11910   ol_cv_pthread_pthread=yes
11911 else
11912   echo "configure: failed program was:" >&5
11913   cat conftest.$ac_ext >&5
11914   rm -rf conftest*
11915   ol_cv_pthread_pthread=no
11916 fi
11917 rm -f conftest*
11918 else
11919   cat > conftest.$ac_ext <<EOF
11920 #line 11921 "configure"
11921 #include "confdefs.h"
11922 /* pthread test headers */
11923 #include <pthread.h>
11924 #if HAVE_PTHREADS < 7
11925 #include <errno.h>
11926 #endif
11927 #ifndef NULL
11928 #define NULL (void*)0
11929 #endif
11930
11931 static void *task(p)
11932         void *p;
11933 {
11934         return (void *) (p == NULL);
11935 }
11936
11937
11938 int main(argc, argv)
11939         int argc;
11940         char **argv;
11941 {
11942
11943         /* pthread test function */
11944 #ifndef PTHREAD_CREATE_DETACHED
11945 #define PTHREAD_CREATE_DETACHED 1
11946 #endif
11947         pthread_t t;
11948         int status;
11949         int detach = PTHREAD_CREATE_DETACHED;
11950
11951 #if HAVE_PTHREADS > 4
11952         /* Final pthreads */
11953         pthread_attr_t attr;
11954
11955         status = pthread_attr_init(&attr);
11956         if( status ) return status;
11957
11958 #if HAVE_PTHREADS < 7
11959         status = pthread_attr_setdetachstate(&attr, &detach);
11960         if( status < 0 ) status = errno;
11961 #else
11962         status = pthread_attr_setdetachstate(&attr, detach);
11963 #endif
11964         if( status ) return status;
11965         status = pthread_create( &t, &attr, task, NULL );
11966 #if HAVE_PTHREADS < 7
11967         if( status < 0 ) status = errno;
11968 #endif
11969         if( status ) return status;
11970 #else
11971         /* Draft 4 pthreads */
11972         status = pthread_create( &t, pthread_attr_default, task, NULL );
11973         if( status ) return errno;
11974
11975         /* give thread a chance to complete */
11976         /* it should remain joinable and hence detachable */
11977         sleep( 1 );
11978
11979         status = pthread_detach( &t );
11980         if( status ) return errno;
11981 #endif
11982
11983 #ifdef HAVE_LINUX_THREADS
11984         pthread_kill_other_threads_np();
11985 #endif
11986
11987         return 0;
11988
11989 }
11990
11991 EOF
11992 if { (eval echo configure:11993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11993 then
11994   ol_cv_pthread_pthread=yes
11995 else
11996   echo "configure: failed program was:" >&5
11997   cat conftest.$ac_ext >&5
11998   rm -fr conftest*
11999   ol_cv_pthread_pthread=no
12000 fi
12001 rm -fr conftest*
12002 fi
12003
12004
12005                 # restore the LIBS
12006                 LIBS="$ol_LIBS"
12007         
12008 fi
12009
12010 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12011
12012         if test $ol_cv_pthread_pthread = yes ; then
12013                 ol_link_pthreads="-pthread"
12014                 ol_link_threads=posix
12015         fi
12016 fi
12017
12018                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12019 if test "$ol_link_threads" = no ; then
12020         # try -pthreads
12021         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12022 echo "configure:12023: checking for pthread link with -pthreads" >&5
12023 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12024   echo $ac_n "(cached) $ac_c" 1>&6
12025 else
12026   
12027                 # save the flags
12028                 ol_LIBS="$LIBS"
12029                 LIBS="-pthreads $LIBS"
12030
12031                 if test "$cross_compiling" = yes; then
12032   cat > conftest.$ac_ext <<EOF
12033 #line 12034 "configure"
12034 #include "confdefs.h"
12035 /* pthread test headers */
12036 #include <pthread.h>
12037 #if HAVE_PTHREADS < 7
12038 #include <errno.h>
12039 #endif
12040 #ifndef NULL
12041 #define NULL (void*)0
12042 #endif
12043
12044 static void *task(p)
12045         void *p;
12046 {
12047         return (void *) (p == NULL);
12048 }
12049
12050 int main() {
12051
12052         /* pthread test function */
12053 #ifndef PTHREAD_CREATE_DETACHED
12054 #define PTHREAD_CREATE_DETACHED 1
12055 #endif
12056         pthread_t t;
12057         int status;
12058         int detach = PTHREAD_CREATE_DETACHED;
12059
12060 #if HAVE_PTHREADS > 4
12061         /* Final pthreads */
12062         pthread_attr_t attr;
12063
12064         status = pthread_attr_init(&attr);
12065         if( status ) return status;
12066
12067 #if HAVE_PTHREADS < 7
12068         status = pthread_attr_setdetachstate(&attr, &detach);
12069         if( status < 0 ) status = errno;
12070 #else
12071         status = pthread_attr_setdetachstate(&attr, detach);
12072 #endif
12073         if( status ) return status;
12074         status = pthread_create( &t, &attr, task, NULL );
12075 #if HAVE_PTHREADS < 7
12076         if( status < 0 ) status = errno;
12077 #endif
12078         if( status ) return status;
12079 #else
12080         /* Draft 4 pthreads */
12081         status = pthread_create( &t, pthread_attr_default, task, NULL );
12082         if( status ) return errno;
12083
12084         /* give thread a chance to complete */
12085         /* it should remain joinable and hence detachable */
12086         sleep( 1 );
12087
12088         status = pthread_detach( &t );
12089         if( status ) return errno;
12090 #endif
12091
12092 #ifdef HAVE_LINUX_THREADS
12093         pthread_kill_other_threads_np();
12094 #endif
12095
12096         return 0;
12097
12098 ; return 0; }
12099 EOF
12100 if { (eval echo configure:12101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12101   rm -rf conftest*
12102   ol_cv_pthread_pthreads=yes
12103 else
12104   echo "configure: failed program was:" >&5
12105   cat conftest.$ac_ext >&5
12106   rm -rf conftest*
12107   ol_cv_pthread_pthreads=no
12108 fi
12109 rm -f conftest*
12110 else
12111   cat > conftest.$ac_ext <<EOF
12112 #line 12113 "configure"
12113 #include "confdefs.h"
12114 /* pthread test headers */
12115 #include <pthread.h>
12116 #if HAVE_PTHREADS < 7
12117 #include <errno.h>
12118 #endif
12119 #ifndef NULL
12120 #define NULL (void*)0
12121 #endif
12122
12123 static void *task(p)
12124         void *p;
12125 {
12126         return (void *) (p == NULL);
12127 }
12128
12129
12130 int main(argc, argv)
12131         int argc;
12132         char **argv;
12133 {
12134
12135         /* pthread test function */
12136 #ifndef PTHREAD_CREATE_DETACHED
12137 #define PTHREAD_CREATE_DETACHED 1
12138 #endif
12139         pthread_t t;
12140         int status;
12141         int detach = PTHREAD_CREATE_DETACHED;
12142
12143 #if HAVE_PTHREADS > 4
12144         /* Final pthreads */
12145         pthread_attr_t attr;
12146
12147         status = pthread_attr_init(&attr);
12148         if( status ) return status;
12149
12150 #if HAVE_PTHREADS < 7
12151         status = pthread_attr_setdetachstate(&attr, &detach);
12152         if( status < 0 ) status = errno;
12153 #else
12154         status = pthread_attr_setdetachstate(&attr, detach);
12155 #endif
12156         if( status ) return status;
12157         status = pthread_create( &t, &attr, task, NULL );
12158 #if HAVE_PTHREADS < 7
12159         if( status < 0 ) status = errno;
12160 #endif
12161         if( status ) return status;
12162 #else
12163         /* Draft 4 pthreads */
12164         status = pthread_create( &t, pthread_attr_default, task, NULL );
12165         if( status ) return errno;
12166
12167         /* give thread a chance to complete */
12168         /* it should remain joinable and hence detachable */
12169         sleep( 1 );
12170
12171         status = pthread_detach( &t );
12172         if( status ) return errno;
12173 #endif
12174
12175 #ifdef HAVE_LINUX_THREADS
12176         pthread_kill_other_threads_np();
12177 #endif
12178
12179         return 0;
12180
12181 }
12182
12183 EOF
12184 if { (eval echo configure:12185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12185 then
12186   ol_cv_pthread_pthreads=yes
12187 else
12188   echo "configure: failed program was:" >&5
12189   cat conftest.$ac_ext >&5
12190   rm -fr conftest*
12191   ol_cv_pthread_pthreads=no
12192 fi
12193 rm -fr conftest*
12194 fi
12195
12196
12197                 # restore the LIBS
12198                 LIBS="$ol_LIBS"
12199         
12200 fi
12201
12202 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12203
12204         if test $ol_cv_pthread_pthreads = yes ; then
12205                 ol_link_pthreads="-pthreads"
12206                 ol_link_threads=posix
12207         fi
12208 fi
12209
12210                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12211 if test "$ol_link_threads" = no ; then
12212         # try -mthreads
12213         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12214 echo "configure:12215: checking for pthread link with -mthreads" >&5
12215 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12216   echo $ac_n "(cached) $ac_c" 1>&6
12217 else
12218   
12219                 # save the flags
12220                 ol_LIBS="$LIBS"
12221                 LIBS="-mthreads $LIBS"
12222
12223                 if test "$cross_compiling" = yes; then
12224   cat > conftest.$ac_ext <<EOF
12225 #line 12226 "configure"
12226 #include "confdefs.h"
12227 /* pthread test headers */
12228 #include <pthread.h>
12229 #if HAVE_PTHREADS < 7
12230 #include <errno.h>
12231 #endif
12232 #ifndef NULL
12233 #define NULL (void*)0
12234 #endif
12235
12236 static void *task(p)
12237         void *p;
12238 {
12239         return (void *) (p == NULL);
12240 }
12241
12242 int main() {
12243
12244         /* pthread test function */
12245 #ifndef PTHREAD_CREATE_DETACHED
12246 #define PTHREAD_CREATE_DETACHED 1
12247 #endif
12248         pthread_t t;
12249         int status;
12250         int detach = PTHREAD_CREATE_DETACHED;
12251
12252 #if HAVE_PTHREADS > 4
12253         /* Final pthreads */
12254         pthread_attr_t attr;
12255
12256         status = pthread_attr_init(&attr);
12257         if( status ) return status;
12258
12259 #if HAVE_PTHREADS < 7
12260         status = pthread_attr_setdetachstate(&attr, &detach);
12261         if( status < 0 ) status = errno;
12262 #else
12263         status = pthread_attr_setdetachstate(&attr, detach);
12264 #endif
12265         if( status ) return status;
12266         status = pthread_create( &t, &attr, task, NULL );
12267 #if HAVE_PTHREADS < 7
12268         if( status < 0 ) status = errno;
12269 #endif
12270         if( status ) return status;
12271 #else
12272         /* Draft 4 pthreads */
12273         status = pthread_create( &t, pthread_attr_default, task, NULL );
12274         if( status ) return errno;
12275
12276         /* give thread a chance to complete */
12277         /* it should remain joinable and hence detachable */
12278         sleep( 1 );
12279
12280         status = pthread_detach( &t );
12281         if( status ) return errno;
12282 #endif
12283
12284 #ifdef HAVE_LINUX_THREADS
12285         pthread_kill_other_threads_np();
12286 #endif
12287
12288         return 0;
12289
12290 ; return 0; }
12291 EOF
12292 if { (eval echo configure:12293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12293   rm -rf conftest*
12294   ol_cv_pthread_mthreads=yes
12295 else
12296   echo "configure: failed program was:" >&5
12297   cat conftest.$ac_ext >&5
12298   rm -rf conftest*
12299   ol_cv_pthread_mthreads=no
12300 fi
12301 rm -f conftest*
12302 else
12303   cat > conftest.$ac_ext <<EOF
12304 #line 12305 "configure"
12305 #include "confdefs.h"
12306 /* pthread test headers */
12307 #include <pthread.h>
12308 #if HAVE_PTHREADS < 7
12309 #include <errno.h>
12310 #endif
12311 #ifndef NULL
12312 #define NULL (void*)0
12313 #endif
12314
12315 static void *task(p)
12316         void *p;
12317 {
12318         return (void *) (p == NULL);
12319 }
12320
12321
12322 int main(argc, argv)
12323         int argc;
12324         char **argv;
12325 {
12326
12327         /* pthread test function */
12328 #ifndef PTHREAD_CREATE_DETACHED
12329 #define PTHREAD_CREATE_DETACHED 1
12330 #endif
12331         pthread_t t;
12332         int status;
12333         int detach = PTHREAD_CREATE_DETACHED;
12334
12335 #if HAVE_PTHREADS > 4
12336         /* Final pthreads */
12337         pthread_attr_t attr;
12338
12339         status = pthread_attr_init(&attr);
12340         if( status ) return status;
12341
12342 #if HAVE_PTHREADS < 7
12343         status = pthread_attr_setdetachstate(&attr, &detach);
12344         if( status < 0 ) status = errno;
12345 #else
12346         status = pthread_attr_setdetachstate(&attr, detach);
12347 #endif
12348         if( status ) return status;
12349         status = pthread_create( &t, &attr, task, NULL );
12350 #if HAVE_PTHREADS < 7
12351         if( status < 0 ) status = errno;
12352 #endif
12353         if( status ) return status;
12354 #else
12355         /* Draft 4 pthreads */
12356         status = pthread_create( &t, pthread_attr_default, task, NULL );
12357         if( status ) return errno;
12358
12359         /* give thread a chance to complete */
12360         /* it should remain joinable and hence detachable */
12361         sleep( 1 );
12362
12363         status = pthread_detach( &t );
12364         if( status ) return errno;
12365 #endif
12366
12367 #ifdef HAVE_LINUX_THREADS
12368         pthread_kill_other_threads_np();
12369 #endif
12370
12371         return 0;
12372
12373 }
12374
12375 EOF
12376 if { (eval echo configure:12377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12377 then
12378   ol_cv_pthread_mthreads=yes
12379 else
12380   echo "configure: failed program was:" >&5
12381   cat conftest.$ac_ext >&5
12382   rm -fr conftest*
12383   ol_cv_pthread_mthreads=no
12384 fi
12385 rm -fr conftest*
12386 fi
12387
12388
12389                 # restore the LIBS
12390                 LIBS="$ol_LIBS"
12391         
12392 fi
12393
12394 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12395
12396         if test $ol_cv_pthread_mthreads = yes ; then
12397                 ol_link_pthreads="-mthreads"
12398                 ol_link_threads=posix
12399         fi
12400 fi
12401
12402                 # Pthread try link: -thread (ol_cv_pthread_thread)
12403 if test "$ol_link_threads" = no ; then
12404         # try -thread
12405         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12406 echo "configure:12407: checking for pthread link with -thread" >&5
12407 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12408   echo $ac_n "(cached) $ac_c" 1>&6
12409 else
12410   
12411                 # save the flags
12412                 ol_LIBS="$LIBS"
12413                 LIBS="-thread $LIBS"
12414
12415                 if test "$cross_compiling" = yes; then
12416   cat > conftest.$ac_ext <<EOF
12417 #line 12418 "configure"
12418 #include "confdefs.h"
12419 /* pthread test headers */
12420 #include <pthread.h>
12421 #if HAVE_PTHREADS < 7
12422 #include <errno.h>
12423 #endif
12424 #ifndef NULL
12425 #define NULL (void*)0
12426 #endif
12427
12428 static void *task(p)
12429         void *p;
12430 {
12431         return (void *) (p == NULL);
12432 }
12433
12434 int main() {
12435
12436         /* pthread test function */
12437 #ifndef PTHREAD_CREATE_DETACHED
12438 #define PTHREAD_CREATE_DETACHED 1
12439 #endif
12440         pthread_t t;
12441         int status;
12442         int detach = PTHREAD_CREATE_DETACHED;
12443
12444 #if HAVE_PTHREADS > 4
12445         /* Final pthreads */
12446         pthread_attr_t attr;
12447
12448         status = pthread_attr_init(&attr);
12449         if( status ) return status;
12450
12451 #if HAVE_PTHREADS < 7
12452         status = pthread_attr_setdetachstate(&attr, &detach);
12453         if( status < 0 ) status = errno;
12454 #else
12455         status = pthread_attr_setdetachstate(&attr, detach);
12456 #endif
12457         if( status ) return status;
12458         status = pthread_create( &t, &attr, task, NULL );
12459 #if HAVE_PTHREADS < 7
12460         if( status < 0 ) status = errno;
12461 #endif
12462         if( status ) return status;
12463 #else
12464         /* Draft 4 pthreads */
12465         status = pthread_create( &t, pthread_attr_default, task, NULL );
12466         if( status ) return errno;
12467
12468         /* give thread a chance to complete */
12469         /* it should remain joinable and hence detachable */
12470         sleep( 1 );
12471
12472         status = pthread_detach( &t );
12473         if( status ) return errno;
12474 #endif
12475
12476 #ifdef HAVE_LINUX_THREADS
12477         pthread_kill_other_threads_np();
12478 #endif
12479
12480         return 0;
12481
12482 ; return 0; }
12483 EOF
12484 if { (eval echo configure:12485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12485   rm -rf conftest*
12486   ol_cv_pthread_thread=yes
12487 else
12488   echo "configure: failed program was:" >&5
12489   cat conftest.$ac_ext >&5
12490   rm -rf conftest*
12491   ol_cv_pthread_thread=no
12492 fi
12493 rm -f conftest*
12494 else
12495   cat > conftest.$ac_ext <<EOF
12496 #line 12497 "configure"
12497 #include "confdefs.h"
12498 /* pthread test headers */
12499 #include <pthread.h>
12500 #if HAVE_PTHREADS < 7
12501 #include <errno.h>
12502 #endif
12503 #ifndef NULL
12504 #define NULL (void*)0
12505 #endif
12506
12507 static void *task(p)
12508         void *p;
12509 {
12510         return (void *) (p == NULL);
12511 }
12512
12513
12514 int main(argc, argv)
12515         int argc;
12516         char **argv;
12517 {
12518
12519         /* pthread test function */
12520 #ifndef PTHREAD_CREATE_DETACHED
12521 #define PTHREAD_CREATE_DETACHED 1
12522 #endif
12523         pthread_t t;
12524         int status;
12525         int detach = PTHREAD_CREATE_DETACHED;
12526
12527 #if HAVE_PTHREADS > 4
12528         /* Final pthreads */
12529         pthread_attr_t attr;
12530
12531         status = pthread_attr_init(&attr);
12532         if( status ) return status;
12533
12534 #if HAVE_PTHREADS < 7
12535         status = pthread_attr_setdetachstate(&attr, &detach);
12536         if( status < 0 ) status = errno;
12537 #else
12538         status = pthread_attr_setdetachstate(&attr, detach);
12539 #endif
12540         if( status ) return status;
12541         status = pthread_create( &t, &attr, task, NULL );
12542 #if HAVE_PTHREADS < 7
12543         if( status < 0 ) status = errno;
12544 #endif
12545         if( status ) return status;
12546 #else
12547         /* Draft 4 pthreads */
12548         status = pthread_create( &t, pthread_attr_default, task, NULL );
12549         if( status ) return errno;
12550
12551         /* give thread a chance to complete */
12552         /* it should remain joinable and hence detachable */
12553         sleep( 1 );
12554
12555         status = pthread_detach( &t );
12556         if( status ) return errno;
12557 #endif
12558
12559 #ifdef HAVE_LINUX_THREADS
12560         pthread_kill_other_threads_np();
12561 #endif
12562
12563         return 0;
12564
12565 }
12566
12567 EOF
12568 if { (eval echo configure:12569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12569 then
12570   ol_cv_pthread_thread=yes
12571 else
12572   echo "configure: failed program was:" >&5
12573   cat conftest.$ac_ext >&5
12574   rm -fr conftest*
12575   ol_cv_pthread_thread=no
12576 fi
12577 rm -fr conftest*
12578 fi
12579
12580
12581                 # restore the LIBS
12582                 LIBS="$ol_LIBS"
12583         
12584 fi
12585
12586 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12587
12588         if test $ol_cv_pthread_thread = yes ; then
12589                 ol_link_pthreads="-thread"
12590                 ol_link_threads=posix
12591         fi
12592 fi
12593
12594
12595                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12596 if test "$ol_link_threads" = no ; then
12597         # try -lpthread -lmach -lexc -lc_r
12598         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12599 echo "configure:12600: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12600 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12601   echo $ac_n "(cached) $ac_c" 1>&6
12602 else
12603   
12604                 # save the flags
12605                 ol_LIBS="$LIBS"
12606                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12607
12608                 if test "$cross_compiling" = yes; then
12609   cat > conftest.$ac_ext <<EOF
12610 #line 12611 "configure"
12611 #include "confdefs.h"
12612 /* pthread test headers */
12613 #include <pthread.h>
12614 #if HAVE_PTHREADS < 7
12615 #include <errno.h>
12616 #endif
12617 #ifndef NULL
12618 #define NULL (void*)0
12619 #endif
12620
12621 static void *task(p)
12622         void *p;
12623 {
12624         return (void *) (p == NULL);
12625 }
12626
12627 int main() {
12628
12629         /* pthread test function */
12630 #ifndef PTHREAD_CREATE_DETACHED
12631 #define PTHREAD_CREATE_DETACHED 1
12632 #endif
12633         pthread_t t;
12634         int status;
12635         int detach = PTHREAD_CREATE_DETACHED;
12636
12637 #if HAVE_PTHREADS > 4
12638         /* Final pthreads */
12639         pthread_attr_t attr;
12640
12641         status = pthread_attr_init(&attr);
12642         if( status ) return status;
12643
12644 #if HAVE_PTHREADS < 7
12645         status = pthread_attr_setdetachstate(&attr, &detach);
12646         if( status < 0 ) status = errno;
12647 #else
12648         status = pthread_attr_setdetachstate(&attr, detach);
12649 #endif
12650         if( status ) return status;
12651         status = pthread_create( &t, &attr, task, NULL );
12652 #if HAVE_PTHREADS < 7
12653         if( status < 0 ) status = errno;
12654 #endif
12655         if( status ) return status;
12656 #else
12657         /* Draft 4 pthreads */
12658         status = pthread_create( &t, pthread_attr_default, task, NULL );
12659         if( status ) return errno;
12660
12661         /* give thread a chance to complete */
12662         /* it should remain joinable and hence detachable */
12663         sleep( 1 );
12664
12665         status = pthread_detach( &t );
12666         if( status ) return errno;
12667 #endif
12668
12669 #ifdef HAVE_LINUX_THREADS
12670         pthread_kill_other_threads_np();
12671 #endif
12672
12673         return 0;
12674
12675 ; return 0; }
12676 EOF
12677 if { (eval echo configure:12678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12678   rm -rf conftest*
12679   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12680 else
12681   echo "configure: failed program was:" >&5
12682   cat conftest.$ac_ext >&5
12683   rm -rf conftest*
12684   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12685 fi
12686 rm -f conftest*
12687 else
12688   cat > conftest.$ac_ext <<EOF
12689 #line 12690 "configure"
12690 #include "confdefs.h"
12691 /* pthread test headers */
12692 #include <pthread.h>
12693 #if HAVE_PTHREADS < 7
12694 #include <errno.h>
12695 #endif
12696 #ifndef NULL
12697 #define NULL (void*)0
12698 #endif
12699
12700 static void *task(p)
12701         void *p;
12702 {
12703         return (void *) (p == NULL);
12704 }
12705
12706
12707 int main(argc, argv)
12708         int argc;
12709         char **argv;
12710 {
12711
12712         /* pthread test function */
12713 #ifndef PTHREAD_CREATE_DETACHED
12714 #define PTHREAD_CREATE_DETACHED 1
12715 #endif
12716         pthread_t t;
12717         int status;
12718         int detach = PTHREAD_CREATE_DETACHED;
12719
12720 #if HAVE_PTHREADS > 4
12721         /* Final pthreads */
12722         pthread_attr_t attr;
12723
12724         status = pthread_attr_init(&attr);
12725         if( status ) return status;
12726
12727 #if HAVE_PTHREADS < 7
12728         status = pthread_attr_setdetachstate(&attr, &detach);
12729         if( status < 0 ) status = errno;
12730 #else
12731         status = pthread_attr_setdetachstate(&attr, detach);
12732 #endif
12733         if( status ) return status;
12734         status = pthread_create( &t, &attr, task, NULL );
12735 #if HAVE_PTHREADS < 7
12736         if( status < 0 ) status = errno;
12737 #endif
12738         if( status ) return status;
12739 #else
12740         /* Draft 4 pthreads */
12741         status = pthread_create( &t, pthread_attr_default, task, NULL );
12742         if( status ) return errno;
12743
12744         /* give thread a chance to complete */
12745         /* it should remain joinable and hence detachable */
12746         sleep( 1 );
12747
12748         status = pthread_detach( &t );
12749         if( status ) return errno;
12750 #endif
12751
12752 #ifdef HAVE_LINUX_THREADS
12753         pthread_kill_other_threads_np();
12754 #endif
12755
12756         return 0;
12757
12758 }
12759
12760 EOF
12761 if { (eval echo configure:12762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12762 then
12763   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12764 else
12765   echo "configure: failed program was:" >&5
12766   cat conftest.$ac_ext >&5
12767   rm -fr conftest*
12768   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12769 fi
12770 rm -fr conftest*
12771 fi
12772
12773
12774                 # restore the LIBS
12775                 LIBS="$ol_LIBS"
12776         
12777 fi
12778
12779 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12780
12781         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12782                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12783                 ol_link_threads=posix
12784         fi
12785 fi
12786
12787                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12788 if test "$ol_link_threads" = no ; then
12789         # try -lpthread -lmach -lexc
12790         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12791 echo "configure:12792: checking for pthread link with -lpthread -lmach -lexc" >&5
12792 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12793   echo $ac_n "(cached) $ac_c" 1>&6
12794 else
12795   
12796                 # save the flags
12797                 ol_LIBS="$LIBS"
12798                 LIBS="-lpthread -lmach -lexc $LIBS"
12799
12800                 if test "$cross_compiling" = yes; then
12801   cat > conftest.$ac_ext <<EOF
12802 #line 12803 "configure"
12803 #include "confdefs.h"
12804 /* pthread test headers */
12805 #include <pthread.h>
12806 #if HAVE_PTHREADS < 7
12807 #include <errno.h>
12808 #endif
12809 #ifndef NULL
12810 #define NULL (void*)0
12811 #endif
12812
12813 static void *task(p)
12814         void *p;
12815 {
12816         return (void *) (p == NULL);
12817 }
12818
12819 int main() {
12820
12821         /* pthread test function */
12822 #ifndef PTHREAD_CREATE_DETACHED
12823 #define PTHREAD_CREATE_DETACHED 1
12824 #endif
12825         pthread_t t;
12826         int status;
12827         int detach = PTHREAD_CREATE_DETACHED;
12828
12829 #if HAVE_PTHREADS > 4
12830         /* Final pthreads */
12831         pthread_attr_t attr;
12832
12833         status = pthread_attr_init(&attr);
12834         if( status ) return status;
12835
12836 #if HAVE_PTHREADS < 7
12837         status = pthread_attr_setdetachstate(&attr, &detach);
12838         if( status < 0 ) status = errno;
12839 #else
12840         status = pthread_attr_setdetachstate(&attr, detach);
12841 #endif
12842         if( status ) return status;
12843         status = pthread_create( &t, &attr, task, NULL );
12844 #if HAVE_PTHREADS < 7
12845         if( status < 0 ) status = errno;
12846 #endif
12847         if( status ) return status;
12848 #else
12849         /* Draft 4 pthreads */
12850         status = pthread_create( &t, pthread_attr_default, task, NULL );
12851         if( status ) return errno;
12852
12853         /* give thread a chance to complete */
12854         /* it should remain joinable and hence detachable */
12855         sleep( 1 );
12856
12857         status = pthread_detach( &t );
12858         if( status ) return errno;
12859 #endif
12860
12861 #ifdef HAVE_LINUX_THREADS
12862         pthread_kill_other_threads_np();
12863 #endif
12864
12865         return 0;
12866
12867 ; return 0; }
12868 EOF
12869 if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12870   rm -rf conftest*
12871   ol_cv_pthread_lpthread_lmach_lexc=yes
12872 else
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -rf conftest*
12876   ol_cv_pthread_lpthread_lmach_lexc=no
12877 fi
12878 rm -f conftest*
12879 else
12880   cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 /* pthread test headers */
12884 #include <pthread.h>
12885 #if HAVE_PTHREADS < 7
12886 #include <errno.h>
12887 #endif
12888 #ifndef NULL
12889 #define NULL (void*)0
12890 #endif
12891
12892 static void *task(p)
12893         void *p;
12894 {
12895         return (void *) (p == NULL);
12896 }
12897
12898
12899 int main(argc, argv)
12900         int argc;
12901         char **argv;
12902 {
12903
12904         /* pthread test function */
12905 #ifndef PTHREAD_CREATE_DETACHED
12906 #define PTHREAD_CREATE_DETACHED 1
12907 #endif
12908         pthread_t t;
12909         int status;
12910         int detach = PTHREAD_CREATE_DETACHED;
12911
12912 #if HAVE_PTHREADS > 4
12913         /* Final pthreads */
12914         pthread_attr_t attr;
12915
12916         status = pthread_attr_init(&attr);
12917         if( status ) return status;
12918
12919 #if HAVE_PTHREADS < 7
12920         status = pthread_attr_setdetachstate(&attr, &detach);
12921         if( status < 0 ) status = errno;
12922 #else
12923         status = pthread_attr_setdetachstate(&attr, detach);
12924 #endif
12925         if( status ) return status;
12926         status = pthread_create( &t, &attr, task, NULL );
12927 #if HAVE_PTHREADS < 7
12928         if( status < 0 ) status = errno;
12929 #endif
12930         if( status ) return status;
12931 #else
12932         /* Draft 4 pthreads */
12933         status = pthread_create( &t, pthread_attr_default, task, NULL );
12934         if( status ) return errno;
12935
12936         /* give thread a chance to complete */
12937         /* it should remain joinable and hence detachable */
12938         sleep( 1 );
12939
12940         status = pthread_detach( &t );
12941         if( status ) return errno;
12942 #endif
12943
12944 #ifdef HAVE_LINUX_THREADS
12945         pthread_kill_other_threads_np();
12946 #endif
12947
12948         return 0;
12949
12950 }
12951
12952 EOF
12953 if { (eval echo configure:12954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12954 then
12955   ol_cv_pthread_lpthread_lmach_lexc=yes
12956 else
12957   echo "configure: failed program was:" >&5
12958   cat conftest.$ac_ext >&5
12959   rm -fr conftest*
12960   ol_cv_pthread_lpthread_lmach_lexc=no
12961 fi
12962 rm -fr conftest*
12963 fi
12964
12965
12966                 # restore the LIBS
12967                 LIBS="$ol_LIBS"
12968         
12969 fi
12970
12971 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12972
12973         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12974                 ol_link_pthreads="-lpthread -lmach -lexc"
12975                 ol_link_threads=posix
12976         fi
12977 fi
12978
12979
12980                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12981 if test "$ol_link_threads" = no ; then
12982         # try -lpthread -Wl,-woff,85
12983         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12984 echo "configure:12985: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12985 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12986   echo $ac_n "(cached) $ac_c" 1>&6
12987 else
12988   
12989                 # save the flags
12990                 ol_LIBS="$LIBS"
12991                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12992
12993                 if test "$cross_compiling" = yes; then
12994   cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997 /* pthread test headers */
12998 #include <pthread.h>
12999 #if HAVE_PTHREADS < 7
13000 #include <errno.h>
13001 #endif
13002 #ifndef NULL
13003 #define NULL (void*)0
13004 #endif
13005
13006 static void *task(p)
13007         void *p;
13008 {
13009         return (void *) (p == NULL);
13010 }
13011
13012 int main() {
13013
13014         /* pthread test function */
13015 #ifndef PTHREAD_CREATE_DETACHED
13016 #define PTHREAD_CREATE_DETACHED 1
13017 #endif
13018         pthread_t t;
13019         int status;
13020         int detach = PTHREAD_CREATE_DETACHED;
13021
13022 #if HAVE_PTHREADS > 4
13023         /* Final pthreads */
13024         pthread_attr_t attr;
13025
13026         status = pthread_attr_init(&attr);
13027         if( status ) return status;
13028
13029 #if HAVE_PTHREADS < 7
13030         status = pthread_attr_setdetachstate(&attr, &detach);
13031         if( status < 0 ) status = errno;
13032 #else
13033         status = pthread_attr_setdetachstate(&attr, detach);
13034 #endif
13035         if( status ) return status;
13036         status = pthread_create( &t, &attr, task, NULL );
13037 #if HAVE_PTHREADS < 7
13038         if( status < 0 ) status = errno;
13039 #endif
13040         if( status ) return status;
13041 #else
13042         /* Draft 4 pthreads */
13043         status = pthread_create( &t, pthread_attr_default, task, NULL );
13044         if( status ) return errno;
13045
13046         /* give thread a chance to complete */
13047         /* it should remain joinable and hence detachable */
13048         sleep( 1 );
13049
13050         status = pthread_detach( &t );
13051         if( status ) return errno;
13052 #endif
13053
13054 #ifdef HAVE_LINUX_THREADS
13055         pthread_kill_other_threads_np();
13056 #endif
13057
13058         return 0;
13059
13060 ; return 0; }
13061 EOF
13062 if { (eval echo configure:13063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13063   rm -rf conftest*
13064   ol_cv_pthread_lib_lpthread_woff=yes
13065 else
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   ol_cv_pthread_lib_lpthread_woff=no
13070 fi
13071 rm -f conftest*
13072 else
13073   cat > conftest.$ac_ext <<EOF
13074 #line 13075 "configure"
13075 #include "confdefs.h"
13076 /* pthread test headers */
13077 #include <pthread.h>
13078 #if HAVE_PTHREADS < 7
13079 #include <errno.h>
13080 #endif
13081 #ifndef NULL
13082 #define NULL (void*)0
13083 #endif
13084
13085 static void *task(p)
13086         void *p;
13087 {
13088         return (void *) (p == NULL);
13089 }
13090
13091
13092 int main(argc, argv)
13093         int argc;
13094         char **argv;
13095 {
13096
13097         /* pthread test function */
13098 #ifndef PTHREAD_CREATE_DETACHED
13099 #define PTHREAD_CREATE_DETACHED 1
13100 #endif
13101         pthread_t t;
13102         int status;
13103         int detach = PTHREAD_CREATE_DETACHED;
13104
13105 #if HAVE_PTHREADS > 4
13106         /* Final pthreads */
13107         pthread_attr_t attr;
13108
13109         status = pthread_attr_init(&attr);
13110         if( status ) return status;
13111
13112 #if HAVE_PTHREADS < 7
13113         status = pthread_attr_setdetachstate(&attr, &detach);
13114         if( status < 0 ) status = errno;
13115 #else
13116         status = pthread_attr_setdetachstate(&attr, detach);
13117 #endif
13118         if( status ) return status;
13119         status = pthread_create( &t, &attr, task, NULL );
13120 #if HAVE_PTHREADS < 7
13121         if( status < 0 ) status = errno;
13122 #endif
13123         if( status ) return status;
13124 #else
13125         /* Draft 4 pthreads */
13126         status = pthread_create( &t, pthread_attr_default, task, NULL );
13127         if( status ) return errno;
13128
13129         /* give thread a chance to complete */
13130         /* it should remain joinable and hence detachable */
13131         sleep( 1 );
13132
13133         status = pthread_detach( &t );
13134         if( status ) return errno;
13135 #endif
13136
13137 #ifdef HAVE_LINUX_THREADS
13138         pthread_kill_other_threads_np();
13139 #endif
13140
13141         return 0;
13142
13143 }
13144
13145 EOF
13146 if { (eval echo configure:13147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13147 then
13148   ol_cv_pthread_lib_lpthread_woff=yes
13149 else
13150   echo "configure: failed program was:" >&5
13151   cat conftest.$ac_ext >&5
13152   rm -fr conftest*
13153   ol_cv_pthread_lib_lpthread_woff=no
13154 fi
13155 rm -fr conftest*
13156 fi
13157
13158
13159                 # restore the LIBS
13160                 LIBS="$ol_LIBS"
13161         
13162 fi
13163
13164 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13165
13166         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13167                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13168                 ol_link_threads=posix
13169         fi
13170 fi
13171
13172
13173                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13174 if test "$ol_link_threads" = no ; then
13175         # try -lpthread
13176         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13177 echo "configure:13178: checking for pthread link with -lpthread" >&5
13178 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   
13182                 # save the flags
13183                 ol_LIBS="$LIBS"
13184                 LIBS="-lpthread $LIBS"
13185
13186                 if test "$cross_compiling" = yes; then
13187   cat > conftest.$ac_ext <<EOF
13188 #line 13189 "configure"
13189 #include "confdefs.h"
13190 /* pthread test headers */
13191 #include <pthread.h>
13192 #if HAVE_PTHREADS < 7
13193 #include <errno.h>
13194 #endif
13195 #ifndef NULL
13196 #define NULL (void*)0
13197 #endif
13198
13199 static void *task(p)
13200         void *p;
13201 {
13202         return (void *) (p == NULL);
13203 }
13204
13205 int main() {
13206
13207         /* pthread test function */
13208 #ifndef PTHREAD_CREATE_DETACHED
13209 #define PTHREAD_CREATE_DETACHED 1
13210 #endif
13211         pthread_t t;
13212         int status;
13213         int detach = PTHREAD_CREATE_DETACHED;
13214
13215 #if HAVE_PTHREADS > 4
13216         /* Final pthreads */
13217         pthread_attr_t attr;
13218
13219         status = pthread_attr_init(&attr);
13220         if( status ) return status;
13221
13222 #if HAVE_PTHREADS < 7
13223         status = pthread_attr_setdetachstate(&attr, &detach);
13224         if( status < 0 ) status = errno;
13225 #else
13226         status = pthread_attr_setdetachstate(&attr, detach);
13227 #endif
13228         if( status ) return status;
13229         status = pthread_create( &t, &attr, task, NULL );
13230 #if HAVE_PTHREADS < 7
13231         if( status < 0 ) status = errno;
13232 #endif
13233         if( status ) return status;
13234 #else
13235         /* Draft 4 pthreads */
13236         status = pthread_create( &t, pthread_attr_default, task, NULL );
13237         if( status ) return errno;
13238
13239         /* give thread a chance to complete */
13240         /* it should remain joinable and hence detachable */
13241         sleep( 1 );
13242
13243         status = pthread_detach( &t );
13244         if( status ) return errno;
13245 #endif
13246
13247 #ifdef HAVE_LINUX_THREADS
13248         pthread_kill_other_threads_np();
13249 #endif
13250
13251         return 0;
13252
13253 ; return 0; }
13254 EOF
13255 if { (eval echo configure:13256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13256   rm -rf conftest*
13257   ol_cv_pthread_lpthread=yes
13258 else
13259   echo "configure: failed program was:" >&5
13260   cat conftest.$ac_ext >&5
13261   rm -rf conftest*
13262   ol_cv_pthread_lpthread=no
13263 fi
13264 rm -f conftest*
13265 else
13266   cat > conftest.$ac_ext <<EOF
13267 #line 13268 "configure"
13268 #include "confdefs.h"
13269 /* pthread test headers */
13270 #include <pthread.h>
13271 #if HAVE_PTHREADS < 7
13272 #include <errno.h>
13273 #endif
13274 #ifndef NULL
13275 #define NULL (void*)0
13276 #endif
13277
13278 static void *task(p)
13279         void *p;
13280 {
13281         return (void *) (p == NULL);
13282 }
13283
13284
13285 int main(argc, argv)
13286         int argc;
13287         char **argv;
13288 {
13289
13290         /* pthread test function */
13291 #ifndef PTHREAD_CREATE_DETACHED
13292 #define PTHREAD_CREATE_DETACHED 1
13293 #endif
13294         pthread_t t;
13295         int status;
13296         int detach = PTHREAD_CREATE_DETACHED;
13297
13298 #if HAVE_PTHREADS > 4
13299         /* Final pthreads */
13300         pthread_attr_t attr;
13301
13302         status = pthread_attr_init(&attr);
13303         if( status ) return status;
13304
13305 #if HAVE_PTHREADS < 7
13306         status = pthread_attr_setdetachstate(&attr, &detach);
13307         if( status < 0 ) status = errno;
13308 #else
13309         status = pthread_attr_setdetachstate(&attr, detach);
13310 #endif
13311         if( status ) return status;
13312         status = pthread_create( &t, &attr, task, NULL );
13313 #if HAVE_PTHREADS < 7
13314         if( status < 0 ) status = errno;
13315 #endif
13316         if( status ) return status;
13317 #else
13318         /* Draft 4 pthreads */
13319         status = pthread_create( &t, pthread_attr_default, task, NULL );
13320         if( status ) return errno;
13321
13322         /* give thread a chance to complete */
13323         /* it should remain joinable and hence detachable */
13324         sleep( 1 );
13325
13326         status = pthread_detach( &t );
13327         if( status ) return errno;
13328 #endif
13329
13330 #ifdef HAVE_LINUX_THREADS
13331         pthread_kill_other_threads_np();
13332 #endif
13333
13334         return 0;
13335
13336 }
13337
13338 EOF
13339 if { (eval echo configure:13340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13340 then
13341   ol_cv_pthread_lpthread=yes
13342 else
13343   echo "configure: failed program was:" >&5
13344   cat conftest.$ac_ext >&5
13345   rm -fr conftest*
13346   ol_cv_pthread_lpthread=no
13347 fi
13348 rm -fr conftest*
13349 fi
13350
13351
13352                 # restore the LIBS
13353                 LIBS="$ol_LIBS"
13354         
13355 fi
13356
13357 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13358
13359         if test $ol_cv_pthread_lpthread = yes ; then
13360                 ol_link_pthreads="-lpthread"
13361                 ol_link_threads=posix
13362         fi
13363 fi
13364
13365                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13366 if test "$ol_link_threads" = no ; then
13367         # try -lc_r
13368         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13369 echo "configure:13370: checking for pthread link with -lc_r" >&5
13370 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13371   echo $ac_n "(cached) $ac_c" 1>&6
13372 else
13373   
13374                 # save the flags
13375                 ol_LIBS="$LIBS"
13376                 LIBS="-lc_r $LIBS"
13377
13378                 if test "$cross_compiling" = yes; then
13379   cat > conftest.$ac_ext <<EOF
13380 #line 13381 "configure"
13381 #include "confdefs.h"
13382 /* pthread test headers */
13383 #include <pthread.h>
13384 #if HAVE_PTHREADS < 7
13385 #include <errno.h>
13386 #endif
13387 #ifndef NULL
13388 #define NULL (void*)0
13389 #endif
13390
13391 static void *task(p)
13392         void *p;
13393 {
13394         return (void *) (p == NULL);
13395 }
13396
13397 int main() {
13398
13399         /* pthread test function */
13400 #ifndef PTHREAD_CREATE_DETACHED
13401 #define PTHREAD_CREATE_DETACHED 1
13402 #endif
13403         pthread_t t;
13404         int status;
13405         int detach = PTHREAD_CREATE_DETACHED;
13406
13407 #if HAVE_PTHREADS > 4
13408         /* Final pthreads */
13409         pthread_attr_t attr;
13410
13411         status = pthread_attr_init(&attr);
13412         if( status ) return status;
13413
13414 #if HAVE_PTHREADS < 7
13415         status = pthread_attr_setdetachstate(&attr, &detach);
13416         if( status < 0 ) status = errno;
13417 #else
13418         status = pthread_attr_setdetachstate(&attr, detach);
13419 #endif
13420         if( status ) return status;
13421         status = pthread_create( &t, &attr, task, NULL );
13422 #if HAVE_PTHREADS < 7
13423         if( status < 0 ) status = errno;
13424 #endif
13425         if( status ) return status;
13426 #else
13427         /* Draft 4 pthreads */
13428         status = pthread_create( &t, pthread_attr_default, task, NULL );
13429         if( status ) return errno;
13430
13431         /* give thread a chance to complete */
13432         /* it should remain joinable and hence detachable */
13433         sleep( 1 );
13434
13435         status = pthread_detach( &t );
13436         if( status ) return errno;
13437 #endif
13438
13439 #ifdef HAVE_LINUX_THREADS
13440         pthread_kill_other_threads_np();
13441 #endif
13442
13443         return 0;
13444
13445 ; return 0; }
13446 EOF
13447 if { (eval echo configure:13448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13448   rm -rf conftest*
13449   ol_cv_pthread_lc_r=yes
13450 else
13451   echo "configure: failed program was:" >&5
13452   cat conftest.$ac_ext >&5
13453   rm -rf conftest*
13454   ol_cv_pthread_lc_r=no
13455 fi
13456 rm -f conftest*
13457 else
13458   cat > conftest.$ac_ext <<EOF
13459 #line 13460 "configure"
13460 #include "confdefs.h"
13461 /* pthread test headers */
13462 #include <pthread.h>
13463 #if HAVE_PTHREADS < 7
13464 #include <errno.h>
13465 #endif
13466 #ifndef NULL
13467 #define NULL (void*)0
13468 #endif
13469
13470 static void *task(p)
13471         void *p;
13472 {
13473         return (void *) (p == NULL);
13474 }
13475
13476
13477 int main(argc, argv)
13478         int argc;
13479         char **argv;
13480 {
13481
13482         /* pthread test function */
13483 #ifndef PTHREAD_CREATE_DETACHED
13484 #define PTHREAD_CREATE_DETACHED 1
13485 #endif
13486         pthread_t t;
13487         int status;
13488         int detach = PTHREAD_CREATE_DETACHED;
13489
13490 #if HAVE_PTHREADS > 4
13491         /* Final pthreads */
13492         pthread_attr_t attr;
13493
13494         status = pthread_attr_init(&attr);
13495         if( status ) return status;
13496
13497 #if HAVE_PTHREADS < 7
13498         status = pthread_attr_setdetachstate(&attr, &detach);
13499         if( status < 0 ) status = errno;
13500 #else
13501         status = pthread_attr_setdetachstate(&attr, detach);
13502 #endif
13503         if( status ) return status;
13504         status = pthread_create( &t, &attr, task, NULL );
13505 #if HAVE_PTHREADS < 7
13506         if( status < 0 ) status = errno;
13507 #endif
13508         if( status ) return status;
13509 #else
13510         /* Draft 4 pthreads */
13511         status = pthread_create( &t, pthread_attr_default, task, NULL );
13512         if( status ) return errno;
13513
13514         /* give thread a chance to complete */
13515         /* it should remain joinable and hence detachable */
13516         sleep( 1 );
13517
13518         status = pthread_detach( &t );
13519         if( status ) return errno;
13520 #endif
13521
13522 #ifdef HAVE_LINUX_THREADS
13523         pthread_kill_other_threads_np();
13524 #endif
13525
13526         return 0;
13527
13528 }
13529
13530 EOF
13531 if { (eval echo configure:13532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13532 then
13533   ol_cv_pthread_lc_r=yes
13534 else
13535   echo "configure: failed program was:" >&5
13536   cat conftest.$ac_ext >&5
13537   rm -fr conftest*
13538   ol_cv_pthread_lc_r=no
13539 fi
13540 rm -fr conftest*
13541 fi
13542
13543
13544                 # restore the LIBS
13545                 LIBS="$ol_LIBS"
13546         
13547 fi
13548
13549 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13550
13551         if test $ol_cv_pthread_lc_r = yes ; then
13552                 ol_link_pthreads="-lc_r"
13553                 ol_link_threads=posix
13554         fi
13555 fi
13556
13557
13558                 # Pthread try link: -threads (ol_cv_pthread_threads)
13559 if test "$ol_link_threads" = no ; then
13560         # try -threads
13561         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13562 echo "configure:13563: checking for pthread link with -threads" >&5
13563 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13564   echo $ac_n "(cached) $ac_c" 1>&6
13565 else
13566   
13567                 # save the flags
13568                 ol_LIBS="$LIBS"
13569                 LIBS="-threads $LIBS"
13570
13571                 if test "$cross_compiling" = yes; then
13572   cat > conftest.$ac_ext <<EOF
13573 #line 13574 "configure"
13574 #include "confdefs.h"
13575 /* pthread test headers */
13576 #include <pthread.h>
13577 #if HAVE_PTHREADS < 7
13578 #include <errno.h>
13579 #endif
13580 #ifndef NULL
13581 #define NULL (void*)0
13582 #endif
13583
13584 static void *task(p)
13585         void *p;
13586 {
13587         return (void *) (p == NULL);
13588 }
13589
13590 int main() {
13591
13592         /* pthread test function */
13593 #ifndef PTHREAD_CREATE_DETACHED
13594 #define PTHREAD_CREATE_DETACHED 1
13595 #endif
13596         pthread_t t;
13597         int status;
13598         int detach = PTHREAD_CREATE_DETACHED;
13599
13600 #if HAVE_PTHREADS > 4
13601         /* Final pthreads */
13602         pthread_attr_t attr;
13603
13604         status = pthread_attr_init(&attr);
13605         if( status ) return status;
13606
13607 #if HAVE_PTHREADS < 7
13608         status = pthread_attr_setdetachstate(&attr, &detach);
13609         if( status < 0 ) status = errno;
13610 #else
13611         status = pthread_attr_setdetachstate(&attr, detach);
13612 #endif
13613         if( status ) return status;
13614         status = pthread_create( &t, &attr, task, NULL );
13615 #if HAVE_PTHREADS < 7
13616         if( status < 0 ) status = errno;
13617 #endif
13618         if( status ) return status;
13619 #else
13620         /* Draft 4 pthreads */
13621         status = pthread_create( &t, pthread_attr_default, task, NULL );
13622         if( status ) return errno;
13623
13624         /* give thread a chance to complete */
13625         /* it should remain joinable and hence detachable */
13626         sleep( 1 );
13627
13628         status = pthread_detach( &t );
13629         if( status ) return errno;
13630 #endif
13631
13632 #ifdef HAVE_LINUX_THREADS
13633         pthread_kill_other_threads_np();
13634 #endif
13635
13636         return 0;
13637
13638 ; return 0; }
13639 EOF
13640 if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13641   rm -rf conftest*
13642   ol_cv_pthread_threads=yes
13643 else
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   ol_cv_pthread_threads=no
13648 fi
13649 rm -f conftest*
13650 else
13651   cat > conftest.$ac_ext <<EOF
13652 #line 13653 "configure"
13653 #include "confdefs.h"
13654 /* pthread test headers */
13655 #include <pthread.h>
13656 #if HAVE_PTHREADS < 7
13657 #include <errno.h>
13658 #endif
13659 #ifndef NULL
13660 #define NULL (void*)0
13661 #endif
13662
13663 static void *task(p)
13664         void *p;
13665 {
13666         return (void *) (p == NULL);
13667 }
13668
13669
13670 int main(argc, argv)
13671         int argc;
13672         char **argv;
13673 {
13674
13675         /* pthread test function */
13676 #ifndef PTHREAD_CREATE_DETACHED
13677 #define PTHREAD_CREATE_DETACHED 1
13678 #endif
13679         pthread_t t;
13680         int status;
13681         int detach = PTHREAD_CREATE_DETACHED;
13682
13683 #if HAVE_PTHREADS > 4
13684         /* Final pthreads */
13685         pthread_attr_t attr;
13686
13687         status = pthread_attr_init(&attr);
13688         if( status ) return status;
13689
13690 #if HAVE_PTHREADS < 7
13691         status = pthread_attr_setdetachstate(&attr, &detach);
13692         if( status < 0 ) status = errno;
13693 #else
13694         status = pthread_attr_setdetachstate(&attr, detach);
13695 #endif
13696         if( status ) return status;
13697         status = pthread_create( &t, &attr, task, NULL );
13698 #if HAVE_PTHREADS < 7
13699         if( status < 0 ) status = errno;
13700 #endif
13701         if( status ) return status;
13702 #else
13703         /* Draft 4 pthreads */
13704         status = pthread_create( &t, pthread_attr_default, task, NULL );
13705         if( status ) return errno;
13706
13707         /* give thread a chance to complete */
13708         /* it should remain joinable and hence detachable */
13709         sleep( 1 );
13710
13711         status = pthread_detach( &t );
13712         if( status ) return errno;
13713 #endif
13714
13715 #ifdef HAVE_LINUX_THREADS
13716         pthread_kill_other_threads_np();
13717 #endif
13718
13719         return 0;
13720
13721 }
13722
13723 EOF
13724 if { (eval echo configure:13725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13725 then
13726   ol_cv_pthread_threads=yes
13727 else
13728   echo "configure: failed program was:" >&5
13729   cat conftest.$ac_ext >&5
13730   rm -fr conftest*
13731   ol_cv_pthread_threads=no
13732 fi
13733 rm -fr conftest*
13734 fi
13735
13736
13737                 # restore the LIBS
13738                 LIBS="$ol_LIBS"
13739         
13740 fi
13741
13742 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13743
13744         if test $ol_cv_pthread_threads = yes ; then
13745                 ol_link_pthreads="-threads"
13746                 ol_link_threads=posix
13747         fi
13748 fi
13749
13750
13751                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13752 if test "$ol_link_threads" = no ; then
13753         # try -lpthreads -lmach -lexc -lc_r
13754         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13755 echo "configure:13756: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13756 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13757   echo $ac_n "(cached) $ac_c" 1>&6
13758 else
13759   
13760                 # save the flags
13761                 ol_LIBS="$LIBS"
13762                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13763
13764                 if test "$cross_compiling" = yes; then
13765   cat > conftest.$ac_ext <<EOF
13766 #line 13767 "configure"
13767 #include "confdefs.h"
13768 /* pthread test headers */
13769 #include <pthread.h>
13770 #if HAVE_PTHREADS < 7
13771 #include <errno.h>
13772 #endif
13773 #ifndef NULL
13774 #define NULL (void*)0
13775 #endif
13776
13777 static void *task(p)
13778         void *p;
13779 {
13780         return (void *) (p == NULL);
13781 }
13782
13783 int main() {
13784
13785         /* pthread test function */
13786 #ifndef PTHREAD_CREATE_DETACHED
13787 #define PTHREAD_CREATE_DETACHED 1
13788 #endif
13789         pthread_t t;
13790         int status;
13791         int detach = PTHREAD_CREATE_DETACHED;
13792
13793 #if HAVE_PTHREADS > 4
13794         /* Final pthreads */
13795         pthread_attr_t attr;
13796
13797         status = pthread_attr_init(&attr);
13798         if( status ) return status;
13799
13800 #if HAVE_PTHREADS < 7
13801         status = pthread_attr_setdetachstate(&attr, &detach);
13802         if( status < 0 ) status = errno;
13803 #else
13804         status = pthread_attr_setdetachstate(&attr, detach);
13805 #endif
13806         if( status ) return status;
13807         status = pthread_create( &t, &attr, task, NULL );
13808 #if HAVE_PTHREADS < 7
13809         if( status < 0 ) status = errno;
13810 #endif
13811         if( status ) return status;
13812 #else
13813         /* Draft 4 pthreads */
13814         status = pthread_create( &t, pthread_attr_default, task, NULL );
13815         if( status ) return errno;
13816
13817         /* give thread a chance to complete */
13818         /* it should remain joinable and hence detachable */
13819         sleep( 1 );
13820
13821         status = pthread_detach( &t );
13822         if( status ) return errno;
13823 #endif
13824
13825 #ifdef HAVE_LINUX_THREADS
13826         pthread_kill_other_threads_np();
13827 #endif
13828
13829         return 0;
13830
13831 ; return 0; }
13832 EOF
13833 if { (eval echo configure:13834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13834   rm -rf conftest*
13835   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13836 else
13837   echo "configure: failed program was:" >&5
13838   cat conftest.$ac_ext >&5
13839   rm -rf conftest*
13840   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13841 fi
13842 rm -f conftest*
13843 else
13844   cat > conftest.$ac_ext <<EOF
13845 #line 13846 "configure"
13846 #include "confdefs.h"
13847 /* pthread test headers */
13848 #include <pthread.h>
13849 #if HAVE_PTHREADS < 7
13850 #include <errno.h>
13851 #endif
13852 #ifndef NULL
13853 #define NULL (void*)0
13854 #endif
13855
13856 static void *task(p)
13857         void *p;
13858 {
13859         return (void *) (p == NULL);
13860 }
13861
13862
13863 int main(argc, argv)
13864         int argc;
13865         char **argv;
13866 {
13867
13868         /* pthread test function */
13869 #ifndef PTHREAD_CREATE_DETACHED
13870 #define PTHREAD_CREATE_DETACHED 1
13871 #endif
13872         pthread_t t;
13873         int status;
13874         int detach = PTHREAD_CREATE_DETACHED;
13875
13876 #if HAVE_PTHREADS > 4
13877         /* Final pthreads */
13878         pthread_attr_t attr;
13879
13880         status = pthread_attr_init(&attr);
13881         if( status ) return status;
13882
13883 #if HAVE_PTHREADS < 7
13884         status = pthread_attr_setdetachstate(&attr, &detach);
13885         if( status < 0 ) status = errno;
13886 #else
13887         status = pthread_attr_setdetachstate(&attr, detach);
13888 #endif
13889         if( status ) return status;
13890         status = pthread_create( &t, &attr, task, NULL );
13891 #if HAVE_PTHREADS < 7
13892         if( status < 0 ) status = errno;
13893 #endif
13894         if( status ) return status;
13895 #else
13896         /* Draft 4 pthreads */
13897         status = pthread_create( &t, pthread_attr_default, task, NULL );
13898         if( status ) return errno;
13899
13900         /* give thread a chance to complete */
13901         /* it should remain joinable and hence detachable */
13902         sleep( 1 );
13903
13904         status = pthread_detach( &t );
13905         if( status ) return errno;
13906 #endif
13907
13908 #ifdef HAVE_LINUX_THREADS
13909         pthread_kill_other_threads_np();
13910 #endif
13911
13912         return 0;
13913
13914 }
13915
13916 EOF
13917 if { (eval echo configure:13918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13918 then
13919   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13920 else
13921   echo "configure: failed program was:" >&5
13922   cat conftest.$ac_ext >&5
13923   rm -fr conftest*
13924   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13925 fi
13926 rm -fr conftest*
13927 fi
13928
13929
13930                 # restore the LIBS
13931                 LIBS="$ol_LIBS"
13932         
13933 fi
13934
13935 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13936
13937         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13938                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13939                 ol_link_threads=posix
13940         fi
13941 fi
13942
13943                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13944 if test "$ol_link_threads" = no ; then
13945         # try -lpthreads -lmach -lexc
13946         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13947 echo "configure:13948: checking for pthread link with -lpthreads -lmach -lexc" >&5
13948 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13949   echo $ac_n "(cached) $ac_c" 1>&6
13950 else
13951   
13952                 # save the flags
13953                 ol_LIBS="$LIBS"
13954                 LIBS="-lpthreads -lmach -lexc $LIBS"
13955
13956                 if test "$cross_compiling" = yes; then
13957   cat > conftest.$ac_ext <<EOF
13958 #line 13959 "configure"
13959 #include "confdefs.h"
13960 /* pthread test headers */
13961 #include <pthread.h>
13962 #if HAVE_PTHREADS < 7
13963 #include <errno.h>
13964 #endif
13965 #ifndef NULL
13966 #define NULL (void*)0
13967 #endif
13968
13969 static void *task(p)
13970         void *p;
13971 {
13972         return (void *) (p == NULL);
13973 }
13974
13975 int main() {
13976
13977         /* pthread test function */
13978 #ifndef PTHREAD_CREATE_DETACHED
13979 #define PTHREAD_CREATE_DETACHED 1
13980 #endif
13981         pthread_t t;
13982         int status;
13983         int detach = PTHREAD_CREATE_DETACHED;
13984
13985 #if HAVE_PTHREADS > 4
13986         /* Final pthreads */
13987         pthread_attr_t attr;
13988
13989         status = pthread_attr_init(&attr);
13990         if( status ) return status;
13991
13992 #if HAVE_PTHREADS < 7
13993         status = pthread_attr_setdetachstate(&attr, &detach);
13994         if( status < 0 ) status = errno;
13995 #else
13996         status = pthread_attr_setdetachstate(&attr, detach);
13997 #endif
13998         if( status ) return status;
13999         status = pthread_create( &t, &attr, task, NULL );
14000 #if HAVE_PTHREADS < 7
14001         if( status < 0 ) status = errno;
14002 #endif
14003         if( status ) return status;
14004 #else
14005         /* Draft 4 pthreads */
14006         status = pthread_create( &t, pthread_attr_default, task, NULL );
14007         if( status ) return errno;
14008
14009         /* give thread a chance to complete */
14010         /* it should remain joinable and hence detachable */
14011         sleep( 1 );
14012
14013         status = pthread_detach( &t );
14014         if( status ) return errno;
14015 #endif
14016
14017 #ifdef HAVE_LINUX_THREADS
14018         pthread_kill_other_threads_np();
14019 #endif
14020
14021         return 0;
14022
14023 ; return 0; }
14024 EOF
14025 if { (eval echo configure:14026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14026   rm -rf conftest*
14027   ol_cv_pthread_lpthreads_lmach_lexc=yes
14028 else
14029   echo "configure: failed program was:" >&5
14030   cat conftest.$ac_ext >&5
14031   rm -rf conftest*
14032   ol_cv_pthread_lpthreads_lmach_lexc=no
14033 fi
14034 rm -f conftest*
14035 else
14036   cat > conftest.$ac_ext <<EOF
14037 #line 14038 "configure"
14038 #include "confdefs.h"
14039 /* pthread test headers */
14040 #include <pthread.h>
14041 #if HAVE_PTHREADS < 7
14042 #include <errno.h>
14043 #endif
14044 #ifndef NULL
14045 #define NULL (void*)0
14046 #endif
14047
14048 static void *task(p)
14049         void *p;
14050 {
14051         return (void *) (p == NULL);
14052 }
14053
14054
14055 int main(argc, argv)
14056         int argc;
14057         char **argv;
14058 {
14059
14060         /* pthread test function */
14061 #ifndef PTHREAD_CREATE_DETACHED
14062 #define PTHREAD_CREATE_DETACHED 1
14063 #endif
14064         pthread_t t;
14065         int status;
14066         int detach = PTHREAD_CREATE_DETACHED;
14067
14068 #if HAVE_PTHREADS > 4
14069         /* Final pthreads */
14070         pthread_attr_t attr;
14071
14072         status = pthread_attr_init(&attr);
14073         if( status ) return status;
14074
14075 #if HAVE_PTHREADS < 7
14076         status = pthread_attr_setdetachstate(&attr, &detach);
14077         if( status < 0 ) status = errno;
14078 #else
14079         status = pthread_attr_setdetachstate(&attr, detach);
14080 #endif
14081         if( status ) return status;
14082         status = pthread_create( &t, &attr, task, NULL );
14083 #if HAVE_PTHREADS < 7
14084         if( status < 0 ) status = errno;
14085 #endif
14086         if( status ) return status;
14087 #else
14088         /* Draft 4 pthreads */
14089         status = pthread_create( &t, pthread_attr_default, task, NULL );
14090         if( status ) return errno;
14091
14092         /* give thread a chance to complete */
14093         /* it should remain joinable and hence detachable */
14094         sleep( 1 );
14095
14096         status = pthread_detach( &t );
14097         if( status ) return errno;
14098 #endif
14099
14100 #ifdef HAVE_LINUX_THREADS
14101         pthread_kill_other_threads_np();
14102 #endif
14103
14104         return 0;
14105
14106 }
14107
14108 EOF
14109 if { (eval echo configure:14110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14110 then
14111   ol_cv_pthread_lpthreads_lmach_lexc=yes
14112 else
14113   echo "configure: failed program was:" >&5
14114   cat conftest.$ac_ext >&5
14115   rm -fr conftest*
14116   ol_cv_pthread_lpthreads_lmach_lexc=no
14117 fi
14118 rm -fr conftest*
14119 fi
14120
14121
14122                 # restore the LIBS
14123                 LIBS="$ol_LIBS"
14124         
14125 fi
14126
14127 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14128
14129         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14130                 ol_link_pthreads="-lpthreads -lmach -lexc"
14131                 ol_link_threads=posix
14132         fi
14133 fi
14134
14135                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14136 if test "$ol_link_threads" = no ; then
14137         # try -lpthreads -lexc
14138         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14139 echo "configure:14140: checking for pthread link with -lpthreads -lexc" >&5
14140 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14141   echo $ac_n "(cached) $ac_c" 1>&6
14142 else
14143   
14144                 # save the flags
14145                 ol_LIBS="$LIBS"
14146                 LIBS="-lpthreads -lexc $LIBS"
14147
14148                 if test "$cross_compiling" = yes; then
14149   cat > conftest.$ac_ext <<EOF
14150 #line 14151 "configure"
14151 #include "confdefs.h"
14152 /* pthread test headers */
14153 #include <pthread.h>
14154 #if HAVE_PTHREADS < 7
14155 #include <errno.h>
14156 #endif
14157 #ifndef NULL
14158 #define NULL (void*)0
14159 #endif
14160
14161 static void *task(p)
14162         void *p;
14163 {
14164         return (void *) (p == NULL);
14165 }
14166
14167 int main() {
14168
14169         /* pthread test function */
14170 #ifndef PTHREAD_CREATE_DETACHED
14171 #define PTHREAD_CREATE_DETACHED 1
14172 #endif
14173         pthread_t t;
14174         int status;
14175         int detach = PTHREAD_CREATE_DETACHED;
14176
14177 #if HAVE_PTHREADS > 4
14178         /* Final pthreads */
14179         pthread_attr_t attr;
14180
14181         status = pthread_attr_init(&attr);
14182         if( status ) return status;
14183
14184 #if HAVE_PTHREADS < 7
14185         status = pthread_attr_setdetachstate(&attr, &detach);
14186         if( status < 0 ) status = errno;
14187 #else
14188         status = pthread_attr_setdetachstate(&attr, detach);
14189 #endif
14190         if( status ) return status;
14191         status = pthread_create( &t, &attr, task, NULL );
14192 #if HAVE_PTHREADS < 7
14193         if( status < 0 ) status = errno;
14194 #endif
14195         if( status ) return status;
14196 #else
14197         /* Draft 4 pthreads */
14198         status = pthread_create( &t, pthread_attr_default, task, NULL );
14199         if( status ) return errno;
14200
14201         /* give thread a chance to complete */
14202         /* it should remain joinable and hence detachable */
14203         sleep( 1 );
14204
14205         status = pthread_detach( &t );
14206         if( status ) return errno;
14207 #endif
14208
14209 #ifdef HAVE_LINUX_THREADS
14210         pthread_kill_other_threads_np();
14211 #endif
14212
14213         return 0;
14214
14215 ; return 0; }
14216 EOF
14217 if { (eval echo configure:14218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14218   rm -rf conftest*
14219   ol_cv_pthread_lpthreads_lexc=yes
14220 else
14221   echo "configure: failed program was:" >&5
14222   cat conftest.$ac_ext >&5
14223   rm -rf conftest*
14224   ol_cv_pthread_lpthreads_lexc=no
14225 fi
14226 rm -f conftest*
14227 else
14228   cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 /* pthread test headers */
14232 #include <pthread.h>
14233 #if HAVE_PTHREADS < 7
14234 #include <errno.h>
14235 #endif
14236 #ifndef NULL
14237 #define NULL (void*)0
14238 #endif
14239
14240 static void *task(p)
14241         void *p;
14242 {
14243         return (void *) (p == NULL);
14244 }
14245
14246
14247 int main(argc, argv)
14248         int argc;
14249         char **argv;
14250 {
14251
14252         /* pthread test function */
14253 #ifndef PTHREAD_CREATE_DETACHED
14254 #define PTHREAD_CREATE_DETACHED 1
14255 #endif
14256         pthread_t t;
14257         int status;
14258         int detach = PTHREAD_CREATE_DETACHED;
14259
14260 #if HAVE_PTHREADS > 4
14261         /* Final pthreads */
14262         pthread_attr_t attr;
14263
14264         status = pthread_attr_init(&attr);
14265         if( status ) return status;
14266
14267 #if HAVE_PTHREADS < 7
14268         status = pthread_attr_setdetachstate(&attr, &detach);
14269         if( status < 0 ) status = errno;
14270 #else
14271         status = pthread_attr_setdetachstate(&attr, detach);
14272 #endif
14273         if( status ) return status;
14274         status = pthread_create( &t, &attr, task, NULL );
14275 #if HAVE_PTHREADS < 7
14276         if( status < 0 ) status = errno;
14277 #endif
14278         if( status ) return status;
14279 #else
14280         /* Draft 4 pthreads */
14281         status = pthread_create( &t, pthread_attr_default, task, NULL );
14282         if( status ) return errno;
14283
14284         /* give thread a chance to complete */
14285         /* it should remain joinable and hence detachable */
14286         sleep( 1 );
14287
14288         status = pthread_detach( &t );
14289         if( status ) return errno;
14290 #endif
14291
14292 #ifdef HAVE_LINUX_THREADS
14293         pthread_kill_other_threads_np();
14294 #endif
14295
14296         return 0;
14297
14298 }
14299
14300 EOF
14301 if { (eval echo configure:14302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14302 then
14303   ol_cv_pthread_lpthreads_lexc=yes
14304 else
14305   echo "configure: failed program was:" >&5
14306   cat conftest.$ac_ext >&5
14307   rm -fr conftest*
14308   ol_cv_pthread_lpthreads_lexc=no
14309 fi
14310 rm -fr conftest*
14311 fi
14312
14313
14314                 # restore the LIBS
14315                 LIBS="$ol_LIBS"
14316         
14317 fi
14318
14319 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14320
14321         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14322                 ol_link_pthreads="-lpthreads -lexc"
14323                 ol_link_threads=posix
14324         fi
14325 fi
14326
14327
14328                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14329 if test "$ol_link_threads" = no ; then
14330         # try -lpthreads
14331         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14332 echo "configure:14333: checking for pthread link with -lpthreads" >&5
14333 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14334   echo $ac_n "(cached) $ac_c" 1>&6
14335 else
14336   
14337                 # save the flags
14338                 ol_LIBS="$LIBS"
14339                 LIBS="-lpthreads $LIBS"
14340
14341                 if test "$cross_compiling" = yes; then
14342   cat > conftest.$ac_ext <<EOF
14343 #line 14344 "configure"
14344 #include "confdefs.h"
14345 /* pthread test headers */
14346 #include <pthread.h>
14347 #if HAVE_PTHREADS < 7
14348 #include <errno.h>
14349 #endif
14350 #ifndef NULL
14351 #define NULL (void*)0
14352 #endif
14353
14354 static void *task(p)
14355         void *p;
14356 {
14357         return (void *) (p == NULL);
14358 }
14359
14360 int main() {
14361
14362         /* pthread test function */
14363 #ifndef PTHREAD_CREATE_DETACHED
14364 #define PTHREAD_CREATE_DETACHED 1
14365 #endif
14366         pthread_t t;
14367         int status;
14368         int detach = PTHREAD_CREATE_DETACHED;
14369
14370 #if HAVE_PTHREADS > 4
14371         /* Final pthreads */
14372         pthread_attr_t attr;
14373
14374         status = pthread_attr_init(&attr);
14375         if( status ) return status;
14376
14377 #if HAVE_PTHREADS < 7
14378         status = pthread_attr_setdetachstate(&attr, &detach);
14379         if( status < 0 ) status = errno;
14380 #else
14381         status = pthread_attr_setdetachstate(&attr, detach);
14382 #endif
14383         if( status ) return status;
14384         status = pthread_create( &t, &attr, task, NULL );
14385 #if HAVE_PTHREADS < 7
14386         if( status < 0 ) status = errno;
14387 #endif
14388         if( status ) return status;
14389 #else
14390         /* Draft 4 pthreads */
14391         status = pthread_create( &t, pthread_attr_default, task, NULL );
14392         if( status ) return errno;
14393
14394         /* give thread a chance to complete */
14395         /* it should remain joinable and hence detachable */
14396         sleep( 1 );
14397
14398         status = pthread_detach( &t );
14399         if( status ) return errno;
14400 #endif
14401
14402 #ifdef HAVE_LINUX_THREADS
14403         pthread_kill_other_threads_np();
14404 #endif
14405
14406         return 0;
14407
14408 ; return 0; }
14409 EOF
14410 if { (eval echo configure:14411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14411   rm -rf conftest*
14412   ol_cv_pthread_lib_lpthreads=yes
14413 else
14414   echo "configure: failed program was:" >&5
14415   cat conftest.$ac_ext >&5
14416   rm -rf conftest*
14417   ol_cv_pthread_lib_lpthreads=no
14418 fi
14419 rm -f conftest*
14420 else
14421   cat > conftest.$ac_ext <<EOF
14422 #line 14423 "configure"
14423 #include "confdefs.h"
14424 /* pthread test headers */
14425 #include <pthread.h>
14426 #if HAVE_PTHREADS < 7
14427 #include <errno.h>
14428 #endif
14429 #ifndef NULL
14430 #define NULL (void*)0
14431 #endif
14432
14433 static void *task(p)
14434         void *p;
14435 {
14436         return (void *) (p == NULL);
14437 }
14438
14439
14440 int main(argc, argv)
14441         int argc;
14442         char **argv;
14443 {
14444
14445         /* pthread test function */
14446 #ifndef PTHREAD_CREATE_DETACHED
14447 #define PTHREAD_CREATE_DETACHED 1
14448 #endif
14449         pthread_t t;
14450         int status;
14451         int detach = PTHREAD_CREATE_DETACHED;
14452
14453 #if HAVE_PTHREADS > 4
14454         /* Final pthreads */
14455         pthread_attr_t attr;
14456
14457         status = pthread_attr_init(&attr);
14458         if( status ) return status;
14459
14460 #if HAVE_PTHREADS < 7
14461         status = pthread_attr_setdetachstate(&attr, &detach);
14462         if( status < 0 ) status = errno;
14463 #else
14464         status = pthread_attr_setdetachstate(&attr, detach);
14465 #endif
14466         if( status ) return status;
14467         status = pthread_create( &t, &attr, task, NULL );
14468 #if HAVE_PTHREADS < 7
14469         if( status < 0 ) status = errno;
14470 #endif
14471         if( status ) return status;
14472 #else
14473         /* Draft 4 pthreads */
14474         status = pthread_create( &t, pthread_attr_default, task, NULL );
14475         if( status ) return errno;
14476
14477         /* give thread a chance to complete */
14478         /* it should remain joinable and hence detachable */
14479         sleep( 1 );
14480
14481         status = pthread_detach( &t );
14482         if( status ) return errno;
14483 #endif
14484
14485 #ifdef HAVE_LINUX_THREADS
14486         pthread_kill_other_threads_np();
14487 #endif
14488
14489         return 0;
14490
14491 }
14492
14493 EOF
14494 if { (eval echo configure:14495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14495 then
14496   ol_cv_pthread_lib_lpthreads=yes
14497 else
14498   echo "configure: failed program was:" >&5
14499   cat conftest.$ac_ext >&5
14500   rm -fr conftest*
14501   ol_cv_pthread_lib_lpthreads=no
14502 fi
14503 rm -fr conftest*
14504 fi
14505
14506
14507                 # restore the LIBS
14508                 LIBS="$ol_LIBS"
14509         
14510 fi
14511
14512 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14513
14514         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14515                 ol_link_pthreads="-lpthreads"
14516                 ol_link_threads=posix
14517         fi
14518 fi
14519
14520
14521                 if test $ol_link_threads != no ; then
14522                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14523
14524                                                 save_CPPFLAGS="$CPPFLAGS"
14525                         save_LIBS="$LIBS"
14526                         LIBS="$LTHREAD_LIBS $LIBS"
14527
14528                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14529 do
14530 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14531 echo "configure:14532: checking for $ac_func" >&5
14532 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14533   echo $ac_n "(cached) $ac_c" 1>&6
14534 else
14535   cat > conftest.$ac_ext <<EOF
14536 #line 14537 "configure"
14537 #include "confdefs.h"
14538 /* System header to define __stub macros and hopefully few prototypes,
14539     which can conflict with char $ac_func(); below.  */
14540 #include <assert.h>
14541 /* Override any gcc2 internal prototype to avoid an error.  */
14542 /* We use char because int might match the return type of a gcc2
14543     builtin and then its argument prototype would still apply.  */
14544 char $ac_func();
14545 char (*f)();
14546
14547 int main() {
14548
14549 /* The GNU C library defines this for functions which it implements
14550     to always fail with ENOSYS.  Some functions are actually named
14551     something starting with __ and the normal name is an alias.  */
14552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14553 choke me
14554 #else
14555 f = $ac_func;
14556 #endif
14557
14558 ; return 0; }
14559 EOF
14560 if { (eval echo configure:14561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14561   rm -rf conftest*
14562   eval "ac_cv_func_$ac_func=yes"
14563 else
14564   echo "configure: failed program was:" >&5
14565   cat conftest.$ac_ext >&5
14566   rm -rf conftest*
14567   eval "ac_cv_func_$ac_func=no"
14568 fi
14569 rm -f conftest*
14570 fi
14571
14572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14573   echo "$ac_t""yes" 1>&6
14574     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14575   cat >> confdefs.h <<EOF
14576 #define $ac_tr_func 1
14577 EOF
14578  
14579 else
14580   echo "$ac_t""no" 1>&6
14581 fi
14582 done
14583
14584
14585                         if test $ac_cv_func_sched_yield = no -a \
14586                                 $ac_cv_func_pthread_yield = no -a \
14587                                 $ac_cv_func_thr_yield = no ; then
14588                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14589 echo "configure:14590: checking for sched_yield in -lrt" >&5
14590 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14592   echo $ac_n "(cached) $ac_c" 1>&6
14593 else
14594   ac_save_LIBS="$LIBS"
14595 LIBS="-lrt  $LIBS"
14596 cat > conftest.$ac_ext <<EOF
14597 #line 14598 "configure"
14598 #include "confdefs.h"
14599 /* Override any gcc2 internal prototype to avoid an error.  */
14600 /* We use char because int might match the return type of a gcc2
14601     builtin and then its argument prototype would still apply.  */
14602 char sched_yield();
14603
14604 int main() {
14605 sched_yield()
14606 ; return 0; }
14607 EOF
14608 if { (eval echo configure:14609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14609   rm -rf conftest*
14610   eval "ac_cv_lib_$ac_lib_var=yes"
14611 else
14612   echo "configure: failed program was:" >&5
14613   cat conftest.$ac_ext >&5
14614   rm -rf conftest*
14615   eval "ac_cv_lib_$ac_lib_var=no"
14616 fi
14617 rm -f conftest*
14618 LIBS="$ac_save_LIBS"
14619
14620 fi
14621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14622   echo "$ac_t""yes" 1>&6
14623   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14624                                         cat >> confdefs.h <<\EOF
14625 #define HAVE_SCHED_YIELD 1
14626 EOF
14627
14628                                         ac_cv_func_sched_yield=yes
14629 else
14630   echo "$ac_t""no" 1>&6
14631 ac_cv_func_sched_yield=no
14632 fi
14633
14634                         fi
14635                         if test $ac_cv_func_sched_yield = no -a \
14636                                 $ac_cv_func_pthread_yield = no -a \
14637                                 "$ac_cv_func_thr_yield" = no ; then
14638                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14639                         fi
14640
14641                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14642 do
14643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14644 echo "configure:14645: checking for $ac_func" >&5
14645 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14646   echo $ac_n "(cached) $ac_c" 1>&6
14647 else
14648   cat > conftest.$ac_ext <<EOF
14649 #line 14650 "configure"
14650 #include "confdefs.h"
14651 /* System header to define __stub macros and hopefully few prototypes,
14652     which can conflict with char $ac_func(); below.  */
14653 #include <assert.h>
14654 /* Override any gcc2 internal prototype to avoid an error.  */
14655 /* We use char because int might match the return type of a gcc2
14656     builtin and then its argument prototype would still apply.  */
14657 char $ac_func();
14658 char (*f)();
14659
14660 int main() {
14661
14662 /* The GNU C library defines this for functions which it implements
14663     to always fail with ENOSYS.  Some functions are actually named
14664     something starting with __ and the normal name is an alias.  */
14665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14666 choke me
14667 #else
14668 f = $ac_func;
14669 #endif
14670
14671 ; return 0; }
14672 EOF
14673 if { (eval echo configure:14674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14674   rm -rf conftest*
14675   eval "ac_cv_func_$ac_func=yes"
14676 else
14677   echo "configure: failed program was:" >&5
14678   cat conftest.$ac_ext >&5
14679   rm -rf conftest*
14680   eval "ac_cv_func_$ac_func=no"
14681 fi
14682 rm -f conftest*
14683 fi
14684
14685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14686   echo "$ac_t""yes" 1>&6
14687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14688   cat >> confdefs.h <<EOF
14689 #define $ac_tr_func 1
14690 EOF
14691  
14692 else
14693   echo "$ac_t""no" 1>&6
14694 fi
14695 done
14696
14697
14698                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14699 echo "configure:14700: checking for pthread_detach with <pthread.h>" >&5
14700 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14701   echo $ac_n "(cached) $ac_c" 1>&6
14702 else
14703   
14704                                                                 cat > conftest.$ac_ext <<EOF
14705 #line 14706 "configure"
14706 #include "confdefs.h"
14707
14708 #include <pthread.h>
14709 #ifndef NULL
14710 #define NULL (void*)0
14711 #endif
14712
14713 int main() {
14714 pthread_detach(NULL);
14715 ; return 0; }
14716 EOF
14717 if { (eval echo configure:14718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14718   rm -rf conftest*
14719   ol_cv_func_pthread_detach=yes
14720 else
14721   echo "configure: failed program was:" >&5
14722   cat conftest.$ac_ext >&5
14723   rm -rf conftest*
14724   ol_cv_func_pthread_detach=no
14725 fi
14726 rm -f conftest*
14727                         
14728 fi
14729
14730 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14731
14732                         if test $ol_cv_func_pthread_detach = no ; then
14733                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14734                         fi
14735
14736                         cat >> confdefs.h <<\EOF
14737 #define HAVE_PTHREAD_DETACH 1
14738 EOF
14739
14740
14741                                                 for ac_func in \
14742                                 pthread_setconcurrency \
14743                                 pthread_getconcurrency \
14744                                 thr_setconcurrency \
14745                                 thr_getconcurrency \
14746                         
14747 do
14748 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14749 echo "configure:14750: checking for $ac_func" >&5
14750 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14751   echo $ac_n "(cached) $ac_c" 1>&6
14752 else
14753   cat > conftest.$ac_ext <<EOF
14754 #line 14755 "configure"
14755 #include "confdefs.h"
14756 /* System header to define __stub macros and hopefully few prototypes,
14757     which can conflict with char $ac_func(); below.  */
14758 #include <assert.h>
14759 /* Override any gcc2 internal prototype to avoid an error.  */
14760 /* We use char because int might match the return type of a gcc2
14761     builtin and then its argument prototype would still apply.  */
14762 char $ac_func();
14763 char (*f)();
14764
14765 int main() {
14766
14767 /* The GNU C library defines this for functions which it implements
14768     to always fail with ENOSYS.  Some functions are actually named
14769     something starting with __ and the normal name is an alias.  */
14770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14771 choke me
14772 #else
14773 f = $ac_func;
14774 #endif
14775
14776 ; return 0; }
14777 EOF
14778 if { (eval echo configure:14779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14779   rm -rf conftest*
14780   eval "ac_cv_func_$ac_func=yes"
14781 else
14782   echo "configure: failed program was:" >&5
14783   cat conftest.$ac_ext >&5
14784   rm -rf conftest*
14785   eval "ac_cv_func_$ac_func=no"
14786 fi
14787 rm -f conftest*
14788 fi
14789
14790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14791   echo "$ac_t""yes" 1>&6
14792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14793   cat >> confdefs.h <<EOF
14794 #define $ac_tr_func 1
14795 EOF
14796  
14797 else
14798   echo "$ac_t""no" 1>&6
14799 fi
14800 done
14801
14802
14803                         
14804         for ac_func in pthread_kill_other_threads_np
14805 do
14806 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14807 echo "configure:14808: checking for $ac_func" >&5
14808 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14809   echo $ac_n "(cached) $ac_c" 1>&6
14810 else
14811   cat > conftest.$ac_ext <<EOF
14812 #line 14813 "configure"
14813 #include "confdefs.h"
14814 /* System header to define __stub macros and hopefully few prototypes,
14815     which can conflict with char $ac_func(); below.  */
14816 #include <assert.h>
14817 /* Override any gcc2 internal prototype to avoid an error.  */
14818 /* We use char because int might match the return type of a gcc2
14819     builtin and then its argument prototype would still apply.  */
14820 char $ac_func();
14821 char (*f)();
14822
14823 int main() {
14824
14825 /* The GNU C library defines this for functions which it implements
14826     to always fail with ENOSYS.  Some functions are actually named
14827     something starting with __ and the normal name is an alias.  */
14828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14829 choke me
14830 #else
14831 f = $ac_func;
14832 #endif
14833
14834 ; return 0; }
14835 EOF
14836 if { (eval echo configure:14837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14837   rm -rf conftest*
14838   eval "ac_cv_func_$ac_func=yes"
14839 else
14840   echo "configure: failed program was:" >&5
14841   cat conftest.$ac_ext >&5
14842   rm -rf conftest*
14843   eval "ac_cv_func_$ac_func=no"
14844 fi
14845 rm -f conftest*
14846 fi
14847
14848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14849   echo "$ac_t""yes" 1>&6
14850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14851   cat >> confdefs.h <<EOF
14852 #define $ac_tr_func 1
14853 EOF
14854  
14855 else
14856   echo "$ac_t""no" 1>&6
14857 fi
14858 done
14859
14860         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14861 echo "configure:14862: checking for LinuxThreads implementation" >&5
14862 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14863   echo $ac_n "(cached) $ac_c" 1>&6
14864 else
14865   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14866 fi
14867
14868 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14869
14870                         
14871         
14872         
14873         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14874 echo "configure:14875: checking for LinuxThreads consistency" >&5
14875 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14876   echo $ac_n "(cached) $ac_c" 1>&6
14877 else
14878   
14879                 if test $ol_cv_header_linux_threads = yes -a \
14880                         $ol_cv_sys_linux_threads = yes; then
14881                         ol_cv_linux_threads=yes
14882                 elif test $ol_cv_header_linux_threads = no -a \
14883                         $ol_cv_sys_linux_threads = no; then
14884                         ol_cv_linux_threads=no
14885                 else
14886                         ol_cv_linux_threads=error
14887                 fi
14888         
14889 fi
14890
14891 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14892
14893
14894                         if test $ol_cv_linux_threads = error; then
14895                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14896                         fi
14897
14898                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14899 echo "configure:14900: checking if pthread_create() works" >&5
14900 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14901   echo $ac_n "(cached) $ac_c" 1>&6
14902 else
14903   
14904                         if test "$cross_compiling" = yes; then
14905                                 ol_cv_pthread_create_works=yes
14906 else
14907   cat > conftest.$ac_ext <<EOF
14908 #line 14909 "configure"
14909 #include "confdefs.h"
14910 /* pthread test headers */
14911 #include <pthread.h>
14912 #if HAVE_PTHREADS < 7
14913 #include <errno.h>
14914 #endif
14915 #ifndef NULL
14916 #define NULL (void*)0
14917 #endif
14918
14919 static void *task(p)
14920         void *p;
14921 {
14922         return (void *) (p == NULL);
14923 }
14924
14925
14926 int main(argc, argv)
14927         int argc;
14928         char **argv;
14929 {
14930
14931         /* pthread test function */
14932 #ifndef PTHREAD_CREATE_DETACHED
14933 #define PTHREAD_CREATE_DETACHED 1
14934 #endif
14935         pthread_t t;
14936         int status;
14937         int detach = PTHREAD_CREATE_DETACHED;
14938
14939 #if HAVE_PTHREADS > 4
14940         /* Final pthreads */
14941         pthread_attr_t attr;
14942
14943         status = pthread_attr_init(&attr);
14944         if( status ) return status;
14945
14946 #if HAVE_PTHREADS < 7
14947         status = pthread_attr_setdetachstate(&attr, &detach);
14948         if( status < 0 ) status = errno;
14949 #else
14950         status = pthread_attr_setdetachstate(&attr, detach);
14951 #endif
14952         if( status ) return status;
14953         status = pthread_create( &t, &attr, task, NULL );
14954 #if HAVE_PTHREADS < 7
14955         if( status < 0 ) status = errno;
14956 #endif
14957         if( status ) return status;
14958 #else
14959         /* Draft 4 pthreads */
14960         status = pthread_create( &t, pthread_attr_default, task, NULL );
14961         if( status ) return errno;
14962
14963         /* give thread a chance to complete */
14964         /* it should remain joinable and hence detachable */
14965         sleep( 1 );
14966
14967         status = pthread_detach( &t );
14968         if( status ) return errno;
14969 #endif
14970
14971 #ifdef HAVE_LINUX_THREADS
14972         pthread_kill_other_threads_np();
14973 #endif
14974
14975         return 0;
14976
14977 }
14978
14979 EOF
14980 if { (eval echo configure:14981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14981 then
14982   ol_cv_pthread_create_works=yes
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -fr conftest*
14987   ol_cv_pthread_create_works=no
14988 fi
14989 rm -fr conftest*
14990 fi
14991
14992 fi
14993
14994 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14995
14996                         if test $ol_cv_pthread_create_works = no ; then
14997                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14998                         fi
14999
15000                                                 if test $ol_with_yielding_select = auto ; then
15001                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15002 echo "configure:15003: checking if select yields when using pthreads" >&5
15003 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15004   echo $ac_n "(cached) $ac_c" 1>&6
15005 else
15006   
15007                                 if test "$cross_compiling" = yes; then
15008   ol_cv_pthread_select_yields=cross
15009 else
15010   cat > conftest.$ac_ext <<EOF
15011 #line 15012 "configure"
15012 #include "confdefs.h"
15013
15014 #include <sys/types.h>
15015 #include <sys/time.h>
15016 #include <unistd.h>
15017 #include <pthread.h>
15018 #ifndef NULL
15019 #define NULL (void*) 0
15020 #endif
15021
15022 static int fildes[2];
15023
15024 static void *task(p)
15025         void *p;
15026 {
15027         int i;
15028         struct timeval tv;
15029
15030         fd_set rfds;
15031
15032         tv.tv_sec=10;
15033         tv.tv_usec=0;
15034
15035         FD_ZERO(&rfds);
15036         FD_SET(fildes[0], &rfds);
15037
15038         /* we're not interested in any fds */
15039         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15040
15041         if(i < 0) {
15042                 perror("select");
15043                 exit(10);
15044         }
15045
15046         exit(0); /* if we exit here, the select blocked the whole process */
15047 }
15048
15049 int main(argc, argv)
15050         int argc;
15051         char **argv;
15052 {
15053         pthread_t t;
15054
15055         /* create a pipe to select */
15056         if(pipe(&fildes[0])) {
15057                 perror("select");
15058                 exit(1);
15059         }
15060
15061 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15062         (void) pthread_setconcurrency(2);
15063 #else
15064 #ifdef HAVE_THR_SETCONCURRENCY
15065         /* Set Solaris LWP concurrency to 2 */
15066         thr_setconcurrency(2);
15067 #endif
15068 #endif
15069
15070 #if HAVE_PTHREADS < 6
15071         pthread_create(&t, pthread_attr_default, task, NULL);
15072 #else
15073         pthread_create(&t, NULL, task, NULL);
15074 #endif
15075
15076         /* make sure task runs first */
15077 #if HAVE_THR_YIELD
15078         thr_yield();
15079 #elif defined( HAVE_SCHED_YIELD )
15080         sched_yield();
15081 #elif defined( HAVE_PTHREAD_YIELD )
15082         pthread_yield();
15083 #endif
15084
15085         exit(2);
15086 }
15087 EOF
15088 if { (eval echo configure:15089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15089 then
15090   ol_cv_pthread_select_yields=no
15091 else
15092   echo "configure: failed program was:" >&5
15093   cat conftest.$ac_ext >&5
15094   rm -fr conftest*
15095   ol_cv_pthread_select_yields=yes
15096 fi
15097 rm -fr conftest*
15098 fi
15099
15100 fi
15101
15102 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15103
15104                                 if test $ol_cv_pthread_select_yields = cross ; then
15105                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15106                                 fi
15107
15108                                 if test $ol_cv_pthread_select_yields = yes ; then
15109                                         ol_with_yielding_select=yes
15110                                 fi
15111                         fi
15112
15113                                                 CPPFLAGS="$save_CPPFLAGS"
15114                         LIBS="$save_LIBS"
15115                 else
15116                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15117                 fi
15118         fi
15119
15120         if test $ol_with_threads = posix ; then
15121                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15122         fi
15123 fi
15124
15125 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15126         -o $ol_with_threads = mach ; then
15127
15128                 for ac_hdr in mach/cthreads.h cthreads.h
15129 do
15130 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15131 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15132 echo "configure:15133: checking for $ac_hdr" >&5
15133 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15134   echo $ac_n "(cached) $ac_c" 1>&6
15135 else
15136   cat > conftest.$ac_ext <<EOF
15137 #line 15138 "configure"
15138 #include "confdefs.h"
15139 #include <$ac_hdr>
15140 EOF
15141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15142 { (eval echo configure:15143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15144 if test -z "$ac_err"; then
15145   rm -rf conftest*
15146   eval "ac_cv_header_$ac_safe=yes"
15147 else
15148   echo "$ac_err" >&5
15149   echo "configure: failed program was:" >&5
15150   cat conftest.$ac_ext >&5
15151   rm -rf conftest*
15152   eval "ac_cv_header_$ac_safe=no"
15153 fi
15154 rm -f conftest*
15155 fi
15156 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15157   echo "$ac_t""yes" 1>&6
15158     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15159   cat >> confdefs.h <<EOF
15160 #define $ac_tr_hdr 1
15161 EOF
15162  
15163 else
15164   echo "$ac_t""no" 1>&6
15165 fi
15166 done
15167
15168         if test $ac_cv_header_mach_cthreads_h = yes ; then
15169                 ol_with_threads=found
15170
15171                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15172 echo "configure:15173: checking for cthread_fork" >&5
15173 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15174   echo $ac_n "(cached) $ac_c" 1>&6
15175 else
15176   cat > conftest.$ac_ext <<EOF
15177 #line 15178 "configure"
15178 #include "confdefs.h"
15179 /* System header to define __stub macros and hopefully few prototypes,
15180     which can conflict with char cthread_fork(); below.  */
15181 #include <assert.h>
15182 /* Override any gcc2 internal prototype to avoid an error.  */
15183 /* We use char because int might match the return type of a gcc2
15184     builtin and then its argument prototype would still apply.  */
15185 char cthread_fork();
15186 char (*f)();
15187
15188 int main() {
15189
15190 /* The GNU C library defines this for functions which it implements
15191     to always fail with ENOSYS.  Some functions are actually named
15192     something starting with __ and the normal name is an alias.  */
15193 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15194 choke me
15195 #else
15196 f = cthread_fork;
15197 #endif
15198
15199 ; return 0; }
15200 EOF
15201 if { (eval echo configure:15202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15202   rm -rf conftest*
15203   eval "ac_cv_func_cthread_fork=yes"
15204 else
15205   echo "configure: failed program was:" >&5
15206   cat conftest.$ac_ext >&5
15207   rm -rf conftest*
15208   eval "ac_cv_func_cthread_fork=no"
15209 fi
15210 rm -f conftest*
15211 fi
15212
15213 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15214   echo "$ac_t""yes" 1>&6
15215   ol_link_threads=yes
15216 else
15217   echo "$ac_t""no" 1>&6
15218 fi
15219
15220
15221                 if test $ol_link_threads = no ; then
15222                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15223 echo "configure:15224: checking for cthread_fork with -all_load" >&5
15224 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15225   echo $ac_n "(cached) $ac_c" 1>&6
15226 else
15227   
15228                                                                 save_LIBS="$LIBS"
15229                                 LIBS="-all_load $LIBS"
15230                                 cat > conftest.$ac_ext <<EOF
15231 #line 15232 "configure"
15232 #include "confdefs.h"
15233 #include <mach/cthreads.h>
15234 int main() {
15235
15236                                         cthread_fork((void *)0, (void *)0);
15237                                         
15238 ; return 0; }
15239 EOF
15240 if { (eval echo configure:15241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15241   rm -rf conftest*
15242   ol_cv_cthread_all_load=yes
15243 else
15244   echo "configure: failed program was:" >&5
15245   cat conftest.$ac_ext >&5
15246   rm -rf conftest*
15247   ol_cv_cthread_all_load=no
15248 fi
15249 rm -f conftest*
15250                                                                 LIBS="$save_LIBS"
15251                         
15252 fi
15253
15254 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15255
15256                         if test $ol_cv_cthread_all_load = yes ; then
15257                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15258                                 ol_link_threads=mach
15259                                 ol_with_threads=found
15260                         fi
15261                 fi
15262
15263         elif test $ac_cv_header_cthreads_h = yes ; then
15264                                 
15265                 ol_with_threads=found
15266  
15267                                 save_LIBS="$LIBS"
15268                 LIBS="$LIBS -lthreads"
15269                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15270 echo "configure:15271: checking for cthread_fork" >&5
15271 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15272   echo $ac_n "(cached) $ac_c" 1>&6
15273 else
15274   cat > conftest.$ac_ext <<EOF
15275 #line 15276 "configure"
15276 #include "confdefs.h"
15277 /* System header to define __stub macros and hopefully few prototypes,
15278     which can conflict with char cthread_fork(); below.  */
15279 #include <assert.h>
15280 /* Override any gcc2 internal prototype to avoid an error.  */
15281 /* We use char because int might match the return type of a gcc2
15282     builtin and then its argument prototype would still apply.  */
15283 char cthread_fork();
15284 char (*f)();
15285
15286 int main() {
15287
15288 /* The GNU C library defines this for functions which it implements
15289     to always fail with ENOSYS.  Some functions are actually named
15290     something starting with __ and the normal name is an alias.  */
15291 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15292 choke me
15293 #else
15294 f = cthread_fork;
15295 #endif
15296
15297 ; return 0; }
15298 EOF
15299 if { (eval echo configure:15300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15300   rm -rf conftest*
15301   eval "ac_cv_func_cthread_fork=yes"
15302 else
15303   echo "configure: failed program was:" >&5
15304   cat conftest.$ac_ext >&5
15305   rm -rf conftest*
15306   eval "ac_cv_func_cthread_fork=no"
15307 fi
15308 rm -f conftest*
15309 fi
15310
15311 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15312   echo "$ac_t""yes" 1>&6
15313   ol_link_threads=yes
15314 else
15315   echo "$ac_t""no" 1>&6
15316 fi
15317
15318                 LIBS="$save_LIBS"
15319
15320                 if test $ol_link_threads = yes ; then
15321                         LTHREAD_LIBS="-lthreads"
15322                         ol_link_threads=mach
15323                         ol_with_threads=found
15324                 else
15325                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15326                 fi
15327
15328         elif test $ol_with_threads = mach ; then
15329                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15330         fi
15331
15332         if test $ol_link_threads = mach ; then
15333                 cat >> confdefs.h <<\EOF
15334 #define HAVE_MACH_CTHREADS 1
15335 EOF
15336
15337         elif test $ol_with_threads = found ; then
15338                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15339         fi
15340 fi
15341
15342 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15343         -o $ol_with_threads = pth ; then
15344
15345         for ac_hdr in pth.h
15346 do
15347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15349 echo "configure:15350: checking for $ac_hdr" >&5
15350 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15351   echo $ac_n "(cached) $ac_c" 1>&6
15352 else
15353   cat > conftest.$ac_ext <<EOF
15354 #line 15355 "configure"
15355 #include "confdefs.h"
15356 #include <$ac_hdr>
15357 EOF
15358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15359 { (eval echo configure:15360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15361 if test -z "$ac_err"; then
15362   rm -rf conftest*
15363   eval "ac_cv_header_$ac_safe=yes"
15364 else
15365   echo "$ac_err" >&5
15366   echo "configure: failed program was:" >&5
15367   cat conftest.$ac_ext >&5
15368   rm -rf conftest*
15369   eval "ac_cv_header_$ac_safe=no"
15370 fi
15371 rm -f conftest*
15372 fi
15373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15374   echo "$ac_t""yes" 1>&6
15375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15376   cat >> confdefs.h <<EOF
15377 #define $ac_tr_hdr 1
15378 EOF
15379  
15380 else
15381   echo "$ac_t""no" 1>&6
15382 fi
15383 done
15384
15385
15386         if test $ac_cv_header_pth_h = yes ; then
15387                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15388 echo "configure:15389: checking for pth_version in -lpth" >&5
15389 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15391   echo $ac_n "(cached) $ac_c" 1>&6
15392 else
15393   ac_save_LIBS="$LIBS"
15394 LIBS="-lpth  $LIBS"
15395 cat > conftest.$ac_ext <<EOF
15396 #line 15397 "configure"
15397 #include "confdefs.h"
15398 /* Override any gcc2 internal prototype to avoid an error.  */
15399 /* We use char because int might match the return type of a gcc2
15400     builtin and then its argument prototype would still apply.  */
15401 char pth_version();
15402
15403 int main() {
15404 pth_version()
15405 ; return 0; }
15406 EOF
15407 if { (eval echo configure:15408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15408   rm -rf conftest*
15409   eval "ac_cv_lib_$ac_lib_var=yes"
15410 else
15411   echo "configure: failed program was:" >&5
15412   cat conftest.$ac_ext >&5
15413   rm -rf conftest*
15414   eval "ac_cv_lib_$ac_lib_var=no"
15415 fi
15416 rm -f conftest*
15417 LIBS="$ac_save_LIBS"
15418
15419 fi
15420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15421   echo "$ac_t""yes" 1>&6
15422   have_pth=yes
15423 else
15424   echo "$ac_t""no" 1>&6
15425 have_pth=no
15426 fi
15427
15428
15429                 if test $have_pth = yes ; then
15430                         cat >> confdefs.h <<\EOF
15431 #define HAVE_GNU_PTH 1
15432 EOF
15433
15434                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15435                         ol_link_threads=pth
15436                         ol_with_threads=found
15437
15438                         if test $ol_with_yielding_select = auto ; then
15439                                 ol_with_yielding_select=yes
15440                         fi
15441                 fi
15442         fi
15443 fi
15444
15445 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15446         -o $ol_with_threads = lwp ; then
15447
15448                 for ac_hdr in thread.h synch.h
15449 do
15450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15452 echo "configure:15453: checking for $ac_hdr" >&5
15453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 #include <$ac_hdr>
15460 EOF
15461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15462 { (eval echo configure:15463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15464 if test -z "$ac_err"; then
15465   rm -rf conftest*
15466   eval "ac_cv_header_$ac_safe=yes"
15467 else
15468   echo "$ac_err" >&5
15469   echo "configure: failed program was:" >&5
15470   cat conftest.$ac_ext >&5
15471   rm -rf conftest*
15472   eval "ac_cv_header_$ac_safe=no"
15473 fi
15474 rm -f conftest*
15475 fi
15476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15479   cat >> confdefs.h <<EOF
15480 #define $ac_tr_hdr 1
15481 EOF
15482  
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486 done
15487
15488         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15489                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15490 echo "configure:15491: checking for thr_create in -lthread" >&5
15491 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15493   echo $ac_n "(cached) $ac_c" 1>&6
15494 else
15495   ac_save_LIBS="$LIBS"
15496 LIBS="-lthread  $LIBS"
15497 cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500 /* Override any gcc2 internal prototype to avoid an error.  */
15501 /* We use char because int might match the return type of a gcc2
15502     builtin and then its argument prototype would still apply.  */
15503 char thr_create();
15504
15505 int main() {
15506 thr_create()
15507 ; return 0; }
15508 EOF
15509 if { (eval echo configure:15510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15510   rm -rf conftest*
15511   eval "ac_cv_lib_$ac_lib_var=yes"
15512 else
15513   echo "configure: failed program was:" >&5
15514   cat conftest.$ac_ext >&5
15515   rm -rf conftest*
15516   eval "ac_cv_lib_$ac_lib_var=no"
15517 fi
15518 rm -f conftest*
15519 LIBS="$ac_save_LIBS"
15520
15521 fi
15522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15523   echo "$ac_t""yes" 1>&6
15524   have_thr=yes
15525 else
15526   echo "$ac_t""no" 1>&6
15527 have_thr=no
15528 fi
15529
15530
15531                 if test $have_thr = yes ; then
15532                         cat >> confdefs.h <<\EOF
15533 #define HAVE_THR 1
15534 EOF
15535
15536                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15537                         ol_link_threads=thr
15538
15539                         if test $ol_with_yielding_select = auto ; then
15540                                 ol_with_yielding_select=yes
15541                         fi
15542
15543                                                 for ac_func in \
15544                                 thr_setconcurrency \
15545                                 thr_getconcurrency \
15546                         
15547 do
15548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15549 echo "configure:15550: checking for $ac_func" >&5
15550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15551   echo $ac_n "(cached) $ac_c" 1>&6
15552 else
15553   cat > conftest.$ac_ext <<EOF
15554 #line 15555 "configure"
15555 #include "confdefs.h"
15556 /* System header to define __stub macros and hopefully few prototypes,
15557     which can conflict with char $ac_func(); below.  */
15558 #include <assert.h>
15559 /* Override any gcc2 internal prototype to avoid an error.  */
15560 /* We use char because int might match the return type of a gcc2
15561     builtin and then its argument prototype would still apply.  */
15562 char $ac_func();
15563 char (*f)();
15564
15565 int main() {
15566
15567 /* The GNU C library defines this for functions which it implements
15568     to always fail with ENOSYS.  Some functions are actually named
15569     something starting with __ and the normal name is an alias.  */
15570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15571 choke me
15572 #else
15573 f = $ac_func;
15574 #endif
15575
15576 ; return 0; }
15577 EOF
15578 if { (eval echo configure:15579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15579   rm -rf conftest*
15580   eval "ac_cv_func_$ac_func=yes"
15581 else
15582   echo "configure: failed program was:" >&5
15583   cat conftest.$ac_ext >&5
15584   rm -rf conftest*
15585   eval "ac_cv_func_$ac_func=no"
15586 fi
15587 rm -f conftest*
15588 fi
15589
15590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15591   echo "$ac_t""yes" 1>&6
15592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15593   cat >> confdefs.h <<EOF
15594 #define $ac_tr_func 1
15595 EOF
15596  
15597 else
15598   echo "$ac_t""no" 1>&6
15599 fi
15600 done
15601
15602                 fi
15603         fi
15604
15605                 for ac_hdr in lwp/lwp.h
15606 do
15607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15609 echo "configure:15610: checking for $ac_hdr" >&5
15610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15611   echo $ac_n "(cached) $ac_c" 1>&6
15612 else
15613   cat > conftest.$ac_ext <<EOF
15614 #line 15615 "configure"
15615 #include "confdefs.h"
15616 #include <$ac_hdr>
15617 EOF
15618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15619 { (eval echo configure:15620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15621 if test -z "$ac_err"; then
15622   rm -rf conftest*
15623   eval "ac_cv_header_$ac_safe=yes"
15624 else
15625   echo "$ac_err" >&5
15626   echo "configure: failed program was:" >&5
15627   cat conftest.$ac_ext >&5
15628   rm -rf conftest*
15629   eval "ac_cv_header_$ac_safe=no"
15630 fi
15631 rm -f conftest*
15632 fi
15633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15634   echo "$ac_t""yes" 1>&6
15635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15636   cat >> confdefs.h <<EOF
15637 #define $ac_tr_hdr 1
15638 EOF
15639  
15640 else
15641   echo "$ac_t""no" 1>&6
15642 fi
15643 done
15644
15645         if test $ac_cv_header_lwp_lwp_h = yes ; then
15646                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15647 echo "configure:15648: checking for lwp_create in -llwp" >&5
15648 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15650   echo $ac_n "(cached) $ac_c" 1>&6
15651 else
15652   ac_save_LIBS="$LIBS"
15653 LIBS="-llwp  $LIBS"
15654 cat > conftest.$ac_ext <<EOF
15655 #line 15656 "configure"
15656 #include "confdefs.h"
15657 /* Override any gcc2 internal prototype to avoid an error.  */
15658 /* We use char because int might match the return type of a gcc2
15659     builtin and then its argument prototype would still apply.  */
15660 char lwp_create();
15661
15662 int main() {
15663 lwp_create()
15664 ; return 0; }
15665 EOF
15666 if { (eval echo configure:15667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15667   rm -rf conftest*
15668   eval "ac_cv_lib_$ac_lib_var=yes"
15669 else
15670   echo "configure: failed program was:" >&5
15671   cat conftest.$ac_ext >&5
15672   rm -rf conftest*
15673   eval "ac_cv_lib_$ac_lib_var=no"
15674 fi
15675 rm -f conftest*
15676 LIBS="$ac_save_LIBS"
15677
15678 fi
15679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15680   echo "$ac_t""yes" 1>&6
15681   have_lwp=yes
15682 else
15683   echo "$ac_t""no" 1>&6
15684 have_lwp=no
15685 fi
15686
15687
15688                 if test $have_lwp = yes ; then
15689                         cat >> confdefs.h <<\EOF
15690 #define HAVE_LWP 1
15691 EOF
15692
15693                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15694                         ol_link_threads=lwp
15695
15696                         if test $ol_with_yielding_select = auto ; then
15697                                 ol_with_yielding_select=no
15698                         fi
15699                 fi
15700         fi
15701 fi
15702
15703 if test $ol_with_yielding_select = yes ; then
15704         cat >> confdefs.h <<\EOF
15705 #define HAVE_YIELDING_SELECT 1
15706 EOF
15707
15708 fi
15709
15710 if test $ol_with_threads = manual ; then
15711                 ol_link_threads=yes
15712
15713         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15714
15715         for ac_hdr in pthread.h sched.h
15716 do
15717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15719 echo "configure:15720: checking for $ac_hdr" >&5
15720 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15721   echo $ac_n "(cached) $ac_c" 1>&6
15722 else
15723   cat > conftest.$ac_ext <<EOF
15724 #line 15725 "configure"
15725 #include "confdefs.h"
15726 #include <$ac_hdr>
15727 EOF
15728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15729 { (eval echo configure:15730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15731 if test -z "$ac_err"; then
15732   rm -rf conftest*
15733   eval "ac_cv_header_$ac_safe=yes"
15734 else
15735   echo "$ac_err" >&5
15736   echo "configure: failed program was:" >&5
15737   cat conftest.$ac_ext >&5
15738   rm -rf conftest*
15739   eval "ac_cv_header_$ac_safe=no"
15740 fi
15741 rm -f conftest*
15742 fi
15743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15744   echo "$ac_t""yes" 1>&6
15745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15746   cat >> confdefs.h <<EOF
15747 #define $ac_tr_hdr 1
15748 EOF
15749  
15750 else
15751   echo "$ac_t""no" 1>&6
15752 fi
15753 done
15754
15755         for ac_func in sched_yield pthread_yield
15756 do
15757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15758 echo "configure:15759: checking for $ac_func" >&5
15759 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15760   echo $ac_n "(cached) $ac_c" 1>&6
15761 else
15762   cat > conftest.$ac_ext <<EOF
15763 #line 15764 "configure"
15764 #include "confdefs.h"
15765 /* System header to define __stub macros and hopefully few prototypes,
15766     which can conflict with char $ac_func(); below.  */
15767 #include <assert.h>
15768 /* Override any gcc2 internal prototype to avoid an error.  */
15769 /* We use char because int might match the return type of a gcc2
15770     builtin and then its argument prototype would still apply.  */
15771 char $ac_func();
15772 char (*f)();
15773
15774 int main() {
15775
15776 /* The GNU C library defines this for functions which it implements
15777     to always fail with ENOSYS.  Some functions are actually named
15778     something starting with __ and the normal name is an alias.  */
15779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15780 choke me
15781 #else
15782 f = $ac_func;
15783 #endif
15784
15785 ; return 0; }
15786 EOF
15787 if { (eval echo configure:15788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15788   rm -rf conftest*
15789   eval "ac_cv_func_$ac_func=yes"
15790 else
15791   echo "configure: failed program was:" >&5
15792   cat conftest.$ac_ext >&5
15793   rm -rf conftest*
15794   eval "ac_cv_func_$ac_func=no"
15795 fi
15796 rm -f conftest*
15797 fi
15798
15799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15800   echo "$ac_t""yes" 1>&6
15801     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15802   cat >> confdefs.h <<EOF
15803 #define $ac_tr_func 1
15804 EOF
15805  
15806 else
15807   echo "$ac_t""no" 1>&6
15808 fi
15809 done
15810
15811         
15812         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15813 echo "configure:15814: checking for LinuxThreads pthread.h" >&5
15814 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15815   echo $ac_n "(cached) $ac_c" 1>&6
15816 else
15817   cat > conftest.$ac_ext <<EOF
15818 #line 15819 "configure"
15819 #include "confdefs.h"
15820 #include <pthread.h>
15821 EOF
15822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15823   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15824   rm -rf conftest*
15825   ol_cv_header_linux_threads=yes
15826 else
15827   rm -rf conftest*
15828   ol_cv_header_linux_threads=no
15829 fi
15830 rm -f conftest*
15831
15832                 
15833 fi
15834
15835 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15836         if test $ol_cv_header_linux_threads = yes; then
15837                 cat >> confdefs.h <<\EOF
15838 #define HAVE_LINUX_THREADS 1
15839 EOF
15840
15841         fi
15842
15843
15844         for ac_hdr in mach/cthreads.h
15845 do
15846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15848 echo "configure:15849: checking for $ac_hdr" >&5
15849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15850   echo $ac_n "(cached) $ac_c" 1>&6
15851 else
15852   cat > conftest.$ac_ext <<EOF
15853 #line 15854 "configure"
15854 #include "confdefs.h"
15855 #include <$ac_hdr>
15856 EOF
15857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15858 { (eval echo configure:15859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15860 if test -z "$ac_err"; then
15861   rm -rf conftest*
15862   eval "ac_cv_header_$ac_safe=yes"
15863 else
15864   echo "$ac_err" >&5
15865   echo "configure: failed program was:" >&5
15866   cat conftest.$ac_ext >&5
15867   rm -rf conftest*
15868   eval "ac_cv_header_$ac_safe=no"
15869 fi
15870 rm -f conftest*
15871 fi
15872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15873   echo "$ac_t""yes" 1>&6
15874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15875   cat >> confdefs.h <<EOF
15876 #define $ac_tr_hdr 1
15877 EOF
15878  
15879 else
15880   echo "$ac_t""no" 1>&6
15881 fi
15882 done
15883
15884         for ac_hdr in lwp/lwp.h
15885 do
15886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15888 echo "configure:15889: checking for $ac_hdr" >&5
15889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15890   echo $ac_n "(cached) $ac_c" 1>&6
15891 else
15892   cat > conftest.$ac_ext <<EOF
15893 #line 15894 "configure"
15894 #include "confdefs.h"
15895 #include <$ac_hdr>
15896 EOF
15897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15898 { (eval echo configure:15899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15900 if test -z "$ac_err"; then
15901   rm -rf conftest*
15902   eval "ac_cv_header_$ac_safe=yes"
15903 else
15904   echo "$ac_err" >&5
15905   echo "configure: failed program was:" >&5
15906   cat conftest.$ac_ext >&5
15907   rm -rf conftest*
15908   eval "ac_cv_header_$ac_safe=no"
15909 fi
15910 rm -f conftest*
15911 fi
15912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15913   echo "$ac_t""yes" 1>&6
15914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15915   cat >> confdefs.h <<EOF
15916 #define $ac_tr_hdr 1
15917 EOF
15918  
15919 else
15920   echo "$ac_t""no" 1>&6
15921 fi
15922 done
15923
15924         for ac_hdr in thread.h synch.h
15925 do
15926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15928 echo "configure:15929: checking for $ac_hdr" >&5
15929 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15930   echo $ac_n "(cached) $ac_c" 1>&6
15931 else
15932   cat > conftest.$ac_ext <<EOF
15933 #line 15934 "configure"
15934 #include "confdefs.h"
15935 #include <$ac_hdr>
15936 EOF
15937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15938 { (eval echo configure:15939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15940 if test -z "$ac_err"; then
15941   rm -rf conftest*
15942   eval "ac_cv_header_$ac_safe=yes"
15943 else
15944   echo "$ac_err" >&5
15945   echo "configure: failed program was:" >&5
15946   cat conftest.$ac_ext >&5
15947   rm -rf conftest*
15948   eval "ac_cv_header_$ac_safe=no"
15949 fi
15950 rm -f conftest*
15951 fi
15952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15953   echo "$ac_t""yes" 1>&6
15954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15955   cat >> confdefs.h <<EOF
15956 #define $ac_tr_hdr 1
15957 EOF
15958  
15959 else
15960   echo "$ac_t""no" 1>&6
15961 fi
15962 done
15963
15964 fi
15965
15966 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15967                         cat >> confdefs.h <<\EOF
15968 #define REENTRANT 1
15969 EOF
15970
15971         cat >> confdefs.h <<\EOF
15972 #define _REENTRANT 1
15973 EOF
15974
15975         cat >> confdefs.h <<\EOF
15976 #define THREAD_SAFE 1
15977 EOF
15978
15979         cat >> confdefs.h <<\EOF
15980 #define _THREAD_SAFE 1
15981 EOF
15982
15983         cat >> confdefs.h <<\EOF
15984 #define THREADSAFE 1
15985 EOF
15986
15987         cat >> confdefs.h <<\EOF
15988 #define _THREADSAFE 1
15989 EOF
15990
15991         cat >> confdefs.h <<\EOF
15992 #define _SGI_MP_SOURCE 1
15993 EOF
15994
15995
15996                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15997 echo "configure:15998: checking for thread specific errno" >&5
15998 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15999   echo $ac_n "(cached) $ac_c" 1>&6
16000 else
16001   
16002                 cat > conftest.$ac_ext <<EOF
16003 #line 16004 "configure"
16004 #include "confdefs.h"
16005 #include <errno.h>
16006 int main() {
16007 errno = 0;
16008 ; return 0; }
16009 EOF
16010 if { (eval echo configure:16011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16011   rm -rf conftest*
16012   ol_cv_errno_thread_specific=yes
16013 else
16014   echo "configure: failed program was:" >&5
16015   cat conftest.$ac_ext >&5
16016   rm -rf conftest*
16017   ol_cv_errno_thread_specific=no
16018 fi
16019 rm -f conftest*
16020         
16021 fi
16022
16023 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16024
16025                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16026 echo "configure:16027: checking for thread specific h_errno" >&5
16027 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16028   echo $ac_n "(cached) $ac_c" 1>&6
16029 else
16030   
16031                 cat > conftest.$ac_ext <<EOF
16032 #line 16033 "configure"
16033 #include "confdefs.h"
16034 #include <netdb.h>
16035 int main() {
16036 h_errno = 0;
16037 ; return 0; }
16038 EOF
16039 if { (eval echo configure:16040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16040   rm -rf conftest*
16041   ol_cv_h_errno_thread_specific=yes
16042 else
16043   echo "configure: failed program was:" >&5
16044   cat conftest.$ac_ext >&5
16045   rm -rf conftest*
16046   ol_cv_h_errno_thread_specific=no
16047 fi
16048 rm -f conftest*
16049         
16050 fi
16051
16052 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16053
16054         if test $ol_cv_errno_thread_specific != yes \
16055                 -o $ol_cv_h_errno_thread_specific != yes ; then
16056                 LIBS="$LTHREAD_LIBS $LIBS"
16057                 LTHREAD_LIBS=""
16058         fi
16059
16060 fi  
16061
16062 if test $ol_link_threads = no ; then
16063         if test $ol_with_threads = yes ; then
16064                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16065         fi
16066
16067         if test $ol_with_threads = auto ; then
16068                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16069                 ol_with_threads=no
16070         fi
16071
16072         cat >> confdefs.h <<\EOF
16073 #define NO_THREADS 1
16074 EOF
16075
16076         LTHREAD_LIBS=""
16077 fi
16078
16079 if test $ol_link_threads != no ; then
16080         cat >> confdefs.h <<\EOF
16081 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16082 EOF
16083
16084 fi
16085
16086 for ac_func in \
16087         ctime_r                 \
16088         gethostbyname_r gethostbyaddr_r \
16089
16090 do
16091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16092 echo "configure:16093: checking for $ac_func" >&5
16093 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16094   echo $ac_n "(cached) $ac_c" 1>&6
16095 else
16096   cat > conftest.$ac_ext <<EOF
16097 #line 16098 "configure"
16098 #include "confdefs.h"
16099 /* System header to define __stub macros and hopefully few prototypes,
16100     which can conflict with char $ac_func(); below.  */
16101 #include <assert.h>
16102 /* Override any gcc2 internal prototype to avoid an error.  */
16103 /* We use char because int might match the return type of a gcc2
16104     builtin and then its argument prototype would still apply.  */
16105 char $ac_func();
16106 char (*f)();
16107
16108 int main() {
16109
16110 /* The GNU C library defines this for functions which it implements
16111     to always fail with ENOSYS.  Some functions are actually named
16112     something starting with __ and the normal name is an alias.  */
16113 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16114 choke me
16115 #else
16116 f = $ac_func;
16117 #endif
16118
16119 ; return 0; }
16120 EOF
16121 if { (eval echo configure:16122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16122   rm -rf conftest*
16123   eval "ac_cv_func_$ac_func=yes"
16124 else
16125   echo "configure: failed program was:" >&5
16126   cat conftest.$ac_ext >&5
16127   rm -rf conftest*
16128   eval "ac_cv_func_$ac_func=no"
16129 fi
16130 rm -f conftest*
16131 fi
16132
16133 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16134   echo "$ac_t""yes" 1>&6
16135     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16136   cat >> confdefs.h <<EOF
16137 #define $ac_tr_func 1
16138 EOF
16139  
16140 else
16141   echo "$ac_t""no" 1>&6
16142 fi
16143 done
16144
16145
16146 if test "$ac_cv_func_ctime_r" = no ; then
16147         ol_cv_func_ctime_r_nargs=0
16148 else
16149         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16150 echo "configure:16151: checking number of arguments of ctime_r" >&5
16151 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16152   echo $ac_n "(cached) $ac_c" 1>&6
16153 else
16154   cat > conftest.$ac_ext <<EOF
16155 #line 16156 "configure"
16156 #include "confdefs.h"
16157 #include <time.h>
16158 int main() {
16159 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16160 ; return 0; }
16161 EOF
16162 if { (eval echo configure:16163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16163   rm -rf conftest*
16164   ol_cv_func_ctime_r_nargs3=yes
16165 else
16166   echo "configure: failed program was:" >&5
16167   cat conftest.$ac_ext >&5
16168   rm -rf conftest*
16169   ol_cv_func_ctime_r_nargs3=no
16170 fi
16171 rm -f conftest*
16172
16173         cat > conftest.$ac_ext <<EOF
16174 #line 16175 "configure"
16175 #include "confdefs.h"
16176 #include <time.h>
16177 int main() {
16178 time_t ti; char *buffer; ctime_r(&ti,buffer);
16179 ; return 0; }
16180 EOF
16181 if { (eval echo configure:16182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16182   rm -rf conftest*
16183   ol_cv_func_ctime_r_nargs2=yes
16184 else
16185   echo "configure: failed program was:" >&5
16186   cat conftest.$ac_ext >&5
16187   rm -rf conftest*
16188   ol_cv_func_ctime_r_nargs2=no
16189 fi
16190 rm -f conftest*
16191
16192         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16193                 $ol_cv_func_ctime_r_nargs2 = no ; then
16194
16195                 ol_cv_func_ctime_r_nargs=3
16196
16197         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16198                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16199
16200                 ol_cv_func_ctime_r_nargs=2
16201
16202         else
16203                 ol_cv_func_ctime_r_nargs=0
16204         fi
16205   
16206 fi
16207
16208 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16209
16210   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16211         cat >> confdefs.h <<EOF
16212 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16213 EOF
16214
16215   fi
16216
16217 fi
16218
16219 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16220         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16221 echo "configure:16222: checking number of arguments of gethostbyname_r" >&5
16222 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16223   echo $ac_n "(cached) $ac_c" 1>&6
16224 else
16225   cat > conftest.$ac_ext <<EOF
16226 #line 16227 "configure"
16227 #include "confdefs.h"
16228 #include <sys/types.h>
16229 #include <sys/socket.h>
16230 #include <netinet/in.h>
16231 #include <netdb.h>
16232 #define BUFSIZE (sizeof(struct hostent)+10)
16233 int main() {
16234 struct hostent hent; char buffer[BUFSIZE];
16235                 int bufsize=BUFSIZE;int h_errno;
16236                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16237                         buffer, bufsize, &h_errno);
16238 ; return 0; }
16239 EOF
16240 if { (eval echo configure:16241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16241   rm -rf conftest*
16242   ol_cv_func_gethostbyname_r_nargs5=yes
16243 else
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   ol_cv_func_gethostbyname_r_nargs5=no
16248 fi
16249 rm -f conftest*
16250
16251         cat > conftest.$ac_ext <<EOF
16252 #line 16253 "configure"
16253 #include "confdefs.h"
16254 #include <sys/types.h>
16255 #include <sys/socket.h>
16256 #include <netinet/in.h>
16257 #include <netdb.h>
16258 #define BUFSIZE (sizeof(struct hostent)+10)
16259 int main() {
16260 struct hostent hent;struct hostent *rhent;
16261                 char buffer[BUFSIZE];
16262                 int bufsize=BUFSIZE;int h_errno;
16263                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16264                         &rhent, &h_errno);
16265 ; return 0; }
16266 EOF
16267 if { (eval echo configure:16268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16268   rm -rf conftest*
16269   ol_cv_func_gethostbyname_r_nargs6=yes
16270 else
16271   echo "configure: failed program was:" >&5
16272   cat conftest.$ac_ext >&5
16273   rm -rf conftest*
16274   ol_cv_func_gethostbyname_r_nargs6=no
16275 fi
16276 rm -f conftest*
16277
16278         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16279                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16280
16281                 ol_cv_func_gethostbyname_r_nargs=5
16282
16283         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16284                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16285
16286                 ol_cv_func_gethostbyname_r_nargs=6
16287
16288         else
16289                 ol_cv_func_gethostbyname_r_nargs=0
16290         fi
16291   
16292 fi
16293
16294 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16295   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16296         cat >> confdefs.h <<EOF
16297 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16298 EOF
16299
16300   fi
16301
16302 else
16303         ol_cv_func_gethostbyname_r_nargs=0
16304 fi
16305  
16306 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16307         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16308 echo "configure:16309: checking number of arguments of gethostbyaddr_r" >&5
16309 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16310   echo $ac_n "(cached) $ac_c" 1>&6
16311 else
16312   cat > conftest.$ac_ext <<EOF
16313 #line 16314 "configure"
16314 #include "confdefs.h"
16315 #include <sys/types.h>
16316 #include <sys/socket.h>
16317 #include <netinet/in.h>
16318 #include <netdb.h>
16319 #define BUFSIZE (sizeof(struct hostent)+10)
16320 int main() {
16321 struct hostent hent; char buffer[BUFSIZE]; 
16322             struct in_addr add;
16323             size_t alen=sizeof(struct in_addr);
16324             int bufsize=BUFSIZE;int h_errno;
16325                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16326                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16330   rm -rf conftest*
16331   ol_cv_func_gethostbyaddr_r_nargs7=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_func_gethostbyaddr_r_nargs7=no
16337 fi
16338 rm -f conftest*
16339
16340         cat > conftest.$ac_ext <<EOF
16341 #line 16342 "configure"
16342 #include "confdefs.h"
16343 #include <sys/types.h>
16344 #include <sys/socket.h>
16345 #include <netinet/in.h>
16346 #include <netdb.h>
16347 #define BUFSIZE (sizeof(struct hostent)+10)
16348 int main() {
16349 struct hostent hent;
16350                 struct hostent *rhent; char buffer[BUFSIZE]; 
16351                 struct in_addr add;
16352                 size_t alen=sizeof(struct in_addr);
16353                 int bufsize=BUFSIZE;int h_errno;
16354                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16355                         alen, AF_INET, &hent, buffer, bufsize, 
16356                         &rhent, &h_errno);
16357 ; return 0; }
16358 EOF
16359 if { (eval echo configure:16360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16360   rm -rf conftest*
16361   ol_cv_func_gethostbyaddr_r_nargs8=yes
16362 else
16363   echo "configure: failed program was:" >&5
16364   cat conftest.$ac_ext >&5
16365   rm -rf conftest*
16366   ol_cv_func_gethostbyaddr_r_nargs8=no
16367 fi
16368 rm -f conftest*
16369
16370         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16371                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16372
16373                 ol_cv_func_gethostbyaddr_r_nargs=7
16374
16375         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16376                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16377
16378                 ol_cv_func_gethostbyaddr_r_nargs=8
16379
16380         else
16381                 ol_cv_func_gethostbyaddr_r_nargs=0
16382         fi
16383   
16384 fi
16385
16386 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16387   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16388     cat >> confdefs.h <<EOF
16389 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16390 EOF
16391
16392   fi
16393
16394 else
16395         ol_cv_func_gethostbyaddr_r_nargs=0
16396 fi
16397
16398 ol_link_ldbm=no 
16399
16400 if test $ol_with_ldbm_api = auto \
16401         -o $ol_with_ldbm_api = berkeley \
16402         -o $ol_with_ldbm_api = bcompat ; then
16403
16404         if test $ol_with_ldbm_api = bcompat; then \
16405                 for ac_hdr in db_185.h db.h
16406 do
16407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16409 echo "configure:16410: checking for $ac_hdr" >&5
16410 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16411   echo $ac_n "(cached) $ac_c" 1>&6
16412 else
16413   cat > conftest.$ac_ext <<EOF
16414 #line 16415 "configure"
16415 #include "confdefs.h"
16416 #include <$ac_hdr>
16417 EOF
16418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16419 { (eval echo configure:16420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16421 if test -z "$ac_err"; then
16422   rm -rf conftest*
16423   eval "ac_cv_header_$ac_safe=yes"
16424 else
16425   echo "$ac_err" >&5
16426   echo "configure: failed program was:" >&5
16427   cat conftest.$ac_ext >&5
16428   rm -rf conftest*
16429   eval "ac_cv_header_$ac_safe=no"
16430 fi
16431 rm -f conftest*
16432 fi
16433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16434   echo "$ac_t""yes" 1>&6
16435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16436   cat >> confdefs.h <<EOF
16437 #define $ac_tr_hdr 1
16438 EOF
16439  
16440 else
16441   echo "$ac_t""no" 1>&6
16442 fi
16443 done
16444
16445 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16446         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16447 echo "configure:16448: checking if Berkeley DB header compatibility" >&5
16448 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16449   echo $ac_n "(cached) $ac_c" 1>&6
16450 else
16451   
16452                 cat > conftest.$ac_ext <<EOF
16453 #line 16454 "configure"
16454 #include "confdefs.h"
16455
16456 #if HAVE_DB_185_H
16457 #       include <db_185.h>
16458 #else
16459 #       include <db.h>
16460 #endif
16461
16462  /* this check could be improved */
16463 #ifndef DB_VERSION_MAJOR
16464 #       define DB_VERSION_MAJOR 1
16465 #endif
16466
16467 #if DB_VERSION_MAJOR == 1 
16468         __db_version_1
16469 #endif
16470
16471 EOF
16472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16473   egrep "__db_version_1" >/dev/null 2>&1; then
16474   rm -rf conftest*
16475   ol_cv_header_db1=yes
16476 else
16477   rm -rf conftest*
16478   ol_cv_header_db1=no
16479 fi
16480 rm -f conftest*
16481
16482 fi
16483
16484 echo "$ac_t""$ol_cv_header_db1" 1>&6
16485
16486         if test $ol_cv_header_db1 = yes ; then
16487                 ol_cv_lib_db=no
16488 if test $ol_cv_lib_db = no ; then
16489         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16490 echo "configure:16491: checking for Berkeley DB link (default)" >&5
16491 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16492   echo $ac_n "(cached) $ac_c" 1>&6
16493 else
16494   
16495         ol_DB_LIB=
16496         ol_LIBS=$LIBS
16497         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16498
16499         cat > conftest.$ac_ext <<EOF
16500 #line 16501 "configure"
16501 #include "confdefs.h"
16502
16503 #ifdef HAVE_DB_185_H
16504 # include <db_185.h>
16505 #else
16506 # include <db.h>
16507 #endif
16508
16509 #ifndef DB_VERSION_MAJOR
16510 # define DB_VERSION_MAJOR 1
16511 #endif
16512
16513 #ifndef NULL
16514 #define NULL ((void*)0)
16515 #endif
16516
16517 int main() {
16518
16519 #if DB_VERSION_MAJOR > 1
16520         {
16521                 char *version;
16522                 int major, minor, patch;
16523
16524                 version = db_version( &major, &minor, &patch );
16525
16526                 if( major != DB_VERSION_MAJOR ||
16527                         minor < DB_VERSION_MINOR )
16528                 {
16529                         printf("Berkeley DB version mismatch\n"
16530                                 "\texpected: %s\n\tgot: %s\n",
16531                                 DB_VERSION_STRING, version);
16532                         return 1;
16533                 }
16534         }
16535 #endif
16536
16537 #if DB_VERSION_MAJOR > 2
16538         db_env_create( NULL, 0 );
16539 #elif DB_VERSION_MAJOR > 1
16540         db_appexit( NULL );
16541 #else
16542         (void) dbopen( NULL, 0, 0, 0, NULL);
16543 #endif
16544
16545 ; return 0; }
16546 EOF
16547 if { (eval echo configure:16548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16548   rm -rf conftest*
16549   ol_cv_db_none=yes
16550 else
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   ol_cv_db_none=no
16555 fi
16556 rm -f conftest*
16557
16558         LIBS="$ol_LIBS"
16559
16560 fi
16561
16562 echo "$ac_t""$ol_cv_db_none" 1>&6
16563
16564         if test $ol_cv_db_none = yes ; then
16565                 ol_cv_lib_db=yes
16566         fi
16567 fi
16568
16569 if test $ol_cv_lib_db = no ; then
16570         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16571 echo "configure:16572: checking for Berkeley DB link (-ldb42)" >&5
16572 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16573   echo $ac_n "(cached) $ac_c" 1>&6
16574 else
16575   
16576         ol_DB_LIB=-ldb42
16577         ol_LIBS=$LIBS
16578         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16579
16580         cat > conftest.$ac_ext <<EOF
16581 #line 16582 "configure"
16582 #include "confdefs.h"
16583
16584 #ifdef HAVE_DB_185_H
16585 # include <db_185.h>
16586 #else
16587 # include <db.h>
16588 #endif
16589
16590 #ifndef DB_VERSION_MAJOR
16591 # define DB_VERSION_MAJOR 1
16592 #endif
16593
16594 #ifndef NULL
16595 #define NULL ((void*)0)
16596 #endif
16597
16598 int main() {
16599
16600 #if DB_VERSION_MAJOR > 1
16601         {
16602                 char *version;
16603                 int major, minor, patch;
16604
16605                 version = db_version( &major, &minor, &patch );
16606
16607                 if( major != DB_VERSION_MAJOR ||
16608                         minor < DB_VERSION_MINOR )
16609                 {
16610                         printf("Berkeley DB version mismatch\n"
16611                                 "\texpected: %s\n\tgot: %s\n",
16612                                 DB_VERSION_STRING, version);
16613                         return 1;
16614                 }
16615         }
16616 #endif
16617
16618 #if DB_VERSION_MAJOR > 2
16619         db_env_create( NULL, 0 );
16620 #elif DB_VERSION_MAJOR > 1
16621         db_appexit( NULL );
16622 #else
16623         (void) dbopen( NULL, 0, 0, 0, NULL);
16624 #endif
16625
16626 ; return 0; }
16627 EOF
16628 if { (eval echo configure:16629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16629   rm -rf conftest*
16630   ol_cv_db_db42=yes
16631 else
16632   echo "configure: failed program was:" >&5
16633   cat conftest.$ac_ext >&5
16634   rm -rf conftest*
16635   ol_cv_db_db42=no
16636 fi
16637 rm -f conftest*
16638
16639         LIBS="$ol_LIBS"
16640
16641 fi
16642
16643 echo "$ac_t""$ol_cv_db_db42" 1>&6
16644
16645         if test $ol_cv_db_db42 = yes ; then
16646                 ol_cv_lib_db=-ldb42
16647         fi
16648 fi
16649
16650 if test $ol_cv_lib_db = no ; then
16651         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16652 echo "configure:16653: checking for Berkeley DB link (-ldb-42)" >&5
16653 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16654   echo $ac_n "(cached) $ac_c" 1>&6
16655 else
16656   
16657         ol_DB_LIB=-ldb-42
16658         ol_LIBS=$LIBS
16659         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16660
16661         cat > conftest.$ac_ext <<EOF
16662 #line 16663 "configure"
16663 #include "confdefs.h"
16664
16665 #ifdef HAVE_DB_185_H
16666 # include <db_185.h>
16667 #else
16668 # include <db.h>
16669 #endif
16670
16671 #ifndef DB_VERSION_MAJOR
16672 # define DB_VERSION_MAJOR 1
16673 #endif
16674
16675 #ifndef NULL
16676 #define NULL ((void*)0)
16677 #endif
16678
16679 int main() {
16680
16681 #if DB_VERSION_MAJOR > 1
16682         {
16683                 char *version;
16684                 int major, minor, patch;
16685
16686                 version = db_version( &major, &minor, &patch );
16687
16688                 if( major != DB_VERSION_MAJOR ||
16689                         minor < DB_VERSION_MINOR )
16690                 {
16691                         printf("Berkeley DB version mismatch\n"
16692                                 "\texpected: %s\n\tgot: %s\n",
16693                                 DB_VERSION_STRING, version);
16694                         return 1;
16695                 }
16696         }
16697 #endif
16698
16699 #if DB_VERSION_MAJOR > 2
16700         db_env_create( NULL, 0 );
16701 #elif DB_VERSION_MAJOR > 1
16702         db_appexit( NULL );
16703 #else
16704         (void) dbopen( NULL, 0, 0, 0, NULL);
16705 #endif
16706
16707 ; return 0; }
16708 EOF
16709 if { (eval echo configure:16710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16710   rm -rf conftest*
16711   ol_cv_db_db_42=yes
16712 else
16713   echo "configure: failed program was:" >&5
16714   cat conftest.$ac_ext >&5
16715   rm -rf conftest*
16716   ol_cv_db_db_42=no
16717 fi
16718 rm -f conftest*
16719
16720         LIBS="$ol_LIBS"
16721
16722 fi
16723
16724 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16725
16726         if test $ol_cv_db_db_42 = yes ; then
16727                 ol_cv_lib_db=-ldb-42
16728         fi
16729 fi
16730
16731 if test $ol_cv_lib_db = no ; then
16732         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16733 echo "configure:16734: checking for Berkeley DB link (-ldb-4.2)" >&5
16734 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16735   echo $ac_n "(cached) $ac_c" 1>&6
16736 else
16737   
16738         ol_DB_LIB=-ldb-4.2
16739         ol_LIBS=$LIBS
16740         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16741
16742         cat > conftest.$ac_ext <<EOF
16743 #line 16744 "configure"
16744 #include "confdefs.h"
16745
16746 #ifdef HAVE_DB_185_H
16747 # include <db_185.h>
16748 #else
16749 # include <db.h>
16750 #endif
16751
16752 #ifndef DB_VERSION_MAJOR
16753 # define DB_VERSION_MAJOR 1
16754 #endif
16755
16756 #ifndef NULL
16757 #define NULL ((void*)0)
16758 #endif
16759
16760 int main() {
16761
16762 #if DB_VERSION_MAJOR > 1
16763         {
16764                 char *version;
16765                 int major, minor, patch;
16766
16767                 version = db_version( &major, &minor, &patch );
16768
16769                 if( major != DB_VERSION_MAJOR ||
16770                         minor < DB_VERSION_MINOR )
16771                 {
16772                         printf("Berkeley DB version mismatch\n"
16773                                 "\texpected: %s\n\tgot: %s\n",
16774                                 DB_VERSION_STRING, version);
16775                         return 1;
16776                 }
16777         }
16778 #endif
16779
16780 #if DB_VERSION_MAJOR > 2
16781         db_env_create( NULL, 0 );
16782 #elif DB_VERSION_MAJOR > 1
16783         db_appexit( NULL );
16784 #else
16785         (void) dbopen( NULL, 0, 0, 0, NULL);
16786 #endif
16787
16788 ; return 0; }
16789 EOF
16790 if { (eval echo configure:16791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16791   rm -rf conftest*
16792   ol_cv_db_db_4_dot_2=yes
16793 else
16794   echo "configure: failed program was:" >&5
16795   cat conftest.$ac_ext >&5
16796   rm -rf conftest*
16797   ol_cv_db_db_4_dot_2=no
16798 fi
16799 rm -f conftest*
16800
16801         LIBS="$ol_LIBS"
16802
16803 fi
16804
16805 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16806
16807         if test $ol_cv_db_db_4_dot_2 = yes ; then
16808                 ol_cv_lib_db=-ldb-4.2
16809         fi
16810 fi
16811
16812 if test $ol_cv_lib_db = no ; then
16813         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16814 echo "configure:16815: checking for Berkeley DB link (-ldb-4-2)" >&5
16815 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16816   echo $ac_n "(cached) $ac_c" 1>&6
16817 else
16818   
16819         ol_DB_LIB=-ldb-4-2
16820         ol_LIBS=$LIBS
16821         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16822
16823         cat > conftest.$ac_ext <<EOF
16824 #line 16825 "configure"
16825 #include "confdefs.h"
16826
16827 #ifdef HAVE_DB_185_H
16828 # include <db_185.h>
16829 #else
16830 # include <db.h>
16831 #endif
16832
16833 #ifndef DB_VERSION_MAJOR
16834 # define DB_VERSION_MAJOR 1
16835 #endif
16836
16837 #ifndef NULL
16838 #define NULL ((void*)0)
16839 #endif
16840
16841 int main() {
16842
16843 #if DB_VERSION_MAJOR > 1
16844         {
16845                 char *version;
16846                 int major, minor, patch;
16847
16848                 version = db_version( &major, &minor, &patch );
16849
16850                 if( major != DB_VERSION_MAJOR ||
16851                         minor < DB_VERSION_MINOR )
16852                 {
16853                         printf("Berkeley DB version mismatch\n"
16854                                 "\texpected: %s\n\tgot: %s\n",
16855                                 DB_VERSION_STRING, version);
16856                         return 1;
16857                 }
16858         }
16859 #endif
16860
16861 #if DB_VERSION_MAJOR > 2
16862         db_env_create( NULL, 0 );
16863 #elif DB_VERSION_MAJOR > 1
16864         db_appexit( NULL );
16865 #else
16866         (void) dbopen( NULL, 0, 0, 0, NULL);
16867 #endif
16868
16869 ; return 0; }
16870 EOF
16871 if { (eval echo configure:16872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16872   rm -rf conftest*
16873   ol_cv_db_db_4_2=yes
16874 else
16875   echo "configure: failed program was:" >&5
16876   cat conftest.$ac_ext >&5
16877   rm -rf conftest*
16878   ol_cv_db_db_4_2=no
16879 fi
16880 rm -f conftest*
16881
16882         LIBS="$ol_LIBS"
16883
16884 fi
16885
16886 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16887
16888         if test $ol_cv_db_db_4_2 = yes ; then
16889                 ol_cv_lib_db=-ldb-4-2
16890         fi
16891 fi
16892
16893 if test $ol_cv_lib_db = no ; then
16894         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16895 echo "configure:16896: checking for Berkeley DB link (-ldb-4)" >&5
16896 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16897   echo $ac_n "(cached) $ac_c" 1>&6
16898 else
16899   
16900         ol_DB_LIB=-ldb-4
16901         ol_LIBS=$LIBS
16902         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16903
16904         cat > conftest.$ac_ext <<EOF
16905 #line 16906 "configure"
16906 #include "confdefs.h"
16907
16908 #ifdef HAVE_DB_185_H
16909 # include <db_185.h>
16910 #else
16911 # include <db.h>
16912 #endif
16913
16914 #ifndef DB_VERSION_MAJOR
16915 # define DB_VERSION_MAJOR 1
16916 #endif
16917
16918 #ifndef NULL
16919 #define NULL ((void*)0)
16920 #endif
16921
16922 int main() {
16923
16924 #if DB_VERSION_MAJOR > 1
16925         {
16926                 char *version;
16927                 int major, minor, patch;
16928
16929                 version = db_version( &major, &minor, &patch );
16930
16931                 if( major != DB_VERSION_MAJOR ||
16932                         minor < DB_VERSION_MINOR )
16933                 {
16934                         printf("Berkeley DB version mismatch\n"
16935                                 "\texpected: %s\n\tgot: %s\n",
16936                                 DB_VERSION_STRING, version);
16937                         return 1;
16938                 }
16939         }
16940 #endif
16941
16942 #if DB_VERSION_MAJOR > 2
16943         db_env_create( NULL, 0 );
16944 #elif DB_VERSION_MAJOR > 1
16945         db_appexit( NULL );
16946 #else
16947         (void) dbopen( NULL, 0, 0, 0, NULL);
16948 #endif
16949
16950 ; return 0; }
16951 EOF
16952 if { (eval echo configure:16953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16953   rm -rf conftest*
16954   ol_cv_db_db_4=yes
16955 else
16956   echo "configure: failed program was:" >&5
16957   cat conftest.$ac_ext >&5
16958   rm -rf conftest*
16959   ol_cv_db_db_4=no
16960 fi
16961 rm -f conftest*
16962
16963         LIBS="$ol_LIBS"
16964
16965 fi
16966
16967 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16968
16969         if test $ol_cv_db_db_4 = yes ; then
16970                 ol_cv_lib_db=-ldb-4
16971         fi
16972 fi
16973
16974 if test $ol_cv_lib_db = no ; then
16975         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16976 echo "configure:16977: checking for Berkeley DB link (-ldb4)" >&5
16977 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16978   echo $ac_n "(cached) $ac_c" 1>&6
16979 else
16980   
16981         ol_DB_LIB=-ldb4
16982         ol_LIBS=$LIBS
16983         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16984
16985         cat > conftest.$ac_ext <<EOF
16986 #line 16987 "configure"
16987 #include "confdefs.h"
16988
16989 #ifdef HAVE_DB_185_H
16990 # include <db_185.h>
16991 #else
16992 # include <db.h>
16993 #endif
16994
16995 #ifndef DB_VERSION_MAJOR
16996 # define DB_VERSION_MAJOR 1
16997 #endif
16998
16999 #ifndef NULL
17000 #define NULL ((void*)0)
17001 #endif
17002
17003 int main() {
17004
17005 #if DB_VERSION_MAJOR > 1
17006         {
17007                 char *version;
17008                 int major, minor, patch;
17009
17010                 version = db_version( &major, &minor, &patch );
17011
17012                 if( major != DB_VERSION_MAJOR ||
17013                         minor < DB_VERSION_MINOR )
17014                 {
17015                         printf("Berkeley DB version mismatch\n"
17016                                 "\texpected: %s\n\tgot: %s\n",
17017                                 DB_VERSION_STRING, version);
17018                         return 1;
17019                 }
17020         }
17021 #endif
17022
17023 #if DB_VERSION_MAJOR > 2
17024         db_env_create( NULL, 0 );
17025 #elif DB_VERSION_MAJOR > 1
17026         db_appexit( NULL );
17027 #else
17028         (void) dbopen( NULL, 0, 0, 0, NULL);
17029 #endif
17030
17031 ; return 0; }
17032 EOF
17033 if { (eval echo configure:17034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17034   rm -rf conftest*
17035   ol_cv_db_db4=yes
17036 else
17037   echo "configure: failed program was:" >&5
17038   cat conftest.$ac_ext >&5
17039   rm -rf conftest*
17040   ol_cv_db_db4=no
17041 fi
17042 rm -f conftest*
17043
17044         LIBS="$ol_LIBS"
17045
17046 fi
17047
17048 echo "$ac_t""$ol_cv_db_db4" 1>&6
17049
17050         if test $ol_cv_db_db4 = yes ; then
17051                 ol_cv_lib_db=-ldb4
17052         fi
17053 fi
17054
17055 if test $ol_cv_lib_db = no ; then
17056         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17057 echo "configure:17058: checking for Berkeley DB link (-ldb)" >&5
17058 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17059   echo $ac_n "(cached) $ac_c" 1>&6
17060 else
17061   
17062         ol_DB_LIB=-ldb
17063         ol_LIBS=$LIBS
17064         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17065
17066         cat > conftest.$ac_ext <<EOF
17067 #line 17068 "configure"
17068 #include "confdefs.h"
17069
17070 #ifdef HAVE_DB_185_H
17071 # include <db_185.h>
17072 #else
17073 # include <db.h>
17074 #endif
17075
17076 #ifndef DB_VERSION_MAJOR
17077 # define DB_VERSION_MAJOR 1
17078 #endif
17079
17080 #ifndef NULL
17081 #define NULL ((void*)0)
17082 #endif
17083
17084 int main() {
17085
17086 #if DB_VERSION_MAJOR > 1
17087         {
17088                 char *version;
17089                 int major, minor, patch;
17090
17091                 version = db_version( &major, &minor, &patch );
17092
17093                 if( major != DB_VERSION_MAJOR ||
17094                         minor < DB_VERSION_MINOR )
17095                 {
17096                         printf("Berkeley DB version mismatch\n"
17097                                 "\texpected: %s\n\tgot: %s\n",
17098                                 DB_VERSION_STRING, version);
17099                         return 1;
17100                 }
17101         }
17102 #endif
17103
17104 #if DB_VERSION_MAJOR > 2
17105         db_env_create( NULL, 0 );
17106 #elif DB_VERSION_MAJOR > 1
17107         db_appexit( NULL );
17108 #else
17109         (void) dbopen( NULL, 0, 0, 0, NULL);
17110 #endif
17111
17112 ; return 0; }
17113 EOF
17114 if { (eval echo configure:17115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17115   rm -rf conftest*
17116   ol_cv_db_db=yes
17117 else
17118   echo "configure: failed program was:" >&5
17119   cat conftest.$ac_ext >&5
17120   rm -rf conftest*
17121   ol_cv_db_db=no
17122 fi
17123 rm -f conftest*
17124
17125         LIBS="$ol_LIBS"
17126
17127 fi
17128
17129 echo "$ac_t""$ol_cv_db_db" 1>&6
17130
17131         if test $ol_cv_db_db = yes ; then
17132                 ol_cv_lib_db=-ldb
17133         fi
17134 fi
17135
17136 if test $ol_cv_lib_db = no ; then
17137         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17138 echo "configure:17139: checking for Berkeley DB link (-ldb41)" >&5
17139 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17140   echo $ac_n "(cached) $ac_c" 1>&6
17141 else
17142   
17143         ol_DB_LIB=-ldb41
17144         ol_LIBS=$LIBS
17145         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17146
17147         cat > conftest.$ac_ext <<EOF
17148 #line 17149 "configure"
17149 #include "confdefs.h"
17150
17151 #ifdef HAVE_DB_185_H
17152 # include <db_185.h>
17153 #else
17154 # include <db.h>
17155 #endif
17156
17157 #ifndef DB_VERSION_MAJOR
17158 # define DB_VERSION_MAJOR 1
17159 #endif
17160
17161 #ifndef NULL
17162 #define NULL ((void*)0)
17163 #endif
17164
17165 int main() {
17166
17167 #if DB_VERSION_MAJOR > 1
17168         {
17169                 char *version;
17170                 int major, minor, patch;
17171
17172                 version = db_version( &major, &minor, &patch );
17173
17174                 if( major != DB_VERSION_MAJOR ||
17175                         minor < DB_VERSION_MINOR )
17176                 {
17177                         printf("Berkeley DB version mismatch\n"
17178                                 "\texpected: %s\n\tgot: %s\n",
17179                                 DB_VERSION_STRING, version);
17180                         return 1;
17181                 }
17182         }
17183 #endif
17184
17185 #if DB_VERSION_MAJOR > 2
17186         db_env_create( NULL, 0 );
17187 #elif DB_VERSION_MAJOR > 1
17188         db_appexit( NULL );
17189 #else
17190         (void) dbopen( NULL, 0, 0, 0, NULL);
17191 #endif
17192
17193 ; return 0; }
17194 EOF
17195 if { (eval echo configure:17196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17196   rm -rf conftest*
17197   ol_cv_db_db41=yes
17198 else
17199   echo "configure: failed program was:" >&5
17200   cat conftest.$ac_ext >&5
17201   rm -rf conftest*
17202   ol_cv_db_db41=no
17203 fi
17204 rm -f conftest*
17205
17206         LIBS="$ol_LIBS"
17207
17208 fi
17209
17210 echo "$ac_t""$ol_cv_db_db41" 1>&6
17211
17212         if test $ol_cv_db_db41 = yes ; then
17213                 ol_cv_lib_db=-ldb41
17214         fi
17215 fi
17216
17217 if test $ol_cv_lib_db = no ; then
17218         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17219 echo "configure:17220: checking for Berkeley DB link (-ldb-41)" >&5
17220 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17221   echo $ac_n "(cached) $ac_c" 1>&6
17222 else
17223   
17224         ol_DB_LIB=-ldb-41
17225         ol_LIBS=$LIBS
17226         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17227
17228         cat > conftest.$ac_ext <<EOF
17229 #line 17230 "configure"
17230 #include "confdefs.h"
17231
17232 #ifdef HAVE_DB_185_H
17233 # include <db_185.h>
17234 #else
17235 # include <db.h>
17236 #endif
17237
17238 #ifndef DB_VERSION_MAJOR
17239 # define DB_VERSION_MAJOR 1
17240 #endif
17241
17242 #ifndef NULL
17243 #define NULL ((void*)0)
17244 #endif
17245
17246 int main() {
17247
17248 #if DB_VERSION_MAJOR > 1
17249         {
17250                 char *version;
17251                 int major, minor, patch;
17252
17253                 version = db_version( &major, &minor, &patch );
17254
17255                 if( major != DB_VERSION_MAJOR ||
17256                         minor < DB_VERSION_MINOR )
17257                 {
17258                         printf("Berkeley DB version mismatch\n"
17259                                 "\texpected: %s\n\tgot: %s\n",
17260                                 DB_VERSION_STRING, version);
17261                         return 1;
17262                 }
17263         }
17264 #endif
17265
17266 #if DB_VERSION_MAJOR > 2
17267         db_env_create( NULL, 0 );
17268 #elif DB_VERSION_MAJOR > 1
17269         db_appexit( NULL );
17270 #else
17271         (void) dbopen( NULL, 0, 0, 0, NULL);
17272 #endif
17273
17274 ; return 0; }
17275 EOF
17276 if { (eval echo configure:17277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17277   rm -rf conftest*
17278   ol_cv_db_db_41=yes
17279 else
17280   echo "configure: failed program was:" >&5
17281   cat conftest.$ac_ext >&5
17282   rm -rf conftest*
17283   ol_cv_db_db_41=no
17284 fi
17285 rm -f conftest*
17286
17287         LIBS="$ol_LIBS"
17288
17289 fi
17290
17291 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17292
17293         if test $ol_cv_db_db_41 = yes ; then
17294                 ol_cv_lib_db=-ldb-41
17295         fi
17296 fi
17297
17298 if test $ol_cv_lib_db = no ; then
17299         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17300 echo "configure:17301: checking for Berkeley DB link (-ldb-4.1)" >&5
17301 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17302   echo $ac_n "(cached) $ac_c" 1>&6
17303 else
17304   
17305         ol_DB_LIB=-ldb-4.1
17306         ol_LIBS=$LIBS
17307         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17308
17309         cat > conftest.$ac_ext <<EOF
17310 #line 17311 "configure"
17311 #include "confdefs.h"
17312
17313 #ifdef HAVE_DB_185_H
17314 # include <db_185.h>
17315 #else
17316 # include <db.h>
17317 #endif
17318
17319 #ifndef DB_VERSION_MAJOR
17320 # define DB_VERSION_MAJOR 1
17321 #endif
17322
17323 #ifndef NULL
17324 #define NULL ((void*)0)
17325 #endif
17326
17327 int main() {
17328
17329 #if DB_VERSION_MAJOR > 1
17330         {
17331                 char *version;
17332                 int major, minor, patch;
17333
17334                 version = db_version( &major, &minor, &patch );
17335
17336                 if( major != DB_VERSION_MAJOR ||
17337                         minor < DB_VERSION_MINOR )
17338                 {
17339                         printf("Berkeley DB version mismatch\n"
17340                                 "\texpected: %s\n\tgot: %s\n",
17341                                 DB_VERSION_STRING, version);
17342                         return 1;
17343                 }
17344         }
17345 #endif
17346
17347 #if DB_VERSION_MAJOR > 2
17348         db_env_create( NULL, 0 );
17349 #elif DB_VERSION_MAJOR > 1
17350         db_appexit( NULL );
17351 #else
17352         (void) dbopen( NULL, 0, 0, 0, NULL);
17353 #endif
17354
17355 ; return 0; }
17356 EOF
17357 if { (eval echo configure:17358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17358   rm -rf conftest*
17359   ol_cv_db_db_4_dot_1=yes
17360 else
17361   echo "configure: failed program was:" >&5
17362   cat conftest.$ac_ext >&5
17363   rm -rf conftest*
17364   ol_cv_db_db_4_dot_1=no
17365 fi
17366 rm -f conftest*
17367
17368         LIBS="$ol_LIBS"
17369
17370 fi
17371
17372 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17373
17374         if test $ol_cv_db_db_4_dot_1 = yes ; then
17375                 ol_cv_lib_db=-ldb-4.1
17376         fi
17377 fi
17378
17379 if test $ol_cv_lib_db = no ; then
17380         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17381 echo "configure:17382: checking for Berkeley DB link (-ldb-4-1)" >&5
17382 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17383   echo $ac_n "(cached) $ac_c" 1>&6
17384 else
17385   
17386         ol_DB_LIB=-ldb-4-1
17387         ol_LIBS=$LIBS
17388         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17389
17390         cat > conftest.$ac_ext <<EOF
17391 #line 17392 "configure"
17392 #include "confdefs.h"
17393
17394 #ifdef HAVE_DB_185_H
17395 # include <db_185.h>
17396 #else
17397 # include <db.h>
17398 #endif
17399
17400 #ifndef DB_VERSION_MAJOR
17401 # define DB_VERSION_MAJOR 1
17402 #endif
17403
17404 #ifndef NULL
17405 #define NULL ((void*)0)
17406 #endif
17407
17408 int main() {
17409
17410 #if DB_VERSION_MAJOR > 1
17411         {
17412                 char *version;
17413                 int major, minor, patch;
17414
17415                 version = db_version( &major, &minor, &patch );
17416
17417                 if( major != DB_VERSION_MAJOR ||
17418                         minor < DB_VERSION_MINOR )
17419                 {
17420                         printf("Berkeley DB version mismatch\n"
17421                                 "\texpected: %s\n\tgot: %s\n",
17422                                 DB_VERSION_STRING, version);
17423                         return 1;
17424                 }
17425         }
17426 #endif
17427
17428 #if DB_VERSION_MAJOR > 2
17429         db_env_create( NULL, 0 );
17430 #elif DB_VERSION_MAJOR > 1
17431         db_appexit( NULL );
17432 #else
17433         (void) dbopen( NULL, 0, 0, 0, NULL);
17434 #endif
17435
17436 ; return 0; }
17437 EOF
17438 if { (eval echo configure:17439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17439   rm -rf conftest*
17440   ol_cv_db_db_4_1=yes
17441 else
17442   echo "configure: failed program was:" >&5
17443   cat conftest.$ac_ext >&5
17444   rm -rf conftest*
17445   ol_cv_db_db_4_1=no
17446 fi
17447 rm -f conftest*
17448
17449         LIBS="$ol_LIBS"
17450
17451 fi
17452
17453 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17454
17455         if test $ol_cv_db_db_4_1 = yes ; then
17456                 ol_cv_lib_db=-ldb-4-1
17457         fi
17458 fi
17459
17460 if test $ol_cv_lib_db = no ; then
17461         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17462 echo "configure:17463: checking for Berkeley DB link (-ldb3)" >&5
17463 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17464   echo $ac_n "(cached) $ac_c" 1>&6
17465 else
17466   
17467         ol_DB_LIB=-ldb3
17468         ol_LIBS=$LIBS
17469         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17470
17471         cat > conftest.$ac_ext <<EOF
17472 #line 17473 "configure"
17473 #include "confdefs.h"
17474
17475 #ifdef HAVE_DB_185_H
17476 # include <db_185.h>
17477 #else
17478 # include <db.h>
17479 #endif
17480
17481 #ifndef DB_VERSION_MAJOR
17482 # define DB_VERSION_MAJOR 1
17483 #endif
17484
17485 #ifndef NULL
17486 #define NULL ((void*)0)
17487 #endif
17488
17489 int main() {
17490
17491 #if DB_VERSION_MAJOR > 1
17492         {
17493                 char *version;
17494                 int major, minor, patch;
17495
17496                 version = db_version( &major, &minor, &patch );
17497
17498                 if( major != DB_VERSION_MAJOR ||
17499                         minor < DB_VERSION_MINOR )
17500                 {
17501                         printf("Berkeley DB version mismatch\n"
17502                                 "\texpected: %s\n\tgot: %s\n",
17503                                 DB_VERSION_STRING, version);
17504                         return 1;
17505                 }
17506         }
17507 #endif
17508
17509 #if DB_VERSION_MAJOR > 2
17510         db_env_create( NULL, 0 );
17511 #elif DB_VERSION_MAJOR > 1
17512         db_appexit( NULL );
17513 #else
17514         (void) dbopen( NULL, 0, 0, 0, NULL);
17515 #endif
17516
17517 ; return 0; }
17518 EOF
17519 if { (eval echo configure:17520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17520   rm -rf conftest*
17521   ol_cv_db_db3=yes
17522 else
17523   echo "configure: failed program was:" >&5
17524   cat conftest.$ac_ext >&5
17525   rm -rf conftest*
17526   ol_cv_db_db3=no
17527 fi
17528 rm -f conftest*
17529
17530         LIBS="$ol_LIBS"
17531
17532 fi
17533
17534 echo "$ac_t""$ol_cv_db_db3" 1>&6
17535
17536         if test $ol_cv_db_db3 = yes ; then
17537                 ol_cv_lib_db=-ldb3
17538         fi
17539 fi
17540
17541 if test $ol_cv_lib_db = no ; then
17542         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17543 echo "configure:17544: checking for Berkeley DB link (-ldb-3)" >&5
17544 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17545   echo $ac_n "(cached) $ac_c" 1>&6
17546 else
17547   
17548         ol_DB_LIB=-ldb-3
17549         ol_LIBS=$LIBS
17550         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17551
17552         cat > conftest.$ac_ext <<EOF
17553 #line 17554 "configure"
17554 #include "confdefs.h"
17555
17556 #ifdef HAVE_DB_185_H
17557 # include <db_185.h>
17558 #else
17559 # include <db.h>
17560 #endif
17561
17562 #ifndef DB_VERSION_MAJOR
17563 # define DB_VERSION_MAJOR 1
17564 #endif
17565
17566 #ifndef NULL
17567 #define NULL ((void*)0)
17568 #endif
17569
17570 int main() {
17571
17572 #if DB_VERSION_MAJOR > 1
17573         {
17574                 char *version;
17575                 int major, minor, patch;
17576
17577                 version = db_version( &major, &minor, &patch );
17578
17579                 if( major != DB_VERSION_MAJOR ||
17580                         minor < DB_VERSION_MINOR )
17581                 {
17582                         printf("Berkeley DB version mismatch\n"
17583                                 "\texpected: %s\n\tgot: %s\n",
17584                                 DB_VERSION_STRING, version);
17585                         return 1;
17586                 }
17587         }
17588 #endif
17589
17590 #if DB_VERSION_MAJOR > 2
17591         db_env_create( NULL, 0 );
17592 #elif DB_VERSION_MAJOR > 1
17593         db_appexit( NULL );
17594 #else
17595         (void) dbopen( NULL, 0, 0, 0, NULL);
17596 #endif
17597
17598 ; return 0; }
17599 EOF
17600 if { (eval echo configure:17601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17601   rm -rf conftest*
17602   ol_cv_db_db_3=yes
17603 else
17604   echo "configure: failed program was:" >&5
17605   cat conftest.$ac_ext >&5
17606   rm -rf conftest*
17607   ol_cv_db_db_3=no
17608 fi
17609 rm -f conftest*
17610
17611         LIBS="$ol_LIBS"
17612
17613 fi
17614
17615 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17616
17617         if test $ol_cv_db_db_3 = yes ; then
17618                 ol_cv_lib_db=-ldb-3
17619         fi
17620 fi
17621
17622 if test $ol_cv_lib_db = no ; then
17623         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17624 echo "configure:17625: checking for Berkeley DB link (-ldb2)" >&5
17625 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17626   echo $ac_n "(cached) $ac_c" 1>&6
17627 else
17628   
17629         ol_DB_LIB=-ldb2
17630         ol_LIBS=$LIBS
17631         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17632
17633         cat > conftest.$ac_ext <<EOF
17634 #line 17635 "configure"
17635 #include "confdefs.h"
17636
17637 #ifdef HAVE_DB_185_H
17638 # include <db_185.h>
17639 #else
17640 # include <db.h>
17641 #endif
17642
17643 #ifndef DB_VERSION_MAJOR
17644 # define DB_VERSION_MAJOR 1
17645 #endif
17646
17647 #ifndef NULL
17648 #define NULL ((void*)0)
17649 #endif
17650
17651 int main() {
17652
17653 #if DB_VERSION_MAJOR > 1
17654         {
17655                 char *version;
17656                 int major, minor, patch;
17657
17658                 version = db_version( &major, &minor, &patch );
17659
17660                 if( major != DB_VERSION_MAJOR ||
17661                         minor < DB_VERSION_MINOR )
17662                 {
17663                         printf("Berkeley DB version mismatch\n"
17664                                 "\texpected: %s\n\tgot: %s\n",
17665                                 DB_VERSION_STRING, version);
17666                         return 1;
17667                 }
17668         }
17669 #endif
17670
17671 #if DB_VERSION_MAJOR > 2
17672         db_env_create( NULL, 0 );
17673 #elif DB_VERSION_MAJOR > 1
17674         db_appexit( NULL );
17675 #else
17676         (void) dbopen( NULL, 0, 0, 0, NULL);
17677 #endif
17678
17679 ; return 0; }
17680 EOF
17681 if { (eval echo configure:17682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17682   rm -rf conftest*
17683   ol_cv_db_db2=yes
17684 else
17685   echo "configure: failed program was:" >&5
17686   cat conftest.$ac_ext >&5
17687   rm -rf conftest*
17688   ol_cv_db_db2=no
17689 fi
17690 rm -f conftest*
17691
17692         LIBS="$ol_LIBS"
17693
17694 fi
17695
17696 echo "$ac_t""$ol_cv_db_db2" 1>&6
17697
17698         if test $ol_cv_db_db2 = yes ; then
17699                 ol_cv_lib_db=-ldb2
17700         fi
17701 fi
17702
17703 if test $ol_cv_lib_db = no ; then
17704         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17705 echo "configure:17706: checking for Berkeley DB link (-ldb-2)" >&5
17706 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17707   echo $ac_n "(cached) $ac_c" 1>&6
17708 else
17709   
17710         ol_DB_LIB=-ldb-2
17711         ol_LIBS=$LIBS
17712         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17713
17714         cat > conftest.$ac_ext <<EOF
17715 #line 17716 "configure"
17716 #include "confdefs.h"
17717
17718 #ifdef HAVE_DB_185_H
17719 # include <db_185.h>
17720 #else
17721 # include <db.h>
17722 #endif
17723
17724 #ifndef DB_VERSION_MAJOR
17725 # define DB_VERSION_MAJOR 1
17726 #endif
17727
17728 #ifndef NULL
17729 #define NULL ((void*)0)
17730 #endif
17731
17732 int main() {
17733
17734 #if DB_VERSION_MAJOR > 1
17735         {
17736                 char *version;
17737                 int major, minor, patch;
17738
17739                 version = db_version( &major, &minor, &patch );
17740
17741                 if( major != DB_VERSION_MAJOR ||
17742                         minor < DB_VERSION_MINOR )
17743                 {
17744                         printf("Berkeley DB version mismatch\n"
17745                                 "\texpected: %s\n\tgot: %s\n",
17746                                 DB_VERSION_STRING, version);
17747                         return 1;
17748                 }
17749         }
17750 #endif
17751
17752 #if DB_VERSION_MAJOR > 2
17753         db_env_create( NULL, 0 );
17754 #elif DB_VERSION_MAJOR > 1
17755         db_appexit( NULL );
17756 #else
17757         (void) dbopen( NULL, 0, 0, 0, NULL);
17758 #endif
17759
17760 ; return 0; }
17761 EOF
17762 if { (eval echo configure:17763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17763   rm -rf conftest*
17764   ol_cv_db_db_2=yes
17765 else
17766   echo "configure: failed program was:" >&5
17767   cat conftest.$ac_ext >&5
17768   rm -rf conftest*
17769   ol_cv_db_db_2=no
17770 fi
17771 rm -f conftest*
17772
17773         LIBS="$ol_LIBS"
17774
17775 fi
17776
17777 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17778
17779         if test $ol_cv_db_db_2 = yes ; then
17780                 ol_cv_lib_db=-ldb-2
17781         fi
17782 fi
17783
17784 if test $ol_cv_lib_db = no ; then
17785         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17786 echo "configure:17787: checking for Berkeley DB link (-ldb1)" >&5
17787 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17788   echo $ac_n "(cached) $ac_c" 1>&6
17789 else
17790   
17791         ol_DB_LIB=-ldb1
17792         ol_LIBS=$LIBS
17793         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17794
17795         cat > conftest.$ac_ext <<EOF
17796 #line 17797 "configure"
17797 #include "confdefs.h"
17798
17799 #ifdef HAVE_DB_185_H
17800 # include <db_185.h>
17801 #else
17802 # include <db.h>
17803 #endif
17804
17805 #ifndef DB_VERSION_MAJOR
17806 # define DB_VERSION_MAJOR 1
17807 #endif
17808
17809 #ifndef NULL
17810 #define NULL ((void*)0)
17811 #endif
17812
17813 int main() {
17814
17815 #if DB_VERSION_MAJOR > 1
17816         {
17817                 char *version;
17818                 int major, minor, patch;
17819
17820                 version = db_version( &major, &minor, &patch );
17821
17822                 if( major != DB_VERSION_MAJOR ||
17823                         minor < DB_VERSION_MINOR )
17824                 {
17825                         printf("Berkeley DB version mismatch\n"
17826                                 "\texpected: %s\n\tgot: %s\n",
17827                                 DB_VERSION_STRING, version);
17828                         return 1;
17829                 }
17830         }
17831 #endif
17832
17833 #if DB_VERSION_MAJOR > 2
17834         db_env_create( NULL, 0 );
17835 #elif DB_VERSION_MAJOR > 1
17836         db_appexit( NULL );
17837 #else
17838         (void) dbopen( NULL, 0, 0, 0, NULL);
17839 #endif
17840
17841 ; return 0; }
17842 EOF
17843 if { (eval echo configure:17844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17844   rm -rf conftest*
17845   ol_cv_db_db1=yes
17846 else
17847   echo "configure: failed program was:" >&5
17848   cat conftest.$ac_ext >&5
17849   rm -rf conftest*
17850   ol_cv_db_db1=no
17851 fi
17852 rm -f conftest*
17853
17854         LIBS="$ol_LIBS"
17855
17856 fi
17857
17858 echo "$ac_t""$ol_cv_db_db1" 1>&6
17859
17860         if test $ol_cv_db_db1 = yes ; then
17861                 ol_cv_lib_db=-ldb1
17862         fi
17863 fi
17864
17865 if test $ol_cv_lib_db = no ; then
17866         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17867 echo "configure:17868: checking for Berkeley DB link (-ldb-1)" >&5
17868 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17869   echo $ac_n "(cached) $ac_c" 1>&6
17870 else
17871   
17872         ol_DB_LIB=-ldb-1
17873         ol_LIBS=$LIBS
17874         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17875
17876         cat > conftest.$ac_ext <<EOF
17877 #line 17878 "configure"
17878 #include "confdefs.h"
17879
17880 #ifdef HAVE_DB_185_H
17881 # include <db_185.h>
17882 #else
17883 # include <db.h>
17884 #endif
17885
17886 #ifndef DB_VERSION_MAJOR
17887 # define DB_VERSION_MAJOR 1
17888 #endif
17889
17890 #ifndef NULL
17891 #define NULL ((void*)0)
17892 #endif
17893
17894 int main() {
17895
17896 #if DB_VERSION_MAJOR > 1
17897         {
17898                 char *version;
17899                 int major, minor, patch;
17900
17901                 version = db_version( &major, &minor, &patch );
17902
17903                 if( major != DB_VERSION_MAJOR ||
17904                         minor < DB_VERSION_MINOR )
17905                 {
17906                         printf("Berkeley DB version mismatch\n"
17907                                 "\texpected: %s\n\tgot: %s\n",
17908                                 DB_VERSION_STRING, version);
17909                         return 1;
17910                 }
17911         }
17912 #endif
17913
17914 #if DB_VERSION_MAJOR > 2
17915         db_env_create( NULL, 0 );
17916 #elif DB_VERSION_MAJOR > 1
17917         db_appexit( NULL );
17918 #else
17919         (void) dbopen( NULL, 0, 0, 0, NULL);
17920 #endif
17921
17922 ; return 0; }
17923 EOF
17924 if { (eval echo configure:17925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17925   rm -rf conftest*
17926   ol_cv_db_db_1=yes
17927 else
17928   echo "configure: failed program was:" >&5
17929   cat conftest.$ac_ext >&5
17930   rm -rf conftest*
17931   ol_cv_db_db_1=no
17932 fi
17933 rm -f conftest*
17934
17935         LIBS="$ol_LIBS"
17936
17937 fi
17938
17939 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17940
17941         if test $ol_cv_db_db_1 = yes ; then
17942                 ol_cv_lib_db=-ldb-1
17943         fi
17944 fi
17945
17946
17947                 if test "$ol_cv_lib_db" != no ; then
17948                         ol_cv_berkeley_db=yes
17949                 fi
17950         fi
17951 fi
17952
17953         else
17954                 ol_cv_berkeley_db=no
17955 for ac_hdr in db.h
17956 do
17957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17958 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17959 echo "configure:17960: checking for $ac_hdr" >&5
17960 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17961   echo $ac_n "(cached) $ac_c" 1>&6
17962 else
17963   cat > conftest.$ac_ext <<EOF
17964 #line 17965 "configure"
17965 #include "confdefs.h"
17966 #include <$ac_hdr>
17967 EOF
17968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17969 { (eval echo configure:17970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17971 if test -z "$ac_err"; then
17972   rm -rf conftest*
17973   eval "ac_cv_header_$ac_safe=yes"
17974 else
17975   echo "$ac_err" >&5
17976   echo "configure: failed program was:" >&5
17977   cat conftest.$ac_ext >&5
17978   rm -rf conftest*
17979   eval "ac_cv_header_$ac_safe=no"
17980 fi
17981 rm -f conftest*
17982 fi
17983 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17984   echo "$ac_t""yes" 1>&6
17985     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17986   cat >> confdefs.h <<EOF
17987 #define $ac_tr_hdr 1
17988 EOF
17989  
17990 else
17991   echo "$ac_t""no" 1>&6
17992 fi
17993 done
17994
17995 if test $ac_cv_header_db_h = yes; then
17996         ol_cv_lib_db=no
17997 if test $ol_cv_lib_db = no ; then
17998         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17999 echo "configure:18000: checking for Berkeley DB link (default)" >&5
18000 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18001   echo $ac_n "(cached) $ac_c" 1>&6
18002 else
18003   
18004         ol_DB_LIB=
18005         ol_LIBS=$LIBS
18006         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18007
18008         cat > conftest.$ac_ext <<EOF
18009 #line 18010 "configure"
18010 #include "confdefs.h"
18011
18012 #ifdef HAVE_DB_185_H
18013 # include <db_185.h>
18014 #else
18015 # include <db.h>
18016 #endif
18017
18018 #ifndef DB_VERSION_MAJOR
18019 # define DB_VERSION_MAJOR 1
18020 #endif
18021
18022 #ifndef NULL
18023 #define NULL ((void*)0)
18024 #endif
18025
18026 int main() {
18027
18028 #if DB_VERSION_MAJOR > 1
18029         {
18030                 char *version;
18031                 int major, minor, patch;
18032
18033                 version = db_version( &major, &minor, &patch );
18034
18035                 if( major != DB_VERSION_MAJOR ||
18036                         minor < DB_VERSION_MINOR )
18037                 {
18038                         printf("Berkeley DB version mismatch\n"
18039                                 "\texpected: %s\n\tgot: %s\n",
18040                                 DB_VERSION_STRING, version);
18041                         return 1;
18042                 }
18043         }
18044 #endif
18045
18046 #if DB_VERSION_MAJOR > 2
18047         db_env_create( NULL, 0 );
18048 #elif DB_VERSION_MAJOR > 1
18049         db_appexit( NULL );
18050 #else
18051         (void) dbopen( NULL, 0, 0, 0, NULL);
18052 #endif
18053
18054 ; return 0; }
18055 EOF
18056 if { (eval echo configure:18057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18057   rm -rf conftest*
18058   ol_cv_db_none=yes
18059 else
18060   echo "configure: failed program was:" >&5
18061   cat conftest.$ac_ext >&5
18062   rm -rf conftest*
18063   ol_cv_db_none=no
18064 fi
18065 rm -f conftest*
18066
18067         LIBS="$ol_LIBS"
18068
18069 fi
18070
18071 echo "$ac_t""$ol_cv_db_none" 1>&6
18072
18073         if test $ol_cv_db_none = yes ; then
18074                 ol_cv_lib_db=yes
18075         fi
18076 fi
18077
18078 if test $ol_cv_lib_db = no ; then
18079         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18080 echo "configure:18081: checking for Berkeley DB link (-ldb42)" >&5
18081 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18082   echo $ac_n "(cached) $ac_c" 1>&6
18083 else
18084   
18085         ol_DB_LIB=-ldb42
18086         ol_LIBS=$LIBS
18087         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18088
18089         cat > conftest.$ac_ext <<EOF
18090 #line 18091 "configure"
18091 #include "confdefs.h"
18092
18093 #ifdef HAVE_DB_185_H
18094 # include <db_185.h>
18095 #else
18096 # include <db.h>
18097 #endif
18098
18099 #ifndef DB_VERSION_MAJOR
18100 # define DB_VERSION_MAJOR 1
18101 #endif
18102
18103 #ifndef NULL
18104 #define NULL ((void*)0)
18105 #endif
18106
18107 int main() {
18108
18109 #if DB_VERSION_MAJOR > 1
18110         {
18111                 char *version;
18112                 int major, minor, patch;
18113
18114                 version = db_version( &major, &minor, &patch );
18115
18116                 if( major != DB_VERSION_MAJOR ||
18117                         minor < DB_VERSION_MINOR )
18118                 {
18119                         printf("Berkeley DB version mismatch\n"
18120                                 "\texpected: %s\n\tgot: %s\n",
18121                                 DB_VERSION_STRING, version);
18122                         return 1;
18123                 }
18124         }
18125 #endif
18126
18127 #if DB_VERSION_MAJOR > 2
18128         db_env_create( NULL, 0 );
18129 #elif DB_VERSION_MAJOR > 1
18130         db_appexit( NULL );
18131 #else
18132         (void) dbopen( NULL, 0, 0, 0, NULL);
18133 #endif
18134
18135 ; return 0; }
18136 EOF
18137 if { (eval echo configure:18138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18138   rm -rf conftest*
18139   ol_cv_db_db42=yes
18140 else
18141   echo "configure: failed program was:" >&5
18142   cat conftest.$ac_ext >&5
18143   rm -rf conftest*
18144   ol_cv_db_db42=no
18145 fi
18146 rm -f conftest*
18147
18148         LIBS="$ol_LIBS"
18149
18150 fi
18151
18152 echo "$ac_t""$ol_cv_db_db42" 1>&6
18153
18154         if test $ol_cv_db_db42 = yes ; then
18155                 ol_cv_lib_db=-ldb42
18156         fi
18157 fi
18158
18159 if test $ol_cv_lib_db = no ; then
18160         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18161 echo "configure:18162: checking for Berkeley DB link (-ldb-42)" >&5
18162 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18163   echo $ac_n "(cached) $ac_c" 1>&6
18164 else
18165   
18166         ol_DB_LIB=-ldb-42
18167         ol_LIBS=$LIBS
18168         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18169
18170         cat > conftest.$ac_ext <<EOF
18171 #line 18172 "configure"
18172 #include "confdefs.h"
18173
18174 #ifdef HAVE_DB_185_H
18175 # include <db_185.h>
18176 #else
18177 # include <db.h>
18178 #endif
18179
18180 #ifndef DB_VERSION_MAJOR
18181 # define DB_VERSION_MAJOR 1
18182 #endif
18183
18184 #ifndef NULL
18185 #define NULL ((void*)0)
18186 #endif
18187
18188 int main() {
18189
18190 #if DB_VERSION_MAJOR > 1
18191         {
18192                 char *version;
18193                 int major, minor, patch;
18194
18195                 version = db_version( &major, &minor, &patch );
18196
18197                 if( major != DB_VERSION_MAJOR ||
18198                         minor < DB_VERSION_MINOR )
18199                 {
18200                         printf("Berkeley DB version mismatch\n"
18201                                 "\texpected: %s\n\tgot: %s\n",
18202                                 DB_VERSION_STRING, version);
18203                         return 1;
18204                 }
18205         }
18206 #endif
18207
18208 #if DB_VERSION_MAJOR > 2
18209         db_env_create( NULL, 0 );
18210 #elif DB_VERSION_MAJOR > 1
18211         db_appexit( NULL );
18212 #else
18213         (void) dbopen( NULL, 0, 0, 0, NULL);
18214 #endif
18215
18216 ; return 0; }
18217 EOF
18218 if { (eval echo configure:18219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18219   rm -rf conftest*
18220   ol_cv_db_db_42=yes
18221 else
18222   echo "configure: failed program was:" >&5
18223   cat conftest.$ac_ext >&5
18224   rm -rf conftest*
18225   ol_cv_db_db_42=no
18226 fi
18227 rm -f conftest*
18228
18229         LIBS="$ol_LIBS"
18230
18231 fi
18232
18233 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18234
18235         if test $ol_cv_db_db_42 = yes ; then
18236                 ol_cv_lib_db=-ldb-42
18237         fi
18238 fi
18239
18240 if test $ol_cv_lib_db = no ; then
18241         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18242 echo "configure:18243: checking for Berkeley DB link (-ldb-4.2)" >&5
18243 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18244   echo $ac_n "(cached) $ac_c" 1>&6
18245 else
18246   
18247         ol_DB_LIB=-ldb-4.2
18248         ol_LIBS=$LIBS
18249         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18250
18251         cat > conftest.$ac_ext <<EOF
18252 #line 18253 "configure"
18253 #include "confdefs.h"
18254
18255 #ifdef HAVE_DB_185_H
18256 # include <db_185.h>
18257 #else
18258 # include <db.h>
18259 #endif
18260
18261 #ifndef DB_VERSION_MAJOR
18262 # define DB_VERSION_MAJOR 1
18263 #endif
18264
18265 #ifndef NULL
18266 #define NULL ((void*)0)
18267 #endif
18268
18269 int main() {
18270
18271 #if DB_VERSION_MAJOR > 1
18272         {
18273                 char *version;
18274                 int major, minor, patch;
18275
18276                 version = db_version( &major, &minor, &patch );
18277
18278                 if( major != DB_VERSION_MAJOR ||
18279                         minor < DB_VERSION_MINOR )
18280                 {
18281                         printf("Berkeley DB version mismatch\n"
18282                                 "\texpected: %s\n\tgot: %s\n",
18283                                 DB_VERSION_STRING, version);
18284                         return 1;
18285                 }
18286         }
18287 #endif
18288
18289 #if DB_VERSION_MAJOR > 2
18290         db_env_create( NULL, 0 );
18291 #elif DB_VERSION_MAJOR > 1
18292         db_appexit( NULL );
18293 #else
18294         (void) dbopen( NULL, 0, 0, 0, NULL);
18295 #endif
18296
18297 ; return 0; }
18298 EOF
18299 if { (eval echo configure:18300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18300   rm -rf conftest*
18301   ol_cv_db_db_4_dot_2=yes
18302 else
18303   echo "configure: failed program was:" >&5
18304   cat conftest.$ac_ext >&5
18305   rm -rf conftest*
18306   ol_cv_db_db_4_dot_2=no
18307 fi
18308 rm -f conftest*
18309
18310         LIBS="$ol_LIBS"
18311
18312 fi
18313
18314 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18315
18316         if test $ol_cv_db_db_4_dot_2 = yes ; then
18317                 ol_cv_lib_db=-ldb-4.2
18318         fi
18319 fi
18320
18321 if test $ol_cv_lib_db = no ; then
18322         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18323 echo "configure:18324: checking for Berkeley DB link (-ldb-4-2)" >&5
18324 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18325   echo $ac_n "(cached) $ac_c" 1>&6
18326 else
18327   
18328         ol_DB_LIB=-ldb-4-2
18329         ol_LIBS=$LIBS
18330         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18331
18332         cat > conftest.$ac_ext <<EOF
18333 #line 18334 "configure"
18334 #include "confdefs.h"
18335
18336 #ifdef HAVE_DB_185_H
18337 # include <db_185.h>
18338 #else
18339 # include <db.h>
18340 #endif
18341
18342 #ifndef DB_VERSION_MAJOR
18343 # define DB_VERSION_MAJOR 1
18344 #endif
18345
18346 #ifndef NULL
18347 #define NULL ((void*)0)
18348 #endif
18349
18350 int main() {
18351
18352 #if DB_VERSION_MAJOR > 1
18353         {
18354                 char *version;
18355                 int major, minor, patch;
18356
18357                 version = db_version( &major, &minor, &patch );
18358
18359                 if( major != DB_VERSION_MAJOR ||
18360                         minor < DB_VERSION_MINOR )
18361                 {
18362                         printf("Berkeley DB version mismatch\n"
18363                                 "\texpected: %s\n\tgot: %s\n",
18364                                 DB_VERSION_STRING, version);
18365                         return 1;
18366                 }
18367         }
18368 #endif
18369
18370 #if DB_VERSION_MAJOR > 2
18371         db_env_create( NULL, 0 );
18372 #elif DB_VERSION_MAJOR > 1
18373         db_appexit( NULL );
18374 #else
18375         (void) dbopen( NULL, 0, 0, 0, NULL);
18376 #endif
18377
18378 ; return 0; }
18379 EOF
18380 if { (eval echo configure:18381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18381   rm -rf conftest*
18382   ol_cv_db_db_4_2=yes
18383 else
18384   echo "configure: failed program was:" >&5
18385   cat conftest.$ac_ext >&5
18386   rm -rf conftest*
18387   ol_cv_db_db_4_2=no
18388 fi
18389 rm -f conftest*
18390
18391         LIBS="$ol_LIBS"
18392
18393 fi
18394
18395 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18396
18397         if test $ol_cv_db_db_4_2 = yes ; then
18398                 ol_cv_lib_db=-ldb-4-2
18399         fi
18400 fi
18401
18402 if test $ol_cv_lib_db = no ; then
18403         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18404 echo "configure:18405: checking for Berkeley DB link (-ldb-4)" >&5
18405 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18406   echo $ac_n "(cached) $ac_c" 1>&6
18407 else
18408   
18409         ol_DB_LIB=-ldb-4
18410         ol_LIBS=$LIBS
18411         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18412
18413         cat > conftest.$ac_ext <<EOF
18414 #line 18415 "configure"
18415 #include "confdefs.h"
18416
18417 #ifdef HAVE_DB_185_H
18418 # include <db_185.h>
18419 #else
18420 # include <db.h>
18421 #endif
18422
18423 #ifndef DB_VERSION_MAJOR
18424 # define DB_VERSION_MAJOR 1
18425 #endif
18426
18427 #ifndef NULL
18428 #define NULL ((void*)0)
18429 #endif
18430
18431 int main() {
18432
18433 #if DB_VERSION_MAJOR > 1
18434         {
18435                 char *version;
18436                 int major, minor, patch;
18437
18438                 version = db_version( &major, &minor, &patch );
18439
18440                 if( major != DB_VERSION_MAJOR ||
18441                         minor < DB_VERSION_MINOR )
18442                 {
18443                         printf("Berkeley DB version mismatch\n"
18444                                 "\texpected: %s\n\tgot: %s\n",
18445                                 DB_VERSION_STRING, version);
18446                         return 1;
18447                 }
18448         }
18449 #endif
18450
18451 #if DB_VERSION_MAJOR > 2
18452         db_env_create( NULL, 0 );
18453 #elif DB_VERSION_MAJOR > 1
18454         db_appexit( NULL );
18455 #else
18456         (void) dbopen( NULL, 0, 0, 0, NULL);
18457 #endif
18458
18459 ; return 0; }
18460 EOF
18461 if { (eval echo configure:18462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18462   rm -rf conftest*
18463   ol_cv_db_db_4=yes
18464 else
18465   echo "configure: failed program was:" >&5
18466   cat conftest.$ac_ext >&5
18467   rm -rf conftest*
18468   ol_cv_db_db_4=no
18469 fi
18470 rm -f conftest*
18471
18472         LIBS="$ol_LIBS"
18473
18474 fi
18475
18476 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18477
18478         if test $ol_cv_db_db_4 = yes ; then
18479                 ol_cv_lib_db=-ldb-4
18480         fi
18481 fi
18482
18483 if test $ol_cv_lib_db = no ; then
18484         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18485 echo "configure:18486: checking for Berkeley DB link (-ldb4)" >&5
18486 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18487   echo $ac_n "(cached) $ac_c" 1>&6
18488 else
18489   
18490         ol_DB_LIB=-ldb4
18491         ol_LIBS=$LIBS
18492         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18493
18494         cat > conftest.$ac_ext <<EOF
18495 #line 18496 "configure"
18496 #include "confdefs.h"
18497
18498 #ifdef HAVE_DB_185_H
18499 # include <db_185.h>
18500 #else
18501 # include <db.h>
18502 #endif
18503
18504 #ifndef DB_VERSION_MAJOR
18505 # define DB_VERSION_MAJOR 1
18506 #endif
18507
18508 #ifndef NULL
18509 #define NULL ((void*)0)
18510 #endif
18511
18512 int main() {
18513
18514 #if DB_VERSION_MAJOR > 1
18515         {
18516                 char *version;
18517                 int major, minor, patch;
18518
18519                 version = db_version( &major, &minor, &patch );
18520
18521                 if( major != DB_VERSION_MAJOR ||
18522                         minor < DB_VERSION_MINOR )
18523                 {
18524                         printf("Berkeley DB version mismatch\n"
18525                                 "\texpected: %s\n\tgot: %s\n",
18526                                 DB_VERSION_STRING, version);
18527                         return 1;
18528                 }
18529         }
18530 #endif
18531
18532 #if DB_VERSION_MAJOR > 2
18533         db_env_create( NULL, 0 );
18534 #elif DB_VERSION_MAJOR > 1
18535         db_appexit( NULL );
18536 #else
18537         (void) dbopen( NULL, 0, 0, 0, NULL);
18538 #endif
18539
18540 ; return 0; }
18541 EOF
18542 if { (eval echo configure:18543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18543   rm -rf conftest*
18544   ol_cv_db_db4=yes
18545 else
18546   echo "configure: failed program was:" >&5
18547   cat conftest.$ac_ext >&5
18548   rm -rf conftest*
18549   ol_cv_db_db4=no
18550 fi
18551 rm -f conftest*
18552
18553         LIBS="$ol_LIBS"
18554
18555 fi
18556
18557 echo "$ac_t""$ol_cv_db_db4" 1>&6
18558
18559         if test $ol_cv_db_db4 = yes ; then
18560                 ol_cv_lib_db=-ldb4
18561         fi
18562 fi
18563
18564 if test $ol_cv_lib_db = no ; then
18565         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18566 echo "configure:18567: checking for Berkeley DB link (-ldb)" >&5
18567 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18568   echo $ac_n "(cached) $ac_c" 1>&6
18569 else
18570   
18571         ol_DB_LIB=-ldb
18572         ol_LIBS=$LIBS
18573         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18574
18575         cat > conftest.$ac_ext <<EOF
18576 #line 18577 "configure"
18577 #include "confdefs.h"
18578
18579 #ifdef HAVE_DB_185_H
18580 # include <db_185.h>
18581 #else
18582 # include <db.h>
18583 #endif
18584
18585 #ifndef DB_VERSION_MAJOR
18586 # define DB_VERSION_MAJOR 1
18587 #endif
18588
18589 #ifndef NULL
18590 #define NULL ((void*)0)
18591 #endif
18592
18593 int main() {
18594
18595 #if DB_VERSION_MAJOR > 1
18596         {
18597                 char *version;
18598                 int major, minor, patch;
18599
18600                 version = db_version( &major, &minor, &patch );
18601
18602                 if( major != DB_VERSION_MAJOR ||
18603                         minor < DB_VERSION_MINOR )
18604                 {
18605                         printf("Berkeley DB version mismatch\n"
18606                                 "\texpected: %s\n\tgot: %s\n",
18607                                 DB_VERSION_STRING, version);
18608                         return 1;
18609                 }
18610         }
18611 #endif
18612
18613 #if DB_VERSION_MAJOR > 2
18614         db_env_create( NULL, 0 );
18615 #elif DB_VERSION_MAJOR > 1
18616         db_appexit( NULL );
18617 #else
18618         (void) dbopen( NULL, 0, 0, 0, NULL);
18619 #endif
18620
18621 ; return 0; }
18622 EOF
18623 if { (eval echo configure:18624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18624   rm -rf conftest*
18625   ol_cv_db_db=yes
18626 else
18627   echo "configure: failed program was:" >&5
18628   cat conftest.$ac_ext >&5
18629   rm -rf conftest*
18630   ol_cv_db_db=no
18631 fi
18632 rm -f conftest*
18633
18634         LIBS="$ol_LIBS"
18635
18636 fi
18637
18638 echo "$ac_t""$ol_cv_db_db" 1>&6
18639
18640         if test $ol_cv_db_db = yes ; then
18641                 ol_cv_lib_db=-ldb
18642         fi
18643 fi
18644
18645 if test $ol_cv_lib_db = no ; then
18646         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18647 echo "configure:18648: checking for Berkeley DB link (-ldb41)" >&5
18648 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18649   echo $ac_n "(cached) $ac_c" 1>&6
18650 else
18651   
18652         ol_DB_LIB=-ldb41
18653         ol_LIBS=$LIBS
18654         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18655
18656         cat > conftest.$ac_ext <<EOF
18657 #line 18658 "configure"
18658 #include "confdefs.h"
18659
18660 #ifdef HAVE_DB_185_H
18661 # include <db_185.h>
18662 #else
18663 # include <db.h>
18664 #endif
18665
18666 #ifndef DB_VERSION_MAJOR
18667 # define DB_VERSION_MAJOR 1
18668 #endif
18669
18670 #ifndef NULL
18671 #define NULL ((void*)0)
18672 #endif
18673
18674 int main() {
18675
18676 #if DB_VERSION_MAJOR > 1
18677         {
18678                 char *version;
18679                 int major, minor, patch;
18680
18681                 version = db_version( &major, &minor, &patch );
18682
18683                 if( major != DB_VERSION_MAJOR ||
18684                         minor < DB_VERSION_MINOR )
18685                 {
18686                         printf("Berkeley DB version mismatch\n"
18687                                 "\texpected: %s\n\tgot: %s\n",
18688                                 DB_VERSION_STRING, version);
18689                         return 1;
18690                 }
18691         }
18692 #endif
18693
18694 #if DB_VERSION_MAJOR > 2
18695         db_env_create( NULL, 0 );
18696 #elif DB_VERSION_MAJOR > 1
18697         db_appexit( NULL );
18698 #else
18699         (void) dbopen( NULL, 0, 0, 0, NULL);
18700 #endif
18701
18702 ; return 0; }
18703 EOF
18704 if { (eval echo configure:18705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18705   rm -rf conftest*
18706   ol_cv_db_db41=yes
18707 else
18708   echo "configure: failed program was:" >&5
18709   cat conftest.$ac_ext >&5
18710   rm -rf conftest*
18711   ol_cv_db_db41=no
18712 fi
18713 rm -f conftest*
18714
18715         LIBS="$ol_LIBS"
18716
18717 fi
18718
18719 echo "$ac_t""$ol_cv_db_db41" 1>&6
18720
18721         if test $ol_cv_db_db41 = yes ; then
18722                 ol_cv_lib_db=-ldb41
18723         fi
18724 fi
18725
18726 if test $ol_cv_lib_db = no ; then
18727         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18728 echo "configure:18729: checking for Berkeley DB link (-ldb-41)" >&5
18729 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18730   echo $ac_n "(cached) $ac_c" 1>&6
18731 else
18732   
18733         ol_DB_LIB=-ldb-41
18734         ol_LIBS=$LIBS
18735         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18736
18737         cat > conftest.$ac_ext <<EOF
18738 #line 18739 "configure"
18739 #include "confdefs.h"
18740
18741 #ifdef HAVE_DB_185_H
18742 # include <db_185.h>
18743 #else
18744 # include <db.h>
18745 #endif
18746
18747 #ifndef DB_VERSION_MAJOR
18748 # define DB_VERSION_MAJOR 1
18749 #endif
18750
18751 #ifndef NULL
18752 #define NULL ((void*)0)
18753 #endif
18754
18755 int main() {
18756
18757 #if DB_VERSION_MAJOR > 1
18758         {
18759                 char *version;
18760                 int major, minor, patch;
18761
18762                 version = db_version( &major, &minor, &patch );
18763
18764                 if( major != DB_VERSION_MAJOR ||
18765                         minor < DB_VERSION_MINOR )
18766                 {
18767                         printf("Berkeley DB version mismatch\n"
18768                                 "\texpected: %s\n\tgot: %s\n",
18769                                 DB_VERSION_STRING, version);
18770                         return 1;
18771                 }
18772         }
18773 #endif
18774
18775 #if DB_VERSION_MAJOR > 2
18776         db_env_create( NULL, 0 );
18777 #elif DB_VERSION_MAJOR > 1
18778         db_appexit( NULL );
18779 #else
18780         (void) dbopen( NULL, 0, 0, 0, NULL);
18781 #endif
18782
18783 ; return 0; }
18784 EOF
18785 if { (eval echo configure:18786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18786   rm -rf conftest*
18787   ol_cv_db_db_41=yes
18788 else
18789   echo "configure: failed program was:" >&5
18790   cat conftest.$ac_ext >&5
18791   rm -rf conftest*
18792   ol_cv_db_db_41=no
18793 fi
18794 rm -f conftest*
18795
18796         LIBS="$ol_LIBS"
18797
18798 fi
18799
18800 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18801
18802         if test $ol_cv_db_db_41 = yes ; then
18803                 ol_cv_lib_db=-ldb-41
18804         fi
18805 fi
18806
18807 if test $ol_cv_lib_db = no ; then
18808         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18809 echo "configure:18810: checking for Berkeley DB link (-ldb-4.1)" >&5
18810 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18811   echo $ac_n "(cached) $ac_c" 1>&6
18812 else
18813   
18814         ol_DB_LIB=-ldb-4.1
18815         ol_LIBS=$LIBS
18816         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18817
18818         cat > conftest.$ac_ext <<EOF
18819 #line 18820 "configure"
18820 #include "confdefs.h"
18821
18822 #ifdef HAVE_DB_185_H
18823 # include <db_185.h>
18824 #else
18825 # include <db.h>
18826 #endif
18827
18828 #ifndef DB_VERSION_MAJOR
18829 # define DB_VERSION_MAJOR 1
18830 #endif
18831
18832 #ifndef NULL
18833 #define NULL ((void*)0)
18834 #endif
18835
18836 int main() {
18837
18838 #if DB_VERSION_MAJOR > 1
18839         {
18840                 char *version;
18841                 int major, minor, patch;
18842
18843                 version = db_version( &major, &minor, &patch );
18844
18845                 if( major != DB_VERSION_MAJOR ||
18846                         minor < DB_VERSION_MINOR )
18847                 {
18848                         printf("Berkeley DB version mismatch\n"
18849                                 "\texpected: %s\n\tgot: %s\n",
18850                                 DB_VERSION_STRING, version);
18851                         return 1;
18852                 }
18853         }
18854 #endif
18855
18856 #if DB_VERSION_MAJOR > 2
18857         db_env_create( NULL, 0 );
18858 #elif DB_VERSION_MAJOR > 1
18859         db_appexit( NULL );
18860 #else
18861         (void) dbopen( NULL, 0, 0, 0, NULL);
18862 #endif
18863
18864 ; return 0; }
18865 EOF
18866 if { (eval echo configure:18867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18867   rm -rf conftest*
18868   ol_cv_db_db_4_dot_1=yes
18869 else
18870   echo "configure: failed program was:" >&5
18871   cat conftest.$ac_ext >&5
18872   rm -rf conftest*
18873   ol_cv_db_db_4_dot_1=no
18874 fi
18875 rm -f conftest*
18876
18877         LIBS="$ol_LIBS"
18878
18879 fi
18880
18881 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18882
18883         if test $ol_cv_db_db_4_dot_1 = yes ; then
18884                 ol_cv_lib_db=-ldb-4.1
18885         fi
18886 fi
18887
18888 if test $ol_cv_lib_db = no ; then
18889         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18890 echo "configure:18891: checking for Berkeley DB link (-ldb-4-1)" >&5
18891 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18892   echo $ac_n "(cached) $ac_c" 1>&6
18893 else
18894   
18895         ol_DB_LIB=-ldb-4-1
18896         ol_LIBS=$LIBS
18897         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18898
18899         cat > conftest.$ac_ext <<EOF
18900 #line 18901 "configure"
18901 #include "confdefs.h"
18902
18903 #ifdef HAVE_DB_185_H
18904 # include <db_185.h>
18905 #else
18906 # include <db.h>
18907 #endif
18908
18909 #ifndef DB_VERSION_MAJOR
18910 # define DB_VERSION_MAJOR 1
18911 #endif
18912
18913 #ifndef NULL
18914 #define NULL ((void*)0)
18915 #endif
18916
18917 int main() {
18918
18919 #if DB_VERSION_MAJOR > 1
18920         {
18921                 char *version;
18922                 int major, minor, patch;
18923
18924                 version = db_version( &major, &minor, &patch );
18925
18926                 if( major != DB_VERSION_MAJOR ||
18927                         minor < DB_VERSION_MINOR )
18928                 {
18929                         printf("Berkeley DB version mismatch\n"
18930                                 "\texpected: %s\n\tgot: %s\n",
18931                                 DB_VERSION_STRING, version);
18932                         return 1;
18933                 }
18934         }
18935 #endif
18936
18937 #if DB_VERSION_MAJOR > 2
18938         db_env_create( NULL, 0 );
18939 #elif DB_VERSION_MAJOR > 1
18940         db_appexit( NULL );
18941 #else
18942         (void) dbopen( NULL, 0, 0, 0, NULL);
18943 #endif
18944
18945 ; return 0; }
18946 EOF
18947 if { (eval echo configure:18948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18948   rm -rf conftest*
18949   ol_cv_db_db_4_1=yes
18950 else
18951   echo "configure: failed program was:" >&5
18952   cat conftest.$ac_ext >&5
18953   rm -rf conftest*
18954   ol_cv_db_db_4_1=no
18955 fi
18956 rm -f conftest*
18957
18958         LIBS="$ol_LIBS"
18959
18960 fi
18961
18962 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18963
18964         if test $ol_cv_db_db_4_1 = yes ; then
18965                 ol_cv_lib_db=-ldb-4-1
18966         fi
18967 fi
18968
18969 if test $ol_cv_lib_db = no ; then
18970         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18971 echo "configure:18972: checking for Berkeley DB link (-ldb3)" >&5
18972 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18973   echo $ac_n "(cached) $ac_c" 1>&6
18974 else
18975   
18976         ol_DB_LIB=-ldb3
18977         ol_LIBS=$LIBS
18978         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18979
18980         cat > conftest.$ac_ext <<EOF
18981 #line 18982 "configure"
18982 #include "confdefs.h"
18983
18984 #ifdef HAVE_DB_185_H
18985 # include <db_185.h>
18986 #else
18987 # include <db.h>
18988 #endif
18989
18990 #ifndef DB_VERSION_MAJOR
18991 # define DB_VERSION_MAJOR 1
18992 #endif
18993
18994 #ifndef NULL
18995 #define NULL ((void*)0)
18996 #endif
18997
18998 int main() {
18999
19000 #if DB_VERSION_MAJOR > 1
19001         {
19002                 char *version;
19003                 int major, minor, patch;
19004
19005                 version = db_version( &major, &minor, &patch );
19006
19007                 if( major != DB_VERSION_MAJOR ||
19008                         minor < DB_VERSION_MINOR )
19009                 {
19010                         printf("Berkeley DB version mismatch\n"
19011                                 "\texpected: %s\n\tgot: %s\n",
19012                                 DB_VERSION_STRING, version);
19013                         return 1;
19014                 }
19015         }
19016 #endif
19017
19018 #if DB_VERSION_MAJOR > 2
19019         db_env_create( NULL, 0 );
19020 #elif DB_VERSION_MAJOR > 1
19021         db_appexit( NULL );
19022 #else
19023         (void) dbopen( NULL, 0, 0, 0, NULL);
19024 #endif
19025
19026 ; return 0; }
19027 EOF
19028 if { (eval echo configure:19029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19029   rm -rf conftest*
19030   ol_cv_db_db3=yes
19031 else
19032   echo "configure: failed program was:" >&5
19033   cat conftest.$ac_ext >&5
19034   rm -rf conftest*
19035   ol_cv_db_db3=no
19036 fi
19037 rm -f conftest*
19038
19039         LIBS="$ol_LIBS"
19040
19041 fi
19042
19043 echo "$ac_t""$ol_cv_db_db3" 1>&6
19044
19045         if test $ol_cv_db_db3 = yes ; then
19046                 ol_cv_lib_db=-ldb3
19047         fi
19048 fi
19049
19050 if test $ol_cv_lib_db = no ; then
19051         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19052 echo "configure:19053: checking for Berkeley DB link (-ldb-3)" >&5
19053 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19054   echo $ac_n "(cached) $ac_c" 1>&6
19055 else
19056   
19057         ol_DB_LIB=-ldb-3
19058         ol_LIBS=$LIBS
19059         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19060
19061         cat > conftest.$ac_ext <<EOF
19062 #line 19063 "configure"
19063 #include "confdefs.h"
19064
19065 #ifdef HAVE_DB_185_H
19066 # include <db_185.h>
19067 #else
19068 # include <db.h>
19069 #endif
19070
19071 #ifndef DB_VERSION_MAJOR
19072 # define DB_VERSION_MAJOR 1
19073 #endif
19074
19075 #ifndef NULL
19076 #define NULL ((void*)0)
19077 #endif
19078
19079 int main() {
19080
19081 #if DB_VERSION_MAJOR > 1
19082         {
19083                 char *version;
19084                 int major, minor, patch;
19085
19086                 version = db_version( &major, &minor, &patch );
19087
19088                 if( major != DB_VERSION_MAJOR ||
19089                         minor < DB_VERSION_MINOR )
19090                 {
19091                         printf("Berkeley DB version mismatch\n"
19092                                 "\texpected: %s\n\tgot: %s\n",
19093                                 DB_VERSION_STRING, version);
19094                         return 1;
19095                 }
19096         }
19097 #endif
19098
19099 #if DB_VERSION_MAJOR > 2
19100         db_env_create( NULL, 0 );
19101 #elif DB_VERSION_MAJOR > 1
19102         db_appexit( NULL );
19103 #else
19104         (void) dbopen( NULL, 0, 0, 0, NULL);
19105 #endif
19106
19107 ; return 0; }
19108 EOF
19109 if { (eval echo configure:19110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19110   rm -rf conftest*
19111   ol_cv_db_db_3=yes
19112 else
19113   echo "configure: failed program was:" >&5
19114   cat conftest.$ac_ext >&5
19115   rm -rf conftest*
19116   ol_cv_db_db_3=no
19117 fi
19118 rm -f conftest*
19119
19120         LIBS="$ol_LIBS"
19121
19122 fi
19123
19124 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19125
19126         if test $ol_cv_db_db_3 = yes ; then
19127                 ol_cv_lib_db=-ldb-3
19128         fi
19129 fi
19130
19131 if test $ol_cv_lib_db = no ; then
19132         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19133 echo "configure:19134: checking for Berkeley DB link (-ldb2)" >&5
19134 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19135   echo $ac_n "(cached) $ac_c" 1>&6
19136 else
19137   
19138         ol_DB_LIB=-ldb2
19139         ol_LIBS=$LIBS
19140         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19141
19142         cat > conftest.$ac_ext <<EOF
19143 #line 19144 "configure"
19144 #include "confdefs.h"
19145
19146 #ifdef HAVE_DB_185_H
19147 # include <db_185.h>
19148 #else
19149 # include <db.h>
19150 #endif
19151
19152 #ifndef DB_VERSION_MAJOR
19153 # define DB_VERSION_MAJOR 1
19154 #endif
19155
19156 #ifndef NULL
19157 #define NULL ((void*)0)
19158 #endif
19159
19160 int main() {
19161
19162 #if DB_VERSION_MAJOR > 1
19163         {
19164                 char *version;
19165                 int major, minor, patch;
19166
19167                 version = db_version( &major, &minor, &patch );
19168
19169                 if( major != DB_VERSION_MAJOR ||
19170                         minor < DB_VERSION_MINOR )
19171                 {
19172                         printf("Berkeley DB version mismatch\n"
19173                                 "\texpected: %s\n\tgot: %s\n",
19174                                 DB_VERSION_STRING, version);
19175                         return 1;
19176                 }
19177         }
19178 #endif
19179
19180 #if DB_VERSION_MAJOR > 2
19181         db_env_create( NULL, 0 );
19182 #elif DB_VERSION_MAJOR > 1
19183         db_appexit( NULL );
19184 #else
19185         (void) dbopen( NULL, 0, 0, 0, NULL);
19186 #endif
19187
19188 ; return 0; }
19189 EOF
19190 if { (eval echo configure:19191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19191   rm -rf conftest*
19192   ol_cv_db_db2=yes
19193 else
19194   echo "configure: failed program was:" >&5
19195   cat conftest.$ac_ext >&5
19196   rm -rf conftest*
19197   ol_cv_db_db2=no
19198 fi
19199 rm -f conftest*
19200
19201         LIBS="$ol_LIBS"
19202
19203 fi
19204
19205 echo "$ac_t""$ol_cv_db_db2" 1>&6
19206
19207         if test $ol_cv_db_db2 = yes ; then
19208                 ol_cv_lib_db=-ldb2
19209         fi
19210 fi
19211
19212 if test $ol_cv_lib_db = no ; then
19213         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19214 echo "configure:19215: checking for Berkeley DB link (-ldb-2)" >&5
19215 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19216   echo $ac_n "(cached) $ac_c" 1>&6
19217 else
19218   
19219         ol_DB_LIB=-ldb-2
19220         ol_LIBS=$LIBS
19221         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19222
19223         cat > conftest.$ac_ext <<EOF
19224 #line 19225 "configure"
19225 #include "confdefs.h"
19226
19227 #ifdef HAVE_DB_185_H
19228 # include <db_185.h>
19229 #else
19230 # include <db.h>
19231 #endif
19232
19233 #ifndef DB_VERSION_MAJOR
19234 # define DB_VERSION_MAJOR 1
19235 #endif
19236
19237 #ifndef NULL
19238 #define NULL ((void*)0)
19239 #endif
19240
19241 int main() {
19242
19243 #if DB_VERSION_MAJOR > 1
19244         {
19245                 char *version;
19246                 int major, minor, patch;
19247
19248                 version = db_version( &major, &minor, &patch );
19249
19250                 if( major != DB_VERSION_MAJOR ||
19251                         minor < DB_VERSION_MINOR )
19252                 {
19253                         printf("Berkeley DB version mismatch\n"
19254                                 "\texpected: %s\n\tgot: %s\n",
19255                                 DB_VERSION_STRING, version);
19256                         return 1;
19257                 }
19258         }
19259 #endif
19260
19261 #if DB_VERSION_MAJOR > 2
19262         db_env_create( NULL, 0 );
19263 #elif DB_VERSION_MAJOR > 1
19264         db_appexit( NULL );
19265 #else
19266         (void) dbopen( NULL, 0, 0, 0, NULL);
19267 #endif
19268
19269 ; return 0; }
19270 EOF
19271 if { (eval echo configure:19272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19272   rm -rf conftest*
19273   ol_cv_db_db_2=yes
19274 else
19275   echo "configure: failed program was:" >&5
19276   cat conftest.$ac_ext >&5
19277   rm -rf conftest*
19278   ol_cv_db_db_2=no
19279 fi
19280 rm -f conftest*
19281
19282         LIBS="$ol_LIBS"
19283
19284 fi
19285
19286 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19287
19288         if test $ol_cv_db_db_2 = yes ; then
19289                 ol_cv_lib_db=-ldb-2
19290         fi
19291 fi
19292
19293 if test $ol_cv_lib_db = no ; then
19294         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19295 echo "configure:19296: checking for Berkeley DB link (-ldb1)" >&5
19296 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19297   echo $ac_n "(cached) $ac_c" 1>&6
19298 else
19299   
19300         ol_DB_LIB=-ldb1
19301         ol_LIBS=$LIBS
19302         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19303
19304         cat > conftest.$ac_ext <<EOF
19305 #line 19306 "configure"
19306 #include "confdefs.h"
19307
19308 #ifdef HAVE_DB_185_H
19309 # include <db_185.h>
19310 #else
19311 # include <db.h>
19312 #endif
19313
19314 #ifndef DB_VERSION_MAJOR
19315 # define DB_VERSION_MAJOR 1
19316 #endif
19317
19318 #ifndef NULL
19319 #define NULL ((void*)0)
19320 #endif
19321
19322 int main() {
19323
19324 #if DB_VERSION_MAJOR > 1
19325         {
19326                 char *version;
19327                 int major, minor, patch;
19328
19329                 version = db_version( &major, &minor, &patch );
19330
19331                 if( major != DB_VERSION_MAJOR ||
19332                         minor < DB_VERSION_MINOR )
19333                 {
19334                         printf("Berkeley DB version mismatch\n"
19335                                 "\texpected: %s\n\tgot: %s\n",
19336                                 DB_VERSION_STRING, version);
19337                         return 1;
19338                 }
19339         }
19340 #endif
19341
19342 #if DB_VERSION_MAJOR > 2
19343         db_env_create( NULL, 0 );
19344 #elif DB_VERSION_MAJOR > 1
19345         db_appexit( NULL );
19346 #else
19347         (void) dbopen( NULL, 0, 0, 0, NULL);
19348 #endif
19349
19350 ; return 0; }
19351 EOF
19352 if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19353   rm -rf conftest*
19354   ol_cv_db_db1=yes
19355 else
19356   echo "configure: failed program was:" >&5
19357   cat conftest.$ac_ext >&5
19358   rm -rf conftest*
19359   ol_cv_db_db1=no
19360 fi
19361 rm -f conftest*
19362
19363         LIBS="$ol_LIBS"
19364
19365 fi
19366
19367 echo "$ac_t""$ol_cv_db_db1" 1>&6
19368
19369         if test $ol_cv_db_db1 = yes ; then
19370                 ol_cv_lib_db=-ldb1
19371         fi
19372 fi
19373
19374 if test $ol_cv_lib_db = no ; then
19375         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19376 echo "configure:19377: checking for Berkeley DB link (-ldb-1)" >&5
19377 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19378   echo $ac_n "(cached) $ac_c" 1>&6
19379 else
19380   
19381         ol_DB_LIB=-ldb-1
19382         ol_LIBS=$LIBS
19383         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19384
19385         cat > conftest.$ac_ext <<EOF
19386 #line 19387 "configure"
19387 #include "confdefs.h"
19388
19389 #ifdef HAVE_DB_185_H
19390 # include <db_185.h>
19391 #else
19392 # include <db.h>
19393 #endif
19394
19395 #ifndef DB_VERSION_MAJOR
19396 # define DB_VERSION_MAJOR 1
19397 #endif
19398
19399 #ifndef NULL
19400 #define NULL ((void*)0)
19401 #endif
19402
19403 int main() {
19404
19405 #if DB_VERSION_MAJOR > 1
19406         {
19407                 char *version;
19408                 int major, minor, patch;
19409
19410                 version = db_version( &major, &minor, &patch );
19411
19412                 if( major != DB_VERSION_MAJOR ||
19413                         minor < DB_VERSION_MINOR )
19414                 {
19415                         printf("Berkeley DB version mismatch\n"
19416                                 "\texpected: %s\n\tgot: %s\n",
19417                                 DB_VERSION_STRING, version);
19418                         return 1;
19419                 }
19420         }
19421 #endif
19422
19423 #if DB_VERSION_MAJOR > 2
19424         db_env_create( NULL, 0 );
19425 #elif DB_VERSION_MAJOR > 1
19426         db_appexit( NULL );
19427 #else
19428         (void) dbopen( NULL, 0, 0, 0, NULL);
19429 #endif
19430
19431 ; return 0; }
19432 EOF
19433 if { (eval echo configure:19434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19434   rm -rf conftest*
19435   ol_cv_db_db_1=yes
19436 else
19437   echo "configure: failed program was:" >&5
19438   cat conftest.$ac_ext >&5
19439   rm -rf conftest*
19440   ol_cv_db_db_1=no
19441 fi
19442 rm -f conftest*
19443
19444         LIBS="$ol_LIBS"
19445
19446 fi
19447
19448 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19449
19450         if test $ol_cv_db_db_1 = yes ; then
19451                 ol_cv_lib_db=-ldb-1
19452         fi
19453 fi
19454
19455
19456         if test "$ol_cv_lib_db" != no ; then
19457                 ol_cv_berkeley_db=yes
19458                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19459 echo "configure:19460: checking for Berkeley DB thread support" >&5
19460 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19461   echo $ac_n "(cached) $ac_c" 1>&6
19462 else
19463   
19464         ol_LIBS="$LIBS"
19465         LIBS="$LTHREAD_LIBS $LIBS"
19466         if test $ol_cv_lib_db != yes ; then
19467                 LIBS="$ol_cv_lib_db $LIBS"
19468         fi
19469
19470         if test "$cross_compiling" = yes; then
19471   ol_cv_berkeley_db_thread=cross
19472 else
19473   cat > conftest.$ac_ext <<EOF
19474 #line 19475 "configure"
19475 #include "confdefs.h"
19476
19477 #ifdef HAVE_DB_185_H
19478         choke me;
19479 #else
19480 #include <db.h>
19481 #endif
19482 #ifndef NULL
19483 #define NULL ((void *)0)
19484 #endif
19485 main()
19486 {
19487         int rc;
19488         u_int32_t flags = DB_CREATE |
19489 #ifdef DB_PRIVATE
19490                 DB_PRIVATE |
19491 #endif
19492                 DB_THREAD;
19493
19494 #if DB_VERSION_MAJOR > 2
19495         DB_ENV *env = NULL;
19496
19497         rc = db_env_create( &env, 0 );
19498
19499         flags |= DB_INIT_MPOOL;
19500 #ifdef DB_MPOOL_PRIVATE
19501         flags |= DB_MPOOL_PRIVATE;
19502 #endif
19503
19504         if( rc ) {
19505                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19506                 return rc;
19507         }
19508
19509 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19510         rc = env->open( env, NULL, flags, 0 );
19511 #else
19512         rc = env->open( env, NULL, NULL, flags, 0 );
19513 #endif
19514
19515         if ( rc == 0 ) {
19516                 rc = env->close( env, 0 );
19517         }
19518
19519         if( rc ) {
19520                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19521                 return rc;
19522         }
19523
19524 #else
19525         DB_ENV env;
19526         memset( &env, '\0', sizeof(env) );
19527
19528         rc = db_appinit( NULL, NULL, &env, flags );
19529
19530         if( rc == 0 ) {
19531                 db_appexit( &env );
19532         }
19533
19534         unlink("__db_mpool.share");
19535         unlink("__db_lock.share");
19536 #endif
19537
19538         return rc;
19539 }
19540 EOF
19541 if { (eval echo configure:19542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19542 then
19543   ol_cv_berkeley_db_thread=yes
19544 else
19545   echo "configure: failed program was:" >&5
19546   cat conftest.$ac_ext >&5
19547   rm -fr conftest*
19548   ol_cv_berkeley_db_thread=no
19549 fi
19550 rm -fr conftest*
19551 fi
19552
19553
19554         LIBS="$ol_LIBS"
19555
19556 fi
19557
19558 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19559
19560         if test $ol_cv_berkeley_db_thread != no ; then
19561                 cat >> confdefs.h <<\EOF
19562 #define HAVE_BERKELEY_DB_THREAD 1
19563 EOF
19564
19565         fi
19566
19567         fi
19568 fi
19569
19570         fi
19571
19572         if test $ol_cv_berkeley_db != no ; then
19573                 cat >> confdefs.h <<\EOF
19574 #define HAVE_BERKELEY_DB 1
19575 EOF
19576
19577
19578                 ol_link_ldbm=berkeley
19579                 ol_with_ldbm_api=berkeley
19580
19581                 if test $ol_with_ldbm_type = hash ; then
19582                         cat >> confdefs.h <<\EOF
19583 #define LDBM_USE_DBHASH 1
19584 EOF
19585
19586                 else
19587                         cat >> confdefs.h <<\EOF
19588 #define LDBM_USE_DBBTREE 1
19589 EOF
19590
19591                 fi
19592
19593                                                 if test $ol_cv_lib_db != yes ; then
19594                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19595                 fi
19596         fi
19597 fi
19598
19599 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19600         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19601 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19602         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19603 echo "configure:19604: checking Berkeley DB version for BDB backend" >&5
19604 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19605   echo $ac_n "(cached) $ac_c" 1>&6
19606 else
19607   
19608         cat > conftest.$ac_ext <<EOF
19609 #line 19610 "configure"
19610 #include "confdefs.h"
19611
19612 #include <db.h>
19613
19614  /* this check could be improved */
19615 #ifndef DB_VERSION_MAJOR
19616 #       define DB_VERSION_MAJOR 1
19617 #endif
19618 #ifndef DB_VERSION_MINOR
19619 #       define DB_VERSION_MINOR 0
19620 #endif
19621
19622 /* require 4.2 or later */
19623 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19624         __db_version_compat
19625 #endif
19626         
19627 EOF
19628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19629   egrep "__db_version_compat" >/dev/null 2>&1; then
19630   rm -rf conftest*
19631   ol_cv_bdb_compat=yes
19632 else
19633   rm -rf conftest*
19634   ol_cv_bdb_compat=no
19635 fi
19636 rm -f conftest*
19637
19638 fi
19639
19640 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19641
19642
19643         if test $ol_cv_bdb_compat = yes ; then
19644                 ol_enable_bdb=yes
19645         elif test $ol_enable_bdb = yes ; then
19646                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19647         else
19648                 ol_enable_bdb=no
19649         fi
19650 fi
19651 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19652         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19653 fi
19654
19655 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19656         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19657         ol_with_ldbm_api=none
19658 fi
19659
19660 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19661         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19662 echo "configure:19663: checking for MDBM library" >&5
19663 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19664   echo $ac_n "(cached) $ac_c" 1>&6
19665 else
19666         ol_LIBS="$LIBS"
19667         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19668 echo "configure:19669: checking for mdbm_set_chain" >&5
19669 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19670   echo $ac_n "(cached) $ac_c" 1>&6
19671 else
19672   cat > conftest.$ac_ext <<EOF
19673 #line 19674 "configure"
19674 #include "confdefs.h"
19675 /* System header to define __stub macros and hopefully few prototypes,
19676     which can conflict with char mdbm_set_chain(); below.  */
19677 #include <assert.h>
19678 /* Override any gcc2 internal prototype to avoid an error.  */
19679 /* We use char because int might match the return type of a gcc2
19680     builtin and then its argument prototype would still apply.  */
19681 char mdbm_set_chain();
19682 char (*f)();
19683
19684 int main() {
19685
19686 /* The GNU C library defines this for functions which it implements
19687     to always fail with ENOSYS.  Some functions are actually named
19688     something starting with __ and the normal name is an alias.  */
19689 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19690 choke me
19691 #else
19692 f = mdbm_set_chain;
19693 #endif
19694
19695 ; return 0; }
19696 EOF
19697 if { (eval echo configure:19698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19698   rm -rf conftest*
19699   eval "ac_cv_func_mdbm_set_chain=yes"
19700 else
19701   echo "configure: failed program was:" >&5
19702   cat conftest.$ac_ext >&5
19703   rm -rf conftest*
19704   eval "ac_cv_func_mdbm_set_chain=no"
19705 fi
19706 rm -f conftest*
19707 fi
19708
19709 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19710   echo "$ac_t""yes" 1>&6
19711   ol_cv_lib_mdbm=yes
19712 else
19713   echo "$ac_t""no" 1>&6
19714
19715                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19716 echo "configure:19717: checking for mdbm_set_chain in -lmdbm" >&5
19717 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19719   echo $ac_n "(cached) $ac_c" 1>&6
19720 else
19721   ac_save_LIBS="$LIBS"
19722 LIBS="-lmdbm  $LIBS"
19723 cat > conftest.$ac_ext <<EOF
19724 #line 19725 "configure"
19725 #include "confdefs.h"
19726 /* Override any gcc2 internal prototype to avoid an error.  */
19727 /* We use char because int might match the return type of a gcc2
19728     builtin and then its argument prototype would still apply.  */
19729 char mdbm_set_chain();
19730
19731 int main() {
19732 mdbm_set_chain()
19733 ; return 0; }
19734 EOF
19735 if { (eval echo configure:19736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19736   rm -rf conftest*
19737   eval "ac_cv_lib_$ac_lib_var=yes"
19738 else
19739   echo "configure: failed program was:" >&5
19740   cat conftest.$ac_ext >&5
19741   rm -rf conftest*
19742   eval "ac_cv_lib_$ac_lib_var=no"
19743 fi
19744 rm -f conftest*
19745 LIBS="$ac_save_LIBS"
19746
19747 fi
19748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19749   echo "$ac_t""yes" 1>&6
19750   ol_cv_lib_mdbm=-lmdbm
19751 else
19752   echo "$ac_t""no" 1>&6
19753 ol_cv_lib_mdbm=no
19754 fi
19755
19756         
19757 fi
19758
19759         LIBS="$ol_LIBS"
19760
19761 fi
19762
19763 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19764
19765
19766  for ac_hdr in mdbm.h
19767 do
19768 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19769 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19770 echo "configure:19771: checking for $ac_hdr" >&5
19771 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19772   echo $ac_n "(cached) $ac_c" 1>&6
19773 else
19774   cat > conftest.$ac_ext <<EOF
19775 #line 19776 "configure"
19776 #include "confdefs.h"
19777 #include <$ac_hdr>
19778 EOF
19779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19780 { (eval echo configure:19781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19782 if test -z "$ac_err"; then
19783   rm -rf conftest*
19784   eval "ac_cv_header_$ac_safe=yes"
19785 else
19786   echo "$ac_err" >&5
19787   echo "configure: failed program was:" >&5
19788   cat conftest.$ac_ext >&5
19789   rm -rf conftest*
19790   eval "ac_cv_header_$ac_safe=no"
19791 fi
19792 rm -f conftest*
19793 fi
19794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19795   echo "$ac_t""yes" 1>&6
19796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19797   cat >> confdefs.h <<EOF
19798 #define $ac_tr_hdr 1
19799 EOF
19800  
19801 else
19802   echo "$ac_t""no" 1>&6
19803 fi
19804 done
19805
19806  echo $ac_n "checking for db""... $ac_c" 1>&6
19807 echo "configure:19808: checking for db" >&5
19808 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19809   echo $ac_n "(cached) $ac_c" 1>&6
19810 else
19811   
19812         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19813                 ol_cv_mdbm=no
19814         else
19815                 ol_cv_mdbm=yes
19816         fi
19817
19818 fi
19819
19820 echo "$ac_t""$ol_cv_mdbm" 1>&6
19821  if test $ol_cv_mdbm = yes ; then
19822         cat >> confdefs.h <<\EOF
19823 #define HAVE_MDBM 1
19824 EOF
19825
19826  fi
19827
19828
19829         if test $ol_cv_mdbm = yes ; then
19830                 ol_link_ldbm=mdbm
19831                 ol_with_ldbm_api=mdbm
19832                 if test $ol_cv_lib_mdbm != yes ; then
19833                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19834                 fi
19835         fi
19836 fi
19837
19838 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19839         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19840 echo "configure:19841: checking for GDBM library" >&5
19841 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19842   echo $ac_n "(cached) $ac_c" 1>&6
19843 else
19844         ol_LIBS="$LIBS"
19845         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19846 echo "configure:19847: checking for gdbm_open" >&5
19847 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19848   echo $ac_n "(cached) $ac_c" 1>&6
19849 else
19850   cat > conftest.$ac_ext <<EOF
19851 #line 19852 "configure"
19852 #include "confdefs.h"
19853 /* System header to define __stub macros and hopefully few prototypes,
19854     which can conflict with char gdbm_open(); below.  */
19855 #include <assert.h>
19856 /* Override any gcc2 internal prototype to avoid an error.  */
19857 /* We use char because int might match the return type of a gcc2
19858     builtin and then its argument prototype would still apply.  */
19859 char gdbm_open();
19860 char (*f)();
19861
19862 int main() {
19863
19864 /* The GNU C library defines this for functions which it implements
19865     to always fail with ENOSYS.  Some functions are actually named
19866     something starting with __ and the normal name is an alias.  */
19867 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19868 choke me
19869 #else
19870 f = gdbm_open;
19871 #endif
19872
19873 ; return 0; }
19874 EOF
19875 if { (eval echo configure:19876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19876   rm -rf conftest*
19877   eval "ac_cv_func_gdbm_open=yes"
19878 else
19879   echo "configure: failed program was:" >&5
19880   cat conftest.$ac_ext >&5
19881   rm -rf conftest*
19882   eval "ac_cv_func_gdbm_open=no"
19883 fi
19884 rm -f conftest*
19885 fi
19886
19887 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19888   echo "$ac_t""yes" 1>&6
19889   ol_cv_lib_gdbm=yes
19890 else
19891   echo "$ac_t""no" 1>&6
19892
19893                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19894 echo "configure:19895: checking for gdbm_open in -lgdbm" >&5
19895 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19897   echo $ac_n "(cached) $ac_c" 1>&6
19898 else
19899   ac_save_LIBS="$LIBS"
19900 LIBS="-lgdbm  $LIBS"
19901 cat > conftest.$ac_ext <<EOF
19902 #line 19903 "configure"
19903 #include "confdefs.h"
19904 /* Override any gcc2 internal prototype to avoid an error.  */
19905 /* We use char because int might match the return type of a gcc2
19906     builtin and then its argument prototype would still apply.  */
19907 char gdbm_open();
19908
19909 int main() {
19910 gdbm_open()
19911 ; return 0; }
19912 EOF
19913 if { (eval echo configure:19914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19914   rm -rf conftest*
19915   eval "ac_cv_lib_$ac_lib_var=yes"
19916 else
19917   echo "configure: failed program was:" >&5
19918   cat conftest.$ac_ext >&5
19919   rm -rf conftest*
19920   eval "ac_cv_lib_$ac_lib_var=no"
19921 fi
19922 rm -f conftest*
19923 LIBS="$ac_save_LIBS"
19924
19925 fi
19926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19927   echo "$ac_t""yes" 1>&6
19928   ol_cv_lib_gdbm=-lgdbm
19929 else
19930   echo "$ac_t""no" 1>&6
19931 ol_cv_lib_gdbm=no
19932 fi
19933
19934         
19935 fi
19936
19937         LIBS="$ol_LIBS"
19938
19939 fi
19940
19941 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19942
19943
19944  for ac_hdr in gdbm.h
19945 do
19946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19948 echo "configure:19949: checking for $ac_hdr" >&5
19949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19950   echo $ac_n "(cached) $ac_c" 1>&6
19951 else
19952   cat > conftest.$ac_ext <<EOF
19953 #line 19954 "configure"
19954 #include "confdefs.h"
19955 #include <$ac_hdr>
19956 EOF
19957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19958 { (eval echo configure:19959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19960 if test -z "$ac_err"; then
19961   rm -rf conftest*
19962   eval "ac_cv_header_$ac_safe=yes"
19963 else
19964   echo "$ac_err" >&5
19965   echo "configure: failed program was:" >&5
19966   cat conftest.$ac_ext >&5
19967   rm -rf conftest*
19968   eval "ac_cv_header_$ac_safe=no"
19969 fi
19970 rm -f conftest*
19971 fi
19972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19973   echo "$ac_t""yes" 1>&6
19974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19975   cat >> confdefs.h <<EOF
19976 #define $ac_tr_hdr 1
19977 EOF
19978  
19979 else
19980   echo "$ac_t""no" 1>&6
19981 fi
19982 done
19983
19984  echo $ac_n "checking for db""... $ac_c" 1>&6
19985 echo "configure:19986: checking for db" >&5
19986 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19987   echo $ac_n "(cached) $ac_c" 1>&6
19988 else
19989   
19990         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19991                 ol_cv_gdbm=no
19992         else
19993                 ol_cv_gdbm=yes
19994         fi
19995
19996 fi
19997
19998 echo "$ac_t""$ol_cv_gdbm" 1>&6
19999  if test $ol_cv_gdbm = yes ; then
20000         cat >> confdefs.h <<\EOF
20001 #define HAVE_GDBM 1
20002 EOF
20003
20004  fi
20005
20006
20007         if test $ol_cv_gdbm = yes ; then
20008                 ol_link_ldbm=gdbm
20009                 ol_with_ldbm_api=gdbm
20010
20011                 if test $ol_cv_lib_gdbm != yes ; then
20012                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20013                 fi
20014         fi
20015 fi
20016
20017 if test $ol_with_ldbm_api = ndbm ; then
20018         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20019 echo "configure:20020: checking for NDBM library" >&5
20020 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20021   echo $ac_n "(cached) $ac_c" 1>&6
20022 else
20023         ol_LIBS="$LIBS"
20024         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20025 echo "configure:20026: checking for dbm_open" >&5
20026 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20027   echo $ac_n "(cached) $ac_c" 1>&6
20028 else
20029   cat > conftest.$ac_ext <<EOF
20030 #line 20031 "configure"
20031 #include "confdefs.h"
20032 /* System header to define __stub macros and hopefully few prototypes,
20033     which can conflict with char dbm_open(); below.  */
20034 #include <assert.h>
20035 /* Override any gcc2 internal prototype to avoid an error.  */
20036 /* We use char because int might match the return type of a gcc2
20037     builtin and then its argument prototype would still apply.  */
20038 char dbm_open();
20039 char (*f)();
20040
20041 int main() {
20042
20043 /* The GNU C library defines this for functions which it implements
20044     to always fail with ENOSYS.  Some functions are actually named
20045     something starting with __ and the normal name is an alias.  */
20046 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20047 choke me
20048 #else
20049 f = dbm_open;
20050 #endif
20051
20052 ; return 0; }
20053 EOF
20054 if { (eval echo configure:20055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20055   rm -rf conftest*
20056   eval "ac_cv_func_dbm_open=yes"
20057 else
20058   echo "configure: failed program was:" >&5
20059   cat conftest.$ac_ext >&5
20060   rm -rf conftest*
20061   eval "ac_cv_func_dbm_open=no"
20062 fi
20063 rm -f conftest*
20064 fi
20065
20066 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20067   echo "$ac_t""yes" 1>&6
20068   ol_cv_lib_ndbm=yes
20069 else
20070   echo "$ac_t""no" 1>&6
20071
20072                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20073 echo "configure:20074: checking for dbm_open in -lndbm" >&5
20074 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20075 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20076   echo $ac_n "(cached) $ac_c" 1>&6
20077 else
20078   ac_save_LIBS="$LIBS"
20079 LIBS="-lndbm  $LIBS"
20080 cat > conftest.$ac_ext <<EOF
20081 #line 20082 "configure"
20082 #include "confdefs.h"
20083 /* Override any gcc2 internal prototype to avoid an error.  */
20084 /* We use char because int might match the return type of a gcc2
20085     builtin and then its argument prototype would still apply.  */
20086 char dbm_open();
20087
20088 int main() {
20089 dbm_open()
20090 ; return 0; }
20091 EOF
20092 if { (eval echo configure:20093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20093   rm -rf conftest*
20094   eval "ac_cv_lib_$ac_lib_var=yes"
20095 else
20096   echo "configure: failed program was:" >&5
20097   cat conftest.$ac_ext >&5
20098   rm -rf conftest*
20099   eval "ac_cv_lib_$ac_lib_var=no"
20100 fi
20101 rm -f conftest*
20102 LIBS="$ac_save_LIBS"
20103
20104 fi
20105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20106   echo "$ac_t""yes" 1>&6
20107   ol_cv_lib_ndbm=-lndbm
20108 else
20109   echo "$ac_t""no" 1>&6
20110
20111                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20112 echo "configure:20113: checking for dbm_open in -ldbm" >&5
20113 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20115   echo $ac_n "(cached) $ac_c" 1>&6
20116 else
20117   ac_save_LIBS="$LIBS"
20118 LIBS="-ldbm  $LIBS"
20119 cat > conftest.$ac_ext <<EOF
20120 #line 20121 "configure"
20121 #include "confdefs.h"
20122 /* Override any gcc2 internal prototype to avoid an error.  */
20123 /* We use char because int might match the return type of a gcc2
20124     builtin and then its argument prototype would still apply.  */
20125 char dbm_open();
20126
20127 int main() {
20128 dbm_open()
20129 ; return 0; }
20130 EOF
20131 if { (eval echo configure:20132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20132   rm -rf conftest*
20133   eval "ac_cv_lib_$ac_lib_var=yes"
20134 else
20135   echo "configure: failed program was:" >&5
20136   cat conftest.$ac_ext >&5
20137   rm -rf conftest*
20138   eval "ac_cv_lib_$ac_lib_var=no"
20139 fi
20140 rm -f conftest*
20141 LIBS="$ac_save_LIBS"
20142
20143 fi
20144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20145   echo "$ac_t""yes" 1>&6
20146   ol_cv_lib_ndbm=-ldbm
20147 else
20148   echo "$ac_t""no" 1>&6
20149 ol_cv_lib_ndbm=no
20150 fi
20151                 
20152 fi
20153
20154         
20155 fi
20156
20157         LIBS="$ol_LIBS"
20158
20159 fi
20160
20161 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20162
20163
20164  for ac_hdr in ndbm.h
20165 do
20166 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20167 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20168 echo "configure:20169: checking for $ac_hdr" >&5
20169 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20170   echo $ac_n "(cached) $ac_c" 1>&6
20171 else
20172   cat > conftest.$ac_ext <<EOF
20173 #line 20174 "configure"
20174 #include "confdefs.h"
20175 #include <$ac_hdr>
20176 EOF
20177 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20178 { (eval echo configure:20179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20179 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20180 if test -z "$ac_err"; then
20181   rm -rf conftest*
20182   eval "ac_cv_header_$ac_safe=yes"
20183 else
20184   echo "$ac_err" >&5
20185   echo "configure: failed program was:" >&5
20186   cat conftest.$ac_ext >&5
20187   rm -rf conftest*
20188   eval "ac_cv_header_$ac_safe=no"
20189 fi
20190 rm -f conftest*
20191 fi
20192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20193   echo "$ac_t""yes" 1>&6
20194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20195   cat >> confdefs.h <<EOF
20196 #define $ac_tr_hdr 1
20197 EOF
20198  
20199 else
20200   echo "$ac_t""no" 1>&6
20201 fi
20202 done
20203
20204  echo $ac_n "checking for db""... $ac_c" 1>&6
20205 echo "configure:20206: checking for db" >&5
20206 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20207   echo $ac_n "(cached) $ac_c" 1>&6
20208 else
20209   
20210         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20211                 ol_cv_ndbm=no
20212         else
20213                 ol_cv_ndbm=yes
20214         fi
20215
20216 fi
20217
20218 echo "$ac_t""$ol_cv_ndbm" 1>&6
20219  if test $ol_cv_ndbm = yes ; then
20220         cat >> confdefs.h <<\EOF
20221 #define HAVE_NDBM 1
20222 EOF
20223
20224  fi
20225
20226
20227         if test $ol_cv_ndbm = yes ; then
20228                 ol_link_ldbm=ndbm
20229                 ol_with_ldbm_api=ndbm
20230
20231                 if test $ol_cv_lib_ndbm != yes ; then
20232                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20233                 fi
20234         fi
20235 fi
20236
20237 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20238         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20239         if test $ol_enable_ldbm = yes ; then
20240                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20241         fi
20242
20243         echo "configure: warning: disabling LDBM" 1>&2
20244         ol_enable_ldbm=no
20245 fi
20246
20247
20248 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20249         BUILD_LIBS_DYNAMIC=shared
20250         cat >> confdefs.h <<\EOF
20251 #define LDAP_LIBS_DYNAMIC 1
20252 EOF
20253
20254         LTSTATIC=""
20255 else
20256         BUILD_LIBS_DYNAMIC=static
20257         LTSTATIC="-static"
20258 fi
20259
20260 if test $ol_enable_wrappers != no ; then
20261         for ac_hdr in tcpd.h
20262 do
20263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20265 echo "configure:20266: checking for $ac_hdr" >&5
20266 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20267   echo $ac_n "(cached) $ac_c" 1>&6
20268 else
20269   cat > conftest.$ac_ext <<EOF
20270 #line 20271 "configure"
20271 #include "confdefs.h"
20272 #include <$ac_hdr>
20273 EOF
20274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20275 { (eval echo configure:20276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20277 if test -z "$ac_err"; then
20278   rm -rf conftest*
20279   eval "ac_cv_header_$ac_safe=yes"
20280 else
20281   echo "$ac_err" >&5
20282   echo "configure: failed program was:" >&5
20283   cat conftest.$ac_ext >&5
20284   rm -rf conftest*
20285   eval "ac_cv_header_$ac_safe=no"
20286 fi
20287 rm -f conftest*
20288 fi
20289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20290   echo "$ac_t""yes" 1>&6
20291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20292   cat >> confdefs.h <<EOF
20293 #define $ac_tr_hdr 1
20294 EOF
20295  
20296                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20297 echo "configure:20298: checking for TCP wrappers library" >&5
20298                 save_LIBS="$LIBS"
20299                 LIBS="$LIBS -lwrap"
20300                 cat > conftest.$ac_ext <<EOF
20301 #line 20302 "configure"
20302 #include "confdefs.h"
20303
20304 #include <tcpd.h>
20305 int allow_severity = 0;
20306 int deny_severity  = 0;
20307
20308 struct request_info *req;
20309                 
20310 int main() {
20311
20312 hosts_access(req)
20313                 
20314 ; return 0; }
20315 EOF
20316 if { (eval echo configure:20317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20317   rm -rf conftest*
20318   echo "$ac_t""-lwrap" 1>&6
20319                 have_wrappers=yes
20320                 LIBS="$save_LIBS"
20321 else
20322   echo "configure: failed program was:" >&5
20323   cat conftest.$ac_ext >&5
20324   rm -rf conftest*
20325   
20326                                 LIBS="$LIBS -lnsl"
20327                 cat > conftest.$ac_ext <<EOF
20328 #line 20329 "configure"
20329 #include "confdefs.h"
20330
20331 #include <tcpd.h>
20332 int allow_severity = 0;
20333 int deny_severity  = 0;
20334
20335 struct request_info *req;
20336                 
20337 int main() {
20338
20339 hosts_access(req)
20340                 
20341 ; return 0; }
20342 EOF
20343 if { (eval echo configure:20344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20344   rm -rf conftest*
20345   echo "$ac_t""-lwrap -lnsl" 1>&6
20346                 have_wrappers=yes
20347                 LIBS="$save_LIBS -lnsl"
20348 else
20349   echo "configure: failed program was:" >&5
20350   cat conftest.$ac_ext >&5
20351   rm -rf conftest*
20352   
20353                 echo "$ac_t""no" 1>&6
20354                 have_wrappers=no
20355                 LIBS=$save_LIBS
20356 fi
20357 rm -f conftest*
20358 fi
20359 rm -f conftest*
20360 else
20361   echo "$ac_t""no" 1>&6
20362 have_wrappers=no
20363 fi
20364 done
20365
20366
20367         if test $have_wrappers = yes ; then
20368                 cat >> confdefs.h <<\EOF
20369 #define HAVE_TCPD 1
20370 EOF
20371
20372                 WRAP_LIBS="-lwrap"
20373         elif test $ol_enable_wrappers = yes ; then
20374                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20375         else
20376                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20377                 WRAP_LIBS=""
20378         fi
20379 fi
20380
20381 if test $ol_enable_syslog != no ; then
20382         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20383 echo "configure:20384: checking for openlog" >&5
20384 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20385   echo $ac_n "(cached) $ac_c" 1>&6
20386 else
20387   cat > conftest.$ac_ext <<EOF
20388 #line 20389 "configure"
20389 #include "confdefs.h"
20390 /* System header to define __stub macros and hopefully few prototypes,
20391     which can conflict with char openlog(); below.  */
20392 #include <assert.h>
20393 /* Override any gcc2 internal prototype to avoid an error.  */
20394 /* We use char because int might match the return type of a gcc2
20395     builtin and then its argument prototype would still apply.  */
20396 char openlog();
20397 char (*f)();
20398
20399 int main() {
20400
20401 /* The GNU C library defines this for functions which it implements
20402     to always fail with ENOSYS.  Some functions are actually named
20403     something starting with __ and the normal name is an alias.  */
20404 #if defined (__stub_openlog) || defined (__stub___openlog)
20405 choke me
20406 #else
20407 f = openlog;
20408 #endif
20409
20410 ; return 0; }
20411 EOF
20412 if { (eval echo configure:20413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20413   rm -rf conftest*
20414   eval "ac_cv_func_openlog=yes"
20415 else
20416   echo "configure: failed program was:" >&5
20417   cat conftest.$ac_ext >&5
20418   rm -rf conftest*
20419   eval "ac_cv_func_openlog=no"
20420 fi
20421 rm -f conftest*
20422 fi
20423
20424 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20425   echo "$ac_t""yes" 1>&6
20426   :
20427 else
20428   echo "$ac_t""no" 1>&6
20429 fi
20430
20431         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20432                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20433         fi
20434         ol_enable_syslog=$ac_cv_func_openlog
20435 fi
20436
20437
20438 ol_link_sql=no
20439 if test $ol_enable_sql != no ; then
20440         for ac_hdr in sql.h sqlext.h
20441 do
20442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20444 echo "configure:20445: checking for $ac_hdr" >&5
20445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20446   echo $ac_n "(cached) $ac_c" 1>&6
20447 else
20448   cat > conftest.$ac_ext <<EOF
20449 #line 20450 "configure"
20450 #include "confdefs.h"
20451 #include <$ac_hdr>
20452 EOF
20453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20454 { (eval echo configure:20455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20456 if test -z "$ac_err"; then
20457   rm -rf conftest*
20458   eval "ac_cv_header_$ac_safe=yes"
20459 else
20460   echo "$ac_err" >&5
20461   echo "configure: failed program was:" >&5
20462   cat conftest.$ac_ext >&5
20463   rm -rf conftest*
20464   eval "ac_cv_header_$ac_safe=no"
20465 fi
20466 rm -f conftest*
20467 fi
20468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20469   echo "$ac_t""yes" 1>&6
20470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20471   cat >> confdefs.h <<EOF
20472 #define $ac_tr_hdr 1
20473 EOF
20474  
20475 else
20476   echo "$ac_t""no" 1>&6
20477 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20478         
20479 fi
20480 done
20481
20482
20483         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20484 echo "configure:20485: checking for SQLDriverConnect in -liodbc" >&5
20485 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20487   echo $ac_n "(cached) $ac_c" 1>&6
20488 else
20489   ac_save_LIBS="$LIBS"
20490 LIBS="-liodbc  $LIBS"
20491 cat > conftest.$ac_ext <<EOF
20492 #line 20493 "configure"
20493 #include "confdefs.h"
20494 /* Override any gcc2 internal prototype to avoid an error.  */
20495 /* We use char because int might match the return type of a gcc2
20496     builtin and then its argument prototype would still apply.  */
20497 char SQLDriverConnect();
20498
20499 int main() {
20500 SQLDriverConnect()
20501 ; return 0; }
20502 EOF
20503 if { (eval echo configure:20504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20504   rm -rf conftest*
20505   eval "ac_cv_lib_$ac_lib_var=yes"
20506 else
20507   echo "configure: failed program was:" >&5
20508   cat conftest.$ac_ext >&5
20509   rm -rf conftest*
20510   eval "ac_cv_lib_$ac_lib_var=no"
20511 fi
20512 rm -f conftest*
20513 LIBS="$ac_save_LIBS"
20514
20515 fi
20516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20517   echo "$ac_t""yes" 1>&6
20518   have_iodbc=yes
20519 else
20520   echo "$ac_t""no" 1>&6
20521 have_iodbc=no
20522 fi
20523
20524         if test $have_iodbc = yes ; then
20525                 ol_link_sql="-liodbc"
20526         else
20527                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20528 echo "configure:20529: checking for SQLDriverConnect in -lodbc" >&5
20529 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20531   echo $ac_n "(cached) $ac_c" 1>&6
20532 else
20533   ac_save_LIBS="$LIBS"
20534 LIBS="-lodbc  $LIBS"
20535 cat > conftest.$ac_ext <<EOF
20536 #line 20537 "configure"
20537 #include "confdefs.h"
20538 /* Override any gcc2 internal prototype to avoid an error.  */
20539 /* We use char because int might match the return type of a gcc2
20540     builtin and then its argument prototype would still apply.  */
20541 char SQLDriverConnect();
20542
20543 int main() {
20544 SQLDriverConnect()
20545 ; return 0; }
20546 EOF
20547 if { (eval echo configure:20548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20548   rm -rf conftest*
20549   eval "ac_cv_lib_$ac_lib_var=yes"
20550 else
20551   echo "configure: failed program was:" >&5
20552   cat conftest.$ac_ext >&5
20553   rm -rf conftest*
20554   eval "ac_cv_lib_$ac_lib_var=no"
20555 fi
20556 rm -f conftest*
20557 LIBS="$ac_save_LIBS"
20558
20559 fi
20560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20561   echo "$ac_t""yes" 1>&6
20562   have_odbc=yes
20563 else
20564   echo "$ac_t""no" 1>&6
20565 have_odbc=no
20566 fi
20567
20568                 if test $have_odbc = yes ; then
20569                         ol_link_sql="-lodbc"
20570                 fi
20571         fi
20572
20573         if test $ol_link_sql != no ; then
20574                 SLAPD_SQL_LIBS="$ol_link_sql"
20575
20576         elif test $ol_enable_sql != auto ; then
20577                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20578         fi
20579 fi
20580
20581 ol_link_sasl=no
20582 ol_link_spasswd=no
20583 if test $ol_with_cyrus_sasl != no ; then
20584         for ac_hdr in sasl/sasl.h sasl.h
20585 do
20586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20588 echo "configure:20589: checking for $ac_hdr" >&5
20589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20590   echo $ac_n "(cached) $ac_c" 1>&6
20591 else
20592   cat > conftest.$ac_ext <<EOF
20593 #line 20594 "configure"
20594 #include "confdefs.h"
20595 #include <$ac_hdr>
20596 EOF
20597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20598 { (eval echo configure:20599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20600 if test -z "$ac_err"; then
20601   rm -rf conftest*
20602   eval "ac_cv_header_$ac_safe=yes"
20603 else
20604   echo "$ac_err" >&5
20605   echo "configure: failed program was:" >&5
20606   cat conftest.$ac_ext >&5
20607   rm -rf conftest*
20608   eval "ac_cv_header_$ac_safe=no"
20609 fi
20610 rm -f conftest*
20611 fi
20612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20613   echo "$ac_t""yes" 1>&6
20614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20615   cat >> confdefs.h <<EOF
20616 #define $ac_tr_hdr 1
20617 EOF
20618  
20619 else
20620   echo "$ac_t""no" 1>&6
20621 fi
20622 done
20623
20624
20625         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20626                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20627 echo "configure:20628: checking for sasl_client_init in -lsasl2" >&5
20628 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   ac_save_LIBS="$LIBS"
20633 LIBS="-lsasl2  $LIBS"
20634 cat > conftest.$ac_ext <<EOF
20635 #line 20636 "configure"
20636 #include "confdefs.h"
20637 /* Override any gcc2 internal prototype to avoid an error.  */
20638 /* We use char because int might match the return type of a gcc2
20639     builtin and then its argument prototype would still apply.  */
20640 char sasl_client_init();
20641
20642 int main() {
20643 sasl_client_init()
20644 ; return 0; }
20645 EOF
20646 if { (eval echo configure:20647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20647   rm -rf conftest*
20648   eval "ac_cv_lib_$ac_lib_var=yes"
20649 else
20650   echo "configure: failed program was:" >&5
20651   cat conftest.$ac_ext >&5
20652   rm -rf conftest*
20653   eval "ac_cv_lib_$ac_lib_var=no"
20654 fi
20655 rm -f conftest*
20656 LIBS="$ac_save_LIBS"
20657
20658 fi
20659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20660   echo "$ac_t""yes" 1>&6
20661   ol_link_sasl="-lsasl2"
20662 else
20663   echo "$ac_t""no" 1>&6
20664 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20665 echo "configure:20666: checking for sasl_client_init in -lsasl" >&5
20666 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20668   echo $ac_n "(cached) $ac_c" 1>&6
20669 else
20670   ac_save_LIBS="$LIBS"
20671 LIBS="-lsasl  $LIBS"
20672 cat > conftest.$ac_ext <<EOF
20673 #line 20674 "configure"
20674 #include "confdefs.h"
20675 /* Override any gcc2 internal prototype to avoid an error.  */
20676 /* We use char because int might match the return type of a gcc2
20677     builtin and then its argument prototype would still apply.  */
20678 char sasl_client_init();
20679
20680 int main() {
20681 sasl_client_init()
20682 ; return 0; }
20683 EOF
20684 if { (eval echo configure:20685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20685   rm -rf conftest*
20686   eval "ac_cv_lib_$ac_lib_var=yes"
20687 else
20688   echo "configure: failed program was:" >&5
20689   cat conftest.$ac_ext >&5
20690   rm -rf conftest*
20691   eval "ac_cv_lib_$ac_lib_var=no"
20692 fi
20693 rm -f conftest*
20694 LIBS="$ac_save_LIBS"
20695
20696 fi
20697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20698   echo "$ac_t""yes" 1>&6
20699   ol_link_sasl="-lsasl"
20700 else
20701   echo "$ac_t""no" 1>&6
20702 fi
20703
20704 fi
20705
20706         fi
20707
20708         if test $ol_link_sasl = no ; then
20709                 if test $ol_with_cyrus_sasl != auto ; then
20710                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20711                 else
20712                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20713                         echo "configure: warning: SASL authentication not supported!" 1>&2
20714                         if test $ol_link_tls = no ; then
20715                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20716                         fi
20717                 fi
20718         else
20719                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20720 echo "configure:20721: checking Cyrus SASL library version" >&5
20721 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20722   echo $ac_n "(cached) $ac_c" 1>&6
20723 else
20724   
20725         cat > conftest.$ac_ext <<EOF
20726 #line 20727 "configure"
20727 #include "confdefs.h"
20728
20729 #ifdef HAVE_SASL_SASL_H
20730 #include <sasl/sasl.h>
20731 #else
20732 #include <sasl.h>
20733 #endif
20734
20735 /* Require 2.1.15+ */
20736 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20737         char *__sasl_compat = "2.2+ or better okay (we guess)";
20738 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20739         && SASL_VERSION_STEP >=15
20740         char *__sasl_compat = "2.1.15+ or better okay";
20741 #endif
20742         
20743 EOF
20744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20745   egrep "__sasl_compat" >/dev/null 2>&1; then
20746   rm -rf conftest*
20747   ol_cv_sasl_compat=yes
20748 else
20749   rm -rf conftest*
20750   ol_cv_sasl_compat=no
20751 fi
20752 rm -f conftest*
20753
20754 fi
20755
20756 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20757
20758                 if test $ol_cv_sasl_compat = no ; then
20759                         ol_link_sasl=no
20760                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20761                 fi
20762
20763                 cat >> confdefs.h <<\EOF
20764 #define HAVE_CYRUS_SASL 1
20765 EOF
20766
20767                 SASL_LIBS="$ol_link_sasl"
20768                 if test $ol_enable_spasswd != no ; then
20769                         ol_link_spasswd=yes
20770                 fi
20771
20772                 ac_save_LIBS="$LIBS"
20773                 LIBS="$LIBS $ol_link_sasl"
20774                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20775 echo "configure:20776: checking for sasl_version" >&5
20776 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20777   echo $ac_n "(cached) $ac_c" 1>&6
20778 else
20779   cat > conftest.$ac_ext <<EOF
20780 #line 20781 "configure"
20781 #include "confdefs.h"
20782 /* System header to define __stub macros and hopefully few prototypes,
20783     which can conflict with char sasl_version(); below.  */
20784 #include <assert.h>
20785 /* Override any gcc2 internal prototype to avoid an error.  */
20786 /* We use char because int might match the return type of a gcc2
20787     builtin and then its argument prototype would still apply.  */
20788 char sasl_version();
20789 char (*f)();
20790
20791 int main() {
20792
20793 /* The GNU C library defines this for functions which it implements
20794     to always fail with ENOSYS.  Some functions are actually named
20795     something starting with __ and the normal name is an alias.  */
20796 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20797 choke me
20798 #else
20799 f = sasl_version;
20800 #endif
20801
20802 ; return 0; }
20803 EOF
20804 if { (eval echo configure:20805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20805   rm -rf conftest*
20806   eval "ac_cv_func_sasl_version=yes"
20807 else
20808   echo "configure: failed program was:" >&5
20809   cat conftest.$ac_ext >&5
20810   rm -rf conftest*
20811   eval "ac_cv_func_sasl_version=no"
20812 fi
20813 rm -f conftest*
20814 fi
20815
20816 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20817   echo "$ac_t""yes" 1>&6
20818   cat >> confdefs.h <<\EOF
20819 #define HAVE_SASL_VERSION 1
20820 EOF
20821
20822 else
20823   echo "$ac_t""no" 1>&6
20824 fi
20825
20826                 LIBS="$ac_save_LIBS"
20827         fi
20828
20829 else
20830         echo "configure: warning: SASL authentication not supported!" 1>&2
20831         if test $ol_link_tls = no ; then
20832                 echo "configure: warning: Strong authentication not supported!" 1>&2
20833         fi
20834 fi
20835
20836 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20837         dev=no
20838         if test -r /dev/urandom ; then
20839                 dev="/dev/urandom";
20840         elif test -r /idev/urandom ; then
20841                 dev="/idev/urandom";
20842         elif test -r /dev/srandom ; then
20843                 dev="/dev/srandom";
20844         elif test -r /dev/random ; then
20845                 dev="/dev/random";
20846         elif test -r /idev/random ; then
20847                 dev="/idev/random";
20848         fi
20849
20850         if test $dev != no ; then
20851                 cat >> confdefs.h <<EOF
20852 #define URANDOM_DEVICE "$dev"
20853 EOF
20854
20855         fi
20856 fi
20857
20858 ol_link_fetch=no
20859 if test $ol_with_fetch != no ; then
20860         ol_LIBS=$LIBS
20861 LIBS="-lfetch -lcom_err $LIBS"
20862 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20863 echo "configure:20864: checking fetch(3) library" >&5
20864 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20865   echo $ac_n "(cached) $ac_c" 1>&6
20866 else
20867   
20868         cat > conftest.$ac_ext <<EOF
20869 #line 20870 "configure"
20870 #include "confdefs.h"
20871
20872 #include <sys/param.h>
20873 #include <stdio.h>
20874 #include <fetch.h>
20875 int main() {
20876 struct url *u = fetchParseURL("file:///"); 
20877 ; return 0; }
20878 EOF
20879 if { (eval echo configure:20880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20880   rm -rf conftest*
20881   ol_cv_lib_fetch=yes
20882 else
20883   echo "configure: failed program was:" >&5
20884   cat conftest.$ac_ext >&5
20885   rm -rf conftest*
20886   ol_cv_lib_fetch=no
20887 fi
20888 rm -f conftest*
20889 fi
20890
20891 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20892 LIBS=$ol_LIBS
20893 if test $ol_cv_lib_fetch != no ; then
20894         ol_link_fetch="-lfetch -lcom_err"
20895         cat >> confdefs.h <<\EOF
20896 #define HAVE_FETCH 1
20897 EOF
20898
20899 fi
20900
20901
20902         if test $ol_cv_lib_fetch != no ; then
20903                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20904                 ol_link_fetch=freebsd
20905
20906         elif test $ol_with_fetch != auto ; then
20907                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20908         fi 
20909 fi
20910
20911 if test $ol_enable_crypt != no ; then
20912         save_LIBS="$LIBS"
20913         LIBS="$TLS_LIBS $LIBS"
20914
20915         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20916 echo "configure:20917: checking for crypt" >&5
20917 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20918   echo $ac_n "(cached) $ac_c" 1>&6
20919 else
20920   cat > conftest.$ac_ext <<EOF
20921 #line 20922 "configure"
20922 #include "confdefs.h"
20923 /* System header to define __stub macros and hopefully few prototypes,
20924     which can conflict with char crypt(); below.  */
20925 #include <assert.h>
20926 /* Override any gcc2 internal prototype to avoid an error.  */
20927 /* We use char because int might match the return type of a gcc2
20928     builtin and then its argument prototype would still apply.  */
20929 char crypt();
20930 char (*f)();
20931
20932 int main() {
20933
20934 /* The GNU C library defines this for functions which it implements
20935     to always fail with ENOSYS.  Some functions are actually named
20936     something starting with __ and the normal name is an alias.  */
20937 #if defined (__stub_crypt) || defined (__stub___crypt)
20938 choke me
20939 #else
20940 f = crypt;
20941 #endif
20942
20943 ; return 0; }
20944 EOF
20945 if { (eval echo configure:20946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20946   rm -rf conftest*
20947   eval "ac_cv_func_crypt=yes"
20948 else
20949   echo "configure: failed program was:" >&5
20950   cat conftest.$ac_ext >&5
20951   rm -rf conftest*
20952   eval "ac_cv_func_crypt=no"
20953 fi
20954 rm -f conftest*
20955 fi
20956
20957 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20958   echo "$ac_t""yes" 1>&6
20959   have_crypt=yes
20960 else
20961   echo "$ac_t""no" 1>&6
20962
20963                 LIBS="$save_LIBS"
20964                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20965 echo "configure:20966: checking for crypt in -lcrypt" >&5
20966 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20967 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20968   echo $ac_n "(cached) $ac_c" 1>&6
20969 else
20970   ac_save_LIBS="$LIBS"
20971 LIBS="-lcrypt  $LIBS"
20972 cat > conftest.$ac_ext <<EOF
20973 #line 20974 "configure"
20974 #include "confdefs.h"
20975 /* Override any gcc2 internal prototype to avoid an error.  */
20976 /* We use char because int might match the return type of a gcc2
20977     builtin and then its argument prototype would still apply.  */
20978 char crypt();
20979
20980 int main() {
20981 crypt()
20982 ; return 0; }
20983 EOF
20984 if { (eval echo configure:20985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20985   rm -rf conftest*
20986   eval "ac_cv_lib_$ac_lib_var=yes"
20987 else
20988   echo "configure: failed program was:" >&5
20989   cat conftest.$ac_ext >&5
20990   rm -rf conftest*
20991   eval "ac_cv_lib_$ac_lib_var=no"
20992 fi
20993 rm -f conftest*
20994 LIBS="$ac_save_LIBS"
20995
20996 fi
20997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20998   echo "$ac_t""yes" 1>&6
20999   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21000                         have_crypt=yes
21001 else
21002   echo "$ac_t""no" 1>&6
21003 have_crypt=no
21004 fi
21005
21006 fi
21007
21008
21009         LIBS="$save_LIBS"
21010
21011         if test $have_crypt = yes ; then
21012                 cat >> confdefs.h <<\EOF
21013 #define HAVE_CRYPT 1
21014 EOF
21015
21016         else
21017                 echo "configure: warning: could not find crypt" 1>&2
21018                 if test $ol_enable_crypt = yes ; then
21019                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21020                 fi
21021
21022                 echo "configure: warning: disabling crypt support" 1>&2
21023                 ol_enable_crypt=no
21024         fi
21025 fi
21026
21027 if test $ol_enable_proctitle != no ; then
21028         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21029 echo "configure:21030: checking for setproctitle" >&5
21030 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21031   echo $ac_n "(cached) $ac_c" 1>&6
21032 else
21033   cat > conftest.$ac_ext <<EOF
21034 #line 21035 "configure"
21035 #include "confdefs.h"
21036 /* System header to define __stub macros and hopefully few prototypes,
21037     which can conflict with char setproctitle(); below.  */
21038 #include <assert.h>
21039 /* Override any gcc2 internal prototype to avoid an error.  */
21040 /* We use char because int might match the return type of a gcc2
21041     builtin and then its argument prototype would still apply.  */
21042 char setproctitle();
21043 char (*f)();
21044
21045 int main() {
21046
21047 /* The GNU C library defines this for functions which it implements
21048     to always fail with ENOSYS.  Some functions are actually named
21049     something starting with __ and the normal name is an alias.  */
21050 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21051 choke me
21052 #else
21053 f = setproctitle;
21054 #endif
21055
21056 ; return 0; }
21057 EOF
21058 if { (eval echo configure:21059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21059   rm -rf conftest*
21060   eval "ac_cv_func_setproctitle=yes"
21061 else
21062   echo "configure: failed program was:" >&5
21063   cat conftest.$ac_ext >&5
21064   rm -rf conftest*
21065   eval "ac_cv_func_setproctitle=no"
21066 fi
21067 rm -f conftest*
21068 fi
21069
21070 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21071   echo "$ac_t""yes" 1>&6
21072   have_setproctitle=yes
21073 else
21074   echo "$ac_t""no" 1>&6
21075
21076                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21077 echo "configure:21078: checking for setproctitle in -lutil" >&5
21078 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21080   echo $ac_n "(cached) $ac_c" 1>&6
21081 else
21082   ac_save_LIBS="$LIBS"
21083 LIBS="-lutil  $LIBS"
21084 cat > conftest.$ac_ext <<EOF
21085 #line 21086 "configure"
21086 #include "confdefs.h"
21087 /* Override any gcc2 internal prototype to avoid an error.  */
21088 /* We use char because int might match the return type of a gcc2
21089     builtin and then its argument prototype would still apply.  */
21090 char setproctitle();
21091
21092 int main() {
21093 setproctitle()
21094 ; return 0; }
21095 EOF
21096 if { (eval echo configure:21097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21097   rm -rf conftest*
21098   eval "ac_cv_lib_$ac_lib_var=yes"
21099 else
21100   echo "configure: failed program was:" >&5
21101   cat conftest.$ac_ext >&5
21102   rm -rf conftest*
21103   eval "ac_cv_lib_$ac_lib_var=no"
21104 fi
21105 rm -f conftest*
21106 LIBS="$ac_save_LIBS"
21107
21108 fi
21109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21110   echo "$ac_t""yes" 1>&6
21111   have_setproctitle=yes
21112                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21113 else
21114   echo "$ac_t""no" 1>&6
21115 have_setproctitle=no
21116                         LIBOBJS="$LIBOBJS setproctitle.o"
21117                         LIBSRCS="$LIBSRCS setproctitle.c"
21118 fi
21119
21120 fi
21121
21122
21123         if test $have_setproctitle = yes ; then
21124                 cat >> confdefs.h <<\EOF
21125 #define HAVE_SETPROCTITLE 1
21126 EOF
21127
21128         fi
21129 fi
21130
21131 if test $ol_enable_slp != no ; then
21132         for ac_hdr in slp.h 
21133 do
21134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21136 echo "configure:21137: checking for $ac_hdr" >&5
21137 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21138   echo $ac_n "(cached) $ac_c" 1>&6
21139 else
21140   cat > conftest.$ac_ext <<EOF
21141 #line 21142 "configure"
21142 #include "confdefs.h"
21143 #include <$ac_hdr>
21144 EOF
21145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21146 { (eval echo configure:21147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21148 if test -z "$ac_err"; then
21149   rm -rf conftest*
21150   eval "ac_cv_header_$ac_safe=yes"
21151 else
21152   echo "$ac_err" >&5
21153   echo "configure: failed program was:" >&5
21154   cat conftest.$ac_ext >&5
21155   rm -rf conftest*
21156   eval "ac_cv_header_$ac_safe=no"
21157 fi
21158 rm -f conftest*
21159 fi
21160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21161   echo "$ac_t""yes" 1>&6
21162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21163   cat >> confdefs.h <<EOF
21164 #define $ac_tr_hdr 1
21165 EOF
21166  
21167 else
21168   echo "$ac_t""no" 1>&6
21169 fi
21170 done
21171
21172
21173         if test $ac_cv_header_slp_h = yes ; then
21174                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21175 echo "configure:21176: checking for SLPOpen in -lslp" >&5
21176 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21177 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21178   echo $ac_n "(cached) $ac_c" 1>&6
21179 else
21180   ac_save_LIBS="$LIBS"
21181 LIBS="-lslp  $LIBS"
21182 cat > conftest.$ac_ext <<EOF
21183 #line 21184 "configure"
21184 #include "confdefs.h"
21185 /* Override any gcc2 internal prototype to avoid an error.  */
21186 /* We use char because int might match the return type of a gcc2
21187     builtin and then its argument prototype would still apply.  */
21188 char SLPOpen();
21189
21190 int main() {
21191 SLPOpen()
21192 ; return 0; }
21193 EOF
21194 if { (eval echo configure:21195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21195   rm -rf conftest*
21196   eval "ac_cv_lib_$ac_lib_var=yes"
21197 else
21198   echo "configure: failed program was:" >&5
21199   cat conftest.$ac_ext >&5
21200   rm -rf conftest*
21201   eval "ac_cv_lib_$ac_lib_var=no"
21202 fi
21203 rm -f conftest*
21204 LIBS="$ac_save_LIBS"
21205
21206 fi
21207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21208   echo "$ac_t""yes" 1>&6
21209   have_slp=yes
21210 else
21211   echo "$ac_t""no" 1>&6
21212 have_slp=no
21213 fi
21214
21215                 if test $have_slp = yes ; then
21216                         cat >> confdefs.h <<\EOF
21217 #define HAVE_SLP 1
21218 EOF
21219
21220                         SLAPD_SLP_LIBS=-lslp
21221                 fi
21222
21223         elif test $ol_enable_slp = yes ; then
21224                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21225         fi
21226 fi
21227
21228
21229 echo $ac_n "checking long long""... $ac_c" 1>&6
21230 echo "configure:21231: checking long long" >&5
21231 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21232   echo $ac_n "(cached) $ac_c" 1>&6
21233 else
21234   
21235         cat > conftest.$ac_ext <<EOF
21236 #line 21237 "configure"
21237 #include "confdefs.h"
21238
21239 int main() {
21240 long long x;
21241 ; return 0; }
21242 EOF
21243 if { (eval echo configure:21244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21244   rm -rf conftest*
21245   ol_cv_type_long_long=yes
21246 else
21247   echo "configure: failed program was:" >&5
21248   cat conftest.$ac_ext >&5
21249   rm -rf conftest*
21250   ol_cv_type_long_long=no
21251 fi
21252 rm -f conftest*
21253 fi
21254
21255 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21256 if test $ol_cv_type_long_long = yes; then
21257         cat >> confdefs.h <<\EOF
21258 #define HAVE_LONG_LONG 1
21259 EOF
21260
21261 fi
21262
21263 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21264 echo "configure:21265: checking for ANSI C header files" >&5
21265 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21266   echo $ac_n "(cached) $ac_c" 1>&6
21267 else
21268   cat > conftest.$ac_ext <<EOF
21269 #line 21270 "configure"
21270 #include "confdefs.h"
21271 #include <stdlib.h>
21272 #include <stdarg.h>
21273 #include <string.h>
21274 #include <float.h>
21275 EOF
21276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21277 { (eval echo configure:21278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21279 if test -z "$ac_err"; then
21280   rm -rf conftest*
21281   ac_cv_header_stdc=yes
21282 else
21283   echo "$ac_err" >&5
21284   echo "configure: failed program was:" >&5
21285   cat conftest.$ac_ext >&5
21286   rm -rf conftest*
21287   ac_cv_header_stdc=no
21288 fi
21289 rm -f conftest*
21290
21291 if test $ac_cv_header_stdc = yes; then
21292   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21293 cat > conftest.$ac_ext <<EOF
21294 #line 21295 "configure"
21295 #include "confdefs.h"
21296 #include <string.h>
21297 EOF
21298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21299   egrep "memchr" >/dev/null 2>&1; then
21300   :
21301 else
21302   rm -rf conftest*
21303   ac_cv_header_stdc=no
21304 fi
21305 rm -f conftest*
21306
21307 fi
21308
21309 if test $ac_cv_header_stdc = yes; then
21310   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21311 cat > conftest.$ac_ext <<EOF
21312 #line 21313 "configure"
21313 #include "confdefs.h"
21314 #include <stdlib.h>
21315 EOF
21316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21317   egrep "free" >/dev/null 2>&1; then
21318   :
21319 else
21320   rm -rf conftest*
21321   ac_cv_header_stdc=no
21322 fi
21323 rm -f conftest*
21324
21325 fi
21326
21327 if test $ac_cv_header_stdc = yes; then
21328   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21329 if test "$cross_compiling" = yes; then
21330   :
21331 else
21332   cat > conftest.$ac_ext <<EOF
21333 #line 21334 "configure"
21334 #include "confdefs.h"
21335 #include <ctype.h>
21336 #if ((' ' & 0x0FF) == 0x020)
21337 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21338 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21339 #else
21340 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21341  || ('j' <= (c) && (c) <= 'r') \
21342  || ('s' <= (c) && (c) <= 'z'))
21343 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21344 #endif
21345 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21346 int main () { int i; for (i = 0; i < 256; i++)
21347 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21348 exit (0); }
21349
21350 EOF
21351 if { (eval echo configure:21352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21352 then
21353   :
21354 else
21355   echo "configure: failed program was:" >&5
21356   cat conftest.$ac_ext >&5
21357   rm -fr conftest*
21358   ac_cv_header_stdc=no
21359 fi
21360 rm -fr conftest*
21361 fi
21362
21363 fi
21364 fi
21365
21366 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21367 if test $ac_cv_header_stdc = yes; then
21368   cat >> confdefs.h <<\EOF
21369 #define STDC_HEADERS 1
21370 EOF
21371
21372 fi
21373
21374 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21375 echo "configure:21376: checking for mode_t" >&5
21376 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21377   echo $ac_n "(cached) $ac_c" 1>&6
21378 else
21379   cat > conftest.$ac_ext <<EOF
21380 #line 21381 "configure"
21381 #include "confdefs.h"
21382 #include <sys/types.h>
21383 #if STDC_HEADERS
21384 #include <stdlib.h>
21385 #include <stddef.h>
21386 #endif
21387
21388 EOF
21389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21390   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21391   rm -rf conftest*
21392   eval "ac_cv_type_mode_t=yes"
21393 else
21394   rm -rf conftest*
21395   eval "ac_cv_type_mode_t=no"
21396 fi
21397 rm -f conftest*
21398
21399 fi
21400 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21401   echo "$ac_t""yes" 1>&6
21402 else
21403   echo "$ac_t""no" 1>&6
21404   cat >> confdefs.h <<EOF
21405 #define mode_t int
21406 EOF
21407
21408 fi
21409
21410 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21411 echo "configure:21412: checking for off_t" >&5
21412 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21413   echo $ac_n "(cached) $ac_c" 1>&6
21414 else
21415   cat > conftest.$ac_ext <<EOF
21416 #line 21417 "configure"
21417 #include "confdefs.h"
21418 #include <sys/types.h>
21419 #if STDC_HEADERS
21420 #include <stdlib.h>
21421 #include <stddef.h>
21422 #endif
21423
21424 EOF
21425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21426   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21427   rm -rf conftest*
21428   eval "ac_cv_type_off_t=yes"
21429 else
21430   rm -rf conftest*
21431   eval "ac_cv_type_off_t=no"
21432 fi
21433 rm -f conftest*
21434
21435 fi
21436 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21437   echo "$ac_t""yes" 1>&6
21438 else
21439   echo "$ac_t""no" 1>&6
21440   cat >> confdefs.h <<EOF
21441 #define off_t long
21442 EOF
21443
21444 fi
21445
21446 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21447 echo "configure:21448: checking for pid_t" >&5
21448 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21449   echo $ac_n "(cached) $ac_c" 1>&6
21450 else
21451   cat > conftest.$ac_ext <<EOF
21452 #line 21453 "configure"
21453 #include "confdefs.h"
21454 #include <sys/types.h>
21455 #if STDC_HEADERS
21456 #include <stdlib.h>
21457 #include <stddef.h>
21458 #endif
21459
21460 EOF
21461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21462   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21463   rm -rf conftest*
21464   eval "ac_cv_type_pid_t=yes"
21465 else
21466   rm -rf conftest*
21467   eval "ac_cv_type_pid_t=no"
21468 fi
21469 rm -f conftest*
21470
21471 fi
21472 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21473   echo "$ac_t""yes" 1>&6
21474 else
21475   echo "$ac_t""no" 1>&6
21476   cat >> confdefs.h <<EOF
21477 #define pid_t int
21478 EOF
21479
21480 fi
21481
21482 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21483 echo "configure:21484: checking for ptrdiff_t" >&5
21484 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21485   echo $ac_n "(cached) $ac_c" 1>&6
21486 else
21487   cat > conftest.$ac_ext <<EOF
21488 #line 21489 "configure"
21489 #include "confdefs.h"
21490 #include <stddef.h>
21491 int main() {
21492 ptrdiff_t p
21493 ; return 0; }
21494 EOF
21495 if { (eval echo configure:21496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21496   rm -rf conftest*
21497   am_cv_type_ptrdiff_t=yes
21498 else
21499   echo "configure: failed program was:" >&5
21500   cat conftest.$ac_ext >&5
21501   rm -rf conftest*
21502   am_cv_type_ptrdiff_t=no
21503 fi
21504 rm -f conftest*
21505 fi
21506
21507 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21508    if test $am_cv_type_ptrdiff_t = yes; then
21509      cat >> confdefs.h <<\EOF
21510 #define HAVE_PTRDIFF_T 1
21511 EOF
21512
21513    fi
21514
21515 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21516 echo "configure:21517: checking return type of signal handlers" >&5
21517 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21518   echo $ac_n "(cached) $ac_c" 1>&6
21519 else
21520   cat > conftest.$ac_ext <<EOF
21521 #line 21522 "configure"
21522 #include "confdefs.h"
21523 #include <sys/types.h>
21524 #include <signal.h>
21525 #ifdef signal
21526 #undef signal
21527 #endif
21528 #ifdef __cplusplus
21529 extern "C" void (*signal (int, void (*)(int)))(int);
21530 #else
21531 void (*signal ()) ();
21532 #endif
21533
21534 int main() {
21535 int i;
21536 ; return 0; }
21537 EOF
21538 if { (eval echo configure:21539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21539   rm -rf conftest*
21540   ac_cv_type_signal=void
21541 else
21542   echo "configure: failed program was:" >&5
21543   cat conftest.$ac_ext >&5
21544   rm -rf conftest*
21545   ac_cv_type_signal=int
21546 fi
21547 rm -f conftest*
21548 fi
21549
21550 echo "$ac_t""$ac_cv_type_signal" 1>&6
21551 cat >> confdefs.h <<EOF
21552 #define RETSIGTYPE $ac_cv_type_signal
21553 EOF
21554
21555
21556 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21557 echo "configure:21558: checking for size_t" >&5
21558 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21559   echo $ac_n "(cached) $ac_c" 1>&6
21560 else
21561   cat > conftest.$ac_ext <<EOF
21562 #line 21563 "configure"
21563 #include "confdefs.h"
21564 #include <sys/types.h>
21565 #if STDC_HEADERS
21566 #include <stdlib.h>
21567 #include <stddef.h>
21568 #endif
21569
21570 EOF
21571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21572   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21573   rm -rf conftest*
21574   eval "ac_cv_type_size_t=yes"
21575 else
21576   rm -rf conftest*
21577   eval "ac_cv_type_size_t=no"
21578 fi
21579 rm -f conftest*
21580
21581 fi
21582 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21583   echo "$ac_t""yes" 1>&6
21584 else
21585   echo "$ac_t""no" 1>&6
21586   cat >> confdefs.h <<EOF
21587 #define size_t unsigned
21588 EOF
21589
21590 fi
21591
21592
21593 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21594 echo "configure:21595: checking for ssize_t" >&5
21595 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21596   echo $ac_n "(cached) $ac_c" 1>&6
21597 else
21598   cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601 #include <sys/types.h>
21602 #if STDC_HEADERS
21603 #include <stdlib.h>
21604 #include <stddef.h>
21605 #endif
21606
21607 EOF
21608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21609   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21610   rm -rf conftest*
21611   eval "ac_cv_type_ssize_t=yes"
21612 else
21613   rm -rf conftest*
21614   eval "ac_cv_type_ssize_t=no"
21615 fi
21616 rm -f conftest*
21617
21618 fi
21619 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21620   echo "$ac_t""yes" 1>&6
21621 else
21622   echo "$ac_t""no" 1>&6
21623   cat >> confdefs.h <<EOF
21624 #define ssize_t signed int
21625 EOF
21626
21627 fi
21628
21629 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21630 echo "configure:21631: checking for caddr_t" >&5
21631 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21632   echo $ac_n "(cached) $ac_c" 1>&6
21633 else
21634   cat > conftest.$ac_ext <<EOF
21635 #line 21636 "configure"
21636 #include "confdefs.h"
21637 #include <sys/types.h>
21638 #if STDC_HEADERS
21639 #include <stdlib.h>
21640 #include <stddef.h>
21641 #endif
21642
21643 EOF
21644 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21645   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21646   rm -rf conftest*
21647   eval "ac_cv_type_caddr_t=yes"
21648 else
21649   rm -rf conftest*
21650   eval "ac_cv_type_caddr_t=no"
21651 fi
21652 rm -f conftest*
21653
21654 fi
21655 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21656   echo "$ac_t""yes" 1>&6
21657 else
21658   echo "$ac_t""no" 1>&6
21659   cat >> confdefs.h <<EOF
21660 #define caddr_t char *
21661 EOF
21662
21663 fi
21664
21665
21666 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21667 echo "configure:21668: checking for socklen_t" >&5
21668 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21669   echo $ac_n "(cached) $ac_c" 1>&6
21670 else
21671   cat > conftest.$ac_ext <<EOF
21672 #line 21673 "configure"
21673 #include "confdefs.h"
21674
21675 #ifdef HAVE_SYS_TYPES_H
21676 #include <sys/types.h>
21677 #endif
21678 #ifdef HAVE_SYS_SOCKET_H
21679 #include <sys/socket.h>
21680 #endif
21681
21682 int main() {
21683 socklen_t len;
21684 ; return 0; }
21685 EOF
21686 if { (eval echo configure:21687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21687   rm -rf conftest*
21688   ol_cv_type_socklen_t=yes
21689 else
21690   echo "configure: failed program was:" >&5
21691   cat conftest.$ac_ext >&5
21692   rm -rf conftest*
21693   ol_cv_type_socklen_t=no
21694 fi
21695 rm -f conftest*
21696 fi
21697
21698 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21699   if test $ol_cv_type_socklen_t = no; then
21700     cat >> confdefs.h <<\EOF
21701 #define socklen_t int
21702 EOF
21703
21704   fi
21705  
21706 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21707 echo "configure:21708: checking for member st_blksize in aggregate type struct stat" >&5
21708 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21709   echo $ac_n "(cached) $ac_c" 1>&6
21710 else
21711   cat > conftest.$ac_ext <<EOF
21712 #line 21713 "configure"
21713 #include "confdefs.h"
21714 #include <sys/types.h>
21715 #include <sys/stat.h>
21716 int main() {
21717 struct stat foo; foo.st_blksize;
21718 ; return 0; }
21719 EOF
21720 if { (eval echo configure:21721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21721   rm -rf conftest*
21722   ac_cv_c_struct_member_st_blksize=yes
21723 else
21724   echo "configure: failed program was:" >&5
21725   cat conftest.$ac_ext >&5
21726   rm -rf conftest*
21727   ac_cv_c_struct_member_st_blksize=no
21728 fi
21729 rm -f conftest*
21730 fi
21731
21732 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21733 st_blksize="$ac_cv_c_struct_member_st_blksize"
21734 if test $ac_cv_c_struct_member_st_blksize = yes; then
21735   cat >> confdefs.h <<\EOF
21736 #define HAVE_ST_BLKSIZE 1
21737 EOF
21738
21739 fi
21740
21741 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21742 echo "configure:21743: checking whether time.h and sys/time.h may both be included" >&5
21743 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21744   echo $ac_n "(cached) $ac_c" 1>&6
21745 else
21746   cat > conftest.$ac_ext <<EOF
21747 #line 21748 "configure"
21748 #include "confdefs.h"
21749 #include <sys/types.h>
21750 #include <sys/time.h>
21751 #include <time.h>
21752 int main() {
21753 struct tm *tp;
21754 ; return 0; }
21755 EOF
21756 if { (eval echo configure:21757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21757   rm -rf conftest*
21758   ac_cv_header_time=yes
21759 else
21760   echo "configure: failed program was:" >&5
21761   cat conftest.$ac_ext >&5
21762   rm -rf conftest*
21763   ac_cv_header_time=no
21764 fi
21765 rm -f conftest*
21766 fi
21767
21768 echo "$ac_t""$ac_cv_header_time" 1>&6
21769 if test $ac_cv_header_time = yes; then
21770   cat >> confdefs.h <<\EOF
21771 #define TIME_WITH_SYS_TIME 1
21772 EOF
21773
21774 fi
21775
21776 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21777 echo "configure:21778: checking whether struct tm is in sys/time.h or time.h" >&5
21778 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21779   echo $ac_n "(cached) $ac_c" 1>&6
21780 else
21781   cat > conftest.$ac_ext <<EOF
21782 #line 21783 "configure"
21783 #include "confdefs.h"
21784 #include <sys/types.h>
21785 #include <time.h>
21786 int main() {
21787 struct tm *tp; tp->tm_sec;
21788 ; return 0; }
21789 EOF
21790 if { (eval echo configure:21791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21791   rm -rf conftest*
21792   ac_cv_struct_tm=time.h
21793 else
21794   echo "configure: failed program was:" >&5
21795   cat conftest.$ac_ext >&5
21796   rm -rf conftest*
21797   ac_cv_struct_tm=sys/time.h
21798 fi
21799 rm -f conftest*
21800 fi
21801
21802 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21803 if test $ac_cv_struct_tm = sys/time.h; then
21804   cat >> confdefs.h <<\EOF
21805 #define TM_IN_SYS_TIME 1
21806 EOF
21807
21808 fi
21809
21810 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21811 echo "configure:21812: checking for uid_t in sys/types.h" >&5
21812 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21813   echo $ac_n "(cached) $ac_c" 1>&6
21814 else
21815   cat > conftest.$ac_ext <<EOF
21816 #line 21817 "configure"
21817 #include "confdefs.h"
21818 #include <sys/types.h>
21819 EOF
21820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21821   egrep "uid_t" >/dev/null 2>&1; then
21822   rm -rf conftest*
21823   ac_cv_type_uid_t=yes
21824 else
21825   rm -rf conftest*
21826   ac_cv_type_uid_t=no
21827 fi
21828 rm -f conftest*
21829
21830 fi
21831
21832 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21833 if test $ac_cv_type_uid_t = no; then
21834   cat >> confdefs.h <<\EOF
21835 #define uid_t int
21836 EOF
21837
21838   cat >> confdefs.h <<\EOF
21839 #define gid_t int
21840 EOF
21841
21842 fi
21843
21844 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21845 echo "configure:21846: checking for sig_atomic_t" >&5
21846 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21847   echo $ac_n "(cached) $ac_c" 1>&6
21848 else
21849   cat > conftest.$ac_ext <<EOF
21850 #line 21851 "configure"
21851 #include "confdefs.h"
21852 #include <signal.h>
21853 int main() {
21854 sig_atomic_t atomic;
21855 ; return 0; }
21856 EOF
21857 if { (eval echo configure:21858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21858   rm -rf conftest*
21859   ol_cv_type_sig_atomic_t=yes
21860 else
21861   echo "configure: failed program was:" >&5
21862   cat conftest.$ac_ext >&5
21863   rm -rf conftest*
21864   ol_cv_type_sig_atomic_t=no
21865 fi
21866 rm -f conftest*
21867 fi
21868
21869 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21870   if test $ol_cv_type_sig_atomic_t = no; then
21871     cat >> confdefs.h <<\EOF
21872 #define sig_atomic_t int
21873 EOF
21874
21875   fi
21876  
21877
21878
21879 # test for pw_gecos in struct passwd
21880 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21881 echo "configure:21882: checking struct passwd for pw_gecos" >&5
21882 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21883   echo $ac_n "(cached) $ac_c" 1>&6
21884 else
21885   
21886         cat > conftest.$ac_ext <<EOF
21887 #line 21888 "configure"
21888 #include "confdefs.h"
21889 #include <pwd.h>
21890 int main() {
21891
21892         struct passwd pwd;
21893         pwd.pw_gecos = pwd.pw_name;
21894
21895 ; return 0; }
21896 EOF
21897 if { (eval echo configure:21898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21898   rm -rf conftest*
21899   ol_cv_struct_passwd_pw_gecos=yes
21900 else
21901   echo "configure: failed program was:" >&5
21902   cat conftest.$ac_ext >&5
21903   rm -rf conftest*
21904   ol_cv_struct_passwd_pw_gecos=no
21905 fi
21906 rm -f conftest*
21907 fi
21908
21909 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21910 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21911         cat >> confdefs.h <<\EOF
21912 #define HAVE_PW_GECOS 1
21913 EOF
21914
21915 fi
21916
21917 # test for pw_passwd in struct passwd
21918 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21919 echo "configure:21920: checking struct passwd for pw_passwd" >&5
21920 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21921   echo $ac_n "(cached) $ac_c" 1>&6
21922 else
21923   
21924         cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 #include <pwd.h>
21928 int main() {
21929
21930         struct passwd pwd;
21931         pwd.pw_passwd = pwd.pw_name;
21932
21933 ; return 0; }
21934 EOF
21935 if { (eval echo configure:21936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21936   rm -rf conftest*
21937   ol_cv_struct_passwd_pw_passwd=yes
21938 else
21939   echo "configure: failed program was:" >&5
21940   cat conftest.$ac_ext >&5
21941   rm -rf conftest*
21942   ol_cv_struct_passwd_pw_passwd=no
21943 fi
21944 rm -f conftest*
21945 fi
21946
21947 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21948 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21949         cat >> confdefs.h <<\EOF
21950 #define HAVE_PW_PASSWD 1
21951 EOF
21952
21953 fi
21954
21955
21956 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21957 echo "configure:21958: checking if toupper() requires islower()" >&5
21958 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   
21962         if test "$cross_compiling" = yes; then
21963   ol_cv_c_upper_lower=safe
21964 else
21965   cat > conftest.$ac_ext <<EOF
21966 #line 21967 "configure"
21967 #include "confdefs.h"
21968
21969 #include <ctype.h>
21970 main()
21971 {
21972         if ('C' == toupper('C'))
21973                 exit(0);
21974         else
21975                 exit(1);
21976 }
21977 EOF
21978 if { (eval echo configure:21979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21979 then
21980   ol_cv_c_upper_lower=no
21981 else
21982   echo "configure: failed program was:" >&5
21983   cat conftest.$ac_ext >&5
21984   rm -fr conftest*
21985   ol_cv_c_upper_lower=yes
21986 fi
21987 rm -fr conftest*
21988 fi
21989
21990 fi
21991
21992 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21993 if test $ol_cv_c_upper_lower != no ; then
21994         cat >> confdefs.h <<\EOF
21995 #define C_UPPER_LOWER 1
21996 EOF
21997
21998 fi
21999
22000 echo $ac_n "checking for working const""... $ac_c" 1>&6
22001 echo "configure:22002: checking for working const" >&5
22002 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22003   echo $ac_n "(cached) $ac_c" 1>&6
22004 else
22005   cat > conftest.$ac_ext <<EOF
22006 #line 22007 "configure"
22007 #include "confdefs.h"
22008
22009 int main() {
22010
22011 /* Ultrix mips cc rejects this.  */
22012 typedef int charset[2]; const charset x;
22013 /* SunOS 4.1.1 cc rejects this.  */
22014 char const *const *ccp;
22015 char **p;
22016 /* NEC SVR4.0.2 mips cc rejects this.  */
22017 struct point {int x, y;};
22018 static struct point const zero = {0,0};
22019 /* AIX XL C 1.02.0.0 rejects this.
22020    It does not let you subtract one const X* pointer from another in an arm
22021    of an if-expression whose if-part is not a constant expression */
22022 const char *g = "string";
22023 ccp = &g + (g ? g-g : 0);
22024 /* HPUX 7.0 cc rejects these. */
22025 ++ccp;
22026 p = (char**) ccp;
22027 ccp = (char const *const *) p;
22028 { /* SCO 3.2v4 cc rejects this.  */
22029   char *t;
22030   char const *s = 0 ? (char *) 0 : (char const *) 0;
22031
22032   *t++ = 0;
22033 }
22034 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22035   int x[] = {25, 17};
22036   const int *foo = &x[0];
22037   ++foo;
22038 }
22039 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22040   typedef const int *iptr;
22041   iptr p = 0;
22042   ++p;
22043 }
22044 { /* AIX XL C 1.02.0.0 rejects this saying
22045      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22046   struct s { int j; const int *ap[3]; };
22047   struct s *b; b->j = 5;
22048 }
22049 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22050   const int foo = 10;
22051 }
22052
22053 ; return 0; }
22054 EOF
22055 if { (eval echo configure:22056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22056   rm -rf conftest*
22057   ac_cv_c_const=yes
22058 else
22059   echo "configure: failed program was:" >&5
22060   cat conftest.$ac_ext >&5
22061   rm -rf conftest*
22062   ac_cv_c_const=no
22063 fi
22064 rm -f conftest*
22065 fi
22066
22067 echo "$ac_t""$ac_cv_c_const" 1>&6
22068 if test $ac_cv_c_const = no; then
22069   cat >> confdefs.h <<\EOF
22070 #define const 
22071 EOF
22072
22073 fi
22074
22075 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22076 echo "configure:22077: checking if compiler understands volatile" >&5
22077 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22078   echo $ac_n "(cached) $ac_c" 1>&6
22079 else
22080   cat > conftest.$ac_ext <<EOF
22081 #line 22082 "configure"
22082 #include "confdefs.h"
22083 int x, y, z;
22084 int main() {
22085 volatile int a; int * volatile b = x ? &y : &z;
22086       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22087       *b = 0;
22088 ; return 0; }
22089 EOF
22090 if { (eval echo configure:22091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22091   rm -rf conftest*
22092   ol_cv_c_volatile=yes
22093 else
22094   echo "configure: failed program was:" >&5
22095   cat conftest.$ac_ext >&5
22096   rm -rf conftest*
22097   ol_cv_c_volatile=no
22098 fi
22099 rm -f conftest*
22100 fi
22101
22102 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22103   if test $ol_cv_c_volatile = yes; then
22104     : 
22105   else
22106     cat >> confdefs.h <<\EOF
22107 #define volatile 
22108 EOF
22109
22110   fi
22111  
22112
22113 if test $cross_compiling = yes ; then
22114         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22115         cat >> confdefs.h <<\EOF
22116 #define CROSS_COMPILING 1
22117 EOF
22118
22119 else
22120         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22121 echo "configure:22122: checking whether byte ordering is bigendian" >&5
22122 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22123   echo $ac_n "(cached) $ac_c" 1>&6
22124 else
22125   ac_cv_c_bigendian=unknown
22126 # See if sys/param.h defines the BYTE_ORDER macro.
22127 cat > conftest.$ac_ext <<EOF
22128 #line 22129 "configure"
22129 #include "confdefs.h"
22130 #include <sys/types.h>
22131 #include <sys/param.h>
22132 int main() {
22133
22134 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22135  bogus endian macros
22136 #endif
22137 ; return 0; }
22138 EOF
22139 if { (eval echo configure:22140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22140   rm -rf conftest*
22141   # It does; now see whether it defined to BIG_ENDIAN or not.
22142 cat > conftest.$ac_ext <<EOF
22143 #line 22144 "configure"
22144 #include "confdefs.h"
22145 #include <sys/types.h>
22146 #include <sys/param.h>
22147 int main() {
22148
22149 #if BYTE_ORDER != BIG_ENDIAN
22150  not big endian
22151 #endif
22152 ; return 0; }
22153 EOF
22154 if { (eval echo configure:22155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22155   rm -rf conftest*
22156   ac_cv_c_bigendian=yes
22157 else
22158   echo "configure: failed program was:" >&5
22159   cat conftest.$ac_ext >&5
22160   rm -rf conftest*
22161   ac_cv_c_bigendian=no
22162 fi
22163 rm -f conftest*
22164 else
22165   echo "configure: failed program was:" >&5
22166   cat conftest.$ac_ext >&5
22167 fi
22168 rm -f conftest*
22169 if test $ac_cv_c_bigendian = unknown; then
22170 if test "$cross_compiling" = yes; then
22171     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22172 else
22173   cat > conftest.$ac_ext <<EOF
22174 #line 22175 "configure"
22175 #include "confdefs.h"
22176 main () {
22177   /* Are we little or big endian?  From Harbison&Steele.  */
22178   union
22179   {
22180     long l;
22181     char c[sizeof (long)];
22182   } u;
22183   u.l = 1;
22184   exit (u.c[sizeof (long) - 1] == 1);
22185 }
22186 EOF
22187 if { (eval echo configure:22188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22188 then
22189   ac_cv_c_bigendian=no
22190 else
22191   echo "configure: failed program was:" >&5
22192   cat conftest.$ac_ext >&5
22193   rm -fr conftest*
22194   ac_cv_c_bigendian=yes
22195 fi
22196 rm -fr conftest*
22197 fi
22198
22199 fi
22200 fi
22201
22202 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22203 if test $ac_cv_c_bigendian = yes; then
22204   cat >> confdefs.h <<\EOF
22205 #define WORDS_BIGENDIAN 1
22206 EOF
22207
22208 fi
22209
22210 fi
22211
22212 echo $ac_n "checking size of short""... $ac_c" 1>&6
22213 echo "configure:22214: checking size of short" >&5 
22214 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22215   echo $ac_n "(cached) $ac_c" 1>&6
22216 else
22217   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22218   cat > conftest.$ac_ext <<EOF
22219 #line 22220 "configure"
22220 #include "confdefs.h"
22221 #include "confdefs.h" 
22222 #include <stdlib.h>
22223 #include <sys/types.h> 
22224  
22225
22226 int main() {
22227 switch (0) case 0: case (sizeof (short) == $ac_size):;
22228 ; return 0; }
22229 EOF
22230 if { (eval echo configure:22231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22231   rm -rf conftest*
22232   ac_cv_sizeof_short=$ac_size
22233 else
22234   echo "configure: failed program was:" >&5
22235   cat conftest.$ac_ext >&5
22236 fi
22237 rm -f conftest* 
22238   if test x$ac_cv_sizeof_short != x ; then break; fi 
22239 done 
22240
22241 fi
22242  
22243 if test x$ac_cv_sizeof_short = x ; then 
22244   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22245 fi 
22246 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22247 cat >> confdefs.h <<EOF
22248 #define SIZEOF_SHORT $ac_cv_sizeof_short
22249 EOF
22250  
22251  
22252 echo $ac_n "checking size of int""... $ac_c" 1>&6
22253 echo "configure:22254: checking size of int" >&5 
22254 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22255   echo $ac_n "(cached) $ac_c" 1>&6
22256 else
22257   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22258   cat > conftest.$ac_ext <<EOF
22259 #line 22260 "configure"
22260 #include "confdefs.h"
22261 #include "confdefs.h" 
22262 #include <stdlib.h>
22263 #include <sys/types.h> 
22264  
22265
22266 int main() {
22267 switch (0) case 0: case (sizeof (int) == $ac_size):;
22268 ; return 0; }
22269 EOF
22270 if { (eval echo configure:22271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22271   rm -rf conftest*
22272   ac_cv_sizeof_int=$ac_size
22273 else
22274   echo "configure: failed program was:" >&5
22275   cat conftest.$ac_ext >&5
22276 fi
22277 rm -f conftest* 
22278   if test x$ac_cv_sizeof_int != x ; then break; fi 
22279 done 
22280
22281 fi
22282  
22283 if test x$ac_cv_sizeof_int = x ; then 
22284   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22285 fi 
22286 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22287 cat >> confdefs.h <<EOF
22288 #define SIZEOF_INT $ac_cv_sizeof_int
22289 EOF
22290  
22291  
22292 echo $ac_n "checking size of long""... $ac_c" 1>&6
22293 echo "configure:22294: checking size of long" >&5 
22294 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22295   echo $ac_n "(cached) $ac_c" 1>&6
22296 else
22297   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22298   cat > conftest.$ac_ext <<EOF
22299 #line 22300 "configure"
22300 #include "confdefs.h"
22301 #include "confdefs.h" 
22302 #include <stdlib.h>
22303 #include <sys/types.h> 
22304  
22305
22306 int main() {
22307 switch (0) case 0: case (sizeof (long) == $ac_size):;
22308 ; return 0; }
22309 EOF
22310 if { (eval echo configure:22311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22311   rm -rf conftest*
22312   ac_cv_sizeof_long=$ac_size
22313 else
22314   echo "configure: failed program was:" >&5
22315   cat conftest.$ac_ext >&5
22316 fi
22317 rm -f conftest* 
22318   if test x$ac_cv_sizeof_long != x ; then break; fi 
22319 done 
22320
22321 fi
22322  
22323 if test x$ac_cv_sizeof_long = x ; then 
22324   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22325 fi 
22326 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22327 cat >> confdefs.h <<EOF
22328 #define SIZEOF_LONG $ac_cv_sizeof_long
22329 EOF
22330  
22331
22332 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22333 echo "configure:22334: checking size of wchar_t" >&5 
22334 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22335   echo $ac_n "(cached) $ac_c" 1>&6
22336 else
22337   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22338   cat > conftest.$ac_ext <<EOF
22339 #line 22340 "configure"
22340 #include "confdefs.h"
22341 #include "confdefs.h" 
22342 #include <stdlib.h>
22343 #include <sys/types.h> 
22344  
22345
22346 int main() {
22347 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22348 ; return 0; }
22349 EOF
22350 if { (eval echo configure:22351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22351   rm -rf conftest*
22352   ac_cv_sizeof_wchar_t=$ac_size
22353 else
22354   echo "configure: failed program was:" >&5
22355   cat conftest.$ac_ext >&5
22356 fi
22357 rm -f conftest* 
22358   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22359 done 
22360
22361 fi
22362  
22363 if test x$ac_cv_sizeof_wchar_t = x ; then 
22364   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22365 fi 
22366 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22367 cat >> confdefs.h <<EOF
22368 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22369 EOF
22370  
22371
22372
22373 if test "$ac_cv_sizeof_int" -lt 4 ; then
22374         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22375
22376         cat >> confdefs.h <<\EOF
22377 #define LBER_INT_T long
22378 EOF
22379
22380 else
22381         cat >> confdefs.h <<\EOF
22382 #define LBER_INT_T int
22383 EOF
22384
22385 fi
22386
22387 cat >> confdefs.h <<\EOF
22388 #define LBER_LEN_T long
22389 EOF
22390
22391 cat >> confdefs.h <<\EOF
22392 #define LBER_SOCKET_T int
22393 EOF
22394
22395 cat >> confdefs.h <<\EOF
22396 #define LBER_TAG_T long
22397 EOF
22398
22399
22400 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22401 echo "configure:22402: checking for 8-bit clean memcmp" >&5
22402 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22403   echo $ac_n "(cached) $ac_c" 1>&6
22404 else
22405   if test "$cross_compiling" = yes; then
22406   ac_cv_func_memcmp_clean=no
22407 else
22408   cat > conftest.$ac_ext <<EOF
22409 #line 22410 "configure"
22410 #include "confdefs.h"
22411
22412 main()
22413 {
22414   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22415   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22416 }
22417
22418 EOF
22419 if { (eval echo configure:22420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22420 then
22421   ac_cv_func_memcmp_clean=yes
22422 else
22423   echo "configure: failed program was:" >&5
22424   cat conftest.$ac_ext >&5
22425   rm -fr conftest*
22426   ac_cv_func_memcmp_clean=no
22427 fi
22428 rm -fr conftest*
22429 fi
22430
22431 fi
22432
22433 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22434 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22435
22436 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22437 echo "configure:22438: checking for strftime" >&5
22438 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22439   echo $ac_n "(cached) $ac_c" 1>&6
22440 else
22441   cat > conftest.$ac_ext <<EOF
22442 #line 22443 "configure"
22443 #include "confdefs.h"
22444 /* System header to define __stub macros and hopefully few prototypes,
22445     which can conflict with char strftime(); below.  */
22446 #include <assert.h>
22447 /* Override any gcc2 internal prototype to avoid an error.  */
22448 /* We use char because int might match the return type of a gcc2
22449     builtin and then its argument prototype would still apply.  */
22450 char strftime();
22451 char (*f)();
22452
22453 int main() {
22454
22455 /* The GNU C library defines this for functions which it implements
22456     to always fail with ENOSYS.  Some functions are actually named
22457     something starting with __ and the normal name is an alias.  */
22458 #if defined (__stub_strftime) || defined (__stub___strftime)
22459 choke me
22460 #else
22461 f = strftime;
22462 #endif
22463
22464 ; return 0; }
22465 EOF
22466 if { (eval echo configure:22467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22467   rm -rf conftest*
22468   eval "ac_cv_func_strftime=yes"
22469 else
22470   echo "configure: failed program was:" >&5
22471   cat conftest.$ac_ext >&5
22472   rm -rf conftest*
22473   eval "ac_cv_func_strftime=no"
22474 fi
22475 rm -f conftest*
22476 fi
22477
22478 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22479   echo "$ac_t""yes" 1>&6
22480   cat >> confdefs.h <<\EOF
22481 #define HAVE_STRFTIME 1
22482 EOF
22483
22484 else
22485   echo "$ac_t""no" 1>&6
22486 # strftime is in -lintl on SCO UNIX.
22487 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22488 echo "configure:22489: checking for strftime in -lintl" >&5
22489 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22491   echo $ac_n "(cached) $ac_c" 1>&6
22492 else
22493   ac_save_LIBS="$LIBS"
22494 LIBS="-lintl  $LIBS"
22495 cat > conftest.$ac_ext <<EOF
22496 #line 22497 "configure"
22497 #include "confdefs.h"
22498 /* Override any gcc2 internal prototype to avoid an error.  */
22499 /* We use char because int might match the return type of a gcc2
22500     builtin and then its argument prototype would still apply.  */
22501 char strftime();
22502
22503 int main() {
22504 strftime()
22505 ; return 0; }
22506 EOF
22507 if { (eval echo configure:22508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22508   rm -rf conftest*
22509   eval "ac_cv_lib_$ac_lib_var=yes"
22510 else
22511   echo "configure: failed program was:" >&5
22512   cat conftest.$ac_ext >&5
22513   rm -rf conftest*
22514   eval "ac_cv_lib_$ac_lib_var=no"
22515 fi
22516 rm -f conftest*
22517 LIBS="$ac_save_LIBS"
22518
22519 fi
22520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22521   echo "$ac_t""yes" 1>&6
22522   cat >> confdefs.h <<\EOF
22523 #define HAVE_STRFTIME 1
22524 EOF
22525
22526 LIBS="-lintl $LIBS"
22527 else
22528   echo "$ac_t""no" 1>&6
22529 fi
22530
22531 fi
22532
22533
22534 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22535 echo "configure:22536: checking for inet_aton()" >&5
22536 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22537   echo $ac_n "(cached) $ac_c" 1>&6
22538 else
22539   cat > conftest.$ac_ext <<EOF
22540 #line 22541 "configure"
22541 #include "confdefs.h"
22542
22543 #ifdef HAVE_SYS_TYPES_H
22544 #       include <sys/types.h>
22545 #endif
22546 #ifdef HAVE_SYS_SOCKET_H
22547 #       include <sys/socket.h>
22548 #       ifdef HAVE_SYS_SELECT_H
22549 #               include <sys/select.h>
22550 #       endif
22551 #       include <netinet/in.h>
22552 #       ifdef HAVE_ARPA_INET_H
22553 #               include <arpa/inet.h>
22554 #       endif
22555 #endif
22556
22557 int main() {
22558 struct in_addr in;
22559 int rc = inet_aton( "255.255.255.255", &in );
22560 ; return 0; }
22561 EOF
22562 if { (eval echo configure:22563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22563   rm -rf conftest*
22564   ol_cv_func_inet_aton=yes
22565 else
22566   echo "configure: failed program was:" >&5
22567   cat conftest.$ac_ext >&5
22568   rm -rf conftest*
22569   ol_cv_func_inet_aton=no
22570 fi
22571 rm -f conftest*
22572 fi
22573
22574 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22575   if test $ol_cv_func_inet_aton != no; then
22576     cat >> confdefs.h <<\EOF
22577 #define HAVE_INET_ATON 1
22578 EOF
22579
22580   fi
22581  
22582
22583 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22584 echo "configure:22585: checking for _spawnlp" >&5
22585 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22586   echo $ac_n "(cached) $ac_c" 1>&6
22587 else
22588   cat > conftest.$ac_ext <<EOF
22589 #line 22590 "configure"
22590 #include "confdefs.h"
22591 /* System header to define __stub macros and hopefully few prototypes,
22592     which can conflict with char _spawnlp(); below.  */
22593 #include <assert.h>
22594 /* Override any gcc2 internal prototype to avoid an error.  */
22595 /* We use char because int might match the return type of a gcc2
22596     builtin and then its argument prototype would still apply.  */
22597 char _spawnlp();
22598 char (*f)();
22599
22600 int main() {
22601
22602 /* The GNU C library defines this for functions which it implements
22603     to always fail with ENOSYS.  Some functions are actually named
22604     something starting with __ and the normal name is an alias.  */
22605 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22606 choke me
22607 #else
22608 f = _spawnlp;
22609 #endif
22610
22611 ; return 0; }
22612 EOF
22613 if { (eval echo configure:22614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22614   rm -rf conftest*
22615   eval "ac_cv_func__spawnlp=yes"
22616 else
22617   echo "configure: failed program was:" >&5
22618   cat conftest.$ac_ext >&5
22619   rm -rf conftest*
22620   eval "ac_cv_func__spawnlp=no"
22621 fi
22622 rm -f conftest*
22623 fi
22624
22625 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22626   echo "$ac_t""yes" 1>&6
22627   cat >> confdefs.h <<\EOF
22628 #define HAVE_SPAWNLP 1
22629 EOF
22630
22631 else
22632   echo "$ac_t""no" 1>&6
22633 fi
22634
22635
22636 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22637 echo "configure:22638: checking for _snprintf" >&5
22638 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22639   echo $ac_n "(cached) $ac_c" 1>&6
22640 else
22641   cat > conftest.$ac_ext <<EOF
22642 #line 22643 "configure"
22643 #include "confdefs.h"
22644 /* System header to define __stub macros and hopefully few prototypes,
22645     which can conflict with char _snprintf(); below.  */
22646 #include <assert.h>
22647 /* Override any gcc2 internal prototype to avoid an error.  */
22648 /* We use char because int might match the return type of a gcc2
22649     builtin and then its argument prototype would still apply.  */
22650 char _snprintf();
22651 char (*f)();
22652
22653 int main() {
22654
22655 /* The GNU C library defines this for functions which it implements
22656     to always fail with ENOSYS.  Some functions are actually named
22657     something starting with __ and the normal name is an alias.  */
22658 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22659 choke me
22660 #else
22661 f = _snprintf;
22662 #endif
22663
22664 ; return 0; }
22665 EOF
22666 if { (eval echo configure:22667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22667   rm -rf conftest*
22668   eval "ac_cv_func__snprintf=yes"
22669 else
22670   echo "configure: failed program was:" >&5
22671   cat conftest.$ac_ext >&5
22672   rm -rf conftest*
22673   eval "ac_cv_func__snprintf=no"
22674 fi
22675 rm -f conftest*
22676 fi
22677
22678 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22679   echo "$ac_t""yes" 1>&6
22680   ac_cv_func_snprintf=yes
22681         cat >> confdefs.h <<\EOF
22682 #define snprintf _snprintf
22683 EOF
22684
22685
22686 else
22687   echo "$ac_t""no" 1>&6
22688 fi
22689
22690
22691 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22692 echo "configure:22693: checking for _vsnprintf" >&5
22693 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22694   echo $ac_n "(cached) $ac_c" 1>&6
22695 else
22696   cat > conftest.$ac_ext <<EOF
22697 #line 22698 "configure"
22698 #include "confdefs.h"
22699 /* System header to define __stub macros and hopefully few prototypes,
22700     which can conflict with char _vsnprintf(); below.  */
22701 #include <assert.h>
22702 /* Override any gcc2 internal prototype to avoid an error.  */
22703 /* We use char because int might match the return type of a gcc2
22704     builtin and then its argument prototype would still apply.  */
22705 char _vsnprintf();
22706 char (*f)();
22707
22708 int main() {
22709
22710 /* The GNU C library defines this for functions which it implements
22711     to always fail with ENOSYS.  Some functions are actually named
22712     something starting with __ and the normal name is an alias.  */
22713 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22714 choke me
22715 #else
22716 f = _vsnprintf;
22717 #endif
22718
22719 ; return 0; }
22720 EOF
22721 if { (eval echo configure:22722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22722   rm -rf conftest*
22723   eval "ac_cv_func__vsnprintf=yes"
22724 else
22725   echo "configure: failed program was:" >&5
22726   cat conftest.$ac_ext >&5
22727   rm -rf conftest*
22728   eval "ac_cv_func__vsnprintf=no"
22729 fi
22730 rm -f conftest*
22731 fi
22732
22733 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22734   echo "$ac_t""yes" 1>&6
22735   ac_cv_func_vsnprintf=yes
22736         cat >> confdefs.h <<\EOF
22737 #define vsnprintf _vsnprintf
22738 EOF
22739
22740
22741 else
22742   echo "$ac_t""no" 1>&6
22743 fi
22744
22745
22746 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22747 echo "configure:22748: checking for vprintf" >&5
22748 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22749   echo $ac_n "(cached) $ac_c" 1>&6
22750 else
22751   cat > conftest.$ac_ext <<EOF
22752 #line 22753 "configure"
22753 #include "confdefs.h"
22754 /* System header to define __stub macros and hopefully few prototypes,
22755     which can conflict with char vprintf(); below.  */
22756 #include <assert.h>
22757 /* Override any gcc2 internal prototype to avoid an error.  */
22758 /* We use char because int might match the return type of a gcc2
22759     builtin and then its argument prototype would still apply.  */
22760 char vprintf();
22761 char (*f)();
22762
22763 int main() {
22764
22765 /* The GNU C library defines this for functions which it implements
22766     to always fail with ENOSYS.  Some functions are actually named
22767     something starting with __ and the normal name is an alias.  */
22768 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22769 choke me
22770 #else
22771 f = vprintf;
22772 #endif
22773
22774 ; return 0; }
22775 EOF
22776 if { (eval echo configure:22777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22777   rm -rf conftest*
22778   eval "ac_cv_func_vprintf=yes"
22779 else
22780   echo "configure: failed program was:" >&5
22781   cat conftest.$ac_ext >&5
22782   rm -rf conftest*
22783   eval "ac_cv_func_vprintf=no"
22784 fi
22785 rm -f conftest*
22786 fi
22787
22788 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22789   echo "$ac_t""yes" 1>&6
22790   cat >> confdefs.h <<\EOF
22791 #define HAVE_VPRINTF 1
22792 EOF
22793
22794 else
22795   echo "$ac_t""no" 1>&6
22796 fi
22797
22798 if test "$ac_cv_func_vprintf" != yes; then
22799 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22800 echo "configure:22801: checking for _doprnt" >&5
22801 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22802   echo $ac_n "(cached) $ac_c" 1>&6
22803 else
22804   cat > conftest.$ac_ext <<EOF
22805 #line 22806 "configure"
22806 #include "confdefs.h"
22807 /* System header to define __stub macros and hopefully few prototypes,
22808     which can conflict with char _doprnt(); below.  */
22809 #include <assert.h>
22810 /* Override any gcc2 internal prototype to avoid an error.  */
22811 /* We use char because int might match the return type of a gcc2
22812     builtin and then its argument prototype would still apply.  */
22813 char _doprnt();
22814 char (*f)();
22815
22816 int main() {
22817
22818 /* The GNU C library defines this for functions which it implements
22819     to always fail with ENOSYS.  Some functions are actually named
22820     something starting with __ and the normal name is an alias.  */
22821 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22822 choke me
22823 #else
22824 f = _doprnt;
22825 #endif
22826
22827 ; return 0; }
22828 EOF
22829 if { (eval echo configure:22830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22830   rm -rf conftest*
22831   eval "ac_cv_func__doprnt=yes"
22832 else
22833   echo "configure: failed program was:" >&5
22834   cat conftest.$ac_ext >&5
22835   rm -rf conftest*
22836   eval "ac_cv_func__doprnt=no"
22837 fi
22838 rm -f conftest*
22839 fi
22840
22841 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22842   echo "$ac_t""yes" 1>&6
22843   cat >> confdefs.h <<\EOF
22844 #define HAVE_DOPRNT 1
22845 EOF
22846
22847 else
22848   echo "$ac_t""no" 1>&6
22849 fi
22850
22851 fi
22852
22853
22854 if test $ac_cv_func_vprintf = yes ; then
22855                 for ac_func in snprintf vsnprintf
22856 do
22857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22858 echo "configure:22859: checking for $ac_func" >&5
22859 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22860   echo $ac_n "(cached) $ac_c" 1>&6
22861 else
22862   cat > conftest.$ac_ext <<EOF
22863 #line 22864 "configure"
22864 #include "confdefs.h"
22865 /* System header to define __stub macros and hopefully few prototypes,
22866     which can conflict with char $ac_func(); below.  */
22867 #include <assert.h>
22868 /* Override any gcc2 internal prototype to avoid an error.  */
22869 /* We use char because int might match the return type of a gcc2
22870     builtin and then its argument prototype would still apply.  */
22871 char $ac_func();
22872 char (*f)();
22873
22874 int main() {
22875
22876 /* The GNU C library defines this for functions which it implements
22877     to always fail with ENOSYS.  Some functions are actually named
22878     something starting with __ and the normal name is an alias.  */
22879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22880 choke me
22881 #else
22882 f = $ac_func;
22883 #endif
22884
22885 ; return 0; }
22886 EOF
22887 if { (eval echo configure:22888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22888   rm -rf conftest*
22889   eval "ac_cv_func_$ac_func=yes"
22890 else
22891   echo "configure: failed program was:" >&5
22892   cat conftest.$ac_ext >&5
22893   rm -rf conftest*
22894   eval "ac_cv_func_$ac_func=no"
22895 fi
22896 rm -f conftest*
22897 fi
22898
22899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22900   echo "$ac_t""yes" 1>&6
22901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22902   cat >> confdefs.h <<EOF
22903 #define $ac_tr_func 1
22904 EOF
22905  
22906 else
22907   echo "$ac_t""no" 1>&6
22908 fi
22909 done
22910
22911 fi
22912
22913 for ac_func in \
22914         bcopy                   \
22915         closesocket             \
22916         chroot                  \
22917         endgrent                \
22918         endpwent                \
22919         fcntl                   \
22920         flock                   \
22921         fstat                   \
22922         getdtablesize   \
22923         getgrgid                \
22924         gethostname             \
22925         getpass                 \
22926         getpassphrase   \
22927         getpwuid                \
22928         getpwnam                \
22929         getspnam                \
22930         gettimeofday    \
22931         initgroups              \
22932         lockf                   \
22933         memcpy                  \
22934         memmove                 \
22935         mkstemp                 \
22936         mktemp                  \
22937         pipe                    \
22938         read                    \
22939         recv                    \
22940         recvfrom                \
22941         setpwfile               \
22942         setgid                  \
22943         setegid                 \
22944         setsid                  \
22945         setuid                  \
22946         seteuid                 \
22947         sigaction               \
22948         signal                  \
22949         sigset                  \
22950         strdup                  \
22951         strerror                \
22952         strpbrk                 \
22953         strrchr                 \
22954         strsep                  \
22955         strstr                  \
22956         strtol                  \
22957         strtoul                 \
22958         strtoq                  \
22959         strtouq                 \
22960         strtoll                 \
22961         strspn                  \
22962         sysconf                 \
22963         usleep                  \
22964         waitpid                 \
22965         wait4                   \
22966         write                   \
22967         send                    \
22968         sendmsg                 \
22969         sendto                  \
22970
22971 do
22972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22973 echo "configure:22974: checking for $ac_func" >&5
22974 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22975   echo $ac_n "(cached) $ac_c" 1>&6
22976 else
22977   cat > conftest.$ac_ext <<EOF
22978 #line 22979 "configure"
22979 #include "confdefs.h"
22980 /* System header to define __stub macros and hopefully few prototypes,
22981     which can conflict with char $ac_func(); below.  */
22982 #include <assert.h>
22983 /* Override any gcc2 internal prototype to avoid an error.  */
22984 /* We use char because int might match the return type of a gcc2
22985     builtin and then its argument prototype would still apply.  */
22986 char $ac_func();
22987 char (*f)();
22988
22989 int main() {
22990
22991 /* The GNU C library defines this for functions which it implements
22992     to always fail with ENOSYS.  Some functions are actually named
22993     something starting with __ and the normal name is an alias.  */
22994 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22995 choke me
22996 #else
22997 f = $ac_func;
22998 #endif
22999
23000 ; return 0; }
23001 EOF
23002 if { (eval echo configure:23003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23003   rm -rf conftest*
23004   eval "ac_cv_func_$ac_func=yes"
23005 else
23006   echo "configure: failed program was:" >&5
23007   cat conftest.$ac_ext >&5
23008   rm -rf conftest*
23009   eval "ac_cv_func_$ac_func=no"
23010 fi
23011 rm -f conftest*
23012 fi
23013
23014 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23015   echo "$ac_t""yes" 1>&6
23016     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23017   cat >> confdefs.h <<EOF
23018 #define $ac_tr_func 1
23019 EOF
23020  
23021 else
23022   echo "$ac_t""no" 1>&6
23023 fi
23024 done
23025
23026
23027 for ac_func in getopt getpeereid
23028 do
23029 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23030 echo "configure:23031: checking for $ac_func" >&5
23031 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23032   echo $ac_n "(cached) $ac_c" 1>&6
23033 else
23034   cat > conftest.$ac_ext <<EOF
23035 #line 23036 "configure"
23036 #include "confdefs.h"
23037 /* System header to define __stub macros and hopefully few prototypes,
23038     which can conflict with char $ac_func(); below.  */
23039 #include <assert.h>
23040 /* Override any gcc2 internal prototype to avoid an error.  */
23041 /* We use char because int might match the return type of a gcc2
23042     builtin and then its argument prototype would still apply.  */
23043 char $ac_func();
23044 char (*f)();
23045
23046 int main() {
23047
23048 /* The GNU C library defines this for functions which it implements
23049     to always fail with ENOSYS.  Some functions are actually named
23050     something starting with __ and the normal name is an alias.  */
23051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23052 choke me
23053 #else
23054 f = $ac_func;
23055 #endif
23056
23057 ; return 0; }
23058 EOF
23059 if { (eval echo configure:23060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23060   rm -rf conftest*
23061   eval "ac_cv_func_$ac_func=yes"
23062 else
23063   echo "configure: failed program was:" >&5
23064   cat conftest.$ac_ext >&5
23065   rm -rf conftest*
23066   eval "ac_cv_func_$ac_func=no"
23067 fi
23068 rm -f conftest*
23069 fi
23070
23071 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23072   echo "$ac_t""yes" 1>&6
23073     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23074   cat >> confdefs.h <<EOF
23075 #define $ac_tr_func 1
23076 EOF
23077  
23078 else
23079   echo "$ac_t""no" 1>&6
23080 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23081 fi
23082 done
23083
23084
23085
23086 if test "$ac_cv_func_getopt" != yes; then
23087         LIBSRCS="$LIBSRCS getopt.c"
23088 fi
23089 if test "$ac_cv_func_getpeereid" != yes; then
23090         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23091 echo "configure:23092: checking for msg_accrights in msghdr" >&5
23092 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23093   echo $ac_n "(cached) $ac_c" 1>&6
23094 else
23095   cat > conftest.$ac_ext <<EOF
23096 #line 23097 "configure"
23097 #include "confdefs.h"
23098 #include <sys/socket.h>
23099 int main() {
23100 struct msghdr m; m.msg_accrightslen=0
23101 ; return 0; }
23102 EOF
23103 if { (eval echo configure:23104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23104   rm -rf conftest*
23105   ol_cv_msghdr_msg_accrights=yes
23106 else
23107   echo "configure: failed program was:" >&5
23108   cat conftest.$ac_ext >&5
23109   rm -rf conftest*
23110   ol_cv_msghdr_msg_accrights=no
23111 fi
23112 rm -f conftest*
23113         
23114 fi
23115
23116 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23117   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23118         cat >> confdefs.h <<\EOF
23119 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23120 EOF
23121
23122   fi
23123
23124         LIBSRCS="$LIBSRCS getpeereid.c"
23125 fi
23126 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23127         if test "$ac_cv_func_snprintf" != yes; then
23128                 cat >> confdefs.h <<\EOF
23129 #define snprintf ber_pvt_snprintf
23130 EOF
23131
23132         fi
23133         if test "$ac_cv_func_vsnprintf" != yes; then
23134                 cat >> confdefs.h <<\EOF
23135 #define vsnprintf ber_pvt_vsnprintf
23136 EOF
23137
23138         fi
23139 fi
23140
23141 # Check Configuration
23142 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23143 echo "configure:23144: checking declaration of sys_errlist" >&5
23144 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23145   echo $ac_n "(cached) $ac_c" 1>&6
23146 else
23147   
23148         cat > conftest.$ac_ext <<EOF
23149 #line 23150 "configure"
23150 #include "confdefs.h"
23151
23152 #include <stdio.h>
23153 #include <sys/types.h>
23154 #include <errno.h>
23155 #ifdef WINNT
23156 #include <stdlib.h>
23157 #endif 
23158 int main() {
23159 char *c = (char *) *sys_errlist
23160 ; return 0; }
23161 EOF
23162 if { (eval echo configure:23163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23163   rm -rf conftest*
23164   ol_cv_dcl_sys_errlist=yes
23165         ol_cv_have_sys_errlist=yes
23166 else
23167   echo "configure: failed program was:" >&5
23168   cat conftest.$ac_ext >&5
23169   rm -rf conftest*
23170   ol_cv_dcl_sys_errlist=no
23171 fi
23172 rm -f conftest*
23173 fi
23174
23175 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23176 #
23177 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23178 if test $ol_cv_dcl_sys_errlist = no ; then
23179         cat >> confdefs.h <<\EOF
23180 #define DECL_SYS_ERRLIST 1
23181 EOF
23182
23183
23184         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23185 echo "configure:23186: checking existence of sys_errlist" >&5
23186 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23187   echo $ac_n "(cached) $ac_c" 1>&6
23188 else
23189   
23190                 cat > conftest.$ac_ext <<EOF
23191 #line 23192 "configure"
23192 #include "confdefs.h"
23193 #include <errno.h>
23194 int main() {
23195 char *c = (char *) *sys_errlist
23196 ; return 0; }
23197 EOF
23198 if { (eval echo configure:23199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23199   rm -rf conftest*
23200   ol_cv_have_sys_errlist=yes
23201 else
23202   echo "configure: failed program was:" >&5
23203   cat conftest.$ac_ext >&5
23204   rm -rf conftest*
23205   ol_cv_have_sys_errlist=no
23206 fi
23207 rm -f conftest*
23208 fi
23209
23210 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23211 fi
23212 if test $ol_cv_have_sys_errlist = yes ; then
23213         cat >> confdefs.h <<\EOF
23214 #define HAVE_SYS_ERRLIST 1
23215 EOF
23216
23217 fi
23218
23219
23220
23221 if test "$ol_enable_slapi" != no ; then
23222                         for ac_hdr in ltdl.h
23223 do
23224 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23225 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23226 echo "configure:23227: checking for $ac_hdr" >&5
23227 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23228   echo $ac_n "(cached) $ac_c" 1>&6
23229 else
23230   cat > conftest.$ac_ext <<EOF
23231 #line 23232 "configure"
23232 #include "confdefs.h"
23233 #include <$ac_hdr>
23234 EOF
23235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23236 { (eval echo configure:23237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23238 if test -z "$ac_err"; then
23239   rm -rf conftest*
23240   eval "ac_cv_header_$ac_safe=yes"
23241 else
23242   echo "$ac_err" >&5
23243   echo "configure: failed program was:" >&5
23244   cat conftest.$ac_ext >&5
23245   rm -rf conftest*
23246   eval "ac_cv_header_$ac_safe=no"
23247 fi
23248 rm -f conftest*
23249 fi
23250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23251   echo "$ac_t""yes" 1>&6
23252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23253   cat >> confdefs.h <<EOF
23254 #define $ac_tr_hdr 1
23255 EOF
23256  
23257 else
23258   echo "$ac_t""no" 1>&6
23259 fi
23260 done
23261
23262
23263         if test $ac_cv_header_ltdl_h != yes ; then
23264                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23265         fi
23266         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23267 echo "configure:23268: checking for lt_dlinit in -lltdl" >&5
23268 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23270   echo $ac_n "(cached) $ac_c" 1>&6
23271 else
23272   ac_save_LIBS="$LIBS"
23273 LIBS="-lltdl  $LIBS"
23274 cat > conftest.$ac_ext <<EOF
23275 #line 23276 "configure"
23276 #include "confdefs.h"
23277 /* Override any gcc2 internal prototype to avoid an error.  */
23278 /* We use char because int might match the return type of a gcc2
23279     builtin and then its argument prototype would still apply.  */
23280 char lt_dlinit();
23281
23282 int main() {
23283 lt_dlinit()
23284 ; return 0; }
23285 EOF
23286 if { (eval echo configure:23287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23287   rm -rf conftest*
23288   eval "ac_cv_lib_$ac_lib_var=yes"
23289 else
23290   echo "configure: failed program was:" >&5
23291   cat conftest.$ac_ext >&5
23292   rm -rf conftest*
23293   eval "ac_cv_lib_$ac_lib_var=no"
23294 fi
23295 rm -f conftest*
23296 LIBS="$ac_save_LIBS"
23297
23298 fi
23299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23300   echo "$ac_t""yes" 1>&6
23301   
23302                 SLAPI_LIBS=-lltdl
23303                 LIBSLAPI=libslapi.a
23304                 LIBSLAPITOOLS=../libslapi.a
23305                 cat >> confdefs.h <<\EOF
23306 #define HAVE_LIBLTDL 1
23307 EOF
23308
23309         
23310 else
23311   echo "$ac_t""no" 1>&6
23312 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23313 fi
23314
23315
23316         cat >> confdefs.h <<\EOF
23317 #define LDAP_SLAPI 1
23318 EOF
23319
23320 fi
23321
23322 if test "$ol_enable_debug" != no ; then
23323         cat >> confdefs.h <<\EOF
23324 #define LDAP_DEBUG 1
23325 EOF
23326
23327 fi
23328 if test "$ol_enable_syslog" = yes ; then
23329         cat >> confdefs.h <<\EOF
23330 #define LDAP_SYSLOG 1
23331 EOF
23332
23333 fi
23334 if test "$ol_link_kbind" != no ; then
23335         cat >> confdefs.h <<\EOF
23336 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23337 EOF
23338
23339 fi
23340 if test "$ol_enable_proctitle" != no ; then
23341         cat >> confdefs.h <<\EOF
23342 #define LDAP_PROCTITLE 1
23343 EOF
23344
23345 fi
23346 if test "$ol_enable_referrals" != no ; then
23347         cat >> confdefs.h <<\EOF
23348 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23349 EOF
23350
23351 fi
23352 if test "$ol_enable_local" != no; then
23353         cat >> confdefs.h <<\EOF
23354 #define LDAP_PF_LOCAL 1
23355 EOF
23356
23357 fi
23358 if test "$ol_link_ipv6" != no; then
23359         cat >> confdefs.h <<\EOF
23360 #define LDAP_PF_INET6 1
23361 EOF
23362
23363 fi
23364 if test "$ol_enable_cleartext" != no ; then
23365         cat >> confdefs.h <<\EOF
23366 #define SLAPD_CLEARTEXT 1
23367 EOF
23368
23369 fi
23370 if test "$ol_enable_crypt" != no ; then
23371         cat >> confdefs.h <<\EOF
23372 #define SLAPD_CRYPT 1
23373 EOF
23374
23375 fi
23376 if test "$ol_link_spasswd" != no ; then
23377         cat >> confdefs.h <<\EOF
23378 #define SLAPD_SPASSWD 1
23379 EOF
23380
23381 fi
23382 if test "$ol_enable_multimaster" != no ; then
23383         cat >> confdefs.h <<\EOF
23384 #define SLAPD_MULTIMASTER 1
23385 EOF
23386
23387 fi
23388 if test "$ol_enable_rlookups" != no ; then
23389         cat >> confdefs.h <<\EOF
23390 #define SLAPD_RLOOKUPS 1
23391 EOF
23392
23393 fi
23394 if test "$ol_enable_aci" != no ; then
23395         cat >> confdefs.h <<\EOF
23396 #define SLAPD_ACI_ENABLED 1
23397 EOF
23398
23399 fi
23400
23401 if test "$ol_link_modules" != no ; then
23402         cat >> confdefs.h <<\EOF
23403 #define SLAPD_MODULES 1
23404 EOF
23405
23406         BUILD_SLAPD=yes
23407         SLAPD_MODULES_LDFLAGS="-dlopen self"
23408 fi
23409
23410 cat >> confdefs.h <<\EOF
23411 #define SLAPD_MOD_STATIC 1
23412 EOF
23413
23414 cat >> confdefs.h <<\EOF
23415 #define SLAPD_MOD_DYNAMIC 2
23416 EOF
23417
23418
23419 if test "$ol_enable_bdb" != no ; then
23420         BUILD_SLAPD=yes
23421         BUILD_BDB=$ol_enable_bdb
23422         if test "$ol_enable_bdb" = mod ; then
23423                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23424                 MFLAG=SLAPD_MOD_DYNAMIC
23425         else
23426                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23427                 MFLAG=SLAPD_MOD_STATIC
23428         fi
23429         cat >> confdefs.h <<EOF
23430 #define SLAPD_BDB $MFLAG
23431 EOF
23432
23433 fi
23434
23435 if test "$ol_enable_dnssrv" != no ; then
23436         BUILD_SLAPD=yes
23437         BUILD_DNSSRV=$ol_enable_dnssrv
23438         if test "$ol_enable_dnssrv" = mod ; then
23439                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23440                 MFLAG=SLAPD_MOD_DYNAMIC
23441         else
23442                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23443                 MFLAG=SLAPD_MOD_STATIC
23444         fi
23445         cat >> confdefs.h <<EOF
23446 #define SLAPD_DNSSRV $MFLAG
23447 EOF
23448
23449 fi
23450
23451 if test "$ol_enable_hdb" != no ; then
23452         BUILD_SLAPD=yes
23453         BUILD_HDB=$ol_enable_hdb
23454         if test "$ol_enable_hdb" = mod ; then
23455                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23456                 MFLAG=SLAPD_MOD_DYNAMIC
23457         else
23458                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23459                 MFLAG=SLAPD_MOD_STATIC
23460         fi
23461         cat >> confdefs.h <<EOF
23462 #define SLAPD_HDB $MFLAG
23463 EOF
23464
23465 fi
23466
23467 if test "$ol_enable_ldap" != no ; then
23468         BUILD_SLAPD=yes
23469         BUILD_LDAP=$ol_enable_ldap
23470         if test "$ol_enable_ldap" = mod ; then
23471                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23472                 MFLAG=SLAPD_MOD_DYNAMIC
23473         else
23474                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23475                 MFLAG=SLAPD_MOD_STATIC
23476         fi
23477         cat >> confdefs.h <<EOF
23478 #define SLAPD_LDAP $MFLAG
23479 EOF
23480
23481 fi
23482
23483 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23484         BUILD_SLAPD=yes
23485         BUILD_LDBM=$ol_enable_ldbm
23486         if test "$ol_enable_ldbm" = mod ; then
23487                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23488                 MFLAG=SLAPD_MOD_DYNAMIC
23489         else
23490                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23491                 MFLAG=SLAPD_MOD_STATIC
23492         fi
23493         cat >> confdefs.h <<EOF
23494 #define SLAPD_LDBM $MFLAG
23495 EOF
23496
23497 fi
23498
23499 if test "$ol_enable_meta" != no ; then
23500         BUILD_SLAPD=yes
23501         BUILD_META=$ol_enable_meta
23502         BUILD_REWRITE=yes
23503         if test "$ol_enable_meta" = mod ; then
23504                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23505                 MFLAG=SLAPD_MOD_DYNAMIC
23506         else
23507                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23508                 MFLAG=SLAPD_MOD_STATIC
23509         fi
23510         cat >> confdefs.h <<EOF
23511 #define SLAPD_META $MFLAG
23512 EOF
23513
23514 fi
23515
23516 if test "$ol_enable_monitor" != no ; then
23517         BUILD_SLAPD=yes
23518         BUILD_MONITOR=$ol_enable_monitor
23519         if test "$ol_enable_monitor" = mod ; then
23520                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23521                 MFLAG=SLAPD_MOD_DYNAMIC
23522         else
23523                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23524                 MFLAG=SLAPD_MOD_STATIC
23525         fi
23526         cat >> confdefs.h <<EOF
23527 #define SLAPD_MONITOR $MFLAG
23528 EOF
23529
23530 fi
23531
23532 if test "$ol_enable_null" != no ; then
23533         BUILD_SLAPD=yes
23534         BUILD_NULL=$ol_enable_null
23535         if test "$ol_enable_null" = mod ; then
23536                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23537                 MFLAG=SLAPD_MOD_DYNAMIC
23538         else
23539                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23540                 MFLAG=SLAPD_MOD_STATIC
23541         fi
23542         cat >> confdefs.h <<EOF
23543 #define SLAPD_NULL $MFLAG
23544 EOF
23545
23546 fi
23547
23548 if test "$ol_enable_passwd" != no ; then
23549         BUILD_SLAPD=yes
23550         BUILD_PASSWD=$ol_enable_passwd
23551         if test "$ol_enable_passwd" = mod ; then
23552                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23553                 MFLAG=SLAPD_MOD_DYNAMIC
23554         else
23555                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23556                 MFLAG=SLAPD_MOD_STATIC
23557         fi
23558         cat >> confdefs.h <<EOF
23559 #define SLAPD_PASSWD $MFLAG
23560 EOF
23561
23562 fi
23563
23564 if test "$ol_link_perl" != no ; then
23565         BUILD_SLAPD=yes
23566         BUILD_PERL=$ol_enable_perl
23567         if test "$ol_enable_perl" = mod ; then
23568                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23569                 MFLAG=SLAPD_MOD_DYNAMIC
23570         else
23571                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23572                 MFLAG=SLAPD_MOD_STATIC
23573         fi
23574         cat >> confdefs.h <<EOF
23575 #define SLAPD_PERL $MFLAG
23576 EOF
23577
23578 fi
23579
23580 if test "$ol_enable_relay" != no ; then
23581         BUILD_SLAPD=yes
23582         BUILD_RELAY=$ol_enable_relay
23583         if test "$ol_enable_relay" = mod ; then
23584                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23585                 MFLAG=SLAPD_MOD_DYNAMIC
23586         else
23587                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23588                 MFLAG=SLAPD_MOD_STATIC
23589         fi
23590         cat >> confdefs.h <<EOF
23591 #define SLAPD_RELAY $MFLAG
23592 EOF
23593
23594 fi
23595
23596 if test "$ol_enable_shell" != no ; then
23597         if test "$ol_link_thread" != no ; then
23598                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23599         fi
23600         BUILD_SLAPD=yes
23601         BUILD_SHELL=$ol_enable_shell
23602         if test "$ol_enable_shell" = mod ; then
23603                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23604                 MFLAG=SLAPD_MOD_DYNAMIC
23605         else
23606                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23607                 MFLAG=SLAPD_MOD_STATIC
23608         fi
23609         cat >> confdefs.h <<EOF
23610 #define SLAPD_SHELL $MFLAG
23611 EOF
23612
23613 fi
23614
23615 if test "$ol_link_sql" != no ; then
23616         BUILD_SLAPD=yes
23617         BUILD_SQL=$ol_enable_sql
23618         if test "$ol_enable_sql" = mod; then
23619                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23620                 MFLAG=SLAPD_MOD_DYNAMIC
23621         else
23622                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23623                 MFLAG=SLAPD_MOD_STATIC
23624         fi
23625         cat >> confdefs.h <<EOF
23626 #define SLAPD_SQL $MFLAG
23627 EOF
23628
23629 fi
23630
23631 if test "$ol_enable_chain" != no ; then
23632         BUILD_CHAIN=$ol_enable_chain
23633         if test "$ol_enable_chain" = mod ; then
23634                 MFLAG=SLAPD_MOD_DYNAMIC
23635                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23636         else
23637                 MFLAG=SLAPD_MOD_STATIC
23638         fi
23639         cat >> confdefs.h <<EOF
23640 #define SLAPD_OVER_CHAIN $MFLAG
23641 EOF
23642
23643 fi
23644
23645 if test "$ol_enable_denyop" != no ; then
23646         BUILD_DENYOP=$ol_enable_denyop
23647         if test "$ol_enable_denyop" = mod ; then
23648                 MFLAG=SLAPD_MOD_DYNAMIC
23649                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23650         else
23651                 MFLAG=SLAPD_MOD_STATIC
23652         fi
23653         cat >> confdefs.h <<EOF
23654 #define SLAPD_OVER_DENYOP $MFLAG
23655 EOF
23656
23657 fi
23658
23659 if test "$ol_enable_dyngroup" != no ; then
23660         BUILD_DYNGROUP=$ol_enable_dyngroup
23661         if test "$ol_enable_dyngroup" = mod ; then
23662                 MFLAG=SLAPD_MOD_DYNAMIC
23663                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23664         else
23665                 MFLAG=SLAPD_MOD_STATIC
23666         fi
23667         cat >> confdefs.h <<EOF
23668 #define SLAPD_OVER_DYNGROUP $MFLAG
23669 EOF
23670
23671 fi
23672
23673 if test "$ol_enable_lastmod" != no ; then
23674         BUILD_LASTMOD=$ol_enable_lastmod
23675         if test "$ol_enable_lastmod" = mod ; then
23676                 MFLAG=SLAPD_MOD_DYNAMIC
23677                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23678         else
23679                 MFLAG=SLAPD_MOD_STATIC
23680         fi
23681         cat >> confdefs.h <<EOF
23682 #define SLAPD_OVER_LASTMOD $MFLAG
23683 EOF
23684
23685 fi
23686
23687 if test "$ol_enable_ppolicy" != no ; then
23688         BUILD_PPOLICY=$ol_enable_ppolicy
23689         if test "$ol_enable_ppolicy" = mod ; then
23690                 MFLAG=SLAPD_MOD_DYNAMIC
23691                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23692         else
23693                 MFLAG=SLAPD_MOD_STATIC
23694         fi
23695         cat >> confdefs.h <<EOF
23696 #define SLAPD_OVER_PPOLICY $MFLAG
23697 EOF
23698
23699 fi
23700
23701 if test "$ol_enable_proxycache" != no ; then
23702         BUILD_PROXYCACHE=$ol_enable_proxycache
23703         if test "$ol_enable_proxycache" = mod ; then
23704                 MFLAG=SLAPD_MOD_DYNAMIC
23705                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23706         else
23707                 MFLAG=SLAPD_MOD_STATIC
23708         fi
23709         cat >> confdefs.h <<EOF
23710 #define SLAPD_OVER_PROXYCACHE $MFLAG
23711 EOF
23712
23713 fi
23714
23715 if test "$ol_enable_refint" != no ; then
23716         BUILD_REFINT=$ol_enable_refint
23717         if test "$ol_enable_refint" = mod ; then
23718                 MFLAG=SLAPD_MOD_DYNAMIC
23719                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
23720         else
23721                 MFLAG=SLAPD_MOD_STATIC
23722         fi
23723         cat >> confdefs.h <<EOF
23724 #define SLAPD_OVER_REFINT $MFLAG
23725 EOF
23726
23727 fi
23728
23729 if test "$ol_enable_rwm" != no ; then
23730         BUILD_REWRITE=yes
23731         BUILD_RWM=$ol_enable_rwm
23732         if test "$ol_enable_rwm" = mod ; then
23733                 MFLAG=SLAPD_MOD_DYNAMIC
23734                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23735         else
23736                 MFLAG=SLAPD_MOD_STATIC
23737         fi
23738         cat >> confdefs.h <<EOF
23739 #define SLAPD_OVER_RWM $MFLAG
23740 EOF
23741
23742 fi
23743
23744 if test "$ol_enable_unique" != no ; then
23745         BUILD_UNIQUE=$ol_enable_unique
23746         if test "$ol_enable_unique" = mod ; then
23747                 MFLAG=SLAPD_MOD_DYNAMIC
23748                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
23749         else
23750                 MFLAG=SLAPD_MOD_STATIC
23751         fi
23752         cat >> confdefs.h <<EOF
23753 #define SLAPD_OVER_UNIQUE $MFLAG
23754 EOF
23755
23756 fi
23757
23758 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23759         $BUILD_SLAPD = yes ; then
23760         BUILD_SLURPD=yes
23761 fi
23762
23763 if test "$ol_enable_rewrite" != no ; then
23764         cat >> confdefs.h <<\EOF
23765 #define ENABLE_REWRITE 1
23766 EOF
23767
23768         BUILD_REWRITE=yes
23769 fi
23770
23771 if test "$ol_enable_slapi" != no ; then
23772         cat >> confdefs.h <<\EOF
23773 #define ENABLE_SLAPI 1
23774 EOF
23775
23776         BUILD_SLAPI=yes
23777         SLAPD_SLAPI_DEPEND=libslapi.a
23778 fi
23779
23780
23781
23782 if test "$ac_cv_mingw32" = yes ; then
23783         PLAT=NT
23784         SLAPD_MODULES_LDFLAGS=
23785 else
23786         PLAT=UNIX
23787 fi
23788
23789 if test -z "$SLAPD_STATIC_BACKENDS"; then
23790         SLAPD_NO_STATIC='#'
23791 else
23792         SLAPD_NO_STATIC=
23793 fi
23794
23795
23796
23797
23798
23799
23800
23801   
23802   
23803   
23804   
23805   
23806   
23807   
23808   
23809   
23810   
23811   
23812   
23813   
23814   
23815   
23816   
23817   
23818   
23819   
23820   
23821   
23822   
23823   
23824   
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863 # Check whether --with-xxinstall or --without-xxinstall was given.
23864 if test "${with_xxinstall+set}" = set; then
23865   withval="$with_xxinstall"
23866   :
23867 fi
23868
23869
23870
23871 trap '' 1 2 15
23872
23873 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23874
23875 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23876 # Let make expand exec_prefix.
23877 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23878
23879 # Any assignment to VPATH causes Sun make to only execute
23880 # the first set of double-colon rules, so remove it if not needed.
23881 # If there is a colon in the path, we need to keep it.
23882 if test "x$srcdir" = x.; then
23883   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23884 fi
23885
23886 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23887
23888 DEFS=-DHAVE_CONFIG_H
23889
23890 # Without the "./", some shells look in PATH for config.status.
23891 : ${CONFIG_STATUS=./config.status}
23892
23893 echo creating $CONFIG_STATUS
23894 rm -f $CONFIG_STATUS
23895 cat > $CONFIG_STATUS <<EOF
23896 #! /bin/sh
23897 # Generated automatically by configure.
23898 # Run this file to recreate the current configuration.
23899 # This directory was configured as follows,
23900 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23901 #
23902 # $0 $ac_configure_args
23903 #
23904 # Compiler output produced by configure, useful for debugging
23905 # configure, is in ./config.log if it exists.
23906
23907 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23908 for ac_option
23909 do
23910   case "\$ac_option" in
23911   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23912     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23913     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23914   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23915     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23916     exit 0 ;;
23917   -help | --help | --hel | --he | --h)
23918     echo "\$ac_cs_usage"; exit 0 ;;
23919   *) echo "\$ac_cs_usage"; exit 1 ;;
23920   esac
23921 done
23922
23923 ac_given_srcdir=$srcdir
23924 ac_given_INSTALL="$INSTALL"
23925
23926 trap 'rm -fr `echo "\
23927 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23928 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23929 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23930 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23931 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23932 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23933 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23934 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23935 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23936 include/Makefile:build/top.mk:include/Makefile.in \
23937 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23938 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23939 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23940 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23941 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23942 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23943 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23944 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23945 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23946 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23947 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23948 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23949 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23950 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23951 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23952 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23953 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23954 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23955 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23956 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
23957 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23958 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23959 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23960 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23961 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23962 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23963 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23964 tests/run \
23965 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23966  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23967 EOF
23968 cat >> $CONFIG_STATUS <<EOF
23969
23970 # Protect against being on the right side of a sed subst in config.status.
23971 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23972  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23973 $ac_vpsub
23974 $extrasub
23975 s%@SHELL@%$SHELL%g
23976 s%@CFLAGS@%$CFLAGS%g
23977 s%@CPPFLAGS@%$CPPFLAGS%g
23978 s%@CXXFLAGS@%$CXXFLAGS%g
23979 s%@FFLAGS@%$FFLAGS%g
23980 s%@DEFS@%$DEFS%g
23981 s%@LDFLAGS@%$LDFLAGS%g
23982 s%@LIBS@%$LIBS%g
23983 s%@exec_prefix@%$exec_prefix%g
23984 s%@prefix@%$prefix%g
23985 s%@program_transform_name@%$program_transform_name%g
23986 s%@bindir@%$bindir%g
23987 s%@sbindir@%$sbindir%g
23988 s%@libexecdir@%$libexecdir%g
23989 s%@datadir@%$datadir%g
23990 s%@sysconfdir@%$sysconfdir%g
23991 s%@sharedstatedir@%$sharedstatedir%g
23992 s%@localstatedir@%$localstatedir%g
23993 s%@libdir@%$libdir%g
23994 s%@includedir@%$includedir%g
23995 s%@oldincludedir@%$oldincludedir%g
23996 s%@infodir@%$infodir%g
23997 s%@mandir@%$mandir%g
23998 s%@host@%$host%g
23999 s%@host_alias@%$host_alias%g
24000 s%@host_cpu@%$host_cpu%g
24001 s%@host_vendor@%$host_vendor%g
24002 s%@host_os@%$host_os%g
24003 s%@target@%$target%g
24004 s%@target_alias@%$target_alias%g
24005 s%@target_cpu@%$target_cpu%g
24006 s%@target_vendor@%$target_vendor%g
24007 s%@target_os@%$target_os%g
24008 s%@build@%$build%g
24009 s%@build_alias@%$build_alias%g
24010 s%@build_cpu@%$build_cpu%g
24011 s%@build_vendor@%$build_vendor%g
24012 s%@build_os@%$build_os%g
24013 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24014 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24015 s%@INSTALL_DATA@%$INSTALL_DATA%g
24016 s%@PACKAGE@%$PACKAGE%g
24017 s%@VERSION@%$VERSION%g
24018 s%@ACLOCAL@%$ACLOCAL%g
24019 s%@AUTOCONF@%$AUTOCONF%g
24020 s%@AUTOMAKE@%$AUTOMAKE%g
24021 s%@AUTOHEADER@%$AUTOHEADER%g
24022 s%@MAKEINFO@%$MAKEINFO%g
24023 s%@install_sh@%$install_sh%g
24024 s%@AMTAR@%$AMTAR%g
24025 s%@AWK@%$AWK%g
24026 s%@AMTARFLAGS@%$AMTARFLAGS%g
24027 s%@SET_MAKE@%$SET_MAKE%g
24028 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24029 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24030 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24031 s%@top_builddir@%$top_builddir%g
24032 s%@ldap_subdir@%$ldap_subdir%g
24033 s%@CC@%$CC%g
24034 s%@AR@%$AR%g
24035 s%@LN_S@%$LN_S%g
24036 s%@OBJEXT@%$OBJEXT%g
24037 s%@EXEEXT@%$EXEEXT%g
24038 s%@ECHO@%$ECHO%g
24039 s%@RANLIB@%$RANLIB%g
24040 s%@STRIP@%$STRIP%g
24041 s%@DLLTOOL@%$DLLTOOL%g
24042 s%@AS@%$AS%g
24043 s%@OBJDUMP@%$OBJDUMP%g
24044 s%@CPP@%$CPP%g
24045 s%@LIBTOOL@%$LIBTOOL%g
24046 s%@LN_H@%$LN_H%g
24047 s%@PERLBIN@%$PERLBIN%g
24048 s%@OL_MKDEP@%$OL_MKDEP%g
24049 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24050 s%@LTSTATIC@%$LTSTATIC%g
24051 s%@LIBOBJS@%$LIBOBJS%g
24052 s%@LIBSRCS@%$LIBSRCS%g
24053 s%@PLAT@%$PLAT%g
24054 s%@WITH_TLS@%$WITH_TLS%g
24055 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24056 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24057 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24058 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24059 s%@BUILD_BDB@%$BUILD_BDB%g
24060 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24061 s%@BUILD_HDB@%$BUILD_HDB%g
24062 s%@BUILD_LDAP@%$BUILD_LDAP%g
24063 s%@BUILD_LDBM@%$BUILD_LDBM%g
24064 s%@BUILD_META@%$BUILD_META%g
24065 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24066 s%@BUILD_NULL@%$BUILD_NULL%g
24067 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24068 s%@BUILD_RELAY@%$BUILD_RELAY%g
24069 s%@BUILD_PERL@%$BUILD_PERL%g
24070 s%@BUILD_SHELL@%$BUILD_SHELL%g
24071 s%@BUILD_SQL@%$BUILD_SQL%g
24072 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24073 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24074 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24075 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24076 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24077 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24078 s%@BUILD_REFINT@%$BUILD_REFINT%g
24079 s%@BUILD_RWM@%$BUILD_RWM%g
24080 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24081 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24082 s%@LDAP_LIBS@%$LDAP_LIBS%g
24083 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24084 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24085 s%@LDBM_LIBS@%$LDBM_LIBS%g
24086 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24087 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24088 s%@WRAP_LIBS@%$WRAP_LIBS%g
24089 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24090 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24091 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24092 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24093 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24094 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24095 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24096 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24097 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24098 s%@KRB4_LIBS@%$KRB4_LIBS%g
24099 s%@KRB5_LIBS@%$KRB5_LIBS%g
24100 s%@SASL_LIBS@%$SASL_LIBS%g
24101 s%@TLS_LIBS@%$TLS_LIBS%g
24102 s%@MODULES_LIBS@%$MODULES_LIBS%g
24103 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24104 s%@LIBSLAPI@%$LIBSLAPI%g
24105 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24106 s%@AUTH_LIBS@%$AUTH_LIBS%g
24107 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24108 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24109 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24110 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24111
24112 CEOF
24113 EOF
24114
24115 cat >> $CONFIG_STATUS <<\EOF
24116
24117 # Split the substitutions into bite-sized pieces for seds with
24118 # small command number limits, like on Digital OSF/1 and HP-UX.
24119 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24120 ac_file=1 # Number of current file.
24121 ac_beg=1 # First line for current file.
24122 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24123 ac_more_lines=:
24124 ac_sed_cmds=""
24125 while $ac_more_lines; do
24126   if test $ac_beg -gt 1; then
24127     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24128   else
24129     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24130   fi
24131   if test ! -s conftest.s$ac_file; then
24132     ac_more_lines=false
24133     rm -f conftest.s$ac_file
24134   else
24135     if test -z "$ac_sed_cmds"; then
24136       ac_sed_cmds="sed -f conftest.s$ac_file"
24137     else
24138       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24139     fi
24140     ac_file=`expr $ac_file + 1`
24141     ac_beg=$ac_end
24142     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24143   fi
24144 done
24145 if test -z "$ac_sed_cmds"; then
24146   ac_sed_cmds=cat
24147 fi
24148 EOF
24149
24150 cat >> $CONFIG_STATUS <<EOF
24151
24152 CONFIG_FILES=\${CONFIG_FILES-"\
24153 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24154 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24155 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24156 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24157 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24158 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24159 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24160 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24161 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24162 include/Makefile:build/top.mk:include/Makefile.in \
24163 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24164 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24165 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24166 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24167 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24168 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24169 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24170 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24171 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24172 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24173 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24174 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24175 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24176 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24177 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24178 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24179 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24180 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24181 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24182 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24183 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24184 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24185 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24186 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24187 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24188 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24189 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24190 tests/run \
24191 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24192 "}
24193 EOF
24194 cat >> $CONFIG_STATUS <<\EOF
24195 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24196   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24197   case "$ac_file" in
24198   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24199        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24200   *) ac_file_in="${ac_file}.in" ;;
24201   esac
24202
24203   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24204
24205   # Remove last slash and all that follows it.  Not all systems have dirname.
24206   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24207   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24208     # The file is in a subdirectory.
24209     test ! -d "$ac_dir" && mkdir "$ac_dir"
24210     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24211     # A "../" for each directory in $ac_dir_suffix.
24212     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24213   else
24214     ac_dir_suffix= ac_dots=
24215   fi
24216
24217   case "$ac_given_srcdir" in
24218   .)  srcdir=.
24219       if test -z "$ac_dots"; then top_srcdir=.
24220       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24221   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24222   *) # Relative path.
24223     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24224     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24225   esac
24226
24227   case "$ac_given_INSTALL" in
24228   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24229   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24230   esac
24231
24232   echo creating "$ac_file"
24233   rm -f "$ac_file"
24234   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24235   case "$ac_file" in
24236   *[Mm]akefile*) ac_comsub="1i\\
24237 # $configure_input" ;;
24238   *) ac_comsub= ;;
24239   esac
24240
24241   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24242   sed -e "$ac_comsub
24243 s%@configure_input@%$configure_input%g
24244 s%@srcdir@%$srcdir%g
24245 s%@top_srcdir@%$top_srcdir%g
24246 s%@INSTALL@%$INSTALL%g
24247 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24248 fi; done
24249 rm -f conftest.s*
24250
24251 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24252 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24253 #
24254 # ac_d sets the value in "#define NAME VALUE" lines.
24255 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24256 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24257 ac_dC='\3'
24258 ac_dD='%g'
24259 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24260 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24261 ac_uB='\([      ]\)%\1#\2define\3'
24262 ac_uC=' '
24263 ac_uD='\4%g'
24264 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24265 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24266 ac_eB='$%\1#\2define\3'
24267 ac_eC=' '
24268 ac_eD='%g'
24269
24270 if test "${CONFIG_HEADERS+set}" != set; then
24271 EOF
24272 cat >> $CONFIG_STATUS <<EOF
24273   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24274 EOF
24275 cat >> $CONFIG_STATUS <<\EOF
24276 fi
24277 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24278   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24279   case "$ac_file" in
24280   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24281        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24282   *) ac_file_in="${ac_file}.in" ;;
24283   esac
24284
24285   echo creating $ac_file
24286
24287   rm -f conftest.frag conftest.in conftest.out
24288   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24289   cat $ac_file_inputs > conftest.in
24290
24291 EOF
24292
24293 # Transform confdefs.h into a sed script conftest.vals that substitutes
24294 # the proper values into config.h.in to produce config.h.  And first:
24295 # Protect against being on the right side of a sed subst in config.status.
24296 # Protect against being in an unquoted here document in config.status.
24297 rm -f conftest.vals
24298 cat > conftest.hdr <<\EOF
24299 s/[\\&%]/\\&/g
24300 s%[\\$`]%\\&%g
24301 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24302 s%ac_d%ac_u%gp
24303 s%ac_u%ac_e%gp
24304 EOF
24305 sed -n -f conftest.hdr confdefs.h > conftest.vals
24306 rm -f conftest.hdr
24307
24308 # This sed command replaces #undef with comments.  This is necessary, for
24309 # example, in the case of _POSIX_SOURCE, which is predefined and required
24310 # on some systems where configure will not decide to define it.
24311 cat >> conftest.vals <<\EOF
24312 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24313 EOF
24314
24315 # Break up conftest.vals because some shells have a limit on
24316 # the size of here documents, and old seds have small limits too.
24317
24318 rm -f conftest.tail
24319 while :
24320 do
24321   ac_lines=`grep -c . conftest.vals`
24322   # grep -c gives empty output for an empty file on some AIX systems.
24323   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24324   # Write a limited-size here document to conftest.frag.
24325   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24326   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24327   echo 'CEOF
24328   sed -f conftest.frag conftest.in > conftest.out
24329   rm -f conftest.in
24330   mv conftest.out conftest.in
24331 ' >> $CONFIG_STATUS
24332   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24333   rm -f conftest.vals
24334   mv conftest.tail conftest.vals
24335 done
24336 rm -f conftest.vals
24337
24338 cat >> $CONFIG_STATUS <<\EOF
24339   rm -f conftest.frag conftest.h
24340   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24341   cat conftest.in >> conftest.h
24342   rm -f conftest.in
24343   if cmp -s $ac_file conftest.h 2>/dev/null; then
24344     echo "$ac_file is unchanged"
24345     rm -f conftest.h
24346   else
24347     # Remove last slash and all that follows it.  Not all systems have dirname.
24348       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24349       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24350       # The file is in a subdirectory.
24351       test ! -d "$ac_dir" && mkdir "$ac_dir"
24352     fi
24353     rm -f $ac_file
24354     mv conftest.h $ac_file
24355   fi
24356 fi; done
24357
24358 EOF
24359 cat >> $CONFIG_STATUS <<EOF
24360
24361 EOF
24362 cat >> $CONFIG_STATUS <<\EOF
24363
24364 chmod +x tests/run
24365 date > stamp-h
24366 echo Please run \"make depend\" to build dependencies
24367
24368 exit 0
24369 EOF
24370 chmod +x $CONFIG_STATUS
24371 rm -fr confdefs* $ac_clean_files
24372 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24373