]> git.sur5r.net Git - openldap/blob - configure
cleanup copyright according to general guidelines
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.37 2003/12/02 01:20:42 hyc 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-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
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-readline         with readline support [auto]"
50 ac_help="$ac_help
51   --with-threads          with threads [auto]"
52 ac_help="$ac_help
53   --with-tls              with TLS/SSL support [auto]"
54 ac_help="$ac_help
55   --with-yielding-select  with implicitly yielding select [auto]"
56 ac_help="$ac_help
57
58 SLAPD (Standalone LDAP Daemon) Options:"
59 ac_help="$ac_help
60   --enable-slapd          enable building slapd [yes]"
61 ac_help="$ac_help
62     --enable-aci          enable per-object ACIs (experimental) [no]"
63 ac_help="$ac_help
64     --enable-cleartext    enable cleartext passwords [yes]"
65 ac_help="$ac_help
66     --enable-crypt        enable crypt(3) passwords [no]"
67 ac_help="$ac_help
68     --enable-lmpasswd     enable LAN Manager passwords [no]"
69 ac_help="$ac_help
70     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
71 ac_help="$ac_help
72     --enable-modules      enable dynamic module support [no]"
73 ac_help="$ac_help
74     --enable-phonetic     enable phonetic/soundex [no]"
75 ac_help="$ac_help
76     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
77 ac_help="$ac_help
78     --enable-rlookups     enable reverse lookups of client hostnames [no]"
79 ac_help="$ac_help
80     --enable-slp          enable SLPv2 support [no]"
81 ac_help="$ac_help
82     --enable-wrappers     enable tcp wrapper support [no]"
83 ac_help="$ac_help
84     --enable-bdb          enable Berkeley DB backend [yes]"
85 ac_help="$ac_help
86     --with-bdb-module     module type static|dynamic [static]"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend [no]"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type static|dynamic [static]"
91 ac_help="$ac_help
92     --enable-ldap         enable ldap backend [no]"
93 ac_help="$ac_help
94     --with-ldap-module    module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-ldbm         enable ldbm backend [no]"
97 ac_help="$ac_help
98     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
99 ac_help="$ac_help
100     --with-ldbm-module    module type static|dynamic [static]"
101 ac_help="$ac_help
102     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend [no]"
105 ac_help="$ac_help
106     --with-meta-module    module type static|dynamic [static]"
107 ac_help="$ac_help
108     --enable-monitor      enable monitor backend [no]"
109 ac_help="$ac_help
110     --with-monitor-module module type static|dynamic [static]"
111 ac_help="$ac_help
112     --enable-null         enable null backend [no]"
113 ac_help="$ac_help
114     --with-null-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-passwd       enable passwd backend [no]"
117 ac_help="$ac_help
118     --with-passwd-module  module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-perl         enable perl backend [no]"
121 ac_help="$ac_help
122     --with-perl-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-shell        enable shell backend [no]"
125 ac_help="$ac_help
126     --with-shell-module   module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-sql          enable sql backend [no]"
129 ac_help="$ac_help
130     --with-sql-module     module type static|dynamic [static]"
131 ac_help="$ac_help
132
133 SLURPD (Replication Daemon) Options:"
134 ac_help="$ac_help
135   --enable-slurpd         enable building slurpd [auto]"
136 ac_help="$ac_help
137
138 Library Generation & Linking Options"
139 ac_help="$ac_help
140   --enable-static[=PKGS]  build static libraries [default=yes]"
141 ac_help="$ac_help
142   --enable-shared[=PKGS]  build shared libraries [default=yes]"
143 ac_help="$ac_help
144   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
145 ac_help="$ac_help
146   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
147
148 # Find the correct PATH separator.  Usually this is `:', but
149 # DJGPP uses `;' like DOS.
150 if test "X${PATH_SEPARATOR+set}" != Xset; then
151   UNAME=${UNAME-`uname 2>/dev/null`}
152   case X$UNAME in
153     *-DOS) lt_cv_sys_path_separator=';' ;;
154     *)     lt_cv_sys_path_separator=':' ;;
155   esac
156   PATH_SEPARATOR=$lt_cv_sys_path_separator
157 fi
158
159
160 # Check that we are running under the correct shell.
161 SHELL=${CONFIG_SHELL-/bin/sh}
162
163 case X$ECHO in
164 X*--fallback-echo)
165   # Remove one level of quotation (which was required for Make).
166   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
167   ;;
168 esac
169
170 echo=${ECHO-echo}
171 if test "X$1" = X--no-reexec; then
172   # Discard the --no-reexec flag, and continue.
173   shift
174 elif test "X$1" = X--fallback-echo; then
175   # Avoid inline document here, it may be left over
176   :
177 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
178   # Yippee, $echo works!
179   :
180 else
181   # Restart under the correct shell.
182   exec $SHELL "$0" --no-reexec ${1+"$@"}
183 fi
184
185 if test "X$1" = X--fallback-echo; then
186   # used as fallback echo
187   shift
188   cat <<EOF
189
190 EOF
191   exit 0
192 fi
193
194 # The HP-UX ksh and POSIX shell print the target directory to stdout
195 # if CDPATH is set.
196 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
197
198 if test -z "$ECHO"; then
199 if test "X${echo_test_string+set}" != Xset; then
200 # find a string as large as possible, as long as the shell can cope with it
201   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
202     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
203     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
204        echo_test_string="`eval $cmd`" &&
205        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
206     then
207       break
208     fi
209   done
210 fi
211
212 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
213    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
214    test "X$echo_testing_string" = "X$echo_test_string"; then
215   :
216 else
217   # The Solaris, AIX, and Digital Unix default echo programs unquote
218   # backslashes.  This makes it impossible to quote backslashes using
219   #   echo "$something" | sed 's/\\/\\\\/g'
220   #
221   # So, first we look for a working echo in the user's PATH.
222
223   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
224   for dir in $PATH /usr/ucb; do
225     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
226        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
227        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
228        test "X$echo_testing_string" = "X$echo_test_string"; then
229       echo="$dir/echo"
230       break
231     fi
232   done
233   IFS="$save_ifs"
234
235   if test "X$echo" = Xecho; then
236     # We didn't find a better echo, so look for alternatives.
237     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
238        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
239        test "X$echo_testing_string" = "X$echo_test_string"; then
240       # This shell has a builtin print -r that does the trick.
241       echo='print -r'
242     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
243          test "X$CONFIG_SHELL" != X/bin/ksh; then
244       # If we have ksh, try running configure again with it.
245       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
246       export ORIGINAL_CONFIG_SHELL
247       CONFIG_SHELL=/bin/ksh
248       export CONFIG_SHELL
249       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
250     else
251       # Try using printf.
252       echo='printf %s\n'
253       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
254          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
255          test "X$echo_testing_string" = "X$echo_test_string"; then
256         # Cool, printf works
257         :
258       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
259            test "X$echo_testing_string" = 'X\t' &&
260            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
261            test "X$echo_testing_string" = "X$echo_test_string"; then
262         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
263         export CONFIG_SHELL
264         SHELL="$CONFIG_SHELL"
265         export SHELL
266         echo="$CONFIG_SHELL $0 --fallback-echo"
267       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
268            test "X$echo_testing_string" = 'X\t' &&
269            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
270            test "X$echo_testing_string" = "X$echo_test_string"; then
271         echo="$CONFIG_SHELL $0 --fallback-echo"
272       else
273         # maybe with a smaller string...
274         prev=:
275
276         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
277           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
278           then
279             break
280           fi
281           prev="$cmd"
282         done
283
284         if test "$prev" != 'sed 50q "$0"'; then
285           echo_test_string=`eval $prev`
286           export echo_test_string
287           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
288         else
289           # Oops.  We lost completely, so just stick with echo.
290           echo=echo
291         fi
292       fi
293     fi
294   fi
295 fi
296 fi
297
298 # Copy echo and quote the copy suitably for passing to libtool from
299 # the Makefile, instead of quoting the original, which is used later.
300 ECHO=$echo
301 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
302    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
303 fi
304
305
306 ac_help="$ac_help
307   --disable-libtool-lock  avoid locking (might break parallel builds)"
308 ac_help="$ac_help
309   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
310 ac_help="$ac_help
311
312 See INSTALL file for further details."
313
314 # Initialize some variables set by options.
315 # The variables have the same names as the options, with
316 # dashes changed to underlines.
317 build=NONE
318 cache_file=./config.cache
319 exec_prefix=NONE
320 host=NONE
321 no_create=
322 nonopt=NONE
323 no_recursion=
324 prefix=NONE
325 program_prefix=NONE
326 program_suffix=NONE
327 program_transform_name=s,x,x,
328 silent=
329 site=
330 srcdir=
331 target=NONE
332 verbose=
333 x_includes=NONE
334 x_libraries=NONE
335 bindir='${exec_prefix}/bin'
336 sbindir='${exec_prefix}/sbin'
337 libexecdir='${exec_prefix}/libexec'
338 datadir='${prefix}/share'
339 sysconfdir='${prefix}/etc'
340 sharedstatedir='${prefix}/com'
341 localstatedir='${prefix}/var'
342 libdir='${exec_prefix}/lib'
343 includedir='${prefix}/include'
344 oldincludedir='/usr/include'
345 infodir='${prefix}/info'
346 mandir='${prefix}/man'
347
348 # Initialize some other variables.
349 subdirs=
350 MFLAGS= MAKEFLAGS=
351 SHELL=${CONFIG_SHELL-/bin/sh}
352 # Maximum number of lines to put in a shell here document.
353 ac_max_here_lines=12
354
355 ac_prev=
356 for ac_option
357 do
358
359   # If the previous option needs an argument, assign it.
360   if test -n "$ac_prev"; then
361     eval "$ac_prev=\$ac_option"
362     ac_prev=
363     continue
364   fi
365
366   case "$ac_option" in
367   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
368   *) ac_optarg= ;;
369   esac
370
371   # Accept the important Cygnus configure options, so we can diagnose typos.
372
373   case "$ac_option" in
374
375   -bindir | --bindir | --bindi | --bind | --bin | --bi)
376     ac_prev=bindir ;;
377   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
378     bindir="$ac_optarg" ;;
379
380   -build | --build | --buil | --bui | --bu)
381     ac_prev=build ;;
382   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
383     build="$ac_optarg" ;;
384
385   -cache-file | --cache-file | --cache-fil | --cache-fi \
386   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
387     ac_prev=cache_file ;;
388   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
389   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
390     cache_file="$ac_optarg" ;;
391
392   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393     ac_prev=datadir ;;
394   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395   | --da=*)
396     datadir="$ac_optarg" ;;
397
398   -disable-* | --disable-*)
399     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
400     # Reject names that are not valid shell variable names.
401     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
402       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
403     fi
404     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
405     eval "enable_${ac_feature}=no" ;;
406
407   -enable-* | --enable-*)
408     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
409     # Reject names that are not valid shell variable names.
410     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
411       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
412     fi
413     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
414     case "$ac_option" in
415       *=*) ;;
416       *) ac_optarg=yes ;;
417     esac
418     eval "enable_${ac_feature}='$ac_optarg'" ;;
419
420   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422   | --exec | --exe | --ex)
423     ac_prev=exec_prefix ;;
424   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426   | --exec=* | --exe=* | --ex=*)
427     exec_prefix="$ac_optarg" ;;
428
429   -gas | --gas | --ga | --g)
430     # Obsolete; use --with-gas.
431     with_gas=yes ;;
432
433   -help | --help | --hel | --he)
434     # Omit some internal or obsolete options to make the list less imposing.
435     # This message is too long to be a string in the A/UX 3.1 sh.
436     cat << EOF
437 Usage: configure [options] [host]
438 Options: [defaults in brackets after descriptions]
439 Configuration:
440   --cache-file=FILE       cache test results in FILE
441   --help                  print this message
442   --no-create             do not create output files
443   --quiet, --silent       do not print \`checking...' messages
444   --version               print the version of autoconf that created configure
445 Directory and file names:
446   --prefix=PREFIX         install architecture-independent files in PREFIX
447                           [$ac_default_prefix]
448   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
449                           [same as prefix]
450   --bindir=DIR            user executables in DIR [EPREFIX/bin]
451   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
452   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
453   --datadir=DIR           read-only architecture-independent data in DIR
454                           [PREFIX/share]
455   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
456   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
457                           [PREFIX/com]
458   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
459   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
460   --includedir=DIR        C header files in DIR [PREFIX/include]
461   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
462   --infodir=DIR           info documentation in DIR [PREFIX/info]
463   --mandir=DIR            man documentation in DIR [PREFIX/man]
464   --srcdir=DIR            find the sources in DIR [configure dir or ..]
465   --program-prefix=PREFIX prepend PREFIX to installed program names
466   --program-suffix=SUFFIX append SUFFIX to installed program names
467   --program-transform-name=PROGRAM
468                           run sed PROGRAM on installed program names
469 EOF
470     cat << EOF
471 Host type:
472   --build=BUILD           configure for building on BUILD [BUILD=HOST]
473   --host=HOST             configure for HOST [guessed]
474   --target=TARGET         configure for TARGET [TARGET=HOST]
475 Features and packages:
476   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
477   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
478   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
479   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
480   --x-includes=DIR        X include files are in DIR
481   --x-libraries=DIR       X library files are in DIR
482 EOF
483     if test -n "$ac_help"; then
484       echo "--enable and --with options recognized:$ac_help"
485     fi
486     exit 0 ;;
487
488   -host | --host | --hos | --ho)
489     ac_prev=host ;;
490   -host=* | --host=* | --hos=* | --ho=*)
491     host="$ac_optarg" ;;
492
493   -includedir | --includedir | --includedi | --included | --include \
494   | --includ | --inclu | --incl | --inc)
495     ac_prev=includedir ;;
496   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
497   | --includ=* | --inclu=* | --incl=* | --inc=*)
498     includedir="$ac_optarg" ;;
499
500   -infodir | --infodir | --infodi | --infod | --info | --inf)
501     ac_prev=infodir ;;
502   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503     infodir="$ac_optarg" ;;
504
505   -libdir | --libdir | --libdi | --libd)
506     ac_prev=libdir ;;
507   -libdir=* | --libdir=* | --libdi=* | --libd=*)
508     libdir="$ac_optarg" ;;
509
510   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
511   | --libexe | --libex | --libe)
512     ac_prev=libexecdir ;;
513   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
514   | --libexe=* | --libex=* | --libe=*)
515     libexecdir="$ac_optarg" ;;
516
517   -localstatedir | --localstatedir | --localstatedi | --localstated \
518   | --localstate | --localstat | --localsta | --localst \
519   | --locals | --local | --loca | --loc | --lo)
520     ac_prev=localstatedir ;;
521   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
522   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
523   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
524     localstatedir="$ac_optarg" ;;
525
526   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
527     ac_prev=mandir ;;
528   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
529     mandir="$ac_optarg" ;;
530
531   -nfp | --nfp | --nf)
532     # Obsolete; use --without-fp.
533     with_fp=no ;;
534
535   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
536   | --no-cr | --no-c)
537     no_create=yes ;;
538
539   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
540   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
541     no_recursion=yes ;;
542
543   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
544   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
545   | --oldin | --oldi | --old | --ol | --o)
546     ac_prev=oldincludedir ;;
547   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
548   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
549   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
550     oldincludedir="$ac_optarg" ;;
551
552   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
553     ac_prev=prefix ;;
554   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
555     prefix="$ac_optarg" ;;
556
557   -program-prefix | --program-prefix | --program-prefi | --program-pref \
558   | --program-pre | --program-pr | --program-p)
559     ac_prev=program_prefix ;;
560   -program-prefix=* | --program-prefix=* | --program-prefi=* \
561   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
562     program_prefix="$ac_optarg" ;;
563
564   -program-suffix | --program-suffix | --program-suffi | --program-suff \
565   | --program-suf | --program-su | --program-s)
566     ac_prev=program_suffix ;;
567   -program-suffix=* | --program-suffix=* | --program-suffi=* \
568   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
569     program_suffix="$ac_optarg" ;;
570
571   -program-transform-name | --program-transform-name \
572   | --program-transform-nam | --program-transform-na \
573   | --program-transform-n | --program-transform- \
574   | --program-transform | --program-transfor \
575   | --program-transfo | --program-transf \
576   | --program-trans | --program-tran \
577   | --progr-tra | --program-tr | --program-t)
578     ac_prev=program_transform_name ;;
579   -program-transform-name=* | --program-transform-name=* \
580   | --program-transform-nam=* | --program-transform-na=* \
581   | --program-transform-n=* | --program-transform-=* \
582   | --program-transform=* | --program-transfor=* \
583   | --program-transfo=* | --program-transf=* \
584   | --program-trans=* | --program-tran=* \
585   | --progr-tra=* | --program-tr=* | --program-t=*)
586     program_transform_name="$ac_optarg" ;;
587
588   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
589   | -silent | --silent | --silen | --sile | --sil)
590     silent=yes ;;
591
592   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
593     ac_prev=sbindir ;;
594   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
595   | --sbi=* | --sb=*)
596     sbindir="$ac_optarg" ;;
597
598   -sharedstatedir | --sharedstatedir | --sharedstatedi \
599   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
600   | --sharedst | --shareds | --shared | --share | --shar \
601   | --sha | --sh)
602     ac_prev=sharedstatedir ;;
603   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
604   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
605   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
606   | --sha=* | --sh=*)
607     sharedstatedir="$ac_optarg" ;;
608
609   -site | --site | --sit)
610     ac_prev=site ;;
611   -site=* | --site=* | --sit=*)
612     site="$ac_optarg" ;;
613
614   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
615     ac_prev=srcdir ;;
616   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
617     srcdir="$ac_optarg" ;;
618
619   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
620   | --syscon | --sysco | --sysc | --sys | --sy)
621     ac_prev=sysconfdir ;;
622   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
623   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
624     sysconfdir="$ac_optarg" ;;
625
626   -target | --target | --targe | --targ | --tar | --ta | --t)
627     ac_prev=target ;;
628   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
629     target="$ac_optarg" ;;
630
631   -v | -verbose | --verbose | --verbos | --verbo | --verb)
632     verbose=yes ;;
633
634   -version | --version | --versio | --versi | --vers)
635     echo "configure generated by autoconf version 2.13.1"
636     exit 0 ;;
637
638   -with-* | --with-*)
639     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
640     # Reject names that are not valid shell variable names.
641     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
642       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
643     fi
644     ac_package=`echo $ac_package| sed 's/-/_/g'`
645     case "$ac_option" in
646       *=*) ;;
647       *) ac_optarg=yes ;;
648     esac
649     eval "with_${ac_package}='$ac_optarg'" ;;
650
651   -without-* | --without-*)
652     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
653     # Reject names that are not valid shell variable names.
654     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
655       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
656     fi
657     ac_package=`echo $ac_package| sed 's/-/_/g'`
658     eval "with_${ac_package}=no" ;;
659
660   --x)
661     # Obsolete; use --with-x.
662     with_x=yes ;;
663
664   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
665   | --x-incl | --x-inc | --x-in | --x-i)
666     ac_prev=x_includes ;;
667   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
668   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
669     x_includes="$ac_optarg" ;;
670
671   -x-libraries | --x-libraries | --x-librarie | --x-librari \
672   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
673     ac_prev=x_libraries ;;
674   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
675   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
676     x_libraries="$ac_optarg" ;;
677
678   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
679     ;;
680
681   *)
682     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
683       echo "configure: warning: $ac_option: invalid host type" 1>&2
684     fi
685     if test "x$nonopt" != xNONE; then
686       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
687     fi
688     nonopt="$ac_option"
689     ;;
690
691   esac
692 done
693
694 if test -n "$ac_prev"; then
695   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
696 fi
697
698 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
699
700 # File descriptor usage:
701 # 0 standard input
702 # 1 file creation
703 # 2 errors and warnings
704 # 3 some systems may open it to /dev/tty
705 # 4 used on the Kubota Titan
706 # 6 checking for... messages and results
707 # 5 compiler messages saved in config.log
708 if test "$silent" = yes; then
709   exec 6>/dev/null
710 else
711   exec 6>&1
712 fi
713 exec 5>./config.log
714
715 echo "\
716 This file contains any messages produced by compilers while
717 running configure, to aid debugging if configure makes a mistake.
718 " 1>&5
719
720 # Strip out --no-create and --no-recursion so they do not pile up.
721 # Also quote any args containing shell metacharacters.
722 ac_configure_args=
723 for ac_arg
724 do
725   case "$ac_arg" in
726   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
727   | --no-cr | --no-c) ;;
728   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
729   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
730   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
731   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
732   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
733   esac
734 done
735
736 # NLS nuisances.
737 # Only set these to C if already set.  These must not be set unconditionally
738 # because not all systems understand e.g. LANG=C (notably SCO).
739 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
740 # Non-C LC_CTYPE values break the ctype check.
741 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
742 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
743 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
744 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
745
746 # confdefs.h avoids OS command line length limits that DEFS can exceed.
747 rm -rf conftest* confdefs.h
748 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
749 echo > confdefs.h
750
751 # A filename unique to this package, relative to the directory that
752 # configure is in, which we can look for to find out if srcdir is correct.
753 ac_unique_file=build/version.sh
754
755 # Find the source files, if location was not specified.
756 if test -z "$srcdir"; then
757   ac_srcdir_defaulted=yes
758   # Try the directory containing this script, then its parent.
759   ac_prog=$0
760   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
761   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
762   srcdir=$ac_confdir
763   if test ! -r $srcdir/$ac_unique_file; then
764     srcdir=..
765   fi
766 else
767   ac_srcdir_defaulted=no
768 fi
769 if test ! -r $srcdir/$ac_unique_file; then
770   if test "$ac_srcdir_defaulted" = yes; then
771     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
772   else
773     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
774   fi
775 fi
776 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
777
778 # Prefer explicitly selected file to automatically selected ones.
779 if test -z "$CONFIG_SITE"; then
780   if test "x$prefix" != xNONE; then
781     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
782   else
783     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
784   fi
785 fi
786 for ac_site_file in $CONFIG_SITE; do
787   if test -r "$ac_site_file"; then
788     echo "loading site script $ac_site_file"
789     . "$ac_site_file"
790   fi
791 done
792
793
794 ac_ext=c
795 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
796 ac_cpp='$CPP $CPPFLAGS'
797 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
798 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
799 cross_compiling=$ac_cv_prog_cc_cross
800
801 ac_exeext=
802 ac_objext=o
803 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
804   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
805   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
806     ac_n= ac_c='
807 ' ac_t='        '
808   else
809     ac_n=-n ac_c= ac_t=
810   fi
811 else
812   ac_n= ac_c='\c' ac_t=
813 fi
814
815
816 # set unset (borrowed from autoconf 2.49c)
817 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
818   ol_unset=unset
819 else
820   ol_unset=false
821 fi
822 # unset CDPATH
823 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
824
825 ac_aux_dir=
826 for ac_dir in build $srcdir/build; do
827   if test -f $ac_dir/install-sh; then
828     ac_aux_dir=$ac_dir
829     ac_install_sh="$ac_aux_dir/install-sh -c"
830     break
831   elif test -f $ac_dir/install.sh; then
832     ac_aux_dir=$ac_dir
833     ac_install_sh="$ac_aux_dir/install.sh -c"
834     break
835   elif test -f $ac_dir/shtool; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/shtool install -c"
838     break
839   fi
840 done
841 if test -z "$ac_aux_dir"; then
842   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
843 fi
844 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
845 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
846 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
847
848 eval `$ac_aux_dir/version.sh`
849 if test -z "$OL_STRING"; then
850         { echo "configure: error: could not determine version" 1>&2; exit 1; }
851 fi
852
853 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
854         ac_cv_shtool="$ac_aux_dir/shtool"
855 else
856         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
857 fi
858
859 SHTOOL="$ac_cv_shtool"
860
861 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
862 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
863
864 OPENLDAP_CVS=""
865 if test -d $ac_aux_dir/CVS; then
866         OPENLDAP_CVS="(from CVS sources) "
867 fi
868
869 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
870
871
872 echo $ac_n "checking host system type""... $ac_c" 1>&6
873 echo "configure:874: checking host system type" >&5
874 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
875
876 # Make sure we can run config.sub.
877   if $ac_config_sub sun4 >/dev/null 2>&1; then :
878     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
879   fi
880
881   ac_cv_host_alias=$host
882   case "$ac_cv_host_alias" in
883   NONE)
884     case $nonopt in
885     NONE)
886       if ac_cv_host_alias=`$ac_config_guess`; then :
887       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
888       fi ;;
889     *) ac_cv_host_alias=$nonopt ;;
890     esac ;;
891   esac
892
893   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
894   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
895   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
896   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
897 else
898   echo $ac_n "(cached) $ac_c" 1>&6
899 fi
900
901 echo "$ac_t""$ac_cv_host" 1>&6
902
903 host=$ac_cv_host
904 host_alias=$ac_cv_host_alias
905 host_cpu=$ac_cv_host_cpu
906 host_vendor=$ac_cv_host_vendor
907 host_os=$ac_cv_host_os
908
909
910
911
912
913 echo $ac_n "checking target system type""... $ac_c" 1>&6
914 echo "configure:915: checking target system type" >&5
915 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
916
917 # Make sure we can run config.sub.
918   if $ac_config_sub sun4 >/dev/null 2>&1; then :
919     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
920   fi
921
922   ac_cv_target_alias=$target
923   case "$ac_cv_target_alias" in
924   NONE)
925     case $nonopt in
926     NONE)
927       ac_cv_target_alias=$host_alias ;;
928
929     *) ac_cv_target_alias=$nonopt ;;
930     esac ;;
931   esac
932
933   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
934   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
935   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
936   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
937 else
938   echo $ac_n "(cached) $ac_c" 1>&6
939 fi
940
941 echo "$ac_t""$ac_cv_target" 1>&6
942
943 target=$ac_cv_target
944 target_alias=$ac_cv_target_alias
945 target_cpu=$ac_cv_target_cpu
946 target_vendor=$ac_cv_target_vendor
947 target_os=$ac_cv_target_os
948
949
950
951
952
953 echo $ac_n "checking build system type""... $ac_c" 1>&6
954 echo "configure:955: checking build system type" >&5
955 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
956
957 # Make sure we can run config.sub.
958   if $ac_config_sub sun4 >/dev/null 2>&1; then :
959     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
960   fi
961
962   ac_cv_build_alias=$build
963   case "$ac_cv_build_alias" in
964   NONE)
965     case $nonopt in
966     NONE)
967       ac_cv_build_alias=$host_alias ;;
968
969     *) ac_cv_build_alias=$nonopt ;;
970     esac ;;
971   esac
972
973   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
974   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
975   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
976   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
977 else
978   echo $ac_n "(cached) $ac_c" 1>&6
979 fi
980
981 echo "$ac_t""$ac_cv_build" 1>&6
982
983 build=$ac_cv_build
984 build_alias=$ac_cv_build_alias
985 build_cpu=$ac_cv_build_cpu
986 build_vendor=$ac_cv_build_vendor
987 build_os=$ac_cv_build_os
988
989
990
991
992
993 # Do some error checking and defaulting for the host and target type.
994 # The inputs are:
995 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
996 #
997 # The rules are:
998 # 1. You are not allowed to specify --host, --target, and nonopt at the
999 #    same time.
1000 # 2. Host defaults to nonopt.
1001 # 3. If nonopt is not specified, then host defaults to the current host,
1002 #    as determined by config.guess.
1003 # 4. Target and build default to nonopt.
1004 # 5. If nonopt is not specified, then target and build default to host.
1005
1006 # The aliases save the names the user supplied, while $host etc.
1007 # will get canonicalized.
1008 case $host---$target---$nonopt in
1009 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1010 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1011 esac
1012
1013 test "$host_alias" != "$target_alias" &&
1014   test "$program_prefix$program_suffix$program_transform_name" = \
1015     NONENONEs,x,x, &&
1016   program_prefix=${target_alias}-
1017
1018
1019 # Find a good install program.  We prefer a C program (faster),
1020 # so one script is as good as another.  But avoid the broken or
1021 # incompatible versions:
1022 # SysV /etc/install, /usr/sbin/install
1023 # SunOS /usr/etc/install
1024 # IRIX /sbin/install
1025 # AIX /bin/install
1026 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1027 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1028 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1029 # ./install, which can be erroneously created by make from ./install.sh.
1030 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1031 echo "configure:1032: checking for a BSD compatible install" >&5
1032 if test -z "$INSTALL"; then
1033 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1034   echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1037   for ac_dir in $PATH; do
1038     # Account for people who put trailing slashes in PATH elements.
1039     case "$ac_dir/" in
1040     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1041     *)
1042       # OSF1 and SCO ODT 3.0 have their own names for install.
1043       # Don't use installbsd from OSF since it installs stuff as root
1044       # by default.
1045       for ac_prog in ginstall scoinst install; do
1046         if test -f $ac_dir/$ac_prog; then
1047           if test $ac_prog = install &&
1048             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1049             # AIX install.  It has an incompatible calling convention.
1050             :
1051           elif test $ac_prog = install &&
1052             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1053             # program-specific install script used by HP pwplus--don't use.
1054             :
1055           else
1056             ac_cv_path_install="$ac_dir/$ac_prog -c"
1057             break 2
1058           fi
1059         fi
1060       done
1061       ;;
1062     esac
1063   done
1064   IFS="$ac_save_IFS"
1065
1066 fi
1067   if test "${ac_cv_path_install+set}" = set; then
1068     INSTALL="$ac_cv_path_install"
1069   else
1070     # As a last resort, use the slow shell script.  We don't cache a
1071     # path for INSTALL within a source directory, because that will
1072     # break other packages using the cache if that directory is
1073     # removed, or if the path is relative.
1074     INSTALL="$ac_install_sh"
1075   fi
1076 fi
1077 echo "$ac_t""$INSTALL" 1>&6
1078
1079 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1080 # It thinks the first close brace ends the variable substitution.
1081 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1082
1083 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1084
1085 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1086
1087 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1088 echo "configure:1089: checking whether build environment is sane" >&5
1089 # Just in case
1090 sleep 1
1091 echo timestamp > conftestfile
1092 # Do `set' in a subshell so we don't clobber the current shell's
1093 # arguments.  Must try -L first in case configure is actually a
1094 # symlink; some systems play weird games with the mod time of symlinks
1095 # (eg FreeBSD returns the mod time of the symlink's containing
1096 # directory).
1097 if (
1098    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1099    if test "$*" = "X"; then
1100       # -L didn't work.
1101       set X `ls -t $srcdir/configure conftestfile`
1102    fi
1103    if test "$*" != "X $srcdir/configure conftestfile" \
1104       && test "$*" != "X conftestfile $srcdir/configure"; then
1105
1106       # If neither matched, then we have a broken ls.  This can happen
1107       # if, for instance, CONFIG_SHELL is bash and it inherits a
1108       # broken ls alias from the environment.  This has actually
1109       # happened.  Such a system could not be considered "sane".
1110       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1111 alias in your environment" 1>&2; exit 1; }
1112    fi
1113
1114    test "$2" = conftestfile
1115    )
1116 then
1117    # Ok.
1118    :
1119 else
1120    { echo "configure: error: newly created file is older than distributed files!
1121 Check your system clock" 1>&2; exit 1; }
1122 fi
1123 rm -f conftest*
1124 echo "$ac_t""yes" 1>&6
1125 if test "$program_transform_name" = s,x,x,; then
1126   program_transform_name=
1127 else
1128   # Double any \ or $.  echo might interpret backslashes.
1129   cat <<\EOF_SED > conftestsed
1130 s,\\,\\\\,g; s,\$,$$,g
1131 EOF_SED
1132   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1133   rm -f conftestsed
1134 fi
1135 test "$program_prefix" != NONE &&
1136   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1137 # Use a double $ so make ignores it.
1138 test "$program_suffix" != NONE &&
1139   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1140
1141 # sed with no file args requires a program.
1142 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1143
1144 for ac_prog in mawk gawk nawk awk
1145 do
1146 # Extract the first word of "$ac_prog", so it can be a program name with args.
1147 set dummy $ac_prog; ac_word=$2
1148 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1149 echo "configure:1150: checking for $ac_word" >&5
1150 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   if test -n "$AWK"; then
1154   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1155 else
1156   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1157   ac_dummy="$PATH"
1158   for ac_dir in $ac_dummy; do
1159     test -z "$ac_dir" && ac_dir=.
1160     if test -f $ac_dir/$ac_word; then
1161       ac_cv_prog_AWK="$ac_prog"
1162       break
1163     fi
1164   done
1165   IFS="$ac_save_ifs"
1166 fi
1167 fi
1168 AWK="$ac_cv_prog_AWK"
1169 if test -n "$AWK"; then
1170   echo "$ac_t""$AWK" 1>&6
1171 else
1172   echo "$ac_t""no" 1>&6
1173 fi
1174
1175 test -n "$AWK" && break
1176 done
1177
1178 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1179 echo "configure:1180: checking whether ${MAKE-make} sets \${MAKE}" >&5
1180 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1181 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1182   echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184   cat > conftestmake <<\EOF
1185 all:
1186         @echo 'ac_maketemp="${MAKE}"'
1187 EOF
1188 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1189 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1190 if test -n "$ac_maketemp"; then
1191   eval ac_cv_prog_make_${ac_make}_set=yes
1192 else
1193   eval ac_cv_prog_make_${ac_make}_set=no
1194 fi
1195 rm -f conftestmake
1196 fi
1197 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1198   echo "$ac_t""yes" 1>&6
1199   SET_MAKE=
1200 else
1201   echo "$ac_t""no" 1>&6
1202   SET_MAKE="MAKE=${MAKE-make}"
1203 fi
1204
1205
1206
1207 PACKAGE=$OL_PACKAGE
1208
1209 VERSION=$OL_VERSION
1210
1211 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1212   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1213 fi
1214
1215
1216
1217 missing_dir=`cd $ac_aux_dir && pwd`
1218 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1219 echo "configure:1220: checking for working aclocal" >&5
1220 # Run test in a subshell; some versions of sh will print an error if
1221 # an executable is not found, even if stderr is redirected.
1222 # Redirect stdin to placate older versions of autoconf.  Sigh.
1223 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1224    ACLOCAL=aclocal
1225    echo "$ac_t""found" 1>&6
1226 else
1227    ACLOCAL="$missing_dir/missing aclocal"
1228    echo "$ac_t""missing" 1>&6
1229 fi
1230
1231 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1232 echo "configure:1233: checking for working autoconf" >&5
1233 # Run test in a subshell; some versions of sh will print an error if
1234 # an executable is not found, even if stderr is redirected.
1235 # Redirect stdin to placate older versions of autoconf.  Sigh.
1236 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1237    AUTOCONF=autoconf
1238    echo "$ac_t""found" 1>&6
1239 else
1240    AUTOCONF="$missing_dir/missing autoconf"
1241    echo "$ac_t""missing" 1>&6
1242 fi
1243
1244 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1245 echo "configure:1246: checking for working automake" >&5
1246 # Run test in a subshell; some versions of sh will print an error if
1247 # an executable is not found, even if stderr is redirected.
1248 # Redirect stdin to placate older versions of autoconf.  Sigh.
1249 if (automake --version) < /dev/null > /dev/null 2>&1; then
1250    AUTOMAKE=automake
1251    echo "$ac_t""found" 1>&6
1252 else
1253    AUTOMAKE="$missing_dir/missing automake"
1254    echo "$ac_t""missing" 1>&6
1255 fi
1256
1257 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1258 echo "configure:1259: checking for working autoheader" >&5
1259 # Run test in a subshell; some versions of sh will print an error if
1260 # an executable is not found, even if stderr is redirected.
1261 # Redirect stdin to placate older versions of autoconf.  Sigh.
1262 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1263    AUTOHEADER=autoheader
1264    echo "$ac_t""found" 1>&6
1265 else
1266    AUTOHEADER="$missing_dir/missing autoheader"
1267    echo "$ac_t""missing" 1>&6
1268 fi
1269
1270 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1271 echo "configure:1272: checking for working makeinfo" >&5
1272 # Run test in a subshell; some versions of sh will print an error if
1273 # an executable is not found, even if stderr is redirected.
1274 # Redirect stdin to placate older versions of autoconf.  Sigh.
1275 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1276    MAKEINFO=makeinfo
1277    echo "$ac_t""found" 1>&6
1278 else
1279    MAKEINFO="$missing_dir/missing makeinfo"
1280    echo "$ac_t""missing" 1>&6
1281 fi
1282
1283 install_sh="$missing_dir/install-sh"
1284 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1285
1286 for ac_prog in gnutar gtar tar
1287 do
1288 # Extract the first word of "$ac_prog", so it can be a program name with args.
1289 set dummy $ac_prog; ac_word=$2
1290 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1291 echo "configure:1292: checking for $ac_word" >&5
1292 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1293   echo $ac_n "(cached) $ac_c" 1>&6
1294 else
1295   if test -n "$AMTAR"; then
1296   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1297 else
1298   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1299   ac_dummy="$PATH"
1300   for ac_dir in $ac_dummy; do
1301     test -z "$ac_dir" && ac_dir=.
1302     if test -f $ac_dir/$ac_word; then
1303       ac_cv_prog_AMTAR="$ac_prog"
1304       break
1305     fi
1306   done
1307   IFS="$ac_save_ifs"
1308 fi
1309 fi
1310 AMTAR="$ac_cv_prog_AMTAR"
1311 if test -n "$AMTAR"; then
1312   echo "$ac_t""$AMTAR" 1>&6
1313 else
1314   echo "$ac_t""no" 1>&6
1315 fi
1316
1317 test -n "$AMTAR" && break
1318 done
1319
1320
1321 AMTARFLAGS=
1322 if test -n "$AMTAR"; then
1323   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1324         AMTARFLAGS=o
1325   fi
1326 fi
1327
1328 cat >> confdefs.h <<EOF
1329 #define OPENLDAP_PACKAGE "$PACKAGE"
1330 EOF
1331
1332 cat >> confdefs.h <<EOF
1333 #define OPENLDAP_VERSION "$VERSION"
1334 EOF
1335
1336
1337 cat >> confdefs.h <<EOF
1338 #define LDAP_VENDOR_VERSION $OL_API_INC
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1343 EOF
1344
1345 cat >> confdefs.h <<EOF
1346 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1351 EOF
1352
1353
1354 OPENLDAP_LIBVERSION=$OL_API_LIB
1355
1356 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1357
1358
1359
1360 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1361 echo "configure:1362: checking configure arguments" >&5
1362
1363
1364 top_builddir=`pwd`
1365
1366 ldap_subdir="/openldap"
1367
1368 # Check whether --with-subdir or --without-subdir was given.
1369 if test "${with_subdir+set}" = set; then
1370   withval="$with_subdir"
1371   case "$withval" in
1372         no) ldap_subdir=""
1373                 ;;
1374         yes)
1375                 ;;
1376         /*|\\*)
1377                 ldap_subdir="$withval"
1378                 ;;
1379         *)
1380                 ldap_subdir="/$withval"
1381                 ;;
1382 esac
1383
1384 fi
1385
1386
1387 # OpenLDAP --enable-debug
1388         # Check whether --enable-debug or --disable-debug was given.
1389 if test "${enable_debug+set}" = set; then
1390   enableval="$enable_debug"
1391   
1392         ol_arg=invalid
1393         for ol_val in auto yes no ; do
1394                 if test "$enableval" = "$ol_val" ; then
1395                         ol_arg="$ol_val"
1396                 fi
1397         done
1398         if test "$ol_arg" = "invalid" ; then
1399                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1400         fi
1401         ol_enable_debug="$ol_arg"
1402
1403 else
1404         ol_enable_debug="yes"
1405 fi
1406 # end --enable-debug
1407 # OpenLDAP --enable-syslog
1408         # Check whether --enable-syslog or --disable-syslog was given.
1409 if test "${enable_syslog+set}" = set; then
1410   enableval="$enable_syslog"
1411   
1412         ol_arg=invalid
1413         for ol_val in auto yes no ; do
1414                 if test "$enableval" = "$ol_val" ; then
1415                         ol_arg="$ol_val"
1416                 fi
1417         done
1418         if test "$ol_arg" = "invalid" ; then
1419                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1420         fi
1421         ol_enable_syslog="$ol_arg"
1422
1423 else
1424         ol_enable_syslog="auto"
1425 fi
1426 # end --enable-syslog
1427 # OpenLDAP --enable-dynamic
1428         # Check whether --enable-dynamic or --disable-dynamic was given.
1429 if test "${enable_dynamic+set}" = set; then
1430   enableval="$enable_dynamic"
1431   
1432         ol_arg=invalid
1433         for ol_val in auto yes no ; do
1434                 if test "$enableval" = "$ol_val" ; then
1435                         ol_arg="$ol_val"
1436                 fi
1437         done
1438         if test "$ol_arg" = "invalid" ; then
1439                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1440         fi
1441         ol_enable_dynamic="$ol_arg"
1442
1443 else
1444         ol_enable_dynamic="no"
1445 fi
1446 # end --enable-dynamic
1447 # OpenLDAP --enable-proctitle
1448         # Check whether --enable-proctitle or --disable-proctitle was given.
1449 if test "${enable_proctitle+set}" = set; then
1450   enableval="$enable_proctitle"
1451   
1452         ol_arg=invalid
1453         for ol_val in auto yes no ; do
1454                 if test "$enableval" = "$ol_val" ; then
1455                         ol_arg="$ol_val"
1456                 fi
1457         done
1458         if test "$ol_arg" = "invalid" ; then
1459                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1460         fi
1461         ol_enable_proctitle="$ol_arg"
1462
1463 else
1464         ol_enable_proctitle="yes"
1465 fi
1466 # end --enable-proctitle
1467 ol_enable_referrals=${ol_enable_referrals-no}
1468 ol_enable_kbind=${ol_enable_kbind-no}
1469 # OpenLDAP --enable-ipv6
1470         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1471 if test "${enable_ipv6+set}" = set; then
1472   enableval="$enable_ipv6"
1473   
1474         ol_arg=invalid
1475         for ol_val in auto yes no ; do
1476                 if test "$enableval" = "$ol_val" ; then
1477                         ol_arg="$ol_val"
1478                 fi
1479         done
1480         if test "$ol_arg" = "invalid" ; then
1481                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1482         fi
1483         ol_enable_ipv6="$ol_arg"
1484
1485 else
1486         ol_enable_ipv6="auto"
1487 fi
1488 # end --enable-ipv6
1489 # OpenLDAP --enable-local
1490         # Check whether --enable-local or --disable-local was given.
1491 if test "${enable_local+set}" = set; then
1492   enableval="$enable_local"
1493   
1494         ol_arg=invalid
1495         for ol_val in auto yes no ; do
1496                 if test "$enableval" = "$ol_val" ; then
1497                         ol_arg="$ol_val"
1498                 fi
1499         done
1500         if test "$ol_arg" = "invalid" ; then
1501                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1502         fi
1503         ol_enable_local="$ol_arg"
1504
1505 else
1506         ol_enable_local="auto"
1507 fi
1508 # end --enable-local
1509 # OpenLDAP --enable-x_compile
1510         # Check whether --enable-x_compile or --disable-x_compile was given.
1511 if test "${enable_x_compile+set}" = set; then
1512   enableval="$enable_x_compile"
1513   
1514         ol_arg=invalid
1515         for ol_val in yes no ; do
1516                 if test "$enableval" = "$ol_val" ; then
1517                         ol_arg="$ol_val"
1518                 fi
1519         done
1520         if test "$ol_arg" = "invalid" ; then
1521                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1522         fi
1523         ol_enable_x_compile="$ol_arg"
1524
1525 else
1526         ol_enable_x_compile="no"
1527 fi
1528 # end --enable-x_compile
1529
1530
1531 # OpenLDAP --with-cyrus_sasl
1532         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1533 if test "${with_cyrus_sasl+set}" = set; then
1534   withval="$with_cyrus_sasl"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto yes no  ; do
1538                 if test "$withval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1544         fi
1545         ol_with_cyrus_sasl="$ol_arg"
1546
1547 else
1548         ol_with_cyrus_sasl="auto"
1549 fi
1550 # end --with-cyrus_sasl
1551
1552 # OpenLDAP --with-fetch
1553         # Check whether --with-fetch or --without-fetch was given.
1554 if test "${with_fetch+set}" = set; then
1555   withval="$with_fetch"
1556   
1557         ol_arg=invalid
1558         for ol_val in auto yes no  ; do
1559                 if test "$withval" = "$ol_val" ; then
1560                         ol_arg="$ol_val"
1561                 fi
1562         done
1563         if test "$ol_arg" = "invalid" ; then
1564                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1565         fi
1566         ol_with_fetch="$ol_arg"
1567
1568 else
1569         ol_with_fetch="auto"
1570 fi
1571 # end --with-fetch
1572
1573 ol_with_kerberos=${ol_with_kerberos-auto}
1574 # OpenLDAP --with-readline
1575         # Check whether --with-readline or --without-readline was given.
1576 if test "${with_readline+set}" = set; then
1577   withval="$with_readline"
1578   
1579         ol_arg=invalid
1580         for ol_val in auto yes no  ; do
1581                 if test "$withval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1587         fi
1588         ol_with_readline="$ol_arg"
1589
1590 else
1591         ol_with_readline="auto"
1592 fi
1593 # end --with-readline
1594
1595 # OpenLDAP --with-threads
1596         # Check whether --with-threads or --without-threads was given.
1597 if test "${with_threads+set}" = set; then
1598   withval="$with_threads"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1602                 if test "$withval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1608         fi
1609         ol_with_threads="$ol_arg"
1610
1611 else
1612         ol_with_threads="auto"
1613 fi
1614 # end --with-threads
1615
1616 # OpenLDAP --with-tls
1617         # Check whether --with-tls or --without-tls was given.
1618 if test "${with_tls+set}" = set; then
1619   withval="$with_tls"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto ssleay openssl yes no  ; do
1623                 if test "$withval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1629         fi
1630         ol_with_tls="$ol_arg"
1631
1632 else
1633         ol_with_tls="auto"
1634 fi
1635 # end --with-tls
1636
1637 # OpenLDAP --with-yielding_select
1638         # Check whether --with-yielding_select or --without-yielding_select was given.
1639 if test "${with_yielding_select+set}" = set; then
1640   withval="$with_yielding_select"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto yes no manual  ; do
1644                 if test "$withval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1650         fi
1651         ol_with_yielding_select="$ol_arg"
1652
1653 else
1654         ol_with_yielding_select="auto"
1655 fi
1656 # end --with-yielding_select
1657
1658
1659
1660 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1661 if test "${with_xxslapdoptions+set}" = set; then
1662   withval="$with_xxslapdoptions"
1663   :
1664 fi
1665
1666 # OpenLDAP --enable-slapd
1667         # Check whether --enable-slapd or --disable-slapd was given.
1668 if test "${enable_slapd+set}" = set; then
1669   enableval="$enable_slapd"
1670   
1671         ol_arg=invalid
1672         for ol_val in auto yes no ; do
1673                 if test "$enableval" = "$ol_val" ; then
1674                         ol_arg="$ol_val"
1675                 fi
1676         done
1677         if test "$ol_arg" = "invalid" ; then
1678                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1679         fi
1680         ol_enable_slapd="$ol_arg"
1681
1682 else
1683         ol_enable_slapd="yes"
1684 fi
1685 # end --enable-slapd
1686 # OpenLDAP --enable-aci
1687         # Check whether --enable-aci or --disable-aci was given.
1688 if test "${enable_aci+set}" = set; then
1689   enableval="$enable_aci"
1690   
1691         ol_arg=invalid
1692         for ol_val in auto yes no ; do
1693                 if test "$enableval" = "$ol_val" ; then
1694                         ol_arg="$ol_val"
1695                 fi
1696         done
1697         if test "$ol_arg" = "invalid" ; then
1698                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1699         fi
1700         ol_enable_aci="$ol_arg"
1701
1702 else
1703         ol_enable_aci="no"
1704 fi
1705 # end --enable-aci
1706 # OpenLDAP --enable-cleartext
1707         # Check whether --enable-cleartext or --disable-cleartext was given.
1708 if test "${enable_cleartext+set}" = set; then
1709   enableval="$enable_cleartext"
1710   
1711         ol_arg=invalid
1712         for ol_val in auto yes no ; do
1713                 if test "$enableval" = "$ol_val" ; then
1714                         ol_arg="$ol_val"
1715                 fi
1716         done
1717         if test "$ol_arg" = "invalid" ; then
1718                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1719         fi
1720         ol_enable_cleartext="$ol_arg"
1721
1722 else
1723         ol_enable_cleartext="yes"
1724 fi
1725 # end --enable-cleartext
1726 # OpenLDAP --enable-crypt
1727         # Check whether --enable-crypt or --disable-crypt was given.
1728 if test "${enable_crypt+set}" = set; then
1729   enableval="$enable_crypt"
1730   
1731         ol_arg=invalid
1732         for ol_val in auto yes no ; do
1733                 if test "$enableval" = "$ol_val" ; then
1734                         ol_arg="$ol_val"
1735                 fi
1736         done
1737         if test "$ol_arg" = "invalid" ; then
1738                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1739         fi
1740         ol_enable_crypt="$ol_arg"
1741
1742 else
1743         ol_enable_crypt="no"
1744 fi
1745 # end --enable-crypt
1746 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1747 # OpenLDAP --enable-lmpasswd
1748         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1749 if test "${enable_lmpasswd+set}" = set; then
1750   enableval="$enable_lmpasswd"
1751   
1752         ol_arg=invalid
1753         for ol_val in auto yes no ; do
1754                 if test "$enableval" = "$ol_val" ; then
1755                         ol_arg="$ol_val"
1756                 fi
1757         done
1758         if test "$ol_arg" = "invalid" ; then
1759                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1760         fi
1761         ol_enable_lmpasswd="$ol_arg"
1762
1763 else
1764         ol_enable_lmpasswd="no"
1765 fi
1766 # end --enable-lmpasswd
1767 # OpenLDAP --enable-spasswd
1768         # Check whether --enable-spasswd or --disable-spasswd was given.
1769 if test "${enable_spasswd+set}" = set; then
1770   enableval="$enable_spasswd"
1771   
1772         ol_arg=invalid
1773         for ol_val in auto yes no ; do
1774                 if test "$enableval" = "$ol_val" ; then
1775                         ol_arg="$ol_val"
1776                 fi
1777         done
1778         if test "$ol_arg" = "invalid" ; then
1779                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1780         fi
1781         ol_enable_spasswd="$ol_arg"
1782
1783 else
1784         ol_enable_spasswd="no"
1785 fi
1786 # end --enable-spasswd
1787 # OpenLDAP --enable-modules
1788         # Check whether --enable-modules or --disable-modules was given.
1789 if test "${enable_modules+set}" = set; then
1790   enableval="$enable_modules"
1791   
1792         ol_arg=invalid
1793         for ol_val in auto yes no ; do
1794                 if test "$enableval" = "$ol_val" ; then
1795                         ol_arg="$ol_val"
1796                 fi
1797         done
1798         if test "$ol_arg" = "invalid" ; then
1799                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1800         fi
1801         ol_enable_modules="$ol_arg"
1802
1803 else
1804         ol_enable_modules="no"
1805 fi
1806 # end --enable-modules
1807 ol_enable_multimaster=${ol_enable_multimaster-no}
1808 # OpenLDAP --enable-phonetic
1809         # Check whether --enable-phonetic or --disable-phonetic was given.
1810 if test "${enable_phonetic+set}" = set; then
1811   enableval="$enable_phonetic"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1821         fi
1822         ol_enable_phonetic="$ol_arg"
1823
1824 else
1825         ol_enable_phonetic="no"
1826 fi
1827 # end --enable-phonetic
1828 # OpenLDAP --enable-rewrite
1829         # Check whether --enable-rewrite or --disable-rewrite was given.
1830 if test "${enable_rewrite+set}" = set; then
1831   enableval="$enable_rewrite"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1841         fi
1842         ol_enable_rewrite="$ol_arg"
1843
1844 else
1845         ol_enable_rewrite="no"
1846 fi
1847 # end --enable-rewrite
1848 # OpenLDAP --enable-rlookups
1849         # Check whether --enable-rlookups or --disable-rlookups was given.
1850 if test "${enable_rlookups+set}" = set; then
1851   enableval="$enable_rlookups"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1861         fi
1862         ol_enable_rlookups="$ol_arg"
1863
1864 else
1865         ol_enable_rlookups="no"
1866 fi
1867 # end --enable-rlookups
1868 # OpenLDAP --enable-slp
1869         # Check whether --enable-slp or --disable-slp was given.
1870 if test "${enable_slp+set}" = set; then
1871   enableval="$enable_slp"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1881         fi
1882         ol_enable_slp="$ol_arg"
1883
1884 else
1885         ol_enable_slp="no"
1886 fi
1887 # end --enable-slp
1888 # OpenLDAP --enable-wrappers
1889         # Check whether --enable-wrappers or --disable-wrappers was given.
1890 if test "${enable_wrappers+set}" = set; then
1891   enableval="$enable_wrappers"
1892   
1893         ol_arg=invalid
1894         for ol_val in auto yes no ; do
1895                 if test "$enableval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1901         fi
1902         ol_enable_wrappers="$ol_arg"
1903
1904 else
1905         ol_enable_wrappers="no"
1906 fi
1907 # end --enable-wrappers
1908
1909 # OpenLDAP --enable-bdb
1910         # Check whether --enable-bdb or --disable-bdb was given.
1911 if test "${enable_bdb+set}" = set; then
1912   enableval="$enable_bdb"
1913   
1914         ol_arg=invalid
1915         for ol_val in auto yes no ; do
1916                 if test "$enableval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1922         fi
1923         ol_enable_bdb="$ol_arg"
1924
1925 else
1926         ol_enable_bdb="yes"
1927 fi
1928 # end --enable-bdb
1929 # OpenLDAP --with-bdb_module
1930         # Check whether --with-bdb_module or --without-bdb_module was given.
1931 if test "${with_bdb_module+set}" = set; then
1932   withval="$with_bdb_module"
1933   
1934         ol_arg=invalid
1935         for ol_val in static dynamic ; do
1936                 if test "$withval" = "$ol_val" ; then
1937                         ol_arg="$ol_val"
1938                 fi
1939         done
1940         if test "$ol_arg" = "invalid" ; then
1941                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1942         fi
1943         ol_with_bdb_module="$ol_arg"
1944
1945 else
1946         ol_with_bdb_module="static"
1947 fi
1948 # end --with-bdb_module
1949
1950 # OpenLDAP --enable-dnssrv
1951         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1952 if test "${enable_dnssrv+set}" = set; then
1953   enableval="$enable_dnssrv"
1954   
1955         ol_arg=invalid
1956         for ol_val in auto yes no ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1963         fi
1964         ol_enable_dnssrv="$ol_arg"
1965
1966 else
1967         ol_enable_dnssrv="no"
1968 fi
1969 # end --enable-dnssrv
1970 # OpenLDAP --with-dnssrv_module
1971         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1972 if test "${with_dnssrv_module+set}" = set; then
1973   withval="$with_dnssrv_module"
1974   
1975         ol_arg=invalid
1976         for ol_val in static dynamic ; do
1977                 if test "$withval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1983         fi
1984         ol_with_dnssrv_module="$ol_arg"
1985
1986 else
1987         ol_with_dnssrv_module="static"
1988 fi
1989 # end --with-dnssrv_module
1990
1991 # OpenLDAP --enable-ldap
1992         # Check whether --enable-ldap or --disable-ldap was given.
1993 if test "${enable_ldap+set}" = set; then
1994   enableval="$enable_ldap"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto yes no ; do
1998                 if test "$enableval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2004         fi
2005         ol_enable_ldap="$ol_arg"
2006
2007 else
2008         ol_enable_ldap="no"
2009 fi
2010 # end --enable-ldap
2011 # OpenLDAP --with-ldap_module
2012         # Check whether --with-ldap_module or --without-ldap_module was given.
2013 if test "${with_ldap_module+set}" = set; then
2014   withval="$with_ldap_module"
2015   
2016         ol_arg=invalid
2017         for ol_val in static dynamic ; do
2018                 if test "$withval" = "$ol_val" ; then
2019                         ol_arg="$ol_val"
2020                 fi
2021         done
2022         if test "$ol_arg" = "invalid" ; then
2023                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2024         fi
2025         ol_with_ldap_module="$ol_arg"
2026
2027 else
2028         ol_with_ldap_module="static"
2029 fi
2030 # end --with-ldap_module
2031
2032 # OpenLDAP --enable-ldbm
2033         # Check whether --enable-ldbm or --disable-ldbm was given.
2034 if test "${enable_ldbm+set}" = set; then
2035   enableval="$enable_ldbm"
2036   
2037         ol_arg=invalid
2038         for ol_val in auto yes no ; do
2039                 if test "$enableval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2045         fi
2046         ol_enable_ldbm="$ol_arg"
2047
2048 else
2049         ol_enable_ldbm="no"
2050 fi
2051 # end --enable-ldbm
2052 # OpenLDAP --with-ldbm_api
2053         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2054 if test "${with_ldbm_api+set}" = set; then
2055   withval="$with_ldbm_api"
2056   
2057         ol_arg=invalid
2058         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2059                 if test "$withval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2065         fi
2066         ol_with_ldbm_api="$ol_arg"
2067
2068 else
2069         ol_with_ldbm_api="auto"
2070 fi
2071 # end --with-ldbm_api
2072
2073 # OpenLDAP --with-ldbm_module
2074         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2075 if test "${with_ldbm_module+set}" = set; then
2076   withval="$with_ldbm_module"
2077   
2078         ol_arg=invalid
2079         for ol_val in static dynamic ; do
2080                 if test "$withval" = "$ol_val" ; then
2081                         ol_arg="$ol_val"
2082                 fi
2083         done
2084         if test "$ol_arg" = "invalid" ; then
2085                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2086         fi
2087         ol_with_ldbm_module="$ol_arg"
2088
2089 else
2090         ol_with_ldbm_module="static"
2091 fi
2092 # end --with-ldbm_module
2093
2094 # OpenLDAP --with-ldbm_type
2095         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2096 if test "${with_ldbm_type+set}" = set; then
2097   withval="$with_ldbm_type"
2098   
2099         ol_arg=invalid
2100         for ol_val in auto btree hash ; do
2101                 if test "$withval" = "$ol_val" ; then
2102                         ol_arg="$ol_val"
2103                 fi
2104         done
2105         if test "$ol_arg" = "invalid" ; then
2106                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2107         fi
2108         ol_with_ldbm_type="$ol_arg"
2109
2110 else
2111         ol_with_ldbm_type="auto"
2112 fi
2113 # end --with-ldbm_type
2114
2115 # OpenLDAP --enable-meta
2116         # Check whether --enable-meta or --disable-meta was given.
2117 if test "${enable_meta+set}" = set; then
2118   enableval="$enable_meta"
2119   
2120         ol_arg=invalid
2121         for ol_val in auto yes no ; do
2122                 if test "$enableval" = "$ol_val" ; then
2123                         ol_arg="$ol_val"
2124                 fi
2125         done
2126         if test "$ol_arg" = "invalid" ; then
2127                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2128         fi
2129         ol_enable_meta="$ol_arg"
2130
2131 else
2132         ol_enable_meta="no"
2133 fi
2134 # end --enable-meta
2135 # OpenLDAP --with-meta_module
2136         # Check whether --with-meta_module or --without-meta_module was given.
2137 if test "${with_meta_module+set}" = set; then
2138   withval="$with_meta_module"
2139   
2140         ol_arg=invalid
2141         for ol_val in static dynamic ; do
2142                 if test "$withval" = "$ol_val" ; then
2143                         ol_arg="$ol_val"
2144                 fi
2145         done
2146         if test "$ol_arg" = "invalid" ; then
2147                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2148         fi
2149         ol_with_meta_module="$ol_arg"
2150
2151 else
2152         ol_with_meta_module="static"
2153 fi
2154 # end --with-meta_module
2155
2156 # OpenLDAP --enable-monitor
2157         # Check whether --enable-monitor or --disable-monitor was given.
2158 if test "${enable_monitor+set}" = set; then
2159   enableval="$enable_monitor"
2160   
2161         ol_arg=invalid
2162         for ol_val in auto yes no ; do
2163                 if test "$enableval" = "$ol_val" ; then
2164                         ol_arg="$ol_val"
2165                 fi
2166         done
2167         if test "$ol_arg" = "invalid" ; then
2168                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2169         fi
2170         ol_enable_monitor="$ol_arg"
2171
2172 else
2173         ol_enable_monitor="no"
2174 fi
2175 # end --enable-monitor
2176 # OpenLDAP --with-monitor_module
2177         # Check whether --with-monitor_module or --without-monitor_module was given.
2178 if test "${with_monitor_module+set}" = set; then
2179   withval="$with_monitor_module"
2180   
2181         ol_arg=invalid
2182         for ol_val in static dynamic ; do
2183                 if test "$withval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2189         fi
2190         ol_with_monitor_module="$ol_arg"
2191
2192 else
2193         ol_with_monitor_module="static"
2194 fi
2195 # end --with-monitor_module
2196
2197 # OpenLDAP --enable-null
2198         # Check whether --enable-null or --disable-null was given.
2199 if test "${enable_null+set}" = set; then
2200   enableval="$enable_null"
2201   
2202         ol_arg=invalid
2203         for ol_val in auto yes no ; do
2204                 if test "$enableval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2210         fi
2211         ol_enable_null="$ol_arg"
2212
2213 else
2214         ol_enable_null="no"
2215 fi
2216 # end --enable-null
2217 # OpenLDAP --with-null_module
2218         # Check whether --with-null_module or --without-null_module was given.
2219 if test "${with_null_module+set}" = set; then
2220   withval="$with_null_module"
2221   
2222         ol_arg=invalid
2223         for ol_val in static dynamic ; do
2224                 if test "$withval" = "$ol_val" ; then
2225                         ol_arg="$ol_val"
2226                 fi
2227         done
2228         if test "$ol_arg" = "invalid" ; then
2229                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2230         fi
2231         ol_with_null_module="$ol_arg"
2232
2233 else
2234         ol_with_null_module="static"
2235 fi
2236 # end --with-null_module
2237
2238 # OpenLDAP --enable-passwd
2239         # Check whether --enable-passwd or --disable-passwd was given.
2240 if test "${enable_passwd+set}" = set; then
2241   enableval="$enable_passwd"
2242   
2243         ol_arg=invalid
2244         for ol_val in auto yes no ; do
2245                 if test "$enableval" = "$ol_val" ; then
2246                         ol_arg="$ol_val"
2247                 fi
2248         done
2249         if test "$ol_arg" = "invalid" ; then
2250                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2251         fi
2252         ol_enable_passwd="$ol_arg"
2253
2254 else
2255         ol_enable_passwd="no"
2256 fi
2257 # end --enable-passwd
2258 # OpenLDAP --with-passwd_module
2259         # Check whether --with-passwd_module or --without-passwd_module was given.
2260 if test "${with_passwd_module+set}" = set; then
2261   withval="$with_passwd_module"
2262   
2263         ol_arg=invalid
2264         for ol_val in static dynamic ; do
2265                 if test "$withval" = "$ol_val" ; then
2266                         ol_arg="$ol_val"
2267                 fi
2268         done
2269         if test "$ol_arg" = "invalid" ; then
2270                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2271         fi
2272         ol_with_passwd_module="$ol_arg"
2273
2274 else
2275         ol_with_passwd_module="static"
2276 fi
2277 # end --with-passwd_module
2278
2279 # OpenLDAP --enable-perl
2280         # Check whether --enable-perl or --disable-perl was given.
2281 if test "${enable_perl+set}" = set; then
2282   enableval="$enable_perl"
2283   
2284         ol_arg=invalid
2285         for ol_val in auto yes no ; do
2286                 if test "$enableval" = "$ol_val" ; then
2287                         ol_arg="$ol_val"
2288                 fi
2289         done
2290         if test "$ol_arg" = "invalid" ; then
2291                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2292         fi
2293         ol_enable_perl="$ol_arg"
2294
2295 else
2296         ol_enable_perl="no"
2297 fi
2298 # end --enable-perl
2299 # OpenLDAP --with-perl_module
2300         # Check whether --with-perl_module or --without-perl_module was given.
2301 if test "${with_perl_module+set}" = set; then
2302   withval="$with_perl_module"
2303   
2304         ol_arg=invalid
2305         for ol_val in static dynamic ; do
2306                 if test "$withval" = "$ol_val" ; then
2307                         ol_arg="$ol_val"
2308                 fi
2309         done
2310         if test "$ol_arg" = "invalid" ; then
2311                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2312         fi
2313         ol_with_perl_module="$ol_arg"
2314
2315 else
2316         ol_with_perl_module="static"
2317 fi
2318 # end --with-perl_module
2319
2320 # OpenLDAP --enable-shell
2321         # Check whether --enable-shell or --disable-shell was given.
2322 if test "${enable_shell+set}" = set; then
2323   enableval="$enable_shell"
2324   
2325         ol_arg=invalid
2326         for ol_val in auto yes no ; do
2327                 if test "$enableval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2333         fi
2334         ol_enable_shell="$ol_arg"
2335
2336 else
2337         ol_enable_shell="no"
2338 fi
2339 # end --enable-shell
2340 # OpenLDAP --with-shell_module
2341         # Check whether --with-shell_module or --without-shell_module was given.
2342 if test "${with_shell_module+set}" = set; then
2343   withval="$with_shell_module"
2344   
2345         ol_arg=invalid
2346         for ol_val in static dynamic ; do
2347                 if test "$withval" = "$ol_val" ; then
2348                         ol_arg="$ol_val"
2349                 fi
2350         done
2351         if test "$ol_arg" = "invalid" ; then
2352                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2353         fi
2354         ol_with_shell_module="$ol_arg"
2355
2356 else
2357         ol_with_shell_module="static"
2358 fi
2359 # end --with-shell_module
2360
2361 # OpenLDAP --enable-sql
2362         # Check whether --enable-sql or --disable-sql was given.
2363 if test "${enable_sql+set}" = set; then
2364   enableval="$enable_sql"
2365   
2366         ol_arg=invalid
2367         for ol_val in auto yes no ; do
2368                 if test "$enableval" = "$ol_val" ; then
2369                         ol_arg="$ol_val"
2370                 fi
2371         done
2372         if test "$ol_arg" = "invalid" ; then
2373                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2374         fi
2375         ol_enable_sql="$ol_arg"
2376
2377 else
2378         ol_enable_sql="no"
2379 fi
2380 # end --enable-sql
2381 # OpenLDAP --with-sql_module
2382         # Check whether --with-sql_module or --without-sql_module was given.
2383 if test "${with_sql_module+set}" = set; then
2384   withval="$with_sql_module"
2385   
2386         ol_arg=invalid
2387         for ol_val in static dynamic ; do
2388                 if test "$withval" = "$ol_val" ; then
2389                         ol_arg="$ol_val"
2390                 fi
2391         done
2392         if test "$ol_arg" = "invalid" ; then
2393                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2394         fi
2395         ol_with_sql_module="$ol_arg"
2396
2397 else
2398         ol_with_sql_module="static"
2399 fi
2400 # end --with-sql_module
2401
2402
2403 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2404 if test "${with_xxslurpdoptions+set}" = set; then
2405   withval="$with_xxslurpdoptions"
2406   :
2407 fi
2408
2409 # OpenLDAP --enable-slurpd
2410         # Check whether --enable-slurpd or --disable-slurpd was given.
2411 if test "${enable_slurpd+set}" = set; then
2412   enableval="$enable_slurpd"
2413   
2414         ol_arg=invalid
2415         for ol_val in auto yes no ; do
2416                 if test "$enableval" = "$ol_val" ; then
2417                         ol_arg="$ol_val"
2418                 fi
2419         done
2420         if test "$ol_arg" = "invalid" ; then
2421                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2422         fi
2423         ol_enable_slurpd="$ol_arg"
2424
2425 else
2426         ol_enable_slurpd="auto"
2427 fi
2428 # end --enable-slurpd
2429
2430 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2431 if test "${with_xxliboptions+set}" = set; then
2432   withval="$with_xxliboptions"
2433   :
2434 fi
2435
2436 # Check whether --enable-static or --disable-static was given.
2437 if test "${enable_static+set}" = set; then
2438   enableval="$enable_static"
2439   p=${PACKAGE-default}
2440 case $enableval in
2441 yes) enable_static=yes ;;
2442 no) enable_static=no ;;
2443 *)
2444   enable_static=no
2445   # Look at the argument we got.  We use all the common list separators.
2446   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2447   for pkg in $enableval; do
2448     if test "X$pkg" = "X$p"; then
2449       enable_static=yes
2450     fi
2451   done
2452   IFS="$ac_save_ifs"
2453   ;;
2454 esac
2455 else
2456   enable_static=yes
2457 fi
2458
2459 # Check whether --enable-shared or --disable-shared was given.
2460 if test "${enable_shared+set}" = set; then
2461   enableval="$enable_shared"
2462   p=${PACKAGE-default}
2463 case $enableval in
2464 yes) enable_shared=yes ;;
2465 no) enable_shared=no ;;
2466 *)
2467   enable_shared=no
2468   # Look at the argument we got.  We use all the common list separators.
2469   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2470   for pkg in $enableval; do
2471     if test "X$pkg" = "X$p"; then
2472       enable_shared=yes
2473     fi
2474   done
2475   IFS="$ac_save_ifs"
2476   ;;
2477 esac
2478 else
2479   enable_shared=yes
2480 fi
2481
2482
2483
2484 # validate options
2485 if test $ol_enable_slapd = no ; then
2486                 if test $ol_enable_bdb = yes ; then
2487                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2488         fi
2489         if test $ol_enable_dnssrv = yes ; then
2490                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2491         fi
2492         if test $ol_enable_ldap = yes ; then
2493                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2494         fi
2495         if test $ol_enable_ldbm = yes ; then
2496                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2497         fi
2498         if test $ol_enable_meta = yes ; then
2499                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2500         fi
2501         if test $ol_enable_monitor = yes ; then
2502                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2503         fi
2504         if test $ol_enable_null = yes ; then
2505                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2506         fi
2507         if test $ol_enable_passwd = yes ; then
2508                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2509         fi
2510         if test $ol_enable_perl = yes ; then
2511                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2512         fi
2513         if test $ol_enable_shell = yes ; then
2514                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2515         fi
2516         if test $ol_enable_sql = yes ; then
2517                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2518         fi
2519         if test $ol_enable_modules = yes ; then
2520                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2521         fi
2522         if test $ol_enable_multimaster = yes ; then
2523                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2524         fi
2525         if test $ol_enable_wrappers = yes ; then
2526                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2527         fi
2528         if test $ol_enable_phonetic = yes ; then
2529                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2530         fi
2531         if test $ol_enable_rlookups = yes ; then
2532                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2533         fi
2534         if test $ol_enable_aci = yes ; then
2535                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2536         fi
2537         if test $ol_with_ldbm_api != auto ; then
2538                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2539         fi
2540         if test $ol_with_ldbm_type != auto ; then
2541                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2542         fi
2543         if test $ol_with_bdb_module != static ; then
2544                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2545         fi
2546         if test $ol_with_dnssrv_module != static ; then
2547                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2548         fi
2549         if test $ol_with_ldap_module != static ; then
2550                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2551         fi
2552         if test $ol_with_ldbm_module != static ; then
2553                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2554         fi
2555         if test $ol_with_meta_module != static ; then
2556                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2557         fi
2558         if test $ol_with_monitor_module != static ; then
2559                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2560         fi
2561         if test $ol_with_null_module != static ; then
2562                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2563         fi
2564         if test $ol_with_passwd_module != static ; then
2565                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2566         fi
2567         if test $ol_with_perl_module != static ; then
2568                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2569         fi
2570         if test $ol_with_shell_module != static ; then
2571                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2572         fi
2573         if test $ol_with_sql_module != static ; then
2574                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2575         fi
2576         if test $ol_enable_slurpd = yes ; then
2577                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2578         fi
2579         if test $ol_enable_rewrite = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2581         fi
2582
2583         # force settings to no
2584         ol_enable_bdb=no
2585         ol_enable_dnssrv=no
2586         ol_enable_ldap=no
2587         ol_enable_ldbm=no
2588         ol_enable_meta=no
2589         ol_enable_monitor=no
2590         ol_enable_null=no
2591         ol_enable_passwd=no
2592         ol_enable_perl=no
2593         ol_enable_shell=no
2594         ol_enable_sql=no
2595
2596         ol_enable_modules=no
2597         ol_enable_multimaster=no
2598         ol_enable_phonetic=no
2599         ol_enable_rlookups=no
2600         ol_enable_aci=no
2601         ol_enable_wrappers=no
2602         ol_enable_dynamic=no
2603
2604         ol_with_ldbm_api=no
2605         ol_with_ldbm_type=no
2606
2607         ol_with_bdb_module=static
2608         ol_with_dnssrv_module=static
2609         ol_with_ldap_module=static
2610         ol_with_ldbm_module=static
2611         ol_with_meta_module=static
2612         ol_with_monitor_module=static
2613         ol_with_null_module=static
2614         ol_with_passwd_module=static
2615         ol_with_perl_module=static
2616         ol_with_shell_module=static
2617         ol_with_sql_module=static
2618
2619         ol_enable_slurpd=no
2620
2621         ol_enable_rewrite=no
2622
2623 elif test $ol_enable_ldbm = no ; then
2624         
2625         if test $ol_with_ldbm_api != auto ; then
2626                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2627         fi
2628
2629         if test $ol_with_ldbm_type != auto ; then
2630                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2631         fi
2632
2633         if test $ol_with_ldbm_module != static ; then
2634                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2635         fi
2636
2637         if test $ol_enable_modules != yes -a \
2638                 $ol_enable_bdb = no -a \
2639                 $ol_enable_dnssrv = no -a \
2640                 $ol_enable_ldap = no -a \
2641                 $ol_enable_meta = no -a \
2642                 $ol_enable_monitor = no -a \
2643                 $ol_enable_null = no -a \
2644                 $ol_enable_passwd = no -a \
2645                 $ol_enable_perl = no -a \
2646                 $ol_enable_shell = no -a \
2647                 $ol_enable_sql = no ; then
2648
2649                 if test $ol_enable_slapd = yes ; then
2650                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2651                 else
2652                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2653                         ol_enable_slapd=no
2654                 fi
2655         fi
2656
2657         ol_with_ldbm_api=no
2658         ol_with_ldbm_type=no
2659         ol_with_ldbm_module=static
2660
2661         if test $ol_enable_bdb != no ; then
2662                 ol_with_ldbm_api=berkeley
2663         fi
2664
2665 else
2666                 if test $ol_with_ldbm_api = gdbm -a \
2667                 $ol_with_ldbm_type = btree ; then
2668                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2669         fi
2670         if test $ol_with_ldbm_api = mdbm -a \
2671                 $ol_with_ldbm_type = btree ; then
2672                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2673         fi
2674         if test $ol_with_ldbm_api = ndbm -a \
2675                 $ol_with_ldbm_type = btree ; then
2676                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2677         fi
2678
2679         if test $ol_enable_bdb = yes ; then
2680                 if test $ol_with_ldbm_api = auto ; then
2681                         ol_with_ldbm_api=berkeley
2682                 elif test $ol_with_ldbm_api != berkeley ; then
2683                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2684                 fi
2685
2686         elif test $ol_enable_bdb = auto ; then
2687                 if test $ol_with_ldbm_api != berkeley \
2688                         -o $ol_with_ldbm_api != auto ; then
2689                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2690                         ol_enable_bdb=no
2691                 fi
2692         fi
2693 fi
2694
2695 if test $ol_enable_slurpd = yes ; then
2696                 if test $ol_with_threads = no ; then
2697                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2698         fi
2699 fi
2700
2701 if test $ol_enable_lmpasswd = yes ; then
2702         if test $ol_with_tls = no ; then
2703                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2704         fi
2705 fi
2706
2707 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2708         if test $ol_with_kerberos = no ; then
2709                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2710         elif test $ol_with_kerberos = auto ; then
2711                 ol_with_kerberos=yes
2712         fi
2713
2714 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2715         if test $ol_with_kerberos = auto ; then
2716                 ol_with_kerberos=no
2717         elif test $ol_with_kerberos != no ; then
2718                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2719                 ol_with_kerberos=no
2720         fi
2721 fi
2722
2723 if test $ol_enable_spasswd = yes ; then
2724         if test $ol_with_cyrus_sasl = no ; then
2725                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2726         fi
2727         ol_with_cyrus_sasl=yes
2728 fi
2729
2730 echo "$ac_t""done" 1>&6
2731
2732 LDAP_LIBS=
2733 LDIF_LIBS=
2734 LDBM_LIBS=
2735 LTHREAD_LIBS=
2736 LUTIL_LIBS=
2737
2738 SLAPD_LIBS=
2739 SLURPD_LIBS=
2740
2741 BUILD_SLAPD=no
2742 BUILD_SLURPD=no
2743
2744 BUILD_THREAD=no
2745
2746 BUILD_BDB=no
2747 BUILD_DNSSRV=no
2748 BUILD_LDAP=no
2749 BUILD_LDBM=no
2750 BUILD_META=no
2751 BUILD_MONITOR=no
2752 BUILD_NULL=no
2753 BUILD_PASSWD=no
2754 BUILD_PERL=no
2755 BUILD_SHELL=no
2756 BUILD_SQL=no
2757
2758 BUILD_BDB_DYNAMIC=static
2759 BUILD_DNSSRV_DYNAMIC=static
2760 BUILD_LDAP_DYNAMIC=static
2761 BUILD_LDBM_DYNAMIC=static
2762 BUILD_META_DYNAMIC=static
2763 BUILD_MONITOR_DYNAMIC=static
2764 BUILD_NULL_DYNAMIC=static
2765 BUILD_PASSWD_DYNAMIC=static
2766 BUILD_PERL_DYNAMIC=static
2767 BUILD_SHELL_DYNAMIC=static
2768 BUILD_SQL_DYNAMIC=static
2769
2770 SLAPD_MODULES_LDFLAGS=
2771 SLAPD_MODULES_CPPFLAGS=
2772
2773 SLAPD_STATIC_BACKENDS=
2774 SLAPD_DYNAMIC_BACKENDS=
2775
2776 SLAPD_PERL_LDFLAGS=
2777 MOD_PERL_LDFLAGS=
2778 PERL_CPPFLAGS=
2779
2780 SLAPD_SQL_LDFLAGS=
2781 SLAPD_SQL_LIBS=
2782 SLAPD_SQL_INCLUDES=
2783
2784 KRB4_LIBS=
2785 KRB5_LIBS=
2786 READLINE_LIBS=
2787 SASL_LIBS=
2788 TERMCAP_LIBS=
2789 TLS_LIBS=
2790 MODULES_LIBS=
2791 AUTH_LIBS=
2792
2793 SLAPD_SLP_LIBS=
2794
2795
2796 # Find a good install program.  We prefer a C program (faster),
2797 # so one script is as good as another.  But avoid the broken or
2798 # incompatible versions:
2799 # SysV /etc/install, /usr/sbin/install
2800 # SunOS /usr/etc/install
2801 # IRIX /sbin/install
2802 # AIX /bin/install
2803 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2804 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2805 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2806 # ./install, which can be erroneously created by make from ./install.sh.
2807 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2808 echo "configure:2809: checking for a BSD compatible install" >&5
2809 if test -z "$INSTALL"; then
2810 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2811   echo $ac_n "(cached) $ac_c" 1>&6
2812 else
2813     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2814   for ac_dir in $PATH; do
2815     # Account for people who put trailing slashes in PATH elements.
2816     case "$ac_dir/" in
2817     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2818     *)
2819       # OSF1 and SCO ODT 3.0 have their own names for install.
2820       # Don't use installbsd from OSF since it installs stuff as root
2821       # by default.
2822       for ac_prog in ginstall scoinst install; do
2823         if test -f $ac_dir/$ac_prog; then
2824           if test $ac_prog = install &&
2825             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2826             # AIX install.  It has an incompatible calling convention.
2827             :
2828           elif test $ac_prog = install &&
2829             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2830             # program-specific install script used by HP pwplus--don't use.
2831             :
2832           else
2833             ac_cv_path_install="$ac_dir/$ac_prog -c"
2834             break 2
2835           fi
2836         fi
2837       done
2838       ;;
2839     esac
2840   done
2841   IFS="$ac_save_IFS"
2842
2843 fi
2844   if test "${ac_cv_path_install+set}" = set; then
2845     INSTALL="$ac_cv_path_install"
2846   else
2847     # As a last resort, use the slow shell script.  We don't cache a
2848     # path for INSTALL within a source directory, because that will
2849     # break other packages using the cache if that directory is
2850     # removed, or if the path is relative.
2851     INSTALL="$ac_install_sh"
2852   fi
2853 fi
2854 echo "$ac_t""$INSTALL" 1>&6
2855
2856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2857 # It thinks the first close brace ends the variable substitution.
2858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2859
2860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2861
2862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2863
2864
2865 cat >> confdefs.h <<\EOF
2866 #define HAVE_MKVERSION 1
2867 EOF
2868
2869
2870
2871
2872 ol_aix_threads=no
2873 case "$target" in
2874 *-*-aix*)       if test -z "$CC" ; then
2875                 case "$ol_with_threads" in
2876                 auto | yes |  posix) ol_aix_threads=yes ;;
2877                 esac
2878         fi
2879 ;;
2880 esac
2881
2882 if test $ol_aix_threads = yes ; then
2883         if test -z "${CC}" ; then
2884                 for ac_prog in cc_r xlc_r cc
2885 do
2886 # Extract the first word of "$ac_prog", so it can be a program name with args.
2887 set dummy $ac_prog; ac_word=$2
2888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2889 echo "configure:2890: checking for $ac_word" >&5
2890 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2891   echo $ac_n "(cached) $ac_c" 1>&6
2892 else
2893   if test -n "$CC"; then
2894   ac_cv_prog_CC="$CC" # Let the user override the test.
2895 else
2896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2897   ac_dummy="$PATH"
2898   for ac_dir in $ac_dummy; do
2899     test -z "$ac_dir" && ac_dir=.
2900     if test -f $ac_dir/$ac_word; then
2901       ac_cv_prog_CC="$ac_prog"
2902       break
2903     fi
2904   done
2905   IFS="$ac_save_ifs"
2906 fi
2907 fi
2908 CC="$ac_cv_prog_CC"
2909 if test -n "$CC"; then
2910   echo "$ac_t""$CC" 1>&6
2911 else
2912   echo "$ac_t""no" 1>&6
2913 fi
2914
2915 test -n "$CC" && break
2916 done
2917
2918
2919                 if test "$CC" = cc ; then
2920                                                 if test $ol_with_threads != auto ; then
2921                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2922                         else
2923                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2924                         fi
2925                         ol_with_threads=no
2926                 fi
2927         fi
2928
2929         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2930                 ol_with_threads=posix
2931                 ol_cv_pthread_create=yes
2932         fi
2933 fi
2934
2935 if test -z "${CC}"; then
2936         for ac_prog in cc gcc
2937 do
2938 # Extract the first word of "$ac_prog", so it can be a program name with args.
2939 set dummy $ac_prog; ac_word=$2
2940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2941 echo "configure:2942: checking for $ac_word" >&5
2942 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   if test -n "$CC"; then
2946   ac_cv_prog_CC="$CC" # Let the user override the test.
2947 else
2948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2949   ac_dummy="$PATH"
2950   for ac_dir in $ac_dummy; do
2951     test -z "$ac_dir" && ac_dir=.
2952     if test -f $ac_dir/$ac_word; then
2953       ac_cv_prog_CC="$ac_prog"
2954       break
2955     fi
2956   done
2957   IFS="$ac_save_ifs"
2958 fi
2959 fi
2960 CC="$ac_cv_prog_CC"
2961 if test -n "$CC"; then
2962   echo "$ac_t""$CC" 1>&6
2963 else
2964   echo "$ac_t""no" 1>&6
2965 fi
2966
2967 test -n "$CC" && break
2968 done
2969 test -n "$CC" || CC="missing"
2970
2971
2972         if test "${CC}" = "missing" ; then
2973                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2974         fi
2975 fi
2976
2977 if test -z "${AR}"; then
2978         for ac_prog in ar gar
2979 do
2980 # Extract the first word of "$ac_prog", so it can be a program name with args.
2981 set dummy $ac_prog; ac_word=$2
2982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2983 echo "configure:2984: checking for $ac_word" >&5
2984 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   if test -n "$AR"; then
2988   ac_cv_prog_AR="$AR" # Let the user override the test.
2989 else
2990   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2991   ac_dummy="$PATH"
2992   for ac_dir in $ac_dummy; do
2993     test -z "$ac_dir" && ac_dir=.
2994     if test -f $ac_dir/$ac_word; then
2995       ac_cv_prog_AR="$ac_prog"
2996       break
2997     fi
2998   done
2999   IFS="$ac_save_ifs"
3000 fi
3001 fi
3002 AR="$ac_cv_prog_AR"
3003 if test -n "$AR"; then
3004   echo "$ac_t""$AR" 1>&6
3005 else
3006   echo "$ac_t""no" 1>&6
3007 fi
3008
3009 test -n "$AR" && break
3010 done
3011 test -n "$AR" || AR="missing"
3012
3013
3014         if test "${AR}" = "missing" ; then
3015                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3016         fi
3017 fi
3018
3019
3020
3021 # Find the correct PATH separator.  Usually this is `:', but
3022 # DJGPP uses `;' like DOS.
3023 if test "X${PATH_SEPARATOR+set}" != Xset; then
3024   UNAME=${UNAME-`uname 2>/dev/null`}
3025   case X$UNAME in
3026     *-DOS) lt_cv_sys_path_separator=';' ;;
3027     *)     lt_cv_sys_path_separator=':' ;;
3028   esac
3029   PATH_SEPARATOR=$lt_cv_sys_path_separator
3030 fi
3031
3032 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3033 echo "configure:3034: checking for Cygwin environment" >&5
3034 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3035   echo $ac_n "(cached) $ac_c" 1>&6
3036 else
3037   cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040
3041 int main() {
3042
3043 #ifndef __CYGWIN__
3044 #define __CYGWIN__ __CYGWIN32__
3045 #endif
3046 return __CYGWIN__;
3047 ; return 0; }
3048 EOF
3049 if { (eval echo configure:3050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3050   rm -rf conftest*
3051   ac_cv_cygwin=yes
3052 else
3053   echo "configure: failed program was:" >&5
3054   cat conftest.$ac_ext >&5
3055   rm -rf conftest*
3056   ac_cv_cygwin=no
3057 fi
3058 rm -f conftest*
3059 fi
3060
3061 echo "$ac_t""$ac_cv_cygwin" 1>&6
3062 CYGWIN=
3063 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3064 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3065 echo "configure:3066: checking for mingw32 environment" >&5
3066 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3067   echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069   cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072
3073 int main() {
3074 return __MINGW32__;
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3078   rm -rf conftest*
3079   ac_cv_mingw32=yes
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   ac_cv_mingw32=no
3085 fi
3086 rm -f conftest*
3087 fi
3088
3089 echo "$ac_t""$ac_cv_mingw32" 1>&6
3090 MINGW32=
3091 test "$ac_cv_mingw32" = yes && MINGW32=yes
3092 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3093 echo "configure:3094: checking for EMX OS/2 environment" >&5
3094 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100
3101 int main() {
3102 return __EMX__;
3103 ; return 0; }
3104 EOF
3105 if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3106   rm -rf conftest*
3107   ac_cv_emxos2=yes
3108 else
3109   echo "configure: failed program was:" >&5
3110   cat conftest.$ac_ext >&5
3111   rm -rf conftest*
3112   ac_cv_emxos2=no
3113 fi
3114 rm -f conftest*
3115 fi
3116
3117 echo "$ac_t""$ac_cv_emxos2" 1>&6
3118 EMXOS2=
3119 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3120 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3121 echo "configure:3122: checking how to run the C preprocessor" >&5
3122 # On Suns, sometimes $CPP names a directory.
3123 if test -n "$CPP" && test -d "$CPP"; then
3124   CPP=
3125 fi
3126 if test -z "$CPP"; then
3127 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130     # This must be in double quotes, not single quotes, because CPP may get
3131   # substituted into the Makefile and "${CC-cc}" will confuse make.
3132   CPP="${CC-cc} -E"
3133   # On the NeXT, cc -E runs the code through the compiler's parser,
3134   # not just through cpp.
3135   cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #include <assert.h>
3139 Syntax Error
3140 EOF
3141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3142 { (eval echo configure:3143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3144 if test -z "$ac_err"; then
3145   :
3146 else
3147   echo "$ac_err" >&5
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   CPP="${CC-cc} -E -traditional-cpp"
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <assert.h>
3156 Syntax Error
3157 EOF
3158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3159 { (eval echo configure:3160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3161 if test -z "$ac_err"; then
3162   :
3163 else
3164   echo "$ac_err" >&5
3165   echo "configure: failed program was:" >&5
3166   cat conftest.$ac_ext >&5
3167   rm -rf conftest*
3168   CPP="${CC-cc} -nologo -E"
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <assert.h>
3173 Syntax Error
3174 EOF
3175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3176 { (eval echo configure:3177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3178 if test -z "$ac_err"; then
3179   :
3180 else
3181   echo "$ac_err" >&5
3182   echo "configure: failed program was:" >&5
3183   cat conftest.$ac_ext >&5
3184   rm -rf conftest*
3185   CPP=/lib/cpp
3186 fi
3187 rm -f conftest*
3188 fi
3189 rm -f conftest*
3190 fi
3191 rm -f conftest*
3192   ac_cv_prog_CPP="$CPP"
3193 fi
3194   CPP="$ac_cv_prog_CPP"
3195 else
3196   ac_cv_prog_CPP="$CPP"
3197 fi
3198 echo "$ac_t""$CPP" 1>&6
3199
3200 # Check whether --enable-fast-install or --disable-fast-install was given.
3201 if test "${enable_fast_install+set}" = set; then
3202   enableval="$enable_fast_install"
3203   p=${PACKAGE-default}
3204 case $enableval in
3205 yes) enable_fast_install=yes ;;
3206 no) enable_fast_install=no ;;
3207 *)
3208   enable_fast_install=no
3209   # Look at the argument we got.  We use all the common list separators.
3210   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3211   for pkg in $enableval; do
3212     if test "X$pkg" = "X$p"; then
3213       enable_fast_install=yes
3214     fi
3215   done
3216   IFS="$ac_save_ifs"
3217   ;;
3218 esac
3219 else
3220   enable_fast_install=yes
3221 fi
3222
3223 # Extract the first word of "gcc", so it can be a program name with args.
3224 set dummy gcc; ac_word=$2
3225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3226 echo "configure:3227: checking for $ac_word" >&5
3227 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   if test -n "$CC"; then
3231   ac_cv_prog_CC="$CC" # Let the user override the test.
3232 else
3233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3234   ac_dummy="$PATH"
3235   for ac_dir in $ac_dummy; do
3236     test -z "$ac_dir" && ac_dir=.
3237     if test -f $ac_dir/$ac_word; then
3238       ac_cv_prog_CC="gcc"
3239       break
3240     fi
3241   done
3242   IFS="$ac_save_ifs"
3243 fi
3244 fi
3245 CC="$ac_cv_prog_CC"
3246 if test -n "$CC"; then
3247   echo "$ac_t""$CC" 1>&6
3248 else
3249   echo "$ac_t""no" 1>&6
3250 fi
3251
3252 if test -z "$CC"; then
3253   # Extract the first word of "cc", so it can be a program name with args.
3254 set dummy cc; ac_word=$2
3255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3256 echo "configure:3257: checking for $ac_word" >&5
3257 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3258   echo $ac_n "(cached) $ac_c" 1>&6
3259 else
3260   if test -n "$CC"; then
3261   ac_cv_prog_CC="$CC" # Let the user override the test.
3262 else
3263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3264   ac_prog_rejected=no
3265   ac_dummy="$PATH"
3266   for ac_dir in $ac_dummy; do
3267     test -z "$ac_dir" && ac_dir=.
3268     if test -f $ac_dir/$ac_word; then
3269       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3270         ac_prog_rejected=yes
3271         continue
3272       fi
3273       ac_cv_prog_CC="cc"
3274       break
3275     fi
3276   done
3277   IFS="$ac_save_ifs"
3278 if test $ac_prog_rejected = yes; then
3279   # We found a bogon in the path, so make sure we never use it.
3280   set dummy $ac_cv_prog_CC
3281   shift
3282   if test $# -gt 0; then
3283     # We chose a different compiler from the bogus one.
3284     # However, it has the same basename, so the bogon will be chosen
3285     # first if we set CC to just the basename; use the full file name.
3286     shift
3287     set dummy "$ac_dir/$ac_word" "$@"
3288     shift
3289     ac_cv_prog_CC="$@"
3290   fi
3291 fi
3292 fi
3293 fi
3294 CC="$ac_cv_prog_CC"
3295 if test -n "$CC"; then
3296   echo "$ac_t""$CC" 1>&6
3297 else
3298   echo "$ac_t""no" 1>&6
3299 fi
3300
3301   if test -z "$CC"; then
3302     case "`uname -s`" in
3303     *win32* | *WIN32* | *CYGWIN*)
3304       # Extract the first word of "cl", so it can be a program name with args.
3305 set dummy cl; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   if test -n "$CC"; then
3312   ac_cv_prog_CC="$CC" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_CC="cl"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324 fi
3325 fi
3326 CC="$ac_cv_prog_CC"
3327 if test -n "$CC"; then
3328   echo "$ac_t""$CC" 1>&6
3329 else
3330   echo "$ac_t""no" 1>&6
3331 fi
3332  ;;
3333     esac
3334   fi
3335   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3336 fi
3337
3338 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3339 echo "configure:3340: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3340
3341 ac_ext=c
3342 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3343 ac_cpp='$CPP $CPPFLAGS'
3344 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3345 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3346 cross_compiling=$ac_cv_prog_cc_cross
3347
3348 cat > conftest.$ac_ext << EOF
3349
3350 #line 3351 "configure"
3351 #include "confdefs.h"
3352
3353 main(){return(0);}
3354 EOF
3355 if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3356   ac_cv_prog_cc_works=yes
3357   # If we can't run a trivial program, we are probably using a cross compiler.
3358   if (./conftest; exit) 2>/dev/null; then
3359     ac_cv_prog_cc_cross=no
3360   else
3361     ac_cv_prog_cc_cross=yes
3362   fi
3363 else
3364   echo "configure: failed program was:" >&5
3365   cat conftest.$ac_ext >&5
3366   ac_cv_prog_cc_works=no
3367 fi
3368 rm -fr conftest*
3369 ac_ext=c
3370 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3371 ac_cpp='$CPP $CPPFLAGS'
3372 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3373 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3374 cross_compiling=$ac_cv_prog_cc_cross
3375
3376 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3377 if test $ac_cv_prog_cc_works = no; then
3378   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3379 fi
3380 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3381 echo "configure:3382: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3382 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3383 cross_compiling=$ac_cv_prog_cc_cross
3384
3385 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3386 echo "configure:3387: checking whether we are using GNU C" >&5
3387 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3388   echo $ac_n "(cached) $ac_c" 1>&6
3389 else
3390   cat > conftest.c <<EOF
3391 #ifdef __GNUC__
3392   yes;
3393 #endif
3394 EOF
3395 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3396   ac_cv_prog_gcc=yes
3397 else
3398   ac_cv_prog_gcc=no
3399 fi
3400 fi
3401
3402 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3403
3404 if test $ac_cv_prog_gcc = yes; then
3405   GCC=yes
3406 else
3407   GCC=
3408 fi
3409
3410 ac_test_CFLAGS="${CFLAGS+set}"
3411 ac_save_CFLAGS="$CFLAGS"
3412 CFLAGS=
3413 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3414 echo "configure:3415: checking whether ${CC-cc} accepts -g" >&5
3415 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   echo 'void f(){}' > conftest.c
3419 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3420   ac_cv_prog_cc_g=yes
3421 else
3422   ac_cv_prog_cc_g=no
3423 fi
3424 rm -f conftest*
3425
3426 fi
3427
3428 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3429 if test "$ac_test_CFLAGS" = set; then
3430   CFLAGS="$ac_save_CFLAGS"
3431 elif test $ac_cv_prog_cc_g = yes; then
3432   if test "$GCC" = yes; then
3433     CFLAGS="-g -O2"
3434   else
3435     CFLAGS="-g"
3436   fi
3437 else
3438   if test "$GCC" = yes; then
3439     CFLAGS="-O2"
3440   else
3441     CFLAGS=
3442   fi
3443 fi
3444
3445 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3446 if test "${with_gnu_ld+set}" = set; then
3447   withval="$with_gnu_ld"
3448   test "$withval" = no || with_gnu_ld=yes
3449 else
3450   with_gnu_ld=no
3451 fi
3452
3453 ac_prog=ld
3454 if test "$GCC" = yes; then
3455   # Check if gcc -print-prog-name=ld gives a path.
3456   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3457 echo "configure:3458: checking for ld used by GCC" >&5
3458   case $host in
3459   *-*-mingw*)
3460     # gcc leaves a trailing carriage return which upsets mingw
3461     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3462   *)
3463     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3464   esac
3465   case $ac_prog in
3466     # Accept absolute paths.
3467     [\\/]* | [A-Za-z]:[\\/]*)
3468       re_direlt='/[^/][^/]*/\.\./'
3469       # Canonicalize the path of ld
3470       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3471       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3472         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3473       done
3474       test -z "$LD" && LD="$ac_prog"
3475       ;;
3476   "")
3477     # If it fails, then pretend we aren't using GCC.
3478     ac_prog=ld
3479     ;;
3480   *)
3481     # If it is relative, then search for the first ld in PATH.
3482     with_gnu_ld=unknown
3483     ;;
3484   esac
3485 elif test "$with_gnu_ld" = yes; then
3486   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3487 echo "configure:3488: checking for GNU ld" >&5
3488 else
3489   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3490 echo "configure:3491: checking for non-GNU ld" >&5
3491 fi
3492 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3493   echo $ac_n "(cached) $ac_c" 1>&6
3494 else
3495   if test -z "$LD"; then
3496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3497   for ac_dir in $PATH; do
3498     test -z "$ac_dir" && ac_dir=.
3499     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3500       lt_cv_path_LD="$ac_dir/$ac_prog"
3501       # Check to see if the program is GNU ld.  I'd rather use --version,
3502       # but apparently some GNU ld's only accept -v.
3503       # Break only if it was the GNU/non-GNU ld that we prefer.
3504       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3505         test "$with_gnu_ld" != no && break
3506       else
3507         test "$with_gnu_ld" != yes && break
3508       fi
3509     fi
3510   done
3511   IFS="$ac_save_ifs"
3512 else
3513   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3514 fi
3515 fi
3516
3517 LD="$lt_cv_path_LD"
3518 if test -n "$LD"; then
3519   echo "$ac_t""$LD" 1>&6
3520 else
3521   echo "$ac_t""no" 1>&6
3522 fi
3523 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3524 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3525 echo "configure:3526: checking if the linker ($LD) is GNU ld" >&5
3526 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3530 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3531   lt_cv_prog_gnu_ld=yes
3532 else
3533   lt_cv_prog_gnu_ld=no
3534 fi
3535 fi
3536
3537 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3538 with_gnu_ld=$lt_cv_prog_gnu_ld
3539
3540
3541 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3542 echo "configure:3543: checking for $LD option to reload object files" >&5
3543 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   lt_cv_ld_reload_flag='-r'
3547 fi
3548
3549 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3550 reload_flag=$lt_cv_ld_reload_flag
3551 test -n "$reload_flag" && reload_flag=" $reload_flag"
3552
3553 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3554 echo "configure:3555: checking for BSD-compatible nm" >&5
3555 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3556   echo $ac_n "(cached) $ac_c" 1>&6
3557 else
3558   if test -n "$NM"; then
3559   # Let the user override the test.
3560   lt_cv_path_NM="$NM"
3561 else
3562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3563   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3564     test -z "$ac_dir" && ac_dir=.
3565     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3566     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3567       # Check to see if the nm accepts a BSD-compat flag.
3568       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3569       #   nm: unknown option "B" ignored
3570       # Tru64's nm complains that /dev/null is an invalid object file
3571       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3572         lt_cv_path_NM="$tmp_nm -B"
3573         break
3574       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3575         lt_cv_path_NM="$tmp_nm -p"
3576         break
3577       else
3578         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3579         continue # so that we can try to find one that supports BSD flags
3580       fi
3581     fi
3582   done
3583   IFS="$ac_save_ifs"
3584   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3585 fi
3586 fi
3587
3588 NM="$lt_cv_path_NM"
3589 echo "$ac_t""$NM" 1>&6
3590
3591 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3592 echo "configure:3593: checking for a sed that does not truncate output" >&5
3593 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   # Loop through the user's path and test for sed and gsed.
3597 # Then use that list of sed's as ones to test for truncation.
3598 as_executable_p="test -f"
3599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600 for as_dir in $PATH
3601 do
3602   IFS=$as_save_IFS
3603   test -z "$as_dir" && as_dir=.
3604   for ac_prog in sed gsed; do
3605     for ac_exec_ext in '' $ac_executable_extensions; do
3606       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3607         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3608       fi
3609     done
3610   done
3611 done
3612
3613   # Create a temporary directory, and hook for its removal unless debugging.
3614 $debug ||
3615 {
3616   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3617   trap '{ (exit 1); exit 1; }' 1 2 13 15
3618 }
3619
3620 # Create a (secure) tmp directory for tmp files.
3621 : ${TMPDIR=/tmp}
3622 {
3623   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3624   test -n "$tmp" && test -d "$tmp"
3625 }  ||
3626 {
3627   tmp=$TMPDIR/sed$$-$RANDOM
3628   (umask 077 && mkdir $tmp)
3629 } ||
3630 {
3631    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3632    { (exit 1); exit 1; }
3633 }
3634   _max=0
3635   _count=0
3636   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3637   # along with /bin/sed that truncates output.
3638   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3639     test ! -f ${_sed} && break
3640     cat /dev/null > "$tmp/sed.in"
3641     _count=0
3642     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3643     # Check for GNU sed and select it if it is found.
3644     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3645       lt_cv_path_SED=${_sed}
3646       break
3647     fi
3648     while true; do
3649       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3650       mv "$tmp/sed.tmp" "$tmp/sed.in"
3651       cp "$tmp/sed.in" "$tmp/sed.nl"
3652       echo >>"$tmp/sed.nl"
3653       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3654       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3655       # 40000 chars as input seems more than enough
3656       test $_count -gt 10 && break
3657       _count=`expr $_count + 1`
3658       if test $_count -gt $_max; then
3659         _max=$_count
3660         lt_cv_path_SED=$_sed
3661       fi
3662     done
3663   done
3664   rm -rf "$tmp"
3665
3666 fi
3667
3668 if test "X$SED" != "X"; then
3669   lt_cv_path_SED=$SED
3670 else
3671   SED=$lt_cv_path_SED
3672 fi
3673 echo "$ac_t""$SED" 1>&6
3674
3675 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3676 echo "configure:3677: checking whether ln -s works" >&5
3677 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3678   echo $ac_n "(cached) $ac_c" 1>&6
3679 else
3680   rm -f conftestdata
3681 if ln -s X conftestdata 2>/dev/null
3682 then
3683   rm -f conftestdata
3684   ac_cv_prog_LN_S="ln -s"
3685 else
3686   ac_cv_prog_LN_S=ln
3687 fi
3688 fi
3689 LN_S="$ac_cv_prog_LN_S"
3690 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3691   echo "$ac_t""yes" 1>&6
3692 else
3693   echo "$ac_t""no" 1>&6
3694 fi
3695
3696 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3697 echo "configure:3698: checking how to recognise dependent libraries" >&5
3698 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   lt_cv_file_magic_cmd='$MAGIC_CMD'
3702 lt_cv_file_magic_test_file=
3703 lt_cv_deplibs_check_method='unknown'
3704 # Need to set the preceding variable on all platforms that support
3705 # interlibrary dependencies.
3706 # 'none' -- dependencies not supported.
3707 # `unknown' -- same as none, but documents that we really don't know.
3708 # 'pass_all' -- all dependencies passed with no checks.
3709 # 'test_compile' -- check by making test program.
3710 # 'file_magic [[regex]]' -- check by looking for files in library path
3711 # which responds to the $file_magic_cmd with a given egrep regex.
3712 # If you have `file' or equivalent on your system and you're not sure
3713 # whether `pass_all' will *always* work, you probably want this one.
3714
3715 case $host_os in
3716 aix4* | aix5*)
3717   lt_cv_deplibs_check_method=pass_all
3718   ;;
3719
3720 beos*)
3721   lt_cv_deplibs_check_method=pass_all
3722   ;;
3723
3724 bsdi4*)
3725   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3726   lt_cv_file_magic_cmd='/usr/bin/file -L'
3727   lt_cv_file_magic_test_file=/shlib/libc.so
3728   ;;
3729
3730 cygwin* | mingw* | pw32*)
3731   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3732   lt_cv_file_magic_cmd='$OBJDUMP -f'
3733   ;;
3734
3735 darwin* | rhapsody*)
3736   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3737   lt_cv_file_magic_cmd='/usr/bin/file -L'
3738   case "$host_os" in
3739   rhapsody* | darwin1.[012])
3740     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3741     ;;
3742   *) # Darwin 1.3 on
3743     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3744     ;;
3745   esac
3746   ;;
3747
3748 freebsd*)
3749   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3750     case $host_cpu in
3751     i*86 )
3752       # Not sure whether the presence of OpenBSD here was a mistake.
3753       # Let's accept both of them until this is cleared up.
3754       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3755       lt_cv_file_magic_cmd=/usr/bin/file
3756       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3757       ;;
3758     esac
3759   else
3760     lt_cv_deplibs_check_method=pass_all
3761   fi
3762   ;;
3763
3764 gnu*)
3765   lt_cv_deplibs_check_method=pass_all
3766   ;;
3767
3768 hpux10.20*|hpux11*)
3769   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3770   lt_cv_file_magic_cmd=/usr/bin/file
3771   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3772   ;;
3773
3774 irix5* | irix6* | nonstopux*)
3775   case $host_os in
3776   irix5* | nonstopux*)
3777     # this will be overridden with pass_all, but let us keep it just in case
3778     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3779     ;;
3780   *)
3781     case $LD in
3782     *-32|*"-32 ") libmagic=32-bit;;
3783     *-n32|*"-n32 ") libmagic=N32;;
3784     *-64|*"-64 ") libmagic=64-bit;;
3785     *) libmagic=never-match;;
3786     esac
3787     # this will be overridden with pass_all, but let us keep it just in case
3788     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3789     ;;
3790   esac
3791   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3792   lt_cv_deplibs_check_method=pass_all
3793   ;;
3794
3795 # This must be Linux ELF.
3796 linux-gnu*)
3797   case $host_cpu in
3798   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3799     lt_cv_deplibs_check_method=pass_all ;;
3800   *)
3801     # glibc up to 2.1.1 does not perform some relocations on ARM
3802     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3803   esac
3804   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3805   ;;
3806
3807 netbsd*)
3808   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3809     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3810   else
3811     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3812   fi
3813   ;;
3814
3815 newos6*)
3816   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3817   lt_cv_file_magic_cmd=/usr/bin/file
3818   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3819   ;;
3820
3821 openbsd*)
3822   lt_cv_file_magic_cmd=/usr/bin/file
3823   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3824   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3825     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3826   else
3827     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3828   fi
3829   ;;
3830
3831 osf3* | osf4* | osf5*)
3832   # this will be overridden with pass_all, but let us keep it just in case
3833   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3834   lt_cv_file_magic_test_file=/shlib/libc.so
3835   lt_cv_deplibs_check_method=pass_all
3836   ;;
3837
3838 sco3.2v5*)
3839   lt_cv_deplibs_check_method=pass_all
3840   ;;
3841
3842 solaris*)
3843   lt_cv_deplibs_check_method=pass_all
3844   lt_cv_file_magic_test_file=/lib/libc.so
3845   ;;
3846
3847 sysv5uw[78]* | sysv4*uw2*)
3848   lt_cv_deplibs_check_method=pass_all
3849   ;;
3850
3851 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3852   case $host_vendor in
3853   motorola)
3854     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]'
3855     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3856     ;;
3857   ncr)
3858     lt_cv_deplibs_check_method=pass_all
3859     ;;
3860   sequent)
3861     lt_cv_file_magic_cmd='/bin/file'
3862     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3863     ;;
3864   sni)
3865     lt_cv_file_magic_cmd='/bin/file'
3866     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3867     lt_cv_file_magic_test_file=/lib/libc.so
3868     ;;
3869   siemens)
3870     lt_cv_deplibs_check_method=pass_all
3871     ;;
3872   esac
3873   ;;
3874 esac
3875
3876 fi
3877
3878 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3879 file_magic_cmd=$lt_cv_file_magic_cmd
3880 deplibs_check_method=$lt_cv_deplibs_check_method
3881
3882 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3883 echo "configure:3884: checking for object suffix" >&5
3884 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3885   echo $ac_n "(cached) $ac_c" 1>&6
3886 else
3887   rm -f conftest*
3888 echo 'int i = 1;' > conftest.$ac_ext
3889 if { (eval echo configure:3890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3890   for ac_file in conftest.*; do
3891     case $ac_file in
3892     *.c) ;;
3893     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3894     esac
3895   done
3896 else
3897   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3898 fi
3899 rm -f conftest*
3900 fi
3901
3902 echo "$ac_t""$ac_cv_objext" 1>&6
3903 OBJEXT=$ac_cv_objext
3904 ac_objext=$ac_cv_objext
3905
3906
3907
3908
3909 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3910 echo "configure:3911: checking for executable suffix" >&5
3911 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3915   ac_cv_exeext=.exe
3916 else
3917   rm -f conftest*
3918   echo 'int main () { return 0; }' > conftest.$ac_ext
3919   ac_cv_exeext=
3920   if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3921     for file in conftest.*; do
3922       case $file in
3923       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3924       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3925       esac
3926     done
3927   else
3928     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3929   fi
3930   rm -f conftest*
3931   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3932 fi
3933 fi
3934
3935 EXEEXT=""
3936 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3937 echo "$ac_t""${ac_cv_exeext}" 1>&6
3938 ac_exeext=$EXEEXT
3939
3940 if test $host != $build; then
3941   ac_tool_prefix=${host_alias}-
3942 else
3943   ac_tool_prefix=
3944 fi
3945
3946
3947
3948
3949 # Check for command to grab the raw symbol name followed by C symbol from nm.
3950 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3951 echo "configure:3952: checking command to parse $NM output" >&5
3952 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   
3956 # These are sane defaults that work on at least a few old systems.
3957 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3958
3959 # Character class describing NM global symbol codes.
3960 symcode='[BCDEGRST]'
3961
3962 # Regexp to match symbols that can be accessed directly from C.
3963 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3964
3965 # Transform the above into a raw symbol and a C symbol.
3966 symxfrm='\1 \2\3 \3'
3967
3968 # Transform an extracted symbol line into a proper C declaration
3969 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3970
3971 # Transform an extracted symbol line into symbol name and symbol address
3972 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'"
3973
3974 # Define system-specific variables.
3975 case $host_os in
3976 aix*)
3977   symcode='[BCDT]'
3978   ;;
3979 cygwin* | mingw* | pw32*)
3980   symcode='[ABCDGISTW]'
3981   ;;
3982 hpux*) # Its linker distinguishes data from code symbols
3983   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3984   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'"
3985   ;;
3986 irix* | nonstopux*)
3987   symcode='[BCDEGRST]'
3988   ;;
3989 osf*)
3990   symcode='[BCDEGQRST]'
3991   ;;
3992 solaris* | sysv5*)
3993   symcode='[BDT]'
3994   ;;
3995 sysv4)
3996   symcode='[DFNSTU]'
3997   ;;
3998 esac
3999
4000 # Handle CRLF in mingw tool chain
4001 opt_cr=
4002 case $host_os in
4003 mingw*)
4004   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4005   ;;
4006 esac
4007
4008 # If we're using GNU nm, then use its standard symbol codes.
4009 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4010   symcode='[ABCDGISTW]'
4011 fi
4012
4013 # Try without a prefix undercore, then with it.
4014 for ac_symprfx in "" "_"; do
4015
4016   # Write the raw and C identifiers.
4017 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4018
4019   # Check to see that the pipe works correctly.
4020   pipe_works=no
4021   rm -f conftest*
4022   cat > conftest.$ac_ext <<EOF
4023 #ifdef __cplusplus
4024 extern "C" {
4025 #endif
4026 char nm_test_var;
4027 void nm_test_func(){}
4028 #ifdef __cplusplus
4029 }
4030 #endif
4031 int main(){nm_test_var='a';nm_test_func();return(0);}
4032 EOF
4033
4034   if { (eval echo configure:4035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4035     # Now try to grab the symbols.
4036     nlist=conftest.nm
4037     if { (eval echo configure:4038: \"$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
4038       # Try sorting and uniquifying the output.
4039       if sort "$nlist" | uniq > "$nlist"T; then
4040         mv -f "$nlist"T "$nlist"
4041       else
4042         rm -f "$nlist"T
4043       fi
4044
4045       # Make sure that we snagged all the symbols we need.
4046       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4047         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4048           cat <<EOF > conftest.$ac_ext
4049 #ifdef __cplusplus
4050 extern "C" {
4051 #endif
4052
4053 EOF
4054           # Now generate the symbol file.
4055           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4056
4057           cat <<EOF >> conftest.$ac_ext
4058 #if defined (__STDC__) && __STDC__
4059 # define lt_ptr void *
4060 #else
4061 # define lt_ptr char *
4062 # define const
4063 #endif
4064
4065 /* The mapping between symbol names and symbols. */
4066 const struct {
4067   const char *name;
4068   lt_ptr address;
4069 }
4070 lt_preloaded_symbols[] =
4071 {
4072 EOF
4073           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4074           cat <<\EOF >> conftest.$ac_ext
4075   {0, (lt_ptr) 0}
4076 };
4077
4078 #ifdef __cplusplus
4079 }
4080 #endif
4081 EOF
4082           # Now try linking the two files.
4083           mv conftest.$ac_objext conftstm.$ac_objext
4084           save_LIBS="$LIBS"
4085           save_CFLAGS="$CFLAGS"
4086           LIBS="conftstm.$ac_objext"
4087           CFLAGS="$CFLAGS$no_builtin_flag"
4088           if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4089             pipe_works=yes
4090           fi
4091           LIBS="$save_LIBS"
4092           CFLAGS="$save_CFLAGS"
4093         else
4094           echo "cannot find nm_test_func in $nlist" >&5
4095         fi
4096       else
4097         echo "cannot find nm_test_var in $nlist" >&5
4098       fi
4099     else
4100       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4101     fi
4102   else
4103     echo "$progname: failed program was:" >&5
4104     cat conftest.$ac_ext >&5
4105   fi
4106   rm -f conftest* conftst*
4107
4108   # Do not use the global_symbol_pipe unless it works.
4109   if test "$pipe_works" = yes; then
4110     break
4111   else
4112     lt_cv_sys_global_symbol_pipe=
4113   fi
4114 done
4115
4116 fi
4117
4118 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4119 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4120   global_symbol_to_cdecl=
4121   global_symbol_to_c_name_address=
4122 else
4123   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4124   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4125 fi
4126 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4127 then
4128   echo "$ac_t""failed" 1>&6
4129 else
4130   echo "$ac_t""ok" 1>&6
4131 fi
4132
4133 for ac_hdr in dlfcn.h
4134 do
4135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4137 echo "configure:4138: checking for $ac_hdr" >&5
4138 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4139   echo $ac_n "(cached) $ac_c" 1>&6
4140 else
4141   cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 #include <$ac_hdr>
4145 EOF
4146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4147 { (eval echo configure:4148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4149 if test -z "$ac_err"; then
4150   rm -rf conftest*
4151   eval "ac_cv_header_$ac_safe=yes"
4152 else
4153   echo "$ac_err" >&5
4154   echo "configure: failed program was:" >&5
4155   cat conftest.$ac_ext >&5
4156   rm -rf conftest*
4157   eval "ac_cv_header_$ac_safe=no"
4158 fi
4159 rm -f conftest*
4160 fi
4161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4162   echo "$ac_t""yes" 1>&6
4163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4164   cat >> confdefs.h <<EOF
4165 #define $ac_tr_hdr 1
4166 EOF
4167  
4168 else
4169   echo "$ac_t""no" 1>&6
4170 fi
4171 done
4172
4173
4174
4175
4176
4177
4178 # Only perform the check for file, if the check method requires it
4179 case $deplibs_check_method in
4180 file_magic*)
4181   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4182     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4183 echo "configure:4184: checking for ${ac_tool_prefix}file" >&5
4184 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4185   echo $ac_n "(cached) $ac_c" 1>&6
4186 else
4187   case $MAGIC_CMD in
4188   /*)
4189   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4190   ;;
4191   ?:/*)
4192   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4193   ;;
4194   *)
4195   ac_save_MAGIC_CMD="$MAGIC_CMD"
4196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4197   ac_dummy="/usr/bin:$PATH"
4198   for ac_dir in $ac_dummy; do
4199     test -z "$ac_dir" && ac_dir=.
4200     if test -f $ac_dir/${ac_tool_prefix}file; then
4201       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4202       if test -n "$file_magic_test_file"; then
4203         case $deplibs_check_method in
4204         "file_magic "*)
4205           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4206           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4207           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4208             egrep "$file_magic_regex" > /dev/null; then
4209             :
4210           else
4211             cat <<EOF 1>&2
4212
4213 *** Warning: the command libtool uses to detect shared libraries,
4214 *** $file_magic_cmd, produces output that libtool cannot recognize.
4215 *** The result is that libtool may fail to recognize shared libraries
4216 *** as such.  This will affect the creation of libtool libraries that
4217 *** depend on shared libraries, but programs linked with such libtool
4218 *** libraries will work regardless of this problem.  Nevertheless, you
4219 *** may want to report the problem to your system manager and/or to
4220 *** bug-libtool@gnu.org
4221
4222 EOF
4223           fi ;;
4224         esac
4225       fi
4226       break
4227     fi
4228   done
4229   IFS="$ac_save_ifs"
4230   MAGIC_CMD="$ac_save_MAGIC_CMD"
4231   ;;
4232 esac
4233 fi
4234
4235 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4236 if test -n "$MAGIC_CMD"; then
4237   echo "$ac_t""$MAGIC_CMD" 1>&6
4238 else
4239   echo "$ac_t""no" 1>&6
4240 fi
4241
4242 if test -z "$lt_cv_path_MAGIC_CMD"; then
4243   if test -n "$ac_tool_prefix"; then
4244     echo $ac_n "checking for file""... $ac_c" 1>&6
4245 echo "configure:4246: checking for file" >&5
4246 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   case $MAGIC_CMD in
4250   /*)
4251   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4252   ;;
4253   ?:/*)
4254   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4255   ;;
4256   *)
4257   ac_save_MAGIC_CMD="$MAGIC_CMD"
4258   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4259   ac_dummy="/usr/bin:$PATH"
4260   for ac_dir in $ac_dummy; do
4261     test -z "$ac_dir" && ac_dir=.
4262     if test -f $ac_dir/file; then
4263       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4264       if test -n "$file_magic_test_file"; then
4265         case $deplibs_check_method in
4266         "file_magic "*)
4267           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4268           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4269           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4270             egrep "$file_magic_regex" > /dev/null; then
4271             :
4272           else
4273             cat <<EOF 1>&2
4274
4275 *** Warning: the command libtool uses to detect shared libraries,
4276 *** $file_magic_cmd, produces output that libtool cannot recognize.
4277 *** The result is that libtool may fail to recognize shared libraries
4278 *** as such.  This will affect the creation of libtool libraries that
4279 *** depend on shared libraries, but programs linked with such libtool
4280 *** libraries will work regardless of this problem.  Nevertheless, you
4281 *** may want to report the problem to your system manager and/or to
4282 *** bug-libtool@gnu.org
4283
4284 EOF
4285           fi ;;
4286         esac
4287       fi
4288       break
4289     fi
4290   done
4291   IFS="$ac_save_ifs"
4292   MAGIC_CMD="$ac_save_MAGIC_CMD"
4293   ;;
4294 esac
4295 fi
4296
4297 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4298 if test -n "$MAGIC_CMD"; then
4299   echo "$ac_t""$MAGIC_CMD" 1>&6
4300 else
4301   echo "$ac_t""no" 1>&6
4302 fi
4303
4304   else
4305     MAGIC_CMD=:
4306   fi
4307 fi
4308
4309   fi
4310   ;;
4311 esac
4312
4313 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4314 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4316 echo "configure:4317: checking for $ac_word" >&5
4317 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   if test -n "$RANLIB"; then
4321   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4322 else
4323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4324   ac_dummy="$PATH"
4325   for ac_dir in $ac_dummy; do
4326     test -z "$ac_dir" && ac_dir=.
4327     if test -f $ac_dir/$ac_word; then
4328       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4329       break
4330     fi
4331   done
4332   IFS="$ac_save_ifs"
4333 fi
4334 fi
4335 RANLIB="$ac_cv_prog_RANLIB"
4336 if test -n "$RANLIB"; then
4337   echo "$ac_t""$RANLIB" 1>&6
4338 else
4339   echo "$ac_t""no" 1>&6
4340 fi
4341
4342
4343 if test -z "$ac_cv_prog_RANLIB"; then
4344 if test -n "$ac_tool_prefix"; then
4345   # Extract the first word of "ranlib", so it can be a program name with args.
4346 set dummy ranlib; ac_word=$2
4347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4348 echo "configure:4349: checking for $ac_word" >&5
4349 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4350   echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352   if test -n "$RANLIB"; then
4353   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4354 else
4355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4356   ac_dummy="$PATH"
4357   for ac_dir in $ac_dummy; do
4358     test -z "$ac_dir" && ac_dir=.
4359     if test -f $ac_dir/$ac_word; then
4360       ac_cv_prog_RANLIB="ranlib"
4361       break
4362     fi
4363   done
4364   IFS="$ac_save_ifs"
4365   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4366 fi
4367 fi
4368 RANLIB="$ac_cv_prog_RANLIB"
4369 if test -n "$RANLIB"; then
4370   echo "$ac_t""$RANLIB" 1>&6
4371 else
4372   echo "$ac_t""no" 1>&6
4373 fi
4374
4375 else
4376   RANLIB=":"
4377 fi
4378 fi
4379
4380 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4381 set dummy ${ac_tool_prefix}strip; ac_word=$2
4382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4383 echo "configure:4384: checking for $ac_word" >&5
4384 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4385   echo $ac_n "(cached) $ac_c" 1>&6
4386 else
4387   if test -n "$STRIP"; then
4388   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4389 else
4390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4391   ac_dummy="$PATH"
4392   for ac_dir in $ac_dummy; do
4393     test -z "$ac_dir" && ac_dir=.
4394     if test -f $ac_dir/$ac_word; then
4395       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4396       break
4397     fi
4398   done
4399   IFS="$ac_save_ifs"
4400 fi
4401 fi
4402 STRIP="$ac_cv_prog_STRIP"
4403 if test -n "$STRIP"; then
4404   echo "$ac_t""$STRIP" 1>&6
4405 else
4406   echo "$ac_t""no" 1>&6
4407 fi
4408
4409
4410 if test -z "$ac_cv_prog_STRIP"; then
4411 if test -n "$ac_tool_prefix"; then
4412   # Extract the first word of "strip", so it can be a program name with args.
4413 set dummy strip; ac_word=$2
4414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4415 echo "configure:4416: checking for $ac_word" >&5
4416 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4417   echo $ac_n "(cached) $ac_c" 1>&6
4418 else
4419   if test -n "$STRIP"; then
4420   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4421 else
4422   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4423   ac_dummy="$PATH"
4424   for ac_dir in $ac_dummy; do
4425     test -z "$ac_dir" && ac_dir=.
4426     if test -f $ac_dir/$ac_word; then
4427       ac_cv_prog_STRIP="strip"
4428       break
4429     fi
4430   done
4431   IFS="$ac_save_ifs"
4432   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4433 fi
4434 fi
4435 STRIP="$ac_cv_prog_STRIP"
4436 if test -n "$STRIP"; then
4437   echo "$ac_t""$STRIP" 1>&6
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441
4442 else
4443   STRIP=":"
4444 fi
4445 fi
4446
4447
4448 enable_dlopen=yes
4449 enable_win32_dll=yes
4450
4451 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4452 if test "${enable_libtool_lock+set}" = set; then
4453   enableval="$enable_libtool_lock"
4454   :
4455 fi
4456
4457 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4458
4459 # Some flags need to be propagated to the compiler or linker for good
4460 # libtool support.
4461 case $host in
4462 *-*-irix6*)
4463   # Find out which ABI we are using.
4464   echo '#line 4465 "configure"' > conftest.$ac_ext
4465   if { (eval echo configure:4466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4466     case `/usr/bin/file conftest.$ac_objext` in
4467     *32-bit*)
4468       LD="${LD-ld} -32"
4469       ;;
4470     *N32*)
4471       LD="${LD-ld} -n32"
4472       ;;
4473     *64-bit*)
4474       LD="${LD-ld} -64"
4475       ;;
4476     esac
4477   fi
4478   rm -rf conftest*
4479   ;;
4480
4481 *-*-sco3.2v5*)
4482   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4483   SAVE_CFLAGS="$CFLAGS"
4484   CFLAGS="$CFLAGS -belf"
4485   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4486 echo "configure:4487: checking whether the C compiler needs -belf" >&5
4487 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4488   echo $ac_n "(cached) $ac_c" 1>&6
4489 else
4490   
4491      ac_ext=c
4492 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4493 ac_cpp='$CPP $CPPFLAGS'
4494 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4495 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4496 cross_compiling=$ac_cv_prog_cc_cross
4497
4498      cat > conftest.$ac_ext <<EOF
4499 #line 4500 "configure"
4500 #include "confdefs.h"
4501
4502 int main() {
4503
4504 ; return 0; }
4505 EOF
4506 if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4507   rm -rf conftest*
4508   lt_cv_cc_needs_belf=yes
4509 else
4510   echo "configure: failed program was:" >&5
4511   cat conftest.$ac_ext >&5
4512   rm -rf conftest*
4513   lt_cv_cc_needs_belf=no
4514 fi
4515 rm -f conftest*
4516      ac_ext=c
4517 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4518 ac_cpp='$CPP $CPPFLAGS'
4519 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4520 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4521 cross_compiling=$ac_cv_prog_cc_cross
4522
4523 fi
4524
4525 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4526   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4527     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4528     CFLAGS="$SAVE_CFLAGS"
4529   fi
4530   ;;
4531
4532 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4533   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4534 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4536 echo "configure:4537: checking for $ac_word" >&5
4537 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4538   echo $ac_n "(cached) $ac_c" 1>&6
4539 else
4540   if test -n "$DLLTOOL"; then
4541   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4542 else
4543   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4544   ac_dummy="$PATH"
4545   for ac_dir in $ac_dummy; do
4546     test -z "$ac_dir" && ac_dir=.
4547     if test -f $ac_dir/$ac_word; then
4548       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4549       break
4550     fi
4551   done
4552   IFS="$ac_save_ifs"
4553 fi
4554 fi
4555 DLLTOOL="$ac_cv_prog_DLLTOOL"
4556 if test -n "$DLLTOOL"; then
4557   echo "$ac_t""$DLLTOOL" 1>&6
4558 else
4559   echo "$ac_t""no" 1>&6
4560 fi
4561
4562
4563 if test -z "$ac_cv_prog_DLLTOOL"; then
4564 if test -n "$ac_tool_prefix"; then
4565   # Extract the first word of "dlltool", so it can be a program name with args.
4566 set dummy dlltool; ac_word=$2
4567 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4568 echo "configure:4569: checking for $ac_word" >&5
4569 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4570   echo $ac_n "(cached) $ac_c" 1>&6
4571 else
4572   if test -n "$DLLTOOL"; then
4573   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4574 else
4575   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4576   ac_dummy="$PATH"
4577   for ac_dir in $ac_dummy; do
4578     test -z "$ac_dir" && ac_dir=.
4579     if test -f $ac_dir/$ac_word; then
4580       ac_cv_prog_DLLTOOL="dlltool"
4581       break
4582     fi
4583   done
4584   IFS="$ac_save_ifs"
4585   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4586 fi
4587 fi
4588 DLLTOOL="$ac_cv_prog_DLLTOOL"
4589 if test -n "$DLLTOOL"; then
4590   echo "$ac_t""$DLLTOOL" 1>&6
4591 else
4592   echo "$ac_t""no" 1>&6
4593 fi
4594
4595 else
4596   DLLTOOL="false"
4597 fi
4598 fi
4599
4600   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4601 set dummy ${ac_tool_prefix}as; ac_word=$2
4602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4603 echo "configure:4604: checking for $ac_word" >&5
4604 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4605   echo $ac_n "(cached) $ac_c" 1>&6
4606 else
4607   if test -n "$AS"; then
4608   ac_cv_prog_AS="$AS" # Let the user override the test.
4609 else
4610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4611   ac_dummy="$PATH"
4612   for ac_dir in $ac_dummy; do
4613     test -z "$ac_dir" && ac_dir=.
4614     if test -f $ac_dir/$ac_word; then
4615       ac_cv_prog_AS="${ac_tool_prefix}as"
4616       break
4617     fi
4618   done
4619   IFS="$ac_save_ifs"
4620 fi
4621 fi
4622 AS="$ac_cv_prog_AS"
4623 if test -n "$AS"; then
4624   echo "$ac_t""$AS" 1>&6
4625 else
4626   echo "$ac_t""no" 1>&6
4627 fi
4628
4629
4630 if test -z "$ac_cv_prog_AS"; then
4631 if test -n "$ac_tool_prefix"; then
4632   # Extract the first word of "as", so it can be a program name with args.
4633 set dummy as; ac_word=$2
4634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4635 echo "configure:4636: checking for $ac_word" >&5
4636 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4637   echo $ac_n "(cached) $ac_c" 1>&6
4638 else
4639   if test -n "$AS"; then
4640   ac_cv_prog_AS="$AS" # Let the user override the test.
4641 else
4642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4643   ac_dummy="$PATH"
4644   for ac_dir in $ac_dummy; do
4645     test -z "$ac_dir" && ac_dir=.
4646     if test -f $ac_dir/$ac_word; then
4647       ac_cv_prog_AS="as"
4648       break
4649     fi
4650   done
4651   IFS="$ac_save_ifs"
4652   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4653 fi
4654 fi
4655 AS="$ac_cv_prog_AS"
4656 if test -n "$AS"; then
4657   echo "$ac_t""$AS" 1>&6
4658 else
4659   echo "$ac_t""no" 1>&6
4660 fi
4661
4662 else
4663   AS="false"
4664 fi
4665 fi
4666
4667   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4670 echo "configure:4671: checking for $ac_word" >&5
4671 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   if test -n "$OBJDUMP"; then
4675   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4676 else
4677   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4678   ac_dummy="$PATH"
4679   for ac_dir in $ac_dummy; do
4680     test -z "$ac_dir" && ac_dir=.
4681     if test -f $ac_dir/$ac_word; then
4682       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4683       break
4684     fi
4685   done
4686   IFS="$ac_save_ifs"
4687 fi
4688 fi
4689 OBJDUMP="$ac_cv_prog_OBJDUMP"
4690 if test -n "$OBJDUMP"; then
4691   echo "$ac_t""$OBJDUMP" 1>&6
4692 else
4693   echo "$ac_t""no" 1>&6
4694 fi
4695
4696
4697 if test -z "$ac_cv_prog_OBJDUMP"; then
4698 if test -n "$ac_tool_prefix"; then
4699   # Extract the first word of "objdump", so it can be a program name with args.
4700 set dummy objdump; ac_word=$2
4701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4702 echo "configure:4703: checking for $ac_word" >&5
4703 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4704   echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706   if test -n "$OBJDUMP"; then
4707   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4708 else
4709   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4710   ac_dummy="$PATH"
4711   for ac_dir in $ac_dummy; do
4712     test -z "$ac_dir" && ac_dir=.
4713     if test -f $ac_dir/$ac_word; then
4714       ac_cv_prog_OBJDUMP="objdump"
4715       break
4716     fi
4717   done
4718   IFS="$ac_save_ifs"
4719   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4720 fi
4721 fi
4722 OBJDUMP="$ac_cv_prog_OBJDUMP"
4723 if test -n "$OBJDUMP"; then
4724   echo "$ac_t""$OBJDUMP" 1>&6
4725 else
4726   echo "$ac_t""no" 1>&6
4727 fi
4728
4729 else
4730   OBJDUMP="false"
4731 fi
4732 fi
4733
4734
4735   # recent cygwin and mingw systems supply a stub DllMain which the user
4736   # can override, but on older systems we have to supply one
4737   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4738 echo "configure:4739: checking if libtool should supply DllMain function" >&5
4739 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4740   echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742   cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745
4746 int main() {
4747 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4748       DllMain (0, 0, 0);
4749 ; return 0; }
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4752   rm -rf conftest*
4753   lt_cv_need_dllmain=no
4754 else
4755   echo "configure: failed program was:" >&5
4756   cat conftest.$ac_ext >&5
4757   rm -rf conftest*
4758   lt_cv_need_dllmain=yes
4759 fi
4760 rm -f conftest*
4761 fi
4762
4763 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4764
4765   case $host/$CC in
4766   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4767     # old mingw systems require "-dll" to link a DLL, while more recent ones
4768     # require "-mdll"
4769     SAVE_CFLAGS="$CFLAGS"
4770     CFLAGS="$CFLAGS -mdll"
4771     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4772 echo "configure:4773: checking how to link DLLs" >&5
4773 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4774   echo $ac_n "(cached) $ac_c" 1>&6
4775 else
4776   cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779
4780 int main() {
4781
4782 ; return 0; }
4783 EOF
4784 if { (eval echo configure:4785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4785   rm -rf conftest*
4786   lt_cv_cc_dll_switch=-mdll
4787 else
4788   echo "configure: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790   rm -rf conftest*
4791   lt_cv_cc_dll_switch=-dll
4792 fi
4793 rm -f conftest*
4794 fi
4795
4796 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4797     CFLAGS="$SAVE_CFLAGS" ;;
4798   *-*-cygwin* | *-*-pw32*)
4799     # cygwin systems need to pass --dll to the linker, and not link
4800     # crt.o which will require a WinMain@16 definition.
4801     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4802   esac
4803   ;;
4804   
4805 esac
4806
4807 # Sed substitution that helps us do robust quoting.  It backslashifies
4808 # metacharacters that are still active within double-quoted strings.
4809 Xsed='sed -e s/^X//'
4810 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4811
4812 # Same as above, but do not quote variable references.
4813 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4814
4815 # Sed substitution to delay expansion of an escaped shell variable in a
4816 # double_quote_subst'ed string.
4817 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4818
4819 # Constants:
4820 rm="rm -f"
4821
4822 # Global variables:
4823 default_ofile=libtool
4824 can_build_shared=yes
4825
4826 # All known linkers require a `.a' archive for static linking (except M$VC,
4827 # which needs '.lib').
4828 libext=a
4829 ltmain="$ac_aux_dir/ltmain.sh"
4830 ofile="$default_ofile"
4831 with_gnu_ld="$lt_cv_prog_gnu_ld"
4832 need_locks="$enable_libtool_lock"
4833
4834 old_CC="$CC"
4835 old_CFLAGS="$CFLAGS"
4836
4837 # Set sane defaults for various variables
4838 test -z "$AR" && AR=ar
4839 test -z "$AR_FLAGS" && AR_FLAGS=cru
4840 test -z "$AS" && AS=as
4841 test -z "$CC" && CC=cc
4842 test -z "$DLLTOOL" && DLLTOOL=dlltool
4843 test -z "$LD" && LD=ld
4844 test -z "$LN_S" && LN_S="ln -s"
4845 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4846 test -z "$NM" && NM=nm
4847 test -z "$OBJDUMP" && OBJDUMP=objdump
4848 test -z "$RANLIB" && RANLIB=:
4849 test -z "$STRIP" && STRIP=:
4850 test -z "$ac_objext" && ac_objext=o
4851
4852 if test x"$host" != x"$build"; then
4853   ac_tool_prefix=${host_alias}-
4854 else
4855   ac_tool_prefix=
4856 fi
4857
4858 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4859 case $host_os in
4860 linux-gnu*) ;;
4861 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4862 esac
4863
4864 case $host_os in
4865 aix3*)
4866   # AIX sometimes has problems with the GCC collect2 program.  For some
4867   # reason, if we set the COLLECT_NAMES environment variable, the problems
4868   # vanish in a puff of smoke.
4869   if test "X${COLLECT_NAMES+set}" != Xset; then
4870     COLLECT_NAMES=
4871     export COLLECT_NAMES
4872   fi
4873   ;;
4874 esac
4875
4876 # Determine commands to create old-style static archives.
4877 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4878 old_postinstall_cmds='chmod 644 $oldlib'
4879 old_postuninstall_cmds=
4880
4881 if test -n "$RANLIB"; then
4882   case $host_os in
4883   openbsd*)
4884     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4885     ;;
4886   *)
4887     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4888     ;;
4889   esac
4890   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4891 fi
4892
4893 # Allow CC to be a program name with arguments.
4894 set dummy $CC
4895 compiler="$2"
4896
4897 ## FIXME: this should be a separate macro
4898 ##
4899 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4900 echo "configure:4901: checking for objdir" >&5
4901 rm -f .libs 2>/dev/null
4902 mkdir .libs 2>/dev/null
4903 if test -d .libs; then
4904   objdir=.libs
4905 else
4906   # MS-DOS does not allow filenames that begin with a dot.
4907   objdir=_libs
4908 fi
4909 rmdir .libs 2>/dev/null
4910 echo "$ac_t""$objdir" 1>&6
4911 ##
4912 ## END FIXME
4913
4914
4915 ## FIXME: this should be a separate macro
4916 ##
4917 # Check whether --with-pic or --without-pic was given.
4918 if test "${with_pic+set}" = set; then
4919   withval="$with_pic"
4920   pic_mode="$withval"
4921 else
4922   pic_mode=default
4923 fi
4924
4925 test -z "$pic_mode" && pic_mode=default
4926
4927 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4928 # in isolation, and that seeing it set (from the cache) indicates that
4929 # the associated values are set (in the cache) correctly too.
4930 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4931 echo "configure:4932: checking for $compiler option to produce PIC" >&5
4932 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4933   echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935    lt_cv_prog_cc_pic=
4936   lt_cv_prog_cc_shlib=
4937   lt_cv_prog_cc_wl=
4938   lt_cv_prog_cc_static=
4939   lt_cv_prog_cc_no_builtin=
4940   lt_cv_prog_cc_can_build_shared=$can_build_shared
4941
4942   if test "$GCC" = yes; then
4943     lt_cv_prog_cc_wl='-Wl,'
4944     lt_cv_prog_cc_static='-static'
4945
4946     case $host_os in
4947     aix*)
4948       # Below there is a dirty hack to force normal static linking with -ldl
4949       # The problem is because libdl dynamically linked with both libc and
4950       # libC (AIX C++ library), which obviously doesn't included in libraries
4951       # list by gcc. This cause undefined symbols with -static flags.
4952       # This hack allows C programs to be linked with "-static -ldl", but
4953       # not sure about C++ programs.
4954       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4955       ;;
4956     amigaos*)
4957       # FIXME: we need at least 68020 code to build shared libraries, but
4958       # adding the `-m68020' flag to GCC prevents building anything better,
4959       # like `-m68040'.
4960       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4961       ;;
4962     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4963       # PIC is the default for these OSes.
4964       ;;
4965     darwin* | rhapsody*)
4966       # PIC is the default on this platform
4967       # Common symbols not allowed in MH_DYLIB files
4968       lt_cv_prog_cc_pic='-fno-common'
4969       ;;
4970     cygwin* | mingw* | pw32* | os2*)
4971       # This hack is so that the source file can tell whether it is being
4972       # built for inclusion in a dll (and should export symbols for example).
4973       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4974       ;;
4975     sysv4*MP*)
4976       if test -d /usr/nec; then
4977          lt_cv_prog_cc_pic=-Kconform_pic
4978       fi
4979       ;;
4980     *)
4981       lt_cv_prog_cc_pic='-fPIC'
4982       ;;
4983     esac
4984   else
4985     # PORTME Check for PIC flags for the system compiler.
4986     case $host_os in
4987     aix3* | aix4* | aix5*)
4988       lt_cv_prog_cc_wl='-Wl,'
4989       # All AIX code is PIC.
4990       if test "$host_cpu" = ia64; then
4991         # AIX 5 now supports IA64 processor
4992         lt_cv_prog_cc_static='-Bstatic'
4993       else
4994         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4995       fi
4996       ;;
4997
4998     hpux9* | hpux10* | hpux11*)
4999       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5000       lt_cv_prog_cc_wl='-Wl,'
5001       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5002       lt_cv_prog_cc_pic='+Z'
5003       ;;
5004
5005     irix5* | irix6* | nonstopux*)
5006       lt_cv_prog_cc_wl='-Wl,'
5007       lt_cv_prog_cc_static='-non_shared'
5008       # PIC (with -KPIC) is the default.
5009       ;;
5010
5011     cygwin* | mingw* | pw32* | os2*)
5012       # This hack is so that the source file can tell whether it is being
5013       # built for inclusion in a dll (and should export symbols for example).
5014       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5015       ;;
5016
5017     newsos6)
5018       lt_cv_prog_cc_pic='-KPIC'
5019       lt_cv_prog_cc_static='-Bstatic'
5020       ;;
5021
5022     osf3* | osf4* | osf5*)
5023       # All OSF/1 code is PIC.
5024       lt_cv_prog_cc_wl='-Wl,'
5025       lt_cv_prog_cc_static='-non_shared'
5026       ;;
5027
5028     sco3.2v5*)
5029       lt_cv_prog_cc_pic='-Kpic'
5030       lt_cv_prog_cc_static='-dn'
5031       lt_cv_prog_cc_shlib='-belf'
5032       ;;
5033
5034     solaris*)
5035       lt_cv_prog_cc_pic='-KPIC'
5036       lt_cv_prog_cc_static='-Bstatic'
5037       lt_cv_prog_cc_wl='-Wl,'
5038       ;;
5039
5040     sunos4*)
5041       lt_cv_prog_cc_pic='-PIC'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       lt_cv_prog_cc_wl='-Qoption ld '
5044       ;;
5045
5046     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5047       lt_cv_prog_cc_pic='-KPIC'
5048       lt_cv_prog_cc_static='-Bstatic'
5049       lt_cv_prog_cc_wl='-Wl,'
5050       ;;
5051
5052     uts4*)
5053       lt_cv_prog_cc_pic='-pic'
5054       lt_cv_prog_cc_static='-Bstatic'
5055       ;;
5056
5057     sysv4*MP*)
5058       if test -d /usr/nec ;then
5059         lt_cv_prog_cc_pic='-Kconform_pic'
5060         lt_cv_prog_cc_static='-Bstatic'
5061       fi
5062       ;;
5063
5064     *)
5065       lt_cv_prog_cc_can_build_shared=no
5066       ;;
5067     esac
5068   fi
5069
5070 fi
5071
5072 if test -z "$lt_cv_prog_cc_pic"; then
5073   echo "$ac_t""none" 1>&6
5074 else
5075   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5076
5077   # Check to make sure the pic_flag actually works.
5078   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5079 echo "configure:5080: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5080   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5081   echo $ac_n "(cached) $ac_c" 1>&6
5082 else
5083       save_CFLAGS="$CFLAGS"
5084     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5085     cat > conftest.$ac_ext <<EOF
5086 #line 5087 "configure"
5087 #include "confdefs.h"
5088
5089 int main() {
5090
5091 ; return 0; }
5092 EOF
5093 if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5094   rm -rf conftest*
5095         case $host_os in
5096       hpux9* | hpux10* | hpux11*)
5097         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5098         # they create non-PIC objects.  So, if there were any warnings, we
5099         # assume that PIC is not supported.
5100         if test -s conftest.err; then
5101           lt_cv_prog_cc_pic_works=no
5102         else
5103           lt_cv_prog_cc_pic_works=yes
5104         fi
5105         ;;
5106       *)
5107         lt_cv_prog_cc_pic_works=yes
5108         ;;
5109       esac
5110     
5111 else
5112   echo "configure: failed program was:" >&5
5113   cat conftest.$ac_ext >&5
5114   rm -rf conftest*
5115         lt_cv_prog_cc_pic_works=no
5116     
5117 fi
5118 rm -f conftest*
5119     CFLAGS="$save_CFLAGS"
5120   
5121 fi
5122
5123
5124   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5125     lt_cv_prog_cc_pic=
5126     lt_cv_prog_cc_can_build_shared=no
5127   else
5128     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5129   fi
5130
5131   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5132 fi
5133 ##
5134 ## END FIXME
5135
5136 # Check for any special shared library compilation flags.
5137 if test -n "$lt_cv_prog_cc_shlib"; then
5138   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5139   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5140   else
5141    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5142     lt_cv_prog_cc_can_build_shared=no
5143   fi
5144 fi
5145
5146 ## FIXME: this should be a separate macro
5147 ##
5148 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5149 echo "configure:5150: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5150 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5151   echo $ac_n "(cached) $ac_c" 1>&6
5152 else
5153     lt_cv_prog_cc_static_works=no
5154   save_LDFLAGS="$LDFLAGS"
5155   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5156   cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159
5160 int main() {
5161
5162 ; return 0; }
5163 EOF
5164 if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165   rm -rf conftest*
5166   lt_cv_prog_cc_static_works=yes
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170 fi
5171 rm -f conftest*
5172   LDFLAGS="$save_LDFLAGS"
5173
5174 fi
5175
5176
5177 # Belt *and* braces to stop my trousers falling down:
5178 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5179 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5180
5181 pic_flag="$lt_cv_prog_cc_pic"
5182 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5183 wl="$lt_cv_prog_cc_wl"
5184 link_static_flag="$lt_cv_prog_cc_static"
5185 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5186 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5187 ##
5188 ## END FIXME
5189
5190
5191 ## FIXME: this should be a separate macro
5192 ##
5193 # Check to see if options -o and -c are simultaneously supported by compiler
5194 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5195 echo "configure:5196: checking if $compiler supports -c -o file.$ac_objext" >&5
5196 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   
5200 $rm -r conftest 2>/dev/null
5201 mkdir conftest
5202 cd conftest
5203 echo "int some_variable = 0;" > conftest.$ac_ext
5204 mkdir out
5205 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5206 # that will create temporary files in the current directory regardless of
5207 # the output directory.  Thus, making CWD read-only will cause this test
5208 # to fail, enabling locking or at least warning the user not to do parallel
5209 # builds.
5210 chmod -w .
5211 save_CFLAGS="$CFLAGS"
5212 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5213 compiler_c_o=no
5214 if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5215   # The compiler can only warn and ignore the option if not recognized
5216   # So say no if there are warnings
5217   if test -s out/conftest.err; then
5218     lt_cv_compiler_c_o=no
5219   else
5220     lt_cv_compiler_c_o=yes
5221   fi
5222 else
5223   # Append any errors to the config.log.
5224   cat out/conftest.err 1>&5
5225   lt_cv_compiler_c_o=no
5226 fi
5227 CFLAGS="$save_CFLAGS"
5228 chmod u+w .
5229 $rm conftest* out/*
5230 rmdir out
5231 cd ..
5232 rmdir conftest
5233 $rm -r conftest 2>/dev/null
5234
5235 fi
5236
5237 compiler_c_o=$lt_cv_compiler_c_o
5238 echo "$ac_t""$compiler_c_o" 1>&6
5239
5240 if test x"$compiler_c_o" = x"yes"; then
5241   # Check to see if we can write to a .lo
5242   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5243 echo "configure:5244: checking if $compiler supports -c -o file.lo" >&5
5244   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   
5248   lt_cv_compiler_o_lo=no
5249   save_CFLAGS="$CFLAGS"
5250   CFLAGS="$CFLAGS -c -o conftest.lo"
5251   save_objext="$ac_objext"
5252   ac_objext=lo
5253   cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256
5257 int main() {
5258 int some_variable = 0;
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5262   rm -rf conftest*
5263       # The compiler can only warn and ignore the option if not recognized
5264     # So say no if there are warnings
5265     if test -s conftest.err; then
5266       lt_cv_compiler_o_lo=no
5267     else
5268       lt_cv_compiler_o_lo=yes
5269     fi
5270   
5271 else
5272   echo "configure: failed program was:" >&5
5273   cat conftest.$ac_ext >&5
5274 fi
5275 rm -f conftest*
5276   ac_objext="$save_objext"
5277   CFLAGS="$save_CFLAGS"
5278   
5279 fi
5280
5281   compiler_o_lo=$lt_cv_compiler_o_lo
5282   echo "$ac_t""$compiler_o_lo" 1>&6
5283 else
5284   compiler_o_lo=no
5285 fi
5286 ##
5287 ## END FIXME
5288
5289 ## FIXME: this should be a separate macro
5290 ##
5291 # Check to see if we can do hard links to lock some files if needed
5292 hard_links="nottested"
5293 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5294   # do not overwrite the value of need_locks provided by the user
5295   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5296 echo "configure:5297: checking if we can lock with hard links" >&5
5297   hard_links=yes
5298   $rm conftest*
5299   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5300   touch conftest.a
5301   ln conftest.a conftest.b 2>&5 || hard_links=no
5302   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5303   echo "$ac_t""$hard_links" 1>&6
5304   if test "$hard_links" = no; then
5305     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5306     need_locks=warn
5307   fi
5308 else
5309   need_locks=no
5310 fi
5311 ##
5312 ## END FIXME
5313
5314 ## FIXME: this should be a separate macro
5315 ##
5316 if test "$GCC" = yes; then
5317   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5318   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5319 echo "configure:5320: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5320   echo "int some_variable = 0;" > conftest.$ac_ext
5321   save_CFLAGS="$CFLAGS"
5322   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5323   compiler_rtti_exceptions=no
5324   cat > conftest.$ac_ext <<EOF
5325 #line 5326 "configure"
5326 #include "confdefs.h"
5327
5328 int main() {
5329 int some_variable = 0;
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333   rm -rf conftest*
5334       # The compiler can only warn and ignore the option if not recognized
5335     # So say no if there are warnings
5336     if test -s conftest.err; then
5337       compiler_rtti_exceptions=no
5338     else
5339       compiler_rtti_exceptions=yes
5340     fi
5341   
5342 else
5343   echo "configure: failed program was:" >&5
5344   cat conftest.$ac_ext >&5
5345 fi
5346 rm -f conftest*
5347   CFLAGS="$save_CFLAGS"
5348   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5349
5350   if test "$compiler_rtti_exceptions" = "yes"; then
5351     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5352   else
5353     no_builtin_flag=' -fno-builtin'
5354   fi
5355 fi
5356 ##
5357 ## END FIXME
5358
5359 ## FIXME: this should be a separate macro
5360 ##
5361 # See if the linker supports building shared libraries.
5362 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5363 echo "configure:5364: checking whether the linker ($LD) supports shared libraries" >&5
5364
5365 allow_undefined_flag=
5366 no_undefined_flag=
5367 need_lib_prefix=unknown
5368 need_version=unknown
5369 # when you set need_version to no, make sure it does not cause -set_version
5370 # flags to be left without arguments
5371 archive_cmds=
5372 archive_expsym_cmds=
5373 old_archive_from_new_cmds=
5374 old_archive_from_expsyms_cmds=
5375 export_dynamic_flag_spec=
5376 whole_archive_flag_spec=
5377 thread_safe_flag_spec=
5378 hardcode_into_libs=no
5379 hardcode_libdir_flag_spec=
5380 hardcode_libdir_separator=
5381 hardcode_direct=no
5382 hardcode_minus_L=no
5383 hardcode_shlibpath_var=unsupported
5384 runpath_var=
5385 link_all_deplibs=unknown
5386 always_export_symbols=no
5387 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5388 # include_expsyms should be a list of space-separated symbols to be *always*
5389 # included in the symbol list
5390 include_expsyms=
5391 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5392 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5393 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5394 # as well as any symbol that contains `d'.
5395 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5396 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5397 # platforms (ab)use it in PIC code, but their linkers get confused if
5398 # the symbol is explicitly referenced.  Since portable code cannot
5399 # rely on this symbol name, it's probably fine to never include it in
5400 # preloaded symbol tables.
5401 extract_expsyms_cmds=
5402
5403 case $host_os in
5404 cygwin* | mingw* | pw32*)
5405   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5406   # When not using gcc, we currently assume that we are using
5407   # Microsoft Visual C++.
5408   if test "$GCC" != yes; then
5409     with_gnu_ld=no
5410   fi
5411   ;;
5412 openbsd*)
5413   with_gnu_ld=no
5414   ;;
5415 esac
5416
5417 ld_shlibs=yes
5418 if test "$with_gnu_ld" = yes; then
5419   # If archive_cmds runs LD, not CC, wlarc should be empty
5420   wlarc='${wl}'
5421
5422   # See if GNU ld supports shared libraries.
5423   case $host_os in
5424   aix3* | aix4* | aix5*)
5425     # On AIX, the GNU linker is very broken
5426     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5427     ld_shlibs=no
5428     cat <<EOF 1>&2
5429
5430 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5431 *** to be unable to reliably create shared libraries on AIX.
5432 *** Therefore, libtool is disabling shared libraries support.  If you
5433 *** really care for shared libraries, you may want to modify your PATH
5434 *** so that a non-GNU linker is found, and then restart.
5435
5436 EOF
5437     ;;
5438
5439   amigaos*)
5440     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)'
5441     hardcode_libdir_flag_spec='-L$libdir'
5442     hardcode_minus_L=yes
5443
5444     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5445     # that the semantics of dynamic libraries on AmigaOS, at least up
5446     # to version 4, is to share data among multiple programs linked
5447     # with the same dynamic library.  Since this doesn't match the
5448     # behavior of shared libraries on other platforms, we can use
5449     # them.
5450     ld_shlibs=no
5451     ;;
5452
5453   beos*)
5454     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5455       allow_undefined_flag=unsupported
5456       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5457       # support --undefined.  This deserves some investigation.  FIXME
5458       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5459     else
5460       ld_shlibs=no
5461     fi
5462     ;;
5463
5464   cygwin* | mingw* | pw32*)
5465     # hardcode_libdir_flag_spec is actually meaningless, as there is
5466     # no search path for DLLs.
5467     hardcode_libdir_flag_spec='-L$libdir'
5468     allow_undefined_flag=unsupported
5469     always_export_symbols=yes
5470
5471     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5472       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5473       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5474       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5475       else $CC -o impgen impgen.c ; fi)~
5476       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5477
5478     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5479
5480     # cygwin and mingw dlls have different entry points and sets of symbols
5481     # to exclude.
5482     # FIXME: what about values for MSVC?
5483     dll_entry=__cygwin_dll_entry@12
5484     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5485     case $host_os in
5486     mingw*)
5487       # mingw values
5488       dll_entry=_DllMainCRTStartup@12
5489       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5490       ;;
5491     esac
5492
5493     # mingw and cygwin differ, and it's simplest to just exclude the union
5494     # of the two symbol sets.
5495     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5496
5497     # recent cygwin and mingw systems supply a stub DllMain which the user
5498     # can override, but on older systems we have to supply one (in ltdll.c)
5499     if test "x$lt_cv_need_dllmain" = "xyes"; then
5500       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5501       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~
5502         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5503     else
5504       ltdll_obj=
5505       ltdll_cmds=
5506     fi
5507
5508     # Extract the symbol export list from an `--export-all' def file,
5509     # then regenerate the def file from the symbol export list, so that
5510     # the compiled dll only exports the symbol export list.
5511     # Be careful not to strip the DATA tag left be newer dlltools.
5512     export_symbols_cmds="$ltdll_cmds"'
5513       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5514       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5515
5516     # If the export-symbols file already is a .def file (1st line
5517     # is EXPORTS), use it as is.
5518     # If DATA tags from a recent dlltool are present, honour them!
5519     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5520         cp $export_symbols $output_objdir/$soname-def;
5521       else
5522         echo EXPORTS > $output_objdir/$soname-def;
5523         _lt_hint=1;
5524         cat $export_symbols | while read symbol; do
5525          set dummy \$symbol;
5526          case \$# in
5527            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5528            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5529            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5530          esac;
5531          _lt_hint=`expr 1 + \$_lt_hint`;
5532         done;
5533       fi~
5534       '"$ltdll_cmds"'
5535       $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~
5536       $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~
5537       $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~
5538       $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~
5539       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5540     ;;
5541
5542   netbsd*)
5543     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5544       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5545       wlarc=
5546     else
5547       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5548       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5549     fi
5550     ;;
5551
5552   solaris* | sysv5*)
5553     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5554       ld_shlibs=no
5555       cat <<EOF 1>&2
5556
5557 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5558 *** create shared libraries on Solaris systems.  Therefore, libtool
5559 *** is disabling shared libraries support.  We urge you to upgrade GNU
5560 *** binutils to release 2.9.1 or newer.  Another option is to modify
5561 *** your PATH or compiler configuration so that the native linker is
5562 *** used, and then restart.
5563
5564 EOF
5565     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5566       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5567       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5568     else
5569       ld_shlibs=no
5570     fi
5571     ;;
5572
5573   sunos4*)
5574     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5575     wlarc=
5576     hardcode_direct=yes
5577     hardcode_shlibpath_var=no
5578     ;;
5579
5580   *)
5581     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5582       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5583       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5584     else
5585       ld_shlibs=no
5586     fi
5587     ;;
5588   esac
5589
5590   if test "$ld_shlibs" = yes; then
5591     runpath_var=LD_RUN_PATH
5592     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5593     export_dynamic_flag_spec='${wl}--export-dynamic'
5594     case $host_os in
5595     cygwin* | mingw* | pw32*)
5596       # dlltool doesn't understand --whole-archive et. al.
5597       whole_archive_flag_spec=
5598       ;;
5599     *)
5600       # ancient GNU ld didn't support --whole-archive et. al.
5601       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5602         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5603       else
5604         whole_archive_flag_spec=
5605       fi
5606       ;;
5607     esac
5608   fi
5609 else
5610   # PORTME fill in a description of your system's linker (not GNU ld)
5611   case $host_os in
5612   aix3*)
5613     allow_undefined_flag=unsupported
5614     always_export_symbols=yes
5615     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'
5616     # Note: this linker hardcodes the directories in LIBPATH if there
5617     # are no directories specified by -L.
5618     hardcode_minus_L=yes
5619     if test "$GCC" = yes && test -z "$link_static_flag"; then
5620       # Neither direct hardcoding nor static linking is supported with a
5621       # broken collect2.
5622       hardcode_direct=unsupported
5623     fi
5624     ;;
5625
5626   aix4* | aix5*)
5627     if test "$host_cpu" = ia64; then
5628       # On IA64, the linker does run time linking by default, so we don't
5629       # have to do anything special.
5630       aix_use_runtimelinking=no
5631       exp_sym_flag='-Bexport'
5632       no_entry_flag=""
5633     else
5634       aix_use_runtimelinking=no
5635
5636       # Test if we are trying to use run time linking or normal
5637       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5638       # need to do runtime linking.
5639       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5640         for ld_flag in $LDFLAGS; do
5641           case $ld_flag in
5642           *-brtl*)
5643             aix_use_runtimelinking=yes
5644             break
5645           ;;
5646           esac
5647         done
5648       esac
5649
5650       exp_sym_flag='-bexport'
5651       no_entry_flag='-bnoentry'
5652     fi
5653
5654     # When large executables or shared objects are built, AIX ld can
5655     # have problems creating the table of contents.  If linking a library
5656     # or program results in "error TOC overflow" add -mminimal-toc to
5657     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5658     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5659
5660     hardcode_direct=yes
5661     archive_cmds=''
5662     hardcode_libdir_separator=':'
5663     if test "$GCC" = yes; then
5664       case $host_os in aix4.[012]|aix4.[012].*)
5665         collect2name=`${CC} -print-prog-name=collect2`
5666         if test -f "$collect2name" && \
5667           strings "$collect2name" | grep resolve_lib_name >/dev/null
5668         then
5669           # We have reworked collect2
5670           hardcode_direct=yes
5671         else
5672           # We have old collect2
5673           hardcode_direct=unsupported
5674           # It fails to find uninstalled libraries when the uninstalled
5675           # path is not listed in the libpath.  Setting hardcode_minus_L
5676           # to unsupported forces relinking
5677           hardcode_minus_L=yes
5678           hardcode_libdir_flag_spec='-L$libdir'
5679           hardcode_libdir_separator=
5680         fi
5681       esac
5682
5683       shared_flag='-shared'
5684     else
5685       # not using gcc
5686       if test "$host_cpu" = ia64; then
5687         shared_flag='${wl}-G'
5688       else
5689         if test "$aix_use_runtimelinking" = yes; then
5690           shared_flag='${wl}-G'
5691         else
5692           shared_flag='${wl}-bM:SRE'
5693         fi
5694       fi
5695     fi
5696
5697     # It seems that -bexpall can do strange things, so it is better to
5698     # generate a list of symbols to export.
5699     always_export_symbols=yes
5700     if test "$aix_use_runtimelinking" = yes; then
5701       # Warning - without using the other runtime loading flags (-brtl),
5702       # -berok will link without error, but may produce a broken library.
5703       allow_undefined_flag='-berok'
5704       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5705       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"
5706     else
5707       if test "$host_cpu" = ia64; then
5708         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5709         allow_undefined_flag="-z nodefs"
5710         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"
5711       else
5712         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5713         # Warning - without using the other run time loading flags,
5714         # -berok will link without error, but may produce a broken library.
5715         allow_undefined_flag='${wl}-berok'
5716         # This is a bit strange, but is similar to how AIX traditionally builds
5717         # it's shared libraries.
5718         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'
5719       fi
5720     fi
5721     ;;
5722
5723   amigaos*)
5724     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)'
5725     hardcode_libdir_flag_spec='-L$libdir'
5726     hardcode_minus_L=yes
5727     # see comment about different semantics on the GNU ld section
5728     ld_shlibs=no
5729     ;;
5730
5731   cygwin* | mingw* | pw32*)
5732     # When not using gcc, we currently assume that we are using
5733     # Microsoft Visual C++.
5734     # hardcode_libdir_flag_spec is actually meaningless, as there is
5735     # no search path for DLLs.
5736     hardcode_libdir_flag_spec=' '
5737     allow_undefined_flag=unsupported
5738     # Tell ltmain to make .lib files, not .a files.
5739     libext=lib
5740     # FIXME: Setting linknames here is a bad hack.
5741     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5742     # The linker will automatically build a .lib file if we build a DLL.
5743     old_archive_from_new_cmds='true'
5744     # FIXME: Should let the user specify the lib program.
5745     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5746     fix_srcfile_path='`cygpath -w "$srcfile"`'
5747     ;;
5748
5749   darwin* | rhapsody*)
5750     case "$host_os" in
5751     rhapsody* | darwin1.[012])
5752       allow_undefined_flag='-undefined suppress'
5753       ;;
5754     *) # Darwin 1.3 on
5755       allow_undefined_flag='-flat_namespace -undefined suppress'
5756       ;;
5757     esac
5758     # FIXME: Relying on posixy $() will cause problems for
5759     #        cross-compilation, but unfortunately the echo tests do not
5760     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5761     #        `"' quotes if we put them in here... so don't!
5762     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)'
5763     # We need to add '_' to the symbols in $export_symbols first
5764     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5765     hardcode_direct=yes
5766     hardcode_shlibpath_var=no
5767     whole_archive_flag_spec='-all_load $convenience'
5768     ;;
5769
5770   freebsd1*)
5771     ld_shlibs=no
5772     ;;
5773
5774   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5775   # support.  Future versions do this automatically, but an explicit c++rt0.o
5776   # does not break anything, and helps significantly (at the cost of a little
5777   # extra space).
5778   freebsd2.2*)
5779     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5780     hardcode_libdir_flag_spec='-R$libdir'
5781     hardcode_direct=yes
5782     hardcode_shlibpath_var=no
5783     ;;
5784
5785   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5786   freebsd2*)
5787     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5788     hardcode_direct=yes
5789     hardcode_minus_L=yes
5790     hardcode_shlibpath_var=no
5791     ;;
5792
5793   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5794   freebsd*)
5795     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5796     hardcode_libdir_flag_spec='-R$libdir'
5797     hardcode_direct=yes
5798     hardcode_shlibpath_var=no
5799     ;;
5800
5801   hpux9* | hpux10* | hpux11*)
5802     case $host_os in
5803     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' ;;
5804     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5805     esac
5806     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5807     hardcode_libdir_separator=:
5808     hardcode_direct=yes
5809     hardcode_minus_L=yes # Not in the search PATH, but as the default
5810                          # location of the library.
5811     export_dynamic_flag_spec='${wl}-E'
5812     ;;
5813
5814   irix5* | irix6* | nonstopux*)
5815     if test "$GCC" = yes; then
5816       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'
5817       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5818     else
5819       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'
5820       hardcode_libdir_flag_spec='-rpath $libdir'
5821     fi
5822     hardcode_libdir_separator=:
5823     link_all_deplibs=yes
5824     ;;
5825
5826   netbsd*)
5827     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5828       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5829     else
5830       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5831     fi
5832     hardcode_libdir_flag_spec='-R$libdir'
5833     hardcode_direct=yes
5834     hardcode_shlibpath_var=no
5835     ;;
5836
5837   newsos6)
5838     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5839     hardcode_direct=yes
5840     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5841     hardcode_libdir_separator=:
5842     hardcode_shlibpath_var=no
5843     ;;
5844
5845   openbsd*)
5846     hardcode_direct=yes
5847     hardcode_shlibpath_var=no
5848     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5849       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5850       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5851       export_dynamic_flag_spec='${wl}-E'
5852     else
5853       case "$host_os" in
5854       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5855         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5856         hardcode_libdir_flag_spec='-R$libdir'
5857         ;;
5858       *)
5859         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5860         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5861         ;;
5862       esac
5863     fi
5864     ;;
5865
5866   os2*)
5867     hardcode_libdir_flag_spec='-L$libdir'
5868     hardcode_minus_L=yes
5869     allow_undefined_flag=unsupported
5870     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'
5871     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5872     ;;
5873
5874   osf3*)
5875     if test "$GCC" = yes; then
5876       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5877       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'
5878     else
5879       allow_undefined_flag=' -expect_unresolved \*'
5880       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'
5881     fi
5882     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5883     hardcode_libdir_separator=:
5884     ;;
5885
5886   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5887     if test "$GCC" = yes; then
5888       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5889       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'
5890       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5891     else
5892       allow_undefined_flag=' -expect_unresolved \*'
5893       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'
5894       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5895       $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'
5896
5897       #Both c and cxx compiler support -rpath directly
5898       hardcode_libdir_flag_spec='-rpath $libdir'
5899     fi
5900     hardcode_libdir_separator=:
5901     ;;
5902
5903   sco3.2v5*)
5904     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5905     hardcode_shlibpath_var=no
5906     runpath_var=LD_RUN_PATH
5907     hardcode_runpath_var=yes
5908     export_dynamic_flag_spec='${wl}-Bexport'
5909     ;;
5910
5911   solaris*)
5912     # gcc --version < 3.0 without binutils cannot create self contained
5913     # shared libraries reliably, requiring libgcc.a to resolve some of
5914     # the object symbols generated in some cases.  Libraries that use
5915     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5916     # a copy of libgcc.a into every shared library to guarantee resolving
5917     # such symbols causes other problems:  According to Tim Van Holder
5918     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5919     # (to the application) exception stack for one thing.
5920     no_undefined_flag=' -z defs'
5921     if test "$GCC" = yes; then
5922       case `$CC --version 2>/dev/null` in
5923       [12].*)
5924         cat <<EOF 1>&2
5925
5926 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5927 *** create self contained shared libraries on Solaris systems, without
5928 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5929 *** -no-undefined support, which will at least allow you to build shared
5930 *** libraries.  However, you may find that when you link such libraries
5931 *** into an application without using GCC, you have to manually add
5932 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5933 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5934 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5935
5936 EOF
5937         no_undefined_flag=
5938         ;;
5939       esac
5940     fi
5941     # $CC -shared without GNU ld will not create a library from C++
5942     # object files and a static libstdc++, better avoid it by now
5943     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5944     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5945                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5946     hardcode_libdir_flag_spec='-R$libdir'
5947     hardcode_shlibpath_var=no
5948     case $host_os in
5949     solaris2.[0-5] | solaris2.[0-5].*) ;;
5950     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5951       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5952     esac
5953     link_all_deplibs=yes
5954     ;;
5955
5956   sunos4*)
5957     if test "x$host_vendor" = xsequent; then
5958       # Use $CC to link under sequent, because it throws in some extra .o
5959       # files that make .init and .fini sections work.
5960       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5961     else
5962       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5963     fi
5964     hardcode_libdir_flag_spec='-L$libdir'
5965     hardcode_direct=yes
5966     hardcode_minus_L=yes
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   sysv4)
5971     case $host_vendor in
5972       sni)
5973         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5974         hardcode_direct=yes # is this really true???
5975         ;;
5976       siemens)
5977         ## LD is ld it makes a PLAMLIB
5978         ## CC just makes a GrossModule.
5979         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5980         reload_cmds='$CC -r -o $output$reload_objs'
5981         hardcode_direct=no
5982         ;;
5983       motorola)
5984         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5985         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5986         ;;
5987     esac
5988     runpath_var='LD_RUN_PATH'
5989     hardcode_shlibpath_var=no
5990     ;;
5991
5992   sysv4.3*)
5993     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994     hardcode_shlibpath_var=no
5995     export_dynamic_flag_spec='-Bexport'
5996     ;;
5997
5998   sysv5*)
5999     no_undefined_flag=' -z text'
6000     # $CC -shared without GNU ld will not create a library from C++
6001     # object files and a static libstdc++, better avoid it by now
6002     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6003     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6004                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6005     hardcode_libdir_flag_spec=
6006     hardcode_shlibpath_var=no
6007     runpath_var='LD_RUN_PATH'
6008     ;;
6009
6010   uts4*)
6011     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6012     hardcode_libdir_flag_spec='-L$libdir'
6013     hardcode_shlibpath_var=no
6014     ;;
6015
6016   dgux*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_libdir_flag_spec='-L$libdir'
6019     hardcode_shlibpath_var=no
6020     ;;
6021
6022   sysv4*MP*)
6023     if test -d /usr/nec; then
6024       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6025       hardcode_shlibpath_var=no
6026       runpath_var=LD_RUN_PATH
6027       hardcode_runpath_var=yes
6028       ld_shlibs=yes
6029     fi
6030     ;;
6031
6032   sysv4.2uw2*)
6033     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6034     hardcode_direct=yes
6035     hardcode_minus_L=no
6036     hardcode_shlibpath_var=no
6037     hardcode_runpath_var=yes
6038     runpath_var=LD_RUN_PATH
6039     ;;
6040
6041   sysv5uw7* | unixware7*)
6042     no_undefined_flag='${wl}-z ${wl}text'
6043     if test "$GCC" = yes; then
6044       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6045     else
6046       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6047     fi
6048     runpath_var='LD_RUN_PATH'
6049     hardcode_shlibpath_var=no
6050     ;;
6051
6052   *)
6053     ld_shlibs=no
6054     ;;
6055   esac
6056 fi
6057 echo "$ac_t""$ld_shlibs" 1>&6
6058 test "$ld_shlibs" = no && can_build_shared=no
6059 ##
6060 ## END FIXME
6061
6062 ## FIXME: this should be a separate macro
6063 ##
6064 # Check hardcoding attributes.
6065 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6066 echo "configure:6067: checking how to hardcode library paths into programs" >&5
6067 hardcode_action=
6068 if test -n "$hardcode_libdir_flag_spec" || \
6069    test -n "$runpath_var"; then
6070
6071   # We can hardcode non-existant directories.
6072   if test "$hardcode_direct" != no &&
6073      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6074      # have to relink, otherwise we might link with an installed library
6075      # when we should be linking with a yet-to-be-installed one
6076      ## test "$hardcode_shlibpath_var" != no &&
6077      test "$hardcode_minus_L" != no; then
6078     # Linking always hardcodes the temporary library directory.
6079     hardcode_action=relink
6080   else
6081     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6082     hardcode_action=immediate
6083   fi
6084 else
6085   # We cannot hardcode anything, or else we can only hardcode existing
6086   # directories.
6087   hardcode_action=unsupported
6088 fi
6089 echo "$ac_t""$hardcode_action" 1>&6
6090 ##
6091 ## END FIXME
6092
6093 ## FIXME: this should be a separate macro
6094 ##
6095 striplib=
6096 old_striplib=
6097 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6098 echo "configure:6099: checking whether stripping libraries is possible" >&5
6099 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6100   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6101   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6102   echo "$ac_t""yes" 1>&6
6103 else
6104   echo "$ac_t""no" 1>&6
6105 fi
6106 ##
6107 ## END FIXME
6108
6109 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6110 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6111
6112 ## FIXME: this should be a separate macro
6113 ##
6114 # PORTME Fill in your ld.so characteristics
6115 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6116 echo "configure:6117: checking dynamic linker characteristics" >&5
6117 library_names_spec=
6118 libname_spec='lib$name'
6119 soname_spec=
6120 postinstall_cmds=
6121 postuninstall_cmds=
6122 finish_cmds=
6123 finish_eval=
6124 shlibpath_var=
6125 shlibpath_overrides_runpath=unknown
6126 version_type=none
6127 dynamic_linker="$host_os ld.so"
6128 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6129 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6130
6131 case $host_os in
6132 aix3*)
6133   version_type=linux
6134   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6135   shlibpath_var=LIBPATH
6136
6137   # AIX has no versioning support, so we append a major version to the name.
6138   soname_spec='${libname}${release}.so$major'
6139   ;;
6140
6141 aix4* | aix5*)
6142   version_type=linux
6143   need_lib_prefix=no
6144   need_version=no
6145   hardcode_into_libs=yes
6146   if test "$host_cpu" = ia64; then
6147     # AIX 5 supports IA64
6148     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6149     shlibpath_var=LD_LIBRARY_PATH
6150   else
6151     # With GCC up to 2.95.x, collect2 would create an import file
6152     # for dependence libraries.  The import file would start with
6153     # the line `#! .'.  This would cause the generated library to
6154     # depend on `.', always an invalid library.  This was fixed in
6155     # development snapshots of GCC prior to 3.0.
6156     case $host_os in
6157       aix4 | aix4.[01] | aix4.[01].*)
6158         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6159              echo ' yes '
6160              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6161           :
6162         else
6163           can_build_shared=no
6164         fi
6165         ;;
6166     esac
6167     # AIX (on Power*) has no versioning support, so currently we can
6168     # not hardcode correct soname into executable. Probably we can
6169     # add versioning support to collect2, so additional links can
6170     # be useful in future.
6171     if test "$aix_use_runtimelinking" = yes; then
6172       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6173       # instead of lib<name>.a to let people know that these are not
6174       # typical AIX shared libraries.
6175       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6176     else
6177       # We preserve .a as extension for shared libraries through AIX4.2
6178       # and later when we are not doing run time linking.
6179       library_names_spec='${libname}${release}.a $libname.a'
6180       soname_spec='${libname}${release}.so$major'
6181     fi
6182     shlibpath_var=LIBPATH
6183   fi
6184   hardcode_into_libs=yes
6185   ;;
6186
6187 amigaos*)
6188   library_names_spec='$libname.ixlibrary $libname.a'
6189   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6190   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'
6191   ;;
6192
6193 beos*)
6194   library_names_spec='${libname}.so'
6195   dynamic_linker="$host_os ld.so"
6196   shlibpath_var=LIBRARY_PATH
6197   ;;
6198
6199 bsdi4*)
6200   version_type=linux
6201   need_version=no
6202   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6203   soname_spec='${libname}${release}.so$major'
6204   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6205   shlibpath_var=LD_LIBRARY_PATH
6206   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6207   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6208   export_dynamic_flag_spec=-rdynamic
6209   # the default ld.so.conf also contains /usr/contrib/lib and
6210   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6211   # libtool to hard-code these into programs
6212   ;;
6213
6214 cygwin* | mingw* | pw32*)
6215   version_type=windows
6216   need_version=no
6217   need_lib_prefix=no
6218   case $GCC,$host_os in
6219   yes,cygwin*)
6220     library_names_spec='$libname.dll.a'
6221     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6222     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6223       dldir=$destdir/`dirname \$dlpath`~
6224       test -d \$dldir || mkdir -p \$dldir~
6225       $install_prog .libs/$dlname \$dldir/$dlname'
6226     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6227       dlpath=$dir/\$dldll~
6228        $rm \$dlpath'
6229     ;;
6230   yes,mingw*)
6231     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6232     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6233     ;;
6234   yes,pw32*)
6235     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6236     ;;
6237   *)
6238     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6239     ;;
6240   esac
6241   dynamic_linker='Win32 ld.exe'
6242   # FIXME: first we should search . and the directory the executable is in
6243   shlibpath_var=PATH
6244   ;;
6245
6246 darwin* | rhapsody*)
6247   dynamic_linker="$host_os dyld"
6248   version_type=darwin
6249   need_lib_prefix=no
6250   need_version=no
6251   # FIXME: Relying on posixy $() will cause problems for
6252   #        cross-compilation, but unfortunately the echo tests do not
6253   #        yet detect zsh echo's removal of \ escapes.
6254   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)'
6255   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6256   shlibpath_overrides_runpath=yes
6257   shlibpath_var=DYLD_LIBRARY_PATH
6258   ;;
6259
6260 freebsd1*)
6261   dynamic_linker=no
6262   ;;
6263
6264 freebsd*)
6265   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6266   version_type=freebsd-$objformat
6267   case $version_type in
6268     freebsd-elf*)
6269       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6270       need_version=no
6271       need_lib_prefix=no
6272       ;;
6273     freebsd-*)
6274       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6275       need_version=yes
6276       ;;
6277   esac
6278   shlibpath_var=LD_LIBRARY_PATH
6279   case $host_os in
6280   freebsd2*)
6281     shlibpath_overrides_runpath=yes
6282     ;;
6283   *)
6284     shlibpath_overrides_runpath=no
6285     hardcode_into_libs=yes
6286     ;;
6287   esac
6288   ;;
6289
6290 gnu*)
6291   version_type=linux
6292   need_lib_prefix=no
6293   need_version=no
6294   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6295   soname_spec='${libname}${release}.so$major'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   hardcode_into_libs=yes
6298   ;;
6299
6300 hpux9* | hpux10* | hpux11*)
6301   # Give a soname corresponding to the major version so that dld.sl refuses to
6302   # link against other versions.
6303   dynamic_linker="$host_os dld.sl"
6304   version_type=sunos
6305   need_lib_prefix=no
6306   need_version=no
6307   shlibpath_var=SHLIB_PATH
6308   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6309   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6310   soname_spec='${libname}${release}.sl$major'
6311   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6312   postinstall_cmds='chmod 555 $lib'
6313   ;;
6314
6315 irix5* | irix6* | nonstopux*)
6316   case $host_os in
6317     nonstopux*) version_type=nonstopux ;;
6318     *)          version_type=irix ;;
6319   esac
6320   need_lib_prefix=no
6321   need_version=no
6322   soname_spec='${libname}${release}.so$major'
6323   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6324   case $host_os in
6325   irix5* | nonstopux*)
6326     libsuff= shlibsuff=
6327     ;;
6328   *)
6329     case $LD in # libtool.m4 will add one of these switches to LD
6330     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6331     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6332     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6333     *) libsuff= shlibsuff= libmagic=never-match;;
6334     esac
6335     ;;
6336   esac
6337   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6338   shlibpath_overrides_runpath=no
6339   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6340   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6341   ;;
6342
6343 # No shared lib support for Linux oldld, aout, or coff.
6344 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6345   dynamic_linker=no
6346   ;;
6347
6348 # This must be Linux ELF.
6349 linux-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   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6356   shlibpath_var=LD_LIBRARY_PATH
6357   shlibpath_overrides_runpath=no
6358   # This implies no fast_install, which is unacceptable.
6359   # Some rework will be needed to allow for fast_install
6360   # before this can be enabled.
6361   hardcode_into_libs=yes
6362
6363   # We used to test for /lib/ld.so.1 and disable shared libraries on
6364   # powerpc, because MkLinux only supported shared libraries with the
6365   # GNU dynamic linker.  Since this was broken with cross compilers,
6366   # most powerpc-linux boxes support dynamic linking these days and
6367   # people can always --disable-shared, the test was removed, and we
6368   # assume the GNU/Linux dynamic linker is in use.
6369   dynamic_linker='GNU/Linux ld.so'
6370   ;;
6371
6372 netbsd*)
6373   version_type=sunos
6374   need_lib_prefix=no
6375   need_version=no
6376   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6377     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6378     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6379     dynamic_linker='NetBSD (a.out) ld.so'
6380   else
6381     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6382     soname_spec='${libname}${release}.so$major'
6383     dynamic_linker='NetBSD ld.elf_so'
6384   fi
6385   shlibpath_var=LD_LIBRARY_PATH
6386   shlibpath_overrides_runpath=yes
6387   hardcode_into_libs=yes
6388   ;;
6389
6390 newsos6)
6391   version_type=linux
6392   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6393   shlibpath_var=LD_LIBRARY_PATH
6394   shlibpath_overrides_runpath=yes
6395   ;;
6396
6397 openbsd*)
6398   version_type=sunos
6399   need_lib_prefix=no
6400   need_version=no
6401   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6402     case "$host_os" in
6403     openbsd2.[89] | openbsd2.[89].*)
6404       shlibpath_overrides_runpath=no
6405       ;;
6406     *)
6407       shlibpath_overrides_runpath=yes
6408       ;;
6409     esac
6410   else
6411     shlibpath_overrides_runpath=yes
6412   fi
6413   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6414   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   ;;
6417
6418 os2*)
6419   libname_spec='$name'
6420   need_lib_prefix=no
6421   library_names_spec='$libname.dll $libname.a'
6422   dynamic_linker='OS/2 ld.exe'
6423   shlibpath_var=LIBPATH
6424   ;;
6425
6426 osf3* | osf4* | osf5*)
6427   version_type=osf
6428   need_version=no
6429   soname_spec='${libname}${release}.so$major'
6430   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6431   shlibpath_var=LD_LIBRARY_PATH
6432   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6433   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6434   hardcode_into_libs=yes
6435   ;;
6436
6437 sco3.2v5*)
6438   version_type=osf
6439   soname_spec='${libname}${release}.so$major'
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6441   shlibpath_var=LD_LIBRARY_PATH
6442   ;;
6443
6444 solaris*)
6445   version_type=linux
6446   need_lib_prefix=no
6447   need_version=no
6448   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6449   soname_spec='${libname}${release}.so$major'
6450   shlibpath_var=LD_LIBRARY_PATH
6451   shlibpath_overrides_runpath=yes
6452   hardcode_into_libs=yes
6453   # ldd complains unless libraries are executable
6454   postinstall_cmds='chmod +x $lib'
6455   ;;
6456
6457 sunos4*)
6458   version_type=sunos
6459   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6460   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6461   shlibpath_var=LD_LIBRARY_PATH
6462   shlibpath_overrides_runpath=yes
6463   if test "$with_gnu_ld" = yes; then
6464     need_lib_prefix=no
6465   fi
6466   need_version=yes
6467   ;;
6468
6469 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6470   version_type=linux
6471   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472   soname_spec='${libname}${release}.so$major'
6473   shlibpath_var=LD_LIBRARY_PATH
6474   case $host_vendor in
6475     sni)
6476       shlibpath_overrides_runpath=no
6477       need_lib_prefix=no
6478       export_dynamic_flag_spec='${wl}-Blargedynsym'
6479       runpath_var=LD_RUN_PATH
6480       ;;
6481     siemens)
6482       need_lib_prefix=no
6483       ;;
6484     motorola)
6485       need_lib_prefix=no
6486       need_version=no
6487       shlibpath_overrides_runpath=no
6488       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6489       ;;
6490   esac
6491   ;;
6492
6493 uts4*)
6494   version_type=linux
6495   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6496   soname_spec='${libname}${release}.so$major'
6497   shlibpath_var=LD_LIBRARY_PATH
6498   ;;
6499
6500 dgux*)
6501   version_type=linux
6502   need_lib_prefix=no
6503   need_version=no
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6505   soname_spec='${libname}${release}.so$major'
6506   shlibpath_var=LD_LIBRARY_PATH
6507   ;;
6508
6509 sysv4*MP*)
6510   if test -d /usr/nec ;then
6511     version_type=linux
6512     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6513     soname_spec='$libname.so.$major'
6514     shlibpath_var=LD_LIBRARY_PATH
6515   fi
6516   ;;
6517
6518 *)
6519   dynamic_linker=no
6520   ;;
6521 esac
6522 echo "$ac_t""$dynamic_linker" 1>&6
6523 test "$dynamic_linker" = no && can_build_shared=no
6524 ##
6525 ## END FIXME
6526
6527 ## FIXME: this should be a separate macro
6528 ##
6529 # Report the final consequences.
6530 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6531 echo "configure:6532: checking if libtool supports shared libraries" >&5
6532 echo "$ac_t""$can_build_shared" 1>&6
6533 ##
6534 ## END FIXME
6535
6536 ## FIXME: this should be a separate macro
6537 ##
6538 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6539 echo "configure:6540: checking whether to build shared libraries" >&5
6540 test "$can_build_shared" = "no" && enable_shared=no
6541
6542 # On AIX, shared libraries and static libraries use the same namespace, and
6543 # are all built from PIC.
6544 case "$host_os" in
6545 aix3*)
6546   test "$enable_shared" = yes && enable_static=no
6547   if test -n "$RANLIB"; then
6548     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6549     postinstall_cmds='$RANLIB $lib'
6550   fi
6551   ;;
6552
6553 aix4*)
6554   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6555     test "$enable_shared" = yes && enable_static=no
6556   fi
6557   ;;
6558 esac
6559 echo "$ac_t""$enable_shared" 1>&6
6560 ##
6561 ## END FIXME
6562
6563 ## FIXME: this should be a separate macro
6564 ##
6565 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6566 echo "configure:6567: checking whether to build static libraries" >&5
6567 # Make sure either enable_shared or enable_static is yes.
6568 test "$enable_shared" = yes || enable_static=yes
6569 echo "$ac_t""$enable_static" 1>&6
6570 ##
6571 ## END FIXME
6572
6573 if test "$hardcode_action" = relink; then
6574   # Fast installation is not supported
6575   enable_fast_install=no
6576 elif test "$shlibpath_overrides_runpath" = yes ||
6577      test "$enable_shared" = no; then
6578   # Fast installation is not necessary
6579   enable_fast_install=needless
6580 fi
6581
6582 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6583 if test "$GCC" = yes; then
6584   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6585 fi
6586
6587 if test "x$enable_dlopen" != xyes; then
6588   enable_dlopen=unknown
6589   enable_dlopen_self=unknown
6590   enable_dlopen_self_static=unknown
6591 else
6592   lt_cv_dlopen=no
6593   lt_cv_dlopen_libs=
6594
6595   case $host_os in
6596   beos*)
6597     lt_cv_dlopen="load_add_on"
6598     lt_cv_dlopen_libs=
6599     lt_cv_dlopen_self=yes
6600     ;;
6601
6602   cygwin* | mingw* | pw32*)
6603     lt_cv_dlopen="LoadLibrary"
6604     lt_cv_dlopen_libs=
6605    ;;
6606
6607   *)
6608     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6609 echo "configure:6610: checking for shl_load" >&5
6610 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6611   echo $ac_n "(cached) $ac_c" 1>&6
6612 else
6613   cat > conftest.$ac_ext <<EOF
6614 #line 6615 "configure"
6615 #include "confdefs.h"
6616 /* System header to define __stub macros and hopefully few prototypes,
6617     which can conflict with char shl_load(); below.  */
6618 #include <assert.h>
6619 /* Override any gcc2 internal prototype to avoid an error.  */
6620 /* We use char because int might match the return type of a gcc2
6621     builtin and then its argument prototype would still apply.  */
6622 char shl_load();
6623 char (*f)();
6624
6625 int main() {
6626
6627 /* The GNU C library defines this for functions which it implements
6628     to always fail with ENOSYS.  Some functions are actually named
6629     something starting with __ and the normal name is an alias.  */
6630 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6631 choke me
6632 #else
6633 f = shl_load;
6634 #endif
6635
6636 ; return 0; }
6637 EOF
6638 if { (eval echo configure:6639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6639   rm -rf conftest*
6640   eval "ac_cv_func_shl_load=yes"
6641 else
6642   echo "configure: failed program was:" >&5
6643   cat conftest.$ac_ext >&5
6644   rm -rf conftest*
6645   eval "ac_cv_func_shl_load=no"
6646 fi
6647 rm -f conftest*
6648 fi
6649
6650 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6651   echo "$ac_t""yes" 1>&6
6652   lt_cv_dlopen="shl_load"
6653 else
6654   echo "$ac_t""no" 1>&6
6655 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6656 echo "configure:6657: checking for shl_load in -ldld" >&5
6657 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6658 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6659   echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661   ac_save_LIBS="$LIBS"
6662 LIBS="-ldld  $LIBS"
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char shl_load();
6670
6671 int main() {
6672 shl_load()
6673 ; return 0; }
6674 EOF
6675 if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6676   rm -rf conftest*
6677   eval "ac_cv_lib_$ac_lib_var=yes"
6678 else
6679   echo "configure: failed program was:" >&5
6680   cat conftest.$ac_ext >&5
6681   rm -rf conftest*
6682   eval "ac_cv_lib_$ac_lib_var=no"
6683 fi
6684 rm -f conftest*
6685 LIBS="$ac_save_LIBS"
6686
6687 fi
6688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6689   echo "$ac_t""yes" 1>&6
6690   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6691 else
6692   echo "$ac_t""no" 1>&6
6693 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6694 echo "configure:6695: checking for dlopen" >&5
6695 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6696   echo $ac_n "(cached) $ac_c" 1>&6
6697 else
6698   cat > conftest.$ac_ext <<EOF
6699 #line 6700 "configure"
6700 #include "confdefs.h"
6701 /* System header to define __stub macros and hopefully few prototypes,
6702     which can conflict with char dlopen(); below.  */
6703 #include <assert.h>
6704 /* Override any gcc2 internal prototype to avoid an error.  */
6705 /* We use char because int might match the return type of a gcc2
6706     builtin and then its argument prototype would still apply.  */
6707 char dlopen();
6708 char (*f)();
6709
6710 int main() {
6711
6712 /* The GNU C library defines this for functions which it implements
6713     to always fail with ENOSYS.  Some functions are actually named
6714     something starting with __ and the normal name is an alias.  */
6715 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6716 choke me
6717 #else
6718 f = dlopen;
6719 #endif
6720
6721 ; return 0; }
6722 EOF
6723 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6724   rm -rf conftest*
6725   eval "ac_cv_func_dlopen=yes"
6726 else
6727   echo "configure: failed program was:" >&5
6728   cat conftest.$ac_ext >&5
6729   rm -rf conftest*
6730   eval "ac_cv_func_dlopen=no"
6731 fi
6732 rm -f conftest*
6733 fi
6734
6735 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6736   echo "$ac_t""yes" 1>&6
6737   lt_cv_dlopen="dlopen"
6738 else
6739   echo "$ac_t""no" 1>&6
6740 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6741 echo "configure:6742: checking for dlopen in -ldl" >&5
6742 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6744   echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746   ac_save_LIBS="$LIBS"
6747 LIBS="-ldl  $LIBS"
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 /* Override any gcc2 internal prototype to avoid an error.  */
6752 /* We use char because int might match the return type of a gcc2
6753     builtin and then its argument prototype would still apply.  */
6754 char dlopen();
6755
6756 int main() {
6757 dlopen()
6758 ; return 0; }
6759 EOF
6760 if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6761   rm -rf conftest*
6762   eval "ac_cv_lib_$ac_lib_var=yes"
6763 else
6764   echo "configure: failed program was:" >&5
6765   cat conftest.$ac_ext >&5
6766   rm -rf conftest*
6767   eval "ac_cv_lib_$ac_lib_var=no"
6768 fi
6769 rm -f conftest*
6770 LIBS="$ac_save_LIBS"
6771
6772 fi
6773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6774   echo "$ac_t""yes" 1>&6
6775   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6776 else
6777   echo "$ac_t""no" 1>&6
6778 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6779 echo "configure:6780: checking for dlopen in -lsvld" >&5
6780 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6782   echo $ac_n "(cached) $ac_c" 1>&6
6783 else
6784   ac_save_LIBS="$LIBS"
6785 LIBS="-lsvld  $LIBS"
6786 cat > conftest.$ac_ext <<EOF
6787 #line 6788 "configure"
6788 #include "confdefs.h"
6789 /* Override any gcc2 internal prototype to avoid an error.  */
6790 /* We use char because int might match the return type of a gcc2
6791     builtin and then its argument prototype would still apply.  */
6792 char dlopen();
6793
6794 int main() {
6795 dlopen()
6796 ; return 0; }
6797 EOF
6798 if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6799   rm -rf conftest*
6800   eval "ac_cv_lib_$ac_lib_var=yes"
6801 else
6802   echo "configure: failed program was:" >&5
6803   cat conftest.$ac_ext >&5
6804   rm -rf conftest*
6805   eval "ac_cv_lib_$ac_lib_var=no"
6806 fi
6807 rm -f conftest*
6808 LIBS="$ac_save_LIBS"
6809
6810 fi
6811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6812   echo "$ac_t""yes" 1>&6
6813   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6814 else
6815   echo "$ac_t""no" 1>&6
6816 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6817 echo "configure:6818: checking for dld_link in -ldld" >&5
6818 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6819 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6820   echo $ac_n "(cached) $ac_c" 1>&6
6821 else
6822   ac_save_LIBS="$LIBS"
6823 LIBS="-ldld  $LIBS"
6824 cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 /* Override any gcc2 internal prototype to avoid an error.  */
6828 /* We use char because int might match the return type of a gcc2
6829     builtin and then its argument prototype would still apply.  */
6830 char dld_link();
6831
6832 int main() {
6833 dld_link()
6834 ; return 0; }
6835 EOF
6836 if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6837   rm -rf conftest*
6838   eval "ac_cv_lib_$ac_lib_var=yes"
6839 else
6840   echo "configure: failed program was:" >&5
6841   cat conftest.$ac_ext >&5
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=no"
6844 fi
6845 rm -f conftest*
6846 LIBS="$ac_save_LIBS"
6847
6848 fi
6849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6850   echo "$ac_t""yes" 1>&6
6851   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6852 else
6853   echo "$ac_t""no" 1>&6
6854 fi
6855
6856               
6857 fi
6858
6859             
6860 fi
6861
6862           
6863 fi
6864
6865         
6866 fi
6867
6868       
6869 fi
6870
6871     ;;
6872   esac
6873
6874   if test "x$lt_cv_dlopen" != xno; then
6875     enable_dlopen=yes
6876   else
6877     enable_dlopen=no
6878   fi
6879
6880   case $lt_cv_dlopen in
6881   dlopen)
6882     save_CPPFLAGS="$CPPFLAGS"
6883         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6884
6885     save_LDFLAGS="$LDFLAGS"
6886     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6887
6888     save_LIBS="$LIBS"
6889     LIBS="$lt_cv_dlopen_libs $LIBS"
6890
6891     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6892 echo "configure:6893: checking whether a program can dlopen itself" >&5
6893 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6894   echo $ac_n "(cached) $ac_c" 1>&6
6895 else
6896           if test "$cross_compiling" = yes; then :
6897   lt_cv_dlopen_self=cross
6898 else
6899     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6900   lt_status=$lt_dlunknown
6901   cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904
6905 #if HAVE_DLFCN_H
6906 #include <dlfcn.h>
6907 #endif
6908
6909 #include <stdio.h>
6910
6911 #ifdef RTLD_GLOBAL
6912 #  define LT_DLGLOBAL           RTLD_GLOBAL
6913 #else
6914 #  ifdef DL_GLOBAL
6915 #    define LT_DLGLOBAL         DL_GLOBAL
6916 #  else
6917 #    define LT_DLGLOBAL         0
6918 #  endif
6919 #endif
6920
6921 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6922    find out it does not work in some platform. */
6923 #ifndef LT_DLLAZY_OR_NOW
6924 #  ifdef RTLD_LAZY
6925 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6926 #  else
6927 #    ifdef DL_LAZY
6928 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6929 #    else
6930 #      ifdef RTLD_NOW
6931 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6932 #      else
6933 #        ifdef DL_NOW
6934 #          define LT_DLLAZY_OR_NOW      DL_NOW
6935 #        else
6936 #          define LT_DLLAZY_OR_NOW      0
6937 #        endif
6938 #      endif
6939 #    endif
6940 #  endif
6941 #endif
6942
6943 #ifdef __cplusplus
6944 extern "C" void exit (int);
6945 #endif
6946
6947 void fnord() { int i=42;}
6948 int main ()
6949 {
6950   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6951   int status = $lt_dlunknown;
6952
6953   if (self)
6954     {
6955       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6956       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6957       /* dlclose (self); */
6958     }
6959
6960     exit (status);
6961 }
6962 EOF
6963   if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6964     (./conftest; exit; ) 2>/dev/null
6965     lt_status=$?
6966     case x$lt_status in
6967       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6968       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6969       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6970     esac
6971   else :
6972     # compilation failed
6973     lt_cv_dlopen_self=no
6974   fi
6975 fi
6976 rm -fr conftest*
6977
6978     
6979 fi
6980
6981 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6982
6983     if test "x$lt_cv_dlopen_self" = xyes; then
6984       LDFLAGS="$LDFLAGS $link_static_flag"
6985       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6986 echo "configure:6987: checking whether a statically linked program can dlopen itself" >&5
6987 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6988   echo $ac_n "(cached) $ac_c" 1>&6
6989 else
6990           if test "$cross_compiling" = yes; then :
6991   lt_cv_dlopen_self_static=cross
6992 else
6993     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6994   lt_status=$lt_dlunknown
6995   cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998
6999 #if HAVE_DLFCN_H
7000 #include <dlfcn.h>
7001 #endif
7002
7003 #include <stdio.h>
7004
7005 #ifdef RTLD_GLOBAL
7006 #  define LT_DLGLOBAL           RTLD_GLOBAL
7007 #else
7008 #  ifdef DL_GLOBAL
7009 #    define LT_DLGLOBAL         DL_GLOBAL
7010 #  else
7011 #    define LT_DLGLOBAL         0
7012 #  endif
7013 #endif
7014
7015 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7016    find out it does not work in some platform. */
7017 #ifndef LT_DLLAZY_OR_NOW
7018 #  ifdef RTLD_LAZY
7019 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7020 #  else
7021 #    ifdef DL_LAZY
7022 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7023 #    else
7024 #      ifdef RTLD_NOW
7025 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7026 #      else
7027 #        ifdef DL_NOW
7028 #          define LT_DLLAZY_OR_NOW      DL_NOW
7029 #        else
7030 #          define LT_DLLAZY_OR_NOW      0
7031 #        endif
7032 #      endif
7033 #    endif
7034 #  endif
7035 #endif
7036
7037 #ifdef __cplusplus
7038 extern "C" void exit (int);
7039 #endif
7040
7041 void fnord() { int i=42;}
7042 int main ()
7043 {
7044   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7045   int status = $lt_dlunknown;
7046
7047   if (self)
7048     {
7049       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7050       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7051       /* dlclose (self); */
7052     }
7053
7054     exit (status);
7055 }
7056 EOF
7057   if { (eval echo configure:7058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7058     (./conftest; exit; ) 2>/dev/null
7059     lt_status=$?
7060     case x$lt_status in
7061       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7062       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7063       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7064     esac
7065   else :
7066     # compilation failed
7067     lt_cv_dlopen_self_static=no
7068   fi
7069 fi
7070 rm -fr conftest*
7071
7072       
7073 fi
7074
7075 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7076     fi
7077
7078     CPPFLAGS="$save_CPPFLAGS"
7079     LDFLAGS="$save_LDFLAGS"
7080     LIBS="$save_LIBS"
7081     ;;
7082   esac
7083
7084   case $lt_cv_dlopen_self in
7085   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7086   *) enable_dlopen_self=unknown ;;
7087   esac
7088
7089   case $lt_cv_dlopen_self_static in
7090   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7091   *) enable_dlopen_self_static=unknown ;;
7092   esac
7093 fi
7094
7095
7096 ## FIXME: this should be a separate macro
7097 ##
7098 if test "$enable_shared" = yes && test "$GCC" = yes; then
7099   case $archive_cmds in
7100   *'~'*)
7101     # FIXME: we may have to deal with multi-command sequences.
7102     ;;
7103   '$CC '*)
7104     # Test whether the compiler implicitly links with -lc since on some
7105     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7106     # to ld, don't add -lc before -lgcc.
7107     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7108 echo "configure:7109: checking whether -lc should be explicitly linked in" >&5
7109     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7110   echo $ac_n "(cached) $ac_c" 1>&6
7111 else
7112   $rm conftest*
7113     echo 'static int dummy;' > conftest.$ac_ext
7114
7115     if { (eval echo configure:7116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7116       soname=conftest
7117       lib=conftest
7118       libobjs=conftest.$ac_objext
7119       deplibs=
7120       wl=$lt_cv_prog_cc_wl
7121       compiler_flags=-v
7122       linker_flags=-v
7123       verstring=
7124       output_objdir=.
7125       libname=conftest
7126       save_allow_undefined_flag=$allow_undefined_flag
7127       allow_undefined_flag=
7128       if { (eval echo configure:7129: \"$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; }
7129       then
7130         lt_cv_archive_cmds_need_lc=no
7131       else
7132         lt_cv_archive_cmds_need_lc=yes
7133       fi
7134       allow_undefined_flag=$save_allow_undefined_flag
7135     else
7136       cat conftest.err 1>&5
7137     fi
7138 fi
7139
7140     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7141     ;;
7142   esac
7143 fi
7144 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7145 ##
7146 ## END FIXME
7147
7148 ## FIXME: this should be a separate macro
7149 ##
7150 # The second clause should only fire when bootstrapping the
7151 # libtool distribution, otherwise you forgot to ship ltmain.sh
7152 # with your package, and you will get complaints that there are
7153 # no rules to generate ltmain.sh.
7154 if test -f "$ltmain"; then
7155   :
7156 else
7157   # If there is no Makefile yet, we rely on a make rule to execute
7158   # `config.status --recheck' to rerun these tests and create the
7159   # libtool script then.
7160   test -f Makefile && make "$ltmain"
7161 fi
7162
7163 if test -f "$ltmain"; then
7164   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7165   $rm -f "${ofile}T"
7166
7167   echo creating $ofile
7168
7169   # Now quote all the things that may contain metacharacters while being
7170   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7171   # variables and quote the copies for generation of the libtool script.
7172   for var in echo old_CC old_CFLAGS SED \
7173     AR AR_FLAGS CC LD LN_S NM SHELL \
7174     reload_flag reload_cmds wl \
7175     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7176     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7177     library_names_spec soname_spec \
7178     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7179     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7180     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7181     old_striplib striplib file_magic_cmd export_symbols_cmds \
7182     deplibs_check_method allow_undefined_flag no_undefined_flag \
7183     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7184     global_symbol_to_c_name_address \
7185     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7186     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7187     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7188
7189     case $var in
7190     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7191     old_postinstall_cmds | old_postuninstall_cmds | \
7192     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7193     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7194     postinstall_cmds | postuninstall_cmds | \
7195     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7196       # Double-quote double-evaled strings.
7197       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7198       ;;
7199     *)
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7201       ;;
7202     esac
7203   done
7204
7205   cat <<__EOF__ > "${ofile}T"
7206 #! $SHELL
7207
7208 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7209 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7210 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7211 #
7212 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7213 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7214 #
7215 # This program is free software; you can redistribute it and/or modify
7216 # it under the terms of the GNU General Public License as published by
7217 # the Free Software Foundation; either version 2 of the License, or
7218 # (at your option) any later version.
7219 #
7220 # This program is distributed in the hope that it will be useful, but
7221 # WITHOUT ANY WARRANTY; without even the implied warranty of
7222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7223 # General Public License for more details.
7224 #
7225 # You should have received a copy of the GNU General Public License
7226 # along with this program; if not, write to the Free Software
7227 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7228 #
7229 # As a special exception to the GNU General Public License, if you
7230 # distribute this file as part of a program that contains a
7231 # configuration script generated by Autoconf, you may include it under
7232 # the same distribution terms that you use for the rest of that program.
7233
7234 # A sed that does not truncate output.
7235 SED=$lt_SED
7236
7237 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7238 Xsed="${SED} -e s/^X//"
7239
7240 # The HP-UX ksh and POSIX shell print the target directory to stdout
7241 # if CDPATH is set.
7242 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7243
7244 # ### BEGIN LIBTOOL CONFIG
7245
7246 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7247
7248 # Shell to use when invoking shell scripts.
7249 SHELL=$lt_SHELL
7250
7251 # Whether or not to build shared libraries.
7252 build_libtool_libs=$enable_shared
7253
7254 # Whether or not to build static libraries.
7255 build_old_libs=$enable_static
7256
7257 # Whether or not to add -lc for building shared libraries.
7258 build_libtool_need_lc=$need_lc
7259
7260 # Whether or not to optimize for fast installation.
7261 fast_install=$enable_fast_install
7262
7263 # The host system.
7264 host_alias=$host_alias
7265 host=$host
7266
7267 # An echo program that does not interpret backslashes.
7268 echo=$lt_echo
7269
7270 # The archiver.
7271 AR=$lt_AR
7272 AR_FLAGS=$lt_AR_FLAGS
7273
7274 # The default C compiler.
7275 CC=$lt_CC
7276
7277 # Is the compiler the GNU C compiler?
7278 with_gcc=$GCC
7279
7280 # The linker used to build libraries.
7281 LD=$lt_LD
7282
7283 # Whether we need hard or soft links.
7284 LN_S=$lt_LN_S
7285
7286 # A BSD-compatible nm program.
7287 NM=$lt_NM
7288
7289 # A symbol stripping program
7290 STRIP=$STRIP
7291
7292 # Used to examine libraries when file_magic_cmd begins "file"
7293 MAGIC_CMD=$MAGIC_CMD
7294
7295 # Used on cygwin: DLL creation program.
7296 DLLTOOL="$DLLTOOL"
7297
7298 # Used on cygwin: object dumper.
7299 OBJDUMP="$OBJDUMP"
7300
7301 # Used on cygwin: assembler.
7302 AS="$AS"
7303
7304 # The name of the directory that contains temporary libtool files.
7305 objdir=$objdir
7306
7307 # How to create reloadable object files.
7308 reload_flag=$lt_reload_flag
7309 reload_cmds=$lt_reload_cmds
7310
7311 # How to pass a linker flag through the compiler.
7312 wl=$lt_wl
7313
7314 # Object file suffix (normally "o").
7315 objext="$ac_objext"
7316
7317 # Old archive suffix (normally "a").
7318 libext="$libext"
7319
7320 # Executable file suffix (normally "").
7321 exeext="$exeext"
7322
7323 # Additional compiler flags for building library objects.
7324 pic_flag=$lt_pic_flag
7325 pic_mode=$pic_mode
7326
7327 # Does compiler simultaneously support -c and -o options?
7328 compiler_c_o=$lt_compiler_c_o
7329
7330 # Can we write directly to a .lo ?
7331 compiler_o_lo=$lt_compiler_o_lo
7332
7333 # Must we lock files when doing compilation ?
7334 need_locks=$lt_need_locks
7335
7336 # Do we need the lib prefix for modules?
7337 need_lib_prefix=$need_lib_prefix
7338
7339 # Do we need a version for libraries?
7340 need_version=$need_version
7341
7342 # Whether dlopen is supported.
7343 dlopen_support=$enable_dlopen
7344
7345 # Whether dlopen of programs is supported.
7346 dlopen_self=$enable_dlopen_self
7347
7348 # Whether dlopen of statically linked programs is supported.
7349 dlopen_self_static=$enable_dlopen_self_static
7350
7351 # Compiler flag to prevent dynamic linking.
7352 link_static_flag=$lt_link_static_flag
7353
7354 # Compiler flag to turn off builtin functions.
7355 no_builtin_flag=$lt_no_builtin_flag
7356
7357 # Compiler flag to allow reflexive dlopens.
7358 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7359
7360 # Compiler flag to generate shared objects directly from archives.
7361 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7362
7363 # Compiler flag to generate thread-safe objects.
7364 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7365
7366 # Library versioning type.
7367 version_type=$version_type
7368
7369 # Format of library name prefix.
7370 libname_spec=$lt_libname_spec
7371
7372 # List of archive names.  First name is the real one, the rest are links.
7373 # The last name is the one that the linker finds with -lNAME.
7374 library_names_spec=$lt_library_names_spec
7375
7376 # The coded name of the library, if different from the real name.
7377 soname_spec=$lt_soname_spec
7378
7379 # Commands used to build and install an old-style archive.
7380 RANLIB=$lt_RANLIB
7381 old_archive_cmds=$lt_old_archive_cmds
7382 old_postinstall_cmds=$lt_old_postinstall_cmds
7383 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7384
7385 # Create an old-style archive from a shared archive.
7386 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7387
7388 # Create a temporary old-style archive to link instead of a shared archive.
7389 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7390
7391 # Commands used to build and install a shared archive.
7392 archive_cmds=$lt_archive_cmds
7393 archive_expsym_cmds=$lt_archive_expsym_cmds
7394 postinstall_cmds=$lt_postinstall_cmds
7395 postuninstall_cmds=$lt_postuninstall_cmds
7396
7397 # Commands to strip libraries.
7398 old_striplib=$lt_old_striplib
7399 striplib=$lt_striplib
7400
7401 # Method to check whether dependent libraries are shared objects.
7402 deplibs_check_method=$lt_deplibs_check_method
7403
7404 # Command to use when deplibs_check_method == file_magic.
7405 file_magic_cmd=$lt_file_magic_cmd
7406
7407 # Flag that allows shared libraries with undefined symbols to be built.
7408 allow_undefined_flag=$lt_allow_undefined_flag
7409
7410 # Flag that forces no undefined symbols.
7411 no_undefined_flag=$lt_no_undefined_flag
7412
7413 # Commands used to finish a libtool library installation in a directory.
7414 finish_cmds=$lt_finish_cmds
7415
7416 # Same as above, but a single script fragment to be evaled but not shown.
7417 finish_eval=$lt_finish_eval
7418
7419 # Take the output of nm and produce a listing of raw symbols and C names.
7420 global_symbol_pipe=$lt_global_symbol_pipe
7421
7422 # Transform the output of nm in a proper C declaration
7423 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7424
7425 # Transform the output of nm in a C name address pair
7426 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7427
7428 # This is the shared library runtime path variable.
7429 runpath_var=$runpath_var
7430
7431 # This is the shared library path variable.
7432 shlibpath_var=$shlibpath_var
7433
7434 # Is shlibpath searched before the hard-coded library search path?
7435 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7436
7437 # How to hardcode a shared library path into an executable.
7438 hardcode_action=$hardcode_action
7439
7440 # Whether we should hardcode library paths into libraries.
7441 hardcode_into_libs=$hardcode_into_libs
7442
7443 # Flag to hardcode \$libdir into a binary during linking.
7444 # This must work even if \$libdir does not exist.
7445 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7446
7447 # Whether we need a single -rpath flag with a separated argument.
7448 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7449
7450 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7451 # resulting binary.
7452 hardcode_direct=$hardcode_direct
7453
7454 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7455 # resulting binary.
7456 hardcode_minus_L=$hardcode_minus_L
7457
7458 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7459 # the resulting binary.
7460 hardcode_shlibpath_var=$hardcode_shlibpath_var
7461
7462 # Variables whose values should be saved in libtool wrapper scripts and
7463 # restored at relink time.
7464 variables_saved_for_relink="$variables_saved_for_relink"
7465
7466 # Whether libtool must link a program against all its dependency libraries.
7467 link_all_deplibs=$link_all_deplibs
7468
7469 # Compile-time system search path for libraries
7470 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7471
7472 # Run-time system search path for libraries
7473 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7474
7475 # Fix the shell variable \$srcfile for the compiler.
7476 fix_srcfile_path="$fix_srcfile_path"
7477
7478 # Set to yes if exported symbols are required.
7479 always_export_symbols=$always_export_symbols
7480
7481 # The commands to list exported symbols.
7482 export_symbols_cmds=$lt_export_symbols_cmds
7483
7484 # The commands to extract the exported symbol list from a shared archive.
7485 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7486
7487 # Symbols that should not be listed in the preloaded symbols.
7488 exclude_expsyms=$lt_exclude_expsyms
7489
7490 # Symbols that must always be exported.
7491 include_expsyms=$lt_include_expsyms
7492
7493 # ### END LIBTOOL CONFIG
7494
7495 __EOF__
7496
7497   case $host_os in
7498   aix3*)
7499     cat <<\EOF >> "${ofile}T"
7500
7501 # AIX sometimes has problems with the GCC collect2 program.  For some
7502 # reason, if we set the COLLECT_NAMES environment variable, the problems
7503 # vanish in a puff of smoke.
7504 if test "X${COLLECT_NAMES+set}" != Xset; then
7505   COLLECT_NAMES=
7506   export COLLECT_NAMES
7507 fi
7508 EOF
7509     ;;
7510   esac
7511
7512   case $host_os in
7513   cygwin* | mingw* | pw32* | os2*)
7514     cat <<'EOF' >> "${ofile}T"
7515       # This is a source program that is used to create dlls on Windows
7516       # Don't remove nor modify the starting and closing comments
7517 # /* ltdll.c starts here */
7518 # #define WIN32_LEAN_AND_MEAN
7519 # #include <windows.h>
7520 # #undef WIN32_LEAN_AND_MEAN
7521 # #include <stdio.h>
7522 #
7523 # #ifndef __CYGWIN__
7524 # #  ifdef __CYGWIN32__
7525 # #    define __CYGWIN__ __CYGWIN32__
7526 # #  endif
7527 # #endif
7528 #
7529 # #ifdef __cplusplus
7530 # extern "C" {
7531 # #endif
7532 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7533 # #ifdef __cplusplus
7534 # }
7535 # #endif
7536 #
7537 # #ifdef __CYGWIN__
7538 # #include <cygwin/cygwin_dll.h>
7539 # DECLARE_CYGWIN_DLL( DllMain );
7540 # #endif
7541 # HINSTANCE __hDllInstance_base;
7542 #
7543 # BOOL APIENTRY
7544 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7545 # {
7546 #   __hDllInstance_base = hInst;
7547 #   return TRUE;
7548 # }
7549 # /* ltdll.c ends here */
7550         # This is a source program that is used to create import libraries
7551         # on Windows for dlls which lack them. Don't remove nor modify the
7552         # starting and closing comments
7553 # /* impgen.c starts here */
7554 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7555 #
7556 #  This file is part of GNU libtool.
7557 #
7558 #  This program is free software; you can redistribute it and/or modify
7559 #  it under the terms of the GNU General Public License as published by
7560 #  the Free Software Foundation; either version 2 of the License, or
7561 #  (at your option) any later version.
7562 #
7563 #  This program is distributed in the hope that it will be useful,
7564 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7565 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7566 #  GNU General Public License for more details.
7567 #
7568 #  You should have received a copy of the GNU General Public License
7569 #  along with this program; if not, write to the Free Software
7570 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7571 #  */
7572 #
7573 # #include <stdio.h>            /* for printf() */
7574 # #include <unistd.h>           /* for open(), lseek(), read() */
7575 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7576 # #include <string.h>           /* for strdup() */
7577 #
7578 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7579 # #ifndef O_BINARY
7580 # #define O_BINARY 0
7581 # #endif
7582 #
7583 # static unsigned int
7584 # pe_get16 (fd, offset)
7585 #      int fd;
7586 #      int offset;
7587 # {
7588 #   unsigned char b[2];
7589 #   lseek (fd, offset, SEEK_SET);
7590 #   read (fd, b, 2);
7591 #   return b[0] + (b[1]<<8);
7592 # }
7593 #
7594 # static unsigned int
7595 # pe_get32 (fd, offset)
7596 #     int fd;
7597 #     int offset;
7598 # {
7599 #   unsigned char b[4];
7600 #   lseek (fd, offset, SEEK_SET);
7601 #   read (fd, b, 4);
7602 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7603 # }
7604 #
7605 # static unsigned int
7606 # pe_as32 (ptr)
7607 #      void *ptr;
7608 # {
7609 #   unsigned char *b = ptr;
7610 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7611 # }
7612 #
7613 # int
7614 # main (argc, argv)
7615 #     int argc;
7616 #     char *argv[];
7617 # {
7618 #     int dll;
7619 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7620 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7621 #     unsigned long name_rvas, nexp;
7622 #     unsigned char *expdata, *erva;
7623 #     char *filename, *dll_name;
7624 #
7625 #     filename = argv[1];
7626 #
7627 #     dll = open(filename, O_RDONLY|O_BINARY);
7628 #     if (dll < 1)
7629 #       return 1;
7630 #
7631 #     dll_name = filename;
7632 #
7633 #     for (i=0; filename[i]; i++)
7634 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7635 #           dll_name = filename + i +1;
7636 #
7637 #     pe_header_offset = pe_get32 (dll, 0x3c);
7638 #     opthdr_ofs = pe_header_offset + 4 + 20;
7639 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7640 #
7641 #     if (num_entries < 1) /* no exports */
7642 #       return 1;
7643 #
7644 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7645 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7646 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7647 #     secptr = (pe_header_offset + 4 + 20 +
7648 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7649 #
7650 #     expptr = 0;
7651 #     for (i = 0; i < nsections; i++)
7652 #     {
7653 #       char sname[8];
7654 #       unsigned long secptr1 = secptr + 40 * i;
7655 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7656 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7657 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7658 #       lseek(dll, secptr1, SEEK_SET);
7659 #       read(dll, sname, 8);
7660 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7661 #       {
7662 #           expptr = fptr + (export_rva - vaddr);
7663 #           if (export_rva + export_size > vaddr + vsize)
7664 #               export_size = vsize - (export_rva - vaddr);
7665 #           break;
7666 #       }
7667 #     }
7668 #
7669 #     expdata = (unsigned char*)malloc(export_size);
7670 #     lseek (dll, expptr, SEEK_SET);
7671 #     read (dll, expdata, export_size);
7672 #     erva = expdata - export_rva;
7673 #
7674 #     nexp = pe_as32 (expdata+24);
7675 #     name_rvas = pe_as32 (expdata+32);
7676 #
7677 #     printf ("EXPORTS\n");
7678 #     for (i = 0; i<nexp; i++)
7679 #     {
7680 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7681 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7682 #     }
7683 #
7684 #     return 0;
7685 # }
7686 # /* impgen.c ends here */
7687
7688 EOF
7689     ;;
7690   esac
7691
7692   # We use sed instead of cat because bash on DJGPP gets confused if
7693   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7694   # text mode, it properly converts lines to CR/LF.  This bash problem
7695   # is reportedly fixed, but why not run on old versions too?
7696   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7697
7698   mv -f "${ofile}T" "$ofile" || \
7699     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7700   chmod +x "$ofile"
7701 fi
7702 ##
7703 ## END FIXME
7704
7705
7706
7707
7708
7709 # This can be used to rebuild libtool when needed
7710 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7711
7712 # Always use our own libtool.
7713 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7714
7715 # Prevent multiple expansion
7716
7717
7718
7719 # test for ln hardlink support
7720 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7721 echo "configure:7722: checking whether ln works" >&5
7722 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7723   echo $ac_n "(cached) $ac_c" 1>&6
7724 else
7725   rm -f conftest.src conftest.dst
7726 echo "conftest" > conftest.src
7727 if ln conftest.src conftest.dst 2>/dev/null
7728 then
7729   ol_cv_prog_LN_H="ln"
7730 else
7731   ol_cv_prog_LN_H="cp"
7732 fi
7733 rm -f conftest.src conftest.dst
7734
7735 fi
7736 LN_H="$ol_cv_prog_LN_H"
7737 if test "$ol_cv_prog_LN_H" = "ln"; then
7738         echo "$ac_t""yes" 1>&6
7739 else
7740         echo "$ac_t""no" 1>&6
7741 fi
7742
7743 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7744 echo "configure:7745: checking whether ln -s works" >&5
7745 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   rm -f conftestdata
7749 if ln -s X conftestdata 2>/dev/null
7750 then
7751   rm -f conftestdata
7752   ac_cv_prog_LN_S="ln -s"
7753 else
7754   ac_cv_prog_LN_S=ln
7755 fi
7756 fi
7757 LN_S="$ac_cv_prog_LN_S"
7758 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7759   echo "$ac_t""yes" 1>&6
7760 else
7761   echo "$ac_t""no" 1>&6
7762 fi
7763
7764
7765 ol_link_perl=no
7766 if test $ol_enable_perl != no ; then
7767         # Extract the first word of "perl", so it can be a program name with args.
7768 set dummy perl; ac_word=$2
7769 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7770 echo "configure:7771: checking for $ac_word" >&5
7771 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7772   echo $ac_n "(cached) $ac_c" 1>&6
7773 else
7774   case "$PERLBIN" in
7775   /*)
7776   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7777   ;;
7778   ?:/*)
7779   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7780   ;;
7781   *)
7782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7783   ac_dummy="$PATH"
7784   for ac_dir in $ac_dummy; do 
7785     test -z "$ac_dir" && ac_dir=.
7786     if test -f $ac_dir/$ac_word; then
7787       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7788       break
7789     fi
7790   done
7791   IFS="$ac_save_ifs"
7792   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7793   ;;
7794 esac
7795 fi
7796 PERLBIN="$ac_cv_path_PERLBIN"
7797 if test -n "$PERLBIN"; then
7798   echo "$ac_t""$PERLBIN" 1>&6
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802
7803
7804         if test "no$PERLBIN" = "no" ; then
7805                 if test $ol_enable_perl = yes ; then
7806                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7807                 fi
7808
7809         else
7810                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7811                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7812                 if test x"$ol_with_perl_module" = "xstatic" ; then
7813                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7814                 else
7815                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7816                 fi
7817                                 ol_link_perl=yes
7818         fi
7819 fi
7820
7821 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7822 echo "configure:7823: checking how to run the C preprocessor" >&5
7823 # On Suns, sometimes $CPP names a directory.
7824 if test -n "$CPP" && test -d "$CPP"; then
7825   CPP=
7826 fi
7827 if test -z "$CPP"; then
7828 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7829   echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831     # This must be in double quotes, not single quotes, because CPP may get
7832   # substituted into the Makefile and "${CC-cc}" will confuse make.
7833   CPP="${CC-cc} -E"
7834   # On the NeXT, cc -E runs the code through the compiler's parser,
7835   # not just through cpp.
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 #include <assert.h>
7840 Syntax Error
7841 EOF
7842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7843 { (eval echo configure:7844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7845 if test -z "$ac_err"; then
7846   :
7847 else
7848   echo "$ac_err" >&5
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   CPP="${CC-cc} -E -traditional-cpp"
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 #include <assert.h>
7857 Syntax Error
7858 EOF
7859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7860 { (eval echo configure:7861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7862 if test -z "$ac_err"; then
7863   :
7864 else
7865   echo "$ac_err" >&5
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   CPP="${CC-cc} -nologo -E"
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 #include <assert.h>
7874 Syntax Error
7875 EOF
7876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7877 { (eval echo configure:7878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7879 if test -z "$ac_err"; then
7880   :
7881 else
7882   echo "$ac_err" >&5
7883   echo "configure: failed program was:" >&5
7884   cat conftest.$ac_ext >&5
7885   rm -rf conftest*
7886   CPP=/lib/cpp
7887 fi
7888 rm -f conftest*
7889 fi
7890 rm -f conftest*
7891 fi
7892 rm -f conftest*
7893   ac_cv_prog_CPP="$CPP"
7894 fi
7895   CPP="$ac_cv_prog_CPP"
7896 else
7897   ac_cv_prog_CPP="$CPP"
7898 fi
7899 echo "$ac_t""$CPP" 1>&6
7900
7901
7902 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7903         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7904
7905 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7906         echo "configure: warning: programs compiled here do run here..." 1>&2
7907         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7908
7909 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7910         echo "configure: warning: programs compiled here do not run here..." 1>&2
7911         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7912 fi
7913
7914
7915 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7916 echo "configure:7917: checking for Cygwin environment" >&5
7917 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923
7924 int main() {
7925
7926 #ifndef __CYGWIN__
7927 #define __CYGWIN__ __CYGWIN32__
7928 #endif
7929 return __CYGWIN__;
7930 ; return 0; }
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7933   rm -rf conftest*
7934   ac_cv_cygwin=yes
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -rf conftest*
7939   ac_cv_cygwin=no
7940 fi
7941 rm -f conftest*
7942 fi
7943
7944 echo "$ac_t""$ac_cv_cygwin" 1>&6
7945 CYGWIN=
7946 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7947 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7948 echo "configure:7949: checking for mingw32 environment" >&5
7949 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7950   echo $ac_n "(cached) $ac_c" 1>&6
7951 else
7952   cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955
7956 int main() {
7957 return __MINGW32__;
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7961   rm -rf conftest*
7962   ac_cv_mingw32=yes
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   ac_cv_mingw32=no
7968 fi
7969 rm -f conftest*
7970 fi
7971
7972 echo "$ac_t""$ac_cv_mingw32" 1>&6
7973 MINGW32=
7974 test "$ac_cv_mingw32" = yes && MINGW32=yes
7975
7976
7977
7978 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7979 echo "configure:7980: checking for executable suffix" >&5
7980 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7984   ac_cv_exeext=.exe
7985 else
7986   rm -f conftest*
7987   echo 'int main () { return 0; }' > conftest.$ac_ext
7988   ac_cv_exeext=
7989   if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7990     for file in conftest.*; do
7991       case $file in
7992       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7993       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7994       esac
7995     done
7996   else
7997     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7998   fi
7999   rm -f conftest*
8000   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8001 fi
8002 fi
8003
8004 EXEEXT=""
8005 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8006 echo "$ac_t""${ac_cv_exeext}" 1>&6
8007 ac_exeext=$EXEEXT
8008
8009 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8010 echo "configure:8011: checking for object suffix" >&5
8011 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   rm -f conftest*
8015 echo 'int i = 1;' > conftest.$ac_ext
8016 if { (eval echo configure:8017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8017   for ac_file in conftest.*; do
8018     case $ac_file in
8019     *.c) ;;
8020     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8021     esac
8022   done
8023 else
8024   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8025 fi
8026 rm -f conftest*
8027 fi
8028
8029 echo "$ac_t""$ac_cv_objext" 1>&6
8030 OBJEXT=$ac_cv_objext
8031 ac_objext=$ac_cv_objext
8032
8033
8034 cat >> confdefs.h <<EOF
8035 #define EXEEXT "${EXEEXT}"
8036 EOF
8037
8038
8039 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8040 echo "configure:8041: checking for be_app in -lbe" >&5
8041 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   ac_save_LIBS="$LIBS"
8046 LIBS="-lbe -lroot -lnet $LIBS"
8047 cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050 /* Override any gcc2 internal prototype to avoid an error.  */
8051 /* We use char because int might match the return type of a gcc2
8052     builtin and then its argument prototype would still apply.  */
8053 char be_app();
8054
8055 int main() {
8056 be_app()
8057 ; return 0; }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8060   rm -rf conftest*
8061   eval "ac_cv_lib_$ac_lib_var=yes"
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -rf conftest*
8066   eval "ac_cv_lib_$ac_lib_var=no"
8067 fi
8068 rm -f conftest*
8069 LIBS="$ac_save_LIBS"
8070
8071 fi
8072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074   LIBS="$LIBS -lbe -lroot -lnet"
8075 else
8076   echo "$ac_t""no" 1>&6
8077 :
8078 fi
8079
8080
8081
8082
8083
8084 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8085 echo "configure:8086: checking for ${CC-cc} option to accept ANSI C" >&5
8086 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8087   echo $ac_n "(cached) $ac_c" 1>&6
8088 else
8089   am_cv_prog_cc_stdc=no
8090 ac_save_CC="$CC"
8091 # Don't try gcc -ansi; that turns off useful extensions and
8092 # breaks some systems' header files.
8093 # AIX                   -qlanglvl=ansi
8094 # Ultrix and OSF/1      -std1
8095 # HP-UX 10.20 and later -Ae
8096 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8097 # SVR4                  -Xc -D__EXTENSIONS__
8098 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8099 do
8100   CC="$ac_save_CC $ac_arg"
8101   cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 #include <stdarg.h>
8105 #include <stdio.h>
8106 #include <sys/types.h>
8107 #include <sys/stat.h>
8108 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8109 struct buf { int x; };
8110 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8111 static char *e (p, i)
8112      char **p;
8113      int i;
8114 {
8115   return p[i];
8116 }
8117 static char *f (char * (*g) (char **, int), char **p, ...)
8118 {
8119   char *s;
8120   va_list v;
8121   va_start (v,p);
8122   s = g (p, va_arg (v,int));
8123   va_end (v);
8124   return s;
8125 }
8126 int test (int i, double x);
8127 struct s1 {int (*f) (int a);};
8128 struct s2 {int (*f) (double a);};
8129 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8130 int argc;
8131 char **argv;
8132
8133 int main() {
8134
8135 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8136
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8140   rm -rf conftest*
8141   am_cv_prog_cc_stdc="$ac_arg"; break
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145 fi
8146 rm -f conftest*
8147 done
8148 CC="$ac_save_CC"
8149
8150 fi
8151
8152 if test -z "$am_cv_prog_cc_stdc"; then
8153   echo "$ac_t""none needed" 1>&6
8154 else
8155   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8156 fi
8157 case "x$am_cv_prog_cc_stdc" in
8158   x|xno) ;;
8159   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8160 esac
8161
8162 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8163         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8164 fi
8165
8166 # test for make depend flag
8167 OL_MKDEP=
8168 OL_MKDEP_FLAGS=
8169 if test -z "${MKDEP}"; then
8170         OL_MKDEP="${CC-cc}"
8171         if test -z "${MKDEP_FLAGS}"; then
8172                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8173 echo "configure:8174: checking for ${OL_MKDEP} depend flag" >&5
8174 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   
8178                         ol_cv_mkdep=no
8179                         for flag in "-M" "-xM"; do
8180                                 cat > conftest.c <<EOF
8181  noCode;
8182 EOF
8183                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8184                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8185                                 then
8186                                         if test ! -f conftest."${ac_object}" ; then
8187                                                 ol_cv_mkdep=$flag
8188                                                 OL_MKDEP_FLAGS="$flag"
8189                                                 break
8190                                         fi
8191                                 fi
8192                         done
8193                         rm -f conftest*
8194                 
8195 fi
8196
8197 echo "$ac_t""$ol_cv_mkdep" 1>&6
8198         else
8199                 cc_cv_mkdep=yes
8200                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8201         fi
8202 else
8203         cc_cv_mkdep=yes
8204         OL_MKDEP="${MKDEP}"
8205         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8206 fi
8207
8208
8209
8210 if test "${ol_cv_mkdep}" = no ; then
8211         # this will soon become an error
8212         echo "configure: warning: do not know how to generate dependencies" 1>&2
8213 fi
8214
8215 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8216 echo "configure:8217: checking for afopen in -ls" >&5
8217 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8219   echo $ac_n "(cached) $ac_c" 1>&6
8220 else
8221   ac_save_LIBS="$LIBS"
8222 LIBS="-ls  $LIBS"
8223 cat > conftest.$ac_ext <<EOF
8224 #line 8225 "configure"
8225 #include "confdefs.h"
8226 /* Override any gcc2 internal prototype to avoid an error.  */
8227 /* We use char because int might match the return type of a gcc2
8228     builtin and then its argument prototype would still apply.  */
8229 char afopen();
8230
8231 int main() {
8232 afopen()
8233 ; return 0; }
8234 EOF
8235 if { (eval echo configure:8236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8236   rm -rf conftest*
8237   eval "ac_cv_lib_$ac_lib_var=yes"
8238 else
8239   echo "configure: failed program was:" >&5
8240   cat conftest.$ac_ext >&5
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=no"
8243 fi
8244 rm -f conftest*
8245 LIBS="$ac_save_LIBS"
8246
8247 fi
8248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250   
8251         AUTH_LIBS=-ls
8252         cat >> confdefs.h <<\EOF
8253 #define HAVE_AIX_SECURITY 1
8254 EOF
8255
8256
8257 else
8258   echo "$ac_t""no" 1>&6
8259 fi
8260
8261
8262 case "$target" in
8263 *-ibm-openedition)
8264         ac_cv_func_getopt=no
8265         cat >> confdefs.h <<\EOF
8266 #define BOTH_STRINGS_H 1
8267 EOF
8268
8269         ;;
8270 esac
8271
8272 ol_link_modules=no
8273 if test $ol_enable_modules != no ; then
8274         for ac_hdr in ltdl.h
8275 do
8276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8278 echo "configure:8279: checking for $ac_hdr" >&5
8279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 #include <$ac_hdr>
8286 EOF
8287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8288 { (eval echo configure:8289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8290 if test -z "$ac_err"; then
8291   rm -rf conftest*
8292   eval "ac_cv_header_$ac_safe=yes"
8293 else
8294   echo "$ac_err" >&5
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -rf conftest*
8298   eval "ac_cv_header_$ac_safe=no"
8299 fi
8300 rm -f conftest*
8301 fi
8302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8305   cat >> confdefs.h <<EOF
8306 #define $ac_tr_hdr 1
8307 EOF
8308  
8309 else
8310   echo "$ac_t""no" 1>&6
8311 fi
8312 done
8313
8314
8315         if test $ac_cv_header_ltdl_h = no ; then
8316                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8317         fi
8318
8319         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8320 echo "configure:8321: checking for lt_dlinit in -lltdl" >&5
8321 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   ac_save_LIBS="$LIBS"
8326 LIBS="-lltdl  $LIBS"
8327 cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 /* Override any gcc2 internal prototype to avoid an error.  */
8331 /* We use char because int might match the return type of a gcc2
8332     builtin and then its argument prototype would still apply.  */
8333 char lt_dlinit();
8334
8335 int main() {
8336 lt_dlinit()
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=yes"
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_lib_$ac_lib_var=no"
8347 fi
8348 rm -f conftest*
8349 LIBS="$ac_save_LIBS"
8350
8351 fi
8352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8353   echo "$ac_t""yes" 1>&6
8354   
8355                 MODULES_LIBS=-lltdl
8356                 cat >> confdefs.h <<\EOF
8357 #define HAVE_LIBLTDL 1
8358 EOF
8359
8360         
8361 else
8362   echo "$ac_t""no" 1>&6
8363 fi
8364
8365
8366         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8367                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8368         fi
8369         ol_link_modules=yes
8370 else
8371         ol_with_bdb_module=static
8372         ol_with_dnssrv_module=static
8373         ol_with_ldap_module=static
8374         ol_with_ldbm_module=static
8375         ol_with_meta_module=static
8376         ol_with_monitor_module=static
8377         ol_with_null_module=static
8378         ol_with_passwd_module=static
8379         ol_with_perl_module=static
8380         ol_with_shell_module=static
8381         ol_with_sql_module=static
8382 fi
8383
8384 # test for EBCDIC
8385 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8386 echo "configure:8387: checking for EBCDIC" >&5
8387 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390   
8391         cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394
8395 #if !('M' == 0xd4)
8396 #include <__ASCII__/generate_error.h>
8397 #endif
8398
8399 EOF
8400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8401 { (eval echo configure:8402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8403 if test -z "$ac_err"; then
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=yes
8406 else
8407   echo "$ac_err" >&5
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   ol_cv_cpp_ebcdic=no
8412 fi
8413 rm -f conftest*
8414 fi
8415
8416 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8417 if test $ol_cv_cpp_ebcdic = yes ; then
8418         cat >> confdefs.h <<\EOF
8419 #define HAVE_EBCDIC 1
8420 EOF
8421
8422 fi
8423
8424 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8425 echo "configure:8426: checking for ANSI C header files" >&5
8426 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <stdlib.h>
8433 #include <stdarg.h>
8434 #include <string.h>
8435 #include <float.h>
8436 EOF
8437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8438 { (eval echo configure:8439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8440 if test -z "$ac_err"; then
8441   rm -rf conftest*
8442   ol_cv_header_stdc=yes
8443 else
8444   echo "$ac_err" >&5
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -rf conftest*
8448   ol_cv_header_stdc=no
8449 fi
8450 rm -f conftest*
8451
8452 if test $ol_cv_header_stdc = yes; then
8453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 #include <string.h>
8458 EOF
8459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8460   egrep "memchr" >/dev/null 2>&1; then
8461   :
8462 else
8463   rm -rf conftest*
8464   ol_cv_header_stdc=no
8465 fi
8466 rm -f conftest*
8467
8468 fi
8469
8470 if test $ol_cv_header_stdc = yes; then
8471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476 EOF
8477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8478   egrep "free" >/dev/null 2>&1; then
8479   :
8480 else
8481   rm -rf conftest*
8482   ol_cv_header_stdc=no
8483 fi
8484 rm -f conftest*
8485
8486 fi
8487
8488 if test $ol_cv_header_stdc = yes; then
8489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8490 if test "$cross_compiling" = yes; then
8491   :
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <ctype.h>
8497 #ifndef HAVE_EBCDIC
8498 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8499 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8500 #else
8501 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8502                 || ('j' <= (c) && (c) <= 'r') \
8503                 || ('s' <= (c) && (c) <= 'z'))
8504 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8505 #endif
8506 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8507 int main () { int i; for (i = 0; i < 256; i++)
8508 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8509 exit (0); }
8510
8511 EOF
8512 if { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8513 then
8514   :
8515 else
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -fr conftest*
8519   ol_cv_header_stdc=no
8520 fi
8521 rm -fr conftest*
8522 fi
8523
8524 fi
8525 fi
8526
8527 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8528 if test $ol_cv_header_stdc = yes; then
8529   cat >> confdefs.h <<\EOF
8530 #define STDC_HEADERS 1
8531 EOF
8532
8533 fi
8534 ac_cv_header_stdc=disable
8535
8536
8537 if test $ol_cv_header_stdc != yes; then
8538         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8539 fi
8540
8541 ac_header_dirent=no
8542 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8543 do
8544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8545 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8546 echo "configure:8547: checking for $ac_hdr that defines DIR" >&5
8547 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <$ac_hdr>
8555 int main() {
8556 DIR *dirp = 0;
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_dirent_$ac_safe=yes"
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   eval "ac_cv_header_dirent_$ac_safe=no"
8567 fi
8568 rm -f conftest*
8569 fi
8570 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8573   cat >> confdefs.h <<EOF
8574 #define $ac_tr_hdr 1
8575 EOF
8576  ac_header_dirent=$ac_hdr; break
8577 else
8578   echo "$ac_t""no" 1>&6
8579 fi
8580 done
8581 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8582 if test $ac_header_dirent = dirent.h; then
8583 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8584 echo "configure:8585: checking for opendir in -ldir" >&5
8585 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   ac_save_LIBS="$LIBS"
8590 LIBS="-ldir  $LIBS"
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char opendir();
8598
8599 int main() {
8600 opendir()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 LIBS="$ac_save_LIBS"
8614
8615 fi
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8617   echo "$ac_t""yes" 1>&6
8618   LIBS="$LIBS -ldir"
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622
8623 else
8624 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8625 echo "configure:8626: checking for opendir in -lx" >&5
8626 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   ac_save_LIBS="$LIBS"
8631 LIBS="-lx  $LIBS"
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* Override any gcc2 internal prototype to avoid an error.  */
8636 /* We use char because int might match the return type of a gcc2
8637     builtin and then its argument prototype would still apply.  */
8638 char opendir();
8639
8640 int main() {
8641 opendir()
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=yes"
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=no"
8652 fi
8653 rm -f conftest*
8654 LIBS="$ac_save_LIBS"
8655
8656 fi
8657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   LIBS="$LIBS -lx"
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663
8664 fi
8665
8666 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8667 echo "configure:8668: checking for sys/wait.h that is POSIX.1 compatible" >&5
8668 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 #include <sys/types.h>
8675 #include <sys/wait.h>
8676 #ifndef WEXITSTATUS
8677 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8678 #endif
8679 #ifndef WIFEXITED
8680 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8681 #endif
8682 int main() {
8683 int s;
8684 wait (&s);
8685 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8689   rm -rf conftest*
8690   ac_cv_header_sys_wait_h=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   ac_cv_header_sys_wait_h=no
8696 fi
8697 rm -f conftest*
8698 fi
8699
8700 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8701 if test $ac_cv_header_sys_wait_h = yes; then
8702   cat >> confdefs.h <<\EOF
8703 #define HAVE_SYS_WAIT_H 1
8704 EOF
8705
8706 fi
8707
8708 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8709 echo "configure:8710: checking POSIX termios" >&5
8710 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <unistd.h>
8718 #include <termios.h>
8719 int main() {
8720 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8721    tcgetattr(0, 0);
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   am_cv_sys_posix_termios=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   am_cv_sys_posix_termios=no
8732 fi
8733 rm -f conftest*
8734 fi
8735
8736 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8737
8738
8739  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8740 echo "configure:8741: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8741 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8742   echo $ac_n "(cached) $ac_c" 1>&6
8743 else
8744   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8745
8746   gwinsz_in_termios_h=no
8747   if test $am_cv_sys_posix_termios = yes; then
8748     cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752 #     include <termios.h>
8753 #     ifdef TIOCGWINSZ
8754         yes
8755 #     endif
8756     
8757 EOF
8758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8759   egrep "yes" >/dev/null 2>&1; then
8760   rm -rf conftest*
8761   gwinsz_in_termios_h=yes
8762 fi
8763 rm -f conftest*
8764
8765   fi
8766
8767   if test $gwinsz_in_termios_h = no; then
8768     cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <sys/types.h>
8772 #     include <sys/ioctl.h>
8773 #     ifdef TIOCGWINSZ
8774         yes
8775 #     endif
8776     
8777 EOF
8778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8779   egrep "yes" >/dev/null 2>&1; then
8780   rm -rf conftest*
8781   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8782 fi
8783 rm -f conftest*
8784
8785   fi
8786   
8787 fi
8788
8789 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8790   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8791     cat >> confdefs.h <<\EOF
8792 #define GWINSZ_IN_SYS_IOCTL 1
8793 EOF
8794
8795   fi
8796
8797 if test $am_cv_sys_posix_termios = yes ; then
8798         cat >> confdefs.h <<\EOF
8799 #define HAVE_POSIX_TERMIOS 1
8800 EOF
8801
8802 fi
8803
8804 for ac_hdr in \
8805         arpa/inet.h             \
8806         arpa/nameser.h  \
8807         assert.h                \
8808         conio.h                 \
8809         crypt.h                 \
8810         direct.h                \
8811         errno.h                 \
8812         fcntl.h                 \
8813         filio.h                 \
8814         getopt.h                \
8815         grp.h                   \
8816         io.h                    \
8817         libutil.h               \
8818         limits.h                \
8819         locale.h                \
8820         netinet/tcp.h   \
8821         malloc.h                \
8822         memory.h                \
8823         psap.h                  \
8824         pwd.h                   \
8825         process.h               \
8826         resolv.h                \
8827         sgtty.h                 \
8828         shadow.h                \
8829         stddef.h                \
8830         string.h                \
8831         strings.h               \
8832         sysexits.h              \
8833         sys/file.h              \
8834         sys/filio.h             \
8835         sys/errno.h             \
8836         sys/ioctl.h             \
8837         sys/param.h             \
8838         sys/resource.h  \
8839         sys/select.h    \
8840         sys/socket.h    \
8841         sys/stat.h              \
8842         sys/syslog.h    \
8843         sys/time.h              \
8844         sys/types.h             \
8845         sys/ucred.h             \
8846         sys/uio.h               \
8847         syslog.h                \
8848         termios.h               \
8849         unistd.h                \
8850         winsock.h               \
8851         winsock2.h              \
8852
8853 do
8854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8856 echo "configure:8857: checking for $ac_hdr" >&5
8857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 #include <$ac_hdr>
8864 EOF
8865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8866 { (eval echo configure:8867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8868 if test -z "$ac_err"; then
8869   rm -rf conftest*
8870   eval "ac_cv_header_$ac_safe=yes"
8871 else
8872   echo "$ac_err" >&5
8873   echo "configure: failed program was:" >&5
8874   cat conftest.$ac_ext >&5
8875   rm -rf conftest*
8876   eval "ac_cv_header_$ac_safe=no"
8877 fi
8878 rm -f conftest*
8879 fi
8880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8881   echo "$ac_t""yes" 1>&6
8882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8883   cat >> confdefs.h <<EOF
8884 #define $ac_tr_hdr 1
8885 EOF
8886  
8887 else
8888   echo "$ac_t""no" 1>&6
8889 fi
8890 done
8891
8892
8893
8894
8895 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8896 echo "configure:8897: checking for dlopen" >&5
8897 if eval "test \"\${ac_cv_func_dlopen+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 /* System header to define __stub macros and hopefully few prototypes,
8904     which can conflict with char dlopen(); below.  */
8905 #include <assert.h>
8906 /* Override any gcc2 internal prototype to avoid an error.  */
8907 /* We use char because int might match the return type of a gcc2
8908     builtin and then its argument prototype would still apply.  */
8909 char dlopen();
8910 char (*f)();
8911
8912 int main() {
8913
8914 /* The GNU C library defines this for functions which it implements
8915     to always fail with ENOSYS.  Some functions are actually named
8916     something starting with __ and the normal name is an alias.  */
8917 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8918 choke me
8919 #else
8920 f = dlopen;
8921 #endif
8922
8923 ; return 0; }
8924 EOF
8925 if { (eval echo configure:8926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8926   rm -rf conftest*
8927   eval "ac_cv_func_dlopen=yes"
8928 else
8929   echo "configure: failed program was:" >&5
8930   cat conftest.$ac_ext >&5
8931   rm -rf conftest*
8932   eval "ac_cv_func_dlopen=no"
8933 fi
8934 rm -f conftest*
8935 fi
8936
8937 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8938   echo "$ac_t""yes" 1>&6
8939   :
8940 else
8941   echo "$ac_t""no" 1>&6
8942 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8943 echo "configure:8944: checking for dlopen in -ldl" >&5
8944 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8946   echo $ac_n "(cached) $ac_c" 1>&6
8947 else
8948   ac_save_LIBS="$LIBS"
8949 LIBS="-ldl  $LIBS"
8950 cat > conftest.$ac_ext <<EOF
8951 #line 8952 "configure"
8952 #include "confdefs.h"
8953 /* Override any gcc2 internal prototype to avoid an error.  */
8954 /* We use char because int might match the return type of a gcc2
8955     builtin and then its argument prototype would still apply.  */
8956 char dlopen();
8957
8958 int main() {
8959 dlopen()
8960 ; return 0; }
8961 EOF
8962 if { (eval echo configure:8963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8963   rm -rf conftest*
8964   eval "ac_cv_lib_$ac_lib_var=yes"
8965 else
8966   echo "configure: failed program was:" >&5
8967   cat conftest.$ac_ext >&5
8968   rm -rf conftest*
8969   eval "ac_cv_lib_$ac_lib_var=no"
8970 fi
8971 rm -f conftest*
8972 LIBS="$ac_save_LIBS"
8973
8974 fi
8975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8978     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8979   cat >> confdefs.h <<EOF
8980 #define $ac_tr_lib 1
8981 EOF
8982
8983   LIBS="-ldl $LIBS"
8984
8985 else
8986   echo "$ac_t""no" 1>&6
8987 fi
8988
8989 fi
8990
8991
8992 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8993 echo "configure:8994: checking for sigset in -lV3" >&5
8994 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8996   echo $ac_n "(cached) $ac_c" 1>&6
8997 else
8998   ac_save_LIBS="$LIBS"
8999 LIBS="-lV3  $LIBS"
9000 cat > conftest.$ac_ext <<EOF
9001 #line 9002 "configure"
9002 #include "confdefs.h"
9003 /* Override any gcc2 internal prototype to avoid an error.  */
9004 /* We use char because int might match the return type of a gcc2
9005     builtin and then its argument prototype would still apply.  */
9006 char sigset();
9007
9008 int main() {
9009 sigset()
9010 ; return 0; }
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9013   rm -rf conftest*
9014   eval "ac_cv_lib_$ac_lib_var=yes"
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -rf conftest*
9019   eval "ac_cv_lib_$ac_lib_var=no"
9020 fi
9021 rm -f conftest*
9022 LIBS="$ac_save_LIBS"
9023
9024 fi
9025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9026   echo "$ac_t""yes" 1>&6
9027     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9028     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9029   cat >> confdefs.h <<EOF
9030 #define $ac_tr_lib 1
9031 EOF
9032
9033   LIBS="-lV3 $LIBS"
9034
9035 else
9036   echo "$ac_t""no" 1>&6
9037 fi
9038
9039
9040 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9041 echo "configure:9042: checking for winsock" >&5
9042 save_LIBS="$LIBS"
9043 for curlib in ws2_32 wsock32; do
9044         LIBS="$LIBS -l$curlib"
9045         cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048
9049                         char socket@12();
9050                         char select@20();
9051                         char closesocket@4();
9052                         char gethostname@8();
9053                         
9054 int main() {
9055
9056                         socket@12();
9057                         select@20();
9058                         closesocket@4();
9059                         gethostname@8();
9060                         
9061 ; return 0; }
9062 EOF
9063 if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9064   rm -rf conftest*
9065   have_winsock=yes
9066 else
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   have_winsock=no
9071 fi
9072 rm -f conftest*
9073
9074         if test $have_winsock = yes; then
9075                 cat >> confdefs.h <<\EOF
9076 #define HAVE_WINSOCK 1
9077 EOF
9078
9079                 ac_cv_func_socket=yes
9080                 ac_cv_func_select=yes
9081                 ac_cv_func_closesocket=yes
9082                 ac_cv_func_gethostname=yes
9083                 if test $curlib = ws2_32; then
9084                         have_winsock=winsock2
9085                         cat >> confdefs.h <<\EOF
9086 #define HAVE_WINSOCK2 1
9087 EOF
9088
9089                 fi
9090                 break
9091         fi
9092         LIBS="$save_LIBS"
9093 done
9094 echo "$ac_t""$have_winsock" 1>&6
9095
9096
9097 echo $ac_n "checking for socket""... $ac_c" 1>&6
9098 echo "configure:9099: checking for socket" >&5
9099 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9100   echo $ac_n "(cached) $ac_c" 1>&6
9101 else
9102   cat > conftest.$ac_ext <<EOF
9103 #line 9104 "configure"
9104 #include "confdefs.h"
9105 /* System header to define __stub macros and hopefully few prototypes,
9106     which can conflict with char socket(); below.  */
9107 #include <assert.h>
9108 /* Override any gcc2 internal prototype to avoid an error.  */
9109 /* We use char because int might match the return type of a gcc2
9110     builtin and then its argument prototype would still apply.  */
9111 char socket();
9112 char (*f)();
9113
9114 int main() {
9115
9116 /* The GNU C library defines this for functions which it implements
9117     to always fail with ENOSYS.  Some functions are actually named
9118     something starting with __ and the normal name is an alias.  */
9119 #if defined (__stub_socket) || defined (__stub___socket)
9120 choke me
9121 #else
9122 f = socket;
9123 #endif
9124
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   eval "ac_cv_func_socket=yes"
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   eval "ac_cv_func_socket=no"
9135 fi
9136 rm -f conftest*
9137 fi
9138
9139 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141   :
9142 else
9143   echo "$ac_t""no" 1>&6
9144         
9145         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9146 echo "configure:9147: checking for main in -lsocket" >&5
9147 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9148 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9149   echo $ac_n "(cached) $ac_c" 1>&6
9150 else
9151   ac_save_LIBS="$LIBS"
9152 LIBS="-lsocket  $LIBS"
9153 cat > conftest.$ac_ext <<EOF
9154 #line 9155 "configure"
9155 #include "confdefs.h"
9156
9157 int main() {
9158 main()
9159 ; return 0; }
9160 EOF
9161 if { (eval echo configure:9162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9162   rm -rf conftest*
9163   eval "ac_cv_lib_$ac_lib_var=yes"
9164 else
9165   echo "configure: failed program was:" >&5
9166   cat conftest.$ac_ext >&5
9167   rm -rf conftest*
9168   eval "ac_cv_lib_$ac_lib_var=no"
9169 fi
9170 rm -f conftest*
9171 LIBS="$ac_save_LIBS"
9172
9173 fi
9174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9175   echo "$ac_t""yes" 1>&6
9176     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9177     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9178   cat >> confdefs.h <<EOF
9179 #define $ac_tr_lib 1
9180 EOF
9181
9182   LIBS="-lsocket $LIBS"
9183
9184 else
9185   echo "$ac_t""no" 1>&6
9186 fi
9187
9188         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9189 echo "configure:9190: checking for main in -lnet" >&5
9190 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9191 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9192   echo $ac_n "(cached) $ac_c" 1>&6
9193 else
9194   ac_save_LIBS="$LIBS"
9195 LIBS="-lnet  $LIBS"
9196 cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199
9200 int main() {
9201 main()
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=yes"
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=no"
9212 fi
9213 rm -f conftest*
9214 LIBS="$ac_save_LIBS"
9215
9216 fi
9217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9218   echo "$ac_t""yes" 1>&6
9219     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9221   cat >> confdefs.h <<EOF
9222 #define $ac_tr_lib 1
9223 EOF
9224
9225   LIBS="-lnet $LIBS"
9226
9227 else
9228   echo "$ac_t""no" 1>&6
9229 fi
9230
9231         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9232 echo "configure:9233: checking for main in -lnsl_s" >&5
9233 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9235   echo $ac_n "(cached) $ac_c" 1>&6
9236 else
9237   ac_save_LIBS="$LIBS"
9238 LIBS="-lnsl_s  $LIBS"
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242
9243 int main() {
9244 main()
9245 ; return 0; }
9246 EOF
9247 if { (eval echo configure:9248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=yes"
9250 else
9251   echo "configure: failed program was:" >&5
9252   cat conftest.$ac_ext >&5
9253   rm -rf conftest*
9254   eval "ac_cv_lib_$ac_lib_var=no"
9255 fi
9256 rm -f conftest*
9257 LIBS="$ac_save_LIBS"
9258
9259 fi
9260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9261   echo "$ac_t""yes" 1>&6
9262     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9263     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9264   cat >> confdefs.h <<EOF
9265 #define $ac_tr_lib 1
9266 EOF
9267
9268   LIBS="-lnsl_s $LIBS"
9269
9270 else
9271   echo "$ac_t""no" 1>&6
9272 fi
9273
9274         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9275 echo "configure:9276: checking for main in -lnsl" >&5
9276 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9278   echo $ac_n "(cached) $ac_c" 1>&6
9279 else
9280   ac_save_LIBS="$LIBS"
9281 LIBS="-lnsl  $LIBS"
9282 cat > conftest.$ac_ext <<EOF
9283 #line 9284 "configure"
9284 #include "confdefs.h"
9285
9286 int main() {
9287 main()
9288 ; return 0; }
9289 EOF
9290 if { (eval echo configure:9291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=yes"
9293 else
9294   echo "configure: failed program was:" >&5
9295   cat conftest.$ac_ext >&5
9296   rm -rf conftest*
9297   eval "ac_cv_lib_$ac_lib_var=no"
9298 fi
9299 rm -f conftest*
9300 LIBS="$ac_save_LIBS"
9301
9302 fi
9303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9304   echo "$ac_t""yes" 1>&6
9305     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9306     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9307   cat >> confdefs.h <<EOF
9308 #define $ac_tr_lib 1
9309 EOF
9310
9311   LIBS="-lnsl $LIBS"
9312
9313 else
9314   echo "$ac_t""no" 1>&6
9315 fi
9316
9317         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9318 echo "configure:9319: checking for socket in -linet" >&5
9319 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9321   echo $ac_n "(cached) $ac_c" 1>&6
9322 else
9323   ac_save_LIBS="$LIBS"
9324 LIBS="-linet  $LIBS"
9325 cat > conftest.$ac_ext <<EOF
9326 #line 9327 "configure"
9327 #include "confdefs.h"
9328 /* Override any gcc2 internal prototype to avoid an error.  */
9329 /* We use char because int might match the return type of a gcc2
9330     builtin and then its argument prototype would still apply.  */
9331 char socket();
9332
9333 int main() {
9334 socket()
9335 ; return 0; }
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=yes"
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -rf conftest*
9344   eval "ac_cv_lib_$ac_lib_var=no"
9345 fi
9346 rm -f conftest*
9347 LIBS="$ac_save_LIBS"
9348
9349 fi
9350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9351   echo "$ac_t""yes" 1>&6
9352     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9353     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9354   cat >> confdefs.h <<EOF
9355 #define $ac_tr_lib 1
9356 EOF
9357
9358   LIBS="-linet $LIBS"
9359
9360 else
9361   echo "$ac_t""no" 1>&6
9362 fi
9363
9364         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9365 echo "configure:9366: checking for main in -lgen" >&5
9366 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9368   echo $ac_n "(cached) $ac_c" 1>&6
9369 else
9370   ac_save_LIBS="$LIBS"
9371 LIBS="-lgen  $LIBS"
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9375
9376 int main() {
9377 main()
9378 ; return 0; }
9379 EOF
9380 if { (eval echo configure:9381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=yes"
9383 else
9384   echo "configure: failed program was:" >&5
9385   cat conftest.$ac_ext >&5
9386   rm -rf conftest*
9387   eval "ac_cv_lib_$ac_lib_var=no"
9388 fi
9389 rm -f conftest*
9390 LIBS="$ac_save_LIBS"
9391
9392 fi
9393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9394   echo "$ac_t""yes" 1>&6
9395     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9396     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9397   cat >> confdefs.h <<EOF
9398 #define $ac_tr_lib 1
9399 EOF
9400
9401   LIBS="-lgen $LIBS"
9402
9403 else
9404   echo "$ac_t""no" 1>&6
9405 fi
9406
9407
9408 fi
9409
9410
9411 echo $ac_n "checking for select""... $ac_c" 1>&6
9412 echo "configure:9413: checking for select" >&5
9413 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419 /* System header to define __stub macros and hopefully few prototypes,
9420     which can conflict with char select(); below.  */
9421 #include <assert.h>
9422 /* Override any gcc2 internal prototype to avoid an error.  */
9423 /* We use char because int might match the return type of a gcc2
9424     builtin and then its argument prototype would still apply.  */
9425 char select();
9426 char (*f)();
9427
9428 int main() {
9429
9430 /* The GNU C library defines this for functions which it implements
9431     to always fail with ENOSYS.  Some functions are actually named
9432     something starting with __ and the normal name is an alias.  */
9433 #if defined (__stub_select) || defined (__stub___select)
9434 choke me
9435 #else
9436 f = select;
9437 #endif
9438
9439 ; return 0; }
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9442   rm -rf conftest*
9443   eval "ac_cv_func_select=yes"
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -rf conftest*
9448   eval "ac_cv_func_select=no"
9449 fi
9450 rm -f conftest*
9451 fi
9452
9453 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9454   echo "$ac_t""yes" 1>&6
9455   :
9456 else
9457   echo "$ac_t""no" 1>&6
9458 { echo "configure: error: select() required." 1>&2; exit 1; }
9459 fi
9460
9461
9462 if test "${ac_cv_header_winsock_h}" != yes; then
9463                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9464 echo "configure:9465: checking types of arguments for select()" >&5
9465  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9466   echo $ac_n "(cached) $ac_c" 1>&6
9467 else
9468    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9469   echo $ac_n "(cached) $ac_c" 1>&6
9470 else
9471     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9472   echo $ac_n "(cached) $ac_c" 1>&6
9473 else
9474      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9475      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9476       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9477        cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480 #ifdef HAVE_SYS_TYPES_H
9481 #include <sys/types.h>
9482 #endif
9483 #ifdef HAVE_SYS_TIME_H
9484 #include <sys/time.h>
9485 #endif
9486 #ifdef HAVE_SYS_SELECT_H
9487 #include <sys/select.h>
9488 #endif
9489 #ifdef HAVE_SYS_SOCKET_H
9490 #include <sys/socket.h>
9491 #endif
9492 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);
9493 int main() {
9494
9495 ; return 0; }
9496 EOF
9497 if { (eval echo configure:9498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9498   rm -rf conftest*
9499           ac_not_found=no ; break 3
9500 else
9501   echo "configure: failed program was:" >&5
9502   cat conftest.$ac_ext >&5
9503   rm -rf conftest*
9504   ac_not_found=yes
9505 fi
9506 rm -f conftest*
9507       done
9508      done
9509     done
9510    
9511 fi
9512   
9513 fi
9514  
9515 fi
9516  if test "$ac_not_found" = yes; then
9517   ac_cv_func_select_arg1=int 
9518   ac_cv_func_select_arg234='int *' 
9519   ac_cv_func_select_arg5='struct timeval *'
9520  fi
9521  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9522  cat >> confdefs.h <<EOF
9523 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9524 EOF
9525
9526  cat >> confdefs.h <<EOF
9527 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9528 EOF
9529
9530  cat >> confdefs.h <<EOF
9531 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9532 EOF
9533
9534
9535 fi
9536
9537
9538 for ac_hdr in regex.h 
9539 do
9540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9542 echo "configure:9543: checking for $ac_hdr" >&5
9543 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9544   echo $ac_n "(cached) $ac_c" 1>&6
9545 else
9546   cat > conftest.$ac_ext <<EOF
9547 #line 9548 "configure"
9548 #include "confdefs.h"
9549 #include <$ac_hdr>
9550 EOF
9551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9552 { (eval echo configure:9553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9554 if test -z "$ac_err"; then
9555   rm -rf conftest*
9556   eval "ac_cv_header_$ac_safe=yes"
9557 else
9558   echo "$ac_err" >&5
9559   echo "configure: failed program was:" >&5
9560   cat conftest.$ac_ext >&5
9561   rm -rf conftest*
9562   eval "ac_cv_header_$ac_safe=no"
9563 fi
9564 rm -f conftest*
9565 fi
9566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9567   echo "$ac_t""yes" 1>&6
9568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9569   cat >> confdefs.h <<EOF
9570 #define $ac_tr_hdr 1
9571 EOF
9572  
9573 else
9574   echo "$ac_t""no" 1>&6
9575 fi
9576 done
9577
9578 if test "$ac_cv_header_regex_h" != yes ; then
9579         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9580 fi
9581
9582 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9583 echo "configure:9584: checking for library containing regfree" >&5
9584 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9585   echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587   ac_func_search_save_LIBS="$LIBS"
9588 ac_cv_search_regfree="no"
9589 cat > conftest.$ac_ext <<EOF
9590 #line 9591 "configure"
9591 #include "confdefs.h"
9592 /* Override any gcc2 internal prototype to avoid an error.  */
9593 /* We use char because int might match the return type of a gcc2
9594     builtin and then its argument prototype would still apply.  */
9595 char regfree();
9596
9597 int main() {
9598 regfree()
9599 ; return 0; }
9600 EOF
9601 if { (eval echo configure:9602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9602   rm -rf conftest*
9603   ac_cv_search_regfree="none required"
9604 else
9605   echo "configure: failed program was:" >&5
9606   cat conftest.$ac_ext >&5
9607 fi
9608 rm -f conftest*
9609 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9610 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9611 cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 /* Override any gcc2 internal prototype to avoid an error.  */
9615 /* We use char because int might match the return type of a gcc2
9616     builtin and then its argument prototype would still apply.  */
9617 char regfree();
9618
9619 int main() {
9620 regfree()
9621 ; return 0; }
9622 EOF
9623 if { (eval echo configure:9624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9624   rm -rf conftest*
9625   ac_cv_search_regfree="-l$ac_lib"
9626 break
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630 fi
9631 rm -f conftest*
9632 done
9633 LIBS="$ac_func_search_save_LIBS"
9634 fi
9635
9636 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9637 if test "$ac_cv_search_regfree" != "no"; then
9638   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9639   :
9640 else :
9641   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9642 fi
9643
9644
9645 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9646 echo "configure:9647: checking for compatible POSIX regex" >&5
9647 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9648   echo $ac_n "(cached) $ac_c" 1>&6
9649 else
9650   
9651         if test "$cross_compiling" = yes; then
9652   ol_cv_c_posix_regex=cross
9653 else
9654   cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657
9658 #include <sys/types.h>
9659 #include <regex.h>
9660 static char *pattern, *string;
9661 main()
9662 {
9663         int rc;
9664         regex_t re;
9665
9666         pattern = "^A";
9667
9668         if(regcomp(&re, pattern, 0)) {
9669                 return -1;
9670         }
9671         
9672         string = "ALL MATCH";
9673         
9674         rc = regexec(&re, string, 0, (void*)0, 0);
9675
9676         regfree(&re);
9677
9678         return rc;
9679 }
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9682 then
9683   ol_cv_c_posix_regex=yes
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -fr conftest*
9688   ol_cv_c_posix_regex=no
9689 fi
9690 rm -fr conftest*
9691 fi
9692
9693 fi
9694
9695 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9696
9697 if test "$ol_cv_c_posix_regex" = no ; then
9698         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9699 fi
9700
9701
9702 have_uuid=no
9703 for ac_hdr in sys/uuid.h
9704 do
9705 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9706 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9707 echo "configure:9708: checking for $ac_hdr" >&5
9708 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9709   echo $ac_n "(cached) $ac_c" 1>&6
9710 else
9711   cat > conftest.$ac_ext <<EOF
9712 #line 9713 "configure"
9713 #include "confdefs.h"
9714 #include <$ac_hdr>
9715 EOF
9716 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9717 { (eval echo configure:9718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9718 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9719 if test -z "$ac_err"; then
9720   rm -rf conftest*
9721   eval "ac_cv_header_$ac_safe=yes"
9722 else
9723   echo "$ac_err" >&5
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_header_$ac_safe=no"
9728 fi
9729 rm -f conftest*
9730 fi
9731 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9732   echo "$ac_t""yes" 1>&6
9733     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9734   cat >> confdefs.h <<EOF
9735 #define $ac_tr_hdr 1
9736 EOF
9737  
9738 else
9739   echo "$ac_t""no" 1>&6
9740 fi
9741 done
9742
9743 if test $ac_cv_header_sys_uuid_h = yes ; then
9744         save_LIBS="$LIBS"
9745         
9746 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9747 echo "configure:9748: checking for library containing uuid_to_str" >&5
9748 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   ac_func_search_save_LIBS="$LIBS"
9752 ac_cv_search_uuid_to_str="no"
9753 cat > conftest.$ac_ext <<EOF
9754 #line 9755 "configure"
9755 #include "confdefs.h"
9756 /* Override any gcc2 internal prototype to avoid an error.  */
9757 /* We use char because int might match the return type of a gcc2
9758     builtin and then its argument prototype would still apply.  */
9759 char uuid_to_str();
9760
9761 int main() {
9762 uuid_to_str()
9763 ; return 0; }
9764 EOF
9765 if { (eval echo configure:9766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9766   rm -rf conftest*
9767   ac_cv_search_uuid_to_str="none required"
9768 else
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771 fi
9772 rm -f conftest*
9773 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9774 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9775 cat > conftest.$ac_ext <<EOF
9776 #line 9777 "configure"
9777 #include "confdefs.h"
9778 /* Override any gcc2 internal prototype to avoid an error.  */
9779 /* We use char because int might match the return type of a gcc2
9780     builtin and then its argument prototype would still apply.  */
9781 char uuid_to_str();
9782
9783 int main() {
9784 uuid_to_str()
9785 ; return 0; }
9786 EOF
9787 if { (eval echo configure:9788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9788   rm -rf conftest*
9789   ac_cv_search_uuid_to_str="-l$ac_lib"
9790 break
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794 fi
9795 rm -f conftest*
9796 done
9797 LIBS="$ac_func_search_save_LIBS"
9798 fi
9799
9800 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9801 if test "$ac_cv_search_uuid_to_str" != "no"; then
9802   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9803   have_uuid=yes
9804 else :
9805   :
9806 fi
9807         LIBS="$save_LIBS"
9808
9809         if test have_uuid = yes ; then
9810                 cat >> confdefs.h <<\EOF
9811 #define HAVE_UUID_TO_STR 1
9812 EOF
9813
9814
9815                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9816                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9817         fi
9818 fi
9819
9820 if test $have_uuid = no ; then
9821         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9822 echo "configure:9823: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9823         save_LIBS="$LIBS"
9824         LIBS="$LIBS -lrpcrt4"
9825         cat > conftest.$ac_ext <<EOF
9826 #line 9827 "configure"
9827 #include "confdefs.h"
9828
9829                 char UuidCreate@4();
9830                 char UuidToStringA@8();
9831                 
9832 int main() {
9833
9834                 UuidCreate@4();
9835                 UuidToStringA@8();
9836                 
9837 ; return 0; }
9838 EOF
9839 if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9840   rm -rf conftest*
9841   need_rpcrt=yes
9842 else
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845   rm -rf conftest*
9846   need_rpcrt=no
9847 fi
9848 rm -f conftest*
9849         if test $need_rpcrt = yes; then
9850                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9851         fi
9852         LIBS="$save_LIBS"
9853         echo "$ac_t""$need_rpcrt" 1>&6
9854 fi
9855
9856 ol_link_dnssrv=no
9857 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9858 echo "configure:9859: checking for res_query" >&5
9859 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9860   echo $ac_n "(cached) $ac_c" 1>&6
9861 else
9862   cat > conftest.$ac_ext <<EOF
9863 #line 9864 "configure"
9864 #include "confdefs.h"
9865 /* System header to define __stub macros and hopefully few prototypes,
9866     which can conflict with char res_query(); below.  */
9867 #include <assert.h>
9868 /* Override any gcc2 internal prototype to avoid an error.  */
9869 /* We use char because int might match the return type of a gcc2
9870     builtin and then its argument prototype would still apply.  */
9871 char res_query();
9872 char (*f)();
9873
9874 int main() {
9875
9876 /* The GNU C library defines this for functions which it implements
9877     to always fail with ENOSYS.  Some functions are actually named
9878     something starting with __ and the normal name is an alias.  */
9879 #if defined (__stub_res_query) || defined (__stub___res_query)
9880 choke me
9881 #else
9882 f = res_query;
9883 #endif
9884
9885 ; return 0; }
9886 EOF
9887 if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9888   rm -rf conftest*
9889   eval "ac_cv_func_res_query=yes"
9890 else
9891   echo "configure: failed program was:" >&5
9892   cat conftest.$ac_ext >&5
9893   rm -rf conftest*
9894   eval "ac_cv_func_res_query=no"
9895 fi
9896 rm -f conftest*
9897 fi
9898
9899 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9900   echo "$ac_t""yes" 1>&6
9901   :
9902 else
9903   echo "$ac_t""no" 1>&6
9904 fi
9905
9906 if test $ac_cv_func_res_query = no ; then 
9907         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9908 echo "configure:9909: checking for __res_query" >&5
9909 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 /* System header to define __stub macros and hopefully few prototypes,
9916     which can conflict with char __res_query(); below.  */
9917 #include <assert.h>
9918 /* Override any gcc2 internal prototype to avoid an error.  */
9919 /* We use char because int might match the return type of a gcc2
9920     builtin and then its argument prototype would still apply.  */
9921 char __res_query();
9922 char (*f)();
9923
9924 int main() {
9925
9926 /* The GNU C library defines this for functions which it implements
9927     to always fail with ENOSYS.  Some functions are actually named
9928     something starting with __ and the normal name is an alias.  */
9929 #if defined (__stub___res_query) || defined (__stub_____res_query)
9930 choke me
9931 #else
9932 f = __res_query;
9933 #endif
9934
9935 ; return 0; }
9936 EOF
9937 if { (eval echo configure:9938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9938   rm -rf conftest*
9939   eval "ac_cv_func___res_query=yes"
9940 else
9941   echo "configure: failed program was:" >&5
9942   cat conftest.$ac_ext >&5
9943   rm -rf conftest*
9944   eval "ac_cv_func___res_query=no"
9945 fi
9946 rm -f conftest*
9947 fi
9948
9949 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9950   echo "$ac_t""yes" 1>&6
9951   :
9952 else
9953   echo "$ac_t""no" 1>&6
9954 fi
9955
9956         ac_cv_func_res_query=$ac_cv_func___res_query
9957 fi
9958
9959 if test $ac_cv_func_res_query = no ; then 
9960         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9961 echo "configure:9962: checking for res_query in -lbind" >&5
9962 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9964   echo $ac_n "(cached) $ac_c" 1>&6
9965 else
9966   ac_save_LIBS="$LIBS"
9967 LIBS="-lbind  $LIBS"
9968 cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9971 /* Override any gcc2 internal prototype to avoid an error.  */
9972 /* We use char because int might match the return type of a gcc2
9973     builtin and then its argument prototype would still apply.  */
9974 char res_query();
9975
9976 int main() {
9977 res_query()
9978 ; return 0; }
9979 EOF
9980 if { (eval echo configure:9981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9981   rm -rf conftest*
9982   eval "ac_cv_lib_$ac_lib_var=yes"
9983 else
9984   echo "configure: failed program was:" >&5
9985   cat conftest.$ac_ext >&5
9986   rm -rf conftest*
9987   eval "ac_cv_lib_$ac_lib_var=no"
9988 fi
9989 rm -f conftest*
9990 LIBS="$ac_save_LIBS"
9991
9992 fi
9993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9994   echo "$ac_t""yes" 1>&6
9995     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9996     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9997   cat >> confdefs.h <<EOF
9998 #define $ac_tr_lib 1
9999 EOF
10000
10001   LIBS="-lbind $LIBS"
10002
10003 else
10004   echo "$ac_t""no" 1>&6
10005 fi
10006
10007         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10008 fi
10009
10010 if test $ac_cv_func_res_query = no ; then 
10011         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10012 echo "configure:10013: checking for __res_query in -lbind" >&5
10013 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10015   echo $ac_n "(cached) $ac_c" 1>&6
10016 else
10017   ac_save_LIBS="$LIBS"
10018 LIBS="-lbind  $LIBS"
10019 cat > conftest.$ac_ext <<EOF
10020 #line 10021 "configure"
10021 #include "confdefs.h"
10022 /* Override any gcc2 internal prototype to avoid an error.  */
10023 /* We use char because int might match the return type of a gcc2
10024     builtin and then its argument prototype would still apply.  */
10025 char __res_query();
10026
10027 int main() {
10028 __res_query()
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10032   rm -rf conftest*
10033   eval "ac_cv_lib_$ac_lib_var=yes"
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=no"
10039 fi
10040 rm -f conftest*
10041 LIBS="$ac_save_LIBS"
10042
10043 fi
10044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10045   echo "$ac_t""yes" 1>&6
10046     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10047     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10048   cat >> confdefs.h <<EOF
10049 #define $ac_tr_lib 1
10050 EOF
10051
10052   LIBS="-lbind $LIBS"
10053
10054 else
10055   echo "$ac_t""no" 1>&6
10056 fi
10057
10058         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10059 fi
10060
10061 if test $ac_cv_func_res_query = no ; then 
10062         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10063 echo "configure:10064: checking for res_query in -lresolv" >&5
10064 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10066   echo $ac_n "(cached) $ac_c" 1>&6
10067 else
10068   ac_save_LIBS="$LIBS"
10069 LIBS="-lresolv  $LIBS"
10070 cat > conftest.$ac_ext <<EOF
10071 #line 10072 "configure"
10072 #include "confdefs.h"
10073 /* Override any gcc2 internal prototype to avoid an error.  */
10074 /* We use char because int might match the return type of a gcc2
10075     builtin and then its argument prototype would still apply.  */
10076 char res_query();
10077
10078 int main() {
10079 res_query()
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   eval "ac_cv_lib_$ac_lib_var=yes"
10085 else
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=no"
10090 fi
10091 rm -f conftest*
10092 LIBS="$ac_save_LIBS"
10093
10094 fi
10095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10096   echo "$ac_t""yes" 1>&6
10097     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10098     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10099   cat >> confdefs.h <<EOF
10100 #define $ac_tr_lib 1
10101 EOF
10102
10103   LIBS="-lresolv $LIBS"
10104
10105 else
10106   echo "$ac_t""no" 1>&6
10107 fi
10108
10109         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10110 fi
10111
10112 if test $ac_cv_func_res_query = no ; then 
10113         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10114 echo "configure:10115: checking for __res_query in -lresolv" >&5
10115 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   ac_save_LIBS="$LIBS"
10120 LIBS="-lresolv  $LIBS"
10121 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 /* Override any gcc2 internal prototype to avoid an error.  */
10125 /* We use char because int might match the return type of a gcc2
10126     builtin and then its argument prototype would still apply.  */
10127 char __res_query();
10128
10129 int main() {
10130 __res_query()
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=yes"
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=no"
10141 fi
10142 rm -f conftest*
10143 LIBS="$ac_save_LIBS"
10144
10145 fi
10146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10147   echo "$ac_t""yes" 1>&6
10148     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10149     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10150   cat >> confdefs.h <<EOF
10151 #define $ac_tr_lib 1
10152 EOF
10153
10154   LIBS="-lresolv $LIBS"
10155
10156 else
10157   echo "$ac_t""no" 1>&6
10158 fi
10159
10160         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10161 fi
10162
10163 if test "$ac_cv_func_res_query" = yes ; then
10164         cat >> confdefs.h <<\EOF
10165 #define HAVE_RES_QUERY 1
10166 EOF
10167
10168
10169         if test $ol_enable_dnssrv != no ; then
10170                 ol_link_dnssrv=yes
10171         fi
10172 fi
10173
10174 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10175         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10176 fi
10177
10178 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10179 do
10180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10181 echo "configure:10182: checking for $ac_func" >&5
10182 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10183   echo $ac_n "(cached) $ac_c" 1>&6
10184 else
10185   cat > conftest.$ac_ext <<EOF
10186 #line 10187 "configure"
10187 #include "confdefs.h"
10188 /* System header to define __stub macros and hopefully few prototypes,
10189     which can conflict with char $ac_func(); below.  */
10190 #include <assert.h>
10191 /* Override any gcc2 internal prototype to avoid an error.  */
10192 /* We use char because int might match the return type of a gcc2
10193     builtin and then its argument prototype would still apply.  */
10194 char $ac_func();
10195 char (*f)();
10196
10197 int main() {
10198
10199 /* The GNU C library defines this for functions which it implements
10200     to always fail with ENOSYS.  Some functions are actually named
10201     something starting with __ and the normal name is an alias.  */
10202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10203 choke me
10204 #else
10205 f = $ac_func;
10206 #endif
10207
10208 ; return 0; }
10209 EOF
10210 if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10211   rm -rf conftest*
10212   eval "ac_cv_func_$ac_func=yes"
10213 else
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -rf conftest*
10217   eval "ac_cv_func_$ac_func=no"
10218 fi
10219 rm -f conftest*
10220 fi
10221
10222 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10225   cat >> confdefs.h <<EOF
10226 #define $ac_tr_func 1
10227 EOF
10228  
10229 else
10230   echo "$ac_t""no" 1>&6
10231 fi
10232 done
10233
10234
10235 ol_link_ipv6=no
10236 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10237         if test $ol_enable_ipv6 = yes ; then
10238                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10239         fi
10240 elif test $ol_enable_ipv6 != no ; then
10241         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10242 echo "configure:10243: checking INET6_ADDRSTRLEN" >&5
10243 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10244   echo $ac_n "(cached) $ac_c" 1>&6
10245 else
10246   
10247                 cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250
10251 #                       include <netinet/in.h>
10252 #                       ifdef INET6_ADDRSTRLEN
10253                                 __has_inet6_addrstrlen__;
10254 #                       endif
10255                 
10256 EOF
10257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10258   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10259   rm -rf conftest*
10260   ol_cv_inet6_addrstrlen=yes
10261 else
10262   rm -rf conftest*
10263   ol_cv_inet6_addrstrlen=no
10264 fi
10265 rm -f conftest*
10266
10267 fi
10268
10269 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10270
10271
10272         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10273 echo "configure:10274: checking struct sockaddr_storage" >&5
10274 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10275   echo $ac_n "(cached) $ac_c" 1>&6
10276 else
10277   
10278                 cat > conftest.$ac_ext <<EOF
10279 #line 10280 "configure"
10280 #include "confdefs.h"
10281
10282 #include <sys/types.h>
10283 #include <sys/socket.h>
10284
10285 int main() {
10286
10287                         struct sockaddr_storage ss;
10288
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10292   rm -rf conftest*
10293   ol_cv_struct_sockaddr_storage=yes
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   ol_cv_struct_sockaddr_storage=no
10299 fi
10300 rm -f conftest*
10301 fi
10302
10303 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10304
10305         if test $ol_cv_inet6_addrstrlen = yes \
10306                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10307                 ol_link_ipv6=yes
10308         elif test $ol_enable_ipv6 = yes \
10309                         -a $ol_cv_inet6_addrstrlen = no ; then
10310                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10311         elif test $ol_enable_ipv6 = yes \
10312                         -a $ol_cv_struct_sockaddr_storage = no ; then
10313                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10314         fi
10315 fi
10316
10317 if test $ol_enable_local != no ; then
10318         for ac_hdr in sys/un.h 
10319 do
10320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10322 echo "configure:10323: checking for $ac_hdr" >&5
10323 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 #include <$ac_hdr>
10330 EOF
10331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10332 { (eval echo configure:10333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10334 if test -z "$ac_err"; then
10335   rm -rf conftest*
10336   eval "ac_cv_header_$ac_safe=yes"
10337 else
10338   echo "$ac_err" >&5
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   eval "ac_cv_header_$ac_safe=no"
10343 fi
10344 rm -f conftest*
10345 fi
10346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10347   echo "$ac_t""yes" 1>&6
10348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10349   cat >> confdefs.h <<EOF
10350 #define $ac_tr_hdr 1
10351 EOF
10352  
10353 else
10354   echo "$ac_t""no" 1>&6
10355 fi
10356 done
10357
10358
10359         if test $ol_enable_local = auto ; then
10360                 ol_enable_local=$ac_cv_header_sys_un_h
10361         elif test $ac_cv_header_sys_un_h = no ; then
10362                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10363         fi
10364 fi
10365
10366 ol_link_kbind=no
10367 ol_link_kpasswd=no
10368 ol_link_krb5=no
10369 ol_link_krb4=no
10370
10371 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10372         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10373         -o $ol_with_kerberos = k425 ; then
10374
10375         for ac_hdr in krb5.h
10376 do
10377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_hdr" >&5
10380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 #include <$ac_hdr>
10387 EOF
10388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10389 { (eval echo configure:10390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10391 if test -z "$ac_err"; then
10392   rm -rf conftest*
10393   eval "ac_cv_header_$ac_safe=yes"
10394 else
10395   echo "$ac_err" >&5
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=no"
10400 fi
10401 rm -f conftest*
10402 fi
10403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10406   cat >> confdefs.h <<EOF
10407 #define $ac_tr_hdr 1
10408 EOF
10409  
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413 done
10414
10415
10416         if test $ac_cv_header_krb5_h = yes ; then
10417                                 for ac_hdr in heim_err.h
10418 do
10419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10421 echo "configure:10422: checking for $ac_hdr" >&5
10422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10423   echo $ac_n "(cached) $ac_c" 1>&6
10424 else
10425   cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 #include <$ac_hdr>
10429 EOF
10430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10431 { (eval echo configure:10432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10433 if test -z "$ac_err"; then
10434   rm -rf conftest*
10435   eval "ac_cv_header_$ac_safe=yes"
10436 else
10437   echo "$ac_err" >&5
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_header_$ac_safe=no"
10442 fi
10443 rm -f conftest*
10444 fi
10445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10446   echo "$ac_t""yes" 1>&6
10447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10448   cat >> confdefs.h <<EOF
10449 #define $ac_tr_hdr 1
10450 EOF
10451  
10452 else
10453   echo "$ac_t""no" 1>&6
10454 fi
10455 done
10456
10457                 if test $ac_cv_header_heim_err_h = yes ; then
10458                         krb5_impl=heimdal
10459                 else
10460                         krb5_impl=mit
10461                 fi
10462
10463                 if test $krb5_impl = mit; then
10464                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10465 echo "configure:10466: checking for main in -lk5crypto" >&5
10466 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   ac_save_LIBS="$LIBS"
10471 LIBS="-lk5crypto  $LIBS"
10472 cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 int main() {
10477 main()
10478 ; return 0; }
10479 EOF
10480 if { (eval echo configure:10481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10481   rm -rf conftest*
10482   eval "ac_cv_lib_$ac_lib_var=yes"
10483 else
10484   echo "configure: failed program was:" >&5
10485   cat conftest.$ac_ext >&5
10486   rm -rf conftest*
10487   eval "ac_cv_lib_$ac_lib_var=no"
10488 fi
10489 rm -f conftest*
10490 LIBS="$ac_save_LIBS"
10491
10492 fi
10493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10494   echo "$ac_t""yes" 1>&6
10495   krb5crypto=k5crypto
10496 else
10497   echo "$ac_t""no" 1>&6
10498 krb5crypto=crypto
10499 fi
10500
10501
10502                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10503 echo "configure:10504: checking for main in -lkrb5" >&5
10504 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10505 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10506   echo $ac_n "(cached) $ac_c" 1>&6
10507 else
10508   ac_save_LIBS="$LIBS"
10509 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10510 cat > conftest.$ac_ext <<EOF
10511 #line 10512 "configure"
10512 #include "confdefs.h"
10513
10514 int main() {
10515 main()
10516 ; return 0; }
10517 EOF
10518 if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10519   rm -rf conftest*
10520   eval "ac_cv_lib_$ac_lib_var=yes"
10521 else
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=no"
10526 fi
10527 rm -f conftest*
10528 LIBS="$ac_save_LIBS"
10529
10530 fi
10531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533   have_krb5=yes
10534                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10535 else
10536   echo "$ac_t""no" 1>&6
10537 have_krb5=no
10538 fi
10539
10540
10541                 elif test $krb5_impl = heimdal; then
10542                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10543 echo "configure:10544: checking for main in -ldes" >&5
10544 ac_lib_var=`echo des'_'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="-ldes  $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   krb5crypto=des
10574 else
10575   echo "$ac_t""no" 1>&6
10576 krb5crypto=crypto
10577 fi
10578
10579
10580                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10581 echo "configure:10582: checking for main in -lkrb5" >&5
10582 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   ac_save_LIBS="$LIBS"
10587 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 int main() {
10593 main()
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10597   rm -rf conftest*
10598   eval "ac_cv_lib_$ac_lib_var=yes"
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=no"
10604 fi
10605 rm -f conftest*
10606 LIBS="$ac_save_LIBS"
10607
10608 fi
10609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10610   echo "$ac_t""yes" 1>&6
10611   have_krb5=yes
10612                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10613 else
10614   echo "$ac_t""no" 1>&6
10615 have_krb5=no
10616 fi
10617
10618
10619                         cat >> confdefs.h <<\EOF
10620 #define HAVE_HEIMDAL_KERBEROS 1
10621 EOF
10622
10623
10624                 else
10625                         have_krb5=no
10626                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10627                 fi
10628
10629                 if test $have_krb5 = yes ; then
10630                         ol_link_krb5=yes
10631
10632                         cat >> confdefs.h <<\EOF
10633 #define HAVE_KRB5 1
10634 EOF
10635
10636
10637                         if test $ol_enable_kpasswd != no ; then
10638                                 ol_link_kpasswd=yes;
10639                         fi
10640
10641                         if test $ol_with_kerberos = k5only ; then
10642                                 ol_with_kerberos=found
10643                         fi
10644
10645                 elif test $ol_with_kerberos != auto ; then
10646                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10647                 fi
10648
10649         fi
10650 fi
10651
10652 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10653         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10654
10655         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10656 do
10657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10659 echo "configure:10660: checking for $ac_hdr" >&5
10660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   cat > conftest.$ac_ext <<EOF
10664 #line 10665 "configure"
10665 #include "confdefs.h"
10666 #include <$ac_hdr>
10667 EOF
10668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10669 { (eval echo configure:10670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10671 if test -z "$ac_err"; then
10672   rm -rf conftest*
10673   eval "ac_cv_header_$ac_safe=yes"
10674 else
10675   echo "$ac_err" >&5
10676   echo "configure: failed program was:" >&5
10677   cat conftest.$ac_ext >&5
10678   rm -rf conftest*
10679   eval "ac_cv_header_$ac_safe=no"
10680 fi
10681 rm -f conftest*
10682 fi
10683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10684   echo "$ac_t""yes" 1>&6
10685     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10686   cat >> confdefs.h <<EOF
10687 #define $ac_tr_hdr 1
10688 EOF
10689  
10690 else
10691   echo "$ac_t""no" 1>&6
10692 fi
10693 done
10694
10695
10696         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10697                 if test $krb5_impl = mit; then
10698                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10699 echo "configure:10700: checking for main in -lkrb4" >&5
10700 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10702   echo $ac_n "(cached) $ac_c" 1>&6
10703 else
10704   ac_save_LIBS="$LIBS"
10705 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10706 cat > conftest.$ac_ext <<EOF
10707 #line 10708 "configure"
10708 #include "confdefs.h"
10709
10710 int main() {
10711 main()
10712 ; return 0; }
10713 EOF
10714 if { (eval echo configure:10715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10715   rm -rf conftest*
10716   eval "ac_cv_lib_$ac_lib_var=yes"
10717 else
10718   echo "configure: failed program was:" >&5
10719   cat conftest.$ac_ext >&5
10720   rm -rf conftest*
10721   eval "ac_cv_lib_$ac_lib_var=no"
10722 fi
10723 rm -f conftest*
10724 LIBS="$ac_save_LIBS"
10725
10726 fi
10727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10728   echo "$ac_t""yes" 1>&6
10729   have_k425=yes
10730                                 KRB4_LIBS="-lkrb4 -ldes425"
10731 else
10732   echo "$ac_t""no" 1>&6
10733 have_k425=no
10734 fi
10735
10736
10737                 elif test $krb5_impl = heimdal; 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 -lkrb5 -l$krb5crypto -lasn1 -lroken -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"
10771 else
10772   echo "$ac_t""no" 1>&6
10773 have_k425=no
10774 fi
10775
10776
10777                 else
10778                         have_425=no
10779                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10780                 fi
10781
10782                 if test $have_k425 = yes ; then
10783                         ol_with_kerberos=found
10784                         ol_link_krb4=yes
10785
10786                         cat >> confdefs.h <<\EOF
10787 #define HAVE_KRB425 1
10788 EOF
10789
10790                         cat >> confdefs.h <<\EOF
10791 #define HAVE_KRB4 1
10792 EOF
10793
10794
10795                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10796 echo "configure:10797: checking for des_debug in Kerberos libraries" >&5
10797 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10798   echo $ac_n "(cached) $ac_c" 1>&6
10799 else
10800   
10801                                                                 save_LIBS="$LIBS"
10802                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10803                                 cat > conftest.$ac_ext <<EOF
10804 #line 10805 "configure"
10805 #include "confdefs.h"
10806
10807 #include <kerberosIV/krb.h>
10808 #include <kerberosIV/des.h>
10809 extern int des_debug;
10810
10811 int main() {
10812
10813 des_debug = 1;
10814
10815 ; return 0; }
10816 EOF
10817 if { (eval echo configure:10818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10818   rm -rf conftest*
10819   ol_cv_var_des_debug=yes
10820 else
10821   echo "configure: failed program was:" >&5
10822   cat conftest.$ac_ext >&5
10823   rm -rf conftest*
10824   ol_cv_var_des_debug=no
10825 fi
10826 rm -f conftest*
10827                                                                 LIBS="$save_LIBS"
10828                         
10829 fi
10830
10831 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10832
10833                         if test $ol_cv_var_des_debug = yes ; then
10834                                 cat >> confdefs.h <<\EOF
10835 #define HAVE_DES_DEBUG 1
10836 EOF
10837
10838                         fi
10839
10840                         LIBS="$save_LIBS"
10841                 fi
10842         fi
10843 fi
10844
10845 if test $ol_link_krb5 = yes ; then
10846         ol_with_kerberos=found
10847 fi
10848
10849 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10850         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10851
10852         for ac_hdr in krb.h des.h krb-archaeology.h 
10853 do
10854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10856 echo "configure:10857: checking for $ac_hdr" >&5
10857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10858   echo $ac_n "(cached) $ac_c" 1>&6
10859 else
10860   cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863 #include <$ac_hdr>
10864 EOF
10865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10866 { (eval echo configure:10867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10868 if test -z "$ac_err"; then
10869   rm -rf conftest*
10870   eval "ac_cv_header_$ac_safe=yes"
10871 else
10872   echo "$ac_err" >&5
10873   echo "configure: failed program was:" >&5
10874   cat conftest.$ac_ext >&5
10875   rm -rf conftest*
10876   eval "ac_cv_header_$ac_safe=no"
10877 fi
10878 rm -f conftest*
10879 fi
10880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10881   echo "$ac_t""yes" 1>&6
10882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10883   cat >> confdefs.h <<EOF
10884 #define $ac_tr_hdr 1
10885 EOF
10886  
10887 else
10888   echo "$ac_t""no" 1>&6
10889 fi
10890 done
10891
10892
10893         if test $ac_cv_header_krb_h = yes ; then
10894                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10895 echo "configure:10896: checking for main in -lkrb" >&5
10896 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10897 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   ac_save_LIBS="$LIBS"
10901 LIBS="-lkrb -ldes $LIBS"
10902 cat > conftest.$ac_ext <<EOF
10903 #line 10904 "configure"
10904 #include "confdefs.h"
10905
10906 int main() {
10907 main()
10908 ; return 0; }
10909 EOF
10910 if { (eval echo configure:10911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10911   rm -rf conftest*
10912   eval "ac_cv_lib_$ac_lib_var=yes"
10913 else
10914   echo "configure: failed program was:" >&5
10915   cat conftest.$ac_ext >&5
10916   rm -rf conftest*
10917   eval "ac_cv_lib_$ac_lib_var=no"
10918 fi
10919 rm -f conftest*
10920 LIBS="$ac_save_LIBS"
10921
10922 fi
10923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10924   echo "$ac_t""yes" 1>&6
10925   have_k4=yes
10926 else
10927   echo "$ac_t""no" 1>&6
10928 have_k4=no
10929 fi
10930
10931
10932                 if test $have_k4 = yes ; then
10933                         ol_with_kerberos=found
10934                         ol_link_krb4=yes
10935
10936                         cat >> confdefs.h <<\EOF
10937 #define HAVE_KRB4 1
10938 EOF
10939
10940
10941                         KRB4_LIBS="-lkrb -ldes"
10942
10943                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10944                                 cat >> confdefs.h <<\EOF
10945 #define HAVE_KTH_KERBEROS 1
10946 EOF
10947
10948                         fi
10949                 fi
10950         fi
10951 fi
10952
10953 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10954         ol_link_kpasswd=yes
10955 fi
10956
10957 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10958         ol_link_kbind=yes
10959
10960 elif test $ol_enable_kbind = yes ; then
10961         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10962 fi
10963
10964 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10965         cat >> confdefs.h <<\EOF
10966 #define HAVE_KERBEROS 1
10967 EOF
10968
10969
10970 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10971         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10972 fi
10973
10974 ol_link_tls=no
10975 if test $ol_with_tls != no ; then
10976         for ac_hdr in openssl/ssl.h ssl.h
10977 do
10978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10980 echo "configure:10981: checking for $ac_hdr" >&5
10981 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10982   echo $ac_n "(cached) $ac_c" 1>&6
10983 else
10984   cat > conftest.$ac_ext <<EOF
10985 #line 10986 "configure"
10986 #include "confdefs.h"
10987 #include <$ac_hdr>
10988 EOF
10989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10990 { (eval echo configure:10991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10992 if test -z "$ac_err"; then
10993   rm -rf conftest*
10994   eval "ac_cv_header_$ac_safe=yes"
10995 else
10996   echo "$ac_err" >&5
10997   echo "configure: failed program was:" >&5
10998   cat conftest.$ac_ext >&5
10999   rm -rf conftest*
11000   eval "ac_cv_header_$ac_safe=no"
11001 fi
11002 rm -f conftest*
11003 fi
11004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11005   echo "$ac_t""yes" 1>&6
11006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11007   cat >> confdefs.h <<EOF
11008 #define $ac_tr_hdr 1
11009 EOF
11010  
11011 else
11012   echo "$ac_t""no" 1>&6
11013 fi
11014 done
11015
11016         
11017         if test $ac_cv_header_openssl_ssl_h = yes \
11018                 -o $ac_cv_header_ssl_h = yes ; then
11019                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11020 echo "configure:11021: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11021 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11022 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11023   echo $ac_n "(cached) $ac_c" 1>&6
11024 else
11025   ac_save_LIBS="$LIBS"
11026 LIBS="-lssl -lcrypto $LIBS"
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 /* Override any gcc2 internal prototype to avoid an error.  */
11031 /* We use char because int might match the return type of a gcc2
11032     builtin and then its argument prototype would still apply.  */
11033 char SSLeay_add_ssl_algorithms();
11034
11035 int main() {
11036 SSLeay_add_ssl_algorithms()
11037 ; return 0; }
11038 EOF
11039 if { (eval echo configure:11040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11040   rm -rf conftest*
11041   eval "ac_cv_lib_$ac_lib_var=yes"
11042 else
11043   echo "configure: failed program was:" >&5
11044   cat conftest.$ac_ext >&5
11045   rm -rf conftest*
11046   eval "ac_cv_lib_$ac_lib_var=no"
11047 fi
11048 rm -f conftest*
11049 LIBS="$ac_save_LIBS"
11050
11051 fi
11052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11053   echo "$ac_t""yes" 1>&6
11054   have_ssleay=yes
11055                         need_rsaref=no
11056 else
11057   echo "$ac_t""no" 1>&6
11058 have_ssleay=no
11059 fi
11060
11061                         
11062                 if test $have_ssleay = no ; then
11063                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11064 echo "configure:11065: checking for SSL_library_init in -lssl" >&5
11065 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11067   echo $ac_n "(cached) $ac_c" 1>&6
11068 else
11069   ac_save_LIBS="$LIBS"
11070 LIBS="-lssl -lcrypto $LIBS"
11071 cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 /* Override any gcc2 internal prototype to avoid an error.  */
11075 /* We use char because int might match the return type of a gcc2
11076     builtin and then its argument prototype would still apply.  */
11077 char SSL_library_init();
11078
11079 int main() {
11080 SSL_library_init()
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=yes"
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_lib_$ac_lib_var=no"
11091 fi
11092 rm -f conftest*
11093 LIBS="$ac_save_LIBS"
11094
11095 fi
11096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11097   echo "$ac_t""yes" 1>&6
11098   have_ssleay=yes
11099                                 need_rsaref=no
11100 else
11101   echo "$ac_t""no" 1>&6
11102 have_ssleay=no
11103 fi
11104
11105                 fi
11106
11107                 if test $have_ssleay = no ; then
11108                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11109 echo "configure:11110: checking for ssl3_accept in -lssl" >&5
11110 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   ac_save_LIBS="$LIBS"
11115 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 /* Override any gcc2 internal prototype to avoid an error.  */
11120 /* We use char because int might match the return type of a gcc2
11121     builtin and then its argument prototype would still apply.  */
11122 char ssl3_accept();
11123
11124 int main() {
11125 ssl3_accept()
11126 ; return 0; }
11127 EOF
11128 if { (eval echo configure:11129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=yes"
11131 else
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_lib_$ac_lib_var=no"
11136 fi
11137 rm -f conftest*
11138 LIBS="$ac_save_LIBS"
11139
11140 fi
11141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143   have_ssleay=yes
11144                                 need_rsaref=yes
11145 else
11146   echo "$ac_t""no" 1>&6
11147 have_ssleay=no
11148 fi
11149
11150                 fi
11151
11152                 if test $have_ssleay = yes ; then
11153                         ol_with_tls=found
11154                         ol_link_tls=yes
11155
11156                         cat >> confdefs.h <<\EOF
11157 #define HAVE_SSLEAY 1
11158 EOF
11159
11160
11161                         if test $need_rsaref = yes; then
11162                                 cat >> confdefs.h <<\EOF
11163 #define HAVE_RSAREF 1
11164 EOF
11165
11166
11167                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11168                         else
11169                                 TLS_LIBS="-lssl -lcrypto"
11170                         fi
11171                 fi
11172         fi
11173
11174 else
11175         echo "configure: warning: TLS data protection not supported!" 1>&2
11176 fi
11177
11178 if test $ol_link_tls = yes ; then
11179         cat >> confdefs.h <<\EOF
11180 #define HAVE_TLS 1
11181 EOF
11182
11183
11184 elif test $ol_with_tls = auto ; then
11185         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11186         echo "configure: warning: TLS data protection not supported!" 1>&2
11187
11188 elif test $ol_with_tls != no ; then
11189         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11190 fi
11191
11192 if test $ol_enable_lmpasswd != no; then
11193         if test $ol_link_tls != yes ; then
11194                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11195         fi
11196
11197         cat >> confdefs.h <<\EOF
11198 #define SLAPD_LMHASH 1
11199 EOF
11200
11201 fi
11202
11203 ol_link_threads=no
11204
11205 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11206         -o $ol_with_threads = nt ; then
11207
11208         
11209         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11210 echo "configure:11211: checking for _beginthread" >&5
11211 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11212   echo $ac_n "(cached) $ac_c" 1>&6
11213 else
11214   cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217 /* System header to define __stub macros and hopefully few prototypes,
11218     which can conflict with char _beginthread(); below.  */
11219 #include <assert.h>
11220 /* Override any gcc2 internal prototype to avoid an error.  */
11221 /* We use char because int might match the return type of a gcc2
11222     builtin and then its argument prototype would still apply.  */
11223 char _beginthread();
11224 char (*f)();
11225
11226 int main() {
11227
11228 /* The GNU C library defines this for functions which it implements
11229     to always fail with ENOSYS.  Some functions are actually named
11230     something starting with __ and the normal name is an alias.  */
11231 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11232 choke me
11233 #else
11234 f = _beginthread;
11235 #endif
11236
11237 ; return 0; }
11238 EOF
11239 if { (eval echo configure:11240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11240   rm -rf conftest*
11241   eval "ac_cv_func__beginthread=yes"
11242 else
11243   echo "configure: failed program was:" >&5
11244   cat conftest.$ac_ext >&5
11245   rm -rf conftest*
11246   eval "ac_cv_func__beginthread=no"
11247 fi
11248 rm -f conftest*
11249 fi
11250
11251 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11252   echo "$ac_t""yes" 1>&6
11253   :
11254 else
11255   echo "$ac_t""no" 1>&6
11256 fi
11257
11258
11259         if test $ac_cv_func__beginthread = yes ; then
11260                 cat >> confdefs.h <<\EOF
11261 #define HAVE_NT_THREADS 1
11262 EOF
11263
11264                 ol_cv_nt_threads=yes
11265         fi
11266
11267
11268         if test "$ol_cv_nt_threads" = yes ; then
11269                 ol_link_threads=nt
11270                 ol_with_threads=found
11271                 ol_with_yielding_select=yes
11272
11273                 cat >> confdefs.h <<\EOF
11274 #define HAVE_NT_SERVICE_MANAGER 1
11275 EOF
11276
11277                 cat >> confdefs.h <<\EOF
11278 #define HAVE_NT_EVENT_LOG 1
11279 EOF
11280
11281         fi
11282
11283         if test $ol_with_threads = nt ; then
11284                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11285         fi
11286 fi
11287
11288 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11289         -o $ol_with_threads = posix ; then
11290
11291         for ac_hdr in pthread.h
11292 do
11293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11294 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11295 echo "configure:11296: checking for $ac_hdr" >&5
11296 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   cat > conftest.$ac_ext <<EOF
11300 #line 11301 "configure"
11301 #include "confdefs.h"
11302 #include <$ac_hdr>
11303 EOF
11304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11305 { (eval echo configure:11306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11307 if test -z "$ac_err"; then
11308   rm -rf conftest*
11309   eval "ac_cv_header_$ac_safe=yes"
11310 else
11311   echo "$ac_err" >&5
11312   echo "configure: failed program was:" >&5
11313   cat conftest.$ac_ext >&5
11314   rm -rf conftest*
11315   eval "ac_cv_header_$ac_safe=no"
11316 fi
11317 rm -f conftest*
11318 fi
11319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11320   echo "$ac_t""yes" 1>&6
11321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11322   cat >> confdefs.h <<EOF
11323 #define $ac_tr_hdr 1
11324 EOF
11325  
11326 else
11327   echo "$ac_t""no" 1>&6
11328 fi
11329 done
11330
11331
11332         if test $ac_cv_header_pthread_h = yes ; then
11333                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11334 echo "configure:11335: checking POSIX thread version" >&5
11335 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11336   echo $ac_n "(cached) $ac_c" 1>&6
11337 else
11338   
11339         cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342
11343 #               include <pthread.h>
11344         
11345 int main() {
11346
11347                 int i = PTHREAD_CREATE_JOINABLE;
11348         
11349 ; return 0; }
11350 EOF
11351 if { (eval echo configure:11352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11352   rm -rf conftest*
11353   
11354         cat > conftest.$ac_ext <<EOF
11355 #line 11356 "configure"
11356 #include "confdefs.h"
11357 #include <pthread.h>
11358 EOF
11359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11360   egrep "pthread_detach" >/dev/null 2>&1; then
11361   rm -rf conftest*
11362   ol_cv_pthread_version=10
11363 else
11364   rm -rf conftest*
11365   ol_cv_pthread_version=8
11366 fi
11367 rm -f conftest*
11368
11369 else
11370   echo "configure: failed program was:" >&5
11371   cat conftest.$ac_ext >&5
11372   rm -rf conftest*
11373   
11374         cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377
11378 #               include <pthread.h>
11379 #               ifdef PTHREAD_CREATE_UNDETACHED
11380                 draft7
11381 #               endif
11382         
11383 EOF
11384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11385   egrep "draft7" >/dev/null 2>&1; then
11386   rm -rf conftest*
11387   ol_cv_pthread_version=7
11388 else
11389   rm -rf conftest*
11390   
11391         cat > conftest.$ac_ext <<EOF
11392 #line 11393 "configure"
11393 #include "confdefs.h"
11394 #include <pthread.h>
11395 EOF
11396 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11397   egrep "pthread_attr_init" >/dev/null 2>&1; then
11398   rm -rf conftest*
11399   ol_cv_pthread_version=6
11400 else
11401   rm -rf conftest*
11402   
11403         cat > conftest.$ac_ext <<EOF
11404 #line 11405 "configure"
11405 #include "confdefs.h"
11406
11407 #               include <pthread.h>
11408 #ifdef          PTHREAD_MUTEX_INITIALIZER
11409                 draft5
11410 #endif
11411         
11412 EOF
11413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11414   egrep "draft5" >/dev/null 2>&1; then
11415   rm -rf conftest*
11416   ol_cv_pthread_version=5
11417 else
11418   rm -rf conftest*
11419   ol_cv_pthread_version=4
11420 fi
11421 rm -f conftest*
11422  
11423 fi
11424 rm -f conftest*
11425  
11426 fi
11427 rm -f conftest*
11428  
11429 fi
11430 rm -f conftest*
11431
11432 fi
11433
11434 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11435
11436
11437                 if test $ol_cv_pthread_version != 0 ; then
11438                         cat >> confdefs.h <<EOF
11439 #define HAVE_PTHREADS $ol_cv_pthread_version
11440 EOF
11441
11442                 else
11443                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11444                 fi
11445
11446                 # consider threads found
11447                 ol_with_threads=found
11448
11449                 
11450         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11451 echo "configure:11452: checking for LinuxThreads pthread.h" >&5
11452 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11453   echo $ac_n "(cached) $ac_c" 1>&6
11454 else
11455   cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 #include <pthread.h>
11459 EOF
11460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11461   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11462   rm -rf conftest*
11463   ol_cv_header_linux_threads=yes
11464 else
11465   rm -rf conftest*
11466   ol_cv_header_linux_threads=no
11467 fi
11468 rm -f conftest*
11469
11470                 
11471 fi
11472
11473 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11474         if test $ol_cv_header_linux_threads = yes; then
11475                 cat >> confdefs.h <<\EOF
11476 #define HAVE_LINUX_THREADS 1
11477 EOF
11478
11479         fi
11480
11481                 
11482         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11483 echo "configure:11484: checking for GNU Pth pthread.h" >&5
11484 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487   cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <pthread.h>
11491 #ifdef _POSIX_THREAD_IS_GNU_PTH
11492         __gnu_pth__;
11493 #endif
11494
11495 EOF
11496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11497   egrep "__gnu_pth__" >/dev/null 2>&1; then
11498   rm -rf conftest*
11499   ol_cv_header_gnu_pth_pthread_h=yes
11500 else
11501   rm -rf conftest*
11502   ol_cv_header_gnu_pth_pthread_h=no
11503 fi
11504 rm -f conftest*
11505
11506                 
11507 fi
11508
11509 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11510
11511
11512                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11513                         for ac_hdr in sched.h
11514 do
11515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11517 echo "configure:11518: checking for $ac_hdr" >&5
11518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11519   echo $ac_n "(cached) $ac_c" 1>&6
11520 else
11521   cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 #include <$ac_hdr>
11525 EOF
11526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11527 { (eval echo configure:11528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11529 if test -z "$ac_err"; then
11530   rm -rf conftest*
11531   eval "ac_cv_header_$ac_safe=yes"
11532 else
11533   echo "$ac_err" >&5
11534   echo "configure: failed program was:" >&5
11535   cat conftest.$ac_ext >&5
11536   rm -rf conftest*
11537   eval "ac_cv_header_$ac_safe=no"
11538 fi
11539 rm -f conftest*
11540 fi
11541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11542   echo "$ac_t""yes" 1>&6
11543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11544   cat >> confdefs.h <<EOF
11545 #define $ac_tr_hdr 1
11546 EOF
11547  
11548 else
11549   echo "$ac_t""no" 1>&6
11550 fi
11551 done
11552
11553                 fi
11554
11555                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11556                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11557 echo "configure:11558: checking for pthread_create in default libraries" >&5
11558 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   
11562                 if test "$cross_compiling" = yes; then
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 /* pthread test headers */
11567 #include <pthread.h>
11568 #if HAVE_PTHREADS < 7
11569 #include <errno.h>
11570 #endif
11571 #ifndef NULL
11572 #define NULL (void*)0
11573 #endif
11574
11575 static void *task(p)
11576         void *p;
11577 {
11578         return (void *) (p == NULL);
11579 }
11580
11581 int main() {
11582
11583         /* pthread test function */
11584 #ifndef PTHREAD_CREATE_DETACHED
11585 #define PTHREAD_CREATE_DETACHED 1
11586 #endif
11587         pthread_t t;
11588         int status;
11589         int detach = PTHREAD_CREATE_DETACHED;
11590
11591 #if HAVE_PTHREADS > 4
11592         /* Final pthreads */
11593         pthread_attr_t attr;
11594
11595         status = pthread_attr_init(&attr);
11596         if( status ) return status;
11597
11598 #if HAVE_PTHREADS < 7
11599         status = pthread_attr_setdetachstate(&attr, &detach);
11600         if( status < 0 ) status = errno;
11601 #else
11602         status = pthread_attr_setdetachstate(&attr, detach);
11603 #endif
11604         if( status ) return status;
11605         status = pthread_create( &t, &attr, task, NULL );
11606 #if HAVE_PTHREADS < 7
11607         if( status < 0 ) status = errno;
11608 #endif
11609         if( status ) return status;
11610 #else
11611         /* Draft 4 pthreads */
11612         status = pthread_create( &t, pthread_attr_default, task, NULL );
11613         if( status ) return errno;
11614
11615         /* give thread a chance to complete */
11616         /* it should remain joinable and hence detachable */
11617         sleep( 1 );
11618
11619         status = pthread_detach( &t );
11620         if( status ) return errno;
11621 #endif
11622
11623 #ifdef HAVE_LINUX_THREADS
11624         pthread_kill_other_threads_np();
11625 #endif
11626
11627         return 0;
11628
11629 ; return 0; }
11630 EOF
11631 if { (eval echo configure:11632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11632   rm -rf conftest*
11633   ol_cv_pthread_create=yes
11634 else
11635   echo "configure: failed program was:" >&5
11636   cat conftest.$ac_ext >&5
11637   rm -rf conftest*
11638   ol_cv_pthread_create=no
11639 fi
11640 rm -f conftest*
11641 else
11642   cat > conftest.$ac_ext <<EOF
11643 #line 11644 "configure"
11644 #include "confdefs.h"
11645 /* pthread test headers */
11646 #include <pthread.h>
11647 #if HAVE_PTHREADS < 7
11648 #include <errno.h>
11649 #endif
11650 #ifndef NULL
11651 #define NULL (void*)0
11652 #endif
11653
11654 static void *task(p)
11655         void *p;
11656 {
11657         return (void *) (p == NULL);
11658 }
11659
11660
11661 int main(argc, argv)
11662         int argc;
11663         char **argv;
11664 {
11665
11666         /* pthread test function */
11667 #ifndef PTHREAD_CREATE_DETACHED
11668 #define PTHREAD_CREATE_DETACHED 1
11669 #endif
11670         pthread_t t;
11671         int status;
11672         int detach = PTHREAD_CREATE_DETACHED;
11673
11674 #if HAVE_PTHREADS > 4
11675         /* Final pthreads */
11676         pthread_attr_t attr;
11677
11678         status = pthread_attr_init(&attr);
11679         if( status ) return status;
11680
11681 #if HAVE_PTHREADS < 7
11682         status = pthread_attr_setdetachstate(&attr, &detach);
11683         if( status < 0 ) status = errno;
11684 #else
11685         status = pthread_attr_setdetachstate(&attr, detach);
11686 #endif
11687         if( status ) return status;
11688         status = pthread_create( &t, &attr, task, NULL );
11689 #if HAVE_PTHREADS < 7
11690         if( status < 0 ) status = errno;
11691 #endif
11692         if( status ) return status;
11693 #else
11694         /* Draft 4 pthreads */
11695         status = pthread_create( &t, pthread_attr_default, task, NULL );
11696         if( status ) return errno;
11697
11698         /* give thread a chance to complete */
11699         /* it should remain joinable and hence detachable */
11700         sleep( 1 );
11701
11702         status = pthread_detach( &t );
11703         if( status ) return errno;
11704 #endif
11705
11706 #ifdef HAVE_LINUX_THREADS
11707         pthread_kill_other_threads_np();
11708 #endif
11709
11710         return 0;
11711
11712 }
11713
11714 EOF
11715 if { (eval echo configure:11716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11716 then
11717   ol_cv_pthread_create=yes
11718 else
11719   echo "configure: failed program was:" >&5
11720   cat conftest.$ac_ext >&5
11721   rm -fr conftest*
11722   ol_cv_pthread_create=no
11723 fi
11724 rm -fr conftest*
11725 fi
11726
11727 fi
11728
11729 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11730
11731                 if test $ol_cv_pthread_create != no ; then
11732                         ol_link_threads=posix
11733                         ol_link_pthreads=""
11734                 fi
11735                 
11736                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11737 if test "$ol_link_threads" = no ; then
11738         # try -kthread
11739         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11740 echo "configure:11741: checking for pthread link with -kthread" >&5
11741 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11742   echo $ac_n "(cached) $ac_c" 1>&6
11743 else
11744   
11745                 # save the flags
11746                 ol_LIBS="$LIBS"
11747                 LIBS="-kthread $LIBS"
11748
11749                 if test "$cross_compiling" = yes; then
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 /* pthread test headers */
11754 #include <pthread.h>
11755 #if HAVE_PTHREADS < 7
11756 #include <errno.h>
11757 #endif
11758 #ifndef NULL
11759 #define NULL (void*)0
11760 #endif
11761
11762 static void *task(p)
11763         void *p;
11764 {
11765         return (void *) (p == NULL);
11766 }
11767
11768 int main() {
11769
11770         /* pthread test function */
11771 #ifndef PTHREAD_CREATE_DETACHED
11772 #define PTHREAD_CREATE_DETACHED 1
11773 #endif
11774         pthread_t t;
11775         int status;
11776         int detach = PTHREAD_CREATE_DETACHED;
11777
11778 #if HAVE_PTHREADS > 4
11779         /* Final pthreads */
11780         pthread_attr_t attr;
11781
11782         status = pthread_attr_init(&attr);
11783         if( status ) return status;
11784
11785 #if HAVE_PTHREADS < 7
11786         status = pthread_attr_setdetachstate(&attr, &detach);
11787         if( status < 0 ) status = errno;
11788 #else
11789         status = pthread_attr_setdetachstate(&attr, detach);
11790 #endif
11791         if( status ) return status;
11792         status = pthread_create( &t, &attr, task, NULL );
11793 #if HAVE_PTHREADS < 7
11794         if( status < 0 ) status = errno;
11795 #endif
11796         if( status ) return status;
11797 #else
11798         /* Draft 4 pthreads */
11799         status = pthread_create( &t, pthread_attr_default, task, NULL );
11800         if( status ) return errno;
11801
11802         /* give thread a chance to complete */
11803         /* it should remain joinable and hence detachable */
11804         sleep( 1 );
11805
11806         status = pthread_detach( &t );
11807         if( status ) return errno;
11808 #endif
11809
11810 #ifdef HAVE_LINUX_THREADS
11811         pthread_kill_other_threads_np();
11812 #endif
11813
11814         return 0;
11815
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11819   rm -rf conftest*
11820   ol_cv_pthread_kthread=yes
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   ol_cv_pthread_kthread=no
11826 fi
11827 rm -f conftest*
11828 else
11829   cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832 /* pthread test headers */
11833 #include <pthread.h>
11834 #if HAVE_PTHREADS < 7
11835 #include <errno.h>
11836 #endif
11837 #ifndef NULL
11838 #define NULL (void*)0
11839 #endif
11840
11841 static void *task(p)
11842         void *p;
11843 {
11844         return (void *) (p == NULL);
11845 }
11846
11847
11848 int main(argc, argv)
11849         int argc;
11850         char **argv;
11851 {
11852
11853         /* pthread test function */
11854 #ifndef PTHREAD_CREATE_DETACHED
11855 #define PTHREAD_CREATE_DETACHED 1
11856 #endif
11857         pthread_t t;
11858         int status;
11859         int detach = PTHREAD_CREATE_DETACHED;
11860
11861 #if HAVE_PTHREADS > 4
11862         /* Final pthreads */
11863         pthread_attr_t attr;
11864
11865         status = pthread_attr_init(&attr);
11866         if( status ) return status;
11867
11868 #if HAVE_PTHREADS < 7
11869         status = pthread_attr_setdetachstate(&attr, &detach);
11870         if( status < 0 ) status = errno;
11871 #else
11872         status = pthread_attr_setdetachstate(&attr, detach);
11873 #endif
11874         if( status ) return status;
11875         status = pthread_create( &t, &attr, task, NULL );
11876 #if HAVE_PTHREADS < 7
11877         if( status < 0 ) status = errno;
11878 #endif
11879         if( status ) return status;
11880 #else
11881         /* Draft 4 pthreads */
11882         status = pthread_create( &t, pthread_attr_default, task, NULL );
11883         if( status ) return errno;
11884
11885         /* give thread a chance to complete */
11886         /* it should remain joinable and hence detachable */
11887         sleep( 1 );
11888
11889         status = pthread_detach( &t );
11890         if( status ) return errno;
11891 #endif
11892
11893 #ifdef HAVE_LINUX_THREADS
11894         pthread_kill_other_threads_np();
11895 #endif
11896
11897         return 0;
11898
11899 }
11900
11901 EOF
11902 if { (eval echo configure:11903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11903 then
11904   ol_cv_pthread_kthread=yes
11905 else
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -fr conftest*
11909   ol_cv_pthread_kthread=no
11910 fi
11911 rm -fr conftest*
11912 fi
11913
11914
11915                 # restore the LIBS
11916                 LIBS="$ol_LIBS"
11917         
11918 fi
11919
11920 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11921
11922         if test $ol_cv_pthread_kthread = yes ; then
11923                 ol_link_pthreads="-kthread"
11924                 ol_link_threads=posix
11925         fi
11926 fi
11927
11928                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11929 if test "$ol_link_threads" = no ; then
11930         # try -pthread
11931         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11932 echo "configure:11933: checking for pthread link with -pthread" >&5
11933 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11934   echo $ac_n "(cached) $ac_c" 1>&6
11935 else
11936   
11937                 # save the flags
11938                 ol_LIBS="$LIBS"
11939                 LIBS="-pthread $LIBS"
11940
11941                 if test "$cross_compiling" = yes; then
11942   cat > conftest.$ac_ext <<EOF
11943 #line 11944 "configure"
11944 #include "confdefs.h"
11945 /* pthread test headers */
11946 #include <pthread.h>
11947 #if HAVE_PTHREADS < 7
11948 #include <errno.h>
11949 #endif
11950 #ifndef NULL
11951 #define NULL (void*)0
11952 #endif
11953
11954 static void *task(p)
11955         void *p;
11956 {
11957         return (void *) (p == NULL);
11958 }
11959
11960 int main() {
11961
11962         /* pthread test function */
11963 #ifndef PTHREAD_CREATE_DETACHED
11964 #define PTHREAD_CREATE_DETACHED 1
11965 #endif
11966         pthread_t t;
11967         int status;
11968         int detach = PTHREAD_CREATE_DETACHED;
11969
11970 #if HAVE_PTHREADS > 4
11971         /* Final pthreads */
11972         pthread_attr_t attr;
11973
11974         status = pthread_attr_init(&attr);
11975         if( status ) return status;
11976
11977 #if HAVE_PTHREADS < 7
11978         status = pthread_attr_setdetachstate(&attr, &detach);
11979         if( status < 0 ) status = errno;
11980 #else
11981         status = pthread_attr_setdetachstate(&attr, detach);
11982 #endif
11983         if( status ) return status;
11984         status = pthread_create( &t, &attr, task, NULL );
11985 #if HAVE_PTHREADS < 7
11986         if( status < 0 ) status = errno;
11987 #endif
11988         if( status ) return status;
11989 #else
11990         /* Draft 4 pthreads */
11991         status = pthread_create( &t, pthread_attr_default, task, NULL );
11992         if( status ) return errno;
11993
11994         /* give thread a chance to complete */
11995         /* it should remain joinable and hence detachable */
11996         sleep( 1 );
11997
11998         status = pthread_detach( &t );
11999         if( status ) return errno;
12000 #endif
12001
12002 #ifdef HAVE_LINUX_THREADS
12003         pthread_kill_other_threads_np();
12004 #endif
12005
12006         return 0;
12007
12008 ; return 0; }
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12011   rm -rf conftest*
12012   ol_cv_pthread_pthread=yes
12013 else
12014   echo "configure: failed program was:" >&5
12015   cat conftest.$ac_ext >&5
12016   rm -rf conftest*
12017   ol_cv_pthread_pthread=no
12018 fi
12019 rm -f conftest*
12020 else
12021   cat > conftest.$ac_ext <<EOF
12022 #line 12023 "configure"
12023 #include "confdefs.h"
12024 /* pthread test headers */
12025 #include <pthread.h>
12026 #if HAVE_PTHREADS < 7
12027 #include <errno.h>
12028 #endif
12029 #ifndef NULL
12030 #define NULL (void*)0
12031 #endif
12032
12033 static void *task(p)
12034         void *p;
12035 {
12036         return (void *) (p == NULL);
12037 }
12038
12039
12040 int main(argc, argv)
12041         int argc;
12042         char **argv;
12043 {
12044
12045         /* pthread test function */
12046 #ifndef PTHREAD_CREATE_DETACHED
12047 #define PTHREAD_CREATE_DETACHED 1
12048 #endif
12049         pthread_t t;
12050         int status;
12051         int detach = PTHREAD_CREATE_DETACHED;
12052
12053 #if HAVE_PTHREADS > 4
12054         /* Final pthreads */
12055         pthread_attr_t attr;
12056
12057         status = pthread_attr_init(&attr);
12058         if( status ) return status;
12059
12060 #if HAVE_PTHREADS < 7
12061         status = pthread_attr_setdetachstate(&attr, &detach);
12062         if( status < 0 ) status = errno;
12063 #else
12064         status = pthread_attr_setdetachstate(&attr, detach);
12065 #endif
12066         if( status ) return status;
12067         status = pthread_create( &t, &attr, task, NULL );
12068 #if HAVE_PTHREADS < 7
12069         if( status < 0 ) status = errno;
12070 #endif
12071         if( status ) return status;
12072 #else
12073         /* Draft 4 pthreads */
12074         status = pthread_create( &t, pthread_attr_default, task, NULL );
12075         if( status ) return errno;
12076
12077         /* give thread a chance to complete */
12078         /* it should remain joinable and hence detachable */
12079         sleep( 1 );
12080
12081         status = pthread_detach( &t );
12082         if( status ) return errno;
12083 #endif
12084
12085 #ifdef HAVE_LINUX_THREADS
12086         pthread_kill_other_threads_np();
12087 #endif
12088
12089         return 0;
12090
12091 }
12092
12093 EOF
12094 if { (eval echo configure:12095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12095 then
12096   ol_cv_pthread_pthread=yes
12097 else
12098   echo "configure: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   rm -fr conftest*
12101   ol_cv_pthread_pthread=no
12102 fi
12103 rm -fr conftest*
12104 fi
12105
12106
12107                 # restore the LIBS
12108                 LIBS="$ol_LIBS"
12109         
12110 fi
12111
12112 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12113
12114         if test $ol_cv_pthread_pthread = yes ; then
12115                 ol_link_pthreads="-pthread"
12116                 ol_link_threads=posix
12117         fi
12118 fi
12119
12120                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12121 if test "$ol_link_threads" = no ; then
12122         # try -pthreads
12123         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12124 echo "configure:12125: checking for pthread link with -pthreads" >&5
12125 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12126   echo $ac_n "(cached) $ac_c" 1>&6
12127 else
12128   
12129                 # save the flags
12130                 ol_LIBS="$LIBS"
12131                 LIBS="-pthreads $LIBS"
12132
12133                 if test "$cross_compiling" = yes; then
12134   cat > conftest.$ac_ext <<EOF
12135 #line 12136 "configure"
12136 #include "confdefs.h"
12137 /* pthread test headers */
12138 #include <pthread.h>
12139 #if HAVE_PTHREADS < 7
12140 #include <errno.h>
12141 #endif
12142 #ifndef NULL
12143 #define NULL (void*)0
12144 #endif
12145
12146 static void *task(p)
12147         void *p;
12148 {
12149         return (void *) (p == NULL);
12150 }
12151
12152 int main() {
12153
12154         /* pthread test function */
12155 #ifndef PTHREAD_CREATE_DETACHED
12156 #define PTHREAD_CREATE_DETACHED 1
12157 #endif
12158         pthread_t t;
12159         int status;
12160         int detach = PTHREAD_CREATE_DETACHED;
12161
12162 #if HAVE_PTHREADS > 4
12163         /* Final pthreads */
12164         pthread_attr_t attr;
12165
12166         status = pthread_attr_init(&attr);
12167         if( status ) return status;
12168
12169 #if HAVE_PTHREADS < 7
12170         status = pthread_attr_setdetachstate(&attr, &detach);
12171         if( status < 0 ) status = errno;
12172 #else
12173         status = pthread_attr_setdetachstate(&attr, detach);
12174 #endif
12175         if( status ) return status;
12176         status = pthread_create( &t, &attr, task, NULL );
12177 #if HAVE_PTHREADS < 7
12178         if( status < 0 ) status = errno;
12179 #endif
12180         if( status ) return status;
12181 #else
12182         /* Draft 4 pthreads */
12183         status = pthread_create( &t, pthread_attr_default, task, NULL );
12184         if( status ) return errno;
12185
12186         /* give thread a chance to complete */
12187         /* it should remain joinable and hence detachable */
12188         sleep( 1 );
12189
12190         status = pthread_detach( &t );
12191         if( status ) return errno;
12192 #endif
12193
12194 #ifdef HAVE_LINUX_THREADS
12195         pthread_kill_other_threads_np();
12196 #endif
12197
12198         return 0;
12199
12200 ; return 0; }
12201 EOF
12202 if { (eval echo configure:12203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12203   rm -rf conftest*
12204   ol_cv_pthread_pthreads=yes
12205 else
12206   echo "configure: failed program was:" >&5
12207   cat conftest.$ac_ext >&5
12208   rm -rf conftest*
12209   ol_cv_pthread_pthreads=no
12210 fi
12211 rm -f conftest*
12212 else
12213   cat > conftest.$ac_ext <<EOF
12214 #line 12215 "configure"
12215 #include "confdefs.h"
12216 /* pthread test headers */
12217 #include <pthread.h>
12218 #if HAVE_PTHREADS < 7
12219 #include <errno.h>
12220 #endif
12221 #ifndef NULL
12222 #define NULL (void*)0
12223 #endif
12224
12225 static void *task(p)
12226         void *p;
12227 {
12228         return (void *) (p == NULL);
12229 }
12230
12231
12232 int main(argc, argv)
12233         int argc;
12234         char **argv;
12235 {
12236
12237         /* pthread test function */
12238 #ifndef PTHREAD_CREATE_DETACHED
12239 #define PTHREAD_CREATE_DETACHED 1
12240 #endif
12241         pthread_t t;
12242         int status;
12243         int detach = PTHREAD_CREATE_DETACHED;
12244
12245 #if HAVE_PTHREADS > 4
12246         /* Final pthreads */
12247         pthread_attr_t attr;
12248
12249         status = pthread_attr_init(&attr);
12250         if( status ) return status;
12251
12252 #if HAVE_PTHREADS < 7
12253         status = pthread_attr_setdetachstate(&attr, &detach);
12254         if( status < 0 ) status = errno;
12255 #else
12256         status = pthread_attr_setdetachstate(&attr, detach);
12257 #endif
12258         if( status ) return status;
12259         status = pthread_create( &t, &attr, task, NULL );
12260 #if HAVE_PTHREADS < 7
12261         if( status < 0 ) status = errno;
12262 #endif
12263         if( status ) return status;
12264 #else
12265         /* Draft 4 pthreads */
12266         status = pthread_create( &t, pthread_attr_default, task, NULL );
12267         if( status ) return errno;
12268
12269         /* give thread a chance to complete */
12270         /* it should remain joinable and hence detachable */
12271         sleep( 1 );
12272
12273         status = pthread_detach( &t );
12274         if( status ) return errno;
12275 #endif
12276
12277 #ifdef HAVE_LINUX_THREADS
12278         pthread_kill_other_threads_np();
12279 #endif
12280
12281         return 0;
12282
12283 }
12284
12285 EOF
12286 if { (eval echo configure:12287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12287 then
12288   ol_cv_pthread_pthreads=yes
12289 else
12290   echo "configure: failed program was:" >&5
12291   cat conftest.$ac_ext >&5
12292   rm -fr conftest*
12293   ol_cv_pthread_pthreads=no
12294 fi
12295 rm -fr conftest*
12296 fi
12297
12298
12299                 # restore the LIBS
12300                 LIBS="$ol_LIBS"
12301         
12302 fi
12303
12304 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12305
12306         if test $ol_cv_pthread_pthreads = yes ; then
12307                 ol_link_pthreads="-pthreads"
12308                 ol_link_threads=posix
12309         fi
12310 fi
12311
12312                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12313 if test "$ol_link_threads" = no ; then
12314         # try -mthreads
12315         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12316 echo "configure:12317: checking for pthread link with -mthreads" >&5
12317 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12318   echo $ac_n "(cached) $ac_c" 1>&6
12319 else
12320   
12321                 # save the flags
12322                 ol_LIBS="$LIBS"
12323                 LIBS="-mthreads $LIBS"
12324
12325                 if test "$cross_compiling" = yes; then
12326   cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329 /* pthread test headers */
12330 #include <pthread.h>
12331 #if HAVE_PTHREADS < 7
12332 #include <errno.h>
12333 #endif
12334 #ifndef NULL
12335 #define NULL (void*)0
12336 #endif
12337
12338 static void *task(p)
12339         void *p;
12340 {
12341         return (void *) (p == NULL);
12342 }
12343
12344 int main() {
12345
12346         /* pthread test function */
12347 #ifndef PTHREAD_CREATE_DETACHED
12348 #define PTHREAD_CREATE_DETACHED 1
12349 #endif
12350         pthread_t t;
12351         int status;
12352         int detach = PTHREAD_CREATE_DETACHED;
12353
12354 #if HAVE_PTHREADS > 4
12355         /* Final pthreads */
12356         pthread_attr_t attr;
12357
12358         status = pthread_attr_init(&attr);
12359         if( status ) return status;
12360
12361 #if HAVE_PTHREADS < 7
12362         status = pthread_attr_setdetachstate(&attr, &detach);
12363         if( status < 0 ) status = errno;
12364 #else
12365         status = pthread_attr_setdetachstate(&attr, detach);
12366 #endif
12367         if( status ) return status;
12368         status = pthread_create( &t, &attr, task, NULL );
12369 #if HAVE_PTHREADS < 7
12370         if( status < 0 ) status = errno;
12371 #endif
12372         if( status ) return status;
12373 #else
12374         /* Draft 4 pthreads */
12375         status = pthread_create( &t, pthread_attr_default, task, NULL );
12376         if( status ) return errno;
12377
12378         /* give thread a chance to complete */
12379         /* it should remain joinable and hence detachable */
12380         sleep( 1 );
12381
12382         status = pthread_detach( &t );
12383         if( status ) return errno;
12384 #endif
12385
12386 #ifdef HAVE_LINUX_THREADS
12387         pthread_kill_other_threads_np();
12388 #endif
12389
12390         return 0;
12391
12392 ; return 0; }
12393 EOF
12394 if { (eval echo configure:12395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12395   rm -rf conftest*
12396   ol_cv_pthread_mthreads=yes
12397 else
12398   echo "configure: failed program was:" >&5
12399   cat conftest.$ac_ext >&5
12400   rm -rf conftest*
12401   ol_cv_pthread_mthreads=no
12402 fi
12403 rm -f conftest*
12404 else
12405   cat > conftest.$ac_ext <<EOF
12406 #line 12407 "configure"
12407 #include "confdefs.h"
12408 /* pthread test headers */
12409 #include <pthread.h>
12410 #if HAVE_PTHREADS < 7
12411 #include <errno.h>
12412 #endif
12413 #ifndef NULL
12414 #define NULL (void*)0
12415 #endif
12416
12417 static void *task(p)
12418         void *p;
12419 {
12420         return (void *) (p == NULL);
12421 }
12422
12423
12424 int main(argc, argv)
12425         int argc;
12426         char **argv;
12427 {
12428
12429         /* pthread test function */
12430 #ifndef PTHREAD_CREATE_DETACHED
12431 #define PTHREAD_CREATE_DETACHED 1
12432 #endif
12433         pthread_t t;
12434         int status;
12435         int detach = PTHREAD_CREATE_DETACHED;
12436
12437 #if HAVE_PTHREADS > 4
12438         /* Final pthreads */
12439         pthread_attr_t attr;
12440
12441         status = pthread_attr_init(&attr);
12442         if( status ) return status;
12443
12444 #if HAVE_PTHREADS < 7
12445         status = pthread_attr_setdetachstate(&attr, &detach);
12446         if( status < 0 ) status = errno;
12447 #else
12448         status = pthread_attr_setdetachstate(&attr, detach);
12449 #endif
12450         if( status ) return status;
12451         status = pthread_create( &t, &attr, task, NULL );
12452 #if HAVE_PTHREADS < 7
12453         if( status < 0 ) status = errno;
12454 #endif
12455         if( status ) return status;
12456 #else
12457         /* Draft 4 pthreads */
12458         status = pthread_create( &t, pthread_attr_default, task, NULL );
12459         if( status ) return errno;
12460
12461         /* give thread a chance to complete */
12462         /* it should remain joinable and hence detachable */
12463         sleep( 1 );
12464
12465         status = pthread_detach( &t );
12466         if( status ) return errno;
12467 #endif
12468
12469 #ifdef HAVE_LINUX_THREADS
12470         pthread_kill_other_threads_np();
12471 #endif
12472
12473         return 0;
12474
12475 }
12476
12477 EOF
12478 if { (eval echo configure:12479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12479 then
12480   ol_cv_pthread_mthreads=yes
12481 else
12482   echo "configure: failed program was:" >&5
12483   cat conftest.$ac_ext >&5
12484   rm -fr conftest*
12485   ol_cv_pthread_mthreads=no
12486 fi
12487 rm -fr conftest*
12488 fi
12489
12490
12491                 # restore the LIBS
12492                 LIBS="$ol_LIBS"
12493         
12494 fi
12495
12496 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12497
12498         if test $ol_cv_pthread_mthreads = yes ; then
12499                 ol_link_pthreads="-mthreads"
12500                 ol_link_threads=posix
12501         fi
12502 fi
12503
12504                 # Pthread try link: -thread (ol_cv_pthread_thread)
12505 if test "$ol_link_threads" = no ; then
12506         # try -thread
12507         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12508 echo "configure:12509: checking for pthread link with -thread" >&5
12509 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12510   echo $ac_n "(cached) $ac_c" 1>&6
12511 else
12512   
12513                 # save the flags
12514                 ol_LIBS="$LIBS"
12515                 LIBS="-thread $LIBS"
12516
12517                 if test "$cross_compiling" = yes; then
12518   cat > conftest.$ac_ext <<EOF
12519 #line 12520 "configure"
12520 #include "confdefs.h"
12521 /* pthread test headers */
12522 #include <pthread.h>
12523 #if HAVE_PTHREADS < 7
12524 #include <errno.h>
12525 #endif
12526 #ifndef NULL
12527 #define NULL (void*)0
12528 #endif
12529
12530 static void *task(p)
12531         void *p;
12532 {
12533         return (void *) (p == NULL);
12534 }
12535
12536 int main() {
12537
12538         /* pthread test function */
12539 #ifndef PTHREAD_CREATE_DETACHED
12540 #define PTHREAD_CREATE_DETACHED 1
12541 #endif
12542         pthread_t t;
12543         int status;
12544         int detach = PTHREAD_CREATE_DETACHED;
12545
12546 #if HAVE_PTHREADS > 4
12547         /* Final pthreads */
12548         pthread_attr_t attr;
12549
12550         status = pthread_attr_init(&attr);
12551         if( status ) return status;
12552
12553 #if HAVE_PTHREADS < 7
12554         status = pthread_attr_setdetachstate(&attr, &detach);
12555         if( status < 0 ) status = errno;
12556 #else
12557         status = pthread_attr_setdetachstate(&attr, detach);
12558 #endif
12559         if( status ) return status;
12560         status = pthread_create( &t, &attr, task, NULL );
12561 #if HAVE_PTHREADS < 7
12562         if( status < 0 ) status = errno;
12563 #endif
12564         if( status ) return status;
12565 #else
12566         /* Draft 4 pthreads */
12567         status = pthread_create( &t, pthread_attr_default, task, NULL );
12568         if( status ) return errno;
12569
12570         /* give thread a chance to complete */
12571         /* it should remain joinable and hence detachable */
12572         sleep( 1 );
12573
12574         status = pthread_detach( &t );
12575         if( status ) return errno;
12576 #endif
12577
12578 #ifdef HAVE_LINUX_THREADS
12579         pthread_kill_other_threads_np();
12580 #endif
12581
12582         return 0;
12583
12584 ; return 0; }
12585 EOF
12586 if { (eval echo configure:12587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12587   rm -rf conftest*
12588   ol_cv_pthread_thread=yes
12589 else
12590   echo "configure: failed program was:" >&5
12591   cat conftest.$ac_ext >&5
12592   rm -rf conftest*
12593   ol_cv_pthread_thread=no
12594 fi
12595 rm -f conftest*
12596 else
12597   cat > conftest.$ac_ext <<EOF
12598 #line 12599 "configure"
12599 #include "confdefs.h"
12600 /* pthread test headers */
12601 #include <pthread.h>
12602 #if HAVE_PTHREADS < 7
12603 #include <errno.h>
12604 #endif
12605 #ifndef NULL
12606 #define NULL (void*)0
12607 #endif
12608
12609 static void *task(p)
12610         void *p;
12611 {
12612         return (void *) (p == NULL);
12613 }
12614
12615
12616 int main(argc, argv)
12617         int argc;
12618         char **argv;
12619 {
12620
12621         /* pthread test function */
12622 #ifndef PTHREAD_CREATE_DETACHED
12623 #define PTHREAD_CREATE_DETACHED 1
12624 #endif
12625         pthread_t t;
12626         int status;
12627         int detach = PTHREAD_CREATE_DETACHED;
12628
12629 #if HAVE_PTHREADS > 4
12630         /* Final pthreads */
12631         pthread_attr_t attr;
12632
12633         status = pthread_attr_init(&attr);
12634         if( status ) return status;
12635
12636 #if HAVE_PTHREADS < 7
12637         status = pthread_attr_setdetachstate(&attr, &detach);
12638         if( status < 0 ) status = errno;
12639 #else
12640         status = pthread_attr_setdetachstate(&attr, detach);
12641 #endif
12642         if( status ) return status;
12643         status = pthread_create( &t, &attr, task, NULL );
12644 #if HAVE_PTHREADS < 7
12645         if( status < 0 ) status = errno;
12646 #endif
12647         if( status ) return status;
12648 #else
12649         /* Draft 4 pthreads */
12650         status = pthread_create( &t, pthread_attr_default, task, NULL );
12651         if( status ) return errno;
12652
12653         /* give thread a chance to complete */
12654         /* it should remain joinable and hence detachable */
12655         sleep( 1 );
12656
12657         status = pthread_detach( &t );
12658         if( status ) return errno;
12659 #endif
12660
12661 #ifdef HAVE_LINUX_THREADS
12662         pthread_kill_other_threads_np();
12663 #endif
12664
12665         return 0;
12666
12667 }
12668
12669 EOF
12670 if { (eval echo configure:12671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12671 then
12672   ol_cv_pthread_thread=yes
12673 else
12674   echo "configure: failed program was:" >&5
12675   cat conftest.$ac_ext >&5
12676   rm -fr conftest*
12677   ol_cv_pthread_thread=no
12678 fi
12679 rm -fr conftest*
12680 fi
12681
12682
12683                 # restore the LIBS
12684                 LIBS="$ol_LIBS"
12685         
12686 fi
12687
12688 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12689
12690         if test $ol_cv_pthread_thread = yes ; then
12691                 ol_link_pthreads="-thread"
12692                 ol_link_threads=posix
12693         fi
12694 fi
12695
12696
12697                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12698 if test "$ol_link_threads" = no ; then
12699         # try -lpthread -lmach -lexc -lc_r
12700         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12701 echo "configure:12702: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12702 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   
12706                 # save the flags
12707                 ol_LIBS="$LIBS"
12708                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12709
12710                 if test "$cross_compiling" = yes; then
12711   cat > conftest.$ac_ext <<EOF
12712 #line 12713 "configure"
12713 #include "confdefs.h"
12714 /* pthread test headers */
12715 #include <pthread.h>
12716 #if HAVE_PTHREADS < 7
12717 #include <errno.h>
12718 #endif
12719 #ifndef NULL
12720 #define NULL (void*)0
12721 #endif
12722
12723 static void *task(p)
12724         void *p;
12725 {
12726         return (void *) (p == NULL);
12727 }
12728
12729 int main() {
12730
12731         /* pthread test function */
12732 #ifndef PTHREAD_CREATE_DETACHED
12733 #define PTHREAD_CREATE_DETACHED 1
12734 #endif
12735         pthread_t t;
12736         int status;
12737         int detach = PTHREAD_CREATE_DETACHED;
12738
12739 #if HAVE_PTHREADS > 4
12740         /* Final pthreads */
12741         pthread_attr_t attr;
12742
12743         status = pthread_attr_init(&attr);
12744         if( status ) return status;
12745
12746 #if HAVE_PTHREADS < 7
12747         status = pthread_attr_setdetachstate(&attr, &detach);
12748         if( status < 0 ) status = errno;
12749 #else
12750         status = pthread_attr_setdetachstate(&attr, detach);
12751 #endif
12752         if( status ) return status;
12753         status = pthread_create( &t, &attr, task, NULL );
12754 #if HAVE_PTHREADS < 7
12755         if( status < 0 ) status = errno;
12756 #endif
12757         if( status ) return status;
12758 #else
12759         /* Draft 4 pthreads */
12760         status = pthread_create( &t, pthread_attr_default, task, NULL );
12761         if( status ) return errno;
12762
12763         /* give thread a chance to complete */
12764         /* it should remain joinable and hence detachable */
12765         sleep( 1 );
12766
12767         status = pthread_detach( &t );
12768         if( status ) return errno;
12769 #endif
12770
12771 #ifdef HAVE_LINUX_THREADS
12772         pthread_kill_other_threads_np();
12773 #endif
12774
12775         return 0;
12776
12777 ; return 0; }
12778 EOF
12779 if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12780   rm -rf conftest*
12781   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12782 else
12783   echo "configure: failed program was:" >&5
12784   cat conftest.$ac_ext >&5
12785   rm -rf conftest*
12786   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12787 fi
12788 rm -f conftest*
12789 else
12790   cat > conftest.$ac_ext <<EOF
12791 #line 12792 "configure"
12792 #include "confdefs.h"
12793 /* pthread test headers */
12794 #include <pthread.h>
12795 #if HAVE_PTHREADS < 7
12796 #include <errno.h>
12797 #endif
12798 #ifndef NULL
12799 #define NULL (void*)0
12800 #endif
12801
12802 static void *task(p)
12803         void *p;
12804 {
12805         return (void *) (p == NULL);
12806 }
12807
12808
12809 int main(argc, argv)
12810         int argc;
12811         char **argv;
12812 {
12813
12814         /* pthread test function */
12815 #ifndef PTHREAD_CREATE_DETACHED
12816 #define PTHREAD_CREATE_DETACHED 1
12817 #endif
12818         pthread_t t;
12819         int status;
12820         int detach = PTHREAD_CREATE_DETACHED;
12821
12822 #if HAVE_PTHREADS > 4
12823         /* Final pthreads */
12824         pthread_attr_t attr;
12825
12826         status = pthread_attr_init(&attr);
12827         if( status ) return status;
12828
12829 #if HAVE_PTHREADS < 7
12830         status = pthread_attr_setdetachstate(&attr, &detach);
12831         if( status < 0 ) status = errno;
12832 #else
12833         status = pthread_attr_setdetachstate(&attr, detach);
12834 #endif
12835         if( status ) return status;
12836         status = pthread_create( &t, &attr, task, NULL );
12837 #if HAVE_PTHREADS < 7
12838         if( status < 0 ) status = errno;
12839 #endif
12840         if( status ) return status;
12841 #else
12842         /* Draft 4 pthreads */
12843         status = pthread_create( &t, pthread_attr_default, task, NULL );
12844         if( status ) return errno;
12845
12846         /* give thread a chance to complete */
12847         /* it should remain joinable and hence detachable */
12848         sleep( 1 );
12849
12850         status = pthread_detach( &t );
12851         if( status ) return errno;
12852 #endif
12853
12854 #ifdef HAVE_LINUX_THREADS
12855         pthread_kill_other_threads_np();
12856 #endif
12857
12858         return 0;
12859
12860 }
12861
12862 EOF
12863 if { (eval echo configure:12864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12864 then
12865   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12866 else
12867   echo "configure: failed program was:" >&5
12868   cat conftest.$ac_ext >&5
12869   rm -fr conftest*
12870   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12871 fi
12872 rm -fr conftest*
12873 fi
12874
12875
12876                 # restore the LIBS
12877                 LIBS="$ol_LIBS"
12878         
12879 fi
12880
12881 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12882
12883         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12884                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12885                 ol_link_threads=posix
12886         fi
12887 fi
12888
12889                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12890 if test "$ol_link_threads" = no ; then
12891         # try -lpthread -lmach -lexc
12892         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12893 echo "configure:12894: checking for pthread link with -lpthread -lmach -lexc" >&5
12894 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12895   echo $ac_n "(cached) $ac_c" 1>&6
12896 else
12897   
12898                 # save the flags
12899                 ol_LIBS="$LIBS"
12900                 LIBS="-lpthread -lmach -lexc $LIBS"
12901
12902                 if test "$cross_compiling" = yes; then
12903   cat > conftest.$ac_ext <<EOF
12904 #line 12905 "configure"
12905 #include "confdefs.h"
12906 /* pthread test headers */
12907 #include <pthread.h>
12908 #if HAVE_PTHREADS < 7
12909 #include <errno.h>
12910 #endif
12911 #ifndef NULL
12912 #define NULL (void*)0
12913 #endif
12914
12915 static void *task(p)
12916         void *p;
12917 {
12918         return (void *) (p == NULL);
12919 }
12920
12921 int main() {
12922
12923         /* pthread test function */
12924 #ifndef PTHREAD_CREATE_DETACHED
12925 #define PTHREAD_CREATE_DETACHED 1
12926 #endif
12927         pthread_t t;
12928         int status;
12929         int detach = PTHREAD_CREATE_DETACHED;
12930
12931 #if HAVE_PTHREADS > 4
12932         /* Final pthreads */
12933         pthread_attr_t attr;
12934
12935         status = pthread_attr_init(&attr);
12936         if( status ) return status;
12937
12938 #if HAVE_PTHREADS < 7
12939         status = pthread_attr_setdetachstate(&attr, &detach);
12940         if( status < 0 ) status = errno;
12941 #else
12942         status = pthread_attr_setdetachstate(&attr, detach);
12943 #endif
12944         if( status ) return status;
12945         status = pthread_create( &t, &attr, task, NULL );
12946 #if HAVE_PTHREADS < 7
12947         if( status < 0 ) status = errno;
12948 #endif
12949         if( status ) return status;
12950 #else
12951         /* Draft 4 pthreads */
12952         status = pthread_create( &t, pthread_attr_default, task, NULL );
12953         if( status ) return errno;
12954
12955         /* give thread a chance to complete */
12956         /* it should remain joinable and hence detachable */
12957         sleep( 1 );
12958
12959         status = pthread_detach( &t );
12960         if( status ) return errno;
12961 #endif
12962
12963 #ifdef HAVE_LINUX_THREADS
12964         pthread_kill_other_threads_np();
12965 #endif
12966
12967         return 0;
12968
12969 ; return 0; }
12970 EOF
12971 if { (eval echo configure:12972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12972   rm -rf conftest*
12973   ol_cv_pthread_lpthread_lmach_lexc=yes
12974 else
12975   echo "configure: failed program was:" >&5
12976   cat conftest.$ac_ext >&5
12977   rm -rf conftest*
12978   ol_cv_pthread_lpthread_lmach_lexc=no
12979 fi
12980 rm -f conftest*
12981 else
12982   cat > conftest.$ac_ext <<EOF
12983 #line 12984 "configure"
12984 #include "confdefs.h"
12985 /* pthread test headers */
12986 #include <pthread.h>
12987 #if HAVE_PTHREADS < 7
12988 #include <errno.h>
12989 #endif
12990 #ifndef NULL
12991 #define NULL (void*)0
12992 #endif
12993
12994 static void *task(p)
12995         void *p;
12996 {
12997         return (void *) (p == NULL);
12998 }
12999
13000
13001 int main(argc, argv)
13002         int argc;
13003         char **argv;
13004 {
13005
13006         /* pthread test function */
13007 #ifndef PTHREAD_CREATE_DETACHED
13008 #define PTHREAD_CREATE_DETACHED 1
13009 #endif
13010         pthread_t t;
13011         int status;
13012         int detach = PTHREAD_CREATE_DETACHED;
13013
13014 #if HAVE_PTHREADS > 4
13015         /* Final pthreads */
13016         pthread_attr_t attr;
13017
13018         status = pthread_attr_init(&attr);
13019         if( status ) return status;
13020
13021 #if HAVE_PTHREADS < 7
13022         status = pthread_attr_setdetachstate(&attr, &detach);
13023         if( status < 0 ) status = errno;
13024 #else
13025         status = pthread_attr_setdetachstate(&attr, detach);
13026 #endif
13027         if( status ) return status;
13028         status = pthread_create( &t, &attr, task, NULL );
13029 #if HAVE_PTHREADS < 7
13030         if( status < 0 ) status = errno;
13031 #endif
13032         if( status ) return status;
13033 #else
13034         /* Draft 4 pthreads */
13035         status = pthread_create( &t, pthread_attr_default, task, NULL );
13036         if( status ) return errno;
13037
13038         /* give thread a chance to complete */
13039         /* it should remain joinable and hence detachable */
13040         sleep( 1 );
13041
13042         status = pthread_detach( &t );
13043         if( status ) return errno;
13044 #endif
13045
13046 #ifdef HAVE_LINUX_THREADS
13047         pthread_kill_other_threads_np();
13048 #endif
13049
13050         return 0;
13051
13052 }
13053
13054 EOF
13055 if { (eval echo configure:13056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13056 then
13057   ol_cv_pthread_lpthread_lmach_lexc=yes
13058 else
13059   echo "configure: failed program was:" >&5
13060   cat conftest.$ac_ext >&5
13061   rm -fr conftest*
13062   ol_cv_pthread_lpthread_lmach_lexc=no
13063 fi
13064 rm -fr conftest*
13065 fi
13066
13067
13068                 # restore the LIBS
13069                 LIBS="$ol_LIBS"
13070         
13071 fi
13072
13073 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13074
13075         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13076                 ol_link_pthreads="-lpthread -lmach -lexc"
13077                 ol_link_threads=posix
13078         fi
13079 fi
13080
13081
13082                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13083 if test "$ol_link_threads" = no ; then
13084         # try -lpthread -Wl,-woff,85
13085         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13086 echo "configure:13087: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13087 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13088   echo $ac_n "(cached) $ac_c" 1>&6
13089 else
13090   
13091                 # save the flags
13092                 ol_LIBS="$LIBS"
13093                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13094
13095                 if test "$cross_compiling" = yes; then
13096   cat > conftest.$ac_ext <<EOF
13097 #line 13098 "configure"
13098 #include "confdefs.h"
13099 /* pthread test headers */
13100 #include <pthread.h>
13101 #if HAVE_PTHREADS < 7
13102 #include <errno.h>
13103 #endif
13104 #ifndef NULL
13105 #define NULL (void*)0
13106 #endif
13107
13108 static void *task(p)
13109         void *p;
13110 {
13111         return (void *) (p == NULL);
13112 }
13113
13114 int main() {
13115
13116         /* pthread test function */
13117 #ifndef PTHREAD_CREATE_DETACHED
13118 #define PTHREAD_CREATE_DETACHED 1
13119 #endif
13120         pthread_t t;
13121         int status;
13122         int detach = PTHREAD_CREATE_DETACHED;
13123
13124 #if HAVE_PTHREADS > 4
13125         /* Final pthreads */
13126         pthread_attr_t attr;
13127
13128         status = pthread_attr_init(&attr);
13129         if( status ) return status;
13130
13131 #if HAVE_PTHREADS < 7
13132         status = pthread_attr_setdetachstate(&attr, &detach);
13133         if( status < 0 ) status = errno;
13134 #else
13135         status = pthread_attr_setdetachstate(&attr, detach);
13136 #endif
13137         if( status ) return status;
13138         status = pthread_create( &t, &attr, task, NULL );
13139 #if HAVE_PTHREADS < 7
13140         if( status < 0 ) status = errno;
13141 #endif
13142         if( status ) return status;
13143 #else
13144         /* Draft 4 pthreads */
13145         status = pthread_create( &t, pthread_attr_default, task, NULL );
13146         if( status ) return errno;
13147
13148         /* give thread a chance to complete */
13149         /* it should remain joinable and hence detachable */
13150         sleep( 1 );
13151
13152         status = pthread_detach( &t );
13153         if( status ) return errno;
13154 #endif
13155
13156 #ifdef HAVE_LINUX_THREADS
13157         pthread_kill_other_threads_np();
13158 #endif
13159
13160         return 0;
13161
13162 ; return 0; }
13163 EOF
13164 if { (eval echo configure:13165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13165   rm -rf conftest*
13166   ol_cv_pthread_lib_lpthread_woff=yes
13167 else
13168   echo "configure: failed program was:" >&5
13169   cat conftest.$ac_ext >&5
13170   rm -rf conftest*
13171   ol_cv_pthread_lib_lpthread_woff=no
13172 fi
13173 rm -f conftest*
13174 else
13175   cat > conftest.$ac_ext <<EOF
13176 #line 13177 "configure"
13177 #include "confdefs.h"
13178 /* pthread test headers */
13179 #include <pthread.h>
13180 #if HAVE_PTHREADS < 7
13181 #include <errno.h>
13182 #endif
13183 #ifndef NULL
13184 #define NULL (void*)0
13185 #endif
13186
13187 static void *task(p)
13188         void *p;
13189 {
13190         return (void *) (p == NULL);
13191 }
13192
13193
13194 int main(argc, argv)
13195         int argc;
13196         char **argv;
13197 {
13198
13199         /* pthread test function */
13200 #ifndef PTHREAD_CREATE_DETACHED
13201 #define PTHREAD_CREATE_DETACHED 1
13202 #endif
13203         pthread_t t;
13204         int status;
13205         int detach = PTHREAD_CREATE_DETACHED;
13206
13207 #if HAVE_PTHREADS > 4
13208         /* Final pthreads */
13209         pthread_attr_t attr;
13210
13211         status = pthread_attr_init(&attr);
13212         if( status ) return status;
13213
13214 #if HAVE_PTHREADS < 7
13215         status = pthread_attr_setdetachstate(&attr, &detach);
13216         if( status < 0 ) status = errno;
13217 #else
13218         status = pthread_attr_setdetachstate(&attr, detach);
13219 #endif
13220         if( status ) return status;
13221         status = pthread_create( &t, &attr, task, NULL );
13222 #if HAVE_PTHREADS < 7
13223         if( status < 0 ) status = errno;
13224 #endif
13225         if( status ) return status;
13226 #else
13227         /* Draft 4 pthreads */
13228         status = pthread_create( &t, pthread_attr_default, task, NULL );
13229         if( status ) return errno;
13230
13231         /* give thread a chance to complete */
13232         /* it should remain joinable and hence detachable */
13233         sleep( 1 );
13234
13235         status = pthread_detach( &t );
13236         if( status ) return errno;
13237 #endif
13238
13239 #ifdef HAVE_LINUX_THREADS
13240         pthread_kill_other_threads_np();
13241 #endif
13242
13243         return 0;
13244
13245 }
13246
13247 EOF
13248 if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13249 then
13250   ol_cv_pthread_lib_lpthread_woff=yes
13251 else
13252   echo "configure: failed program was:" >&5
13253   cat conftest.$ac_ext >&5
13254   rm -fr conftest*
13255   ol_cv_pthread_lib_lpthread_woff=no
13256 fi
13257 rm -fr conftest*
13258 fi
13259
13260
13261                 # restore the LIBS
13262                 LIBS="$ol_LIBS"
13263         
13264 fi
13265
13266 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13267
13268         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13269                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13270                 ol_link_threads=posix
13271         fi
13272 fi
13273
13274
13275                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13276 if test "$ol_link_threads" = no ; then
13277         # try -lpthread
13278         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13279 echo "configure:13280: checking for pthread link with -lpthread" >&5
13280 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13281   echo $ac_n "(cached) $ac_c" 1>&6
13282 else
13283   
13284                 # save the flags
13285                 ol_LIBS="$LIBS"
13286                 LIBS="-lpthread $LIBS"
13287
13288                 if test "$cross_compiling" = yes; then
13289   cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 /* pthread test headers */
13293 #include <pthread.h>
13294 #if HAVE_PTHREADS < 7
13295 #include <errno.h>
13296 #endif
13297 #ifndef NULL
13298 #define NULL (void*)0
13299 #endif
13300
13301 static void *task(p)
13302         void *p;
13303 {
13304         return (void *) (p == NULL);
13305 }
13306
13307 int main() {
13308
13309         /* pthread test function */
13310 #ifndef PTHREAD_CREATE_DETACHED
13311 #define PTHREAD_CREATE_DETACHED 1
13312 #endif
13313         pthread_t t;
13314         int status;
13315         int detach = PTHREAD_CREATE_DETACHED;
13316
13317 #if HAVE_PTHREADS > 4
13318         /* Final pthreads */
13319         pthread_attr_t attr;
13320
13321         status = pthread_attr_init(&attr);
13322         if( status ) return status;
13323
13324 #if HAVE_PTHREADS < 7
13325         status = pthread_attr_setdetachstate(&attr, &detach);
13326         if( status < 0 ) status = errno;
13327 #else
13328         status = pthread_attr_setdetachstate(&attr, detach);
13329 #endif
13330         if( status ) return status;
13331         status = pthread_create( &t, &attr, task, NULL );
13332 #if HAVE_PTHREADS < 7
13333         if( status < 0 ) status = errno;
13334 #endif
13335         if( status ) return status;
13336 #else
13337         /* Draft 4 pthreads */
13338         status = pthread_create( &t, pthread_attr_default, task, NULL );
13339         if( status ) return errno;
13340
13341         /* give thread a chance to complete */
13342         /* it should remain joinable and hence detachable */
13343         sleep( 1 );
13344
13345         status = pthread_detach( &t );
13346         if( status ) return errno;
13347 #endif
13348
13349 #ifdef HAVE_LINUX_THREADS
13350         pthread_kill_other_threads_np();
13351 #endif
13352
13353         return 0;
13354
13355 ; return 0; }
13356 EOF
13357 if { (eval echo configure:13358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13358   rm -rf conftest*
13359   ol_cv_pthread_lpthread=yes
13360 else
13361   echo "configure: failed program was:" >&5
13362   cat conftest.$ac_ext >&5
13363   rm -rf conftest*
13364   ol_cv_pthread_lpthread=no
13365 fi
13366 rm -f conftest*
13367 else
13368   cat > conftest.$ac_ext <<EOF
13369 #line 13370 "configure"
13370 #include "confdefs.h"
13371 /* pthread test headers */
13372 #include <pthread.h>
13373 #if HAVE_PTHREADS < 7
13374 #include <errno.h>
13375 #endif
13376 #ifndef NULL
13377 #define NULL (void*)0
13378 #endif
13379
13380 static void *task(p)
13381         void *p;
13382 {
13383         return (void *) (p == NULL);
13384 }
13385
13386
13387 int main(argc, argv)
13388         int argc;
13389         char **argv;
13390 {
13391
13392         /* pthread test function */
13393 #ifndef PTHREAD_CREATE_DETACHED
13394 #define PTHREAD_CREATE_DETACHED 1
13395 #endif
13396         pthread_t t;
13397         int status;
13398         int detach = PTHREAD_CREATE_DETACHED;
13399
13400 #if HAVE_PTHREADS > 4
13401         /* Final pthreads */
13402         pthread_attr_t attr;
13403
13404         status = pthread_attr_init(&attr);
13405         if( status ) return status;
13406
13407 #if HAVE_PTHREADS < 7
13408         status = pthread_attr_setdetachstate(&attr, &detach);
13409         if( status < 0 ) status = errno;
13410 #else
13411         status = pthread_attr_setdetachstate(&attr, detach);
13412 #endif
13413         if( status ) return status;
13414         status = pthread_create( &t, &attr, task, NULL );
13415 #if HAVE_PTHREADS < 7
13416         if( status < 0 ) status = errno;
13417 #endif
13418         if( status ) return status;
13419 #else
13420         /* Draft 4 pthreads */
13421         status = pthread_create( &t, pthread_attr_default, task, NULL );
13422         if( status ) return errno;
13423
13424         /* give thread a chance to complete */
13425         /* it should remain joinable and hence detachable */
13426         sleep( 1 );
13427
13428         status = pthread_detach( &t );
13429         if( status ) return errno;
13430 #endif
13431
13432 #ifdef HAVE_LINUX_THREADS
13433         pthread_kill_other_threads_np();
13434 #endif
13435
13436         return 0;
13437
13438 }
13439
13440 EOF
13441 if { (eval echo configure:13442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13442 then
13443   ol_cv_pthread_lpthread=yes
13444 else
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -fr conftest*
13448   ol_cv_pthread_lpthread=no
13449 fi
13450 rm -fr conftest*
13451 fi
13452
13453
13454                 # restore the LIBS
13455                 LIBS="$ol_LIBS"
13456         
13457 fi
13458
13459 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13460
13461         if test $ol_cv_pthread_lpthread = yes ; then
13462                 ol_link_pthreads="-lpthread"
13463                 ol_link_threads=posix
13464         fi
13465 fi
13466
13467                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13468 if test "$ol_link_threads" = no ; then
13469         # try -lc_r
13470         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13471 echo "configure:13472: checking for pthread link with -lc_r" >&5
13472 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13473   echo $ac_n "(cached) $ac_c" 1>&6
13474 else
13475   
13476                 # save the flags
13477                 ol_LIBS="$LIBS"
13478                 LIBS="-lc_r $LIBS"
13479
13480                 if test "$cross_compiling" = yes; then
13481   cat > conftest.$ac_ext <<EOF
13482 #line 13483 "configure"
13483 #include "confdefs.h"
13484 /* pthread test headers */
13485 #include <pthread.h>
13486 #if HAVE_PTHREADS < 7
13487 #include <errno.h>
13488 #endif
13489 #ifndef NULL
13490 #define NULL (void*)0
13491 #endif
13492
13493 static void *task(p)
13494         void *p;
13495 {
13496         return (void *) (p == NULL);
13497 }
13498
13499 int main() {
13500
13501         /* pthread test function */
13502 #ifndef PTHREAD_CREATE_DETACHED
13503 #define PTHREAD_CREATE_DETACHED 1
13504 #endif
13505         pthread_t t;
13506         int status;
13507         int detach = PTHREAD_CREATE_DETACHED;
13508
13509 #if HAVE_PTHREADS > 4
13510         /* Final pthreads */
13511         pthread_attr_t attr;
13512
13513         status = pthread_attr_init(&attr);
13514         if( status ) return status;
13515
13516 #if HAVE_PTHREADS < 7
13517         status = pthread_attr_setdetachstate(&attr, &detach);
13518         if( status < 0 ) status = errno;
13519 #else
13520         status = pthread_attr_setdetachstate(&attr, detach);
13521 #endif
13522         if( status ) return status;
13523         status = pthread_create( &t, &attr, task, NULL );
13524 #if HAVE_PTHREADS < 7
13525         if( status < 0 ) status = errno;
13526 #endif
13527         if( status ) return status;
13528 #else
13529         /* Draft 4 pthreads */
13530         status = pthread_create( &t, pthread_attr_default, task, NULL );
13531         if( status ) return errno;
13532
13533         /* give thread a chance to complete */
13534         /* it should remain joinable and hence detachable */
13535         sleep( 1 );
13536
13537         status = pthread_detach( &t );
13538         if( status ) return errno;
13539 #endif
13540
13541 #ifdef HAVE_LINUX_THREADS
13542         pthread_kill_other_threads_np();
13543 #endif
13544
13545         return 0;
13546
13547 ; return 0; }
13548 EOF
13549 if { (eval echo configure:13550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13550   rm -rf conftest*
13551   ol_cv_pthread_lc_r=yes
13552 else
13553   echo "configure: failed program was:" >&5
13554   cat conftest.$ac_ext >&5
13555   rm -rf conftest*
13556   ol_cv_pthread_lc_r=no
13557 fi
13558 rm -f conftest*
13559 else
13560   cat > conftest.$ac_ext <<EOF
13561 #line 13562 "configure"
13562 #include "confdefs.h"
13563 /* pthread test headers */
13564 #include <pthread.h>
13565 #if HAVE_PTHREADS < 7
13566 #include <errno.h>
13567 #endif
13568 #ifndef NULL
13569 #define NULL (void*)0
13570 #endif
13571
13572 static void *task(p)
13573         void *p;
13574 {
13575         return (void *) (p == NULL);
13576 }
13577
13578
13579 int main(argc, argv)
13580         int argc;
13581         char **argv;
13582 {
13583
13584         /* pthread test function */
13585 #ifndef PTHREAD_CREATE_DETACHED
13586 #define PTHREAD_CREATE_DETACHED 1
13587 #endif
13588         pthread_t t;
13589         int status;
13590         int detach = PTHREAD_CREATE_DETACHED;
13591
13592 #if HAVE_PTHREADS > 4
13593         /* Final pthreads */
13594         pthread_attr_t attr;
13595
13596         status = pthread_attr_init(&attr);
13597         if( status ) return status;
13598
13599 #if HAVE_PTHREADS < 7
13600         status = pthread_attr_setdetachstate(&attr, &detach);
13601         if( status < 0 ) status = errno;
13602 #else
13603         status = pthread_attr_setdetachstate(&attr, detach);
13604 #endif
13605         if( status ) return status;
13606         status = pthread_create( &t, &attr, task, NULL );
13607 #if HAVE_PTHREADS < 7
13608         if( status < 0 ) status = errno;
13609 #endif
13610         if( status ) return status;
13611 #else
13612         /* Draft 4 pthreads */
13613         status = pthread_create( &t, pthread_attr_default, task, NULL );
13614         if( status ) return errno;
13615
13616         /* give thread a chance to complete */
13617         /* it should remain joinable and hence detachable */
13618         sleep( 1 );
13619
13620         status = pthread_detach( &t );
13621         if( status ) return errno;
13622 #endif
13623
13624 #ifdef HAVE_LINUX_THREADS
13625         pthread_kill_other_threads_np();
13626 #endif
13627
13628         return 0;
13629
13630 }
13631
13632 EOF
13633 if { (eval echo configure:13634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13634 then
13635   ol_cv_pthread_lc_r=yes
13636 else
13637   echo "configure: failed program was:" >&5
13638   cat conftest.$ac_ext >&5
13639   rm -fr conftest*
13640   ol_cv_pthread_lc_r=no
13641 fi
13642 rm -fr conftest*
13643 fi
13644
13645
13646                 # restore the LIBS
13647                 LIBS="$ol_LIBS"
13648         
13649 fi
13650
13651 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13652
13653         if test $ol_cv_pthread_lc_r = yes ; then
13654                 ol_link_pthreads="-lc_r"
13655                 ol_link_threads=posix
13656         fi
13657 fi
13658
13659
13660                 # Pthread try link: -threads (ol_cv_pthread_threads)
13661 if test "$ol_link_threads" = no ; then
13662         # try -threads
13663         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13664 echo "configure:13665: checking for pthread link with -threads" >&5
13665 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13666   echo $ac_n "(cached) $ac_c" 1>&6
13667 else
13668   
13669                 # save the flags
13670                 ol_LIBS="$LIBS"
13671                 LIBS="-threads $LIBS"
13672
13673                 if test "$cross_compiling" = yes; then
13674   cat > conftest.$ac_ext <<EOF
13675 #line 13676 "configure"
13676 #include "confdefs.h"
13677 /* pthread test headers */
13678 #include <pthread.h>
13679 #if HAVE_PTHREADS < 7
13680 #include <errno.h>
13681 #endif
13682 #ifndef NULL
13683 #define NULL (void*)0
13684 #endif
13685
13686 static void *task(p)
13687         void *p;
13688 {
13689         return (void *) (p == NULL);
13690 }
13691
13692 int main() {
13693
13694         /* pthread test function */
13695 #ifndef PTHREAD_CREATE_DETACHED
13696 #define PTHREAD_CREATE_DETACHED 1
13697 #endif
13698         pthread_t t;
13699         int status;
13700         int detach = PTHREAD_CREATE_DETACHED;
13701
13702 #if HAVE_PTHREADS > 4
13703         /* Final pthreads */
13704         pthread_attr_t attr;
13705
13706         status = pthread_attr_init(&attr);
13707         if( status ) return status;
13708
13709 #if HAVE_PTHREADS < 7
13710         status = pthread_attr_setdetachstate(&attr, &detach);
13711         if( status < 0 ) status = errno;
13712 #else
13713         status = pthread_attr_setdetachstate(&attr, detach);
13714 #endif
13715         if( status ) return status;
13716         status = pthread_create( &t, &attr, task, NULL );
13717 #if HAVE_PTHREADS < 7
13718         if( status < 0 ) status = errno;
13719 #endif
13720         if( status ) return status;
13721 #else
13722         /* Draft 4 pthreads */
13723         status = pthread_create( &t, pthread_attr_default, task, NULL );
13724         if( status ) return errno;
13725
13726         /* give thread a chance to complete */
13727         /* it should remain joinable and hence detachable */
13728         sleep( 1 );
13729
13730         status = pthread_detach( &t );
13731         if( status ) return errno;
13732 #endif
13733
13734 #ifdef HAVE_LINUX_THREADS
13735         pthread_kill_other_threads_np();
13736 #endif
13737
13738         return 0;
13739
13740 ; return 0; }
13741 EOF
13742 if { (eval echo configure:13743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13743   rm -rf conftest*
13744   ol_cv_pthread_threads=yes
13745 else
13746   echo "configure: failed program was:" >&5
13747   cat conftest.$ac_ext >&5
13748   rm -rf conftest*
13749   ol_cv_pthread_threads=no
13750 fi
13751 rm -f conftest*
13752 else
13753   cat > conftest.$ac_ext <<EOF
13754 #line 13755 "configure"
13755 #include "confdefs.h"
13756 /* pthread test headers */
13757 #include <pthread.h>
13758 #if HAVE_PTHREADS < 7
13759 #include <errno.h>
13760 #endif
13761 #ifndef NULL
13762 #define NULL (void*)0
13763 #endif
13764
13765 static void *task(p)
13766         void *p;
13767 {
13768         return (void *) (p == NULL);
13769 }
13770
13771
13772 int main(argc, argv)
13773         int argc;
13774         char **argv;
13775 {
13776
13777         /* pthread test function */
13778 #ifndef PTHREAD_CREATE_DETACHED
13779 #define PTHREAD_CREATE_DETACHED 1
13780 #endif
13781         pthread_t t;
13782         int status;
13783         int detach = PTHREAD_CREATE_DETACHED;
13784
13785 #if HAVE_PTHREADS > 4
13786         /* Final pthreads */
13787         pthread_attr_t attr;
13788
13789         status = pthread_attr_init(&attr);
13790         if( status ) return status;
13791
13792 #if HAVE_PTHREADS < 7
13793         status = pthread_attr_setdetachstate(&attr, &detach);
13794         if( status < 0 ) status = errno;
13795 #else
13796         status = pthread_attr_setdetachstate(&attr, detach);
13797 #endif
13798         if( status ) return status;
13799         status = pthread_create( &t, &attr, task, NULL );
13800 #if HAVE_PTHREADS < 7
13801         if( status < 0 ) status = errno;
13802 #endif
13803         if( status ) return status;
13804 #else
13805         /* Draft 4 pthreads */
13806         status = pthread_create( &t, pthread_attr_default, task, NULL );
13807         if( status ) return errno;
13808
13809         /* give thread a chance to complete */
13810         /* it should remain joinable and hence detachable */
13811         sleep( 1 );
13812
13813         status = pthread_detach( &t );
13814         if( status ) return errno;
13815 #endif
13816
13817 #ifdef HAVE_LINUX_THREADS
13818         pthread_kill_other_threads_np();
13819 #endif
13820
13821         return 0;
13822
13823 }
13824
13825 EOF
13826 if { (eval echo configure:13827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13827 then
13828   ol_cv_pthread_threads=yes
13829 else
13830   echo "configure: failed program was:" >&5
13831   cat conftest.$ac_ext >&5
13832   rm -fr conftest*
13833   ol_cv_pthread_threads=no
13834 fi
13835 rm -fr conftest*
13836 fi
13837
13838
13839                 # restore the LIBS
13840                 LIBS="$ol_LIBS"
13841         
13842 fi
13843
13844 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13845
13846         if test $ol_cv_pthread_threads = yes ; then
13847                 ol_link_pthreads="-threads"
13848                 ol_link_threads=posix
13849         fi
13850 fi
13851
13852
13853                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13854 if test "$ol_link_threads" = no ; then
13855         # try -lpthreads -lmach -lexc -lc_r
13856         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13857 echo "configure:13858: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13858 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13859   echo $ac_n "(cached) $ac_c" 1>&6
13860 else
13861   
13862                 # save the flags
13863                 ol_LIBS="$LIBS"
13864                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13865
13866                 if test "$cross_compiling" = yes; then
13867   cat > conftest.$ac_ext <<EOF
13868 #line 13869 "configure"
13869 #include "confdefs.h"
13870 /* pthread test headers */
13871 #include <pthread.h>
13872 #if HAVE_PTHREADS < 7
13873 #include <errno.h>
13874 #endif
13875 #ifndef NULL
13876 #define NULL (void*)0
13877 #endif
13878
13879 static void *task(p)
13880         void *p;
13881 {
13882         return (void *) (p == NULL);
13883 }
13884
13885 int main() {
13886
13887         /* pthread test function */
13888 #ifndef PTHREAD_CREATE_DETACHED
13889 #define PTHREAD_CREATE_DETACHED 1
13890 #endif
13891         pthread_t t;
13892         int status;
13893         int detach = PTHREAD_CREATE_DETACHED;
13894
13895 #if HAVE_PTHREADS > 4
13896         /* Final pthreads */
13897         pthread_attr_t attr;
13898
13899         status = pthread_attr_init(&attr);
13900         if( status ) return status;
13901
13902 #if HAVE_PTHREADS < 7
13903         status = pthread_attr_setdetachstate(&attr, &detach);
13904         if( status < 0 ) status = errno;
13905 #else
13906         status = pthread_attr_setdetachstate(&attr, detach);
13907 #endif
13908         if( status ) return status;
13909         status = pthread_create( &t, &attr, task, NULL );
13910 #if HAVE_PTHREADS < 7
13911         if( status < 0 ) status = errno;
13912 #endif
13913         if( status ) return status;
13914 #else
13915         /* Draft 4 pthreads */
13916         status = pthread_create( &t, pthread_attr_default, task, NULL );
13917         if( status ) return errno;
13918
13919         /* give thread a chance to complete */
13920         /* it should remain joinable and hence detachable */
13921         sleep( 1 );
13922
13923         status = pthread_detach( &t );
13924         if( status ) return errno;
13925 #endif
13926
13927 #ifdef HAVE_LINUX_THREADS
13928         pthread_kill_other_threads_np();
13929 #endif
13930
13931         return 0;
13932
13933 ; return 0; }
13934 EOF
13935 if { (eval echo configure:13936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13936   rm -rf conftest*
13937   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13938 else
13939   echo "configure: failed program was:" >&5
13940   cat conftest.$ac_ext >&5
13941   rm -rf conftest*
13942   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13943 fi
13944 rm -f conftest*
13945 else
13946   cat > conftest.$ac_ext <<EOF
13947 #line 13948 "configure"
13948 #include "confdefs.h"
13949 /* pthread test headers */
13950 #include <pthread.h>
13951 #if HAVE_PTHREADS < 7
13952 #include <errno.h>
13953 #endif
13954 #ifndef NULL
13955 #define NULL (void*)0
13956 #endif
13957
13958 static void *task(p)
13959         void *p;
13960 {
13961         return (void *) (p == NULL);
13962 }
13963
13964
13965 int main(argc, argv)
13966         int argc;
13967         char **argv;
13968 {
13969
13970         /* pthread test function */
13971 #ifndef PTHREAD_CREATE_DETACHED
13972 #define PTHREAD_CREATE_DETACHED 1
13973 #endif
13974         pthread_t t;
13975         int status;
13976         int detach = PTHREAD_CREATE_DETACHED;
13977
13978 #if HAVE_PTHREADS > 4
13979         /* Final pthreads */
13980         pthread_attr_t attr;
13981
13982         status = pthread_attr_init(&attr);
13983         if( status ) return status;
13984
13985 #if HAVE_PTHREADS < 7
13986         status = pthread_attr_setdetachstate(&attr, &detach);
13987         if( status < 0 ) status = errno;
13988 #else
13989         status = pthread_attr_setdetachstate(&attr, detach);
13990 #endif
13991         if( status ) return status;
13992         status = pthread_create( &t, &attr, task, NULL );
13993 #if HAVE_PTHREADS < 7
13994         if( status < 0 ) status = errno;
13995 #endif
13996         if( status ) return status;
13997 #else
13998         /* Draft 4 pthreads */
13999         status = pthread_create( &t, pthread_attr_default, task, NULL );
14000         if( status ) return errno;
14001
14002         /* give thread a chance to complete */
14003         /* it should remain joinable and hence detachable */
14004         sleep( 1 );
14005
14006         status = pthread_detach( &t );
14007         if( status ) return errno;
14008 #endif
14009
14010 #ifdef HAVE_LINUX_THREADS
14011         pthread_kill_other_threads_np();
14012 #endif
14013
14014         return 0;
14015
14016 }
14017
14018 EOF
14019 if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14020 then
14021   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14022 else
14023   echo "configure: failed program was:" >&5
14024   cat conftest.$ac_ext >&5
14025   rm -fr conftest*
14026   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14027 fi
14028 rm -fr conftest*
14029 fi
14030
14031
14032                 # restore the LIBS
14033                 LIBS="$ol_LIBS"
14034         
14035 fi
14036
14037 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14038
14039         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14040                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14041                 ol_link_threads=posix
14042         fi
14043 fi
14044
14045                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14046 if test "$ol_link_threads" = no ; then
14047         # try -lpthreads -lmach -lexc
14048         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14049 echo "configure:14050: checking for pthread link with -lpthreads -lmach -lexc" >&5
14050 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14051   echo $ac_n "(cached) $ac_c" 1>&6
14052 else
14053   
14054                 # save the flags
14055                 ol_LIBS="$LIBS"
14056                 LIBS="-lpthreads -lmach -lexc $LIBS"
14057
14058                 if test "$cross_compiling" = yes; then
14059   cat > conftest.$ac_ext <<EOF
14060 #line 14061 "configure"
14061 #include "confdefs.h"
14062 /* pthread test headers */
14063 #include <pthread.h>
14064 #if HAVE_PTHREADS < 7
14065 #include <errno.h>
14066 #endif
14067 #ifndef NULL
14068 #define NULL (void*)0
14069 #endif
14070
14071 static void *task(p)
14072         void *p;
14073 {
14074         return (void *) (p == NULL);
14075 }
14076
14077 int main() {
14078
14079         /* pthread test function */
14080 #ifndef PTHREAD_CREATE_DETACHED
14081 #define PTHREAD_CREATE_DETACHED 1
14082 #endif
14083         pthread_t t;
14084         int status;
14085         int detach = PTHREAD_CREATE_DETACHED;
14086
14087 #if HAVE_PTHREADS > 4
14088         /* Final pthreads */
14089         pthread_attr_t attr;
14090
14091         status = pthread_attr_init(&attr);
14092         if( status ) return status;
14093
14094 #if HAVE_PTHREADS < 7
14095         status = pthread_attr_setdetachstate(&attr, &detach);
14096         if( status < 0 ) status = errno;
14097 #else
14098         status = pthread_attr_setdetachstate(&attr, detach);
14099 #endif
14100         if( status ) return status;
14101         status = pthread_create( &t, &attr, task, NULL );
14102 #if HAVE_PTHREADS < 7
14103         if( status < 0 ) status = errno;
14104 #endif
14105         if( status ) return status;
14106 #else
14107         /* Draft 4 pthreads */
14108         status = pthread_create( &t, pthread_attr_default, task, NULL );
14109         if( status ) return errno;
14110
14111         /* give thread a chance to complete */
14112         /* it should remain joinable and hence detachable */
14113         sleep( 1 );
14114
14115         status = pthread_detach( &t );
14116         if( status ) return errno;
14117 #endif
14118
14119 #ifdef HAVE_LINUX_THREADS
14120         pthread_kill_other_threads_np();
14121 #endif
14122
14123         return 0;
14124
14125 ; return 0; }
14126 EOF
14127 if { (eval echo configure:14128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14128   rm -rf conftest*
14129   ol_cv_pthread_lpthreads_lmach_lexc=yes
14130 else
14131   echo "configure: failed program was:" >&5
14132   cat conftest.$ac_ext >&5
14133   rm -rf conftest*
14134   ol_cv_pthread_lpthreads_lmach_lexc=no
14135 fi
14136 rm -f conftest*
14137 else
14138   cat > conftest.$ac_ext <<EOF
14139 #line 14140 "configure"
14140 #include "confdefs.h"
14141 /* pthread test headers */
14142 #include <pthread.h>
14143 #if HAVE_PTHREADS < 7
14144 #include <errno.h>
14145 #endif
14146 #ifndef NULL
14147 #define NULL (void*)0
14148 #endif
14149
14150 static void *task(p)
14151         void *p;
14152 {
14153         return (void *) (p == NULL);
14154 }
14155
14156
14157 int main(argc, argv)
14158         int argc;
14159         char **argv;
14160 {
14161
14162         /* pthread test function */
14163 #ifndef PTHREAD_CREATE_DETACHED
14164 #define PTHREAD_CREATE_DETACHED 1
14165 #endif
14166         pthread_t t;
14167         int status;
14168         int detach = PTHREAD_CREATE_DETACHED;
14169
14170 #if HAVE_PTHREADS > 4
14171         /* Final pthreads */
14172         pthread_attr_t attr;
14173
14174         status = pthread_attr_init(&attr);
14175         if( status ) return status;
14176
14177 #if HAVE_PTHREADS < 7
14178         status = pthread_attr_setdetachstate(&attr, &detach);
14179         if( status < 0 ) status = errno;
14180 #else
14181         status = pthread_attr_setdetachstate(&attr, detach);
14182 #endif
14183         if( status ) return status;
14184         status = pthread_create( &t, &attr, task, NULL );
14185 #if HAVE_PTHREADS < 7
14186         if( status < 0 ) status = errno;
14187 #endif
14188         if( status ) return status;
14189 #else
14190         /* Draft 4 pthreads */
14191         status = pthread_create( &t, pthread_attr_default, task, NULL );
14192         if( status ) return errno;
14193
14194         /* give thread a chance to complete */
14195         /* it should remain joinable and hence detachable */
14196         sleep( 1 );
14197
14198         status = pthread_detach( &t );
14199         if( status ) return errno;
14200 #endif
14201
14202 #ifdef HAVE_LINUX_THREADS
14203         pthread_kill_other_threads_np();
14204 #endif
14205
14206         return 0;
14207
14208 }
14209
14210 EOF
14211 if { (eval echo configure:14212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14212 then
14213   ol_cv_pthread_lpthreads_lmach_lexc=yes
14214 else
14215   echo "configure: failed program was:" >&5
14216   cat conftest.$ac_ext >&5
14217   rm -fr conftest*
14218   ol_cv_pthread_lpthreads_lmach_lexc=no
14219 fi
14220 rm -fr conftest*
14221 fi
14222
14223
14224                 # restore the LIBS
14225                 LIBS="$ol_LIBS"
14226         
14227 fi
14228
14229 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14230
14231         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14232                 ol_link_pthreads="-lpthreads -lmach -lexc"
14233                 ol_link_threads=posix
14234         fi
14235 fi
14236
14237                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14238 if test "$ol_link_threads" = no ; then
14239         # try -lpthreads -lexc
14240         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14241 echo "configure:14242: checking for pthread link with -lpthreads -lexc" >&5
14242 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14243   echo $ac_n "(cached) $ac_c" 1>&6
14244 else
14245   
14246                 # save the flags
14247                 ol_LIBS="$LIBS"
14248                 LIBS="-lpthreads -lexc $LIBS"
14249
14250                 if test "$cross_compiling" = yes; then
14251   cat > conftest.$ac_ext <<EOF
14252 #line 14253 "configure"
14253 #include "confdefs.h"
14254 /* pthread test headers */
14255 #include <pthread.h>
14256 #if HAVE_PTHREADS < 7
14257 #include <errno.h>
14258 #endif
14259 #ifndef NULL
14260 #define NULL (void*)0
14261 #endif
14262
14263 static void *task(p)
14264         void *p;
14265 {
14266         return (void *) (p == NULL);
14267 }
14268
14269 int main() {
14270
14271         /* pthread test function */
14272 #ifndef PTHREAD_CREATE_DETACHED
14273 #define PTHREAD_CREATE_DETACHED 1
14274 #endif
14275         pthread_t t;
14276         int status;
14277         int detach = PTHREAD_CREATE_DETACHED;
14278
14279 #if HAVE_PTHREADS > 4
14280         /* Final pthreads */
14281         pthread_attr_t attr;
14282
14283         status = pthread_attr_init(&attr);
14284         if( status ) return status;
14285
14286 #if HAVE_PTHREADS < 7
14287         status = pthread_attr_setdetachstate(&attr, &detach);
14288         if( status < 0 ) status = errno;
14289 #else
14290         status = pthread_attr_setdetachstate(&attr, detach);
14291 #endif
14292         if( status ) return status;
14293         status = pthread_create( &t, &attr, task, NULL );
14294 #if HAVE_PTHREADS < 7
14295         if( status < 0 ) status = errno;
14296 #endif
14297         if( status ) return status;
14298 #else
14299         /* Draft 4 pthreads */
14300         status = pthread_create( &t, pthread_attr_default, task, NULL );
14301         if( status ) return errno;
14302
14303         /* give thread a chance to complete */
14304         /* it should remain joinable and hence detachable */
14305         sleep( 1 );
14306
14307         status = pthread_detach( &t );
14308         if( status ) return errno;
14309 #endif
14310
14311 #ifdef HAVE_LINUX_THREADS
14312         pthread_kill_other_threads_np();
14313 #endif
14314
14315         return 0;
14316
14317 ; return 0; }
14318 EOF
14319 if { (eval echo configure:14320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14320   rm -rf conftest*
14321   ol_cv_pthread_lpthreads_lexc=yes
14322 else
14323   echo "configure: failed program was:" >&5
14324   cat conftest.$ac_ext >&5
14325   rm -rf conftest*
14326   ol_cv_pthread_lpthreads_lexc=no
14327 fi
14328 rm -f conftest*
14329 else
14330   cat > conftest.$ac_ext <<EOF
14331 #line 14332 "configure"
14332 #include "confdefs.h"
14333 /* pthread test headers */
14334 #include <pthread.h>
14335 #if HAVE_PTHREADS < 7
14336 #include <errno.h>
14337 #endif
14338 #ifndef NULL
14339 #define NULL (void*)0
14340 #endif
14341
14342 static void *task(p)
14343         void *p;
14344 {
14345         return (void *) (p == NULL);
14346 }
14347
14348
14349 int main(argc, argv)
14350         int argc;
14351         char **argv;
14352 {
14353
14354         /* pthread test function */
14355 #ifndef PTHREAD_CREATE_DETACHED
14356 #define PTHREAD_CREATE_DETACHED 1
14357 #endif
14358         pthread_t t;
14359         int status;
14360         int detach = PTHREAD_CREATE_DETACHED;
14361
14362 #if HAVE_PTHREADS > 4
14363         /* Final pthreads */
14364         pthread_attr_t attr;
14365
14366         status = pthread_attr_init(&attr);
14367         if( status ) return status;
14368
14369 #if HAVE_PTHREADS < 7
14370         status = pthread_attr_setdetachstate(&attr, &detach);
14371         if( status < 0 ) status = errno;
14372 #else
14373         status = pthread_attr_setdetachstate(&attr, detach);
14374 #endif
14375         if( status ) return status;
14376         status = pthread_create( &t, &attr, task, NULL );
14377 #if HAVE_PTHREADS < 7
14378         if( status < 0 ) status = errno;
14379 #endif
14380         if( status ) return status;
14381 #else
14382         /* Draft 4 pthreads */
14383         status = pthread_create( &t, pthread_attr_default, task, NULL );
14384         if( status ) return errno;
14385
14386         /* give thread a chance to complete */
14387         /* it should remain joinable and hence detachable */
14388         sleep( 1 );
14389
14390         status = pthread_detach( &t );
14391         if( status ) return errno;
14392 #endif
14393
14394 #ifdef HAVE_LINUX_THREADS
14395         pthread_kill_other_threads_np();
14396 #endif
14397
14398         return 0;
14399
14400 }
14401
14402 EOF
14403 if { (eval echo configure:14404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14404 then
14405   ol_cv_pthread_lpthreads_lexc=yes
14406 else
14407   echo "configure: failed program was:" >&5
14408   cat conftest.$ac_ext >&5
14409   rm -fr conftest*
14410   ol_cv_pthread_lpthreads_lexc=no
14411 fi
14412 rm -fr conftest*
14413 fi
14414
14415
14416                 # restore the LIBS
14417                 LIBS="$ol_LIBS"
14418         
14419 fi
14420
14421 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14422
14423         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14424                 ol_link_pthreads="-lpthreads -lexc"
14425                 ol_link_threads=posix
14426         fi
14427 fi
14428
14429
14430                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14431 if test "$ol_link_threads" = no ; then
14432         # try -lpthreads
14433         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14434 echo "configure:14435: checking for pthread link with -lpthreads" >&5
14435 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14436   echo $ac_n "(cached) $ac_c" 1>&6
14437 else
14438   
14439                 # save the flags
14440                 ol_LIBS="$LIBS"
14441                 LIBS="-lpthreads $LIBS"
14442
14443                 if test "$cross_compiling" = yes; then
14444   cat > conftest.$ac_ext <<EOF
14445 #line 14446 "configure"
14446 #include "confdefs.h"
14447 /* pthread test headers */
14448 #include <pthread.h>
14449 #if HAVE_PTHREADS < 7
14450 #include <errno.h>
14451 #endif
14452 #ifndef NULL
14453 #define NULL (void*)0
14454 #endif
14455
14456 static void *task(p)
14457         void *p;
14458 {
14459         return (void *) (p == NULL);
14460 }
14461
14462 int main() {
14463
14464         /* pthread test function */
14465 #ifndef PTHREAD_CREATE_DETACHED
14466 #define PTHREAD_CREATE_DETACHED 1
14467 #endif
14468         pthread_t t;
14469         int status;
14470         int detach = PTHREAD_CREATE_DETACHED;
14471
14472 #if HAVE_PTHREADS > 4
14473         /* Final pthreads */
14474         pthread_attr_t attr;
14475
14476         status = pthread_attr_init(&attr);
14477         if( status ) return status;
14478
14479 #if HAVE_PTHREADS < 7
14480         status = pthread_attr_setdetachstate(&attr, &detach);
14481         if( status < 0 ) status = errno;
14482 #else
14483         status = pthread_attr_setdetachstate(&attr, detach);
14484 #endif
14485         if( status ) return status;
14486         status = pthread_create( &t, &attr, task, NULL );
14487 #if HAVE_PTHREADS < 7
14488         if( status < 0 ) status = errno;
14489 #endif
14490         if( status ) return status;
14491 #else
14492         /* Draft 4 pthreads */
14493         status = pthread_create( &t, pthread_attr_default, task, NULL );
14494         if( status ) return errno;
14495
14496         /* give thread a chance to complete */
14497         /* it should remain joinable and hence detachable */
14498         sleep( 1 );
14499
14500         status = pthread_detach( &t );
14501         if( status ) return errno;
14502 #endif
14503
14504 #ifdef HAVE_LINUX_THREADS
14505         pthread_kill_other_threads_np();
14506 #endif
14507
14508         return 0;
14509
14510 ; return 0; }
14511 EOF
14512 if { (eval echo configure:14513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14513   rm -rf conftest*
14514   ol_cv_pthread_lib_lpthreads=yes
14515 else
14516   echo "configure: failed program was:" >&5
14517   cat conftest.$ac_ext >&5
14518   rm -rf conftest*
14519   ol_cv_pthread_lib_lpthreads=no
14520 fi
14521 rm -f conftest*
14522 else
14523   cat > conftest.$ac_ext <<EOF
14524 #line 14525 "configure"
14525 #include "confdefs.h"
14526 /* pthread test headers */
14527 #include <pthread.h>
14528 #if HAVE_PTHREADS < 7
14529 #include <errno.h>
14530 #endif
14531 #ifndef NULL
14532 #define NULL (void*)0
14533 #endif
14534
14535 static void *task(p)
14536         void *p;
14537 {
14538         return (void *) (p == NULL);
14539 }
14540
14541
14542 int main(argc, argv)
14543         int argc;
14544         char **argv;
14545 {
14546
14547         /* pthread test function */
14548 #ifndef PTHREAD_CREATE_DETACHED
14549 #define PTHREAD_CREATE_DETACHED 1
14550 #endif
14551         pthread_t t;
14552         int status;
14553         int detach = PTHREAD_CREATE_DETACHED;
14554
14555 #if HAVE_PTHREADS > 4
14556         /* Final pthreads */
14557         pthread_attr_t attr;
14558
14559         status = pthread_attr_init(&attr);
14560         if( status ) return status;
14561
14562 #if HAVE_PTHREADS < 7
14563         status = pthread_attr_setdetachstate(&attr, &detach);
14564         if( status < 0 ) status = errno;
14565 #else
14566         status = pthread_attr_setdetachstate(&attr, detach);
14567 #endif
14568         if( status ) return status;
14569         status = pthread_create( &t, &attr, task, NULL );
14570 #if HAVE_PTHREADS < 7
14571         if( status < 0 ) status = errno;
14572 #endif
14573         if( status ) return status;
14574 #else
14575         /* Draft 4 pthreads */
14576         status = pthread_create( &t, pthread_attr_default, task, NULL );
14577         if( status ) return errno;
14578
14579         /* give thread a chance to complete */
14580         /* it should remain joinable and hence detachable */
14581         sleep( 1 );
14582
14583         status = pthread_detach( &t );
14584         if( status ) return errno;
14585 #endif
14586
14587 #ifdef HAVE_LINUX_THREADS
14588         pthread_kill_other_threads_np();
14589 #endif
14590
14591         return 0;
14592
14593 }
14594
14595 EOF
14596 if { (eval echo configure:14597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14597 then
14598   ol_cv_pthread_lib_lpthreads=yes
14599 else
14600   echo "configure: failed program was:" >&5
14601   cat conftest.$ac_ext >&5
14602   rm -fr conftest*
14603   ol_cv_pthread_lib_lpthreads=no
14604 fi
14605 rm -fr conftest*
14606 fi
14607
14608
14609                 # restore the LIBS
14610                 LIBS="$ol_LIBS"
14611         
14612 fi
14613
14614 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14615
14616         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14617                 ol_link_pthreads="-lpthreads"
14618                 ol_link_threads=posix
14619         fi
14620 fi
14621
14622
14623                 if test $ol_link_threads != no ; then
14624                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14625
14626                                                 save_CPPFLAGS="$CPPFLAGS"
14627                         save_LIBS="$LIBS"
14628                         LIBS="$LTHREAD_LIBS $LIBS"
14629
14630                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14631 do
14632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14633 echo "configure:14634: checking for $ac_func" >&5
14634 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14635   echo $ac_n "(cached) $ac_c" 1>&6
14636 else
14637   cat > conftest.$ac_ext <<EOF
14638 #line 14639 "configure"
14639 #include "confdefs.h"
14640 /* System header to define __stub macros and hopefully few prototypes,
14641     which can conflict with char $ac_func(); below.  */
14642 #include <assert.h>
14643 /* Override any gcc2 internal prototype to avoid an error.  */
14644 /* We use char because int might match the return type of a gcc2
14645     builtin and then its argument prototype would still apply.  */
14646 char $ac_func();
14647 char (*f)();
14648
14649 int main() {
14650
14651 /* The GNU C library defines this for functions which it implements
14652     to always fail with ENOSYS.  Some functions are actually named
14653     something starting with __ and the normal name is an alias.  */
14654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14655 choke me
14656 #else
14657 f = $ac_func;
14658 #endif
14659
14660 ; return 0; }
14661 EOF
14662 if { (eval echo configure:14663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14663   rm -rf conftest*
14664   eval "ac_cv_func_$ac_func=yes"
14665 else
14666   echo "configure: failed program was:" >&5
14667   cat conftest.$ac_ext >&5
14668   rm -rf conftest*
14669   eval "ac_cv_func_$ac_func=no"
14670 fi
14671 rm -f conftest*
14672 fi
14673
14674 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14675   echo "$ac_t""yes" 1>&6
14676     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14677   cat >> confdefs.h <<EOF
14678 #define $ac_tr_func 1
14679 EOF
14680  
14681 else
14682   echo "$ac_t""no" 1>&6
14683 fi
14684 done
14685
14686
14687                         if test $ac_cv_func_sched_yield = no -a \
14688                                 $ac_cv_func_pthread_yield = no -a \
14689                                 $ac_cv_func_thr_yield = no ; then
14690                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14691 echo "configure:14692: checking for sched_yield in -lrt" >&5
14692 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14693 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14694   echo $ac_n "(cached) $ac_c" 1>&6
14695 else
14696   ac_save_LIBS="$LIBS"
14697 LIBS="-lrt  $LIBS"
14698 cat > conftest.$ac_ext <<EOF
14699 #line 14700 "configure"
14700 #include "confdefs.h"
14701 /* Override any gcc2 internal prototype to avoid an error.  */
14702 /* We use char because int might match the return type of a gcc2
14703     builtin and then its argument prototype would still apply.  */
14704 char sched_yield();
14705
14706 int main() {
14707 sched_yield()
14708 ; return 0; }
14709 EOF
14710 if { (eval echo configure:14711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14711   rm -rf conftest*
14712   eval "ac_cv_lib_$ac_lib_var=yes"
14713 else
14714   echo "configure: failed program was:" >&5
14715   cat conftest.$ac_ext >&5
14716   rm -rf conftest*
14717   eval "ac_cv_lib_$ac_lib_var=no"
14718 fi
14719 rm -f conftest*
14720 LIBS="$ac_save_LIBS"
14721
14722 fi
14723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14724   echo "$ac_t""yes" 1>&6
14725   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14726                                         cat >> confdefs.h <<\EOF
14727 #define HAVE_SCHED_YIELD 1
14728 EOF
14729
14730                                         ac_cv_func_sched_yield=yes
14731 else
14732   echo "$ac_t""no" 1>&6
14733 ac_cv_func_sched_yield=no
14734 fi
14735
14736                         fi
14737                         if test $ac_cv_func_sched_yield = no -a \
14738                                 $ac_cv_func_pthread_yield = no -a \
14739                                 "$ac_cv_func_thr_yield" = no ; then
14740                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14741                         fi
14742
14743                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14744 do
14745 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14746 echo "configure:14747: checking for $ac_func" >&5
14747 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14748   echo $ac_n "(cached) $ac_c" 1>&6
14749 else
14750   cat > conftest.$ac_ext <<EOF
14751 #line 14752 "configure"
14752 #include "confdefs.h"
14753 /* System header to define __stub macros and hopefully few prototypes,
14754     which can conflict with char $ac_func(); below.  */
14755 #include <assert.h>
14756 /* Override any gcc2 internal prototype to avoid an error.  */
14757 /* We use char because int might match the return type of a gcc2
14758     builtin and then its argument prototype would still apply.  */
14759 char $ac_func();
14760 char (*f)();
14761
14762 int main() {
14763
14764 /* The GNU C library defines this for functions which it implements
14765     to always fail with ENOSYS.  Some functions are actually named
14766     something starting with __ and the normal name is an alias.  */
14767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14768 choke me
14769 #else
14770 f = $ac_func;
14771 #endif
14772
14773 ; return 0; }
14774 EOF
14775 if { (eval echo configure:14776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14776   rm -rf conftest*
14777   eval "ac_cv_func_$ac_func=yes"
14778 else
14779   echo "configure: failed program was:" >&5
14780   cat conftest.$ac_ext >&5
14781   rm -rf conftest*
14782   eval "ac_cv_func_$ac_func=no"
14783 fi
14784 rm -f conftest*
14785 fi
14786
14787 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14788   echo "$ac_t""yes" 1>&6
14789     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14790   cat >> confdefs.h <<EOF
14791 #define $ac_tr_func 1
14792 EOF
14793  
14794 else
14795   echo "$ac_t""no" 1>&6
14796 fi
14797 done
14798
14799
14800                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14801 echo "configure:14802: checking for pthread_detach with <pthread.h>" >&5
14802 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14803   echo $ac_n "(cached) $ac_c" 1>&6
14804 else
14805   
14806                                                                 cat > conftest.$ac_ext <<EOF
14807 #line 14808 "configure"
14808 #include "confdefs.h"
14809
14810 #include <pthread.h>
14811 #ifndef NULL
14812 #define NULL (void*)0
14813 #endif
14814
14815 int main() {
14816 pthread_detach(NULL);
14817 ; return 0; }
14818 EOF
14819 if { (eval echo configure:14820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14820   rm -rf conftest*
14821   ol_cv_func_pthread_detach=yes
14822 else
14823   echo "configure: failed program was:" >&5
14824   cat conftest.$ac_ext >&5
14825   rm -rf conftest*
14826   ol_cv_func_pthread_detach=no
14827 fi
14828 rm -f conftest*
14829                         
14830 fi
14831
14832 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14833
14834                         if test $ol_cv_func_pthread_detach = no ; then
14835                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14836                         fi
14837
14838                         cat >> confdefs.h <<\EOF
14839 #define HAVE_PTHREAD_DETACH 1
14840 EOF
14841
14842
14843                                                 for ac_func in \
14844                                 pthread_setconcurrency \
14845                                 pthread_getconcurrency \
14846                                 thr_setconcurrency \
14847                                 thr_getconcurrency \
14848                         
14849 do
14850 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14851 echo "configure:14852: checking for $ac_func" >&5
14852 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14853   echo $ac_n "(cached) $ac_c" 1>&6
14854 else
14855   cat > conftest.$ac_ext <<EOF
14856 #line 14857 "configure"
14857 #include "confdefs.h"
14858 /* System header to define __stub macros and hopefully few prototypes,
14859     which can conflict with char $ac_func(); below.  */
14860 #include <assert.h>
14861 /* Override any gcc2 internal prototype to avoid an error.  */
14862 /* We use char because int might match the return type of a gcc2
14863     builtin and then its argument prototype would still apply.  */
14864 char $ac_func();
14865 char (*f)();
14866
14867 int main() {
14868
14869 /* The GNU C library defines this for functions which it implements
14870     to always fail with ENOSYS.  Some functions are actually named
14871     something starting with __ and the normal name is an alias.  */
14872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14873 choke me
14874 #else
14875 f = $ac_func;
14876 #endif
14877
14878 ; return 0; }
14879 EOF
14880 if { (eval echo configure:14881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14881   rm -rf conftest*
14882   eval "ac_cv_func_$ac_func=yes"
14883 else
14884   echo "configure: failed program was:" >&5
14885   cat conftest.$ac_ext >&5
14886   rm -rf conftest*
14887   eval "ac_cv_func_$ac_func=no"
14888 fi
14889 rm -f conftest*
14890 fi
14891
14892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14893   echo "$ac_t""yes" 1>&6
14894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14895   cat >> confdefs.h <<EOF
14896 #define $ac_tr_func 1
14897 EOF
14898  
14899 else
14900   echo "$ac_t""no" 1>&6
14901 fi
14902 done
14903
14904
14905                         
14906         for ac_func in pthread_kill_other_threads_np
14907 do
14908 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14909 echo "configure:14910: checking for $ac_func" >&5
14910 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14911   echo $ac_n "(cached) $ac_c" 1>&6
14912 else
14913   cat > conftest.$ac_ext <<EOF
14914 #line 14915 "configure"
14915 #include "confdefs.h"
14916 /* System header to define __stub macros and hopefully few prototypes,
14917     which can conflict with char $ac_func(); below.  */
14918 #include <assert.h>
14919 /* Override any gcc2 internal prototype to avoid an error.  */
14920 /* We use char because int might match the return type of a gcc2
14921     builtin and then its argument prototype would still apply.  */
14922 char $ac_func();
14923 char (*f)();
14924
14925 int main() {
14926
14927 /* The GNU C library defines this for functions which it implements
14928     to always fail with ENOSYS.  Some functions are actually named
14929     something starting with __ and the normal name is an alias.  */
14930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14931 choke me
14932 #else
14933 f = $ac_func;
14934 #endif
14935
14936 ; return 0; }
14937 EOF
14938 if { (eval echo configure:14939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14939   rm -rf conftest*
14940   eval "ac_cv_func_$ac_func=yes"
14941 else
14942   echo "configure: failed program was:" >&5
14943   cat conftest.$ac_ext >&5
14944   rm -rf conftest*
14945   eval "ac_cv_func_$ac_func=no"
14946 fi
14947 rm -f conftest*
14948 fi
14949
14950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14951   echo "$ac_t""yes" 1>&6
14952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14953   cat >> confdefs.h <<EOF
14954 #define $ac_tr_func 1
14955 EOF
14956  
14957 else
14958   echo "$ac_t""no" 1>&6
14959 fi
14960 done
14961
14962         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14963 echo "configure:14964: checking for LinuxThreads implementation" >&5
14964 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14965   echo $ac_n "(cached) $ac_c" 1>&6
14966 else
14967   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14968 fi
14969
14970 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14971
14972                         
14973         
14974         
14975         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14976 echo "configure:14977: checking for LinuxThreads consistency" >&5
14977 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14978   echo $ac_n "(cached) $ac_c" 1>&6
14979 else
14980   
14981                 if test $ol_cv_header_linux_threads = yes -a \
14982                         $ol_cv_sys_linux_threads = yes; then
14983                         ol_cv_linux_threads=yes
14984                 elif test $ol_cv_header_linux_threads = no -a \
14985                         $ol_cv_sys_linux_threads = no; then
14986                         ol_cv_linux_threads=no
14987                 else
14988                         ol_cv_linux_threads=error
14989                 fi
14990         
14991 fi
14992
14993 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14994
14995
14996                         if test $ol_cv_linux_threads = error; then
14997                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14998                         fi
14999
15000                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15001 echo "configure:15002: checking if pthread_create() works" >&5
15002 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15003   echo $ac_n "(cached) $ac_c" 1>&6
15004 else
15005   
15006                         if test "$cross_compiling" = yes; then
15007                                 ol_cv_pthread_create_works=yes
15008 else
15009   cat > conftest.$ac_ext <<EOF
15010 #line 15011 "configure"
15011 #include "confdefs.h"
15012 /* pthread test headers */
15013 #include <pthread.h>
15014 #if HAVE_PTHREADS < 7
15015 #include <errno.h>
15016 #endif
15017 #ifndef NULL
15018 #define NULL (void*)0
15019 #endif
15020
15021 static void *task(p)
15022         void *p;
15023 {
15024         return (void *) (p == NULL);
15025 }
15026
15027
15028 int main(argc, argv)
15029         int argc;
15030         char **argv;
15031 {
15032
15033         /* pthread test function */
15034 #ifndef PTHREAD_CREATE_DETACHED
15035 #define PTHREAD_CREATE_DETACHED 1
15036 #endif
15037         pthread_t t;
15038         int status;
15039         int detach = PTHREAD_CREATE_DETACHED;
15040
15041 #if HAVE_PTHREADS > 4
15042         /* Final pthreads */
15043         pthread_attr_t attr;
15044
15045         status = pthread_attr_init(&attr);
15046         if( status ) return status;
15047
15048 #if HAVE_PTHREADS < 7
15049         status = pthread_attr_setdetachstate(&attr, &detach);
15050         if( status < 0 ) status = errno;
15051 #else
15052         status = pthread_attr_setdetachstate(&attr, detach);
15053 #endif
15054         if( status ) return status;
15055         status = pthread_create( &t, &attr, task, NULL );
15056 #if HAVE_PTHREADS < 7
15057         if( status < 0 ) status = errno;
15058 #endif
15059         if( status ) return status;
15060 #else
15061         /* Draft 4 pthreads */
15062         status = pthread_create( &t, pthread_attr_default, task, NULL );
15063         if( status ) return errno;
15064
15065         /* give thread a chance to complete */
15066         /* it should remain joinable and hence detachable */
15067         sleep( 1 );
15068
15069         status = pthread_detach( &t );
15070         if( status ) return errno;
15071 #endif
15072
15073 #ifdef HAVE_LINUX_THREADS
15074         pthread_kill_other_threads_np();
15075 #endif
15076
15077         return 0;
15078
15079 }
15080
15081 EOF
15082 if { (eval echo configure:15083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15083 then
15084   ol_cv_pthread_create_works=yes
15085 else
15086   echo "configure: failed program was:" >&5
15087   cat conftest.$ac_ext >&5
15088   rm -fr conftest*
15089   ol_cv_pthread_create_works=no
15090 fi
15091 rm -fr conftest*
15092 fi
15093
15094 fi
15095
15096 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15097
15098                         if test $ol_cv_pthread_create_works = no ; then
15099                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15100                         fi
15101
15102                                                 if test $ol_with_yielding_select = auto ; then
15103                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15104 echo "configure:15105: checking if select yields when using pthreads" >&5
15105 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15106   echo $ac_n "(cached) $ac_c" 1>&6
15107 else
15108   
15109                                 if test "$cross_compiling" = yes; then
15110   ol_cv_pthread_select_yields=cross
15111 else
15112   cat > conftest.$ac_ext <<EOF
15113 #line 15114 "configure"
15114 #include "confdefs.h"
15115
15116 #include <sys/types.h>
15117 #include <sys/time.h>
15118 #include <unistd.h>
15119 #include <pthread.h>
15120 #ifndef NULL
15121 #define NULL (void*) 0
15122 #endif
15123
15124 static int fildes[2];
15125
15126 static void *task(p)
15127         void *p;
15128 {
15129         int i;
15130         struct timeval tv;
15131
15132         fd_set rfds;
15133
15134         tv.tv_sec=10;
15135         tv.tv_usec=0;
15136
15137         FD_ZERO(&rfds);
15138         FD_SET(fildes[0], &rfds);
15139
15140         /* we're not interested in any fds */
15141         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15142
15143         if(i < 0) {
15144                 perror("select");
15145                 exit(10);
15146         }
15147
15148         exit(0); /* if we exit here, the select blocked the whole process */
15149 }
15150
15151 int main(argc, argv)
15152         int argc;
15153         char **argv;
15154 {
15155         pthread_t t;
15156
15157         /* create a pipe to select */
15158         if(pipe(&fildes[0])) {
15159                 perror("select");
15160                 exit(1);
15161         }
15162
15163 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15164         (void) pthread_setconcurrency(2);
15165 #else
15166 #ifdef HAVE_THR_SETCONCURRENCY
15167         /* Set Solaris LWP concurrency to 2 */
15168         thr_setconcurrency(2);
15169 #endif
15170 #endif
15171
15172 #if HAVE_PTHREADS < 6
15173         pthread_create(&t, pthread_attr_default, task, NULL);
15174 #else
15175         pthread_create(&t, NULL, task, NULL);
15176 #endif
15177
15178         /* make sure task runs first */
15179 #if HAVE_THR_YIELD
15180         thr_yield();
15181 #elif defined( HAVE_SCHED_YIELD )
15182         sched_yield();
15183 #elif defined( HAVE_PTHREAD_YIELD )
15184         pthread_yield();
15185 #endif
15186
15187         exit(2);
15188 }
15189 EOF
15190 if { (eval echo configure:15191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15191 then
15192   ol_cv_pthread_select_yields=no
15193 else
15194   echo "configure: failed program was:" >&5
15195   cat conftest.$ac_ext >&5
15196   rm -fr conftest*
15197   ol_cv_pthread_select_yields=yes
15198 fi
15199 rm -fr conftest*
15200 fi
15201
15202 fi
15203
15204 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15205
15206                                 if test $ol_cv_pthread_select_yields = cross ; then
15207                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15208                                 fi
15209
15210                                 if test $ol_cv_pthread_select_yields = yes ; then
15211                                         ol_with_yielding_select=yes
15212                                 fi
15213                         fi
15214
15215                                                 CPPFLAGS="$save_CPPFLAGS"
15216                         LIBS="$save_LIBS"
15217                 else
15218                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15219                 fi
15220         fi
15221
15222         if test $ol_with_threads = posix ; then
15223                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15224         fi
15225 fi
15226
15227 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15228         -o $ol_with_threads = mach ; then
15229
15230                 for ac_hdr in mach/cthreads.h cthreads.h
15231 do
15232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15234 echo "configure:15235: checking for $ac_hdr" >&5
15235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15236   echo $ac_n "(cached) $ac_c" 1>&6
15237 else
15238   cat > conftest.$ac_ext <<EOF
15239 #line 15240 "configure"
15240 #include "confdefs.h"
15241 #include <$ac_hdr>
15242 EOF
15243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15244 { (eval echo configure:15245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15246 if test -z "$ac_err"; then
15247   rm -rf conftest*
15248   eval "ac_cv_header_$ac_safe=yes"
15249 else
15250   echo "$ac_err" >&5
15251   echo "configure: failed program was:" >&5
15252   cat conftest.$ac_ext >&5
15253   rm -rf conftest*
15254   eval "ac_cv_header_$ac_safe=no"
15255 fi
15256 rm -f conftest*
15257 fi
15258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15259   echo "$ac_t""yes" 1>&6
15260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15261   cat >> confdefs.h <<EOF
15262 #define $ac_tr_hdr 1
15263 EOF
15264  
15265 else
15266   echo "$ac_t""no" 1>&6
15267 fi
15268 done
15269
15270         if test $ac_cv_header_mach_cthreads_h = yes ; then
15271                 ol_with_threads=found
15272
15273                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15274 echo "configure:15275: checking for cthread_fork" >&5
15275 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15276   echo $ac_n "(cached) $ac_c" 1>&6
15277 else
15278   cat > conftest.$ac_ext <<EOF
15279 #line 15280 "configure"
15280 #include "confdefs.h"
15281 /* System header to define __stub macros and hopefully few prototypes,
15282     which can conflict with char cthread_fork(); below.  */
15283 #include <assert.h>
15284 /* Override any gcc2 internal prototype to avoid an error.  */
15285 /* We use char because int might match the return type of a gcc2
15286     builtin and then its argument prototype would still apply.  */
15287 char cthread_fork();
15288 char (*f)();
15289
15290 int main() {
15291
15292 /* The GNU C library defines this for functions which it implements
15293     to always fail with ENOSYS.  Some functions are actually named
15294     something starting with __ and the normal name is an alias.  */
15295 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15296 choke me
15297 #else
15298 f = cthread_fork;
15299 #endif
15300
15301 ; return 0; }
15302 EOF
15303 if { (eval echo configure:15304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15304   rm -rf conftest*
15305   eval "ac_cv_func_cthread_fork=yes"
15306 else
15307   echo "configure: failed program was:" >&5
15308   cat conftest.$ac_ext >&5
15309   rm -rf conftest*
15310   eval "ac_cv_func_cthread_fork=no"
15311 fi
15312 rm -f conftest*
15313 fi
15314
15315 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15316   echo "$ac_t""yes" 1>&6
15317   ol_link_threads=yes
15318 else
15319   echo "$ac_t""no" 1>&6
15320 fi
15321
15322
15323                 if test $ol_link_threads = no ; then
15324                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15325 echo "configure:15326: checking for cthread_fork with -all_load" >&5
15326 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15327   echo $ac_n "(cached) $ac_c" 1>&6
15328 else
15329   
15330                                                                 save_LIBS="$LIBS"
15331                                 LIBS="-all_load $LIBS"
15332                                 cat > conftest.$ac_ext <<EOF
15333 #line 15334 "configure"
15334 #include "confdefs.h"
15335 #include <mach/cthreads.h>
15336 int main() {
15337
15338                                         cthread_fork((void *)0, (void *)0);
15339                                         
15340 ; return 0; }
15341 EOF
15342 if { (eval echo configure:15343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15343   rm -rf conftest*
15344   ol_cv_cthread_all_load=yes
15345 else
15346   echo "configure: failed program was:" >&5
15347   cat conftest.$ac_ext >&5
15348   rm -rf conftest*
15349   ol_cv_cthread_all_load=no
15350 fi
15351 rm -f conftest*
15352                                                                 LIBS="$save_LIBS"
15353                         
15354 fi
15355
15356 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15357
15358                         if test $ol_cv_cthread_all_load = yes ; then
15359                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15360                                 ol_link_threads=mach
15361                                 ol_with_threads=found
15362                         fi
15363                 fi
15364
15365         elif test $ac_cv_header_cthreads_h = yes ; then
15366                                 
15367                 ol_with_threads=found
15368  
15369                                 save_LIBS="$LIBS"
15370                 LIBS="$LIBS -lthreads"
15371                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15372 echo "configure:15373: checking for cthread_fork" >&5
15373 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15374   echo $ac_n "(cached) $ac_c" 1>&6
15375 else
15376   cat > conftest.$ac_ext <<EOF
15377 #line 15378 "configure"
15378 #include "confdefs.h"
15379 /* System header to define __stub macros and hopefully few prototypes,
15380     which can conflict with char cthread_fork(); below.  */
15381 #include <assert.h>
15382 /* Override any gcc2 internal prototype to avoid an error.  */
15383 /* We use char because int might match the return type of a gcc2
15384     builtin and then its argument prototype would still apply.  */
15385 char cthread_fork();
15386 char (*f)();
15387
15388 int main() {
15389
15390 /* The GNU C library defines this for functions which it implements
15391     to always fail with ENOSYS.  Some functions are actually named
15392     something starting with __ and the normal name is an alias.  */
15393 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15394 choke me
15395 #else
15396 f = cthread_fork;
15397 #endif
15398
15399 ; return 0; }
15400 EOF
15401 if { (eval echo configure:15402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15402   rm -rf conftest*
15403   eval "ac_cv_func_cthread_fork=yes"
15404 else
15405   echo "configure: failed program was:" >&5
15406   cat conftest.$ac_ext >&5
15407   rm -rf conftest*
15408   eval "ac_cv_func_cthread_fork=no"
15409 fi
15410 rm -f conftest*
15411 fi
15412
15413 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15414   echo "$ac_t""yes" 1>&6
15415   ol_link_threads=yes
15416 else
15417   echo "$ac_t""no" 1>&6
15418 fi
15419
15420                 LIBS="$save_LIBS"
15421
15422                 if test $ol_link_threads = yes ; then
15423                         LTHREAD_LIBS="-lthreads"
15424                         ol_link_threads=mach
15425                         ol_with_threads=found
15426                 else
15427                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15428                 fi
15429
15430         elif test $ol_with_threads = mach ; then
15431                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15432         fi
15433
15434         if test $ol_link_threads = mach ; then
15435                 cat >> confdefs.h <<\EOF
15436 #define HAVE_MACH_CTHREADS 1
15437 EOF
15438
15439         elif test $ol_with_threads = found ; then
15440                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15441         fi
15442 fi
15443
15444 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15445         -o $ol_with_threads = pth ; then
15446
15447         for ac_hdr in pth.h
15448 do
15449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15451 echo "configure:15452: checking for $ac_hdr" >&5
15452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15453   echo $ac_n "(cached) $ac_c" 1>&6
15454 else
15455   cat > conftest.$ac_ext <<EOF
15456 #line 15457 "configure"
15457 #include "confdefs.h"
15458 #include <$ac_hdr>
15459 EOF
15460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15461 { (eval echo configure:15462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15463 if test -z "$ac_err"; then
15464   rm -rf conftest*
15465   eval "ac_cv_header_$ac_safe=yes"
15466 else
15467   echo "$ac_err" >&5
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   eval "ac_cv_header_$ac_safe=no"
15472 fi
15473 rm -f conftest*
15474 fi
15475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15476   echo "$ac_t""yes" 1>&6
15477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15478   cat >> confdefs.h <<EOF
15479 #define $ac_tr_hdr 1
15480 EOF
15481  
15482 else
15483   echo "$ac_t""no" 1>&6
15484 fi
15485 done
15486
15487
15488         if test $ac_cv_header_pth_h = yes ; then
15489                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15490 echo "configure:15491: checking for pth_version in -lpth" >&5
15491 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15492 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15493   echo $ac_n "(cached) $ac_c" 1>&6
15494 else
15495   ac_save_LIBS="$LIBS"
15496 LIBS="-lpth  $LIBS"
15497 cat > conftest.$ac_ext <<EOF
15498 #line 15499 "configure"
15499 #include "confdefs.h"
15500 /* Override any gcc2 internal prototype to avoid an error.  */
15501 /* We use char because int might match the return type of a gcc2
15502     builtin and then its argument prototype would still apply.  */
15503 char pth_version();
15504
15505 int main() {
15506 pth_version()
15507 ; return 0; }
15508 EOF
15509 if { (eval echo configure:15510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15510   rm -rf conftest*
15511   eval "ac_cv_lib_$ac_lib_var=yes"
15512 else
15513   echo "configure: failed program was:" >&5
15514   cat conftest.$ac_ext >&5
15515   rm -rf conftest*
15516   eval "ac_cv_lib_$ac_lib_var=no"
15517 fi
15518 rm -f conftest*
15519 LIBS="$ac_save_LIBS"
15520
15521 fi
15522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15523   echo "$ac_t""yes" 1>&6
15524   have_pth=yes
15525 else
15526   echo "$ac_t""no" 1>&6
15527 have_pth=no
15528 fi
15529
15530
15531                 if test $have_pth = yes ; then
15532                         cat >> confdefs.h <<\EOF
15533 #define HAVE_GNU_PTH 1
15534 EOF
15535
15536                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15537                         ol_link_threads=pth
15538                         ol_with_threads=found
15539
15540                         if test $ol_with_yielding_select = auto ; then
15541                                 ol_with_yielding_select=yes
15542                         fi
15543                 fi
15544         fi
15545 fi
15546
15547 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15548         -o $ol_with_threads = lwp ; then
15549
15550                 for ac_hdr in thread.h synch.h
15551 do
15552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15554 echo "configure:15555: checking for $ac_hdr" >&5
15555 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15556   echo $ac_n "(cached) $ac_c" 1>&6
15557 else
15558   cat > conftest.$ac_ext <<EOF
15559 #line 15560 "configure"
15560 #include "confdefs.h"
15561 #include <$ac_hdr>
15562 EOF
15563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15564 { (eval echo configure:15565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15566 if test -z "$ac_err"; then
15567   rm -rf conftest*
15568   eval "ac_cv_header_$ac_safe=yes"
15569 else
15570   echo "$ac_err" >&5
15571   echo "configure: failed program was:" >&5
15572   cat conftest.$ac_ext >&5
15573   rm -rf conftest*
15574   eval "ac_cv_header_$ac_safe=no"
15575 fi
15576 rm -f conftest*
15577 fi
15578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15579   echo "$ac_t""yes" 1>&6
15580     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15581   cat >> confdefs.h <<EOF
15582 #define $ac_tr_hdr 1
15583 EOF
15584  
15585 else
15586   echo "$ac_t""no" 1>&6
15587 fi
15588 done
15589
15590         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15591                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15592 echo "configure:15593: checking for thr_create in -lthread" >&5
15593 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15595   echo $ac_n "(cached) $ac_c" 1>&6
15596 else
15597   ac_save_LIBS="$LIBS"
15598 LIBS="-lthread  $LIBS"
15599 cat > conftest.$ac_ext <<EOF
15600 #line 15601 "configure"
15601 #include "confdefs.h"
15602 /* Override any gcc2 internal prototype to avoid an error.  */
15603 /* We use char because int might match the return type of a gcc2
15604     builtin and then its argument prototype would still apply.  */
15605 char thr_create();
15606
15607 int main() {
15608 thr_create()
15609 ; return 0; }
15610 EOF
15611 if { (eval echo configure:15612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15612   rm -rf conftest*
15613   eval "ac_cv_lib_$ac_lib_var=yes"
15614 else
15615   echo "configure: failed program was:" >&5
15616   cat conftest.$ac_ext >&5
15617   rm -rf conftest*
15618   eval "ac_cv_lib_$ac_lib_var=no"
15619 fi
15620 rm -f conftest*
15621 LIBS="$ac_save_LIBS"
15622
15623 fi
15624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15625   echo "$ac_t""yes" 1>&6
15626   have_thr=yes
15627 else
15628   echo "$ac_t""no" 1>&6
15629 have_thr=no
15630 fi
15631
15632
15633                 if test $have_thr = yes ; then
15634                         cat >> confdefs.h <<\EOF
15635 #define HAVE_THR 1
15636 EOF
15637
15638                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15639                         ol_link_threads=thr
15640
15641                         if test $ol_with_yielding_select = auto ; then
15642                                 ol_with_yielding_select=yes
15643                         fi
15644
15645                                                 for ac_func in \
15646                                 thr_setconcurrency \
15647                                 thr_getconcurrency \
15648                         
15649 do
15650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15651 echo "configure:15652: checking for $ac_func" >&5
15652 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15653   echo $ac_n "(cached) $ac_c" 1>&6
15654 else
15655   cat > conftest.$ac_ext <<EOF
15656 #line 15657 "configure"
15657 #include "confdefs.h"
15658 /* System header to define __stub macros and hopefully few prototypes,
15659     which can conflict with char $ac_func(); below.  */
15660 #include <assert.h>
15661 /* Override any gcc2 internal prototype to avoid an error.  */
15662 /* We use char because int might match the return type of a gcc2
15663     builtin and then its argument prototype would still apply.  */
15664 char $ac_func();
15665 char (*f)();
15666
15667 int main() {
15668
15669 /* The GNU C library defines this for functions which it implements
15670     to always fail with ENOSYS.  Some functions are actually named
15671     something starting with __ and the normal name is an alias.  */
15672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15673 choke me
15674 #else
15675 f = $ac_func;
15676 #endif
15677
15678 ; return 0; }
15679 EOF
15680 if { (eval echo configure:15681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15681   rm -rf conftest*
15682   eval "ac_cv_func_$ac_func=yes"
15683 else
15684   echo "configure: failed program was:" >&5
15685   cat conftest.$ac_ext >&5
15686   rm -rf conftest*
15687   eval "ac_cv_func_$ac_func=no"
15688 fi
15689 rm -f conftest*
15690 fi
15691
15692 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15693   echo "$ac_t""yes" 1>&6
15694     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15695   cat >> confdefs.h <<EOF
15696 #define $ac_tr_func 1
15697 EOF
15698  
15699 else
15700   echo "$ac_t""no" 1>&6
15701 fi
15702 done
15703
15704                 fi
15705         fi
15706
15707                 for ac_hdr in lwp/lwp.h
15708 do
15709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15711 echo "configure:15712: checking for $ac_hdr" >&5
15712 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15713   echo $ac_n "(cached) $ac_c" 1>&6
15714 else
15715   cat > conftest.$ac_ext <<EOF
15716 #line 15717 "configure"
15717 #include "confdefs.h"
15718 #include <$ac_hdr>
15719 EOF
15720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15721 { (eval echo configure:15722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15723 if test -z "$ac_err"; then
15724   rm -rf conftest*
15725   eval "ac_cv_header_$ac_safe=yes"
15726 else
15727   echo "$ac_err" >&5
15728   echo "configure: failed program was:" >&5
15729   cat conftest.$ac_ext >&5
15730   rm -rf conftest*
15731   eval "ac_cv_header_$ac_safe=no"
15732 fi
15733 rm -f conftest*
15734 fi
15735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15736   echo "$ac_t""yes" 1>&6
15737     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15738   cat >> confdefs.h <<EOF
15739 #define $ac_tr_hdr 1
15740 EOF
15741  
15742 else
15743   echo "$ac_t""no" 1>&6
15744 fi
15745 done
15746
15747         if test $ac_cv_header_lwp_lwp_h = yes ; then
15748                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15749 echo "configure:15750: checking for lwp_create in -llwp" >&5
15750 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15751 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15752   echo $ac_n "(cached) $ac_c" 1>&6
15753 else
15754   ac_save_LIBS="$LIBS"
15755 LIBS="-llwp  $LIBS"
15756 cat > conftest.$ac_ext <<EOF
15757 #line 15758 "configure"
15758 #include "confdefs.h"
15759 /* Override any gcc2 internal prototype to avoid an error.  */
15760 /* We use char because int might match the return type of a gcc2
15761     builtin and then its argument prototype would still apply.  */
15762 char lwp_create();
15763
15764 int main() {
15765 lwp_create()
15766 ; return 0; }
15767 EOF
15768 if { (eval echo configure:15769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15769   rm -rf conftest*
15770   eval "ac_cv_lib_$ac_lib_var=yes"
15771 else
15772   echo "configure: failed program was:" >&5
15773   cat conftest.$ac_ext >&5
15774   rm -rf conftest*
15775   eval "ac_cv_lib_$ac_lib_var=no"
15776 fi
15777 rm -f conftest*
15778 LIBS="$ac_save_LIBS"
15779
15780 fi
15781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15782   echo "$ac_t""yes" 1>&6
15783   have_lwp=yes
15784 else
15785   echo "$ac_t""no" 1>&6
15786 have_lwp=no
15787 fi
15788
15789
15790                 if test $have_lwp = yes ; then
15791                         cat >> confdefs.h <<\EOF
15792 #define HAVE_LWP 1
15793 EOF
15794
15795                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15796                         ol_link_threads=lwp
15797
15798                         if test $ol_with_yielding_select = auto ; then
15799                                 ol_with_yielding_select=no
15800                         fi
15801                 fi
15802         fi
15803 fi
15804
15805 if test $ol_with_yielding_select = yes ; then
15806         cat >> confdefs.h <<\EOF
15807 #define HAVE_YIELDING_SELECT 1
15808 EOF
15809
15810 fi
15811
15812 if test $ol_with_threads = manual ; then
15813                 ol_link_threads=yes
15814
15815         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15816
15817         for ac_hdr in pthread.h sched.h
15818 do
15819 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15820 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15821 echo "configure:15822: checking for $ac_hdr" >&5
15822 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15823   echo $ac_n "(cached) $ac_c" 1>&6
15824 else
15825   cat > conftest.$ac_ext <<EOF
15826 #line 15827 "configure"
15827 #include "confdefs.h"
15828 #include <$ac_hdr>
15829 EOF
15830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15831 { (eval echo configure:15832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15833 if test -z "$ac_err"; then
15834   rm -rf conftest*
15835   eval "ac_cv_header_$ac_safe=yes"
15836 else
15837   echo "$ac_err" >&5
15838   echo "configure: failed program was:" >&5
15839   cat conftest.$ac_ext >&5
15840   rm -rf conftest*
15841   eval "ac_cv_header_$ac_safe=no"
15842 fi
15843 rm -f conftest*
15844 fi
15845 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15846   echo "$ac_t""yes" 1>&6
15847     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15848   cat >> confdefs.h <<EOF
15849 #define $ac_tr_hdr 1
15850 EOF
15851  
15852 else
15853   echo "$ac_t""no" 1>&6
15854 fi
15855 done
15856
15857         for ac_func in sched_yield pthread_yield
15858 do
15859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15860 echo "configure:15861: checking for $ac_func" >&5
15861 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15862   echo $ac_n "(cached) $ac_c" 1>&6
15863 else
15864   cat > conftest.$ac_ext <<EOF
15865 #line 15866 "configure"
15866 #include "confdefs.h"
15867 /* System header to define __stub macros and hopefully few prototypes,
15868     which can conflict with char $ac_func(); below.  */
15869 #include <assert.h>
15870 /* Override any gcc2 internal prototype to avoid an error.  */
15871 /* We use char because int might match the return type of a gcc2
15872     builtin and then its argument prototype would still apply.  */
15873 char $ac_func();
15874 char (*f)();
15875
15876 int main() {
15877
15878 /* The GNU C library defines this for functions which it implements
15879     to always fail with ENOSYS.  Some functions are actually named
15880     something starting with __ and the normal name is an alias.  */
15881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15882 choke me
15883 #else
15884 f = $ac_func;
15885 #endif
15886
15887 ; return 0; }
15888 EOF
15889 if { (eval echo configure:15890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15890   rm -rf conftest*
15891   eval "ac_cv_func_$ac_func=yes"
15892 else
15893   echo "configure: failed program was:" >&5
15894   cat conftest.$ac_ext >&5
15895   rm -rf conftest*
15896   eval "ac_cv_func_$ac_func=no"
15897 fi
15898 rm -f conftest*
15899 fi
15900
15901 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15902   echo "$ac_t""yes" 1>&6
15903     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15904   cat >> confdefs.h <<EOF
15905 #define $ac_tr_func 1
15906 EOF
15907  
15908 else
15909   echo "$ac_t""no" 1>&6
15910 fi
15911 done
15912
15913         
15914         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15915 echo "configure:15916: checking for LinuxThreads pthread.h" >&5
15916 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15917   echo $ac_n "(cached) $ac_c" 1>&6
15918 else
15919   cat > conftest.$ac_ext <<EOF
15920 #line 15921 "configure"
15921 #include "confdefs.h"
15922 #include <pthread.h>
15923 EOF
15924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15925   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15926   rm -rf conftest*
15927   ol_cv_header_linux_threads=yes
15928 else
15929   rm -rf conftest*
15930   ol_cv_header_linux_threads=no
15931 fi
15932 rm -f conftest*
15933
15934                 
15935 fi
15936
15937 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15938         if test $ol_cv_header_linux_threads = yes; then
15939                 cat >> confdefs.h <<\EOF
15940 #define HAVE_LINUX_THREADS 1
15941 EOF
15942
15943         fi
15944
15945
15946         for ac_hdr in mach/cthreads.h
15947 do
15948 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15949 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15950 echo "configure:15951: checking for $ac_hdr" >&5
15951 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15952   echo $ac_n "(cached) $ac_c" 1>&6
15953 else
15954   cat > conftest.$ac_ext <<EOF
15955 #line 15956 "configure"
15956 #include "confdefs.h"
15957 #include <$ac_hdr>
15958 EOF
15959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15960 { (eval echo configure:15961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15962 if test -z "$ac_err"; then
15963   rm -rf conftest*
15964   eval "ac_cv_header_$ac_safe=yes"
15965 else
15966   echo "$ac_err" >&5
15967   echo "configure: failed program was:" >&5
15968   cat conftest.$ac_ext >&5
15969   rm -rf conftest*
15970   eval "ac_cv_header_$ac_safe=no"
15971 fi
15972 rm -f conftest*
15973 fi
15974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15975   echo "$ac_t""yes" 1>&6
15976     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15977   cat >> confdefs.h <<EOF
15978 #define $ac_tr_hdr 1
15979 EOF
15980  
15981 else
15982   echo "$ac_t""no" 1>&6
15983 fi
15984 done
15985
15986         for ac_hdr in lwp/lwp.h
15987 do
15988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15990 echo "configure:15991: checking for $ac_hdr" >&5
15991 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15992   echo $ac_n "(cached) $ac_c" 1>&6
15993 else
15994   cat > conftest.$ac_ext <<EOF
15995 #line 15996 "configure"
15996 #include "confdefs.h"
15997 #include <$ac_hdr>
15998 EOF
15999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16000 { (eval echo configure:16001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16002 if test -z "$ac_err"; then
16003   rm -rf conftest*
16004   eval "ac_cv_header_$ac_safe=yes"
16005 else
16006   echo "$ac_err" >&5
16007   echo "configure: failed program was:" >&5
16008   cat conftest.$ac_ext >&5
16009   rm -rf conftest*
16010   eval "ac_cv_header_$ac_safe=no"
16011 fi
16012 rm -f conftest*
16013 fi
16014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16015   echo "$ac_t""yes" 1>&6
16016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16017   cat >> confdefs.h <<EOF
16018 #define $ac_tr_hdr 1
16019 EOF
16020  
16021 else
16022   echo "$ac_t""no" 1>&6
16023 fi
16024 done
16025
16026         for ac_hdr in thread.h synch.h
16027 do
16028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16030 echo "configure:16031: checking for $ac_hdr" >&5
16031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16032   echo $ac_n "(cached) $ac_c" 1>&6
16033 else
16034   cat > conftest.$ac_ext <<EOF
16035 #line 16036 "configure"
16036 #include "confdefs.h"
16037 #include <$ac_hdr>
16038 EOF
16039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16040 { (eval echo configure:16041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16042 if test -z "$ac_err"; then
16043   rm -rf conftest*
16044   eval "ac_cv_header_$ac_safe=yes"
16045 else
16046   echo "$ac_err" >&5
16047   echo "configure: failed program was:" >&5
16048   cat conftest.$ac_ext >&5
16049   rm -rf conftest*
16050   eval "ac_cv_header_$ac_safe=no"
16051 fi
16052 rm -f conftest*
16053 fi
16054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16055   echo "$ac_t""yes" 1>&6
16056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16057   cat >> confdefs.h <<EOF
16058 #define $ac_tr_hdr 1
16059 EOF
16060  
16061 else
16062   echo "$ac_t""no" 1>&6
16063 fi
16064 done
16065
16066 fi
16067
16068 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16069                         cat >> confdefs.h <<\EOF
16070 #define REENTRANT 1
16071 EOF
16072
16073         cat >> confdefs.h <<\EOF
16074 #define _REENTRANT 1
16075 EOF
16076
16077         cat >> confdefs.h <<\EOF
16078 #define THREAD_SAFE 1
16079 EOF
16080
16081         cat >> confdefs.h <<\EOF
16082 #define _THREAD_SAFE 1
16083 EOF
16084
16085         cat >> confdefs.h <<\EOF
16086 #define THREADSAFE 1
16087 EOF
16088
16089         cat >> confdefs.h <<\EOF
16090 #define _THREADSAFE 1
16091 EOF
16092
16093         cat >> confdefs.h <<\EOF
16094 #define _SGI_MP_SOURCE 1
16095 EOF
16096
16097
16098                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16099 echo "configure:16100: checking for thread specific errno" >&5
16100 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16101   echo $ac_n "(cached) $ac_c" 1>&6
16102 else
16103   
16104                 cat > conftest.$ac_ext <<EOF
16105 #line 16106 "configure"
16106 #include "confdefs.h"
16107 #include <errno.h>
16108 int main() {
16109 errno = 0;
16110 ; return 0; }
16111 EOF
16112 if { (eval echo configure:16113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16113   rm -rf conftest*
16114   ol_cv_errno_thread_specific=yes
16115 else
16116   echo "configure: failed program was:" >&5
16117   cat conftest.$ac_ext >&5
16118   rm -rf conftest*
16119   ol_cv_errno_thread_specific=no
16120 fi
16121 rm -f conftest*
16122         
16123 fi
16124
16125 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16126
16127                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16128 echo "configure:16129: checking for thread specific h_errno" >&5
16129 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16130   echo $ac_n "(cached) $ac_c" 1>&6
16131 else
16132   
16133                 cat > conftest.$ac_ext <<EOF
16134 #line 16135 "configure"
16135 #include "confdefs.h"
16136 #include <netdb.h>
16137 int main() {
16138 h_errno = 0;
16139 ; return 0; }
16140 EOF
16141 if { (eval echo configure:16142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16142   rm -rf conftest*
16143   ol_cv_h_errno_thread_specific=yes
16144 else
16145   echo "configure: failed program was:" >&5
16146   cat conftest.$ac_ext >&5
16147   rm -rf conftest*
16148   ol_cv_h_errno_thread_specific=no
16149 fi
16150 rm -f conftest*
16151         
16152 fi
16153
16154 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16155
16156         if test $ol_cv_errno_thread_specific != yes \
16157                 -o $ol_cv_h_errno_thread_specific != yes ; then
16158                 LIBS="$LTHREAD_LIBS $LIBS"
16159                 LTHREAD_LIBS=""
16160         fi
16161
16162 fi  
16163
16164 if test $ol_link_threads = no ; then
16165         if test $ol_with_threads = yes ; then
16166                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16167         fi
16168
16169         if test $ol_with_threads = auto ; then
16170                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16171                 ol_with_threads=no
16172         fi
16173
16174         cat >> confdefs.h <<\EOF
16175 #define NO_THREADS 1
16176 EOF
16177
16178         LTHREAD_LIBS=""
16179 fi
16180
16181 if test $ol_link_threads != no ; then
16182         cat >> confdefs.h <<\EOF
16183 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16184 EOF
16185
16186 fi
16187
16188 for ac_func in \
16189         ctime_r                 \
16190         gethostbyname_r gethostbyaddr_r \
16191
16192 do
16193 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16194 echo "configure:16195: checking for $ac_func" >&5
16195 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16196   echo $ac_n "(cached) $ac_c" 1>&6
16197 else
16198   cat > conftest.$ac_ext <<EOF
16199 #line 16200 "configure"
16200 #include "confdefs.h"
16201 /* System header to define __stub macros and hopefully few prototypes,
16202     which can conflict with char $ac_func(); below.  */
16203 #include <assert.h>
16204 /* Override any gcc2 internal prototype to avoid an error.  */
16205 /* We use char because int might match the return type of a gcc2
16206     builtin and then its argument prototype would still apply.  */
16207 char $ac_func();
16208 char (*f)();
16209
16210 int main() {
16211
16212 /* The GNU C library defines this for functions which it implements
16213     to always fail with ENOSYS.  Some functions are actually named
16214     something starting with __ and the normal name is an alias.  */
16215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16216 choke me
16217 #else
16218 f = $ac_func;
16219 #endif
16220
16221 ; return 0; }
16222 EOF
16223 if { (eval echo configure:16224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16224   rm -rf conftest*
16225   eval "ac_cv_func_$ac_func=yes"
16226 else
16227   echo "configure: failed program was:" >&5
16228   cat conftest.$ac_ext >&5
16229   rm -rf conftest*
16230   eval "ac_cv_func_$ac_func=no"
16231 fi
16232 rm -f conftest*
16233 fi
16234
16235 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16236   echo "$ac_t""yes" 1>&6
16237     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16238   cat >> confdefs.h <<EOF
16239 #define $ac_tr_func 1
16240 EOF
16241  
16242 else
16243   echo "$ac_t""no" 1>&6
16244 fi
16245 done
16246
16247
16248 if test "$ac_cv_func_ctime_r" = no ; then
16249         ol_cv_func_ctime_r_nargs=0
16250 else
16251         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16252 echo "configure:16253: checking number of arguments of ctime_r" >&5
16253 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16254   echo $ac_n "(cached) $ac_c" 1>&6
16255 else
16256   cat > conftest.$ac_ext <<EOF
16257 #line 16258 "configure"
16258 #include "confdefs.h"
16259 #include <time.h>
16260 int main() {
16261 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16262 ; return 0; }
16263 EOF
16264 if { (eval echo configure:16265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16265   rm -rf conftest*
16266   ol_cv_func_ctime_r_nargs3=yes
16267 else
16268   echo "configure: failed program was:" >&5
16269   cat conftest.$ac_ext >&5
16270   rm -rf conftest*
16271   ol_cv_func_ctime_r_nargs3=no
16272 fi
16273 rm -f conftest*
16274
16275         cat > conftest.$ac_ext <<EOF
16276 #line 16277 "configure"
16277 #include "confdefs.h"
16278 #include <time.h>
16279 int main() {
16280 time_t ti; char *buffer; ctime_r(&ti,buffer);
16281 ; return 0; }
16282 EOF
16283 if { (eval echo configure:16284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16284   rm -rf conftest*
16285   ol_cv_func_ctime_r_nargs2=yes
16286 else
16287   echo "configure: failed program was:" >&5
16288   cat conftest.$ac_ext >&5
16289   rm -rf conftest*
16290   ol_cv_func_ctime_r_nargs2=no
16291 fi
16292 rm -f conftest*
16293
16294         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16295                 $ol_cv_func_ctime_r_nargs2 = no ; then
16296
16297                 ol_cv_func_ctime_r_nargs=3
16298
16299         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16300                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16301
16302                 ol_cv_func_ctime_r_nargs=2
16303
16304         else
16305                 ol_cv_func_ctime_r_nargs=0
16306         fi
16307   
16308 fi
16309
16310 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16311
16312   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16313         cat >> confdefs.h <<EOF
16314 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16315 EOF
16316
16317   fi
16318
16319 fi
16320
16321 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16322         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16323 echo "configure:16324: checking number of arguments of gethostbyname_r" >&5
16324 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16325   echo $ac_n "(cached) $ac_c" 1>&6
16326 else
16327   cat > conftest.$ac_ext <<EOF
16328 #line 16329 "configure"
16329 #include "confdefs.h"
16330 #include <sys/types.h>
16331 #include <sys/socket.h>
16332 #include <netinet/in.h>
16333 #include <netdb.h>
16334 #define BUFSIZE (sizeof(struct hostent)+10)
16335 int main() {
16336 struct hostent hent; char buffer[BUFSIZE];
16337                 int bufsize=BUFSIZE;int h_errno;
16338                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16339                         buffer, bufsize, &h_errno);
16340 ; return 0; }
16341 EOF
16342 if { (eval echo configure:16343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16343   rm -rf conftest*
16344   ol_cv_func_gethostbyname_r_nargs5=yes
16345 else
16346   echo "configure: failed program was:" >&5
16347   cat conftest.$ac_ext >&5
16348   rm -rf conftest*
16349   ol_cv_func_gethostbyname_r_nargs5=no
16350 fi
16351 rm -f conftest*
16352
16353         cat > conftest.$ac_ext <<EOF
16354 #line 16355 "configure"
16355 #include "confdefs.h"
16356 #include <sys/types.h>
16357 #include <sys/socket.h>
16358 #include <netinet/in.h>
16359 #include <netdb.h>
16360 #define BUFSIZE (sizeof(struct hostent)+10)
16361 int main() {
16362 struct hostent hent;struct hostent *rhent;
16363                 char buffer[BUFSIZE];
16364                 int bufsize=BUFSIZE;int h_errno;
16365                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16366                         &rhent, &h_errno);
16367 ; return 0; }
16368 EOF
16369 if { (eval echo configure:16370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16370   rm -rf conftest*
16371   ol_cv_func_gethostbyname_r_nargs6=yes
16372 else
16373   echo "configure: failed program was:" >&5
16374   cat conftest.$ac_ext >&5
16375   rm -rf conftest*
16376   ol_cv_func_gethostbyname_r_nargs6=no
16377 fi
16378 rm -f conftest*
16379
16380         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16381                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16382
16383                 ol_cv_func_gethostbyname_r_nargs=5
16384
16385         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16386                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16387
16388                 ol_cv_func_gethostbyname_r_nargs=6
16389
16390         else
16391                 ol_cv_func_gethostbyname_r_nargs=0
16392         fi
16393   
16394 fi
16395
16396 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16397   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16398         cat >> confdefs.h <<EOF
16399 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16400 EOF
16401
16402   fi
16403
16404 else
16405         ol_cv_func_gethostbyname_r_nargs=0
16406 fi
16407  
16408 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16409         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16410 echo "configure:16411: checking number of arguments of gethostbyaddr_r" >&5
16411 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16412   echo $ac_n "(cached) $ac_c" 1>&6
16413 else
16414   cat > conftest.$ac_ext <<EOF
16415 #line 16416 "configure"
16416 #include "confdefs.h"
16417 #include <sys/types.h>
16418 #include <sys/socket.h>
16419 #include <netinet/in.h>
16420 #include <netdb.h>
16421 #define BUFSIZE (sizeof(struct hostent)+10)
16422 int main() {
16423 struct hostent hent; char buffer[BUFSIZE]; 
16424             struct in_addr add;
16425             size_t alen=sizeof(struct in_addr);
16426             int bufsize=BUFSIZE;int h_errno;
16427                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16428                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16429 ; return 0; }
16430 EOF
16431 if { (eval echo configure:16432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16432   rm -rf conftest*
16433   ol_cv_func_gethostbyaddr_r_nargs7=yes
16434 else
16435   echo "configure: failed program was:" >&5
16436   cat conftest.$ac_ext >&5
16437   rm -rf conftest*
16438   ol_cv_func_gethostbyaddr_r_nargs7=no
16439 fi
16440 rm -f conftest*
16441
16442         cat > conftest.$ac_ext <<EOF
16443 #line 16444 "configure"
16444 #include "confdefs.h"
16445 #include <sys/types.h>
16446 #include <sys/socket.h>
16447 #include <netinet/in.h>
16448 #include <netdb.h>
16449 #define BUFSIZE (sizeof(struct hostent)+10)
16450 int main() {
16451 struct hostent hent;
16452                 struct hostent *rhent; char buffer[BUFSIZE]; 
16453                 struct in_addr add;
16454                 size_t alen=sizeof(struct in_addr);
16455                 int bufsize=BUFSIZE;int h_errno;
16456                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16457                         alen, AF_INET, &hent, buffer, bufsize, 
16458                         &rhent, &h_errno);
16459 ; return 0; }
16460 EOF
16461 if { (eval echo configure:16462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16462   rm -rf conftest*
16463   ol_cv_func_gethostbyaddr_r_nargs8=yes
16464 else
16465   echo "configure: failed program was:" >&5
16466   cat conftest.$ac_ext >&5
16467   rm -rf conftest*
16468   ol_cv_func_gethostbyaddr_r_nargs8=no
16469 fi
16470 rm -f conftest*
16471
16472         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16473                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16474
16475                 ol_cv_func_gethostbyaddr_r_nargs=7
16476
16477         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16478                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16479
16480                 ol_cv_func_gethostbyaddr_r_nargs=8
16481
16482         else
16483                 ol_cv_func_gethostbyaddr_r_nargs=0
16484         fi
16485   
16486 fi
16487
16488 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16489   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16490     cat >> confdefs.h <<EOF
16491 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16492 EOF
16493
16494   fi
16495
16496 else
16497         ol_cv_func_gethostbyaddr_r_nargs=0
16498 fi
16499
16500 ol_link_ldbm=no 
16501
16502 if test $ol_with_ldbm_api = auto \
16503         -o $ol_with_ldbm_api = berkeley \
16504         -o $ol_with_ldbm_api = bcompat ; then
16505
16506         if test $ol_with_ldbm_api = bcompat; then \
16507                 for ac_hdr in db_185.h db.h
16508 do
16509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16511 echo "configure:16512: checking for $ac_hdr" >&5
16512 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   cat > conftest.$ac_ext <<EOF
16516 #line 16517 "configure"
16517 #include "confdefs.h"
16518 #include <$ac_hdr>
16519 EOF
16520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16521 { (eval echo configure:16522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16523 if test -z "$ac_err"; then
16524   rm -rf conftest*
16525   eval "ac_cv_header_$ac_safe=yes"
16526 else
16527   echo "$ac_err" >&5
16528   echo "configure: failed program was:" >&5
16529   cat conftest.$ac_ext >&5
16530   rm -rf conftest*
16531   eval "ac_cv_header_$ac_safe=no"
16532 fi
16533 rm -f conftest*
16534 fi
16535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16536   echo "$ac_t""yes" 1>&6
16537     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16538   cat >> confdefs.h <<EOF
16539 #define $ac_tr_hdr 1
16540 EOF
16541  
16542 else
16543   echo "$ac_t""no" 1>&6
16544 fi
16545 done
16546
16547 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16548         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16549 echo "configure:16550: checking if Berkeley DB header compatibility" >&5
16550 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16551   echo $ac_n "(cached) $ac_c" 1>&6
16552 else
16553   
16554                 cat > conftest.$ac_ext <<EOF
16555 #line 16556 "configure"
16556 #include "confdefs.h"
16557
16558 #if HAVE_DB_185_H
16559 #       include <db_185.h>
16560 #else
16561 #       include <db.h>
16562 #endif
16563
16564  /* this check could be improved */
16565 #ifndef DB_VERSION_MAJOR
16566 #       define DB_VERSION_MAJOR 1
16567 #endif
16568
16569 #if DB_VERSION_MAJOR == 1 
16570         __db_version_1
16571 #endif
16572
16573 EOF
16574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16575   egrep "__db_version_1" >/dev/null 2>&1; then
16576   rm -rf conftest*
16577   ol_cv_header_db1=yes
16578 else
16579   rm -rf conftest*
16580   ol_cv_header_db1=no
16581 fi
16582 rm -f conftest*
16583
16584 fi
16585
16586 echo "$ac_t""$ol_cv_header_db1" 1>&6
16587
16588         if test $ol_cv_header_db1 = yes ; then
16589                 ol_cv_lib_db=no
16590 if test $ol_cv_lib_db = no ; then
16591         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16592 echo "configure:16593: checking for Berkeley DB link (default)" >&5
16593 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16594   echo $ac_n "(cached) $ac_c" 1>&6
16595 else
16596   
16597         ol_DB_LIB=
16598         ol_LIBS=$LIBS
16599         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16600
16601         cat > conftest.$ac_ext <<EOF
16602 #line 16603 "configure"
16603 #include "confdefs.h"
16604
16605 #ifdef HAVE_DB_185_H
16606 # include <db_185.h>
16607 #else
16608 # include <db.h>
16609 #endif
16610
16611 #ifndef DB_VERSION_MAJOR
16612 # define DB_VERSION_MAJOR 1
16613 #endif
16614
16615 #ifndef NULL
16616 #define NULL ((void*)0)
16617 #endif
16618
16619 int main() {
16620
16621 #if DB_VERSION_MAJOR > 1
16622         {
16623                 char *version;
16624                 int major, minor, patch;
16625
16626                 version = db_version( &major, &minor, &patch );
16627
16628                 if( major != DB_VERSION_MAJOR ||
16629                         minor < DB_VERSION_MINOR )
16630                 {
16631                         printf("Berkeley DB version mismatch\n"
16632                                 "\texpected: %s\n\tgot: %s\n",
16633                                 DB_VERSION_STRING, version);
16634                         return 1;
16635                 }
16636         }
16637 #endif
16638
16639 #if DB_VERSION_MAJOR > 2
16640         db_env_create( NULL, 0 );
16641 #elif DB_VERSION_MAJOR > 1
16642         db_appexit( NULL );
16643 #else
16644         (void) dbopen( NULL, 0, 0, 0, NULL);
16645 #endif
16646
16647 ; return 0; }
16648 EOF
16649 if { (eval echo configure:16650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16650   rm -rf conftest*
16651   ol_cv_db_none=yes
16652 else
16653   echo "configure: failed program was:" >&5
16654   cat conftest.$ac_ext >&5
16655   rm -rf conftest*
16656   ol_cv_db_none=no
16657 fi
16658 rm -f conftest*
16659
16660         LIBS="$ol_LIBS"
16661
16662 fi
16663
16664 echo "$ac_t""$ol_cv_db_none" 1>&6
16665
16666         if test $ol_cv_db_none = yes ; then
16667                 ol_cv_lib_db=yes
16668         fi
16669 fi
16670
16671 if test $ol_cv_lib_db = no ; then
16672         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16673 echo "configure:16674: checking for Berkeley DB link (-ldb42)" >&5
16674 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16675   echo $ac_n "(cached) $ac_c" 1>&6
16676 else
16677   
16678         ol_DB_LIB=-ldb42
16679         ol_LIBS=$LIBS
16680         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16681
16682         cat > conftest.$ac_ext <<EOF
16683 #line 16684 "configure"
16684 #include "confdefs.h"
16685
16686 #ifdef HAVE_DB_185_H
16687 # include <db_185.h>
16688 #else
16689 # include <db.h>
16690 #endif
16691
16692 #ifndef DB_VERSION_MAJOR
16693 # define DB_VERSION_MAJOR 1
16694 #endif
16695
16696 #ifndef NULL
16697 #define NULL ((void*)0)
16698 #endif
16699
16700 int main() {
16701
16702 #if DB_VERSION_MAJOR > 1
16703         {
16704                 char *version;
16705                 int major, minor, patch;
16706
16707                 version = db_version( &major, &minor, &patch );
16708
16709                 if( major != DB_VERSION_MAJOR ||
16710                         minor < DB_VERSION_MINOR )
16711                 {
16712                         printf("Berkeley DB version mismatch\n"
16713                                 "\texpected: %s\n\tgot: %s\n",
16714                                 DB_VERSION_STRING, version);
16715                         return 1;
16716                 }
16717         }
16718 #endif
16719
16720 #if DB_VERSION_MAJOR > 2
16721         db_env_create( NULL, 0 );
16722 #elif DB_VERSION_MAJOR > 1
16723         db_appexit( NULL );
16724 #else
16725         (void) dbopen( NULL, 0, 0, 0, NULL);
16726 #endif
16727
16728 ; return 0; }
16729 EOF
16730 if { (eval echo configure:16731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16731   rm -rf conftest*
16732   ol_cv_db_db42=yes
16733 else
16734   echo "configure: failed program was:" >&5
16735   cat conftest.$ac_ext >&5
16736   rm -rf conftest*
16737   ol_cv_db_db42=no
16738 fi
16739 rm -f conftest*
16740
16741         LIBS="$ol_LIBS"
16742
16743 fi
16744
16745 echo "$ac_t""$ol_cv_db_db42" 1>&6
16746
16747         if test $ol_cv_db_db42 = yes ; then
16748                 ol_cv_lib_db=-ldb42
16749         fi
16750 fi
16751
16752 if test $ol_cv_lib_db = no ; then
16753         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16754 echo "configure:16755: checking for Berkeley DB link (-ldb-42)" >&5
16755 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16756   echo $ac_n "(cached) $ac_c" 1>&6
16757 else
16758   
16759         ol_DB_LIB=-ldb-42
16760         ol_LIBS=$LIBS
16761         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16762
16763         cat > conftest.$ac_ext <<EOF
16764 #line 16765 "configure"
16765 #include "confdefs.h"
16766
16767 #ifdef HAVE_DB_185_H
16768 # include <db_185.h>
16769 #else
16770 # include <db.h>
16771 #endif
16772
16773 #ifndef DB_VERSION_MAJOR
16774 # define DB_VERSION_MAJOR 1
16775 #endif
16776
16777 #ifndef NULL
16778 #define NULL ((void*)0)
16779 #endif
16780
16781 int main() {
16782
16783 #if DB_VERSION_MAJOR > 1
16784         {
16785                 char *version;
16786                 int major, minor, patch;
16787
16788                 version = db_version( &major, &minor, &patch );
16789
16790                 if( major != DB_VERSION_MAJOR ||
16791                         minor < DB_VERSION_MINOR )
16792                 {
16793                         printf("Berkeley DB version mismatch\n"
16794                                 "\texpected: %s\n\tgot: %s\n",
16795                                 DB_VERSION_STRING, version);
16796                         return 1;
16797                 }
16798         }
16799 #endif
16800
16801 #if DB_VERSION_MAJOR > 2
16802         db_env_create( NULL, 0 );
16803 #elif DB_VERSION_MAJOR > 1
16804         db_appexit( NULL );
16805 #else
16806         (void) dbopen( NULL, 0, 0, 0, NULL);
16807 #endif
16808
16809 ; return 0; }
16810 EOF
16811 if { (eval echo configure:16812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16812   rm -rf conftest*
16813   ol_cv_db_db_42=yes
16814 else
16815   echo "configure: failed program was:" >&5
16816   cat conftest.$ac_ext >&5
16817   rm -rf conftest*
16818   ol_cv_db_db_42=no
16819 fi
16820 rm -f conftest*
16821
16822         LIBS="$ol_LIBS"
16823
16824 fi
16825
16826 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16827
16828         if test $ol_cv_db_db_42 = yes ; then
16829                 ol_cv_lib_db=-ldb-42
16830         fi
16831 fi
16832
16833 if test $ol_cv_lib_db = no ; then
16834         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16835 echo "configure:16836: checking for Berkeley DB link (-ldb-4.2)" >&5
16836 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16837   echo $ac_n "(cached) $ac_c" 1>&6
16838 else
16839   
16840         ol_DB_LIB=-ldb-4.2
16841         ol_LIBS=$LIBS
16842         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16843
16844         cat > conftest.$ac_ext <<EOF
16845 #line 16846 "configure"
16846 #include "confdefs.h"
16847
16848 #ifdef HAVE_DB_185_H
16849 # include <db_185.h>
16850 #else
16851 # include <db.h>
16852 #endif
16853
16854 #ifndef DB_VERSION_MAJOR
16855 # define DB_VERSION_MAJOR 1
16856 #endif
16857
16858 #ifndef NULL
16859 #define NULL ((void*)0)
16860 #endif
16861
16862 int main() {
16863
16864 #if DB_VERSION_MAJOR > 1
16865         {
16866                 char *version;
16867                 int major, minor, patch;
16868
16869                 version = db_version( &major, &minor, &patch );
16870
16871                 if( major != DB_VERSION_MAJOR ||
16872                         minor < DB_VERSION_MINOR )
16873                 {
16874                         printf("Berkeley DB version mismatch\n"
16875                                 "\texpected: %s\n\tgot: %s\n",
16876                                 DB_VERSION_STRING, version);
16877                         return 1;
16878                 }
16879         }
16880 #endif
16881
16882 #if DB_VERSION_MAJOR > 2
16883         db_env_create( NULL, 0 );
16884 #elif DB_VERSION_MAJOR > 1
16885         db_appexit( NULL );
16886 #else
16887         (void) dbopen( NULL, 0, 0, 0, NULL);
16888 #endif
16889
16890 ; return 0; }
16891 EOF
16892 if { (eval echo configure:16893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16893   rm -rf conftest*
16894   ol_cv_db_db_4_dot_2=yes
16895 else
16896   echo "configure: failed program was:" >&5
16897   cat conftest.$ac_ext >&5
16898   rm -rf conftest*
16899   ol_cv_db_db_4_dot_2=no
16900 fi
16901 rm -f conftest*
16902
16903         LIBS="$ol_LIBS"
16904
16905 fi
16906
16907 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16908
16909         if test $ol_cv_db_db_4_dot_2 = yes ; then
16910                 ol_cv_lib_db=-ldb-4.2
16911         fi
16912 fi
16913
16914 if test $ol_cv_lib_db = no ; then
16915         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16916 echo "configure:16917: checking for Berkeley DB link (-ldb-4-2)" >&5
16917 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16918   echo $ac_n "(cached) $ac_c" 1>&6
16919 else
16920   
16921         ol_DB_LIB=-ldb-4-2
16922         ol_LIBS=$LIBS
16923         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16924
16925         cat > conftest.$ac_ext <<EOF
16926 #line 16927 "configure"
16927 #include "confdefs.h"
16928
16929 #ifdef HAVE_DB_185_H
16930 # include <db_185.h>
16931 #else
16932 # include <db.h>
16933 #endif
16934
16935 #ifndef DB_VERSION_MAJOR
16936 # define DB_VERSION_MAJOR 1
16937 #endif
16938
16939 #ifndef NULL
16940 #define NULL ((void*)0)
16941 #endif
16942
16943 int main() {
16944
16945 #if DB_VERSION_MAJOR > 1
16946         {
16947                 char *version;
16948                 int major, minor, patch;
16949
16950                 version = db_version( &major, &minor, &patch );
16951
16952                 if( major != DB_VERSION_MAJOR ||
16953                         minor < DB_VERSION_MINOR )
16954                 {
16955                         printf("Berkeley DB version mismatch\n"
16956                                 "\texpected: %s\n\tgot: %s\n",
16957                                 DB_VERSION_STRING, version);
16958                         return 1;
16959                 }
16960         }
16961 #endif
16962
16963 #if DB_VERSION_MAJOR > 2
16964         db_env_create( NULL, 0 );
16965 #elif DB_VERSION_MAJOR > 1
16966         db_appexit( NULL );
16967 #else
16968         (void) dbopen( NULL, 0, 0, 0, NULL);
16969 #endif
16970
16971 ; return 0; }
16972 EOF
16973 if { (eval echo configure:16974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16974   rm -rf conftest*
16975   ol_cv_db_db_4_2=yes
16976 else
16977   echo "configure: failed program was:" >&5
16978   cat conftest.$ac_ext >&5
16979   rm -rf conftest*
16980   ol_cv_db_db_4_2=no
16981 fi
16982 rm -f conftest*
16983
16984         LIBS="$ol_LIBS"
16985
16986 fi
16987
16988 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16989
16990         if test $ol_cv_db_db_4_2 = yes ; then
16991                 ol_cv_lib_db=-ldb-4-2
16992         fi
16993 fi
16994
16995 if test $ol_cv_lib_db = no ; then
16996         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16997 echo "configure:16998: checking for Berkeley DB link (-ldb41)" >&5
16998 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16999   echo $ac_n "(cached) $ac_c" 1>&6
17000 else
17001   
17002         ol_DB_LIB=-ldb41
17003         ol_LIBS=$LIBS
17004         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17005
17006         cat > conftest.$ac_ext <<EOF
17007 #line 17008 "configure"
17008 #include "confdefs.h"
17009
17010 #ifdef HAVE_DB_185_H
17011 # include <db_185.h>
17012 #else
17013 # include <db.h>
17014 #endif
17015
17016 #ifndef DB_VERSION_MAJOR
17017 # define DB_VERSION_MAJOR 1
17018 #endif
17019
17020 #ifndef NULL
17021 #define NULL ((void*)0)
17022 #endif
17023
17024 int main() {
17025
17026 #if DB_VERSION_MAJOR > 1
17027         {
17028                 char *version;
17029                 int major, minor, patch;
17030
17031                 version = db_version( &major, &minor, &patch );
17032
17033                 if( major != DB_VERSION_MAJOR ||
17034                         minor < DB_VERSION_MINOR )
17035                 {
17036                         printf("Berkeley DB version mismatch\n"
17037                                 "\texpected: %s\n\tgot: %s\n",
17038                                 DB_VERSION_STRING, version);
17039                         return 1;
17040                 }
17041         }
17042 #endif
17043
17044 #if DB_VERSION_MAJOR > 2
17045         db_env_create( NULL, 0 );
17046 #elif DB_VERSION_MAJOR > 1
17047         db_appexit( NULL );
17048 #else
17049         (void) dbopen( NULL, 0, 0, 0, NULL);
17050 #endif
17051
17052 ; return 0; }
17053 EOF
17054 if { (eval echo configure:17055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17055   rm -rf conftest*
17056   ol_cv_db_db41=yes
17057 else
17058   echo "configure: failed program was:" >&5
17059   cat conftest.$ac_ext >&5
17060   rm -rf conftest*
17061   ol_cv_db_db41=no
17062 fi
17063 rm -f conftest*
17064
17065         LIBS="$ol_LIBS"
17066
17067 fi
17068
17069 echo "$ac_t""$ol_cv_db_db41" 1>&6
17070
17071         if test $ol_cv_db_db41 = yes ; then
17072                 ol_cv_lib_db=-ldb41
17073         fi
17074 fi
17075
17076 if test $ol_cv_lib_db = no ; then
17077         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17078 echo "configure:17079: checking for Berkeley DB link (-ldb-41)" >&5
17079 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17080   echo $ac_n "(cached) $ac_c" 1>&6
17081 else
17082   
17083         ol_DB_LIB=-ldb-41
17084         ol_LIBS=$LIBS
17085         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17086
17087         cat > conftest.$ac_ext <<EOF
17088 #line 17089 "configure"
17089 #include "confdefs.h"
17090
17091 #ifdef HAVE_DB_185_H
17092 # include <db_185.h>
17093 #else
17094 # include <db.h>
17095 #endif
17096
17097 #ifndef DB_VERSION_MAJOR
17098 # define DB_VERSION_MAJOR 1
17099 #endif
17100
17101 #ifndef NULL
17102 #define NULL ((void*)0)
17103 #endif
17104
17105 int main() {
17106
17107 #if DB_VERSION_MAJOR > 1
17108         {
17109                 char *version;
17110                 int major, minor, patch;
17111
17112                 version = db_version( &major, &minor, &patch );
17113
17114                 if( major != DB_VERSION_MAJOR ||
17115                         minor < DB_VERSION_MINOR )
17116                 {
17117                         printf("Berkeley DB version mismatch\n"
17118                                 "\texpected: %s\n\tgot: %s\n",
17119                                 DB_VERSION_STRING, version);
17120                         return 1;
17121                 }
17122         }
17123 #endif
17124
17125 #if DB_VERSION_MAJOR > 2
17126         db_env_create( NULL, 0 );
17127 #elif DB_VERSION_MAJOR > 1
17128         db_appexit( NULL );
17129 #else
17130         (void) dbopen( NULL, 0, 0, 0, NULL);
17131 #endif
17132
17133 ; return 0; }
17134 EOF
17135 if { (eval echo configure:17136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17136   rm -rf conftest*
17137   ol_cv_db_db_41=yes
17138 else
17139   echo "configure: failed program was:" >&5
17140   cat conftest.$ac_ext >&5
17141   rm -rf conftest*
17142   ol_cv_db_db_41=no
17143 fi
17144 rm -f conftest*
17145
17146         LIBS="$ol_LIBS"
17147
17148 fi
17149
17150 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17151
17152         if test $ol_cv_db_db_41 = yes ; then
17153                 ol_cv_lib_db=-ldb-41
17154         fi
17155 fi
17156
17157 if test $ol_cv_lib_db = no ; then
17158         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17159 echo "configure:17160: checking for Berkeley DB link (-ldb-4.1)" >&5
17160 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17161   echo $ac_n "(cached) $ac_c" 1>&6
17162 else
17163   
17164         ol_DB_LIB=-ldb-4.1
17165         ol_LIBS=$LIBS
17166         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17167
17168         cat > conftest.$ac_ext <<EOF
17169 #line 17170 "configure"
17170 #include "confdefs.h"
17171
17172 #ifdef HAVE_DB_185_H
17173 # include <db_185.h>
17174 #else
17175 # include <db.h>
17176 #endif
17177
17178 #ifndef DB_VERSION_MAJOR
17179 # define DB_VERSION_MAJOR 1
17180 #endif
17181
17182 #ifndef NULL
17183 #define NULL ((void*)0)
17184 #endif
17185
17186 int main() {
17187
17188 #if DB_VERSION_MAJOR > 1
17189         {
17190                 char *version;
17191                 int major, minor, patch;
17192
17193                 version = db_version( &major, &minor, &patch );
17194
17195                 if( major != DB_VERSION_MAJOR ||
17196                         minor < DB_VERSION_MINOR )
17197                 {
17198                         printf("Berkeley DB version mismatch\n"
17199                                 "\texpected: %s\n\tgot: %s\n",
17200                                 DB_VERSION_STRING, version);
17201                         return 1;
17202                 }
17203         }
17204 #endif
17205
17206 #if DB_VERSION_MAJOR > 2
17207         db_env_create( NULL, 0 );
17208 #elif DB_VERSION_MAJOR > 1
17209         db_appexit( NULL );
17210 #else
17211         (void) dbopen( NULL, 0, 0, 0, NULL);
17212 #endif
17213
17214 ; return 0; }
17215 EOF
17216 if { (eval echo configure:17217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17217   rm -rf conftest*
17218   ol_cv_db_db_4_dot_1=yes
17219 else
17220   echo "configure: failed program was:" >&5
17221   cat conftest.$ac_ext >&5
17222   rm -rf conftest*
17223   ol_cv_db_db_4_dot_1=no
17224 fi
17225 rm -f conftest*
17226
17227         LIBS="$ol_LIBS"
17228
17229 fi
17230
17231 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17232
17233         if test $ol_cv_db_db_4_dot_1 = yes ; then
17234                 ol_cv_lib_db=-ldb-4.1
17235         fi
17236 fi
17237
17238 if test $ol_cv_lib_db = no ; then
17239         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17240 echo "configure:17241: checking for Berkeley DB link (-ldb-4-1)" >&5
17241 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17242   echo $ac_n "(cached) $ac_c" 1>&6
17243 else
17244   
17245         ol_DB_LIB=-ldb-4-1
17246         ol_LIBS=$LIBS
17247         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17248
17249         cat > conftest.$ac_ext <<EOF
17250 #line 17251 "configure"
17251 #include "confdefs.h"
17252
17253 #ifdef HAVE_DB_185_H
17254 # include <db_185.h>
17255 #else
17256 # include <db.h>
17257 #endif
17258
17259 #ifndef DB_VERSION_MAJOR
17260 # define DB_VERSION_MAJOR 1
17261 #endif
17262
17263 #ifndef NULL
17264 #define NULL ((void*)0)
17265 #endif
17266
17267 int main() {
17268
17269 #if DB_VERSION_MAJOR > 1
17270         {
17271                 char *version;
17272                 int major, minor, patch;
17273
17274                 version = db_version( &major, &minor, &patch );
17275
17276                 if( major != DB_VERSION_MAJOR ||
17277                         minor < DB_VERSION_MINOR )
17278                 {
17279                         printf("Berkeley DB version mismatch\n"
17280                                 "\texpected: %s\n\tgot: %s\n",
17281                                 DB_VERSION_STRING, version);
17282                         return 1;
17283                 }
17284         }
17285 #endif
17286
17287 #if DB_VERSION_MAJOR > 2
17288         db_env_create( NULL, 0 );
17289 #elif DB_VERSION_MAJOR > 1
17290         db_appexit( NULL );
17291 #else
17292         (void) dbopen( NULL, 0, 0, 0, NULL);
17293 #endif
17294
17295 ; return 0; }
17296 EOF
17297 if { (eval echo configure:17298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17298   rm -rf conftest*
17299   ol_cv_db_db_4_1=yes
17300 else
17301   echo "configure: failed program was:" >&5
17302   cat conftest.$ac_ext >&5
17303   rm -rf conftest*
17304   ol_cv_db_db_4_1=no
17305 fi
17306 rm -f conftest*
17307
17308         LIBS="$ol_LIBS"
17309
17310 fi
17311
17312 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17313
17314         if test $ol_cv_db_db_4_1 = yes ; then
17315                 ol_cv_lib_db=-ldb-4-1
17316         fi
17317 fi
17318
17319 if test $ol_cv_lib_db = no ; then
17320         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17321 echo "configure:17322: checking for Berkeley DB link (-ldb-4)" >&5
17322 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17323   echo $ac_n "(cached) $ac_c" 1>&6
17324 else
17325   
17326         ol_DB_LIB=-ldb-4
17327         ol_LIBS=$LIBS
17328         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17329
17330         cat > conftest.$ac_ext <<EOF
17331 #line 17332 "configure"
17332 #include "confdefs.h"
17333
17334 #ifdef HAVE_DB_185_H
17335 # include <db_185.h>
17336 #else
17337 # include <db.h>
17338 #endif
17339
17340 #ifndef DB_VERSION_MAJOR
17341 # define DB_VERSION_MAJOR 1
17342 #endif
17343
17344 #ifndef NULL
17345 #define NULL ((void*)0)
17346 #endif
17347
17348 int main() {
17349
17350 #if DB_VERSION_MAJOR > 1
17351         {
17352                 char *version;
17353                 int major, minor, patch;
17354
17355                 version = db_version( &major, &minor, &patch );
17356
17357                 if( major != DB_VERSION_MAJOR ||
17358                         minor < DB_VERSION_MINOR )
17359                 {
17360                         printf("Berkeley DB version mismatch\n"
17361                                 "\texpected: %s\n\tgot: %s\n",
17362                                 DB_VERSION_STRING, version);
17363                         return 1;
17364                 }
17365         }
17366 #endif
17367
17368 #if DB_VERSION_MAJOR > 2
17369         db_env_create( NULL, 0 );
17370 #elif DB_VERSION_MAJOR > 1
17371         db_appexit( NULL );
17372 #else
17373         (void) dbopen( NULL, 0, 0, 0, NULL);
17374 #endif
17375
17376 ; return 0; }
17377 EOF
17378 if { (eval echo configure:17379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17379   rm -rf conftest*
17380   ol_cv_db_db_4=yes
17381 else
17382   echo "configure: failed program was:" >&5
17383   cat conftest.$ac_ext >&5
17384   rm -rf conftest*
17385   ol_cv_db_db_4=no
17386 fi
17387 rm -f conftest*
17388
17389         LIBS="$ol_LIBS"
17390
17391 fi
17392
17393 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17394
17395         if test $ol_cv_db_db_4 = yes ; then
17396                 ol_cv_lib_db=-ldb-4
17397         fi
17398 fi
17399
17400 if test $ol_cv_lib_db = no ; then
17401         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17402 echo "configure:17403: checking for Berkeley DB link (-ldb4)" >&5
17403 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17404   echo $ac_n "(cached) $ac_c" 1>&6
17405 else
17406   
17407         ol_DB_LIB=-ldb4
17408         ol_LIBS=$LIBS
17409         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17410
17411         cat > conftest.$ac_ext <<EOF
17412 #line 17413 "configure"
17413 #include "confdefs.h"
17414
17415 #ifdef HAVE_DB_185_H
17416 # include <db_185.h>
17417 #else
17418 # include <db.h>
17419 #endif
17420
17421 #ifndef DB_VERSION_MAJOR
17422 # define DB_VERSION_MAJOR 1
17423 #endif
17424
17425 #ifndef NULL
17426 #define NULL ((void*)0)
17427 #endif
17428
17429 int main() {
17430
17431 #if DB_VERSION_MAJOR > 1
17432         {
17433                 char *version;
17434                 int major, minor, patch;
17435
17436                 version = db_version( &major, &minor, &patch );
17437
17438                 if( major != DB_VERSION_MAJOR ||
17439                         minor < DB_VERSION_MINOR )
17440                 {
17441                         printf("Berkeley DB version mismatch\n"
17442                                 "\texpected: %s\n\tgot: %s\n",
17443                                 DB_VERSION_STRING, version);
17444                         return 1;
17445                 }
17446         }
17447 #endif
17448
17449 #if DB_VERSION_MAJOR > 2
17450         db_env_create( NULL, 0 );
17451 #elif DB_VERSION_MAJOR > 1
17452         db_appexit( NULL );
17453 #else
17454         (void) dbopen( NULL, 0, 0, 0, NULL);
17455 #endif
17456
17457 ; return 0; }
17458 EOF
17459 if { (eval echo configure:17460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17460   rm -rf conftest*
17461   ol_cv_db_db4=yes
17462 else
17463   echo "configure: failed program was:" >&5
17464   cat conftest.$ac_ext >&5
17465   rm -rf conftest*
17466   ol_cv_db_db4=no
17467 fi
17468 rm -f conftest*
17469
17470         LIBS="$ol_LIBS"
17471
17472 fi
17473
17474 echo "$ac_t""$ol_cv_db_db4" 1>&6
17475
17476         if test $ol_cv_db_db4 = yes ; then
17477                 ol_cv_lib_db=-ldb4
17478         fi
17479 fi
17480
17481 if test $ol_cv_lib_db = no ; then
17482         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17483 echo "configure:17484: checking for Berkeley DB link (-ldb)" >&5
17484 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17485   echo $ac_n "(cached) $ac_c" 1>&6
17486 else
17487   
17488         ol_DB_LIB=-ldb
17489         ol_LIBS=$LIBS
17490         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17491
17492         cat > conftest.$ac_ext <<EOF
17493 #line 17494 "configure"
17494 #include "confdefs.h"
17495
17496 #ifdef HAVE_DB_185_H
17497 # include <db_185.h>
17498 #else
17499 # include <db.h>
17500 #endif
17501
17502 #ifndef DB_VERSION_MAJOR
17503 # define DB_VERSION_MAJOR 1
17504 #endif
17505
17506 #ifndef NULL
17507 #define NULL ((void*)0)
17508 #endif
17509
17510 int main() {
17511
17512 #if DB_VERSION_MAJOR > 1
17513         {
17514                 char *version;
17515                 int major, minor, patch;
17516
17517                 version = db_version( &major, &minor, &patch );
17518
17519                 if( major != DB_VERSION_MAJOR ||
17520                         minor < DB_VERSION_MINOR )
17521                 {
17522                         printf("Berkeley DB version mismatch\n"
17523                                 "\texpected: %s\n\tgot: %s\n",
17524                                 DB_VERSION_STRING, version);
17525                         return 1;
17526                 }
17527         }
17528 #endif
17529
17530 #if DB_VERSION_MAJOR > 2
17531         db_env_create( NULL, 0 );
17532 #elif DB_VERSION_MAJOR > 1
17533         db_appexit( NULL );
17534 #else
17535         (void) dbopen( NULL, 0, 0, 0, NULL);
17536 #endif
17537
17538 ; return 0; }
17539 EOF
17540 if { (eval echo configure:17541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17541   rm -rf conftest*
17542   ol_cv_db_db=yes
17543 else
17544   echo "configure: failed program was:" >&5
17545   cat conftest.$ac_ext >&5
17546   rm -rf conftest*
17547   ol_cv_db_db=no
17548 fi
17549 rm -f conftest*
17550
17551         LIBS="$ol_LIBS"
17552
17553 fi
17554
17555 echo "$ac_t""$ol_cv_db_db" 1>&6
17556
17557         if test $ol_cv_db_db = yes ; then
17558                 ol_cv_lib_db=-ldb
17559         fi
17560 fi
17561
17562 if test $ol_cv_lib_db = no ; then
17563         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17564 echo "configure:17565: checking for Berkeley DB link (-ldb3)" >&5
17565 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17566   echo $ac_n "(cached) $ac_c" 1>&6
17567 else
17568   
17569         ol_DB_LIB=-ldb3
17570         ol_LIBS=$LIBS
17571         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17572
17573         cat > conftest.$ac_ext <<EOF
17574 #line 17575 "configure"
17575 #include "confdefs.h"
17576
17577 #ifdef HAVE_DB_185_H
17578 # include <db_185.h>
17579 #else
17580 # include <db.h>
17581 #endif
17582
17583 #ifndef DB_VERSION_MAJOR
17584 # define DB_VERSION_MAJOR 1
17585 #endif
17586
17587 #ifndef NULL
17588 #define NULL ((void*)0)
17589 #endif
17590
17591 int main() {
17592
17593 #if DB_VERSION_MAJOR > 1
17594         {
17595                 char *version;
17596                 int major, minor, patch;
17597
17598                 version = db_version( &major, &minor, &patch );
17599
17600                 if( major != DB_VERSION_MAJOR ||
17601                         minor < DB_VERSION_MINOR )
17602                 {
17603                         printf("Berkeley DB version mismatch\n"
17604                                 "\texpected: %s\n\tgot: %s\n",
17605                                 DB_VERSION_STRING, version);
17606                         return 1;
17607                 }
17608         }
17609 #endif
17610
17611 #if DB_VERSION_MAJOR > 2
17612         db_env_create( NULL, 0 );
17613 #elif DB_VERSION_MAJOR > 1
17614         db_appexit( NULL );
17615 #else
17616         (void) dbopen( NULL, 0, 0, 0, NULL);
17617 #endif
17618
17619 ; return 0; }
17620 EOF
17621 if { (eval echo configure:17622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17622   rm -rf conftest*
17623   ol_cv_db_db3=yes
17624 else
17625   echo "configure: failed program was:" >&5
17626   cat conftest.$ac_ext >&5
17627   rm -rf conftest*
17628   ol_cv_db_db3=no
17629 fi
17630 rm -f conftest*
17631
17632         LIBS="$ol_LIBS"
17633
17634 fi
17635
17636 echo "$ac_t""$ol_cv_db_db3" 1>&6
17637
17638         if test $ol_cv_db_db3 = yes ; then
17639                 ol_cv_lib_db=-ldb3
17640         fi
17641 fi
17642
17643 if test $ol_cv_lib_db = no ; then
17644         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17645 echo "configure:17646: checking for Berkeley DB link (-ldb-3)" >&5
17646 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17647   echo $ac_n "(cached) $ac_c" 1>&6
17648 else
17649   
17650         ol_DB_LIB=-ldb-3
17651         ol_LIBS=$LIBS
17652         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17653
17654         cat > conftest.$ac_ext <<EOF
17655 #line 17656 "configure"
17656 #include "confdefs.h"
17657
17658 #ifdef HAVE_DB_185_H
17659 # include <db_185.h>
17660 #else
17661 # include <db.h>
17662 #endif
17663
17664 #ifndef DB_VERSION_MAJOR
17665 # define DB_VERSION_MAJOR 1
17666 #endif
17667
17668 #ifndef NULL
17669 #define NULL ((void*)0)
17670 #endif
17671
17672 int main() {
17673
17674 #if DB_VERSION_MAJOR > 1
17675         {
17676                 char *version;
17677                 int major, minor, patch;
17678
17679                 version = db_version( &major, &minor, &patch );
17680
17681                 if( major != DB_VERSION_MAJOR ||
17682                         minor < DB_VERSION_MINOR )
17683                 {
17684                         printf("Berkeley DB version mismatch\n"
17685                                 "\texpected: %s\n\tgot: %s\n",
17686                                 DB_VERSION_STRING, version);
17687                         return 1;
17688                 }
17689         }
17690 #endif
17691
17692 #if DB_VERSION_MAJOR > 2
17693         db_env_create( NULL, 0 );
17694 #elif DB_VERSION_MAJOR > 1
17695         db_appexit( NULL );
17696 #else
17697         (void) dbopen( NULL, 0, 0, 0, NULL);
17698 #endif
17699
17700 ; return 0; }
17701 EOF
17702 if { (eval echo configure:17703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17703   rm -rf conftest*
17704   ol_cv_db_db_3=yes
17705 else
17706   echo "configure: failed program was:" >&5
17707   cat conftest.$ac_ext >&5
17708   rm -rf conftest*
17709   ol_cv_db_db_3=no
17710 fi
17711 rm -f conftest*
17712
17713         LIBS="$ol_LIBS"
17714
17715 fi
17716
17717 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17718
17719         if test $ol_cv_db_db_3 = yes ; then
17720                 ol_cv_lib_db=-ldb-3
17721         fi
17722 fi
17723
17724 if test $ol_cv_lib_db = no ; then
17725         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17726 echo "configure:17727: checking for Berkeley DB link (-ldb2)" >&5
17727 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17728   echo $ac_n "(cached) $ac_c" 1>&6
17729 else
17730   
17731         ol_DB_LIB=-ldb2
17732         ol_LIBS=$LIBS
17733         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17734
17735         cat > conftest.$ac_ext <<EOF
17736 #line 17737 "configure"
17737 #include "confdefs.h"
17738
17739 #ifdef HAVE_DB_185_H
17740 # include <db_185.h>
17741 #else
17742 # include <db.h>
17743 #endif
17744
17745 #ifndef DB_VERSION_MAJOR
17746 # define DB_VERSION_MAJOR 1
17747 #endif
17748
17749 #ifndef NULL
17750 #define NULL ((void*)0)
17751 #endif
17752
17753 int main() {
17754
17755 #if DB_VERSION_MAJOR > 1
17756         {
17757                 char *version;
17758                 int major, minor, patch;
17759
17760                 version = db_version( &major, &minor, &patch );
17761
17762                 if( major != DB_VERSION_MAJOR ||
17763                         minor < DB_VERSION_MINOR )
17764                 {
17765                         printf("Berkeley DB version mismatch\n"
17766                                 "\texpected: %s\n\tgot: %s\n",
17767                                 DB_VERSION_STRING, version);
17768                         return 1;
17769                 }
17770         }
17771 #endif
17772
17773 #if DB_VERSION_MAJOR > 2
17774         db_env_create( NULL, 0 );
17775 #elif DB_VERSION_MAJOR > 1
17776         db_appexit( NULL );
17777 #else
17778         (void) dbopen( NULL, 0, 0, 0, NULL);
17779 #endif
17780
17781 ; return 0; }
17782 EOF
17783 if { (eval echo configure:17784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17784   rm -rf conftest*
17785   ol_cv_db_db2=yes
17786 else
17787   echo "configure: failed program was:" >&5
17788   cat conftest.$ac_ext >&5
17789   rm -rf conftest*
17790   ol_cv_db_db2=no
17791 fi
17792 rm -f conftest*
17793
17794         LIBS="$ol_LIBS"
17795
17796 fi
17797
17798 echo "$ac_t""$ol_cv_db_db2" 1>&6
17799
17800         if test $ol_cv_db_db2 = yes ; then
17801                 ol_cv_lib_db=-ldb2
17802         fi
17803 fi
17804
17805 if test $ol_cv_lib_db = no ; then
17806         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17807 echo "configure:17808: checking for Berkeley DB link (-ldb-2)" >&5
17808 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17809   echo $ac_n "(cached) $ac_c" 1>&6
17810 else
17811   
17812         ol_DB_LIB=-ldb-2
17813         ol_LIBS=$LIBS
17814         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17815
17816         cat > conftest.$ac_ext <<EOF
17817 #line 17818 "configure"
17818 #include "confdefs.h"
17819
17820 #ifdef HAVE_DB_185_H
17821 # include <db_185.h>
17822 #else
17823 # include <db.h>
17824 #endif
17825
17826 #ifndef DB_VERSION_MAJOR
17827 # define DB_VERSION_MAJOR 1
17828 #endif
17829
17830 #ifndef NULL
17831 #define NULL ((void*)0)
17832 #endif
17833
17834 int main() {
17835
17836 #if DB_VERSION_MAJOR > 1
17837         {
17838                 char *version;
17839                 int major, minor, patch;
17840
17841                 version = db_version( &major, &minor, &patch );
17842
17843                 if( major != DB_VERSION_MAJOR ||
17844                         minor < DB_VERSION_MINOR )
17845                 {
17846                         printf("Berkeley DB version mismatch\n"
17847                                 "\texpected: %s\n\tgot: %s\n",
17848                                 DB_VERSION_STRING, version);
17849                         return 1;
17850                 }
17851         }
17852 #endif
17853
17854 #if DB_VERSION_MAJOR > 2
17855         db_env_create( NULL, 0 );
17856 #elif DB_VERSION_MAJOR > 1
17857         db_appexit( NULL );
17858 #else
17859         (void) dbopen( NULL, 0, 0, 0, NULL);
17860 #endif
17861
17862 ; return 0; }
17863 EOF
17864 if { (eval echo configure:17865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17865   rm -rf conftest*
17866   ol_cv_db_db_2=yes
17867 else
17868   echo "configure: failed program was:" >&5
17869   cat conftest.$ac_ext >&5
17870   rm -rf conftest*
17871   ol_cv_db_db_2=no
17872 fi
17873 rm -f conftest*
17874
17875         LIBS="$ol_LIBS"
17876
17877 fi
17878
17879 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17880
17881         if test $ol_cv_db_db_2 = yes ; then
17882                 ol_cv_lib_db=-ldb-2
17883         fi
17884 fi
17885
17886 if test $ol_cv_lib_db = no ; then
17887         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17888 echo "configure:17889: checking for Berkeley DB link (-ldb1)" >&5
17889 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17890   echo $ac_n "(cached) $ac_c" 1>&6
17891 else
17892   
17893         ol_DB_LIB=-ldb1
17894         ol_LIBS=$LIBS
17895         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17896
17897         cat > conftest.$ac_ext <<EOF
17898 #line 17899 "configure"
17899 #include "confdefs.h"
17900
17901 #ifdef HAVE_DB_185_H
17902 # include <db_185.h>
17903 #else
17904 # include <db.h>
17905 #endif
17906
17907 #ifndef DB_VERSION_MAJOR
17908 # define DB_VERSION_MAJOR 1
17909 #endif
17910
17911 #ifndef NULL
17912 #define NULL ((void*)0)
17913 #endif
17914
17915 int main() {
17916
17917 #if DB_VERSION_MAJOR > 1
17918         {
17919                 char *version;
17920                 int major, minor, patch;
17921
17922                 version = db_version( &major, &minor, &patch );
17923
17924                 if( major != DB_VERSION_MAJOR ||
17925                         minor < DB_VERSION_MINOR )
17926                 {
17927                         printf("Berkeley DB version mismatch\n"
17928                                 "\texpected: %s\n\tgot: %s\n",
17929                                 DB_VERSION_STRING, version);
17930                         return 1;
17931                 }
17932         }
17933 #endif
17934
17935 #if DB_VERSION_MAJOR > 2
17936         db_env_create( NULL, 0 );
17937 #elif DB_VERSION_MAJOR > 1
17938         db_appexit( NULL );
17939 #else
17940         (void) dbopen( NULL, 0, 0, 0, NULL);
17941 #endif
17942
17943 ; return 0; }
17944 EOF
17945 if { (eval echo configure:17946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17946   rm -rf conftest*
17947   ol_cv_db_db1=yes
17948 else
17949   echo "configure: failed program was:" >&5
17950   cat conftest.$ac_ext >&5
17951   rm -rf conftest*
17952   ol_cv_db_db1=no
17953 fi
17954 rm -f conftest*
17955
17956         LIBS="$ol_LIBS"
17957
17958 fi
17959
17960 echo "$ac_t""$ol_cv_db_db1" 1>&6
17961
17962         if test $ol_cv_db_db1 = yes ; then
17963                 ol_cv_lib_db=-ldb1
17964         fi
17965 fi
17966
17967 if test $ol_cv_lib_db = no ; then
17968         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17969 echo "configure:17970: checking for Berkeley DB link (-ldb-1)" >&5
17970 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17971   echo $ac_n "(cached) $ac_c" 1>&6
17972 else
17973   
17974         ol_DB_LIB=-ldb-1
17975         ol_LIBS=$LIBS
17976         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17977
17978         cat > conftest.$ac_ext <<EOF
17979 #line 17980 "configure"
17980 #include "confdefs.h"
17981
17982 #ifdef HAVE_DB_185_H
17983 # include <db_185.h>
17984 #else
17985 # include <db.h>
17986 #endif
17987
17988 #ifndef DB_VERSION_MAJOR
17989 # define DB_VERSION_MAJOR 1
17990 #endif
17991
17992 #ifndef NULL
17993 #define NULL ((void*)0)
17994 #endif
17995
17996 int main() {
17997
17998 #if DB_VERSION_MAJOR > 1
17999         {
18000                 char *version;
18001                 int major, minor, patch;
18002
18003                 version = db_version( &major, &minor, &patch );
18004
18005                 if( major != DB_VERSION_MAJOR ||
18006                         minor < DB_VERSION_MINOR )
18007                 {
18008                         printf("Berkeley DB version mismatch\n"
18009                                 "\texpected: %s\n\tgot: %s\n",
18010                                 DB_VERSION_STRING, version);
18011                         return 1;
18012                 }
18013         }
18014 #endif
18015
18016 #if DB_VERSION_MAJOR > 2
18017         db_env_create( NULL, 0 );
18018 #elif DB_VERSION_MAJOR > 1
18019         db_appexit( NULL );
18020 #else
18021         (void) dbopen( NULL, 0, 0, 0, NULL);
18022 #endif
18023
18024 ; return 0; }
18025 EOF
18026 if { (eval echo configure:18027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18027   rm -rf conftest*
18028   ol_cv_db_db_1=yes
18029 else
18030   echo "configure: failed program was:" >&5
18031   cat conftest.$ac_ext >&5
18032   rm -rf conftest*
18033   ol_cv_db_db_1=no
18034 fi
18035 rm -f conftest*
18036
18037         LIBS="$ol_LIBS"
18038
18039 fi
18040
18041 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18042
18043         if test $ol_cv_db_db_1 = yes ; then
18044                 ol_cv_lib_db=-ldb-1
18045         fi
18046 fi
18047
18048
18049                 if test "$ol_cv_lib_db" != no ; then
18050                         ol_cv_berkeley_db=yes
18051                 fi
18052         fi
18053 fi
18054
18055         else
18056                 ol_cv_berkeley_db=no
18057 for ac_hdr in db.h
18058 do
18059 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18060 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18061 echo "configure:18062: checking for $ac_hdr" >&5
18062 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18063   echo $ac_n "(cached) $ac_c" 1>&6
18064 else
18065   cat > conftest.$ac_ext <<EOF
18066 #line 18067 "configure"
18067 #include "confdefs.h"
18068 #include <$ac_hdr>
18069 EOF
18070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18071 { (eval echo configure:18072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18073 if test -z "$ac_err"; then
18074   rm -rf conftest*
18075   eval "ac_cv_header_$ac_safe=yes"
18076 else
18077   echo "$ac_err" >&5
18078   echo "configure: failed program was:" >&5
18079   cat conftest.$ac_ext >&5
18080   rm -rf conftest*
18081   eval "ac_cv_header_$ac_safe=no"
18082 fi
18083 rm -f conftest*
18084 fi
18085 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18086   echo "$ac_t""yes" 1>&6
18087     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18088   cat >> confdefs.h <<EOF
18089 #define $ac_tr_hdr 1
18090 EOF
18091  
18092 else
18093   echo "$ac_t""no" 1>&6
18094 fi
18095 done
18096
18097 if test $ac_cv_header_db_h = yes; then
18098         ol_cv_lib_db=no
18099 if test $ol_cv_lib_db = no ; then
18100         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18101 echo "configure:18102: checking for Berkeley DB link (default)" >&5
18102 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18103   echo $ac_n "(cached) $ac_c" 1>&6
18104 else
18105   
18106         ol_DB_LIB=
18107         ol_LIBS=$LIBS
18108         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18109
18110         cat > conftest.$ac_ext <<EOF
18111 #line 18112 "configure"
18112 #include "confdefs.h"
18113
18114 #ifdef HAVE_DB_185_H
18115 # include <db_185.h>
18116 #else
18117 # include <db.h>
18118 #endif
18119
18120 #ifndef DB_VERSION_MAJOR
18121 # define DB_VERSION_MAJOR 1
18122 #endif
18123
18124 #ifndef NULL
18125 #define NULL ((void*)0)
18126 #endif
18127
18128 int main() {
18129
18130 #if DB_VERSION_MAJOR > 1
18131         {
18132                 char *version;
18133                 int major, minor, patch;
18134
18135                 version = db_version( &major, &minor, &patch );
18136
18137                 if( major != DB_VERSION_MAJOR ||
18138                         minor < DB_VERSION_MINOR )
18139                 {
18140                         printf("Berkeley DB version mismatch\n"
18141                                 "\texpected: %s\n\tgot: %s\n",
18142                                 DB_VERSION_STRING, version);
18143                         return 1;
18144                 }
18145         }
18146 #endif
18147
18148 #if DB_VERSION_MAJOR > 2
18149         db_env_create( NULL, 0 );
18150 #elif DB_VERSION_MAJOR > 1
18151         db_appexit( NULL );
18152 #else
18153         (void) dbopen( NULL, 0, 0, 0, NULL);
18154 #endif
18155
18156 ; return 0; }
18157 EOF
18158 if { (eval echo configure:18159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18159   rm -rf conftest*
18160   ol_cv_db_none=yes
18161 else
18162   echo "configure: failed program was:" >&5
18163   cat conftest.$ac_ext >&5
18164   rm -rf conftest*
18165   ol_cv_db_none=no
18166 fi
18167 rm -f conftest*
18168
18169         LIBS="$ol_LIBS"
18170
18171 fi
18172
18173 echo "$ac_t""$ol_cv_db_none" 1>&6
18174
18175         if test $ol_cv_db_none = yes ; then
18176                 ol_cv_lib_db=yes
18177         fi
18178 fi
18179
18180 if test $ol_cv_lib_db = no ; then
18181         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18182 echo "configure:18183: checking for Berkeley DB link (-ldb42)" >&5
18183 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18184   echo $ac_n "(cached) $ac_c" 1>&6
18185 else
18186   
18187         ol_DB_LIB=-ldb42
18188         ol_LIBS=$LIBS
18189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18190
18191         cat > conftest.$ac_ext <<EOF
18192 #line 18193 "configure"
18193 #include "confdefs.h"
18194
18195 #ifdef HAVE_DB_185_H
18196 # include <db_185.h>
18197 #else
18198 # include <db.h>
18199 #endif
18200
18201 #ifndef DB_VERSION_MAJOR
18202 # define DB_VERSION_MAJOR 1
18203 #endif
18204
18205 #ifndef NULL
18206 #define NULL ((void*)0)
18207 #endif
18208
18209 int main() {
18210
18211 #if DB_VERSION_MAJOR > 1
18212         {
18213                 char *version;
18214                 int major, minor, patch;
18215
18216                 version = db_version( &major, &minor, &patch );
18217
18218                 if( major != DB_VERSION_MAJOR ||
18219                         minor < DB_VERSION_MINOR )
18220                 {
18221                         printf("Berkeley DB version mismatch\n"
18222                                 "\texpected: %s\n\tgot: %s\n",
18223                                 DB_VERSION_STRING, version);
18224                         return 1;
18225                 }
18226         }
18227 #endif
18228
18229 #if DB_VERSION_MAJOR > 2
18230         db_env_create( NULL, 0 );
18231 #elif DB_VERSION_MAJOR > 1
18232         db_appexit( NULL );
18233 #else
18234         (void) dbopen( NULL, 0, 0, 0, NULL);
18235 #endif
18236
18237 ; return 0; }
18238 EOF
18239 if { (eval echo configure:18240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18240   rm -rf conftest*
18241   ol_cv_db_db42=yes
18242 else
18243   echo "configure: failed program was:" >&5
18244   cat conftest.$ac_ext >&5
18245   rm -rf conftest*
18246   ol_cv_db_db42=no
18247 fi
18248 rm -f conftest*
18249
18250         LIBS="$ol_LIBS"
18251
18252 fi
18253
18254 echo "$ac_t""$ol_cv_db_db42" 1>&6
18255
18256         if test $ol_cv_db_db42 = yes ; then
18257                 ol_cv_lib_db=-ldb42
18258         fi
18259 fi
18260
18261 if test $ol_cv_lib_db = no ; then
18262         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18263 echo "configure:18264: checking for Berkeley DB link (-ldb-42)" >&5
18264 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18265   echo $ac_n "(cached) $ac_c" 1>&6
18266 else
18267   
18268         ol_DB_LIB=-ldb-42
18269         ol_LIBS=$LIBS
18270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18271
18272         cat > conftest.$ac_ext <<EOF
18273 #line 18274 "configure"
18274 #include "confdefs.h"
18275
18276 #ifdef HAVE_DB_185_H
18277 # include <db_185.h>
18278 #else
18279 # include <db.h>
18280 #endif
18281
18282 #ifndef DB_VERSION_MAJOR
18283 # define DB_VERSION_MAJOR 1
18284 #endif
18285
18286 #ifndef NULL
18287 #define NULL ((void*)0)
18288 #endif
18289
18290 int main() {
18291
18292 #if DB_VERSION_MAJOR > 1
18293         {
18294                 char *version;
18295                 int major, minor, patch;
18296
18297                 version = db_version( &major, &minor, &patch );
18298
18299                 if( major != DB_VERSION_MAJOR ||
18300                         minor < DB_VERSION_MINOR )
18301                 {
18302                         printf("Berkeley DB version mismatch\n"
18303                                 "\texpected: %s\n\tgot: %s\n",
18304                                 DB_VERSION_STRING, version);
18305                         return 1;
18306                 }
18307         }
18308 #endif
18309
18310 #if DB_VERSION_MAJOR > 2
18311         db_env_create( NULL, 0 );
18312 #elif DB_VERSION_MAJOR > 1
18313         db_appexit( NULL );
18314 #else
18315         (void) dbopen( NULL, 0, 0, 0, NULL);
18316 #endif
18317
18318 ; return 0; }
18319 EOF
18320 if { (eval echo configure:18321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18321   rm -rf conftest*
18322   ol_cv_db_db_42=yes
18323 else
18324   echo "configure: failed program was:" >&5
18325   cat conftest.$ac_ext >&5
18326   rm -rf conftest*
18327   ol_cv_db_db_42=no
18328 fi
18329 rm -f conftest*
18330
18331         LIBS="$ol_LIBS"
18332
18333 fi
18334
18335 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18336
18337         if test $ol_cv_db_db_42 = yes ; then
18338                 ol_cv_lib_db=-ldb-42
18339         fi
18340 fi
18341
18342 if test $ol_cv_lib_db = no ; then
18343         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18344 echo "configure:18345: checking for Berkeley DB link (-ldb-4.2)" >&5
18345 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18346   echo $ac_n "(cached) $ac_c" 1>&6
18347 else
18348   
18349         ol_DB_LIB=-ldb-4.2
18350         ol_LIBS=$LIBS
18351         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18352
18353         cat > conftest.$ac_ext <<EOF
18354 #line 18355 "configure"
18355 #include "confdefs.h"
18356
18357 #ifdef HAVE_DB_185_H
18358 # include <db_185.h>
18359 #else
18360 # include <db.h>
18361 #endif
18362
18363 #ifndef DB_VERSION_MAJOR
18364 # define DB_VERSION_MAJOR 1
18365 #endif
18366
18367 #ifndef NULL
18368 #define NULL ((void*)0)
18369 #endif
18370
18371 int main() {
18372
18373 #if DB_VERSION_MAJOR > 1
18374         {
18375                 char *version;
18376                 int major, minor, patch;
18377
18378                 version = db_version( &major, &minor, &patch );
18379
18380                 if( major != DB_VERSION_MAJOR ||
18381                         minor < DB_VERSION_MINOR )
18382                 {
18383                         printf("Berkeley DB version mismatch\n"
18384                                 "\texpected: %s\n\tgot: %s\n",
18385                                 DB_VERSION_STRING, version);
18386                         return 1;
18387                 }
18388         }
18389 #endif
18390
18391 #if DB_VERSION_MAJOR > 2
18392         db_env_create( NULL, 0 );
18393 #elif DB_VERSION_MAJOR > 1
18394         db_appexit( NULL );
18395 #else
18396         (void) dbopen( NULL, 0, 0, 0, NULL);
18397 #endif
18398
18399 ; return 0; }
18400 EOF
18401 if { (eval echo configure:18402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18402   rm -rf conftest*
18403   ol_cv_db_db_4_dot_2=yes
18404 else
18405   echo "configure: failed program was:" >&5
18406   cat conftest.$ac_ext >&5
18407   rm -rf conftest*
18408   ol_cv_db_db_4_dot_2=no
18409 fi
18410 rm -f conftest*
18411
18412         LIBS="$ol_LIBS"
18413
18414 fi
18415
18416 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18417
18418         if test $ol_cv_db_db_4_dot_2 = yes ; then
18419                 ol_cv_lib_db=-ldb-4.2
18420         fi
18421 fi
18422
18423 if test $ol_cv_lib_db = no ; then
18424         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18425 echo "configure:18426: checking for Berkeley DB link (-ldb-4-2)" >&5
18426 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18427   echo $ac_n "(cached) $ac_c" 1>&6
18428 else
18429   
18430         ol_DB_LIB=-ldb-4-2
18431         ol_LIBS=$LIBS
18432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18433
18434         cat > conftest.$ac_ext <<EOF
18435 #line 18436 "configure"
18436 #include "confdefs.h"
18437
18438 #ifdef HAVE_DB_185_H
18439 # include <db_185.h>
18440 #else
18441 # include <db.h>
18442 #endif
18443
18444 #ifndef DB_VERSION_MAJOR
18445 # define DB_VERSION_MAJOR 1
18446 #endif
18447
18448 #ifndef NULL
18449 #define NULL ((void*)0)
18450 #endif
18451
18452 int main() {
18453
18454 #if DB_VERSION_MAJOR > 1
18455         {
18456                 char *version;
18457                 int major, minor, patch;
18458
18459                 version = db_version( &major, &minor, &patch );
18460
18461                 if( major != DB_VERSION_MAJOR ||
18462                         minor < DB_VERSION_MINOR )
18463                 {
18464                         printf("Berkeley DB version mismatch\n"
18465                                 "\texpected: %s\n\tgot: %s\n",
18466                                 DB_VERSION_STRING, version);
18467                         return 1;
18468                 }
18469         }
18470 #endif
18471
18472 #if DB_VERSION_MAJOR > 2
18473         db_env_create( NULL, 0 );
18474 #elif DB_VERSION_MAJOR > 1
18475         db_appexit( NULL );
18476 #else
18477         (void) dbopen( NULL, 0, 0, 0, NULL);
18478 #endif
18479
18480 ; return 0; }
18481 EOF
18482 if { (eval echo configure:18483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18483   rm -rf conftest*
18484   ol_cv_db_db_4_2=yes
18485 else
18486   echo "configure: failed program was:" >&5
18487   cat conftest.$ac_ext >&5
18488   rm -rf conftest*
18489   ol_cv_db_db_4_2=no
18490 fi
18491 rm -f conftest*
18492
18493         LIBS="$ol_LIBS"
18494
18495 fi
18496
18497 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18498
18499         if test $ol_cv_db_db_4_2 = yes ; then
18500                 ol_cv_lib_db=-ldb-4-2
18501         fi
18502 fi
18503
18504 if test $ol_cv_lib_db = no ; then
18505         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18506 echo "configure:18507: checking for Berkeley DB link (-ldb41)" >&5
18507 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18508   echo $ac_n "(cached) $ac_c" 1>&6
18509 else
18510   
18511         ol_DB_LIB=-ldb41
18512         ol_LIBS=$LIBS
18513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18514
18515         cat > conftest.$ac_ext <<EOF
18516 #line 18517 "configure"
18517 #include "confdefs.h"
18518
18519 #ifdef HAVE_DB_185_H
18520 # include <db_185.h>
18521 #else
18522 # include <db.h>
18523 #endif
18524
18525 #ifndef DB_VERSION_MAJOR
18526 # define DB_VERSION_MAJOR 1
18527 #endif
18528
18529 #ifndef NULL
18530 #define NULL ((void*)0)
18531 #endif
18532
18533 int main() {
18534
18535 #if DB_VERSION_MAJOR > 1
18536         {
18537                 char *version;
18538                 int major, minor, patch;
18539
18540                 version = db_version( &major, &minor, &patch );
18541
18542                 if( major != DB_VERSION_MAJOR ||
18543                         minor < DB_VERSION_MINOR )
18544                 {
18545                         printf("Berkeley DB version mismatch\n"
18546                                 "\texpected: %s\n\tgot: %s\n",
18547                                 DB_VERSION_STRING, version);
18548                         return 1;
18549                 }
18550         }
18551 #endif
18552
18553 #if DB_VERSION_MAJOR > 2
18554         db_env_create( NULL, 0 );
18555 #elif DB_VERSION_MAJOR > 1
18556         db_appexit( NULL );
18557 #else
18558         (void) dbopen( NULL, 0, 0, 0, NULL);
18559 #endif
18560
18561 ; return 0; }
18562 EOF
18563 if { (eval echo configure:18564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18564   rm -rf conftest*
18565   ol_cv_db_db41=yes
18566 else
18567   echo "configure: failed program was:" >&5
18568   cat conftest.$ac_ext >&5
18569   rm -rf conftest*
18570   ol_cv_db_db41=no
18571 fi
18572 rm -f conftest*
18573
18574         LIBS="$ol_LIBS"
18575
18576 fi
18577
18578 echo "$ac_t""$ol_cv_db_db41" 1>&6
18579
18580         if test $ol_cv_db_db41 = yes ; then
18581                 ol_cv_lib_db=-ldb41
18582         fi
18583 fi
18584
18585 if test $ol_cv_lib_db = no ; then
18586         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18587 echo "configure:18588: checking for Berkeley DB link (-ldb-41)" >&5
18588 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18589   echo $ac_n "(cached) $ac_c" 1>&6
18590 else
18591   
18592         ol_DB_LIB=-ldb-41
18593         ol_LIBS=$LIBS
18594         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18595
18596         cat > conftest.$ac_ext <<EOF
18597 #line 18598 "configure"
18598 #include "confdefs.h"
18599
18600 #ifdef HAVE_DB_185_H
18601 # include <db_185.h>
18602 #else
18603 # include <db.h>
18604 #endif
18605
18606 #ifndef DB_VERSION_MAJOR
18607 # define DB_VERSION_MAJOR 1
18608 #endif
18609
18610 #ifndef NULL
18611 #define NULL ((void*)0)
18612 #endif
18613
18614 int main() {
18615
18616 #if DB_VERSION_MAJOR > 1
18617         {
18618                 char *version;
18619                 int major, minor, patch;
18620
18621                 version = db_version( &major, &minor, &patch );
18622
18623                 if( major != DB_VERSION_MAJOR ||
18624                         minor < DB_VERSION_MINOR )
18625                 {
18626                         printf("Berkeley DB version mismatch\n"
18627                                 "\texpected: %s\n\tgot: %s\n",
18628                                 DB_VERSION_STRING, version);
18629                         return 1;
18630                 }
18631         }
18632 #endif
18633
18634 #if DB_VERSION_MAJOR > 2
18635         db_env_create( NULL, 0 );
18636 #elif DB_VERSION_MAJOR > 1
18637         db_appexit( NULL );
18638 #else
18639         (void) dbopen( NULL, 0, 0, 0, NULL);
18640 #endif
18641
18642 ; return 0; }
18643 EOF
18644 if { (eval echo configure:18645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18645   rm -rf conftest*
18646   ol_cv_db_db_41=yes
18647 else
18648   echo "configure: failed program was:" >&5
18649   cat conftest.$ac_ext >&5
18650   rm -rf conftest*
18651   ol_cv_db_db_41=no
18652 fi
18653 rm -f conftest*
18654
18655         LIBS="$ol_LIBS"
18656
18657 fi
18658
18659 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18660
18661         if test $ol_cv_db_db_41 = yes ; then
18662                 ol_cv_lib_db=-ldb-41
18663         fi
18664 fi
18665
18666 if test $ol_cv_lib_db = no ; then
18667         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18668 echo "configure:18669: checking for Berkeley DB link (-ldb-4.1)" >&5
18669 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18670   echo $ac_n "(cached) $ac_c" 1>&6
18671 else
18672   
18673         ol_DB_LIB=-ldb-4.1
18674         ol_LIBS=$LIBS
18675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18676
18677         cat > conftest.$ac_ext <<EOF
18678 #line 18679 "configure"
18679 #include "confdefs.h"
18680
18681 #ifdef HAVE_DB_185_H
18682 # include <db_185.h>
18683 #else
18684 # include <db.h>
18685 #endif
18686
18687 #ifndef DB_VERSION_MAJOR
18688 # define DB_VERSION_MAJOR 1
18689 #endif
18690
18691 #ifndef NULL
18692 #define NULL ((void*)0)
18693 #endif
18694
18695 int main() {
18696
18697 #if DB_VERSION_MAJOR > 1
18698         {
18699                 char *version;
18700                 int major, minor, patch;
18701
18702                 version = db_version( &major, &minor, &patch );
18703
18704                 if( major != DB_VERSION_MAJOR ||
18705                         minor < DB_VERSION_MINOR )
18706                 {
18707                         printf("Berkeley DB version mismatch\n"
18708                                 "\texpected: %s\n\tgot: %s\n",
18709                                 DB_VERSION_STRING, version);
18710                         return 1;
18711                 }
18712         }
18713 #endif
18714
18715 #if DB_VERSION_MAJOR > 2
18716         db_env_create( NULL, 0 );
18717 #elif DB_VERSION_MAJOR > 1
18718         db_appexit( NULL );
18719 #else
18720         (void) dbopen( NULL, 0, 0, 0, NULL);
18721 #endif
18722
18723 ; return 0; }
18724 EOF
18725 if { (eval echo configure:18726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18726   rm -rf conftest*
18727   ol_cv_db_db_4_dot_1=yes
18728 else
18729   echo "configure: failed program was:" >&5
18730   cat conftest.$ac_ext >&5
18731   rm -rf conftest*
18732   ol_cv_db_db_4_dot_1=no
18733 fi
18734 rm -f conftest*
18735
18736         LIBS="$ol_LIBS"
18737
18738 fi
18739
18740 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18741
18742         if test $ol_cv_db_db_4_dot_1 = yes ; then
18743                 ol_cv_lib_db=-ldb-4.1
18744         fi
18745 fi
18746
18747 if test $ol_cv_lib_db = no ; then
18748         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18749 echo "configure:18750: checking for Berkeley DB link (-ldb-4-1)" >&5
18750 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18751   echo $ac_n "(cached) $ac_c" 1>&6
18752 else
18753   
18754         ol_DB_LIB=-ldb-4-1
18755         ol_LIBS=$LIBS
18756         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18757
18758         cat > conftest.$ac_ext <<EOF
18759 #line 18760 "configure"
18760 #include "confdefs.h"
18761
18762 #ifdef HAVE_DB_185_H
18763 # include <db_185.h>
18764 #else
18765 # include <db.h>
18766 #endif
18767
18768 #ifndef DB_VERSION_MAJOR
18769 # define DB_VERSION_MAJOR 1
18770 #endif
18771
18772 #ifndef NULL
18773 #define NULL ((void*)0)
18774 #endif
18775
18776 int main() {
18777
18778 #if DB_VERSION_MAJOR > 1
18779         {
18780                 char *version;
18781                 int major, minor, patch;
18782
18783                 version = db_version( &major, &minor, &patch );
18784
18785                 if( major != DB_VERSION_MAJOR ||
18786                         minor < DB_VERSION_MINOR )
18787                 {
18788                         printf("Berkeley DB version mismatch\n"
18789                                 "\texpected: %s\n\tgot: %s\n",
18790                                 DB_VERSION_STRING, version);
18791                         return 1;
18792                 }
18793         }
18794 #endif
18795
18796 #if DB_VERSION_MAJOR > 2
18797         db_env_create( NULL, 0 );
18798 #elif DB_VERSION_MAJOR > 1
18799         db_appexit( NULL );
18800 #else
18801         (void) dbopen( NULL, 0, 0, 0, NULL);
18802 #endif
18803
18804 ; return 0; }
18805 EOF
18806 if { (eval echo configure:18807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18807   rm -rf conftest*
18808   ol_cv_db_db_4_1=yes
18809 else
18810   echo "configure: failed program was:" >&5
18811   cat conftest.$ac_ext >&5
18812   rm -rf conftest*
18813   ol_cv_db_db_4_1=no
18814 fi
18815 rm -f conftest*
18816
18817         LIBS="$ol_LIBS"
18818
18819 fi
18820
18821 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18822
18823         if test $ol_cv_db_db_4_1 = yes ; then
18824                 ol_cv_lib_db=-ldb-4-1
18825         fi
18826 fi
18827
18828 if test $ol_cv_lib_db = no ; then
18829         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18830 echo "configure:18831: checking for Berkeley DB link (-ldb-4)" >&5
18831 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18832   echo $ac_n "(cached) $ac_c" 1>&6
18833 else
18834   
18835         ol_DB_LIB=-ldb-4
18836         ol_LIBS=$LIBS
18837         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18838
18839         cat > conftest.$ac_ext <<EOF
18840 #line 18841 "configure"
18841 #include "confdefs.h"
18842
18843 #ifdef HAVE_DB_185_H
18844 # include <db_185.h>
18845 #else
18846 # include <db.h>
18847 #endif
18848
18849 #ifndef DB_VERSION_MAJOR
18850 # define DB_VERSION_MAJOR 1
18851 #endif
18852
18853 #ifndef NULL
18854 #define NULL ((void*)0)
18855 #endif
18856
18857 int main() {
18858
18859 #if DB_VERSION_MAJOR > 1
18860         {
18861                 char *version;
18862                 int major, minor, patch;
18863
18864                 version = db_version( &major, &minor, &patch );
18865
18866                 if( major != DB_VERSION_MAJOR ||
18867                         minor < DB_VERSION_MINOR )
18868                 {
18869                         printf("Berkeley DB version mismatch\n"
18870                                 "\texpected: %s\n\tgot: %s\n",
18871                                 DB_VERSION_STRING, version);
18872                         return 1;
18873                 }
18874         }
18875 #endif
18876
18877 #if DB_VERSION_MAJOR > 2
18878         db_env_create( NULL, 0 );
18879 #elif DB_VERSION_MAJOR > 1
18880         db_appexit( NULL );
18881 #else
18882         (void) dbopen( NULL, 0, 0, 0, NULL);
18883 #endif
18884
18885 ; return 0; }
18886 EOF
18887 if { (eval echo configure:18888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18888   rm -rf conftest*
18889   ol_cv_db_db_4=yes
18890 else
18891   echo "configure: failed program was:" >&5
18892   cat conftest.$ac_ext >&5
18893   rm -rf conftest*
18894   ol_cv_db_db_4=no
18895 fi
18896 rm -f conftest*
18897
18898         LIBS="$ol_LIBS"
18899
18900 fi
18901
18902 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18903
18904         if test $ol_cv_db_db_4 = yes ; then
18905                 ol_cv_lib_db=-ldb-4
18906         fi
18907 fi
18908
18909 if test $ol_cv_lib_db = no ; then
18910         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18911 echo "configure:18912: checking for Berkeley DB link (-ldb4)" >&5
18912 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18913   echo $ac_n "(cached) $ac_c" 1>&6
18914 else
18915   
18916         ol_DB_LIB=-ldb4
18917         ol_LIBS=$LIBS
18918         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18919
18920         cat > conftest.$ac_ext <<EOF
18921 #line 18922 "configure"
18922 #include "confdefs.h"
18923
18924 #ifdef HAVE_DB_185_H
18925 # include <db_185.h>
18926 #else
18927 # include <db.h>
18928 #endif
18929
18930 #ifndef DB_VERSION_MAJOR
18931 # define DB_VERSION_MAJOR 1
18932 #endif
18933
18934 #ifndef NULL
18935 #define NULL ((void*)0)
18936 #endif
18937
18938 int main() {
18939
18940 #if DB_VERSION_MAJOR > 1
18941         {
18942                 char *version;
18943                 int major, minor, patch;
18944
18945                 version = db_version( &major, &minor, &patch );
18946
18947                 if( major != DB_VERSION_MAJOR ||
18948                         minor < DB_VERSION_MINOR )
18949                 {
18950                         printf("Berkeley DB version mismatch\n"
18951                                 "\texpected: %s\n\tgot: %s\n",
18952                                 DB_VERSION_STRING, version);
18953                         return 1;
18954                 }
18955         }
18956 #endif
18957
18958 #if DB_VERSION_MAJOR > 2
18959         db_env_create( NULL, 0 );
18960 #elif DB_VERSION_MAJOR > 1
18961         db_appexit( NULL );
18962 #else
18963         (void) dbopen( NULL, 0, 0, 0, NULL);
18964 #endif
18965
18966 ; return 0; }
18967 EOF
18968 if { (eval echo configure:18969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18969   rm -rf conftest*
18970   ol_cv_db_db4=yes
18971 else
18972   echo "configure: failed program was:" >&5
18973   cat conftest.$ac_ext >&5
18974   rm -rf conftest*
18975   ol_cv_db_db4=no
18976 fi
18977 rm -f conftest*
18978
18979         LIBS="$ol_LIBS"
18980
18981 fi
18982
18983 echo "$ac_t""$ol_cv_db_db4" 1>&6
18984
18985         if test $ol_cv_db_db4 = yes ; then
18986                 ol_cv_lib_db=-ldb4
18987         fi
18988 fi
18989
18990 if test $ol_cv_lib_db = no ; then
18991         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18992 echo "configure:18993: checking for Berkeley DB link (-ldb)" >&5
18993 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18994   echo $ac_n "(cached) $ac_c" 1>&6
18995 else
18996   
18997         ol_DB_LIB=-ldb
18998         ol_LIBS=$LIBS
18999         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19000
19001         cat > conftest.$ac_ext <<EOF
19002 #line 19003 "configure"
19003 #include "confdefs.h"
19004
19005 #ifdef HAVE_DB_185_H
19006 # include <db_185.h>
19007 #else
19008 # include <db.h>
19009 #endif
19010
19011 #ifndef DB_VERSION_MAJOR
19012 # define DB_VERSION_MAJOR 1
19013 #endif
19014
19015 #ifndef NULL
19016 #define NULL ((void*)0)
19017 #endif
19018
19019 int main() {
19020
19021 #if DB_VERSION_MAJOR > 1
19022         {
19023                 char *version;
19024                 int major, minor, patch;
19025
19026                 version = db_version( &major, &minor, &patch );
19027
19028                 if( major != DB_VERSION_MAJOR ||
19029                         minor < DB_VERSION_MINOR )
19030                 {
19031                         printf("Berkeley DB version mismatch\n"
19032                                 "\texpected: %s\n\tgot: %s\n",
19033                                 DB_VERSION_STRING, version);
19034                         return 1;
19035                 }
19036         }
19037 #endif
19038
19039 #if DB_VERSION_MAJOR > 2
19040         db_env_create( NULL, 0 );
19041 #elif DB_VERSION_MAJOR > 1
19042         db_appexit( NULL );
19043 #else
19044         (void) dbopen( NULL, 0, 0, 0, NULL);
19045 #endif
19046
19047 ; return 0; }
19048 EOF
19049 if { (eval echo configure:19050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19050   rm -rf conftest*
19051   ol_cv_db_db=yes
19052 else
19053   echo "configure: failed program was:" >&5
19054   cat conftest.$ac_ext >&5
19055   rm -rf conftest*
19056   ol_cv_db_db=no
19057 fi
19058 rm -f conftest*
19059
19060         LIBS="$ol_LIBS"
19061
19062 fi
19063
19064 echo "$ac_t""$ol_cv_db_db" 1>&6
19065
19066         if test $ol_cv_db_db = yes ; then
19067                 ol_cv_lib_db=-ldb
19068         fi
19069 fi
19070
19071 if test $ol_cv_lib_db = no ; then
19072         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19073 echo "configure:19074: checking for Berkeley DB link (-ldb3)" >&5
19074 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19075   echo $ac_n "(cached) $ac_c" 1>&6
19076 else
19077   
19078         ol_DB_LIB=-ldb3
19079         ol_LIBS=$LIBS
19080         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19081
19082         cat > conftest.$ac_ext <<EOF
19083 #line 19084 "configure"
19084 #include "confdefs.h"
19085
19086 #ifdef HAVE_DB_185_H
19087 # include <db_185.h>
19088 #else
19089 # include <db.h>
19090 #endif
19091
19092 #ifndef DB_VERSION_MAJOR
19093 # define DB_VERSION_MAJOR 1
19094 #endif
19095
19096 #ifndef NULL
19097 #define NULL ((void*)0)
19098 #endif
19099
19100 int main() {
19101
19102 #if DB_VERSION_MAJOR > 1
19103         {
19104                 char *version;
19105                 int major, minor, patch;
19106
19107                 version = db_version( &major, &minor, &patch );
19108
19109                 if( major != DB_VERSION_MAJOR ||
19110                         minor < DB_VERSION_MINOR )
19111                 {
19112                         printf("Berkeley DB version mismatch\n"
19113                                 "\texpected: %s\n\tgot: %s\n",
19114                                 DB_VERSION_STRING, version);
19115                         return 1;
19116                 }
19117         }
19118 #endif
19119
19120 #if DB_VERSION_MAJOR > 2
19121         db_env_create( NULL, 0 );
19122 #elif DB_VERSION_MAJOR > 1
19123         db_appexit( NULL );
19124 #else
19125         (void) dbopen( NULL, 0, 0, 0, NULL);
19126 #endif
19127
19128 ; return 0; }
19129 EOF
19130 if { (eval echo configure:19131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19131   rm -rf conftest*
19132   ol_cv_db_db3=yes
19133 else
19134   echo "configure: failed program was:" >&5
19135   cat conftest.$ac_ext >&5
19136   rm -rf conftest*
19137   ol_cv_db_db3=no
19138 fi
19139 rm -f conftest*
19140
19141         LIBS="$ol_LIBS"
19142
19143 fi
19144
19145 echo "$ac_t""$ol_cv_db_db3" 1>&6
19146
19147         if test $ol_cv_db_db3 = yes ; then
19148                 ol_cv_lib_db=-ldb3
19149         fi
19150 fi
19151
19152 if test $ol_cv_lib_db = no ; then
19153         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19154 echo "configure:19155: checking for Berkeley DB link (-ldb-3)" >&5
19155 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19156   echo $ac_n "(cached) $ac_c" 1>&6
19157 else
19158   
19159         ol_DB_LIB=-ldb-3
19160         ol_LIBS=$LIBS
19161         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19162
19163         cat > conftest.$ac_ext <<EOF
19164 #line 19165 "configure"
19165 #include "confdefs.h"
19166
19167 #ifdef HAVE_DB_185_H
19168 # include <db_185.h>
19169 #else
19170 # include <db.h>
19171 #endif
19172
19173 #ifndef DB_VERSION_MAJOR
19174 # define DB_VERSION_MAJOR 1
19175 #endif
19176
19177 #ifndef NULL
19178 #define NULL ((void*)0)
19179 #endif
19180
19181 int main() {
19182
19183 #if DB_VERSION_MAJOR > 1
19184         {
19185                 char *version;
19186                 int major, minor, patch;
19187
19188                 version = db_version( &major, &minor, &patch );
19189
19190                 if( major != DB_VERSION_MAJOR ||
19191                         minor < DB_VERSION_MINOR )
19192                 {
19193                         printf("Berkeley DB version mismatch\n"
19194                                 "\texpected: %s\n\tgot: %s\n",
19195                                 DB_VERSION_STRING, version);
19196                         return 1;
19197                 }
19198         }
19199 #endif
19200
19201 #if DB_VERSION_MAJOR > 2
19202         db_env_create( NULL, 0 );
19203 #elif DB_VERSION_MAJOR > 1
19204         db_appexit( NULL );
19205 #else
19206         (void) dbopen( NULL, 0, 0, 0, NULL);
19207 #endif
19208
19209 ; return 0; }
19210 EOF
19211 if { (eval echo configure:19212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19212   rm -rf conftest*
19213   ol_cv_db_db_3=yes
19214 else
19215   echo "configure: failed program was:" >&5
19216   cat conftest.$ac_ext >&5
19217   rm -rf conftest*
19218   ol_cv_db_db_3=no
19219 fi
19220 rm -f conftest*
19221
19222         LIBS="$ol_LIBS"
19223
19224 fi
19225
19226 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19227
19228         if test $ol_cv_db_db_3 = yes ; then
19229                 ol_cv_lib_db=-ldb-3
19230         fi
19231 fi
19232
19233 if test $ol_cv_lib_db = no ; then
19234         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19235 echo "configure:19236: checking for Berkeley DB link (-ldb2)" >&5
19236 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19237   echo $ac_n "(cached) $ac_c" 1>&6
19238 else
19239   
19240         ol_DB_LIB=-ldb2
19241         ol_LIBS=$LIBS
19242         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19243
19244         cat > conftest.$ac_ext <<EOF
19245 #line 19246 "configure"
19246 #include "confdefs.h"
19247
19248 #ifdef HAVE_DB_185_H
19249 # include <db_185.h>
19250 #else
19251 # include <db.h>
19252 #endif
19253
19254 #ifndef DB_VERSION_MAJOR
19255 # define DB_VERSION_MAJOR 1
19256 #endif
19257
19258 #ifndef NULL
19259 #define NULL ((void*)0)
19260 #endif
19261
19262 int main() {
19263
19264 #if DB_VERSION_MAJOR > 1
19265         {
19266                 char *version;
19267                 int major, minor, patch;
19268
19269                 version = db_version( &major, &minor, &patch );
19270
19271                 if( major != DB_VERSION_MAJOR ||
19272                         minor < DB_VERSION_MINOR )
19273                 {
19274                         printf("Berkeley DB version mismatch\n"
19275                                 "\texpected: %s\n\tgot: %s\n",
19276                                 DB_VERSION_STRING, version);
19277                         return 1;
19278                 }
19279         }
19280 #endif
19281
19282 #if DB_VERSION_MAJOR > 2
19283         db_env_create( NULL, 0 );
19284 #elif DB_VERSION_MAJOR > 1
19285         db_appexit( NULL );
19286 #else
19287         (void) dbopen( NULL, 0, 0, 0, NULL);
19288 #endif
19289
19290 ; return 0; }
19291 EOF
19292 if { (eval echo configure:19293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19293   rm -rf conftest*
19294   ol_cv_db_db2=yes
19295 else
19296   echo "configure: failed program was:" >&5
19297   cat conftest.$ac_ext >&5
19298   rm -rf conftest*
19299   ol_cv_db_db2=no
19300 fi
19301 rm -f conftest*
19302
19303         LIBS="$ol_LIBS"
19304
19305 fi
19306
19307 echo "$ac_t""$ol_cv_db_db2" 1>&6
19308
19309         if test $ol_cv_db_db2 = yes ; then
19310                 ol_cv_lib_db=-ldb2
19311         fi
19312 fi
19313
19314 if test $ol_cv_lib_db = no ; then
19315         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19316 echo "configure:19317: checking for Berkeley DB link (-ldb-2)" >&5
19317 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19318   echo $ac_n "(cached) $ac_c" 1>&6
19319 else
19320   
19321         ol_DB_LIB=-ldb-2
19322         ol_LIBS=$LIBS
19323         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19324
19325         cat > conftest.$ac_ext <<EOF
19326 #line 19327 "configure"
19327 #include "confdefs.h"
19328
19329 #ifdef HAVE_DB_185_H
19330 # include <db_185.h>
19331 #else
19332 # include <db.h>
19333 #endif
19334
19335 #ifndef DB_VERSION_MAJOR
19336 # define DB_VERSION_MAJOR 1
19337 #endif
19338
19339 #ifndef NULL
19340 #define NULL ((void*)0)
19341 #endif
19342
19343 int main() {
19344
19345 #if DB_VERSION_MAJOR > 1
19346         {
19347                 char *version;
19348                 int major, minor, patch;
19349
19350                 version = db_version( &major, &minor, &patch );
19351
19352                 if( major != DB_VERSION_MAJOR ||
19353                         minor < DB_VERSION_MINOR )
19354                 {
19355                         printf("Berkeley DB version mismatch\n"
19356                                 "\texpected: %s\n\tgot: %s\n",
19357                                 DB_VERSION_STRING, version);
19358                         return 1;
19359                 }
19360         }
19361 #endif
19362
19363 #if DB_VERSION_MAJOR > 2
19364         db_env_create( NULL, 0 );
19365 #elif DB_VERSION_MAJOR > 1
19366         db_appexit( NULL );
19367 #else
19368         (void) dbopen( NULL, 0, 0, 0, NULL);
19369 #endif
19370
19371 ; return 0; }
19372 EOF
19373 if { (eval echo configure:19374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19374   rm -rf conftest*
19375   ol_cv_db_db_2=yes
19376 else
19377   echo "configure: failed program was:" >&5
19378   cat conftest.$ac_ext >&5
19379   rm -rf conftest*
19380   ol_cv_db_db_2=no
19381 fi
19382 rm -f conftest*
19383
19384         LIBS="$ol_LIBS"
19385
19386 fi
19387
19388 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19389
19390         if test $ol_cv_db_db_2 = yes ; then
19391                 ol_cv_lib_db=-ldb-2
19392         fi
19393 fi
19394
19395 if test $ol_cv_lib_db = no ; then
19396         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19397 echo "configure:19398: checking for Berkeley DB link (-ldb1)" >&5
19398 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19399   echo $ac_n "(cached) $ac_c" 1>&6
19400 else
19401   
19402         ol_DB_LIB=-ldb1
19403         ol_LIBS=$LIBS
19404         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19405
19406         cat > conftest.$ac_ext <<EOF
19407 #line 19408 "configure"
19408 #include "confdefs.h"
19409
19410 #ifdef HAVE_DB_185_H
19411 # include <db_185.h>
19412 #else
19413 # include <db.h>
19414 #endif
19415
19416 #ifndef DB_VERSION_MAJOR
19417 # define DB_VERSION_MAJOR 1
19418 #endif
19419
19420 #ifndef NULL
19421 #define NULL ((void*)0)
19422 #endif
19423
19424 int main() {
19425
19426 #if DB_VERSION_MAJOR > 1
19427         {
19428                 char *version;
19429                 int major, minor, patch;
19430
19431                 version = db_version( &major, &minor, &patch );
19432
19433                 if( major != DB_VERSION_MAJOR ||
19434                         minor < DB_VERSION_MINOR )
19435                 {
19436                         printf("Berkeley DB version mismatch\n"
19437                                 "\texpected: %s\n\tgot: %s\n",
19438                                 DB_VERSION_STRING, version);
19439                         return 1;
19440                 }
19441         }
19442 #endif
19443
19444 #if DB_VERSION_MAJOR > 2
19445         db_env_create( NULL, 0 );
19446 #elif DB_VERSION_MAJOR > 1
19447         db_appexit( NULL );
19448 #else
19449         (void) dbopen( NULL, 0, 0, 0, NULL);
19450 #endif
19451
19452 ; return 0; }
19453 EOF
19454 if { (eval echo configure:19455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19455   rm -rf conftest*
19456   ol_cv_db_db1=yes
19457 else
19458   echo "configure: failed program was:" >&5
19459   cat conftest.$ac_ext >&5
19460   rm -rf conftest*
19461   ol_cv_db_db1=no
19462 fi
19463 rm -f conftest*
19464
19465         LIBS="$ol_LIBS"
19466
19467 fi
19468
19469 echo "$ac_t""$ol_cv_db_db1" 1>&6
19470
19471         if test $ol_cv_db_db1 = yes ; then
19472                 ol_cv_lib_db=-ldb1
19473         fi
19474 fi
19475
19476 if test $ol_cv_lib_db = no ; then
19477         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19478 echo "configure:19479: checking for Berkeley DB link (-ldb-1)" >&5
19479 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19480   echo $ac_n "(cached) $ac_c" 1>&6
19481 else
19482   
19483         ol_DB_LIB=-ldb-1
19484         ol_LIBS=$LIBS
19485         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19486
19487         cat > conftest.$ac_ext <<EOF
19488 #line 19489 "configure"
19489 #include "confdefs.h"
19490
19491 #ifdef HAVE_DB_185_H
19492 # include <db_185.h>
19493 #else
19494 # include <db.h>
19495 #endif
19496
19497 #ifndef DB_VERSION_MAJOR
19498 # define DB_VERSION_MAJOR 1
19499 #endif
19500
19501 #ifndef NULL
19502 #define NULL ((void*)0)
19503 #endif
19504
19505 int main() {
19506
19507 #if DB_VERSION_MAJOR > 1
19508         {
19509                 char *version;
19510                 int major, minor, patch;
19511
19512                 version = db_version( &major, &minor, &patch );
19513
19514                 if( major != DB_VERSION_MAJOR ||
19515                         minor < DB_VERSION_MINOR )
19516                 {
19517                         printf("Berkeley DB version mismatch\n"
19518                                 "\texpected: %s\n\tgot: %s\n",
19519                                 DB_VERSION_STRING, version);
19520                         return 1;
19521                 }
19522         }
19523 #endif
19524
19525 #if DB_VERSION_MAJOR > 2
19526         db_env_create( NULL, 0 );
19527 #elif DB_VERSION_MAJOR > 1
19528         db_appexit( NULL );
19529 #else
19530         (void) dbopen( NULL, 0, 0, 0, NULL);
19531 #endif
19532
19533 ; return 0; }
19534 EOF
19535 if { (eval echo configure:19536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19536   rm -rf conftest*
19537   ol_cv_db_db_1=yes
19538 else
19539   echo "configure: failed program was:" >&5
19540   cat conftest.$ac_ext >&5
19541   rm -rf conftest*
19542   ol_cv_db_db_1=no
19543 fi
19544 rm -f conftest*
19545
19546         LIBS="$ol_LIBS"
19547
19548 fi
19549
19550 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19551
19552         if test $ol_cv_db_db_1 = yes ; then
19553                 ol_cv_lib_db=-ldb-1
19554         fi
19555 fi
19556
19557
19558         if test "$ol_cv_lib_db" != no ; then
19559                 ol_cv_berkeley_db=yes
19560                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19561 echo "configure:19562: checking for Berkeley DB thread support" >&5
19562 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19563   echo $ac_n "(cached) $ac_c" 1>&6
19564 else
19565   
19566         ol_LIBS="$LIBS"
19567         LIBS="$LTHREAD_LIBS $LIBS"
19568         if test $ol_cv_lib_db != yes ; then
19569                 LIBS="$ol_cv_lib_db $LIBS"
19570         fi
19571
19572         if test "$cross_compiling" = yes; then
19573   ol_cv_berkeley_db_thread=cross
19574 else
19575   cat > conftest.$ac_ext <<EOF
19576 #line 19577 "configure"
19577 #include "confdefs.h"
19578
19579 #ifdef HAVE_DB_185_H
19580         choke me;
19581 #else
19582 #include <db.h>
19583 #endif
19584 #ifndef NULL
19585 #define NULL ((void *)0)
19586 #endif
19587 main()
19588 {
19589         int rc;
19590         u_int32_t flags = DB_CREATE |
19591 #ifdef DB_PRIVATE
19592                 DB_PRIVATE |
19593 #endif
19594                 DB_THREAD;
19595
19596 #if DB_VERSION_MAJOR > 2
19597         DB_ENV *env = NULL;
19598
19599         rc = db_env_create( &env, 0 );
19600
19601         flags |= DB_INIT_MPOOL;
19602 #ifdef DB_MPOOL_PRIVATE
19603         flags |= DB_MPOOL_PRIVATE;
19604 #endif
19605
19606         if( rc ) {
19607                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19608                 return rc;
19609         }
19610
19611 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19612         rc = env->open( env, NULL, flags, 0 );
19613 #else
19614         rc = env->open( env, NULL, NULL, flags, 0 );
19615 #endif
19616
19617         if ( rc == 0 ) {
19618                 rc = env->close( env, 0 );
19619         }
19620
19621         if( rc ) {
19622                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19623                 return rc;
19624         }
19625
19626 #else
19627         DB_ENV env;
19628         memset( &env, '\0', sizeof(env) );
19629
19630         rc = db_appinit( NULL, NULL, &env, flags );
19631
19632         if( rc == 0 ) {
19633                 db_appexit( &env );
19634         }
19635
19636         unlink("__db_mpool.share");
19637         unlink("__db_lock.share");
19638 #endif
19639
19640         return rc;
19641 }
19642 EOF
19643 if { (eval echo configure:19644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19644 then
19645   ol_cv_berkeley_db_thread=yes
19646 else
19647   echo "configure: failed program was:" >&5
19648   cat conftest.$ac_ext >&5
19649   rm -fr conftest*
19650   ol_cv_berkeley_db_thread=no
19651 fi
19652 rm -fr conftest*
19653 fi
19654
19655
19656         LIBS="$ol_LIBS"
19657
19658 fi
19659
19660 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19661
19662         if test $ol_cv_berkeley_db_thread != no ; then
19663                 cat >> confdefs.h <<\EOF
19664 #define HAVE_BERKELEY_DB_THREAD 1
19665 EOF
19666
19667         fi
19668
19669         fi
19670 fi
19671
19672         fi
19673
19674         if test $ol_cv_berkeley_db != no ; then
19675                 cat >> confdefs.h <<\EOF
19676 #define HAVE_BERKELEY_DB 1
19677 EOF
19678
19679
19680                 ol_link_ldbm=berkeley
19681                 ol_with_ldbm_api=berkeley
19682
19683                 if test $ol_with_ldbm_type = hash ; then
19684                         cat >> confdefs.h <<\EOF
19685 #define LDBM_USE_DBHASH 1
19686 EOF
19687
19688                 else
19689                         cat >> confdefs.h <<\EOF
19690 #define LDBM_USE_DBBTREE 1
19691 EOF
19692
19693                 fi
19694
19695                                                 if test $ol_cv_lib_db != yes ; then
19696                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19697                 fi
19698         fi
19699 fi
19700
19701 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19702         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19703 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19704         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19705 echo "configure:19706: checking Berkeley DB version for BDB backend" >&5
19706 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19707   echo $ac_n "(cached) $ac_c" 1>&6
19708 else
19709   
19710         cat > conftest.$ac_ext <<EOF
19711 #line 19712 "configure"
19712 #include "confdefs.h"
19713
19714 #include <db.h>
19715
19716  /* this check could be improved */
19717 #ifndef DB_VERSION_MAJOR
19718 #       define DB_VERSION_MAJOR 1
19719 #endif
19720 #ifndef DB_VERSION_MINOR
19721 #       define DB_VERSION_MINOR 0
19722 #endif
19723
19724 /* require 4.1 or later */
19725 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19726         __db_version_compat
19727 #endif
19728         
19729 EOF
19730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19731   egrep "__db_version_compat" >/dev/null 2>&1; then
19732   rm -rf conftest*
19733   ol_cv_bdb_compat=yes
19734 else
19735   rm -rf conftest*
19736   ol_cv_bdb_compat=no
19737 fi
19738 rm -f conftest*
19739
19740 fi
19741
19742 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19743
19744
19745         if test $ol_cv_bdb_compat = yes ; then
19746                 ol_enable_bdb=yes
19747         elif test $ol_enable_bdb = yes ; then
19748                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19749         else
19750                 ol_enable_bdb=no
19751         fi
19752 fi
19753
19754 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19755         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19756         ol_with_ldbm_api=none
19757 fi
19758
19759 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19760         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19761 echo "configure:19762: checking for MDBM library" >&5
19762 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19763   echo $ac_n "(cached) $ac_c" 1>&6
19764 else
19765         ol_LIBS="$LIBS"
19766         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19767 echo "configure:19768: checking for mdbm_set_chain" >&5
19768 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19769   echo $ac_n "(cached) $ac_c" 1>&6
19770 else
19771   cat > conftest.$ac_ext <<EOF
19772 #line 19773 "configure"
19773 #include "confdefs.h"
19774 /* System header to define __stub macros and hopefully few prototypes,
19775     which can conflict with char mdbm_set_chain(); below.  */
19776 #include <assert.h>
19777 /* Override any gcc2 internal prototype to avoid an error.  */
19778 /* We use char because int might match the return type of a gcc2
19779     builtin and then its argument prototype would still apply.  */
19780 char mdbm_set_chain();
19781 char (*f)();
19782
19783 int main() {
19784
19785 /* The GNU C library defines this for functions which it implements
19786     to always fail with ENOSYS.  Some functions are actually named
19787     something starting with __ and the normal name is an alias.  */
19788 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19789 choke me
19790 #else
19791 f = mdbm_set_chain;
19792 #endif
19793
19794 ; return 0; }
19795 EOF
19796 if { (eval echo configure:19797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19797   rm -rf conftest*
19798   eval "ac_cv_func_mdbm_set_chain=yes"
19799 else
19800   echo "configure: failed program was:" >&5
19801   cat conftest.$ac_ext >&5
19802   rm -rf conftest*
19803   eval "ac_cv_func_mdbm_set_chain=no"
19804 fi
19805 rm -f conftest*
19806 fi
19807
19808 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19809   echo "$ac_t""yes" 1>&6
19810   ol_cv_lib_mdbm=yes
19811 else
19812   echo "$ac_t""no" 1>&6
19813
19814                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19815 echo "configure:19816: checking for mdbm_set_chain in -lmdbm" >&5
19816 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19817 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19818   echo $ac_n "(cached) $ac_c" 1>&6
19819 else
19820   ac_save_LIBS="$LIBS"
19821 LIBS="-lmdbm  $LIBS"
19822 cat > conftest.$ac_ext <<EOF
19823 #line 19824 "configure"
19824 #include "confdefs.h"
19825 /* Override any gcc2 internal prototype to avoid an error.  */
19826 /* We use char because int might match the return type of a gcc2
19827     builtin and then its argument prototype would still apply.  */
19828 char mdbm_set_chain();
19829
19830 int main() {
19831 mdbm_set_chain()
19832 ; return 0; }
19833 EOF
19834 if { (eval echo configure:19835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19835   rm -rf conftest*
19836   eval "ac_cv_lib_$ac_lib_var=yes"
19837 else
19838   echo "configure: failed program was:" >&5
19839   cat conftest.$ac_ext >&5
19840   rm -rf conftest*
19841   eval "ac_cv_lib_$ac_lib_var=no"
19842 fi
19843 rm -f conftest*
19844 LIBS="$ac_save_LIBS"
19845
19846 fi
19847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19848   echo "$ac_t""yes" 1>&6
19849   ol_cv_lib_mdbm=-lmdbm
19850 else
19851   echo "$ac_t""no" 1>&6
19852 ol_cv_lib_mdbm=no
19853 fi
19854
19855         
19856 fi
19857
19858         LIBS="$ol_LIBS"
19859
19860 fi
19861
19862 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19863
19864
19865  for ac_hdr in mdbm.h
19866 do
19867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19869 echo "configure:19870: checking for $ac_hdr" >&5
19870 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19871   echo $ac_n "(cached) $ac_c" 1>&6
19872 else
19873   cat > conftest.$ac_ext <<EOF
19874 #line 19875 "configure"
19875 #include "confdefs.h"
19876 #include <$ac_hdr>
19877 EOF
19878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19879 { (eval echo configure:19880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19881 if test -z "$ac_err"; then
19882   rm -rf conftest*
19883   eval "ac_cv_header_$ac_safe=yes"
19884 else
19885   echo "$ac_err" >&5
19886   echo "configure: failed program was:" >&5
19887   cat conftest.$ac_ext >&5
19888   rm -rf conftest*
19889   eval "ac_cv_header_$ac_safe=no"
19890 fi
19891 rm -f conftest*
19892 fi
19893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19894   echo "$ac_t""yes" 1>&6
19895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19896   cat >> confdefs.h <<EOF
19897 #define $ac_tr_hdr 1
19898 EOF
19899  
19900 else
19901   echo "$ac_t""no" 1>&6
19902 fi
19903 done
19904
19905  echo $ac_n "checking for db""... $ac_c" 1>&6
19906 echo "configure:19907: checking for db" >&5
19907 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19908   echo $ac_n "(cached) $ac_c" 1>&6
19909 else
19910   
19911         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19912                 ol_cv_mdbm=no
19913         else
19914                 ol_cv_mdbm=yes
19915         fi
19916
19917 fi
19918
19919 echo "$ac_t""$ol_cv_mdbm" 1>&6
19920  if test $ol_cv_mdbm = yes ; then
19921         cat >> confdefs.h <<\EOF
19922 #define HAVE_MDBM 1
19923 EOF
19924
19925  fi
19926
19927
19928         if test $ol_cv_mdbm = yes ; then
19929                 ol_link_ldbm=mdbm
19930                 ol_with_ldbm_api=mdbm
19931                 if test $ol_cv_lib_mdbm != yes ; then
19932                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19933                 fi
19934         fi
19935 fi
19936
19937 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19938         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19939 echo "configure:19940: checking for GDBM library" >&5
19940 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19941   echo $ac_n "(cached) $ac_c" 1>&6
19942 else
19943         ol_LIBS="$LIBS"
19944         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19945 echo "configure:19946: checking for gdbm_open" >&5
19946 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19947   echo $ac_n "(cached) $ac_c" 1>&6
19948 else
19949   cat > conftest.$ac_ext <<EOF
19950 #line 19951 "configure"
19951 #include "confdefs.h"
19952 /* System header to define __stub macros and hopefully few prototypes,
19953     which can conflict with char gdbm_open(); below.  */
19954 #include <assert.h>
19955 /* Override any gcc2 internal prototype to avoid an error.  */
19956 /* We use char because int might match the return type of a gcc2
19957     builtin and then its argument prototype would still apply.  */
19958 char gdbm_open();
19959 char (*f)();
19960
19961 int main() {
19962
19963 /* The GNU C library defines this for functions which it implements
19964     to always fail with ENOSYS.  Some functions are actually named
19965     something starting with __ and the normal name is an alias.  */
19966 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19967 choke me
19968 #else
19969 f = gdbm_open;
19970 #endif
19971
19972 ; return 0; }
19973 EOF
19974 if { (eval echo configure:19975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19975   rm -rf conftest*
19976   eval "ac_cv_func_gdbm_open=yes"
19977 else
19978   echo "configure: failed program was:" >&5
19979   cat conftest.$ac_ext >&5
19980   rm -rf conftest*
19981   eval "ac_cv_func_gdbm_open=no"
19982 fi
19983 rm -f conftest*
19984 fi
19985
19986 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19987   echo "$ac_t""yes" 1>&6
19988   ol_cv_lib_gdbm=yes
19989 else
19990   echo "$ac_t""no" 1>&6
19991
19992                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19993 echo "configure:19994: checking for gdbm_open in -lgdbm" >&5
19994 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19996   echo $ac_n "(cached) $ac_c" 1>&6
19997 else
19998   ac_save_LIBS="$LIBS"
19999 LIBS="-lgdbm  $LIBS"
20000 cat > conftest.$ac_ext <<EOF
20001 #line 20002 "configure"
20002 #include "confdefs.h"
20003 /* Override any gcc2 internal prototype to avoid an error.  */
20004 /* We use char because int might match the return type of a gcc2
20005     builtin and then its argument prototype would still apply.  */
20006 char gdbm_open();
20007
20008 int main() {
20009 gdbm_open()
20010 ; return 0; }
20011 EOF
20012 if { (eval echo configure:20013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20013   rm -rf conftest*
20014   eval "ac_cv_lib_$ac_lib_var=yes"
20015 else
20016   echo "configure: failed program was:" >&5
20017   cat conftest.$ac_ext >&5
20018   rm -rf conftest*
20019   eval "ac_cv_lib_$ac_lib_var=no"
20020 fi
20021 rm -f conftest*
20022 LIBS="$ac_save_LIBS"
20023
20024 fi
20025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20026   echo "$ac_t""yes" 1>&6
20027   ol_cv_lib_gdbm=-lgdbm
20028 else
20029   echo "$ac_t""no" 1>&6
20030 ol_cv_lib_gdbm=no
20031 fi
20032
20033         
20034 fi
20035
20036         LIBS="$ol_LIBS"
20037
20038 fi
20039
20040 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20041
20042
20043  for ac_hdr in gdbm.h
20044 do
20045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20047 echo "configure:20048: checking for $ac_hdr" >&5
20048 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20049   echo $ac_n "(cached) $ac_c" 1>&6
20050 else
20051   cat > conftest.$ac_ext <<EOF
20052 #line 20053 "configure"
20053 #include "confdefs.h"
20054 #include <$ac_hdr>
20055 EOF
20056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20057 { (eval echo configure:20058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20059 if test -z "$ac_err"; then
20060   rm -rf conftest*
20061   eval "ac_cv_header_$ac_safe=yes"
20062 else
20063   echo "$ac_err" >&5
20064   echo "configure: failed program was:" >&5
20065   cat conftest.$ac_ext >&5
20066   rm -rf conftest*
20067   eval "ac_cv_header_$ac_safe=no"
20068 fi
20069 rm -f conftest*
20070 fi
20071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20072   echo "$ac_t""yes" 1>&6
20073     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20074   cat >> confdefs.h <<EOF
20075 #define $ac_tr_hdr 1
20076 EOF
20077  
20078 else
20079   echo "$ac_t""no" 1>&6
20080 fi
20081 done
20082
20083  echo $ac_n "checking for db""... $ac_c" 1>&6
20084 echo "configure:20085: checking for db" >&5
20085 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20086   echo $ac_n "(cached) $ac_c" 1>&6
20087 else
20088   
20089         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20090                 ol_cv_gdbm=no
20091         else
20092                 ol_cv_gdbm=yes
20093         fi
20094
20095 fi
20096
20097 echo "$ac_t""$ol_cv_gdbm" 1>&6
20098  if test $ol_cv_gdbm = yes ; then
20099         cat >> confdefs.h <<\EOF
20100 #define HAVE_GDBM 1
20101 EOF
20102
20103  fi
20104
20105
20106         if test $ol_cv_gdbm = yes ; then
20107                 ol_link_ldbm=gdbm
20108                 ol_with_ldbm_api=gdbm
20109
20110                 if test $ol_cv_lib_gdbm != yes ; then
20111                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20112                 fi
20113         fi
20114 fi
20115
20116 if test $ol_with_ldbm_api = ndbm ; then
20117         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20118 echo "configure:20119: checking for NDBM library" >&5
20119 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20120   echo $ac_n "(cached) $ac_c" 1>&6
20121 else
20122         ol_LIBS="$LIBS"
20123         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20124 echo "configure:20125: checking for dbm_open" >&5
20125 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20126   echo $ac_n "(cached) $ac_c" 1>&6
20127 else
20128   cat > conftest.$ac_ext <<EOF
20129 #line 20130 "configure"
20130 #include "confdefs.h"
20131 /* System header to define __stub macros and hopefully few prototypes,
20132     which can conflict with char dbm_open(); below.  */
20133 #include <assert.h>
20134 /* Override any gcc2 internal prototype to avoid an error.  */
20135 /* We use char because int might match the return type of a gcc2
20136     builtin and then its argument prototype would still apply.  */
20137 char dbm_open();
20138 char (*f)();
20139
20140 int main() {
20141
20142 /* The GNU C library defines this for functions which it implements
20143     to always fail with ENOSYS.  Some functions are actually named
20144     something starting with __ and the normal name is an alias.  */
20145 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20146 choke me
20147 #else
20148 f = dbm_open;
20149 #endif
20150
20151 ; return 0; }
20152 EOF
20153 if { (eval echo configure:20154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20154   rm -rf conftest*
20155   eval "ac_cv_func_dbm_open=yes"
20156 else
20157   echo "configure: failed program was:" >&5
20158   cat conftest.$ac_ext >&5
20159   rm -rf conftest*
20160   eval "ac_cv_func_dbm_open=no"
20161 fi
20162 rm -f conftest*
20163 fi
20164
20165 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20166   echo "$ac_t""yes" 1>&6
20167   ol_cv_lib_ndbm=yes
20168 else
20169   echo "$ac_t""no" 1>&6
20170
20171                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20172 echo "configure:20173: checking for dbm_open in -lndbm" >&5
20173 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20174 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20175   echo $ac_n "(cached) $ac_c" 1>&6
20176 else
20177   ac_save_LIBS="$LIBS"
20178 LIBS="-lndbm  $LIBS"
20179 cat > conftest.$ac_ext <<EOF
20180 #line 20181 "configure"
20181 #include "confdefs.h"
20182 /* Override any gcc2 internal prototype to avoid an error.  */
20183 /* We use char because int might match the return type of a gcc2
20184     builtin and then its argument prototype would still apply.  */
20185 char dbm_open();
20186
20187 int main() {
20188 dbm_open()
20189 ; return 0; }
20190 EOF
20191 if { (eval echo configure:20192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20192   rm -rf conftest*
20193   eval "ac_cv_lib_$ac_lib_var=yes"
20194 else
20195   echo "configure: failed program was:" >&5
20196   cat conftest.$ac_ext >&5
20197   rm -rf conftest*
20198   eval "ac_cv_lib_$ac_lib_var=no"
20199 fi
20200 rm -f conftest*
20201 LIBS="$ac_save_LIBS"
20202
20203 fi
20204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20205   echo "$ac_t""yes" 1>&6
20206   ol_cv_lib_ndbm=-lndbm
20207 else
20208   echo "$ac_t""no" 1>&6
20209
20210                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20211 echo "configure:20212: checking for dbm_open in -ldbm" >&5
20212 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20214   echo $ac_n "(cached) $ac_c" 1>&6
20215 else
20216   ac_save_LIBS="$LIBS"
20217 LIBS="-ldbm  $LIBS"
20218 cat > conftest.$ac_ext <<EOF
20219 #line 20220 "configure"
20220 #include "confdefs.h"
20221 /* Override any gcc2 internal prototype to avoid an error.  */
20222 /* We use char because int might match the return type of a gcc2
20223     builtin and then its argument prototype would still apply.  */
20224 char dbm_open();
20225
20226 int main() {
20227 dbm_open()
20228 ; return 0; }
20229 EOF
20230 if { (eval echo configure:20231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20231   rm -rf conftest*
20232   eval "ac_cv_lib_$ac_lib_var=yes"
20233 else
20234   echo "configure: failed program was:" >&5
20235   cat conftest.$ac_ext >&5
20236   rm -rf conftest*
20237   eval "ac_cv_lib_$ac_lib_var=no"
20238 fi
20239 rm -f conftest*
20240 LIBS="$ac_save_LIBS"
20241
20242 fi
20243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20244   echo "$ac_t""yes" 1>&6
20245   ol_cv_lib_ndbm=-ldbm
20246 else
20247   echo "$ac_t""no" 1>&6
20248 ol_cv_lib_ndbm=no
20249 fi
20250                 
20251 fi
20252
20253         
20254 fi
20255
20256         LIBS="$ol_LIBS"
20257
20258 fi
20259
20260 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20261
20262
20263  for ac_hdr in ndbm.h
20264 do
20265 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20266 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20267 echo "configure:20268: checking for $ac_hdr" >&5
20268 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20269   echo $ac_n "(cached) $ac_c" 1>&6
20270 else
20271   cat > conftest.$ac_ext <<EOF
20272 #line 20273 "configure"
20273 #include "confdefs.h"
20274 #include <$ac_hdr>
20275 EOF
20276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20277 { (eval echo configure:20278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20279 if test -z "$ac_err"; then
20280   rm -rf conftest*
20281   eval "ac_cv_header_$ac_safe=yes"
20282 else
20283   echo "$ac_err" >&5
20284   echo "configure: failed program was:" >&5
20285   cat conftest.$ac_ext >&5
20286   rm -rf conftest*
20287   eval "ac_cv_header_$ac_safe=no"
20288 fi
20289 rm -f conftest*
20290 fi
20291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20292   echo "$ac_t""yes" 1>&6
20293     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20294   cat >> confdefs.h <<EOF
20295 #define $ac_tr_hdr 1
20296 EOF
20297  
20298 else
20299   echo "$ac_t""no" 1>&6
20300 fi
20301 done
20302
20303  echo $ac_n "checking for db""... $ac_c" 1>&6
20304 echo "configure:20305: checking for db" >&5
20305 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20306   echo $ac_n "(cached) $ac_c" 1>&6
20307 else
20308   
20309         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20310                 ol_cv_ndbm=no
20311         else
20312                 ol_cv_ndbm=yes
20313         fi
20314
20315 fi
20316
20317 echo "$ac_t""$ol_cv_ndbm" 1>&6
20318  if test $ol_cv_ndbm = yes ; then
20319         cat >> confdefs.h <<\EOF
20320 #define HAVE_NDBM 1
20321 EOF
20322
20323  fi
20324
20325
20326         if test $ol_cv_ndbm = yes ; then
20327                 ol_link_ldbm=ndbm
20328                 ol_with_ldbm_api=ndbm
20329
20330                 if test $ol_cv_lib_ndbm != yes ; then
20331                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20332                 fi
20333         fi
20334 fi
20335
20336 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20337         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20338         if test $ol_enable_ldbm = yes ; then
20339                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20340         fi
20341
20342         echo "configure: warning: disabling LDBM" 1>&2
20343         ol_enable_ldbm=no
20344 fi
20345
20346
20347 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20348         BUILD_LIBS_DYNAMIC=shared
20349         cat >> confdefs.h <<\EOF
20350 #define LDAP_LIBS_DYNAMIC 1
20351 EOF
20352
20353         LTSTATIC=""
20354 else
20355         BUILD_LIBS_DYNAMIC=static
20356         LTSTATIC="-static"
20357 fi
20358
20359 if test $ol_enable_wrappers != no ; then
20360         for ac_hdr in tcpd.h
20361 do
20362 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20363 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20364 echo "configure:20365: checking for $ac_hdr" >&5
20365 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20366   echo $ac_n "(cached) $ac_c" 1>&6
20367 else
20368   cat > conftest.$ac_ext <<EOF
20369 #line 20370 "configure"
20370 #include "confdefs.h"
20371 #include <$ac_hdr>
20372 EOF
20373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20374 { (eval echo configure:20375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20376 if test -z "$ac_err"; then
20377   rm -rf conftest*
20378   eval "ac_cv_header_$ac_safe=yes"
20379 else
20380   echo "$ac_err" >&5
20381   echo "configure: failed program was:" >&5
20382   cat conftest.$ac_ext >&5
20383   rm -rf conftest*
20384   eval "ac_cv_header_$ac_safe=no"
20385 fi
20386 rm -f conftest*
20387 fi
20388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20389   echo "$ac_t""yes" 1>&6
20390     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20391   cat >> confdefs.h <<EOF
20392 #define $ac_tr_hdr 1
20393 EOF
20394  
20395                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20396 echo "configure:20397: checking for TCP wrappers library" >&5
20397                 save_LIBS="$LIBS"
20398                 LIBS="$LIBS -lwrap"
20399                 cat > conftest.$ac_ext <<EOF
20400 #line 20401 "configure"
20401 #include "confdefs.h"
20402
20403 #include <tcpd.h>
20404 int allow_severity = 0;
20405 int deny_severity  = 0;
20406
20407 struct request_info *req;
20408                 
20409 int main() {
20410
20411 hosts_access(req)
20412                 
20413 ; return 0; }
20414 EOF
20415 if { (eval echo configure:20416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20416   rm -rf conftest*
20417   echo "$ac_t""-lwrap" 1>&6
20418                 have_wrappers=yes
20419                 LIBS="$save_LIBS"
20420 else
20421   echo "configure: failed program was:" >&5
20422   cat conftest.$ac_ext >&5
20423   rm -rf conftest*
20424   
20425                                 LIBS="$LIBS -lnsl"
20426                 cat > conftest.$ac_ext <<EOF
20427 #line 20428 "configure"
20428 #include "confdefs.h"
20429
20430 #include <tcpd.h>
20431 int allow_severity = 0;
20432 int deny_severity  = 0;
20433
20434 struct request_info *req;
20435                 
20436 int main() {
20437
20438 hosts_access(req)
20439                 
20440 ; return 0; }
20441 EOF
20442 if { (eval echo configure:20443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20443   rm -rf conftest*
20444   echo "$ac_t""-lwrap -lnsl" 1>&6
20445                 have_wrappers=yes
20446                 LIBS="$save_LIBS -lnsl"
20447 else
20448   echo "configure: failed program was:" >&5
20449   cat conftest.$ac_ext >&5
20450   rm -rf conftest*
20451   
20452                 echo "$ac_t""no" 1>&6
20453                 have_wrappers=no
20454                 LIBS=$save_LIBS
20455 fi
20456 rm -f conftest*
20457 fi
20458 rm -f conftest*
20459 else
20460   echo "$ac_t""no" 1>&6
20461 have_wrappers=no
20462 fi
20463 done
20464
20465
20466         if test $have_wrappers = yes ; then
20467                 cat >> confdefs.h <<\EOF
20468 #define HAVE_TCPD 1
20469 EOF
20470
20471                 WRAP_LIBS="-lwrap"
20472         elif test $ol_enable_wrappers = yes ; then
20473                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
20474         else
20475                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20476                 WRAP_LIBS=""
20477         fi
20478 fi
20479
20480 if test $ol_enable_syslog != no ; then
20481         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20482 echo "configure:20483: checking for openlog" >&5
20483 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20484   echo $ac_n "(cached) $ac_c" 1>&6
20485 else
20486   cat > conftest.$ac_ext <<EOF
20487 #line 20488 "configure"
20488 #include "confdefs.h"
20489 /* System header to define __stub macros and hopefully few prototypes,
20490     which can conflict with char openlog(); below.  */
20491 #include <assert.h>
20492 /* Override any gcc2 internal prototype to avoid an error.  */
20493 /* We use char because int might match the return type of a gcc2
20494     builtin and then its argument prototype would still apply.  */
20495 char openlog();
20496 char (*f)();
20497
20498 int main() {
20499
20500 /* The GNU C library defines this for functions which it implements
20501     to always fail with ENOSYS.  Some functions are actually named
20502     something starting with __ and the normal name is an alias.  */
20503 #if defined (__stub_openlog) || defined (__stub___openlog)
20504 choke me
20505 #else
20506 f = openlog;
20507 #endif
20508
20509 ; return 0; }
20510 EOF
20511 if { (eval echo configure:20512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20512   rm -rf conftest*
20513   eval "ac_cv_func_openlog=yes"
20514 else
20515   echo "configure: failed program was:" >&5
20516   cat conftest.$ac_ext >&5
20517   rm -rf conftest*
20518   eval "ac_cv_func_openlog=no"
20519 fi
20520 rm -f conftest*
20521 fi
20522
20523 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20524   echo "$ac_t""yes" 1>&6
20525   :
20526 else
20527   echo "$ac_t""no" 1>&6
20528 fi
20529
20530         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20531                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20532         fi
20533         ol_enable_syslog=$ac_cv_func_openlog
20534 fi
20535
20536
20537 ol_link_sql=no
20538 if test $ol_enable_sql != no ; then
20539         for ac_hdr in sql.h sqlext.h
20540 do
20541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20543 echo "configure:20544: checking for $ac_hdr" >&5
20544 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20545   echo $ac_n "(cached) $ac_c" 1>&6
20546 else
20547   cat > conftest.$ac_ext <<EOF
20548 #line 20549 "configure"
20549 #include "confdefs.h"
20550 #include <$ac_hdr>
20551 EOF
20552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20553 { (eval echo configure:20554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20555 if test -z "$ac_err"; then
20556   rm -rf conftest*
20557   eval "ac_cv_header_$ac_safe=yes"
20558 else
20559   echo "$ac_err" >&5
20560   echo "configure: failed program was:" >&5
20561   cat conftest.$ac_ext >&5
20562   rm -rf conftest*
20563   eval "ac_cv_header_$ac_safe=no"
20564 fi
20565 rm -f conftest*
20566 fi
20567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20568   echo "$ac_t""yes" 1>&6
20569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20570   cat >> confdefs.h <<EOF
20571 #define $ac_tr_hdr 1
20572 EOF
20573  
20574 else
20575   echo "$ac_t""no" 1>&6
20576 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20577         
20578 fi
20579 done
20580
20581
20582         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20583 echo "configure:20584: checking for SQLDriverConnect in -liodbc" >&5
20584 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20586   echo $ac_n "(cached) $ac_c" 1>&6
20587 else
20588   ac_save_LIBS="$LIBS"
20589 LIBS="-liodbc  $LIBS"
20590 cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593 /* Override any gcc2 internal prototype to avoid an error.  */
20594 /* We use char because int might match the return type of a gcc2
20595     builtin and then its argument prototype would still apply.  */
20596 char SQLDriverConnect();
20597
20598 int main() {
20599 SQLDriverConnect()
20600 ; return 0; }
20601 EOF
20602 if { (eval echo configure:20603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20603   rm -rf conftest*
20604   eval "ac_cv_lib_$ac_lib_var=yes"
20605 else
20606   echo "configure: failed program was:" >&5
20607   cat conftest.$ac_ext >&5
20608   rm -rf conftest*
20609   eval "ac_cv_lib_$ac_lib_var=no"
20610 fi
20611 rm -f conftest*
20612 LIBS="$ac_save_LIBS"
20613
20614 fi
20615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20616   echo "$ac_t""yes" 1>&6
20617   have_iodbc=yes
20618 else
20619   echo "$ac_t""no" 1>&6
20620 have_iodbc=no
20621 fi
20622
20623         if test $have_iodbc = yes ; then
20624                 ol_link_sql="-liodbc"
20625         else
20626                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20627 echo "configure:20628: checking for SQLDriverConnect in -lodbc" >&5
20628 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   ac_save_LIBS="$LIBS"
20633 LIBS="-lodbc  $LIBS"
20634 cat > conftest.$ac_ext <<EOF
20635 #line 20636 "configure"
20636 #include "confdefs.h"
20637 /* Override any gcc2 internal prototype to avoid an error.  */
20638 /* We use char because int might match the return type of a gcc2
20639     builtin and then its argument prototype would still apply.  */
20640 char SQLDriverConnect();
20641
20642 int main() {
20643 SQLDriverConnect()
20644 ; return 0; }
20645 EOF
20646 if { (eval echo configure:20647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20647   rm -rf conftest*
20648   eval "ac_cv_lib_$ac_lib_var=yes"
20649 else
20650   echo "configure: failed program was:" >&5
20651   cat conftest.$ac_ext >&5
20652   rm -rf conftest*
20653   eval "ac_cv_lib_$ac_lib_var=no"
20654 fi
20655 rm -f conftest*
20656 LIBS="$ac_save_LIBS"
20657
20658 fi
20659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20660   echo "$ac_t""yes" 1>&6
20661   have_odbc=yes
20662 else
20663   echo "$ac_t""no" 1>&6
20664 have_odbc=no
20665 fi
20666
20667                 if test $have_odbc = yes ; then
20668                         ol_link_sql="-lodbc"
20669                 fi
20670         fi
20671
20672         if test $ol_link_sql != no ; then
20673                 SLAPD_SQL_LIBS="$ol_link_sql"
20674
20675         elif test $ol_enable_sql != auto ; then
20676                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20677         fi
20678 fi
20679
20680 ol_link_termcap=no
20681 for ac_hdr in termcap.h ncurses.h
20682 do
20683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20685 echo "configure:20686: checking for $ac_hdr" >&5
20686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20687   echo $ac_n "(cached) $ac_c" 1>&6
20688 else
20689   cat > conftest.$ac_ext <<EOF
20690 #line 20691 "configure"
20691 #include "confdefs.h"
20692 #include <$ac_hdr>
20693 EOF
20694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20695 { (eval echo configure:20696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20697 if test -z "$ac_err"; then
20698   rm -rf conftest*
20699   eval "ac_cv_header_$ac_safe=yes"
20700 else
20701   echo "$ac_err" >&5
20702   echo "configure: failed program was:" >&5
20703   cat conftest.$ac_ext >&5
20704   rm -rf conftest*
20705   eval "ac_cv_header_$ac_safe=no"
20706 fi
20707 rm -f conftest*
20708 fi
20709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20710   echo "$ac_t""yes" 1>&6
20711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20712   cat >> confdefs.h <<EOF
20713 #define $ac_tr_hdr 1
20714 EOF
20715  
20716 else
20717   echo "$ac_t""no" 1>&6
20718 fi
20719 done
20720
20721
20722 if test $ol_link_termcap = no ; then
20723         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20724 echo "configure:20725: checking for tputs in -ltermcap" >&5
20725 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20727   echo $ac_n "(cached) $ac_c" 1>&6
20728 else
20729   ac_save_LIBS="$LIBS"
20730 LIBS="-ltermcap  $LIBS"
20731 cat > conftest.$ac_ext <<EOF
20732 #line 20733 "configure"
20733 #include "confdefs.h"
20734 /* Override any gcc2 internal prototype to avoid an error.  */
20735 /* We use char because int might match the return type of a gcc2
20736     builtin and then its argument prototype would still apply.  */
20737 char tputs();
20738
20739 int main() {
20740 tputs()
20741 ; return 0; }
20742 EOF
20743 if { (eval echo configure:20744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20744   rm -rf conftest*
20745   eval "ac_cv_lib_$ac_lib_var=yes"
20746 else
20747   echo "configure: failed program was:" >&5
20748   cat conftest.$ac_ext >&5
20749   rm -rf conftest*
20750   eval "ac_cv_lib_$ac_lib_var=no"
20751 fi
20752 rm -f conftest*
20753 LIBS="$ac_save_LIBS"
20754
20755 fi
20756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20757   echo "$ac_t""yes" 1>&6
20758   have_termcap=yes
20759 else
20760   echo "$ac_t""no" 1>&6
20761 have_termcap=no
20762 fi
20763
20764         if test $have_termcap = yes ; then
20765                 cat >> confdefs.h <<\EOF
20766 #define HAVE_TERMCAP 1
20767 EOF
20768
20769                 ol_link_termcap=yes
20770                 TERMCAP_LIBS=-ltermcap
20771         fi
20772 fi
20773
20774 if test $ol_link_termcap = no ; then
20775         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20776 echo "configure:20777: checking for initscr in -lncurses" >&5
20777 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20779   echo $ac_n "(cached) $ac_c" 1>&6
20780 else
20781   ac_save_LIBS="$LIBS"
20782 LIBS="-lncurses  $LIBS"
20783 cat > conftest.$ac_ext <<EOF
20784 #line 20785 "configure"
20785 #include "confdefs.h"
20786 /* Override any gcc2 internal prototype to avoid an error.  */
20787 /* We use char because int might match the return type of a gcc2
20788     builtin and then its argument prototype would still apply.  */
20789 char initscr();
20790
20791 int main() {
20792 initscr()
20793 ; return 0; }
20794 EOF
20795 if { (eval echo configure:20796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20796   rm -rf conftest*
20797   eval "ac_cv_lib_$ac_lib_var=yes"
20798 else
20799   echo "configure: failed program was:" >&5
20800   cat conftest.$ac_ext >&5
20801   rm -rf conftest*
20802   eval "ac_cv_lib_$ac_lib_var=no"
20803 fi
20804 rm -f conftest*
20805 LIBS="$ac_save_LIBS"
20806
20807 fi
20808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20809   echo "$ac_t""yes" 1>&6
20810   have_ncurses=yes
20811 else
20812   echo "$ac_t""no" 1>&6
20813 have_ncurses=no
20814 fi
20815
20816         if test $have_ncurses = yes ; then
20817                 cat >> confdefs.h <<\EOF
20818 #define HAVE_NCURSES 1
20819 EOF
20820
20821                 ol_link_termcap=yes
20822                 TERMCAP_LIBS=-lncurses
20823         fi
20824 fi
20825
20826 if test $ol_link_termcap = no ; then
20827         cat >> confdefs.h <<\EOF
20828 #define NO_TERMCAP 1
20829 EOF
20830
20831         TERMCAP_LIBS=
20832 fi
20833
20834 ol_link_sasl=no
20835 ol_link_spasswd=no
20836 if test $ol_with_cyrus_sasl != no ; then
20837         for ac_hdr in sasl/sasl.h sasl.h
20838 do
20839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20841 echo "configure:20842: checking for $ac_hdr" >&5
20842 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20843   echo $ac_n "(cached) $ac_c" 1>&6
20844 else
20845   cat > conftest.$ac_ext <<EOF
20846 #line 20847 "configure"
20847 #include "confdefs.h"
20848 #include <$ac_hdr>
20849 EOF
20850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20851 { (eval echo configure:20852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20853 if test -z "$ac_err"; then
20854   rm -rf conftest*
20855   eval "ac_cv_header_$ac_safe=yes"
20856 else
20857   echo "$ac_err" >&5
20858   echo "configure: failed program was:" >&5
20859   cat conftest.$ac_ext >&5
20860   rm -rf conftest*
20861   eval "ac_cv_header_$ac_safe=no"
20862 fi
20863 rm -f conftest*
20864 fi
20865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20866   echo "$ac_t""yes" 1>&6
20867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20868   cat >> confdefs.h <<EOF
20869 #define $ac_tr_hdr 1
20870 EOF
20871  
20872 else
20873   echo "$ac_t""no" 1>&6
20874 fi
20875 done
20876
20877
20878         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20879                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20880 echo "configure:20881: checking for sasl_client_init in -lsasl2" >&5
20881 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20883   echo $ac_n "(cached) $ac_c" 1>&6
20884 else
20885   ac_save_LIBS="$LIBS"
20886 LIBS="-lsasl2  $LIBS"
20887 cat > conftest.$ac_ext <<EOF
20888 #line 20889 "configure"
20889 #include "confdefs.h"
20890 /* Override any gcc2 internal prototype to avoid an error.  */
20891 /* We use char because int might match the return type of a gcc2
20892     builtin and then its argument prototype would still apply.  */
20893 char sasl_client_init();
20894
20895 int main() {
20896 sasl_client_init()
20897 ; return 0; }
20898 EOF
20899 if { (eval echo configure:20900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20900   rm -rf conftest*
20901   eval "ac_cv_lib_$ac_lib_var=yes"
20902 else
20903   echo "configure: failed program was:" >&5
20904   cat conftest.$ac_ext >&5
20905   rm -rf conftest*
20906   eval "ac_cv_lib_$ac_lib_var=no"
20907 fi
20908 rm -f conftest*
20909 LIBS="$ac_save_LIBS"
20910
20911 fi
20912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20913   echo "$ac_t""yes" 1>&6
20914   ol_link_sasl="-lsasl2"
20915 else
20916   echo "$ac_t""no" 1>&6
20917 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20918 echo "configure:20919: checking for sasl_client_init in -lsasl" >&5
20919 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20921   echo $ac_n "(cached) $ac_c" 1>&6
20922 else
20923   ac_save_LIBS="$LIBS"
20924 LIBS="-lsasl  $LIBS"
20925 cat > conftest.$ac_ext <<EOF
20926 #line 20927 "configure"
20927 #include "confdefs.h"
20928 /* Override any gcc2 internal prototype to avoid an error.  */
20929 /* We use char because int might match the return type of a gcc2
20930     builtin and then its argument prototype would still apply.  */
20931 char sasl_client_init();
20932
20933 int main() {
20934 sasl_client_init()
20935 ; return 0; }
20936 EOF
20937 if { (eval echo configure:20938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20938   rm -rf conftest*
20939   eval "ac_cv_lib_$ac_lib_var=yes"
20940 else
20941   echo "configure: failed program was:" >&5
20942   cat conftest.$ac_ext >&5
20943   rm -rf conftest*
20944   eval "ac_cv_lib_$ac_lib_var=no"
20945 fi
20946 rm -f conftest*
20947 LIBS="$ac_save_LIBS"
20948
20949 fi
20950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20951   echo "$ac_t""yes" 1>&6
20952   ol_link_sasl="-lsasl"
20953 else
20954   echo "$ac_t""no" 1>&6
20955 fi
20956
20957 fi
20958
20959         fi
20960
20961         if test $ol_link_sasl = no ; then
20962                 if test $ol_with_cyrus_sasl != auto ; then
20963                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20964                 else
20965                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20966                         echo "configure: warning: SASL authentication not supported!" 1>&2
20967                         if test $ol_link_tls = no ; then
20968                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20969                         fi
20970                 fi
20971         else
20972                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20973 echo "configure:20974: checking Cyrus SASL library version" >&5
20974 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20975   echo $ac_n "(cached) $ac_c" 1>&6
20976 else
20977   
20978         cat > conftest.$ac_ext <<EOF
20979 #line 20980 "configure"
20980 #include "confdefs.h"
20981
20982 #ifdef HAVE_SASL_SASL_H
20983 #include <sasl/sasl.h>
20984 #else
20985 #include <sasl.h>
20986 #endif
20987
20988 /* require 2.1.3 or later */
20989 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20990         char *__sasl_compat = "1.5.x okay";
20991 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20992         char *__sasl_compat = "2.2+ or better okay (we guess)";
20993 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20994         && SASL_VERSION_STEP >=3
20995         char *__sasl_compat = "2.1.3+ or better okay";
20996 #endif
20997         
20998 EOF
20999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21000   egrep "__sasl_compat" >/dev/null 2>&1; then
21001   rm -rf conftest*
21002   ol_cv_sasl_compat=yes
21003 else
21004   rm -rf conftest*
21005   ol_cv_sasl_compat=no
21006 fi
21007 rm -f conftest*
21008
21009 fi
21010
21011 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21012
21013                 if test $ol_cv_sasl_compat = no ; then
21014                         ol_link_sasl=no
21015                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21016                 fi
21017
21018                 cat >> confdefs.h <<\EOF
21019 #define HAVE_CYRUS_SASL 1
21020 EOF
21021
21022                 SASL_LIBS="$ol_link_sasl"
21023                 if test $ol_enable_spasswd != no ; then
21024                         ol_link_spasswd=yes
21025                 fi
21026
21027                 ac_save_LIBS="$LIBS"
21028                 LIBS="$LIBS $ol_link_sasl"
21029                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21030 echo "configure:21031: checking for sasl_version" >&5
21031 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21032   echo $ac_n "(cached) $ac_c" 1>&6
21033 else
21034   cat > conftest.$ac_ext <<EOF
21035 #line 21036 "configure"
21036 #include "confdefs.h"
21037 /* System header to define __stub macros and hopefully few prototypes,
21038     which can conflict with char sasl_version(); below.  */
21039 #include <assert.h>
21040 /* Override any gcc2 internal prototype to avoid an error.  */
21041 /* We use char because int might match the return type of a gcc2
21042     builtin and then its argument prototype would still apply.  */
21043 char sasl_version();
21044 char (*f)();
21045
21046 int main() {
21047
21048 /* The GNU C library defines this for functions which it implements
21049     to always fail with ENOSYS.  Some functions are actually named
21050     something starting with __ and the normal name is an alias.  */
21051 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21052 choke me
21053 #else
21054 f = sasl_version;
21055 #endif
21056
21057 ; return 0; }
21058 EOF
21059 if { (eval echo configure:21060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21060   rm -rf conftest*
21061   eval "ac_cv_func_sasl_version=yes"
21062 else
21063   echo "configure: failed program was:" >&5
21064   cat conftest.$ac_ext >&5
21065   rm -rf conftest*
21066   eval "ac_cv_func_sasl_version=no"
21067 fi
21068 rm -f conftest*
21069 fi
21070
21071 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21072   echo "$ac_t""yes" 1>&6
21073   cat >> confdefs.h <<\EOF
21074 #define HAVE_SASL_VERSION 1
21075 EOF
21076
21077 else
21078   echo "$ac_t""no" 1>&6
21079 fi
21080
21081                 LIBS="$ac_save_LIBS"
21082         fi
21083
21084 else
21085         echo "configure: warning: SASL authentication not supported!" 1>&2
21086         if test $ol_link_tls = no ; then
21087                 echo "configure: warning: Strong authentication not supported!" 1>&2
21088         fi
21089 fi
21090
21091 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21092         dev=no
21093         if test -r /dev/urandom ; then
21094                 dev="/dev/urandom";
21095         elif test -r /idev/urandom ; then
21096                 dev="/idev/urandom";
21097         elif test -r /dev/srandom ; then
21098                 dev="/dev/srandom";
21099         elif test -r /dev/random ; then
21100                 dev="/dev/random";
21101         elif test -r /idev/random ; then
21102                 dev="/idev/random";
21103         fi
21104
21105         if test $dev != no ; then
21106                 cat >> confdefs.h <<EOF
21107 #define URANDOM_DEVICE "$dev"
21108 EOF
21109
21110         fi
21111 fi
21112
21113 ol_link_fetch=no
21114 if test $ol_with_fetch != no ; then
21115         ol_LIBS=$LIBS
21116 LIBS="-lfetch -lcom_err $LIBS"
21117 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21118 echo "configure:21119: checking fetch(3) library" >&5
21119 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21120   echo $ac_n "(cached) $ac_c" 1>&6
21121 else
21122   
21123         cat > conftest.$ac_ext <<EOF
21124 #line 21125 "configure"
21125 #include "confdefs.h"
21126
21127 #include <sys/param.h>
21128 #include <stdio.h>
21129 #include <fetch.h>
21130 int main() {
21131 struct url *u = fetchParseURL("file:///"); 
21132 ; return 0; }
21133 EOF
21134 if { (eval echo configure:21135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21135   rm -rf conftest*
21136   ol_cv_lib_fetch=yes
21137 else
21138   echo "configure: failed program was:" >&5
21139   cat conftest.$ac_ext >&5
21140   rm -rf conftest*
21141   ol_cv_lib_fetch=no
21142 fi
21143 rm -f conftest*
21144 fi
21145
21146 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21147 LIBS=$ol_LIBS
21148 if test $ol_cv_lib_fetch != no ; then
21149         ol_link_fetch="-lfetch -lcom_err"
21150         cat >> confdefs.h <<\EOF
21151 #define HAVE_FETCH 1
21152 EOF
21153
21154 fi
21155
21156
21157         if test $ol_cv_lib_fetch != no ; then
21158                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
21159                 ol_link_fetch=freebsd
21160
21161         elif test $ol_with_fetch != auto ; then
21162                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21163         fi 
21164 fi
21165
21166 ol_link_readline=no
21167 if test $ol_with_readline != no ; then
21168         for ac_hdr in readline/readline.h readline/history.h
21169 do
21170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21172 echo "configure:21173: checking for $ac_hdr" >&5
21173 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21174   echo $ac_n "(cached) $ac_c" 1>&6
21175 else
21176   cat > conftest.$ac_ext <<EOF
21177 #line 21178 "configure"
21178 #include "confdefs.h"
21179 #include <$ac_hdr>
21180 EOF
21181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21182 { (eval echo configure:21183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21184 if test -z "$ac_err"; then
21185   rm -rf conftest*
21186   eval "ac_cv_header_$ac_safe=yes"
21187 else
21188   echo "$ac_err" >&5
21189   echo "configure: failed program was:" >&5
21190   cat conftest.$ac_ext >&5
21191   rm -rf conftest*
21192   eval "ac_cv_header_$ac_safe=no"
21193 fi
21194 rm -f conftest*
21195 fi
21196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21197   echo "$ac_t""yes" 1>&6
21198     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21199   cat >> confdefs.h <<EOF
21200 #define $ac_tr_hdr 1
21201 EOF
21202  
21203 else
21204   echo "$ac_t""no" 1>&6
21205 fi
21206 done
21207
21208
21209         if test $ac_cv_header_readline_readline_h = yes ; then
21210                 save_LIBS="$LIBS"
21211                 LIBS="$TERMCAP_LIBS $LIBS"
21212                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
21213 echo "configure:21214: checking for readline in -lreadline" >&5
21214 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
21215 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21216   echo $ac_n "(cached) $ac_c" 1>&6
21217 else
21218   ac_save_LIBS="$LIBS"
21219 LIBS="-lreadline  $LIBS"
21220 cat > conftest.$ac_ext <<EOF
21221 #line 21222 "configure"
21222 #include "confdefs.h"
21223 /* Override any gcc2 internal prototype to avoid an error.  */
21224 /* We use char because int might match the return type of a gcc2
21225     builtin and then its argument prototype would still apply.  */
21226 char readline();
21227
21228 int main() {
21229 readline()
21230 ; return 0; }
21231 EOF
21232 if { (eval echo configure:21233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21233   rm -rf conftest*
21234   eval "ac_cv_lib_$ac_lib_var=yes"
21235 else
21236   echo "configure: failed program was:" >&5
21237   cat conftest.$ac_ext >&5
21238   rm -rf conftest*
21239   eval "ac_cv_lib_$ac_lib_var=no"
21240 fi
21241 rm -f conftest*
21242 LIBS="$ac_save_LIBS"
21243
21244 fi
21245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21246   echo "$ac_t""yes" 1>&6
21247   have_readline=yes
21248 else
21249   echo "$ac_t""no" 1>&6
21250 have_readline=no
21251 fi
21252
21253                 LIBS="$save_LIBS"
21254                         
21255                 if test $have_readline = yes ; then
21256                         ol_with_readline=found
21257                         ol_link_readline=yes
21258
21259                         READLINE_LIBS="-lreadline"
21260                 fi
21261         fi
21262 fi
21263
21264 if test $ol_link_readline = yes ; then
21265         cat >> confdefs.h <<\EOF
21266 #define HAVE_READLINE 1
21267 EOF
21268
21269 fi
21270
21271
21272 if test $ol_enable_crypt != no ; then
21273         save_LIBS="$LIBS"
21274         LIBS="$TLS_LIBS $LIBS"
21275
21276         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21277 echo "configure:21278: checking for crypt" >&5
21278 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21279   echo $ac_n "(cached) $ac_c" 1>&6
21280 else
21281   cat > conftest.$ac_ext <<EOF
21282 #line 21283 "configure"
21283 #include "confdefs.h"
21284 /* System header to define __stub macros and hopefully few prototypes,
21285     which can conflict with char crypt(); below.  */
21286 #include <assert.h>
21287 /* Override any gcc2 internal prototype to avoid an error.  */
21288 /* We use char because int might match the return type of a gcc2
21289     builtin and then its argument prototype would still apply.  */
21290 char crypt();
21291 char (*f)();
21292
21293 int main() {
21294
21295 /* The GNU C library defines this for functions which it implements
21296     to always fail with ENOSYS.  Some functions are actually named
21297     something starting with __ and the normal name is an alias.  */
21298 #if defined (__stub_crypt) || defined (__stub___crypt)
21299 choke me
21300 #else
21301 f = crypt;
21302 #endif
21303
21304 ; return 0; }
21305 EOF
21306 if { (eval echo configure:21307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21307   rm -rf conftest*
21308   eval "ac_cv_func_crypt=yes"
21309 else
21310   echo "configure: failed program was:" >&5
21311   cat conftest.$ac_ext >&5
21312   rm -rf conftest*
21313   eval "ac_cv_func_crypt=no"
21314 fi
21315 rm -f conftest*
21316 fi
21317
21318 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21319   echo "$ac_t""yes" 1>&6
21320   have_crypt=yes
21321 else
21322   echo "$ac_t""no" 1>&6
21323
21324                 LIBS="$save_LIBS"
21325                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21326 echo "configure:21327: checking for crypt in -lcrypt" >&5
21327 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21329   echo $ac_n "(cached) $ac_c" 1>&6
21330 else
21331   ac_save_LIBS="$LIBS"
21332 LIBS="-lcrypt  $LIBS"
21333 cat > conftest.$ac_ext <<EOF
21334 #line 21335 "configure"
21335 #include "confdefs.h"
21336 /* Override any gcc2 internal prototype to avoid an error.  */
21337 /* We use char because int might match the return type of a gcc2
21338     builtin and then its argument prototype would still apply.  */
21339 char crypt();
21340
21341 int main() {
21342 crypt()
21343 ; return 0; }
21344 EOF
21345 if { (eval echo configure:21346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21346   rm -rf conftest*
21347   eval "ac_cv_lib_$ac_lib_var=yes"
21348 else
21349   echo "configure: failed program was:" >&5
21350   cat conftest.$ac_ext >&5
21351   rm -rf conftest*
21352   eval "ac_cv_lib_$ac_lib_var=no"
21353 fi
21354 rm -f conftest*
21355 LIBS="$ac_save_LIBS"
21356
21357 fi
21358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21359   echo "$ac_t""yes" 1>&6
21360   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21361                         have_crypt=yes
21362 else
21363   echo "$ac_t""no" 1>&6
21364 have_crypt=no
21365 fi
21366
21367 fi
21368
21369
21370         LIBS="$save_LIBS"
21371
21372         if test $have_crypt = yes ; then
21373                 cat >> confdefs.h <<\EOF
21374 #define HAVE_CRYPT 1
21375 EOF
21376
21377         else
21378                 echo "configure: warning: could not find crypt" 1>&2
21379                 if test $ol_enable_crypt = yes ; then
21380                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21381                 fi
21382
21383                 echo "configure: warning: disabling crypt support" 1>&2
21384                 ol_enable_crypt=no
21385         fi
21386 fi
21387
21388 if test $ol_enable_proctitle != no ; then
21389         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21390 echo "configure:21391: checking for setproctitle" >&5
21391 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21392   echo $ac_n "(cached) $ac_c" 1>&6
21393 else
21394   cat > conftest.$ac_ext <<EOF
21395 #line 21396 "configure"
21396 #include "confdefs.h"
21397 /* System header to define __stub macros and hopefully few prototypes,
21398     which can conflict with char setproctitle(); below.  */
21399 #include <assert.h>
21400 /* Override any gcc2 internal prototype to avoid an error.  */
21401 /* We use char because int might match the return type of a gcc2
21402     builtin and then its argument prototype would still apply.  */
21403 char setproctitle();
21404 char (*f)();
21405
21406 int main() {
21407
21408 /* The GNU C library defines this for functions which it implements
21409     to always fail with ENOSYS.  Some functions are actually named
21410     something starting with __ and the normal name is an alias.  */
21411 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21412 choke me
21413 #else
21414 f = setproctitle;
21415 #endif
21416
21417 ; return 0; }
21418 EOF
21419 if { (eval echo configure:21420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21420   rm -rf conftest*
21421   eval "ac_cv_func_setproctitle=yes"
21422 else
21423   echo "configure: failed program was:" >&5
21424   cat conftest.$ac_ext >&5
21425   rm -rf conftest*
21426   eval "ac_cv_func_setproctitle=no"
21427 fi
21428 rm -f conftest*
21429 fi
21430
21431 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21432   echo "$ac_t""yes" 1>&6
21433   have_setproctitle=yes
21434 else
21435   echo "$ac_t""no" 1>&6
21436
21437                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21438 echo "configure:21439: checking for setproctitle in -lutil" >&5
21439 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21440 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21441   echo $ac_n "(cached) $ac_c" 1>&6
21442 else
21443   ac_save_LIBS="$LIBS"
21444 LIBS="-lutil  $LIBS"
21445 cat > conftest.$ac_ext <<EOF
21446 #line 21447 "configure"
21447 #include "confdefs.h"
21448 /* Override any gcc2 internal prototype to avoid an error.  */
21449 /* We use char because int might match the return type of a gcc2
21450     builtin and then its argument prototype would still apply.  */
21451 char setproctitle();
21452
21453 int main() {
21454 setproctitle()
21455 ; return 0; }
21456 EOF
21457 if { (eval echo configure:21458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21458   rm -rf conftest*
21459   eval "ac_cv_lib_$ac_lib_var=yes"
21460 else
21461   echo "configure: failed program was:" >&5
21462   cat conftest.$ac_ext >&5
21463   rm -rf conftest*
21464   eval "ac_cv_lib_$ac_lib_var=no"
21465 fi
21466 rm -f conftest*
21467 LIBS="$ac_save_LIBS"
21468
21469 fi
21470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21471   echo "$ac_t""yes" 1>&6
21472   have_setproctitle=yes
21473                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21474 else
21475   echo "$ac_t""no" 1>&6
21476 have_setproctitle=no
21477                         LIBOBJS="$LIBOBJS setproctitle.o"
21478                         LIBSRCS="$LIBSRCS setproctitle.c"
21479 fi
21480
21481 fi
21482
21483
21484         if test $have_setproctitle = yes ; then
21485                 cat >> confdefs.h <<\EOF
21486 #define HAVE_SETPROCTITLE 1
21487 EOF
21488
21489         fi
21490 fi
21491
21492 if test $ol_enable_slp != no ; then
21493         for ac_hdr in slp.h 
21494 do
21495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21497 echo "configure:21498: checking for $ac_hdr" >&5
21498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21499   echo $ac_n "(cached) $ac_c" 1>&6
21500 else
21501   cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 #include <$ac_hdr>
21505 EOF
21506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21507 { (eval echo configure:21508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21509 if test -z "$ac_err"; then
21510   rm -rf conftest*
21511   eval "ac_cv_header_$ac_safe=yes"
21512 else
21513   echo "$ac_err" >&5
21514   echo "configure: failed program was:" >&5
21515   cat conftest.$ac_ext >&5
21516   rm -rf conftest*
21517   eval "ac_cv_header_$ac_safe=no"
21518 fi
21519 rm -f conftest*
21520 fi
21521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21522   echo "$ac_t""yes" 1>&6
21523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21524   cat >> confdefs.h <<EOF
21525 #define $ac_tr_hdr 1
21526 EOF
21527  
21528 else
21529   echo "$ac_t""no" 1>&6
21530 fi
21531 done
21532
21533
21534         if test $ac_cv_header_slp_h = yes ; then
21535                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21536 echo "configure:21537: checking for SLPOpen in -lslp" >&5
21537 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21539   echo $ac_n "(cached) $ac_c" 1>&6
21540 else
21541   ac_save_LIBS="$LIBS"
21542 LIBS="-lslp  $LIBS"
21543 cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546 /* Override any gcc2 internal prototype to avoid an error.  */
21547 /* We use char because int might match the return type of a gcc2
21548     builtin and then its argument prototype would still apply.  */
21549 char SLPOpen();
21550
21551 int main() {
21552 SLPOpen()
21553 ; return 0; }
21554 EOF
21555 if { (eval echo configure:21556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21556   rm -rf conftest*
21557   eval "ac_cv_lib_$ac_lib_var=yes"
21558 else
21559   echo "configure: failed program was:" >&5
21560   cat conftest.$ac_ext >&5
21561   rm -rf conftest*
21562   eval "ac_cv_lib_$ac_lib_var=no"
21563 fi
21564 rm -f conftest*
21565 LIBS="$ac_save_LIBS"
21566
21567 fi
21568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21569   echo "$ac_t""yes" 1>&6
21570   have_slp=yes
21571 else
21572   echo "$ac_t""no" 1>&6
21573 have_slp=no
21574 fi
21575
21576                 if test $have_slp = yes ; then
21577                         cat >> confdefs.h <<\EOF
21578 #define HAVE_SLP 1
21579 EOF
21580
21581                         SLAPD_SLP_LIBS=-lslp
21582                 fi
21583
21584         elif test $ol_enable_slp = yes ; then
21585                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21586         fi
21587 fi
21588
21589 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21590 echo "configure:21591: checking for ANSI C header files" >&5
21591 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21592   echo $ac_n "(cached) $ac_c" 1>&6
21593 else
21594   cat > conftest.$ac_ext <<EOF
21595 #line 21596 "configure"
21596 #include "confdefs.h"
21597 #include <stdlib.h>
21598 #include <stdarg.h>
21599 #include <string.h>
21600 #include <float.h>
21601 EOF
21602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21603 { (eval echo configure:21604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21605 if test -z "$ac_err"; then
21606   rm -rf conftest*
21607   ac_cv_header_stdc=yes
21608 else
21609   echo "$ac_err" >&5
21610   echo "configure: failed program was:" >&5
21611   cat conftest.$ac_ext >&5
21612   rm -rf conftest*
21613   ac_cv_header_stdc=no
21614 fi
21615 rm -f conftest*
21616
21617 if test $ac_cv_header_stdc = yes; then
21618   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21619 cat > conftest.$ac_ext <<EOF
21620 #line 21621 "configure"
21621 #include "confdefs.h"
21622 #include <string.h>
21623 EOF
21624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21625   egrep "memchr" >/dev/null 2>&1; then
21626   :
21627 else
21628   rm -rf conftest*
21629   ac_cv_header_stdc=no
21630 fi
21631 rm -f conftest*
21632
21633 fi
21634
21635 if test $ac_cv_header_stdc = yes; then
21636   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21637 cat > conftest.$ac_ext <<EOF
21638 #line 21639 "configure"
21639 #include "confdefs.h"
21640 #include <stdlib.h>
21641 EOF
21642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21643   egrep "free" >/dev/null 2>&1; then
21644   :
21645 else
21646   rm -rf conftest*
21647   ac_cv_header_stdc=no
21648 fi
21649 rm -f conftest*
21650
21651 fi
21652
21653 if test $ac_cv_header_stdc = yes; then
21654   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21655 if test "$cross_compiling" = yes; then
21656   :
21657 else
21658   cat > conftest.$ac_ext <<EOF
21659 #line 21660 "configure"
21660 #include "confdefs.h"
21661 #include <ctype.h>
21662 #if ((' ' & 0x0FF) == 0x020)
21663 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21664 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21665 #else
21666 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21667  || ('j' <= (c) && (c) <= 'r') \
21668  || ('s' <= (c) && (c) <= 'z'))
21669 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21670 #endif
21671 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21672 int main () { int i; for (i = 0; i < 256; i++)
21673 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21674 exit (0); }
21675
21676 EOF
21677 if { (eval echo configure:21678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21678 then
21679   :
21680 else
21681   echo "configure: failed program was:" >&5
21682   cat conftest.$ac_ext >&5
21683   rm -fr conftest*
21684   ac_cv_header_stdc=no
21685 fi
21686 rm -fr conftest*
21687 fi
21688
21689 fi
21690 fi
21691
21692 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21693 if test $ac_cv_header_stdc = yes; then
21694   cat >> confdefs.h <<\EOF
21695 #define STDC_HEADERS 1
21696 EOF
21697
21698 fi
21699
21700 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21701 echo "configure:21702: checking for mode_t" >&5
21702 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21703   echo $ac_n "(cached) $ac_c" 1>&6
21704 else
21705   cat > conftest.$ac_ext <<EOF
21706 #line 21707 "configure"
21707 #include "confdefs.h"
21708 #include <sys/types.h>
21709 #if STDC_HEADERS
21710 #include <stdlib.h>
21711 #include <stddef.h>
21712 #endif
21713
21714 EOF
21715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21716   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21717   rm -rf conftest*
21718   eval "ac_cv_type_mode_t=yes"
21719 else
21720   rm -rf conftest*
21721   eval "ac_cv_type_mode_t=no"
21722 fi
21723 rm -f conftest*
21724
21725 fi
21726 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21727   echo "$ac_t""yes" 1>&6
21728 else
21729   echo "$ac_t""no" 1>&6
21730   cat >> confdefs.h <<EOF
21731 #define mode_t int
21732 EOF
21733
21734 fi
21735
21736 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21737 echo "configure:21738: checking for off_t" >&5
21738 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21739   echo $ac_n "(cached) $ac_c" 1>&6
21740 else
21741   cat > conftest.$ac_ext <<EOF
21742 #line 21743 "configure"
21743 #include "confdefs.h"
21744 #include <sys/types.h>
21745 #if STDC_HEADERS
21746 #include <stdlib.h>
21747 #include <stddef.h>
21748 #endif
21749
21750 EOF
21751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21752   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21753   rm -rf conftest*
21754   eval "ac_cv_type_off_t=yes"
21755 else
21756   rm -rf conftest*
21757   eval "ac_cv_type_off_t=no"
21758 fi
21759 rm -f conftest*
21760
21761 fi
21762 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21763   echo "$ac_t""yes" 1>&6
21764 else
21765   echo "$ac_t""no" 1>&6
21766   cat >> confdefs.h <<EOF
21767 #define off_t long
21768 EOF
21769
21770 fi
21771
21772 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21773 echo "configure:21774: checking for pid_t" >&5
21774 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 #include <sys/types.h>
21781 #if STDC_HEADERS
21782 #include <stdlib.h>
21783 #include <stddef.h>
21784 #endif
21785
21786 EOF
21787 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21788   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21789   rm -rf conftest*
21790   eval "ac_cv_type_pid_t=yes"
21791 else
21792   rm -rf conftest*
21793   eval "ac_cv_type_pid_t=no"
21794 fi
21795 rm -f conftest*
21796
21797 fi
21798 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21799   echo "$ac_t""yes" 1>&6
21800 else
21801   echo "$ac_t""no" 1>&6
21802   cat >> confdefs.h <<EOF
21803 #define pid_t int
21804 EOF
21805
21806 fi
21807
21808 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21809 echo "configure:21810: checking for ptrdiff_t" >&5
21810 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   cat > conftest.$ac_ext <<EOF
21814 #line 21815 "configure"
21815 #include "confdefs.h"
21816 #include <stddef.h>
21817 int main() {
21818 ptrdiff_t p
21819 ; return 0; }
21820 EOF
21821 if { (eval echo configure:21822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21822   rm -rf conftest*
21823   am_cv_type_ptrdiff_t=yes
21824 else
21825   echo "configure: failed program was:" >&5
21826   cat conftest.$ac_ext >&5
21827   rm -rf conftest*
21828   am_cv_type_ptrdiff_t=no
21829 fi
21830 rm -f conftest*
21831 fi
21832
21833 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21834    if test $am_cv_type_ptrdiff_t = yes; then
21835      cat >> confdefs.h <<\EOF
21836 #define HAVE_PTRDIFF_T 1
21837 EOF
21838
21839    fi
21840
21841 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21842 echo "configure:21843: checking return type of signal handlers" >&5
21843 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21844   echo $ac_n "(cached) $ac_c" 1>&6
21845 else
21846   cat > conftest.$ac_ext <<EOF
21847 #line 21848 "configure"
21848 #include "confdefs.h"
21849 #include <sys/types.h>
21850 #include <signal.h>
21851 #ifdef signal
21852 #undef signal
21853 #endif
21854 #ifdef __cplusplus
21855 extern "C" void (*signal (int, void (*)(int)))(int);
21856 #else
21857 void (*signal ()) ();
21858 #endif
21859
21860 int main() {
21861 int i;
21862 ; return 0; }
21863 EOF
21864 if { (eval echo configure:21865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21865   rm -rf conftest*
21866   ac_cv_type_signal=void
21867 else
21868   echo "configure: failed program was:" >&5
21869   cat conftest.$ac_ext >&5
21870   rm -rf conftest*
21871   ac_cv_type_signal=int
21872 fi
21873 rm -f conftest*
21874 fi
21875
21876 echo "$ac_t""$ac_cv_type_signal" 1>&6
21877 cat >> confdefs.h <<EOF
21878 #define RETSIGTYPE $ac_cv_type_signal
21879 EOF
21880
21881
21882 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21883 echo "configure:21884: checking for size_t" >&5
21884 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21885   echo $ac_n "(cached) $ac_c" 1>&6
21886 else
21887   cat > conftest.$ac_ext <<EOF
21888 #line 21889 "configure"
21889 #include "confdefs.h"
21890 #include <sys/types.h>
21891 #if STDC_HEADERS
21892 #include <stdlib.h>
21893 #include <stddef.h>
21894 #endif
21895
21896 EOF
21897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21898   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21899   rm -rf conftest*
21900   eval "ac_cv_type_size_t=yes"
21901 else
21902   rm -rf conftest*
21903   eval "ac_cv_type_size_t=no"
21904 fi
21905 rm -f conftest*
21906
21907 fi
21908 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21909   echo "$ac_t""yes" 1>&6
21910 else
21911   echo "$ac_t""no" 1>&6
21912   cat >> confdefs.h <<EOF
21913 #define size_t unsigned
21914 EOF
21915
21916 fi
21917
21918
21919 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21920 echo "configure:21921: checking for ssize_t" >&5
21921 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21922   echo $ac_n "(cached) $ac_c" 1>&6
21923 else
21924   cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 #include <sys/types.h>
21928 #if STDC_HEADERS
21929 #include <stdlib.h>
21930 #include <stddef.h>
21931 #endif
21932
21933 EOF
21934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21935   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21936   rm -rf conftest*
21937   eval "ac_cv_type_ssize_t=yes"
21938 else
21939   rm -rf conftest*
21940   eval "ac_cv_type_ssize_t=no"
21941 fi
21942 rm -f conftest*
21943
21944 fi
21945 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21946   echo "$ac_t""yes" 1>&6
21947 else
21948   echo "$ac_t""no" 1>&6
21949   cat >> confdefs.h <<EOF
21950 #define ssize_t signed int
21951 EOF
21952
21953 fi
21954
21955 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21956 echo "configure:21957: checking for caddr_t" >&5
21957 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21958   echo $ac_n "(cached) $ac_c" 1>&6
21959 else
21960   cat > conftest.$ac_ext <<EOF
21961 #line 21962 "configure"
21962 #include "confdefs.h"
21963 #include <sys/types.h>
21964 #if STDC_HEADERS
21965 #include <stdlib.h>
21966 #include <stddef.h>
21967 #endif
21968
21969 EOF
21970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21971   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21972   rm -rf conftest*
21973   eval "ac_cv_type_caddr_t=yes"
21974 else
21975   rm -rf conftest*
21976   eval "ac_cv_type_caddr_t=no"
21977 fi
21978 rm -f conftest*
21979
21980 fi
21981 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21982   echo "$ac_t""yes" 1>&6
21983 else
21984   echo "$ac_t""no" 1>&6
21985   cat >> confdefs.h <<EOF
21986 #define caddr_t char *
21987 EOF
21988
21989 fi
21990
21991
21992 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21993 echo "configure:21994: checking for socklen_t" >&5
21994 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21995   echo $ac_n "(cached) $ac_c" 1>&6
21996 else
21997   cat > conftest.$ac_ext <<EOF
21998 #line 21999 "configure"
21999 #include "confdefs.h"
22000
22001 #ifdef HAVE_SYS_TYPES_H
22002 #include <sys/types.h>
22003 #endif
22004 #ifdef HAVE_SYS_SOCKET_H
22005 #include <sys/socket.h>
22006 #endif
22007
22008 int main() {
22009 socklen_t len;
22010 ; return 0; }
22011 EOF
22012 if { (eval echo configure:22013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22013   rm -rf conftest*
22014   ol_cv_type_socklen_t=yes
22015 else
22016   echo "configure: failed program was:" >&5
22017   cat conftest.$ac_ext >&5
22018   rm -rf conftest*
22019   ol_cv_type_socklen_t=no
22020 fi
22021 rm -f conftest*
22022 fi
22023
22024 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22025   if test $ol_cv_type_socklen_t = no; then
22026     cat >> confdefs.h <<\EOF
22027 #define socklen_t int
22028 EOF
22029
22030   fi
22031  
22032 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22033 echo "configure:22034: checking for member st_blksize in aggregate type struct stat" >&5
22034 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22035   echo $ac_n "(cached) $ac_c" 1>&6
22036 else
22037   cat > conftest.$ac_ext <<EOF
22038 #line 22039 "configure"
22039 #include "confdefs.h"
22040 #include <sys/types.h>
22041 #include <sys/stat.h>
22042 int main() {
22043 struct stat foo; foo.st_blksize;
22044 ; return 0; }
22045 EOF
22046 if { (eval echo configure:22047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22047   rm -rf conftest*
22048   ac_cv_c_struct_member_st_blksize=yes
22049 else
22050   echo "configure: failed program was:" >&5
22051   cat conftest.$ac_ext >&5
22052   rm -rf conftest*
22053   ac_cv_c_struct_member_st_blksize=no
22054 fi
22055 rm -f conftest*
22056 fi
22057
22058 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22059 st_blksize="$ac_cv_c_struct_member_st_blksize"
22060 if test $ac_cv_c_struct_member_st_blksize = yes; then
22061   cat >> confdefs.h <<\EOF
22062 #define HAVE_ST_BLKSIZE 1
22063 EOF
22064
22065 fi
22066
22067 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22068 echo "configure:22069: checking whether time.h and sys/time.h may both be included" >&5
22069 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22070   echo $ac_n "(cached) $ac_c" 1>&6
22071 else
22072   cat > conftest.$ac_ext <<EOF
22073 #line 22074 "configure"
22074 #include "confdefs.h"
22075 #include <sys/types.h>
22076 #include <sys/time.h>
22077 #include <time.h>
22078 int main() {
22079 struct tm *tp;
22080 ; return 0; }
22081 EOF
22082 if { (eval echo configure:22083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22083   rm -rf conftest*
22084   ac_cv_header_time=yes
22085 else
22086   echo "configure: failed program was:" >&5
22087   cat conftest.$ac_ext >&5
22088   rm -rf conftest*
22089   ac_cv_header_time=no
22090 fi
22091 rm -f conftest*
22092 fi
22093
22094 echo "$ac_t""$ac_cv_header_time" 1>&6
22095 if test $ac_cv_header_time = yes; then
22096   cat >> confdefs.h <<\EOF
22097 #define TIME_WITH_SYS_TIME 1
22098 EOF
22099
22100 fi
22101
22102 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22103 echo "configure:22104: checking whether struct tm is in sys/time.h or time.h" >&5
22104 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22105   echo $ac_n "(cached) $ac_c" 1>&6
22106 else
22107   cat > conftest.$ac_ext <<EOF
22108 #line 22109 "configure"
22109 #include "confdefs.h"
22110 #include <sys/types.h>
22111 #include <time.h>
22112 int main() {
22113 struct tm *tp; tp->tm_sec;
22114 ; return 0; }
22115 EOF
22116 if { (eval echo configure:22117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22117   rm -rf conftest*
22118   ac_cv_struct_tm=time.h
22119 else
22120   echo "configure: failed program was:" >&5
22121   cat conftest.$ac_ext >&5
22122   rm -rf conftest*
22123   ac_cv_struct_tm=sys/time.h
22124 fi
22125 rm -f conftest*
22126 fi
22127
22128 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22129 if test $ac_cv_struct_tm = sys/time.h; then
22130   cat >> confdefs.h <<\EOF
22131 #define TM_IN_SYS_TIME 1
22132 EOF
22133
22134 fi
22135
22136 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22137 echo "configure:22138: checking for uid_t in sys/types.h" >&5
22138 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22139   echo $ac_n "(cached) $ac_c" 1>&6
22140 else
22141   cat > conftest.$ac_ext <<EOF
22142 #line 22143 "configure"
22143 #include "confdefs.h"
22144 #include <sys/types.h>
22145 EOF
22146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22147   egrep "uid_t" >/dev/null 2>&1; then
22148   rm -rf conftest*
22149   ac_cv_type_uid_t=yes
22150 else
22151   rm -rf conftest*
22152   ac_cv_type_uid_t=no
22153 fi
22154 rm -f conftest*
22155
22156 fi
22157
22158 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22159 if test $ac_cv_type_uid_t = no; then
22160   cat >> confdefs.h <<\EOF
22161 #define uid_t int
22162 EOF
22163
22164   cat >> confdefs.h <<\EOF
22165 #define gid_t int
22166 EOF
22167
22168 fi
22169
22170 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22171 echo "configure:22172: checking for sig_atomic_t" >&5
22172 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22173   echo $ac_n "(cached) $ac_c" 1>&6
22174 else
22175   cat > conftest.$ac_ext <<EOF
22176 #line 22177 "configure"
22177 #include "confdefs.h"
22178 #include <signal.h>
22179 int main() {
22180 sig_atomic_t atomic;
22181 ; return 0; }
22182 EOF
22183 if { (eval echo configure:22184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22184   rm -rf conftest*
22185   ol_cv_type_sig_atomic_t=yes
22186 else
22187   echo "configure: failed program was:" >&5
22188   cat conftest.$ac_ext >&5
22189   rm -rf conftest*
22190   ol_cv_type_sig_atomic_t=no
22191 fi
22192 rm -f conftest*
22193 fi
22194
22195 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22196   if test $ol_cv_type_sig_atomic_t = no; then
22197     cat >> confdefs.h <<\EOF
22198 #define sig_atomic_t int
22199 EOF
22200
22201   fi
22202  
22203
22204
22205 # test for pw_gecos in struct passwd
22206 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22207 echo "configure:22208: checking struct passwd for pw_gecos" >&5
22208 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22209   echo $ac_n "(cached) $ac_c" 1>&6
22210 else
22211   
22212         cat > conftest.$ac_ext <<EOF
22213 #line 22214 "configure"
22214 #include "confdefs.h"
22215 #include <pwd.h>
22216 int main() {
22217
22218         struct passwd pwd;
22219         pwd.pw_gecos = pwd.pw_name;
22220
22221 ; return 0; }
22222 EOF
22223 if { (eval echo configure:22224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22224   rm -rf conftest*
22225   ol_cv_struct_passwd_pw_gecos=yes
22226 else
22227   echo "configure: failed program was:" >&5
22228   cat conftest.$ac_ext >&5
22229   rm -rf conftest*
22230   ol_cv_struct_passwd_pw_gecos=no
22231 fi
22232 rm -f conftest*
22233 fi
22234
22235 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22236 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22237         cat >> confdefs.h <<\EOF
22238 #define HAVE_PW_GECOS 1
22239 EOF
22240
22241 fi
22242
22243 # test for pw_passwd in struct passwd
22244 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22245 echo "configure:22246: checking struct passwd for pw_passwd" >&5
22246 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22247   echo $ac_n "(cached) $ac_c" 1>&6
22248 else
22249   
22250         cat > conftest.$ac_ext <<EOF
22251 #line 22252 "configure"
22252 #include "confdefs.h"
22253 #include <pwd.h>
22254 int main() {
22255
22256         struct passwd pwd;
22257         pwd.pw_passwd = pwd.pw_name;
22258
22259 ; return 0; }
22260 EOF
22261 if { (eval echo configure:22262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22262   rm -rf conftest*
22263   ol_cv_struct_passwd_pw_passwd=yes
22264 else
22265   echo "configure: failed program was:" >&5
22266   cat conftest.$ac_ext >&5
22267   rm -rf conftest*
22268   ol_cv_struct_passwd_pw_passwd=no
22269 fi
22270 rm -f conftest*
22271 fi
22272
22273 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22274 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22275         cat >> confdefs.h <<\EOF
22276 #define HAVE_PW_PASSWD 1
22277 EOF
22278
22279 fi
22280
22281
22282 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22283 echo "configure:22284: checking if toupper() requires islower()" >&5
22284 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22285   echo $ac_n "(cached) $ac_c" 1>&6
22286 else
22287   
22288         if test "$cross_compiling" = yes; then
22289   ol_cv_c_upper_lower=safe
22290 else
22291   cat > conftest.$ac_ext <<EOF
22292 #line 22293 "configure"
22293 #include "confdefs.h"
22294
22295 #include <ctype.h>
22296 main()
22297 {
22298         if ('C' == toupper('C'))
22299                 exit(0);
22300         else
22301                 exit(1);
22302 }
22303 EOF
22304 if { (eval echo configure:22305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22305 then
22306   ol_cv_c_upper_lower=no
22307 else
22308   echo "configure: failed program was:" >&5
22309   cat conftest.$ac_ext >&5
22310   rm -fr conftest*
22311   ol_cv_c_upper_lower=yes
22312 fi
22313 rm -fr conftest*
22314 fi
22315
22316 fi
22317
22318 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22319 if test $ol_cv_c_upper_lower != no ; then
22320         cat >> confdefs.h <<\EOF
22321 #define C_UPPER_LOWER 1
22322 EOF
22323
22324 fi
22325
22326 echo $ac_n "checking for working const""... $ac_c" 1>&6
22327 echo "configure:22328: checking for working const" >&5
22328 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22329   echo $ac_n "(cached) $ac_c" 1>&6
22330 else
22331   cat > conftest.$ac_ext <<EOF
22332 #line 22333 "configure"
22333 #include "confdefs.h"
22334
22335 int main() {
22336
22337 /* Ultrix mips cc rejects this.  */
22338 typedef int charset[2]; const charset x;
22339 /* SunOS 4.1.1 cc rejects this.  */
22340 char const *const *ccp;
22341 char **p;
22342 /* NEC SVR4.0.2 mips cc rejects this.  */
22343 struct point {int x, y;};
22344 static struct point const zero = {0,0};
22345 /* AIX XL C 1.02.0.0 rejects this.
22346    It does not let you subtract one const X* pointer from another in an arm
22347    of an if-expression whose if-part is not a constant expression */
22348 const char *g = "string";
22349 ccp = &g + (g ? g-g : 0);
22350 /* HPUX 7.0 cc rejects these. */
22351 ++ccp;
22352 p = (char**) ccp;
22353 ccp = (char const *const *) p;
22354 { /* SCO 3.2v4 cc rejects this.  */
22355   char *t;
22356   char const *s = 0 ? (char *) 0 : (char const *) 0;
22357
22358   *t++ = 0;
22359 }
22360 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22361   int x[] = {25, 17};
22362   const int *foo = &x[0];
22363   ++foo;
22364 }
22365 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22366   typedef const int *iptr;
22367   iptr p = 0;
22368   ++p;
22369 }
22370 { /* AIX XL C 1.02.0.0 rejects this saying
22371      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22372   struct s { int j; const int *ap[3]; };
22373   struct s *b; b->j = 5;
22374 }
22375 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22376   const int foo = 10;
22377 }
22378
22379 ; return 0; }
22380 EOF
22381 if { (eval echo configure:22382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22382   rm -rf conftest*
22383   ac_cv_c_const=yes
22384 else
22385   echo "configure: failed program was:" >&5
22386   cat conftest.$ac_ext >&5
22387   rm -rf conftest*
22388   ac_cv_c_const=no
22389 fi
22390 rm -f conftest*
22391 fi
22392
22393 echo "$ac_t""$ac_cv_c_const" 1>&6
22394 if test $ac_cv_c_const = no; then
22395   cat >> confdefs.h <<\EOF
22396 #define const 
22397 EOF
22398
22399 fi
22400
22401 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22402 echo "configure:22403: checking if compiler understands volatile" >&5
22403 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22404   echo $ac_n "(cached) $ac_c" 1>&6
22405 else
22406   cat > conftest.$ac_ext <<EOF
22407 #line 22408 "configure"
22408 #include "confdefs.h"
22409 int x, y, z;
22410 int main() {
22411 volatile int a; int * volatile b = x ? &y : &z;
22412       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22413       *b = 0;
22414 ; return 0; }
22415 EOF
22416 if { (eval echo configure:22417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22417   rm -rf conftest*
22418   ol_cv_c_volatile=yes
22419 else
22420   echo "configure: failed program was:" >&5
22421   cat conftest.$ac_ext >&5
22422   rm -rf conftest*
22423   ol_cv_c_volatile=no
22424 fi
22425 rm -f conftest*
22426 fi
22427
22428 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22429   if test $ol_cv_c_volatile = yes; then
22430     : 
22431   else
22432     cat >> confdefs.h <<\EOF
22433 #define volatile 
22434 EOF
22435
22436   fi
22437  
22438
22439 if test $cross_compiling = yes ; then
22440         cat >> confdefs.h <<\EOF
22441 #define CROSS_COMPILING 1
22442 EOF
22443
22444 else
22445         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22446 echo "configure:22447: checking whether byte ordering is bigendian" >&5
22447 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22448   echo $ac_n "(cached) $ac_c" 1>&6
22449 else
22450   ac_cv_c_bigendian=unknown
22451 # See if sys/param.h defines the BYTE_ORDER macro.
22452 cat > conftest.$ac_ext <<EOF
22453 #line 22454 "configure"
22454 #include "confdefs.h"
22455 #include <sys/types.h>
22456 #include <sys/param.h>
22457 int main() {
22458
22459 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22460  bogus endian macros
22461 #endif
22462 ; return 0; }
22463 EOF
22464 if { (eval echo configure:22465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22465   rm -rf conftest*
22466   # It does; now see whether it defined to BIG_ENDIAN or not.
22467 cat > conftest.$ac_ext <<EOF
22468 #line 22469 "configure"
22469 #include "confdefs.h"
22470 #include <sys/types.h>
22471 #include <sys/param.h>
22472 int main() {
22473
22474 #if BYTE_ORDER != BIG_ENDIAN
22475  not big endian
22476 #endif
22477 ; return 0; }
22478 EOF
22479 if { (eval echo configure:22480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22480   rm -rf conftest*
22481   ac_cv_c_bigendian=yes
22482 else
22483   echo "configure: failed program was:" >&5
22484   cat conftest.$ac_ext >&5
22485   rm -rf conftest*
22486   ac_cv_c_bigendian=no
22487 fi
22488 rm -f conftest*
22489 else
22490   echo "configure: failed program was:" >&5
22491   cat conftest.$ac_ext >&5
22492 fi
22493 rm -f conftest*
22494 if test $ac_cv_c_bigendian = unknown; then
22495 if test "$cross_compiling" = yes; then
22496     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22497 else
22498   cat > conftest.$ac_ext <<EOF
22499 #line 22500 "configure"
22500 #include "confdefs.h"
22501 main () {
22502   /* Are we little or big endian?  From Harbison&Steele.  */
22503   union
22504   {
22505     long l;
22506     char c[sizeof (long)];
22507   } u;
22508   u.l = 1;
22509   exit (u.c[sizeof (long) - 1] == 1);
22510 }
22511 EOF
22512 if { (eval echo configure:22513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22513 then
22514   ac_cv_c_bigendian=no
22515 else
22516   echo "configure: failed program was:" >&5
22517   cat conftest.$ac_ext >&5
22518   rm -fr conftest*
22519   ac_cv_c_bigendian=yes
22520 fi
22521 rm -fr conftest*
22522 fi
22523
22524 fi
22525 fi
22526
22527 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22528 if test $ac_cv_c_bigendian = yes; then
22529   cat >> confdefs.h <<\EOF
22530 #define WORDS_BIGENDIAN 1
22531 EOF
22532
22533 fi
22534
22535 fi
22536
22537 echo $ac_n "checking size of short""... $ac_c" 1>&6
22538 echo "configure:22539: checking size of short" >&5 
22539 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22540   echo $ac_n "(cached) $ac_c" 1>&6
22541 else
22542   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22543   cat > conftest.$ac_ext <<EOF
22544 #line 22545 "configure"
22545 #include "confdefs.h"
22546 #include "confdefs.h" 
22547 #include <sys/types.h> 
22548  
22549
22550 int main() {
22551 switch (0) case 0: case (sizeof (short) == $ac_size):;
22552 ; return 0; }
22553 EOF
22554 if { (eval echo configure:22555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22555   rm -rf conftest*
22556   ac_cv_sizeof_short=$ac_size
22557 else
22558   echo "configure: failed program was:" >&5
22559   cat conftest.$ac_ext >&5
22560 fi
22561 rm -f conftest* 
22562   if test x$ac_cv_sizeof_short != x ; then break; fi 
22563 done 
22564
22565 fi
22566  
22567 if test x$ac_cv_sizeof_short = x ; then 
22568   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22569 fi 
22570 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22571 cat >> confdefs.h <<EOF
22572 #define SIZEOF_SHORT $ac_cv_sizeof_short
22573 EOF
22574  
22575  
22576 echo $ac_n "checking size of int""... $ac_c" 1>&6
22577 echo "configure:22578: checking size of int" >&5 
22578 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22579   echo $ac_n "(cached) $ac_c" 1>&6
22580 else
22581   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22582   cat > conftest.$ac_ext <<EOF
22583 #line 22584 "configure"
22584 #include "confdefs.h"
22585 #include "confdefs.h" 
22586 #include <sys/types.h> 
22587  
22588
22589 int main() {
22590 switch (0) case 0: case (sizeof (int) == $ac_size):;
22591 ; return 0; }
22592 EOF
22593 if { (eval echo configure:22594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22594   rm -rf conftest*
22595   ac_cv_sizeof_int=$ac_size
22596 else
22597   echo "configure: failed program was:" >&5
22598   cat conftest.$ac_ext >&5
22599 fi
22600 rm -f conftest* 
22601   if test x$ac_cv_sizeof_int != x ; then break; fi 
22602 done 
22603
22604 fi
22605  
22606 if test x$ac_cv_sizeof_int = x ; then 
22607   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22608 fi 
22609 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22610 cat >> confdefs.h <<EOF
22611 #define SIZEOF_INT $ac_cv_sizeof_int
22612 EOF
22613  
22614  
22615 echo $ac_n "checking size of long""... $ac_c" 1>&6
22616 echo "configure:22617: checking size of long" >&5 
22617 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22618   echo $ac_n "(cached) $ac_c" 1>&6
22619 else
22620   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22621   cat > conftest.$ac_ext <<EOF
22622 #line 22623 "configure"
22623 #include "confdefs.h"
22624 #include "confdefs.h" 
22625 #include <sys/types.h> 
22626  
22627
22628 int main() {
22629 switch (0) case 0: case (sizeof (long) == $ac_size):;
22630 ; return 0; }
22631 EOF
22632 if { (eval echo configure:22633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22633   rm -rf conftest*
22634   ac_cv_sizeof_long=$ac_size
22635 else
22636   echo "configure: failed program was:" >&5
22637   cat conftest.$ac_ext >&5
22638 fi
22639 rm -f conftest* 
22640   if test x$ac_cv_sizeof_long != x ; then break; fi 
22641 done 
22642
22643 fi
22644  
22645 if test x$ac_cv_sizeof_long = x ; then 
22646   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22647 fi 
22648 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22649 cat >> confdefs.h <<EOF
22650 #define SIZEOF_LONG $ac_cv_sizeof_long
22651 EOF
22652  
22653
22654
22655 if test "$ac_cv_sizeof_int" -lt 4 ; then
22656         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22657
22658         cat >> confdefs.h <<\EOF
22659 #define LBER_INT_T long
22660 EOF
22661
22662 else
22663         cat >> confdefs.h <<\EOF
22664 #define LBER_INT_T int
22665 EOF
22666
22667 fi
22668
22669 cat >> confdefs.h <<\EOF
22670 #define LBER_LEN_T long
22671 EOF
22672
22673 cat >> confdefs.h <<\EOF
22674 #define LBER_SOCKET_T int
22675 EOF
22676
22677 cat >> confdefs.h <<\EOF
22678 #define LBER_TAG_T long
22679 EOF
22680
22681
22682 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22683 echo "configure:22684: checking for 8-bit clean memcmp" >&5
22684 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22685   echo $ac_n "(cached) $ac_c" 1>&6
22686 else
22687   if test "$cross_compiling" = yes; then
22688   ac_cv_func_memcmp_clean=no
22689 else
22690   cat > conftest.$ac_ext <<EOF
22691 #line 22692 "configure"
22692 #include "confdefs.h"
22693
22694 main()
22695 {
22696   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22697   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22698 }
22699
22700 EOF
22701 if { (eval echo configure:22702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22702 then
22703   ac_cv_func_memcmp_clean=yes
22704 else
22705   echo "configure: failed program was:" >&5
22706   cat conftest.$ac_ext >&5
22707   rm -fr conftest*
22708   ac_cv_func_memcmp_clean=no
22709 fi
22710 rm -fr conftest*
22711 fi
22712
22713 fi
22714
22715 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22716 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22717
22718 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22719 echo "configure:22720: checking for strftime" >&5
22720 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22721   echo $ac_n "(cached) $ac_c" 1>&6
22722 else
22723   cat > conftest.$ac_ext <<EOF
22724 #line 22725 "configure"
22725 #include "confdefs.h"
22726 /* System header to define __stub macros and hopefully few prototypes,
22727     which can conflict with char strftime(); below.  */
22728 #include <assert.h>
22729 /* Override any gcc2 internal prototype to avoid an error.  */
22730 /* We use char because int might match the return type of a gcc2
22731     builtin and then its argument prototype would still apply.  */
22732 char strftime();
22733 char (*f)();
22734
22735 int main() {
22736
22737 /* The GNU C library defines this for functions which it implements
22738     to always fail with ENOSYS.  Some functions are actually named
22739     something starting with __ and the normal name is an alias.  */
22740 #if defined (__stub_strftime) || defined (__stub___strftime)
22741 choke me
22742 #else
22743 f = strftime;
22744 #endif
22745
22746 ; return 0; }
22747 EOF
22748 if { (eval echo configure:22749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22749   rm -rf conftest*
22750   eval "ac_cv_func_strftime=yes"
22751 else
22752   echo "configure: failed program was:" >&5
22753   cat conftest.$ac_ext >&5
22754   rm -rf conftest*
22755   eval "ac_cv_func_strftime=no"
22756 fi
22757 rm -f conftest*
22758 fi
22759
22760 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22761   echo "$ac_t""yes" 1>&6
22762   cat >> confdefs.h <<\EOF
22763 #define HAVE_STRFTIME 1
22764 EOF
22765
22766 else
22767   echo "$ac_t""no" 1>&6
22768 # strftime is in -lintl on SCO UNIX.
22769 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22770 echo "configure:22771: checking for strftime in -lintl" >&5
22771 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22772 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22773   echo $ac_n "(cached) $ac_c" 1>&6
22774 else
22775   ac_save_LIBS="$LIBS"
22776 LIBS="-lintl  $LIBS"
22777 cat > conftest.$ac_ext <<EOF
22778 #line 22779 "configure"
22779 #include "confdefs.h"
22780 /* Override any gcc2 internal prototype to avoid an error.  */
22781 /* We use char because int might match the return type of a gcc2
22782     builtin and then its argument prototype would still apply.  */
22783 char strftime();
22784
22785 int main() {
22786 strftime()
22787 ; return 0; }
22788 EOF
22789 if { (eval echo configure:22790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22790   rm -rf conftest*
22791   eval "ac_cv_lib_$ac_lib_var=yes"
22792 else
22793   echo "configure: failed program was:" >&5
22794   cat conftest.$ac_ext >&5
22795   rm -rf conftest*
22796   eval "ac_cv_lib_$ac_lib_var=no"
22797 fi
22798 rm -f conftest*
22799 LIBS="$ac_save_LIBS"
22800
22801 fi
22802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22803   echo "$ac_t""yes" 1>&6
22804   cat >> confdefs.h <<\EOF
22805 #define HAVE_STRFTIME 1
22806 EOF
22807
22808 LIBS="-lintl $LIBS"
22809 else
22810   echo "$ac_t""no" 1>&6
22811 fi
22812
22813 fi
22814
22815
22816 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22817 echo "configure:22818: checking for inet_aton()" >&5
22818 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22819   echo $ac_n "(cached) $ac_c" 1>&6
22820 else
22821   cat > conftest.$ac_ext <<EOF
22822 #line 22823 "configure"
22823 #include "confdefs.h"
22824
22825 #ifdef HAVE_SYS_TYPES_H
22826 #       include <sys/types.h>
22827 #endif
22828 #ifdef HAVE_SYS_SOCKET_H
22829 #       include <sys/socket.h>
22830 #       ifdef HAVE_SYS_SELECT_H
22831 #               include <sys/select.h>
22832 #       endif
22833 #       include <netinet/in.h>
22834 #       ifdef HAVE_ARPA_INET_H
22835 #               include <arpa/inet.h>
22836 #       endif
22837 #endif
22838
22839 int main() {
22840 struct in_addr in;
22841 int rc = inet_aton( "255.255.255.255", &in );
22842 ; return 0; }
22843 EOF
22844 if { (eval echo configure:22845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22845   rm -rf conftest*
22846   ol_cv_func_inet_aton=yes
22847 else
22848   echo "configure: failed program was:" >&5
22849   cat conftest.$ac_ext >&5
22850   rm -rf conftest*
22851   ol_cv_func_inet_aton=no
22852 fi
22853 rm -f conftest*
22854 fi
22855
22856 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22857   if test $ol_cv_func_inet_aton != no; then
22858     cat >> confdefs.h <<\EOF
22859 #define HAVE_INET_ATON 1
22860 EOF
22861
22862   fi
22863  
22864
22865 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22866 echo "configure:22867: checking for _spawnlp" >&5
22867 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22868   echo $ac_n "(cached) $ac_c" 1>&6
22869 else
22870   cat > conftest.$ac_ext <<EOF
22871 #line 22872 "configure"
22872 #include "confdefs.h"
22873 /* System header to define __stub macros and hopefully few prototypes,
22874     which can conflict with char _spawnlp(); below.  */
22875 #include <assert.h>
22876 /* Override any gcc2 internal prototype to avoid an error.  */
22877 /* We use char because int might match the return type of a gcc2
22878     builtin and then its argument prototype would still apply.  */
22879 char _spawnlp();
22880 char (*f)();
22881
22882 int main() {
22883
22884 /* The GNU C library defines this for functions which it implements
22885     to always fail with ENOSYS.  Some functions are actually named
22886     something starting with __ and the normal name is an alias.  */
22887 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22888 choke me
22889 #else
22890 f = _spawnlp;
22891 #endif
22892
22893 ; return 0; }
22894 EOF
22895 if { (eval echo configure:22896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22896   rm -rf conftest*
22897   eval "ac_cv_func__spawnlp=yes"
22898 else
22899   echo "configure: failed program was:" >&5
22900   cat conftest.$ac_ext >&5
22901   rm -rf conftest*
22902   eval "ac_cv_func__spawnlp=no"
22903 fi
22904 rm -f conftest*
22905 fi
22906
22907 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22908   echo "$ac_t""yes" 1>&6
22909   cat >> confdefs.h <<\EOF
22910 #define HAVE_SPAWNLP 1
22911 EOF
22912
22913 else
22914   echo "$ac_t""no" 1>&6
22915 fi
22916
22917
22918 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22919 echo "configure:22920: checking for _snprintf" >&5
22920 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22921   echo $ac_n "(cached) $ac_c" 1>&6
22922 else
22923   cat > conftest.$ac_ext <<EOF
22924 #line 22925 "configure"
22925 #include "confdefs.h"
22926 /* System header to define __stub macros and hopefully few prototypes,
22927     which can conflict with char _snprintf(); below.  */
22928 #include <assert.h>
22929 /* Override any gcc2 internal prototype to avoid an error.  */
22930 /* We use char because int might match the return type of a gcc2
22931     builtin and then its argument prototype would still apply.  */
22932 char _snprintf();
22933 char (*f)();
22934
22935 int main() {
22936
22937 /* The GNU C library defines this for functions which it implements
22938     to always fail with ENOSYS.  Some functions are actually named
22939     something starting with __ and the normal name is an alias.  */
22940 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22941 choke me
22942 #else
22943 f = _snprintf;
22944 #endif
22945
22946 ; return 0; }
22947 EOF
22948 if { (eval echo configure:22949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22949   rm -rf conftest*
22950   eval "ac_cv_func__snprintf=yes"
22951 else
22952   echo "configure: failed program was:" >&5
22953   cat conftest.$ac_ext >&5
22954   rm -rf conftest*
22955   eval "ac_cv_func__snprintf=no"
22956 fi
22957 rm -f conftest*
22958 fi
22959
22960 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22961   echo "$ac_t""yes" 1>&6
22962   ac_cv_func_snprintf=yes
22963         cat >> confdefs.h <<\EOF
22964 #define snprintf _snprintf
22965 EOF
22966
22967
22968 else
22969   echo "$ac_t""no" 1>&6
22970 fi
22971
22972
22973 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22974 echo "configure:22975: checking for _vsnprintf" >&5
22975 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22976   echo $ac_n "(cached) $ac_c" 1>&6
22977 else
22978   cat > conftest.$ac_ext <<EOF
22979 #line 22980 "configure"
22980 #include "confdefs.h"
22981 /* System header to define __stub macros and hopefully few prototypes,
22982     which can conflict with char _vsnprintf(); below.  */
22983 #include <assert.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 _vsnprintf();
22988 char (*f)();
22989
22990 int main() {
22991
22992 /* The GNU C library defines this for functions which it implements
22993     to always fail with ENOSYS.  Some functions are actually named
22994     something starting with __ and the normal name is an alias.  */
22995 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22996 choke me
22997 #else
22998 f = _vsnprintf;
22999 #endif
23000
23001 ; return 0; }
23002 EOF
23003 if { (eval echo configure:23004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23004   rm -rf conftest*
23005   eval "ac_cv_func__vsnprintf=yes"
23006 else
23007   echo "configure: failed program was:" >&5
23008   cat conftest.$ac_ext >&5
23009   rm -rf conftest*
23010   eval "ac_cv_func__vsnprintf=no"
23011 fi
23012 rm -f conftest*
23013 fi
23014
23015 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23016   echo "$ac_t""yes" 1>&6
23017   ac_cv_func_vsnprintf=yes
23018         cat >> confdefs.h <<\EOF
23019 #define vsnprintf _vsnprintf
23020 EOF
23021
23022
23023 else
23024   echo "$ac_t""no" 1>&6
23025 fi
23026
23027
23028 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23029 echo "configure:23030: checking for vprintf" >&5
23030 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23031   echo $ac_n "(cached) $ac_c" 1>&6
23032 else
23033   cat > conftest.$ac_ext <<EOF
23034 #line 23035 "configure"
23035 #include "confdefs.h"
23036 /* System header to define __stub macros and hopefully few prototypes,
23037     which can conflict with char vprintf(); below.  */
23038 #include <assert.h>
23039 /* Override any gcc2 internal prototype to avoid an error.  */
23040 /* We use char because int might match the return type of a gcc2
23041     builtin and then its argument prototype would still apply.  */
23042 char vprintf();
23043 char (*f)();
23044
23045 int main() {
23046
23047 /* The GNU C library defines this for functions which it implements
23048     to always fail with ENOSYS.  Some functions are actually named
23049     something starting with __ and the normal name is an alias.  */
23050 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23051 choke me
23052 #else
23053 f = vprintf;
23054 #endif
23055
23056 ; return 0; }
23057 EOF
23058 if { (eval echo configure:23059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23059   rm -rf conftest*
23060   eval "ac_cv_func_vprintf=yes"
23061 else
23062   echo "configure: failed program was:" >&5
23063   cat conftest.$ac_ext >&5
23064   rm -rf conftest*
23065   eval "ac_cv_func_vprintf=no"
23066 fi
23067 rm -f conftest*
23068 fi
23069
23070 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23071   echo "$ac_t""yes" 1>&6
23072   cat >> confdefs.h <<\EOF
23073 #define HAVE_VPRINTF 1
23074 EOF
23075
23076 else
23077   echo "$ac_t""no" 1>&6
23078 fi
23079
23080 if test "$ac_cv_func_vprintf" != yes; then
23081 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23082 echo "configure:23083: checking for _doprnt" >&5
23083 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23084   echo $ac_n "(cached) $ac_c" 1>&6
23085 else
23086   cat > conftest.$ac_ext <<EOF
23087 #line 23088 "configure"
23088 #include "confdefs.h"
23089 /* System header to define __stub macros and hopefully few prototypes,
23090     which can conflict with char _doprnt(); below.  */
23091 #include <assert.h>
23092 /* Override any gcc2 internal prototype to avoid an error.  */
23093 /* We use char because int might match the return type of a gcc2
23094     builtin and then its argument prototype would still apply.  */
23095 char _doprnt();
23096 char (*f)();
23097
23098 int main() {
23099
23100 /* The GNU C library defines this for functions which it implements
23101     to always fail with ENOSYS.  Some functions are actually named
23102     something starting with __ and the normal name is an alias.  */
23103 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23104 choke me
23105 #else
23106 f = _doprnt;
23107 #endif
23108
23109 ; return 0; }
23110 EOF
23111 if { (eval echo configure:23112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23112   rm -rf conftest*
23113   eval "ac_cv_func__doprnt=yes"
23114 else
23115   echo "configure: failed program was:" >&5
23116   cat conftest.$ac_ext >&5
23117   rm -rf conftest*
23118   eval "ac_cv_func__doprnt=no"
23119 fi
23120 rm -f conftest*
23121 fi
23122
23123 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23124   echo "$ac_t""yes" 1>&6
23125   cat >> confdefs.h <<\EOF
23126 #define HAVE_DOPRNT 1
23127 EOF
23128
23129 else
23130   echo "$ac_t""no" 1>&6
23131 fi
23132
23133 fi
23134
23135
23136 if test $ac_cv_func_vprintf = yes ; then
23137                 for ac_func in snprintf vsnprintf
23138 do
23139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23140 echo "configure:23141: checking for $ac_func" >&5
23141 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23142   echo $ac_n "(cached) $ac_c" 1>&6
23143 else
23144   cat > conftest.$ac_ext <<EOF
23145 #line 23146 "configure"
23146 #include "confdefs.h"
23147 /* System header to define __stub macros and hopefully few prototypes,
23148     which can conflict with char $ac_func(); below.  */
23149 #include <assert.h>
23150 /* Override any gcc2 internal prototype to avoid an error.  */
23151 /* We use char because int might match the return type of a gcc2
23152     builtin and then its argument prototype would still apply.  */
23153 char $ac_func();
23154 char (*f)();
23155
23156 int main() {
23157
23158 /* The GNU C library defines this for functions which it implements
23159     to always fail with ENOSYS.  Some functions are actually named
23160     something starting with __ and the normal name is an alias.  */
23161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23162 choke me
23163 #else
23164 f = $ac_func;
23165 #endif
23166
23167 ; return 0; }
23168 EOF
23169 if { (eval echo configure:23170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23170   rm -rf conftest*
23171   eval "ac_cv_func_$ac_func=yes"
23172 else
23173   echo "configure: failed program was:" >&5
23174   cat conftest.$ac_ext >&5
23175   rm -rf conftest*
23176   eval "ac_cv_func_$ac_func=no"
23177 fi
23178 rm -f conftest*
23179 fi
23180
23181 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23182   echo "$ac_t""yes" 1>&6
23183     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23184   cat >> confdefs.h <<EOF
23185 #define $ac_tr_func 1
23186 EOF
23187  
23188 else
23189   echo "$ac_t""no" 1>&6
23190 fi
23191 done
23192
23193 fi
23194
23195 for ac_func in \
23196         bcopy                   \
23197         closesocket             \
23198         chroot                  \
23199         endgrent                \
23200         endpwent                \
23201         fcntl                   \
23202         flock                   \
23203         fstat                   \
23204         getdtablesize   \
23205         getgrgid                \
23206         gethostname             \
23207         getpass                 \
23208         getpassphrase   \
23209         getpwuid                \
23210         getpwnam                \
23211         getspnam                \
23212         gettimeofday    \
23213         initgroups              \
23214         lockf                   \
23215         memcpy                  \
23216         memmove                 \
23217         mkstemp                 \
23218         mktemp                  \
23219         pipe                    \
23220         read                    \
23221         recv                    \
23222         recvfrom                \
23223         setpwfile               \
23224         setgid                  \
23225         setegid                 \
23226         setsid                  \
23227         setuid                  \
23228         seteuid                 \
23229         sigaction               \
23230         signal                  \
23231         sigset                  \
23232         strdup                  \
23233         strerror                \
23234         strpbrk                 \
23235         strrchr                 \
23236         strsep                  \
23237         strstr                  \
23238         strtol                  \
23239         strtoul                 \
23240         strspn                  \
23241         sysconf                 \
23242         usleep                  \
23243         waitpid                 \
23244         wait4                   \
23245         write                   \
23246         send                    \
23247         sendmsg                 \
23248         sendto                  \
23249
23250 do
23251 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23252 echo "configure:23253: checking for $ac_func" >&5
23253 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23254   echo $ac_n "(cached) $ac_c" 1>&6
23255 else
23256   cat > conftest.$ac_ext <<EOF
23257 #line 23258 "configure"
23258 #include "confdefs.h"
23259 /* System header to define __stub macros and hopefully few prototypes,
23260     which can conflict with char $ac_func(); below.  */
23261 #include <assert.h>
23262 /* Override any gcc2 internal prototype to avoid an error.  */
23263 /* We use char because int might match the return type of a gcc2
23264     builtin and then its argument prototype would still apply.  */
23265 char $ac_func();
23266 char (*f)();
23267
23268 int main() {
23269
23270 /* The GNU C library defines this for functions which it implements
23271     to always fail with ENOSYS.  Some functions are actually named
23272     something starting with __ and the normal name is an alias.  */
23273 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23274 choke me
23275 #else
23276 f = $ac_func;
23277 #endif
23278
23279 ; return 0; }
23280 EOF
23281 if { (eval echo configure:23282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23282   rm -rf conftest*
23283   eval "ac_cv_func_$ac_func=yes"
23284 else
23285   echo "configure: failed program was:" >&5
23286   cat conftest.$ac_ext >&5
23287   rm -rf conftest*
23288   eval "ac_cv_func_$ac_func=no"
23289 fi
23290 rm -f conftest*
23291 fi
23292
23293 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23294   echo "$ac_t""yes" 1>&6
23295     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23296   cat >> confdefs.h <<EOF
23297 #define $ac_tr_func 1
23298 EOF
23299  
23300 else
23301   echo "$ac_t""no" 1>&6
23302 fi
23303 done
23304
23305
23306 for ac_func in getopt getpeereid
23307 do
23308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23309 echo "configure:23310: checking for $ac_func" >&5
23310 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23311   echo $ac_n "(cached) $ac_c" 1>&6
23312 else
23313   cat > conftest.$ac_ext <<EOF
23314 #line 23315 "configure"
23315 #include "confdefs.h"
23316 /* System header to define __stub macros and hopefully few prototypes,
23317     which can conflict with char $ac_func(); below.  */
23318 #include <assert.h>
23319 /* Override any gcc2 internal prototype to avoid an error.  */
23320 /* We use char because int might match the return type of a gcc2
23321     builtin and then its argument prototype would still apply.  */
23322 char $ac_func();
23323 char (*f)();
23324
23325 int main() {
23326
23327 /* The GNU C library defines this for functions which it implements
23328     to always fail with ENOSYS.  Some functions are actually named
23329     something starting with __ and the normal name is an alias.  */
23330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23331 choke me
23332 #else
23333 f = $ac_func;
23334 #endif
23335
23336 ; return 0; }
23337 EOF
23338 if { (eval echo configure:23339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23339   rm -rf conftest*
23340   eval "ac_cv_func_$ac_func=yes"
23341 else
23342   echo "configure: failed program was:" >&5
23343   cat conftest.$ac_ext >&5
23344   rm -rf conftest*
23345   eval "ac_cv_func_$ac_func=no"
23346 fi
23347 rm -f conftest*
23348 fi
23349
23350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23351   echo "$ac_t""yes" 1>&6
23352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23353   cat >> confdefs.h <<EOF
23354 #define $ac_tr_func 1
23355 EOF
23356  
23357 else
23358   echo "$ac_t""no" 1>&6
23359 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23360 fi
23361 done
23362
23363
23364
23365 if test "$ac_cv_func_getopt" != yes; then
23366         LIBSRCS="$LIBSRCS getopt.c"
23367 fi
23368 if test "$ac_cv_func_getpeereid" != yes; then
23369         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23370 echo "configure:23371: checking for msg_accrights in msghdr" >&5
23371 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23372   echo $ac_n "(cached) $ac_c" 1>&6
23373 else
23374   cat > conftest.$ac_ext <<EOF
23375 #line 23376 "configure"
23376 #include "confdefs.h"
23377 #include <sys/socket.h>
23378 int main() {
23379 struct msghdr m; m.msg_accrightslen=0
23380 ; return 0; }
23381 EOF
23382 if { (eval echo configure:23383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23383   rm -rf conftest*
23384   ol_cv_msghdr_msg_accrights=yes
23385 else
23386   echo "configure: failed program was:" >&5
23387   cat conftest.$ac_ext >&5
23388   rm -rf conftest*
23389   ol_cv_msghdr_msg_accrights=no
23390 fi
23391 rm -f conftest*
23392         
23393 fi
23394
23395 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23396   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23397         cat >> confdefs.h <<\EOF
23398 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23399 EOF
23400
23401   fi
23402
23403         LIBSRCS="$LIBSRCS getpeereid.c"
23404 fi
23405 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23406         if test "$ac_cv_func_snprintf" != yes; then
23407                 cat >> confdefs.h <<\EOF
23408 #define snprintf ber_pvt_snprintf
23409 EOF
23410
23411         fi
23412         if test "$ac_cv_func_vsnprintf" != yes; then
23413                 cat >> confdefs.h <<\EOF
23414 #define vsnprintf ber_pvt_vsnprintf
23415 EOF
23416
23417         fi
23418 fi
23419
23420 # Check Configuration
23421 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23422 echo "configure:23423: checking declaration of sys_errlist" >&5
23423 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23424   echo $ac_n "(cached) $ac_c" 1>&6
23425 else
23426   
23427         cat > conftest.$ac_ext <<EOF
23428 #line 23429 "configure"
23429 #include "confdefs.h"
23430
23431 #include <stdio.h>
23432 #include <sys/types.h>
23433 #include <errno.h>
23434 #ifdef WINNT
23435 #include <stdlib.h>
23436 #endif 
23437 int main() {
23438 char *c = (char *) *sys_errlist
23439 ; return 0; }
23440 EOF
23441 if { (eval echo configure:23442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23442   rm -rf conftest*
23443   ol_cv_dcl_sys_errlist=yes
23444         ol_cv_have_sys_errlist=yes
23445 else
23446   echo "configure: failed program was:" >&5
23447   cat conftest.$ac_ext >&5
23448   rm -rf conftest*
23449   ol_cv_dcl_sys_errlist=no
23450 fi
23451 rm -f conftest*
23452 fi
23453
23454 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23455 #
23456 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23457 if test $ol_cv_dcl_sys_errlist = no ; then
23458         cat >> confdefs.h <<\EOF
23459 #define DECL_SYS_ERRLIST 1
23460 EOF
23461
23462
23463         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23464 echo "configure:23465: checking existence of sys_errlist" >&5
23465 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23466   echo $ac_n "(cached) $ac_c" 1>&6
23467 else
23468   
23469                 cat > conftest.$ac_ext <<EOF
23470 #line 23471 "configure"
23471 #include "confdefs.h"
23472 #include <errno.h>
23473 int main() {
23474 char *c = (char *) *sys_errlist
23475 ; return 0; }
23476 EOF
23477 if { (eval echo configure:23478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23478   rm -rf conftest*
23479   ol_cv_have_sys_errlist=yes
23480 else
23481   echo "configure: failed program was:" >&5
23482   cat conftest.$ac_ext >&5
23483   rm -rf conftest*
23484   ol_cv_have_sys_errlist=no
23485 fi
23486 rm -f conftest*
23487 fi
23488
23489 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23490 fi
23491 if test $ol_cv_have_sys_errlist = yes ; then
23492         cat >> confdefs.h <<\EOF
23493 #define HAVE_SYS_ERRLIST 1
23494 EOF
23495
23496 fi
23497
23498
23499
23500 if test "$ol_enable_debug" != no ; then
23501         cat >> confdefs.h <<\EOF
23502 #define LDAP_DEBUG 1
23503 EOF
23504
23505 fi
23506 if test "$ol_enable_syslog" = yes ; then
23507         cat >> confdefs.h <<\EOF
23508 #define LDAP_SYSLOG 1
23509 EOF
23510
23511 fi
23512 if test "$ol_link_kbind" != no ; then
23513         cat >> confdefs.h <<\EOF
23514 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23515 EOF
23516
23517 fi
23518 if test "$ol_enable_proctitle" != no ; then
23519         cat >> confdefs.h <<\EOF
23520 #define LDAP_PROCTITLE 1
23521 EOF
23522
23523 fi
23524 if test "$ol_enable_referrals" != no ; then
23525         cat >> confdefs.h <<\EOF
23526 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23527 EOF
23528
23529 fi
23530 if test "$ol_enable_local" != no; then
23531         cat >> confdefs.h <<\EOF
23532 #define LDAP_PF_LOCAL 1
23533 EOF
23534
23535 fi
23536 if test "$ol_link_ipv6" != no; then
23537         cat >> confdefs.h <<\EOF
23538 #define LDAP_PF_INET6 1
23539 EOF
23540
23541 fi
23542 if test "$ol_enable_cleartext" != no ; then
23543         cat >> confdefs.h <<\EOF
23544 #define SLAPD_CLEARTEXT 1
23545 EOF
23546
23547 fi
23548 if test "$ol_enable_crypt" != no ; then
23549         cat >> confdefs.h <<\EOF
23550 #define SLAPD_CRYPT 1
23551 EOF
23552
23553 fi
23554 if test "$ol_link_kpasswd" != no ; then
23555         cat >> confdefs.h <<\EOF
23556 #define SLAPD_KPASSWD 1
23557 EOF
23558
23559 fi
23560 if test "$ol_link_spasswd" != no ; then
23561         cat >> confdefs.h <<\EOF
23562 #define SLAPD_SPASSWD 1
23563 EOF
23564
23565 fi
23566 if test "$ol_enable_multimaster" != no ; then
23567         cat >> confdefs.h <<\EOF
23568 #define SLAPD_MULTIMASTER 1
23569 EOF
23570
23571 fi
23572 if test "$ol_enable_phonetic" != no ; then
23573         cat >> confdefs.h <<\EOF
23574 #define SLAPD_PHONETIC 1
23575 EOF
23576
23577 fi
23578 if test "$ol_enable_rlookups" != no ; then
23579         cat >> confdefs.h <<\EOF
23580 #define SLAPD_RLOOKUPS 1
23581 EOF
23582
23583 fi
23584 if test "$ol_enable_aci" != no ; then
23585         cat >> confdefs.h <<\EOF
23586 #define SLAPD_ACI_ENABLED 1
23587 EOF
23588
23589 fi
23590
23591 if test "$ol_link_modules" != no ; then
23592         cat >> confdefs.h <<\EOF
23593 #define SLAPD_MODULES 1
23594 EOF
23595
23596         BUILD_SLAPD=yes
23597         SLAPD_MODULES_LDFLAGS="-dlopen self"
23598 fi
23599
23600 if test "$ol_enable_bdb" != no ; then
23601         cat >> confdefs.h <<\EOF
23602 #define SLAPD_BDB 1
23603 EOF
23604
23605         BUILD_SLAPD=yes
23606         BUILD_BDB=yes
23607         if test "$ol_with_bdb_module" != static ; then
23608                 cat >> confdefs.h <<\EOF
23609 #define SLAPD_BDB_DYNAMIC 1
23610 EOF
23611
23612                 BUILD_BDB=mod
23613                 BUILD_BDB_DYNAMIC=shared
23614                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23615         else
23616                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23617         fi
23618 fi
23619
23620 if test "$ol_link_dnssrv" != no ; then
23621         cat >> confdefs.h <<\EOF
23622 #define SLAPD_DNSSRV 1
23623 EOF
23624
23625         BUILD_SLAPD=yes
23626         BUILD_DNSSRV=yes
23627         if test "$ol_with_dnssrv_module" != static ; then
23628                 cat >> confdefs.h <<\EOF
23629 #define SLAPD_DNSSRV_DYNAMIC 1
23630 EOF
23631
23632                 BUILD_DNSSRV=mod
23633                 BUILD_DNSSRV_DYNAMIC=shared
23634                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23635         else
23636                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23637         fi
23638 fi
23639
23640 if test "$ol_enable_ldap" != no ; then
23641         cat >> confdefs.h <<\EOF
23642 #define SLAPD_LDAP 1
23643 EOF
23644
23645         BUILD_SLAPD=yes
23646         BUILD_LDAP=yes
23647         if test "$ol_with_ldap_module" != static ; then
23648                 cat >> confdefs.h <<\EOF
23649 #define SLAPD_LDAP_DYNAMIC 1
23650 EOF
23651
23652                 BUILD_LDAP=mod
23653                 BUILD_LDAP_DYNAMIC=shared
23654                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23655         else
23656                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23657         fi
23658 fi
23659
23660 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23661         cat >> confdefs.h <<\EOF
23662 #define SLAPD_LDBM 1
23663 EOF
23664
23665         BUILD_SLAPD=yes
23666         BUILD_LDBM=yes
23667         if test "$ol_with_ldbm_module" != static ; then
23668                 cat >> confdefs.h <<\EOF
23669 #define SLAPD_LDBM_DYNAMIC 1
23670 EOF
23671
23672                 BUILD_LDBM=mod
23673                 BUILD_LDBM_DYNAMIC=shared
23674                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23675         else
23676                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23677         fi
23678 fi
23679
23680 if test "$ol_enable_meta" != no ; then
23681         if test "$ol_enable_ldap" = no ; then
23682                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23683         fi
23684         if test "$ol_enable_rewrite" = no ; then
23685                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23686         fi
23687         cat >> confdefs.h <<\EOF
23688 #define SLAPD_META 1
23689 EOF
23690
23691         BUILD_SLAPD=yes
23692         BUILD_META=yes
23693         BUILD_REWRITE=yes
23694         if test "$ol_with_meta_module" != static ; then
23695                 cat >> confdefs.h <<\EOF
23696 #define SLAPD_META_DYNAMIC 1
23697 EOF
23698
23699                 BUILD_META=mod
23700                 BUILD_META_DYNAMIC=shared
23701                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23702         else
23703                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23704         fi
23705 fi
23706
23707 if test "$ol_enable_monitor" != no ; then
23708         cat >> confdefs.h <<\EOF
23709 #define SLAPD_MONITOR 1
23710 EOF
23711
23712         BUILD_SLAPD=yes
23713         BUILD_MONITOR=yes
23714         if test "$ol_with_monitor_module" != static ; then
23715                 cat >> confdefs.h <<\EOF
23716 #define SLAPD_MONITOR_DYNAMIC 1
23717 EOF
23718
23719                 BUILD_MONITOR=mod
23720                 BUILD_MONITOR_DYNAMIC=shared
23721                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23722         else
23723                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23724         fi
23725 fi
23726
23727 if test "$ol_enable_null" != no ; then
23728         cat >> confdefs.h <<\EOF
23729 #define SLAPD_NULL 1
23730 EOF
23731
23732         BUILD_SLAPD=yes
23733         BUILD_NULL=yes
23734         if test "$ol_with_null_module" != static ; then
23735                 cat >> confdefs.h <<\EOF
23736 #define SLAPD_NULL_DYNAMIC 1
23737 EOF
23738
23739                 BUILD_NULL=mod
23740                 BUILD_NULL_DYNAMIC=shared
23741                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23742         else
23743                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23744         fi
23745 fi
23746
23747 if test "$ol_enable_passwd" != no ; then
23748         cat >> confdefs.h <<\EOF
23749 #define SLAPD_PASSWD 1
23750 EOF
23751
23752         BUILD_SLAPD=yes
23753         BUILD_PASSWD=yes
23754         if test "$ol_with_passwd_module" != static ; then
23755                 cat >> confdefs.h <<\EOF
23756 #define SLAPD_PASSWD_DYNAMIC 1
23757 EOF
23758
23759                 BUILD_PASSWD=mod
23760                 BUILD_PASSWD_DYNAMIC=shared
23761                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23762         else
23763                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23764         fi
23765 fi
23766
23767 if test "$ol_link_perl" != no ; then
23768         cat >> confdefs.h <<\EOF
23769 #define SLAPD_PERL 1
23770 EOF
23771
23772         BUILD_SLAPD=yes
23773         BUILD_PERL=yes
23774         if test "$ol_with_perl_module" != static ; then
23775                 cat >> confdefs.h <<\EOF
23776 #define SLAPD_PERL_DYNAMIC 1
23777 EOF
23778
23779                 BUILD_PERL=mod
23780                 BUILD_PERL_DYNAMIC=shared
23781                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23782         else
23783                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23784         fi
23785 fi
23786
23787 if test "$ol_enable_shell" != no ; then
23788         if test "$ol_link_thread" != no ; then
23789                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23790         fi
23791         cat >> confdefs.h <<\EOF
23792 #define SLAPD_SHELL 1
23793 EOF
23794
23795         BUILD_SLAPD=yes
23796         BUILD_SHELL=yes
23797         if test "$ol_with_shell_module" != static ; then
23798                 cat >> confdefs.h <<\EOF
23799 #define SLAPD_SHELL_DYNAMIC 1
23800 EOF
23801
23802                 BUILD_SHELL=mod
23803                 BUILD_SHELL_DYNAMIC=shared
23804                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23805         else
23806                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23807         fi
23808 fi
23809
23810 if test "$ol_link_sql" != no ; then
23811         cat >> confdefs.h <<\EOF
23812 #define SLAPD_SQL 1
23813 EOF
23814
23815         BUILD_SLAPD=yes
23816         BUILD_SQL=yes
23817         if test "$ol_with_sql_module" != static; then
23818                 cat >> confdefs.h <<\EOF
23819 #define SLAPD_SQL_DYNAMIC 1
23820 EOF
23821
23822                 BUILD_SQL=mod
23823                 BUILD_SQL_DYNAMIC=shared
23824                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23825         else
23826                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23827         fi
23828 fi
23829
23830 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23831         $BUILD_SLAPD = yes ; then
23832         BUILD_SLURPD=yes
23833 fi
23834
23835 if test "$ol_enable_rewrite" != no ; then
23836         cat >> confdefs.h <<\EOF
23837 #define ENABLE_REWRITE 1
23838 EOF
23839
23840         BUILD_REWRITE=yes
23841 fi
23842
23843
23844
23845 if test "$ac_cv_mingw32" = yes ; then
23846         PLAT=NT
23847         SLAPD_MODULES_LDFLAGS=
23848 else
23849         PLAT=UNIX
23850 fi
23851
23852 if test -z "$SLAPD_STATIC_BACKENDS"; then
23853         SLAPD_NO_STATIC='#'
23854 else
23855         SLAPD_NO_STATIC=
23856 fi
23857
23858
23859
23860
23861
23862
23863   
23864   
23865   
23866   
23867   
23868   
23869   
23870   
23871   
23872   
23873   
23874   
23875   
23876   
23877   
23878   
23879   
23880   
23881   
23882   
23883   
23884   
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922 # Check whether --with-xxinstall or --without-xxinstall was given.
23923 if test "${with_xxinstall+set}" = set; then
23924   withval="$with_xxinstall"
23925   :
23926 fi
23927
23928
23929
23930 trap '' 1 2 15
23931
23932 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23933
23934 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23935 # Let make expand exec_prefix.
23936 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23937
23938 # Any assignment to VPATH causes Sun make to only execute
23939 # the first set of double-colon rules, so remove it if not needed.
23940 # If there is a colon in the path, we need to keep it.
23941 if test "x$srcdir" = x.; then
23942   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23943 fi
23944
23945 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23946
23947 DEFS=-DHAVE_CONFIG_H
23948
23949 # Without the "./", some shells look in PATH for config.status.
23950 : ${CONFIG_STATUS=./config.status}
23951
23952 echo creating $CONFIG_STATUS
23953 rm -f $CONFIG_STATUS
23954 cat > $CONFIG_STATUS <<EOF
23955 #! /bin/sh
23956 # Generated automatically by configure.
23957 # Run this file to recreate the current configuration.
23958 # This directory was configured as follows,
23959 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23960 #
23961 # $0 $ac_configure_args
23962 #
23963 # Compiler output produced by configure, useful for debugging
23964 # configure, is in ./config.log if it exists.
23965
23966 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23967 for ac_option
23968 do
23969   case "\$ac_option" in
23970   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23971     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23972     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23973   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23974     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23975     exit 0 ;;
23976   -help | --help | --hel | --he | --h)
23977     echo "\$ac_cs_usage"; exit 0 ;;
23978   *) echo "\$ac_cs_usage"; exit 1 ;;
23979   esac
23980 done
23981
23982 ac_given_srcdir=$srcdir
23983 ac_given_INSTALL="$INSTALL"
23984
23985 trap 'rm -fr `echo "\
23986 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23987 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23988 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23989 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23990 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23991 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23992 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23993 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23994 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23995 include/Makefile:build/top.mk:include/Makefile.in \
23996 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23997 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23998 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23999 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24000 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24001 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
24002 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
24003 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24004 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24005 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24006 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24007 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24008 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24009 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24010 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24011 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24012 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24013 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24014 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24015 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24016 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24017 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24018 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24019 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24020 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24021 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24022 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24023 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24024  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24025 EOF
24026 cat >> $CONFIG_STATUS <<EOF
24027
24028 # Protect against being on the right side of a sed subst in config.status.
24029 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24030  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24031 $ac_vpsub
24032 $extrasub
24033 s%@SHELL@%$SHELL%g
24034 s%@CFLAGS@%$CFLAGS%g
24035 s%@CPPFLAGS@%$CPPFLAGS%g
24036 s%@CXXFLAGS@%$CXXFLAGS%g
24037 s%@FFLAGS@%$FFLAGS%g
24038 s%@DEFS@%$DEFS%g
24039 s%@LDFLAGS@%$LDFLAGS%g
24040 s%@LIBS@%$LIBS%g
24041 s%@exec_prefix@%$exec_prefix%g
24042 s%@prefix@%$prefix%g
24043 s%@program_transform_name@%$program_transform_name%g
24044 s%@bindir@%$bindir%g
24045 s%@sbindir@%$sbindir%g
24046 s%@libexecdir@%$libexecdir%g
24047 s%@datadir@%$datadir%g
24048 s%@sysconfdir@%$sysconfdir%g
24049 s%@sharedstatedir@%$sharedstatedir%g
24050 s%@localstatedir@%$localstatedir%g
24051 s%@libdir@%$libdir%g
24052 s%@includedir@%$includedir%g
24053 s%@oldincludedir@%$oldincludedir%g
24054 s%@infodir@%$infodir%g
24055 s%@mandir@%$mandir%g
24056 s%@host@%$host%g
24057 s%@host_alias@%$host_alias%g
24058 s%@host_cpu@%$host_cpu%g
24059 s%@host_vendor@%$host_vendor%g
24060 s%@host_os@%$host_os%g
24061 s%@target@%$target%g
24062 s%@target_alias@%$target_alias%g
24063 s%@target_cpu@%$target_cpu%g
24064 s%@target_vendor@%$target_vendor%g
24065 s%@target_os@%$target_os%g
24066 s%@build@%$build%g
24067 s%@build_alias@%$build_alias%g
24068 s%@build_cpu@%$build_cpu%g
24069 s%@build_vendor@%$build_vendor%g
24070 s%@build_os@%$build_os%g
24071 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24072 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24073 s%@INSTALL_DATA@%$INSTALL_DATA%g
24074 s%@PACKAGE@%$PACKAGE%g
24075 s%@VERSION@%$VERSION%g
24076 s%@ACLOCAL@%$ACLOCAL%g
24077 s%@AUTOCONF@%$AUTOCONF%g
24078 s%@AUTOMAKE@%$AUTOMAKE%g
24079 s%@AUTOHEADER@%$AUTOHEADER%g
24080 s%@MAKEINFO@%$MAKEINFO%g
24081 s%@install_sh@%$install_sh%g
24082 s%@AMTAR@%$AMTAR%g
24083 s%@AWK@%$AWK%g
24084 s%@AMTARFLAGS@%$AMTARFLAGS%g
24085 s%@SET_MAKE@%$SET_MAKE%g
24086 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24087 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24088 s%@top_builddir@%$top_builddir%g
24089 s%@ldap_subdir@%$ldap_subdir%g
24090 s%@CC@%$CC%g
24091 s%@AR@%$AR%g
24092 s%@LN_S@%$LN_S%g
24093 s%@OBJEXT@%$OBJEXT%g
24094 s%@EXEEXT@%$EXEEXT%g
24095 s%@ECHO@%$ECHO%g
24096 s%@RANLIB@%$RANLIB%g
24097 s%@STRIP@%$STRIP%g
24098 s%@DLLTOOL@%$DLLTOOL%g
24099 s%@AS@%$AS%g
24100 s%@OBJDUMP@%$OBJDUMP%g
24101 s%@CPP@%$CPP%g
24102 s%@LIBTOOL@%$LIBTOOL%g
24103 s%@LN_H@%$LN_H%g
24104 s%@PERLBIN@%$PERLBIN%g
24105 s%@OL_MKDEP@%$OL_MKDEP%g
24106 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24107 s%@LTSTATIC@%$LTSTATIC%g
24108 s%@LIBOBJS@%$LIBOBJS%g
24109 s%@LIBSRCS@%$LIBSRCS%g
24110 s%@PLAT@%$PLAT%g
24111 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24112 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24113 s%@BUILD_BDB@%$BUILD_BDB%g
24114 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24115 s%@BUILD_LDAP@%$BUILD_LDAP%g
24116 s%@BUILD_LDBM@%$BUILD_LDBM%g
24117 s%@BUILD_META@%$BUILD_META%g
24118 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24119 s%@BUILD_NULL@%$BUILD_NULL%g
24120 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24121 s%@BUILD_PERL@%$BUILD_PERL%g
24122 s%@BUILD_SHELL@%$BUILD_SHELL%g
24123 s%@BUILD_SQL@%$BUILD_SQL%g
24124 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24125 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24126 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24127 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24128 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24129 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24130 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24131 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24132 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24133 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24134 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24135 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24136 s%@LDAP_LIBS@%$LDAP_LIBS%g
24137 s%@LDIF_LIBS@%$LDIF_LIBS%g
24138 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24139 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24140 s%@LDBM_LIBS@%$LDBM_LIBS%g
24141 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24142 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24143 s%@WRAP_LIBS@%$WRAP_LIBS%g
24144 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24145 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24146 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24147 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24148 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24149 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24150 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24151 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24152 s%@KRB4_LIBS@%$KRB4_LIBS%g
24153 s%@KRB5_LIBS@%$KRB5_LIBS%g
24154 s%@READLINE_LIBS@%$READLINE_LIBS%g
24155 s%@SASL_LIBS@%$SASL_LIBS%g
24156 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
24157 s%@TLS_LIBS@%$TLS_LIBS%g
24158 s%@MODULES_LIBS@%$MODULES_LIBS%g
24159 s%@AUTH_LIBS@%$AUTH_LIBS%g
24160 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24161 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24162 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24163 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24164
24165 CEOF
24166 EOF
24167
24168 cat >> $CONFIG_STATUS <<\EOF
24169
24170 # Split the substitutions into bite-sized pieces for seds with
24171 # small command number limits, like on Digital OSF/1 and HP-UX.
24172 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24173 ac_file=1 # Number of current file.
24174 ac_beg=1 # First line for current file.
24175 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24176 ac_more_lines=:
24177 ac_sed_cmds=""
24178 while $ac_more_lines; do
24179   if test $ac_beg -gt 1; then
24180     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24181   else
24182     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24183   fi
24184   if test ! -s conftest.s$ac_file; then
24185     ac_more_lines=false
24186     rm -f conftest.s$ac_file
24187   else
24188     if test -z "$ac_sed_cmds"; then
24189       ac_sed_cmds="sed -f conftest.s$ac_file"
24190     else
24191       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24192     fi
24193     ac_file=`expr $ac_file + 1`
24194     ac_beg=$ac_end
24195     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24196   fi
24197 done
24198 if test -z "$ac_sed_cmds"; then
24199   ac_sed_cmds=cat
24200 fi
24201 EOF
24202
24203 cat >> $CONFIG_STATUS <<EOF
24204
24205 CONFIG_FILES=\${CONFIG_FILES-"\
24206 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24207 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24208 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24209 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24210 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24211 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24212 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24213 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24214 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24215 include/Makefile:build/top.mk:include/Makefile.in \
24216 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24217 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
24218 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24219 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24220 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24221 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
24222 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
24223 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24224 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24225 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24226 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24227 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24228 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24229 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24230 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24231 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24232 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24233 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24234 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24235 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24236 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24237 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24238 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24239 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24240 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24241 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24242 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24243 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24244 "}
24245 EOF
24246 cat >> $CONFIG_STATUS <<\EOF
24247 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24248   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24249   case "$ac_file" in
24250   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24251        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24252   *) ac_file_in="${ac_file}.in" ;;
24253   esac
24254
24255   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24256
24257   # Remove last slash and all that follows it.  Not all systems have dirname.
24258   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24259   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24260     # The file is in a subdirectory.
24261     test ! -d "$ac_dir" && mkdir "$ac_dir"
24262     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24263     # A "../" for each directory in $ac_dir_suffix.
24264     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24265   else
24266     ac_dir_suffix= ac_dots=
24267   fi
24268
24269   case "$ac_given_srcdir" in
24270   .)  srcdir=.
24271       if test -z "$ac_dots"; then top_srcdir=.
24272       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24273   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24274   *) # Relative path.
24275     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24276     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24277   esac
24278
24279   case "$ac_given_INSTALL" in
24280   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24281   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24282   esac
24283
24284   echo creating "$ac_file"
24285   rm -f "$ac_file"
24286   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24287   case "$ac_file" in
24288   *[Mm]akefile*) ac_comsub="1i\\
24289 # $configure_input" ;;
24290   *) ac_comsub= ;;
24291   esac
24292
24293   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24294   sed -e "$ac_comsub
24295 s%@configure_input@%$configure_input%g
24296 s%@srcdir@%$srcdir%g
24297 s%@top_srcdir@%$top_srcdir%g
24298 s%@INSTALL@%$INSTALL%g
24299 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24300 fi; done
24301 rm -f conftest.s*
24302
24303 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24304 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24305 #
24306 # ac_d sets the value in "#define NAME VALUE" lines.
24307 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24308 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24309 ac_dC='\3'
24310 ac_dD='%g'
24311 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24312 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24313 ac_uB='\([      ]\)%\1#\2define\3'
24314 ac_uC=' '
24315 ac_uD='\4%g'
24316 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24317 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24318 ac_eB='$%\1#\2define\3'
24319 ac_eC=' '
24320 ac_eD='%g'
24321
24322 if test "${CONFIG_HEADERS+set}" != set; then
24323 EOF
24324 cat >> $CONFIG_STATUS <<EOF
24325   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24326 EOF
24327 cat >> $CONFIG_STATUS <<\EOF
24328 fi
24329 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24330   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24331   case "$ac_file" in
24332   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24333        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24334   *) ac_file_in="${ac_file}.in" ;;
24335   esac
24336
24337   echo creating $ac_file
24338
24339   rm -f conftest.frag conftest.in conftest.out
24340   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24341   cat $ac_file_inputs > conftest.in
24342
24343 EOF
24344
24345 # Transform confdefs.h into a sed script conftest.vals that substitutes
24346 # the proper values into config.h.in to produce config.h.  And first:
24347 # Protect against being on the right side of a sed subst in config.status.
24348 # Protect against being in an unquoted here document in config.status.
24349 rm -f conftest.vals
24350 cat > conftest.hdr <<\EOF
24351 s/[\\&%]/\\&/g
24352 s%[\\$`]%\\&%g
24353 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24354 s%ac_d%ac_u%gp
24355 s%ac_u%ac_e%gp
24356 EOF
24357 sed -n -f conftest.hdr confdefs.h > conftest.vals
24358 rm -f conftest.hdr
24359
24360 # This sed command replaces #undef with comments.  This is necessary, for
24361 # example, in the case of _POSIX_SOURCE, which is predefined and required
24362 # on some systems where configure will not decide to define it.
24363 cat >> conftest.vals <<\EOF
24364 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24365 EOF
24366
24367 # Break up conftest.vals because some shells have a limit on
24368 # the size of here documents, and old seds have small limits too.
24369
24370 rm -f conftest.tail
24371 while :
24372 do
24373   ac_lines=`grep -c . conftest.vals`
24374   # grep -c gives empty output for an empty file on some AIX systems.
24375   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24376   # Write a limited-size here document to conftest.frag.
24377   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24378   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24379   echo 'CEOF
24380   sed -f conftest.frag conftest.in > conftest.out
24381   rm -f conftest.in
24382   mv conftest.out conftest.in
24383 ' >> $CONFIG_STATUS
24384   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24385   rm -f conftest.vals
24386   mv conftest.tail conftest.vals
24387 done
24388 rm -f conftest.vals
24389
24390 cat >> $CONFIG_STATUS <<\EOF
24391   rm -f conftest.frag conftest.h
24392   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24393   cat conftest.in >> conftest.h
24394   rm -f conftest.in
24395   if cmp -s $ac_file conftest.h 2>/dev/null; then
24396     echo "$ac_file is unchanged"
24397     rm -f conftest.h
24398   else
24399     # Remove last slash and all that follows it.  Not all systems have dirname.
24400       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24401       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24402       # The file is in a subdirectory.
24403       test ! -d "$ac_dir" && mkdir "$ac_dir"
24404     fi
24405     rm -f $ac_file
24406     mv conftest.h $ac_file
24407   fi
24408 fi; done
24409
24410 EOF
24411 cat >> $CONFIG_STATUS <<EOF
24412
24413 EOF
24414 cat >> $CONFIG_STATUS <<\EOF
24415
24416 date > stamp-h
24417 echo Please run \"make depend\" to build dependencies
24418
24419 exit 0
24420 EOF
24421 chmod +x $CONFIG_STATUS
24422 rm -fr confdefs* $ac_clean_files
24423 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24424