]> git.sur5r.net Git - openldap/blob - configure
more memleaks fixed; some cleanup
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.491 2003/10/21 01:08:34 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-threads          with threads [auto]"
50 ac_help="$ac_help
51   --with-tls              with TLS/SSL support [auto]"
52 ac_help="$ac_help
53   --with-yielding-select  with implicitly yielding select [auto]"
54 ac_help="$ac_help
55
56 SLAPD (Standalone LDAP Daemon) Options:"
57 ac_help="$ac_help
58   --enable-slapd          enable building slapd [yes]"
59 ac_help="$ac_help
60     --enable-aci          enable per-object ACIs (experimental) [no]"
61 ac_help="$ac_help
62     --enable-cleartext    enable cleartext passwords [yes]"
63 ac_help="$ac_help
64     --enable-crypt        enable crypt(3) passwords [no]"
65 ac_help="$ac_help
66     --enable-lmpasswd     enable LAN Manager passwords [no]"
67 ac_help="$ac_help
68     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
69 ac_help="$ac_help
70     --enable-modules      enable dynamic module support [no]"
71 ac_help="$ac_help
72     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
73 ac_help="$ac_help
74     --enable-rlookups     enable reverse lookups of client hostnames [no]"
75 ac_help="$ac_help
76     --enable-slapi        enable SLAPI support (experimental) [no]"
77 ac_help="$ac_help
78     --enable-slp          enable SLPv2 support [no]"
79 ac_help="$ac_help
80     --enable-wrappers     enable tcp wrapper support [no]"
81 ac_help="$ac_help
82     --enable-bdb          enable Berkeley DB backend [yes]"
83 ac_help="$ac_help
84     --with-bdb-module     module type static|dynamic [static]"
85 ac_help="$ac_help
86     --enable-dnssrv       enable dnssrv backend [no]"
87 ac_help="$ac_help
88     --with-dnssrv-module  module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-hdb          enable Hierarchical DB backend [no]"
91 ac_help="$ac_help
92     --with-hdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend [no]"
95 ac_help="$ac_help
96     --with-ldap-module    module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend [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-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
105 ac_help="$ac_help
106     --enable-meta         enable metadirectory backend [no]"
107 ac_help="$ac_help
108     --with-meta-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend [yes]"
111 ac_help="$ac_help
112     --with-monitor-module module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-null         enable null backend [no]"
115 ac_help="$ac_help
116     --with-null-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-passwd       enable passwd backend [no]"
119 ac_help="$ac_help
120     --with-passwd-module  module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-perl         enable perl backend [no]"
123 ac_help="$ac_help
124     --with-perl-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-shell        enable shell backend [no]"
127 ac_help="$ac_help
128     --with-shell-module   module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-sql          enable sql backend [no]"
131 ac_help="$ac_help
132     --with-sql-module     module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-tcl          enable tcl backend [no]"
135 ac_help="$ac_help
136     --with-tcl-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138
139 SLURPD (Replication Daemon) Options:"
140 ac_help="$ac_help
141   --enable-slurpd         enable building slurpd [auto]"
142 ac_help="$ac_help
143
144 Library Generation & Linking Options"
145 ac_help="$ac_help
146   --enable-static[=PKGS]  build static libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-shared[=PKGS]  build shared libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
151 ac_help="$ac_help
152   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
153
154 # Find the correct PATH separator.  Usually this is `:', but
155 # DJGPP uses `;' like DOS.
156 if test "X${PATH_SEPARATOR+set}" != Xset; then
157   UNAME=${UNAME-`uname 2>/dev/null`}
158   case X$UNAME in
159     *-DOS) lt_cv_sys_path_separator=';' ;;
160     *)     lt_cv_sys_path_separator=':' ;;
161   esac
162   PATH_SEPARATOR=$lt_cv_sys_path_separator
163 fi
164
165
166 # Check that we are running under the correct shell.
167 SHELL=${CONFIG_SHELL-/bin/sh}
168
169 case X$ECHO in
170 X*--fallback-echo)
171   # Remove one level of quotation (which was required for Make).
172   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
173   ;;
174 esac
175
176 echo=${ECHO-echo}
177 if test "X$1" = X--no-reexec; then
178   # Discard the --no-reexec flag, and continue.
179   shift
180 elif test "X$1" = X--fallback-echo; then
181   # Avoid inline document here, it may be left over
182   :
183 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
184   # Yippee, $echo works!
185   :
186 else
187   # Restart under the correct shell.
188   exec $SHELL "$0" --no-reexec ${1+"$@"}
189 fi
190
191 if test "X$1" = X--fallback-echo; then
192   # used as fallback echo
193   shift
194   cat <<EOF
195
196 EOF
197   exit 0
198 fi
199
200 # The HP-UX ksh and POSIX shell print the target directory to stdout
201 # if CDPATH is set.
202 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
203
204 if test -z "$ECHO"; then
205 if test "X${echo_test_string+set}" != Xset; then
206 # find a string as large as possible, as long as the shell can cope with it
207   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
208     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
209     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
210        echo_test_string="`eval $cmd`" &&
211        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
212     then
213       break
214     fi
215   done
216 fi
217
218 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
219    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
220    test "X$echo_testing_string" = "X$echo_test_string"; then
221   :
222 else
223   # The Solaris, AIX, and Digital Unix default echo programs unquote
224   # backslashes.  This makes it impossible to quote backslashes using
225   #   echo "$something" | sed 's/\\/\\\\/g'
226   #
227   # So, first we look for a working echo in the user's PATH.
228
229   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
230   for dir in $PATH /usr/ucb; do
231     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
232        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
233        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
234        test "X$echo_testing_string" = "X$echo_test_string"; then
235       echo="$dir/echo"
236       break
237     fi
238   done
239   IFS="$save_ifs"
240
241   if test "X$echo" = Xecho; then
242     # We didn't find a better echo, so look for alternatives.
243     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
244        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
245        test "X$echo_testing_string" = "X$echo_test_string"; then
246       # This shell has a builtin print -r that does the trick.
247       echo='print -r'
248     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
249          test "X$CONFIG_SHELL" != X/bin/ksh; then
250       # If we have ksh, try running configure again with it.
251       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
252       export ORIGINAL_CONFIG_SHELL
253       CONFIG_SHELL=/bin/ksh
254       export CONFIG_SHELL
255       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
256     else
257       # Try using printf.
258       echo='printf %s\n'
259       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
260          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
261          test "X$echo_testing_string" = "X$echo_test_string"; then
262         # Cool, printf works
263         :
264       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
265            test "X$echo_testing_string" = 'X\t' &&
266            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
267            test "X$echo_testing_string" = "X$echo_test_string"; then
268         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
269         export CONFIG_SHELL
270         SHELL="$CONFIG_SHELL"
271         export SHELL
272         echo="$CONFIG_SHELL $0 --fallback-echo"
273       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       else
279         # maybe with a smaller string...
280         prev=:
281
282         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
283           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
284           then
285             break
286           fi
287           prev="$cmd"
288         done
289
290         if test "$prev" != 'sed 50q "$0"'; then
291           echo_test_string=`eval $prev`
292           export echo_test_string
293           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
294         else
295           # Oops.  We lost completely, so just stick with echo.
296           echo=echo
297         fi
298       fi
299     fi
300   fi
301 fi
302 fi
303
304 # Copy echo and quote the copy suitably for passing to libtool from
305 # the Makefile, instead of quoting the original, which is used later.
306 ECHO=$echo
307 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
308    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
309 fi
310
311
312 ac_help="$ac_help
313   --disable-libtool-lock  avoid locking (might break parallel builds)"
314 ac_help="$ac_help
315   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
316 ac_help="$ac_help
317
318 See INSTALL file for further details."
319
320 # Initialize some variables set by options.
321 # The variables have the same names as the options, with
322 # dashes changed to underlines.
323 build=NONE
324 cache_file=./config.cache
325 exec_prefix=NONE
326 host=NONE
327 no_create=
328 nonopt=NONE
329 no_recursion=
330 prefix=NONE
331 program_prefix=NONE
332 program_suffix=NONE
333 program_transform_name=s,x,x,
334 silent=
335 site=
336 srcdir=
337 target=NONE
338 verbose=
339 x_includes=NONE
340 x_libraries=NONE
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 # Initialize some other variables.
355 subdirs=
356 MFLAGS= MAKEFLAGS=
357 SHELL=${CONFIG_SHELL-/bin/sh}
358 # Maximum number of lines to put in a shell here document.
359 ac_max_here_lines=12
360
361 ac_prev=
362 for ac_option
363 do
364
365   # If the previous option needs an argument, assign it.
366   if test -n "$ac_prev"; then
367     eval "$ac_prev=\$ac_option"
368     ac_prev=
369     continue
370   fi
371
372   case "$ac_option" in
373   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
374   *) ac_optarg= ;;
375   esac
376
377   # Accept the important Cygnus configure options, so we can diagnose typos.
378
379   case "$ac_option" in
380
381   -bindir | --bindir | --bindi | --bind | --bin | --bi)
382     ac_prev=bindir ;;
383   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
384     bindir="$ac_optarg" ;;
385
386   -build | --build | --buil | --bui | --bu)
387     ac_prev=build ;;
388   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
389     build="$ac_optarg" ;;
390
391   -cache-file | --cache-file | --cache-fil | --cache-fi \
392   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
393     ac_prev=cache_file ;;
394   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
395   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
396     cache_file="$ac_optarg" ;;
397
398   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
399     ac_prev=datadir ;;
400   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
401   | --da=*)
402     datadir="$ac_optarg" ;;
403
404   -disable-* | --disable-*)
405     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
408       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
409     fi
410     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
411     eval "enable_${ac_feature}=no" ;;
412
413   -enable-* | --enable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     case "$ac_option" in
421       *=*) ;;
422       *) ac_optarg=yes ;;
423     esac
424     eval "enable_${ac_feature}='$ac_optarg'" ;;
425
426   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
427   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
428   | --exec | --exe | --ex)
429     ac_prev=exec_prefix ;;
430   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
431   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
432   | --exec=* | --exe=* | --ex=*)
433     exec_prefix="$ac_optarg" ;;
434
435   -gas | --gas | --ga | --g)
436     # Obsolete; use --with-gas.
437     with_gas=yes ;;
438
439   -help | --help | --hel | --he)
440     # Omit some internal or obsolete options to make the list less imposing.
441     # This message is too long to be a string in the A/UX 3.1 sh.
442     cat << EOF
443 Usage: configure [options] [host]
444 Options: [defaults in brackets after descriptions]
445 Configuration:
446   --cache-file=FILE       cache test results in FILE
447   --help                  print this message
448   --no-create             do not create output files
449   --quiet, --silent       do not print \`checking...' messages
450   --version               print the version of autoconf that created configure
451 Directory and file names:
452   --prefix=PREFIX         install architecture-independent files in PREFIX
453                           [$ac_default_prefix]
454   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
455                           [same as prefix]
456   --bindir=DIR            user executables in DIR [EPREFIX/bin]
457   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
458   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
459   --datadir=DIR           read-only architecture-independent data in DIR
460                           [PREFIX/share]
461   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
462   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
463                           [PREFIX/com]
464   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
465   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
466   --includedir=DIR        C header files in DIR [PREFIX/include]
467   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
468   --infodir=DIR           info documentation in DIR [PREFIX/info]
469   --mandir=DIR            man documentation in DIR [PREFIX/man]
470   --srcdir=DIR            find the sources in DIR [configure dir or ..]
471   --program-prefix=PREFIX prepend PREFIX to installed program names
472   --program-suffix=SUFFIX append SUFFIX to installed program names
473   --program-transform-name=PROGRAM
474                           run sed PROGRAM on installed program names
475 EOF
476     cat << EOF
477 Host type:
478   --build=BUILD           configure for building on BUILD [BUILD=HOST]
479   --host=HOST             configure for HOST [guessed]
480   --target=TARGET         configure for TARGET [TARGET=HOST]
481 Features and packages:
482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
484   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
485   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
486   --x-includes=DIR        X include files are in DIR
487   --x-libraries=DIR       X library files are in DIR
488 EOF
489     if test -n "$ac_help"; then
490       echo "--enable and --with options recognized:$ac_help"
491     fi
492     exit 0 ;;
493
494   -host | --host | --hos | --ho)
495     ac_prev=host ;;
496   -host=* | --host=* | --hos=* | --ho=*)
497     host="$ac_optarg" ;;
498
499   -includedir | --includedir | --includedi | --included | --include \
500   | --includ | --inclu | --incl | --inc)
501     ac_prev=includedir ;;
502   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
503   | --includ=* | --inclu=* | --incl=* | --inc=*)
504     includedir="$ac_optarg" ;;
505
506   -infodir | --infodir | --infodi | --infod | --info | --inf)
507     ac_prev=infodir ;;
508   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
509     infodir="$ac_optarg" ;;
510
511   -libdir | --libdir | --libdi | --libd)
512     ac_prev=libdir ;;
513   -libdir=* | --libdir=* | --libdi=* | --libd=*)
514     libdir="$ac_optarg" ;;
515
516   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
517   | --libexe | --libex | --libe)
518     ac_prev=libexecdir ;;
519   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
520   | --libexe=* | --libex=* | --libe=*)
521     libexecdir="$ac_optarg" ;;
522
523   -localstatedir | --localstatedir | --localstatedi | --localstated \
524   | --localstate | --localstat | --localsta | --localst \
525   | --locals | --local | --loca | --loc | --lo)
526     ac_prev=localstatedir ;;
527   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
528   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
529   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
530     localstatedir="$ac_optarg" ;;
531
532   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
533     ac_prev=mandir ;;
534   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
535     mandir="$ac_optarg" ;;
536
537   -nfp | --nfp | --nf)
538     # Obsolete; use --without-fp.
539     with_fp=no ;;
540
541   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
542   | --no-cr | --no-c)
543     no_create=yes ;;
544
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
547     no_recursion=yes ;;
548
549   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
550   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
551   | --oldin | --oldi | --old | --ol | --o)
552     ac_prev=oldincludedir ;;
553   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
554   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
555   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
556     oldincludedir="$ac_optarg" ;;
557
558   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
559     ac_prev=prefix ;;
560   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
561     prefix="$ac_optarg" ;;
562
563   -program-prefix | --program-prefix | --program-prefi | --program-pref \
564   | --program-pre | --program-pr | --program-p)
565     ac_prev=program_prefix ;;
566   -program-prefix=* | --program-prefix=* | --program-prefi=* \
567   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
568     program_prefix="$ac_optarg" ;;
569
570   -program-suffix | --program-suffix | --program-suffi | --program-suff \
571   | --program-suf | --program-su | --program-s)
572     ac_prev=program_suffix ;;
573   -program-suffix=* | --program-suffix=* | --program-suffi=* \
574   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
575     program_suffix="$ac_optarg" ;;
576
577   -program-transform-name | --program-transform-name \
578   | --program-transform-nam | --program-transform-na \
579   | --program-transform-n | --program-transform- \
580   | --program-transform | --program-transfor \
581   | --program-transfo | --program-transf \
582   | --program-trans | --program-tran \
583   | --progr-tra | --program-tr | --program-t)
584     ac_prev=program_transform_name ;;
585   -program-transform-name=* | --program-transform-name=* \
586   | --program-transform-nam=* | --program-transform-na=* \
587   | --program-transform-n=* | --program-transform-=* \
588   | --program-transform=* | --program-transfor=* \
589   | --program-transfo=* | --program-transf=* \
590   | --program-trans=* | --program-tran=* \
591   | --progr-tra=* | --program-tr=* | --program-t=*)
592     program_transform_name="$ac_optarg" ;;
593
594   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
595   | -silent | --silent | --silen | --sile | --sil)
596     silent=yes ;;
597
598   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
599     ac_prev=sbindir ;;
600   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
601   | --sbi=* | --sb=*)
602     sbindir="$ac_optarg" ;;
603
604   -sharedstatedir | --sharedstatedir | --sharedstatedi \
605   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
606   | --sharedst | --shareds | --shared | --share | --shar \
607   | --sha | --sh)
608     ac_prev=sharedstatedir ;;
609   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
610   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
611   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
612   | --sha=* | --sh=*)
613     sharedstatedir="$ac_optarg" ;;
614
615   -site | --site | --sit)
616     ac_prev=site ;;
617   -site=* | --site=* | --sit=*)
618     site="$ac_optarg" ;;
619
620   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
621     ac_prev=srcdir ;;
622   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
623     srcdir="$ac_optarg" ;;
624
625   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
626   | --syscon | --sysco | --sysc | --sys | --sy)
627     ac_prev=sysconfdir ;;
628   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
629   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
630     sysconfdir="$ac_optarg" ;;
631
632   -target | --target | --targe | --targ | --tar | --ta | --t)
633     ac_prev=target ;;
634   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
635     target="$ac_optarg" ;;
636
637   -v | -verbose | --verbose | --verbos | --verbo | --verb)
638     verbose=yes ;;
639
640   -version | --version | --versio | --versi | --vers)
641     echo "configure generated by autoconf version 2.13.1"
642     exit 0 ;;
643
644   -with-* | --with-*)
645     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
646     # Reject names that are not valid shell variable names.
647     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
648       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
649     fi
650     ac_package=`echo $ac_package| sed 's/-/_/g'`
651     case "$ac_option" in
652       *=*) ;;
653       *) ac_optarg=yes ;;
654     esac
655     eval "with_${ac_package}='$ac_optarg'" ;;
656
657   -without-* | --without-*)
658     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     eval "with_${ac_package}=no" ;;
665
666   --x)
667     # Obsolete; use --with-x.
668     with_x=yes ;;
669
670   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
671   | --x-incl | --x-inc | --x-in | --x-i)
672     ac_prev=x_includes ;;
673   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
674   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
675     x_includes="$ac_optarg" ;;
676
677   -x-libraries | --x-libraries | --x-librarie | --x-librari \
678   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
679     ac_prev=x_libraries ;;
680   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
681   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
682     x_libraries="$ac_optarg" ;;
683
684   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
685     ;;
686
687   *)
688     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
689       echo "configure: warning: $ac_option: invalid host type" 1>&2
690     fi
691     if test "x$nonopt" != xNONE; then
692       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
693     fi
694     nonopt="$ac_option"
695     ;;
696
697   esac
698 done
699
700 if test -n "$ac_prev"; then
701   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
702 fi
703
704 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
705
706 # File descriptor usage:
707 # 0 standard input
708 # 1 file creation
709 # 2 errors and warnings
710 # 3 some systems may open it to /dev/tty
711 # 4 used on the Kubota Titan
712 # 6 checking for... messages and results
713 # 5 compiler messages saved in config.log
714 if test "$silent" = yes; then
715   exec 6>/dev/null
716 else
717   exec 6>&1
718 fi
719 exec 5>./config.log
720
721 echo "\
722 This file contains any messages produced by compilers while
723 running configure, to aid debugging if configure makes a mistake.
724 " 1>&5
725
726 # Strip out --no-create and --no-recursion so they do not pile up.
727 # Also quote any args containing shell metacharacters.
728 ac_configure_args=
729 for ac_arg
730 do
731   case "$ac_arg" in
732   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
733   | --no-cr | --no-c) ;;
734   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
736   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
737   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
738   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
739   esac
740 done
741
742 # NLS nuisances.
743 # Only set these to C if already set.  These must not be set unconditionally
744 # because not all systems understand e.g. LANG=C (notably SCO).
745 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
746 # Non-C LC_CTYPE values break the ctype check.
747 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
748 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
749 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
750 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
751
752 # confdefs.h avoids OS command line length limits that DEFS can exceed.
753 rm -rf conftest* confdefs.h
754 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
755 echo > confdefs.h
756
757 # A filename unique to this package, relative to the directory that
758 # configure is in, which we can look for to find out if srcdir is correct.
759 ac_unique_file=build/version.sh
760
761 # Find the source files, if location was not specified.
762 if test -z "$srcdir"; then
763   ac_srcdir_defaulted=yes
764   # Try the directory containing this script, then its parent.
765   ac_prog=$0
766   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
767   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
768   srcdir=$ac_confdir
769   if test ! -r $srcdir/$ac_unique_file; then
770     srcdir=..
771   fi
772 else
773   ac_srcdir_defaulted=no
774 fi
775 if test ! -r $srcdir/$ac_unique_file; then
776   if test "$ac_srcdir_defaulted" = yes; then
777     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
778   else
779     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
780   fi
781 fi
782 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
783
784 # Prefer explicitly selected file to automatically selected ones.
785 if test -z "$CONFIG_SITE"; then
786   if test "x$prefix" != xNONE; then
787     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
788   else
789     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
790   fi
791 fi
792 for ac_site_file in $CONFIG_SITE; do
793   if test -r "$ac_site_file"; then
794     echo "loading site script $ac_site_file"
795     . "$ac_site_file"
796   fi
797 done
798
799
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 ac_exeext=
808 ac_objext=o
809 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
810   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
811   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
812     ac_n= ac_c='
813 ' ac_t='        '
814   else
815     ac_n=-n ac_c= ac_t=
816   fi
817 else
818   ac_n= ac_c='\c' ac_t=
819 fi
820
821
822 # set unset (borrowed from autoconf 2.49c)
823 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
824   ol_unset=unset
825 else
826   ol_unset=false
827 fi
828 # unset CDPATH
829 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
830
831 ac_aux_dir=
832 for ac_dir in build $srcdir/build; do
833   if test -f $ac_dir/install-sh; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/install-sh -c"
836     break
837   elif test -f $ac_dir/install.sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install.sh -c"
840     break
841   elif test -f $ac_dir/shtool; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/shtool install -c"
844     break
845   fi
846 done
847 if test -z "$ac_aux_dir"; then
848   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
849 fi
850 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
851 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
852 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
853
854 eval `$ac_aux_dir/version.sh`
855 if test -z "$OL_STRING"; then
856         { echo "configure: error: could not determine version" 1>&2; exit 1; }
857 fi
858
859 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
860         ac_cv_shtool="$ac_aux_dir/shtool"
861 else
862         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
863 fi
864
865 SHTOOL="$ac_cv_shtool"
866
867 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
868 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
869
870 OPENLDAP_CVS=""
871 if test -d $ac_aux_dir/CVS; then
872         OPENLDAP_CVS="(from CVS sources) "
873 fi
874
875 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
876
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
881
882 # Make sure we can run config.sub.
883   if $ac_config_sub sun4 >/dev/null 2>&1; then :
884     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
885   fi
886
887   ac_cv_host_alias=$host
888   case "$ac_cv_host_alias" in
889   NONE)
890     case $nonopt in
891     NONE)
892       if ac_cv_host_alias=`$ac_config_guess`; then :
893       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
894       fi ;;
895     *) ac_cv_host_alias=$nonopt ;;
896     esac ;;
897   esac
898
899   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
900   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
901   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
902   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
903 else
904   echo $ac_n "(cached) $ac_c" 1>&6
905 fi
906
907 echo "$ac_t""$ac_cv_host" 1>&6
908
909 host=$ac_cv_host
910 host_alias=$ac_cv_host_alias
911 host_cpu=$ac_cv_host_cpu
912 host_vendor=$ac_cv_host_vendor
913 host_os=$ac_cv_host_os
914
915
916
917
918
919 echo $ac_n "checking target system type""... $ac_c" 1>&6
920 echo "configure:921: checking target system type" >&5
921 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
922
923 # Make sure we can run config.sub.
924   if $ac_config_sub sun4 >/dev/null 2>&1; then :
925     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926   fi
927
928   ac_cv_target_alias=$target
929   case "$ac_cv_target_alias" in
930   NONE)
931     case $nonopt in
932     NONE)
933       ac_cv_target_alias=$host_alias ;;
934
935     *) ac_cv_target_alias=$nonopt ;;
936     esac ;;
937   esac
938
939   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
940   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
941   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
942   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
943 else
944   echo $ac_n "(cached) $ac_c" 1>&6
945 fi
946
947 echo "$ac_t""$ac_cv_target" 1>&6
948
949 target=$ac_cv_target
950 target_alias=$ac_cv_target_alias
951 target_cpu=$ac_cv_target_cpu
952 target_vendor=$ac_cv_target_vendor
953 target_os=$ac_cv_target_os
954
955
956
957
958
959 echo $ac_n "checking build system type""... $ac_c" 1>&6
960 echo "configure:961: checking build system type" >&5
961 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
962
963 # Make sure we can run config.sub.
964   if $ac_config_sub sun4 >/dev/null 2>&1; then :
965     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966   fi
967
968   ac_cv_build_alias=$build
969   case "$ac_cv_build_alias" in
970   NONE)
971     case $nonopt in
972     NONE)
973       ac_cv_build_alias=$host_alias ;;
974
975     *) ac_cv_build_alias=$nonopt ;;
976     esac ;;
977   esac
978
979   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
980   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983 else
984   echo $ac_n "(cached) $ac_c" 1>&6
985 fi
986
987 echo "$ac_t""$ac_cv_build" 1>&6
988
989 build=$ac_cv_build
990 build_alias=$ac_cv_build_alias
991 build_cpu=$ac_cv_build_cpu
992 build_vendor=$ac_cv_build_vendor
993 build_os=$ac_cv_build_os
994
995
996
997
998
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1002 #
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 #    same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 #    as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1011
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1018
1019 test "$host_alias" != "$target_alias" &&
1020   test "$program_prefix$program_suffix$program_transform_name" = \
1021     NONENONEs,x,x, &&
1022   program_prefix=${target_alias}-
1023
1024
1025 # Find a good install program.  We prefer a C program (faster),
1026 # so one script is as good as another.  But avoid the broken or
1027 # incompatible versions:
1028 # SysV /etc/install, /usr/sbin/install
1029 # SunOS /usr/etc/install
1030 # IRIX /sbin/install
1031 # AIX /bin/install
1032 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1033 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1034 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1035 # ./install, which can be erroneously created by make from ./install.sh.
1036 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1037 echo "configure:1038: checking for a BSD compatible install" >&5
1038 if test -z "$INSTALL"; then
1039 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1040   echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1043   for ac_dir in $PATH; do
1044     # Account for people who put trailing slashes in PATH elements.
1045     case "$ac_dir/" in
1046     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1047     *)
1048       # OSF1 and SCO ODT 3.0 have their own names for install.
1049       # Don't use installbsd from OSF since it installs stuff as root
1050       # by default.
1051       for ac_prog in ginstall scoinst install; do
1052         if test -f $ac_dir/$ac_prog; then
1053           if test $ac_prog = install &&
1054             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1055             # AIX install.  It has an incompatible calling convention.
1056             :
1057           elif test $ac_prog = install &&
1058             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # program-specific install script used by HP pwplus--don't use.
1060             :
1061           else
1062             ac_cv_path_install="$ac_dir/$ac_prog -c"
1063             break 2
1064           fi
1065         fi
1066       done
1067       ;;
1068     esac
1069   done
1070   IFS="$ac_save_IFS"
1071
1072 fi
1073   if test "${ac_cv_path_install+set}" = set; then
1074     INSTALL="$ac_cv_path_install"
1075   else
1076     # As a last resort, use the slow shell script.  We don't cache a
1077     # path for INSTALL within a source directory, because that will
1078     # break other packages using the cache if that directory is
1079     # removed, or if the path is relative.
1080     INSTALL="$ac_install_sh"
1081   fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether build environment is sane" >&5
1095 # Just in case
1096 sleep 1
1097 echo timestamp > conftestfile
1098 # Do `set' in a subshell so we don't clobber the current shell's
1099 # arguments.  Must try -L first in case configure is actually a
1100 # symlink; some systems play weird games with the mod time of symlinks
1101 # (eg FreeBSD returns the mod time of the symlink's containing
1102 # directory).
1103 if (
1104    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1105    if test "$*" = "X"; then
1106       # -L didn't work.
1107       set X `ls -t $srcdir/configure conftestfile`
1108    fi
1109    if test "$*" != "X $srcdir/configure conftestfile" \
1110       && test "$*" != "X conftestfile $srcdir/configure"; then
1111
1112       # If neither matched, then we have a broken ls.  This can happen
1113       # if, for instance, CONFIG_SHELL is bash and it inherits a
1114       # broken ls alias from the environment.  This has actually
1115       # happened.  Such a system could not be considered "sane".
1116       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1117 alias in your environment" 1>&2; exit 1; }
1118    fi
1119
1120    test "$2" = conftestfile
1121    )
1122 then
1123    # Ok.
1124    :
1125 else
1126    { echo "configure: error: newly created file is older than distributed files!
1127 Check your system clock" 1>&2; exit 1; }
1128 fi
1129 rm -f conftest*
1130 echo "$ac_t""yes" 1>&6
1131 if test "$program_transform_name" = s,x,x,; then
1132   program_transform_name=
1133 else
1134   # Double any \ or $.  echo might interpret backslashes.
1135   cat <<\EOF_SED > conftestsed
1136 s,\\,\\\\,g; s,\$,$$,g
1137 EOF_SED
1138   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1139   rm -f conftestsed
1140 fi
1141 test "$program_prefix" != NONE &&
1142   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1143 # Use a double $ so make ignores it.
1144 test "$program_suffix" != NONE &&
1145   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1146
1147 # sed with no file args requires a program.
1148 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1149
1150 for ac_prog in mawk gawk nawk awk
1151 do
1152 # Extract the first word of "$ac_prog", so it can be a program name with args.
1153 set dummy $ac_prog; ac_word=$2
1154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1155 echo "configure:1156: checking for $ac_word" >&5
1156 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$AWK"; then
1160   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1161 else
1162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1163   ac_dummy="$PATH"
1164   for ac_dir in $ac_dummy; do
1165     test -z "$ac_dir" && ac_dir=.
1166     if test -f $ac_dir/$ac_word; then
1167       ac_cv_prog_AWK="$ac_prog"
1168       break
1169     fi
1170   done
1171   IFS="$ac_save_ifs"
1172 fi
1173 fi
1174 AWK="$ac_cv_prog_AWK"
1175 if test -n "$AWK"; then
1176   echo "$ac_t""$AWK" 1>&6
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 test -n "$AWK" && break
1182 done
1183
1184 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1185 echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5
1186 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1187 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftestmake <<\EOF
1191 all:
1192         @echo 'ac_maketemp="${MAKE}"'
1193 EOF
1194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1195 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1196 if test -n "$ac_maketemp"; then
1197   eval ac_cv_prog_make_${ac_make}_set=yes
1198 else
1199   eval ac_cv_prog_make_${ac_make}_set=no
1200 fi
1201 rm -f conftestmake
1202 fi
1203 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205   SET_MAKE=
1206 else
1207   echo "$ac_t""no" 1>&6
1208   SET_MAKE="MAKE=${MAKE-make}"
1209 fi
1210
1211
1212
1213 PACKAGE=$OL_PACKAGE
1214
1215 VERSION=$OL_VERSION
1216
1217 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1218   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1219 fi
1220
1221
1222
1223 missing_dir=`cd $ac_aux_dir && pwd`
1224 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1225 echo "configure:1226: checking for working aclocal" >&5
1226 # Run test in a subshell; some versions of sh will print an error if
1227 # an executable is not found, even if stderr is redirected.
1228 # Redirect stdin to placate older versions of autoconf.  Sigh.
1229 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1230    ACLOCAL=aclocal
1231    echo "$ac_t""found" 1>&6
1232 else
1233    ACLOCAL="$missing_dir/missing aclocal"
1234    echo "$ac_t""missing" 1>&6
1235 fi
1236
1237 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working autoconf" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1243    AUTOCONF=autoconf
1244    echo "$ac_t""found" 1>&6
1245 else
1246    AUTOCONF="$missing_dir/missing autoconf"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working automake" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (automake --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOMAKE=automake
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOMAKE="$missing_dir/missing automake"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working autoheader" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOHEADER=autoheader
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOHEADER="$missing_dir/missing autoheader"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working makeinfo" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1282    MAKEINFO=makeinfo
1283    echo "$ac_t""found" 1>&6
1284 else
1285    MAKEINFO="$missing_dir/missing makeinfo"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 install_sh="$missing_dir/install-sh"
1290 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1291
1292 for ac_prog in gnutar gtar tar
1293 do
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_word" >&5
1298 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   if test -n "$AMTAR"; then
1302   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1303 else
1304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1305   ac_dummy="$PATH"
1306   for ac_dir in $ac_dummy; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_AMTAR="$ac_prog"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314 fi
1315 fi
1316 AMTAR="$ac_cv_prog_AMTAR"
1317 if test -n "$AMTAR"; then
1318   echo "$ac_t""$AMTAR" 1>&6
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 test -n "$AMTAR" && break
1324 done
1325
1326
1327 AMTARFLAGS=
1328 if test -n "$AMTAR"; then
1329   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1330         AMTARFLAGS=o
1331   fi
1332 fi
1333
1334 cat >> confdefs.h <<EOF
1335 #define OPENLDAP_PACKAGE "$PACKAGE"
1336 EOF
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_VERSION "$VERSION"
1340 EOF
1341
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION $OL_API_INC
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1357 EOF
1358
1359
1360 OPENLDAP_LIBVERSION=$OL_API_LIB
1361
1362 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1363
1364
1365
1366 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1367 echo "configure:1368: checking configure arguments" >&5
1368
1369
1370 top_builddir=`pwd`
1371
1372 ldap_subdir="/openldap"
1373
1374 # Check whether --with-subdir or --without-subdir was given.
1375 if test "${with_subdir+set}" = set; then
1376   withval="$with_subdir"
1377   case "$withval" in
1378         no) ldap_subdir=""
1379                 ;;
1380         yes)
1381                 ;;
1382         /*|\\*)
1383                 ldap_subdir="$withval"
1384                 ;;
1385         *)
1386                 ldap_subdir="/$withval"
1387                 ;;
1388 esac
1389
1390 fi
1391
1392
1393 # OpenLDAP --enable-debug
1394         # Check whether --enable-debug or --disable-debug was given.
1395 if test "${enable_debug+set}" = set; then
1396   enableval="$enable_debug"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no ; do
1400                 if test "$enableval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1406         fi
1407         ol_enable_debug="$ol_arg"
1408
1409 else
1410         ol_enable_debug="yes"
1411 fi
1412 # end --enable-debug
1413 # OpenLDAP --enable-dynamic
1414         # Check whether --enable-dynamic or --disable-dynamic was given.
1415 if test "${enable_dynamic+set}" = set; then
1416   enableval="$enable_dynamic"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1426         fi
1427         ol_enable_dynamic="$ol_arg"
1428
1429 else
1430         ol_enable_dynamic="no"
1431 fi
1432 # end --enable-dynamic
1433 # OpenLDAP --enable-syslog
1434         # Check whether --enable-syslog or --disable-syslog was given.
1435 if test "${enable_syslog+set}" = set; then
1436   enableval="$enable_syslog"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1446         fi
1447         ol_enable_syslog="$ol_arg"
1448
1449 else
1450         ol_enable_syslog="auto"
1451 fi
1452 # end --enable-syslog
1453 # OpenLDAP --enable-proctitle
1454         # Check whether --enable-proctitle or --disable-proctitle was given.
1455 if test "${enable_proctitle+set}" = set; then
1456   enableval="$enable_proctitle"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1466         fi
1467         ol_enable_proctitle="$ol_arg"
1468
1469 else
1470         ol_enable_proctitle="yes"
1471 fi
1472 # end --enable-proctitle
1473 ol_enable_referrals=${ol_enable_referrals-no}
1474 ol_enable_kbind=${ol_enable_kbind-no}
1475 # OpenLDAP --enable-ipv6
1476         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1477 if test "${enable_ipv6+set}" = set; then
1478   enableval="$enable_ipv6"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ipv6="$ol_arg"
1490
1491 else
1492         ol_enable_ipv6="auto"
1493 fi
1494 # end --enable-ipv6
1495 # OpenLDAP --enable-local
1496         # Check whether --enable-local or --disable-local was given.
1497 if test "${enable_local+set}" = set; then
1498   enableval="$enable_local"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1508         fi
1509         ol_enable_local="$ol_arg"
1510
1511 else
1512         ol_enable_local="auto"
1513 fi
1514 # end --enable-local
1515 # OpenLDAP --enable-x_compile
1516         # Check whether --enable-x_compile or --disable-x_compile was given.
1517 if test "${enable_x_compile+set}" = set; then
1518   enableval="$enable_x_compile"
1519   
1520         ol_arg=invalid
1521         for ol_val in yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1528         fi
1529         ol_enable_x_compile="$ol_arg"
1530
1531 else
1532         ol_enable_x_compile="no"
1533 fi
1534 # end --enable-x_compile
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 ol_with_kerberos=${ol_with_kerberos-auto}
1580 # OpenLDAP --with-threads
1581         # Check whether --with-threads or --without-threads was given.
1582 if test "${with_threads+set}" = set; then
1583   withval="$with_threads"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1593         fi
1594         ol_with_threads="$ol_arg"
1595
1596 else
1597         ol_with_threads="auto"
1598 fi
1599 # end --with-threads
1600
1601 # OpenLDAP --with-tls
1602         # Check whether --with-tls or --without-tls was given.
1603 if test "${with_tls+set}" = set; then
1604   withval="$with_tls"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto ssleay openssl yes no  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1614         fi
1615         ol_with_tls="$ol_arg"
1616
1617 else
1618         ol_with_tls="auto"
1619 fi
1620 # end --with-tls
1621
1622 # OpenLDAP --with-yielding_select
1623         # Check whether --with-yielding_select or --without-yielding_select was given.
1624 if test "${with_yielding_select+set}" = set; then
1625   withval="$with_yielding_select"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no manual  ; do
1629                 if test "$withval" = "$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 $withval for --with-yielding_select" 1>&2; exit 1; }
1635         fi
1636         ol_with_yielding_select="$ol_arg"
1637
1638 else
1639         ol_with_yielding_select="auto"
1640 fi
1641 # end --with-yielding_select
1642
1643
1644
1645 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1646 if test "${with_xxslapdoptions+set}" = set; then
1647   withval="$with_xxslapdoptions"
1648   :
1649 fi
1650
1651 # OpenLDAP --enable-slapd
1652         # Check whether --enable-slapd or --disable-slapd was given.
1653 if test "${enable_slapd+set}" = set; then
1654   enableval="$enable_slapd"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1664         fi
1665         ol_enable_slapd="$ol_arg"
1666
1667 else
1668         ol_enable_slapd="yes"
1669 fi
1670 # end --enable-slapd
1671 # OpenLDAP --enable-aci
1672         # Check whether --enable-aci or --disable-aci was given.
1673 if test "${enable_aci+set}" = set; then
1674   enableval="$enable_aci"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1684         fi
1685         ol_enable_aci="$ol_arg"
1686
1687 else
1688         ol_enable_aci="no"
1689 fi
1690 # end --enable-aci
1691 # OpenLDAP --enable-cleartext
1692         # Check whether --enable-cleartext or --disable-cleartext was given.
1693 if test "${enable_cleartext+set}" = set; then
1694   enableval="$enable_cleartext"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1704         fi
1705         ol_enable_cleartext="$ol_arg"
1706
1707 else
1708         ol_enable_cleartext="yes"
1709 fi
1710 # end --enable-cleartext
1711 # OpenLDAP --enable-crypt
1712         # Check whether --enable-crypt or --disable-crypt was given.
1713 if test "${enable_crypt+set}" = set; then
1714   enableval="$enable_crypt"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1724         fi
1725         ol_enable_crypt="$ol_arg"
1726
1727 else
1728         ol_enable_crypt="no"
1729 fi
1730 # end --enable-crypt
1731 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1732 # OpenLDAP --enable-lmpasswd
1733         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1734 if test "${enable_lmpasswd+set}" = set; then
1735   enableval="$enable_lmpasswd"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1745         fi
1746         ol_enable_lmpasswd="$ol_arg"
1747
1748 else
1749         ol_enable_lmpasswd="no"
1750 fi
1751 # end --enable-lmpasswd
1752 # OpenLDAP --enable-spasswd
1753         # Check whether --enable-spasswd or --disable-spasswd was given.
1754 if test "${enable_spasswd+set}" = set; then
1755   enableval="$enable_spasswd"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1765         fi
1766         ol_enable_spasswd="$ol_arg"
1767
1768 else
1769         ol_enable_spasswd="no"
1770 fi
1771 # end --enable-spasswd
1772 # OpenLDAP --enable-modules
1773         # Check whether --enable-modules or --disable-modules was given.
1774 if test "${enable_modules+set}" = set; then
1775   enableval="$enable_modules"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1785         fi
1786         ol_enable_modules="$ol_arg"
1787
1788 else
1789         ol_enable_modules="no"
1790 fi
1791 # end --enable-modules
1792 ol_enable_multimaster=${ol_enable_multimaster-no}
1793 # OpenLDAP --enable-rewrite
1794         # Check whether --enable-rewrite or --disable-rewrite was given.
1795 if test "${enable_rewrite+set}" = set; then
1796   enableval="$enable_rewrite"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1806         fi
1807         ol_enable_rewrite="$ol_arg"
1808
1809 else
1810         ol_enable_rewrite="no"
1811 fi
1812 # end --enable-rewrite
1813 # OpenLDAP --enable-rlookups
1814         # Check whether --enable-rlookups or --disable-rlookups was given.
1815 if test "${enable_rlookups+set}" = set; then
1816   enableval="$enable_rlookups"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1826         fi
1827         ol_enable_rlookups="$ol_arg"
1828
1829 else
1830         ol_enable_rlookups="no"
1831 fi
1832 # end --enable-rlookups
1833 # OpenLDAP --enable-slapi
1834         # Check whether --enable-slapi or --disable-slapi was given.
1835 if test "${enable_slapi+set}" = set; then
1836   enableval="$enable_slapi"
1837   
1838         ol_arg=invalid
1839         for ol_val in auto yes no ; do
1840                 if test "$enableval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1846         fi
1847         ol_enable_slapi="$ol_arg"
1848
1849 else
1850         ol_enable_slapi="no"
1851 fi
1852 # end --enable-slapi
1853 # OpenLDAP --enable-slp
1854         # Check whether --enable-slp or --disable-slp was given.
1855 if test "${enable_slp+set}" = set; then
1856   enableval="$enable_slp"
1857   
1858         ol_arg=invalid
1859         for ol_val in auto yes no ; do
1860                 if test "$enableval" = "$ol_val" ; then
1861                         ol_arg="$ol_val"
1862                 fi
1863         done
1864         if test "$ol_arg" = "invalid" ; then
1865                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1866         fi
1867         ol_enable_slp="$ol_arg"
1868
1869 else
1870         ol_enable_slp="no"
1871 fi
1872 # end --enable-slp
1873 # OpenLDAP --enable-wrappers
1874         # Check whether --enable-wrappers or --disable-wrappers was given.
1875 if test "${enable_wrappers+set}" = set; then
1876   enableval="$enable_wrappers"
1877   
1878         ol_arg=invalid
1879         for ol_val in auto yes no ; do
1880                 if test "$enableval" = "$ol_val" ; then
1881                         ol_arg="$ol_val"
1882                 fi
1883         done
1884         if test "$ol_arg" = "invalid" ; then
1885                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1886         fi
1887         ol_enable_wrappers="$ol_arg"
1888
1889 else
1890         ol_enable_wrappers="no"
1891 fi
1892 # end --enable-wrappers
1893
1894
1895 # OpenLDAP --enable-bdb
1896         # Check whether --enable-bdb or --disable-bdb was given.
1897 if test "${enable_bdb+set}" = set; then
1898   enableval="$enable_bdb"
1899   
1900         ol_arg=invalid
1901         for ol_val in auto yes no ; do
1902                 if test "$enableval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1908         fi
1909         ol_enable_bdb="$ol_arg"
1910
1911 else
1912         ol_enable_bdb="yes"
1913 fi
1914 # end --enable-bdb
1915 # OpenLDAP --with-bdb_module
1916         # Check whether --with-bdb_module or --without-bdb_module was given.
1917 if test "${with_bdb_module+set}" = set; then
1918   withval="$with_bdb_module"
1919   
1920         ol_arg=invalid
1921         for ol_val in static dynamic ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1928         fi
1929         ol_with_bdb_module="$ol_arg"
1930
1931 else
1932         ol_with_bdb_module="static"
1933 fi
1934 # end --with-bdb_module
1935
1936 # OpenLDAP --enable-dnssrv
1937         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1938 if test "${enable_dnssrv+set}" = set; then
1939   enableval="$enable_dnssrv"
1940   
1941         ol_arg=invalid
1942         for ol_val in auto yes no ; do
1943                 if test "$enableval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1949         fi
1950         ol_enable_dnssrv="$ol_arg"
1951
1952 else
1953         ol_enable_dnssrv="no"
1954 fi
1955 # end --enable-dnssrv
1956 # OpenLDAP --with-dnssrv_module
1957         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1958 if test "${with_dnssrv_module+set}" = set; then
1959   withval="$with_dnssrv_module"
1960   
1961         ol_arg=invalid
1962         for ol_val in static dynamic ; do
1963                 if test "$withval" = "$ol_val" ; then
1964                         ol_arg="$ol_val"
1965                 fi
1966         done
1967         if test "$ol_arg" = "invalid" ; then
1968                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1969         fi
1970         ol_with_dnssrv_module="$ol_arg"
1971
1972 else
1973         ol_with_dnssrv_module="static"
1974 fi
1975 # end --with-dnssrv_module
1976
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in auto yes no ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --with-hdb_module
1998         # Check whether --with-hdb_module or --without-hdb_module was given.
1999 if test "${with_hdb_module+set}" = set; then
2000   withval="$with_hdb_module"
2001   
2002         ol_arg=invalid
2003         for ol_val in static dynamic ; do
2004                 if test "$withval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2010         fi
2011         ol_with_hdb_module="$ol_arg"
2012
2013 else
2014         ol_with_hdb_module="static"
2015 fi
2016 # end --with-hdb_module
2017
2018 # OpenLDAP --enable-ldap
2019         # Check whether --enable-ldap or --disable-ldap was given.
2020 if test "${enable_ldap+set}" = set; then
2021   enableval="$enable_ldap"
2022   
2023         ol_arg=invalid
2024         for ol_val in auto yes no ; do
2025                 if test "$enableval" = "$ol_val" ; then
2026                         ol_arg="$ol_val"
2027                 fi
2028         done
2029         if test "$ol_arg" = "invalid" ; then
2030                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2031         fi
2032         ol_enable_ldap="$ol_arg"
2033
2034 else
2035         ol_enable_ldap="no"
2036 fi
2037 # end --enable-ldap
2038 # OpenLDAP --with-ldap_module
2039         # Check whether --with-ldap_module or --without-ldap_module was given.
2040 if test "${with_ldap_module+set}" = set; then
2041   withval="$with_ldap_module"
2042   
2043         ol_arg=invalid
2044         for ol_val in static dynamic ; do
2045                 if test "$withval" = "$ol_val" ; then
2046                         ol_arg="$ol_val"
2047                 fi
2048         done
2049         if test "$ol_arg" = "invalid" ; then
2050                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2051         fi
2052         ol_with_ldap_module="$ol_arg"
2053
2054 else
2055         ol_with_ldap_module="static"
2056 fi
2057 # end --with-ldap_module
2058
2059 # OpenLDAP --enable-ldbm
2060         # Check whether --enable-ldbm or --disable-ldbm was given.
2061 if test "${enable_ldbm+set}" = set; then
2062   enableval="$enable_ldbm"
2063   
2064         ol_arg=invalid
2065         for ol_val in auto yes no ; do
2066                 if test "$enableval" = "$ol_val" ; then
2067                         ol_arg="$ol_val"
2068                 fi
2069         done
2070         if test "$ol_arg" = "invalid" ; then
2071                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2072         fi
2073         ol_enable_ldbm="$ol_arg"
2074
2075 else
2076         ol_enable_ldbm="no"
2077 fi
2078 # end --enable-ldbm
2079 # OpenLDAP --with-ldbm_api
2080         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2081 if test "${with_ldbm_api+set}" = set; then
2082   withval="$with_ldbm_api"
2083   
2084         ol_arg=invalid
2085         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2086                 if test "$withval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2092         fi
2093         ol_with_ldbm_api="$ol_arg"
2094
2095 else
2096         ol_with_ldbm_api="auto"
2097 fi
2098 # end --with-ldbm_api
2099
2100 # OpenLDAP --with-ldbm_module
2101         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2102 if test "${with_ldbm_module+set}" = set; then
2103   withval="$with_ldbm_module"
2104   
2105         ol_arg=invalid
2106         for ol_val in static dynamic ; do
2107                 if test "$withval" = "$ol_val" ; then
2108                         ol_arg="$ol_val"
2109                 fi
2110         done
2111         if test "$ol_arg" = "invalid" ; then
2112                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2113         fi
2114         ol_with_ldbm_module="$ol_arg"
2115
2116 else
2117         ol_with_ldbm_module="static"
2118 fi
2119 # end --with-ldbm_module
2120
2121 # OpenLDAP --with-ldbm_type
2122         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2123 if test "${with_ldbm_type+set}" = set; then
2124   withval="$with_ldbm_type"
2125   
2126         ol_arg=invalid
2127         for ol_val in auto btree hash ; do
2128                 if test "$withval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2134         fi
2135         ol_with_ldbm_type="$ol_arg"
2136
2137 else
2138         ol_with_ldbm_type="auto"
2139 fi
2140 # end --with-ldbm_type
2141
2142 # OpenLDAP --enable-meta
2143         # Check whether --enable-meta or --disable-meta was given.
2144 if test "${enable_meta+set}" = set; then
2145   enableval="$enable_meta"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto yes no ; do
2149                 if test "$enableval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2155         fi
2156         ol_enable_meta="$ol_arg"
2157
2158 else
2159         ol_enable_meta="no"
2160 fi
2161 # end --enable-meta
2162 # OpenLDAP --with-meta_module
2163         # Check whether --with-meta_module or --without-meta_module was given.
2164 if test "${with_meta_module+set}" = set; then
2165   withval="$with_meta_module"
2166   
2167         ol_arg=invalid
2168         for ol_val in static dynamic ; do
2169                 if test "$withval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2175         fi
2176         ol_with_meta_module="$ol_arg"
2177
2178 else
2179         ol_with_meta_module="static"
2180 fi
2181 # end --with-meta_module
2182
2183 # OpenLDAP --enable-monitor
2184         # Check whether --enable-monitor or --disable-monitor was given.
2185 if test "${enable_monitor+set}" = set; then
2186   enableval="$enable_monitor"
2187   
2188         ol_arg=invalid
2189         for ol_val in auto yes no ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2196         fi
2197         ol_enable_monitor="$ol_arg"
2198
2199 else
2200         ol_enable_monitor="yes"
2201 fi
2202 # end --enable-monitor
2203 # OpenLDAP --with-monitor_module
2204         # Check whether --with-monitor_module or --without-monitor_module was given.
2205 if test "${with_monitor_module+set}" = set; then
2206   withval="$with_monitor_module"
2207   
2208         ol_arg=invalid
2209         for ol_val in static dynamic ; do
2210                 if test "$withval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2216         fi
2217         ol_with_monitor_module="$ol_arg"
2218
2219 else
2220         ol_with_monitor_module="static"
2221 fi
2222 # end --with-monitor_module
2223
2224 # OpenLDAP --enable-null
2225         # Check whether --enable-null or --disable-null was given.
2226 if test "${enable_null+set}" = set; then
2227   enableval="$enable_null"
2228   
2229         ol_arg=invalid
2230         for ol_val in auto yes no ; do
2231                 if test "$enableval" = "$ol_val" ; then
2232                         ol_arg="$ol_val"
2233                 fi
2234         done
2235         if test "$ol_arg" = "invalid" ; then
2236                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2237         fi
2238         ol_enable_null="$ol_arg"
2239
2240 else
2241         ol_enable_null="no"
2242 fi
2243 # end --enable-null
2244 # OpenLDAP --with-null_module
2245         # Check whether --with-null_module or --without-null_module was given.
2246 if test "${with_null_module+set}" = set; then
2247   withval="$with_null_module"
2248   
2249         ol_arg=invalid
2250         for ol_val in static dynamic ; do
2251                 if test "$withval" = "$ol_val" ; then
2252                         ol_arg="$ol_val"
2253                 fi
2254         done
2255         if test "$ol_arg" = "invalid" ; then
2256                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2257         fi
2258         ol_with_null_module="$ol_arg"
2259
2260 else
2261         ol_with_null_module="static"
2262 fi
2263 # end --with-null_module
2264
2265 # OpenLDAP --enable-passwd
2266         # Check whether --enable-passwd or --disable-passwd was given.
2267 if test "${enable_passwd+set}" = set; then
2268   enableval="$enable_passwd"
2269   
2270         ol_arg=invalid
2271         for ol_val in auto yes no ; do
2272                 if test "$enableval" = "$ol_val" ; then
2273                         ol_arg="$ol_val"
2274                 fi
2275         done
2276         if test "$ol_arg" = "invalid" ; then
2277                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2278         fi
2279         ol_enable_passwd="$ol_arg"
2280
2281 else
2282         ol_enable_passwd="no"
2283 fi
2284 # end --enable-passwd
2285 # OpenLDAP --with-passwd_module
2286         # Check whether --with-passwd_module or --without-passwd_module was given.
2287 if test "${with_passwd_module+set}" = set; then
2288   withval="$with_passwd_module"
2289   
2290         ol_arg=invalid
2291         for ol_val in static dynamic ; do
2292                 if test "$withval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2298         fi
2299         ol_with_passwd_module="$ol_arg"
2300
2301 else
2302         ol_with_passwd_module="static"
2303 fi
2304 # end --with-passwd_module
2305
2306 # OpenLDAP --enable-perl
2307         # Check whether --enable-perl or --disable-perl was given.
2308 if test "${enable_perl+set}" = set; then
2309   enableval="$enable_perl"
2310   
2311         ol_arg=invalid
2312         for ol_val in auto yes no ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2319         fi
2320         ol_enable_perl="$ol_arg"
2321
2322 else
2323         ol_enable_perl="no"
2324 fi
2325 # end --enable-perl
2326 # OpenLDAP --with-perl_module
2327         # Check whether --with-perl_module or --without-perl_module was given.
2328 if test "${with_perl_module+set}" = set; then
2329   withval="$with_perl_module"
2330   
2331         ol_arg=invalid
2332         for ol_val in static dynamic ; do
2333                 if test "$withval" = "$ol_val" ; then
2334                         ol_arg="$ol_val"
2335                 fi
2336         done
2337         if test "$ol_arg" = "invalid" ; then
2338                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2339         fi
2340         ol_with_perl_module="$ol_arg"
2341
2342 else
2343         ol_with_perl_module="static"
2344 fi
2345 # end --with-perl_module
2346
2347 # OpenLDAP --enable-shell
2348         # Check whether --enable-shell or --disable-shell was given.
2349 if test "${enable_shell+set}" = set; then
2350   enableval="$enable_shell"
2351   
2352         ol_arg=invalid
2353         for ol_val in auto yes no ; do
2354                 if test "$enableval" = "$ol_val" ; then
2355                         ol_arg="$ol_val"
2356                 fi
2357         done
2358         if test "$ol_arg" = "invalid" ; then
2359                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2360         fi
2361         ol_enable_shell="$ol_arg"
2362
2363 else
2364         ol_enable_shell="no"
2365 fi
2366 # end --enable-shell
2367 # OpenLDAP --with-shell_module
2368         # Check whether --with-shell_module or --without-shell_module was given.
2369 if test "${with_shell_module+set}" = set; then
2370   withval="$with_shell_module"
2371   
2372         ol_arg=invalid
2373         for ol_val in static dynamic ; do
2374                 if test "$withval" = "$ol_val" ; then
2375                         ol_arg="$ol_val"
2376                 fi
2377         done
2378         if test "$ol_arg" = "invalid" ; then
2379                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2380         fi
2381         ol_with_shell_module="$ol_arg"
2382
2383 else
2384         ol_with_shell_module="static"
2385 fi
2386 # end --with-shell_module
2387
2388 # OpenLDAP --enable-sql
2389         # Check whether --enable-sql or --disable-sql was given.
2390 if test "${enable_sql+set}" = set; then
2391   enableval="$enable_sql"
2392   
2393         ol_arg=invalid
2394         for ol_val in auto yes no ; do
2395                 if test "$enableval" = "$ol_val" ; then
2396                         ol_arg="$ol_val"
2397                 fi
2398         done
2399         if test "$ol_arg" = "invalid" ; then
2400                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2401         fi
2402         ol_enable_sql="$ol_arg"
2403
2404 else
2405         ol_enable_sql="no"
2406 fi
2407 # end --enable-sql
2408 # OpenLDAP --with-sql_module
2409         # Check whether --with-sql_module or --without-sql_module was given.
2410 if test "${with_sql_module+set}" = set; then
2411   withval="$with_sql_module"
2412   
2413         ol_arg=invalid
2414         for ol_val in static dynamic ; do
2415                 if test "$withval" = "$ol_val" ; then
2416                         ol_arg="$ol_val"
2417                 fi
2418         done
2419         if test "$ol_arg" = "invalid" ; then
2420                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2421         fi
2422         ol_with_sql_module="$ol_arg"
2423
2424 else
2425         ol_with_sql_module="static"
2426 fi
2427 # end --with-sql_module
2428
2429 # OpenLDAP --enable-tcl
2430         # Check whether --enable-tcl or --disable-tcl was given.
2431 if test "${enable_tcl+set}" = set; then
2432   enableval="$enable_tcl"
2433   
2434         ol_arg=invalid
2435         for ol_val in auto yes no ; do
2436                 if test "$enableval" = "$ol_val" ; then
2437                         ol_arg="$ol_val"
2438                 fi
2439         done
2440         if test "$ol_arg" = "invalid" ; then
2441                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2442         fi
2443         ol_enable_tcl="$ol_arg"
2444
2445 else
2446         ol_enable_tcl="no"
2447 fi
2448 # end --enable-tcl
2449 # OpenLDAP --with-tcl_module
2450         # Check whether --with-tcl_module or --without-tcl_module was given.
2451 if test "${with_tcl_module+set}" = set; then
2452   withval="$with_tcl_module"
2453   
2454         ol_arg=invalid
2455         for ol_val in static dynamic ; do
2456                 if test "$withval" = "$ol_val" ; then
2457                         ol_arg="$ol_val"
2458                 fi
2459         done
2460         if test "$ol_arg" = "invalid" ; then
2461                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2462         fi
2463         ol_with_tcl_module="$ol_arg"
2464
2465 else
2466         ol_with_tcl_module="static"
2467 fi
2468 # end --with-tcl_module
2469
2470
2471 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2472 if test "${with_xxslurpdoptions+set}" = set; then
2473   withval="$with_xxslurpdoptions"
2474   :
2475 fi
2476
2477 # OpenLDAP --enable-slurpd
2478         # Check whether --enable-slurpd or --disable-slurpd was given.
2479 if test "${enable_slurpd+set}" = set; then
2480   enableval="$enable_slurpd"
2481   
2482         ol_arg=invalid
2483         for ol_val in auto yes no ; do
2484                 if test "$enableval" = "$ol_val" ; then
2485                         ol_arg="$ol_val"
2486                 fi
2487         done
2488         if test "$ol_arg" = "invalid" ; then
2489                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2490         fi
2491         ol_enable_slurpd="$ol_arg"
2492
2493 else
2494         ol_enable_slurpd="auto"
2495 fi
2496 # end --enable-slurpd
2497
2498 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2499 if test "${with_xxliboptions+set}" = set; then
2500   withval="$with_xxliboptions"
2501   :
2502 fi
2503
2504 # Check whether --enable-static or --disable-static was given.
2505 if test "${enable_static+set}" = set; then
2506   enableval="$enable_static"
2507   p=${PACKAGE-default}
2508 case $enableval in
2509 yes) enable_static=yes ;;
2510 no) enable_static=no ;;
2511 *)
2512   enable_static=no
2513   # Look at the argument we got.  We use all the common list separators.
2514   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2515   for pkg in $enableval; do
2516     if test "X$pkg" = "X$p"; then
2517       enable_static=yes
2518     fi
2519   done
2520   IFS="$ac_save_ifs"
2521   ;;
2522 esac
2523 else
2524   enable_static=yes
2525 fi
2526
2527 # Check whether --enable-shared or --disable-shared was given.
2528 if test "${enable_shared+set}" = set; then
2529   enableval="$enable_shared"
2530   p=${PACKAGE-default}
2531 case $enableval in
2532 yes) enable_shared=yes ;;
2533 no) enable_shared=no ;;
2534 *)
2535   enable_shared=no
2536   # Look at the argument we got.  We use all the common list separators.
2537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2538   for pkg in $enableval; do
2539     if test "X$pkg" = "X$p"; then
2540       enable_shared=yes
2541     fi
2542   done
2543   IFS="$ac_save_ifs"
2544   ;;
2545 esac
2546 else
2547   enable_shared=yes
2548 fi
2549
2550
2551
2552 # validate options
2553 if test $ol_enable_slapd = no ; then
2554                 if test $ol_enable_slapi = yes ; then
2555                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2556         fi
2557         if test $ol_enable_bdb = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2559         fi
2560         if test $ol_enable_dnssrv = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2562         fi
2563         if test $ol_enable_hdb = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2565         fi
2566         if test $ol_enable_ldap = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2568         fi
2569         if test $ol_enable_ldbm = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2571         fi
2572         if test $ol_enable_meta = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2574         fi
2575         if test $ol_enable_monitor = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2577         fi
2578         if test $ol_enable_null = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2580         fi
2581         if test $ol_enable_passwd = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2583         fi
2584         if test $ol_enable_perl = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2586         fi
2587         if test $ol_enable_shell = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2589         fi
2590         if test $ol_enable_tcl = yes ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2592         fi
2593         if test $ol_enable_sql = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2595         fi
2596         if test $ol_enable_modules = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2598         fi
2599         if test $ol_enable_multimaster = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2601         fi
2602         if test $ol_enable_wrappers = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2604         fi
2605         if test $ol_enable_rlookups = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2607         fi
2608         if test $ol_enable_aci = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2610         fi
2611         if test $ol_with_ldbm_api != auto ; then
2612                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2613         fi
2614         if test $ol_with_ldbm_type != auto ; then
2615                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2616         fi
2617         if test $ol_with_bdb_module != static ; then
2618                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2619         fi
2620         if test $ol_with_dnssrv_module != static ; then
2621                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2622         fi
2623         if test $ol_with_hdb_module != static ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2625         fi
2626         if test $ol_with_ldap_module != static ; then
2627                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2628         fi
2629         if test $ol_with_ldbm_module != static ; then
2630                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2631         fi
2632         if test $ol_with_meta_module != static ; then
2633                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2634         fi
2635         if test $ol_with_monitor_module != static ; then
2636                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2637         fi
2638         if test $ol_with_null_module != static ; then
2639                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2640         fi
2641         if test $ol_with_passwd_module != static ; then
2642                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2643         fi
2644         if test $ol_with_perl_module != static ; then
2645                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2646         fi
2647         if test $ol_with_shell_module != static ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2649         fi
2650         if test $ol_with_tcl_module != static ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2652         fi
2653         if test $ol_with_sql_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2655         fi
2656         if test $ol_enable_slurpd = yes ; then
2657                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2658         fi
2659         if test $ol_enable_rewrite = yes ; then
2660                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2661         fi
2662
2663         # force settings to no
2664         ol_enable_slapi=no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_hdb=no
2668         ol_enable_ldap=no
2669         ol_enable_ldbm=no
2670         ol_enable_meta=no
2671         ol_enable_monitor=no
2672         ol_enable_null=no
2673         ol_enable_passwd=no
2674         ol_enable_perl=no
2675         ol_enable_shell=no
2676         ol_enable_tcl=no
2677         ol_enable_sql=no
2678
2679         ol_enable_modules=no
2680         ol_enable_multimaster=no
2681         ol_enable_rlookups=no
2682         ol_enable_aci=no
2683         ol_enable_wrappers=no
2684         ol_enable_dynamic=no
2685
2686         ol_with_ldbm_api=no
2687         ol_with_ldbm_type=no
2688
2689         ol_with_bdb_module=static
2690         ol_with_dnssrv_module=static
2691         ol_with_hdb_module=static
2692         ol_with_ldap_module=static
2693         ol_with_ldbm_module=static
2694         ol_with_meta_module=static
2695         ol_with_monitor_module=static
2696         ol_with_null_module=static
2697         ol_with_passwd_module=static
2698         ol_with_perl_module=static
2699         ol_with_shell_module=static
2700         ol_with_tcl_module=static
2701         ol_with_sql_module=static
2702
2703         ol_enable_slurpd=no
2704
2705         ol_enable_rewrite=no
2706
2707 elif test $ol_enable_ldbm = no ; then
2708         
2709         if test $ol_with_ldbm_api != auto ; then
2710                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2711         fi
2712
2713         if test $ol_with_ldbm_type != auto ; then
2714                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2715         fi
2716
2717         if test $ol_with_ldbm_module != static ; then
2718                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2719         fi
2720
2721         if test $ol_enable_modules != yes -a \
2722                 $ol_enable_bdb = no -a \
2723                 $ol_enable_dnssrv = no -a \
2724                 $ol_enable_hdb = no -a \
2725                 $ol_enable_ldap = no -a \
2726                 $ol_enable_meta = no -a \
2727                 $ol_enable_monitor = no -a \
2728                 $ol_enable_null = no -a \
2729                 $ol_enable_passwd = no -a \
2730                 $ol_enable_perl = no -a \
2731                 $ol_enable_shell = no -a \
2732                 $ol_enable_sql = no -a \
2733                 $ol_enable_tcl = no ; then
2734
2735                 if test $ol_enable_slapd = yes ; then
2736                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2737                 else
2738                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2739                         ol_enable_slapd=no
2740                 fi
2741         fi
2742
2743         ol_with_ldbm_api=no
2744         ol_with_ldbm_type=no
2745         ol_with_ldbm_module=static
2746
2747         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2748                 ol_with_ldbm_api=berkeley
2749         fi
2750
2751 else
2752                 if test $ol_with_ldbm_api = gdbm -a \
2753                 $ol_with_ldbm_type = btree ; then
2754                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2755         fi
2756         if test $ol_with_ldbm_api = mdbm -a \
2757                 $ol_with_ldbm_type = btree ; then
2758                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2759         fi
2760         if test $ol_with_ldbm_api = ndbm -a \
2761                 $ol_with_ldbm_type = btree ; then
2762                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2763         fi
2764
2765         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2766                 if test $ol_with_ldbm_api = auto ; then
2767                         ol_with_ldbm_api=berkeley
2768                 elif test $ol_with_ldbm_api != berkeley ; then
2769                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2770                 fi
2771
2772         elif test $ol_enable_bdb = auto ; then
2773                 if test $ol_with_ldbm_api != berkeley \
2774                         -o $ol_with_ldbm_api != auto ; then
2775                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2776                         ol_enable_bdb=no
2777                 fi
2778         fi
2779 fi
2780
2781 if test $ol_enable_slurpd = yes ; then
2782                 if test $ol_with_threads = no ; then
2783                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2784         fi
2785 fi
2786
2787 if test $ol_enable_lmpasswd = yes ; then
2788         if test $ol_with_tls = no ; then
2789                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2790         fi
2791 fi
2792
2793 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2794         if test $ol_with_kerberos = no ; then
2795                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2796         elif test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=yes
2798         fi
2799
2800 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2801         if test $ol_with_kerberos = auto ; then
2802                 ol_with_kerberos=no
2803         elif test $ol_with_kerberos != no ; then
2804                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2805                 ol_with_kerberos=no
2806         fi
2807 fi
2808
2809 if test $ol_enable_spasswd = yes ; then
2810         if test $ol_with_cyrus_sasl = no ; then
2811                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2812         fi
2813         ol_with_cyrus_sasl=yes
2814 fi
2815
2816 echo "$ac_t""done" 1>&6
2817
2818 LDAP_LIBS=
2819 LDIF_LIBS=
2820 LDBM_LIBS=
2821 LTHREAD_LIBS=
2822 LUTIL_LIBS=
2823
2824 SLAPD_LIBS=
2825 SLURPD_LIBS=
2826
2827 BUILD_SLAPD=no
2828 BUILD_SLURPD=no
2829
2830 BUILD_THREAD=no
2831
2832 BUILD_SLAPI=no
2833 SLAPD_SLAPI_DEPEND=
2834
2835 BUILD_BDB=no
2836 BUILD_DNSSRV=no
2837 BUILD_HDB=no
2838 BUILD_LDAP=no
2839 BUILD_LDBM=no
2840 BUILD_META=no
2841 BUILD_MONITOR=no
2842 BUILD_CACHE=no
2843 BUILD_NULL=no
2844 BUILD_PASSWD=no
2845 BUILD_PERL=no
2846 BUILD_SHELL=no
2847 BUILD_SQL=no
2848 BUILD_TCL=no
2849
2850 BUILD_BDB_DYNAMIC=static
2851 BUILD_DNSSRV_DYNAMIC=static
2852 BUILD_HDB_DYNAMIC=static
2853 BUILD_LDAP_DYNAMIC=static
2854 BUILD_LDBM_DYNAMIC=static
2855 BUILD_META_DYNAMIC=static
2856 BUILD_MONITOR_DYNAMIC=static
2857 BUILD_NULL_DYNAMIC=static
2858 BUILD_PASSWD_DYNAMIC=static
2859 BUILD_PERL_DYNAMIC=static
2860 BUILD_SHELL_DYNAMIC=static
2861 BUILD_TCL_DYNAMIC=static
2862 BUILD_SQL_DYNAMIC=static
2863
2864 SLAPD_MODULES_LDFLAGS=
2865 SLAPD_MODULES_CPPFLAGS=
2866
2867 SLAPD_STATIC_BACKENDS=
2868 SLAPD_DYNAMIC_BACKENDS=
2869
2870 SLAPD_PERL_LDFLAGS=
2871 MOD_PERL_LDFLAGS=
2872 PERL_CPPFLAGS=
2873
2874 SLAPD_SQL_LDFLAGS=
2875 SLAPD_SQL_LIBS=
2876 SLAPD_SQL_INCLUDES=
2877
2878 MOD_TCL_LIB=
2879 KRB4_LIBS=
2880 KRB5_LIBS=
2881 SASL_LIBS=
2882 TERMCAP_LIBS=
2883 TLS_LIBS=
2884 MODULES_LIBS=
2885 SLAPI_LIBS=
2886 LIBSLAPI=
2887 LIBSLAPITOOLS=
2888 AUTH_LIBS=
2889
2890 SLAPD_SLP_LIBS=
2891
2892
2893 # Find a good install program.  We prefer a C program (faster),
2894 # so one script is as good as another.  But avoid the broken or
2895 # incompatible versions:
2896 # SysV /etc/install, /usr/sbin/install
2897 # SunOS /usr/etc/install
2898 # IRIX /sbin/install
2899 # AIX /bin/install
2900 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2901 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2902 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2903 # ./install, which can be erroneously created by make from ./install.sh.
2904 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2905 echo "configure:2906: checking for a BSD compatible install" >&5
2906 if test -z "$INSTALL"; then
2907 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2911   for ac_dir in $PATH; do
2912     # Account for people who put trailing slashes in PATH elements.
2913     case "$ac_dir/" in
2914     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2915     *)
2916       # OSF1 and SCO ODT 3.0 have their own names for install.
2917       # Don't use installbsd from OSF since it installs stuff as root
2918       # by default.
2919       for ac_prog in ginstall scoinst install; do
2920         if test -f $ac_dir/$ac_prog; then
2921           if test $ac_prog = install &&
2922             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2923             # AIX install.  It has an incompatible calling convention.
2924             :
2925           elif test $ac_prog = install &&
2926             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2927             # program-specific install script used by HP pwplus--don't use.
2928             :
2929           else
2930             ac_cv_path_install="$ac_dir/$ac_prog -c"
2931             break 2
2932           fi
2933         fi
2934       done
2935       ;;
2936     esac
2937   done
2938   IFS="$ac_save_IFS"
2939
2940 fi
2941   if test "${ac_cv_path_install+set}" = set; then
2942     INSTALL="$ac_cv_path_install"
2943   else
2944     # As a last resort, use the slow shell script.  We don't cache a
2945     # path for INSTALL within a source directory, because that will
2946     # break other packages using the cache if that directory is
2947     # removed, or if the path is relative.
2948     INSTALL="$ac_install_sh"
2949   fi
2950 fi
2951 echo "$ac_t""$INSTALL" 1>&6
2952
2953 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2954 # It thinks the first close brace ends the variable substitution.
2955 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2956
2957 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2958
2959 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2960
2961
2962 cat >> confdefs.h <<\EOF
2963 #define HAVE_MKVERSION 1
2964 EOF
2965
2966
2967
2968
2969 ol_aix_threads=no
2970 case "$target" in
2971 *-*-aix*)       if test -z "$CC" ; then
2972                 case "$ol_with_threads" in
2973                 auto | yes |  posix) ol_aix_threads=yes ;;
2974                 esac
2975         fi
2976 ;;
2977 esac
2978
2979 if test $ol_aix_threads = yes ; then
2980         if test -z "${CC}" ; then
2981                 for ac_prog in cc_r xlc_r cc
2982 do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984 set dummy $ac_prog; ac_word=$2
2985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2986 echo "configure:2987: checking for $ac_word" >&5
2987 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   if test -n "$CC"; then
2991   ac_cv_prog_CC="$CC" # Let the user override the test.
2992 else
2993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2994   ac_dummy="$PATH"
2995   for ac_dir in $ac_dummy; do
2996     test -z "$ac_dir" && ac_dir=.
2997     if test -f $ac_dir/$ac_word; then
2998       ac_cv_prog_CC="$ac_prog"
2999       break
3000     fi
3001   done
3002   IFS="$ac_save_ifs"
3003 fi
3004 fi
3005 CC="$ac_cv_prog_CC"
3006 if test -n "$CC"; then
3007   echo "$ac_t""$CC" 1>&6
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012 test -n "$CC" && break
3013 done
3014
3015
3016                 if test "$CC" = cc ; then
3017                                                 if test $ol_with_threads != auto ; then
3018                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3019                         else
3020                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3021                         fi
3022                         ol_with_threads=no
3023                 fi
3024         fi
3025
3026         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3027                 ol_with_threads=posix
3028                 ol_cv_pthread_create=yes
3029         fi
3030 fi
3031
3032 if test -z "${CC}"; then
3033         for ac_prog in cc gcc
3034 do
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3038 echo "configure:3039: checking for $ac_word" >&5
3039 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   if test -n "$CC"; then
3043   ac_cv_prog_CC="$CC" # Let the user override the test.
3044 else
3045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3046   ac_dummy="$PATH"
3047   for ac_dir in $ac_dummy; do
3048     test -z "$ac_dir" && ac_dir=.
3049     if test -f $ac_dir/$ac_word; then
3050       ac_cv_prog_CC="$ac_prog"
3051       break
3052     fi
3053   done
3054   IFS="$ac_save_ifs"
3055 fi
3056 fi
3057 CC="$ac_cv_prog_CC"
3058 if test -n "$CC"; then
3059   echo "$ac_t""$CC" 1>&6
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063
3064 test -n "$CC" && break
3065 done
3066 test -n "$CC" || CC="missing"
3067
3068
3069         if test "${CC}" = "missing" ; then
3070                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3071         fi
3072 fi
3073
3074 if test -z "${AR}"; then
3075         for ac_prog in ar gar
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$AR"; then
3085   ac_cv_prog_AR="$AR" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_AR="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 AR="$ac_cv_prog_AR"
3100 if test -n "$AR"; then
3101   echo "$ac_t""$AR" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$AR" && break
3107 done
3108 test -n "$AR" || AR="missing"
3109
3110
3111         if test "${AR}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116
3117
3118 # Find the correct PATH separator.  Usually this is `:', but
3119 # DJGPP uses `;' like DOS.
3120 if test "X${PATH_SEPARATOR+set}" != Xset; then
3121   UNAME=${UNAME-`uname 2>/dev/null`}
3122   case X$UNAME in
3123     *-DOS) lt_cv_sys_path_separator=';' ;;
3124     *)     lt_cv_sys_path_separator=':' ;;
3125   esac
3126   PATH_SEPARATOR=$lt_cv_sys_path_separator
3127 fi
3128
3129 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3130 echo "configure:3131: checking for Cygwin environment" >&5
3131 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137
3138 int main() {
3139
3140 #ifndef __CYGWIN__
3141 #define __CYGWIN__ __CYGWIN32__
3142 #endif
3143 return __CYGWIN__;
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3147   rm -rf conftest*
3148   ac_cv_cygwin=yes
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   ac_cv_cygwin=no
3154 fi
3155 rm -f conftest*
3156 fi
3157
3158 echo "$ac_t""$ac_cv_cygwin" 1>&6
3159 CYGWIN=
3160 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3161 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3162 echo "configure:3163: checking for mingw32 environment" >&5
3163 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166   cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169
3170 int main() {
3171 return __MINGW32__;
3172 ; return 0; }
3173 EOF
3174 if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3175   rm -rf conftest*
3176   ac_cv_mingw32=yes
3177 else
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   ac_cv_mingw32=no
3182 fi
3183 rm -f conftest*
3184 fi
3185
3186 echo "$ac_t""$ac_cv_mingw32" 1>&6
3187 MINGW32=
3188 test "$ac_cv_mingw32" = yes && MINGW32=yes
3189 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3190 echo "configure:3191: checking for EMX OS/2 environment" >&5
3191 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197
3198 int main() {
3199 return __EMX__;
3200 ; return 0; }
3201 EOF
3202 if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3203   rm -rf conftest*
3204   ac_cv_emxos2=yes
3205 else
3206   echo "configure: failed program was:" >&5
3207   cat conftest.$ac_ext >&5
3208   rm -rf conftest*
3209   ac_cv_emxos2=no
3210 fi
3211 rm -f conftest*
3212 fi
3213
3214 echo "$ac_t""$ac_cv_emxos2" 1>&6
3215 EMXOS2=
3216 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3218 echo "configure:3219: checking how to run the C preprocessor" >&5
3219 # On Suns, sometimes $CPP names a directory.
3220 if test -n "$CPP" && test -d "$CPP"; then
3221   CPP=
3222 fi
3223 if test -z "$CPP"; then
3224 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227     # This must be in double quotes, not single quotes, because CPP may get
3228   # substituted into the Makefile and "${CC-cc}" will confuse make.
3229   CPP="${CC-cc} -E"
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp.
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <assert.h>
3236 Syntax Error
3237 EOF
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3242   :
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   CPP="${CC-cc} -E -traditional-cpp"
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <assert.h>
3253 Syntax Error
3254 EOF
3255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3256 { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3258 if test -z "$ac_err"; then
3259   :
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   CPP="${CC-cc} -nologo -E"
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <assert.h>
3270 Syntax Error
3271 EOF
3272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3273 { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275 if test -z "$ac_err"; then
3276   :
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   CPP=/lib/cpp
3283 fi
3284 rm -f conftest*
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289   ac_cv_prog_CPP="$CPP"
3290 fi
3291   CPP="$ac_cv_prog_CPP"
3292 else
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295 echo "$ac_t""$CPP" 1>&6
3296
3297 # Check whether --enable-fast-install or --disable-fast-install was given.
3298 if test "${enable_fast_install+set}" = set; then
3299   enableval="$enable_fast_install"
3300   p=${PACKAGE-default}
3301 case $enableval in
3302 yes) enable_fast_install=yes ;;
3303 no) enable_fast_install=no ;;
3304 *)
3305   enable_fast_install=no
3306   # Look at the argument we got.  We use all the common list separators.
3307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3308   for pkg in $enableval; do
3309     if test "X$pkg" = "X$p"; then
3310       enable_fast_install=yes
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314   ;;
3315 esac
3316 else
3317   enable_fast_install=yes
3318 fi
3319
3320 # Extract the first word of "gcc", so it can be a program name with args.
3321 set dummy gcc; ac_word=$2
3322 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3323 echo "configure:3324: checking for $ac_word" >&5
3324 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   if test -n "$CC"; then
3328   ac_cv_prog_CC="$CC" # Let the user override the test.
3329 else
3330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3331   ac_dummy="$PATH"
3332   for ac_dir in $ac_dummy; do
3333     test -z "$ac_dir" && ac_dir=.
3334     if test -f $ac_dir/$ac_word; then
3335       ac_cv_prog_CC="gcc"
3336       break
3337     fi
3338   done
3339   IFS="$ac_save_ifs"
3340 fi
3341 fi
3342 CC="$ac_cv_prog_CC"
3343 if test -n "$CC"; then
3344   echo "$ac_t""$CC" 1>&6
3345 else
3346   echo "$ac_t""no" 1>&6
3347 fi
3348
3349 if test -z "$CC"; then
3350   # Extract the first word of "cc", so it can be a program name with args.
3351 set dummy cc; ac_word=$2
3352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3353 echo "configure:3354: checking for $ac_word" >&5
3354 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   if test -n "$CC"; then
3358   ac_cv_prog_CC="$CC" # Let the user override the test.
3359 else
3360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3361   ac_prog_rejected=no
3362   ac_dummy="$PATH"
3363   for ac_dir in $ac_dummy; do
3364     test -z "$ac_dir" && ac_dir=.
3365     if test -f $ac_dir/$ac_word; then
3366       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3367         ac_prog_rejected=yes
3368         continue
3369       fi
3370       ac_cv_prog_CC="cc"
3371       break
3372     fi
3373   done
3374   IFS="$ac_save_ifs"
3375 if test $ac_prog_rejected = yes; then
3376   # We found a bogon in the path, so make sure we never use it.
3377   set dummy $ac_cv_prog_CC
3378   shift
3379   if test $# -gt 0; then
3380     # We chose a different compiler from the bogus one.
3381     # However, it has the same basename, so the bogon will be chosen
3382     # first if we set CC to just the basename; use the full file name.
3383     shift
3384     set dummy "$ac_dir/$ac_word" "$@"
3385     shift
3386     ac_cv_prog_CC="$@"
3387   fi
3388 fi
3389 fi
3390 fi
3391 CC="$ac_cv_prog_CC"
3392 if test -n "$CC"; then
3393   echo "$ac_t""$CC" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398   if test -z "$CC"; then
3399     case "`uname -s`" in
3400     *win32* | *WIN32* | *CYGWIN*)
3401       # Extract the first word of "cl", so it can be a program name with args.
3402 set dummy cl; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   if test -n "$CC"; then
3409   ac_cv_prog_CC="$CC" # Let the user override the test.
3410 else
3411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3412   ac_dummy="$PATH"
3413   for ac_dir in $ac_dummy; do
3414     test -z "$ac_dir" && ac_dir=.
3415     if test -f $ac_dir/$ac_word; then
3416       ac_cv_prog_CC="cl"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 fi
3422 fi
3423 CC="$ac_cv_prog_CC"
3424 if test -n "$CC"; then
3425   echo "$ac_t""$CC" 1>&6
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429  ;;
3430     esac
3431   fi
3432   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3433 fi
3434
3435 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3436 echo "configure:3437: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3437
3438 ac_ext=c
3439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3440 ac_cpp='$CPP $CPPFLAGS'
3441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3443 cross_compiling=$ac_cv_prog_cc_cross
3444
3445 cat > conftest.$ac_ext << EOF
3446
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449
3450 main(){return(0);}
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3453   ac_cv_prog_cc_works=yes
3454   # If we can't run a trivial program, we are probably using a cross compiler.
3455   if (./conftest; exit) 2>/dev/null; then
3456     ac_cv_prog_cc_cross=no
3457   else
3458     ac_cv_prog_cc_cross=yes
3459   fi
3460 else
3461   echo "configure: failed program was:" >&5
3462   cat conftest.$ac_ext >&5
3463   ac_cv_prog_cc_works=no
3464 fi
3465 rm -fr conftest*
3466 ac_ext=c
3467 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3468 ac_cpp='$CPP $CPPFLAGS'
3469 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3470 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3471 cross_compiling=$ac_cv_prog_cc_cross
3472
3473 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3474 if test $ac_cv_prog_cc_works = no; then
3475   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3476 fi
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3479 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3480 cross_compiling=$ac_cv_prog_cc_cross
3481
3482 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether we are using GNU C" >&5
3484 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   cat > conftest.c <<EOF
3488 #ifdef __GNUC__
3489   yes;
3490 #endif
3491 EOF
3492 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3493   ac_cv_prog_gcc=yes
3494 else
3495   ac_cv_prog_gcc=no
3496 fi
3497 fi
3498
3499 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3500
3501 if test $ac_cv_prog_gcc = yes; then
3502   GCC=yes
3503 else
3504   GCC=
3505 fi
3506
3507 ac_test_CFLAGS="${CFLAGS+set}"
3508 ac_save_CFLAGS="$CFLAGS"
3509 CFLAGS=
3510 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3511 echo "configure:3512: checking whether ${CC-cc} accepts -g" >&5
3512 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   echo 'void f(){}' > conftest.c
3516 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3517   ac_cv_prog_cc_g=yes
3518 else
3519   ac_cv_prog_cc_g=no
3520 fi
3521 rm -f conftest*
3522
3523 fi
3524
3525 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3526 if test "$ac_test_CFLAGS" = set; then
3527   CFLAGS="$ac_save_CFLAGS"
3528 elif test $ac_cv_prog_cc_g = yes; then
3529   if test "$GCC" = yes; then
3530     CFLAGS="-g -O2"
3531   else
3532     CFLAGS="-g"
3533   fi
3534 else
3535   if test "$GCC" = yes; then
3536     CFLAGS="-O2"
3537   else
3538     CFLAGS=
3539   fi
3540 fi
3541
3542 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3543 if test "${with_gnu_ld+set}" = set; then
3544   withval="$with_gnu_ld"
3545   test "$withval" = no || with_gnu_ld=yes
3546 else
3547   with_gnu_ld=no
3548 fi
3549
3550 ac_prog=ld
3551 if test "$GCC" = yes; then
3552   # Check if gcc -print-prog-name=ld gives a path.
3553   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3554 echo "configure:3555: checking for ld used by GCC" >&5
3555   case $host in
3556   *-*-mingw*)
3557     # gcc leaves a trailing carriage return which upsets mingw
3558     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3559   *)
3560     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3561   esac
3562   case $ac_prog in
3563     # Accept absolute paths.
3564     [\\/]* | [A-Za-z]:[\\/]*)
3565       re_direlt='/[^/][^/]*/\.\./'
3566       # Canonicalize the path of ld
3567       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3568       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3569         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3570       done
3571       test -z "$LD" && LD="$ac_prog"
3572       ;;
3573   "")
3574     # If it fails, then pretend we aren't using GCC.
3575     ac_prog=ld
3576     ;;
3577   *)
3578     # If it is relative, then search for the first ld in PATH.
3579     with_gnu_ld=unknown
3580     ;;
3581   esac
3582 elif test "$with_gnu_ld" = yes; then
3583   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3584 echo "configure:3585: checking for GNU ld" >&5
3585 else
3586   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3587 echo "configure:3588: checking for non-GNU ld" >&5
3588 fi
3589 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   if test -z "$LD"; then
3593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3594   for ac_dir in $PATH; do
3595     test -z "$ac_dir" && ac_dir=.
3596     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3597       lt_cv_path_LD="$ac_dir/$ac_prog"
3598       # Check to see if the program is GNU ld.  I'd rather use --version,
3599       # but apparently some GNU ld's only accept -v.
3600       # Break only if it was the GNU/non-GNU ld that we prefer.
3601       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3602         test "$with_gnu_ld" != no && break
3603       else
3604         test "$with_gnu_ld" != yes && break
3605       fi
3606     fi
3607   done
3608   IFS="$ac_save_ifs"
3609 else
3610   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3611 fi
3612 fi
3613
3614 LD="$lt_cv_path_LD"
3615 if test -n "$LD"; then
3616   echo "$ac_t""$LD" 1>&6
3617 else
3618   echo "$ac_t""no" 1>&6
3619 fi
3620 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3621 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3622 echo "configure:3623: checking if the linker ($LD) is GNU ld" >&5
3623 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3627 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3628   lt_cv_prog_gnu_ld=yes
3629 else
3630   lt_cv_prog_gnu_ld=no
3631 fi
3632 fi
3633
3634 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3635 with_gnu_ld=$lt_cv_prog_gnu_ld
3636
3637
3638 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3639 echo "configure:3640: checking for $LD option to reload object files" >&5
3640 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   lt_cv_ld_reload_flag='-r'
3644 fi
3645
3646 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3647 reload_flag=$lt_cv_ld_reload_flag
3648 test -n "$reload_flag" && reload_flag=" $reload_flag"
3649
3650 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3651 echo "configure:3652: checking for BSD-compatible nm" >&5
3652 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   if test -n "$NM"; then
3656   # Let the user override the test.
3657   lt_cv_path_NM="$NM"
3658 else
3659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3660   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3661     test -z "$ac_dir" && ac_dir=.
3662     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3663     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3664       # Check to see if the nm accepts a BSD-compat flag.
3665       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3666       #   nm: unknown option "B" ignored
3667       # Tru64's nm complains that /dev/null is an invalid object file
3668       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3669         lt_cv_path_NM="$tmp_nm -B"
3670         break
3671       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3672         lt_cv_path_NM="$tmp_nm -p"
3673         break
3674       else
3675         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3676         continue # so that we can try to find one that supports BSD flags
3677       fi
3678     fi
3679   done
3680   IFS="$ac_save_ifs"
3681   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3682 fi
3683 fi
3684
3685 NM="$lt_cv_path_NM"
3686 echo "$ac_t""$NM" 1>&6
3687
3688 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3689 echo "configure:3690: checking for a sed that does not truncate output" >&5
3690 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   # Loop through the user's path and test for sed and gsed.
3694 # Then use that list of sed's as ones to test for truncation.
3695 as_executable_p="test -f"
3696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697 for as_dir in $PATH
3698 do
3699   IFS=$as_save_IFS
3700   test -z "$as_dir" && as_dir=.
3701   for ac_prog in sed gsed; do
3702     for ac_exec_ext in '' $ac_executable_extensions; do
3703       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3704         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3705       fi
3706     done
3707   done
3708 done
3709
3710   # Create a temporary directory, and hook for its removal unless debugging.
3711 $debug ||
3712 {
3713   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3714   trap '{ (exit 1); exit 1; }' 1 2 13 15
3715 }
3716
3717 # Create a (secure) tmp directory for tmp files.
3718 : ${TMPDIR=/tmp}
3719 {
3720   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3721   test -n "$tmp" && test -d "$tmp"
3722 }  ||
3723 {
3724   tmp=$TMPDIR/sed$$-$RANDOM
3725   (umask 077 && mkdir $tmp)
3726 } ||
3727 {
3728    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3729    { (exit 1); exit 1; }
3730 }
3731   _max=0
3732   _count=0
3733   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3734   # along with /bin/sed that truncates output.
3735   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3736     test ! -f ${_sed} && break
3737     cat /dev/null > "$tmp/sed.in"
3738     _count=0
3739     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3740     # Check for GNU sed and select it if it is found.
3741     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3742       lt_cv_path_SED=${_sed}
3743       break
3744     fi
3745     while true; do
3746       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3747       mv "$tmp/sed.tmp" "$tmp/sed.in"
3748       cp "$tmp/sed.in" "$tmp/sed.nl"
3749       echo >>"$tmp/sed.nl"
3750       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3751       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3752       # 40000 chars as input seems more than enough
3753       test $_count -gt 10 && break
3754       _count=`expr $_count + 1`
3755       if test $_count -gt $_max; then
3756         _max=$_count
3757         lt_cv_path_SED=$_sed
3758       fi
3759     done
3760   done
3761   rm -rf "$tmp"
3762
3763 fi
3764
3765 if test "X$SED" != "X"; then
3766   lt_cv_path_SED=$SED
3767 else
3768   SED=$lt_cv_path_SED
3769 fi
3770 echo "$ac_t""$SED" 1>&6
3771
3772 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3773 echo "configure:3774: checking whether ln -s works" >&5
3774 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3775   echo $ac_n "(cached) $ac_c" 1>&6
3776 else
3777   rm -f conftestdata
3778 if ln -s X conftestdata 2>/dev/null
3779 then
3780   rm -f conftestdata
3781   ac_cv_prog_LN_S="ln -s"
3782 else
3783   ac_cv_prog_LN_S=ln
3784 fi
3785 fi
3786 LN_S="$ac_cv_prog_LN_S"
3787 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3788   echo "$ac_t""yes" 1>&6
3789 else
3790   echo "$ac_t""no" 1>&6
3791 fi
3792
3793 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3794 echo "configure:3795: checking how to recognise dependent libraries" >&5
3795 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   lt_cv_file_magic_cmd='$MAGIC_CMD'
3799 lt_cv_file_magic_test_file=
3800 lt_cv_deplibs_check_method='unknown'
3801 # Need to set the preceding variable on all platforms that support
3802 # interlibrary dependencies.
3803 # 'none' -- dependencies not supported.
3804 # `unknown' -- same as none, but documents that we really don't know.
3805 # 'pass_all' -- all dependencies passed with no checks.
3806 # 'test_compile' -- check by making test program.
3807 # 'file_magic [[regex]]' -- check by looking for files in library path
3808 # which responds to the $file_magic_cmd with a given egrep regex.
3809 # If you have `file' or equivalent on your system and you're not sure
3810 # whether `pass_all' will *always* work, you probably want this one.
3811
3812 case $host_os in
3813 aix4* | aix5*)
3814   lt_cv_deplibs_check_method=pass_all
3815   ;;
3816
3817 beos*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 bsdi4*)
3822   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3823   lt_cv_file_magic_cmd='/usr/bin/file -L'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   ;;
3826
3827 cygwin* | mingw* | pw32*)
3828   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3829   lt_cv_file_magic_cmd='$OBJDUMP -f'
3830   ;;
3831
3832 darwin* | rhapsody*)
3833   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3834   lt_cv_file_magic_cmd='/usr/bin/file -L'
3835   case "$host_os" in
3836   rhapsody* | darwin1.[012])
3837     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3838     ;;
3839   *) # Darwin 1.3 on
3840     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3841     ;;
3842   esac
3843   ;;
3844
3845 freebsd*)
3846   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3847     case $host_cpu in
3848     i*86 )
3849       # Not sure whether the presence of OpenBSD here was a mistake.
3850       # Let's accept both of them until this is cleared up.
3851       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3852       lt_cv_file_magic_cmd=/usr/bin/file
3853       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3854       ;;
3855     esac
3856   else
3857     lt_cv_deplibs_check_method=pass_all
3858   fi
3859   ;;
3860
3861 gnu*)
3862   lt_cv_deplibs_check_method=pass_all
3863   ;;
3864
3865 hpux10.20*|hpux11*)
3866   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3867   lt_cv_file_magic_cmd=/usr/bin/file
3868   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3869   ;;
3870
3871 irix5* | irix6* | nonstopux*)
3872   case $host_os in
3873   irix5* | nonstopux*)
3874     # this will be overridden with pass_all, but let us keep it just in case
3875     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3876     ;;
3877   *)
3878     case $LD in
3879     *-32|*"-32 ") libmagic=32-bit;;
3880     *-n32|*"-n32 ") libmagic=N32;;
3881     *-64|*"-64 ") libmagic=64-bit;;
3882     *) libmagic=never-match;;
3883     esac
3884     # this will be overridden with pass_all, but let us keep it just in case
3885     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3886     ;;
3887   esac
3888   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3889   lt_cv_deplibs_check_method=pass_all
3890   ;;
3891
3892 # This must be Linux ELF.
3893 linux-gnu*)
3894   case $host_cpu in
3895   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3896     lt_cv_deplibs_check_method=pass_all ;;
3897   *)
3898     # glibc up to 2.1.1 does not perform some relocations on ARM
3899     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3900   esac
3901   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3902   ;;
3903
3904 netbsd*)
3905   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3906     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3907   else
3908     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3909   fi
3910   ;;
3911
3912 newos6*)
3913   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3914   lt_cv_file_magic_cmd=/usr/bin/file
3915   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3916   ;;
3917
3918 openbsd*)
3919   lt_cv_file_magic_cmd=/usr/bin/file
3920   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3921   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3922     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3923   else
3924     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3925   fi
3926   ;;
3927
3928 osf3* | osf4* | osf5*)
3929   # this will be overridden with pass_all, but let us keep it just in case
3930   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3931   lt_cv_file_magic_test_file=/shlib/libc.so
3932   lt_cv_deplibs_check_method=pass_all
3933   ;;
3934
3935 sco3.2v5*)
3936   lt_cv_deplibs_check_method=pass_all
3937   ;;
3938
3939 solaris*)
3940   lt_cv_deplibs_check_method=pass_all
3941   lt_cv_file_magic_test_file=/lib/libc.so
3942   ;;
3943
3944 sysv5uw[78]* | sysv4*uw2*)
3945   lt_cv_deplibs_check_method=pass_all
3946   ;;
3947
3948 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3949   case $host_vendor in
3950   motorola)
3951     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]'
3952     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3953     ;;
3954   ncr)
3955     lt_cv_deplibs_check_method=pass_all
3956     ;;
3957   sequent)
3958     lt_cv_file_magic_cmd='/bin/file'
3959     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3960     ;;
3961   sni)
3962     lt_cv_file_magic_cmd='/bin/file'
3963     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3964     lt_cv_file_magic_test_file=/lib/libc.so
3965     ;;
3966   siemens)
3967     lt_cv_deplibs_check_method=pass_all
3968     ;;
3969   esac
3970   ;;
3971 esac
3972
3973 fi
3974
3975 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3976 file_magic_cmd=$lt_cv_file_magic_cmd
3977 deplibs_check_method=$lt_cv_deplibs_check_method
3978
3979 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3980 echo "configure:3981: checking for object suffix" >&5
3981 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3982   echo $ac_n "(cached) $ac_c" 1>&6
3983 else
3984   rm -f conftest*
3985 echo 'int i = 1;' > conftest.$ac_ext
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   for ac_file in conftest.*; do
3988     case $ac_file in
3989     *.c) ;;
3990     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3991     esac
3992   done
3993 else
3994   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$ac_cv_objext" 1>&6
4000 OBJEXT=$ac_cv_objext
4001 ac_objext=$ac_cv_objext
4002
4003
4004
4005
4006 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4007 echo "configure:4008: checking for executable suffix" >&5
4008 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4012   ac_cv_exeext=.exe
4013 else
4014   rm -f conftest*
4015   echo 'int main () { return 0; }' > conftest.$ac_ext
4016   ac_cv_exeext=
4017   if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4018     for file in conftest.*; do
4019       case $file in
4020       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4021       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4022       esac
4023     done
4024   else
4025     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4026   fi
4027   rm -f conftest*
4028   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4029 fi
4030 fi
4031
4032 EXEEXT=""
4033 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4034 echo "$ac_t""${ac_cv_exeext}" 1>&6
4035 ac_exeext=$EXEEXT
4036
4037 if test $host != $build; then
4038   ac_tool_prefix=${host_alias}-
4039 else
4040   ac_tool_prefix=
4041 fi
4042
4043
4044
4045
4046 # Check for command to grab the raw symbol name followed by C symbol from nm.
4047 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4048 echo "configure:4049: checking command to parse $NM output" >&5
4049 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   
4053 # These are sane defaults that work on at least a few old systems.
4054 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4055
4056 # Character class describing NM global symbol codes.
4057 symcode='[BCDEGRST]'
4058
4059 # Regexp to match symbols that can be accessed directly from C.
4060 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4061
4062 # Transform the above into a raw symbol and a C symbol.
4063 symxfrm='\1 \2\3 \3'
4064
4065 # Transform an extracted symbol line into a proper C declaration
4066 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4067
4068 # Transform an extracted symbol line into symbol name and symbol address
4069 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'"
4070
4071 # Define system-specific variables.
4072 case $host_os in
4073 aix*)
4074   symcode='[BCDT]'
4075   ;;
4076 cygwin* | mingw* | pw32*)
4077   symcode='[ABCDGISTW]'
4078   ;;
4079 hpux*) # Its linker distinguishes data from code symbols
4080   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4081   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'"
4082   ;;
4083 irix* | nonstopux*)
4084   symcode='[BCDEGRST]'
4085   ;;
4086 osf*)
4087   symcode='[BCDEGQRST]'
4088   ;;
4089 solaris* | sysv5*)
4090   symcode='[BDT]'
4091   ;;
4092 sysv4)
4093   symcode='[DFNSTU]'
4094   ;;
4095 esac
4096
4097 # Handle CRLF in mingw tool chain
4098 opt_cr=
4099 case $host_os in
4100 mingw*)
4101   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4102   ;;
4103 esac
4104
4105 # If we're using GNU nm, then use its standard symbol codes.
4106 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4107   symcode='[ABCDGISTW]'
4108 fi
4109
4110 # Try without a prefix undercore, then with it.
4111 for ac_symprfx in "" "_"; do
4112
4113   # Write the raw and C identifiers.
4114 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4115
4116   # Check to see that the pipe works correctly.
4117   pipe_works=no
4118   rm -f conftest*
4119   cat > conftest.$ac_ext <<EOF
4120 #ifdef __cplusplus
4121 extern "C" {
4122 #endif
4123 char nm_test_var;
4124 void nm_test_func(){}
4125 #ifdef __cplusplus
4126 }
4127 #endif
4128 int main(){nm_test_var='a';nm_test_func();return(0);}
4129 EOF
4130
4131   if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132     # Now try to grab the symbols.
4133     nlist=conftest.nm
4134     if { (eval echo configure:4135: \"$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
4135       # Try sorting and uniquifying the output.
4136       if sort "$nlist" | uniq > "$nlist"T; then
4137         mv -f "$nlist"T "$nlist"
4138       else
4139         rm -f "$nlist"T
4140       fi
4141
4142       # Make sure that we snagged all the symbols we need.
4143       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4144         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4145           cat <<EOF > conftest.$ac_ext
4146 #ifdef __cplusplus
4147 extern "C" {
4148 #endif
4149
4150 EOF
4151           # Now generate the symbol file.
4152           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4153
4154           cat <<EOF >> conftest.$ac_ext
4155 #if defined (__STDC__) && __STDC__
4156 # define lt_ptr void *
4157 #else
4158 # define lt_ptr char *
4159 # define const
4160 #endif
4161
4162 /* The mapping between symbol names and symbols. */
4163 const struct {
4164   const char *name;
4165   lt_ptr address;
4166 }
4167 lt_preloaded_symbols[] =
4168 {
4169 EOF
4170           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4171           cat <<\EOF >> conftest.$ac_ext
4172   {0, (lt_ptr) 0}
4173 };
4174
4175 #ifdef __cplusplus
4176 }
4177 #endif
4178 EOF
4179           # Now try linking the two files.
4180           mv conftest.$ac_objext conftstm.$ac_objext
4181           save_LIBS="$LIBS"
4182           save_CFLAGS="$CFLAGS"
4183           LIBS="conftstm.$ac_objext"
4184           CFLAGS="$CFLAGS$no_builtin_flag"
4185           if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4186             pipe_works=yes
4187           fi
4188           LIBS="$save_LIBS"
4189           CFLAGS="$save_CFLAGS"
4190         else
4191           echo "cannot find nm_test_func in $nlist" >&5
4192         fi
4193       else
4194         echo "cannot find nm_test_var in $nlist" >&5
4195       fi
4196     else
4197       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4198     fi
4199   else
4200     echo "$progname: failed program was:" >&5
4201     cat conftest.$ac_ext >&5
4202   fi
4203   rm -f conftest* conftst*
4204
4205   # Do not use the global_symbol_pipe unless it works.
4206   if test "$pipe_works" = yes; then
4207     break
4208   else
4209     lt_cv_sys_global_symbol_pipe=
4210   fi
4211 done
4212
4213 fi
4214
4215 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4216 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4217   global_symbol_to_cdecl=
4218   global_symbol_to_c_name_address=
4219 else
4220   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4221   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4222 fi
4223 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4224 then
4225   echo "$ac_t""failed" 1>&6
4226 else
4227   echo "$ac_t""ok" 1>&6
4228 fi
4229
4230 for ac_hdr in dlfcn.h
4231 do
4232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4234 echo "configure:4235: checking for $ac_hdr" >&5
4235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 #include <$ac_hdr>
4242 EOF
4243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4244 { (eval echo configure:4245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4246 if test -z "$ac_err"; then
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=yes"
4249 else
4250   echo "$ac_err" >&5
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   eval "ac_cv_header_$ac_safe=no"
4255 fi
4256 rm -f conftest*
4257 fi
4258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4259   echo "$ac_t""yes" 1>&6
4260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4261   cat >> confdefs.h <<EOF
4262 #define $ac_tr_hdr 1
4263 EOF
4264  
4265 else
4266   echo "$ac_t""no" 1>&6
4267 fi
4268 done
4269
4270
4271
4272
4273
4274
4275 # Only perform the check for file, if the check method requires it
4276 case $deplibs_check_method in
4277 file_magic*)
4278   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4279     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4280 echo "configure:4281: checking for ${ac_tool_prefix}file" >&5
4281 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   case $MAGIC_CMD in
4285   /*)
4286   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4287   ;;
4288   ?:/*)
4289   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4290   ;;
4291   *)
4292   ac_save_MAGIC_CMD="$MAGIC_CMD"
4293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4294   ac_dummy="/usr/bin:$PATH"
4295   for ac_dir in $ac_dummy; do
4296     test -z "$ac_dir" && ac_dir=.
4297     if test -f $ac_dir/${ac_tool_prefix}file; then
4298       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4299       if test -n "$file_magic_test_file"; then
4300         case $deplibs_check_method in
4301         "file_magic "*)
4302           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4303           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4304           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4305             egrep "$file_magic_regex" > /dev/null; then
4306             :
4307           else
4308             cat <<EOF 1>&2
4309
4310 *** Warning: the command libtool uses to detect shared libraries,
4311 *** $file_magic_cmd, produces output that libtool cannot recognize.
4312 *** The result is that libtool may fail to recognize shared libraries
4313 *** as such.  This will affect the creation of libtool libraries that
4314 *** depend on shared libraries, but programs linked with such libtool
4315 *** libraries will work regardless of this problem.  Nevertheless, you
4316 *** may want to report the problem to your system manager and/or to
4317 *** bug-libtool@gnu.org
4318
4319 EOF
4320           fi ;;
4321         esac
4322       fi
4323       break
4324     fi
4325   done
4326   IFS="$ac_save_ifs"
4327   MAGIC_CMD="$ac_save_MAGIC_CMD"
4328   ;;
4329 esac
4330 fi
4331
4332 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4333 if test -n "$MAGIC_CMD"; then
4334   echo "$ac_t""$MAGIC_CMD" 1>&6
4335 else
4336   echo "$ac_t""no" 1>&6
4337 fi
4338
4339 if test -z "$lt_cv_path_MAGIC_CMD"; then
4340   if test -n "$ac_tool_prefix"; then
4341     echo $ac_n "checking for file""... $ac_c" 1>&6
4342 echo "configure:4343: checking for file" >&5
4343 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   case $MAGIC_CMD in
4347   /*)
4348   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4349   ;;
4350   ?:/*)
4351   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4352   ;;
4353   *)
4354   ac_save_MAGIC_CMD="$MAGIC_CMD"
4355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4356   ac_dummy="/usr/bin:$PATH"
4357   for ac_dir in $ac_dummy; do
4358     test -z "$ac_dir" && ac_dir=.
4359     if test -f $ac_dir/file; then
4360       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4361       if test -n "$file_magic_test_file"; then
4362         case $deplibs_check_method in
4363         "file_magic "*)
4364           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4365           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4366           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4367             egrep "$file_magic_regex" > /dev/null; then
4368             :
4369           else
4370             cat <<EOF 1>&2
4371
4372 *** Warning: the command libtool uses to detect shared libraries,
4373 *** $file_magic_cmd, produces output that libtool cannot recognize.
4374 *** The result is that libtool may fail to recognize shared libraries
4375 *** as such.  This will affect the creation of libtool libraries that
4376 *** depend on shared libraries, but programs linked with such libtool
4377 *** libraries will work regardless of this problem.  Nevertheless, you
4378 *** may want to report the problem to your system manager and/or to
4379 *** bug-libtool@gnu.org
4380
4381 EOF
4382           fi ;;
4383         esac
4384       fi
4385       break
4386     fi
4387   done
4388   IFS="$ac_save_ifs"
4389   MAGIC_CMD="$ac_save_MAGIC_CMD"
4390   ;;
4391 esac
4392 fi
4393
4394 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4395 if test -n "$MAGIC_CMD"; then
4396   echo "$ac_t""$MAGIC_CMD" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401   else
4402     MAGIC_CMD=:
4403   fi
4404 fi
4405
4406   fi
4407   ;;
4408 esac
4409
4410 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4411 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_word" >&5
4414 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   if test -n "$RANLIB"; then
4418   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4419 else
4420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4421   ac_dummy="$PATH"
4422   for ac_dir in $ac_dummy; do
4423     test -z "$ac_dir" && ac_dir=.
4424     if test -f $ac_dir/$ac_word; then
4425       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4426       break
4427     fi
4428   done
4429   IFS="$ac_save_ifs"
4430 fi
4431 fi
4432 RANLIB="$ac_cv_prog_RANLIB"
4433 if test -n "$RANLIB"; then
4434   echo "$ac_t""$RANLIB" 1>&6
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439
4440 if test -z "$ac_cv_prog_RANLIB"; then
4441 if test -n "$ac_tool_prefix"; then
4442   # Extract the first word of "ranlib", so it can be a program name with args.
4443 set dummy ranlib; ac_word=$2
4444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_word" >&5
4446 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   if test -n "$RANLIB"; then
4450   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4451 else
4452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4453   ac_dummy="$PATH"
4454   for ac_dir in $ac_dummy; do
4455     test -z "$ac_dir" && ac_dir=.
4456     if test -f $ac_dir/$ac_word; then
4457       ac_cv_prog_RANLIB="ranlib"
4458       break
4459     fi
4460   done
4461   IFS="$ac_save_ifs"
4462   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4463 fi
4464 fi
4465 RANLIB="$ac_cv_prog_RANLIB"
4466 if test -n "$RANLIB"; then
4467   echo "$ac_t""$RANLIB" 1>&6
4468 else
4469   echo "$ac_t""no" 1>&6
4470 fi
4471
4472 else
4473   RANLIB=":"
4474 fi
4475 fi
4476
4477 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4478 set dummy ${ac_tool_prefix}strip; ac_word=$2
4479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_word" >&5
4481 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   if test -n "$STRIP"; then
4485   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4486 else
4487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4488   ac_dummy="$PATH"
4489   for ac_dir in $ac_dummy; do
4490     test -z "$ac_dir" && ac_dir=.
4491     if test -f $ac_dir/$ac_word; then
4492       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4493       break
4494     fi
4495   done
4496   IFS="$ac_save_ifs"
4497 fi
4498 fi
4499 STRIP="$ac_cv_prog_STRIP"
4500 if test -n "$STRIP"; then
4501   echo "$ac_t""$STRIP" 1>&6
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506
4507 if test -z "$ac_cv_prog_STRIP"; then
4508 if test -n "$ac_tool_prefix"; then
4509   # Extract the first word of "strip", so it can be a program name with args.
4510 set dummy strip; ac_word=$2
4511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_word" >&5
4513 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   if test -n "$STRIP"; then
4517   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4518 else
4519   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4520   ac_dummy="$PATH"
4521   for ac_dir in $ac_dummy; do
4522     test -z "$ac_dir" && ac_dir=.
4523     if test -f $ac_dir/$ac_word; then
4524       ac_cv_prog_STRIP="strip"
4525       break
4526     fi
4527   done
4528   IFS="$ac_save_ifs"
4529   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4530 fi
4531 fi
4532 STRIP="$ac_cv_prog_STRIP"
4533 if test -n "$STRIP"; then
4534   echo "$ac_t""$STRIP" 1>&6
4535 else
4536   echo "$ac_t""no" 1>&6
4537 fi
4538
4539 else
4540   STRIP=":"
4541 fi
4542 fi
4543
4544
4545 enable_dlopen=yes
4546 enable_win32_dll=yes
4547
4548 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4549 if test "${enable_libtool_lock+set}" = set; then
4550   enableval="$enable_libtool_lock"
4551   :
4552 fi
4553
4554 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4555
4556 # Some flags need to be propagated to the compiler or linker for good
4557 # libtool support.
4558 case $host in
4559 *-*-irix6*)
4560   # Find out which ABI we are using.
4561   echo '#line 4562 "configure"' > conftest.$ac_ext
4562   if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4563     case `/usr/bin/file conftest.$ac_objext` in
4564     *32-bit*)
4565       LD="${LD-ld} -32"
4566       ;;
4567     *N32*)
4568       LD="${LD-ld} -n32"
4569       ;;
4570     *64-bit*)
4571       LD="${LD-ld} -64"
4572       ;;
4573     esac
4574   fi
4575   rm -rf conftest*
4576   ;;
4577
4578 *-*-sco3.2v5*)
4579   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4580   SAVE_CFLAGS="$CFLAGS"
4581   CFLAGS="$CFLAGS -belf"
4582   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4583 echo "configure:4584: checking whether the C compiler needs -belf" >&5
4584 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   
4588      ac_ext=c
4589 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4590 ac_cpp='$CPP $CPPFLAGS'
4591 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4592 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4593 cross_compiling=$ac_cv_prog_cc_cross
4594
4595      cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598
4599 int main() {
4600
4601 ; return 0; }
4602 EOF
4603 if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4604   rm -rf conftest*
4605   lt_cv_cc_needs_belf=yes
4606 else
4607   echo "configure: failed program was:" >&5
4608   cat conftest.$ac_ext >&5
4609   rm -rf conftest*
4610   lt_cv_cc_needs_belf=no
4611 fi
4612 rm -f conftest*
4613      ac_ext=c
4614 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4615 ac_cpp='$CPP $CPPFLAGS'
4616 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4617 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4618 cross_compiling=$ac_cv_prog_cc_cross
4619
4620 fi
4621
4622 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4623   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4624     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4625     CFLAGS="$SAVE_CFLAGS"
4626   fi
4627   ;;
4628
4629 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4630   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4631 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_word" >&5
4634 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   if test -n "$DLLTOOL"; then
4638   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4639 else
4640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4641   ac_dummy="$PATH"
4642   for ac_dir in $ac_dummy; do
4643     test -z "$ac_dir" && ac_dir=.
4644     if test -f $ac_dir/$ac_word; then
4645       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4646       break
4647     fi
4648   done
4649   IFS="$ac_save_ifs"
4650 fi
4651 fi
4652 DLLTOOL="$ac_cv_prog_DLLTOOL"
4653 if test -n "$DLLTOOL"; then
4654   echo "$ac_t""$DLLTOOL" 1>&6
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659
4660 if test -z "$ac_cv_prog_DLLTOOL"; then
4661 if test -n "$ac_tool_prefix"; then
4662   # Extract the first word of "dlltool", so it can be a program name with args.
4663 set dummy dlltool; ac_word=$2
4664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_word" >&5
4666 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   if test -n "$DLLTOOL"; then
4670   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4671 else
4672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4673   ac_dummy="$PATH"
4674   for ac_dir in $ac_dummy; do
4675     test -z "$ac_dir" && ac_dir=.
4676     if test -f $ac_dir/$ac_word; then
4677       ac_cv_prog_DLLTOOL="dlltool"
4678       break
4679     fi
4680   done
4681   IFS="$ac_save_ifs"
4682   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4683 fi
4684 fi
4685 DLLTOOL="$ac_cv_prog_DLLTOOL"
4686 if test -n "$DLLTOOL"; then
4687   echo "$ac_t""$DLLTOOL" 1>&6
4688 else
4689   echo "$ac_t""no" 1>&6
4690 fi
4691
4692 else
4693   DLLTOOL="false"
4694 fi
4695 fi
4696
4697   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4698 set dummy ${ac_tool_prefix}as; ac_word=$2
4699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_word" >&5
4701 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   if test -n "$AS"; then
4705   ac_cv_prog_AS="$AS" # Let the user override the test.
4706 else
4707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4708   ac_dummy="$PATH"
4709   for ac_dir in $ac_dummy; do
4710     test -z "$ac_dir" && ac_dir=.
4711     if test -f $ac_dir/$ac_word; then
4712       ac_cv_prog_AS="${ac_tool_prefix}as"
4713       break
4714     fi
4715   done
4716   IFS="$ac_save_ifs"
4717 fi
4718 fi
4719 AS="$ac_cv_prog_AS"
4720 if test -n "$AS"; then
4721   echo "$ac_t""$AS" 1>&6
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725
4726
4727 if test -z "$ac_cv_prog_AS"; then
4728 if test -n "$ac_tool_prefix"; then
4729   # Extract the first word of "as", so it can be a program name with args.
4730 set dummy as; ac_word=$2
4731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_word" >&5
4733 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   if test -n "$AS"; then
4737   ac_cv_prog_AS="$AS" # Let the user override the test.
4738 else
4739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4740   ac_dummy="$PATH"
4741   for ac_dir in $ac_dummy; do
4742     test -z "$ac_dir" && ac_dir=.
4743     if test -f $ac_dir/$ac_word; then
4744       ac_cv_prog_AS="as"
4745       break
4746     fi
4747   done
4748   IFS="$ac_save_ifs"
4749   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4750 fi
4751 fi
4752 AS="$ac_cv_prog_AS"
4753 if test -n "$AS"; then
4754   echo "$ac_t""$AS" 1>&6
4755 else
4756   echo "$ac_t""no" 1>&6
4757 fi
4758
4759 else
4760   AS="false"
4761 fi
4762 fi
4763
4764   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4765 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4767 echo "configure:4768: checking for $ac_word" >&5
4768 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   if test -n "$OBJDUMP"; then
4772   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4773 else
4774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4775   ac_dummy="$PATH"
4776   for ac_dir in $ac_dummy; do
4777     test -z "$ac_dir" && ac_dir=.
4778     if test -f $ac_dir/$ac_word; then
4779       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4780       break
4781     fi
4782   done
4783   IFS="$ac_save_ifs"
4784 fi
4785 fi
4786 OBJDUMP="$ac_cv_prog_OBJDUMP"
4787 if test -n "$OBJDUMP"; then
4788   echo "$ac_t""$OBJDUMP" 1>&6
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792
4793
4794 if test -z "$ac_cv_prog_OBJDUMP"; then
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "objdump", so it can be a program name with args.
4797 set dummy objdump; ac_word=$2
4798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4799 echo "configure:4800: checking for $ac_word" >&5
4800 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   if test -n "$OBJDUMP"; then
4804   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4805 else
4806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4807   ac_dummy="$PATH"
4808   for ac_dir in $ac_dummy; do
4809     test -z "$ac_dir" && ac_dir=.
4810     if test -f $ac_dir/$ac_word; then
4811       ac_cv_prog_OBJDUMP="objdump"
4812       break
4813     fi
4814   done
4815   IFS="$ac_save_ifs"
4816   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4817 fi
4818 fi
4819 OBJDUMP="$ac_cv_prog_OBJDUMP"
4820 if test -n "$OBJDUMP"; then
4821   echo "$ac_t""$OBJDUMP" 1>&6
4822 else
4823   echo "$ac_t""no" 1>&6
4824 fi
4825
4826 else
4827   OBJDUMP="false"
4828 fi
4829 fi
4830
4831
4832   # recent cygwin and mingw systems supply a stub DllMain which the user
4833   # can override, but on older systems we have to supply one
4834   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4835 echo "configure:4836: checking if libtool should supply DllMain function" >&5
4836 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842
4843 int main() {
4844 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4845       DllMain (0, 0, 0);
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   lt_cv_need_dllmain=no
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   lt_cv_need_dllmain=yes
4856 fi
4857 rm -f conftest*
4858 fi
4859
4860 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4861
4862   case $host/$CC in
4863   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4864     # old mingw systems require "-dll" to link a DLL, while more recent ones
4865     # require "-mdll"
4866     SAVE_CFLAGS="$CFLAGS"
4867     CFLAGS="$CFLAGS -mdll"
4868     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4869 echo "configure:4870: checking how to link DLLs" >&5
4870 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876
4877 int main() {
4878
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   lt_cv_cc_dll_switch=-mdll
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   lt_cv_cc_dll_switch=-dll
4889 fi
4890 rm -f conftest*
4891 fi
4892
4893 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4894     CFLAGS="$SAVE_CFLAGS" ;;
4895   *-*-cygwin* | *-*-pw32*)
4896     # cygwin systems need to pass --dll to the linker, and not link
4897     # crt.o which will require a WinMain@16 definition.
4898     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4899   esac
4900   ;;
4901   
4902 esac
4903
4904 # Sed substitution that helps us do robust quoting.  It backslashifies
4905 # metacharacters that are still active within double-quoted strings.
4906 Xsed='sed -e s/^X//'
4907 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4908
4909 # Same as above, but do not quote variable references.
4910 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4911
4912 # Sed substitution to delay expansion of an escaped shell variable in a
4913 # double_quote_subst'ed string.
4914 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4915
4916 # Constants:
4917 rm="rm -f"
4918
4919 # Global variables:
4920 default_ofile=libtool
4921 can_build_shared=yes
4922
4923 # All known linkers require a `.a' archive for static linking (except M$VC,
4924 # which needs '.lib').
4925 libext=a
4926 ltmain="$ac_aux_dir/ltmain.sh"
4927 ofile="$default_ofile"
4928 with_gnu_ld="$lt_cv_prog_gnu_ld"
4929 need_locks="$enable_libtool_lock"
4930
4931 old_CC="$CC"
4932 old_CFLAGS="$CFLAGS"
4933
4934 # Set sane defaults for various variables
4935 test -z "$AR" && AR=ar
4936 test -z "$AR_FLAGS" && AR_FLAGS=cru
4937 test -z "$AS" && AS=as
4938 test -z "$CC" && CC=cc
4939 test -z "$DLLTOOL" && DLLTOOL=dlltool
4940 test -z "$LD" && LD=ld
4941 test -z "$LN_S" && LN_S="ln -s"
4942 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4943 test -z "$NM" && NM=nm
4944 test -z "$OBJDUMP" && OBJDUMP=objdump
4945 test -z "$RANLIB" && RANLIB=:
4946 test -z "$STRIP" && STRIP=:
4947 test -z "$ac_objext" && ac_objext=o
4948
4949 if test x"$host" != x"$build"; then
4950   ac_tool_prefix=${host_alias}-
4951 else
4952   ac_tool_prefix=
4953 fi
4954
4955 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4956 case $host_os in
4957 linux-gnu*) ;;
4958 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4959 esac
4960
4961 case $host_os in
4962 aix3*)
4963   # AIX sometimes has problems with the GCC collect2 program.  For some
4964   # reason, if we set the COLLECT_NAMES environment variable, the problems
4965   # vanish in a puff of smoke.
4966   if test "X${COLLECT_NAMES+set}" != Xset; then
4967     COLLECT_NAMES=
4968     export COLLECT_NAMES
4969   fi
4970   ;;
4971 esac
4972
4973 # Determine commands to create old-style static archives.
4974 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4975 old_postinstall_cmds='chmod 644 $oldlib'
4976 old_postuninstall_cmds=
4977
4978 if test -n "$RANLIB"; then
4979   case $host_os in
4980   openbsd*)
4981     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4982     ;;
4983   *)
4984     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4985     ;;
4986   esac
4987   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4988 fi
4989
4990 # Allow CC to be a program name with arguments.
4991 set dummy $CC
4992 compiler="$2"
4993
4994 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4995 echo "configure:4996: checking for objdir" >&5
4996 rm -f .libs 2>/dev/null
4997 mkdir .libs 2>/dev/null
4998 if test -d .libs; then
4999   objdir=.libs
5000 else
5001   # MS-DOS does not allow filenames that begin with a dot.
5002   objdir=_libs
5003 fi
5004 rmdir .libs 2>/dev/null
5005 echo "$ac_t""$objdir" 1>&6
5006
5007
5008 # Check whether --with-pic or --without-pic was given.
5009 if test "${with_pic+set}" = set; then
5010   withval="$with_pic"
5011   pic_mode="$withval"
5012 else
5013   pic_mode=default
5014 fi
5015
5016 test -z "$pic_mode" && pic_mode=default
5017
5018 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5019 # in isolation, and that seeing it set (from the cache) indicates that
5020 # the associated values are set (in the cache) correctly too.
5021 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5022 echo "configure:5023: checking for $compiler option to produce PIC" >&5
5023 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5024   echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026    lt_cv_prog_cc_pic=
5027   lt_cv_prog_cc_shlib=
5028   lt_cv_prog_cc_wl=
5029   lt_cv_prog_cc_static=
5030   lt_cv_prog_cc_no_builtin=
5031   lt_cv_prog_cc_can_build_shared=$can_build_shared
5032
5033   if test "$GCC" = yes; then
5034     lt_cv_prog_cc_wl='-Wl,'
5035     lt_cv_prog_cc_static='-static'
5036
5037     case $host_os in
5038     aix*)
5039       # Below there is a dirty hack to force normal static linking with -ldl
5040       # The problem is because libdl dynamically linked with both libc and
5041       # libC (AIX C++ library), which obviously doesn't included in libraries
5042       # list by gcc. This cause undefined symbols with -static flags.
5043       # This hack allows C programs to be linked with "-static -ldl", but
5044       # not sure about C++ programs.
5045       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5046       ;;
5047     amigaos*)
5048       # FIXME: we need at least 68020 code to build shared libraries, but
5049       # adding the `-m68020' flag to GCC prevents building anything better,
5050       # like `-m68040'.
5051       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5052       ;;
5053     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5054       # PIC is the default for these OSes.
5055       ;;
5056     darwin* | rhapsody*)
5057       # PIC is the default on this platform
5058       # Common symbols not allowed in MH_DYLIB files
5059       lt_cv_prog_cc_pic='-fno-common'
5060       ;;
5061     cygwin* | mingw* | pw32* | os2*)
5062       # This hack is so that the source file can tell whether it is being
5063       # built for inclusion in a dll (and should export symbols for example).
5064       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5065       ;;
5066     sysv4*MP*)
5067       if test -d /usr/nec; then
5068          lt_cv_prog_cc_pic=-Kconform_pic
5069       fi
5070       ;;
5071     *)
5072       lt_cv_prog_cc_pic='-fPIC'
5073       ;;
5074     esac
5075   else
5076     # PORTME Check for PIC flags for the system compiler.
5077     case $host_os in
5078     aix3* | aix4* | aix5*)
5079       lt_cv_prog_cc_wl='-Wl,'
5080       # All AIX code is PIC.
5081       if test "$host_cpu" = ia64; then
5082         # AIX 5 now supports IA64 processor
5083         lt_cv_prog_cc_static='-Bstatic'
5084       else
5085         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5086       fi
5087       ;;
5088
5089     hpux9* | hpux10* | hpux11*)
5090       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5091       lt_cv_prog_cc_wl='-Wl,'
5092       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5093       lt_cv_prog_cc_pic='+Z'
5094       ;;
5095
5096     irix5* | irix6* | nonstopux*)
5097       lt_cv_prog_cc_wl='-Wl,'
5098       lt_cv_prog_cc_static='-non_shared'
5099       # PIC (with -KPIC) is the default.
5100       ;;
5101
5102     cygwin* | mingw* | pw32* | os2*)
5103       # This hack is so that the source file can tell whether it is being
5104       # built for inclusion in a dll (and should export symbols for example).
5105       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5106       ;;
5107
5108     newsos6)
5109       lt_cv_prog_cc_pic='-KPIC'
5110       lt_cv_prog_cc_static='-Bstatic'
5111       ;;
5112
5113     osf3* | osf4* | osf5*)
5114       # All OSF/1 code is PIC.
5115       lt_cv_prog_cc_wl='-Wl,'
5116       lt_cv_prog_cc_static='-non_shared'
5117       ;;
5118
5119     sco3.2v5*)
5120       lt_cv_prog_cc_pic='-Kpic'
5121       lt_cv_prog_cc_static='-dn'
5122       lt_cv_prog_cc_shlib='-belf'
5123       ;;
5124
5125     solaris*)
5126       lt_cv_prog_cc_pic='-KPIC'
5127       lt_cv_prog_cc_static='-Bstatic'
5128       lt_cv_prog_cc_wl='-Wl,'
5129       ;;
5130
5131     sunos4*)
5132       lt_cv_prog_cc_pic='-PIC'
5133       lt_cv_prog_cc_static='-Bstatic'
5134       lt_cv_prog_cc_wl='-Qoption ld '
5135       ;;
5136
5137     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5138       lt_cv_prog_cc_pic='-KPIC'
5139       lt_cv_prog_cc_static='-Bstatic'
5140       lt_cv_prog_cc_wl='-Wl,'
5141       ;;
5142
5143     uts4*)
5144       lt_cv_prog_cc_pic='-pic'
5145       lt_cv_prog_cc_static='-Bstatic'
5146       ;;
5147
5148     sysv4*MP*)
5149       if test -d /usr/nec ;then
5150         lt_cv_prog_cc_pic='-Kconform_pic'
5151         lt_cv_prog_cc_static='-Bstatic'
5152       fi
5153       ;;
5154
5155     *)
5156       lt_cv_prog_cc_can_build_shared=no
5157       ;;
5158     esac
5159   fi
5160
5161 fi
5162
5163 if test -z "$lt_cv_prog_cc_pic"; then
5164   echo "$ac_t""none" 1>&6
5165 else
5166   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5167
5168   # Check to make sure the pic_flag actually works.
5169   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5170 echo "configure:5171: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5171   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174       save_CFLAGS="$CFLAGS"
5175     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5176     cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179
5180 int main() {
5181
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5185   rm -rf conftest*
5186         case $host_os in
5187       hpux9* | hpux10* | hpux11*)
5188         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5189         # they create non-PIC objects.  So, if there were any warnings, we
5190         # assume that PIC is not supported.
5191         if test -s conftest.err; then
5192           lt_cv_prog_cc_pic_works=no
5193         else
5194           lt_cv_prog_cc_pic_works=yes
5195         fi
5196         ;;
5197       *)
5198         lt_cv_prog_cc_pic_works=yes
5199         ;;
5200       esac
5201     
5202 else
5203   echo "configure: failed program was:" >&5
5204   cat conftest.$ac_ext >&5
5205   rm -rf conftest*
5206         lt_cv_prog_cc_pic_works=no
5207     
5208 fi
5209 rm -f conftest*
5210     CFLAGS="$save_CFLAGS"
5211   
5212 fi
5213
5214
5215   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5216     lt_cv_prog_cc_pic=
5217     lt_cv_prog_cc_can_build_shared=no
5218   else
5219     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5220   fi
5221
5222   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5223 fi
5224
5225 # Check for any special shared library compilation flags.
5226 if test -n "$lt_cv_prog_cc_shlib"; then
5227   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5228   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5229   else
5230    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5231     lt_cv_prog_cc_can_build_shared=no
5232   fi
5233 fi
5234
5235 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5236 echo "configure:5237: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5237 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240     lt_cv_prog_cc_static_works=no
5241   save_LDFLAGS="$LDFLAGS"
5242   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5243   cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246
5247 int main() {
5248
5249 ; return 0; }
5250 EOF
5251 if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5252   rm -rf conftest*
5253   lt_cv_prog_cc_static_works=yes
5254 else
5255   echo "configure: failed program was:" >&5
5256   cat conftest.$ac_ext >&5
5257 fi
5258 rm -f conftest*
5259   LDFLAGS="$save_LDFLAGS"
5260
5261 fi
5262
5263
5264 # Belt *and* braces to stop my trousers falling down:
5265 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5266 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5267
5268 pic_flag="$lt_cv_prog_cc_pic"
5269 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5270 wl="$lt_cv_prog_cc_wl"
5271 link_static_flag="$lt_cv_prog_cc_static"
5272 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5273 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5274
5275
5276 # Check to see if options -o and -c are simultaneously supported by compiler
5277 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler supports -c -o file.$ac_objext" >&5
5279 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282   
5283 $rm -r conftest 2>/dev/null
5284 mkdir conftest
5285 cd conftest
5286 echo "int some_variable = 0;" > conftest.$ac_ext
5287 mkdir out
5288 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5289 # that will create temporary files in the current directory regardless of
5290 # the output directory.  Thus, making CWD read-only will cause this test
5291 # to fail, enabling locking or at least warning the user not to do parallel
5292 # builds.
5293 chmod -w .
5294 save_CFLAGS="$CFLAGS"
5295 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5296 compiler_c_o=no
5297 if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5298   # The compiler can only warn and ignore the option if not recognized
5299   # So say no if there are warnings
5300   if test -s out/conftest.err; then
5301     lt_cv_compiler_c_o=no
5302   else
5303     lt_cv_compiler_c_o=yes
5304   fi
5305 else
5306   # Append any errors to the config.log.
5307   cat out/conftest.err 1>&5
5308   lt_cv_compiler_c_o=no
5309 fi
5310 CFLAGS="$save_CFLAGS"
5311 chmod u+w .
5312 $rm conftest* out/*
5313 rmdir out
5314 cd ..
5315 rmdir conftest
5316 $rm -r conftest 2>/dev/null
5317
5318 fi
5319
5320 compiler_c_o=$lt_cv_compiler_c_o
5321 echo "$ac_t""$compiler_c_o" 1>&6
5322
5323 if test x"$compiler_c_o" = x"yes"; then
5324   # Check to see if we can write to a .lo
5325   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5326 echo "configure:5327: checking if $compiler supports -c -o file.lo" >&5
5327   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5328   echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330   
5331   lt_cv_compiler_o_lo=no
5332   save_CFLAGS="$CFLAGS"
5333   CFLAGS="$CFLAGS -c -o conftest.lo"
5334   save_objext="$ac_objext"
5335   ac_objext=lo
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 int main() {
5341 int some_variable = 0;
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5345   rm -rf conftest*
5346       # The compiler can only warn and ignore the option if not recognized
5347     # So say no if there are warnings
5348     if test -s conftest.err; then
5349       lt_cv_compiler_o_lo=no
5350     else
5351       lt_cv_compiler_o_lo=yes
5352     fi
5353   
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357 fi
5358 rm -f conftest*
5359   ac_objext="$save_objext"
5360   CFLAGS="$save_CFLAGS"
5361   
5362 fi
5363
5364   compiler_o_lo=$lt_cv_compiler_o_lo
5365   echo "$ac_t""$compiler_o_lo" 1>&6
5366 else
5367   compiler_o_lo=no
5368 fi
5369
5370 # Check to see if we can do hard links to lock some files if needed
5371 hard_links="nottested"
5372 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5373   # do not overwrite the value of need_locks provided by the user
5374   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5375 echo "configure:5376: checking if we can lock with hard links" >&5
5376   hard_links=yes
5377   $rm conftest*
5378   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5379   touch conftest.a
5380   ln conftest.a conftest.b 2>&5 || hard_links=no
5381   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5382   echo "$ac_t""$hard_links" 1>&6
5383   if test "$hard_links" = no; then
5384     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5385     need_locks=warn
5386   fi
5387 else
5388   need_locks=no
5389 fi
5390
5391 if test "$GCC" = yes; then
5392   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5393   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5394 echo "configure:5395: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5395   echo "int some_variable = 0;" > conftest.$ac_ext
5396   save_CFLAGS="$CFLAGS"
5397   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5398   compiler_rtti_exceptions=no
5399   cat > conftest.$ac_ext <<EOF
5400 #line 5401 "configure"
5401 #include "confdefs.h"
5402
5403 int main() {
5404 int some_variable = 0;
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5408   rm -rf conftest*
5409       # The compiler can only warn and ignore the option if not recognized
5410     # So say no if there are warnings
5411     if test -s conftest.err; then
5412       compiler_rtti_exceptions=no
5413     else
5414       compiler_rtti_exceptions=yes
5415     fi
5416   
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420 fi
5421 rm -f conftest*
5422   CFLAGS="$save_CFLAGS"
5423   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5424
5425   if test "$compiler_rtti_exceptions" = "yes"; then
5426     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5427   else
5428     no_builtin_flag=' -fno-builtin'
5429   fi
5430 fi
5431
5432 # See if the linker supports building shared libraries.
5433 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5434 echo "configure:5435: checking whether the linker ($LD) supports shared libraries" >&5
5435
5436 allow_undefined_flag=
5437 no_undefined_flag=
5438 need_lib_prefix=unknown
5439 need_version=unknown
5440 # when you set need_version to no, make sure it does not cause -set_version
5441 # flags to be left without arguments
5442 archive_cmds=
5443 archive_expsym_cmds=
5444 old_archive_from_new_cmds=
5445 old_archive_from_expsyms_cmds=
5446 export_dynamic_flag_spec=
5447 whole_archive_flag_spec=
5448 thread_safe_flag_spec=
5449 hardcode_into_libs=no
5450 hardcode_libdir_flag_spec=
5451 hardcode_libdir_separator=
5452 hardcode_direct=no
5453 hardcode_minus_L=no
5454 hardcode_shlibpath_var=unsupported
5455 runpath_var=
5456 link_all_deplibs=unknown
5457 always_export_symbols=no
5458 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5459 # include_expsyms should be a list of space-separated symbols to be *always*
5460 # included in the symbol list
5461 include_expsyms=
5462 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5463 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5464 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5465 # as well as any symbol that contains `d'.
5466 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5467 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5468 # platforms (ab)use it in PIC code, but their linkers get confused if
5469 # the symbol is explicitly referenced.  Since portable code cannot
5470 # rely on this symbol name, it's probably fine to never include it in
5471 # preloaded symbol tables.
5472 extract_expsyms_cmds=
5473
5474 case $host_os in
5475 cygwin* | mingw* | pw32*)
5476   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5477   # When not using gcc, we currently assume that we are using
5478   # Microsoft Visual C++.
5479   if test "$GCC" != yes; then
5480     with_gnu_ld=no
5481   fi
5482   ;;
5483 openbsd*)
5484   with_gnu_ld=no
5485   ;;
5486 esac
5487
5488 ld_shlibs=yes
5489 if test "$with_gnu_ld" = yes; then
5490   # If archive_cmds runs LD, not CC, wlarc should be empty
5491   wlarc='${wl}'
5492
5493   # See if GNU ld supports shared libraries.
5494   case $host_os in
5495   aix3* | aix4* | aix5*)
5496     # On AIX, the GNU linker is very broken
5497     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5498     ld_shlibs=no
5499     cat <<EOF 1>&2
5500
5501 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5502 *** to be unable to reliably create shared libraries on AIX.
5503 *** Therefore, libtool is disabling shared libraries support.  If you
5504 *** really care for shared libraries, you may want to modify your PATH
5505 *** so that a non-GNU linker is found, and then restart.
5506
5507 EOF
5508     ;;
5509
5510   amigaos*)
5511     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)'
5512     hardcode_libdir_flag_spec='-L$libdir'
5513     hardcode_minus_L=yes
5514
5515     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5516     # that the semantics of dynamic libraries on AmigaOS, at least up
5517     # to version 4, is to share data among multiple programs linked
5518     # with the same dynamic library.  Since this doesn't match the
5519     # behavior of shared libraries on other platforms, we can use
5520     # them.
5521     ld_shlibs=no
5522     ;;
5523
5524   beos*)
5525     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5526       allow_undefined_flag=unsupported
5527       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5528       # support --undefined.  This deserves some investigation.  FIXME
5529       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5530     else
5531       ld_shlibs=no
5532     fi
5533     ;;
5534
5535   cygwin* | mingw* | pw32*)
5536     # hardcode_libdir_flag_spec is actually meaningless, as there is
5537     # no search path for DLLs.
5538     hardcode_libdir_flag_spec='-L$libdir'
5539     allow_undefined_flag=unsupported
5540     always_export_symbols=yes
5541
5542     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5543       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5544       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5545       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5546       else $CC -o impgen impgen.c ; fi)~
5547       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5548
5549     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5550
5551     # cygwin and mingw dlls have different entry points and sets of symbols
5552     # to exclude.
5553     # FIXME: what about values for MSVC?
5554     dll_entry=__cygwin_dll_entry@12
5555     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5556     case $host_os in
5557     mingw*)
5558       # mingw values
5559       dll_entry=_DllMainCRTStartup@12
5560       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5561       ;;
5562     esac
5563
5564     # mingw and cygwin differ, and it's simplest to just exclude the union
5565     # of the two symbol sets.
5566     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5567
5568     # recent cygwin and mingw systems supply a stub DllMain which the user
5569     # can override, but on older systems we have to supply one (in ltdll.c)
5570     if test "x$lt_cv_need_dllmain" = "xyes"; then
5571       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5572       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~
5573         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5574     else
5575       ltdll_obj=
5576       ltdll_cmds=
5577     fi
5578
5579     # Extract the symbol export list from an `--export-all' def file,
5580     # then regenerate the def file from the symbol export list, so that
5581     # the compiled dll only exports the symbol export list.
5582     # Be careful not to strip the DATA tag left be newer dlltools.
5583     export_symbols_cmds="$ltdll_cmds"'
5584       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5585       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5586
5587     # If the export-symbols file already is a .def file (1st line
5588     # is EXPORTS), use it as is.
5589     # If DATA tags from a recent dlltool are present, honour them!
5590     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5591         cp $export_symbols $output_objdir/$soname-def;
5592       else
5593         echo EXPORTS > $output_objdir/$soname-def;
5594         _lt_hint=1;
5595         cat $export_symbols | while read symbol; do
5596          set dummy \$symbol;
5597          case \$# in
5598            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5599            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5600            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5601          esac;
5602          _lt_hint=`expr 1 + \$_lt_hint`;
5603         done;
5604       fi~
5605       '"$ltdll_cmds"'
5606       $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~
5607       $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~
5608       $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~
5609       $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~
5610       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5611     ;;
5612
5613   netbsd*)
5614     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5615       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5616       wlarc=
5617     else
5618       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5620     fi
5621     ;;
5622
5623   solaris* | sysv5*)
5624     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5625       ld_shlibs=no
5626       cat <<EOF 1>&2
5627
5628 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5629 *** create shared libraries on Solaris systems.  Therefore, libtool
5630 *** is disabling shared libraries support.  We urge you to upgrade GNU
5631 *** binutils to release 2.9.1 or newer.  Another option is to modify
5632 *** your PATH or compiler configuration so that the native linker is
5633 *** used, and then restart.
5634
5635 EOF
5636     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5637       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5638       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5639     else
5640       ld_shlibs=no
5641     fi
5642     ;;
5643
5644   sunos4*)
5645     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5646     wlarc=
5647     hardcode_direct=yes
5648     hardcode_shlibpath_var=no
5649     ;;
5650
5651   *)
5652     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5653       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5654       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5655     else
5656       ld_shlibs=no
5657     fi
5658     ;;
5659   esac
5660
5661   if test "$ld_shlibs" = yes; then
5662     runpath_var=LD_RUN_PATH
5663     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5664     export_dynamic_flag_spec='${wl}--export-dynamic'
5665     case $host_os in
5666     cygwin* | mingw* | pw32*)
5667       # dlltool doesn't understand --whole-archive et. al.
5668       whole_archive_flag_spec=
5669       ;;
5670     *)
5671       # ancient GNU ld didn't support --whole-archive et. al.
5672       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5673         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5674       else
5675         whole_archive_flag_spec=
5676       fi
5677       ;;
5678     esac
5679   fi
5680 else
5681   # PORTME fill in a description of your system's linker (not GNU ld)
5682   case $host_os in
5683   aix3*)
5684     allow_undefined_flag=unsupported
5685     always_export_symbols=yes
5686     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'
5687     # Note: this linker hardcodes the directories in LIBPATH if there
5688     # are no directories specified by -L.
5689     hardcode_minus_L=yes
5690     if test "$GCC" = yes && test -z "$link_static_flag"; then
5691       # Neither direct hardcoding nor static linking is supported with a
5692       # broken collect2.
5693       hardcode_direct=unsupported
5694     fi
5695     ;;
5696
5697   aix4* | aix5*)
5698     if test "$host_cpu" = ia64; then
5699       # On IA64, the linker does run time linking by default, so we don't
5700       # have to do anything special.
5701       aix_use_runtimelinking=no
5702       exp_sym_flag='-Bexport'
5703       no_entry_flag=""
5704     else
5705       aix_use_runtimelinking=no
5706
5707       # Test if we are trying to use run time linking or normal
5708       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5709       # need to do runtime linking.
5710       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5711         for ld_flag in $LDFLAGS; do
5712           case $ld_flag in
5713           *-brtl*)
5714             aix_use_runtimelinking=yes
5715             break
5716           ;;
5717           esac
5718         done
5719       esac
5720
5721       exp_sym_flag='-bexport'
5722       no_entry_flag='-bnoentry'
5723     fi
5724
5725     # When large executables or shared objects are built, AIX ld can
5726     # have problems creating the table of contents.  If linking a library
5727     # or program results in "error TOC overflow" add -mminimal-toc to
5728     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5729     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5730
5731     hardcode_direct=yes
5732     archive_cmds=''
5733     hardcode_libdir_separator=':'
5734     if test "$GCC" = yes; then
5735       case $host_os in aix4.[012]|aix4.[012].*)
5736         collect2name=`${CC} -print-prog-name=collect2`
5737         if test -f "$collect2name" && \
5738           strings "$collect2name" | grep resolve_lib_name >/dev/null
5739         then
5740           # We have reworked collect2
5741           hardcode_direct=yes
5742         else
5743           # We have old collect2
5744           hardcode_direct=unsupported
5745           # It fails to find uninstalled libraries when the uninstalled
5746           # path is not listed in the libpath.  Setting hardcode_minus_L
5747           # to unsupported forces relinking
5748           hardcode_minus_L=yes
5749           hardcode_libdir_flag_spec='-L$libdir'
5750           hardcode_libdir_separator=
5751         fi
5752       esac
5753
5754       shared_flag='-shared'
5755     else
5756       # not using gcc
5757       if test "$host_cpu" = ia64; then
5758         shared_flag='${wl}-G'
5759       else
5760         if test "$aix_use_runtimelinking" = yes; then
5761           shared_flag='${wl}-G'
5762         else
5763           shared_flag='${wl}-bM:SRE'
5764         fi
5765       fi
5766     fi
5767
5768     # It seems that -bexpall can do strange things, so it is better to
5769     # generate a list of symbols to export.
5770     always_export_symbols=yes
5771     if test "$aix_use_runtimelinking" = yes; then
5772       # Warning - without using the other runtime loading flags (-brtl),
5773       # -berok will link without error, but may produce a broken library.
5774       allow_undefined_flag='-berok'
5775       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5776       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"
5777     else
5778       if test "$host_cpu" = ia64; then
5779         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5780         allow_undefined_flag="-z nodefs"
5781         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"
5782       else
5783         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5784         # Warning - without using the other run time loading flags,
5785         # -berok will link without error, but may produce a broken library.
5786         allow_undefined_flag='${wl}-berok'
5787         # This is a bit strange, but is similar to how AIX traditionally builds
5788         # it's shared libraries.
5789         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'
5790       fi
5791     fi
5792     ;;
5793
5794   amigaos*)
5795     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)'
5796     hardcode_libdir_flag_spec='-L$libdir'
5797     hardcode_minus_L=yes
5798     # see comment about different semantics on the GNU ld section
5799     ld_shlibs=no
5800     ;;
5801
5802   cygwin* | mingw* | pw32*)
5803     # When not using gcc, we currently assume that we are using
5804     # Microsoft Visual C++.
5805     # hardcode_libdir_flag_spec is actually meaningless, as there is
5806     # no search path for DLLs.
5807     hardcode_libdir_flag_spec=' '
5808     allow_undefined_flag=unsupported
5809     # Tell ltmain to make .lib files, not .a files.
5810     libext=lib
5811     # FIXME: Setting linknames here is a bad hack.
5812     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5813     # The linker will automatically build a .lib file if we build a DLL.
5814     old_archive_from_new_cmds='true'
5815     # FIXME: Should let the user specify the lib program.
5816     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5817     fix_srcfile_path='`cygpath -w "$srcfile"`'
5818     ;;
5819
5820   darwin* | rhapsody*)
5821     case "$host_os" in
5822     rhapsody* | darwin1.[012])
5823       allow_undefined_flag='-undefined suppress'
5824       ;;
5825     *) # Darwin 1.3 on
5826       allow_undefined_flag='-flat_namespace -undefined suppress'
5827       ;;
5828     esac
5829     # FIXME: Relying on posixy $() will cause problems for
5830     #        cross-compilation, but unfortunately the echo tests do not
5831     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5832     #        `"' quotes if we put them in here... so don't!
5833     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)'
5834     # We need to add '_' to the symbols in $export_symbols first
5835     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5836     hardcode_direct=yes
5837     hardcode_shlibpath_var=no
5838     whole_archive_flag_spec='-all_load $convenience'
5839     ;;
5840
5841   freebsd1*)
5842     ld_shlibs=no
5843     ;;
5844
5845   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5846   # support.  Future versions do this automatically, but an explicit c++rt0.o
5847   # does not break anything, and helps significantly (at the cost of a little
5848   # extra space).
5849   freebsd2.2*)
5850     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5851     hardcode_libdir_flag_spec='-R$libdir'
5852     hardcode_direct=yes
5853     hardcode_shlibpath_var=no
5854     ;;
5855
5856   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5857   freebsd2*)
5858     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_minus_L=yes
5861     hardcode_shlibpath_var=no
5862     ;;
5863
5864   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5865   freebsd*)
5866     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_direct=yes
5869     hardcode_shlibpath_var=no
5870     ;;
5871
5872   hpux9* | hpux10* | hpux11*)
5873     case $host_os in
5874     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' ;;
5875     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5876     esac
5877     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5878     hardcode_libdir_separator=:
5879     hardcode_direct=yes
5880     hardcode_minus_L=yes # Not in the search PATH, but as the default
5881                          # location of the library.
5882     export_dynamic_flag_spec='${wl}-E'
5883     ;;
5884
5885   irix5* | irix6* | nonstopux*)
5886     if test "$GCC" = yes; then
5887       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'
5888       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5889     else
5890       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'
5891       hardcode_libdir_flag_spec='-rpath $libdir'
5892     fi
5893     hardcode_libdir_separator=:
5894     link_all_deplibs=yes
5895     ;;
5896
5897   netbsd*)
5898     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5899       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5900     else
5901       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5902     fi
5903     hardcode_libdir_flag_spec='-R$libdir'
5904     hardcode_direct=yes
5905     hardcode_shlibpath_var=no
5906     ;;
5907
5908   newsos6)
5909     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5910     hardcode_direct=yes
5911     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5912     hardcode_libdir_separator=:
5913     hardcode_shlibpath_var=no
5914     ;;
5915
5916   openbsd*)
5917     hardcode_direct=yes
5918     hardcode_shlibpath_var=no
5919     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5920       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5921       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5922       export_dynamic_flag_spec='${wl}-E'
5923     else
5924       case "$host_os" in
5925       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5926         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5927         hardcode_libdir_flag_spec='-R$libdir'
5928         ;;
5929       *)
5930         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5931         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5932         ;;
5933       esac
5934     fi
5935     ;;
5936
5937   os2*)
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_minus_L=yes
5940     allow_undefined_flag=unsupported
5941     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'
5942     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5943     ;;
5944
5945   osf3*)
5946     if test "$GCC" = yes; then
5947       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5948       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'
5949     else
5950       allow_undefined_flag=' -expect_unresolved \*'
5951       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'
5952     fi
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     ;;
5956
5957   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5958     if test "$GCC" = yes; then
5959       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5960       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'
5961       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     else
5963       allow_undefined_flag=' -expect_unresolved \*'
5964       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'
5965       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5966       $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'
5967
5968       #Both c and cxx compiler support -rpath directly
5969       hardcode_libdir_flag_spec='-rpath $libdir'
5970     fi
5971     hardcode_libdir_separator=:
5972     ;;
5973
5974   sco3.2v5*)
5975     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976     hardcode_shlibpath_var=no
5977     runpath_var=LD_RUN_PATH
5978     hardcode_runpath_var=yes
5979     export_dynamic_flag_spec='${wl}-Bexport'
5980     ;;
5981
5982   solaris*)
5983     # gcc --version < 3.0 without binutils cannot create self contained
5984     # shared libraries reliably, requiring libgcc.a to resolve some of
5985     # the object symbols generated in some cases.  Libraries that use
5986     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5987     # a copy of libgcc.a into every shared library to guarantee resolving
5988     # such symbols causes other problems:  According to Tim Van Holder
5989     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5990     # (to the application) exception stack for one thing.
5991     no_undefined_flag=' -z defs'
5992     if test "$GCC" = yes; then
5993       case `$CC --version 2>/dev/null` in
5994       [12].*)
5995         cat <<EOF 1>&2
5996
5997 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5998 *** create self contained shared libraries on Solaris systems, without
5999 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6000 *** -no-undefined support, which will at least allow you to build shared
6001 *** libraries.  However, you may find that when you link such libraries
6002 *** into an application without using GCC, you have to manually add
6003 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6004 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6005 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6006
6007 EOF
6008         no_undefined_flag=
6009         ;;
6010       esac
6011     fi
6012     # $CC -shared without GNU ld will not create a library from C++
6013     # object files and a static libstdc++, better avoid it by now
6014     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6016                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6017     hardcode_libdir_flag_spec='-R$libdir'
6018     hardcode_shlibpath_var=no
6019     case $host_os in
6020     solaris2.[0-5] | solaris2.[0-5].*) ;;
6021     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6022       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6023     esac
6024     link_all_deplibs=yes
6025     ;;
6026
6027   sunos4*)
6028     if test "x$host_vendor" = xsequent; then
6029       # Use $CC to link under sequent, because it throws in some extra .o
6030       # files that make .init and .fini sections work.
6031       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6032     else
6033       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6034     fi
6035     hardcode_libdir_flag_spec='-L$libdir'
6036     hardcode_direct=yes
6037     hardcode_minus_L=yes
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   sysv4)
6042     case $host_vendor in
6043       sni)
6044         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6045         hardcode_direct=yes # is this really true???
6046         ;;
6047       siemens)
6048         ## LD is ld it makes a PLAMLIB
6049         ## CC just makes a GrossModule.
6050         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6051         reload_cmds='$CC -r -o $output$reload_objs'
6052         hardcode_direct=no
6053         ;;
6054       motorola)
6055         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6056         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6057         ;;
6058     esac
6059     runpath_var='LD_RUN_PATH'
6060     hardcode_shlibpath_var=no
6061     ;;
6062
6063   sysv4.3*)
6064     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6065     hardcode_shlibpath_var=no
6066     export_dynamic_flag_spec='-Bexport'
6067     ;;
6068
6069   sysv5*)
6070     no_undefined_flag=' -z text'
6071     # $CC -shared without GNU ld will not create a library from C++
6072     # object files and a static libstdc++, better avoid it by now
6073     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6075                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6076     hardcode_libdir_flag_spec=
6077     hardcode_shlibpath_var=no
6078     runpath_var='LD_RUN_PATH'
6079     ;;
6080
6081   uts4*)
6082     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083     hardcode_libdir_flag_spec='-L$libdir'
6084     hardcode_shlibpath_var=no
6085     ;;
6086
6087   dgux*)
6088     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6089     hardcode_libdir_flag_spec='-L$libdir'
6090     hardcode_shlibpath_var=no
6091     ;;
6092
6093   sysv4*MP*)
6094     if test -d /usr/nec; then
6095       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6096       hardcode_shlibpath_var=no
6097       runpath_var=LD_RUN_PATH
6098       hardcode_runpath_var=yes
6099       ld_shlibs=yes
6100     fi
6101     ;;
6102
6103   sysv4.2uw2*)
6104     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6105     hardcode_direct=yes
6106     hardcode_minus_L=no
6107     hardcode_shlibpath_var=no
6108     hardcode_runpath_var=yes
6109     runpath_var=LD_RUN_PATH
6110     ;;
6111
6112   sysv5uw7* | unixware7*)
6113     no_undefined_flag='${wl}-z ${wl}text'
6114     if test "$GCC" = yes; then
6115       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6116     else
6117       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6118     fi
6119     runpath_var='LD_RUN_PATH'
6120     hardcode_shlibpath_var=no
6121     ;;
6122
6123   *)
6124     ld_shlibs=no
6125     ;;
6126   esac
6127 fi
6128 echo "$ac_t""$ld_shlibs" 1>&6
6129 test "$ld_shlibs" = no && can_build_shared=no
6130
6131 # Check hardcoding attributes.
6132 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6133 echo "configure:6134: checking how to hardcode library paths into programs" >&5
6134 hardcode_action=
6135 if test -n "$hardcode_libdir_flag_spec" || \
6136    test -n "$runpath_var"; then
6137
6138   # We can hardcode non-existant directories.
6139   if test "$hardcode_direct" != no &&
6140      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6141      # have to relink, otherwise we might link with an installed library
6142      # when we should be linking with a yet-to-be-installed one
6143      ## test "$hardcode_shlibpath_var" != no &&
6144      test "$hardcode_minus_L" != no; then
6145     # Linking always hardcodes the temporary library directory.
6146     hardcode_action=relink
6147   else
6148     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6149     hardcode_action=immediate
6150   fi
6151 else
6152   # We cannot hardcode anything, or else we can only hardcode existing
6153   # directories.
6154   hardcode_action=unsupported
6155 fi
6156 echo "$ac_t""$hardcode_action" 1>&6
6157
6158 striplib=
6159 old_striplib=
6160 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6161 echo "configure:6162: checking whether stripping libraries is possible" >&5
6162 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6163   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6164   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6165   echo "$ac_t""yes" 1>&6
6166 else
6167   echo "$ac_t""no" 1>&6
6168 fi
6169
6170 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6171 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6172
6173 # PORTME Fill in your ld.so characteristics
6174 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6175 echo "configure:6176: checking dynamic linker characteristics" >&5
6176 library_names_spec=
6177 libname_spec='lib$name'
6178 soname_spec=
6179 postinstall_cmds=
6180 postuninstall_cmds=
6181 finish_cmds=
6182 finish_eval=
6183 shlibpath_var=
6184 shlibpath_overrides_runpath=unknown
6185 version_type=none
6186 dynamic_linker="$host_os ld.so"
6187 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6188 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6189
6190 case $host_os in
6191 aix3*)
6192   version_type=linux
6193   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6194   shlibpath_var=LIBPATH
6195
6196   # AIX has no versioning support, so we append a major version to the name.
6197   soname_spec='${libname}${release}.so$major'
6198   ;;
6199
6200 aix4* | aix5*)
6201   version_type=linux
6202   need_lib_prefix=no
6203   need_version=no
6204   hardcode_into_libs=yes
6205   if test "$host_cpu" = ia64; then
6206     # AIX 5 supports IA64
6207     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6208     shlibpath_var=LD_LIBRARY_PATH
6209   else
6210     # With GCC up to 2.95.x, collect2 would create an import file
6211     # for dependence libraries.  The import file would start with
6212     # the line `#! .'.  This would cause the generated library to
6213     # depend on `.', always an invalid library.  This was fixed in
6214     # development snapshots of GCC prior to 3.0.
6215     case $host_os in
6216       aix4 | aix4.[01] | aix4.[01].*)
6217         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6218              echo ' yes '
6219              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6220           :
6221         else
6222           can_build_shared=no
6223         fi
6224         ;;
6225     esac
6226     # AIX (on Power*) has no versioning support, so currently we can
6227     # not hardcode correct soname into executable. Probably we can
6228     # add versioning support to collect2, so additional links can
6229     # be useful in future.
6230     if test "$aix_use_runtimelinking" = yes; then
6231       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6232       # instead of lib<name>.a to let people know that these are not
6233       # typical AIX shared libraries.
6234       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6235     else
6236       # We preserve .a as extension for shared libraries through AIX4.2
6237       # and later when we are not doing run time linking.
6238       library_names_spec='${libname}${release}.a $libname.a'
6239       soname_spec='${libname}${release}.so$major'
6240     fi
6241     shlibpath_var=LIBPATH
6242   fi
6243   hardcode_into_libs=yes
6244   ;;
6245
6246 amigaos*)
6247   library_names_spec='$libname.ixlibrary $libname.a'
6248   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6249   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'
6250   ;;
6251
6252 beos*)
6253   library_names_spec='${libname}.so'
6254   dynamic_linker="$host_os ld.so"
6255   shlibpath_var=LIBRARY_PATH
6256   ;;
6257
6258 bsdi4*)
6259   version_type=linux
6260   need_version=no
6261   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6262   soname_spec='${libname}${release}.so$major'
6263   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6264   shlibpath_var=LD_LIBRARY_PATH
6265   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6266   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6267   export_dynamic_flag_spec=-rdynamic
6268   # the default ld.so.conf also contains /usr/contrib/lib and
6269   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6270   # libtool to hard-code these into programs
6271   ;;
6272
6273 cygwin* | mingw* | pw32*)
6274   version_type=windows
6275   need_version=no
6276   need_lib_prefix=no
6277   case $GCC,$host_os in
6278   yes,cygwin*)
6279     library_names_spec='$libname.dll.a'
6280     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6281     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6282       dldir=$destdir/`dirname \$dlpath`~
6283       test -d \$dldir || mkdir -p \$dldir~
6284       $install_prog .libs/$dlname \$dldir/$dlname'
6285     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6286       dlpath=$dir/\$dldll~
6287        $rm \$dlpath'
6288     ;;
6289   yes,mingw*)
6290     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6291     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6292     ;;
6293   yes,pw32*)
6294     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6295     ;;
6296   *)
6297     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6298     ;;
6299   esac
6300   dynamic_linker='Win32 ld.exe'
6301   # FIXME: first we should search . and the directory the executable is in
6302   shlibpath_var=PATH
6303   ;;
6304
6305 darwin* | rhapsody*)
6306   dynamic_linker="$host_os dyld"
6307   version_type=darwin
6308   need_lib_prefix=no
6309   need_version=no
6310   # FIXME: Relying on posixy $() will cause problems for
6311   #        cross-compilation, but unfortunately the echo tests do not
6312   #        yet detect zsh echo's removal of \ escapes.
6313   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)'
6314   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6315   shlibpath_overrides_runpath=yes
6316   shlibpath_var=DYLD_LIBRARY_PATH
6317   ;;
6318
6319 freebsd1*)
6320   dynamic_linker=no
6321   ;;
6322
6323 freebsd*)
6324   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6325   version_type=freebsd-$objformat
6326   case $version_type in
6327     freebsd-elf*)
6328       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6329       need_version=no
6330       need_lib_prefix=no
6331       ;;
6332     freebsd-*)
6333       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6334       need_version=yes
6335       ;;
6336   esac
6337   shlibpath_var=LD_LIBRARY_PATH
6338   case $host_os in
6339   freebsd2*)
6340     shlibpath_overrides_runpath=yes
6341     ;;
6342   *)
6343     shlibpath_overrides_runpath=no
6344     hardcode_into_libs=yes
6345     ;;
6346   esac
6347   ;;
6348
6349 gnu*)
6350   version_type=linux
6351   need_lib_prefix=no
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6354   soname_spec='${libname}${release}.so$major'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   hardcode_into_libs=yes
6357   ;;
6358
6359 hpux9* | hpux10* | hpux11*)
6360   # Give a soname corresponding to the major version so that dld.sl refuses to
6361   # link against other versions.
6362   dynamic_linker="$host_os dld.sl"
6363   version_type=sunos
6364   need_lib_prefix=no
6365   need_version=no
6366   shlibpath_var=SHLIB_PATH
6367   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6368   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6369   soname_spec='${libname}${release}.sl$major'
6370   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6371   postinstall_cmds='chmod 555 $lib'
6372   ;;
6373
6374 irix5* | irix6* | nonstopux*)
6375   case $host_os in
6376     nonstopux*) version_type=nonstopux ;;
6377     *)          version_type=irix ;;
6378   esac
6379   need_lib_prefix=no
6380   need_version=no
6381   soname_spec='${libname}${release}.so$major'
6382   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6383   case $host_os in
6384   irix5* | nonstopux*)
6385     libsuff= shlibsuff=
6386     ;;
6387   *)
6388     case $LD in # libtool.m4 will add one of these switches to LD
6389     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6390     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6391     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6392     *) libsuff= shlibsuff= libmagic=never-match;;
6393     esac
6394     ;;
6395   esac
6396   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6397   shlibpath_overrides_runpath=no
6398   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6399   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6400   ;;
6401
6402 # No shared lib support for Linux oldld, aout, or coff.
6403 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6404   dynamic_linker=no
6405   ;;
6406
6407 # This must be Linux ELF.
6408 linux-gnu*)
6409   version_type=linux
6410   need_lib_prefix=no
6411   need_version=no
6412   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6413   soname_spec='${libname}${release}.so$major'
6414   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   shlibpath_overrides_runpath=no
6417   # This implies no fast_install, which is unacceptable.
6418   # Some rework will be needed to allow for fast_install
6419   # before this can be enabled.
6420   hardcode_into_libs=yes
6421
6422   # We used to test for /lib/ld.so.1 and disable shared libraries on
6423   # powerpc, because MkLinux only supported shared libraries with the
6424   # GNU dynamic linker.  Since this was broken with cross compilers,
6425   # most powerpc-linux boxes support dynamic linking these days and
6426   # people can always --disable-shared, the test was removed, and we
6427   # assume the GNU/Linux dynamic linker is in use.
6428   dynamic_linker='GNU/Linux ld.so'
6429   ;;
6430
6431 netbsd*)
6432   version_type=sunos
6433   need_lib_prefix=no
6434   need_version=no
6435   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6436     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6437     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6438     dynamic_linker='NetBSD (a.out) ld.so'
6439   else
6440     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6441     soname_spec='${libname}${release}.so$major'
6442     dynamic_linker='NetBSD ld.elf_so'
6443   fi
6444   shlibpath_var=LD_LIBRARY_PATH
6445   shlibpath_overrides_runpath=yes
6446   hardcode_into_libs=yes
6447   ;;
6448
6449 newsos6)
6450   version_type=linux
6451   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   ;;
6455
6456 openbsd*)
6457   version_type=sunos
6458   need_lib_prefix=no
6459   need_version=no
6460   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6461     case "$host_os" in
6462     openbsd2.[89] | openbsd2.[89].*)
6463       shlibpath_overrides_runpath=no
6464       ;;
6465     *)
6466       shlibpath_overrides_runpath=yes
6467       ;;
6468     esac
6469   else
6470     shlibpath_overrides_runpath=yes
6471   fi
6472   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6473   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   ;;
6476
6477 os2*)
6478   libname_spec='$name'
6479   need_lib_prefix=no
6480   library_names_spec='$libname.dll $libname.a'
6481   dynamic_linker='OS/2 ld.exe'
6482   shlibpath_var=LIBPATH
6483   ;;
6484
6485 osf3* | osf4* | osf5*)
6486   version_type=osf
6487   need_version=no
6488   soname_spec='${libname}${release}.so$major'
6489   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6492   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6493   hardcode_into_libs=yes
6494   ;;
6495
6496 sco3.2v5*)
6497   version_type=osf
6498   soname_spec='${libname}${release}.so$major'
6499   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6500   shlibpath_var=LD_LIBRARY_PATH
6501   ;;
6502
6503 solaris*)
6504   version_type=linux
6505   need_lib_prefix=no
6506   need_version=no
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   soname_spec='${libname}${release}.so$major'
6509   shlibpath_var=LD_LIBRARY_PATH
6510   shlibpath_overrides_runpath=yes
6511   hardcode_into_libs=yes
6512   # ldd complains unless libraries are executable
6513   postinstall_cmds='chmod +x $lib'
6514   ;;
6515
6516 sunos4*)
6517   version_type=sunos
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6519   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   shlibpath_overrides_runpath=yes
6522   if test "$with_gnu_ld" = yes; then
6523     need_lib_prefix=no
6524   fi
6525   need_version=yes
6526   ;;
6527
6528 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6529   version_type=linux
6530   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6531   soname_spec='${libname}${release}.so$major'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   case $host_vendor in
6534     sni)
6535       shlibpath_overrides_runpath=no
6536       need_lib_prefix=no
6537       export_dynamic_flag_spec='${wl}-Blargedynsym'
6538       runpath_var=LD_RUN_PATH
6539       ;;
6540     siemens)
6541       need_lib_prefix=no
6542       ;;
6543     motorola)
6544       need_lib_prefix=no
6545       need_version=no
6546       shlibpath_overrides_runpath=no
6547       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6548       ;;
6549   esac
6550   ;;
6551
6552 uts4*)
6553   version_type=linux
6554   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6555   soname_spec='${libname}${release}.so$major'
6556   shlibpath_var=LD_LIBRARY_PATH
6557   ;;
6558
6559 dgux*)
6560   version_type=linux
6561   need_lib_prefix=no
6562   need_version=no
6563   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6564   soname_spec='${libname}${release}.so$major'
6565   shlibpath_var=LD_LIBRARY_PATH
6566   ;;
6567
6568 sysv4*MP*)
6569   if test -d /usr/nec ;then
6570     version_type=linux
6571     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6572     soname_spec='$libname.so.$major'
6573     shlibpath_var=LD_LIBRARY_PATH
6574   fi
6575   ;;
6576
6577 *)
6578   dynamic_linker=no
6579   ;;
6580 esac
6581 echo "$ac_t""$dynamic_linker" 1>&6
6582 test "$dynamic_linker" = no && can_build_shared=no
6583
6584 # Report the final consequences.
6585 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6586 echo "configure:6587: checking if libtool supports shared libraries" >&5
6587 echo "$ac_t""$can_build_shared" 1>&6
6588
6589 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6590 echo "configure:6591: checking whether to build shared libraries" >&5
6591 test "$can_build_shared" = "no" && enable_shared=no
6592
6593 # On AIX, shared libraries and static libraries use the same namespace, and
6594 # are all built from PIC.
6595 case "$host_os" in
6596 aix3*)
6597   test "$enable_shared" = yes && enable_static=no
6598   if test -n "$RANLIB"; then
6599     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6600     postinstall_cmds='$RANLIB $lib'
6601   fi
6602   ;;
6603
6604 aix4*)
6605   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6606     test "$enable_shared" = yes && enable_static=no
6607   fi
6608   ;;
6609 esac
6610 echo "$ac_t""$enable_shared" 1>&6
6611
6612 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6613 echo "configure:6614: checking whether to build static libraries" >&5
6614 # Make sure either enable_shared or enable_static is yes.
6615 test "$enable_shared" = yes || enable_static=yes
6616 echo "$ac_t""$enable_static" 1>&6
6617
6618 if test "$hardcode_action" = relink; then
6619   # Fast installation is not supported
6620   enable_fast_install=no
6621 elif test "$shlibpath_overrides_runpath" = yes ||
6622      test "$enable_shared" = no; then
6623   # Fast installation is not necessary
6624   enable_fast_install=needless
6625 fi
6626
6627 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6628 if test "$GCC" = yes; then
6629   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6630 fi
6631
6632 if test "x$enable_dlopen" != xyes; then
6633   enable_dlopen=unknown
6634   enable_dlopen_self=unknown
6635   enable_dlopen_self_static=unknown
6636 else
6637   lt_cv_dlopen=no
6638   lt_cv_dlopen_libs=
6639
6640   case $host_os in
6641   beos*)
6642     lt_cv_dlopen="load_add_on"
6643     lt_cv_dlopen_libs=
6644     lt_cv_dlopen_self=yes
6645     ;;
6646
6647   cygwin* | mingw* | pw32*)
6648     lt_cv_dlopen="LoadLibrary"
6649     lt_cv_dlopen_libs=
6650    ;;
6651
6652   *)
6653     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6654 echo "configure:6655: checking for shl_load" >&5
6655 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6656   echo $ac_n "(cached) $ac_c" 1>&6
6657 else
6658   cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662     which can conflict with char shl_load(); below.  */
6663 #include <assert.h>
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char shl_load();
6668 char (*f)();
6669
6670 int main() {
6671
6672 /* The GNU C library defines this for functions which it implements
6673     to always fail with ENOSYS.  Some functions are actually named
6674     something starting with __ and the normal name is an alias.  */
6675 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6676 choke me
6677 #else
6678 f = shl_load;
6679 #endif
6680
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   eval "ac_cv_func_shl_load=yes"
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   eval "ac_cv_func_shl_load=no"
6691 fi
6692 rm -f conftest*
6693 fi
6694
6695 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   lt_cv_dlopen="shl_load"
6698 else
6699   echo "$ac_t""no" 1>&6
6700 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6701 echo "configure:6702: checking for shl_load in -ldld" >&5
6702 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   ac_save_LIBS="$LIBS"
6707 LIBS="-ldld  $LIBS"
6708 cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* Override any gcc2 internal prototype to avoid an error.  */
6712 /* We use char because int might match the return type of a gcc2
6713     builtin and then its argument prototype would still apply.  */
6714 char shl_load();
6715
6716 int main() {
6717 shl_load()
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721   rm -rf conftest*
6722   eval "ac_cv_lib_$ac_lib_var=yes"
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   eval "ac_cv_lib_$ac_lib_var=no"
6728 fi
6729 rm -f conftest*
6730 LIBS="$ac_save_LIBS"
6731
6732 fi
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6736 else
6737   echo "$ac_t""no" 1>&6
6738 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6739 echo "configure:6740: checking for dlopen" >&5
6740 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char dlopen(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char dlopen();
6753 char (*f)();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6761 choke me
6762 #else
6763 f = dlopen;
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_dlopen=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_dlopen=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782   lt_cv_dlopen="dlopen"
6783 else
6784   echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6786 echo "configure:6787: checking for dlopen in -ldl" >&5
6787 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   ac_save_LIBS="$LIBS"
6792 LIBS="-ldl  $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char dlopen();
6800
6801 int main() {
6802 dlopen()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 LIBS="$ac_save_LIBS"
6816
6817 fi
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6821 else
6822   echo "$ac_t""no" 1>&6
6823 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6824 echo "configure:6825: checking for dlopen in -lsvld" >&5
6825 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   ac_save_LIBS="$LIBS"
6830 LIBS="-lsvld  $LIBS"
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char dlopen();
6838
6839 int main() {
6840 dlopen()
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=no"
6851 fi
6852 rm -f conftest*
6853 LIBS="$ac_save_LIBS"
6854
6855 fi
6856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6859 else
6860   echo "$ac_t""no" 1>&6
6861 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6862 echo "configure:6863: checking for dld_link in -ldld" >&5
6863 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6865   echo $ac_n "(cached) $ac_c" 1>&6
6866 else
6867   ac_save_LIBS="$LIBS"
6868 LIBS="-ldld  $LIBS"
6869 cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 /* We use char because int might match the return type of a gcc2
6874     builtin and then its argument prototype would still apply.  */
6875 char dld_link();
6876
6877 int main() {
6878 dld_link()
6879 ; return 0; }
6880 EOF
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882   rm -rf conftest*
6883   eval "ac_cv_lib_$ac_lib_var=yes"
6884 else
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_lib_$ac_lib_var=no"
6889 fi
6890 rm -f conftest*
6891 LIBS="$ac_save_LIBS"
6892
6893 fi
6894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6897 else
6898   echo "$ac_t""no" 1>&6
6899 fi
6900
6901               
6902 fi
6903
6904             
6905 fi
6906
6907           
6908 fi
6909
6910         
6911 fi
6912
6913       
6914 fi
6915
6916     ;;
6917   esac
6918
6919   if test "x$lt_cv_dlopen" != xno; then
6920     enable_dlopen=yes
6921   else
6922     enable_dlopen=no
6923   fi
6924
6925   case $lt_cv_dlopen in
6926   dlopen)
6927     save_CPPFLAGS="$CPPFLAGS"
6928         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6929
6930     save_LDFLAGS="$LDFLAGS"
6931     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6932
6933     save_LIBS="$LIBS"
6934     LIBS="$lt_cv_dlopen_libs $LIBS"
6935
6936     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6937 echo "configure:6938: checking whether a program can dlopen itself" >&5
6938 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941           if test "$cross_compiling" = yes; then :
6942   lt_cv_dlopen_self=cross
6943 else
6944     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6945   lt_status=$lt_dlunknown
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949
6950 #if HAVE_DLFCN_H
6951 #include <dlfcn.h>
6952 #endif
6953
6954 #include <stdio.h>
6955
6956 #ifdef RTLD_GLOBAL
6957 #  define LT_DLGLOBAL           RTLD_GLOBAL
6958 #else
6959 #  ifdef DL_GLOBAL
6960 #    define LT_DLGLOBAL         DL_GLOBAL
6961 #  else
6962 #    define LT_DLGLOBAL         0
6963 #  endif
6964 #endif
6965
6966 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6967    find out it does not work in some platform. */
6968 #ifndef LT_DLLAZY_OR_NOW
6969 #  ifdef RTLD_LAZY
6970 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6971 #  else
6972 #    ifdef DL_LAZY
6973 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6974 #    else
6975 #      ifdef RTLD_NOW
6976 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6977 #      else
6978 #        ifdef DL_NOW
6979 #          define LT_DLLAZY_OR_NOW      DL_NOW
6980 #        else
6981 #          define LT_DLLAZY_OR_NOW      0
6982 #        endif
6983 #      endif
6984 #    endif
6985 #  endif
6986 #endif
6987
6988 #ifdef __cplusplus
6989 extern "C" void exit (int);
6990 #endif
6991
6992 void fnord() { int i=42;}
6993 int main ()
6994 {
6995   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6996   int status = $lt_dlunknown;
6997
6998   if (self)
6999     {
7000       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7001       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7002       /* dlclose (self); */
7003     }
7004
7005     exit (status);
7006 }
7007 EOF
7008   if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7009     (./conftest; exit; ) 2>/dev/null
7010     lt_status=$?
7011     case x$lt_status in
7012       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7013       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7014       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7015     esac
7016   else :
7017     # compilation failed
7018     lt_cv_dlopen_self=no
7019   fi
7020 fi
7021 rm -fr conftest*
7022
7023     
7024 fi
7025
7026 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7027
7028     if test "x$lt_cv_dlopen_self" = xyes; then
7029       LDFLAGS="$LDFLAGS $link_static_flag"
7030       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7031 echo "configure:7032: checking whether a statically linked program can dlopen itself" >&5
7032 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7033   echo $ac_n "(cached) $ac_c" 1>&6
7034 else
7035           if test "$cross_compiling" = yes; then :
7036   lt_cv_dlopen_self_static=cross
7037 else
7038     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7039   lt_status=$lt_dlunknown
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043
7044 #if HAVE_DLFCN_H
7045 #include <dlfcn.h>
7046 #endif
7047
7048 #include <stdio.h>
7049
7050 #ifdef RTLD_GLOBAL
7051 #  define LT_DLGLOBAL           RTLD_GLOBAL
7052 #else
7053 #  ifdef DL_GLOBAL
7054 #    define LT_DLGLOBAL         DL_GLOBAL
7055 #  else
7056 #    define LT_DLGLOBAL         0
7057 #  endif
7058 #endif
7059
7060 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7061    find out it does not work in some platform. */
7062 #ifndef LT_DLLAZY_OR_NOW
7063 #  ifdef RTLD_LAZY
7064 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7065 #  else
7066 #    ifdef DL_LAZY
7067 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7068 #    else
7069 #      ifdef RTLD_NOW
7070 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7071 #      else
7072 #        ifdef DL_NOW
7073 #          define LT_DLLAZY_OR_NOW      DL_NOW
7074 #        else
7075 #          define LT_DLLAZY_OR_NOW      0
7076 #        endif
7077 #      endif
7078 #    endif
7079 #  endif
7080 #endif
7081
7082 #ifdef __cplusplus
7083 extern "C" void exit (int);
7084 #endif
7085
7086 void fnord() { int i=42;}
7087 int main ()
7088 {
7089   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7090   int status = $lt_dlunknown;
7091
7092   if (self)
7093     {
7094       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7095       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7096       /* dlclose (self); */
7097     }
7098
7099     exit (status);
7100 }
7101 EOF
7102   if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7103     (./conftest; exit; ) 2>/dev/null
7104     lt_status=$?
7105     case x$lt_status in
7106       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7107       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7108       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7109     esac
7110   else :
7111     # compilation failed
7112     lt_cv_dlopen_self_static=no
7113   fi
7114 fi
7115 rm -fr conftest*
7116
7117       
7118 fi
7119
7120 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7121     fi
7122
7123     CPPFLAGS="$save_CPPFLAGS"
7124     LDFLAGS="$save_LDFLAGS"
7125     LIBS="$save_LIBS"
7126     ;;
7127   esac
7128
7129   case $lt_cv_dlopen_self in
7130   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7131   *) enable_dlopen_self=unknown ;;
7132   esac
7133
7134   case $lt_cv_dlopen_self_static in
7135   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7136   *) enable_dlopen_self_static=unknown ;;
7137   esac
7138 fi
7139
7140
7141 if test "$enable_shared" = yes && test "$GCC" = yes; then
7142   case $archive_cmds in
7143   *'~'*)
7144     # FIXME: we may have to deal with multi-command sequences.
7145     ;;
7146   '$CC '*)
7147     # Test whether the compiler implicitly links with -lc since on some
7148     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7149     # to ld, don't add -lc before -lgcc.
7150     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7151 echo "configure:7152: checking whether -lc should be explicitly linked in" >&5
7152     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   $rm conftest*
7156     echo 'static int dummy;' > conftest.$ac_ext
7157
7158     if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7159       soname=conftest
7160       lib=conftest
7161       libobjs=conftest.$ac_objext
7162       deplibs=
7163       wl=$lt_cv_prog_cc_wl
7164       compiler_flags=-v
7165       linker_flags=-v
7166       verstring=
7167       output_objdir=.
7168       libname=conftest
7169       save_allow_undefined_flag=$allow_undefined_flag
7170       allow_undefined_flag=
7171       if { (eval echo configure:7172: \"$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; }
7172       then
7173         lt_cv_archive_cmds_need_lc=no
7174       else
7175         lt_cv_archive_cmds_need_lc=yes
7176       fi
7177       allow_undefined_flag=$save_allow_undefined_flag
7178     else
7179       cat conftest.err 1>&5
7180     fi
7181 fi
7182
7183     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7184     ;;
7185   esac
7186 fi
7187 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7188
7189 # The second clause should only fire when bootstrapping the
7190 # libtool distribution, otherwise you forgot to ship ltmain.sh
7191 # with your package, and you will get complaints that there are
7192 # no rules to generate ltmain.sh.
7193 if test -f "$ltmain"; then
7194   :
7195 else
7196   # If there is no Makefile yet, we rely on a make rule to execute
7197   # `config.status --recheck' to rerun these tests and create the
7198   # libtool script then.
7199   test -f Makefile && make "$ltmain"
7200 fi
7201
7202 if test -f "$ltmain"; then
7203   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7204   $rm -f "${ofile}T"
7205
7206   echo creating $ofile
7207
7208   # Now quote all the things that may contain metacharacters while being
7209   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7210   # variables and quote the copies for generation of the libtool script.
7211   for var in echo old_CC old_CFLAGS SED \
7212     AR AR_FLAGS CC LD LN_S NM SHELL \
7213     reload_flag reload_cmds wl \
7214     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7215     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7216     library_names_spec soname_spec \
7217     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7218     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7219     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7220     old_striplib striplib file_magic_cmd export_symbols_cmds \
7221     deplibs_check_method allow_undefined_flag no_undefined_flag \
7222     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7223     global_symbol_to_c_name_address \
7224     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7225     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7226     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7227
7228     case $var in
7229     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7230     old_postinstall_cmds | old_postuninstall_cmds | \
7231     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7232     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7233     postinstall_cmds | postuninstall_cmds | \
7234     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7235       # Double-quote double-evaled strings.
7236       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7237       ;;
7238     *)
7239       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7240       ;;
7241     esac
7242   done
7243
7244   cat <<__EOF__ > "${ofile}T"
7245 #! $SHELL
7246
7247 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7248 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7249 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7250 #
7251 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7252 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7253 #
7254 # This program is free software; you can redistribute it and/or modify
7255 # it under the terms of the GNU General Public License as published by
7256 # the Free Software Foundation; either version 2 of the License, or
7257 # (at your option) any later version.
7258 #
7259 # This program is distributed in the hope that it will be useful, but
7260 # WITHOUT ANY WARRANTY; without even the implied warranty of
7261 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7262 # General Public License for more details.
7263 #
7264 # You should have received a copy of the GNU General Public License
7265 # along with this program; if not, write to the Free Software
7266 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7267 #
7268 # As a special exception to the GNU General Public License, if you
7269 # distribute this file as part of a program that contains a
7270 # configuration script generated by Autoconf, you may include it under
7271 # the same distribution terms that you use for the rest of that program.
7272
7273 # A sed that does not truncate output.
7274 SED=$lt_SED
7275
7276 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7277 Xsed="${SED} -e s/^X//"
7278
7279 # The HP-UX ksh and POSIX shell print the target directory to stdout
7280 # if CDPATH is set.
7281 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7282
7283 # ### BEGIN LIBTOOL CONFIG
7284
7285 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7286
7287 # Shell to use when invoking shell scripts.
7288 SHELL=$lt_SHELL
7289
7290 # Whether or not to build shared libraries.
7291 build_libtool_libs=$enable_shared
7292
7293 # Whether or not to build static libraries.
7294 build_old_libs=$enable_static
7295
7296 # Whether or not to add -lc for building shared libraries.
7297 build_libtool_need_lc=$need_lc
7298
7299 # Whether or not to optimize for fast installation.
7300 fast_install=$enable_fast_install
7301
7302 # The host system.
7303 host_alias=$host_alias
7304 host=$host
7305
7306 # An echo program that does not interpret backslashes.
7307 echo=$lt_echo
7308
7309 # The archiver.
7310 AR=$lt_AR
7311 AR_FLAGS=$lt_AR_FLAGS
7312
7313 # The default C compiler.
7314 CC=$lt_CC
7315
7316 # Is the compiler the GNU C compiler?
7317 with_gcc=$GCC
7318
7319 # The linker used to build libraries.
7320 LD=$lt_LD
7321
7322 # Whether we need hard or soft links.
7323 LN_S=$lt_LN_S
7324
7325 # A BSD-compatible nm program.
7326 NM=$lt_NM
7327
7328 # A symbol stripping program
7329 STRIP=$STRIP
7330
7331 # Used to examine libraries when file_magic_cmd begins "file"
7332 MAGIC_CMD=$MAGIC_CMD
7333
7334 # Used on cygwin: DLL creation program.
7335 DLLTOOL="$DLLTOOL"
7336
7337 # Used on cygwin: object dumper.
7338 OBJDUMP="$OBJDUMP"
7339
7340 # Used on cygwin: assembler.
7341 AS="$AS"
7342
7343 # The name of the directory that contains temporary libtool files.
7344 objdir=$objdir
7345
7346 # How to create reloadable object files.
7347 reload_flag=$lt_reload_flag
7348 reload_cmds=$lt_reload_cmds
7349
7350 # How to pass a linker flag through the compiler.
7351 wl=$lt_wl
7352
7353 # Object file suffix (normally "o").
7354 objext="$ac_objext"
7355
7356 # Old archive suffix (normally "a").
7357 libext="$libext"
7358
7359 # Executable file suffix (normally "").
7360 exeext="$exeext"
7361
7362 # Additional compiler flags for building library objects.
7363 pic_flag=$lt_pic_flag
7364 pic_mode=$pic_mode
7365
7366 # Does compiler simultaneously support -c and -o options?
7367 compiler_c_o=$lt_compiler_c_o
7368
7369 # Can we write directly to a .lo ?
7370 compiler_o_lo=$lt_compiler_o_lo
7371
7372 # Must we lock files when doing compilation ?
7373 need_locks=$lt_need_locks
7374
7375 # Do we need the lib prefix for modules?
7376 need_lib_prefix=$need_lib_prefix
7377
7378 # Do we need a version for libraries?
7379 need_version=$need_version
7380
7381 # Whether dlopen is supported.
7382 dlopen_support=$enable_dlopen
7383
7384 # Whether dlopen of programs is supported.
7385 dlopen_self=$enable_dlopen_self
7386
7387 # Whether dlopen of statically linked programs is supported.
7388 dlopen_self_static=$enable_dlopen_self_static
7389
7390 # Compiler flag to prevent dynamic linking.
7391 link_static_flag=$lt_link_static_flag
7392
7393 # Compiler flag to turn off builtin functions.
7394 no_builtin_flag=$lt_no_builtin_flag
7395
7396 # Compiler flag to allow reflexive dlopens.
7397 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7398
7399 # Compiler flag to generate shared objects directly from archives.
7400 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7401
7402 # Compiler flag to generate thread-safe objects.
7403 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7404
7405 # Library versioning type.
7406 version_type=$version_type
7407
7408 # Format of library name prefix.
7409 libname_spec=$lt_libname_spec
7410
7411 # List of archive names.  First name is the real one, the rest are links.
7412 # The last name is the one that the linker finds with -lNAME.
7413 library_names_spec=$lt_library_names_spec
7414
7415 # The coded name of the library, if different from the real name.
7416 soname_spec=$lt_soname_spec
7417
7418 # Commands used to build and install an old-style archive.
7419 RANLIB=$lt_RANLIB
7420 old_archive_cmds=$lt_old_archive_cmds
7421 old_postinstall_cmds=$lt_old_postinstall_cmds
7422 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7423
7424 # Create an old-style archive from a shared archive.
7425 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7426
7427 # Create a temporary old-style archive to link instead of a shared archive.
7428 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7429
7430 # Commands used to build and install a shared archive.
7431 archive_cmds=$lt_archive_cmds
7432 archive_expsym_cmds=$lt_archive_expsym_cmds
7433 postinstall_cmds=$lt_postinstall_cmds
7434 postuninstall_cmds=$lt_postuninstall_cmds
7435
7436 # Commands to strip libraries.
7437 old_striplib=$lt_old_striplib
7438 striplib=$lt_striplib
7439
7440 # Method to check whether dependent libraries are shared objects.
7441 deplibs_check_method=$lt_deplibs_check_method
7442
7443 # Command to use when deplibs_check_method == file_magic.
7444 file_magic_cmd=$lt_file_magic_cmd
7445
7446 # Flag that allows shared libraries with undefined symbols to be built.
7447 allow_undefined_flag=$lt_allow_undefined_flag
7448
7449 # Flag that forces no undefined symbols.
7450 no_undefined_flag=$lt_no_undefined_flag
7451
7452 # Commands used to finish a libtool library installation in a directory.
7453 finish_cmds=$lt_finish_cmds
7454
7455 # Same as above, but a single script fragment to be evaled but not shown.
7456 finish_eval=$lt_finish_eval
7457
7458 # Take the output of nm and produce a listing of raw symbols and C names.
7459 global_symbol_pipe=$lt_global_symbol_pipe
7460
7461 # Transform the output of nm in a proper C declaration
7462 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7463
7464 # Transform the output of nm in a C name address pair
7465 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7466
7467 # This is the shared library runtime path variable.
7468 runpath_var=$runpath_var
7469
7470 # This is the shared library path variable.
7471 shlibpath_var=$shlibpath_var
7472
7473 # Is shlibpath searched before the hard-coded library search path?
7474 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7475
7476 # How to hardcode a shared library path into an executable.
7477 hardcode_action=$hardcode_action
7478
7479 # Whether we should hardcode library paths into libraries.
7480 hardcode_into_libs=$hardcode_into_libs
7481
7482 # Flag to hardcode \$libdir into a binary during linking.
7483 # This must work even if \$libdir does not exist.
7484 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7485
7486 # Whether we need a single -rpath flag with a separated argument.
7487 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7488
7489 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7490 # resulting binary.
7491 hardcode_direct=$hardcode_direct
7492
7493 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_minus_L=$hardcode_minus_L
7496
7497 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7498 # the resulting binary.
7499 hardcode_shlibpath_var=$hardcode_shlibpath_var
7500
7501 # Variables whose values should be saved in libtool wrapper scripts and
7502 # restored at relink time.
7503 variables_saved_for_relink="$variables_saved_for_relink"
7504
7505 # Whether libtool must link a program against all its dependency libraries.
7506 link_all_deplibs=$link_all_deplibs
7507
7508 # Compile-time system search path for libraries
7509 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7510
7511 # Run-time system search path for libraries
7512 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7513
7514 # Fix the shell variable \$srcfile for the compiler.
7515 fix_srcfile_path="$fix_srcfile_path"
7516
7517 # Set to yes if exported symbols are required.
7518 always_export_symbols=$always_export_symbols
7519
7520 # The commands to list exported symbols.
7521 export_symbols_cmds=$lt_export_symbols_cmds
7522
7523 # The commands to extract the exported symbol list from a shared archive.
7524 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7525
7526 # Symbols that should not be listed in the preloaded symbols.
7527 exclude_expsyms=$lt_exclude_expsyms
7528
7529 # Symbols that must always be exported.
7530 include_expsyms=$lt_include_expsyms
7531
7532 # ### END LIBTOOL CONFIG
7533
7534 __EOF__
7535
7536   case $host_os in
7537   aix3*)
7538     cat <<\EOF >> "${ofile}T"
7539
7540 # AIX sometimes has problems with the GCC collect2 program.  For some
7541 # reason, if we set the COLLECT_NAMES environment variable, the problems
7542 # vanish in a puff of smoke.
7543 if test "X${COLLECT_NAMES+set}" != Xset; then
7544   COLLECT_NAMES=
7545   export COLLECT_NAMES
7546 fi
7547 EOF
7548     ;;
7549   esac
7550
7551   case $host_os in
7552   cygwin* | mingw* | pw32* | os2*)
7553     cat <<'EOF' >> "${ofile}T"
7554       # This is a source program that is used to create dlls on Windows
7555       # Don't remove nor modify the starting and closing comments
7556 # /* ltdll.c starts here */
7557 # #define WIN32_LEAN_AND_MEAN
7558 # #include <windows.h>
7559 # #undef WIN32_LEAN_AND_MEAN
7560 # #include <stdio.h>
7561 #
7562 # #ifndef __CYGWIN__
7563 # #  ifdef __CYGWIN32__
7564 # #    define __CYGWIN__ __CYGWIN32__
7565 # #  endif
7566 # #endif
7567 #
7568 # #ifdef __cplusplus
7569 # extern "C" {
7570 # #endif
7571 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7572 # #ifdef __cplusplus
7573 # }
7574 # #endif
7575 #
7576 # #ifdef __CYGWIN__
7577 # #include <cygwin/cygwin_dll.h>
7578 # DECLARE_CYGWIN_DLL( DllMain );
7579 # #endif
7580 # HINSTANCE __hDllInstance_base;
7581 #
7582 # BOOL APIENTRY
7583 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7584 # {
7585 #   __hDllInstance_base = hInst;
7586 #   return TRUE;
7587 # }
7588 # /* ltdll.c ends here */
7589         # This is a source program that is used to create import libraries
7590         # on Windows for dlls which lack them. Don't remove nor modify the
7591         # starting and closing comments
7592 # /* impgen.c starts here */
7593 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7594 #
7595 #  This file is part of GNU libtool.
7596 #
7597 #  This program is free software; you can redistribute it and/or modify
7598 #  it under the terms of the GNU General Public License as published by
7599 #  the Free Software Foundation; either version 2 of the License, or
7600 #  (at your option) any later version.
7601 #
7602 #  This program is distributed in the hope that it will be useful,
7603 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7604 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7605 #  GNU General Public License for more details.
7606 #
7607 #  You should have received a copy of the GNU General Public License
7608 #  along with this program; if not, write to the Free Software
7609 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7610 #  */
7611 #
7612 # #include <stdio.h>            /* for printf() */
7613 # #include <unistd.h>           /* for open(), lseek(), read() */
7614 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7615 # #include <string.h>           /* for strdup() */
7616 #
7617 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7618 # #ifndef O_BINARY
7619 # #define O_BINARY 0
7620 # #endif
7621 #
7622 # static unsigned int
7623 # pe_get16 (fd, offset)
7624 #      int fd;
7625 #      int offset;
7626 # {
7627 #   unsigned char b[2];
7628 #   lseek (fd, offset, SEEK_SET);
7629 #   read (fd, b, 2);
7630 #   return b[0] + (b[1]<<8);
7631 # }
7632 #
7633 # static unsigned int
7634 # pe_get32 (fd, offset)
7635 #     int fd;
7636 #     int offset;
7637 # {
7638 #   unsigned char b[4];
7639 #   lseek (fd, offset, SEEK_SET);
7640 #   read (fd, b, 4);
7641 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7642 # }
7643 #
7644 # static unsigned int
7645 # pe_as32 (ptr)
7646 #      void *ptr;
7647 # {
7648 #   unsigned char *b = ptr;
7649 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7650 # }
7651 #
7652 # int
7653 # main (argc, argv)
7654 #     int argc;
7655 #     char *argv[];
7656 # {
7657 #     int dll;
7658 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7659 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7660 #     unsigned long name_rvas, nexp;
7661 #     unsigned char *expdata, *erva;
7662 #     char *filename, *dll_name;
7663 #
7664 #     filename = argv[1];
7665 #
7666 #     dll = open(filename, O_RDONLY|O_BINARY);
7667 #     if (dll < 1)
7668 #       return 1;
7669 #
7670 #     dll_name = filename;
7671 #
7672 #     for (i=0; filename[i]; i++)
7673 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7674 #           dll_name = filename + i +1;
7675 #
7676 #     pe_header_offset = pe_get32 (dll, 0x3c);
7677 #     opthdr_ofs = pe_header_offset + 4 + 20;
7678 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7679 #
7680 #     if (num_entries < 1) /* no exports */
7681 #       return 1;
7682 #
7683 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7684 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7685 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7686 #     secptr = (pe_header_offset + 4 + 20 +
7687 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7688 #
7689 #     expptr = 0;
7690 #     for (i = 0; i < nsections; i++)
7691 #     {
7692 #       char sname[8];
7693 #       unsigned long secptr1 = secptr + 40 * i;
7694 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7695 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7696 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7697 #       lseek(dll, secptr1, SEEK_SET);
7698 #       read(dll, sname, 8);
7699 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7700 #       {
7701 #           expptr = fptr + (export_rva - vaddr);
7702 #           if (export_rva + export_size > vaddr + vsize)
7703 #               export_size = vsize - (export_rva - vaddr);
7704 #           break;
7705 #       }
7706 #     }
7707 #
7708 #     expdata = (unsigned char*)malloc(export_size);
7709 #     lseek (dll, expptr, SEEK_SET);
7710 #     read (dll, expdata, export_size);
7711 #     erva = expdata - export_rva;
7712 #
7713 #     nexp = pe_as32 (expdata+24);
7714 #     name_rvas = pe_as32 (expdata+32);
7715 #
7716 #     printf ("EXPORTS\n");
7717 #     for (i = 0; i<nexp; i++)
7718 #     {
7719 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7720 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7721 #     }
7722 #
7723 #     return 0;
7724 # }
7725 # /* impgen.c ends here */
7726
7727 EOF
7728     ;;
7729   esac
7730
7731   # We use sed instead of cat because bash on DJGPP gets confused if
7732   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7733   # text mode, it properly converts lines to CR/LF.  This bash problem
7734   # is reportedly fixed, but why not run on old versions too?
7735   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7736
7737   mv -f "${ofile}T" "$ofile" || \
7738     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7739   chmod +x "$ofile"
7740 fi
7741
7742
7743
7744
7745
7746 # This can be used to rebuild libtool when needed
7747 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7748
7749 # Always use our own libtool.
7750 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7751
7752 # Prevent multiple expansion
7753
7754
7755
7756 # test for ln hardlink support
7757 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7758 echo "configure:7759: checking whether ln works" >&5
7759 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   rm -f conftest.src conftest.dst
7763 echo "conftest" > conftest.src
7764 if ln conftest.src conftest.dst 2>/dev/null
7765 then
7766   ol_cv_prog_LN_H="ln"
7767 else
7768   ol_cv_prog_LN_H="cp"
7769 fi
7770 rm -f conftest.src conftest.dst
7771
7772 fi
7773 LN_H="$ol_cv_prog_LN_H"
7774 if test "$ol_cv_prog_LN_H" = "ln"; then
7775         echo "$ac_t""yes" 1>&6
7776 else
7777         echo "$ac_t""no" 1>&6
7778 fi
7779
7780 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7781 echo "configure:7782: checking whether ln -s works" >&5
7782 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7783   echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785   rm -f conftestdata
7786 if ln -s X conftestdata 2>/dev/null
7787 then
7788   rm -f conftestdata
7789   ac_cv_prog_LN_S="ln -s"
7790 else
7791   ac_cv_prog_LN_S=ln
7792 fi
7793 fi
7794 LN_S="$ac_cv_prog_LN_S"
7795 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7796   echo "$ac_t""yes" 1>&6
7797 else
7798   echo "$ac_t""no" 1>&6
7799 fi
7800
7801
7802 ol_link_perl=no
7803 if test $ol_enable_perl != no ; then
7804         # Extract the first word of "perl", so it can be a program name with args.
7805 set dummy perl; ac_word=$2
7806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $ac_word" >&5
7808 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7809   echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811   case "$PERLBIN" in
7812   /*)
7813   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7814   ;;
7815   ?:/*)
7816   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7817   ;;
7818   *)
7819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7820   ac_dummy="$PATH"
7821   for ac_dir in $ac_dummy; do 
7822     test -z "$ac_dir" && ac_dir=.
7823     if test -f $ac_dir/$ac_word; then
7824       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7825       break
7826     fi
7827   done
7828   IFS="$ac_save_ifs"
7829   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7830   ;;
7831 esac
7832 fi
7833 PERLBIN="$ac_cv_path_PERLBIN"
7834 if test -n "$PERLBIN"; then
7835   echo "$ac_t""$PERLBIN" 1>&6
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839
7840
7841         if test "no$PERLBIN" = "no" ; then
7842                 if test $ol_enable_perl = yes ; then
7843                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7844                 fi
7845
7846         else
7847                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7848                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /'`"
7849
7850                 if test x"$ol_with_perl_module" = "xstatic" ; then
7851                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7852                 else
7853                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7854                 fi
7855                                 ol_link_perl=yes
7856         fi
7857 fi
7858
7859 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7860 echo "configure:7861: checking how to run the C preprocessor" >&5
7861 # On Suns, sometimes $CPP names a directory.
7862 if test -n "$CPP" && test -d "$CPP"; then
7863   CPP=
7864 fi
7865 if test -z "$CPP"; then
7866 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7867   echo $ac_n "(cached) $ac_c" 1>&6
7868 else
7869     # This must be in double quotes, not single quotes, because CPP may get
7870   # substituted into the Makefile and "${CC-cc}" will confuse make.
7871   CPP="${CC-cc} -E"
7872   # On the NeXT, cc -E runs the code through the compiler's parser,
7873   # not just through cpp.
7874   cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877 #include <assert.h>
7878 Syntax Error
7879 EOF
7880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7881 { (eval echo configure:7882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7883 if test -z "$ac_err"; then
7884   :
7885 else
7886   echo "$ac_err" >&5
7887   echo "configure: failed program was:" >&5
7888   cat conftest.$ac_ext >&5
7889   rm -rf conftest*
7890   CPP="${CC-cc} -E -traditional-cpp"
7891   cat > conftest.$ac_ext <<EOF
7892 #line 7893 "configure"
7893 #include "confdefs.h"
7894 #include <assert.h>
7895 Syntax Error
7896 EOF
7897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7898 { (eval echo configure:7899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7900 if test -z "$ac_err"; then
7901   :
7902 else
7903   echo "$ac_err" >&5
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   CPP="${CC-cc} -nologo -E"
7908   cat > conftest.$ac_ext <<EOF
7909 #line 7910 "configure"
7910 #include "confdefs.h"
7911 #include <assert.h>
7912 Syntax Error
7913 EOF
7914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7915 { (eval echo configure:7916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7917 if test -z "$ac_err"; then
7918   :
7919 else
7920   echo "$ac_err" >&5
7921   echo "configure: failed program was:" >&5
7922   cat conftest.$ac_ext >&5
7923   rm -rf conftest*
7924   CPP=/lib/cpp
7925 fi
7926 rm -f conftest*
7927 fi
7928 rm -f conftest*
7929 fi
7930 rm -f conftest*
7931   ac_cv_prog_CPP="$CPP"
7932 fi
7933   CPP="$ac_cv_prog_CPP"
7934 else
7935   ac_cv_prog_CPP="$CPP"
7936 fi
7937 echo "$ac_t""$CPP" 1>&6
7938
7939
7940 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7941         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7942
7943 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7944         echo "configure: warning: programs compiled here do run here..." 1>&2
7945         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7946
7947 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7948         echo "configure: warning: programs compiled here do not run here..." 1>&2
7949         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7950 fi
7951
7952
7953 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7954 echo "configure:7955: checking for Cygwin environment" >&5
7955 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7956   echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958   cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961
7962 int main() {
7963
7964 #ifndef __CYGWIN__
7965 #define __CYGWIN__ __CYGWIN32__
7966 #endif
7967 return __CYGWIN__;
7968 ; return 0; }
7969 EOF
7970 if { (eval echo configure:7971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7971   rm -rf conftest*
7972   ac_cv_cygwin=yes
7973 else
7974   echo "configure: failed program was:" >&5
7975   cat conftest.$ac_ext >&5
7976   rm -rf conftest*
7977   ac_cv_cygwin=no
7978 fi
7979 rm -f conftest*
7980 fi
7981
7982 echo "$ac_t""$ac_cv_cygwin" 1>&6
7983 CYGWIN=
7984 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7985 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7986 echo "configure:7987: checking for mingw32 environment" >&5
7987 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993
7994 int main() {
7995 return __MINGW32__;
7996 ; return 0; }
7997 EOF
7998 if { (eval echo configure:7999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7999   rm -rf conftest*
8000   ac_cv_mingw32=yes
8001 else
8002   echo "configure: failed program was:" >&5
8003   cat conftest.$ac_ext >&5
8004   rm -rf conftest*
8005   ac_cv_mingw32=no
8006 fi
8007 rm -f conftest*
8008 fi
8009
8010 echo "$ac_t""$ac_cv_mingw32" 1>&6
8011 MINGW32=
8012 test "$ac_cv_mingw32" = yes && MINGW32=yes
8013
8014
8015
8016 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8017 echo "configure:8018: checking for executable suffix" >&5
8018 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8019   echo $ac_n "(cached) $ac_c" 1>&6
8020 else
8021   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8022   ac_cv_exeext=.exe
8023 else
8024   rm -f conftest*
8025   echo 'int main () { return 0; }' > conftest.$ac_ext
8026   ac_cv_exeext=
8027   if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8028     for file in conftest.*; do
8029       case $file in
8030       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8031       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8032       esac
8033     done
8034   else
8035     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8036   fi
8037   rm -f conftest*
8038   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8039 fi
8040 fi
8041
8042 EXEEXT=""
8043 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8044 echo "$ac_t""${ac_cv_exeext}" 1>&6
8045 ac_exeext=$EXEEXT
8046
8047 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8048 echo "configure:8049: checking for object suffix" >&5
8049 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   rm -f conftest*
8053 echo 'int i = 1;' > conftest.$ac_ext
8054 if { (eval echo configure:8055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8055   for ac_file in conftest.*; do
8056     case $ac_file in
8057     *.c) ;;
8058     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8059     esac
8060   done
8061 else
8062   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8063 fi
8064 rm -f conftest*
8065 fi
8066
8067 echo "$ac_t""$ac_cv_objext" 1>&6
8068 OBJEXT=$ac_cv_objext
8069 ac_objext=$ac_cv_objext
8070
8071
8072 cat >> confdefs.h <<EOF
8073 #define EXEEXT "${EXEEXT}"
8074 EOF
8075
8076
8077 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8078 echo "configure:8079: checking for be_app in -lbe" >&5
8079 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8080 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8081   echo $ac_n "(cached) $ac_c" 1>&6
8082 else
8083   ac_save_LIBS="$LIBS"
8084 LIBS="-lbe -lroot -lnet $LIBS"
8085 cat > conftest.$ac_ext <<EOF
8086 #line 8087 "configure"
8087 #include "confdefs.h"
8088 /* Override any gcc2 internal prototype to avoid an error.  */
8089 /* We use char because int might match the return type of a gcc2
8090     builtin and then its argument prototype would still apply.  */
8091 char be_app();
8092
8093 int main() {
8094 be_app()
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8098   rm -rf conftest*
8099   eval "ac_cv_lib_$ac_lib_var=yes"
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   eval "ac_cv_lib_$ac_lib_var=no"
8105 fi
8106 rm -f conftest*
8107 LIBS="$ac_save_LIBS"
8108
8109 fi
8110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8111   echo "$ac_t""yes" 1>&6
8112   LIBS="$LIBS -lbe -lroot -lnet"
8113 else
8114   echo "$ac_t""no" 1>&6
8115 :
8116 fi
8117
8118
8119
8120
8121
8122 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8123 echo "configure:8124: checking for ${CC-cc} option to accept ANSI C" >&5
8124 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8125   echo $ac_n "(cached) $ac_c" 1>&6
8126 else
8127   am_cv_prog_cc_stdc=no
8128 ac_save_CC="$CC"
8129 # Don't try gcc -ansi; that turns off useful extensions and
8130 # breaks some systems' header files.
8131 # AIX                   -qlanglvl=ansi
8132 # Ultrix and OSF/1      -std1
8133 # HP-UX 10.20 and later -Ae
8134 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8135 # SVR4                  -Xc -D__EXTENSIONS__
8136 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8137 do
8138   CC="$ac_save_CC $ac_arg"
8139   cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142 #include <stdarg.h>
8143 #include <stdio.h>
8144 #include <sys/types.h>
8145 #include <sys/stat.h>
8146 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8147 struct buf { int x; };
8148 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8149 static char *e (p, i)
8150      char **p;
8151      int i;
8152 {
8153   return p[i];
8154 }
8155 static char *f (char * (*g) (char **, int), char **p, ...)
8156 {
8157   char *s;
8158   va_list v;
8159   va_start (v,p);
8160   s = g (p, va_arg (v,int));
8161   va_end (v);
8162   return s;
8163 }
8164 int test (int i, double x);
8165 struct s1 {int (*f) (int a);};
8166 struct s2 {int (*f) (double a);};
8167 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8168 int argc;
8169 char **argv;
8170
8171 int main() {
8172
8173 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8174
8175 ; return 0; }
8176 EOF
8177 if { (eval echo configure:8178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8178   rm -rf conftest*
8179   am_cv_prog_cc_stdc="$ac_arg"; break
8180 else
8181   echo "configure: failed program was:" >&5
8182   cat conftest.$ac_ext >&5
8183 fi
8184 rm -f conftest*
8185 done
8186 CC="$ac_save_CC"
8187
8188 fi
8189
8190 if test -z "$am_cv_prog_cc_stdc"; then
8191   echo "$ac_t""none needed" 1>&6
8192 else
8193   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8194 fi
8195 case "x$am_cv_prog_cc_stdc" in
8196   x|xno) ;;
8197   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8198 esac
8199
8200 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8201         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8202 fi
8203
8204 # test for make depend flag
8205 OL_MKDEP=
8206 OL_MKDEP_FLAGS=
8207 if test -z "${MKDEP}"; then
8208         OL_MKDEP="${CC-cc}"
8209         if test -z "${MKDEP_FLAGS}"; then
8210                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8211 echo "configure:8212: checking for ${OL_MKDEP} depend flag" >&5
8212 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8213   echo $ac_n "(cached) $ac_c" 1>&6
8214 else
8215   
8216                         ol_cv_mkdep=no
8217                         for flag in "-M" "-xM"; do
8218                                 cat > conftest.c <<EOF
8219  noCode;
8220 EOF
8221                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8222                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8223                                 then
8224                                         if test ! -f conftest."${ac_object}" ; then
8225                                                 ol_cv_mkdep=$flag
8226                                                 OL_MKDEP_FLAGS="$flag"
8227                                                 break
8228                                         fi
8229                                 fi
8230                         done
8231                         rm -f conftest*
8232                 
8233 fi
8234
8235 echo "$ac_t""$ol_cv_mkdep" 1>&6
8236         else
8237                 cc_cv_mkdep=yes
8238                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8239         fi
8240 else
8241         cc_cv_mkdep=yes
8242         OL_MKDEP="${MKDEP}"
8243         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8244 fi
8245
8246
8247
8248 if test "${ol_cv_mkdep}" = no ; then
8249         # this will soon become an error
8250         echo "configure: warning: do not know how to generate dependencies" 1>&2
8251 fi
8252
8253 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8254 echo "configure:8255: checking for afopen in -ls" >&5
8255 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8257   echo $ac_n "(cached) $ac_c" 1>&6
8258 else
8259   ac_save_LIBS="$LIBS"
8260 LIBS="-ls  $LIBS"
8261 cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8264 /* Override any gcc2 internal prototype to avoid an error.  */
8265 /* We use char because int might match the return type of a gcc2
8266     builtin and then its argument prototype would still apply.  */
8267 char afopen();
8268
8269 int main() {
8270 afopen()
8271 ; return 0; }
8272 EOF
8273 if { (eval echo configure:8274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8274   rm -rf conftest*
8275   eval "ac_cv_lib_$ac_lib_var=yes"
8276 else
8277   echo "configure: failed program was:" >&5
8278   cat conftest.$ac_ext >&5
8279   rm -rf conftest*
8280   eval "ac_cv_lib_$ac_lib_var=no"
8281 fi
8282 rm -f conftest*
8283 LIBS="$ac_save_LIBS"
8284
8285 fi
8286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8287   echo "$ac_t""yes" 1>&6
8288   
8289         AUTH_LIBS=-ls
8290         cat >> confdefs.h <<\EOF
8291 #define HAVE_AIX_SECURITY 1
8292 EOF
8293
8294
8295 else
8296   echo "$ac_t""no" 1>&6
8297 fi
8298
8299
8300 case "$target" in
8301 *-ibm-openedition)
8302         ac_cv_func_getopt=no
8303         cat >> confdefs.h <<\EOF
8304 #define BOTH_STRINGS_H 1
8305 EOF
8306
8307         ;;
8308 esac
8309
8310 ol_link_modules=no
8311 if test $ol_enable_modules != no ; then
8312         for ac_hdr in ltdl.h
8313 do
8314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8316 echo "configure:8317: checking for $ac_hdr" >&5
8317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   cat > conftest.$ac_ext <<EOF
8321 #line 8322 "configure"
8322 #include "confdefs.h"
8323 #include <$ac_hdr>
8324 EOF
8325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8326 { (eval echo configure:8327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8328 if test -z "$ac_err"; then
8329   rm -rf conftest*
8330   eval "ac_cv_header_$ac_safe=yes"
8331 else
8332   echo "$ac_err" >&5
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_header_$ac_safe=no"
8337 fi
8338 rm -f conftest*
8339 fi
8340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8341   echo "$ac_t""yes" 1>&6
8342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8343   cat >> confdefs.h <<EOF
8344 #define $ac_tr_hdr 1
8345 EOF
8346  
8347 else
8348   echo "$ac_t""no" 1>&6
8349 fi
8350 done
8351
8352
8353         if test $ac_cv_header_ltdl_h = no ; then
8354                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8355         fi
8356
8357         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8358 echo "configure:8359: checking for lt_dlinit in -lltdl" >&5
8359 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8361   echo $ac_n "(cached) $ac_c" 1>&6
8362 else
8363   ac_save_LIBS="$LIBS"
8364 LIBS="-lltdl  $LIBS"
8365 cat > conftest.$ac_ext <<EOF
8366 #line 8367 "configure"
8367 #include "confdefs.h"
8368 /* Override any gcc2 internal prototype to avoid an error.  */
8369 /* We use char because int might match the return type of a gcc2
8370     builtin and then its argument prototype would still apply.  */
8371 char lt_dlinit();
8372
8373 int main() {
8374 lt_dlinit()
8375 ; return 0; }
8376 EOF
8377 if { (eval echo configure:8378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=yes"
8380 else
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   eval "ac_cv_lib_$ac_lib_var=no"
8385 fi
8386 rm -f conftest*
8387 LIBS="$ac_save_LIBS"
8388
8389 fi
8390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8391   echo "$ac_t""yes" 1>&6
8392   
8393                 MODULES_LIBS=-lltdl
8394                 cat >> confdefs.h <<\EOF
8395 #define HAVE_LIBLTDL 1
8396 EOF
8397
8398         
8399 else
8400   echo "$ac_t""no" 1>&6
8401 fi
8402
8403
8404         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8405                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8406         fi
8407         ol_link_modules=yes
8408 else
8409         ol_with_bdb_module=static
8410         ol_with_dnssrv_module=static
8411         ol_with_hdb_module=static
8412         ol_with_ldap_module=static
8413         ol_with_ldbm_module=static
8414         ol_with_meta_module=static
8415         ol_with_monitor_module=static
8416         ol_with_null_module=static
8417         ol_with_passwd_module=static
8418         ol_with_perl_module=static
8419         ol_with_shell_module=static
8420         ol_with_tcl_module=static
8421         ol_with_sql_module=static
8422 fi
8423
8424 # test for EBCDIC
8425 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8426 echo "configure:8427: checking for EBCDIC" >&5
8427 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8428   echo $ac_n "(cached) $ac_c" 1>&6
8429 else
8430   
8431         cat > conftest.$ac_ext <<EOF
8432 #line 8433 "configure"
8433 #include "confdefs.h"
8434
8435 #if !('M' == 0xd4)
8436 #include <__ASCII__/generate_error.h>
8437 #endif
8438
8439 EOF
8440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8441 { (eval echo configure:8442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8443 if test -z "$ac_err"; then
8444   rm -rf conftest*
8445   ol_cv_cpp_ebcdic=yes
8446 else
8447   echo "$ac_err" >&5
8448   echo "configure: failed program was:" >&5
8449   cat conftest.$ac_ext >&5
8450   rm -rf conftest*
8451   ol_cv_cpp_ebcdic=no
8452 fi
8453 rm -f conftest*
8454 fi
8455
8456 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8457 if test $ol_cv_cpp_ebcdic = yes ; then
8458         cat >> confdefs.h <<\EOF
8459 #define HAVE_EBCDIC 1
8460 EOF
8461
8462 fi
8463
8464 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8465 echo "configure:8466: checking for ANSI C header files" >&5
8466 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8467   echo $ac_n "(cached) $ac_c" 1>&6
8468 else
8469   cat > conftest.$ac_ext <<EOF
8470 #line 8471 "configure"
8471 #include "confdefs.h"
8472 #include <stdlib.h>
8473 #include <stdarg.h>
8474 #include <string.h>
8475 #include <float.h>
8476 EOF
8477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8478 { (eval echo configure:8479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8480 if test -z "$ac_err"; then
8481   rm -rf conftest*
8482   ol_cv_header_stdc=yes
8483 else
8484   echo "$ac_err" >&5
8485   echo "configure: failed program was:" >&5
8486   cat conftest.$ac_ext >&5
8487   rm -rf conftest*
8488   ol_cv_header_stdc=no
8489 fi
8490 rm -f conftest*
8491
8492 if test $ol_cv_header_stdc = yes; then
8493   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8494 cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497 #include <string.h>
8498 EOF
8499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8500   egrep "memchr" >/dev/null 2>&1; then
8501   :
8502 else
8503   rm -rf conftest*
8504   ol_cv_header_stdc=no
8505 fi
8506 rm -f conftest*
8507
8508 fi
8509
8510 if test $ol_cv_header_stdc = yes; then
8511   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8512 cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 #include <stdlib.h>
8516 EOF
8517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8518   egrep "free" >/dev/null 2>&1; then
8519   :
8520 else
8521   rm -rf conftest*
8522   ol_cv_header_stdc=no
8523 fi
8524 rm -f conftest*
8525
8526 fi
8527
8528 if test $ol_cv_header_stdc = yes; then
8529   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8530 if test "$cross_compiling" = yes; then
8531   :
8532 else
8533   cat > conftest.$ac_ext <<EOF
8534 #line 8535 "configure"
8535 #include "confdefs.h"
8536 #include <ctype.h>
8537 #ifndef HAVE_EBCDIC
8538 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8539 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8540 #else
8541 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8542                 || ('j' <= (c) && (c) <= 'r') \
8543                 || ('s' <= (c) && (c) <= 'z'))
8544 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8545 #endif
8546 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8547 int main () { int i; for (i = 0; i < 256; i++)
8548 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8549 exit (0); }
8550
8551 EOF
8552 if { (eval echo configure:8553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8553 then
8554   :
8555 else
8556   echo "configure: failed program was:" >&5
8557   cat conftest.$ac_ext >&5
8558   rm -fr conftest*
8559   ol_cv_header_stdc=no
8560 fi
8561 rm -fr conftest*
8562 fi
8563
8564 fi
8565 fi
8566
8567 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8568 if test $ol_cv_header_stdc = yes; then
8569   cat >> confdefs.h <<\EOF
8570 #define STDC_HEADERS 1
8571 EOF
8572
8573 fi
8574 ac_cv_header_stdc=disable
8575
8576
8577 if test $ol_cv_header_stdc != yes; then
8578         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8579 fi
8580
8581 ac_header_dirent=no
8582 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8583 do
8584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8585 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8586 echo "configure:8587: checking for $ac_hdr that defines DIR" >&5
8587 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8588   echo $ac_n "(cached) $ac_c" 1>&6
8589 else
8590   cat > conftest.$ac_ext <<EOF
8591 #line 8592 "configure"
8592 #include "confdefs.h"
8593 #include <sys/types.h>
8594 #include <$ac_hdr>
8595 int main() {
8596 DIR *dirp = 0;
8597 ; return 0; }
8598 EOF
8599 if { (eval echo configure:8600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8600   rm -rf conftest*
8601   eval "ac_cv_header_dirent_$ac_safe=yes"
8602 else
8603   echo "configure: failed program was:" >&5
8604   cat conftest.$ac_ext >&5
8605   rm -rf conftest*
8606   eval "ac_cv_header_dirent_$ac_safe=no"
8607 fi
8608 rm -f conftest*
8609 fi
8610 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8613   cat >> confdefs.h <<EOF
8614 #define $ac_tr_hdr 1
8615 EOF
8616  ac_header_dirent=$ac_hdr; break
8617 else
8618   echo "$ac_t""no" 1>&6
8619 fi
8620 done
8621 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8622 if test $ac_header_dirent = dirent.h; then
8623 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8624 echo "configure:8625: checking for opendir in -ldir" >&5
8625 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8627   echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629   ac_save_LIBS="$LIBS"
8630 LIBS="-ldir  $LIBS"
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 /* Override any gcc2 internal prototype to avoid an error.  */
8635 /* We use char because int might match the return type of a gcc2
8636     builtin and then its argument prototype would still apply.  */
8637 char opendir();
8638
8639 int main() {
8640 opendir()
8641 ; return 0; }
8642 EOF
8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=yes"
8646 else
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   eval "ac_cv_lib_$ac_lib_var=no"
8651 fi
8652 rm -f conftest*
8653 LIBS="$ac_save_LIBS"
8654
8655 fi
8656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8657   echo "$ac_t""yes" 1>&6
8658   LIBS="$LIBS -ldir"
8659 else
8660   echo "$ac_t""no" 1>&6
8661 fi
8662
8663 else
8664 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8665 echo "configure:8666: checking for opendir in -lx" >&5
8666 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   ac_save_LIBS="$LIBS"
8671 LIBS="-lx  $LIBS"
8672 cat > conftest.$ac_ext <<EOF
8673 #line 8674 "configure"
8674 #include "confdefs.h"
8675 /* Override any gcc2 internal prototype to avoid an error.  */
8676 /* We use char because int might match the return type of a gcc2
8677     builtin and then its argument prototype would still apply.  */
8678 char opendir();
8679
8680 int main() {
8681 opendir()
8682 ; return 0; }
8683 EOF
8684 if { (eval echo configure:8685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8685   rm -rf conftest*
8686   eval "ac_cv_lib_$ac_lib_var=yes"
8687 else
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   eval "ac_cv_lib_$ac_lib_var=no"
8692 fi
8693 rm -f conftest*
8694 LIBS="$ac_save_LIBS"
8695
8696 fi
8697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8698   echo "$ac_t""yes" 1>&6
8699   LIBS="$LIBS -lx"
8700 else
8701   echo "$ac_t""no" 1>&6
8702 fi
8703
8704 fi
8705
8706 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8707 echo "configure:8708: checking for sys/wait.h that is POSIX.1 compatible" >&5
8708 if eval "test \"\${ac_cv_header_sys_wait_h+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 <sys/wait.h>
8716 #ifndef WEXITSTATUS
8717 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8718 #endif
8719 #ifndef WIFEXITED
8720 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8721 #endif
8722 int main() {
8723 int s;
8724 wait (&s);
8725 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8726 ; return 0; }
8727 EOF
8728 if { (eval echo configure:8729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8729   rm -rf conftest*
8730   ac_cv_header_sys_wait_h=yes
8731 else
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   ac_cv_header_sys_wait_h=no
8736 fi
8737 rm -f conftest*
8738 fi
8739
8740 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8741 if test $ac_cv_header_sys_wait_h = yes; then
8742   cat >> confdefs.h <<\EOF
8743 #define HAVE_SYS_WAIT_H 1
8744 EOF
8745
8746 fi
8747
8748 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8749 echo "configure:8750: checking POSIX termios" >&5
8750 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8751   echo $ac_n "(cached) $ac_c" 1>&6
8752 else
8753   cat > conftest.$ac_ext <<EOF
8754 #line 8755 "configure"
8755 #include "confdefs.h"
8756 #include <sys/types.h>
8757 #include <unistd.h>
8758 #include <termios.h>
8759 int main() {
8760 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8761    tcgetattr(0, 0);
8762 ; return 0; }
8763 EOF
8764 if { (eval echo configure:8765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8765   rm -rf conftest*
8766   am_cv_sys_posix_termios=yes
8767 else
8768   echo "configure: failed program was:" >&5
8769   cat conftest.$ac_ext >&5
8770   rm -rf conftest*
8771   am_cv_sys_posix_termios=no
8772 fi
8773 rm -f conftest*
8774 fi
8775
8776 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8777
8778
8779  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8780 echo "configure:8781: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8781 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8782   echo $ac_n "(cached) $ac_c" 1>&6
8783 else
8784   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8785
8786   gwinsz_in_termios_h=no
8787   if test $am_cv_sys_posix_termios = yes; then
8788     cat > conftest.$ac_ext <<EOF
8789 #line 8790 "configure"
8790 #include "confdefs.h"
8791 #include <sys/types.h>
8792 #     include <termios.h>
8793 #     ifdef TIOCGWINSZ
8794         yes
8795 #     endif
8796     
8797 EOF
8798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8799   egrep "yes" >/dev/null 2>&1; then
8800   rm -rf conftest*
8801   gwinsz_in_termios_h=yes
8802 fi
8803 rm -f conftest*
8804
8805   fi
8806
8807   if test $gwinsz_in_termios_h = no; then
8808     cat > conftest.$ac_ext <<EOF
8809 #line 8810 "configure"
8810 #include "confdefs.h"
8811 #include <sys/types.h>
8812 #     include <sys/ioctl.h>
8813 #     ifdef TIOCGWINSZ
8814         yes
8815 #     endif
8816     
8817 EOF
8818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8819   egrep "yes" >/dev/null 2>&1; then
8820   rm -rf conftest*
8821   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8822 fi
8823 rm -f conftest*
8824
8825   fi
8826   
8827 fi
8828
8829 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8830   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8831     cat >> confdefs.h <<\EOF
8832 #define GWINSZ_IN_SYS_IOCTL 1
8833 EOF
8834
8835   fi
8836
8837 if test $am_cv_sys_posix_termios = yes ; then
8838         cat >> confdefs.h <<\EOF
8839 #define HAVE_POSIX_TERMIOS 1
8840 EOF
8841
8842 fi
8843
8844 for ac_hdr in \
8845         arpa/inet.h             \
8846         arpa/nameser.h  \
8847         assert.h                \
8848         conio.h                 \
8849         crypt.h                 \
8850         direct.h                \
8851         errno.h                 \
8852         fcntl.h                 \
8853         filio.h                 \
8854         getopt.h                \
8855         grp.h                   \
8856         io.h                    \
8857         libutil.h               \
8858         limits.h                \
8859         locale.h                \
8860         netinet/tcp.h   \
8861         malloc.h                \
8862         memory.h                \
8863         psap.h                  \
8864         pwd.h                   \
8865         process.h               \
8866         resolv.h                \
8867         sgtty.h                 \
8868         shadow.h                \
8869         stddef.h                \
8870         string.h                \
8871         strings.h               \
8872         sysexits.h              \
8873         sys/file.h              \
8874         sys/filio.h             \
8875         sys/errno.h             \
8876         sys/ioctl.h             \
8877         sys/param.h             \
8878         sys/resource.h  \
8879         sys/select.h    \
8880         sys/socket.h    \
8881         sys/stat.h              \
8882         sys/syslog.h    \
8883         sys/time.h              \
8884         sys/types.h             \
8885         sys/ucred.h             \
8886         sys/uio.h               \
8887         syslog.h                \
8888         termios.h               \
8889         unistd.h                \
8890         winsock.h               \
8891         winsock2.h              \
8892
8893 do
8894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8896 echo "configure:8897: checking for $ac_hdr" >&5
8897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 #include <$ac_hdr>
8904 EOF
8905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8906 { (eval echo configure:8907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8908 if test -z "$ac_err"; then
8909   rm -rf conftest*
8910   eval "ac_cv_header_$ac_safe=yes"
8911 else
8912   echo "$ac_err" >&5
8913   echo "configure: failed program was:" >&5
8914   cat conftest.$ac_ext >&5
8915   rm -rf conftest*
8916   eval "ac_cv_header_$ac_safe=no"
8917 fi
8918 rm -f conftest*
8919 fi
8920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8921   echo "$ac_t""yes" 1>&6
8922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8923   cat >> confdefs.h <<EOF
8924 #define $ac_tr_hdr 1
8925 EOF
8926  
8927 else
8928   echo "$ac_t""no" 1>&6
8929 fi
8930 done
8931
8932
8933
8934
8935 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8936 echo "configure:8937: checking for dlopen" >&5
8937 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 /* System header to define __stub macros and hopefully few prototypes,
8944     which can conflict with char dlopen(); below.  */
8945 #include <assert.h>
8946 /* Override any gcc2 internal prototype to avoid an error.  */
8947 /* We use char because int might match the return type of a gcc2
8948     builtin and then its argument prototype would still apply.  */
8949 char dlopen();
8950 char (*f)();
8951
8952 int main() {
8953
8954 /* The GNU C library defines this for functions which it implements
8955     to always fail with ENOSYS.  Some functions are actually named
8956     something starting with __ and the normal name is an alias.  */
8957 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8958 choke me
8959 #else
8960 f = dlopen;
8961 #endif
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   eval "ac_cv_func_dlopen=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_func_dlopen=no"
8973 fi
8974 rm -f conftest*
8975 fi
8976
8977 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8978   echo "$ac_t""yes" 1>&6
8979   :
8980 else
8981   echo "$ac_t""no" 1>&6
8982 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8983 echo "configure:8984: checking for dlopen in -ldl" >&5
8984 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   ac_save_LIBS="$LIBS"
8989 LIBS="-ldl  $LIBS"
8990 cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 /* Override any gcc2 internal prototype to avoid an error.  */
8994 /* We use char because int might match the return type of a gcc2
8995     builtin and then its argument prototype would still apply.  */
8996 char dlopen();
8997
8998 int main() {
8999 dlopen()
9000 ; return 0; }
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9003   rm -rf conftest*
9004   eval "ac_cv_lib_$ac_lib_var=yes"
9005 else
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   eval "ac_cv_lib_$ac_lib_var=no"
9010 fi
9011 rm -f conftest*
9012 LIBS="$ac_save_LIBS"
9013
9014 fi
9015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9016   echo "$ac_t""yes" 1>&6
9017     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9019   cat >> confdefs.h <<EOF
9020 #define $ac_tr_lib 1
9021 EOF
9022
9023   LIBS="-ldl $LIBS"
9024
9025 else
9026   echo "$ac_t""no" 1>&6
9027 fi
9028
9029 fi
9030
9031
9032 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9033 echo "configure:9034: checking for sigset in -lV3" >&5
9034 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   ac_save_LIBS="$LIBS"
9039 LIBS="-lV3  $LIBS"
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 /* Override any gcc2 internal prototype to avoid an error.  */
9044 /* We use char because int might match the return type of a gcc2
9045     builtin and then its argument prototype would still apply.  */
9046 char sigset();
9047
9048 int main() {
9049 sigset()
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   eval "ac_cv_lib_$ac_lib_var=yes"
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   eval "ac_cv_lib_$ac_lib_var=no"
9060 fi
9061 rm -f conftest*
9062 LIBS="$ac_save_LIBS"
9063
9064 fi
9065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9066   echo "$ac_t""yes" 1>&6
9067     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9069   cat >> confdefs.h <<EOF
9070 #define $ac_tr_lib 1
9071 EOF
9072
9073   LIBS="-lV3 $LIBS"
9074
9075 else
9076   echo "$ac_t""no" 1>&6
9077 fi
9078
9079
9080 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9081 echo "configure:9082: checking for winsock" >&5
9082 save_LIBS="$LIBS"
9083 for curlib in ws2_32 wsock32; do
9084         LIBS="$LIBS -l$curlib"
9085         cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088
9089                         char socket@12();
9090                         char select@20();
9091                         char closesocket@4();
9092                         char gethostname@8();
9093                         
9094 int main() {
9095
9096                         socket@12();
9097                         select@20();
9098                         closesocket@4();
9099                         gethostname@8();
9100                         
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   have_winsock=yes
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   have_winsock=no
9111 fi
9112 rm -f conftest*
9113
9114         if test $have_winsock = yes; then
9115                 cat >> confdefs.h <<\EOF
9116 #define HAVE_WINSOCK 1
9117 EOF
9118
9119                 ac_cv_func_socket=yes
9120                 ac_cv_func_select=yes
9121                 ac_cv_func_closesocket=yes
9122                 ac_cv_func_gethostname=yes
9123                 if test $curlib = ws2_32; then
9124                         have_winsock=winsock2
9125                         cat >> confdefs.h <<\EOF
9126 #define HAVE_WINSOCK2 1
9127 EOF
9128
9129                 fi
9130                 break
9131         fi
9132         LIBS="$save_LIBS"
9133 done
9134 echo "$ac_t""$have_winsock" 1>&6
9135
9136
9137 echo $ac_n "checking for socket""... $ac_c" 1>&6
9138 echo "configure:9139: checking for socket" >&5
9139 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9140   echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142   cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 /* System header to define __stub macros and hopefully few prototypes,
9146     which can conflict with char socket(); below.  */
9147 #include <assert.h>
9148 /* Override any gcc2 internal prototype to avoid an error.  */
9149 /* We use char because int might match the return type of a gcc2
9150     builtin and then its argument prototype would still apply.  */
9151 char socket();
9152 char (*f)();
9153
9154 int main() {
9155
9156 /* The GNU C library defines this for functions which it implements
9157     to always fail with ENOSYS.  Some functions are actually named
9158     something starting with __ and the normal name is an alias.  */
9159 #if defined (__stub_socket) || defined (__stub___socket)
9160 choke me
9161 #else
9162 f = socket;
9163 #endif
9164
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_func_socket=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_func_socket=no"
9175 fi
9176 rm -f conftest*
9177 fi
9178
9179 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181   :
9182 else
9183   echo "$ac_t""no" 1>&6
9184         
9185         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9186 echo "configure:9187: checking for main in -lsocket" >&5
9187 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9188 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   ac_save_LIBS="$LIBS"
9192 LIBS="-lsocket  $LIBS"
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196
9197 int main() {
9198 main()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 LIBS="$ac_save_LIBS"
9212
9213 fi
9214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9218   cat >> confdefs.h <<EOF
9219 #define $ac_tr_lib 1
9220 EOF
9221
9222   LIBS="-lsocket $LIBS"
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9229 echo "configure:9230: checking for main in -lnet" >&5
9230 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   ac_save_LIBS="$LIBS"
9235 LIBS="-lnet  $LIBS"
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239
9240 int main() {
9241 main()
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245   rm -rf conftest*
9246   eval "ac_cv_lib_$ac_lib_var=yes"
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=no"
9252 fi
9253 rm -f conftest*
9254 LIBS="$ac_save_LIBS"
9255
9256 fi
9257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9258   echo "$ac_t""yes" 1>&6
9259     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9261   cat >> confdefs.h <<EOF
9262 #define $ac_tr_lib 1
9263 EOF
9264
9265   LIBS="-lnet $LIBS"
9266
9267 else
9268   echo "$ac_t""no" 1>&6
9269 fi
9270
9271         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9272 echo "configure:9273: checking for main in -lnsl_s" >&5
9273 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ac_save_LIBS="$LIBS"
9278 LIBS="-lnsl_s  $LIBS"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282
9283 int main() {
9284 main()
9285 ; return 0; }
9286 EOF
9287 if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=yes"
9290 else
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=no"
9295 fi
9296 rm -f conftest*
9297 LIBS="$ac_save_LIBS"
9298
9299 fi
9300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9301   echo "$ac_t""yes" 1>&6
9302     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9304   cat >> confdefs.h <<EOF
9305 #define $ac_tr_lib 1
9306 EOF
9307
9308   LIBS="-lnsl_s $LIBS"
9309
9310 else
9311   echo "$ac_t""no" 1>&6
9312 fi
9313
9314         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9315 echo "configure:9316: checking for main in -lnsl" >&5
9316 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9318   echo $ac_n "(cached) $ac_c" 1>&6
9319 else
9320   ac_save_LIBS="$LIBS"
9321 LIBS="-lnsl  $LIBS"
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325
9326 int main() {
9327 main()
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=yes"
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=no"
9338 fi
9339 rm -f conftest*
9340 LIBS="$ac_save_LIBS"
9341
9342 fi
9343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9347   cat >> confdefs.h <<EOF
9348 #define $ac_tr_lib 1
9349 EOF
9350
9351   LIBS="-lnsl $LIBS"
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9358 echo "configure:9359: checking for socket in -linet" >&5
9359 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9361   echo $ac_n "(cached) $ac_c" 1>&6
9362 else
9363   ac_save_LIBS="$LIBS"
9364 LIBS="-linet  $LIBS"
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 /* Override any gcc2 internal prototype to avoid an error.  */
9369 /* We use char because int might match the return type of a gcc2
9370     builtin and then its argument prototype would still apply.  */
9371 char socket();
9372
9373 int main() {
9374 socket()
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   eval "ac_cv_lib_$ac_lib_var=yes"
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=no"
9385 fi
9386 rm -f conftest*
9387 LIBS="$ac_save_LIBS"
9388
9389 fi
9390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9394   cat >> confdefs.h <<EOF
9395 #define $ac_tr_lib 1
9396 EOF
9397
9398   LIBS="-linet $LIBS"
9399
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9405 echo "configure:9406: checking for main in -lgen" >&5
9406 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   ac_save_LIBS="$LIBS"
9411 LIBS="-lgen  $LIBS"
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 int main() {
9417 main()
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   eval "ac_cv_lib_$ac_lib_var=yes"
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   eval "ac_cv_lib_$ac_lib_var=no"
9428 fi
9429 rm -f conftest*
9430 LIBS="$ac_save_LIBS"
9431
9432 fi
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9434   echo "$ac_t""yes" 1>&6
9435     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_lib 1
9439 EOF
9440
9441   LIBS="-lgen $LIBS"
9442
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446
9447
9448 fi
9449
9450
9451 echo $ac_n "checking for select""... $ac_c" 1>&6
9452 echo "configure:9453: checking for select" >&5
9453 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9454   echo $ac_n "(cached) $ac_c" 1>&6
9455 else
9456   cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 /* System header to define __stub macros and hopefully few prototypes,
9460     which can conflict with char select(); below.  */
9461 #include <assert.h>
9462 /* Override any gcc2 internal prototype to avoid an error.  */
9463 /* We use char because int might match the return type of a gcc2
9464     builtin and then its argument prototype would still apply.  */
9465 char select();
9466 char (*f)();
9467
9468 int main() {
9469
9470 /* The GNU C library defines this for functions which it implements
9471     to always fail with ENOSYS.  Some functions are actually named
9472     something starting with __ and the normal name is an alias.  */
9473 #if defined (__stub_select) || defined (__stub___select)
9474 choke me
9475 #else
9476 f = select;
9477 #endif
9478
9479 ; return 0; }
9480 EOF
9481 if { (eval echo configure:9482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9482   rm -rf conftest*
9483   eval "ac_cv_func_select=yes"
9484 else
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   eval "ac_cv_func_select=no"
9489 fi
9490 rm -f conftest*
9491 fi
9492
9493 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9494   echo "$ac_t""yes" 1>&6
9495   :
9496 else
9497   echo "$ac_t""no" 1>&6
9498 { echo "configure: error: select() required." 1>&2; exit 1; }
9499 fi
9500
9501
9502 if test "${ac_cv_header_winsock_h}" != yes; then
9503                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9504 echo "configure:9505: checking types of arguments for select()" >&5
9505  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9506   echo $ac_n "(cached) $ac_c" 1>&6
9507 else
9508    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9515      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9516       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9517        cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 #ifdef HAVE_SYS_TYPES_H
9521 #include <sys/types.h>
9522 #endif
9523 #ifdef HAVE_SYS_TIME_H
9524 #include <sys/time.h>
9525 #endif
9526 #ifdef HAVE_SYS_SELECT_H
9527 #include <sys/select.h>
9528 #endif
9529 #ifdef HAVE_SYS_SOCKET_H
9530 #include <sys/socket.h>
9531 #endif
9532 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);
9533 int main() {
9534
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9538   rm -rf conftest*
9539           ac_not_found=no ; break 3
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   ac_not_found=yes
9545 fi
9546 rm -f conftest*
9547       done
9548      done
9549     done
9550    
9551 fi
9552   
9553 fi
9554  
9555 fi
9556  if test "$ac_not_found" = yes; then
9557   ac_cv_func_select_arg1=int 
9558   ac_cv_func_select_arg234='int *' 
9559   ac_cv_func_select_arg5='struct timeval *'
9560  fi
9561  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9562  cat >> confdefs.h <<EOF
9563 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9564 EOF
9565
9566  cat >> confdefs.h <<EOF
9567 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9568 EOF
9569
9570  cat >> confdefs.h <<EOF
9571 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9572 EOF
9573
9574
9575 fi
9576
9577
9578 for ac_hdr in regex.h 
9579 do
9580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9582 echo "configure:9583: checking for $ac_hdr" >&5
9583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 #include <$ac_hdr>
9590 EOF
9591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9592 { (eval echo configure:9593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9594 if test -z "$ac_err"; then
9595   rm -rf conftest*
9596   eval "ac_cv_header_$ac_safe=yes"
9597 else
9598   echo "$ac_err" >&5
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -rf conftest*
9602   eval "ac_cv_header_$ac_safe=no"
9603 fi
9604 rm -f conftest*
9605 fi
9606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9607   echo "$ac_t""yes" 1>&6
9608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9609   cat >> confdefs.h <<EOF
9610 #define $ac_tr_hdr 1
9611 EOF
9612  
9613 else
9614   echo "$ac_t""no" 1>&6
9615 fi
9616 done
9617
9618 if test "$ac_cv_header_regex_h" != yes ; then
9619         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9620 fi
9621
9622 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9623 echo "configure:9624: checking for library containing regfree" >&5
9624 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   ac_func_search_save_LIBS="$LIBS"
9628 ac_cv_search_regfree="no"
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 /* Override any gcc2 internal prototype to avoid an error.  */
9633 /* We use char because int might match the return type of a gcc2
9634     builtin and then its argument prototype would still apply.  */
9635 char regfree();
9636
9637 int main() {
9638 regfree()
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9642   rm -rf conftest*
9643   ac_cv_search_regfree="none required"
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647 fi
9648 rm -f conftest*
9649 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9650 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char regfree();
9658
9659 int main() {
9660 regfree()
9661 ; return 0; }
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9664   rm -rf conftest*
9665   ac_cv_search_regfree="-l$ac_lib"
9666 break
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest*
9672 done
9673 LIBS="$ac_func_search_save_LIBS"
9674 fi
9675
9676 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9677 if test "$ac_cv_search_regfree" != "no"; then
9678   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9679   :
9680 else :
9681   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9682 fi
9683
9684
9685 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9686 echo "configure:9687: checking for compatible POSIX regex" >&5
9687 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691         if test "$cross_compiling" = yes; then
9692   ol_cv_c_posix_regex=cross
9693 else
9694   cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697
9698 #include <sys/types.h>
9699 #include <regex.h>
9700 static char *pattern, *string;
9701 main()
9702 {
9703         int rc;
9704         regex_t re;
9705
9706         pattern = "^A";
9707
9708         if(regcomp(&re, pattern, 0)) {
9709                 return -1;
9710         }
9711         
9712         string = "ALL MATCH";
9713         
9714         rc = regexec(&re, string, 0, (void*)0, 0);
9715
9716         regfree(&re);
9717
9718         return rc;
9719 }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9722 then
9723   ol_cv_c_posix_regex=yes
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -fr conftest*
9728   ol_cv_c_posix_regex=no
9729 fi
9730 rm -fr conftest*
9731 fi
9732
9733 fi
9734
9735 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9736
9737 if test "$ol_cv_c_posix_regex" = no ; then
9738         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9739 fi
9740
9741
9742 have_uuid=no
9743 for ac_hdr in sys/uuid.h
9744 do
9745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9747 echo "configure:9748: checking for $ac_hdr" >&5
9748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   cat > conftest.$ac_ext <<EOF
9752 #line 9753 "configure"
9753 #include "confdefs.h"
9754 #include <$ac_hdr>
9755 EOF
9756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9757 { (eval echo configure:9758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9759 if test -z "$ac_err"; then
9760   rm -rf conftest*
9761   eval "ac_cv_header_$ac_safe=yes"
9762 else
9763   echo "$ac_err" >&5
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766   rm -rf conftest*
9767   eval "ac_cv_header_$ac_safe=no"
9768 fi
9769 rm -f conftest*
9770 fi
9771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9772   echo "$ac_t""yes" 1>&6
9773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9774   cat >> confdefs.h <<EOF
9775 #define $ac_tr_hdr 1
9776 EOF
9777  
9778 else
9779   echo "$ac_t""no" 1>&6
9780 fi
9781 done
9782
9783 if test $ac_cv_header_sys_uuid_h = yes ; then
9784         save_LIBS="$LIBS"
9785         
9786 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9787 echo "configure:9788: checking for library containing uuid_to_str" >&5
9788 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   ac_func_search_save_LIBS="$LIBS"
9792 ac_cv_search_uuid_to_str="no"
9793 cat > conftest.$ac_ext <<EOF
9794 #line 9795 "configure"
9795 #include "confdefs.h"
9796 /* Override any gcc2 internal prototype to avoid an error.  */
9797 /* We use char because int might match the return type of a gcc2
9798     builtin and then its argument prototype would still apply.  */
9799 char uuid_to_str();
9800
9801 int main() {
9802 uuid_to_str()
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   ac_cv_search_uuid_to_str="none required"
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811 fi
9812 rm -f conftest*
9813 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9814 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char uuid_to_str();
9822
9823 int main() {
9824 uuid_to_str()
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   ac_cv_search_uuid_to_str="-l$ac_lib"
9830 break
9831 else
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834 fi
9835 rm -f conftest*
9836 done
9837 LIBS="$ac_func_search_save_LIBS"
9838 fi
9839
9840 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9841 if test "$ac_cv_search_uuid_to_str" != "no"; then
9842   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9843   have_uuid=yes
9844 else :
9845   :
9846 fi
9847         LIBS="$save_LIBS"
9848
9849         if test have_uuid = yes ; then
9850                 cat >> confdefs.h <<\EOF
9851 #define HAVE_UUID_TO_STR 1
9852 EOF
9853
9854
9855                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9856                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9857         fi
9858 fi
9859
9860 if test $have_uuid = no ; then
9861         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9862 echo "configure:9863: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9863         save_LIBS="$LIBS"
9864         LIBS="$LIBS -lrpcrt4"
9865         cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868
9869                 char UuidCreate@4();
9870                 char UuidToStringA@8();
9871                 
9872 int main() {
9873
9874                 UuidCreate@4();
9875                 UuidToStringA@8();
9876                 
9877 ; return 0; }
9878 EOF
9879 if { (eval echo configure:9880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9880   rm -rf conftest*
9881   need_rpcrt=yes
9882 else
9883   echo "configure: failed program was:" >&5
9884   cat conftest.$ac_ext >&5
9885   rm -rf conftest*
9886   need_rpcrt=no
9887 fi
9888 rm -f conftest*
9889         if test $need_rpcrt = yes; then
9890                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9891         fi
9892         LIBS="$save_LIBS"
9893         echo "$ac_t""$need_rpcrt" 1>&6
9894 fi
9895
9896 ol_link_dnssrv=no
9897 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9898 echo "configure:9899: checking for res_query" >&5
9899 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 /* System header to define __stub macros and hopefully few prototypes,
9906     which can conflict with char res_query(); below.  */
9907 #include <assert.h>
9908 /* Override any gcc2 internal prototype to avoid an error.  */
9909 /* We use char because int might match the return type of a gcc2
9910     builtin and then its argument prototype would still apply.  */
9911 char res_query();
9912 char (*f)();
9913
9914 int main() {
9915
9916 /* The GNU C library defines this for functions which it implements
9917     to always fail with ENOSYS.  Some functions are actually named
9918     something starting with __ and the normal name is an alias.  */
9919 #if defined (__stub_res_query) || defined (__stub___res_query)
9920 choke me
9921 #else
9922 f = res_query;
9923 #endif
9924
9925 ; return 0; }
9926 EOF
9927 if { (eval echo configure:9928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9928   rm -rf conftest*
9929   eval "ac_cv_func_res_query=yes"
9930 else
9931   echo "configure: failed program was:" >&5
9932   cat conftest.$ac_ext >&5
9933   rm -rf conftest*
9934   eval "ac_cv_func_res_query=no"
9935 fi
9936 rm -f conftest*
9937 fi
9938
9939 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9940   echo "$ac_t""yes" 1>&6
9941   :
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945
9946 if test $ac_cv_func_res_query = no ; then 
9947         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9948 echo "configure:9949: checking for __res_query" >&5
9949 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* System header to define __stub macros and hopefully few prototypes,
9956     which can conflict with char __res_query(); below.  */
9957 #include <assert.h>
9958 /* Override any gcc2 internal prototype to avoid an error.  */
9959 /* We use char because int might match the return type of a gcc2
9960     builtin and then its argument prototype would still apply.  */
9961 char __res_query();
9962 char (*f)();
9963
9964 int main() {
9965
9966 /* The GNU C library defines this for functions which it implements
9967     to always fail with ENOSYS.  Some functions are actually named
9968     something starting with __ and the normal name is an alias.  */
9969 #if defined (__stub___res_query) || defined (__stub_____res_query)
9970 choke me
9971 #else
9972 f = __res_query;
9973 #endif
9974
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_func___res_query=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_func___res_query=no"
9985 fi
9986 rm -f conftest*
9987 fi
9988
9989 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9990   echo "$ac_t""yes" 1>&6
9991   :
9992 else
9993   echo "$ac_t""no" 1>&6
9994 fi
9995
9996         ac_cv_func_res_query=$ac_cv_func___res_query
9997 fi
9998
9999 if test $ac_cv_func_res_query = no ; then 
10000         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10001 echo "configure:10002: checking for res_query in -lbind" >&5
10002 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   ac_save_LIBS="$LIBS"
10007 LIBS="-lbind  $LIBS"
10008 cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* Override any gcc2 internal prototype to avoid an error.  */
10012 /* We use char because int might match the return type of a gcc2
10013     builtin and then its argument prototype would still apply.  */
10014 char res_query();
10015
10016 int main() {
10017 res_query()
10018 ; return 0; }
10019 EOF
10020 if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10021   rm -rf conftest*
10022   eval "ac_cv_lib_$ac_lib_var=yes"
10023 else
10024   echo "configure: failed program was:" >&5
10025   cat conftest.$ac_ext >&5
10026   rm -rf conftest*
10027   eval "ac_cv_lib_$ac_lib_var=no"
10028 fi
10029 rm -f conftest*
10030 LIBS="$ac_save_LIBS"
10031
10032 fi
10033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10034   echo "$ac_t""yes" 1>&6
10035     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10037   cat >> confdefs.h <<EOF
10038 #define $ac_tr_lib 1
10039 EOF
10040
10041   LIBS="-lbind $LIBS"
10042
10043 else
10044   echo "$ac_t""no" 1>&6
10045 fi
10046
10047         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10048 fi
10049
10050 if test $ac_cv_func_res_query = no ; then 
10051         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10052 echo "configure:10053: checking for __res_query in -lbind" >&5
10053 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   ac_save_LIBS="$LIBS"
10058 LIBS="-lbind  $LIBS"
10059 cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 /* Override any gcc2 internal prototype to avoid an error.  */
10063 /* We use char because int might match the return type of a gcc2
10064     builtin and then its argument prototype would still apply.  */
10065 char __res_query();
10066
10067 int main() {
10068 __res_query()
10069 ; return 0; }
10070 EOF
10071 if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10072   rm -rf conftest*
10073   eval "ac_cv_lib_$ac_lib_var=yes"
10074 else
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=no"
10079 fi
10080 rm -f conftest*
10081 LIBS="$ac_save_LIBS"
10082
10083 fi
10084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10085   echo "$ac_t""yes" 1>&6
10086     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10088   cat >> confdefs.h <<EOF
10089 #define $ac_tr_lib 1
10090 EOF
10091
10092   LIBS="-lbind $LIBS"
10093
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097
10098         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10099 fi
10100
10101 if test $ac_cv_func_res_query = no ; then 
10102         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10103 echo "configure:10104: checking for res_query in -lresolv" >&5
10104 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   ac_save_LIBS="$LIBS"
10109 LIBS="-lresolv  $LIBS"
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 /* Override any gcc2 internal prototype to avoid an error.  */
10114 /* We use char because int might match the return type of a gcc2
10115     builtin and then its argument prototype would still apply.  */
10116 char res_query();
10117
10118 int main() {
10119 res_query()
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=yes"
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=no"
10130 fi
10131 rm -f conftest*
10132 LIBS="$ac_save_LIBS"
10133
10134 fi
10135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10138     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10139   cat >> confdefs.h <<EOF
10140 #define $ac_tr_lib 1
10141 EOF
10142
10143   LIBS="-lresolv $LIBS"
10144
10145 else
10146   echo "$ac_t""no" 1>&6
10147 fi
10148
10149         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10150 fi
10151
10152 if test $ac_cv_func_res_query = no ; then 
10153         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10154 echo "configure:10155: checking for __res_query in -lresolv" >&5
10155 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10157   echo $ac_n "(cached) $ac_c" 1>&6
10158 else
10159   ac_save_LIBS="$LIBS"
10160 LIBS="-lresolv  $LIBS"
10161 cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 /* Override any gcc2 internal prototype to avoid an error.  */
10165 /* We use char because int might match the return type of a gcc2
10166     builtin and then its argument prototype would still apply.  */
10167 char __res_query();
10168
10169 int main() {
10170 __res_query()
10171 ; return 0; }
10172 EOF
10173 if { (eval echo configure:10174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10174   rm -rf conftest*
10175   eval "ac_cv_lib_$ac_lib_var=yes"
10176 else
10177   echo "configure: failed program was:" >&5
10178   cat conftest.$ac_ext >&5
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=no"
10181 fi
10182 rm -f conftest*
10183 LIBS="$ac_save_LIBS"
10184
10185 fi
10186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10187   echo "$ac_t""yes" 1>&6
10188     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10189     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10190   cat >> confdefs.h <<EOF
10191 #define $ac_tr_lib 1
10192 EOF
10193
10194   LIBS="-lresolv $LIBS"
10195
10196 else
10197   echo "$ac_t""no" 1>&6
10198 fi
10199
10200         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10201 fi
10202
10203 if test "$ac_cv_func_res_query" = yes ; then
10204         cat >> confdefs.h <<\EOF
10205 #define HAVE_RES_QUERY 1
10206 EOF
10207
10208
10209         if test $ol_enable_dnssrv != no ; then
10210                 ol_link_dnssrv=yes
10211         fi
10212 fi
10213
10214 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10215         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10216 fi
10217
10218 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10219 do
10220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10221 echo "configure:10222: checking for $ac_func" >&5
10222 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* System header to define __stub macros and hopefully few prototypes,
10229     which can conflict with char $ac_func(); below.  */
10230 #include <assert.h>
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char $ac_func();
10235 char (*f)();
10236
10237 int main() {
10238
10239 /* The GNU C library defines this for functions which it implements
10240     to always fail with ENOSYS.  Some functions are actually named
10241     something starting with __ and the normal name is an alias.  */
10242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10243 choke me
10244 #else
10245 f = $ac_func;
10246 #endif
10247
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   eval "ac_cv_func_$ac_func=yes"
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_func_$ac_func=no"
10258 fi
10259 rm -f conftest*
10260 fi
10261
10262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10263   echo "$ac_t""yes" 1>&6
10264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10265   cat >> confdefs.h <<EOF
10266 #define $ac_tr_func 1
10267 EOF
10268  
10269 else
10270   echo "$ac_t""no" 1>&6
10271 fi
10272 done
10273
10274
10275 ol_link_ipv6=no
10276 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10277         if test $ol_enable_ipv6 = yes ; then
10278                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10279         fi
10280 elif test $ol_enable_ipv6 != no ; then
10281         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10282 echo "configure:10283: checking INET6_ADDRSTRLEN" >&5
10283 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10284   echo $ac_n "(cached) $ac_c" 1>&6
10285 else
10286   
10287                 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290
10291 #                       include <netinet/in.h>
10292 #                       ifdef INET6_ADDRSTRLEN
10293                                 __has_inet6_addrstrlen__;
10294 #                       endif
10295                 
10296 EOF
10297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10298   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10299   rm -rf conftest*
10300   ol_cv_inet6_addrstrlen=yes
10301 else
10302   rm -rf conftest*
10303   ol_cv_inet6_addrstrlen=no
10304 fi
10305 rm -f conftest*
10306
10307 fi
10308
10309 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10310
10311
10312         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10313 echo "configure:10314: checking struct sockaddr_storage" >&5
10314 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   
10318                 cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321
10322 #include <sys/types.h>
10323 #include <sys/socket.h>
10324
10325 int main() {
10326
10327                         struct sockaddr_storage ss;
10328
10329 ; return 0; }
10330 EOF
10331 if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10332   rm -rf conftest*
10333   ol_cv_struct_sockaddr_storage=yes
10334 else
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   ol_cv_struct_sockaddr_storage=no
10339 fi
10340 rm -f conftest*
10341 fi
10342
10343 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10344
10345         if test $ol_cv_inet6_addrstrlen = yes \
10346                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10347                 ol_link_ipv6=yes
10348         elif test $ol_enable_ipv6 = yes \
10349                         -a $ol_cv_inet6_addrstrlen = no ; then
10350                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10351         elif test $ol_enable_ipv6 = yes \
10352                         -a $ol_cv_struct_sockaddr_storage = no ; then
10353                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10354         fi
10355 fi
10356
10357 if test $ol_enable_local != no ; then
10358         for ac_hdr in sys/un.h 
10359 do
10360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10362 echo "configure:10363: checking for $ac_hdr" >&5
10363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10364   echo $ac_n "(cached) $ac_c" 1>&6
10365 else
10366   cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 #include <$ac_hdr>
10370 EOF
10371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10372 { (eval echo configure:10373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10374 if test -z "$ac_err"; then
10375   rm -rf conftest*
10376   eval "ac_cv_header_$ac_safe=yes"
10377 else
10378   echo "$ac_err" >&5
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   eval "ac_cv_header_$ac_safe=no"
10383 fi
10384 rm -f conftest*
10385 fi
10386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10387   echo "$ac_t""yes" 1>&6
10388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10389   cat >> confdefs.h <<EOF
10390 #define $ac_tr_hdr 1
10391 EOF
10392  
10393 else
10394   echo "$ac_t""no" 1>&6
10395 fi
10396 done
10397
10398
10399         if test $ol_enable_local = auto ; then
10400                 ol_enable_local=$ac_cv_header_sys_un_h
10401         elif test $ac_cv_header_sys_un_h = no ; then
10402                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10403         fi
10404 fi
10405
10406 ol_link_kbind=no
10407 ol_link_kpasswd=no
10408 ol_link_krb5=no
10409 ol_link_krb4=no
10410
10411 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10412         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10413         -o $ol_with_kerberos = k425 ; then
10414
10415         for ac_hdr in krb5.h
10416 do
10417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10419 echo "configure:10420: checking for $ac_hdr" >&5
10420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <$ac_hdr>
10427 EOF
10428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10429 { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10431 if test -z "$ac_err"; then
10432   rm -rf conftest*
10433   eval "ac_cv_header_$ac_safe=yes"
10434 else
10435   echo "$ac_err" >&5
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_header_$ac_safe=no"
10440 fi
10441 rm -f conftest*
10442 fi
10443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10446   cat >> confdefs.h <<EOF
10447 #define $ac_tr_hdr 1
10448 EOF
10449  
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453 done
10454
10455
10456         if test $ac_cv_header_krb5_h = yes ; then
10457                                 for ac_hdr in heim_err.h
10458 do
10459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10461 echo "configure:10462: checking for $ac_hdr" >&5
10462 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10463   echo $ac_n "(cached) $ac_c" 1>&6
10464 else
10465   cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468 #include <$ac_hdr>
10469 EOF
10470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10471 { (eval echo configure:10472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10473 if test -z "$ac_err"; then
10474   rm -rf conftest*
10475   eval "ac_cv_header_$ac_safe=yes"
10476 else
10477   echo "$ac_err" >&5
10478   echo "configure: failed program was:" >&5
10479   cat conftest.$ac_ext >&5
10480   rm -rf conftest*
10481   eval "ac_cv_header_$ac_safe=no"
10482 fi
10483 rm -f conftest*
10484 fi
10485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10488   cat >> confdefs.h <<EOF
10489 #define $ac_tr_hdr 1
10490 EOF
10491  
10492 else
10493   echo "$ac_t""no" 1>&6
10494 fi
10495 done
10496
10497                 if test $ac_cv_header_heim_err_h = yes ; then
10498                         krb5_impl=heimdal
10499                 else
10500                         krb5_impl=mit
10501                 fi
10502
10503                 if test $krb5_impl = mit; then
10504                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10505 echo "configure:10506: checking for main in -lk5crypto" >&5
10506 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10508   echo $ac_n "(cached) $ac_c" 1>&6
10509 else
10510   ac_save_LIBS="$LIBS"
10511 LIBS="-lk5crypto  $LIBS"
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515
10516 int main() {
10517 main()
10518 ; return 0; }
10519 EOF
10520 if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10521   rm -rf conftest*
10522   eval "ac_cv_lib_$ac_lib_var=yes"
10523 else
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=no"
10528 fi
10529 rm -f conftest*
10530 LIBS="$ac_save_LIBS"
10531
10532 fi
10533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535   krb5crypto=k5crypto
10536 else
10537   echo "$ac_t""no" 1>&6
10538 krb5crypto=crypto
10539 fi
10540
10541
10542                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10543 echo "configure:10544: checking for main in -lkrb5" >&5
10544 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10546   echo $ac_n "(cached) $ac_c" 1>&6
10547 else
10548   ac_save_LIBS="$LIBS"
10549 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553
10554 int main() {
10555 main()
10556 ; return 0; }
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10559   rm -rf conftest*
10560   eval "ac_cv_lib_$ac_lib_var=yes"
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=no"
10566 fi
10567 rm -f conftest*
10568 LIBS="$ac_save_LIBS"
10569
10570 fi
10571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10572   echo "$ac_t""yes" 1>&6
10573   have_krb5=yes
10574                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10575 else
10576   echo "$ac_t""no" 1>&6
10577 have_krb5=no
10578 fi
10579
10580
10581                 elif test $krb5_impl = heimdal; then
10582                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10583 echo "configure:10584: checking for main in -ldes" >&5
10584 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   ac_save_LIBS="$LIBS"
10589 LIBS="-ldes  $LIBS"
10590 cat > conftest.$ac_ext <<EOF
10591 #line 10592 "configure"
10592 #include "confdefs.h"
10593
10594 int main() {
10595 main()
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=yes"
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=no"
10606 fi
10607 rm -f conftest*
10608 LIBS="$ac_save_LIBS"
10609
10610 fi
10611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613   krb5crypto=des
10614 else
10615   echo "$ac_t""no" 1>&6
10616 krb5crypto=crypto
10617 fi
10618
10619
10620                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10621 echo "configure:10622: checking for main in -lkrb5" >&5
10622 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   ac_save_LIBS="$LIBS"
10627 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10628 cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631
10632 int main() {
10633 main()
10634 ; return 0; }
10635 EOF
10636 if { (eval echo configure:10637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10637   rm -rf conftest*
10638   eval "ac_cv_lib_$ac_lib_var=yes"
10639 else
10640   echo "configure: failed program was:" >&5
10641   cat conftest.$ac_ext >&5
10642   rm -rf conftest*
10643   eval "ac_cv_lib_$ac_lib_var=no"
10644 fi
10645 rm -f conftest*
10646 LIBS="$ac_save_LIBS"
10647
10648 fi
10649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10650   echo "$ac_t""yes" 1>&6
10651   have_krb5=yes
10652                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10653 else
10654   echo "$ac_t""no" 1>&6
10655 have_krb5=no
10656 fi
10657
10658
10659                         cat >> confdefs.h <<\EOF
10660 #define HAVE_HEIMDAL_KERBEROS 1
10661 EOF
10662
10663
10664                 else
10665                         have_krb5=no
10666                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10667                 fi
10668
10669                 if test $have_krb5 = yes ; then
10670                         ol_link_krb5=yes
10671
10672                         cat >> confdefs.h <<\EOF
10673 #define HAVE_KRB5 1
10674 EOF
10675
10676
10677                         if test $ol_enable_kpasswd != no ; then
10678                                 ol_link_kpasswd=yes;
10679                         fi
10680
10681                         if test $ol_with_kerberos = k5only ; then
10682                                 ol_with_kerberos=found
10683                         fi
10684
10685                 elif test $ol_with_kerberos != auto ; then
10686                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10687                 fi
10688
10689         fi
10690 fi
10691
10692 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10693         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10694
10695         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10696 do
10697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10699 echo "configure:10700: checking for $ac_hdr" >&5
10700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706 #include <$ac_hdr>
10707 EOF
10708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10709 { (eval echo configure:10710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10711 if test -z "$ac_err"; then
10712   rm -rf conftest*
10713   eval "ac_cv_header_$ac_safe=yes"
10714 else
10715   echo "$ac_err" >&5
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_header_$ac_safe=no"
10720 fi
10721 rm -f conftest*
10722 fi
10723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10726   cat >> confdefs.h <<EOF
10727 #define $ac_tr_hdr 1
10728 EOF
10729  
10730 else
10731   echo "$ac_t""no" 1>&6
10732 fi
10733 done
10734
10735
10736         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10737                 if test $krb5_impl = mit; then
10738                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10739 echo "configure:10740: checking for main in -lkrb4" >&5
10740 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   ac_save_LIBS="$LIBS"
10745 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10746 cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749
10750 int main() {
10751 main()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 LIBS="$ac_save_LIBS"
10765
10766 fi
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10768   echo "$ac_t""yes" 1>&6
10769   have_k425=yes
10770                                 KRB4_LIBS="-lkrb4 -ldes425"
10771 else
10772   echo "$ac_t""no" 1>&6
10773 have_k425=no
10774 fi
10775
10776
10777                 elif test $krb5_impl = heimdal; then
10778                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10779 echo "configure:10780: checking for main in -lkrb4" >&5
10780 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10782   echo $ac_n "(cached) $ac_c" 1>&6
10783 else
10784   ac_save_LIBS="$LIBS"
10785 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789
10790 int main() {
10791 main()
10792 ; return 0; }
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=yes"
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -rf conftest*
10801   eval "ac_cv_lib_$ac_lib_var=no"
10802 fi
10803 rm -f conftest*
10804 LIBS="$ac_save_LIBS"
10805
10806 fi
10807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10808   echo "$ac_t""yes" 1>&6
10809   have_k425=yes
10810                                 KRB4_LIBS="-lkrb4"
10811 else
10812   echo "$ac_t""no" 1>&6
10813 have_k425=no
10814 fi
10815
10816
10817                 else
10818                         have_425=no
10819                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10820                 fi
10821
10822                 if test $have_k425 = yes ; then
10823                         ol_with_kerberos=found
10824                         ol_link_krb4=yes
10825
10826                         cat >> confdefs.h <<\EOF
10827 #define HAVE_KRB425 1
10828 EOF
10829
10830                         cat >> confdefs.h <<\EOF
10831 #define HAVE_KRB4 1
10832 EOF
10833
10834
10835                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10836 echo "configure:10837: checking for des_debug in Kerberos libraries" >&5
10837 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   
10841                                                                 save_LIBS="$LIBS"
10842                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10843                                 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846
10847 #include <kerberosIV/krb.h>
10848 #include <kerberosIV/des.h>
10849 extern int des_debug;
10850
10851 int main() {
10852
10853 des_debug = 1;
10854
10855 ; return 0; }
10856 EOF
10857 if { (eval echo configure:10858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10858   rm -rf conftest*
10859   ol_cv_var_des_debug=yes
10860 else
10861   echo "configure: failed program was:" >&5
10862   cat conftest.$ac_ext >&5
10863   rm -rf conftest*
10864   ol_cv_var_des_debug=no
10865 fi
10866 rm -f conftest*
10867                                                                 LIBS="$save_LIBS"
10868                         
10869 fi
10870
10871 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10872
10873                         if test $ol_cv_var_des_debug = yes ; then
10874                                 cat >> confdefs.h <<\EOF
10875 #define HAVE_DES_DEBUG 1
10876 EOF
10877
10878                         fi
10879
10880                         LIBS="$save_LIBS"
10881                 fi
10882         fi
10883 fi
10884
10885 if test $ol_link_krb5 = yes ; then
10886         ol_with_kerberos=found
10887 fi
10888
10889 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10890         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10891
10892         for ac_hdr in krb.h des.h krb-archaeology.h 
10893 do
10894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10896 echo "configure:10897: checking for $ac_hdr" >&5
10897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 #include <$ac_hdr>
10904 EOF
10905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10906 { (eval echo configure:10907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10908 if test -z "$ac_err"; then
10909   rm -rf conftest*
10910   eval "ac_cv_header_$ac_safe=yes"
10911 else
10912   echo "$ac_err" >&5
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_header_$ac_safe=no"
10917 fi
10918 rm -f conftest*
10919 fi
10920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10921   echo "$ac_t""yes" 1>&6
10922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10923   cat >> confdefs.h <<EOF
10924 #define $ac_tr_hdr 1
10925 EOF
10926  
10927 else
10928   echo "$ac_t""no" 1>&6
10929 fi
10930 done
10931
10932
10933         if test $ac_cv_header_krb_h = yes ; then
10934                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10935 echo "configure:10936: checking for main in -lkrb" >&5
10936 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10937 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   ac_save_LIBS="$LIBS"
10941 LIBS="-lkrb -ldes $LIBS"
10942 cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945
10946 int main() {
10947 main()
10948 ; return 0; }
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10951   rm -rf conftest*
10952   eval "ac_cv_lib_$ac_lib_var=yes"
10953 else
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -rf conftest*
10957   eval "ac_cv_lib_$ac_lib_var=no"
10958 fi
10959 rm -f conftest*
10960 LIBS="$ac_save_LIBS"
10961
10962 fi
10963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965   have_k4=yes
10966 else
10967   echo "$ac_t""no" 1>&6
10968 have_k4=no
10969 fi
10970
10971
10972                 if test $have_k4 = yes ; then
10973                         ol_with_kerberos=found
10974                         ol_link_krb4=yes
10975
10976                         cat >> confdefs.h <<\EOF
10977 #define HAVE_KRB4 1
10978 EOF
10979
10980
10981                         KRB4_LIBS="-lkrb -ldes"
10982
10983                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10984                                 cat >> confdefs.h <<\EOF
10985 #define HAVE_KTH_KERBEROS 1
10986 EOF
10987
10988                         fi
10989                 fi
10990         fi
10991 fi
10992
10993 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10994         ol_link_kpasswd=yes
10995 fi
10996
10997 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10998         ol_link_kbind=yes
10999
11000 elif test $ol_enable_kbind = yes ; then
11001         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11002 fi
11003
11004 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11005         cat >> confdefs.h <<\EOF
11006 #define HAVE_KERBEROS 1
11007 EOF
11008
11009
11010 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11011         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11012 fi
11013
11014 ol_link_tls=no
11015 if test $ol_with_tls != no ; then
11016         for ac_hdr in openssl/ssl.h ssl.h
11017 do
11018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11020 echo "configure:11021: checking for $ac_hdr" >&5
11021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 #include <$ac_hdr>
11028 EOF
11029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11030 { (eval echo configure:11031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11032 if test -z "$ac_err"; then
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=yes"
11035 else
11036   echo "$ac_err" >&5
11037   echo "configure: failed program was:" >&5
11038   cat conftest.$ac_ext >&5
11039   rm -rf conftest*
11040   eval "ac_cv_header_$ac_safe=no"
11041 fi
11042 rm -f conftest*
11043 fi
11044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11045   echo "$ac_t""yes" 1>&6
11046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11047   cat >> confdefs.h <<EOF
11048 #define $ac_tr_hdr 1
11049 EOF
11050  
11051 else
11052   echo "$ac_t""no" 1>&6
11053 fi
11054 done
11055
11056         
11057         if test $ac_cv_header_openssl_ssl_h = yes \
11058                 -o $ac_cv_header_ssl_h = yes ; then
11059                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11060 echo "configure:11061: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11061 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11063   echo $ac_n "(cached) $ac_c" 1>&6
11064 else
11065   ac_save_LIBS="$LIBS"
11066 LIBS="-lssl -lcrypto $LIBS"
11067 cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 /* Override any gcc2 internal prototype to avoid an error.  */
11071 /* We use char because int might match the return type of a gcc2
11072     builtin and then its argument prototype would still apply.  */
11073 char SSLeay_add_ssl_algorithms();
11074
11075 int main() {
11076 SSLeay_add_ssl_algorithms()
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11080   rm -rf conftest*
11081   eval "ac_cv_lib_$ac_lib_var=yes"
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=no"
11087 fi
11088 rm -f conftest*
11089 LIBS="$ac_save_LIBS"
11090
11091 fi
11092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11093   echo "$ac_t""yes" 1>&6
11094   have_ssleay=yes
11095                         need_rsaref=no
11096 else
11097   echo "$ac_t""no" 1>&6
11098 have_ssleay=no
11099 fi
11100
11101                         
11102                 if test $have_ssleay = no ; then
11103                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11104 echo "configure:11105: checking for SSL_library_init in -lssl" >&5
11105 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   ac_save_LIBS="$LIBS"
11110 LIBS="-lssl -lcrypto $LIBS"
11111 cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char SSL_library_init();
11118
11119 int main() {
11120 SSL_library_init()
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=no"
11131 fi
11132 rm -f conftest*
11133 LIBS="$ac_save_LIBS"
11134
11135 fi
11136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   have_ssleay=yes
11139                                 need_rsaref=no
11140 else
11141   echo "$ac_t""no" 1>&6
11142 have_ssleay=no
11143 fi
11144
11145                 fi
11146
11147                 if test $have_ssleay = no ; then
11148                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11149 echo "configure:11150: checking for ssl3_accept in -lssl" >&5
11150 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11152   echo $ac_n "(cached) $ac_c" 1>&6
11153 else
11154   ac_save_LIBS="$LIBS"
11155 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11156 cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 /* Override any gcc2 internal prototype to avoid an error.  */
11160 /* We use char because int might match the return type of a gcc2
11161     builtin and then its argument prototype would still apply.  */
11162 char ssl3_accept();
11163
11164 int main() {
11165 ssl3_accept()
11166 ; return 0; }
11167 EOF
11168 if { (eval echo configure:11169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11169   rm -rf conftest*
11170   eval "ac_cv_lib_$ac_lib_var=yes"
11171 else
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=no"
11176 fi
11177 rm -f conftest*
11178 LIBS="$ac_save_LIBS"
11179
11180 fi
11181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11182   echo "$ac_t""yes" 1>&6
11183   have_ssleay=yes
11184                                 need_rsaref=yes
11185 else
11186   echo "$ac_t""no" 1>&6
11187 have_ssleay=no
11188 fi
11189
11190                 fi
11191
11192                 if test $have_ssleay = yes ; then
11193                         ol_with_tls=found
11194                         ol_link_tls=yes
11195
11196                         cat >> confdefs.h <<\EOF
11197 #define HAVE_SSLEAY 1
11198 EOF
11199
11200
11201                         if test $need_rsaref = yes; then
11202                                 cat >> confdefs.h <<\EOF
11203 #define HAVE_RSAREF 1
11204 EOF
11205
11206
11207                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11208                         else
11209                                 TLS_LIBS="-lssl -lcrypto"
11210                         fi
11211                 fi
11212         fi
11213
11214 else
11215         echo "configure: warning: TLS data protection not supported!" 1>&2
11216 fi
11217
11218 WITH_TLS=no
11219 if test $ol_link_tls = yes ; then
11220         cat >> confdefs.h <<\EOF
11221 #define HAVE_TLS 1
11222 EOF
11223
11224         WITH_TLS=yes
11225
11226 elif test $ol_with_tls = auto ; then
11227         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11228         echo "configure: warning: TLS data protection not supported!" 1>&2
11229
11230 elif test $ol_with_tls != no ; then
11231         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11232 fi
11233
11234 if test $ol_enable_lmpasswd != no; then
11235         if test $ol_link_tls != yes ; then
11236                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11237         fi
11238
11239         cat >> confdefs.h <<\EOF
11240 #define SLAPD_LMHASH 1
11241 EOF
11242
11243 fi
11244
11245 ol_link_threads=no
11246
11247 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11248         -o $ol_with_threads = nt ; then
11249
11250         
11251         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11252 echo "configure:11253: checking for _beginthread" >&5
11253 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11254   echo $ac_n "(cached) $ac_c" 1>&6
11255 else
11256   cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 /* System header to define __stub macros and hopefully few prototypes,
11260     which can conflict with char _beginthread(); below.  */
11261 #include <assert.h>
11262 /* Override any gcc2 internal prototype to avoid an error.  */
11263 /* We use char because int might match the return type of a gcc2
11264     builtin and then its argument prototype would still apply.  */
11265 char _beginthread();
11266 char (*f)();
11267
11268 int main() {
11269
11270 /* The GNU C library defines this for functions which it implements
11271     to always fail with ENOSYS.  Some functions are actually named
11272     something starting with __ and the normal name is an alias.  */
11273 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11274 choke me
11275 #else
11276 f = _beginthread;
11277 #endif
11278
11279 ; return 0; }
11280 EOF
11281 if { (eval echo configure:11282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11282   rm -rf conftest*
11283   eval "ac_cv_func__beginthread=yes"
11284 else
11285   echo "configure: failed program was:" >&5
11286   cat conftest.$ac_ext >&5
11287   rm -rf conftest*
11288   eval "ac_cv_func__beginthread=no"
11289 fi
11290 rm -f conftest*
11291 fi
11292
11293 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11294   echo "$ac_t""yes" 1>&6
11295   :
11296 else
11297   echo "$ac_t""no" 1>&6
11298 fi
11299
11300
11301         if test $ac_cv_func__beginthread = yes ; then
11302                 cat >> confdefs.h <<\EOF
11303 #define HAVE_NT_THREADS 1
11304 EOF
11305
11306                 ol_cv_nt_threads=yes
11307         fi
11308
11309
11310         if test "$ol_cv_nt_threads" = yes ; then
11311                 ol_link_threads=nt
11312                 ol_with_threads=found
11313                 ol_with_yielding_select=yes
11314
11315                 cat >> confdefs.h <<\EOF
11316 #define HAVE_NT_SERVICE_MANAGER 1
11317 EOF
11318
11319                 cat >> confdefs.h <<\EOF
11320 #define HAVE_NT_EVENT_LOG 1
11321 EOF
11322
11323         fi
11324
11325         if test $ol_with_threads = nt ; then
11326                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11327         fi
11328 fi
11329
11330 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11331         -o $ol_with_threads = posix ; then
11332
11333         for ac_hdr in pthread.h
11334 do
11335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11337 echo "configure:11338: checking for $ac_hdr" >&5
11338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11339   echo $ac_n "(cached) $ac_c" 1>&6
11340 else
11341   cat > conftest.$ac_ext <<EOF
11342 #line 11343 "configure"
11343 #include "confdefs.h"
11344 #include <$ac_hdr>
11345 EOF
11346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11347 { (eval echo configure:11348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11349 if test -z "$ac_err"; then
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=yes"
11352 else
11353   echo "$ac_err" >&5
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=no"
11358 fi
11359 rm -f conftest*
11360 fi
11361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11362   echo "$ac_t""yes" 1>&6
11363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11364   cat >> confdefs.h <<EOF
11365 #define $ac_tr_hdr 1
11366 EOF
11367  
11368 else
11369   echo "$ac_t""no" 1>&6
11370 fi
11371 done
11372
11373
11374         if test $ac_cv_header_pthread_h = yes ; then
11375                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11376 echo "configure:11377: checking POSIX thread version" >&5
11377 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11378   echo $ac_n "(cached) $ac_c" 1>&6
11379 else
11380   
11381         cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384
11385 #               include <pthread.h>
11386         
11387 int main() {
11388
11389                 int i = PTHREAD_CREATE_JOINABLE;
11390         
11391 ; return 0; }
11392 EOF
11393 if { (eval echo configure:11394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11394   rm -rf conftest*
11395   
11396         cat > conftest.$ac_ext <<EOF
11397 #line 11398 "configure"
11398 #include "confdefs.h"
11399 #include <pthread.h>
11400 EOF
11401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11402   egrep "pthread_detach" >/dev/null 2>&1; then
11403   rm -rf conftest*
11404   ol_cv_pthread_version=10
11405 else
11406   rm -rf conftest*
11407   ol_cv_pthread_version=8
11408 fi
11409 rm -f conftest*
11410
11411 else
11412   echo "configure: failed program was:" >&5
11413   cat conftest.$ac_ext >&5
11414   rm -rf conftest*
11415   
11416         cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419
11420 #               include <pthread.h>
11421 #               ifdef PTHREAD_CREATE_UNDETACHED
11422                 draft7
11423 #               endif
11424         
11425 EOF
11426 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11427   egrep "draft7" >/dev/null 2>&1; then
11428   rm -rf conftest*
11429   ol_cv_pthread_version=7
11430 else
11431   rm -rf conftest*
11432   
11433         cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436 #include <pthread.h>
11437 EOF
11438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11439   egrep "pthread_attr_init" >/dev/null 2>&1; then
11440   rm -rf conftest*
11441   ol_cv_pthread_version=6
11442 else
11443   rm -rf conftest*
11444   
11445         cat > conftest.$ac_ext <<EOF
11446 #line 11447 "configure"
11447 #include "confdefs.h"
11448
11449 #               include <pthread.h>
11450 #ifdef          PTHREAD_MUTEX_INITIALIZER
11451                 draft5
11452 #endif
11453         
11454 EOF
11455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11456   egrep "draft5" >/dev/null 2>&1; then
11457   rm -rf conftest*
11458   ol_cv_pthread_version=5
11459 else
11460   rm -rf conftest*
11461   ol_cv_pthread_version=4
11462 fi
11463 rm -f conftest*
11464  
11465 fi
11466 rm -f conftest*
11467  
11468 fi
11469 rm -f conftest*
11470  
11471 fi
11472 rm -f conftest*
11473
11474 fi
11475
11476 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11477
11478
11479                 if test $ol_cv_pthread_version != 0 ; then
11480                         cat >> confdefs.h <<EOF
11481 #define HAVE_PTHREADS $ol_cv_pthread_version
11482 EOF
11483
11484                 else
11485                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11486                 fi
11487
11488                 # consider threads found
11489                 ol_with_threads=found
11490
11491                 
11492         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11493 echo "configure:11494: checking for LinuxThreads pthread.h" >&5
11494 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11495   echo $ac_n "(cached) $ac_c" 1>&6
11496 else
11497   cat > conftest.$ac_ext <<EOF
11498 #line 11499 "configure"
11499 #include "confdefs.h"
11500 #include <pthread.h>
11501 EOF
11502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11503   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11504   rm -rf conftest*
11505   ol_cv_header_linux_threads=yes
11506 else
11507   rm -rf conftest*
11508   ol_cv_header_linux_threads=no
11509 fi
11510 rm -f conftest*
11511
11512                 
11513 fi
11514
11515 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11516         if test $ol_cv_header_linux_threads = yes; then
11517                 cat >> confdefs.h <<\EOF
11518 #define HAVE_LINUX_THREADS 1
11519 EOF
11520
11521         fi
11522
11523                 
11524         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11525 echo "configure:11526: checking for GNU Pth pthread.h" >&5
11526 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11527   echo $ac_n "(cached) $ac_c" 1>&6
11528 else
11529   cat > conftest.$ac_ext <<EOF
11530 #line 11531 "configure"
11531 #include "confdefs.h"
11532 #include <pthread.h>
11533 #ifdef _POSIX_THREAD_IS_GNU_PTH
11534         __gnu_pth__;
11535 #endif
11536
11537 EOF
11538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11539   egrep "__gnu_pth__" >/dev/null 2>&1; then
11540   rm -rf conftest*
11541   ol_cv_header_gnu_pth_pthread_h=yes
11542 else
11543   rm -rf conftest*
11544   ol_cv_header_gnu_pth_pthread_h=no
11545 fi
11546 rm -f conftest*
11547
11548                 
11549 fi
11550
11551 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11552
11553
11554                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11555                         for ac_hdr in sched.h
11556 do
11557 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11558 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11559 echo "configure:11560: checking for $ac_hdr" >&5
11560 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 #include <$ac_hdr>
11567 EOF
11568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11569 { (eval echo configure:11570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11571 if test -z "$ac_err"; then
11572   rm -rf conftest*
11573   eval "ac_cv_header_$ac_safe=yes"
11574 else
11575   echo "$ac_err" >&5
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_header_$ac_safe=no"
11580 fi
11581 rm -f conftest*
11582 fi
11583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11584   echo "$ac_t""yes" 1>&6
11585     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11586   cat >> confdefs.h <<EOF
11587 #define $ac_tr_hdr 1
11588 EOF
11589  
11590 else
11591   echo "$ac_t""no" 1>&6
11592 fi
11593 done
11594
11595                 fi
11596
11597                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11598                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11599 echo "configure:11600: checking for pthread_create in default libraries" >&5
11600 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11601   echo $ac_n "(cached) $ac_c" 1>&6
11602 else
11603   
11604                 if test "$cross_compiling" = yes; then
11605   cat > conftest.$ac_ext <<EOF
11606 #line 11607 "configure"
11607 #include "confdefs.h"
11608 /* pthread test headers */
11609 #include <pthread.h>
11610 #if HAVE_PTHREADS < 7
11611 #include <errno.h>
11612 #endif
11613 #ifndef NULL
11614 #define NULL (void*)0
11615 #endif
11616
11617 static void *task(p)
11618         void *p;
11619 {
11620         return (void *) (p == NULL);
11621 }
11622
11623 int main() {
11624
11625         /* pthread test function */
11626 #ifndef PTHREAD_CREATE_DETACHED
11627 #define PTHREAD_CREATE_DETACHED 1
11628 #endif
11629         pthread_t t;
11630         int status;
11631         int detach = PTHREAD_CREATE_DETACHED;
11632
11633 #if HAVE_PTHREADS > 4
11634         /* Final pthreads */
11635         pthread_attr_t attr;
11636
11637         status = pthread_attr_init(&attr);
11638         if( status ) return status;
11639
11640 #if HAVE_PTHREADS < 7
11641         status = pthread_attr_setdetachstate(&attr, &detach);
11642         if( status < 0 ) status = errno;
11643 #else
11644         status = pthread_attr_setdetachstate(&attr, detach);
11645 #endif
11646         if( status ) return status;
11647         status = pthread_create( &t, &attr, task, NULL );
11648 #if HAVE_PTHREADS < 7
11649         if( status < 0 ) status = errno;
11650 #endif
11651         if( status ) return status;
11652 #else
11653         /* Draft 4 pthreads */
11654         status = pthread_create( &t, pthread_attr_default, task, NULL );
11655         if( status ) return errno;
11656
11657         /* give thread a chance to complete */
11658         /* it should remain joinable and hence detachable */
11659         sleep( 1 );
11660
11661         status = pthread_detach( &t );
11662         if( status ) return errno;
11663 #endif
11664
11665 #ifdef HAVE_LINUX_THREADS
11666         pthread_kill_other_threads_np();
11667 #endif
11668
11669         return 0;
11670
11671 ; return 0; }
11672 EOF
11673 if { (eval echo configure:11674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11674   rm -rf conftest*
11675   ol_cv_pthread_create=yes
11676 else
11677   echo "configure: failed program was:" >&5
11678   cat conftest.$ac_ext >&5
11679   rm -rf conftest*
11680   ol_cv_pthread_create=no
11681 fi
11682 rm -f conftest*
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 /* pthread test headers */
11688 #include <pthread.h>
11689 #if HAVE_PTHREADS < 7
11690 #include <errno.h>
11691 #endif
11692 #ifndef NULL
11693 #define NULL (void*)0
11694 #endif
11695
11696 static void *task(p)
11697         void *p;
11698 {
11699         return (void *) (p == NULL);
11700 }
11701
11702
11703 int main(argc, argv)
11704         int argc;
11705         char **argv;
11706 {
11707
11708         /* pthread test function */
11709 #ifndef PTHREAD_CREATE_DETACHED
11710 #define PTHREAD_CREATE_DETACHED 1
11711 #endif
11712         pthread_t t;
11713         int status;
11714         int detach = PTHREAD_CREATE_DETACHED;
11715
11716 #if HAVE_PTHREADS > 4
11717         /* Final pthreads */
11718         pthread_attr_t attr;
11719
11720         status = pthread_attr_init(&attr);
11721         if( status ) return status;
11722
11723 #if HAVE_PTHREADS < 7
11724         status = pthread_attr_setdetachstate(&attr, &detach);
11725         if( status < 0 ) status = errno;
11726 #else
11727         status = pthread_attr_setdetachstate(&attr, detach);
11728 #endif
11729         if( status ) return status;
11730         status = pthread_create( &t, &attr, task, NULL );
11731 #if HAVE_PTHREADS < 7
11732         if( status < 0 ) status = errno;
11733 #endif
11734         if( status ) return status;
11735 #else
11736         /* Draft 4 pthreads */
11737         status = pthread_create( &t, pthread_attr_default, task, NULL );
11738         if( status ) return errno;
11739
11740         /* give thread a chance to complete */
11741         /* it should remain joinable and hence detachable */
11742         sleep( 1 );
11743
11744         status = pthread_detach( &t );
11745         if( status ) return errno;
11746 #endif
11747
11748 #ifdef HAVE_LINUX_THREADS
11749         pthread_kill_other_threads_np();
11750 #endif
11751
11752         return 0;
11753
11754 }
11755
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11758 then
11759   ol_cv_pthread_create=yes
11760 else
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -fr conftest*
11764   ol_cv_pthread_create=no
11765 fi
11766 rm -fr conftest*
11767 fi
11768
11769 fi
11770
11771 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11772
11773                 if test $ol_cv_pthread_create != no ; then
11774                         ol_link_threads=posix
11775                         ol_link_pthreads=""
11776                 fi
11777                 
11778                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11779 if test "$ol_link_threads" = no ; then
11780         # try -kthread
11781         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11782 echo "configure:11783: checking for pthread link with -kthread" >&5
11783 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11784   echo $ac_n "(cached) $ac_c" 1>&6
11785 else
11786   
11787                 # save the flags
11788                 ol_LIBS="$LIBS"
11789                 LIBS="-kthread $LIBS"
11790
11791                 if test "$cross_compiling" = yes; then
11792   cat > conftest.$ac_ext <<EOF
11793 #line 11794 "configure"
11794 #include "confdefs.h"
11795 /* pthread test headers */
11796 #include <pthread.h>
11797 #if HAVE_PTHREADS < 7
11798 #include <errno.h>
11799 #endif
11800 #ifndef NULL
11801 #define NULL (void*)0
11802 #endif
11803
11804 static void *task(p)
11805         void *p;
11806 {
11807         return (void *) (p == NULL);
11808 }
11809
11810 int main() {
11811
11812         /* pthread test function */
11813 #ifndef PTHREAD_CREATE_DETACHED
11814 #define PTHREAD_CREATE_DETACHED 1
11815 #endif
11816         pthread_t t;
11817         int status;
11818         int detach = PTHREAD_CREATE_DETACHED;
11819
11820 #if HAVE_PTHREADS > 4
11821         /* Final pthreads */
11822         pthread_attr_t attr;
11823
11824         status = pthread_attr_init(&attr);
11825         if( status ) return status;
11826
11827 #if HAVE_PTHREADS < 7
11828         status = pthread_attr_setdetachstate(&attr, &detach);
11829         if( status < 0 ) status = errno;
11830 #else
11831         status = pthread_attr_setdetachstate(&attr, detach);
11832 #endif
11833         if( status ) return status;
11834         status = pthread_create( &t, &attr, task, NULL );
11835 #if HAVE_PTHREADS < 7
11836         if( status < 0 ) status = errno;
11837 #endif
11838         if( status ) return status;
11839 #else
11840         /* Draft 4 pthreads */
11841         status = pthread_create( &t, pthread_attr_default, task, NULL );
11842         if( status ) return errno;
11843
11844         /* give thread a chance to complete */
11845         /* it should remain joinable and hence detachable */
11846         sleep( 1 );
11847
11848         status = pthread_detach( &t );
11849         if( status ) return errno;
11850 #endif
11851
11852 #ifdef HAVE_LINUX_THREADS
11853         pthread_kill_other_threads_np();
11854 #endif
11855
11856         return 0;
11857
11858 ; return 0; }
11859 EOF
11860 if { (eval echo configure:11861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11861   rm -rf conftest*
11862   ol_cv_pthread_kthread=yes
11863 else
11864   echo "configure: failed program was:" >&5
11865   cat conftest.$ac_ext >&5
11866   rm -rf conftest*
11867   ol_cv_pthread_kthread=no
11868 fi
11869 rm -f conftest*
11870 else
11871   cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874 /* pthread test headers */
11875 #include <pthread.h>
11876 #if HAVE_PTHREADS < 7
11877 #include <errno.h>
11878 #endif
11879 #ifndef NULL
11880 #define NULL (void*)0
11881 #endif
11882
11883 static void *task(p)
11884         void *p;
11885 {
11886         return (void *) (p == NULL);
11887 }
11888
11889
11890 int main(argc, argv)
11891         int argc;
11892         char **argv;
11893 {
11894
11895         /* pthread test function */
11896 #ifndef PTHREAD_CREATE_DETACHED
11897 #define PTHREAD_CREATE_DETACHED 1
11898 #endif
11899         pthread_t t;
11900         int status;
11901         int detach = PTHREAD_CREATE_DETACHED;
11902
11903 #if HAVE_PTHREADS > 4
11904         /* Final pthreads */
11905         pthread_attr_t attr;
11906
11907         status = pthread_attr_init(&attr);
11908         if( status ) return status;
11909
11910 #if HAVE_PTHREADS < 7
11911         status = pthread_attr_setdetachstate(&attr, &detach);
11912         if( status < 0 ) status = errno;
11913 #else
11914         status = pthread_attr_setdetachstate(&attr, detach);
11915 #endif
11916         if( status ) return status;
11917         status = pthread_create( &t, &attr, task, NULL );
11918 #if HAVE_PTHREADS < 7
11919         if( status < 0 ) status = errno;
11920 #endif
11921         if( status ) return status;
11922 #else
11923         /* Draft 4 pthreads */
11924         status = pthread_create( &t, pthread_attr_default, task, NULL );
11925         if( status ) return errno;
11926
11927         /* give thread a chance to complete */
11928         /* it should remain joinable and hence detachable */
11929         sleep( 1 );
11930
11931         status = pthread_detach( &t );
11932         if( status ) return errno;
11933 #endif
11934
11935 #ifdef HAVE_LINUX_THREADS
11936         pthread_kill_other_threads_np();
11937 #endif
11938
11939         return 0;
11940
11941 }
11942
11943 EOF
11944 if { (eval echo configure:11945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11945 then
11946   ol_cv_pthread_kthread=yes
11947 else
11948   echo "configure: failed program was:" >&5
11949   cat conftest.$ac_ext >&5
11950   rm -fr conftest*
11951   ol_cv_pthread_kthread=no
11952 fi
11953 rm -fr conftest*
11954 fi
11955
11956
11957                 # restore the LIBS
11958                 LIBS="$ol_LIBS"
11959         
11960 fi
11961
11962 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11963
11964         if test $ol_cv_pthread_kthread = yes ; then
11965                 ol_link_pthreads="-kthread"
11966                 ol_link_threads=posix
11967         fi
11968 fi
11969
11970                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11971 if test "$ol_link_threads" = no ; then
11972         # try -pthread
11973         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11974 echo "configure:11975: checking for pthread link with -pthread" >&5
11975 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11976   echo $ac_n "(cached) $ac_c" 1>&6
11977 else
11978   
11979                 # save the flags
11980                 ol_LIBS="$LIBS"
11981                 LIBS="-pthread $LIBS"
11982
11983                 if test "$cross_compiling" = yes; then
11984   cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 /* pthread test headers */
11988 #include <pthread.h>
11989 #if HAVE_PTHREADS < 7
11990 #include <errno.h>
11991 #endif
11992 #ifndef NULL
11993 #define NULL (void*)0
11994 #endif
11995
11996 static void *task(p)
11997         void *p;
11998 {
11999         return (void *) (p == NULL);
12000 }
12001
12002 int main() {
12003
12004         /* pthread test function */
12005 #ifndef PTHREAD_CREATE_DETACHED
12006 #define PTHREAD_CREATE_DETACHED 1
12007 #endif
12008         pthread_t t;
12009         int status;
12010         int detach = PTHREAD_CREATE_DETACHED;
12011
12012 #if HAVE_PTHREADS > 4
12013         /* Final pthreads */
12014         pthread_attr_t attr;
12015
12016         status = pthread_attr_init(&attr);
12017         if( status ) return status;
12018
12019 #if HAVE_PTHREADS < 7
12020         status = pthread_attr_setdetachstate(&attr, &detach);
12021         if( status < 0 ) status = errno;
12022 #else
12023         status = pthread_attr_setdetachstate(&attr, detach);
12024 #endif
12025         if( status ) return status;
12026         status = pthread_create( &t, &attr, task, NULL );
12027 #if HAVE_PTHREADS < 7
12028         if( status < 0 ) status = errno;
12029 #endif
12030         if( status ) return status;
12031 #else
12032         /* Draft 4 pthreads */
12033         status = pthread_create( &t, pthread_attr_default, task, NULL );
12034         if( status ) return errno;
12035
12036         /* give thread a chance to complete */
12037         /* it should remain joinable and hence detachable */
12038         sleep( 1 );
12039
12040         status = pthread_detach( &t );
12041         if( status ) return errno;
12042 #endif
12043
12044 #ifdef HAVE_LINUX_THREADS
12045         pthread_kill_other_threads_np();
12046 #endif
12047
12048         return 0;
12049
12050 ; return 0; }
12051 EOF
12052 if { (eval echo configure:12053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12053   rm -rf conftest*
12054   ol_cv_pthread_pthread=yes
12055 else
12056   echo "configure: failed program was:" >&5
12057   cat conftest.$ac_ext >&5
12058   rm -rf conftest*
12059   ol_cv_pthread_pthread=no
12060 fi
12061 rm -f conftest*
12062 else
12063   cat > conftest.$ac_ext <<EOF
12064 #line 12065 "configure"
12065 #include "confdefs.h"
12066 /* pthread test headers */
12067 #include <pthread.h>
12068 #if HAVE_PTHREADS < 7
12069 #include <errno.h>
12070 #endif
12071 #ifndef NULL
12072 #define NULL (void*)0
12073 #endif
12074
12075 static void *task(p)
12076         void *p;
12077 {
12078         return (void *) (p == NULL);
12079 }
12080
12081
12082 int main(argc, argv)
12083         int argc;
12084         char **argv;
12085 {
12086
12087         /* pthread test function */
12088 #ifndef PTHREAD_CREATE_DETACHED
12089 #define PTHREAD_CREATE_DETACHED 1
12090 #endif
12091         pthread_t t;
12092         int status;
12093         int detach = PTHREAD_CREATE_DETACHED;
12094
12095 #if HAVE_PTHREADS > 4
12096         /* Final pthreads */
12097         pthread_attr_t attr;
12098
12099         status = pthread_attr_init(&attr);
12100         if( status ) return status;
12101
12102 #if HAVE_PTHREADS < 7
12103         status = pthread_attr_setdetachstate(&attr, &detach);
12104         if( status < 0 ) status = errno;
12105 #else
12106         status = pthread_attr_setdetachstate(&attr, detach);
12107 #endif
12108         if( status ) return status;
12109         status = pthread_create( &t, &attr, task, NULL );
12110 #if HAVE_PTHREADS < 7
12111         if( status < 0 ) status = errno;
12112 #endif
12113         if( status ) return status;
12114 #else
12115         /* Draft 4 pthreads */
12116         status = pthread_create( &t, pthread_attr_default, task, NULL );
12117         if( status ) return errno;
12118
12119         /* give thread a chance to complete */
12120         /* it should remain joinable and hence detachable */
12121         sleep( 1 );
12122
12123         status = pthread_detach( &t );
12124         if( status ) return errno;
12125 #endif
12126
12127 #ifdef HAVE_LINUX_THREADS
12128         pthread_kill_other_threads_np();
12129 #endif
12130
12131         return 0;
12132
12133 }
12134
12135 EOF
12136 if { (eval echo configure:12137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12137 then
12138   ol_cv_pthread_pthread=yes
12139 else
12140   echo "configure: failed program was:" >&5
12141   cat conftest.$ac_ext >&5
12142   rm -fr conftest*
12143   ol_cv_pthread_pthread=no
12144 fi
12145 rm -fr conftest*
12146 fi
12147
12148
12149                 # restore the LIBS
12150                 LIBS="$ol_LIBS"
12151         
12152 fi
12153
12154 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12155
12156         if test $ol_cv_pthread_pthread = yes ; then
12157                 ol_link_pthreads="-pthread"
12158                 ol_link_threads=posix
12159         fi
12160 fi
12161
12162                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12163 if test "$ol_link_threads" = no ; then
12164         # try -pthreads
12165         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12166 echo "configure:12167: checking for pthread link with -pthreads" >&5
12167 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12168   echo $ac_n "(cached) $ac_c" 1>&6
12169 else
12170   
12171                 # save the flags
12172                 ol_LIBS="$LIBS"
12173                 LIBS="-pthreads $LIBS"
12174
12175                 if test "$cross_compiling" = yes; then
12176   cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* pthread test headers */
12180 #include <pthread.h>
12181 #if HAVE_PTHREADS < 7
12182 #include <errno.h>
12183 #endif
12184 #ifndef NULL
12185 #define NULL (void*)0
12186 #endif
12187
12188 static void *task(p)
12189         void *p;
12190 {
12191         return (void *) (p == NULL);
12192 }
12193
12194 int main() {
12195
12196         /* pthread test function */
12197 #ifndef PTHREAD_CREATE_DETACHED
12198 #define PTHREAD_CREATE_DETACHED 1
12199 #endif
12200         pthread_t t;
12201         int status;
12202         int detach = PTHREAD_CREATE_DETACHED;
12203
12204 #if HAVE_PTHREADS > 4
12205         /* Final pthreads */
12206         pthread_attr_t attr;
12207
12208         status = pthread_attr_init(&attr);
12209         if( status ) return status;
12210
12211 #if HAVE_PTHREADS < 7
12212         status = pthread_attr_setdetachstate(&attr, &detach);
12213         if( status < 0 ) status = errno;
12214 #else
12215         status = pthread_attr_setdetachstate(&attr, detach);
12216 #endif
12217         if( status ) return status;
12218         status = pthread_create( &t, &attr, task, NULL );
12219 #if HAVE_PTHREADS < 7
12220         if( status < 0 ) status = errno;
12221 #endif
12222         if( status ) return status;
12223 #else
12224         /* Draft 4 pthreads */
12225         status = pthread_create( &t, pthread_attr_default, task, NULL );
12226         if( status ) return errno;
12227
12228         /* give thread a chance to complete */
12229         /* it should remain joinable and hence detachable */
12230         sleep( 1 );
12231
12232         status = pthread_detach( &t );
12233         if( status ) return errno;
12234 #endif
12235
12236 #ifdef HAVE_LINUX_THREADS
12237         pthread_kill_other_threads_np();
12238 #endif
12239
12240         return 0;
12241
12242 ; return 0; }
12243 EOF
12244 if { (eval echo configure:12245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12245   rm -rf conftest*
12246   ol_cv_pthread_pthreads=yes
12247 else
12248   echo "configure: failed program was:" >&5
12249   cat conftest.$ac_ext >&5
12250   rm -rf conftest*
12251   ol_cv_pthread_pthreads=no
12252 fi
12253 rm -f conftest*
12254 else
12255   cat > conftest.$ac_ext <<EOF
12256 #line 12257 "configure"
12257 #include "confdefs.h"
12258 /* pthread test headers */
12259 #include <pthread.h>
12260 #if HAVE_PTHREADS < 7
12261 #include <errno.h>
12262 #endif
12263 #ifndef NULL
12264 #define NULL (void*)0
12265 #endif
12266
12267 static void *task(p)
12268         void *p;
12269 {
12270         return (void *) (p == NULL);
12271 }
12272
12273
12274 int main(argc, argv)
12275         int argc;
12276         char **argv;
12277 {
12278
12279         /* pthread test function */
12280 #ifndef PTHREAD_CREATE_DETACHED
12281 #define PTHREAD_CREATE_DETACHED 1
12282 #endif
12283         pthread_t t;
12284         int status;
12285         int detach = PTHREAD_CREATE_DETACHED;
12286
12287 #if HAVE_PTHREADS > 4
12288         /* Final pthreads */
12289         pthread_attr_t attr;
12290
12291         status = pthread_attr_init(&attr);
12292         if( status ) return status;
12293
12294 #if HAVE_PTHREADS < 7
12295         status = pthread_attr_setdetachstate(&attr, &detach);
12296         if( status < 0 ) status = errno;
12297 #else
12298         status = pthread_attr_setdetachstate(&attr, detach);
12299 #endif
12300         if( status ) return status;
12301         status = pthread_create( &t, &attr, task, NULL );
12302 #if HAVE_PTHREADS < 7
12303         if( status < 0 ) status = errno;
12304 #endif
12305         if( status ) return status;
12306 #else
12307         /* Draft 4 pthreads */
12308         status = pthread_create( &t, pthread_attr_default, task, NULL );
12309         if( status ) return errno;
12310
12311         /* give thread a chance to complete */
12312         /* it should remain joinable and hence detachable */
12313         sleep( 1 );
12314
12315         status = pthread_detach( &t );
12316         if( status ) return errno;
12317 #endif
12318
12319 #ifdef HAVE_LINUX_THREADS
12320         pthread_kill_other_threads_np();
12321 #endif
12322
12323         return 0;
12324
12325 }
12326
12327 EOF
12328 if { (eval echo configure:12329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12329 then
12330   ol_cv_pthread_pthreads=yes
12331 else
12332   echo "configure: failed program was:" >&5
12333   cat conftest.$ac_ext >&5
12334   rm -fr conftest*
12335   ol_cv_pthread_pthreads=no
12336 fi
12337 rm -fr conftest*
12338 fi
12339
12340
12341                 # restore the LIBS
12342                 LIBS="$ol_LIBS"
12343         
12344 fi
12345
12346 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12347
12348         if test $ol_cv_pthread_pthreads = yes ; then
12349                 ol_link_pthreads="-pthreads"
12350                 ol_link_threads=posix
12351         fi
12352 fi
12353
12354                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12355 if test "$ol_link_threads" = no ; then
12356         # try -mthreads
12357         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12358 echo "configure:12359: checking for pthread link with -mthreads" >&5
12359 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12360   echo $ac_n "(cached) $ac_c" 1>&6
12361 else
12362   
12363                 # save the flags
12364                 ol_LIBS="$LIBS"
12365                 LIBS="-mthreads $LIBS"
12366
12367                 if test "$cross_compiling" = yes; then
12368   cat > conftest.$ac_ext <<EOF
12369 #line 12370 "configure"
12370 #include "confdefs.h"
12371 /* pthread test headers */
12372 #include <pthread.h>
12373 #if HAVE_PTHREADS < 7
12374 #include <errno.h>
12375 #endif
12376 #ifndef NULL
12377 #define NULL (void*)0
12378 #endif
12379
12380 static void *task(p)
12381         void *p;
12382 {
12383         return (void *) (p == NULL);
12384 }
12385
12386 int main() {
12387
12388         /* pthread test function */
12389 #ifndef PTHREAD_CREATE_DETACHED
12390 #define PTHREAD_CREATE_DETACHED 1
12391 #endif
12392         pthread_t t;
12393         int status;
12394         int detach = PTHREAD_CREATE_DETACHED;
12395
12396 #if HAVE_PTHREADS > 4
12397         /* Final pthreads */
12398         pthread_attr_t attr;
12399
12400         status = pthread_attr_init(&attr);
12401         if( status ) return status;
12402
12403 #if HAVE_PTHREADS < 7
12404         status = pthread_attr_setdetachstate(&attr, &detach);
12405         if( status < 0 ) status = errno;
12406 #else
12407         status = pthread_attr_setdetachstate(&attr, detach);
12408 #endif
12409         if( status ) return status;
12410         status = pthread_create( &t, &attr, task, NULL );
12411 #if HAVE_PTHREADS < 7
12412         if( status < 0 ) status = errno;
12413 #endif
12414         if( status ) return status;
12415 #else
12416         /* Draft 4 pthreads */
12417         status = pthread_create( &t, pthread_attr_default, task, NULL );
12418         if( status ) return errno;
12419
12420         /* give thread a chance to complete */
12421         /* it should remain joinable and hence detachable */
12422         sleep( 1 );
12423
12424         status = pthread_detach( &t );
12425         if( status ) return errno;
12426 #endif
12427
12428 #ifdef HAVE_LINUX_THREADS
12429         pthread_kill_other_threads_np();
12430 #endif
12431
12432         return 0;
12433
12434 ; return 0; }
12435 EOF
12436 if { (eval echo configure:12437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12437   rm -rf conftest*
12438   ol_cv_pthread_mthreads=yes
12439 else
12440   echo "configure: failed program was:" >&5
12441   cat conftest.$ac_ext >&5
12442   rm -rf conftest*
12443   ol_cv_pthread_mthreads=no
12444 fi
12445 rm -f conftest*
12446 else
12447   cat > conftest.$ac_ext <<EOF
12448 #line 12449 "configure"
12449 #include "confdefs.h"
12450 /* pthread test headers */
12451 #include <pthread.h>
12452 #if HAVE_PTHREADS < 7
12453 #include <errno.h>
12454 #endif
12455 #ifndef NULL
12456 #define NULL (void*)0
12457 #endif
12458
12459 static void *task(p)
12460         void *p;
12461 {
12462         return (void *) (p == NULL);
12463 }
12464
12465
12466 int main(argc, argv)
12467         int argc;
12468         char **argv;
12469 {
12470
12471         /* pthread test function */
12472 #ifndef PTHREAD_CREATE_DETACHED
12473 #define PTHREAD_CREATE_DETACHED 1
12474 #endif
12475         pthread_t t;
12476         int status;
12477         int detach = PTHREAD_CREATE_DETACHED;
12478
12479 #if HAVE_PTHREADS > 4
12480         /* Final pthreads */
12481         pthread_attr_t attr;
12482
12483         status = pthread_attr_init(&attr);
12484         if( status ) return status;
12485
12486 #if HAVE_PTHREADS < 7
12487         status = pthread_attr_setdetachstate(&attr, &detach);
12488         if( status < 0 ) status = errno;
12489 #else
12490         status = pthread_attr_setdetachstate(&attr, detach);
12491 #endif
12492         if( status ) return status;
12493         status = pthread_create( &t, &attr, task, NULL );
12494 #if HAVE_PTHREADS < 7
12495         if( status < 0 ) status = errno;
12496 #endif
12497         if( status ) return status;
12498 #else
12499         /* Draft 4 pthreads */
12500         status = pthread_create( &t, pthread_attr_default, task, NULL );
12501         if( status ) return errno;
12502
12503         /* give thread a chance to complete */
12504         /* it should remain joinable and hence detachable */
12505         sleep( 1 );
12506
12507         status = pthread_detach( &t );
12508         if( status ) return errno;
12509 #endif
12510
12511 #ifdef HAVE_LINUX_THREADS
12512         pthread_kill_other_threads_np();
12513 #endif
12514
12515         return 0;
12516
12517 }
12518
12519 EOF
12520 if { (eval echo configure:12521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12521 then
12522   ol_cv_pthread_mthreads=yes
12523 else
12524   echo "configure: failed program was:" >&5
12525   cat conftest.$ac_ext >&5
12526   rm -fr conftest*
12527   ol_cv_pthread_mthreads=no
12528 fi
12529 rm -fr conftest*
12530 fi
12531
12532
12533                 # restore the LIBS
12534                 LIBS="$ol_LIBS"
12535         
12536 fi
12537
12538 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12539
12540         if test $ol_cv_pthread_mthreads = yes ; then
12541                 ol_link_pthreads="-mthreads"
12542                 ol_link_threads=posix
12543         fi
12544 fi
12545
12546                 # Pthread try link: -thread (ol_cv_pthread_thread)
12547 if test "$ol_link_threads" = no ; then
12548         # try -thread
12549         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12550 echo "configure:12551: checking for pthread link with -thread" >&5
12551 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12552   echo $ac_n "(cached) $ac_c" 1>&6
12553 else
12554   
12555                 # save the flags
12556                 ol_LIBS="$LIBS"
12557                 LIBS="-thread $LIBS"
12558
12559                 if test "$cross_compiling" = yes; then
12560   cat > conftest.$ac_ext <<EOF
12561 #line 12562 "configure"
12562 #include "confdefs.h"
12563 /* pthread test headers */
12564 #include <pthread.h>
12565 #if HAVE_PTHREADS < 7
12566 #include <errno.h>
12567 #endif
12568 #ifndef NULL
12569 #define NULL (void*)0
12570 #endif
12571
12572 static void *task(p)
12573         void *p;
12574 {
12575         return (void *) (p == NULL);
12576 }
12577
12578 int main() {
12579
12580         /* pthread test function */
12581 #ifndef PTHREAD_CREATE_DETACHED
12582 #define PTHREAD_CREATE_DETACHED 1
12583 #endif
12584         pthread_t t;
12585         int status;
12586         int detach = PTHREAD_CREATE_DETACHED;
12587
12588 #if HAVE_PTHREADS > 4
12589         /* Final pthreads */
12590         pthread_attr_t attr;
12591
12592         status = pthread_attr_init(&attr);
12593         if( status ) return status;
12594
12595 #if HAVE_PTHREADS < 7
12596         status = pthread_attr_setdetachstate(&attr, &detach);
12597         if( status < 0 ) status = errno;
12598 #else
12599         status = pthread_attr_setdetachstate(&attr, detach);
12600 #endif
12601         if( status ) return status;
12602         status = pthread_create( &t, &attr, task, NULL );
12603 #if HAVE_PTHREADS < 7
12604         if( status < 0 ) status = errno;
12605 #endif
12606         if( status ) return status;
12607 #else
12608         /* Draft 4 pthreads */
12609         status = pthread_create( &t, pthread_attr_default, task, NULL );
12610         if( status ) return errno;
12611
12612         /* give thread a chance to complete */
12613         /* it should remain joinable and hence detachable */
12614         sleep( 1 );
12615
12616         status = pthread_detach( &t );
12617         if( status ) return errno;
12618 #endif
12619
12620 #ifdef HAVE_LINUX_THREADS
12621         pthread_kill_other_threads_np();
12622 #endif
12623
12624         return 0;
12625
12626 ; return 0; }
12627 EOF
12628 if { (eval echo configure:12629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12629   rm -rf conftest*
12630   ol_cv_pthread_thread=yes
12631 else
12632   echo "configure: failed program was:" >&5
12633   cat conftest.$ac_ext >&5
12634   rm -rf conftest*
12635   ol_cv_pthread_thread=no
12636 fi
12637 rm -f conftest*
12638 else
12639   cat > conftest.$ac_ext <<EOF
12640 #line 12641 "configure"
12641 #include "confdefs.h"
12642 /* pthread test headers */
12643 #include <pthread.h>
12644 #if HAVE_PTHREADS < 7
12645 #include <errno.h>
12646 #endif
12647 #ifndef NULL
12648 #define NULL (void*)0
12649 #endif
12650
12651 static void *task(p)
12652         void *p;
12653 {
12654         return (void *) (p == NULL);
12655 }
12656
12657
12658 int main(argc, argv)
12659         int argc;
12660         char **argv;
12661 {
12662
12663         /* pthread test function */
12664 #ifndef PTHREAD_CREATE_DETACHED
12665 #define PTHREAD_CREATE_DETACHED 1
12666 #endif
12667         pthread_t t;
12668         int status;
12669         int detach = PTHREAD_CREATE_DETACHED;
12670
12671 #if HAVE_PTHREADS > 4
12672         /* Final pthreads */
12673         pthread_attr_t attr;
12674
12675         status = pthread_attr_init(&attr);
12676         if( status ) return status;
12677
12678 #if HAVE_PTHREADS < 7
12679         status = pthread_attr_setdetachstate(&attr, &detach);
12680         if( status < 0 ) status = errno;
12681 #else
12682         status = pthread_attr_setdetachstate(&attr, detach);
12683 #endif
12684         if( status ) return status;
12685         status = pthread_create( &t, &attr, task, NULL );
12686 #if HAVE_PTHREADS < 7
12687         if( status < 0 ) status = errno;
12688 #endif
12689         if( status ) return status;
12690 #else
12691         /* Draft 4 pthreads */
12692         status = pthread_create( &t, pthread_attr_default, task, NULL );
12693         if( status ) return errno;
12694
12695         /* give thread a chance to complete */
12696         /* it should remain joinable and hence detachable */
12697         sleep( 1 );
12698
12699         status = pthread_detach( &t );
12700         if( status ) return errno;
12701 #endif
12702
12703 #ifdef HAVE_LINUX_THREADS
12704         pthread_kill_other_threads_np();
12705 #endif
12706
12707         return 0;
12708
12709 }
12710
12711 EOF
12712 if { (eval echo configure:12713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12713 then
12714   ol_cv_pthread_thread=yes
12715 else
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -fr conftest*
12719   ol_cv_pthread_thread=no
12720 fi
12721 rm -fr conftest*
12722 fi
12723
12724
12725                 # restore the LIBS
12726                 LIBS="$ol_LIBS"
12727         
12728 fi
12729
12730 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12731
12732         if test $ol_cv_pthread_thread = yes ; then
12733                 ol_link_pthreads="-thread"
12734                 ol_link_threads=posix
12735         fi
12736 fi
12737
12738
12739                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12740 if test "$ol_link_threads" = no ; then
12741         # try -lpthread -lmach -lexc -lc_r
12742         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12743 echo "configure:12744: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12744 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12745   echo $ac_n "(cached) $ac_c" 1>&6
12746 else
12747   
12748                 # save the flags
12749                 ol_LIBS="$LIBS"
12750                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12751
12752                 if test "$cross_compiling" = yes; then
12753   cat > conftest.$ac_ext <<EOF
12754 #line 12755 "configure"
12755 #include "confdefs.h"
12756 /* pthread test headers */
12757 #include <pthread.h>
12758 #if HAVE_PTHREADS < 7
12759 #include <errno.h>
12760 #endif
12761 #ifndef NULL
12762 #define NULL (void*)0
12763 #endif
12764
12765 static void *task(p)
12766         void *p;
12767 {
12768         return (void *) (p == NULL);
12769 }
12770
12771 int main() {
12772
12773         /* pthread test function */
12774 #ifndef PTHREAD_CREATE_DETACHED
12775 #define PTHREAD_CREATE_DETACHED 1
12776 #endif
12777         pthread_t t;
12778         int status;
12779         int detach = PTHREAD_CREATE_DETACHED;
12780
12781 #if HAVE_PTHREADS > 4
12782         /* Final pthreads */
12783         pthread_attr_t attr;
12784
12785         status = pthread_attr_init(&attr);
12786         if( status ) return status;
12787
12788 #if HAVE_PTHREADS < 7
12789         status = pthread_attr_setdetachstate(&attr, &detach);
12790         if( status < 0 ) status = errno;
12791 #else
12792         status = pthread_attr_setdetachstate(&attr, detach);
12793 #endif
12794         if( status ) return status;
12795         status = pthread_create( &t, &attr, task, NULL );
12796 #if HAVE_PTHREADS < 7
12797         if( status < 0 ) status = errno;
12798 #endif
12799         if( status ) return status;
12800 #else
12801         /* Draft 4 pthreads */
12802         status = pthread_create( &t, pthread_attr_default, task, NULL );
12803         if( status ) return errno;
12804
12805         /* give thread a chance to complete */
12806         /* it should remain joinable and hence detachable */
12807         sleep( 1 );
12808
12809         status = pthread_detach( &t );
12810         if( status ) return errno;
12811 #endif
12812
12813 #ifdef HAVE_LINUX_THREADS
12814         pthread_kill_other_threads_np();
12815 #endif
12816
12817         return 0;
12818
12819 ; return 0; }
12820 EOF
12821 if { (eval echo configure:12822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12822   rm -rf conftest*
12823   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12824 else
12825   echo "configure: failed program was:" >&5
12826   cat conftest.$ac_ext >&5
12827   rm -rf conftest*
12828   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12829 fi
12830 rm -f conftest*
12831 else
12832   cat > conftest.$ac_ext <<EOF
12833 #line 12834 "configure"
12834 #include "confdefs.h"
12835 /* pthread test headers */
12836 #include <pthread.h>
12837 #if HAVE_PTHREADS < 7
12838 #include <errno.h>
12839 #endif
12840 #ifndef NULL
12841 #define NULL (void*)0
12842 #endif
12843
12844 static void *task(p)
12845         void *p;
12846 {
12847         return (void *) (p == NULL);
12848 }
12849
12850
12851 int main(argc, argv)
12852         int argc;
12853         char **argv;
12854 {
12855
12856         /* pthread test function */
12857 #ifndef PTHREAD_CREATE_DETACHED
12858 #define PTHREAD_CREATE_DETACHED 1
12859 #endif
12860         pthread_t t;
12861         int status;
12862         int detach = PTHREAD_CREATE_DETACHED;
12863
12864 #if HAVE_PTHREADS > 4
12865         /* Final pthreads */
12866         pthread_attr_t attr;
12867
12868         status = pthread_attr_init(&attr);
12869         if( status ) return status;
12870
12871 #if HAVE_PTHREADS < 7
12872         status = pthread_attr_setdetachstate(&attr, &detach);
12873         if( status < 0 ) status = errno;
12874 #else
12875         status = pthread_attr_setdetachstate(&attr, detach);
12876 #endif
12877         if( status ) return status;
12878         status = pthread_create( &t, &attr, task, NULL );
12879 #if HAVE_PTHREADS < 7
12880         if( status < 0 ) status = errno;
12881 #endif
12882         if( status ) return status;
12883 #else
12884         /* Draft 4 pthreads */
12885         status = pthread_create( &t, pthread_attr_default, task, NULL );
12886         if( status ) return errno;
12887
12888         /* give thread a chance to complete */
12889         /* it should remain joinable and hence detachable */
12890         sleep( 1 );
12891
12892         status = pthread_detach( &t );
12893         if( status ) return errno;
12894 #endif
12895
12896 #ifdef HAVE_LINUX_THREADS
12897         pthread_kill_other_threads_np();
12898 #endif
12899
12900         return 0;
12901
12902 }
12903
12904 EOF
12905 if { (eval echo configure:12906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12906 then
12907   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12908 else
12909   echo "configure: failed program was:" >&5
12910   cat conftest.$ac_ext >&5
12911   rm -fr conftest*
12912   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12913 fi
12914 rm -fr conftest*
12915 fi
12916
12917
12918                 # restore the LIBS
12919                 LIBS="$ol_LIBS"
12920         
12921 fi
12922
12923 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12924
12925         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12926                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12927                 ol_link_threads=posix
12928         fi
12929 fi
12930
12931                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12932 if test "$ol_link_threads" = no ; then
12933         # try -lpthread -lmach -lexc
12934         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12935 echo "configure:12936: checking for pthread link with -lpthread -lmach -lexc" >&5
12936 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12937   echo $ac_n "(cached) $ac_c" 1>&6
12938 else
12939   
12940                 # save the flags
12941                 ol_LIBS="$LIBS"
12942                 LIBS="-lpthread -lmach -lexc $LIBS"
12943
12944                 if test "$cross_compiling" = yes; then
12945   cat > conftest.$ac_ext <<EOF
12946 #line 12947 "configure"
12947 #include "confdefs.h"
12948 /* pthread test headers */
12949 #include <pthread.h>
12950 #if HAVE_PTHREADS < 7
12951 #include <errno.h>
12952 #endif
12953 #ifndef NULL
12954 #define NULL (void*)0
12955 #endif
12956
12957 static void *task(p)
12958         void *p;
12959 {
12960         return (void *) (p == NULL);
12961 }
12962
12963 int main() {
12964
12965         /* pthread test function */
12966 #ifndef PTHREAD_CREATE_DETACHED
12967 #define PTHREAD_CREATE_DETACHED 1
12968 #endif
12969         pthread_t t;
12970         int status;
12971         int detach = PTHREAD_CREATE_DETACHED;
12972
12973 #if HAVE_PTHREADS > 4
12974         /* Final pthreads */
12975         pthread_attr_t attr;
12976
12977         status = pthread_attr_init(&attr);
12978         if( status ) return status;
12979
12980 #if HAVE_PTHREADS < 7
12981         status = pthread_attr_setdetachstate(&attr, &detach);
12982         if( status < 0 ) status = errno;
12983 #else
12984         status = pthread_attr_setdetachstate(&attr, detach);
12985 #endif
12986         if( status ) return status;
12987         status = pthread_create( &t, &attr, task, NULL );
12988 #if HAVE_PTHREADS < 7
12989         if( status < 0 ) status = errno;
12990 #endif
12991         if( status ) return status;
12992 #else
12993         /* Draft 4 pthreads */
12994         status = pthread_create( &t, pthread_attr_default, task, NULL );
12995         if( status ) return errno;
12996
12997         /* give thread a chance to complete */
12998         /* it should remain joinable and hence detachable */
12999         sleep( 1 );
13000
13001         status = pthread_detach( &t );
13002         if( status ) return errno;
13003 #endif
13004
13005 #ifdef HAVE_LINUX_THREADS
13006         pthread_kill_other_threads_np();
13007 #endif
13008
13009         return 0;
13010
13011 ; return 0; }
13012 EOF
13013 if { (eval echo configure:13014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13014   rm -rf conftest*
13015   ol_cv_pthread_lpthread_lmach_lexc=yes
13016 else
13017   echo "configure: failed program was:" >&5
13018   cat conftest.$ac_ext >&5
13019   rm -rf conftest*
13020   ol_cv_pthread_lpthread_lmach_lexc=no
13021 fi
13022 rm -f conftest*
13023 else
13024   cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 /* pthread test headers */
13028 #include <pthread.h>
13029 #if HAVE_PTHREADS < 7
13030 #include <errno.h>
13031 #endif
13032 #ifndef NULL
13033 #define NULL (void*)0
13034 #endif
13035
13036 static void *task(p)
13037         void *p;
13038 {
13039         return (void *) (p == NULL);
13040 }
13041
13042
13043 int main(argc, argv)
13044         int argc;
13045         char **argv;
13046 {
13047
13048         /* pthread test function */
13049 #ifndef PTHREAD_CREATE_DETACHED
13050 #define PTHREAD_CREATE_DETACHED 1
13051 #endif
13052         pthread_t t;
13053         int status;
13054         int detach = PTHREAD_CREATE_DETACHED;
13055
13056 #if HAVE_PTHREADS > 4
13057         /* Final pthreads */
13058         pthread_attr_t attr;
13059
13060         status = pthread_attr_init(&attr);
13061         if( status ) return status;
13062
13063 #if HAVE_PTHREADS < 7
13064         status = pthread_attr_setdetachstate(&attr, &detach);
13065         if( status < 0 ) status = errno;
13066 #else
13067         status = pthread_attr_setdetachstate(&attr, detach);
13068 #endif
13069         if( status ) return status;
13070         status = pthread_create( &t, &attr, task, NULL );
13071 #if HAVE_PTHREADS < 7
13072         if( status < 0 ) status = errno;
13073 #endif
13074         if( status ) return status;
13075 #else
13076         /* Draft 4 pthreads */
13077         status = pthread_create( &t, pthread_attr_default, task, NULL );
13078         if( status ) return errno;
13079
13080         /* give thread a chance to complete */
13081         /* it should remain joinable and hence detachable */
13082         sleep( 1 );
13083
13084         status = pthread_detach( &t );
13085         if( status ) return errno;
13086 #endif
13087
13088 #ifdef HAVE_LINUX_THREADS
13089         pthread_kill_other_threads_np();
13090 #endif
13091
13092         return 0;
13093
13094 }
13095
13096 EOF
13097 if { (eval echo configure:13098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13098 then
13099   ol_cv_pthread_lpthread_lmach_lexc=yes
13100 else
13101   echo "configure: failed program was:" >&5
13102   cat conftest.$ac_ext >&5
13103   rm -fr conftest*
13104   ol_cv_pthread_lpthread_lmach_lexc=no
13105 fi
13106 rm -fr conftest*
13107 fi
13108
13109
13110                 # restore the LIBS
13111                 LIBS="$ol_LIBS"
13112         
13113 fi
13114
13115 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13116
13117         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13118                 ol_link_pthreads="-lpthread -lmach -lexc"
13119                 ol_link_threads=posix
13120         fi
13121 fi
13122
13123
13124                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13125 if test "$ol_link_threads" = no ; then
13126         # try -lpthread -Wl,-woff,85
13127         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13128 echo "configure:13129: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13129 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13130   echo $ac_n "(cached) $ac_c" 1>&6
13131 else
13132   
13133                 # save the flags
13134                 ol_LIBS="$LIBS"
13135                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13136
13137                 if test "$cross_compiling" = yes; then
13138   cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 /* pthread test headers */
13142 #include <pthread.h>
13143 #if HAVE_PTHREADS < 7
13144 #include <errno.h>
13145 #endif
13146 #ifndef NULL
13147 #define NULL (void*)0
13148 #endif
13149
13150 static void *task(p)
13151         void *p;
13152 {
13153         return (void *) (p == NULL);
13154 }
13155
13156 int main() {
13157
13158         /* pthread test function */
13159 #ifndef PTHREAD_CREATE_DETACHED
13160 #define PTHREAD_CREATE_DETACHED 1
13161 #endif
13162         pthread_t t;
13163         int status;
13164         int detach = PTHREAD_CREATE_DETACHED;
13165
13166 #if HAVE_PTHREADS > 4
13167         /* Final pthreads */
13168         pthread_attr_t attr;
13169
13170         status = pthread_attr_init(&attr);
13171         if( status ) return status;
13172
13173 #if HAVE_PTHREADS < 7
13174         status = pthread_attr_setdetachstate(&attr, &detach);
13175         if( status < 0 ) status = errno;
13176 #else
13177         status = pthread_attr_setdetachstate(&attr, detach);
13178 #endif
13179         if( status ) return status;
13180         status = pthread_create( &t, &attr, task, NULL );
13181 #if HAVE_PTHREADS < 7
13182         if( status < 0 ) status = errno;
13183 #endif
13184         if( status ) return status;
13185 #else
13186         /* Draft 4 pthreads */
13187         status = pthread_create( &t, pthread_attr_default, task, NULL );
13188         if( status ) return errno;
13189
13190         /* give thread a chance to complete */
13191         /* it should remain joinable and hence detachable */
13192         sleep( 1 );
13193
13194         status = pthread_detach( &t );
13195         if( status ) return errno;
13196 #endif
13197
13198 #ifdef HAVE_LINUX_THREADS
13199         pthread_kill_other_threads_np();
13200 #endif
13201
13202         return 0;
13203
13204 ; return 0; }
13205 EOF
13206 if { (eval echo configure:13207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13207   rm -rf conftest*
13208   ol_cv_pthread_lib_lpthread_woff=yes
13209 else
13210   echo "configure: failed program was:" >&5
13211   cat conftest.$ac_ext >&5
13212   rm -rf conftest*
13213   ol_cv_pthread_lib_lpthread_woff=no
13214 fi
13215 rm -f conftest*
13216 else
13217   cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220 /* pthread test headers */
13221 #include <pthread.h>
13222 #if HAVE_PTHREADS < 7
13223 #include <errno.h>
13224 #endif
13225 #ifndef NULL
13226 #define NULL (void*)0
13227 #endif
13228
13229 static void *task(p)
13230         void *p;
13231 {
13232         return (void *) (p == NULL);
13233 }
13234
13235
13236 int main(argc, argv)
13237         int argc;
13238         char **argv;
13239 {
13240
13241         /* pthread test function */
13242 #ifndef PTHREAD_CREATE_DETACHED
13243 #define PTHREAD_CREATE_DETACHED 1
13244 #endif
13245         pthread_t t;
13246         int status;
13247         int detach = PTHREAD_CREATE_DETACHED;
13248
13249 #if HAVE_PTHREADS > 4
13250         /* Final pthreads */
13251         pthread_attr_t attr;
13252
13253         status = pthread_attr_init(&attr);
13254         if( status ) return status;
13255
13256 #if HAVE_PTHREADS < 7
13257         status = pthread_attr_setdetachstate(&attr, &detach);
13258         if( status < 0 ) status = errno;
13259 #else
13260         status = pthread_attr_setdetachstate(&attr, detach);
13261 #endif
13262         if( status ) return status;
13263         status = pthread_create( &t, &attr, task, NULL );
13264 #if HAVE_PTHREADS < 7
13265         if( status < 0 ) status = errno;
13266 #endif
13267         if( status ) return status;
13268 #else
13269         /* Draft 4 pthreads */
13270         status = pthread_create( &t, pthread_attr_default, task, NULL );
13271         if( status ) return errno;
13272
13273         /* give thread a chance to complete */
13274         /* it should remain joinable and hence detachable */
13275         sleep( 1 );
13276
13277         status = pthread_detach( &t );
13278         if( status ) return errno;
13279 #endif
13280
13281 #ifdef HAVE_LINUX_THREADS
13282         pthread_kill_other_threads_np();
13283 #endif
13284
13285         return 0;
13286
13287 }
13288
13289 EOF
13290 if { (eval echo configure:13291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13291 then
13292   ol_cv_pthread_lib_lpthread_woff=yes
13293 else
13294   echo "configure: failed program was:" >&5
13295   cat conftest.$ac_ext >&5
13296   rm -fr conftest*
13297   ol_cv_pthread_lib_lpthread_woff=no
13298 fi
13299 rm -fr conftest*
13300 fi
13301
13302
13303                 # restore the LIBS
13304                 LIBS="$ol_LIBS"
13305         
13306 fi
13307
13308 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13309
13310         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13311                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13312                 ol_link_threads=posix
13313         fi
13314 fi
13315
13316
13317                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13318 if test "$ol_link_threads" = no ; then
13319         # try -lpthread
13320         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13321 echo "configure:13322: checking for pthread link with -lpthread" >&5
13322 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13323   echo $ac_n "(cached) $ac_c" 1>&6
13324 else
13325   
13326                 # save the flags
13327                 ol_LIBS="$LIBS"
13328                 LIBS="-lpthread $LIBS"
13329
13330                 if test "$cross_compiling" = yes; then
13331   cat > conftest.$ac_ext <<EOF
13332 #line 13333 "configure"
13333 #include "confdefs.h"
13334 /* pthread test headers */
13335 #include <pthread.h>
13336 #if HAVE_PTHREADS < 7
13337 #include <errno.h>
13338 #endif
13339 #ifndef NULL
13340 #define NULL (void*)0
13341 #endif
13342
13343 static void *task(p)
13344         void *p;
13345 {
13346         return (void *) (p == NULL);
13347 }
13348
13349 int main() {
13350
13351         /* pthread test function */
13352 #ifndef PTHREAD_CREATE_DETACHED
13353 #define PTHREAD_CREATE_DETACHED 1
13354 #endif
13355         pthread_t t;
13356         int status;
13357         int detach = PTHREAD_CREATE_DETACHED;
13358
13359 #if HAVE_PTHREADS > 4
13360         /* Final pthreads */
13361         pthread_attr_t attr;
13362
13363         status = pthread_attr_init(&attr);
13364         if( status ) return status;
13365
13366 #if HAVE_PTHREADS < 7
13367         status = pthread_attr_setdetachstate(&attr, &detach);
13368         if( status < 0 ) status = errno;
13369 #else
13370         status = pthread_attr_setdetachstate(&attr, detach);
13371 #endif
13372         if( status ) return status;
13373         status = pthread_create( &t, &attr, task, NULL );
13374 #if HAVE_PTHREADS < 7
13375         if( status < 0 ) status = errno;
13376 #endif
13377         if( status ) return status;
13378 #else
13379         /* Draft 4 pthreads */
13380         status = pthread_create( &t, pthread_attr_default, task, NULL );
13381         if( status ) return errno;
13382
13383         /* give thread a chance to complete */
13384         /* it should remain joinable and hence detachable */
13385         sleep( 1 );
13386
13387         status = pthread_detach( &t );
13388         if( status ) return errno;
13389 #endif
13390
13391 #ifdef HAVE_LINUX_THREADS
13392         pthread_kill_other_threads_np();
13393 #endif
13394
13395         return 0;
13396
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13400   rm -rf conftest*
13401   ol_cv_pthread_lpthread=yes
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -rf conftest*
13406   ol_cv_pthread_lpthread=no
13407 fi
13408 rm -f conftest*
13409 else
13410   cat > conftest.$ac_ext <<EOF
13411 #line 13412 "configure"
13412 #include "confdefs.h"
13413 /* pthread test headers */
13414 #include <pthread.h>
13415 #if HAVE_PTHREADS < 7
13416 #include <errno.h>
13417 #endif
13418 #ifndef NULL
13419 #define NULL (void*)0
13420 #endif
13421
13422 static void *task(p)
13423         void *p;
13424 {
13425         return (void *) (p == NULL);
13426 }
13427
13428
13429 int main(argc, argv)
13430         int argc;
13431         char **argv;
13432 {
13433
13434         /* pthread test function */
13435 #ifndef PTHREAD_CREATE_DETACHED
13436 #define PTHREAD_CREATE_DETACHED 1
13437 #endif
13438         pthread_t t;
13439         int status;
13440         int detach = PTHREAD_CREATE_DETACHED;
13441
13442 #if HAVE_PTHREADS > 4
13443         /* Final pthreads */
13444         pthread_attr_t attr;
13445
13446         status = pthread_attr_init(&attr);
13447         if( status ) return status;
13448
13449 #if HAVE_PTHREADS < 7
13450         status = pthread_attr_setdetachstate(&attr, &detach);
13451         if( status < 0 ) status = errno;
13452 #else
13453         status = pthread_attr_setdetachstate(&attr, detach);
13454 #endif
13455         if( status ) return status;
13456         status = pthread_create( &t, &attr, task, NULL );
13457 #if HAVE_PTHREADS < 7
13458         if( status < 0 ) status = errno;
13459 #endif
13460         if( status ) return status;
13461 #else
13462         /* Draft 4 pthreads */
13463         status = pthread_create( &t, pthread_attr_default, task, NULL );
13464         if( status ) return errno;
13465
13466         /* give thread a chance to complete */
13467         /* it should remain joinable and hence detachable */
13468         sleep( 1 );
13469
13470         status = pthread_detach( &t );
13471         if( status ) return errno;
13472 #endif
13473
13474 #ifdef HAVE_LINUX_THREADS
13475         pthread_kill_other_threads_np();
13476 #endif
13477
13478         return 0;
13479
13480 }
13481
13482 EOF
13483 if { (eval echo configure:13484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13484 then
13485   ol_cv_pthread_lpthread=yes
13486 else
13487   echo "configure: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   rm -fr conftest*
13490   ol_cv_pthread_lpthread=no
13491 fi
13492 rm -fr conftest*
13493 fi
13494
13495
13496                 # restore the LIBS
13497                 LIBS="$ol_LIBS"
13498         
13499 fi
13500
13501 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13502
13503         if test $ol_cv_pthread_lpthread = yes ; then
13504                 ol_link_pthreads="-lpthread"
13505                 ol_link_threads=posix
13506         fi
13507 fi
13508
13509                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13510 if test "$ol_link_threads" = no ; then
13511         # try -lc_r
13512         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13513 echo "configure:13514: checking for pthread link with -lc_r" >&5
13514 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13515   echo $ac_n "(cached) $ac_c" 1>&6
13516 else
13517   
13518                 # save the flags
13519                 ol_LIBS="$LIBS"
13520                 LIBS="-lc_r $LIBS"
13521
13522                 if test "$cross_compiling" = yes; then
13523   cat > conftest.$ac_ext <<EOF
13524 #line 13525 "configure"
13525 #include "confdefs.h"
13526 /* pthread test headers */
13527 #include <pthread.h>
13528 #if HAVE_PTHREADS < 7
13529 #include <errno.h>
13530 #endif
13531 #ifndef NULL
13532 #define NULL (void*)0
13533 #endif
13534
13535 static void *task(p)
13536         void *p;
13537 {
13538         return (void *) (p == NULL);
13539 }
13540
13541 int main() {
13542
13543         /* pthread test function */
13544 #ifndef PTHREAD_CREATE_DETACHED
13545 #define PTHREAD_CREATE_DETACHED 1
13546 #endif
13547         pthread_t t;
13548         int status;
13549         int detach = PTHREAD_CREATE_DETACHED;
13550
13551 #if HAVE_PTHREADS > 4
13552         /* Final pthreads */
13553         pthread_attr_t attr;
13554
13555         status = pthread_attr_init(&attr);
13556         if( status ) return status;
13557
13558 #if HAVE_PTHREADS < 7
13559         status = pthread_attr_setdetachstate(&attr, &detach);
13560         if( status < 0 ) status = errno;
13561 #else
13562         status = pthread_attr_setdetachstate(&attr, detach);
13563 #endif
13564         if( status ) return status;
13565         status = pthread_create( &t, &attr, task, NULL );
13566 #if HAVE_PTHREADS < 7
13567         if( status < 0 ) status = errno;
13568 #endif
13569         if( status ) return status;
13570 #else
13571         /* Draft 4 pthreads */
13572         status = pthread_create( &t, pthread_attr_default, task, NULL );
13573         if( status ) return errno;
13574
13575         /* give thread a chance to complete */
13576         /* it should remain joinable and hence detachable */
13577         sleep( 1 );
13578
13579         status = pthread_detach( &t );
13580         if( status ) return errno;
13581 #endif
13582
13583 #ifdef HAVE_LINUX_THREADS
13584         pthread_kill_other_threads_np();
13585 #endif
13586
13587         return 0;
13588
13589 ; return 0; }
13590 EOF
13591 if { (eval echo configure:13592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13592   rm -rf conftest*
13593   ol_cv_pthread_lc_r=yes
13594 else
13595   echo "configure: failed program was:" >&5
13596   cat conftest.$ac_ext >&5
13597   rm -rf conftest*
13598   ol_cv_pthread_lc_r=no
13599 fi
13600 rm -f conftest*
13601 else
13602   cat > conftest.$ac_ext <<EOF
13603 #line 13604 "configure"
13604 #include "confdefs.h"
13605 /* pthread test headers */
13606 #include <pthread.h>
13607 #if HAVE_PTHREADS < 7
13608 #include <errno.h>
13609 #endif
13610 #ifndef NULL
13611 #define NULL (void*)0
13612 #endif
13613
13614 static void *task(p)
13615         void *p;
13616 {
13617         return (void *) (p == NULL);
13618 }
13619
13620
13621 int main(argc, argv)
13622         int argc;
13623         char **argv;
13624 {
13625
13626         /* pthread test function */
13627 #ifndef PTHREAD_CREATE_DETACHED
13628 #define PTHREAD_CREATE_DETACHED 1
13629 #endif
13630         pthread_t t;
13631         int status;
13632         int detach = PTHREAD_CREATE_DETACHED;
13633
13634 #if HAVE_PTHREADS > 4
13635         /* Final pthreads */
13636         pthread_attr_t attr;
13637
13638         status = pthread_attr_init(&attr);
13639         if( status ) return status;
13640
13641 #if HAVE_PTHREADS < 7
13642         status = pthread_attr_setdetachstate(&attr, &detach);
13643         if( status < 0 ) status = errno;
13644 #else
13645         status = pthread_attr_setdetachstate(&attr, detach);
13646 #endif
13647         if( status ) return status;
13648         status = pthread_create( &t, &attr, task, NULL );
13649 #if HAVE_PTHREADS < 7
13650         if( status < 0 ) status = errno;
13651 #endif
13652         if( status ) return status;
13653 #else
13654         /* Draft 4 pthreads */
13655         status = pthread_create( &t, pthread_attr_default, task, NULL );
13656         if( status ) return errno;
13657
13658         /* give thread a chance to complete */
13659         /* it should remain joinable and hence detachable */
13660         sleep( 1 );
13661
13662         status = pthread_detach( &t );
13663         if( status ) return errno;
13664 #endif
13665
13666 #ifdef HAVE_LINUX_THREADS
13667         pthread_kill_other_threads_np();
13668 #endif
13669
13670         return 0;
13671
13672 }
13673
13674 EOF
13675 if { (eval echo configure:13676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13676 then
13677   ol_cv_pthread_lc_r=yes
13678 else
13679   echo "configure: failed program was:" >&5
13680   cat conftest.$ac_ext >&5
13681   rm -fr conftest*
13682   ol_cv_pthread_lc_r=no
13683 fi
13684 rm -fr conftest*
13685 fi
13686
13687
13688                 # restore the LIBS
13689                 LIBS="$ol_LIBS"
13690         
13691 fi
13692
13693 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13694
13695         if test $ol_cv_pthread_lc_r = yes ; then
13696                 ol_link_pthreads="-lc_r"
13697                 ol_link_threads=posix
13698         fi
13699 fi
13700
13701
13702                 # Pthread try link: -threads (ol_cv_pthread_threads)
13703 if test "$ol_link_threads" = no ; then
13704         # try -threads
13705         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13706 echo "configure:13707: checking for pthread link with -threads" >&5
13707 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13708   echo $ac_n "(cached) $ac_c" 1>&6
13709 else
13710   
13711                 # save the flags
13712                 ol_LIBS="$LIBS"
13713                 LIBS="-threads $LIBS"
13714
13715                 if test "$cross_compiling" = yes; then
13716   cat > conftest.$ac_ext <<EOF
13717 #line 13718 "configure"
13718 #include "confdefs.h"
13719 /* pthread test headers */
13720 #include <pthread.h>
13721 #if HAVE_PTHREADS < 7
13722 #include <errno.h>
13723 #endif
13724 #ifndef NULL
13725 #define NULL (void*)0
13726 #endif
13727
13728 static void *task(p)
13729         void *p;
13730 {
13731         return (void *) (p == NULL);
13732 }
13733
13734 int main() {
13735
13736         /* pthread test function */
13737 #ifndef PTHREAD_CREATE_DETACHED
13738 #define PTHREAD_CREATE_DETACHED 1
13739 #endif
13740         pthread_t t;
13741         int status;
13742         int detach = PTHREAD_CREATE_DETACHED;
13743
13744 #if HAVE_PTHREADS > 4
13745         /* Final pthreads */
13746         pthread_attr_t attr;
13747
13748         status = pthread_attr_init(&attr);
13749         if( status ) return status;
13750
13751 #if HAVE_PTHREADS < 7
13752         status = pthread_attr_setdetachstate(&attr, &detach);
13753         if( status < 0 ) status = errno;
13754 #else
13755         status = pthread_attr_setdetachstate(&attr, detach);
13756 #endif
13757         if( status ) return status;
13758         status = pthread_create( &t, &attr, task, NULL );
13759 #if HAVE_PTHREADS < 7
13760         if( status < 0 ) status = errno;
13761 #endif
13762         if( status ) return status;
13763 #else
13764         /* Draft 4 pthreads */
13765         status = pthread_create( &t, pthread_attr_default, task, NULL );
13766         if( status ) return errno;
13767
13768         /* give thread a chance to complete */
13769         /* it should remain joinable and hence detachable */
13770         sleep( 1 );
13771
13772         status = pthread_detach( &t );
13773         if( status ) return errno;
13774 #endif
13775
13776 #ifdef HAVE_LINUX_THREADS
13777         pthread_kill_other_threads_np();
13778 #endif
13779
13780         return 0;
13781
13782 ; return 0; }
13783 EOF
13784 if { (eval echo configure:13785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13785   rm -rf conftest*
13786   ol_cv_pthread_threads=yes
13787 else
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -rf conftest*
13791   ol_cv_pthread_threads=no
13792 fi
13793 rm -f conftest*
13794 else
13795   cat > conftest.$ac_ext <<EOF
13796 #line 13797 "configure"
13797 #include "confdefs.h"
13798 /* pthread test headers */
13799 #include <pthread.h>
13800 #if HAVE_PTHREADS < 7
13801 #include <errno.h>
13802 #endif
13803 #ifndef NULL
13804 #define NULL (void*)0
13805 #endif
13806
13807 static void *task(p)
13808         void *p;
13809 {
13810         return (void *) (p == NULL);
13811 }
13812
13813
13814 int main(argc, argv)
13815         int argc;
13816         char **argv;
13817 {
13818
13819         /* pthread test function */
13820 #ifndef PTHREAD_CREATE_DETACHED
13821 #define PTHREAD_CREATE_DETACHED 1
13822 #endif
13823         pthread_t t;
13824         int status;
13825         int detach = PTHREAD_CREATE_DETACHED;
13826
13827 #if HAVE_PTHREADS > 4
13828         /* Final pthreads */
13829         pthread_attr_t attr;
13830
13831         status = pthread_attr_init(&attr);
13832         if( status ) return status;
13833
13834 #if HAVE_PTHREADS < 7
13835         status = pthread_attr_setdetachstate(&attr, &detach);
13836         if( status < 0 ) status = errno;
13837 #else
13838         status = pthread_attr_setdetachstate(&attr, detach);
13839 #endif
13840         if( status ) return status;
13841         status = pthread_create( &t, &attr, task, NULL );
13842 #if HAVE_PTHREADS < 7
13843         if( status < 0 ) status = errno;
13844 #endif
13845         if( status ) return status;
13846 #else
13847         /* Draft 4 pthreads */
13848         status = pthread_create( &t, pthread_attr_default, task, NULL );
13849         if( status ) return errno;
13850
13851         /* give thread a chance to complete */
13852         /* it should remain joinable and hence detachable */
13853         sleep( 1 );
13854
13855         status = pthread_detach( &t );
13856         if( status ) return errno;
13857 #endif
13858
13859 #ifdef HAVE_LINUX_THREADS
13860         pthread_kill_other_threads_np();
13861 #endif
13862
13863         return 0;
13864
13865 }
13866
13867 EOF
13868 if { (eval echo configure:13869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13869 then
13870   ol_cv_pthread_threads=yes
13871 else
13872   echo "configure: failed program was:" >&5
13873   cat conftest.$ac_ext >&5
13874   rm -fr conftest*
13875   ol_cv_pthread_threads=no
13876 fi
13877 rm -fr conftest*
13878 fi
13879
13880
13881                 # restore the LIBS
13882                 LIBS="$ol_LIBS"
13883         
13884 fi
13885
13886 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13887
13888         if test $ol_cv_pthread_threads = yes ; then
13889                 ol_link_pthreads="-threads"
13890                 ol_link_threads=posix
13891         fi
13892 fi
13893
13894
13895                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13896 if test "$ol_link_threads" = no ; then
13897         # try -lpthreads -lmach -lexc -lc_r
13898         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13899 echo "configure:13900: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13900 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13901   echo $ac_n "(cached) $ac_c" 1>&6
13902 else
13903   
13904                 # save the flags
13905                 ol_LIBS="$LIBS"
13906                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13907
13908                 if test "$cross_compiling" = yes; then
13909   cat > conftest.$ac_ext <<EOF
13910 #line 13911 "configure"
13911 #include "confdefs.h"
13912 /* pthread test headers */
13913 #include <pthread.h>
13914 #if HAVE_PTHREADS < 7
13915 #include <errno.h>
13916 #endif
13917 #ifndef NULL
13918 #define NULL (void*)0
13919 #endif
13920
13921 static void *task(p)
13922         void *p;
13923 {
13924         return (void *) (p == NULL);
13925 }
13926
13927 int main() {
13928
13929         /* pthread test function */
13930 #ifndef PTHREAD_CREATE_DETACHED
13931 #define PTHREAD_CREATE_DETACHED 1
13932 #endif
13933         pthread_t t;
13934         int status;
13935         int detach = PTHREAD_CREATE_DETACHED;
13936
13937 #if HAVE_PTHREADS > 4
13938         /* Final pthreads */
13939         pthread_attr_t attr;
13940
13941         status = pthread_attr_init(&attr);
13942         if( status ) return status;
13943
13944 #if HAVE_PTHREADS < 7
13945         status = pthread_attr_setdetachstate(&attr, &detach);
13946         if( status < 0 ) status = errno;
13947 #else
13948         status = pthread_attr_setdetachstate(&attr, detach);
13949 #endif
13950         if( status ) return status;
13951         status = pthread_create( &t, &attr, task, NULL );
13952 #if HAVE_PTHREADS < 7
13953         if( status < 0 ) status = errno;
13954 #endif
13955         if( status ) return status;
13956 #else
13957         /* Draft 4 pthreads */
13958         status = pthread_create( &t, pthread_attr_default, task, NULL );
13959         if( status ) return errno;
13960
13961         /* give thread a chance to complete */
13962         /* it should remain joinable and hence detachable */
13963         sleep( 1 );
13964
13965         status = pthread_detach( &t );
13966         if( status ) return errno;
13967 #endif
13968
13969 #ifdef HAVE_LINUX_THREADS
13970         pthread_kill_other_threads_np();
13971 #endif
13972
13973         return 0;
13974
13975 ; return 0; }
13976 EOF
13977 if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13978   rm -rf conftest*
13979   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13980 else
13981   echo "configure: failed program was:" >&5
13982   cat conftest.$ac_ext >&5
13983   rm -rf conftest*
13984   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13985 fi
13986 rm -f conftest*
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991 /* pthread test headers */
13992 #include <pthread.h>
13993 #if HAVE_PTHREADS < 7
13994 #include <errno.h>
13995 #endif
13996 #ifndef NULL
13997 #define NULL (void*)0
13998 #endif
13999
14000 static void *task(p)
14001         void *p;
14002 {
14003         return (void *) (p == NULL);
14004 }
14005
14006
14007 int main(argc, argv)
14008         int argc;
14009         char **argv;
14010 {
14011
14012         /* pthread test function */
14013 #ifndef PTHREAD_CREATE_DETACHED
14014 #define PTHREAD_CREATE_DETACHED 1
14015 #endif
14016         pthread_t t;
14017         int status;
14018         int detach = PTHREAD_CREATE_DETACHED;
14019
14020 #if HAVE_PTHREADS > 4
14021         /* Final pthreads */
14022         pthread_attr_t attr;
14023
14024         status = pthread_attr_init(&attr);
14025         if( status ) return status;
14026
14027 #if HAVE_PTHREADS < 7
14028         status = pthread_attr_setdetachstate(&attr, &detach);
14029         if( status < 0 ) status = errno;
14030 #else
14031         status = pthread_attr_setdetachstate(&attr, detach);
14032 #endif
14033         if( status ) return status;
14034         status = pthread_create( &t, &attr, task, NULL );
14035 #if HAVE_PTHREADS < 7
14036         if( status < 0 ) status = errno;
14037 #endif
14038         if( status ) return status;
14039 #else
14040         /* Draft 4 pthreads */
14041         status = pthread_create( &t, pthread_attr_default, task, NULL );
14042         if( status ) return errno;
14043
14044         /* give thread a chance to complete */
14045         /* it should remain joinable and hence detachable */
14046         sleep( 1 );
14047
14048         status = pthread_detach( &t );
14049         if( status ) return errno;
14050 #endif
14051
14052 #ifdef HAVE_LINUX_THREADS
14053         pthread_kill_other_threads_np();
14054 #endif
14055
14056         return 0;
14057
14058 }
14059
14060 EOF
14061 if { (eval echo configure:14062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14062 then
14063   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14064 else
14065   echo "configure: failed program was:" >&5
14066   cat conftest.$ac_ext >&5
14067   rm -fr conftest*
14068   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14069 fi
14070 rm -fr conftest*
14071 fi
14072
14073
14074                 # restore the LIBS
14075                 LIBS="$ol_LIBS"
14076         
14077 fi
14078
14079 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14080
14081         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14082                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14083                 ol_link_threads=posix
14084         fi
14085 fi
14086
14087                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14088 if test "$ol_link_threads" = no ; then
14089         # try -lpthreads -lmach -lexc
14090         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14091 echo "configure:14092: checking for pthread link with -lpthreads -lmach -lexc" >&5
14092 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14093   echo $ac_n "(cached) $ac_c" 1>&6
14094 else
14095   
14096                 # save the flags
14097                 ol_LIBS="$LIBS"
14098                 LIBS="-lpthreads -lmach -lexc $LIBS"
14099
14100                 if test "$cross_compiling" = yes; then
14101   cat > conftest.$ac_ext <<EOF
14102 #line 14103 "configure"
14103 #include "confdefs.h"
14104 /* pthread test headers */
14105 #include <pthread.h>
14106 #if HAVE_PTHREADS < 7
14107 #include <errno.h>
14108 #endif
14109 #ifndef NULL
14110 #define NULL (void*)0
14111 #endif
14112
14113 static void *task(p)
14114         void *p;
14115 {
14116         return (void *) (p == NULL);
14117 }
14118
14119 int main() {
14120
14121         /* pthread test function */
14122 #ifndef PTHREAD_CREATE_DETACHED
14123 #define PTHREAD_CREATE_DETACHED 1
14124 #endif
14125         pthread_t t;
14126         int status;
14127         int detach = PTHREAD_CREATE_DETACHED;
14128
14129 #if HAVE_PTHREADS > 4
14130         /* Final pthreads */
14131         pthread_attr_t attr;
14132
14133         status = pthread_attr_init(&attr);
14134         if( status ) return status;
14135
14136 #if HAVE_PTHREADS < 7
14137         status = pthread_attr_setdetachstate(&attr, &detach);
14138         if( status < 0 ) status = errno;
14139 #else
14140         status = pthread_attr_setdetachstate(&attr, detach);
14141 #endif
14142         if( status ) return status;
14143         status = pthread_create( &t, &attr, task, NULL );
14144 #if HAVE_PTHREADS < 7
14145         if( status < 0 ) status = errno;
14146 #endif
14147         if( status ) return status;
14148 #else
14149         /* Draft 4 pthreads */
14150         status = pthread_create( &t, pthread_attr_default, task, NULL );
14151         if( status ) return errno;
14152
14153         /* give thread a chance to complete */
14154         /* it should remain joinable and hence detachable */
14155         sleep( 1 );
14156
14157         status = pthread_detach( &t );
14158         if( status ) return errno;
14159 #endif
14160
14161 #ifdef HAVE_LINUX_THREADS
14162         pthread_kill_other_threads_np();
14163 #endif
14164
14165         return 0;
14166
14167 ; return 0; }
14168 EOF
14169 if { (eval echo configure:14170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14170   rm -rf conftest*
14171   ol_cv_pthread_lpthreads_lmach_lexc=yes
14172 else
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -rf conftest*
14176   ol_cv_pthread_lpthreads_lmach_lexc=no
14177 fi
14178 rm -f conftest*
14179 else
14180   cat > conftest.$ac_ext <<EOF
14181 #line 14182 "configure"
14182 #include "confdefs.h"
14183 /* pthread test headers */
14184 #include <pthread.h>
14185 #if HAVE_PTHREADS < 7
14186 #include <errno.h>
14187 #endif
14188 #ifndef NULL
14189 #define NULL (void*)0
14190 #endif
14191
14192 static void *task(p)
14193         void *p;
14194 {
14195         return (void *) (p == NULL);
14196 }
14197
14198
14199 int main(argc, argv)
14200         int argc;
14201         char **argv;
14202 {
14203
14204         /* pthread test function */
14205 #ifndef PTHREAD_CREATE_DETACHED
14206 #define PTHREAD_CREATE_DETACHED 1
14207 #endif
14208         pthread_t t;
14209         int status;
14210         int detach = PTHREAD_CREATE_DETACHED;
14211
14212 #if HAVE_PTHREADS > 4
14213         /* Final pthreads */
14214         pthread_attr_t attr;
14215
14216         status = pthread_attr_init(&attr);
14217         if( status ) return status;
14218
14219 #if HAVE_PTHREADS < 7
14220         status = pthread_attr_setdetachstate(&attr, &detach);
14221         if( status < 0 ) status = errno;
14222 #else
14223         status = pthread_attr_setdetachstate(&attr, detach);
14224 #endif
14225         if( status ) return status;
14226         status = pthread_create( &t, &attr, task, NULL );
14227 #if HAVE_PTHREADS < 7
14228         if( status < 0 ) status = errno;
14229 #endif
14230         if( status ) return status;
14231 #else
14232         /* Draft 4 pthreads */
14233         status = pthread_create( &t, pthread_attr_default, task, NULL );
14234         if( status ) return errno;
14235
14236         /* give thread a chance to complete */
14237         /* it should remain joinable and hence detachable */
14238         sleep( 1 );
14239
14240         status = pthread_detach( &t );
14241         if( status ) return errno;
14242 #endif
14243
14244 #ifdef HAVE_LINUX_THREADS
14245         pthread_kill_other_threads_np();
14246 #endif
14247
14248         return 0;
14249
14250 }
14251
14252 EOF
14253 if { (eval echo configure:14254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14254 then
14255   ol_cv_pthread_lpthreads_lmach_lexc=yes
14256 else
14257   echo "configure: failed program was:" >&5
14258   cat conftest.$ac_ext >&5
14259   rm -fr conftest*
14260   ol_cv_pthread_lpthreads_lmach_lexc=no
14261 fi
14262 rm -fr conftest*
14263 fi
14264
14265
14266                 # restore the LIBS
14267                 LIBS="$ol_LIBS"
14268         
14269 fi
14270
14271 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14272
14273         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14274                 ol_link_pthreads="-lpthreads -lmach -lexc"
14275                 ol_link_threads=posix
14276         fi
14277 fi
14278
14279                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14280 if test "$ol_link_threads" = no ; then
14281         # try -lpthreads -lexc
14282         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14283 echo "configure:14284: checking for pthread link with -lpthreads -lexc" >&5
14284 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14285   echo $ac_n "(cached) $ac_c" 1>&6
14286 else
14287   
14288                 # save the flags
14289                 ol_LIBS="$LIBS"
14290                 LIBS="-lpthreads -lexc $LIBS"
14291
14292                 if test "$cross_compiling" = yes; then
14293   cat > conftest.$ac_ext <<EOF
14294 #line 14295 "configure"
14295 #include "confdefs.h"
14296 /* pthread test headers */
14297 #include <pthread.h>
14298 #if HAVE_PTHREADS < 7
14299 #include <errno.h>
14300 #endif
14301 #ifndef NULL
14302 #define NULL (void*)0
14303 #endif
14304
14305 static void *task(p)
14306         void *p;
14307 {
14308         return (void *) (p == NULL);
14309 }
14310
14311 int main() {
14312
14313         /* pthread test function */
14314 #ifndef PTHREAD_CREATE_DETACHED
14315 #define PTHREAD_CREATE_DETACHED 1
14316 #endif
14317         pthread_t t;
14318         int status;
14319         int detach = PTHREAD_CREATE_DETACHED;
14320
14321 #if HAVE_PTHREADS > 4
14322         /* Final pthreads */
14323         pthread_attr_t attr;
14324
14325         status = pthread_attr_init(&attr);
14326         if( status ) return status;
14327
14328 #if HAVE_PTHREADS < 7
14329         status = pthread_attr_setdetachstate(&attr, &detach);
14330         if( status < 0 ) status = errno;
14331 #else
14332         status = pthread_attr_setdetachstate(&attr, detach);
14333 #endif
14334         if( status ) return status;
14335         status = pthread_create( &t, &attr, task, NULL );
14336 #if HAVE_PTHREADS < 7
14337         if( status < 0 ) status = errno;
14338 #endif
14339         if( status ) return status;
14340 #else
14341         /* Draft 4 pthreads */
14342         status = pthread_create( &t, pthread_attr_default, task, NULL );
14343         if( status ) return errno;
14344
14345         /* give thread a chance to complete */
14346         /* it should remain joinable and hence detachable */
14347         sleep( 1 );
14348
14349         status = pthread_detach( &t );
14350         if( status ) return errno;
14351 #endif
14352
14353 #ifdef HAVE_LINUX_THREADS
14354         pthread_kill_other_threads_np();
14355 #endif
14356
14357         return 0;
14358
14359 ; return 0; }
14360 EOF
14361 if { (eval echo configure:14362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14362   rm -rf conftest*
14363   ol_cv_pthread_lpthreads_lexc=yes
14364 else
14365   echo "configure: failed program was:" >&5
14366   cat conftest.$ac_ext >&5
14367   rm -rf conftest*
14368   ol_cv_pthread_lpthreads_lexc=no
14369 fi
14370 rm -f conftest*
14371 else
14372   cat > conftest.$ac_ext <<EOF
14373 #line 14374 "configure"
14374 #include "confdefs.h"
14375 /* pthread test headers */
14376 #include <pthread.h>
14377 #if HAVE_PTHREADS < 7
14378 #include <errno.h>
14379 #endif
14380 #ifndef NULL
14381 #define NULL (void*)0
14382 #endif
14383
14384 static void *task(p)
14385         void *p;
14386 {
14387         return (void *) (p == NULL);
14388 }
14389
14390
14391 int main(argc, argv)
14392         int argc;
14393         char **argv;
14394 {
14395
14396         /* pthread test function */
14397 #ifndef PTHREAD_CREATE_DETACHED
14398 #define PTHREAD_CREATE_DETACHED 1
14399 #endif
14400         pthread_t t;
14401         int status;
14402         int detach = PTHREAD_CREATE_DETACHED;
14403
14404 #if HAVE_PTHREADS > 4
14405         /* Final pthreads */
14406         pthread_attr_t attr;
14407
14408         status = pthread_attr_init(&attr);
14409         if( status ) return status;
14410
14411 #if HAVE_PTHREADS < 7
14412         status = pthread_attr_setdetachstate(&attr, &detach);
14413         if( status < 0 ) status = errno;
14414 #else
14415         status = pthread_attr_setdetachstate(&attr, detach);
14416 #endif
14417         if( status ) return status;
14418         status = pthread_create( &t, &attr, task, NULL );
14419 #if HAVE_PTHREADS < 7
14420         if( status < 0 ) status = errno;
14421 #endif
14422         if( status ) return status;
14423 #else
14424         /* Draft 4 pthreads */
14425         status = pthread_create( &t, pthread_attr_default, task, NULL );
14426         if( status ) return errno;
14427
14428         /* give thread a chance to complete */
14429         /* it should remain joinable and hence detachable */
14430         sleep( 1 );
14431
14432         status = pthread_detach( &t );
14433         if( status ) return errno;
14434 #endif
14435
14436 #ifdef HAVE_LINUX_THREADS
14437         pthread_kill_other_threads_np();
14438 #endif
14439
14440         return 0;
14441
14442 }
14443
14444 EOF
14445 if { (eval echo configure:14446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14446 then
14447   ol_cv_pthread_lpthreads_lexc=yes
14448 else
14449   echo "configure: failed program was:" >&5
14450   cat conftest.$ac_ext >&5
14451   rm -fr conftest*
14452   ol_cv_pthread_lpthreads_lexc=no
14453 fi
14454 rm -fr conftest*
14455 fi
14456
14457
14458                 # restore the LIBS
14459                 LIBS="$ol_LIBS"
14460         
14461 fi
14462
14463 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14464
14465         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14466                 ol_link_pthreads="-lpthreads -lexc"
14467                 ol_link_threads=posix
14468         fi
14469 fi
14470
14471
14472                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14473 if test "$ol_link_threads" = no ; then
14474         # try -lpthreads
14475         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14476 echo "configure:14477: checking for pthread link with -lpthreads" >&5
14477 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14478   echo $ac_n "(cached) $ac_c" 1>&6
14479 else
14480   
14481                 # save the flags
14482                 ol_LIBS="$LIBS"
14483                 LIBS="-lpthreads $LIBS"
14484
14485                 if test "$cross_compiling" = yes; then
14486   cat > conftest.$ac_ext <<EOF
14487 #line 14488 "configure"
14488 #include "confdefs.h"
14489 /* pthread test headers */
14490 #include <pthread.h>
14491 #if HAVE_PTHREADS < 7
14492 #include <errno.h>
14493 #endif
14494 #ifndef NULL
14495 #define NULL (void*)0
14496 #endif
14497
14498 static void *task(p)
14499         void *p;
14500 {
14501         return (void *) (p == NULL);
14502 }
14503
14504 int main() {
14505
14506         /* pthread test function */
14507 #ifndef PTHREAD_CREATE_DETACHED
14508 #define PTHREAD_CREATE_DETACHED 1
14509 #endif
14510         pthread_t t;
14511         int status;
14512         int detach = PTHREAD_CREATE_DETACHED;
14513
14514 #if HAVE_PTHREADS > 4
14515         /* Final pthreads */
14516         pthread_attr_t attr;
14517
14518         status = pthread_attr_init(&attr);
14519         if( status ) return status;
14520
14521 #if HAVE_PTHREADS < 7
14522         status = pthread_attr_setdetachstate(&attr, &detach);
14523         if( status < 0 ) status = errno;
14524 #else
14525         status = pthread_attr_setdetachstate(&attr, detach);
14526 #endif
14527         if( status ) return status;
14528         status = pthread_create( &t, &attr, task, NULL );
14529 #if HAVE_PTHREADS < 7
14530         if( status < 0 ) status = errno;
14531 #endif
14532         if( status ) return status;
14533 #else
14534         /* Draft 4 pthreads */
14535         status = pthread_create( &t, pthread_attr_default, task, NULL );
14536         if( status ) return errno;
14537
14538         /* give thread a chance to complete */
14539         /* it should remain joinable and hence detachable */
14540         sleep( 1 );
14541
14542         status = pthread_detach( &t );
14543         if( status ) return errno;
14544 #endif
14545
14546 #ifdef HAVE_LINUX_THREADS
14547         pthread_kill_other_threads_np();
14548 #endif
14549
14550         return 0;
14551
14552 ; return 0; }
14553 EOF
14554 if { (eval echo configure:14555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14555   rm -rf conftest*
14556   ol_cv_pthread_lib_lpthreads=yes
14557 else
14558   echo "configure: failed program was:" >&5
14559   cat conftest.$ac_ext >&5
14560   rm -rf conftest*
14561   ol_cv_pthread_lib_lpthreads=no
14562 fi
14563 rm -f conftest*
14564 else
14565   cat > conftest.$ac_ext <<EOF
14566 #line 14567 "configure"
14567 #include "confdefs.h"
14568 /* pthread test headers */
14569 #include <pthread.h>
14570 #if HAVE_PTHREADS < 7
14571 #include <errno.h>
14572 #endif
14573 #ifndef NULL
14574 #define NULL (void*)0
14575 #endif
14576
14577 static void *task(p)
14578         void *p;
14579 {
14580         return (void *) (p == NULL);
14581 }
14582
14583
14584 int main(argc, argv)
14585         int argc;
14586         char **argv;
14587 {
14588
14589         /* pthread test function */
14590 #ifndef PTHREAD_CREATE_DETACHED
14591 #define PTHREAD_CREATE_DETACHED 1
14592 #endif
14593         pthread_t t;
14594         int status;
14595         int detach = PTHREAD_CREATE_DETACHED;
14596
14597 #if HAVE_PTHREADS > 4
14598         /* Final pthreads */
14599         pthread_attr_t attr;
14600
14601         status = pthread_attr_init(&attr);
14602         if( status ) return status;
14603
14604 #if HAVE_PTHREADS < 7
14605         status = pthread_attr_setdetachstate(&attr, &detach);
14606         if( status < 0 ) status = errno;
14607 #else
14608         status = pthread_attr_setdetachstate(&attr, detach);
14609 #endif
14610         if( status ) return status;
14611         status = pthread_create( &t, &attr, task, NULL );
14612 #if HAVE_PTHREADS < 7
14613         if( status < 0 ) status = errno;
14614 #endif
14615         if( status ) return status;
14616 #else
14617         /* Draft 4 pthreads */
14618         status = pthread_create( &t, pthread_attr_default, task, NULL );
14619         if( status ) return errno;
14620
14621         /* give thread a chance to complete */
14622         /* it should remain joinable and hence detachable */
14623         sleep( 1 );
14624
14625         status = pthread_detach( &t );
14626         if( status ) return errno;
14627 #endif
14628
14629 #ifdef HAVE_LINUX_THREADS
14630         pthread_kill_other_threads_np();
14631 #endif
14632
14633         return 0;
14634
14635 }
14636
14637 EOF
14638 if { (eval echo configure:14639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14639 then
14640   ol_cv_pthread_lib_lpthreads=yes
14641 else
14642   echo "configure: failed program was:" >&5
14643   cat conftest.$ac_ext >&5
14644   rm -fr conftest*
14645   ol_cv_pthread_lib_lpthreads=no
14646 fi
14647 rm -fr conftest*
14648 fi
14649
14650
14651                 # restore the LIBS
14652                 LIBS="$ol_LIBS"
14653         
14654 fi
14655
14656 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14657
14658         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14659                 ol_link_pthreads="-lpthreads"
14660                 ol_link_threads=posix
14661         fi
14662 fi
14663
14664
14665                 if test $ol_link_threads != no ; then
14666                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14667
14668                                                 save_CPPFLAGS="$CPPFLAGS"
14669                         save_LIBS="$LIBS"
14670                         LIBS="$LTHREAD_LIBS $LIBS"
14671
14672                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14673 do
14674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14675 echo "configure:14676: checking for $ac_func" >&5
14676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14677   echo $ac_n "(cached) $ac_c" 1>&6
14678 else
14679   cat > conftest.$ac_ext <<EOF
14680 #line 14681 "configure"
14681 #include "confdefs.h"
14682 /* System header to define __stub macros and hopefully few prototypes,
14683     which can conflict with char $ac_func(); below.  */
14684 #include <assert.h>
14685 /* Override any gcc2 internal prototype to avoid an error.  */
14686 /* We use char because int might match the return type of a gcc2
14687     builtin and then its argument prototype would still apply.  */
14688 char $ac_func();
14689 char (*f)();
14690
14691 int main() {
14692
14693 /* The GNU C library defines this for functions which it implements
14694     to always fail with ENOSYS.  Some functions are actually named
14695     something starting with __ and the normal name is an alias.  */
14696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14697 choke me
14698 #else
14699 f = $ac_func;
14700 #endif
14701
14702 ; return 0; }
14703 EOF
14704 if { (eval echo configure:14705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14705   rm -rf conftest*
14706   eval "ac_cv_func_$ac_func=yes"
14707 else
14708   echo "configure: failed program was:" >&5
14709   cat conftest.$ac_ext >&5
14710   rm -rf conftest*
14711   eval "ac_cv_func_$ac_func=no"
14712 fi
14713 rm -f conftest*
14714 fi
14715
14716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14717   echo "$ac_t""yes" 1>&6
14718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14719   cat >> confdefs.h <<EOF
14720 #define $ac_tr_func 1
14721 EOF
14722  
14723 else
14724   echo "$ac_t""no" 1>&6
14725 fi
14726 done
14727
14728
14729                         if test $ac_cv_func_sched_yield = no -a \
14730                                 $ac_cv_func_pthread_yield = no -a \
14731                                 $ac_cv_func_thr_yield = no ; then
14732                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14733 echo "configure:14734: checking for sched_yield in -lrt" >&5
14734 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14735 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14736   echo $ac_n "(cached) $ac_c" 1>&6
14737 else
14738   ac_save_LIBS="$LIBS"
14739 LIBS="-lrt  $LIBS"
14740 cat > conftest.$ac_ext <<EOF
14741 #line 14742 "configure"
14742 #include "confdefs.h"
14743 /* Override any gcc2 internal prototype to avoid an error.  */
14744 /* We use char because int might match the return type of a gcc2
14745     builtin and then its argument prototype would still apply.  */
14746 char sched_yield();
14747
14748 int main() {
14749 sched_yield()
14750 ; return 0; }
14751 EOF
14752 if { (eval echo configure:14753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14753   rm -rf conftest*
14754   eval "ac_cv_lib_$ac_lib_var=yes"
14755 else
14756   echo "configure: failed program was:" >&5
14757   cat conftest.$ac_ext >&5
14758   rm -rf conftest*
14759   eval "ac_cv_lib_$ac_lib_var=no"
14760 fi
14761 rm -f conftest*
14762 LIBS="$ac_save_LIBS"
14763
14764 fi
14765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14766   echo "$ac_t""yes" 1>&6
14767   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14768                                         cat >> confdefs.h <<\EOF
14769 #define HAVE_SCHED_YIELD 1
14770 EOF
14771
14772                                         ac_cv_func_sched_yield=yes
14773 else
14774   echo "$ac_t""no" 1>&6
14775 ac_cv_func_sched_yield=no
14776 fi
14777
14778                         fi
14779                         if test $ac_cv_func_sched_yield = no -a \
14780                                 $ac_cv_func_pthread_yield = no -a \
14781                                 "$ac_cv_func_thr_yield" = no ; then
14782                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14783                         fi
14784
14785                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14786 do
14787 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14788 echo "configure:14789: checking for $ac_func" >&5
14789 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14790   echo $ac_n "(cached) $ac_c" 1>&6
14791 else
14792   cat > conftest.$ac_ext <<EOF
14793 #line 14794 "configure"
14794 #include "confdefs.h"
14795 /* System header to define __stub macros and hopefully few prototypes,
14796     which can conflict with char $ac_func(); below.  */
14797 #include <assert.h>
14798 /* Override any gcc2 internal prototype to avoid an error.  */
14799 /* We use char because int might match the return type of a gcc2
14800     builtin and then its argument prototype would still apply.  */
14801 char $ac_func();
14802 char (*f)();
14803
14804 int main() {
14805
14806 /* The GNU C library defines this for functions which it implements
14807     to always fail with ENOSYS.  Some functions are actually named
14808     something starting with __ and the normal name is an alias.  */
14809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14810 choke me
14811 #else
14812 f = $ac_func;
14813 #endif
14814
14815 ; return 0; }
14816 EOF
14817 if { (eval echo configure:14818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14818   rm -rf conftest*
14819   eval "ac_cv_func_$ac_func=yes"
14820 else
14821   echo "configure: failed program was:" >&5
14822   cat conftest.$ac_ext >&5
14823   rm -rf conftest*
14824   eval "ac_cv_func_$ac_func=no"
14825 fi
14826 rm -f conftest*
14827 fi
14828
14829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14830   echo "$ac_t""yes" 1>&6
14831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14832   cat >> confdefs.h <<EOF
14833 #define $ac_tr_func 1
14834 EOF
14835  
14836 else
14837   echo "$ac_t""no" 1>&6
14838 fi
14839 done
14840
14841
14842                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14843 echo "configure:14844: checking for pthread_detach with <pthread.h>" >&5
14844 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14845   echo $ac_n "(cached) $ac_c" 1>&6
14846 else
14847   
14848                                                                 cat > conftest.$ac_ext <<EOF
14849 #line 14850 "configure"
14850 #include "confdefs.h"
14851
14852 #include <pthread.h>
14853 #ifndef NULL
14854 #define NULL (void*)0
14855 #endif
14856
14857 int main() {
14858 pthread_detach(NULL);
14859 ; return 0; }
14860 EOF
14861 if { (eval echo configure:14862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14862   rm -rf conftest*
14863   ol_cv_func_pthread_detach=yes
14864 else
14865   echo "configure: failed program was:" >&5
14866   cat conftest.$ac_ext >&5
14867   rm -rf conftest*
14868   ol_cv_func_pthread_detach=no
14869 fi
14870 rm -f conftest*
14871                         
14872 fi
14873
14874 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14875
14876                         if test $ol_cv_func_pthread_detach = no ; then
14877                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14878                         fi
14879
14880                         cat >> confdefs.h <<\EOF
14881 #define HAVE_PTHREAD_DETACH 1
14882 EOF
14883
14884
14885                                                 for ac_func in \
14886                                 pthread_setconcurrency \
14887                                 pthread_getconcurrency \
14888                                 thr_setconcurrency \
14889                                 thr_getconcurrency \
14890                         
14891 do
14892 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14893 echo "configure:14894: checking for $ac_func" >&5
14894 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14895   echo $ac_n "(cached) $ac_c" 1>&6
14896 else
14897   cat > conftest.$ac_ext <<EOF
14898 #line 14899 "configure"
14899 #include "confdefs.h"
14900 /* System header to define __stub macros and hopefully few prototypes,
14901     which can conflict with char $ac_func(); below.  */
14902 #include <assert.h>
14903 /* Override any gcc2 internal prototype to avoid an error.  */
14904 /* We use char because int might match the return type of a gcc2
14905     builtin and then its argument prototype would still apply.  */
14906 char $ac_func();
14907 char (*f)();
14908
14909 int main() {
14910
14911 /* The GNU C library defines this for functions which it implements
14912     to always fail with ENOSYS.  Some functions are actually named
14913     something starting with __ and the normal name is an alias.  */
14914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14915 choke me
14916 #else
14917 f = $ac_func;
14918 #endif
14919
14920 ; return 0; }
14921 EOF
14922 if { (eval echo configure:14923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14923   rm -rf conftest*
14924   eval "ac_cv_func_$ac_func=yes"
14925 else
14926   echo "configure: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   rm -rf conftest*
14929   eval "ac_cv_func_$ac_func=no"
14930 fi
14931 rm -f conftest*
14932 fi
14933
14934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14935   echo "$ac_t""yes" 1>&6
14936     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14937   cat >> confdefs.h <<EOF
14938 #define $ac_tr_func 1
14939 EOF
14940  
14941 else
14942   echo "$ac_t""no" 1>&6
14943 fi
14944 done
14945
14946
14947                         
14948         for ac_func in pthread_kill_other_threads_np
14949 do
14950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14951 echo "configure:14952: checking for $ac_func" >&5
14952 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14953   echo $ac_n "(cached) $ac_c" 1>&6
14954 else
14955   cat > conftest.$ac_ext <<EOF
14956 #line 14957 "configure"
14957 #include "confdefs.h"
14958 /* System header to define __stub macros and hopefully few prototypes,
14959     which can conflict with char $ac_func(); below.  */
14960 #include <assert.h>
14961 /* Override any gcc2 internal prototype to avoid an error.  */
14962 /* We use char because int might match the return type of a gcc2
14963     builtin and then its argument prototype would still apply.  */
14964 char $ac_func();
14965 char (*f)();
14966
14967 int main() {
14968
14969 /* The GNU C library defines this for functions which it implements
14970     to always fail with ENOSYS.  Some functions are actually named
14971     something starting with __ and the normal name is an alias.  */
14972 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14973 choke me
14974 #else
14975 f = $ac_func;
14976 #endif
14977
14978 ; return 0; }
14979 EOF
14980 if { (eval echo configure:14981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14981   rm -rf conftest*
14982   eval "ac_cv_func_$ac_func=yes"
14983 else
14984   echo "configure: failed program was:" >&5
14985   cat conftest.$ac_ext >&5
14986   rm -rf conftest*
14987   eval "ac_cv_func_$ac_func=no"
14988 fi
14989 rm -f conftest*
14990 fi
14991
14992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14993   echo "$ac_t""yes" 1>&6
14994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14995   cat >> confdefs.h <<EOF
14996 #define $ac_tr_func 1
14997 EOF
14998  
14999 else
15000   echo "$ac_t""no" 1>&6
15001 fi
15002 done
15003
15004         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15005 echo "configure:15006: checking for LinuxThreads implementation" >&5
15006 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15007   echo $ac_n "(cached) $ac_c" 1>&6
15008 else
15009   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15010 fi
15011
15012 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15013
15014                         
15015         
15016         
15017         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15018 echo "configure:15019: checking for LinuxThreads consistency" >&5
15019 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15020   echo $ac_n "(cached) $ac_c" 1>&6
15021 else
15022   
15023                 if test $ol_cv_header_linux_threads = yes -a \
15024                         $ol_cv_sys_linux_threads = yes; then
15025                         ol_cv_linux_threads=yes
15026                 elif test $ol_cv_header_linux_threads = no -a \
15027                         $ol_cv_sys_linux_threads = no; then
15028                         ol_cv_linux_threads=no
15029                 else
15030                         ol_cv_linux_threads=error
15031                 fi
15032         
15033 fi
15034
15035 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15036
15037
15038                         if test $ol_cv_linux_threads = error; then
15039                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15040                         fi
15041
15042                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15043 echo "configure:15044: checking if pthread_create() works" >&5
15044 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15045   echo $ac_n "(cached) $ac_c" 1>&6
15046 else
15047   
15048                         if test "$cross_compiling" = yes; then
15049                                 ol_cv_pthread_create_works=yes
15050 else
15051   cat > conftest.$ac_ext <<EOF
15052 #line 15053 "configure"
15053 #include "confdefs.h"
15054 /* pthread test headers */
15055 #include <pthread.h>
15056 #if HAVE_PTHREADS < 7
15057 #include <errno.h>
15058 #endif
15059 #ifndef NULL
15060 #define NULL (void*)0
15061 #endif
15062
15063 static void *task(p)
15064         void *p;
15065 {
15066         return (void *) (p == NULL);
15067 }
15068
15069
15070 int main(argc, argv)
15071         int argc;
15072         char **argv;
15073 {
15074
15075         /* pthread test function */
15076 #ifndef PTHREAD_CREATE_DETACHED
15077 #define PTHREAD_CREATE_DETACHED 1
15078 #endif
15079         pthread_t t;
15080         int status;
15081         int detach = PTHREAD_CREATE_DETACHED;
15082
15083 #if HAVE_PTHREADS > 4
15084         /* Final pthreads */
15085         pthread_attr_t attr;
15086
15087         status = pthread_attr_init(&attr);
15088         if( status ) return status;
15089
15090 #if HAVE_PTHREADS < 7
15091         status = pthread_attr_setdetachstate(&attr, &detach);
15092         if( status < 0 ) status = errno;
15093 #else
15094         status = pthread_attr_setdetachstate(&attr, detach);
15095 #endif
15096         if( status ) return status;
15097         status = pthread_create( &t, &attr, task, NULL );
15098 #if HAVE_PTHREADS < 7
15099         if( status < 0 ) status = errno;
15100 #endif
15101         if( status ) return status;
15102 #else
15103         /* Draft 4 pthreads */
15104         status = pthread_create( &t, pthread_attr_default, task, NULL );
15105         if( status ) return errno;
15106
15107         /* give thread a chance to complete */
15108         /* it should remain joinable and hence detachable */
15109         sleep( 1 );
15110
15111         status = pthread_detach( &t );
15112         if( status ) return errno;
15113 #endif
15114
15115 #ifdef HAVE_LINUX_THREADS
15116         pthread_kill_other_threads_np();
15117 #endif
15118
15119         return 0;
15120
15121 }
15122
15123 EOF
15124 if { (eval echo configure:15125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15125 then
15126   ol_cv_pthread_create_works=yes
15127 else
15128   echo "configure: failed program was:" >&5
15129   cat conftest.$ac_ext >&5
15130   rm -fr conftest*
15131   ol_cv_pthread_create_works=no
15132 fi
15133 rm -fr conftest*
15134 fi
15135
15136 fi
15137
15138 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15139
15140                         if test $ol_cv_pthread_create_works = no ; then
15141                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15142                         fi
15143
15144                                                 if test $ol_with_yielding_select = auto ; then
15145                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15146 echo "configure:15147: checking if select yields when using pthreads" >&5
15147 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15148   echo $ac_n "(cached) $ac_c" 1>&6
15149 else
15150   
15151                                 if test "$cross_compiling" = yes; then
15152   ol_cv_pthread_select_yields=cross
15153 else
15154   cat > conftest.$ac_ext <<EOF
15155 #line 15156 "configure"
15156 #include "confdefs.h"
15157
15158 #include <sys/types.h>
15159 #include <sys/time.h>
15160 #include <unistd.h>
15161 #include <pthread.h>
15162 #ifndef NULL
15163 #define NULL (void*) 0
15164 #endif
15165
15166 static int fildes[2];
15167
15168 static void *task(p)
15169         void *p;
15170 {
15171         int i;
15172         struct timeval tv;
15173
15174         fd_set rfds;
15175
15176         tv.tv_sec=10;
15177         tv.tv_usec=0;
15178
15179         FD_ZERO(&rfds);
15180         FD_SET(fildes[0], &rfds);
15181
15182         /* we're not interested in any fds */
15183         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15184
15185         if(i < 0) {
15186                 perror("select");
15187                 exit(10);
15188         }
15189
15190         exit(0); /* if we exit here, the select blocked the whole process */
15191 }
15192
15193 int main(argc, argv)
15194         int argc;
15195         char **argv;
15196 {
15197         pthread_t t;
15198
15199         /* create a pipe to select */
15200         if(pipe(&fildes[0])) {
15201                 perror("select");
15202                 exit(1);
15203         }
15204
15205 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15206         (void) pthread_setconcurrency(2);
15207 #else
15208 #ifdef HAVE_THR_SETCONCURRENCY
15209         /* Set Solaris LWP concurrency to 2 */
15210         thr_setconcurrency(2);
15211 #endif
15212 #endif
15213
15214 #if HAVE_PTHREADS < 6
15215         pthread_create(&t, pthread_attr_default, task, NULL);
15216 #else
15217         pthread_create(&t, NULL, task, NULL);
15218 #endif
15219
15220         /* make sure task runs first */
15221 #if HAVE_THR_YIELD
15222         thr_yield();
15223 #elif defined( HAVE_SCHED_YIELD )
15224         sched_yield();
15225 #elif defined( HAVE_PTHREAD_YIELD )
15226         pthread_yield();
15227 #endif
15228
15229         exit(2);
15230 }
15231 EOF
15232 if { (eval echo configure:15233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15233 then
15234   ol_cv_pthread_select_yields=no
15235 else
15236   echo "configure: failed program was:" >&5
15237   cat conftest.$ac_ext >&5
15238   rm -fr conftest*
15239   ol_cv_pthread_select_yields=yes
15240 fi
15241 rm -fr conftest*
15242 fi
15243
15244 fi
15245
15246 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15247
15248                                 if test $ol_cv_pthread_select_yields = cross ; then
15249                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15250                                 fi
15251
15252                                 if test $ol_cv_pthread_select_yields = yes ; then
15253                                         ol_with_yielding_select=yes
15254                                 fi
15255                         fi
15256
15257                                                 CPPFLAGS="$save_CPPFLAGS"
15258                         LIBS="$save_LIBS"
15259                 else
15260                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15261                 fi
15262         fi
15263
15264         if test $ol_with_threads = posix ; then
15265                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15266         fi
15267 fi
15268
15269 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15270         -o $ol_with_threads = mach ; then
15271
15272                 for ac_hdr in mach/cthreads.h cthreads.h
15273 do
15274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15276 echo "configure:15277: checking for $ac_hdr" >&5
15277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15278   echo $ac_n "(cached) $ac_c" 1>&6
15279 else
15280   cat > conftest.$ac_ext <<EOF
15281 #line 15282 "configure"
15282 #include "confdefs.h"
15283 #include <$ac_hdr>
15284 EOF
15285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15286 { (eval echo configure:15287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15288 if test -z "$ac_err"; then
15289   rm -rf conftest*
15290   eval "ac_cv_header_$ac_safe=yes"
15291 else
15292   echo "$ac_err" >&5
15293   echo "configure: failed program was:" >&5
15294   cat conftest.$ac_ext >&5
15295   rm -rf conftest*
15296   eval "ac_cv_header_$ac_safe=no"
15297 fi
15298 rm -f conftest*
15299 fi
15300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15301   echo "$ac_t""yes" 1>&6
15302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15303   cat >> confdefs.h <<EOF
15304 #define $ac_tr_hdr 1
15305 EOF
15306  
15307 else
15308   echo "$ac_t""no" 1>&6
15309 fi
15310 done
15311
15312         if test $ac_cv_header_mach_cthreads_h = yes ; then
15313                 ol_with_threads=found
15314
15315                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15316 echo "configure:15317: checking for cthread_fork" >&5
15317 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15318   echo $ac_n "(cached) $ac_c" 1>&6
15319 else
15320   cat > conftest.$ac_ext <<EOF
15321 #line 15322 "configure"
15322 #include "confdefs.h"
15323 /* System header to define __stub macros and hopefully few prototypes,
15324     which can conflict with char cthread_fork(); below.  */
15325 #include <assert.h>
15326 /* Override any gcc2 internal prototype to avoid an error.  */
15327 /* We use char because int might match the return type of a gcc2
15328     builtin and then its argument prototype would still apply.  */
15329 char cthread_fork();
15330 char (*f)();
15331
15332 int main() {
15333
15334 /* The GNU C library defines this for functions which it implements
15335     to always fail with ENOSYS.  Some functions are actually named
15336     something starting with __ and the normal name is an alias.  */
15337 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15338 choke me
15339 #else
15340 f = cthread_fork;
15341 #endif
15342
15343 ; return 0; }
15344 EOF
15345 if { (eval echo configure:15346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15346   rm -rf conftest*
15347   eval "ac_cv_func_cthread_fork=yes"
15348 else
15349   echo "configure: failed program was:" >&5
15350   cat conftest.$ac_ext >&5
15351   rm -rf conftest*
15352   eval "ac_cv_func_cthread_fork=no"
15353 fi
15354 rm -f conftest*
15355 fi
15356
15357 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15358   echo "$ac_t""yes" 1>&6
15359   ol_link_threads=yes
15360 else
15361   echo "$ac_t""no" 1>&6
15362 fi
15363
15364
15365                 if test $ol_link_threads = no ; then
15366                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15367 echo "configure:15368: checking for cthread_fork with -all_load" >&5
15368 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15369   echo $ac_n "(cached) $ac_c" 1>&6
15370 else
15371   
15372                                                                 save_LIBS="$LIBS"
15373                                 LIBS="-all_load $LIBS"
15374                                 cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 #include <mach/cthreads.h>
15378 int main() {
15379
15380                                         cthread_fork((void *)0, (void *)0);
15381                                         
15382 ; return 0; }
15383 EOF
15384 if { (eval echo configure:15385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15385   rm -rf conftest*
15386   ol_cv_cthread_all_load=yes
15387 else
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -rf conftest*
15391   ol_cv_cthread_all_load=no
15392 fi
15393 rm -f conftest*
15394                                                                 LIBS="$save_LIBS"
15395                         
15396 fi
15397
15398 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15399
15400                         if test $ol_cv_cthread_all_load = yes ; then
15401                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15402                                 ol_link_threads=mach
15403                                 ol_with_threads=found
15404                         fi
15405                 fi
15406
15407         elif test $ac_cv_header_cthreads_h = yes ; then
15408                                 
15409                 ol_with_threads=found
15410  
15411                                 save_LIBS="$LIBS"
15412                 LIBS="$LIBS -lthreads"
15413                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15414 echo "configure:15415: checking for cthread_fork" >&5
15415 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15416   echo $ac_n "(cached) $ac_c" 1>&6
15417 else
15418   cat > conftest.$ac_ext <<EOF
15419 #line 15420 "configure"
15420 #include "confdefs.h"
15421 /* System header to define __stub macros and hopefully few prototypes,
15422     which can conflict with char cthread_fork(); below.  */
15423 #include <assert.h>
15424 /* Override any gcc2 internal prototype to avoid an error.  */
15425 /* We use char because int might match the return type of a gcc2
15426     builtin and then its argument prototype would still apply.  */
15427 char cthread_fork();
15428 char (*f)();
15429
15430 int main() {
15431
15432 /* The GNU C library defines this for functions which it implements
15433     to always fail with ENOSYS.  Some functions are actually named
15434     something starting with __ and the normal name is an alias.  */
15435 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15436 choke me
15437 #else
15438 f = cthread_fork;
15439 #endif
15440
15441 ; return 0; }
15442 EOF
15443 if { (eval echo configure:15444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15444   rm -rf conftest*
15445   eval "ac_cv_func_cthread_fork=yes"
15446 else
15447   echo "configure: failed program was:" >&5
15448   cat conftest.$ac_ext >&5
15449   rm -rf conftest*
15450   eval "ac_cv_func_cthread_fork=no"
15451 fi
15452 rm -f conftest*
15453 fi
15454
15455 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15456   echo "$ac_t""yes" 1>&6
15457   ol_link_threads=yes
15458 else
15459   echo "$ac_t""no" 1>&6
15460 fi
15461
15462                 LIBS="$save_LIBS"
15463
15464                 if test $ol_link_threads = yes ; then
15465                         LTHREAD_LIBS="-lthreads"
15466                         ol_link_threads=mach
15467                         ol_with_threads=found
15468                 else
15469                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15470                 fi
15471
15472         elif test $ol_with_threads = mach ; then
15473                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15474         fi
15475
15476         if test $ol_link_threads = mach ; then
15477                 cat >> confdefs.h <<\EOF
15478 #define HAVE_MACH_CTHREADS 1
15479 EOF
15480
15481         elif test $ol_with_threads = found ; then
15482                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15483         fi
15484 fi
15485
15486 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15487         -o $ol_with_threads = pth ; then
15488
15489         for ac_hdr in pth.h
15490 do
15491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15493 echo "configure:15494: checking for $ac_hdr" >&5
15494 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15495   echo $ac_n "(cached) $ac_c" 1>&6
15496 else
15497   cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500 #include <$ac_hdr>
15501 EOF
15502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15503 { (eval echo configure:15504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15505 if test -z "$ac_err"; then
15506   rm -rf conftest*
15507   eval "ac_cv_header_$ac_safe=yes"
15508 else
15509   echo "$ac_err" >&5
15510   echo "configure: failed program was:" >&5
15511   cat conftest.$ac_ext >&5
15512   rm -rf conftest*
15513   eval "ac_cv_header_$ac_safe=no"
15514 fi
15515 rm -f conftest*
15516 fi
15517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15518   echo "$ac_t""yes" 1>&6
15519     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15520   cat >> confdefs.h <<EOF
15521 #define $ac_tr_hdr 1
15522 EOF
15523  
15524 else
15525   echo "$ac_t""no" 1>&6
15526 fi
15527 done
15528
15529
15530         if test $ac_cv_header_pth_h = yes ; then
15531                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15532 echo "configure:15533: checking for pth_version in -lpth" >&5
15533 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15534 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15535   echo $ac_n "(cached) $ac_c" 1>&6
15536 else
15537   ac_save_LIBS="$LIBS"
15538 LIBS="-lpth  $LIBS"
15539 cat > conftest.$ac_ext <<EOF
15540 #line 15541 "configure"
15541 #include "confdefs.h"
15542 /* Override any gcc2 internal prototype to avoid an error.  */
15543 /* We use char because int might match the return type of a gcc2
15544     builtin and then its argument prototype would still apply.  */
15545 char pth_version();
15546
15547 int main() {
15548 pth_version()
15549 ; return 0; }
15550 EOF
15551 if { (eval echo configure:15552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15552   rm -rf conftest*
15553   eval "ac_cv_lib_$ac_lib_var=yes"
15554 else
15555   echo "configure: failed program was:" >&5
15556   cat conftest.$ac_ext >&5
15557   rm -rf conftest*
15558   eval "ac_cv_lib_$ac_lib_var=no"
15559 fi
15560 rm -f conftest*
15561 LIBS="$ac_save_LIBS"
15562
15563 fi
15564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15565   echo "$ac_t""yes" 1>&6
15566   have_pth=yes
15567 else
15568   echo "$ac_t""no" 1>&6
15569 have_pth=no
15570 fi
15571
15572
15573                 if test $have_pth = yes ; then
15574                         cat >> confdefs.h <<\EOF
15575 #define HAVE_GNU_PTH 1
15576 EOF
15577
15578                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15579                         ol_link_threads=pth
15580                         ol_with_threads=found
15581
15582                         if test $ol_with_yielding_select = auto ; then
15583                                 ol_with_yielding_select=yes
15584                         fi
15585                 fi
15586         fi
15587 fi
15588
15589 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15590         -o $ol_with_threads = lwp ; then
15591
15592                 for ac_hdr in thread.h synch.h
15593 do
15594 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15595 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15596 echo "configure:15597: checking for $ac_hdr" >&5
15597 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15598   echo $ac_n "(cached) $ac_c" 1>&6
15599 else
15600   cat > conftest.$ac_ext <<EOF
15601 #line 15602 "configure"
15602 #include "confdefs.h"
15603 #include <$ac_hdr>
15604 EOF
15605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15606 { (eval echo configure:15607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15608 if test -z "$ac_err"; then
15609   rm -rf conftest*
15610   eval "ac_cv_header_$ac_safe=yes"
15611 else
15612   echo "$ac_err" >&5
15613   echo "configure: failed program was:" >&5
15614   cat conftest.$ac_ext >&5
15615   rm -rf conftest*
15616   eval "ac_cv_header_$ac_safe=no"
15617 fi
15618 rm -f conftest*
15619 fi
15620 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15621   echo "$ac_t""yes" 1>&6
15622     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15623   cat >> confdefs.h <<EOF
15624 #define $ac_tr_hdr 1
15625 EOF
15626  
15627 else
15628   echo "$ac_t""no" 1>&6
15629 fi
15630 done
15631
15632         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15633                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15634 echo "configure:15635: checking for thr_create in -lthread" >&5
15635 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15636 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15637   echo $ac_n "(cached) $ac_c" 1>&6
15638 else
15639   ac_save_LIBS="$LIBS"
15640 LIBS="-lthread  $LIBS"
15641 cat > conftest.$ac_ext <<EOF
15642 #line 15643 "configure"
15643 #include "confdefs.h"
15644 /* Override any gcc2 internal prototype to avoid an error.  */
15645 /* We use char because int might match the return type of a gcc2
15646     builtin and then its argument prototype would still apply.  */
15647 char thr_create();
15648
15649 int main() {
15650 thr_create()
15651 ; return 0; }
15652 EOF
15653 if { (eval echo configure:15654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15654   rm -rf conftest*
15655   eval "ac_cv_lib_$ac_lib_var=yes"
15656 else
15657   echo "configure: failed program was:" >&5
15658   cat conftest.$ac_ext >&5
15659   rm -rf conftest*
15660   eval "ac_cv_lib_$ac_lib_var=no"
15661 fi
15662 rm -f conftest*
15663 LIBS="$ac_save_LIBS"
15664
15665 fi
15666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15667   echo "$ac_t""yes" 1>&6
15668   have_thr=yes
15669 else
15670   echo "$ac_t""no" 1>&6
15671 have_thr=no
15672 fi
15673
15674
15675                 if test $have_thr = yes ; then
15676                         cat >> confdefs.h <<\EOF
15677 #define HAVE_THR 1
15678 EOF
15679
15680                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15681                         ol_link_threads=thr
15682
15683                         if test $ol_with_yielding_select = auto ; then
15684                                 ol_with_yielding_select=yes
15685                         fi
15686
15687                                                 for ac_func in \
15688                                 thr_setconcurrency \
15689                                 thr_getconcurrency \
15690                         
15691 do
15692 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15693 echo "configure:15694: checking for $ac_func" >&5
15694 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15695   echo $ac_n "(cached) $ac_c" 1>&6
15696 else
15697   cat > conftest.$ac_ext <<EOF
15698 #line 15699 "configure"
15699 #include "confdefs.h"
15700 /* System header to define __stub macros and hopefully few prototypes,
15701     which can conflict with char $ac_func(); below.  */
15702 #include <assert.h>
15703 /* Override any gcc2 internal prototype to avoid an error.  */
15704 /* We use char because int might match the return type of a gcc2
15705     builtin and then its argument prototype would still apply.  */
15706 char $ac_func();
15707 char (*f)();
15708
15709 int main() {
15710
15711 /* The GNU C library defines this for functions which it implements
15712     to always fail with ENOSYS.  Some functions are actually named
15713     something starting with __ and the normal name is an alias.  */
15714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15715 choke me
15716 #else
15717 f = $ac_func;
15718 #endif
15719
15720 ; return 0; }
15721 EOF
15722 if { (eval echo configure:15723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15723   rm -rf conftest*
15724   eval "ac_cv_func_$ac_func=yes"
15725 else
15726   echo "configure: failed program was:" >&5
15727   cat conftest.$ac_ext >&5
15728   rm -rf conftest*
15729   eval "ac_cv_func_$ac_func=no"
15730 fi
15731 rm -f conftest*
15732 fi
15733
15734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15735   echo "$ac_t""yes" 1>&6
15736     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15737   cat >> confdefs.h <<EOF
15738 #define $ac_tr_func 1
15739 EOF
15740  
15741 else
15742   echo "$ac_t""no" 1>&6
15743 fi
15744 done
15745
15746                 fi
15747         fi
15748
15749                 for ac_hdr in lwp/lwp.h
15750 do
15751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15753 echo "configure:15754: checking for $ac_hdr" >&5
15754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   cat > conftest.$ac_ext <<EOF
15758 #line 15759 "configure"
15759 #include "confdefs.h"
15760 #include <$ac_hdr>
15761 EOF
15762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15763 { (eval echo configure:15764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15765 if test -z "$ac_err"; then
15766   rm -rf conftest*
15767   eval "ac_cv_header_$ac_safe=yes"
15768 else
15769   echo "$ac_err" >&5
15770   echo "configure: failed program was:" >&5
15771   cat conftest.$ac_ext >&5
15772   rm -rf conftest*
15773   eval "ac_cv_header_$ac_safe=no"
15774 fi
15775 rm -f conftest*
15776 fi
15777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15778   echo "$ac_t""yes" 1>&6
15779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15780   cat >> confdefs.h <<EOF
15781 #define $ac_tr_hdr 1
15782 EOF
15783  
15784 else
15785   echo "$ac_t""no" 1>&6
15786 fi
15787 done
15788
15789         if test $ac_cv_header_lwp_lwp_h = yes ; then
15790                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15791 echo "configure:15792: checking for lwp_create in -llwp" >&5
15792 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15793 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   ac_save_LIBS="$LIBS"
15797 LIBS="-llwp  $LIBS"
15798 cat > conftest.$ac_ext <<EOF
15799 #line 15800 "configure"
15800 #include "confdefs.h"
15801 /* Override any gcc2 internal prototype to avoid an error.  */
15802 /* We use char because int might match the return type of a gcc2
15803     builtin and then its argument prototype would still apply.  */
15804 char lwp_create();
15805
15806 int main() {
15807 lwp_create()
15808 ; return 0; }
15809 EOF
15810 if { (eval echo configure:15811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15811   rm -rf conftest*
15812   eval "ac_cv_lib_$ac_lib_var=yes"
15813 else
15814   echo "configure: failed program was:" >&5
15815   cat conftest.$ac_ext >&5
15816   rm -rf conftest*
15817   eval "ac_cv_lib_$ac_lib_var=no"
15818 fi
15819 rm -f conftest*
15820 LIBS="$ac_save_LIBS"
15821
15822 fi
15823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15824   echo "$ac_t""yes" 1>&6
15825   have_lwp=yes
15826 else
15827   echo "$ac_t""no" 1>&6
15828 have_lwp=no
15829 fi
15830
15831
15832                 if test $have_lwp = yes ; then
15833                         cat >> confdefs.h <<\EOF
15834 #define HAVE_LWP 1
15835 EOF
15836
15837                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15838                         ol_link_threads=lwp
15839
15840                         if test $ol_with_yielding_select = auto ; then
15841                                 ol_with_yielding_select=no
15842                         fi
15843                 fi
15844         fi
15845 fi
15846
15847 if test $ol_with_yielding_select = yes ; then
15848         cat >> confdefs.h <<\EOF
15849 #define HAVE_YIELDING_SELECT 1
15850 EOF
15851
15852 fi
15853
15854 if test $ol_with_threads = manual ; then
15855                 ol_link_threads=yes
15856
15857         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15858
15859         for ac_hdr in pthread.h sched.h
15860 do
15861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15863 echo "configure:15864: checking for $ac_hdr" >&5
15864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15865   echo $ac_n "(cached) $ac_c" 1>&6
15866 else
15867   cat > conftest.$ac_ext <<EOF
15868 #line 15869 "configure"
15869 #include "confdefs.h"
15870 #include <$ac_hdr>
15871 EOF
15872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15873 { (eval echo configure:15874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15875 if test -z "$ac_err"; then
15876   rm -rf conftest*
15877   eval "ac_cv_header_$ac_safe=yes"
15878 else
15879   echo "$ac_err" >&5
15880   echo "configure: failed program was:" >&5
15881   cat conftest.$ac_ext >&5
15882   rm -rf conftest*
15883   eval "ac_cv_header_$ac_safe=no"
15884 fi
15885 rm -f conftest*
15886 fi
15887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15888   echo "$ac_t""yes" 1>&6
15889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15890   cat >> confdefs.h <<EOF
15891 #define $ac_tr_hdr 1
15892 EOF
15893  
15894 else
15895   echo "$ac_t""no" 1>&6
15896 fi
15897 done
15898
15899         for ac_func in sched_yield pthread_yield
15900 do
15901 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15902 echo "configure:15903: checking for $ac_func" >&5
15903 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15904   echo $ac_n "(cached) $ac_c" 1>&6
15905 else
15906   cat > conftest.$ac_ext <<EOF
15907 #line 15908 "configure"
15908 #include "confdefs.h"
15909 /* System header to define __stub macros and hopefully few prototypes,
15910     which can conflict with char $ac_func(); below.  */
15911 #include <assert.h>
15912 /* Override any gcc2 internal prototype to avoid an error.  */
15913 /* We use char because int might match the return type of a gcc2
15914     builtin and then its argument prototype would still apply.  */
15915 char $ac_func();
15916 char (*f)();
15917
15918 int main() {
15919
15920 /* The GNU C library defines this for functions which it implements
15921     to always fail with ENOSYS.  Some functions are actually named
15922     something starting with __ and the normal name is an alias.  */
15923 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15924 choke me
15925 #else
15926 f = $ac_func;
15927 #endif
15928
15929 ; return 0; }
15930 EOF
15931 if { (eval echo configure:15932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15932   rm -rf conftest*
15933   eval "ac_cv_func_$ac_func=yes"
15934 else
15935   echo "configure: failed program was:" >&5
15936   cat conftest.$ac_ext >&5
15937   rm -rf conftest*
15938   eval "ac_cv_func_$ac_func=no"
15939 fi
15940 rm -f conftest*
15941 fi
15942
15943 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15944   echo "$ac_t""yes" 1>&6
15945     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15946   cat >> confdefs.h <<EOF
15947 #define $ac_tr_func 1
15948 EOF
15949  
15950 else
15951   echo "$ac_t""no" 1>&6
15952 fi
15953 done
15954
15955         
15956         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15957 echo "configure:15958: checking for LinuxThreads pthread.h" >&5
15958 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   cat > conftest.$ac_ext <<EOF
15962 #line 15963 "configure"
15963 #include "confdefs.h"
15964 #include <pthread.h>
15965 EOF
15966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15967   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15968   rm -rf conftest*
15969   ol_cv_header_linux_threads=yes
15970 else
15971   rm -rf conftest*
15972   ol_cv_header_linux_threads=no
15973 fi
15974 rm -f conftest*
15975
15976                 
15977 fi
15978
15979 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15980         if test $ol_cv_header_linux_threads = yes; then
15981                 cat >> confdefs.h <<\EOF
15982 #define HAVE_LINUX_THREADS 1
15983 EOF
15984
15985         fi
15986
15987
15988         for ac_hdr in mach/cthreads.h
15989 do
15990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15992 echo "configure:15993: checking for $ac_hdr" >&5
15993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15994   echo $ac_n "(cached) $ac_c" 1>&6
15995 else
15996   cat > conftest.$ac_ext <<EOF
15997 #line 15998 "configure"
15998 #include "confdefs.h"
15999 #include <$ac_hdr>
16000 EOF
16001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16002 { (eval echo configure:16003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16004 if test -z "$ac_err"; then
16005   rm -rf conftest*
16006   eval "ac_cv_header_$ac_safe=yes"
16007 else
16008   echo "$ac_err" >&5
16009   echo "configure: failed program was:" >&5
16010   cat conftest.$ac_ext >&5
16011   rm -rf conftest*
16012   eval "ac_cv_header_$ac_safe=no"
16013 fi
16014 rm -f conftest*
16015 fi
16016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16017   echo "$ac_t""yes" 1>&6
16018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16019   cat >> confdefs.h <<EOF
16020 #define $ac_tr_hdr 1
16021 EOF
16022  
16023 else
16024   echo "$ac_t""no" 1>&6
16025 fi
16026 done
16027
16028         for ac_hdr in lwp/lwp.h
16029 do
16030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16032 echo "configure:16033: checking for $ac_hdr" >&5
16033 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16034   echo $ac_n "(cached) $ac_c" 1>&6
16035 else
16036   cat > conftest.$ac_ext <<EOF
16037 #line 16038 "configure"
16038 #include "confdefs.h"
16039 #include <$ac_hdr>
16040 EOF
16041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16042 { (eval echo configure:16043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16044 if test -z "$ac_err"; then
16045   rm -rf conftest*
16046   eval "ac_cv_header_$ac_safe=yes"
16047 else
16048   echo "$ac_err" >&5
16049   echo "configure: failed program was:" >&5
16050   cat conftest.$ac_ext >&5
16051   rm -rf conftest*
16052   eval "ac_cv_header_$ac_safe=no"
16053 fi
16054 rm -f conftest*
16055 fi
16056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16057   echo "$ac_t""yes" 1>&6
16058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16059   cat >> confdefs.h <<EOF
16060 #define $ac_tr_hdr 1
16061 EOF
16062  
16063 else
16064   echo "$ac_t""no" 1>&6
16065 fi
16066 done
16067
16068         for ac_hdr in thread.h synch.h
16069 do
16070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16072 echo "configure:16073: checking for $ac_hdr" >&5
16073 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16074   echo $ac_n "(cached) $ac_c" 1>&6
16075 else
16076   cat > conftest.$ac_ext <<EOF
16077 #line 16078 "configure"
16078 #include "confdefs.h"
16079 #include <$ac_hdr>
16080 EOF
16081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16082 { (eval echo configure:16083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16084 if test -z "$ac_err"; then
16085   rm -rf conftest*
16086   eval "ac_cv_header_$ac_safe=yes"
16087 else
16088   echo "$ac_err" >&5
16089   echo "configure: failed program was:" >&5
16090   cat conftest.$ac_ext >&5
16091   rm -rf conftest*
16092   eval "ac_cv_header_$ac_safe=no"
16093 fi
16094 rm -f conftest*
16095 fi
16096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16097   echo "$ac_t""yes" 1>&6
16098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16099   cat >> confdefs.h <<EOF
16100 #define $ac_tr_hdr 1
16101 EOF
16102  
16103 else
16104   echo "$ac_t""no" 1>&6
16105 fi
16106 done
16107
16108 fi
16109
16110 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16111                         cat >> confdefs.h <<\EOF
16112 #define REENTRANT 1
16113 EOF
16114
16115         cat >> confdefs.h <<\EOF
16116 #define _REENTRANT 1
16117 EOF
16118
16119         cat >> confdefs.h <<\EOF
16120 #define THREAD_SAFE 1
16121 EOF
16122
16123         cat >> confdefs.h <<\EOF
16124 #define _THREAD_SAFE 1
16125 EOF
16126
16127         cat >> confdefs.h <<\EOF
16128 #define THREADSAFE 1
16129 EOF
16130
16131         cat >> confdefs.h <<\EOF
16132 #define _THREADSAFE 1
16133 EOF
16134
16135         cat >> confdefs.h <<\EOF
16136 #define _SGI_MP_SOURCE 1
16137 EOF
16138
16139
16140                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16141 echo "configure:16142: checking for thread specific errno" >&5
16142 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16143   echo $ac_n "(cached) $ac_c" 1>&6
16144 else
16145   
16146                 cat > conftest.$ac_ext <<EOF
16147 #line 16148 "configure"
16148 #include "confdefs.h"
16149 #include <errno.h>
16150 int main() {
16151 errno = 0;
16152 ; return 0; }
16153 EOF
16154 if { (eval echo configure:16155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16155   rm -rf conftest*
16156   ol_cv_errno_thread_specific=yes
16157 else
16158   echo "configure: failed program was:" >&5
16159   cat conftest.$ac_ext >&5
16160   rm -rf conftest*
16161   ol_cv_errno_thread_specific=no
16162 fi
16163 rm -f conftest*
16164         
16165 fi
16166
16167 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16168
16169                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16170 echo "configure:16171: checking for thread specific h_errno" >&5
16171 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16172   echo $ac_n "(cached) $ac_c" 1>&6
16173 else
16174   
16175                 cat > conftest.$ac_ext <<EOF
16176 #line 16177 "configure"
16177 #include "confdefs.h"
16178 #include <netdb.h>
16179 int main() {
16180 h_errno = 0;
16181 ; return 0; }
16182 EOF
16183 if { (eval echo configure:16184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16184   rm -rf conftest*
16185   ol_cv_h_errno_thread_specific=yes
16186 else
16187   echo "configure: failed program was:" >&5
16188   cat conftest.$ac_ext >&5
16189   rm -rf conftest*
16190   ol_cv_h_errno_thread_specific=no
16191 fi
16192 rm -f conftest*
16193         
16194 fi
16195
16196 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16197
16198         if test $ol_cv_errno_thread_specific != yes \
16199                 -o $ol_cv_h_errno_thread_specific != yes ; then
16200                 LIBS="$LTHREAD_LIBS $LIBS"
16201                 LTHREAD_LIBS=""
16202         fi
16203
16204 fi  
16205
16206 if test $ol_link_threads = no ; then
16207         if test $ol_with_threads = yes ; then
16208                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16209         fi
16210
16211         if test $ol_with_threads = auto ; then
16212                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16213                 ol_with_threads=no
16214         fi
16215
16216         cat >> confdefs.h <<\EOF
16217 #define NO_THREADS 1
16218 EOF
16219
16220         LTHREAD_LIBS=""
16221 fi
16222
16223 if test $ol_link_threads != no ; then
16224         cat >> confdefs.h <<\EOF
16225 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16226 EOF
16227
16228 fi
16229
16230 for ac_func in \
16231         ctime_r                 \
16232         gethostbyname_r gethostbyaddr_r \
16233
16234 do
16235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16236 echo "configure:16237: checking for $ac_func" >&5
16237 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16238   echo $ac_n "(cached) $ac_c" 1>&6
16239 else
16240   cat > conftest.$ac_ext <<EOF
16241 #line 16242 "configure"
16242 #include "confdefs.h"
16243 /* System header to define __stub macros and hopefully few prototypes,
16244     which can conflict with char $ac_func(); below.  */
16245 #include <assert.h>
16246 /* Override any gcc2 internal prototype to avoid an error.  */
16247 /* We use char because int might match the return type of a gcc2
16248     builtin and then its argument prototype would still apply.  */
16249 char $ac_func();
16250 char (*f)();
16251
16252 int main() {
16253
16254 /* The GNU C library defines this for functions which it implements
16255     to always fail with ENOSYS.  Some functions are actually named
16256     something starting with __ and the normal name is an alias.  */
16257 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16258 choke me
16259 #else
16260 f = $ac_func;
16261 #endif
16262
16263 ; return 0; }
16264 EOF
16265 if { (eval echo configure:16266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16266   rm -rf conftest*
16267   eval "ac_cv_func_$ac_func=yes"
16268 else
16269   echo "configure: failed program was:" >&5
16270   cat conftest.$ac_ext >&5
16271   rm -rf conftest*
16272   eval "ac_cv_func_$ac_func=no"
16273 fi
16274 rm -f conftest*
16275 fi
16276
16277 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16278   echo "$ac_t""yes" 1>&6
16279     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16280   cat >> confdefs.h <<EOF
16281 #define $ac_tr_func 1
16282 EOF
16283  
16284 else
16285   echo "$ac_t""no" 1>&6
16286 fi
16287 done
16288
16289
16290 if test "$ac_cv_func_ctime_r" = no ; then
16291         ol_cv_func_ctime_r_nargs=0
16292 else
16293         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16294 echo "configure:16295: checking number of arguments of ctime_r" >&5
16295 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16296   echo $ac_n "(cached) $ac_c" 1>&6
16297 else
16298   cat > conftest.$ac_ext <<EOF
16299 #line 16300 "configure"
16300 #include "confdefs.h"
16301 #include <time.h>
16302 int main() {
16303 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16304 ; return 0; }
16305 EOF
16306 if { (eval echo configure:16307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16307   rm -rf conftest*
16308   ol_cv_func_ctime_r_nargs3=yes
16309 else
16310   echo "configure: failed program was:" >&5
16311   cat conftest.$ac_ext >&5
16312   rm -rf conftest*
16313   ol_cv_func_ctime_r_nargs3=no
16314 fi
16315 rm -f conftest*
16316
16317         cat > conftest.$ac_ext <<EOF
16318 #line 16319 "configure"
16319 #include "confdefs.h"
16320 #include <time.h>
16321 int main() {
16322 time_t ti; char *buffer; ctime_r(&ti,buffer);
16323 ; return 0; }
16324 EOF
16325 if { (eval echo configure:16326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16326   rm -rf conftest*
16327   ol_cv_func_ctime_r_nargs2=yes
16328 else
16329   echo "configure: failed program was:" >&5
16330   cat conftest.$ac_ext >&5
16331   rm -rf conftest*
16332   ol_cv_func_ctime_r_nargs2=no
16333 fi
16334 rm -f conftest*
16335
16336         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16337                 $ol_cv_func_ctime_r_nargs2 = no ; then
16338
16339                 ol_cv_func_ctime_r_nargs=3
16340
16341         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16342                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16343
16344                 ol_cv_func_ctime_r_nargs=2
16345
16346         else
16347                 ol_cv_func_ctime_r_nargs=0
16348         fi
16349   
16350 fi
16351
16352 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16353
16354   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16355         cat >> confdefs.h <<EOF
16356 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16357 EOF
16358
16359   fi
16360
16361 fi
16362
16363 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16364         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16365 echo "configure:16366: checking number of arguments of gethostbyname_r" >&5
16366 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16367   echo $ac_n "(cached) $ac_c" 1>&6
16368 else
16369   cat > conftest.$ac_ext <<EOF
16370 #line 16371 "configure"
16371 #include "confdefs.h"
16372 #include <sys/types.h>
16373 #include <sys/socket.h>
16374 #include <netinet/in.h>
16375 #include <netdb.h>
16376 #define BUFSIZE (sizeof(struct hostent)+10)
16377 int main() {
16378 struct hostent hent; char buffer[BUFSIZE];
16379                 int bufsize=BUFSIZE;int h_errno;
16380                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16381                         buffer, bufsize, &h_errno);
16382 ; return 0; }
16383 EOF
16384 if { (eval echo configure:16385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16385   rm -rf conftest*
16386   ol_cv_func_gethostbyname_r_nargs5=yes
16387 else
16388   echo "configure: failed program was:" >&5
16389   cat conftest.$ac_ext >&5
16390   rm -rf conftest*
16391   ol_cv_func_gethostbyname_r_nargs5=no
16392 fi
16393 rm -f conftest*
16394
16395         cat > conftest.$ac_ext <<EOF
16396 #line 16397 "configure"
16397 #include "confdefs.h"
16398 #include <sys/types.h>
16399 #include <sys/socket.h>
16400 #include <netinet/in.h>
16401 #include <netdb.h>
16402 #define BUFSIZE (sizeof(struct hostent)+10)
16403 int main() {
16404 struct hostent hent;struct hostent *rhent;
16405                 char buffer[BUFSIZE];
16406                 int bufsize=BUFSIZE;int h_errno;
16407                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16408                         &rhent, &h_errno);
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16412   rm -rf conftest*
16413   ol_cv_func_gethostbyname_r_nargs6=yes
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   ol_cv_func_gethostbyname_r_nargs6=no
16419 fi
16420 rm -f conftest*
16421
16422         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16423                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16424
16425                 ol_cv_func_gethostbyname_r_nargs=5
16426
16427         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16428                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16429
16430                 ol_cv_func_gethostbyname_r_nargs=6
16431
16432         else
16433                 ol_cv_func_gethostbyname_r_nargs=0
16434         fi
16435   
16436 fi
16437
16438 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16439   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16440         cat >> confdefs.h <<EOF
16441 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16442 EOF
16443
16444   fi
16445
16446 else
16447         ol_cv_func_gethostbyname_r_nargs=0
16448 fi
16449  
16450 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16451         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16452 echo "configure:16453: checking number of arguments of gethostbyaddr_r" >&5
16453 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16454   echo $ac_n "(cached) $ac_c" 1>&6
16455 else
16456   cat > conftest.$ac_ext <<EOF
16457 #line 16458 "configure"
16458 #include "confdefs.h"
16459 #include <sys/types.h>
16460 #include <sys/socket.h>
16461 #include <netinet/in.h>
16462 #include <netdb.h>
16463 #define BUFSIZE (sizeof(struct hostent)+10)
16464 int main() {
16465 struct hostent hent; char buffer[BUFSIZE]; 
16466             struct in_addr add;
16467             size_t alen=sizeof(struct in_addr);
16468             int bufsize=BUFSIZE;int h_errno;
16469                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16470                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16471 ; return 0; }
16472 EOF
16473 if { (eval echo configure:16474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16474   rm -rf conftest*
16475   ol_cv_func_gethostbyaddr_r_nargs7=yes
16476 else
16477   echo "configure: failed program was:" >&5
16478   cat conftest.$ac_ext >&5
16479   rm -rf conftest*
16480   ol_cv_func_gethostbyaddr_r_nargs7=no
16481 fi
16482 rm -f conftest*
16483
16484         cat > conftest.$ac_ext <<EOF
16485 #line 16486 "configure"
16486 #include "confdefs.h"
16487 #include <sys/types.h>
16488 #include <sys/socket.h>
16489 #include <netinet/in.h>
16490 #include <netdb.h>
16491 #define BUFSIZE (sizeof(struct hostent)+10)
16492 int main() {
16493 struct hostent hent;
16494                 struct hostent *rhent; char buffer[BUFSIZE]; 
16495                 struct in_addr add;
16496                 size_t alen=sizeof(struct in_addr);
16497                 int bufsize=BUFSIZE;int h_errno;
16498                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16499                         alen, AF_INET, &hent, buffer, bufsize, 
16500                         &rhent, &h_errno);
16501 ; return 0; }
16502 EOF
16503 if { (eval echo configure:16504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16504   rm -rf conftest*
16505   ol_cv_func_gethostbyaddr_r_nargs8=yes
16506 else
16507   echo "configure: failed program was:" >&5
16508   cat conftest.$ac_ext >&5
16509   rm -rf conftest*
16510   ol_cv_func_gethostbyaddr_r_nargs8=no
16511 fi
16512 rm -f conftest*
16513
16514         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16515                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16516
16517                 ol_cv_func_gethostbyaddr_r_nargs=7
16518
16519         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16520                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16521
16522                 ol_cv_func_gethostbyaddr_r_nargs=8
16523
16524         else
16525                 ol_cv_func_gethostbyaddr_r_nargs=0
16526         fi
16527   
16528 fi
16529
16530 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16531   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16532     cat >> confdefs.h <<EOF
16533 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16534 EOF
16535
16536   fi
16537
16538 else
16539         ol_cv_func_gethostbyaddr_r_nargs=0
16540 fi
16541
16542 ol_link_ldbm=no 
16543
16544 if test $ol_with_ldbm_api = auto \
16545         -o $ol_with_ldbm_api = berkeley \
16546         -o $ol_with_ldbm_api = bcompat ; then
16547
16548         if test $ol_with_ldbm_api = bcompat; then \
16549                 for ac_hdr in db_185.h db.h
16550 do
16551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16553 echo "configure:16554: checking for $ac_hdr" >&5
16554 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16555   echo $ac_n "(cached) $ac_c" 1>&6
16556 else
16557   cat > conftest.$ac_ext <<EOF
16558 #line 16559 "configure"
16559 #include "confdefs.h"
16560 #include <$ac_hdr>
16561 EOF
16562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16563 { (eval echo configure:16564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16565 if test -z "$ac_err"; then
16566   rm -rf conftest*
16567   eval "ac_cv_header_$ac_safe=yes"
16568 else
16569   echo "$ac_err" >&5
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   eval "ac_cv_header_$ac_safe=no"
16574 fi
16575 rm -f conftest*
16576 fi
16577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16578   echo "$ac_t""yes" 1>&6
16579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16580   cat >> confdefs.h <<EOF
16581 #define $ac_tr_hdr 1
16582 EOF
16583  
16584 else
16585   echo "$ac_t""no" 1>&6
16586 fi
16587 done
16588
16589 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16590         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16591 echo "configure:16592: checking if Berkeley DB header compatibility" >&5
16592 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   
16596                 cat > conftest.$ac_ext <<EOF
16597 #line 16598 "configure"
16598 #include "confdefs.h"
16599
16600 #if HAVE_DB_185_H
16601 #       include <db_185.h>
16602 #else
16603 #       include <db.h>
16604 #endif
16605
16606  /* this check could be improved */
16607 #ifndef DB_VERSION_MAJOR
16608 #       define DB_VERSION_MAJOR 1
16609 #endif
16610
16611 #if DB_VERSION_MAJOR == 1 
16612         __db_version_1
16613 #endif
16614
16615 EOF
16616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16617   egrep "__db_version_1" >/dev/null 2>&1; then
16618   rm -rf conftest*
16619   ol_cv_header_db1=yes
16620 else
16621   rm -rf conftest*
16622   ol_cv_header_db1=no
16623 fi
16624 rm -f conftest*
16625
16626 fi
16627
16628 echo "$ac_t""$ol_cv_header_db1" 1>&6
16629
16630         if test $ol_cv_header_db1 = yes ; then
16631                 ol_cv_lib_db=no
16632 if test $ol_cv_lib_db = no ; then
16633         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16634 echo "configure:16635: checking for Berkeley DB link (default)" >&5
16635 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16636   echo $ac_n "(cached) $ac_c" 1>&6
16637 else
16638   
16639         ol_DB_LIB=
16640         ol_LIBS=$LIBS
16641         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16642
16643         cat > conftest.$ac_ext <<EOF
16644 #line 16645 "configure"
16645 #include "confdefs.h"
16646
16647 #ifdef HAVE_DB_185_H
16648 # include <db_185.h>
16649 #else
16650 # include <db.h>
16651 #endif
16652
16653 #ifndef DB_VERSION_MAJOR
16654 # define DB_VERSION_MAJOR 1
16655 #endif
16656
16657 #ifndef NULL
16658 #define NULL ((void*)0)
16659 #endif
16660
16661 int main() {
16662
16663 #if DB_VERSION_MAJOR > 1
16664         {
16665                 char *version;
16666                 int major, minor, patch;
16667
16668                 version = db_version( &major, &minor, &patch );
16669
16670                 if( major != DB_VERSION_MAJOR ||
16671                         minor < DB_VERSION_MINOR )
16672                 {
16673                         printf("Berkeley DB version mismatch\n"
16674                                 "\texpected: %s\n\tgot: %s\n",
16675                                 DB_VERSION_STRING, version);
16676                         return 1;
16677                 }
16678         }
16679 #endif
16680
16681 #if DB_VERSION_MAJOR > 2
16682         db_env_create( NULL, 0 );
16683 #elif DB_VERSION_MAJOR > 1
16684         db_appexit( NULL );
16685 #else
16686         (void) dbopen( NULL, 0, 0, 0, NULL);
16687 #endif
16688
16689 ; return 0; }
16690 EOF
16691 if { (eval echo configure:16692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16692   rm -rf conftest*
16693   ol_cv_db_none=yes
16694 else
16695   echo "configure: failed program was:" >&5
16696   cat conftest.$ac_ext >&5
16697   rm -rf conftest*
16698   ol_cv_db_none=no
16699 fi
16700 rm -f conftest*
16701
16702         LIBS="$ol_LIBS"
16703
16704 fi
16705
16706 echo "$ac_t""$ol_cv_db_none" 1>&6
16707
16708         if test $ol_cv_db_none = yes ; then
16709                 ol_cv_lib_db=yes
16710         fi
16711 fi
16712
16713 if test $ol_cv_lib_db = no ; then
16714         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16715 echo "configure:16716: checking for Berkeley DB link (-ldb41)" >&5
16716 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16717   echo $ac_n "(cached) $ac_c" 1>&6
16718 else
16719   
16720         ol_DB_LIB=-ldb41
16721         ol_LIBS=$LIBS
16722         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16723
16724         cat > conftest.$ac_ext <<EOF
16725 #line 16726 "configure"
16726 #include "confdefs.h"
16727
16728 #ifdef HAVE_DB_185_H
16729 # include <db_185.h>
16730 #else
16731 # include <db.h>
16732 #endif
16733
16734 #ifndef DB_VERSION_MAJOR
16735 # define DB_VERSION_MAJOR 1
16736 #endif
16737
16738 #ifndef NULL
16739 #define NULL ((void*)0)
16740 #endif
16741
16742 int main() {
16743
16744 #if DB_VERSION_MAJOR > 1
16745         {
16746                 char *version;
16747                 int major, minor, patch;
16748
16749                 version = db_version( &major, &minor, &patch );
16750
16751                 if( major != DB_VERSION_MAJOR ||
16752                         minor < DB_VERSION_MINOR )
16753                 {
16754                         printf("Berkeley DB version mismatch\n"
16755                                 "\texpected: %s\n\tgot: %s\n",
16756                                 DB_VERSION_STRING, version);
16757                         return 1;
16758                 }
16759         }
16760 #endif
16761
16762 #if DB_VERSION_MAJOR > 2
16763         db_env_create( NULL, 0 );
16764 #elif DB_VERSION_MAJOR > 1
16765         db_appexit( NULL );
16766 #else
16767         (void) dbopen( NULL, 0, 0, 0, NULL);
16768 #endif
16769
16770 ; return 0; }
16771 EOF
16772 if { (eval echo configure:16773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16773   rm -rf conftest*
16774   ol_cv_db_db41=yes
16775 else
16776   echo "configure: failed program was:" >&5
16777   cat conftest.$ac_ext >&5
16778   rm -rf conftest*
16779   ol_cv_db_db41=no
16780 fi
16781 rm -f conftest*
16782
16783         LIBS="$ol_LIBS"
16784
16785 fi
16786
16787 echo "$ac_t""$ol_cv_db_db41" 1>&6
16788
16789         if test $ol_cv_db_db41 = yes ; then
16790                 ol_cv_lib_db=-ldb41
16791         fi
16792 fi
16793
16794 if test $ol_cv_lib_db = no ; then
16795         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16796 echo "configure:16797: checking for Berkeley DB link (-ldb-41)" >&5
16797 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16798   echo $ac_n "(cached) $ac_c" 1>&6
16799 else
16800   
16801         ol_DB_LIB=-ldb-41
16802         ol_LIBS=$LIBS
16803         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16804
16805         cat > conftest.$ac_ext <<EOF
16806 #line 16807 "configure"
16807 #include "confdefs.h"
16808
16809 #ifdef HAVE_DB_185_H
16810 # include <db_185.h>
16811 #else
16812 # include <db.h>
16813 #endif
16814
16815 #ifndef DB_VERSION_MAJOR
16816 # define DB_VERSION_MAJOR 1
16817 #endif
16818
16819 #ifndef NULL
16820 #define NULL ((void*)0)
16821 #endif
16822
16823 int main() {
16824
16825 #if DB_VERSION_MAJOR > 1
16826         {
16827                 char *version;
16828                 int major, minor, patch;
16829
16830                 version = db_version( &major, &minor, &patch );
16831
16832                 if( major != DB_VERSION_MAJOR ||
16833                         minor < DB_VERSION_MINOR )
16834                 {
16835                         printf("Berkeley DB version mismatch\n"
16836                                 "\texpected: %s\n\tgot: %s\n",
16837                                 DB_VERSION_STRING, version);
16838                         return 1;
16839                 }
16840         }
16841 #endif
16842
16843 #if DB_VERSION_MAJOR > 2
16844         db_env_create( NULL, 0 );
16845 #elif DB_VERSION_MAJOR > 1
16846         db_appexit( NULL );
16847 #else
16848         (void) dbopen( NULL, 0, 0, 0, NULL);
16849 #endif
16850
16851 ; return 0; }
16852 EOF
16853 if { (eval echo configure:16854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16854   rm -rf conftest*
16855   ol_cv_db_db_41=yes
16856 else
16857   echo "configure: failed program was:" >&5
16858   cat conftest.$ac_ext >&5
16859   rm -rf conftest*
16860   ol_cv_db_db_41=no
16861 fi
16862 rm -f conftest*
16863
16864         LIBS="$ol_LIBS"
16865
16866 fi
16867
16868 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16869
16870         if test $ol_cv_db_db_41 = yes ; then
16871                 ol_cv_lib_db=-ldb-41
16872         fi
16873 fi
16874
16875 if test $ol_cv_lib_db = no ; then
16876         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16877 echo "configure:16878: checking for Berkeley DB link (-ldb-4.1)" >&5
16878 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16879   echo $ac_n "(cached) $ac_c" 1>&6
16880 else
16881   
16882         ol_DB_LIB=-ldb-4.1
16883         ol_LIBS=$LIBS
16884         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16885
16886         cat > conftest.$ac_ext <<EOF
16887 #line 16888 "configure"
16888 #include "confdefs.h"
16889
16890 #ifdef HAVE_DB_185_H
16891 # include <db_185.h>
16892 #else
16893 # include <db.h>
16894 #endif
16895
16896 #ifndef DB_VERSION_MAJOR
16897 # define DB_VERSION_MAJOR 1
16898 #endif
16899
16900 #ifndef NULL
16901 #define NULL ((void*)0)
16902 #endif
16903
16904 int main() {
16905
16906 #if DB_VERSION_MAJOR > 1
16907         {
16908                 char *version;
16909                 int major, minor, patch;
16910
16911                 version = db_version( &major, &minor, &patch );
16912
16913                 if( major != DB_VERSION_MAJOR ||
16914                         minor < DB_VERSION_MINOR )
16915                 {
16916                         printf("Berkeley DB version mismatch\n"
16917                                 "\texpected: %s\n\tgot: %s\n",
16918                                 DB_VERSION_STRING, version);
16919                         return 1;
16920                 }
16921         }
16922 #endif
16923
16924 #if DB_VERSION_MAJOR > 2
16925         db_env_create( NULL, 0 );
16926 #elif DB_VERSION_MAJOR > 1
16927         db_appexit( NULL );
16928 #else
16929         (void) dbopen( NULL, 0, 0, 0, NULL);
16930 #endif
16931
16932 ; return 0; }
16933 EOF
16934 if { (eval echo configure:16935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16935   rm -rf conftest*
16936   ol_cv_db_db_4_dot_1=yes
16937 else
16938   echo "configure: failed program was:" >&5
16939   cat conftest.$ac_ext >&5
16940   rm -rf conftest*
16941   ol_cv_db_db_4_dot_1=no
16942 fi
16943 rm -f conftest*
16944
16945         LIBS="$ol_LIBS"
16946
16947 fi
16948
16949 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16950
16951         if test $ol_cv_db_db_4_dot_1 = yes ; then
16952                 ol_cv_lib_db=-ldb-4.1
16953         fi
16954 fi
16955
16956 if test $ol_cv_lib_db = no ; then
16957         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16958 echo "configure:16959: checking for Berkeley DB link (-ldb-4-1)" >&5
16959 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16960   echo $ac_n "(cached) $ac_c" 1>&6
16961 else
16962   
16963         ol_DB_LIB=-ldb-4-1
16964         ol_LIBS=$LIBS
16965         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16966
16967         cat > conftest.$ac_ext <<EOF
16968 #line 16969 "configure"
16969 #include "confdefs.h"
16970
16971 #ifdef HAVE_DB_185_H
16972 # include <db_185.h>
16973 #else
16974 # include <db.h>
16975 #endif
16976
16977 #ifndef DB_VERSION_MAJOR
16978 # define DB_VERSION_MAJOR 1
16979 #endif
16980
16981 #ifndef NULL
16982 #define NULL ((void*)0)
16983 #endif
16984
16985 int main() {
16986
16987 #if DB_VERSION_MAJOR > 1
16988         {
16989                 char *version;
16990                 int major, minor, patch;
16991
16992                 version = db_version( &major, &minor, &patch );
16993
16994                 if( major != DB_VERSION_MAJOR ||
16995                         minor < DB_VERSION_MINOR )
16996                 {
16997                         printf("Berkeley DB version mismatch\n"
16998                                 "\texpected: %s\n\tgot: %s\n",
16999                                 DB_VERSION_STRING, version);
17000                         return 1;
17001                 }
17002         }
17003 #endif
17004
17005 #if DB_VERSION_MAJOR > 2
17006         db_env_create( NULL, 0 );
17007 #elif DB_VERSION_MAJOR > 1
17008         db_appexit( NULL );
17009 #else
17010         (void) dbopen( NULL, 0, 0, 0, NULL);
17011 #endif
17012
17013 ; return 0; }
17014 EOF
17015 if { (eval echo configure:17016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17016   rm -rf conftest*
17017   ol_cv_db_db_4_1=yes
17018 else
17019   echo "configure: failed program was:" >&5
17020   cat conftest.$ac_ext >&5
17021   rm -rf conftest*
17022   ol_cv_db_db_4_1=no
17023 fi
17024 rm -f conftest*
17025
17026         LIBS="$ol_LIBS"
17027
17028 fi
17029
17030 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17031
17032         if test $ol_cv_db_db_4_1 = yes ; then
17033                 ol_cv_lib_db=-ldb-4-1
17034         fi
17035 fi
17036
17037 if test $ol_cv_lib_db = no ; then
17038         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17039 echo "configure:17040: checking for Berkeley DB link (-ldb-4)" >&5
17040 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17041   echo $ac_n "(cached) $ac_c" 1>&6
17042 else
17043   
17044         ol_DB_LIB=-ldb-4
17045         ol_LIBS=$LIBS
17046         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17047
17048         cat > conftest.$ac_ext <<EOF
17049 #line 17050 "configure"
17050 #include "confdefs.h"
17051
17052 #ifdef HAVE_DB_185_H
17053 # include <db_185.h>
17054 #else
17055 # include <db.h>
17056 #endif
17057
17058 #ifndef DB_VERSION_MAJOR
17059 # define DB_VERSION_MAJOR 1
17060 #endif
17061
17062 #ifndef NULL
17063 #define NULL ((void*)0)
17064 #endif
17065
17066 int main() {
17067
17068 #if DB_VERSION_MAJOR > 1
17069         {
17070                 char *version;
17071                 int major, minor, patch;
17072
17073                 version = db_version( &major, &minor, &patch );
17074
17075                 if( major != DB_VERSION_MAJOR ||
17076                         minor < DB_VERSION_MINOR )
17077                 {
17078                         printf("Berkeley DB version mismatch\n"
17079                                 "\texpected: %s\n\tgot: %s\n",
17080                                 DB_VERSION_STRING, version);
17081                         return 1;
17082                 }
17083         }
17084 #endif
17085
17086 #if DB_VERSION_MAJOR > 2
17087         db_env_create( NULL, 0 );
17088 #elif DB_VERSION_MAJOR > 1
17089         db_appexit( NULL );
17090 #else
17091         (void) dbopen( NULL, 0, 0, 0, NULL);
17092 #endif
17093
17094 ; return 0; }
17095 EOF
17096 if { (eval echo configure:17097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17097   rm -rf conftest*
17098   ol_cv_db_db_4=yes
17099 else
17100   echo "configure: failed program was:" >&5
17101   cat conftest.$ac_ext >&5
17102   rm -rf conftest*
17103   ol_cv_db_db_4=no
17104 fi
17105 rm -f conftest*
17106
17107         LIBS="$ol_LIBS"
17108
17109 fi
17110
17111 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17112
17113         if test $ol_cv_db_db_4 = yes ; then
17114                 ol_cv_lib_db=-ldb-4
17115         fi
17116 fi
17117
17118 if test $ol_cv_lib_db = no ; then
17119         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17120 echo "configure:17121: checking for Berkeley DB link (-ldb4)" >&5
17121 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17122   echo $ac_n "(cached) $ac_c" 1>&6
17123 else
17124   
17125         ol_DB_LIB=-ldb4
17126         ol_LIBS=$LIBS
17127         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17128
17129         cat > conftest.$ac_ext <<EOF
17130 #line 17131 "configure"
17131 #include "confdefs.h"
17132
17133 #ifdef HAVE_DB_185_H
17134 # include <db_185.h>
17135 #else
17136 # include <db.h>
17137 #endif
17138
17139 #ifndef DB_VERSION_MAJOR
17140 # define DB_VERSION_MAJOR 1
17141 #endif
17142
17143 #ifndef NULL
17144 #define NULL ((void*)0)
17145 #endif
17146
17147 int main() {
17148
17149 #if DB_VERSION_MAJOR > 1
17150         {
17151                 char *version;
17152                 int major, minor, patch;
17153
17154                 version = db_version( &major, &minor, &patch );
17155
17156                 if( major != DB_VERSION_MAJOR ||
17157                         minor < DB_VERSION_MINOR )
17158                 {
17159                         printf("Berkeley DB version mismatch\n"
17160                                 "\texpected: %s\n\tgot: %s\n",
17161                                 DB_VERSION_STRING, version);
17162                         return 1;
17163                 }
17164         }
17165 #endif
17166
17167 #if DB_VERSION_MAJOR > 2
17168         db_env_create( NULL, 0 );
17169 #elif DB_VERSION_MAJOR > 1
17170         db_appexit( NULL );
17171 #else
17172         (void) dbopen( NULL, 0, 0, 0, NULL);
17173 #endif
17174
17175 ; return 0; }
17176 EOF
17177 if { (eval echo configure:17178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17178   rm -rf conftest*
17179   ol_cv_db_db4=yes
17180 else
17181   echo "configure: failed program was:" >&5
17182   cat conftest.$ac_ext >&5
17183   rm -rf conftest*
17184   ol_cv_db_db4=no
17185 fi
17186 rm -f conftest*
17187
17188         LIBS="$ol_LIBS"
17189
17190 fi
17191
17192 echo "$ac_t""$ol_cv_db_db4" 1>&6
17193
17194         if test $ol_cv_db_db4 = yes ; then
17195                 ol_cv_lib_db=-ldb4
17196         fi
17197 fi
17198
17199 if test $ol_cv_lib_db = no ; then
17200         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17201 echo "configure:17202: checking for Berkeley DB link (-ldb)" >&5
17202 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17203   echo $ac_n "(cached) $ac_c" 1>&6
17204 else
17205   
17206         ol_DB_LIB=-ldb
17207         ol_LIBS=$LIBS
17208         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17209
17210         cat > conftest.$ac_ext <<EOF
17211 #line 17212 "configure"
17212 #include "confdefs.h"
17213
17214 #ifdef HAVE_DB_185_H
17215 # include <db_185.h>
17216 #else
17217 # include <db.h>
17218 #endif
17219
17220 #ifndef DB_VERSION_MAJOR
17221 # define DB_VERSION_MAJOR 1
17222 #endif
17223
17224 #ifndef NULL
17225 #define NULL ((void*)0)
17226 #endif
17227
17228 int main() {
17229
17230 #if DB_VERSION_MAJOR > 1
17231         {
17232                 char *version;
17233                 int major, minor, patch;
17234
17235                 version = db_version( &major, &minor, &patch );
17236
17237                 if( major != DB_VERSION_MAJOR ||
17238                         minor < DB_VERSION_MINOR )
17239                 {
17240                         printf("Berkeley DB version mismatch\n"
17241                                 "\texpected: %s\n\tgot: %s\n",
17242                                 DB_VERSION_STRING, version);
17243                         return 1;
17244                 }
17245         }
17246 #endif
17247
17248 #if DB_VERSION_MAJOR > 2
17249         db_env_create( NULL, 0 );
17250 #elif DB_VERSION_MAJOR > 1
17251         db_appexit( NULL );
17252 #else
17253         (void) dbopen( NULL, 0, 0, 0, NULL);
17254 #endif
17255
17256 ; return 0; }
17257 EOF
17258 if { (eval echo configure:17259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17259   rm -rf conftest*
17260   ol_cv_db_db=yes
17261 else
17262   echo "configure: failed program was:" >&5
17263   cat conftest.$ac_ext >&5
17264   rm -rf conftest*
17265   ol_cv_db_db=no
17266 fi
17267 rm -f conftest*
17268
17269         LIBS="$ol_LIBS"
17270
17271 fi
17272
17273 echo "$ac_t""$ol_cv_db_db" 1>&6
17274
17275         if test $ol_cv_db_db = yes ; then
17276                 ol_cv_lib_db=-ldb
17277         fi
17278 fi
17279
17280 if test $ol_cv_lib_db = no ; then
17281         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17282 echo "configure:17283: checking for Berkeley DB link (-ldb3)" >&5
17283 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17284   echo $ac_n "(cached) $ac_c" 1>&6
17285 else
17286   
17287         ol_DB_LIB=-ldb3
17288         ol_LIBS=$LIBS
17289         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17290
17291         cat > conftest.$ac_ext <<EOF
17292 #line 17293 "configure"
17293 #include "confdefs.h"
17294
17295 #ifdef HAVE_DB_185_H
17296 # include <db_185.h>
17297 #else
17298 # include <db.h>
17299 #endif
17300
17301 #ifndef DB_VERSION_MAJOR
17302 # define DB_VERSION_MAJOR 1
17303 #endif
17304
17305 #ifndef NULL
17306 #define NULL ((void*)0)
17307 #endif
17308
17309 int main() {
17310
17311 #if DB_VERSION_MAJOR > 1
17312         {
17313                 char *version;
17314                 int major, minor, patch;
17315
17316                 version = db_version( &major, &minor, &patch );
17317
17318                 if( major != DB_VERSION_MAJOR ||
17319                         minor < DB_VERSION_MINOR )
17320                 {
17321                         printf("Berkeley DB version mismatch\n"
17322                                 "\texpected: %s\n\tgot: %s\n",
17323                                 DB_VERSION_STRING, version);
17324                         return 1;
17325                 }
17326         }
17327 #endif
17328
17329 #if DB_VERSION_MAJOR > 2
17330         db_env_create( NULL, 0 );
17331 #elif DB_VERSION_MAJOR > 1
17332         db_appexit( NULL );
17333 #else
17334         (void) dbopen( NULL, 0, 0, 0, NULL);
17335 #endif
17336
17337 ; return 0; }
17338 EOF
17339 if { (eval echo configure:17340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17340   rm -rf conftest*
17341   ol_cv_db_db3=yes
17342 else
17343   echo "configure: failed program was:" >&5
17344   cat conftest.$ac_ext >&5
17345   rm -rf conftest*
17346   ol_cv_db_db3=no
17347 fi
17348 rm -f conftest*
17349
17350         LIBS="$ol_LIBS"
17351
17352 fi
17353
17354 echo "$ac_t""$ol_cv_db_db3" 1>&6
17355
17356         if test $ol_cv_db_db3 = yes ; then
17357                 ol_cv_lib_db=-ldb3
17358         fi
17359 fi
17360
17361 if test $ol_cv_lib_db = no ; then
17362         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17363 echo "configure:17364: checking for Berkeley DB link (-ldb-3)" >&5
17364 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17365   echo $ac_n "(cached) $ac_c" 1>&6
17366 else
17367   
17368         ol_DB_LIB=-ldb-3
17369         ol_LIBS=$LIBS
17370         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17371
17372         cat > conftest.$ac_ext <<EOF
17373 #line 17374 "configure"
17374 #include "confdefs.h"
17375
17376 #ifdef HAVE_DB_185_H
17377 # include <db_185.h>
17378 #else
17379 # include <db.h>
17380 #endif
17381
17382 #ifndef DB_VERSION_MAJOR
17383 # define DB_VERSION_MAJOR 1
17384 #endif
17385
17386 #ifndef NULL
17387 #define NULL ((void*)0)
17388 #endif
17389
17390 int main() {
17391
17392 #if DB_VERSION_MAJOR > 1
17393         {
17394                 char *version;
17395                 int major, minor, patch;
17396
17397                 version = db_version( &major, &minor, &patch );
17398
17399                 if( major != DB_VERSION_MAJOR ||
17400                         minor < DB_VERSION_MINOR )
17401                 {
17402                         printf("Berkeley DB version mismatch\n"
17403                                 "\texpected: %s\n\tgot: %s\n",
17404                                 DB_VERSION_STRING, version);
17405                         return 1;
17406                 }
17407         }
17408 #endif
17409
17410 #if DB_VERSION_MAJOR > 2
17411         db_env_create( NULL, 0 );
17412 #elif DB_VERSION_MAJOR > 1
17413         db_appexit( NULL );
17414 #else
17415         (void) dbopen( NULL, 0, 0, 0, NULL);
17416 #endif
17417
17418 ; return 0; }
17419 EOF
17420 if { (eval echo configure:17421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17421   rm -rf conftest*
17422   ol_cv_db_db_3=yes
17423 else
17424   echo "configure: failed program was:" >&5
17425   cat conftest.$ac_ext >&5
17426   rm -rf conftest*
17427   ol_cv_db_db_3=no
17428 fi
17429 rm -f conftest*
17430
17431         LIBS="$ol_LIBS"
17432
17433 fi
17434
17435 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17436
17437         if test $ol_cv_db_db_3 = yes ; then
17438                 ol_cv_lib_db=-ldb-3
17439         fi
17440 fi
17441
17442 if test $ol_cv_lib_db = no ; then
17443         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17444 echo "configure:17445: checking for Berkeley DB link (-ldb2)" >&5
17445 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17446   echo $ac_n "(cached) $ac_c" 1>&6
17447 else
17448   
17449         ol_DB_LIB=-ldb2
17450         ol_LIBS=$LIBS
17451         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17452
17453         cat > conftest.$ac_ext <<EOF
17454 #line 17455 "configure"
17455 #include "confdefs.h"
17456
17457 #ifdef HAVE_DB_185_H
17458 # include <db_185.h>
17459 #else
17460 # include <db.h>
17461 #endif
17462
17463 #ifndef DB_VERSION_MAJOR
17464 # define DB_VERSION_MAJOR 1
17465 #endif
17466
17467 #ifndef NULL
17468 #define NULL ((void*)0)
17469 #endif
17470
17471 int main() {
17472
17473 #if DB_VERSION_MAJOR > 1
17474         {
17475                 char *version;
17476                 int major, minor, patch;
17477
17478                 version = db_version( &major, &minor, &patch );
17479
17480                 if( major != DB_VERSION_MAJOR ||
17481                         minor < DB_VERSION_MINOR )
17482                 {
17483                         printf("Berkeley DB version mismatch\n"
17484                                 "\texpected: %s\n\tgot: %s\n",
17485                                 DB_VERSION_STRING, version);
17486                         return 1;
17487                 }
17488         }
17489 #endif
17490
17491 #if DB_VERSION_MAJOR > 2
17492         db_env_create( NULL, 0 );
17493 #elif DB_VERSION_MAJOR > 1
17494         db_appexit( NULL );
17495 #else
17496         (void) dbopen( NULL, 0, 0, 0, NULL);
17497 #endif
17498
17499 ; return 0; }
17500 EOF
17501 if { (eval echo configure:17502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17502   rm -rf conftest*
17503   ol_cv_db_db2=yes
17504 else
17505   echo "configure: failed program was:" >&5
17506   cat conftest.$ac_ext >&5
17507   rm -rf conftest*
17508   ol_cv_db_db2=no
17509 fi
17510 rm -f conftest*
17511
17512         LIBS="$ol_LIBS"
17513
17514 fi
17515
17516 echo "$ac_t""$ol_cv_db_db2" 1>&6
17517
17518         if test $ol_cv_db_db2 = yes ; then
17519                 ol_cv_lib_db=-ldb2
17520         fi
17521 fi
17522
17523 if test $ol_cv_lib_db = no ; then
17524         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17525 echo "configure:17526: checking for Berkeley DB link (-ldb-2)" >&5
17526 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17527   echo $ac_n "(cached) $ac_c" 1>&6
17528 else
17529   
17530         ol_DB_LIB=-ldb-2
17531         ol_LIBS=$LIBS
17532         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17533
17534         cat > conftest.$ac_ext <<EOF
17535 #line 17536 "configure"
17536 #include "confdefs.h"
17537
17538 #ifdef HAVE_DB_185_H
17539 # include <db_185.h>
17540 #else
17541 # include <db.h>
17542 #endif
17543
17544 #ifndef DB_VERSION_MAJOR
17545 # define DB_VERSION_MAJOR 1
17546 #endif
17547
17548 #ifndef NULL
17549 #define NULL ((void*)0)
17550 #endif
17551
17552 int main() {
17553
17554 #if DB_VERSION_MAJOR > 1
17555         {
17556                 char *version;
17557                 int major, minor, patch;
17558
17559                 version = db_version( &major, &minor, &patch );
17560
17561                 if( major != DB_VERSION_MAJOR ||
17562                         minor < DB_VERSION_MINOR )
17563                 {
17564                         printf("Berkeley DB version mismatch\n"
17565                                 "\texpected: %s\n\tgot: %s\n",
17566                                 DB_VERSION_STRING, version);
17567                         return 1;
17568                 }
17569         }
17570 #endif
17571
17572 #if DB_VERSION_MAJOR > 2
17573         db_env_create( NULL, 0 );
17574 #elif DB_VERSION_MAJOR > 1
17575         db_appexit( NULL );
17576 #else
17577         (void) dbopen( NULL, 0, 0, 0, NULL);
17578 #endif
17579
17580 ; return 0; }
17581 EOF
17582 if { (eval echo configure:17583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17583   rm -rf conftest*
17584   ol_cv_db_db_2=yes
17585 else
17586   echo "configure: failed program was:" >&5
17587   cat conftest.$ac_ext >&5
17588   rm -rf conftest*
17589   ol_cv_db_db_2=no
17590 fi
17591 rm -f conftest*
17592
17593         LIBS="$ol_LIBS"
17594
17595 fi
17596
17597 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17598
17599         if test $ol_cv_db_db_2 = yes ; then
17600                 ol_cv_lib_db=-ldb-2
17601         fi
17602 fi
17603
17604 if test $ol_cv_lib_db = no ; then
17605         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17606 echo "configure:17607: checking for Berkeley DB link (-ldb1)" >&5
17607 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17608   echo $ac_n "(cached) $ac_c" 1>&6
17609 else
17610   
17611         ol_DB_LIB=-ldb1
17612         ol_LIBS=$LIBS
17613         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17614
17615         cat > conftest.$ac_ext <<EOF
17616 #line 17617 "configure"
17617 #include "confdefs.h"
17618
17619 #ifdef HAVE_DB_185_H
17620 # include <db_185.h>
17621 #else
17622 # include <db.h>
17623 #endif
17624
17625 #ifndef DB_VERSION_MAJOR
17626 # define DB_VERSION_MAJOR 1
17627 #endif
17628
17629 #ifndef NULL
17630 #define NULL ((void*)0)
17631 #endif
17632
17633 int main() {
17634
17635 #if DB_VERSION_MAJOR > 1
17636         {
17637                 char *version;
17638                 int major, minor, patch;
17639
17640                 version = db_version( &major, &minor, &patch );
17641
17642                 if( major != DB_VERSION_MAJOR ||
17643                         minor < DB_VERSION_MINOR )
17644                 {
17645                         printf("Berkeley DB version mismatch\n"
17646                                 "\texpected: %s\n\tgot: %s\n",
17647                                 DB_VERSION_STRING, version);
17648                         return 1;
17649                 }
17650         }
17651 #endif
17652
17653 #if DB_VERSION_MAJOR > 2
17654         db_env_create( NULL, 0 );
17655 #elif DB_VERSION_MAJOR > 1
17656         db_appexit( NULL );
17657 #else
17658         (void) dbopen( NULL, 0, 0, 0, NULL);
17659 #endif
17660
17661 ; return 0; }
17662 EOF
17663 if { (eval echo configure:17664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17664   rm -rf conftest*
17665   ol_cv_db_db1=yes
17666 else
17667   echo "configure: failed program was:" >&5
17668   cat conftest.$ac_ext >&5
17669   rm -rf conftest*
17670   ol_cv_db_db1=no
17671 fi
17672 rm -f conftest*
17673
17674         LIBS="$ol_LIBS"
17675
17676 fi
17677
17678 echo "$ac_t""$ol_cv_db_db1" 1>&6
17679
17680         if test $ol_cv_db_db1 = yes ; then
17681                 ol_cv_lib_db=-ldb1
17682         fi
17683 fi
17684
17685 if test $ol_cv_lib_db = no ; then
17686         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17687 echo "configure:17688: checking for Berkeley DB link (-ldb-1)" >&5
17688 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17689   echo $ac_n "(cached) $ac_c" 1>&6
17690 else
17691   
17692         ol_DB_LIB=-ldb-1
17693         ol_LIBS=$LIBS
17694         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17695
17696         cat > conftest.$ac_ext <<EOF
17697 #line 17698 "configure"
17698 #include "confdefs.h"
17699
17700 #ifdef HAVE_DB_185_H
17701 # include <db_185.h>
17702 #else
17703 # include <db.h>
17704 #endif
17705
17706 #ifndef DB_VERSION_MAJOR
17707 # define DB_VERSION_MAJOR 1
17708 #endif
17709
17710 #ifndef NULL
17711 #define NULL ((void*)0)
17712 #endif
17713
17714 int main() {
17715
17716 #if DB_VERSION_MAJOR > 1
17717         {
17718                 char *version;
17719                 int major, minor, patch;
17720
17721                 version = db_version( &major, &minor, &patch );
17722
17723                 if( major != DB_VERSION_MAJOR ||
17724                         minor < DB_VERSION_MINOR )
17725                 {
17726                         printf("Berkeley DB version mismatch\n"
17727                                 "\texpected: %s\n\tgot: %s\n",
17728                                 DB_VERSION_STRING, version);
17729                         return 1;
17730                 }
17731         }
17732 #endif
17733
17734 #if DB_VERSION_MAJOR > 2
17735         db_env_create( NULL, 0 );
17736 #elif DB_VERSION_MAJOR > 1
17737         db_appexit( NULL );
17738 #else
17739         (void) dbopen( NULL, 0, 0, 0, NULL);
17740 #endif
17741
17742 ; return 0; }
17743 EOF
17744 if { (eval echo configure:17745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17745   rm -rf conftest*
17746   ol_cv_db_db_1=yes
17747 else
17748   echo "configure: failed program was:" >&5
17749   cat conftest.$ac_ext >&5
17750   rm -rf conftest*
17751   ol_cv_db_db_1=no
17752 fi
17753 rm -f conftest*
17754
17755         LIBS="$ol_LIBS"
17756
17757 fi
17758
17759 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17760
17761         if test $ol_cv_db_db_1 = yes ; then
17762                 ol_cv_lib_db=-ldb-1
17763         fi
17764 fi
17765
17766
17767                 if test "$ol_cv_lib_db" != no ; then
17768                         ol_cv_berkeley_db=yes
17769                 fi
17770         fi
17771 fi
17772
17773         else
17774                 ol_cv_berkeley_db=no
17775 for ac_hdr in db.h
17776 do
17777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17779 echo "configure:17780: checking for $ac_hdr" >&5
17780 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17781   echo $ac_n "(cached) $ac_c" 1>&6
17782 else
17783   cat > conftest.$ac_ext <<EOF
17784 #line 17785 "configure"
17785 #include "confdefs.h"
17786 #include <$ac_hdr>
17787 EOF
17788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17789 { (eval echo configure:17790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17791 if test -z "$ac_err"; then
17792   rm -rf conftest*
17793   eval "ac_cv_header_$ac_safe=yes"
17794 else
17795   echo "$ac_err" >&5
17796   echo "configure: failed program was:" >&5
17797   cat conftest.$ac_ext >&5
17798   rm -rf conftest*
17799   eval "ac_cv_header_$ac_safe=no"
17800 fi
17801 rm -f conftest*
17802 fi
17803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17804   echo "$ac_t""yes" 1>&6
17805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17806   cat >> confdefs.h <<EOF
17807 #define $ac_tr_hdr 1
17808 EOF
17809  
17810 else
17811   echo "$ac_t""no" 1>&6
17812 fi
17813 done
17814
17815 if test $ac_cv_header_db_h = yes; then
17816         ol_cv_lib_db=no
17817 if test $ol_cv_lib_db = no ; then
17818         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17819 echo "configure:17820: checking for Berkeley DB link (default)" >&5
17820 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17821   echo $ac_n "(cached) $ac_c" 1>&6
17822 else
17823   
17824         ol_DB_LIB=
17825         ol_LIBS=$LIBS
17826         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17827
17828         cat > conftest.$ac_ext <<EOF
17829 #line 17830 "configure"
17830 #include "confdefs.h"
17831
17832 #ifdef HAVE_DB_185_H
17833 # include <db_185.h>
17834 #else
17835 # include <db.h>
17836 #endif
17837
17838 #ifndef DB_VERSION_MAJOR
17839 # define DB_VERSION_MAJOR 1
17840 #endif
17841
17842 #ifndef NULL
17843 #define NULL ((void*)0)
17844 #endif
17845
17846 int main() {
17847
17848 #if DB_VERSION_MAJOR > 1
17849         {
17850                 char *version;
17851                 int major, minor, patch;
17852
17853                 version = db_version( &major, &minor, &patch );
17854
17855                 if( major != DB_VERSION_MAJOR ||
17856                         minor < DB_VERSION_MINOR )
17857                 {
17858                         printf("Berkeley DB version mismatch\n"
17859                                 "\texpected: %s\n\tgot: %s\n",
17860                                 DB_VERSION_STRING, version);
17861                         return 1;
17862                 }
17863         }
17864 #endif
17865
17866 #if DB_VERSION_MAJOR > 2
17867         db_env_create( NULL, 0 );
17868 #elif DB_VERSION_MAJOR > 1
17869         db_appexit( NULL );
17870 #else
17871         (void) dbopen( NULL, 0, 0, 0, NULL);
17872 #endif
17873
17874 ; return 0; }
17875 EOF
17876 if { (eval echo configure:17877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17877   rm -rf conftest*
17878   ol_cv_db_none=yes
17879 else
17880   echo "configure: failed program was:" >&5
17881   cat conftest.$ac_ext >&5
17882   rm -rf conftest*
17883   ol_cv_db_none=no
17884 fi
17885 rm -f conftest*
17886
17887         LIBS="$ol_LIBS"
17888
17889 fi
17890
17891 echo "$ac_t""$ol_cv_db_none" 1>&6
17892
17893         if test $ol_cv_db_none = yes ; then
17894                 ol_cv_lib_db=yes
17895         fi
17896 fi
17897
17898 if test $ol_cv_lib_db = no ; then
17899         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17900 echo "configure:17901: checking for Berkeley DB link (-ldb41)" >&5
17901 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17902   echo $ac_n "(cached) $ac_c" 1>&6
17903 else
17904   
17905         ol_DB_LIB=-ldb41
17906         ol_LIBS=$LIBS
17907         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17908
17909         cat > conftest.$ac_ext <<EOF
17910 #line 17911 "configure"
17911 #include "confdefs.h"
17912
17913 #ifdef HAVE_DB_185_H
17914 # include <db_185.h>
17915 #else
17916 # include <db.h>
17917 #endif
17918
17919 #ifndef DB_VERSION_MAJOR
17920 # define DB_VERSION_MAJOR 1
17921 #endif
17922
17923 #ifndef NULL
17924 #define NULL ((void*)0)
17925 #endif
17926
17927 int main() {
17928
17929 #if DB_VERSION_MAJOR > 1
17930         {
17931                 char *version;
17932                 int major, minor, patch;
17933
17934                 version = db_version( &major, &minor, &patch );
17935
17936                 if( major != DB_VERSION_MAJOR ||
17937                         minor < DB_VERSION_MINOR )
17938                 {
17939                         printf("Berkeley DB version mismatch\n"
17940                                 "\texpected: %s\n\tgot: %s\n",
17941                                 DB_VERSION_STRING, version);
17942                         return 1;
17943                 }
17944         }
17945 #endif
17946
17947 #if DB_VERSION_MAJOR > 2
17948         db_env_create( NULL, 0 );
17949 #elif DB_VERSION_MAJOR > 1
17950         db_appexit( NULL );
17951 #else
17952         (void) dbopen( NULL, 0, 0, 0, NULL);
17953 #endif
17954
17955 ; return 0; }
17956 EOF
17957 if { (eval echo configure:17958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17958   rm -rf conftest*
17959   ol_cv_db_db41=yes
17960 else
17961   echo "configure: failed program was:" >&5
17962   cat conftest.$ac_ext >&5
17963   rm -rf conftest*
17964   ol_cv_db_db41=no
17965 fi
17966 rm -f conftest*
17967
17968         LIBS="$ol_LIBS"
17969
17970 fi
17971
17972 echo "$ac_t""$ol_cv_db_db41" 1>&6
17973
17974         if test $ol_cv_db_db41 = yes ; then
17975                 ol_cv_lib_db=-ldb41
17976         fi
17977 fi
17978
17979 if test $ol_cv_lib_db = no ; then
17980         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17981 echo "configure:17982: checking for Berkeley DB link (-ldb-41)" >&5
17982 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17983   echo $ac_n "(cached) $ac_c" 1>&6
17984 else
17985   
17986         ol_DB_LIB=-ldb-41
17987         ol_LIBS=$LIBS
17988         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17989
17990         cat > conftest.$ac_ext <<EOF
17991 #line 17992 "configure"
17992 #include "confdefs.h"
17993
17994 #ifdef HAVE_DB_185_H
17995 # include <db_185.h>
17996 #else
17997 # include <db.h>
17998 #endif
17999
18000 #ifndef DB_VERSION_MAJOR
18001 # define DB_VERSION_MAJOR 1
18002 #endif
18003
18004 #ifndef NULL
18005 #define NULL ((void*)0)
18006 #endif
18007
18008 int main() {
18009
18010 #if DB_VERSION_MAJOR > 1
18011         {
18012                 char *version;
18013                 int major, minor, patch;
18014
18015                 version = db_version( &major, &minor, &patch );
18016
18017                 if( major != DB_VERSION_MAJOR ||
18018                         minor < DB_VERSION_MINOR )
18019                 {
18020                         printf("Berkeley DB version mismatch\n"
18021                                 "\texpected: %s\n\tgot: %s\n",
18022                                 DB_VERSION_STRING, version);
18023                         return 1;
18024                 }
18025         }
18026 #endif
18027
18028 #if DB_VERSION_MAJOR > 2
18029         db_env_create( NULL, 0 );
18030 #elif DB_VERSION_MAJOR > 1
18031         db_appexit( NULL );
18032 #else
18033         (void) dbopen( NULL, 0, 0, 0, NULL);
18034 #endif
18035
18036 ; return 0; }
18037 EOF
18038 if { (eval echo configure:18039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18039   rm -rf conftest*
18040   ol_cv_db_db_41=yes
18041 else
18042   echo "configure: failed program was:" >&5
18043   cat conftest.$ac_ext >&5
18044   rm -rf conftest*
18045   ol_cv_db_db_41=no
18046 fi
18047 rm -f conftest*
18048
18049         LIBS="$ol_LIBS"
18050
18051 fi
18052
18053 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18054
18055         if test $ol_cv_db_db_41 = yes ; then
18056                 ol_cv_lib_db=-ldb-41
18057         fi
18058 fi
18059
18060 if test $ol_cv_lib_db = no ; then
18061         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18062 echo "configure:18063: checking for Berkeley DB link (-ldb-4.1)" >&5
18063 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18064   echo $ac_n "(cached) $ac_c" 1>&6
18065 else
18066   
18067         ol_DB_LIB=-ldb-4.1
18068         ol_LIBS=$LIBS
18069         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18070
18071         cat > conftest.$ac_ext <<EOF
18072 #line 18073 "configure"
18073 #include "confdefs.h"
18074
18075 #ifdef HAVE_DB_185_H
18076 # include <db_185.h>
18077 #else
18078 # include <db.h>
18079 #endif
18080
18081 #ifndef DB_VERSION_MAJOR
18082 # define DB_VERSION_MAJOR 1
18083 #endif
18084
18085 #ifndef NULL
18086 #define NULL ((void*)0)
18087 #endif
18088
18089 int main() {
18090
18091 #if DB_VERSION_MAJOR > 1
18092         {
18093                 char *version;
18094                 int major, minor, patch;
18095
18096                 version = db_version( &major, &minor, &patch );
18097
18098                 if( major != DB_VERSION_MAJOR ||
18099                         minor < DB_VERSION_MINOR )
18100                 {
18101                         printf("Berkeley DB version mismatch\n"
18102                                 "\texpected: %s\n\tgot: %s\n",
18103                                 DB_VERSION_STRING, version);
18104                         return 1;
18105                 }
18106         }
18107 #endif
18108
18109 #if DB_VERSION_MAJOR > 2
18110         db_env_create( NULL, 0 );
18111 #elif DB_VERSION_MAJOR > 1
18112         db_appexit( NULL );
18113 #else
18114         (void) dbopen( NULL, 0, 0, 0, NULL);
18115 #endif
18116
18117 ; return 0; }
18118 EOF
18119 if { (eval echo configure:18120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18120   rm -rf conftest*
18121   ol_cv_db_db_4_dot_1=yes
18122 else
18123   echo "configure: failed program was:" >&5
18124   cat conftest.$ac_ext >&5
18125   rm -rf conftest*
18126   ol_cv_db_db_4_dot_1=no
18127 fi
18128 rm -f conftest*
18129
18130         LIBS="$ol_LIBS"
18131
18132 fi
18133
18134 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18135
18136         if test $ol_cv_db_db_4_dot_1 = yes ; then
18137                 ol_cv_lib_db=-ldb-4.1
18138         fi
18139 fi
18140
18141 if test $ol_cv_lib_db = no ; then
18142         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18143 echo "configure:18144: checking for Berkeley DB link (-ldb-4-1)" >&5
18144 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18145   echo $ac_n "(cached) $ac_c" 1>&6
18146 else
18147   
18148         ol_DB_LIB=-ldb-4-1
18149         ol_LIBS=$LIBS
18150         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18151
18152         cat > conftest.$ac_ext <<EOF
18153 #line 18154 "configure"
18154 #include "confdefs.h"
18155
18156 #ifdef HAVE_DB_185_H
18157 # include <db_185.h>
18158 #else
18159 # include <db.h>
18160 #endif
18161
18162 #ifndef DB_VERSION_MAJOR
18163 # define DB_VERSION_MAJOR 1
18164 #endif
18165
18166 #ifndef NULL
18167 #define NULL ((void*)0)
18168 #endif
18169
18170 int main() {
18171
18172 #if DB_VERSION_MAJOR > 1
18173         {
18174                 char *version;
18175                 int major, minor, patch;
18176
18177                 version = db_version( &major, &minor, &patch );
18178
18179                 if( major != DB_VERSION_MAJOR ||
18180                         minor < DB_VERSION_MINOR )
18181                 {
18182                         printf("Berkeley DB version mismatch\n"
18183                                 "\texpected: %s\n\tgot: %s\n",
18184                                 DB_VERSION_STRING, version);
18185                         return 1;
18186                 }
18187         }
18188 #endif
18189
18190 #if DB_VERSION_MAJOR > 2
18191         db_env_create( NULL, 0 );
18192 #elif DB_VERSION_MAJOR > 1
18193         db_appexit( NULL );
18194 #else
18195         (void) dbopen( NULL, 0, 0, 0, NULL);
18196 #endif
18197
18198 ; return 0; }
18199 EOF
18200 if { (eval echo configure:18201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18201   rm -rf conftest*
18202   ol_cv_db_db_4_1=yes
18203 else
18204   echo "configure: failed program was:" >&5
18205   cat conftest.$ac_ext >&5
18206   rm -rf conftest*
18207   ol_cv_db_db_4_1=no
18208 fi
18209 rm -f conftest*
18210
18211         LIBS="$ol_LIBS"
18212
18213 fi
18214
18215 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18216
18217         if test $ol_cv_db_db_4_1 = yes ; then
18218                 ol_cv_lib_db=-ldb-4-1
18219         fi
18220 fi
18221
18222 if test $ol_cv_lib_db = no ; then
18223         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18224 echo "configure:18225: checking for Berkeley DB link (-ldb-4)" >&5
18225 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18226   echo $ac_n "(cached) $ac_c" 1>&6
18227 else
18228   
18229         ol_DB_LIB=-ldb-4
18230         ol_LIBS=$LIBS
18231         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18232
18233         cat > conftest.$ac_ext <<EOF
18234 #line 18235 "configure"
18235 #include "confdefs.h"
18236
18237 #ifdef HAVE_DB_185_H
18238 # include <db_185.h>
18239 #else
18240 # include <db.h>
18241 #endif
18242
18243 #ifndef DB_VERSION_MAJOR
18244 # define DB_VERSION_MAJOR 1
18245 #endif
18246
18247 #ifndef NULL
18248 #define NULL ((void*)0)
18249 #endif
18250
18251 int main() {
18252
18253 #if DB_VERSION_MAJOR > 1
18254         {
18255                 char *version;
18256                 int major, minor, patch;
18257
18258                 version = db_version( &major, &minor, &patch );
18259
18260                 if( major != DB_VERSION_MAJOR ||
18261                         minor < DB_VERSION_MINOR )
18262                 {
18263                         printf("Berkeley DB version mismatch\n"
18264                                 "\texpected: %s\n\tgot: %s\n",
18265                                 DB_VERSION_STRING, version);
18266                         return 1;
18267                 }
18268         }
18269 #endif
18270
18271 #if DB_VERSION_MAJOR > 2
18272         db_env_create( NULL, 0 );
18273 #elif DB_VERSION_MAJOR > 1
18274         db_appexit( NULL );
18275 #else
18276         (void) dbopen( NULL, 0, 0, 0, NULL);
18277 #endif
18278
18279 ; return 0; }
18280 EOF
18281 if { (eval echo configure:18282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18282   rm -rf conftest*
18283   ol_cv_db_db_4=yes
18284 else
18285   echo "configure: failed program was:" >&5
18286   cat conftest.$ac_ext >&5
18287   rm -rf conftest*
18288   ol_cv_db_db_4=no
18289 fi
18290 rm -f conftest*
18291
18292         LIBS="$ol_LIBS"
18293
18294 fi
18295
18296 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18297
18298         if test $ol_cv_db_db_4 = yes ; then
18299                 ol_cv_lib_db=-ldb-4
18300         fi
18301 fi
18302
18303 if test $ol_cv_lib_db = no ; then
18304         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18305 echo "configure:18306: checking for Berkeley DB link (-ldb4)" >&5
18306 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18307   echo $ac_n "(cached) $ac_c" 1>&6
18308 else
18309   
18310         ol_DB_LIB=-ldb4
18311         ol_LIBS=$LIBS
18312         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18313
18314         cat > conftest.$ac_ext <<EOF
18315 #line 18316 "configure"
18316 #include "confdefs.h"
18317
18318 #ifdef HAVE_DB_185_H
18319 # include <db_185.h>
18320 #else
18321 # include <db.h>
18322 #endif
18323
18324 #ifndef DB_VERSION_MAJOR
18325 # define DB_VERSION_MAJOR 1
18326 #endif
18327
18328 #ifndef NULL
18329 #define NULL ((void*)0)
18330 #endif
18331
18332 int main() {
18333
18334 #if DB_VERSION_MAJOR > 1
18335         {
18336                 char *version;
18337                 int major, minor, patch;
18338
18339                 version = db_version( &major, &minor, &patch );
18340
18341                 if( major != DB_VERSION_MAJOR ||
18342                         minor < DB_VERSION_MINOR )
18343                 {
18344                         printf("Berkeley DB version mismatch\n"
18345                                 "\texpected: %s\n\tgot: %s\n",
18346                                 DB_VERSION_STRING, version);
18347                         return 1;
18348                 }
18349         }
18350 #endif
18351
18352 #if DB_VERSION_MAJOR > 2
18353         db_env_create( NULL, 0 );
18354 #elif DB_VERSION_MAJOR > 1
18355         db_appexit( NULL );
18356 #else
18357         (void) dbopen( NULL, 0, 0, 0, NULL);
18358 #endif
18359
18360 ; return 0; }
18361 EOF
18362 if { (eval echo configure:18363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18363   rm -rf conftest*
18364   ol_cv_db_db4=yes
18365 else
18366   echo "configure: failed program was:" >&5
18367   cat conftest.$ac_ext >&5
18368   rm -rf conftest*
18369   ol_cv_db_db4=no
18370 fi
18371 rm -f conftest*
18372
18373         LIBS="$ol_LIBS"
18374
18375 fi
18376
18377 echo "$ac_t""$ol_cv_db_db4" 1>&6
18378
18379         if test $ol_cv_db_db4 = yes ; then
18380                 ol_cv_lib_db=-ldb4
18381         fi
18382 fi
18383
18384 if test $ol_cv_lib_db = no ; then
18385         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18386 echo "configure:18387: checking for Berkeley DB link (-ldb)" >&5
18387 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18388   echo $ac_n "(cached) $ac_c" 1>&6
18389 else
18390   
18391         ol_DB_LIB=-ldb
18392         ol_LIBS=$LIBS
18393         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18394
18395         cat > conftest.$ac_ext <<EOF
18396 #line 18397 "configure"
18397 #include "confdefs.h"
18398
18399 #ifdef HAVE_DB_185_H
18400 # include <db_185.h>
18401 #else
18402 # include <db.h>
18403 #endif
18404
18405 #ifndef DB_VERSION_MAJOR
18406 # define DB_VERSION_MAJOR 1
18407 #endif
18408
18409 #ifndef NULL
18410 #define NULL ((void*)0)
18411 #endif
18412
18413 int main() {
18414
18415 #if DB_VERSION_MAJOR > 1
18416         {
18417                 char *version;
18418                 int major, minor, patch;
18419
18420                 version = db_version( &major, &minor, &patch );
18421
18422                 if( major != DB_VERSION_MAJOR ||
18423                         minor < DB_VERSION_MINOR )
18424                 {
18425                         printf("Berkeley DB version mismatch\n"
18426                                 "\texpected: %s\n\tgot: %s\n",
18427                                 DB_VERSION_STRING, version);
18428                         return 1;
18429                 }
18430         }
18431 #endif
18432
18433 #if DB_VERSION_MAJOR > 2
18434         db_env_create( NULL, 0 );
18435 #elif DB_VERSION_MAJOR > 1
18436         db_appexit( NULL );
18437 #else
18438         (void) dbopen( NULL, 0, 0, 0, NULL);
18439 #endif
18440
18441 ; return 0; }
18442 EOF
18443 if { (eval echo configure:18444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18444   rm -rf conftest*
18445   ol_cv_db_db=yes
18446 else
18447   echo "configure: failed program was:" >&5
18448   cat conftest.$ac_ext >&5
18449   rm -rf conftest*
18450   ol_cv_db_db=no
18451 fi
18452 rm -f conftest*
18453
18454         LIBS="$ol_LIBS"
18455
18456 fi
18457
18458 echo "$ac_t""$ol_cv_db_db" 1>&6
18459
18460         if test $ol_cv_db_db = yes ; then
18461                 ol_cv_lib_db=-ldb
18462         fi
18463 fi
18464
18465 if test $ol_cv_lib_db = no ; then
18466         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18467 echo "configure:18468: checking for Berkeley DB link (-ldb3)" >&5
18468 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18469   echo $ac_n "(cached) $ac_c" 1>&6
18470 else
18471   
18472         ol_DB_LIB=-ldb3
18473         ol_LIBS=$LIBS
18474         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18475
18476         cat > conftest.$ac_ext <<EOF
18477 #line 18478 "configure"
18478 #include "confdefs.h"
18479
18480 #ifdef HAVE_DB_185_H
18481 # include <db_185.h>
18482 #else
18483 # include <db.h>
18484 #endif
18485
18486 #ifndef DB_VERSION_MAJOR
18487 # define DB_VERSION_MAJOR 1
18488 #endif
18489
18490 #ifndef NULL
18491 #define NULL ((void*)0)
18492 #endif
18493
18494 int main() {
18495
18496 #if DB_VERSION_MAJOR > 1
18497         {
18498                 char *version;
18499                 int major, minor, patch;
18500
18501                 version = db_version( &major, &minor, &patch );
18502
18503                 if( major != DB_VERSION_MAJOR ||
18504                         minor < DB_VERSION_MINOR )
18505                 {
18506                         printf("Berkeley DB version mismatch\n"
18507                                 "\texpected: %s\n\tgot: %s\n",
18508                                 DB_VERSION_STRING, version);
18509                         return 1;
18510                 }
18511         }
18512 #endif
18513
18514 #if DB_VERSION_MAJOR > 2
18515         db_env_create( NULL, 0 );
18516 #elif DB_VERSION_MAJOR > 1
18517         db_appexit( NULL );
18518 #else
18519         (void) dbopen( NULL, 0, 0, 0, NULL);
18520 #endif
18521
18522 ; return 0; }
18523 EOF
18524 if { (eval echo configure:18525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18525   rm -rf conftest*
18526   ol_cv_db_db3=yes
18527 else
18528   echo "configure: failed program was:" >&5
18529   cat conftest.$ac_ext >&5
18530   rm -rf conftest*
18531   ol_cv_db_db3=no
18532 fi
18533 rm -f conftest*
18534
18535         LIBS="$ol_LIBS"
18536
18537 fi
18538
18539 echo "$ac_t""$ol_cv_db_db3" 1>&6
18540
18541         if test $ol_cv_db_db3 = yes ; then
18542                 ol_cv_lib_db=-ldb3
18543         fi
18544 fi
18545
18546 if test $ol_cv_lib_db = no ; then
18547         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18548 echo "configure:18549: checking for Berkeley DB link (-ldb-3)" >&5
18549 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18550   echo $ac_n "(cached) $ac_c" 1>&6
18551 else
18552   
18553         ol_DB_LIB=-ldb-3
18554         ol_LIBS=$LIBS
18555         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18556
18557         cat > conftest.$ac_ext <<EOF
18558 #line 18559 "configure"
18559 #include "confdefs.h"
18560
18561 #ifdef HAVE_DB_185_H
18562 # include <db_185.h>
18563 #else
18564 # include <db.h>
18565 #endif
18566
18567 #ifndef DB_VERSION_MAJOR
18568 # define DB_VERSION_MAJOR 1
18569 #endif
18570
18571 #ifndef NULL
18572 #define NULL ((void*)0)
18573 #endif
18574
18575 int main() {
18576
18577 #if DB_VERSION_MAJOR > 1
18578         {
18579                 char *version;
18580                 int major, minor, patch;
18581
18582                 version = db_version( &major, &minor, &patch );
18583
18584                 if( major != DB_VERSION_MAJOR ||
18585                         minor < DB_VERSION_MINOR )
18586                 {
18587                         printf("Berkeley DB version mismatch\n"
18588                                 "\texpected: %s\n\tgot: %s\n",
18589                                 DB_VERSION_STRING, version);
18590                         return 1;
18591                 }
18592         }
18593 #endif
18594
18595 #if DB_VERSION_MAJOR > 2
18596         db_env_create( NULL, 0 );
18597 #elif DB_VERSION_MAJOR > 1
18598         db_appexit( NULL );
18599 #else
18600         (void) dbopen( NULL, 0, 0, 0, NULL);
18601 #endif
18602
18603 ; return 0; }
18604 EOF
18605 if { (eval echo configure:18606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18606   rm -rf conftest*
18607   ol_cv_db_db_3=yes
18608 else
18609   echo "configure: failed program was:" >&5
18610   cat conftest.$ac_ext >&5
18611   rm -rf conftest*
18612   ol_cv_db_db_3=no
18613 fi
18614 rm -f conftest*
18615
18616         LIBS="$ol_LIBS"
18617
18618 fi
18619
18620 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18621
18622         if test $ol_cv_db_db_3 = yes ; then
18623                 ol_cv_lib_db=-ldb-3
18624         fi
18625 fi
18626
18627 if test $ol_cv_lib_db = no ; then
18628         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18629 echo "configure:18630: checking for Berkeley DB link (-ldb2)" >&5
18630 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18631   echo $ac_n "(cached) $ac_c" 1>&6
18632 else
18633   
18634         ol_DB_LIB=-ldb2
18635         ol_LIBS=$LIBS
18636         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18637
18638         cat > conftest.$ac_ext <<EOF
18639 #line 18640 "configure"
18640 #include "confdefs.h"
18641
18642 #ifdef HAVE_DB_185_H
18643 # include <db_185.h>
18644 #else
18645 # include <db.h>
18646 #endif
18647
18648 #ifndef DB_VERSION_MAJOR
18649 # define DB_VERSION_MAJOR 1
18650 #endif
18651
18652 #ifndef NULL
18653 #define NULL ((void*)0)
18654 #endif
18655
18656 int main() {
18657
18658 #if DB_VERSION_MAJOR > 1
18659         {
18660                 char *version;
18661                 int major, minor, patch;
18662
18663                 version = db_version( &major, &minor, &patch );
18664
18665                 if( major != DB_VERSION_MAJOR ||
18666                         minor < DB_VERSION_MINOR )
18667                 {
18668                         printf("Berkeley DB version mismatch\n"
18669                                 "\texpected: %s\n\tgot: %s\n",
18670                                 DB_VERSION_STRING, version);
18671                         return 1;
18672                 }
18673         }
18674 #endif
18675
18676 #if DB_VERSION_MAJOR > 2
18677         db_env_create( NULL, 0 );
18678 #elif DB_VERSION_MAJOR > 1
18679         db_appexit( NULL );
18680 #else
18681         (void) dbopen( NULL, 0, 0, 0, NULL);
18682 #endif
18683
18684 ; return 0; }
18685 EOF
18686 if { (eval echo configure:18687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18687   rm -rf conftest*
18688   ol_cv_db_db2=yes
18689 else
18690   echo "configure: failed program was:" >&5
18691   cat conftest.$ac_ext >&5
18692   rm -rf conftest*
18693   ol_cv_db_db2=no
18694 fi
18695 rm -f conftest*
18696
18697         LIBS="$ol_LIBS"
18698
18699 fi
18700
18701 echo "$ac_t""$ol_cv_db_db2" 1>&6
18702
18703         if test $ol_cv_db_db2 = yes ; then
18704                 ol_cv_lib_db=-ldb2
18705         fi
18706 fi
18707
18708 if test $ol_cv_lib_db = no ; then
18709         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18710 echo "configure:18711: checking for Berkeley DB link (-ldb-2)" >&5
18711 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18712   echo $ac_n "(cached) $ac_c" 1>&6
18713 else
18714   
18715         ol_DB_LIB=-ldb-2
18716         ol_LIBS=$LIBS
18717         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18718
18719         cat > conftest.$ac_ext <<EOF
18720 #line 18721 "configure"
18721 #include "confdefs.h"
18722
18723 #ifdef HAVE_DB_185_H
18724 # include <db_185.h>
18725 #else
18726 # include <db.h>
18727 #endif
18728
18729 #ifndef DB_VERSION_MAJOR
18730 # define DB_VERSION_MAJOR 1
18731 #endif
18732
18733 #ifndef NULL
18734 #define NULL ((void*)0)
18735 #endif
18736
18737 int main() {
18738
18739 #if DB_VERSION_MAJOR > 1
18740         {
18741                 char *version;
18742                 int major, minor, patch;
18743
18744                 version = db_version( &major, &minor, &patch );
18745
18746                 if( major != DB_VERSION_MAJOR ||
18747                         minor < DB_VERSION_MINOR )
18748                 {
18749                         printf("Berkeley DB version mismatch\n"
18750                                 "\texpected: %s\n\tgot: %s\n",
18751                                 DB_VERSION_STRING, version);
18752                         return 1;
18753                 }
18754         }
18755 #endif
18756
18757 #if DB_VERSION_MAJOR > 2
18758         db_env_create( NULL, 0 );
18759 #elif DB_VERSION_MAJOR > 1
18760         db_appexit( NULL );
18761 #else
18762         (void) dbopen( NULL, 0, 0, 0, NULL);
18763 #endif
18764
18765 ; return 0; }
18766 EOF
18767 if { (eval echo configure:18768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18768   rm -rf conftest*
18769   ol_cv_db_db_2=yes
18770 else
18771   echo "configure: failed program was:" >&5
18772   cat conftest.$ac_ext >&5
18773   rm -rf conftest*
18774   ol_cv_db_db_2=no
18775 fi
18776 rm -f conftest*
18777
18778         LIBS="$ol_LIBS"
18779
18780 fi
18781
18782 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18783
18784         if test $ol_cv_db_db_2 = yes ; then
18785                 ol_cv_lib_db=-ldb-2
18786         fi
18787 fi
18788
18789 if test $ol_cv_lib_db = no ; then
18790         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18791 echo "configure:18792: checking for Berkeley DB link (-ldb1)" >&5
18792 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18793   echo $ac_n "(cached) $ac_c" 1>&6
18794 else
18795   
18796         ol_DB_LIB=-ldb1
18797         ol_LIBS=$LIBS
18798         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18799
18800         cat > conftest.$ac_ext <<EOF
18801 #line 18802 "configure"
18802 #include "confdefs.h"
18803
18804 #ifdef HAVE_DB_185_H
18805 # include <db_185.h>
18806 #else
18807 # include <db.h>
18808 #endif
18809
18810 #ifndef DB_VERSION_MAJOR
18811 # define DB_VERSION_MAJOR 1
18812 #endif
18813
18814 #ifndef NULL
18815 #define NULL ((void*)0)
18816 #endif
18817
18818 int main() {
18819
18820 #if DB_VERSION_MAJOR > 1
18821         {
18822                 char *version;
18823                 int major, minor, patch;
18824
18825                 version = db_version( &major, &minor, &patch );
18826
18827                 if( major != DB_VERSION_MAJOR ||
18828                         minor < DB_VERSION_MINOR )
18829                 {
18830                         printf("Berkeley DB version mismatch\n"
18831                                 "\texpected: %s\n\tgot: %s\n",
18832                                 DB_VERSION_STRING, version);
18833                         return 1;
18834                 }
18835         }
18836 #endif
18837
18838 #if DB_VERSION_MAJOR > 2
18839         db_env_create( NULL, 0 );
18840 #elif DB_VERSION_MAJOR > 1
18841         db_appexit( NULL );
18842 #else
18843         (void) dbopen( NULL, 0, 0, 0, NULL);
18844 #endif
18845
18846 ; return 0; }
18847 EOF
18848 if { (eval echo configure:18849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18849   rm -rf conftest*
18850   ol_cv_db_db1=yes
18851 else
18852   echo "configure: failed program was:" >&5
18853   cat conftest.$ac_ext >&5
18854   rm -rf conftest*
18855   ol_cv_db_db1=no
18856 fi
18857 rm -f conftest*
18858
18859         LIBS="$ol_LIBS"
18860
18861 fi
18862
18863 echo "$ac_t""$ol_cv_db_db1" 1>&6
18864
18865         if test $ol_cv_db_db1 = yes ; then
18866                 ol_cv_lib_db=-ldb1
18867         fi
18868 fi
18869
18870 if test $ol_cv_lib_db = no ; then
18871         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18872 echo "configure:18873: checking for Berkeley DB link (-ldb-1)" >&5
18873 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18874   echo $ac_n "(cached) $ac_c" 1>&6
18875 else
18876   
18877         ol_DB_LIB=-ldb-1
18878         ol_LIBS=$LIBS
18879         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18880
18881         cat > conftest.$ac_ext <<EOF
18882 #line 18883 "configure"
18883 #include "confdefs.h"
18884
18885 #ifdef HAVE_DB_185_H
18886 # include <db_185.h>
18887 #else
18888 # include <db.h>
18889 #endif
18890
18891 #ifndef DB_VERSION_MAJOR
18892 # define DB_VERSION_MAJOR 1
18893 #endif
18894
18895 #ifndef NULL
18896 #define NULL ((void*)0)
18897 #endif
18898
18899 int main() {
18900
18901 #if DB_VERSION_MAJOR > 1
18902         {
18903                 char *version;
18904                 int major, minor, patch;
18905
18906                 version = db_version( &major, &minor, &patch );
18907
18908                 if( major != DB_VERSION_MAJOR ||
18909                         minor < DB_VERSION_MINOR )
18910                 {
18911                         printf("Berkeley DB version mismatch\n"
18912                                 "\texpected: %s\n\tgot: %s\n",
18913                                 DB_VERSION_STRING, version);
18914                         return 1;
18915                 }
18916         }
18917 #endif
18918
18919 #if DB_VERSION_MAJOR > 2
18920         db_env_create( NULL, 0 );
18921 #elif DB_VERSION_MAJOR > 1
18922         db_appexit( NULL );
18923 #else
18924         (void) dbopen( NULL, 0, 0, 0, NULL);
18925 #endif
18926
18927 ; return 0; }
18928 EOF
18929 if { (eval echo configure:18930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18930   rm -rf conftest*
18931   ol_cv_db_db_1=yes
18932 else
18933   echo "configure: failed program was:" >&5
18934   cat conftest.$ac_ext >&5
18935   rm -rf conftest*
18936   ol_cv_db_db_1=no
18937 fi
18938 rm -f conftest*
18939
18940         LIBS="$ol_LIBS"
18941
18942 fi
18943
18944 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18945
18946         if test $ol_cv_db_db_1 = yes ; then
18947                 ol_cv_lib_db=-ldb-1
18948         fi
18949 fi
18950
18951
18952         if test "$ol_cv_lib_db" != no ; then
18953                 ol_cv_berkeley_db=yes
18954                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18955 echo "configure:18956: checking for Berkeley DB thread support" >&5
18956 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18957   echo $ac_n "(cached) $ac_c" 1>&6
18958 else
18959   
18960         ol_LIBS="$LIBS"
18961         LIBS="$LTHREAD_LIBS $LIBS"
18962         if test $ol_cv_lib_db != yes ; then
18963                 LIBS="$ol_cv_lib_db $LIBS"
18964         fi
18965
18966         if test "$cross_compiling" = yes; then
18967   ol_cv_berkeley_db_thread=cross
18968 else
18969   cat > conftest.$ac_ext <<EOF
18970 #line 18971 "configure"
18971 #include "confdefs.h"
18972
18973 #ifdef HAVE_DB_185_H
18974         choke me;
18975 #else
18976 #include <db.h>
18977 #endif
18978 #ifndef NULL
18979 #define NULL ((void *)0)
18980 #endif
18981 main()
18982 {
18983         int rc;
18984         u_int32_t flags = DB_CREATE |
18985 #ifdef DB_PRIVATE
18986                 DB_PRIVATE |
18987 #endif
18988                 DB_THREAD;
18989
18990 #if DB_VERSION_MAJOR > 2
18991         DB_ENV *env = NULL;
18992
18993         rc = db_env_create( &env, 0 );
18994
18995         flags |= DB_INIT_MPOOL;
18996 #ifdef DB_MPOOL_PRIVATE
18997         flags |= DB_MPOOL_PRIVATE;
18998 #endif
18999
19000         if( rc ) {
19001                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19002                 return rc;
19003         }
19004
19005 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19006         rc = env->open( env, NULL, flags, 0 );
19007 #else
19008         rc = env->open( env, NULL, NULL, flags, 0 );
19009 #endif
19010
19011         if ( rc == 0 ) {
19012                 rc = env->close( env, 0 );
19013         }
19014
19015         if( rc ) {
19016                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19017                 return rc;
19018         }
19019
19020 #else
19021         DB_ENV env;
19022         memset( &env, '\0', sizeof(env) );
19023
19024         rc = db_appinit( NULL, NULL, &env, flags );
19025
19026         if( rc == 0 ) {
19027                 db_appexit( &env );
19028         }
19029
19030         unlink("__db_mpool.share");
19031         unlink("__db_lock.share");
19032 #endif
19033
19034         return rc;
19035 }
19036 EOF
19037 if { (eval echo configure:19038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19038 then
19039   ol_cv_berkeley_db_thread=yes
19040 else
19041   echo "configure: failed program was:" >&5
19042   cat conftest.$ac_ext >&5
19043   rm -fr conftest*
19044   ol_cv_berkeley_db_thread=no
19045 fi
19046 rm -fr conftest*
19047 fi
19048
19049
19050         LIBS="$ol_LIBS"
19051
19052 fi
19053
19054 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19055
19056         if test $ol_cv_berkeley_db_thread != no ; then
19057                 cat >> confdefs.h <<\EOF
19058 #define HAVE_BERKELEY_DB_THREAD 1
19059 EOF
19060
19061         fi
19062
19063         fi
19064 fi
19065
19066         fi
19067
19068         if test $ol_cv_berkeley_db != no ; then
19069                 cat >> confdefs.h <<\EOF
19070 #define HAVE_BERKELEY_DB 1
19071 EOF
19072
19073
19074                 ol_link_ldbm=berkeley
19075                 ol_with_ldbm_api=berkeley
19076
19077                 if test $ol_with_ldbm_type = hash ; then
19078                         cat >> confdefs.h <<\EOF
19079 #define LDBM_USE_DBHASH 1
19080 EOF
19081
19082                 else
19083                         cat >> confdefs.h <<\EOF
19084 #define LDBM_USE_DBBTREE 1
19085 EOF
19086
19087                 fi
19088
19089                                                 if test $ol_cv_lib_db != yes ; then
19090                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19091                 fi
19092         fi
19093 fi
19094
19095 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19096         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19097 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19098         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19099 echo "configure:19100: checking Berkeley DB version for BDB backend" >&5
19100 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   
19104         cat > conftest.$ac_ext <<EOF
19105 #line 19106 "configure"
19106 #include "confdefs.h"
19107
19108 #include <db.h>
19109
19110  /* this check could be improved */
19111 #ifndef DB_VERSION_MAJOR
19112 #       define DB_VERSION_MAJOR 1
19113 #endif
19114 #ifndef DB_VERSION_MINOR
19115 #       define DB_VERSION_MINOR 0
19116 #endif
19117
19118 /* require 4.1 or later */
19119 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19120         __db_version_compat
19121 #endif
19122         
19123 EOF
19124 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19125   egrep "__db_version_compat" >/dev/null 2>&1; then
19126   rm -rf conftest*
19127   ol_cv_bdb_compat=yes
19128 else
19129   rm -rf conftest*
19130   ol_cv_bdb_compat=no
19131 fi
19132 rm -f conftest*
19133
19134 fi
19135
19136 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19137
19138
19139         if test $ol_cv_bdb_compat = yes ; then
19140                 ol_enable_bdb=yes
19141         elif test $ol_enable_bdb = yes ; then
19142                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19143         else
19144                 ol_enable_bdb=no
19145         fi
19146 fi
19147 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19148         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19149 fi
19150
19151 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19152         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19153         ol_with_ldbm_api=none
19154 fi
19155
19156 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19157         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19158 echo "configure:19159: checking for MDBM library" >&5
19159 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19160   echo $ac_n "(cached) $ac_c" 1>&6
19161 else
19162         ol_LIBS="$LIBS"
19163         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19164 echo "configure:19165: checking for mdbm_set_chain" >&5
19165 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19166   echo $ac_n "(cached) $ac_c" 1>&6
19167 else
19168   cat > conftest.$ac_ext <<EOF
19169 #line 19170 "configure"
19170 #include "confdefs.h"
19171 /* System header to define __stub macros and hopefully few prototypes,
19172     which can conflict with char mdbm_set_chain(); below.  */
19173 #include <assert.h>
19174 /* Override any gcc2 internal prototype to avoid an error.  */
19175 /* We use char because int might match the return type of a gcc2
19176     builtin and then its argument prototype would still apply.  */
19177 char mdbm_set_chain();
19178 char (*f)();
19179
19180 int main() {
19181
19182 /* The GNU C library defines this for functions which it implements
19183     to always fail with ENOSYS.  Some functions are actually named
19184     something starting with __ and the normal name is an alias.  */
19185 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19186 choke me
19187 #else
19188 f = mdbm_set_chain;
19189 #endif
19190
19191 ; return 0; }
19192 EOF
19193 if { (eval echo configure:19194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19194   rm -rf conftest*
19195   eval "ac_cv_func_mdbm_set_chain=yes"
19196 else
19197   echo "configure: failed program was:" >&5
19198   cat conftest.$ac_ext >&5
19199   rm -rf conftest*
19200   eval "ac_cv_func_mdbm_set_chain=no"
19201 fi
19202 rm -f conftest*
19203 fi
19204
19205 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19206   echo "$ac_t""yes" 1>&6
19207   ol_cv_lib_mdbm=yes
19208 else
19209   echo "$ac_t""no" 1>&6
19210
19211                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19212 echo "configure:19213: checking for mdbm_set_chain in -lmdbm" >&5
19213 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19215   echo $ac_n "(cached) $ac_c" 1>&6
19216 else
19217   ac_save_LIBS="$LIBS"
19218 LIBS="-lmdbm  $LIBS"
19219 cat > conftest.$ac_ext <<EOF
19220 #line 19221 "configure"
19221 #include "confdefs.h"
19222 /* Override any gcc2 internal prototype to avoid an error.  */
19223 /* We use char because int might match the return type of a gcc2
19224     builtin and then its argument prototype would still apply.  */
19225 char mdbm_set_chain();
19226
19227 int main() {
19228 mdbm_set_chain()
19229 ; return 0; }
19230 EOF
19231 if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19232   rm -rf conftest*
19233   eval "ac_cv_lib_$ac_lib_var=yes"
19234 else
19235   echo "configure: failed program was:" >&5
19236   cat conftest.$ac_ext >&5
19237   rm -rf conftest*
19238   eval "ac_cv_lib_$ac_lib_var=no"
19239 fi
19240 rm -f conftest*
19241 LIBS="$ac_save_LIBS"
19242
19243 fi
19244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19245   echo "$ac_t""yes" 1>&6
19246   ol_cv_lib_mdbm=-lmdbm
19247 else
19248   echo "$ac_t""no" 1>&6
19249 ol_cv_lib_mdbm=no
19250 fi
19251
19252         
19253 fi
19254
19255         LIBS="$ol_LIBS"
19256
19257 fi
19258
19259 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19260
19261
19262  for ac_hdr in mdbm.h
19263 do
19264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19266 echo "configure:19267: checking for $ac_hdr" >&5
19267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19268   echo $ac_n "(cached) $ac_c" 1>&6
19269 else
19270   cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273 #include <$ac_hdr>
19274 EOF
19275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19276 { (eval echo configure:19277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19278 if test -z "$ac_err"; then
19279   rm -rf conftest*
19280   eval "ac_cv_header_$ac_safe=yes"
19281 else
19282   echo "$ac_err" >&5
19283   echo "configure: failed program was:" >&5
19284   cat conftest.$ac_ext >&5
19285   rm -rf conftest*
19286   eval "ac_cv_header_$ac_safe=no"
19287 fi
19288 rm -f conftest*
19289 fi
19290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19291   echo "$ac_t""yes" 1>&6
19292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19293   cat >> confdefs.h <<EOF
19294 #define $ac_tr_hdr 1
19295 EOF
19296  
19297 else
19298   echo "$ac_t""no" 1>&6
19299 fi
19300 done
19301
19302  echo $ac_n "checking for db""... $ac_c" 1>&6
19303 echo "configure:19304: checking for db" >&5
19304 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19305   echo $ac_n "(cached) $ac_c" 1>&6
19306 else
19307   
19308         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19309                 ol_cv_mdbm=no
19310         else
19311                 ol_cv_mdbm=yes
19312         fi
19313
19314 fi
19315
19316 echo "$ac_t""$ol_cv_mdbm" 1>&6
19317  if test $ol_cv_mdbm = yes ; then
19318         cat >> confdefs.h <<\EOF
19319 #define HAVE_MDBM 1
19320 EOF
19321
19322  fi
19323
19324
19325         if test $ol_cv_mdbm = yes ; then
19326                 ol_link_ldbm=mdbm
19327                 ol_with_ldbm_api=mdbm
19328                 if test $ol_cv_lib_mdbm != yes ; then
19329                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19330                 fi
19331         fi
19332 fi
19333
19334 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19335         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19336 echo "configure:19337: checking for GDBM library" >&5
19337 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19338   echo $ac_n "(cached) $ac_c" 1>&6
19339 else
19340         ol_LIBS="$LIBS"
19341         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19342 echo "configure:19343: checking for gdbm_open" >&5
19343 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19344   echo $ac_n "(cached) $ac_c" 1>&6
19345 else
19346   cat > conftest.$ac_ext <<EOF
19347 #line 19348 "configure"
19348 #include "confdefs.h"
19349 /* System header to define __stub macros and hopefully few prototypes,
19350     which can conflict with char gdbm_open(); below.  */
19351 #include <assert.h>
19352 /* Override any gcc2 internal prototype to avoid an error.  */
19353 /* We use char because int might match the return type of a gcc2
19354     builtin and then its argument prototype would still apply.  */
19355 char gdbm_open();
19356 char (*f)();
19357
19358 int main() {
19359
19360 /* The GNU C library defines this for functions which it implements
19361     to always fail with ENOSYS.  Some functions are actually named
19362     something starting with __ and the normal name is an alias.  */
19363 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19364 choke me
19365 #else
19366 f = gdbm_open;
19367 #endif
19368
19369 ; return 0; }
19370 EOF
19371 if { (eval echo configure:19372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19372   rm -rf conftest*
19373   eval "ac_cv_func_gdbm_open=yes"
19374 else
19375   echo "configure: failed program was:" >&5
19376   cat conftest.$ac_ext >&5
19377   rm -rf conftest*
19378   eval "ac_cv_func_gdbm_open=no"
19379 fi
19380 rm -f conftest*
19381 fi
19382
19383 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19384   echo "$ac_t""yes" 1>&6
19385   ol_cv_lib_gdbm=yes
19386 else
19387   echo "$ac_t""no" 1>&6
19388
19389                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19390 echo "configure:19391: checking for gdbm_open in -lgdbm" >&5
19391 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19392 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19393   echo $ac_n "(cached) $ac_c" 1>&6
19394 else
19395   ac_save_LIBS="$LIBS"
19396 LIBS="-lgdbm  $LIBS"
19397 cat > conftest.$ac_ext <<EOF
19398 #line 19399 "configure"
19399 #include "confdefs.h"
19400 /* Override any gcc2 internal prototype to avoid an error.  */
19401 /* We use char because int might match the return type of a gcc2
19402     builtin and then its argument prototype would still apply.  */
19403 char gdbm_open();
19404
19405 int main() {
19406 gdbm_open()
19407 ; return 0; }
19408 EOF
19409 if { (eval echo configure:19410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19410   rm -rf conftest*
19411   eval "ac_cv_lib_$ac_lib_var=yes"
19412 else
19413   echo "configure: failed program was:" >&5
19414   cat conftest.$ac_ext >&5
19415   rm -rf conftest*
19416   eval "ac_cv_lib_$ac_lib_var=no"
19417 fi
19418 rm -f conftest*
19419 LIBS="$ac_save_LIBS"
19420
19421 fi
19422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19423   echo "$ac_t""yes" 1>&6
19424   ol_cv_lib_gdbm=-lgdbm
19425 else
19426   echo "$ac_t""no" 1>&6
19427 ol_cv_lib_gdbm=no
19428 fi
19429
19430         
19431 fi
19432
19433         LIBS="$ol_LIBS"
19434
19435 fi
19436
19437 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19438
19439
19440  for ac_hdr in gdbm.h
19441 do
19442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19444 echo "configure:19445: checking for $ac_hdr" >&5
19445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19446   echo $ac_n "(cached) $ac_c" 1>&6
19447 else
19448   cat > conftest.$ac_ext <<EOF
19449 #line 19450 "configure"
19450 #include "confdefs.h"
19451 #include <$ac_hdr>
19452 EOF
19453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19454 { (eval echo configure:19455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19456 if test -z "$ac_err"; then
19457   rm -rf conftest*
19458   eval "ac_cv_header_$ac_safe=yes"
19459 else
19460   echo "$ac_err" >&5
19461   echo "configure: failed program was:" >&5
19462   cat conftest.$ac_ext >&5
19463   rm -rf conftest*
19464   eval "ac_cv_header_$ac_safe=no"
19465 fi
19466 rm -f conftest*
19467 fi
19468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19469   echo "$ac_t""yes" 1>&6
19470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19471   cat >> confdefs.h <<EOF
19472 #define $ac_tr_hdr 1
19473 EOF
19474  
19475 else
19476   echo "$ac_t""no" 1>&6
19477 fi
19478 done
19479
19480  echo $ac_n "checking for db""... $ac_c" 1>&6
19481 echo "configure:19482: checking for db" >&5
19482 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19483   echo $ac_n "(cached) $ac_c" 1>&6
19484 else
19485   
19486         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19487                 ol_cv_gdbm=no
19488         else
19489                 ol_cv_gdbm=yes
19490         fi
19491
19492 fi
19493
19494 echo "$ac_t""$ol_cv_gdbm" 1>&6
19495  if test $ol_cv_gdbm = yes ; then
19496         cat >> confdefs.h <<\EOF
19497 #define HAVE_GDBM 1
19498 EOF
19499
19500  fi
19501
19502
19503         if test $ol_cv_gdbm = yes ; then
19504                 ol_link_ldbm=gdbm
19505                 ol_with_ldbm_api=gdbm
19506
19507                 if test $ol_cv_lib_gdbm != yes ; then
19508                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19509                 fi
19510         fi
19511 fi
19512
19513 if test $ol_with_ldbm_api = ndbm ; then
19514         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19515 echo "configure:19516: checking for NDBM library" >&5
19516 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19517   echo $ac_n "(cached) $ac_c" 1>&6
19518 else
19519         ol_LIBS="$LIBS"
19520         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19521 echo "configure:19522: checking for dbm_open" >&5
19522 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19523   echo $ac_n "(cached) $ac_c" 1>&6
19524 else
19525   cat > conftest.$ac_ext <<EOF
19526 #line 19527 "configure"
19527 #include "confdefs.h"
19528 /* System header to define __stub macros and hopefully few prototypes,
19529     which can conflict with char dbm_open(); below.  */
19530 #include <assert.h>
19531 /* Override any gcc2 internal prototype to avoid an error.  */
19532 /* We use char because int might match the return type of a gcc2
19533     builtin and then its argument prototype would still apply.  */
19534 char dbm_open();
19535 char (*f)();
19536
19537 int main() {
19538
19539 /* The GNU C library defines this for functions which it implements
19540     to always fail with ENOSYS.  Some functions are actually named
19541     something starting with __ and the normal name is an alias.  */
19542 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19543 choke me
19544 #else
19545 f = dbm_open;
19546 #endif
19547
19548 ; return 0; }
19549 EOF
19550 if { (eval echo configure:19551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19551   rm -rf conftest*
19552   eval "ac_cv_func_dbm_open=yes"
19553 else
19554   echo "configure: failed program was:" >&5
19555   cat conftest.$ac_ext >&5
19556   rm -rf conftest*
19557   eval "ac_cv_func_dbm_open=no"
19558 fi
19559 rm -f conftest*
19560 fi
19561
19562 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19563   echo "$ac_t""yes" 1>&6
19564   ol_cv_lib_ndbm=yes
19565 else
19566   echo "$ac_t""no" 1>&6
19567
19568                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19569 echo "configure:19570: checking for dbm_open in -lndbm" >&5
19570 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19572   echo $ac_n "(cached) $ac_c" 1>&6
19573 else
19574   ac_save_LIBS="$LIBS"
19575 LIBS="-lndbm  $LIBS"
19576 cat > conftest.$ac_ext <<EOF
19577 #line 19578 "configure"
19578 #include "confdefs.h"
19579 /* Override any gcc2 internal prototype to avoid an error.  */
19580 /* We use char because int might match the return type of a gcc2
19581     builtin and then its argument prototype would still apply.  */
19582 char dbm_open();
19583
19584 int main() {
19585 dbm_open()
19586 ; return 0; }
19587 EOF
19588 if { (eval echo configure:19589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19589   rm -rf conftest*
19590   eval "ac_cv_lib_$ac_lib_var=yes"
19591 else
19592   echo "configure: failed program was:" >&5
19593   cat conftest.$ac_ext >&5
19594   rm -rf conftest*
19595   eval "ac_cv_lib_$ac_lib_var=no"
19596 fi
19597 rm -f conftest*
19598 LIBS="$ac_save_LIBS"
19599
19600 fi
19601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19602   echo "$ac_t""yes" 1>&6
19603   ol_cv_lib_ndbm=-lndbm
19604 else
19605   echo "$ac_t""no" 1>&6
19606
19607                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19608 echo "configure:19609: checking for dbm_open in -ldbm" >&5
19609 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   ac_save_LIBS="$LIBS"
19614 LIBS="-ldbm  $LIBS"
19615 cat > conftest.$ac_ext <<EOF
19616 #line 19617 "configure"
19617 #include "confdefs.h"
19618 /* Override any gcc2 internal prototype to avoid an error.  */
19619 /* We use char because int might match the return type of a gcc2
19620     builtin and then its argument prototype would still apply.  */
19621 char dbm_open();
19622
19623 int main() {
19624 dbm_open()
19625 ; return 0; }
19626 EOF
19627 if { (eval echo configure:19628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19628   rm -rf conftest*
19629   eval "ac_cv_lib_$ac_lib_var=yes"
19630 else
19631   echo "configure: failed program was:" >&5
19632   cat conftest.$ac_ext >&5
19633   rm -rf conftest*
19634   eval "ac_cv_lib_$ac_lib_var=no"
19635 fi
19636 rm -f conftest*
19637 LIBS="$ac_save_LIBS"
19638
19639 fi
19640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19641   echo "$ac_t""yes" 1>&6
19642   ol_cv_lib_ndbm=-ldbm
19643 else
19644   echo "$ac_t""no" 1>&6
19645 ol_cv_lib_ndbm=no
19646 fi
19647                 
19648 fi
19649
19650         
19651 fi
19652
19653         LIBS="$ol_LIBS"
19654
19655 fi
19656
19657 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19658
19659
19660  for ac_hdr in ndbm.h
19661 do
19662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19664 echo "configure:19665: checking for $ac_hdr" >&5
19665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19666   echo $ac_n "(cached) $ac_c" 1>&6
19667 else
19668   cat > conftest.$ac_ext <<EOF
19669 #line 19670 "configure"
19670 #include "confdefs.h"
19671 #include <$ac_hdr>
19672 EOF
19673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19674 { (eval echo configure:19675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19676 if test -z "$ac_err"; then
19677   rm -rf conftest*
19678   eval "ac_cv_header_$ac_safe=yes"
19679 else
19680   echo "$ac_err" >&5
19681   echo "configure: failed program was:" >&5
19682   cat conftest.$ac_ext >&5
19683   rm -rf conftest*
19684   eval "ac_cv_header_$ac_safe=no"
19685 fi
19686 rm -f conftest*
19687 fi
19688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19689   echo "$ac_t""yes" 1>&6
19690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19691   cat >> confdefs.h <<EOF
19692 #define $ac_tr_hdr 1
19693 EOF
19694  
19695 else
19696   echo "$ac_t""no" 1>&6
19697 fi
19698 done
19699
19700  echo $ac_n "checking for db""... $ac_c" 1>&6
19701 echo "configure:19702: checking for db" >&5
19702 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19703   echo $ac_n "(cached) $ac_c" 1>&6
19704 else
19705   
19706         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19707                 ol_cv_ndbm=no
19708         else
19709                 ol_cv_ndbm=yes
19710         fi
19711
19712 fi
19713
19714 echo "$ac_t""$ol_cv_ndbm" 1>&6
19715  if test $ol_cv_ndbm = yes ; then
19716         cat >> confdefs.h <<\EOF
19717 #define HAVE_NDBM 1
19718 EOF
19719
19720  fi
19721
19722
19723         if test $ol_cv_ndbm = yes ; then
19724                 ol_link_ldbm=ndbm
19725                 ol_with_ldbm_api=ndbm
19726
19727                 if test $ol_cv_lib_ndbm != yes ; then
19728                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19729                 fi
19730         fi
19731 fi
19732
19733 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19734         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19735         if test $ol_enable_ldbm = yes ; then
19736                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19737         fi
19738
19739         echo "configure: warning: disabling LDBM" 1>&2
19740         ol_enable_ldbm=no
19741 fi
19742
19743
19744 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19745         BUILD_LIBS_DYNAMIC=shared
19746         cat >> confdefs.h <<\EOF
19747 #define LDAP_LIBS_DYNAMIC 1
19748 EOF
19749
19750         LTSTATIC=""
19751 else
19752         BUILD_LIBS_DYNAMIC=static
19753         LTSTATIC="-static"
19754 fi
19755
19756 if test $ol_enable_wrappers != no ; then
19757         for ac_hdr in tcpd.h
19758 do
19759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19761 echo "configure:19762: checking for $ac_hdr" >&5
19762 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19763   echo $ac_n "(cached) $ac_c" 1>&6
19764 else
19765   cat > conftest.$ac_ext <<EOF
19766 #line 19767 "configure"
19767 #include "confdefs.h"
19768 #include <$ac_hdr>
19769 EOF
19770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19771 { (eval echo configure:19772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19773 if test -z "$ac_err"; then
19774   rm -rf conftest*
19775   eval "ac_cv_header_$ac_safe=yes"
19776 else
19777   echo "$ac_err" >&5
19778   echo "configure: failed program was:" >&5
19779   cat conftest.$ac_ext >&5
19780   rm -rf conftest*
19781   eval "ac_cv_header_$ac_safe=no"
19782 fi
19783 rm -f conftest*
19784 fi
19785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19786   echo "$ac_t""yes" 1>&6
19787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19788   cat >> confdefs.h <<EOF
19789 #define $ac_tr_hdr 1
19790 EOF
19791  
19792                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19793 echo "configure:19794: checking for TCP wrappers library" >&5
19794                 save_LIBS="$LIBS"
19795                 LIBS="$LIBS -lwrap"
19796                 cat > conftest.$ac_ext <<EOF
19797 #line 19798 "configure"
19798 #include "confdefs.h"
19799
19800 #include <tcpd.h>
19801 int allow_severity = 0;
19802 int deny_severity  = 0;
19803
19804 struct request_info *req;
19805                 
19806 int main() {
19807
19808 hosts_access(req)
19809                 
19810 ; return 0; }
19811 EOF
19812 if { (eval echo configure:19813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19813   rm -rf conftest*
19814   echo "$ac_t""-lwrap" 1>&6
19815                 have_wrappers=yes
19816                 LIBS="$save_LIBS"
19817 else
19818   echo "configure: failed program was:" >&5
19819   cat conftest.$ac_ext >&5
19820   rm -rf conftest*
19821   
19822                                 LIBS="$LIBS -lnsl"
19823                 cat > conftest.$ac_ext <<EOF
19824 #line 19825 "configure"
19825 #include "confdefs.h"
19826
19827 #include <tcpd.h>
19828 int allow_severity = 0;
19829 int deny_severity  = 0;
19830
19831 struct request_info *req;
19832                 
19833 int main() {
19834
19835 hosts_access(req)
19836                 
19837 ; return 0; }
19838 EOF
19839 if { (eval echo configure:19840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19840   rm -rf conftest*
19841   echo "$ac_t""-lwrap -lnsl" 1>&6
19842                 have_wrappers=yes
19843                 LIBS="$save_LIBS -lnsl"
19844 else
19845   echo "configure: failed program was:" >&5
19846   cat conftest.$ac_ext >&5
19847   rm -rf conftest*
19848   
19849                 echo "$ac_t""no" 1>&6
19850                 have_wrappers=no
19851                 LIBS=$save_LIBS
19852 fi
19853 rm -f conftest*
19854 fi
19855 rm -f conftest*
19856 else
19857   echo "$ac_t""no" 1>&6
19858 have_wrappers=no
19859 fi
19860 done
19861
19862
19863         if test $have_wrappers = yes ; then
19864                 cat >> confdefs.h <<\EOF
19865 #define HAVE_TCPD 1
19866 EOF
19867
19868                 WRAP_LIBS="-lwrap"
19869         elif test $ol_enable_wrappers = yes ; then
19870                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19871         else
19872                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19873                 WRAP_LIBS=""
19874         fi
19875 fi
19876
19877 if test $ol_enable_syslog != no ; then
19878         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19879 echo "configure:19880: checking for openlog" >&5
19880 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19881   echo $ac_n "(cached) $ac_c" 1>&6
19882 else
19883   cat > conftest.$ac_ext <<EOF
19884 #line 19885 "configure"
19885 #include "confdefs.h"
19886 /* System header to define __stub macros and hopefully few prototypes,
19887     which can conflict with char openlog(); below.  */
19888 #include <assert.h>
19889 /* Override any gcc2 internal prototype to avoid an error.  */
19890 /* We use char because int might match the return type of a gcc2
19891     builtin and then its argument prototype would still apply.  */
19892 char openlog();
19893 char (*f)();
19894
19895 int main() {
19896
19897 /* The GNU C library defines this for functions which it implements
19898     to always fail with ENOSYS.  Some functions are actually named
19899     something starting with __ and the normal name is an alias.  */
19900 #if defined (__stub_openlog) || defined (__stub___openlog)
19901 choke me
19902 #else
19903 f = openlog;
19904 #endif
19905
19906 ; return 0; }
19907 EOF
19908 if { (eval echo configure:19909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19909   rm -rf conftest*
19910   eval "ac_cv_func_openlog=yes"
19911 else
19912   echo "configure: failed program was:" >&5
19913   cat conftest.$ac_ext >&5
19914   rm -rf conftest*
19915   eval "ac_cv_func_openlog=no"
19916 fi
19917 rm -f conftest*
19918 fi
19919
19920 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19921   echo "$ac_t""yes" 1>&6
19922   :
19923 else
19924   echo "$ac_t""no" 1>&6
19925 fi
19926
19927         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19928                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19929         fi
19930         ol_enable_syslog=$ac_cv_func_openlog
19931 fi
19932
19933
19934 ol_link_sql=no
19935 if test $ol_enable_sql != no ; then
19936         for ac_hdr in sql.h sqlext.h
19937 do
19938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19940 echo "configure:19941: checking for $ac_hdr" >&5
19941 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19942   echo $ac_n "(cached) $ac_c" 1>&6
19943 else
19944   cat > conftest.$ac_ext <<EOF
19945 #line 19946 "configure"
19946 #include "confdefs.h"
19947 #include <$ac_hdr>
19948 EOF
19949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19950 { (eval echo configure:19951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19952 if test -z "$ac_err"; then
19953   rm -rf conftest*
19954   eval "ac_cv_header_$ac_safe=yes"
19955 else
19956   echo "$ac_err" >&5
19957   echo "configure: failed program was:" >&5
19958   cat conftest.$ac_ext >&5
19959   rm -rf conftest*
19960   eval "ac_cv_header_$ac_safe=no"
19961 fi
19962 rm -f conftest*
19963 fi
19964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19965   echo "$ac_t""yes" 1>&6
19966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19967   cat >> confdefs.h <<EOF
19968 #define $ac_tr_hdr 1
19969 EOF
19970  
19971 else
19972   echo "$ac_t""no" 1>&6
19973 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19974         
19975 fi
19976 done
19977
19978
19979         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19980 echo "configure:19981: checking for SQLDriverConnect in -liodbc" >&5
19981 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19982 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19983   echo $ac_n "(cached) $ac_c" 1>&6
19984 else
19985   ac_save_LIBS="$LIBS"
19986 LIBS="-liodbc  $LIBS"
19987 cat > conftest.$ac_ext <<EOF
19988 #line 19989 "configure"
19989 #include "confdefs.h"
19990 /* Override any gcc2 internal prototype to avoid an error.  */
19991 /* We use char because int might match the return type of a gcc2
19992     builtin and then its argument prototype would still apply.  */
19993 char SQLDriverConnect();
19994
19995 int main() {
19996 SQLDriverConnect()
19997 ; return 0; }
19998 EOF
19999 if { (eval echo configure:20000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20000   rm -rf conftest*
20001   eval "ac_cv_lib_$ac_lib_var=yes"
20002 else
20003   echo "configure: failed program was:" >&5
20004   cat conftest.$ac_ext >&5
20005   rm -rf conftest*
20006   eval "ac_cv_lib_$ac_lib_var=no"
20007 fi
20008 rm -f conftest*
20009 LIBS="$ac_save_LIBS"
20010
20011 fi
20012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20013   echo "$ac_t""yes" 1>&6
20014   have_iodbc=yes
20015 else
20016   echo "$ac_t""no" 1>&6
20017 have_iodbc=no
20018 fi
20019
20020         if test $have_iodbc = yes ; then
20021                 ol_link_sql="-liodbc"
20022         else
20023                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20024 echo "configure:20025: checking for SQLDriverConnect in -lodbc" >&5
20025 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20027   echo $ac_n "(cached) $ac_c" 1>&6
20028 else
20029   ac_save_LIBS="$LIBS"
20030 LIBS="-lodbc  $LIBS"
20031 cat > conftest.$ac_ext <<EOF
20032 #line 20033 "configure"
20033 #include "confdefs.h"
20034 /* Override any gcc2 internal prototype to avoid an error.  */
20035 /* We use char because int might match the return type of a gcc2
20036     builtin and then its argument prototype would still apply.  */
20037 char SQLDriverConnect();
20038
20039 int main() {
20040 SQLDriverConnect()
20041 ; return 0; }
20042 EOF
20043 if { (eval echo configure:20044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20044   rm -rf conftest*
20045   eval "ac_cv_lib_$ac_lib_var=yes"
20046 else
20047   echo "configure: failed program was:" >&5
20048   cat conftest.$ac_ext >&5
20049   rm -rf conftest*
20050   eval "ac_cv_lib_$ac_lib_var=no"
20051 fi
20052 rm -f conftest*
20053 LIBS="$ac_save_LIBS"
20054
20055 fi
20056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20057   echo "$ac_t""yes" 1>&6
20058   have_odbc=yes
20059 else
20060   echo "$ac_t""no" 1>&6
20061 have_odbc=no
20062 fi
20063
20064                 if test $have_odbc = yes ; then
20065                         ol_link_sql="-lodbc"
20066                 fi
20067         fi
20068
20069         if test $ol_link_sql != no ; then
20070                 SLAPD_SQL_LIBS="$ol_link_sql"
20071
20072         elif test $ol_enable_sql != auto ; then
20073                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20074         fi
20075 fi
20076
20077 if test $ol_enable_tcl != no ; then
20078         for ac_hdr in tcl.h
20079 do
20080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20082 echo "configure:20083: checking for $ac_hdr" >&5
20083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20084   echo $ac_n "(cached) $ac_c" 1>&6
20085 else
20086   cat > conftest.$ac_ext <<EOF
20087 #line 20088 "configure"
20088 #include "confdefs.h"
20089 #include <$ac_hdr>
20090 EOF
20091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20092 { (eval echo configure:20093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20094 if test -z "$ac_err"; then
20095   rm -rf conftest*
20096   eval "ac_cv_header_$ac_safe=yes"
20097 else
20098   echo "$ac_err" >&5
20099   echo "configure: failed program was:" >&5
20100   cat conftest.$ac_ext >&5
20101   rm -rf conftest*
20102   eval "ac_cv_header_$ac_safe=no"
20103 fi
20104 rm -f conftest*
20105 fi
20106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20107   echo "$ac_t""yes" 1>&6
20108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20109   cat >> confdefs.h <<EOF
20110 #define $ac_tr_hdr 1
20111 EOF
20112  
20113 else
20114   echo "$ac_t""no" 1>&6
20115 fi
20116 done
20117
20118
20119         if test $ac_cv_header_tcl_h != yes ; then
20120                 have_tcl=no
20121         else
20122                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20123                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20124 echo "configure:20125: checking for main in -l$lib" >&5
20125 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20127   echo $ac_n "(cached) $ac_c" 1>&6
20128 else
20129   ac_save_LIBS="$LIBS"
20130 LIBS="-l$lib  $LIBS"
20131 cat > conftest.$ac_ext <<EOF
20132 #line 20133 "configure"
20133 #include "confdefs.h"
20134
20135 int main() {
20136 main()
20137 ; return 0; }
20138 EOF
20139 if { (eval echo configure:20140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20140   rm -rf conftest*
20141   eval "ac_cv_lib_$ac_lib_var=yes"
20142 else
20143   echo "configure: failed program was:" >&5
20144   cat conftest.$ac_ext >&5
20145   rm -rf conftest*
20146   eval "ac_cv_lib_$ac_lib_var=no"
20147 fi
20148 rm -f conftest*
20149 LIBS="$ac_save_LIBS"
20150
20151 fi
20152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20153   echo "$ac_t""yes" 1>&6
20154   have_tcl=yes
20155                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20156                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20157                            else
20158                                         MOD_TCL_LIB="-l${lib}"
20159                            fi;break
20160 else
20161   echo "$ac_t""no" 1>&6
20162 have_tcl=no
20163 fi
20164
20165                 done
20166         fi
20167
20168         if test $have_tcl != yes ; then
20169                 echo "configure: warning: could not find -ltcl" 1>&2
20170                 if test $ol_enable_tcl = yes ; then
20171                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20172                 fi
20173
20174                 ol_enable_tcl=no
20175         fi
20176 fi
20177
20178 ol_link_termcap=no
20179 for ac_hdr in termcap.h ncurses.h
20180 do
20181 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20182 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20183 echo "configure:20184: checking for $ac_hdr" >&5
20184 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20185   echo $ac_n "(cached) $ac_c" 1>&6
20186 else
20187   cat > conftest.$ac_ext <<EOF
20188 #line 20189 "configure"
20189 #include "confdefs.h"
20190 #include <$ac_hdr>
20191 EOF
20192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20193 { (eval echo configure:20194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20195 if test -z "$ac_err"; then
20196   rm -rf conftest*
20197   eval "ac_cv_header_$ac_safe=yes"
20198 else
20199   echo "$ac_err" >&5
20200   echo "configure: failed program was:" >&5
20201   cat conftest.$ac_ext >&5
20202   rm -rf conftest*
20203   eval "ac_cv_header_$ac_safe=no"
20204 fi
20205 rm -f conftest*
20206 fi
20207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20208   echo "$ac_t""yes" 1>&6
20209     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20210   cat >> confdefs.h <<EOF
20211 #define $ac_tr_hdr 1
20212 EOF
20213  
20214 else
20215   echo "$ac_t""no" 1>&6
20216 fi
20217 done
20218
20219
20220 if test $ol_link_termcap = no ; then
20221         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20222 echo "configure:20223: checking for tputs in -ltermcap" >&5
20223 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20224 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20225   echo $ac_n "(cached) $ac_c" 1>&6
20226 else
20227   ac_save_LIBS="$LIBS"
20228 LIBS="-ltermcap  $LIBS"
20229 cat > conftest.$ac_ext <<EOF
20230 #line 20231 "configure"
20231 #include "confdefs.h"
20232 /* Override any gcc2 internal prototype to avoid an error.  */
20233 /* We use char because int might match the return type of a gcc2
20234     builtin and then its argument prototype would still apply.  */
20235 char tputs();
20236
20237 int main() {
20238 tputs()
20239 ; return 0; }
20240 EOF
20241 if { (eval echo configure:20242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20242   rm -rf conftest*
20243   eval "ac_cv_lib_$ac_lib_var=yes"
20244 else
20245   echo "configure: failed program was:" >&5
20246   cat conftest.$ac_ext >&5
20247   rm -rf conftest*
20248   eval "ac_cv_lib_$ac_lib_var=no"
20249 fi
20250 rm -f conftest*
20251 LIBS="$ac_save_LIBS"
20252
20253 fi
20254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20255   echo "$ac_t""yes" 1>&6
20256   have_termcap=yes
20257 else
20258   echo "$ac_t""no" 1>&6
20259 have_termcap=no
20260 fi
20261
20262         if test $have_termcap = yes ; then
20263                 cat >> confdefs.h <<\EOF
20264 #define HAVE_TERMCAP 1
20265 EOF
20266
20267                 ol_link_termcap=yes
20268                 TERMCAP_LIBS=-ltermcap
20269         fi
20270 fi
20271
20272 if test $ol_link_termcap = no ; then
20273         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20274 echo "configure:20275: checking for initscr in -lncurses" >&5
20275 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   ac_save_LIBS="$LIBS"
20280 LIBS="-lncurses  $LIBS"
20281 cat > conftest.$ac_ext <<EOF
20282 #line 20283 "configure"
20283 #include "confdefs.h"
20284 /* Override any gcc2 internal prototype to avoid an error.  */
20285 /* We use char because int might match the return type of a gcc2
20286     builtin and then its argument prototype would still apply.  */
20287 char initscr();
20288
20289 int main() {
20290 initscr()
20291 ; return 0; }
20292 EOF
20293 if { (eval echo configure:20294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20294   rm -rf conftest*
20295   eval "ac_cv_lib_$ac_lib_var=yes"
20296 else
20297   echo "configure: failed program was:" >&5
20298   cat conftest.$ac_ext >&5
20299   rm -rf conftest*
20300   eval "ac_cv_lib_$ac_lib_var=no"
20301 fi
20302 rm -f conftest*
20303 LIBS="$ac_save_LIBS"
20304
20305 fi
20306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20307   echo "$ac_t""yes" 1>&6
20308   have_ncurses=yes
20309 else
20310   echo "$ac_t""no" 1>&6
20311 have_ncurses=no
20312 fi
20313
20314         if test $have_ncurses = yes ; then
20315                 cat >> confdefs.h <<\EOF
20316 #define HAVE_NCURSES 1
20317 EOF
20318
20319                 ol_link_termcap=yes
20320                 TERMCAP_LIBS=-lncurses
20321         fi
20322 fi
20323
20324 if test $ol_link_termcap = no ; then
20325         cat >> confdefs.h <<\EOF
20326 #define NO_TERMCAP 1
20327 EOF
20328
20329         TERMCAP_LIBS=
20330 fi
20331
20332 ol_link_sasl=no
20333 ol_link_spasswd=no
20334 if test $ol_with_cyrus_sasl != no ; then
20335         for ac_hdr in sasl/sasl.h sasl.h
20336 do
20337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20339 echo "configure:20340: checking for $ac_hdr" >&5
20340 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20341   echo $ac_n "(cached) $ac_c" 1>&6
20342 else
20343   cat > conftest.$ac_ext <<EOF
20344 #line 20345 "configure"
20345 #include "confdefs.h"
20346 #include <$ac_hdr>
20347 EOF
20348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20349 { (eval echo configure:20350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20351 if test -z "$ac_err"; then
20352   rm -rf conftest*
20353   eval "ac_cv_header_$ac_safe=yes"
20354 else
20355   echo "$ac_err" >&5
20356   echo "configure: failed program was:" >&5
20357   cat conftest.$ac_ext >&5
20358   rm -rf conftest*
20359   eval "ac_cv_header_$ac_safe=no"
20360 fi
20361 rm -f conftest*
20362 fi
20363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20364   echo "$ac_t""yes" 1>&6
20365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20366   cat >> confdefs.h <<EOF
20367 #define $ac_tr_hdr 1
20368 EOF
20369  
20370 else
20371   echo "$ac_t""no" 1>&6
20372 fi
20373 done
20374
20375
20376         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20377                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20378 echo "configure:20379: checking for sasl_client_init in -lsasl2" >&5
20379 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20381   echo $ac_n "(cached) $ac_c" 1>&6
20382 else
20383   ac_save_LIBS="$LIBS"
20384 LIBS="-lsasl2  $LIBS"
20385 cat > conftest.$ac_ext <<EOF
20386 #line 20387 "configure"
20387 #include "confdefs.h"
20388 /* Override any gcc2 internal prototype to avoid an error.  */
20389 /* We use char because int might match the return type of a gcc2
20390     builtin and then its argument prototype would still apply.  */
20391 char sasl_client_init();
20392
20393 int main() {
20394 sasl_client_init()
20395 ; return 0; }
20396 EOF
20397 if { (eval echo configure:20398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20398   rm -rf conftest*
20399   eval "ac_cv_lib_$ac_lib_var=yes"
20400 else
20401   echo "configure: failed program was:" >&5
20402   cat conftest.$ac_ext >&5
20403   rm -rf conftest*
20404   eval "ac_cv_lib_$ac_lib_var=no"
20405 fi
20406 rm -f conftest*
20407 LIBS="$ac_save_LIBS"
20408
20409 fi
20410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20411   echo "$ac_t""yes" 1>&6
20412   ol_link_sasl="-lsasl2"
20413 else
20414   echo "$ac_t""no" 1>&6
20415 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20416 echo "configure:20417: checking for sasl_client_init in -lsasl" >&5
20417 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20419   echo $ac_n "(cached) $ac_c" 1>&6
20420 else
20421   ac_save_LIBS="$LIBS"
20422 LIBS="-lsasl  $LIBS"
20423 cat > conftest.$ac_ext <<EOF
20424 #line 20425 "configure"
20425 #include "confdefs.h"
20426 /* Override any gcc2 internal prototype to avoid an error.  */
20427 /* We use char because int might match the return type of a gcc2
20428     builtin and then its argument prototype would still apply.  */
20429 char sasl_client_init();
20430
20431 int main() {
20432 sasl_client_init()
20433 ; return 0; }
20434 EOF
20435 if { (eval echo configure:20436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20436   rm -rf conftest*
20437   eval "ac_cv_lib_$ac_lib_var=yes"
20438 else
20439   echo "configure: failed program was:" >&5
20440   cat conftest.$ac_ext >&5
20441   rm -rf conftest*
20442   eval "ac_cv_lib_$ac_lib_var=no"
20443 fi
20444 rm -f conftest*
20445 LIBS="$ac_save_LIBS"
20446
20447 fi
20448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20449   echo "$ac_t""yes" 1>&6
20450   ol_link_sasl="-lsasl"
20451 else
20452   echo "$ac_t""no" 1>&6
20453 fi
20454
20455 fi
20456
20457         fi
20458
20459         if test $ol_link_sasl = no ; then
20460                 if test $ol_with_cyrus_sasl != auto ; then
20461                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20462                 else
20463                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20464                         echo "configure: warning: SASL authentication not supported!" 1>&2
20465                         if test $ol_link_tls = no ; then
20466                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20467                         fi
20468                 fi
20469         else
20470                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20471 echo "configure:20472: checking Cyrus SASL library version" >&5
20472 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20473   echo $ac_n "(cached) $ac_c" 1>&6
20474 else
20475   
20476         cat > conftest.$ac_ext <<EOF
20477 #line 20478 "configure"
20478 #include "confdefs.h"
20479
20480 #ifdef HAVE_SASL_SASL_H
20481 #include <sasl/sasl.h>
20482 #else
20483 #include <sasl.h>
20484 #endif
20485
20486 /* require 2.1.3 or later */
20487 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20488         char *__sasl_compat = "2.2+ or better okay (we guess)";
20489 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20490         && SASL_VERSION_STEP >=3
20491         char *__sasl_compat = "2.1.3+ or better okay";
20492 #endif
20493         
20494 EOF
20495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20496   egrep "__sasl_compat" >/dev/null 2>&1; then
20497   rm -rf conftest*
20498   ol_cv_sasl_compat=yes
20499 else
20500   rm -rf conftest*
20501   ol_cv_sasl_compat=no
20502 fi
20503 rm -f conftest*
20504
20505 fi
20506
20507 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20508
20509                 if test $ol_cv_sasl_compat = no ; then
20510                         ol_link_sasl=no
20511                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20512                 fi
20513
20514                 cat >> confdefs.h <<\EOF
20515 #define HAVE_CYRUS_SASL 1
20516 EOF
20517
20518                 SASL_LIBS="$ol_link_sasl"
20519                 if test $ol_enable_spasswd != no ; then
20520                         ol_link_spasswd=yes
20521                 fi
20522
20523                 ac_save_LIBS="$LIBS"
20524                 LIBS="$LIBS $ol_link_sasl"
20525                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20526 echo "configure:20527: checking for sasl_version" >&5
20527 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20528   echo $ac_n "(cached) $ac_c" 1>&6
20529 else
20530   cat > conftest.$ac_ext <<EOF
20531 #line 20532 "configure"
20532 #include "confdefs.h"
20533 /* System header to define __stub macros and hopefully few prototypes,
20534     which can conflict with char sasl_version(); below.  */
20535 #include <assert.h>
20536 /* Override any gcc2 internal prototype to avoid an error.  */
20537 /* We use char because int might match the return type of a gcc2
20538     builtin and then its argument prototype would still apply.  */
20539 char sasl_version();
20540 char (*f)();
20541
20542 int main() {
20543
20544 /* The GNU C library defines this for functions which it implements
20545     to always fail with ENOSYS.  Some functions are actually named
20546     something starting with __ and the normal name is an alias.  */
20547 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20548 choke me
20549 #else
20550 f = sasl_version;
20551 #endif
20552
20553 ; return 0; }
20554 EOF
20555 if { (eval echo configure:20556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20556   rm -rf conftest*
20557   eval "ac_cv_func_sasl_version=yes"
20558 else
20559   echo "configure: failed program was:" >&5
20560   cat conftest.$ac_ext >&5
20561   rm -rf conftest*
20562   eval "ac_cv_func_sasl_version=no"
20563 fi
20564 rm -f conftest*
20565 fi
20566
20567 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20568   echo "$ac_t""yes" 1>&6
20569   cat >> confdefs.h <<\EOF
20570 #define HAVE_SASL_VERSION 1
20571 EOF
20572
20573 else
20574   echo "$ac_t""no" 1>&6
20575 fi
20576
20577                 LIBS="$ac_save_LIBS"
20578         fi
20579
20580 else
20581         echo "configure: warning: SASL authentication not supported!" 1>&2
20582         if test $ol_link_tls = no ; then
20583                 echo "configure: warning: Strong authentication not supported!" 1>&2
20584         fi
20585 fi
20586
20587 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20588         dev=no
20589         if test -r /dev/urandom ; then
20590                 dev="/dev/urandom";
20591         elif test -r /idev/urandom ; then
20592                 dev="/idev/urandom";
20593         elif test -r /dev/srandom ; then
20594                 dev="/dev/srandom";
20595         elif test -r /dev/random ; then
20596                 dev="/dev/random";
20597         elif test -r /idev/random ; then
20598                 dev="/idev/random";
20599         fi
20600
20601         if test $dev != no ; then
20602                 cat >> confdefs.h <<EOF
20603 #define URANDOM_DEVICE "$dev"
20604 EOF
20605
20606         fi
20607 fi
20608
20609 ol_link_fetch=no
20610 if test $ol_with_fetch != no ; then
20611         ol_LIBS=$LIBS
20612 LIBS="-lfetch -lcom_err $LIBS"
20613 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20614 echo "configure:20615: checking fetch(3) library" >&5
20615 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20616   echo $ac_n "(cached) $ac_c" 1>&6
20617 else
20618   
20619         cat > conftest.$ac_ext <<EOF
20620 #line 20621 "configure"
20621 #include "confdefs.h"
20622
20623 #include <sys/param.h>
20624 #include <stdio.h>
20625 #include <fetch.h>
20626 int main() {
20627 struct url *u = fetchParseURL("file:///"); 
20628 ; return 0; }
20629 EOF
20630 if { (eval echo configure:20631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20631   rm -rf conftest*
20632   ol_cv_lib_fetch=yes
20633 else
20634   echo "configure: failed program was:" >&5
20635   cat conftest.$ac_ext >&5
20636   rm -rf conftest*
20637   ol_cv_lib_fetch=no
20638 fi
20639 rm -f conftest*
20640 fi
20641
20642 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20643 LIBS=$ol_LIBS
20644 if test $ol_cv_lib_fetch != no ; then
20645         ol_link_fetch="-lfetch -lcom_err"
20646         cat >> confdefs.h <<\EOF
20647 #define HAVE_FETCH 1
20648 EOF
20649
20650 fi
20651
20652
20653         if test $ol_cv_lib_fetch != no ; then
20654                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20655                 ol_link_fetch=freebsd
20656
20657         elif test $ol_with_fetch != auto ; then
20658                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20659         fi 
20660 fi
20661
20662 if test $ol_enable_crypt != no ; then
20663         save_LIBS="$LIBS"
20664         LIBS="$TLS_LIBS $LIBS"
20665
20666         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20667 echo "configure:20668: checking for crypt" >&5
20668 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20669   echo $ac_n "(cached) $ac_c" 1>&6
20670 else
20671   cat > conftest.$ac_ext <<EOF
20672 #line 20673 "configure"
20673 #include "confdefs.h"
20674 /* System header to define __stub macros and hopefully few prototypes,
20675     which can conflict with char crypt(); below.  */
20676 #include <assert.h>
20677 /* Override any gcc2 internal prototype to avoid an error.  */
20678 /* We use char because int might match the return type of a gcc2
20679     builtin and then its argument prototype would still apply.  */
20680 char crypt();
20681 char (*f)();
20682
20683 int main() {
20684
20685 /* The GNU C library defines this for functions which it implements
20686     to always fail with ENOSYS.  Some functions are actually named
20687     something starting with __ and the normal name is an alias.  */
20688 #if defined (__stub_crypt) || defined (__stub___crypt)
20689 choke me
20690 #else
20691 f = crypt;
20692 #endif
20693
20694 ; return 0; }
20695 EOF
20696 if { (eval echo configure:20697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20697   rm -rf conftest*
20698   eval "ac_cv_func_crypt=yes"
20699 else
20700   echo "configure: failed program was:" >&5
20701   cat conftest.$ac_ext >&5
20702   rm -rf conftest*
20703   eval "ac_cv_func_crypt=no"
20704 fi
20705 rm -f conftest*
20706 fi
20707
20708 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20709   echo "$ac_t""yes" 1>&6
20710   have_crypt=yes
20711 else
20712   echo "$ac_t""no" 1>&6
20713
20714                 LIBS="$save_LIBS"
20715                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20716 echo "configure:20717: checking for crypt in -lcrypt" >&5
20717 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20719   echo $ac_n "(cached) $ac_c" 1>&6
20720 else
20721   ac_save_LIBS="$LIBS"
20722 LIBS="-lcrypt  $LIBS"
20723 cat > conftest.$ac_ext <<EOF
20724 #line 20725 "configure"
20725 #include "confdefs.h"
20726 /* Override any gcc2 internal prototype to avoid an error.  */
20727 /* We use char because int might match the return type of a gcc2
20728     builtin and then its argument prototype would still apply.  */
20729 char crypt();
20730
20731 int main() {
20732 crypt()
20733 ; return 0; }
20734 EOF
20735 if { (eval echo configure:20736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20736   rm -rf conftest*
20737   eval "ac_cv_lib_$ac_lib_var=yes"
20738 else
20739   echo "configure: failed program was:" >&5
20740   cat conftest.$ac_ext >&5
20741   rm -rf conftest*
20742   eval "ac_cv_lib_$ac_lib_var=no"
20743 fi
20744 rm -f conftest*
20745 LIBS="$ac_save_LIBS"
20746
20747 fi
20748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20749   echo "$ac_t""yes" 1>&6
20750   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20751                         have_crypt=yes
20752 else
20753   echo "$ac_t""no" 1>&6
20754 have_crypt=no
20755 fi
20756
20757 fi
20758
20759
20760         LIBS="$save_LIBS"
20761
20762         if test $have_crypt = yes ; then
20763                 cat >> confdefs.h <<\EOF
20764 #define HAVE_CRYPT 1
20765 EOF
20766
20767         else
20768                 echo "configure: warning: could not find crypt" 1>&2
20769                 if test $ol_enable_crypt = yes ; then
20770                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20771                 fi
20772
20773                 echo "configure: warning: disabling crypt support" 1>&2
20774                 ol_enable_crypt=no
20775         fi
20776 fi
20777
20778 if test $ol_enable_proctitle != no ; then
20779         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20780 echo "configure:20781: checking for setproctitle" >&5
20781 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20782   echo $ac_n "(cached) $ac_c" 1>&6
20783 else
20784   cat > conftest.$ac_ext <<EOF
20785 #line 20786 "configure"
20786 #include "confdefs.h"
20787 /* System header to define __stub macros and hopefully few prototypes,
20788     which can conflict with char setproctitle(); below.  */
20789 #include <assert.h>
20790 /* Override any gcc2 internal prototype to avoid an error.  */
20791 /* We use char because int might match the return type of a gcc2
20792     builtin and then its argument prototype would still apply.  */
20793 char setproctitle();
20794 char (*f)();
20795
20796 int main() {
20797
20798 /* The GNU C library defines this for functions which it implements
20799     to always fail with ENOSYS.  Some functions are actually named
20800     something starting with __ and the normal name is an alias.  */
20801 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20802 choke me
20803 #else
20804 f = setproctitle;
20805 #endif
20806
20807 ; return 0; }
20808 EOF
20809 if { (eval echo configure:20810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20810   rm -rf conftest*
20811   eval "ac_cv_func_setproctitle=yes"
20812 else
20813   echo "configure: failed program was:" >&5
20814   cat conftest.$ac_ext >&5
20815   rm -rf conftest*
20816   eval "ac_cv_func_setproctitle=no"
20817 fi
20818 rm -f conftest*
20819 fi
20820
20821 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20822   echo "$ac_t""yes" 1>&6
20823   have_setproctitle=yes
20824 else
20825   echo "$ac_t""no" 1>&6
20826
20827                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20828 echo "configure:20829: checking for setproctitle in -lutil" >&5
20829 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20831   echo $ac_n "(cached) $ac_c" 1>&6
20832 else
20833   ac_save_LIBS="$LIBS"
20834 LIBS="-lutil  $LIBS"
20835 cat > conftest.$ac_ext <<EOF
20836 #line 20837 "configure"
20837 #include "confdefs.h"
20838 /* Override any gcc2 internal prototype to avoid an error.  */
20839 /* We use char because int might match the return type of a gcc2
20840     builtin and then its argument prototype would still apply.  */
20841 char setproctitle();
20842
20843 int main() {
20844 setproctitle()
20845 ; return 0; }
20846 EOF
20847 if { (eval echo configure:20848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20848   rm -rf conftest*
20849   eval "ac_cv_lib_$ac_lib_var=yes"
20850 else
20851   echo "configure: failed program was:" >&5
20852   cat conftest.$ac_ext >&5
20853   rm -rf conftest*
20854   eval "ac_cv_lib_$ac_lib_var=no"
20855 fi
20856 rm -f conftest*
20857 LIBS="$ac_save_LIBS"
20858
20859 fi
20860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20861   echo "$ac_t""yes" 1>&6
20862   have_setproctitle=yes
20863                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20864 else
20865   echo "$ac_t""no" 1>&6
20866 have_setproctitle=no
20867                         LIBOBJS="$LIBOBJS setproctitle.o"
20868                         LIBSRCS="$LIBSRCS setproctitle.c"
20869 fi
20870
20871 fi
20872
20873
20874         if test $have_setproctitle = yes ; then
20875                 cat >> confdefs.h <<\EOF
20876 #define HAVE_SETPROCTITLE 1
20877 EOF
20878
20879         fi
20880 fi
20881
20882 if test $ol_enable_slp != no ; then
20883         for ac_hdr in slp.h 
20884 do
20885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20887 echo "configure:20888: checking for $ac_hdr" >&5
20888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20889   echo $ac_n "(cached) $ac_c" 1>&6
20890 else
20891   cat > conftest.$ac_ext <<EOF
20892 #line 20893 "configure"
20893 #include "confdefs.h"
20894 #include <$ac_hdr>
20895 EOF
20896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20897 { (eval echo configure:20898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20899 if test -z "$ac_err"; then
20900   rm -rf conftest*
20901   eval "ac_cv_header_$ac_safe=yes"
20902 else
20903   echo "$ac_err" >&5
20904   echo "configure: failed program was:" >&5
20905   cat conftest.$ac_ext >&5
20906   rm -rf conftest*
20907   eval "ac_cv_header_$ac_safe=no"
20908 fi
20909 rm -f conftest*
20910 fi
20911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20912   echo "$ac_t""yes" 1>&6
20913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20914   cat >> confdefs.h <<EOF
20915 #define $ac_tr_hdr 1
20916 EOF
20917  
20918 else
20919   echo "$ac_t""no" 1>&6
20920 fi
20921 done
20922
20923
20924         if test $ac_cv_header_slp_h = yes ; then
20925                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20926 echo "configure:20927: checking for SLPOpen in -lslp" >&5
20927 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20929   echo $ac_n "(cached) $ac_c" 1>&6
20930 else
20931   ac_save_LIBS="$LIBS"
20932 LIBS="-lslp  $LIBS"
20933 cat > conftest.$ac_ext <<EOF
20934 #line 20935 "configure"
20935 #include "confdefs.h"
20936 /* Override any gcc2 internal prototype to avoid an error.  */
20937 /* We use char because int might match the return type of a gcc2
20938     builtin and then its argument prototype would still apply.  */
20939 char SLPOpen();
20940
20941 int main() {
20942 SLPOpen()
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_lib_$ac_lib_var=yes"
20948 else
20949   echo "configure: failed program was:" >&5
20950   cat conftest.$ac_ext >&5
20951   rm -rf conftest*
20952   eval "ac_cv_lib_$ac_lib_var=no"
20953 fi
20954 rm -f conftest*
20955 LIBS="$ac_save_LIBS"
20956
20957 fi
20958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20959   echo "$ac_t""yes" 1>&6
20960   have_slp=yes
20961 else
20962   echo "$ac_t""no" 1>&6
20963 have_slp=no
20964 fi
20965
20966                 if test $have_slp = yes ; then
20967                         cat >> confdefs.h <<\EOF
20968 #define HAVE_SLP 1
20969 EOF
20970
20971                         SLAPD_SLP_LIBS=-lslp
20972                 fi
20973
20974         elif test $ol_enable_slp = yes ; then
20975                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20976         fi
20977 fi
20978
20979
20980 echo $ac_n "checking long long""... $ac_c" 1>&6
20981 echo "configure:20982: checking long long" >&5
20982 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20983   echo $ac_n "(cached) $ac_c" 1>&6
20984 else
20985   
20986         cat > conftest.$ac_ext <<EOF
20987 #line 20988 "configure"
20988 #include "confdefs.h"
20989
20990 int main() {
20991 long long x;
20992 ; return 0; }
20993 EOF
20994 if { (eval echo configure:20995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20995   rm -rf conftest*
20996   ol_cv_type_long_long=yes
20997 else
20998   echo "configure: failed program was:" >&5
20999   cat conftest.$ac_ext >&5
21000   rm -rf conftest*
21001   ol_cv_type_long_long=no
21002 fi
21003 rm -f conftest*
21004 fi
21005
21006 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21007 if test $ol_cv_type_long_long = yes; then
21008         cat >> confdefs.h <<\EOF
21009 #define HAVE_LONG_LONG 1
21010 EOF
21011
21012 fi
21013
21014 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21015 echo "configure:21016: checking for ANSI C header files" >&5
21016 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21017   echo $ac_n "(cached) $ac_c" 1>&6
21018 else
21019   cat > conftest.$ac_ext <<EOF
21020 #line 21021 "configure"
21021 #include "confdefs.h"
21022 #include <stdlib.h>
21023 #include <stdarg.h>
21024 #include <string.h>
21025 #include <float.h>
21026 EOF
21027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21028 { (eval echo configure:21029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21030 if test -z "$ac_err"; then
21031   rm -rf conftest*
21032   ac_cv_header_stdc=yes
21033 else
21034   echo "$ac_err" >&5
21035   echo "configure: failed program was:" >&5
21036   cat conftest.$ac_ext >&5
21037   rm -rf conftest*
21038   ac_cv_header_stdc=no
21039 fi
21040 rm -f conftest*
21041
21042 if test $ac_cv_header_stdc = yes; then
21043   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21044 cat > conftest.$ac_ext <<EOF
21045 #line 21046 "configure"
21046 #include "confdefs.h"
21047 #include <string.h>
21048 EOF
21049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21050   egrep "memchr" >/dev/null 2>&1; then
21051   :
21052 else
21053   rm -rf conftest*
21054   ac_cv_header_stdc=no
21055 fi
21056 rm -f conftest*
21057
21058 fi
21059
21060 if test $ac_cv_header_stdc = yes; then
21061   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21062 cat > conftest.$ac_ext <<EOF
21063 #line 21064 "configure"
21064 #include "confdefs.h"
21065 #include <stdlib.h>
21066 EOF
21067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21068   egrep "free" >/dev/null 2>&1; then
21069   :
21070 else
21071   rm -rf conftest*
21072   ac_cv_header_stdc=no
21073 fi
21074 rm -f conftest*
21075
21076 fi
21077
21078 if test $ac_cv_header_stdc = yes; then
21079   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21080 if test "$cross_compiling" = yes; then
21081   :
21082 else
21083   cat > conftest.$ac_ext <<EOF
21084 #line 21085 "configure"
21085 #include "confdefs.h"
21086 #include <ctype.h>
21087 #if ((' ' & 0x0FF) == 0x020)
21088 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21089 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21090 #else
21091 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21092  || ('j' <= (c) && (c) <= 'r') \
21093  || ('s' <= (c) && (c) <= 'z'))
21094 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21095 #endif
21096 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21097 int main () { int i; for (i = 0; i < 256; i++)
21098 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21099 exit (0); }
21100
21101 EOF
21102 if { (eval echo configure:21103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21103 then
21104   :
21105 else
21106   echo "configure: failed program was:" >&5
21107   cat conftest.$ac_ext >&5
21108   rm -fr conftest*
21109   ac_cv_header_stdc=no
21110 fi
21111 rm -fr conftest*
21112 fi
21113
21114 fi
21115 fi
21116
21117 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21118 if test $ac_cv_header_stdc = yes; then
21119   cat >> confdefs.h <<\EOF
21120 #define STDC_HEADERS 1
21121 EOF
21122
21123 fi
21124
21125 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21126 echo "configure:21127: checking for mode_t" >&5
21127 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21128   echo $ac_n "(cached) $ac_c" 1>&6
21129 else
21130   cat > conftest.$ac_ext <<EOF
21131 #line 21132 "configure"
21132 #include "confdefs.h"
21133 #include <sys/types.h>
21134 #if STDC_HEADERS
21135 #include <stdlib.h>
21136 #include <stddef.h>
21137 #endif
21138
21139 EOF
21140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21141   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21142   rm -rf conftest*
21143   eval "ac_cv_type_mode_t=yes"
21144 else
21145   rm -rf conftest*
21146   eval "ac_cv_type_mode_t=no"
21147 fi
21148 rm -f conftest*
21149
21150 fi
21151 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21152   echo "$ac_t""yes" 1>&6
21153 else
21154   echo "$ac_t""no" 1>&6
21155   cat >> confdefs.h <<EOF
21156 #define mode_t int
21157 EOF
21158
21159 fi
21160
21161 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21162 echo "configure:21163: checking for off_t" >&5
21163 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21164   echo $ac_n "(cached) $ac_c" 1>&6
21165 else
21166   cat > conftest.$ac_ext <<EOF
21167 #line 21168 "configure"
21168 #include "confdefs.h"
21169 #include <sys/types.h>
21170 #if STDC_HEADERS
21171 #include <stdlib.h>
21172 #include <stddef.h>
21173 #endif
21174
21175 EOF
21176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21177   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21178   rm -rf conftest*
21179   eval "ac_cv_type_off_t=yes"
21180 else
21181   rm -rf conftest*
21182   eval "ac_cv_type_off_t=no"
21183 fi
21184 rm -f conftest*
21185
21186 fi
21187 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21188   echo "$ac_t""yes" 1>&6
21189 else
21190   echo "$ac_t""no" 1>&6
21191   cat >> confdefs.h <<EOF
21192 #define off_t long
21193 EOF
21194
21195 fi
21196
21197 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21198 echo "configure:21199: checking for pid_t" >&5
21199 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21200   echo $ac_n "(cached) $ac_c" 1>&6
21201 else
21202   cat > conftest.$ac_ext <<EOF
21203 #line 21204 "configure"
21204 #include "confdefs.h"
21205 #include <sys/types.h>
21206 #if STDC_HEADERS
21207 #include <stdlib.h>
21208 #include <stddef.h>
21209 #endif
21210
21211 EOF
21212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21213   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21214   rm -rf conftest*
21215   eval "ac_cv_type_pid_t=yes"
21216 else
21217   rm -rf conftest*
21218   eval "ac_cv_type_pid_t=no"
21219 fi
21220 rm -f conftest*
21221
21222 fi
21223 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21224   echo "$ac_t""yes" 1>&6
21225 else
21226   echo "$ac_t""no" 1>&6
21227   cat >> confdefs.h <<EOF
21228 #define pid_t int
21229 EOF
21230
21231 fi
21232
21233 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21234 echo "configure:21235: checking for ptrdiff_t" >&5
21235 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21236   echo $ac_n "(cached) $ac_c" 1>&6
21237 else
21238   cat > conftest.$ac_ext <<EOF
21239 #line 21240 "configure"
21240 #include "confdefs.h"
21241 #include <stddef.h>
21242 int main() {
21243 ptrdiff_t p
21244 ; return 0; }
21245 EOF
21246 if { (eval echo configure:21247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21247   rm -rf conftest*
21248   am_cv_type_ptrdiff_t=yes
21249 else
21250   echo "configure: failed program was:" >&5
21251   cat conftest.$ac_ext >&5
21252   rm -rf conftest*
21253   am_cv_type_ptrdiff_t=no
21254 fi
21255 rm -f conftest*
21256 fi
21257
21258 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21259    if test $am_cv_type_ptrdiff_t = yes; then
21260      cat >> confdefs.h <<\EOF
21261 #define HAVE_PTRDIFF_T 1
21262 EOF
21263
21264    fi
21265
21266 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21267 echo "configure:21268: checking return type of signal handlers" >&5
21268 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21269   echo $ac_n "(cached) $ac_c" 1>&6
21270 else
21271   cat > conftest.$ac_ext <<EOF
21272 #line 21273 "configure"
21273 #include "confdefs.h"
21274 #include <sys/types.h>
21275 #include <signal.h>
21276 #ifdef signal
21277 #undef signal
21278 #endif
21279 #ifdef __cplusplus
21280 extern "C" void (*signal (int, void (*)(int)))(int);
21281 #else
21282 void (*signal ()) ();
21283 #endif
21284
21285 int main() {
21286 int i;
21287 ; return 0; }
21288 EOF
21289 if { (eval echo configure:21290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21290   rm -rf conftest*
21291   ac_cv_type_signal=void
21292 else
21293   echo "configure: failed program was:" >&5
21294   cat conftest.$ac_ext >&5
21295   rm -rf conftest*
21296   ac_cv_type_signal=int
21297 fi
21298 rm -f conftest*
21299 fi
21300
21301 echo "$ac_t""$ac_cv_type_signal" 1>&6
21302 cat >> confdefs.h <<EOF
21303 #define RETSIGTYPE $ac_cv_type_signal
21304 EOF
21305
21306
21307 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21308 echo "configure:21309: checking for size_t" >&5
21309 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21310   echo $ac_n "(cached) $ac_c" 1>&6
21311 else
21312   cat > conftest.$ac_ext <<EOF
21313 #line 21314 "configure"
21314 #include "confdefs.h"
21315 #include <sys/types.h>
21316 #if STDC_HEADERS
21317 #include <stdlib.h>
21318 #include <stddef.h>
21319 #endif
21320
21321 EOF
21322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21323   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21324   rm -rf conftest*
21325   eval "ac_cv_type_size_t=yes"
21326 else
21327   rm -rf conftest*
21328   eval "ac_cv_type_size_t=no"
21329 fi
21330 rm -f conftest*
21331
21332 fi
21333 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21334   echo "$ac_t""yes" 1>&6
21335 else
21336   echo "$ac_t""no" 1>&6
21337   cat >> confdefs.h <<EOF
21338 #define size_t unsigned
21339 EOF
21340
21341 fi
21342
21343
21344 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21345 echo "configure:21346: checking for ssize_t" >&5
21346 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21347   echo $ac_n "(cached) $ac_c" 1>&6
21348 else
21349   cat > conftest.$ac_ext <<EOF
21350 #line 21351 "configure"
21351 #include "confdefs.h"
21352 #include <sys/types.h>
21353 #if STDC_HEADERS
21354 #include <stdlib.h>
21355 #include <stddef.h>
21356 #endif
21357
21358 EOF
21359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21360   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21361   rm -rf conftest*
21362   eval "ac_cv_type_ssize_t=yes"
21363 else
21364   rm -rf conftest*
21365   eval "ac_cv_type_ssize_t=no"
21366 fi
21367 rm -f conftest*
21368
21369 fi
21370 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21371   echo "$ac_t""yes" 1>&6
21372 else
21373   echo "$ac_t""no" 1>&6
21374   cat >> confdefs.h <<EOF
21375 #define ssize_t signed int
21376 EOF
21377
21378 fi
21379
21380 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21381 echo "configure:21382: checking for caddr_t" >&5
21382 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21383   echo $ac_n "(cached) $ac_c" 1>&6
21384 else
21385   cat > conftest.$ac_ext <<EOF
21386 #line 21387 "configure"
21387 #include "confdefs.h"
21388 #include <sys/types.h>
21389 #if STDC_HEADERS
21390 #include <stdlib.h>
21391 #include <stddef.h>
21392 #endif
21393
21394 EOF
21395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21396   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21397   rm -rf conftest*
21398   eval "ac_cv_type_caddr_t=yes"
21399 else
21400   rm -rf conftest*
21401   eval "ac_cv_type_caddr_t=no"
21402 fi
21403 rm -f conftest*
21404
21405 fi
21406 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21407   echo "$ac_t""yes" 1>&6
21408 else
21409   echo "$ac_t""no" 1>&6
21410   cat >> confdefs.h <<EOF
21411 #define caddr_t char *
21412 EOF
21413
21414 fi
21415
21416
21417 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21418 echo "configure:21419: checking for socklen_t" >&5
21419 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21420   echo $ac_n "(cached) $ac_c" 1>&6
21421 else
21422   cat > conftest.$ac_ext <<EOF
21423 #line 21424 "configure"
21424 #include "confdefs.h"
21425
21426 #ifdef HAVE_SYS_TYPES_H
21427 #include <sys/types.h>
21428 #endif
21429 #ifdef HAVE_SYS_SOCKET_H
21430 #include <sys/socket.h>
21431 #endif
21432
21433 int main() {
21434 socklen_t len;
21435 ; return 0; }
21436 EOF
21437 if { (eval echo configure:21438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21438   rm -rf conftest*
21439   ol_cv_type_socklen_t=yes
21440 else
21441   echo "configure: failed program was:" >&5
21442   cat conftest.$ac_ext >&5
21443   rm -rf conftest*
21444   ol_cv_type_socklen_t=no
21445 fi
21446 rm -f conftest*
21447 fi
21448
21449 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21450   if test $ol_cv_type_socklen_t = no; then
21451     cat >> confdefs.h <<\EOF
21452 #define socklen_t int
21453 EOF
21454
21455   fi
21456  
21457 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21458 echo "configure:21459: checking for member st_blksize in aggregate type struct stat" >&5
21459 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21460   echo $ac_n "(cached) $ac_c" 1>&6
21461 else
21462   cat > conftest.$ac_ext <<EOF
21463 #line 21464 "configure"
21464 #include "confdefs.h"
21465 #include <sys/types.h>
21466 #include <sys/stat.h>
21467 int main() {
21468 struct stat foo; foo.st_blksize;
21469 ; return 0; }
21470 EOF
21471 if { (eval echo configure:21472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21472   rm -rf conftest*
21473   ac_cv_c_struct_member_st_blksize=yes
21474 else
21475   echo "configure: failed program was:" >&5
21476   cat conftest.$ac_ext >&5
21477   rm -rf conftest*
21478   ac_cv_c_struct_member_st_blksize=no
21479 fi
21480 rm -f conftest*
21481 fi
21482
21483 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21484 st_blksize="$ac_cv_c_struct_member_st_blksize"
21485 if test $ac_cv_c_struct_member_st_blksize = yes; then
21486   cat >> confdefs.h <<\EOF
21487 #define HAVE_ST_BLKSIZE 1
21488 EOF
21489
21490 fi
21491
21492 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21493 echo "configure:21494: checking whether time.h and sys/time.h may both be included" >&5
21494 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21495   echo $ac_n "(cached) $ac_c" 1>&6
21496 else
21497   cat > conftest.$ac_ext <<EOF
21498 #line 21499 "configure"
21499 #include "confdefs.h"
21500 #include <sys/types.h>
21501 #include <sys/time.h>
21502 #include <time.h>
21503 int main() {
21504 struct tm *tp;
21505 ; return 0; }
21506 EOF
21507 if { (eval echo configure:21508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21508   rm -rf conftest*
21509   ac_cv_header_time=yes
21510 else
21511   echo "configure: failed program was:" >&5
21512   cat conftest.$ac_ext >&5
21513   rm -rf conftest*
21514   ac_cv_header_time=no
21515 fi
21516 rm -f conftest*
21517 fi
21518
21519 echo "$ac_t""$ac_cv_header_time" 1>&6
21520 if test $ac_cv_header_time = yes; then
21521   cat >> confdefs.h <<\EOF
21522 #define TIME_WITH_SYS_TIME 1
21523 EOF
21524
21525 fi
21526
21527 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21528 echo "configure:21529: checking whether struct tm is in sys/time.h or time.h" >&5
21529 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21530   echo $ac_n "(cached) $ac_c" 1>&6
21531 else
21532   cat > conftest.$ac_ext <<EOF
21533 #line 21534 "configure"
21534 #include "confdefs.h"
21535 #include <sys/types.h>
21536 #include <time.h>
21537 int main() {
21538 struct tm *tp; tp->tm_sec;
21539 ; return 0; }
21540 EOF
21541 if { (eval echo configure:21542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21542   rm -rf conftest*
21543   ac_cv_struct_tm=time.h
21544 else
21545   echo "configure: failed program was:" >&5
21546   cat conftest.$ac_ext >&5
21547   rm -rf conftest*
21548   ac_cv_struct_tm=sys/time.h
21549 fi
21550 rm -f conftest*
21551 fi
21552
21553 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21554 if test $ac_cv_struct_tm = sys/time.h; then
21555   cat >> confdefs.h <<\EOF
21556 #define TM_IN_SYS_TIME 1
21557 EOF
21558
21559 fi
21560
21561 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21562 echo "configure:21563: checking for uid_t in sys/types.h" >&5
21563 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21564   echo $ac_n "(cached) $ac_c" 1>&6
21565 else
21566   cat > conftest.$ac_ext <<EOF
21567 #line 21568 "configure"
21568 #include "confdefs.h"
21569 #include <sys/types.h>
21570 EOF
21571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21572   egrep "uid_t" >/dev/null 2>&1; then
21573   rm -rf conftest*
21574   ac_cv_type_uid_t=yes
21575 else
21576   rm -rf conftest*
21577   ac_cv_type_uid_t=no
21578 fi
21579 rm -f conftest*
21580
21581 fi
21582
21583 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21584 if test $ac_cv_type_uid_t = no; then
21585   cat >> confdefs.h <<\EOF
21586 #define uid_t int
21587 EOF
21588
21589   cat >> confdefs.h <<\EOF
21590 #define gid_t int
21591 EOF
21592
21593 fi
21594
21595 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21596 echo "configure:21597: checking for sig_atomic_t" >&5
21597 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21598   echo $ac_n "(cached) $ac_c" 1>&6
21599 else
21600   cat > conftest.$ac_ext <<EOF
21601 #line 21602 "configure"
21602 #include "confdefs.h"
21603 #include <signal.h>
21604 int main() {
21605 sig_atomic_t atomic;
21606 ; return 0; }
21607 EOF
21608 if { (eval echo configure:21609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21609   rm -rf conftest*
21610   ol_cv_type_sig_atomic_t=yes
21611 else
21612   echo "configure: failed program was:" >&5
21613   cat conftest.$ac_ext >&5
21614   rm -rf conftest*
21615   ol_cv_type_sig_atomic_t=no
21616 fi
21617 rm -f conftest*
21618 fi
21619
21620 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21621   if test $ol_cv_type_sig_atomic_t = no; then
21622     cat >> confdefs.h <<\EOF
21623 #define sig_atomic_t int
21624 EOF
21625
21626   fi
21627  
21628
21629
21630 # test for pw_gecos in struct passwd
21631 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21632 echo "configure:21633: checking struct passwd for pw_gecos" >&5
21633 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21634   echo $ac_n "(cached) $ac_c" 1>&6
21635 else
21636   
21637         cat > conftest.$ac_ext <<EOF
21638 #line 21639 "configure"
21639 #include "confdefs.h"
21640 #include <pwd.h>
21641 int main() {
21642
21643         struct passwd pwd;
21644         pwd.pw_gecos = pwd.pw_name;
21645
21646 ; return 0; }
21647 EOF
21648 if { (eval echo configure:21649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21649   rm -rf conftest*
21650   ol_cv_struct_passwd_pw_gecos=yes
21651 else
21652   echo "configure: failed program was:" >&5
21653   cat conftest.$ac_ext >&5
21654   rm -rf conftest*
21655   ol_cv_struct_passwd_pw_gecos=no
21656 fi
21657 rm -f conftest*
21658 fi
21659
21660 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21661 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21662         cat >> confdefs.h <<\EOF
21663 #define HAVE_PW_GECOS 1
21664 EOF
21665
21666 fi
21667
21668 # test for pw_passwd in struct passwd
21669 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21670 echo "configure:21671: checking struct passwd for pw_passwd" >&5
21671 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21672   echo $ac_n "(cached) $ac_c" 1>&6
21673 else
21674   
21675         cat > conftest.$ac_ext <<EOF
21676 #line 21677 "configure"
21677 #include "confdefs.h"
21678 #include <pwd.h>
21679 int main() {
21680
21681         struct passwd pwd;
21682         pwd.pw_passwd = pwd.pw_name;
21683
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_struct_passwd_pw_passwd=yes
21689 else
21690   echo "configure: failed program was:" >&5
21691   cat conftest.$ac_ext >&5
21692   rm -rf conftest*
21693   ol_cv_struct_passwd_pw_passwd=no
21694 fi
21695 rm -f conftest*
21696 fi
21697
21698 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21699 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21700         cat >> confdefs.h <<\EOF
21701 #define HAVE_PW_PASSWD 1
21702 EOF
21703
21704 fi
21705
21706
21707 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21708 echo "configure:21709: checking if toupper() requires islower()" >&5
21709 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21710   echo $ac_n "(cached) $ac_c" 1>&6
21711 else
21712   
21713         if test "$cross_compiling" = yes; then
21714   ol_cv_c_upper_lower=safe
21715 else
21716   cat > conftest.$ac_ext <<EOF
21717 #line 21718 "configure"
21718 #include "confdefs.h"
21719
21720 #include <ctype.h>
21721 main()
21722 {
21723         if ('C' == toupper('C'))
21724                 exit(0);
21725         else
21726                 exit(1);
21727 }
21728 EOF
21729 if { (eval echo configure:21730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21730 then
21731   ol_cv_c_upper_lower=no
21732 else
21733   echo "configure: failed program was:" >&5
21734   cat conftest.$ac_ext >&5
21735   rm -fr conftest*
21736   ol_cv_c_upper_lower=yes
21737 fi
21738 rm -fr conftest*
21739 fi
21740
21741 fi
21742
21743 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21744 if test $ol_cv_c_upper_lower != no ; then
21745         cat >> confdefs.h <<\EOF
21746 #define C_UPPER_LOWER 1
21747 EOF
21748
21749 fi
21750
21751 echo $ac_n "checking for working const""... $ac_c" 1>&6
21752 echo "configure:21753: checking for working const" >&5
21753 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21754   echo $ac_n "(cached) $ac_c" 1>&6
21755 else
21756   cat > conftest.$ac_ext <<EOF
21757 #line 21758 "configure"
21758 #include "confdefs.h"
21759
21760 int main() {
21761
21762 /* Ultrix mips cc rejects this.  */
21763 typedef int charset[2]; const charset x;
21764 /* SunOS 4.1.1 cc rejects this.  */
21765 char const *const *ccp;
21766 char **p;
21767 /* NEC SVR4.0.2 mips cc rejects this.  */
21768 struct point {int x, y;};
21769 static struct point const zero = {0,0};
21770 /* AIX XL C 1.02.0.0 rejects this.
21771    It does not let you subtract one const X* pointer from another in an arm
21772    of an if-expression whose if-part is not a constant expression */
21773 const char *g = "string";
21774 ccp = &g + (g ? g-g : 0);
21775 /* HPUX 7.0 cc rejects these. */
21776 ++ccp;
21777 p = (char**) ccp;
21778 ccp = (char const *const *) p;
21779 { /* SCO 3.2v4 cc rejects this.  */
21780   char *t;
21781   char const *s = 0 ? (char *) 0 : (char const *) 0;
21782
21783   *t++ = 0;
21784 }
21785 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21786   int x[] = {25, 17};
21787   const int *foo = &x[0];
21788   ++foo;
21789 }
21790 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21791   typedef const int *iptr;
21792   iptr p = 0;
21793   ++p;
21794 }
21795 { /* AIX XL C 1.02.0.0 rejects this saying
21796      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21797   struct s { int j; const int *ap[3]; };
21798   struct s *b; b->j = 5;
21799 }
21800 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21801   const int foo = 10;
21802 }
21803
21804 ; return 0; }
21805 EOF
21806 if { (eval echo configure:21807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21807   rm -rf conftest*
21808   ac_cv_c_const=yes
21809 else
21810   echo "configure: failed program was:" >&5
21811   cat conftest.$ac_ext >&5
21812   rm -rf conftest*
21813   ac_cv_c_const=no
21814 fi
21815 rm -f conftest*
21816 fi
21817
21818 echo "$ac_t""$ac_cv_c_const" 1>&6
21819 if test $ac_cv_c_const = no; then
21820   cat >> confdefs.h <<\EOF
21821 #define const 
21822 EOF
21823
21824 fi
21825
21826 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21827 echo "configure:21828: checking if compiler understands volatile" >&5
21828 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21829   echo $ac_n "(cached) $ac_c" 1>&6
21830 else
21831   cat > conftest.$ac_ext <<EOF
21832 #line 21833 "configure"
21833 #include "confdefs.h"
21834 int x, y, z;
21835 int main() {
21836 volatile int a; int * volatile b = x ? &y : &z;
21837       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21838       *b = 0;
21839 ; return 0; }
21840 EOF
21841 if { (eval echo configure:21842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21842   rm -rf conftest*
21843   ol_cv_c_volatile=yes
21844 else
21845   echo "configure: failed program was:" >&5
21846   cat conftest.$ac_ext >&5
21847   rm -rf conftest*
21848   ol_cv_c_volatile=no
21849 fi
21850 rm -f conftest*
21851 fi
21852
21853 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21854   if test $ol_cv_c_volatile = yes; then
21855     : 
21856   else
21857     cat >> confdefs.h <<\EOF
21858 #define volatile 
21859 EOF
21860
21861   fi
21862  
21863
21864 if test $cross_compiling = yes ; then
21865         cat >> confdefs.h <<\EOF
21866 #define CROSS_COMPILING 1
21867 EOF
21868
21869 else
21870         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21871 echo "configure:21872: checking whether byte ordering is bigendian" >&5
21872 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21873   echo $ac_n "(cached) $ac_c" 1>&6
21874 else
21875   ac_cv_c_bigendian=unknown
21876 # See if sys/param.h defines the BYTE_ORDER macro.
21877 cat > conftest.$ac_ext <<EOF
21878 #line 21879 "configure"
21879 #include "confdefs.h"
21880 #include <sys/types.h>
21881 #include <sys/param.h>
21882 int main() {
21883
21884 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21885  bogus endian macros
21886 #endif
21887 ; return 0; }
21888 EOF
21889 if { (eval echo configure:21890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21890   rm -rf conftest*
21891   # It does; now see whether it defined to BIG_ENDIAN or not.
21892 cat > conftest.$ac_ext <<EOF
21893 #line 21894 "configure"
21894 #include "confdefs.h"
21895 #include <sys/types.h>
21896 #include <sys/param.h>
21897 int main() {
21898
21899 #if BYTE_ORDER != BIG_ENDIAN
21900  not big endian
21901 #endif
21902 ; return 0; }
21903 EOF
21904 if { (eval echo configure:21905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21905   rm -rf conftest*
21906   ac_cv_c_bigendian=yes
21907 else
21908   echo "configure: failed program was:" >&5
21909   cat conftest.$ac_ext >&5
21910   rm -rf conftest*
21911   ac_cv_c_bigendian=no
21912 fi
21913 rm -f conftest*
21914 else
21915   echo "configure: failed program was:" >&5
21916   cat conftest.$ac_ext >&5
21917 fi
21918 rm -f conftest*
21919 if test $ac_cv_c_bigendian = unknown; then
21920 if test "$cross_compiling" = yes; then
21921     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21922 else
21923   cat > conftest.$ac_ext <<EOF
21924 #line 21925 "configure"
21925 #include "confdefs.h"
21926 main () {
21927   /* Are we little or big endian?  From Harbison&Steele.  */
21928   union
21929   {
21930     long l;
21931     char c[sizeof (long)];
21932   } u;
21933   u.l = 1;
21934   exit (u.c[sizeof (long) - 1] == 1);
21935 }
21936 EOF
21937 if { (eval echo configure:21938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21938 then
21939   ac_cv_c_bigendian=no
21940 else
21941   echo "configure: failed program was:" >&5
21942   cat conftest.$ac_ext >&5
21943   rm -fr conftest*
21944   ac_cv_c_bigendian=yes
21945 fi
21946 rm -fr conftest*
21947 fi
21948
21949 fi
21950 fi
21951
21952 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21953 if test $ac_cv_c_bigendian = yes; then
21954   cat >> confdefs.h <<\EOF
21955 #define WORDS_BIGENDIAN 1
21956 EOF
21957
21958 fi
21959
21960 fi
21961
21962 echo $ac_n "checking size of short""... $ac_c" 1>&6
21963 echo "configure:21964: checking size of short" >&5 
21964 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21965   echo $ac_n "(cached) $ac_c" 1>&6
21966 else
21967   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21968   cat > conftest.$ac_ext <<EOF
21969 #line 21970 "configure"
21970 #include "confdefs.h"
21971 #include "confdefs.h" 
21972 #include <sys/types.h> 
21973  
21974
21975 int main() {
21976 switch (0) case 0: case (sizeof (short) == $ac_size):;
21977 ; return 0; }
21978 EOF
21979 if { (eval echo configure:21980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21980   rm -rf conftest*
21981   ac_cv_sizeof_short=$ac_size
21982 else
21983   echo "configure: failed program was:" >&5
21984   cat conftest.$ac_ext >&5
21985 fi
21986 rm -f conftest* 
21987   if test x$ac_cv_sizeof_short != x ; then break; fi 
21988 done 
21989
21990 fi
21991  
21992 if test x$ac_cv_sizeof_short = x ; then 
21993   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21994 fi 
21995 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21996 cat >> confdefs.h <<EOF
21997 #define SIZEOF_SHORT $ac_cv_sizeof_short
21998 EOF
21999  
22000  
22001 echo $ac_n "checking size of int""... $ac_c" 1>&6
22002 echo "configure:22003: checking size of int" >&5 
22003 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22004   echo $ac_n "(cached) $ac_c" 1>&6
22005 else
22006   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22007   cat > conftest.$ac_ext <<EOF
22008 #line 22009 "configure"
22009 #include "confdefs.h"
22010 #include "confdefs.h" 
22011 #include <sys/types.h> 
22012  
22013
22014 int main() {
22015 switch (0) case 0: case (sizeof (int) == $ac_size):;
22016 ; return 0; }
22017 EOF
22018 if { (eval echo configure:22019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22019   rm -rf conftest*
22020   ac_cv_sizeof_int=$ac_size
22021 else
22022   echo "configure: failed program was:" >&5
22023   cat conftest.$ac_ext >&5
22024 fi
22025 rm -f conftest* 
22026   if test x$ac_cv_sizeof_int != x ; then break; fi 
22027 done 
22028
22029 fi
22030  
22031 if test x$ac_cv_sizeof_int = x ; then 
22032   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22033 fi 
22034 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22035 cat >> confdefs.h <<EOF
22036 #define SIZEOF_INT $ac_cv_sizeof_int
22037 EOF
22038  
22039  
22040 echo $ac_n "checking size of long""... $ac_c" 1>&6
22041 echo "configure:22042: checking size of long" >&5 
22042 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22043   echo $ac_n "(cached) $ac_c" 1>&6
22044 else
22045   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22046   cat > conftest.$ac_ext <<EOF
22047 #line 22048 "configure"
22048 #include "confdefs.h"
22049 #include "confdefs.h" 
22050 #include <sys/types.h> 
22051  
22052
22053 int main() {
22054 switch (0) case 0: case (sizeof (long) == $ac_size):;
22055 ; return 0; }
22056 EOF
22057 if { (eval echo configure:22058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22058   rm -rf conftest*
22059   ac_cv_sizeof_long=$ac_size
22060 else
22061   echo "configure: failed program was:" >&5
22062   cat conftest.$ac_ext >&5
22063 fi
22064 rm -f conftest* 
22065   if test x$ac_cv_sizeof_long != x ; then break; fi 
22066 done 
22067
22068 fi
22069  
22070 if test x$ac_cv_sizeof_long = x ; then 
22071   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22072 fi 
22073 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22074 cat >> confdefs.h <<EOF
22075 #define SIZEOF_LONG $ac_cv_sizeof_long
22076 EOF
22077  
22078
22079
22080 if test "$ac_cv_sizeof_int" -lt 4 ; then
22081         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22082
22083         cat >> confdefs.h <<\EOF
22084 #define LBER_INT_T long
22085 EOF
22086
22087 else
22088         cat >> confdefs.h <<\EOF
22089 #define LBER_INT_T int
22090 EOF
22091
22092 fi
22093
22094 cat >> confdefs.h <<\EOF
22095 #define LBER_LEN_T long
22096 EOF
22097
22098 cat >> confdefs.h <<\EOF
22099 #define LBER_SOCKET_T int
22100 EOF
22101
22102 cat >> confdefs.h <<\EOF
22103 #define LBER_TAG_T long
22104 EOF
22105
22106
22107 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22108 echo "configure:22109: checking for 8-bit clean memcmp" >&5
22109 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22110   echo $ac_n "(cached) $ac_c" 1>&6
22111 else
22112   if test "$cross_compiling" = yes; then
22113   ac_cv_func_memcmp_clean=no
22114 else
22115   cat > conftest.$ac_ext <<EOF
22116 #line 22117 "configure"
22117 #include "confdefs.h"
22118
22119 main()
22120 {
22121   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22122   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22123 }
22124
22125 EOF
22126 if { (eval echo configure:22127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22127 then
22128   ac_cv_func_memcmp_clean=yes
22129 else
22130   echo "configure: failed program was:" >&5
22131   cat conftest.$ac_ext >&5
22132   rm -fr conftest*
22133   ac_cv_func_memcmp_clean=no
22134 fi
22135 rm -fr conftest*
22136 fi
22137
22138 fi
22139
22140 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22141 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22142
22143 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22144 echo "configure:22145: checking for strftime" >&5
22145 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22146   echo $ac_n "(cached) $ac_c" 1>&6
22147 else
22148   cat > conftest.$ac_ext <<EOF
22149 #line 22150 "configure"
22150 #include "confdefs.h"
22151 /* System header to define __stub macros and hopefully few prototypes,
22152     which can conflict with char strftime(); below.  */
22153 #include <assert.h>
22154 /* Override any gcc2 internal prototype to avoid an error.  */
22155 /* We use char because int might match the return type of a gcc2
22156     builtin and then its argument prototype would still apply.  */
22157 char strftime();
22158 char (*f)();
22159
22160 int main() {
22161
22162 /* The GNU C library defines this for functions which it implements
22163     to always fail with ENOSYS.  Some functions are actually named
22164     something starting with __ and the normal name is an alias.  */
22165 #if defined (__stub_strftime) || defined (__stub___strftime)
22166 choke me
22167 #else
22168 f = strftime;
22169 #endif
22170
22171 ; return 0; }
22172 EOF
22173 if { (eval echo configure:22174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22174   rm -rf conftest*
22175   eval "ac_cv_func_strftime=yes"
22176 else
22177   echo "configure: failed program was:" >&5
22178   cat conftest.$ac_ext >&5
22179   rm -rf conftest*
22180   eval "ac_cv_func_strftime=no"
22181 fi
22182 rm -f conftest*
22183 fi
22184
22185 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22186   echo "$ac_t""yes" 1>&6
22187   cat >> confdefs.h <<\EOF
22188 #define HAVE_STRFTIME 1
22189 EOF
22190
22191 else
22192   echo "$ac_t""no" 1>&6
22193 # strftime is in -lintl on SCO UNIX.
22194 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22195 echo "configure:22196: checking for strftime in -lintl" >&5
22196 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22198   echo $ac_n "(cached) $ac_c" 1>&6
22199 else
22200   ac_save_LIBS="$LIBS"
22201 LIBS="-lintl  $LIBS"
22202 cat > conftest.$ac_ext <<EOF
22203 #line 22204 "configure"
22204 #include "confdefs.h"
22205 /* Override any gcc2 internal prototype to avoid an error.  */
22206 /* We use char because int might match the return type of a gcc2
22207     builtin and then its argument prototype would still apply.  */
22208 char strftime();
22209
22210 int main() {
22211 strftime()
22212 ; return 0; }
22213 EOF
22214 if { (eval echo configure:22215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22215   rm -rf conftest*
22216   eval "ac_cv_lib_$ac_lib_var=yes"
22217 else
22218   echo "configure: failed program was:" >&5
22219   cat conftest.$ac_ext >&5
22220   rm -rf conftest*
22221   eval "ac_cv_lib_$ac_lib_var=no"
22222 fi
22223 rm -f conftest*
22224 LIBS="$ac_save_LIBS"
22225
22226 fi
22227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22228   echo "$ac_t""yes" 1>&6
22229   cat >> confdefs.h <<\EOF
22230 #define HAVE_STRFTIME 1
22231 EOF
22232
22233 LIBS="-lintl $LIBS"
22234 else
22235   echo "$ac_t""no" 1>&6
22236 fi
22237
22238 fi
22239
22240
22241 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22242 echo "configure:22243: checking for inet_aton()" >&5
22243 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22244   echo $ac_n "(cached) $ac_c" 1>&6
22245 else
22246   cat > conftest.$ac_ext <<EOF
22247 #line 22248 "configure"
22248 #include "confdefs.h"
22249
22250 #ifdef HAVE_SYS_TYPES_H
22251 #       include <sys/types.h>
22252 #endif
22253 #ifdef HAVE_SYS_SOCKET_H
22254 #       include <sys/socket.h>
22255 #       ifdef HAVE_SYS_SELECT_H
22256 #               include <sys/select.h>
22257 #       endif
22258 #       include <netinet/in.h>
22259 #       ifdef HAVE_ARPA_INET_H
22260 #               include <arpa/inet.h>
22261 #       endif
22262 #endif
22263
22264 int main() {
22265 struct in_addr in;
22266 int rc = inet_aton( "255.255.255.255", &in );
22267 ; return 0; }
22268 EOF
22269 if { (eval echo configure:22270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22270   rm -rf conftest*
22271   ol_cv_func_inet_aton=yes
22272 else
22273   echo "configure: failed program was:" >&5
22274   cat conftest.$ac_ext >&5
22275   rm -rf conftest*
22276   ol_cv_func_inet_aton=no
22277 fi
22278 rm -f conftest*
22279 fi
22280
22281 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22282   if test $ol_cv_func_inet_aton != no; then
22283     cat >> confdefs.h <<\EOF
22284 #define HAVE_INET_ATON 1
22285 EOF
22286
22287   fi
22288  
22289
22290 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22291 echo "configure:22292: checking for _spawnlp" >&5
22292 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22293   echo $ac_n "(cached) $ac_c" 1>&6
22294 else
22295   cat > conftest.$ac_ext <<EOF
22296 #line 22297 "configure"
22297 #include "confdefs.h"
22298 /* System header to define __stub macros and hopefully few prototypes,
22299     which can conflict with char _spawnlp(); below.  */
22300 #include <assert.h>
22301 /* Override any gcc2 internal prototype to avoid an error.  */
22302 /* We use char because int might match the return type of a gcc2
22303     builtin and then its argument prototype would still apply.  */
22304 char _spawnlp();
22305 char (*f)();
22306
22307 int main() {
22308
22309 /* The GNU C library defines this for functions which it implements
22310     to always fail with ENOSYS.  Some functions are actually named
22311     something starting with __ and the normal name is an alias.  */
22312 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22313 choke me
22314 #else
22315 f = _spawnlp;
22316 #endif
22317
22318 ; return 0; }
22319 EOF
22320 if { (eval echo configure:22321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22321   rm -rf conftest*
22322   eval "ac_cv_func__spawnlp=yes"
22323 else
22324   echo "configure: failed program was:" >&5
22325   cat conftest.$ac_ext >&5
22326   rm -rf conftest*
22327   eval "ac_cv_func__spawnlp=no"
22328 fi
22329 rm -f conftest*
22330 fi
22331
22332 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22333   echo "$ac_t""yes" 1>&6
22334   cat >> confdefs.h <<\EOF
22335 #define HAVE_SPAWNLP 1
22336 EOF
22337
22338 else
22339   echo "$ac_t""no" 1>&6
22340 fi
22341
22342
22343 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22344 echo "configure:22345: checking for _snprintf" >&5
22345 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22346   echo $ac_n "(cached) $ac_c" 1>&6
22347 else
22348   cat > conftest.$ac_ext <<EOF
22349 #line 22350 "configure"
22350 #include "confdefs.h"
22351 /* System header to define __stub macros and hopefully few prototypes,
22352     which can conflict with char _snprintf(); below.  */
22353 #include <assert.h>
22354 /* Override any gcc2 internal prototype to avoid an error.  */
22355 /* We use char because int might match the return type of a gcc2
22356     builtin and then its argument prototype would still apply.  */
22357 char _snprintf();
22358 char (*f)();
22359
22360 int main() {
22361
22362 /* The GNU C library defines this for functions which it implements
22363     to always fail with ENOSYS.  Some functions are actually named
22364     something starting with __ and the normal name is an alias.  */
22365 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22366 choke me
22367 #else
22368 f = _snprintf;
22369 #endif
22370
22371 ; return 0; }
22372 EOF
22373 if { (eval echo configure:22374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22374   rm -rf conftest*
22375   eval "ac_cv_func__snprintf=yes"
22376 else
22377   echo "configure: failed program was:" >&5
22378   cat conftest.$ac_ext >&5
22379   rm -rf conftest*
22380   eval "ac_cv_func__snprintf=no"
22381 fi
22382 rm -f conftest*
22383 fi
22384
22385 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22386   echo "$ac_t""yes" 1>&6
22387   ac_cv_func_snprintf=yes
22388         cat >> confdefs.h <<\EOF
22389 #define snprintf _snprintf
22390 EOF
22391
22392
22393 else
22394   echo "$ac_t""no" 1>&6
22395 fi
22396
22397
22398 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22399 echo "configure:22400: checking for _vsnprintf" >&5
22400 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22401   echo $ac_n "(cached) $ac_c" 1>&6
22402 else
22403   cat > conftest.$ac_ext <<EOF
22404 #line 22405 "configure"
22405 #include "confdefs.h"
22406 /* System header to define __stub macros and hopefully few prototypes,
22407     which can conflict with char _vsnprintf(); below.  */
22408 #include <assert.h>
22409 /* Override any gcc2 internal prototype to avoid an error.  */
22410 /* We use char because int might match the return type of a gcc2
22411     builtin and then its argument prototype would still apply.  */
22412 char _vsnprintf();
22413 char (*f)();
22414
22415 int main() {
22416
22417 /* The GNU C library defines this for functions which it implements
22418     to always fail with ENOSYS.  Some functions are actually named
22419     something starting with __ and the normal name is an alias.  */
22420 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22421 choke me
22422 #else
22423 f = _vsnprintf;
22424 #endif
22425
22426 ; return 0; }
22427 EOF
22428 if { (eval echo configure:22429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22429   rm -rf conftest*
22430   eval "ac_cv_func__vsnprintf=yes"
22431 else
22432   echo "configure: failed program was:" >&5
22433   cat conftest.$ac_ext >&5
22434   rm -rf conftest*
22435   eval "ac_cv_func__vsnprintf=no"
22436 fi
22437 rm -f conftest*
22438 fi
22439
22440 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22441   echo "$ac_t""yes" 1>&6
22442   ac_cv_func_vsnprintf=yes
22443         cat >> confdefs.h <<\EOF
22444 #define vsnprintf _vsnprintf
22445 EOF
22446
22447
22448 else
22449   echo "$ac_t""no" 1>&6
22450 fi
22451
22452
22453 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22454 echo "configure:22455: checking for vprintf" >&5
22455 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22456   echo $ac_n "(cached) $ac_c" 1>&6
22457 else
22458   cat > conftest.$ac_ext <<EOF
22459 #line 22460 "configure"
22460 #include "confdefs.h"
22461 /* System header to define __stub macros and hopefully few prototypes,
22462     which can conflict with char vprintf(); below.  */
22463 #include <assert.h>
22464 /* Override any gcc2 internal prototype to avoid an error.  */
22465 /* We use char because int might match the return type of a gcc2
22466     builtin and then its argument prototype would still apply.  */
22467 char vprintf();
22468 char (*f)();
22469
22470 int main() {
22471
22472 /* The GNU C library defines this for functions which it implements
22473     to always fail with ENOSYS.  Some functions are actually named
22474     something starting with __ and the normal name is an alias.  */
22475 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22476 choke me
22477 #else
22478 f = vprintf;
22479 #endif
22480
22481 ; return 0; }
22482 EOF
22483 if { (eval echo configure:22484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22484   rm -rf conftest*
22485   eval "ac_cv_func_vprintf=yes"
22486 else
22487   echo "configure: failed program was:" >&5
22488   cat conftest.$ac_ext >&5
22489   rm -rf conftest*
22490   eval "ac_cv_func_vprintf=no"
22491 fi
22492 rm -f conftest*
22493 fi
22494
22495 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22496   echo "$ac_t""yes" 1>&6
22497   cat >> confdefs.h <<\EOF
22498 #define HAVE_VPRINTF 1
22499 EOF
22500
22501 else
22502   echo "$ac_t""no" 1>&6
22503 fi
22504
22505 if test "$ac_cv_func_vprintf" != yes; then
22506 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22507 echo "configure:22508: checking for _doprnt" >&5
22508 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22509   echo $ac_n "(cached) $ac_c" 1>&6
22510 else
22511   cat > conftest.$ac_ext <<EOF
22512 #line 22513 "configure"
22513 #include "confdefs.h"
22514 /* System header to define __stub macros and hopefully few prototypes,
22515     which can conflict with char _doprnt(); below.  */
22516 #include <assert.h>
22517 /* Override any gcc2 internal prototype to avoid an error.  */
22518 /* We use char because int might match the return type of a gcc2
22519     builtin and then its argument prototype would still apply.  */
22520 char _doprnt();
22521 char (*f)();
22522
22523 int main() {
22524
22525 /* The GNU C library defines this for functions which it implements
22526     to always fail with ENOSYS.  Some functions are actually named
22527     something starting with __ and the normal name is an alias.  */
22528 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22529 choke me
22530 #else
22531 f = _doprnt;
22532 #endif
22533
22534 ; return 0; }
22535 EOF
22536 if { (eval echo configure:22537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22537   rm -rf conftest*
22538   eval "ac_cv_func__doprnt=yes"
22539 else
22540   echo "configure: failed program was:" >&5
22541   cat conftest.$ac_ext >&5
22542   rm -rf conftest*
22543   eval "ac_cv_func__doprnt=no"
22544 fi
22545 rm -f conftest*
22546 fi
22547
22548 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22549   echo "$ac_t""yes" 1>&6
22550   cat >> confdefs.h <<\EOF
22551 #define HAVE_DOPRNT 1
22552 EOF
22553
22554 else
22555   echo "$ac_t""no" 1>&6
22556 fi
22557
22558 fi
22559
22560
22561 if test $ac_cv_func_vprintf = yes ; then
22562                 for ac_func in snprintf vsnprintf
22563 do
22564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22565 echo "configure:22566: checking for $ac_func" >&5
22566 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22567   echo $ac_n "(cached) $ac_c" 1>&6
22568 else
22569   cat > conftest.$ac_ext <<EOF
22570 #line 22571 "configure"
22571 #include "confdefs.h"
22572 /* System header to define __stub macros and hopefully few prototypes,
22573     which can conflict with char $ac_func(); below.  */
22574 #include <assert.h>
22575 /* Override any gcc2 internal prototype to avoid an error.  */
22576 /* We use char because int might match the return type of a gcc2
22577     builtin and then its argument prototype would still apply.  */
22578 char $ac_func();
22579 char (*f)();
22580
22581 int main() {
22582
22583 /* The GNU C library defines this for functions which it implements
22584     to always fail with ENOSYS.  Some functions are actually named
22585     something starting with __ and the normal name is an alias.  */
22586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22587 choke me
22588 #else
22589 f = $ac_func;
22590 #endif
22591
22592 ; return 0; }
22593 EOF
22594 if { (eval echo configure:22595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22595   rm -rf conftest*
22596   eval "ac_cv_func_$ac_func=yes"
22597 else
22598   echo "configure: failed program was:" >&5
22599   cat conftest.$ac_ext >&5
22600   rm -rf conftest*
22601   eval "ac_cv_func_$ac_func=no"
22602 fi
22603 rm -f conftest*
22604 fi
22605
22606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22607   echo "$ac_t""yes" 1>&6
22608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22609   cat >> confdefs.h <<EOF
22610 #define $ac_tr_func 1
22611 EOF
22612  
22613 else
22614   echo "$ac_t""no" 1>&6
22615 fi
22616 done
22617
22618 fi
22619
22620 for ac_func in \
22621         bcopy                   \
22622         closesocket             \
22623         chroot                  \
22624         endgrent                \
22625         endpwent                \
22626         fcntl                   \
22627         flock                   \
22628         fstat                   \
22629         getdtablesize   \
22630         getgrgid                \
22631         gethostname             \
22632         getpass                 \
22633         getpassphrase   \
22634         getpwuid                \
22635         getpwnam                \
22636         getspnam                \
22637         gettimeofday    \
22638         initgroups              \
22639         lockf                   \
22640         memcpy                  \
22641         memmove                 \
22642         mkstemp                 \
22643         mktemp                  \
22644         pipe                    \
22645         read                    \
22646         recv                    \
22647         recvfrom                \
22648         setpwfile               \
22649         setgid                  \
22650         setegid                 \
22651         setsid                  \
22652         setuid                  \
22653         seteuid                 \
22654         sigaction               \
22655         signal                  \
22656         sigset                  \
22657         strdup                  \
22658         strerror                \
22659         strpbrk                 \
22660         strrchr                 \
22661         strsep                  \
22662         strstr                  \
22663         strtol                  \
22664         strtoul                 \
22665         strtoq                  \
22666         strtouq                 \
22667         strtoll                 \
22668         strspn                  \
22669         sysconf                 \
22670         usleep                  \
22671         waitpid                 \
22672         wait4                   \
22673         write                   \
22674         send                    \
22675         sendmsg                 \
22676         sendto                  \
22677
22678 do
22679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22680 echo "configure:22681: checking for $ac_func" >&5
22681 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22682   echo $ac_n "(cached) $ac_c" 1>&6
22683 else
22684   cat > conftest.$ac_ext <<EOF
22685 #line 22686 "configure"
22686 #include "confdefs.h"
22687 /* System header to define __stub macros and hopefully few prototypes,
22688     which can conflict with char $ac_func(); below.  */
22689 #include <assert.h>
22690 /* Override any gcc2 internal prototype to avoid an error.  */
22691 /* We use char because int might match the return type of a gcc2
22692     builtin and then its argument prototype would still apply.  */
22693 char $ac_func();
22694 char (*f)();
22695
22696 int main() {
22697
22698 /* The GNU C library defines this for functions which it implements
22699     to always fail with ENOSYS.  Some functions are actually named
22700     something starting with __ and the normal name is an alias.  */
22701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22702 choke me
22703 #else
22704 f = $ac_func;
22705 #endif
22706
22707 ; return 0; }
22708 EOF
22709 if { (eval echo configure:22710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22710   rm -rf conftest*
22711   eval "ac_cv_func_$ac_func=yes"
22712 else
22713   echo "configure: failed program was:" >&5
22714   cat conftest.$ac_ext >&5
22715   rm -rf conftest*
22716   eval "ac_cv_func_$ac_func=no"
22717 fi
22718 rm -f conftest*
22719 fi
22720
22721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22722   echo "$ac_t""yes" 1>&6
22723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22724   cat >> confdefs.h <<EOF
22725 #define $ac_tr_func 1
22726 EOF
22727  
22728 else
22729   echo "$ac_t""no" 1>&6
22730 fi
22731 done
22732
22733
22734 for ac_func in getopt getpeereid
22735 do
22736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22737 echo "configure:22738: checking for $ac_func" >&5
22738 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22739   echo $ac_n "(cached) $ac_c" 1>&6
22740 else
22741   cat > conftest.$ac_ext <<EOF
22742 #line 22743 "configure"
22743 #include "confdefs.h"
22744 /* System header to define __stub macros and hopefully few prototypes,
22745     which can conflict with char $ac_func(); below.  */
22746 #include <assert.h>
22747 /* Override any gcc2 internal prototype to avoid an error.  */
22748 /* We use char because int might match the return type of a gcc2
22749     builtin and then its argument prototype would still apply.  */
22750 char $ac_func();
22751 char (*f)();
22752
22753 int main() {
22754
22755 /* The GNU C library defines this for functions which it implements
22756     to always fail with ENOSYS.  Some functions are actually named
22757     something starting with __ and the normal name is an alias.  */
22758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22759 choke me
22760 #else
22761 f = $ac_func;
22762 #endif
22763
22764 ; return 0; }
22765 EOF
22766 if { (eval echo configure:22767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22767   rm -rf conftest*
22768   eval "ac_cv_func_$ac_func=yes"
22769 else
22770   echo "configure: failed program was:" >&5
22771   cat conftest.$ac_ext >&5
22772   rm -rf conftest*
22773   eval "ac_cv_func_$ac_func=no"
22774 fi
22775 rm -f conftest*
22776 fi
22777
22778 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22779   echo "$ac_t""yes" 1>&6
22780     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22781   cat >> confdefs.h <<EOF
22782 #define $ac_tr_func 1
22783 EOF
22784  
22785 else
22786   echo "$ac_t""no" 1>&6
22787 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22788 fi
22789 done
22790
22791
22792
22793 if test "$ac_cv_func_getopt" != yes; then
22794         LIBSRCS="$LIBSRCS getopt.c"
22795 fi
22796 if test "$ac_cv_func_getpeereid" != yes; then
22797         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22798 echo "configure:22799: checking for msg_accrights in msghdr" >&5
22799 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22800   echo $ac_n "(cached) $ac_c" 1>&6
22801 else
22802   cat > conftest.$ac_ext <<EOF
22803 #line 22804 "configure"
22804 #include "confdefs.h"
22805 #include <sys/socket.h>
22806 int main() {
22807 struct msghdr m; m.msg_accrightslen=0
22808 ; return 0; }
22809 EOF
22810 if { (eval echo configure:22811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22811   rm -rf conftest*
22812   ol_cv_msghdr_msg_accrights=yes
22813 else
22814   echo "configure: failed program was:" >&5
22815   cat conftest.$ac_ext >&5
22816   rm -rf conftest*
22817   ol_cv_msghdr_msg_accrights=no
22818 fi
22819 rm -f conftest*
22820         
22821 fi
22822
22823 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22824   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22825         cat >> confdefs.h <<\EOF
22826 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22827 EOF
22828
22829   fi
22830
22831         LIBSRCS="$LIBSRCS getpeereid.c"
22832 fi
22833 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22834         if test "$ac_cv_func_snprintf" != yes; then
22835                 cat >> confdefs.h <<\EOF
22836 #define snprintf ber_pvt_snprintf
22837 EOF
22838
22839         fi
22840         if test "$ac_cv_func_vsnprintf" != yes; then
22841                 cat >> confdefs.h <<\EOF
22842 #define vsnprintf ber_pvt_vsnprintf
22843 EOF
22844
22845         fi
22846 fi
22847
22848 # Check Configuration
22849 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22850 echo "configure:22851: checking declaration of sys_errlist" >&5
22851 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22852   echo $ac_n "(cached) $ac_c" 1>&6
22853 else
22854   
22855         cat > conftest.$ac_ext <<EOF
22856 #line 22857 "configure"
22857 #include "confdefs.h"
22858
22859 #include <stdio.h>
22860 #include <sys/types.h>
22861 #include <errno.h>
22862 #ifdef WINNT
22863 #include <stdlib.h>
22864 #endif 
22865 int main() {
22866 char *c = (char *) *sys_errlist
22867 ; return 0; }
22868 EOF
22869 if { (eval echo configure:22870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22870   rm -rf conftest*
22871   ol_cv_dcl_sys_errlist=yes
22872         ol_cv_have_sys_errlist=yes
22873 else
22874   echo "configure: failed program was:" >&5
22875   cat conftest.$ac_ext >&5
22876   rm -rf conftest*
22877   ol_cv_dcl_sys_errlist=no
22878 fi
22879 rm -f conftest*
22880 fi
22881
22882 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22883 #
22884 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22885 if test $ol_cv_dcl_sys_errlist = no ; then
22886         cat >> confdefs.h <<\EOF
22887 #define DECL_SYS_ERRLIST 1
22888 EOF
22889
22890
22891         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22892 echo "configure:22893: checking existence of sys_errlist" >&5
22893 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22894   echo $ac_n "(cached) $ac_c" 1>&6
22895 else
22896   
22897                 cat > conftest.$ac_ext <<EOF
22898 #line 22899 "configure"
22899 #include "confdefs.h"
22900 #include <errno.h>
22901 int main() {
22902 char *c = (char *) *sys_errlist
22903 ; return 0; }
22904 EOF
22905 if { (eval echo configure:22906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22906   rm -rf conftest*
22907   ol_cv_have_sys_errlist=yes
22908 else
22909   echo "configure: failed program was:" >&5
22910   cat conftest.$ac_ext >&5
22911   rm -rf conftest*
22912   ol_cv_have_sys_errlist=no
22913 fi
22914 rm -f conftest*
22915 fi
22916
22917 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22918 fi
22919 if test $ol_cv_have_sys_errlist = yes ; then
22920         cat >> confdefs.h <<\EOF
22921 #define HAVE_SYS_ERRLIST 1
22922 EOF
22923
22924 fi
22925
22926
22927
22928 if test "$ol_enable_slapi" != no ; then
22929                         for ac_hdr in ltdl.h
22930 do
22931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22933 echo "configure:22934: checking for $ac_hdr" >&5
22934 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22935   echo $ac_n "(cached) $ac_c" 1>&6
22936 else
22937   cat > conftest.$ac_ext <<EOF
22938 #line 22939 "configure"
22939 #include "confdefs.h"
22940 #include <$ac_hdr>
22941 EOF
22942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22943 { (eval echo configure:22944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22945 if test -z "$ac_err"; then
22946   rm -rf conftest*
22947   eval "ac_cv_header_$ac_safe=yes"
22948 else
22949   echo "$ac_err" >&5
22950   echo "configure: failed program was:" >&5
22951   cat conftest.$ac_ext >&5
22952   rm -rf conftest*
22953   eval "ac_cv_header_$ac_safe=no"
22954 fi
22955 rm -f conftest*
22956 fi
22957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22958   echo "$ac_t""yes" 1>&6
22959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22960   cat >> confdefs.h <<EOF
22961 #define $ac_tr_hdr 1
22962 EOF
22963  
22964 else
22965   echo "$ac_t""no" 1>&6
22966 fi
22967 done
22968
22969
22970         if test $ac_cv_header_ltdl_h != yes ; then
22971                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22972         fi
22973         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22974 echo "configure:22975: checking for lt_dlinit in -lltdl" >&5
22975 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22976 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22977   echo $ac_n "(cached) $ac_c" 1>&6
22978 else
22979   ac_save_LIBS="$LIBS"
22980 LIBS="-lltdl  $LIBS"
22981 cat > conftest.$ac_ext <<EOF
22982 #line 22983 "configure"
22983 #include "confdefs.h"
22984 /* Override any gcc2 internal prototype to avoid an error.  */
22985 /* We use char because int might match the return type of a gcc2
22986     builtin and then its argument prototype would still apply.  */
22987 char lt_dlinit();
22988
22989 int main() {
22990 lt_dlinit()
22991 ; return 0; }
22992 EOF
22993 if { (eval echo configure:22994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22994   rm -rf conftest*
22995   eval "ac_cv_lib_$ac_lib_var=yes"
22996 else
22997   echo "configure: failed program was:" >&5
22998   cat conftest.$ac_ext >&5
22999   rm -rf conftest*
23000   eval "ac_cv_lib_$ac_lib_var=no"
23001 fi
23002 rm -f conftest*
23003 LIBS="$ac_save_LIBS"
23004
23005 fi
23006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23007   echo "$ac_t""yes" 1>&6
23008   
23009                 SLAPI_LIBS=-lltdl
23010                 LIBSLAPI=libslapi.a
23011                 LIBSLAPITOOLS=../libslapi.a
23012                 cat >> confdefs.h <<\EOF
23013 #define HAVE_LIBLTDL 1
23014 EOF
23015
23016         
23017 else
23018   echo "$ac_t""no" 1>&6
23019 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23020 fi
23021
23022
23023         cat >> confdefs.h <<\EOF
23024 #define LDAP_SLAPI 1
23025 EOF
23026
23027 fi
23028
23029 if test "$ol_enable_debug" != no ; then
23030         cat >> confdefs.h <<\EOF
23031 #define LDAP_DEBUG 1
23032 EOF
23033
23034 fi
23035 if test "$ol_enable_syslog" = yes ; then
23036         cat >> confdefs.h <<\EOF
23037 #define LDAP_SYSLOG 1
23038 EOF
23039
23040 fi
23041 if test "$ol_link_kbind" != no ; then
23042         cat >> confdefs.h <<\EOF
23043 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23044 EOF
23045
23046 fi
23047 if test "$ol_enable_proctitle" != no ; then
23048         cat >> confdefs.h <<\EOF
23049 #define LDAP_PROCTITLE 1
23050 EOF
23051
23052 fi
23053 if test "$ol_enable_referrals" != no ; then
23054         cat >> confdefs.h <<\EOF
23055 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23056 EOF
23057
23058 fi
23059 if test "$ol_enable_local" != no; then
23060         cat >> confdefs.h <<\EOF
23061 #define LDAP_PF_LOCAL 1
23062 EOF
23063
23064 fi
23065 if test "$ol_link_ipv6" != no; then
23066         cat >> confdefs.h <<\EOF
23067 #define LDAP_PF_INET6 1
23068 EOF
23069
23070 fi
23071 if test "$ol_enable_cleartext" != no ; then
23072         cat >> confdefs.h <<\EOF
23073 #define SLAPD_CLEARTEXT 1
23074 EOF
23075
23076 fi
23077 if test "$ol_enable_crypt" != no ; then
23078         cat >> confdefs.h <<\EOF
23079 #define SLAPD_CRYPT 1
23080 EOF
23081
23082 fi
23083 if test "$ol_link_kpasswd" != no ; then
23084         cat >> confdefs.h <<\EOF
23085 #define SLAPD_KPASSWD 1
23086 EOF
23087
23088 fi
23089 if test "$ol_link_spasswd" != no ; then
23090         cat >> confdefs.h <<\EOF
23091 #define SLAPD_SPASSWD 1
23092 EOF
23093
23094 fi
23095 if test "$ol_enable_multimaster" != no ; then
23096         cat >> confdefs.h <<\EOF
23097 #define SLAPD_MULTIMASTER 1
23098 EOF
23099
23100 fi
23101 if test "$ol_enable_rlookups" != no ; then
23102         cat >> confdefs.h <<\EOF
23103 #define SLAPD_RLOOKUPS 1
23104 EOF
23105
23106 fi
23107 if test "$ol_enable_aci" != no ; then
23108         cat >> confdefs.h <<\EOF
23109 #define SLAPD_ACI_ENABLED 1
23110 EOF
23111
23112 fi
23113
23114 if test "$ol_link_modules" != no ; then
23115         cat >> confdefs.h <<\EOF
23116 #define SLAPD_MODULES 1
23117 EOF
23118
23119         BUILD_SLAPD=yes
23120         SLAPD_MODULES_LDFLAGS="-dlopen self"
23121 fi
23122
23123 if test "$ol_enable_bdb" != no ; then
23124         cat >> confdefs.h <<\EOF
23125 #define SLAPD_BDB 1
23126 EOF
23127
23128         BUILD_SLAPD=yes
23129         BUILD_BDB=yes
23130         if test "$ol_with_bdb_module" != static ; then
23131                 cat >> confdefs.h <<\EOF
23132 #define SLAPD_BDB_DYNAMIC 1
23133 EOF
23134
23135                 BUILD_BDB=mod
23136                 BUILD_BDB_DYNAMIC=shared
23137                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23138         else
23139                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23140         fi
23141 fi
23142
23143 if test "$ol_link_dnssrv" != no ; then
23144         cat >> confdefs.h <<\EOF
23145 #define SLAPD_DNSSRV 1
23146 EOF
23147
23148         BUILD_SLAPD=yes
23149         BUILD_DNSSRV=yes
23150         if test "$ol_with_dnssrv_module" != static ; then
23151                 cat >> confdefs.h <<\EOF
23152 #define SLAPD_DNSSRV_DYNAMIC 1
23153 EOF
23154
23155                 BUILD_DNSSRV=mod
23156                 BUILD_DNSSRV_DYNAMIC=shared
23157                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23158         else
23159                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23160         fi
23161 fi
23162
23163 if test "$ol_enable_hdb" != no ; then
23164         cat >> confdefs.h <<\EOF
23165 #define SLAPD_HDB 1
23166 EOF
23167
23168         BUILD_SLAPD=yes
23169         BUILD_HDB=yes
23170         if test "$ol_with_hdb_module" != static ; then
23171                 cat >> confdefs.h <<\EOF
23172 #define SLAPD_HDB_DYNAMIC 1
23173 EOF
23174
23175                 BUILD_HDB=mod
23176                 BUILD_HDB_DYNAMIC=shared
23177                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23178         else
23179                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23180         fi
23181 fi
23182
23183 if test "$ol_enable_ldap" != no ; then
23184         cat >> confdefs.h <<\EOF
23185 #define SLAPD_LDAP 1
23186 EOF
23187
23188         BUILD_SLAPD=yes
23189         BUILD_LDAP=yes
23190         if test "$ol_with_ldap_module" != static ; then
23191                 cat >> confdefs.h <<\EOF
23192 #define SLAPD_LDAP_DYNAMIC 1
23193 EOF
23194
23195                 BUILD_LDAP=mod
23196                 BUILD_LDAP_DYNAMIC=shared
23197                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23198         else
23199                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23200         fi
23201 fi
23202
23203 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23204         cat >> confdefs.h <<\EOF
23205 #define SLAPD_LDBM 1
23206 EOF
23207
23208         BUILD_SLAPD=yes
23209         BUILD_LDBM=yes
23210         if test "$ol_with_ldbm_module" != static ; then
23211                 cat >> confdefs.h <<\EOF
23212 #define SLAPD_LDBM_DYNAMIC 1
23213 EOF
23214
23215                 BUILD_LDBM=mod
23216                 BUILD_LDBM_DYNAMIC=shared
23217                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23218         else
23219                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23220         fi
23221 fi
23222
23223 if test "$ol_enable_meta" != no ; then
23224         if test "$ol_enable_ldap" = no ; then
23225                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23226         fi
23227         if test "$ol_enable_rewrite" = no ; then
23228                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23229         fi
23230         cat >> confdefs.h <<\EOF
23231 #define SLAPD_META 1
23232 EOF
23233
23234         BUILD_SLAPD=yes
23235         BUILD_META=yes
23236         BUILD_REWRITE=yes
23237         if test $ol_enable_ldbm = yes -o \
23238                 $ol_enable_bdb = yes ; then 
23239                 BUILD_CACHE=yes
23240         fi
23241         if test "$ol_with_meta_module" != static ; then
23242                 cat >> confdefs.h <<\EOF
23243 #define SLAPD_META_DYNAMIC 1
23244 EOF
23245
23246                 BUILD_META=mod
23247                 BUILD_META_DYNAMIC=shared
23248                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23249         else
23250                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23251         fi
23252 fi
23253
23254 if test "$ol_enable_monitor" != no ; then
23255         cat >> confdefs.h <<\EOF
23256 #define SLAPD_MONITOR 1
23257 EOF
23258
23259         BUILD_SLAPD=yes
23260         BUILD_MONITOR=yes
23261         if test "$ol_with_monitor_module" != static ; then
23262                 cat >> confdefs.h <<\EOF
23263 #define SLAPD_MONITOR_DYNAMIC 1
23264 EOF
23265
23266                 BUILD_MONITOR=mod
23267                 BUILD_MONITOR_DYNAMIC=shared
23268                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23269         else
23270                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23271         fi
23272 fi
23273
23274 if test "$ol_enable_null" != no ; then
23275         cat >> confdefs.h <<\EOF
23276 #define SLAPD_NULL 1
23277 EOF
23278
23279         BUILD_SLAPD=yes
23280         BUILD_NULL=yes
23281         if test "$ol_with_null_module" != static ; then
23282                 cat >> confdefs.h <<\EOF
23283 #define SLAPD_NULL_DYNAMIC 1
23284 EOF
23285
23286                 BUILD_NULL=mod
23287                 BUILD_NULL_DYNAMIC=shared
23288                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23289         else
23290                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23291         fi
23292 fi
23293
23294 if test "$ol_enable_passwd" != no ; then
23295         cat >> confdefs.h <<\EOF
23296 #define SLAPD_PASSWD 1
23297 EOF
23298
23299         BUILD_SLAPD=yes
23300         BUILD_PASSWD=yes
23301         if test "$ol_with_passwd_module" != static ; then
23302                 cat >> confdefs.h <<\EOF
23303 #define SLAPD_PASSWD_DYNAMIC 1
23304 EOF
23305
23306                 BUILD_PASSWD=mod
23307                 BUILD_PASSWD_DYNAMIC=shared
23308                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23309         else
23310                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23311         fi
23312 fi
23313
23314 if test "$ol_link_perl" != no ; then
23315         cat >> confdefs.h <<\EOF
23316 #define SLAPD_PERL 1
23317 EOF
23318
23319         BUILD_SLAPD=yes
23320         BUILD_PERL=yes
23321         if test "$ol_with_perl_module" != static ; then
23322                 cat >> confdefs.h <<\EOF
23323 #define SLAPD_PERL_DYNAMIC 1
23324 EOF
23325
23326                 BUILD_PERL=mod
23327                 BUILD_PERL_DYNAMIC=shared
23328                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23329         else
23330                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23331         fi
23332 fi
23333
23334 if test "$ol_enable_shell" != no ; then
23335         if test "$ol_link_thread" != no ; then
23336                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23337         fi
23338         cat >> confdefs.h <<\EOF
23339 #define SLAPD_SHELL 1
23340 EOF
23341
23342         BUILD_SLAPD=yes
23343         BUILD_SHELL=yes
23344         if test "$ol_with_shell_module" != static ; then
23345                 cat >> confdefs.h <<\EOF
23346 #define SLAPD_SHELL_DYNAMIC 1
23347 EOF
23348
23349                 BUILD_SHELL=mod
23350                 BUILD_SHELL_DYNAMIC=shared
23351                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23352         else
23353                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23354         fi
23355 fi
23356
23357 if test "$ol_enable_tcl" != no ; then
23358         cat >> confdefs.h <<\EOF
23359 #define SLAPD_TCL 1
23360 EOF
23361
23362         BUILD_SLAPD=yes
23363         BUILD_TCL=yes
23364         if test "$ol_with_tcl_module" != static; then
23365                 cat >> confdefs.h <<\EOF
23366 #define SLAPD_TCL_DYNAMIC 1
23367 EOF
23368
23369                 BUILD_TCL=mod
23370                 BUILD_TCL_DYNAMIC=shared
23371                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23372         else
23373                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23374         fi
23375 fi
23376
23377 if test "$ol_link_sql" != no ; then
23378         cat >> confdefs.h <<\EOF
23379 #define SLAPD_SQL 1
23380 EOF
23381
23382         BUILD_SLAPD=yes
23383         BUILD_SQL=yes
23384         if test "$ol_with_sql_module" != static; then
23385                 cat >> confdefs.h <<\EOF
23386 #define SLAPD_SQL_DYNAMIC 1
23387 EOF
23388
23389                 BUILD_SQL=mod
23390                 BUILD_SQL_DYNAMIC=shared
23391                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23392         else
23393                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23394         fi
23395 fi
23396
23397 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23398         $BUILD_SLAPD = yes ; then
23399         BUILD_SLURPD=yes
23400 fi
23401
23402 if test "$ol_enable_rewrite" != no ; then
23403         cat >> confdefs.h <<\EOF
23404 #define ENABLE_REWRITE 1
23405 EOF
23406
23407         BUILD_REWRITE=yes
23408 fi
23409
23410 if test "$ol_enable_slapi" != no ; then
23411         cat >> confdefs.h <<\EOF
23412 #define ENABLE_SLAPI 1
23413 EOF
23414
23415         BUILD_SLAPI=yes
23416         SLAPD_SLAPI_DEPEND=libslapi.a
23417 fi
23418
23419
23420
23421 if test "$ac_cv_mingw32" = yes ; then
23422         PLAT=NT
23423         SLAPD_MODULES_LDFLAGS=
23424 else
23425         PLAT=UNIX
23426 fi
23427
23428 if test -z "$SLAPD_STATIC_BACKENDS"; then
23429         SLAPD_NO_STATIC='#'
23430 else
23431         SLAPD_NO_STATIC=
23432 fi
23433
23434
23435
23436
23437
23438
23439
23440   
23441   
23442   
23443   
23444   
23445   
23446   
23447   
23448   
23449   
23450   
23451   
23452   
23453   
23454   
23455   
23456   
23457   
23458   
23459   
23460   
23461   
23462   
23463   
23464   
23465   
23466   
23467   
23468   
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509 # Check whether --with-xxinstall or --without-xxinstall was given.
23510 if test "${with_xxinstall+set}" = set; then
23511   withval="$with_xxinstall"
23512   :
23513 fi
23514
23515
23516
23517 trap '' 1 2 15
23518
23519 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23520
23521 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23522 # Let make expand exec_prefix.
23523 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23524
23525 # Any assignment to VPATH causes Sun make to only execute
23526 # the first set of double-colon rules, so remove it if not needed.
23527 # If there is a colon in the path, we need to keep it.
23528 if test "x$srcdir" = x.; then
23529   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23530 fi
23531
23532 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23533
23534 DEFS=-DHAVE_CONFIG_H
23535
23536 # Without the "./", some shells look in PATH for config.status.
23537 : ${CONFIG_STATUS=./config.status}
23538
23539 echo creating $CONFIG_STATUS
23540 rm -f $CONFIG_STATUS
23541 cat > $CONFIG_STATUS <<EOF
23542 #! /bin/sh
23543 # Generated automatically by configure.
23544 # Run this file to recreate the current configuration.
23545 # This directory was configured as follows,
23546 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23547 #
23548 # $0 $ac_configure_args
23549 #
23550 # Compiler output produced by configure, useful for debugging
23551 # configure, is in ./config.log if it exists.
23552
23553 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23554 for ac_option
23555 do
23556   case "\$ac_option" in
23557   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23558     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23559     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23560   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23561     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23562     exit 0 ;;
23563   -help | --help | --hel | --he | --h)
23564     echo "\$ac_cs_usage"; exit 0 ;;
23565   *) echo "\$ac_cs_usage"; exit 1 ;;
23566   esac
23567 done
23568
23569 ac_given_srcdir=$srcdir
23570 ac_given_INSTALL="$INSTALL"
23571
23572 trap 'rm -fr `echo "\
23573 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23574 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23575 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23576 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23577 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23578 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23579 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23580 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23581 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23582 include/Makefile:build/top.mk:include/Makefile.in \
23583 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23584 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23585 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23586 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23587 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23588 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23589 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23590 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23591 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23592 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23593 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23594 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23595 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23596 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23597 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23598 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23599 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23600 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23601 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23602 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23603 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23604 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23605 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23606 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23607 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23608 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23609 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23610 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23611 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23612 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23613 tests/run \
23614 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23615  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23616 EOF
23617 cat >> $CONFIG_STATUS <<EOF
23618
23619 # Protect against being on the right side of a sed subst in config.status.
23620 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23621  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23622 $ac_vpsub
23623 $extrasub
23624 s%@SHELL@%$SHELL%g
23625 s%@CFLAGS@%$CFLAGS%g
23626 s%@CPPFLAGS@%$CPPFLAGS%g
23627 s%@CXXFLAGS@%$CXXFLAGS%g
23628 s%@FFLAGS@%$FFLAGS%g
23629 s%@DEFS@%$DEFS%g
23630 s%@LDFLAGS@%$LDFLAGS%g
23631 s%@LIBS@%$LIBS%g
23632 s%@exec_prefix@%$exec_prefix%g
23633 s%@prefix@%$prefix%g
23634 s%@program_transform_name@%$program_transform_name%g
23635 s%@bindir@%$bindir%g
23636 s%@sbindir@%$sbindir%g
23637 s%@libexecdir@%$libexecdir%g
23638 s%@datadir@%$datadir%g
23639 s%@sysconfdir@%$sysconfdir%g
23640 s%@sharedstatedir@%$sharedstatedir%g
23641 s%@localstatedir@%$localstatedir%g
23642 s%@libdir@%$libdir%g
23643 s%@includedir@%$includedir%g
23644 s%@oldincludedir@%$oldincludedir%g
23645 s%@infodir@%$infodir%g
23646 s%@mandir@%$mandir%g
23647 s%@host@%$host%g
23648 s%@host_alias@%$host_alias%g
23649 s%@host_cpu@%$host_cpu%g
23650 s%@host_vendor@%$host_vendor%g
23651 s%@host_os@%$host_os%g
23652 s%@target@%$target%g
23653 s%@target_alias@%$target_alias%g
23654 s%@target_cpu@%$target_cpu%g
23655 s%@target_vendor@%$target_vendor%g
23656 s%@target_os@%$target_os%g
23657 s%@build@%$build%g
23658 s%@build_alias@%$build_alias%g
23659 s%@build_cpu@%$build_cpu%g
23660 s%@build_vendor@%$build_vendor%g
23661 s%@build_os@%$build_os%g
23662 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23663 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23664 s%@INSTALL_DATA@%$INSTALL_DATA%g
23665 s%@PACKAGE@%$PACKAGE%g
23666 s%@VERSION@%$VERSION%g
23667 s%@ACLOCAL@%$ACLOCAL%g
23668 s%@AUTOCONF@%$AUTOCONF%g
23669 s%@AUTOMAKE@%$AUTOMAKE%g
23670 s%@AUTOHEADER@%$AUTOHEADER%g
23671 s%@MAKEINFO@%$MAKEINFO%g
23672 s%@install_sh@%$install_sh%g
23673 s%@AMTAR@%$AMTAR%g
23674 s%@AWK@%$AWK%g
23675 s%@AMTARFLAGS@%$AMTARFLAGS%g
23676 s%@SET_MAKE@%$SET_MAKE%g
23677 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23678 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23679 s%@top_builddir@%$top_builddir%g
23680 s%@ldap_subdir@%$ldap_subdir%g
23681 s%@CC@%$CC%g
23682 s%@AR@%$AR%g
23683 s%@LN_S@%$LN_S%g
23684 s%@OBJEXT@%$OBJEXT%g
23685 s%@EXEEXT@%$EXEEXT%g
23686 s%@ECHO@%$ECHO%g
23687 s%@RANLIB@%$RANLIB%g
23688 s%@STRIP@%$STRIP%g
23689 s%@DLLTOOL@%$DLLTOOL%g
23690 s%@AS@%$AS%g
23691 s%@OBJDUMP@%$OBJDUMP%g
23692 s%@CPP@%$CPP%g
23693 s%@LIBTOOL@%$LIBTOOL%g
23694 s%@LN_H@%$LN_H%g
23695 s%@PERLBIN@%$PERLBIN%g
23696 s%@OL_MKDEP@%$OL_MKDEP%g
23697 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23698 s%@LTSTATIC@%$LTSTATIC%g
23699 s%@LIBOBJS@%$LIBOBJS%g
23700 s%@LIBSRCS@%$LIBSRCS%g
23701 s%@PLAT@%$PLAT%g
23702 s%@WITH_TLS@%$WITH_TLS%g
23703 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23704 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23705 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23706 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23707 s%@BUILD_BDB@%$BUILD_BDB%g
23708 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23709 s%@BUILD_HDB@%$BUILD_HDB%g
23710 s%@BUILD_LDAP@%$BUILD_LDAP%g
23711 s%@BUILD_LDBM@%$BUILD_LDBM%g
23712 s%@BUILD_META@%$BUILD_META%g
23713 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23714 s%@BUILD_CACHE@%$BUILD_CACHE%g
23715 s%@BUILD_NULL@%$BUILD_NULL%g
23716 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23717 s%@BUILD_PERL@%$BUILD_PERL%g
23718 s%@BUILD_SHELL@%$BUILD_SHELL%g
23719 s%@BUILD_SQL@%$BUILD_SQL%g
23720 s%@BUILD_TCL@%$BUILD_TCL%g
23721 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23722 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23723 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23724 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23725 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23726 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23727 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23728 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23729 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23730 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23731 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23732 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23733 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23734 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23735 s%@LDAP_LIBS@%$LDAP_LIBS%g
23736 s%@LDIF_LIBS@%$LDIF_LIBS%g
23737 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23738 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23739 s%@LDBM_LIBS@%$LDBM_LIBS%g
23740 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23741 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23742 s%@WRAP_LIBS@%$WRAP_LIBS%g
23743 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23744 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23745 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23746 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23747 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23748 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23749 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23750 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23751 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23752 s%@KRB4_LIBS@%$KRB4_LIBS%g
23753 s%@KRB5_LIBS@%$KRB5_LIBS%g
23754 s%@SASL_LIBS@%$SASL_LIBS%g
23755 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23756 s%@TLS_LIBS@%$TLS_LIBS%g
23757 s%@MODULES_LIBS@%$MODULES_LIBS%g
23758 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23759 s%@LIBSLAPI@%$LIBSLAPI%g
23760 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23761 s%@AUTH_LIBS@%$AUTH_LIBS%g
23762 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23763 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23764 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23765 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23766
23767 CEOF
23768 EOF
23769
23770 cat >> $CONFIG_STATUS <<\EOF
23771
23772 # Split the substitutions into bite-sized pieces for seds with
23773 # small command number limits, like on Digital OSF/1 and HP-UX.
23774 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23775 ac_file=1 # Number of current file.
23776 ac_beg=1 # First line for current file.
23777 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23778 ac_more_lines=:
23779 ac_sed_cmds=""
23780 while $ac_more_lines; do
23781   if test $ac_beg -gt 1; then
23782     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23783   else
23784     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23785   fi
23786   if test ! -s conftest.s$ac_file; then
23787     ac_more_lines=false
23788     rm -f conftest.s$ac_file
23789   else
23790     if test -z "$ac_sed_cmds"; then
23791       ac_sed_cmds="sed -f conftest.s$ac_file"
23792     else
23793       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23794     fi
23795     ac_file=`expr $ac_file + 1`
23796     ac_beg=$ac_end
23797     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23798   fi
23799 done
23800 if test -z "$ac_sed_cmds"; then
23801   ac_sed_cmds=cat
23802 fi
23803 EOF
23804
23805 cat >> $CONFIG_STATUS <<EOF
23806
23807 CONFIG_FILES=\${CONFIG_FILES-"\
23808 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23809 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23810 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23811 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23812 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23813 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23814 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23815 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23816 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23817 include/Makefile:build/top.mk:include/Makefile.in \
23818 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23819 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23820 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23821 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23822 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23823 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23824 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23825 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23826 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23827 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23828 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23829 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23830 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23831 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23832 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23833 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23834 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23835 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23836 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23837 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23838 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23839 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23840 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23841 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23842 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23843 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23844 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23845 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23846 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23847 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23848 tests/run \
23849 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23850 "}
23851 EOF
23852 cat >> $CONFIG_STATUS <<\EOF
23853 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23854   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23855   case "$ac_file" in
23856   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23857        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23858   *) ac_file_in="${ac_file}.in" ;;
23859   esac
23860
23861   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23862
23863   # Remove last slash and all that follows it.  Not all systems have dirname.
23864   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23865   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23866     # The file is in a subdirectory.
23867     test ! -d "$ac_dir" && mkdir "$ac_dir"
23868     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23869     # A "../" for each directory in $ac_dir_suffix.
23870     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23871   else
23872     ac_dir_suffix= ac_dots=
23873   fi
23874
23875   case "$ac_given_srcdir" in
23876   .)  srcdir=.
23877       if test -z "$ac_dots"; then top_srcdir=.
23878       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23879   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23880   *) # Relative path.
23881     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23882     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23883   esac
23884
23885   case "$ac_given_INSTALL" in
23886   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23887   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23888   esac
23889
23890   echo creating "$ac_file"
23891   rm -f "$ac_file"
23892   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23893   case "$ac_file" in
23894   *[Mm]akefile*) ac_comsub="1i\\
23895 # $configure_input" ;;
23896   *) ac_comsub= ;;
23897   esac
23898
23899   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23900   sed -e "$ac_comsub
23901 s%@configure_input@%$configure_input%g
23902 s%@srcdir@%$srcdir%g
23903 s%@top_srcdir@%$top_srcdir%g
23904 s%@INSTALL@%$INSTALL%g
23905 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23906 fi; done
23907 rm -f conftest.s*
23908
23909 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23910 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23911 #
23912 # ac_d sets the value in "#define NAME VALUE" lines.
23913 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23914 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23915 ac_dC='\3'
23916 ac_dD='%g'
23917 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23918 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23919 ac_uB='\([      ]\)%\1#\2define\3'
23920 ac_uC=' '
23921 ac_uD='\4%g'
23922 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23923 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23924 ac_eB='$%\1#\2define\3'
23925 ac_eC=' '
23926 ac_eD='%g'
23927
23928 if test "${CONFIG_HEADERS+set}" != set; then
23929 EOF
23930 cat >> $CONFIG_STATUS <<EOF
23931   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23932 EOF
23933 cat >> $CONFIG_STATUS <<\EOF
23934 fi
23935 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23936   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23937   case "$ac_file" in
23938   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23939        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23940   *) ac_file_in="${ac_file}.in" ;;
23941   esac
23942
23943   echo creating $ac_file
23944
23945   rm -f conftest.frag conftest.in conftest.out
23946   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23947   cat $ac_file_inputs > conftest.in
23948
23949 EOF
23950
23951 # Transform confdefs.h into a sed script conftest.vals that substitutes
23952 # the proper values into config.h.in to produce config.h.  And first:
23953 # Protect against being on the right side of a sed subst in config.status.
23954 # Protect against being in an unquoted here document in config.status.
23955 rm -f conftest.vals
23956 cat > conftest.hdr <<\EOF
23957 s/[\\&%]/\\&/g
23958 s%[\\$`]%\\&%g
23959 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23960 s%ac_d%ac_u%gp
23961 s%ac_u%ac_e%gp
23962 EOF
23963 sed -n -f conftest.hdr confdefs.h > conftest.vals
23964 rm -f conftest.hdr
23965
23966 # This sed command replaces #undef with comments.  This is necessary, for
23967 # example, in the case of _POSIX_SOURCE, which is predefined and required
23968 # on some systems where configure will not decide to define it.
23969 cat >> conftest.vals <<\EOF
23970 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23971 EOF
23972
23973 # Break up conftest.vals because some shells have a limit on
23974 # the size of here documents, and old seds have small limits too.
23975
23976 rm -f conftest.tail
23977 while :
23978 do
23979   ac_lines=`grep -c . conftest.vals`
23980   # grep -c gives empty output for an empty file on some AIX systems.
23981   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23982   # Write a limited-size here document to conftest.frag.
23983   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23984   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23985   echo 'CEOF
23986   sed -f conftest.frag conftest.in > conftest.out
23987   rm -f conftest.in
23988   mv conftest.out conftest.in
23989 ' >> $CONFIG_STATUS
23990   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23991   rm -f conftest.vals
23992   mv conftest.tail conftest.vals
23993 done
23994 rm -f conftest.vals
23995
23996 cat >> $CONFIG_STATUS <<\EOF
23997   rm -f conftest.frag conftest.h
23998   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23999   cat conftest.in >> conftest.h
24000   rm -f conftest.in
24001   if cmp -s $ac_file conftest.h 2>/dev/null; then
24002     echo "$ac_file is unchanged"
24003     rm -f conftest.h
24004   else
24005     # Remove last slash and all that follows it.  Not all systems have dirname.
24006       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24007       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24008       # The file is in a subdirectory.
24009       test ! -d "$ac_dir" && mkdir "$ac_dir"
24010     fi
24011     rm -f $ac_file
24012     mv conftest.h $ac_file
24013   fi
24014 fi; done
24015
24016 EOF
24017 cat >> $CONFIG_STATUS <<EOF
24018
24019 EOF
24020 cat >> $CONFIG_STATUS <<\EOF
24021
24022 chmod +x tests/run
24023 date > stamp-h
24024 echo Please run \"make depend\" to build dependencies
24025
24026 exit 0
24027 EOF
24028 chmod +x $CONFIG_STATUS
24029 rm -fr confdefs* $ac_clean_files
24030 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24031