]> git.sur5r.net Git - openldap/blob - configure
"exact" and "base" are equivalent
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.34 2003/06/21 17:18:37 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-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                 if test x"$ol_with_perl_module" = "xstatic" ; then
7812                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7813                 else
7814                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7815                 fi
7816                                 ol_link_perl=yes
7817         fi
7818 fi
7819
7820 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7821 echo "configure:7822: checking how to run the C preprocessor" >&5
7822 # On Suns, sometimes $CPP names a directory.
7823 if test -n "$CPP" && test -d "$CPP"; then
7824   CPP=
7825 fi
7826 if test -z "$CPP"; then
7827 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7828   echo $ac_n "(cached) $ac_c" 1>&6
7829 else
7830     # This must be in double quotes, not single quotes, because CPP may get
7831   # substituted into the Makefile and "${CC-cc}" will confuse make.
7832   CPP="${CC-cc} -E"
7833   # On the NeXT, cc -E runs the code through the compiler's parser,
7834   # not just through cpp.
7835   cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 #include <assert.h>
7839 Syntax Error
7840 EOF
7841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7842 { (eval echo configure:7843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7844 if test -z "$ac_err"; then
7845   :
7846 else
7847   echo "$ac_err" >&5
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   CPP="${CC-cc} -E -traditional-cpp"
7852   cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 #include <assert.h>
7856 Syntax Error
7857 EOF
7858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7859 { (eval echo configure:7860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7861 if test -z "$ac_err"; then
7862   :
7863 else
7864   echo "$ac_err" >&5
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   CPP="${CC-cc} -nologo -E"
7869   cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872 #include <assert.h>
7873 Syntax Error
7874 EOF
7875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7876 { (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7878 if test -z "$ac_err"; then
7879   :
7880 else
7881   echo "$ac_err" >&5
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   CPP=/lib/cpp
7886 fi
7887 rm -f conftest*
7888 fi
7889 rm -f conftest*
7890 fi
7891 rm -f conftest*
7892   ac_cv_prog_CPP="$CPP"
7893 fi
7894   CPP="$ac_cv_prog_CPP"
7895 else
7896   ac_cv_prog_CPP="$CPP"
7897 fi
7898 echo "$ac_t""$CPP" 1>&6
7899
7900
7901 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7902         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7903
7904 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7905         echo "configure: warning: programs compiled here do run here..." 1>&2
7906         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7907
7908 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7909         echo "configure: warning: programs compiled here do not run here..." 1>&2
7910         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7911 fi
7912
7913
7914 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7915 echo "configure:7916: checking for Cygwin environment" >&5
7916 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7917   echo $ac_n "(cached) $ac_c" 1>&6
7918 else
7919   cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922
7923 int main() {
7924
7925 #ifndef __CYGWIN__
7926 #define __CYGWIN__ __CYGWIN32__
7927 #endif
7928 return __CYGWIN__;
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7932   rm -rf conftest*
7933   ac_cv_cygwin=yes
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   ac_cv_cygwin=no
7939 fi
7940 rm -f conftest*
7941 fi
7942
7943 echo "$ac_t""$ac_cv_cygwin" 1>&6
7944 CYGWIN=
7945 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7946 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7947 echo "configure:7948: checking for mingw32 environment" >&5
7948 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   cat > conftest.$ac_ext <<EOF
7952 #line 7953 "configure"
7953 #include "confdefs.h"
7954
7955 int main() {
7956 return __MINGW32__;
7957 ; return 0; }
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7960   rm -rf conftest*
7961   ac_cv_mingw32=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   ac_cv_mingw32=no
7967 fi
7968 rm -f conftest*
7969 fi
7970
7971 echo "$ac_t""$ac_cv_mingw32" 1>&6
7972 MINGW32=
7973 test "$ac_cv_mingw32" = yes && MINGW32=yes
7974
7975
7976
7977 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7978 echo "configure:7979: checking for executable suffix" >&5
7979 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7980   echo $ac_n "(cached) $ac_c" 1>&6
7981 else
7982   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7983   ac_cv_exeext=.exe
7984 else
7985   rm -f conftest*
7986   echo 'int main () { return 0; }' > conftest.$ac_ext
7987   ac_cv_exeext=
7988   if { (eval echo configure:7989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7989     for file in conftest.*; do
7990       case $file in
7991       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7992       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7993       esac
7994     done
7995   else
7996     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7997   fi
7998   rm -f conftest*
7999   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8000 fi
8001 fi
8002
8003 EXEEXT=""
8004 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8005 echo "$ac_t""${ac_cv_exeext}" 1>&6
8006 ac_exeext=$EXEEXT
8007
8008 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8009 echo "configure:8010: checking for object suffix" >&5
8010 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   rm -f conftest*
8014 echo 'int i = 1;' > conftest.$ac_ext
8015 if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8016   for ac_file in conftest.*; do
8017     case $ac_file in
8018     *.c) ;;
8019     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8020     esac
8021   done
8022 else
8023   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8024 fi
8025 rm -f conftest*
8026 fi
8027
8028 echo "$ac_t""$ac_cv_objext" 1>&6
8029 OBJEXT=$ac_cv_objext
8030 ac_objext=$ac_cv_objext
8031
8032
8033 cat >> confdefs.h <<EOF
8034 #define EXEEXT "${EXEEXT}"
8035 EOF
8036
8037
8038 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8039 echo "configure:8040: checking for be_app in -lbe" >&5
8040 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8042   echo $ac_n "(cached) $ac_c" 1>&6
8043 else
8044   ac_save_LIBS="$LIBS"
8045 LIBS="-lbe -lroot -lnet $LIBS"
8046 cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* Override any gcc2 internal prototype to avoid an error.  */
8050 /* We use char because int might match the return type of a gcc2
8051     builtin and then its argument prototype would still apply.  */
8052 char be_app();
8053
8054 int main() {
8055 be_app()
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=yes"
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   eval "ac_cv_lib_$ac_lib_var=no"
8066 fi
8067 rm -f conftest*
8068 LIBS="$ac_save_LIBS"
8069
8070 fi
8071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8072   echo "$ac_t""yes" 1>&6
8073   LIBS="$LIBS -lbe -lroot -lnet"
8074 else
8075   echo "$ac_t""no" 1>&6
8076 :
8077 fi
8078
8079
8080
8081
8082
8083 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8084 echo "configure:8085: checking for ${CC-cc} option to accept ANSI C" >&5
8085 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8086   echo $ac_n "(cached) $ac_c" 1>&6
8087 else
8088   am_cv_prog_cc_stdc=no
8089 ac_save_CC="$CC"
8090 # Don't try gcc -ansi; that turns off useful extensions and
8091 # breaks some systems' header files.
8092 # AIX                   -qlanglvl=ansi
8093 # Ultrix and OSF/1      -std1
8094 # HP-UX 10.20 and later -Ae
8095 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8096 # SVR4                  -Xc -D__EXTENSIONS__
8097 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8098 do
8099   CC="$ac_save_CC $ac_arg"
8100   cat > conftest.$ac_ext <<EOF
8101 #line 8102 "configure"
8102 #include "confdefs.h"
8103 #include <stdarg.h>
8104 #include <stdio.h>
8105 #include <sys/types.h>
8106 #include <sys/stat.h>
8107 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8108 struct buf { int x; };
8109 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8110 static char *e (p, i)
8111      char **p;
8112      int i;
8113 {
8114   return p[i];
8115 }
8116 static char *f (char * (*g) (char **, int), char **p, ...)
8117 {
8118   char *s;
8119   va_list v;
8120   va_start (v,p);
8121   s = g (p, va_arg (v,int));
8122   va_end (v);
8123   return s;
8124 }
8125 int test (int i, double x);
8126 struct s1 {int (*f) (int a);};
8127 struct s2 {int (*f) (double a);};
8128 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8129 int argc;
8130 char **argv;
8131
8132 int main() {
8133
8134 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8135
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8139   rm -rf conftest*
8140   am_cv_prog_cc_stdc="$ac_arg"; break
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144 fi
8145 rm -f conftest*
8146 done
8147 CC="$ac_save_CC"
8148
8149 fi
8150
8151 if test -z "$am_cv_prog_cc_stdc"; then
8152   echo "$ac_t""none needed" 1>&6
8153 else
8154   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8155 fi
8156 case "x$am_cv_prog_cc_stdc" in
8157   x|xno) ;;
8158   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8159 esac
8160
8161 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8162         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8163 fi
8164
8165 # test for make depend flag
8166 OL_MKDEP=
8167 OL_MKDEP_FLAGS=
8168 if test -z "${MKDEP}"; then
8169         OL_MKDEP="${CC-cc}"
8170         if test -z "${MKDEP_FLAGS}"; then
8171                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8172 echo "configure:8173: checking for ${OL_MKDEP} depend flag" >&5
8173 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8174   echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8176   
8177                         ol_cv_mkdep=no
8178                         for flag in "-M" "-xM"; do
8179                                 cat > conftest.c <<EOF
8180  noCode;
8181 EOF
8182                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8183                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8184                                 then
8185                                         if test ! -f conftest."${ac_object}" ; then
8186                                                 ol_cv_mkdep=$flag
8187                                                 OL_MKDEP_FLAGS="$flag"
8188                                                 break
8189                                         fi
8190                                 fi
8191                         done
8192                         rm -f conftest*
8193                 
8194 fi
8195
8196 echo "$ac_t""$ol_cv_mkdep" 1>&6
8197         else
8198                 cc_cv_mkdep=yes
8199                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8200         fi
8201 else
8202         cc_cv_mkdep=yes
8203         OL_MKDEP="${MKDEP}"
8204         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8205 fi
8206
8207
8208
8209 if test "${ol_cv_mkdep}" = no ; then
8210         # this will soon become an error
8211         echo "configure: warning: do not know how to generate dependencies" 1>&2
8212 fi
8213
8214 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8215 echo "configure:8216: checking for afopen in -ls" >&5
8216 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8218   echo $ac_n "(cached) $ac_c" 1>&6
8219 else
8220   ac_save_LIBS="$LIBS"
8221 LIBS="-ls  $LIBS"
8222 cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225 /* Override any gcc2 internal prototype to avoid an error.  */
8226 /* We use char because int might match the return type of a gcc2
8227     builtin and then its argument prototype would still apply.  */
8228 char afopen();
8229
8230 int main() {
8231 afopen()
8232 ; return 0; }
8233 EOF
8234 if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=yes"
8237 else
8238   echo "configure: failed program was:" >&5
8239   cat conftest.$ac_ext >&5
8240   rm -rf conftest*
8241   eval "ac_cv_lib_$ac_lib_var=no"
8242 fi
8243 rm -f conftest*
8244 LIBS="$ac_save_LIBS"
8245
8246 fi
8247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8248   echo "$ac_t""yes" 1>&6
8249   
8250         AUTH_LIBS=-ls
8251         cat >> confdefs.h <<\EOF
8252 #define HAVE_AIX_SECURITY 1
8253 EOF
8254
8255
8256 else
8257   echo "$ac_t""no" 1>&6
8258 fi
8259
8260
8261 case "$target" in
8262 *-ibm-openedition)
8263         ac_cv_func_getopt=no
8264         cat >> confdefs.h <<\EOF
8265 #define BOTH_STRINGS_H 1
8266 EOF
8267
8268         ;;
8269 esac
8270
8271 ol_link_modules=no
8272 if test $ol_enable_modules != no ; then
8273         for ac_hdr in ltdl.h
8274 do
8275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8277 echo "configure:8278: checking for $ac_hdr" >&5
8278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <$ac_hdr>
8285 EOF
8286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8287 { (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8289 if test -z "$ac_err"; then
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=yes"
8292 else
8293   echo "$ac_err" >&5
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 fi
8301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_hdr 1
8306 EOF
8307  
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311 done
8312
8313
8314         if test $ac_cv_header_ltdl_h = no ; then
8315                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8316         fi
8317
8318         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8319 echo "configure:8320: checking for lt_dlinit in -lltdl" >&5
8320 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   ac_save_LIBS="$LIBS"
8325 LIBS="-lltdl  $LIBS"
8326 cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* Override any gcc2 internal prototype to avoid an error.  */
8330 /* We use char because int might match the return type of a gcc2
8331     builtin and then its argument prototype would still apply.  */
8332 char lt_dlinit();
8333
8334 int main() {
8335 lt_dlinit()
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=yes"
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_lib_$ac_lib_var=no"
8346 fi
8347 rm -f conftest*
8348 LIBS="$ac_save_LIBS"
8349
8350 fi
8351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353   
8354                 MODULES_LIBS=-lltdl
8355                 cat >> confdefs.h <<\EOF
8356 #define HAVE_LIBLTDL 1
8357 EOF
8358
8359         
8360 else
8361   echo "$ac_t""no" 1>&6
8362 fi
8363
8364
8365         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8366                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8367         fi
8368         ol_link_modules=yes
8369 else
8370         ol_with_bdb_module=static
8371         ol_with_dnssrv_module=static
8372         ol_with_ldap_module=static
8373         ol_with_ldbm_module=static
8374         ol_with_meta_module=static
8375         ol_with_monitor_module=static
8376         ol_with_null_module=static
8377         ol_with_passwd_module=static
8378         ol_with_perl_module=static
8379         ol_with_shell_module=static
8380         ol_with_sql_module=static
8381 fi
8382
8383 # test for EBCDIC
8384 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8385 echo "configure:8386: checking for EBCDIC" >&5
8386 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   
8390         cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393
8394 #if !('M' == 0xd4)
8395 #include <__ASCII__/generate_error.h>
8396 #endif
8397
8398 EOF
8399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8400 { (eval echo configure:8401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8402 if test -z "$ac_err"; then
8403   rm -rf conftest*
8404   ol_cv_cpp_ebcdic=yes
8405 else
8406   echo "$ac_err" >&5
8407   echo "configure: failed program was:" >&5
8408   cat conftest.$ac_ext >&5
8409   rm -rf conftest*
8410   ol_cv_cpp_ebcdic=no
8411 fi
8412 rm -f conftest*
8413 fi
8414
8415 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8416 if test $ol_cv_cpp_ebcdic = yes ; then
8417         cat >> confdefs.h <<\EOF
8418 #define HAVE_EBCDIC 1
8419 EOF
8420
8421 fi
8422
8423 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8424 echo "configure:8425: checking for ANSI C header files" >&5
8425 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8426   echo $ac_n "(cached) $ac_c" 1>&6
8427 else
8428   cat > conftest.$ac_ext <<EOF
8429 #line 8430 "configure"
8430 #include "confdefs.h"
8431 #include <stdlib.h>
8432 #include <stdarg.h>
8433 #include <string.h>
8434 #include <float.h>
8435 EOF
8436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8437 { (eval echo configure:8438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8439 if test -z "$ac_err"; then
8440   rm -rf conftest*
8441   ol_cv_header_stdc=yes
8442 else
8443   echo "$ac_err" >&5
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -rf conftest*
8447   ol_cv_header_stdc=no
8448 fi
8449 rm -f conftest*
8450
8451 if test $ol_cv_header_stdc = yes; then
8452   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8453 cat > conftest.$ac_ext <<EOF
8454 #line 8455 "configure"
8455 #include "confdefs.h"
8456 #include <string.h>
8457 EOF
8458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8459   egrep "memchr" >/dev/null 2>&1; then
8460   :
8461 else
8462   rm -rf conftest*
8463   ol_cv_header_stdc=no
8464 fi
8465 rm -f conftest*
8466
8467 fi
8468
8469 if test $ol_cv_header_stdc = yes; then
8470   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8471 cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 EOF
8476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8477   egrep "free" >/dev/null 2>&1; then
8478   :
8479 else
8480   rm -rf conftest*
8481   ol_cv_header_stdc=no
8482 fi
8483 rm -f conftest*
8484
8485 fi
8486
8487 if test $ol_cv_header_stdc = yes; then
8488   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8489 if test "$cross_compiling" = yes; then
8490   :
8491 else
8492   cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <ctype.h>
8496 #ifndef HAVE_EBCDIC
8497 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8498 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8499 #else
8500 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8501                 || ('j' <= (c) && (c) <= 'r') \
8502                 || ('s' <= (c) && (c) <= 'z'))
8503 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8504 #endif
8505 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8506 int main () { int i; for (i = 0; i < 256; i++)
8507 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8508 exit (0); }
8509
8510 EOF
8511 if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8512 then
8513   :
8514 else
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -fr conftest*
8518   ol_cv_header_stdc=no
8519 fi
8520 rm -fr conftest*
8521 fi
8522
8523 fi
8524 fi
8525
8526 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8527 if test $ol_cv_header_stdc = yes; then
8528   cat >> confdefs.h <<\EOF
8529 #define STDC_HEADERS 1
8530 EOF
8531
8532 fi
8533 ac_cv_header_stdc=disable
8534
8535
8536 if test $ol_cv_header_stdc != yes; then
8537         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8538 fi
8539
8540 ac_header_dirent=no
8541 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8542 do
8543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8544 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8545 echo "configure:8546: checking for $ac_hdr that defines DIR" >&5
8546 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8547   echo $ac_n "(cached) $ac_c" 1>&6
8548 else
8549   cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 #include <sys/types.h>
8553 #include <$ac_hdr>
8554 int main() {
8555 DIR *dirp = 0;
8556 ; return 0; }
8557 EOF
8558 if { (eval echo configure:8559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8559   rm -rf conftest*
8560   eval "ac_cv_header_dirent_$ac_safe=yes"
8561 else
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_header_dirent_$ac_safe=no"
8566 fi
8567 rm -f conftest*
8568 fi
8569 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8570   echo "$ac_t""yes" 1>&6
8571     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8572   cat >> confdefs.h <<EOF
8573 #define $ac_tr_hdr 1
8574 EOF
8575  ac_header_dirent=$ac_hdr; break
8576 else
8577   echo "$ac_t""no" 1>&6
8578 fi
8579 done
8580 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8581 if test $ac_header_dirent = dirent.h; then
8582 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8583 echo "configure:8584: checking for opendir in -ldir" >&5
8584 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8586   echo $ac_n "(cached) $ac_c" 1>&6
8587 else
8588   ac_save_LIBS="$LIBS"
8589 LIBS="-ldir  $LIBS"
8590 cat > conftest.$ac_ext <<EOF
8591 #line 8592 "configure"
8592 #include "confdefs.h"
8593 /* Override any gcc2 internal prototype to avoid an error.  */
8594 /* We use char because int might match the return type of a gcc2
8595     builtin and then its argument prototype would still apply.  */
8596 char opendir();
8597
8598 int main() {
8599 opendir()
8600 ; return 0; }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=yes"
8605 else
8606   echo "configure: failed program was:" >&5
8607   cat conftest.$ac_ext >&5
8608   rm -rf conftest*
8609   eval "ac_cv_lib_$ac_lib_var=no"
8610 fi
8611 rm -f conftest*
8612 LIBS="$ac_save_LIBS"
8613
8614 fi
8615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8616   echo "$ac_t""yes" 1>&6
8617   LIBS="$LIBS -ldir"
8618 else
8619   echo "$ac_t""no" 1>&6
8620 fi
8621
8622 else
8623 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8624 echo "configure:8625: checking for opendir in -lx" >&5
8625 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8626 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8627   echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629   ac_save_LIBS="$LIBS"
8630 LIBS="-lx  $LIBS"
8631 cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 /* Override any gcc2 internal prototype to avoid an error.  */
8635 /* We use char because int might match the return type of a gcc2
8636     builtin and then its argument prototype would still apply.  */
8637 char opendir();
8638
8639 int main() {
8640 opendir()
8641 ; return 0; }
8642 EOF
8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=yes"
8646 else
8647   echo "configure: failed program was:" >&5
8648   cat conftest.$ac_ext >&5
8649   rm -rf conftest*
8650   eval "ac_cv_lib_$ac_lib_var=no"
8651 fi
8652 rm -f conftest*
8653 LIBS="$ac_save_LIBS"
8654
8655 fi
8656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8657   echo "$ac_t""yes" 1>&6
8658   LIBS="$LIBS -lx"
8659 else
8660   echo "$ac_t""no" 1>&6
8661 fi
8662
8663 fi
8664
8665 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8666 echo "configure:8667: checking for sys/wait.h that is POSIX.1 compatible" >&5
8667 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <sys/types.h>
8674 #include <sys/wait.h>
8675 #ifndef WEXITSTATUS
8676 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8677 #endif
8678 #ifndef WIFEXITED
8679 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8680 #endif
8681 int main() {
8682 int s;
8683 wait (&s);
8684 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8685 ; return 0; }
8686 EOF
8687 if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8688   rm -rf conftest*
8689   ac_cv_header_sys_wait_h=yes
8690 else
8691   echo "configure: failed program was:" >&5
8692   cat conftest.$ac_ext >&5
8693   rm -rf conftest*
8694   ac_cv_header_sys_wait_h=no
8695 fi
8696 rm -f conftest*
8697 fi
8698
8699 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8700 if test $ac_cv_header_sys_wait_h = yes; then
8701   cat >> confdefs.h <<\EOF
8702 #define HAVE_SYS_WAIT_H 1
8703 EOF
8704
8705 fi
8706
8707 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8708 echo "configure:8709: checking POSIX termios" >&5
8709 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8710   echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712   cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716 #include <unistd.h>
8717 #include <termios.h>
8718 int main() {
8719 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8720    tcgetattr(0, 0);
8721 ; return 0; }
8722 EOF
8723 if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8724   rm -rf conftest*
8725   am_cv_sys_posix_termios=yes
8726 else
8727   echo "configure: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   rm -rf conftest*
8730   am_cv_sys_posix_termios=no
8731 fi
8732 rm -f conftest*
8733 fi
8734
8735 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8736
8737
8738  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8739 echo "configure:8740: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8740 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8741   echo $ac_n "(cached) $ac_c" 1>&6
8742 else
8743   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8744
8745   gwinsz_in_termios_h=no
8746   if test $am_cv_sys_posix_termios = yes; then
8747     cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750 #include <sys/types.h>
8751 #     include <termios.h>
8752 #     ifdef TIOCGWINSZ
8753         yes
8754 #     endif
8755     
8756 EOF
8757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8758   egrep "yes" >/dev/null 2>&1; then
8759   rm -rf conftest*
8760   gwinsz_in_termios_h=yes
8761 fi
8762 rm -f conftest*
8763
8764   fi
8765
8766   if test $gwinsz_in_termios_h = no; then
8767     cat > conftest.$ac_ext <<EOF
8768 #line 8769 "configure"
8769 #include "confdefs.h"
8770 #include <sys/types.h>
8771 #     include <sys/ioctl.h>
8772 #     ifdef TIOCGWINSZ
8773         yes
8774 #     endif
8775     
8776 EOF
8777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8778   egrep "yes" >/dev/null 2>&1; then
8779   rm -rf conftest*
8780   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8781 fi
8782 rm -f conftest*
8783
8784   fi
8785   
8786 fi
8787
8788 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8789   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8790     cat >> confdefs.h <<\EOF
8791 #define GWINSZ_IN_SYS_IOCTL 1
8792 EOF
8793
8794   fi
8795
8796 if test $am_cv_sys_posix_termios = yes ; then
8797         cat >> confdefs.h <<\EOF
8798 #define HAVE_POSIX_TERMIOS 1
8799 EOF
8800
8801 fi
8802
8803 for ac_hdr in \
8804         arpa/inet.h             \
8805         arpa/nameser.h  \
8806         assert.h                \
8807         conio.h                 \
8808         crypt.h                 \
8809         direct.h                \
8810         errno.h                 \
8811         fcntl.h                 \
8812         filio.h                 \
8813         getopt.h                \
8814         grp.h                   \
8815         io.h                    \
8816         libutil.h               \
8817         limits.h                \
8818         locale.h                \
8819         netinet/tcp.h   \
8820         malloc.h                \
8821         memory.h                \
8822         psap.h                  \
8823         pwd.h                   \
8824         process.h               \
8825         resolv.h                \
8826         sgtty.h                 \
8827         shadow.h                \
8828         stddef.h                \
8829         string.h                \
8830         strings.h               \
8831         sysexits.h              \
8832         sys/file.h              \
8833         sys/filio.h             \
8834         sys/errno.h             \
8835         sys/ioctl.h             \
8836         sys/param.h             \
8837         sys/resource.h  \
8838         sys/select.h    \
8839         sys/socket.h    \
8840         sys/stat.h              \
8841         sys/syslog.h    \
8842         sys/time.h              \
8843         sys/types.h             \
8844         sys/ucred.h             \
8845         sys/uio.h               \
8846         syslog.h                \
8847         termios.h               \
8848         unistd.h                \
8849         winsock.h               \
8850         winsock2.h              \
8851
8852 do
8853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8855 echo "configure:8856: checking for $ac_hdr" >&5
8856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8857   echo $ac_n "(cached) $ac_c" 1>&6
8858 else
8859   cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862 #include <$ac_hdr>
8863 EOF
8864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8865 { (eval echo configure:8866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8867 if test -z "$ac_err"; then
8868   rm -rf conftest*
8869   eval "ac_cv_header_$ac_safe=yes"
8870 else
8871   echo "$ac_err" >&5
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_header_$ac_safe=no"
8876 fi
8877 rm -f conftest*
8878 fi
8879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8880   echo "$ac_t""yes" 1>&6
8881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8882   cat >> confdefs.h <<EOF
8883 #define $ac_tr_hdr 1
8884 EOF
8885  
8886 else
8887   echo "$ac_t""no" 1>&6
8888 fi
8889 done
8890
8891
8892
8893
8894 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8895 echo "configure:8896: checking for dlopen" >&5
8896 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899   cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902 /* System header to define __stub macros and hopefully few prototypes,
8903     which can conflict with char dlopen(); below.  */
8904 #include <assert.h>
8905 /* Override any gcc2 internal prototype to avoid an error.  */
8906 /* We use char because int might match the return type of a gcc2
8907     builtin and then its argument prototype would still apply.  */
8908 char dlopen();
8909 char (*f)();
8910
8911 int main() {
8912
8913 /* The GNU C library defines this for functions which it implements
8914     to always fail with ENOSYS.  Some functions are actually named
8915     something starting with __ and the normal name is an alias.  */
8916 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8917 choke me
8918 #else
8919 f = dlopen;
8920 #endif
8921
8922 ; return 0; }
8923 EOF
8924 if { (eval echo configure:8925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8925   rm -rf conftest*
8926   eval "ac_cv_func_dlopen=yes"
8927 else
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   eval "ac_cv_func_dlopen=no"
8932 fi
8933 rm -f conftest*
8934 fi
8935
8936 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8937   echo "$ac_t""yes" 1>&6
8938   :
8939 else
8940   echo "$ac_t""no" 1>&6
8941 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8942 echo "configure:8943: checking for dlopen in -ldl" >&5
8943 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8945   echo $ac_n "(cached) $ac_c" 1>&6
8946 else
8947   ac_save_LIBS="$LIBS"
8948 LIBS="-ldl  $LIBS"
8949 cat > conftest.$ac_ext <<EOF
8950 #line 8951 "configure"
8951 #include "confdefs.h"
8952 /* Override any gcc2 internal prototype to avoid an error.  */
8953 /* We use char because int might match the return type of a gcc2
8954     builtin and then its argument prototype would still apply.  */
8955 char dlopen();
8956
8957 int main() {
8958 dlopen()
8959 ; return 0; }
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8962   rm -rf conftest*
8963   eval "ac_cv_lib_$ac_lib_var=yes"
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -rf conftest*
8968   eval "ac_cv_lib_$ac_lib_var=no"
8969 fi
8970 rm -f conftest*
8971 LIBS="$ac_save_LIBS"
8972
8973 fi
8974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8975   echo "$ac_t""yes" 1>&6
8976     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8977     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8978   cat >> confdefs.h <<EOF
8979 #define $ac_tr_lib 1
8980 EOF
8981
8982   LIBS="-ldl $LIBS"
8983
8984 else
8985   echo "$ac_t""no" 1>&6
8986 fi
8987
8988 fi
8989
8990
8991 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8992 echo "configure:8993: checking for sigset in -lV3" >&5
8993 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8994 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8995   echo $ac_n "(cached) $ac_c" 1>&6
8996 else
8997   ac_save_LIBS="$LIBS"
8998 LIBS="-lV3  $LIBS"
8999 cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002 /* Override any gcc2 internal prototype to avoid an error.  */
9003 /* We use char because int might match the return type of a gcc2
9004     builtin and then its argument prototype would still apply.  */
9005 char sigset();
9006
9007 int main() {
9008 sigset()
9009 ; return 0; }
9010 EOF
9011 if { (eval echo configure:9012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9012   rm -rf conftest*
9013   eval "ac_cv_lib_$ac_lib_var=yes"
9014 else
9015   echo "configure: failed program was:" >&5
9016   cat conftest.$ac_ext >&5
9017   rm -rf conftest*
9018   eval "ac_cv_lib_$ac_lib_var=no"
9019 fi
9020 rm -f conftest*
9021 LIBS="$ac_save_LIBS"
9022
9023 fi
9024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9025   echo "$ac_t""yes" 1>&6
9026     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9027     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9028   cat >> confdefs.h <<EOF
9029 #define $ac_tr_lib 1
9030 EOF
9031
9032   LIBS="-lV3 $LIBS"
9033
9034 else
9035   echo "$ac_t""no" 1>&6
9036 fi
9037
9038
9039 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9040 echo "configure:9041: checking for winsock" >&5
9041 save_LIBS="$LIBS"
9042 for curlib in ws2_32 wsock32; do
9043         LIBS="$LIBS -l$curlib"
9044         cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047
9048                         char socket@12();
9049                         char select@20();
9050                         char closesocket@4();
9051                         char gethostname@8();
9052                         
9053 int main() {
9054
9055                         socket@12();
9056                         select@20();
9057                         closesocket@4();
9058                         gethostname@8();
9059                         
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   have_winsock=yes
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   have_winsock=no
9070 fi
9071 rm -f conftest*
9072
9073         if test $have_winsock = yes; then
9074                 cat >> confdefs.h <<\EOF
9075 #define HAVE_WINSOCK 1
9076 EOF
9077
9078                 ac_cv_func_socket=yes
9079                 ac_cv_func_select=yes
9080                 ac_cv_func_closesocket=yes
9081                 ac_cv_func_gethostname=yes
9082                 if test $curlib = ws2_32; then
9083                         have_winsock=winsock2
9084                         cat >> confdefs.h <<\EOF
9085 #define HAVE_WINSOCK2 1
9086 EOF
9087
9088                 fi
9089                 break
9090         fi
9091         LIBS="$save_LIBS"
9092 done
9093 echo "$ac_t""$have_winsock" 1>&6
9094
9095
9096 echo $ac_n "checking for socket""... $ac_c" 1>&6
9097 echo "configure:9098: checking for socket" >&5
9098 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9099   echo $ac_n "(cached) $ac_c" 1>&6
9100 else
9101   cat > conftest.$ac_ext <<EOF
9102 #line 9103 "configure"
9103 #include "confdefs.h"
9104 /* System header to define __stub macros and hopefully few prototypes,
9105     which can conflict with char socket(); below.  */
9106 #include <assert.h>
9107 /* Override any gcc2 internal prototype to avoid an error.  */
9108 /* We use char because int might match the return type of a gcc2
9109     builtin and then its argument prototype would still apply.  */
9110 char socket();
9111 char (*f)();
9112
9113 int main() {
9114
9115 /* The GNU C library defines this for functions which it implements
9116     to always fail with ENOSYS.  Some functions are actually named
9117     something starting with __ and the normal name is an alias.  */
9118 #if defined (__stub_socket) || defined (__stub___socket)
9119 choke me
9120 #else
9121 f = socket;
9122 #endif
9123
9124 ; return 0; }
9125 EOF
9126 if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9127   rm -rf conftest*
9128   eval "ac_cv_func_socket=yes"
9129 else
9130   echo "configure: failed program was:" >&5
9131   cat conftest.$ac_ext >&5
9132   rm -rf conftest*
9133   eval "ac_cv_func_socket=no"
9134 fi
9135 rm -f conftest*
9136 fi
9137
9138 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9139   echo "$ac_t""yes" 1>&6
9140   :
9141 else
9142   echo "$ac_t""no" 1>&6
9143         
9144         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9145 echo "configure:9146: checking for main in -lsocket" >&5
9146 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9147 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9148   echo $ac_n "(cached) $ac_c" 1>&6
9149 else
9150   ac_save_LIBS="$LIBS"
9151 LIBS="-lsocket  $LIBS"
9152 cat > conftest.$ac_ext <<EOF
9153 #line 9154 "configure"
9154 #include "confdefs.h"
9155
9156 int main() {
9157 main()
9158 ; return 0; }
9159 EOF
9160 if { (eval echo configure:9161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9161   rm -rf conftest*
9162   eval "ac_cv_lib_$ac_lib_var=yes"
9163 else
9164   echo "configure: failed program was:" >&5
9165   cat conftest.$ac_ext >&5
9166   rm -rf conftest*
9167   eval "ac_cv_lib_$ac_lib_var=no"
9168 fi
9169 rm -f conftest*
9170 LIBS="$ac_save_LIBS"
9171
9172 fi
9173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9174   echo "$ac_t""yes" 1>&6
9175     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9176     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9177   cat >> confdefs.h <<EOF
9178 #define $ac_tr_lib 1
9179 EOF
9180
9181   LIBS="-lsocket $LIBS"
9182
9183 else
9184   echo "$ac_t""no" 1>&6
9185 fi
9186
9187         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9188 echo "configure:9189: checking for main in -lnet" >&5
9189 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9190 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9191   echo $ac_n "(cached) $ac_c" 1>&6
9192 else
9193   ac_save_LIBS="$LIBS"
9194 LIBS="-lnet  $LIBS"
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main() {
9200 main()
9201 ; return 0; }
9202 EOF
9203 if { (eval echo configure:9204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=yes"
9206 else
9207   echo "configure: failed program was:" >&5
9208   cat conftest.$ac_ext >&5
9209   rm -rf conftest*
9210   eval "ac_cv_lib_$ac_lib_var=no"
9211 fi
9212 rm -f conftest*
9213 LIBS="$ac_save_LIBS"
9214
9215 fi
9216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9219     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9220   cat >> confdefs.h <<EOF
9221 #define $ac_tr_lib 1
9222 EOF
9223
9224   LIBS="-lnet $LIBS"
9225
9226 else
9227   echo "$ac_t""no" 1>&6
9228 fi
9229
9230         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9231 echo "configure:9232: checking for main in -lnsl_s" >&5
9232 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9234   echo $ac_n "(cached) $ac_c" 1>&6
9235 else
9236   ac_save_LIBS="$LIBS"
9237 LIBS="-lnsl_s  $LIBS"
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241
9242 int main() {
9243 main()
9244 ; return 0; }
9245 EOF
9246 if { (eval echo configure:9247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9247   rm -rf conftest*
9248   eval "ac_cv_lib_$ac_lib_var=yes"
9249 else
9250   echo "configure: failed program was:" >&5
9251   cat conftest.$ac_ext >&5
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=no"
9254 fi
9255 rm -f conftest*
9256 LIBS="$ac_save_LIBS"
9257
9258 fi
9259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9260   echo "$ac_t""yes" 1>&6
9261     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9263   cat >> confdefs.h <<EOF
9264 #define $ac_tr_lib 1
9265 EOF
9266
9267   LIBS="-lnsl_s $LIBS"
9268
9269 else
9270   echo "$ac_t""no" 1>&6
9271 fi
9272
9273         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9274 echo "configure:9275: checking for main in -lnsl" >&5
9275 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   ac_save_LIBS="$LIBS"
9280 LIBS="-lnsl  $LIBS"
9281 cat > conftest.$ac_ext <<EOF
9282 #line 9283 "configure"
9283 #include "confdefs.h"
9284
9285 int main() {
9286 main()
9287 ; return 0; }
9288 EOF
9289 if { (eval echo configure:9290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9290   rm -rf conftest*
9291   eval "ac_cv_lib_$ac_lib_var=yes"
9292 else
9293   echo "configure: failed program was:" >&5
9294   cat conftest.$ac_ext >&5
9295   rm -rf conftest*
9296   eval "ac_cv_lib_$ac_lib_var=no"
9297 fi
9298 rm -f conftest*
9299 LIBS="$ac_save_LIBS"
9300
9301 fi
9302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9303   echo "$ac_t""yes" 1>&6
9304     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9306   cat >> confdefs.h <<EOF
9307 #define $ac_tr_lib 1
9308 EOF
9309
9310   LIBS="-lnsl $LIBS"
9311
9312 else
9313   echo "$ac_t""no" 1>&6
9314 fi
9315
9316         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9317 echo "configure:9318: checking for socket in -linet" >&5
9318 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9320   echo $ac_n "(cached) $ac_c" 1>&6
9321 else
9322   ac_save_LIBS="$LIBS"
9323 LIBS="-linet  $LIBS"
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 /* Override any gcc2 internal prototype to avoid an error.  */
9328 /* We use char because int might match the return type of a gcc2
9329     builtin and then its argument prototype would still apply.  */
9330 char socket();
9331
9332 int main() {
9333 socket()
9334 ; return 0; }
9335 EOF
9336 if { (eval echo configure:9337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=yes"
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=no"
9344 fi
9345 rm -f conftest*
9346 LIBS="$ac_save_LIBS"
9347
9348 fi
9349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9350   echo "$ac_t""yes" 1>&6
9351     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9352     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9353   cat >> confdefs.h <<EOF
9354 #define $ac_tr_lib 1
9355 EOF
9356
9357   LIBS="-linet $LIBS"
9358
9359 else
9360   echo "$ac_t""no" 1>&6
9361 fi
9362
9363         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9364 echo "configure:9365: checking for main in -lgen" >&5
9365 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369   ac_save_LIBS="$LIBS"
9370 LIBS="-lgen  $LIBS"
9371 cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374
9375 int main() {
9376 main()
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9380   rm -rf conftest*
9381   eval "ac_cv_lib_$ac_lib_var=yes"
9382 else
9383   echo "configure: failed program was:" >&5
9384   cat conftest.$ac_ext >&5
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=no"
9387 fi
9388 rm -f conftest*
9389 LIBS="$ac_save_LIBS"
9390
9391 fi
9392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9393   echo "$ac_t""yes" 1>&6
9394     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9396   cat >> confdefs.h <<EOF
9397 #define $ac_tr_lib 1
9398 EOF
9399
9400   LIBS="-lgen $LIBS"
9401
9402 else
9403   echo "$ac_t""no" 1>&6
9404 fi
9405
9406
9407 fi
9408
9409
9410 echo $ac_n "checking for select""... $ac_c" 1>&6
9411 echo "configure:9412: checking for select" >&5
9412 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9413   echo $ac_n "(cached) $ac_c" 1>&6
9414 else
9415   cat > conftest.$ac_ext <<EOF
9416 #line 9417 "configure"
9417 #include "confdefs.h"
9418 /* System header to define __stub macros and hopefully few prototypes,
9419     which can conflict with char select(); below.  */
9420 #include <assert.h>
9421 /* Override any gcc2 internal prototype to avoid an error.  */
9422 /* We use char because int might match the return type of a gcc2
9423     builtin and then its argument prototype would still apply.  */
9424 char select();
9425 char (*f)();
9426
9427 int main() {
9428
9429 /* The GNU C library defines this for functions which it implements
9430     to always fail with ENOSYS.  Some functions are actually named
9431     something starting with __ and the normal name is an alias.  */
9432 #if defined (__stub_select) || defined (__stub___select)
9433 choke me
9434 #else
9435 f = select;
9436 #endif
9437
9438 ; return 0; }
9439 EOF
9440 if { (eval echo configure:9441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9441   rm -rf conftest*
9442   eval "ac_cv_func_select=yes"
9443 else
9444   echo "configure: failed program was:" >&5
9445   cat conftest.$ac_ext >&5
9446   rm -rf conftest*
9447   eval "ac_cv_func_select=no"
9448 fi
9449 rm -f conftest*
9450 fi
9451
9452 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9453   echo "$ac_t""yes" 1>&6
9454   :
9455 else
9456   echo "$ac_t""no" 1>&6
9457 { echo "configure: error: select() required." 1>&2; exit 1; }
9458 fi
9459
9460
9461 if test "${ac_cv_header_winsock_h}" != yes; then
9462                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9463 echo "configure:9464: checking types of arguments for select()" >&5
9464  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9465   echo $ac_n "(cached) $ac_c" 1>&6
9466 else
9467    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9468   echo $ac_n "(cached) $ac_c" 1>&6
9469 else
9470     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9474      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9475       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9476        cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 #ifdef HAVE_SYS_TYPES_H
9480 #include <sys/types.h>
9481 #endif
9482 #ifdef HAVE_SYS_TIME_H
9483 #include <sys/time.h>
9484 #endif
9485 #ifdef HAVE_SYS_SELECT_H
9486 #include <sys/select.h>
9487 #endif
9488 #ifdef HAVE_SYS_SOCKET_H
9489 #include <sys/socket.h>
9490 #endif
9491 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);
9492 int main() {
9493
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9497   rm -rf conftest*
9498           ac_not_found=no ; break 3
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   ac_not_found=yes
9504 fi
9505 rm -f conftest*
9506       done
9507      done
9508     done
9509    
9510 fi
9511   
9512 fi
9513  
9514 fi
9515  if test "$ac_not_found" = yes; then
9516   ac_cv_func_select_arg1=int 
9517   ac_cv_func_select_arg234='int *' 
9518   ac_cv_func_select_arg5='struct timeval *'
9519  fi
9520  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9521  cat >> confdefs.h <<EOF
9522 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9523 EOF
9524
9525  cat >> confdefs.h <<EOF
9526 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9527 EOF
9528
9529  cat >> confdefs.h <<EOF
9530 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9531 EOF
9532
9533
9534 fi
9535
9536
9537 for ac_hdr in regex.h 
9538 do
9539 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9540 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9541 echo "configure:9542: checking for $ac_hdr" >&5
9542 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9543   echo $ac_n "(cached) $ac_c" 1>&6
9544 else
9545   cat > conftest.$ac_ext <<EOF
9546 #line 9547 "configure"
9547 #include "confdefs.h"
9548 #include <$ac_hdr>
9549 EOF
9550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9551 { (eval echo configure:9552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9553 if test -z "$ac_err"; then
9554   rm -rf conftest*
9555   eval "ac_cv_header_$ac_safe=yes"
9556 else
9557   echo "$ac_err" >&5
9558   echo "configure: failed program was:" >&5
9559   cat conftest.$ac_ext >&5
9560   rm -rf conftest*
9561   eval "ac_cv_header_$ac_safe=no"
9562 fi
9563 rm -f conftest*
9564 fi
9565 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9566   echo "$ac_t""yes" 1>&6
9567     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9568   cat >> confdefs.h <<EOF
9569 #define $ac_tr_hdr 1
9570 EOF
9571  
9572 else
9573   echo "$ac_t""no" 1>&6
9574 fi
9575 done
9576
9577 if test "$ac_cv_header_regex_h" != yes ; then
9578         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9579 fi
9580
9581 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9582 echo "configure:9583: checking for library containing regfree" >&5
9583 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   ac_func_search_save_LIBS="$LIBS"
9587 ac_cv_search_regfree="no"
9588 cat > conftest.$ac_ext <<EOF
9589 #line 9590 "configure"
9590 #include "confdefs.h"
9591 /* Override any gcc2 internal prototype to avoid an error.  */
9592 /* We use char because int might match the return type of a gcc2
9593     builtin and then its argument prototype would still apply.  */
9594 char regfree();
9595
9596 int main() {
9597 regfree()
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9601   rm -rf conftest*
9602   ac_cv_search_regfree="none required"
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606 fi
9607 rm -f conftest*
9608 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9609 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9610 cat > conftest.$ac_ext <<EOF
9611 #line 9612 "configure"
9612 #include "confdefs.h"
9613 /* Override any gcc2 internal prototype to avoid an error.  */
9614 /* We use char because int might match the return type of a gcc2
9615     builtin and then its argument prototype would still apply.  */
9616 char regfree();
9617
9618 int main() {
9619 regfree()
9620 ; return 0; }
9621 EOF
9622 if { (eval echo configure:9623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9623   rm -rf conftest*
9624   ac_cv_search_regfree="-l$ac_lib"
9625 break
9626 else
9627   echo "configure: failed program was:" >&5
9628   cat conftest.$ac_ext >&5
9629 fi
9630 rm -f conftest*
9631 done
9632 LIBS="$ac_func_search_save_LIBS"
9633 fi
9634
9635 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9636 if test "$ac_cv_search_regfree" != "no"; then
9637   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9638   :
9639 else :
9640   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9641 fi
9642
9643
9644 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9645 echo "configure:9646: checking for compatible POSIX regex" >&5
9646 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9647   echo $ac_n "(cached) $ac_c" 1>&6
9648 else
9649   
9650         if test "$cross_compiling" = yes; then
9651   ol_cv_c_posix_regex=cross
9652 else
9653   cat > conftest.$ac_ext <<EOF
9654 #line 9655 "configure"
9655 #include "confdefs.h"
9656
9657 #include <sys/types.h>
9658 #include <regex.h>
9659 static char *pattern, *string;
9660 main()
9661 {
9662         int rc;
9663         regex_t re;
9664
9665         pattern = "^A";
9666
9667         if(regcomp(&re, pattern, 0)) {
9668                 return -1;
9669         }
9670         
9671         string = "ALL MATCH";
9672         
9673         rc = regexec(&re, string, 0, (void*)0, 0);
9674
9675         regfree(&re);
9676
9677         return rc;
9678 }
9679 EOF
9680 if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9681 then
9682   ol_cv_c_posix_regex=yes
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -fr conftest*
9687   ol_cv_c_posix_regex=no
9688 fi
9689 rm -fr conftest*
9690 fi
9691
9692 fi
9693
9694 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9695
9696 if test "$ol_cv_c_posix_regex" = no ; then
9697         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9698 fi
9699
9700
9701 have_uuid=no
9702 for ac_hdr in sys/uuid.h
9703 do
9704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9706 echo "configure:9707: checking for $ac_hdr" >&5
9707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9708   echo $ac_n "(cached) $ac_c" 1>&6
9709 else
9710   cat > conftest.$ac_ext <<EOF
9711 #line 9712 "configure"
9712 #include "confdefs.h"
9713 #include <$ac_hdr>
9714 EOF
9715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9716 { (eval echo configure:9717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9718 if test -z "$ac_err"; then
9719   rm -rf conftest*
9720   eval "ac_cv_header_$ac_safe=yes"
9721 else
9722   echo "$ac_err" >&5
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -rf conftest*
9726   eval "ac_cv_header_$ac_safe=no"
9727 fi
9728 rm -f conftest*
9729 fi
9730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9731   echo "$ac_t""yes" 1>&6
9732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9733   cat >> confdefs.h <<EOF
9734 #define $ac_tr_hdr 1
9735 EOF
9736  
9737 else
9738   echo "$ac_t""no" 1>&6
9739 fi
9740 done
9741
9742 if test $ac_cv_header_sys_uuid_h = yes ; then
9743         save_LIBS="$LIBS"
9744         
9745 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9746 echo "configure:9747: checking for library containing uuid_to_str" >&5
9747 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9748   echo $ac_n "(cached) $ac_c" 1>&6
9749 else
9750   ac_func_search_save_LIBS="$LIBS"
9751 ac_cv_search_uuid_to_str="no"
9752 cat > conftest.$ac_ext <<EOF
9753 #line 9754 "configure"
9754 #include "confdefs.h"
9755 /* Override any gcc2 internal prototype to avoid an error.  */
9756 /* We use char because int might match the return type of a gcc2
9757     builtin and then its argument prototype would still apply.  */
9758 char uuid_to_str();
9759
9760 int main() {
9761 uuid_to_str()
9762 ; return 0; }
9763 EOF
9764 if { (eval echo configure:9765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9765   rm -rf conftest*
9766   ac_cv_search_uuid_to_str="none required"
9767 else
9768   echo "configure: failed program was:" >&5
9769   cat conftest.$ac_ext >&5
9770 fi
9771 rm -f conftest*
9772 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9773 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9774 cat > conftest.$ac_ext <<EOF
9775 #line 9776 "configure"
9776 #include "confdefs.h"
9777 /* Override any gcc2 internal prototype to avoid an error.  */
9778 /* We use char because int might match the return type of a gcc2
9779     builtin and then its argument prototype would still apply.  */
9780 char uuid_to_str();
9781
9782 int main() {
9783 uuid_to_str()
9784 ; return 0; }
9785 EOF
9786 if { (eval echo configure:9787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9787   rm -rf conftest*
9788   ac_cv_search_uuid_to_str="-l$ac_lib"
9789 break
9790 else
9791   echo "configure: failed program was:" >&5
9792   cat conftest.$ac_ext >&5
9793 fi
9794 rm -f conftest*
9795 done
9796 LIBS="$ac_func_search_save_LIBS"
9797 fi
9798
9799 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9800 if test "$ac_cv_search_uuid_to_str" != "no"; then
9801   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9802   have_uuid=yes
9803 else :
9804   :
9805 fi
9806         LIBS="$save_LIBS"
9807
9808         if test have_uuid = yes ; then
9809                 cat >> confdefs.h <<\EOF
9810 #define HAVE_UUID_TO_STR 1
9811 EOF
9812
9813
9814                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9815                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9816         fi
9817 fi
9818
9819 if test $have_uuid = no ; then
9820         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9821 echo "configure:9822: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9822         save_LIBS="$LIBS"
9823         LIBS="$LIBS -lrpcrt4"
9824         cat > conftest.$ac_ext <<EOF
9825 #line 9826 "configure"
9826 #include "confdefs.h"
9827
9828                 char UuidCreate@4();
9829                 char UuidToStringA@8();
9830                 
9831 int main() {
9832
9833                 UuidCreate@4();
9834                 UuidToStringA@8();
9835                 
9836 ; return 0; }
9837 EOF
9838 if { (eval echo configure:9839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9839   rm -rf conftest*
9840   need_rpcrt=yes
9841 else
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   need_rpcrt=no
9846 fi
9847 rm -f conftest*
9848         if test $need_rpcrt = yes; then
9849                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9850         fi
9851         LIBS="$save_LIBS"
9852         echo "$ac_t""$need_rpcrt" 1>&6
9853 fi
9854
9855 ol_link_dnssrv=no
9856 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9857 echo "configure:9858: checking for res_query" >&5
9858 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9859   echo $ac_n "(cached) $ac_c" 1>&6
9860 else
9861   cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864 /* System header to define __stub macros and hopefully few prototypes,
9865     which can conflict with char res_query(); below.  */
9866 #include <assert.h>
9867 /* Override any gcc2 internal prototype to avoid an error.  */
9868 /* We use char because int might match the return type of a gcc2
9869     builtin and then its argument prototype would still apply.  */
9870 char res_query();
9871 char (*f)();
9872
9873 int main() {
9874
9875 /* The GNU C library defines this for functions which it implements
9876     to always fail with ENOSYS.  Some functions are actually named
9877     something starting with __ and the normal name is an alias.  */
9878 #if defined (__stub_res_query) || defined (__stub___res_query)
9879 choke me
9880 #else
9881 f = res_query;
9882 #endif
9883
9884 ; return 0; }
9885 EOF
9886 if { (eval echo configure:9887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9887   rm -rf conftest*
9888   eval "ac_cv_func_res_query=yes"
9889 else
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -rf conftest*
9893   eval "ac_cv_func_res_query=no"
9894 fi
9895 rm -f conftest*
9896 fi
9897
9898 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9899   echo "$ac_t""yes" 1>&6
9900   :
9901 else
9902   echo "$ac_t""no" 1>&6
9903 fi
9904
9905 if test $ac_cv_func_res_query = no ; then 
9906         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9907 echo "configure:9908: checking for __res_query" >&5
9908 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9909   echo $ac_n "(cached) $ac_c" 1>&6
9910 else
9911   cat > conftest.$ac_ext <<EOF
9912 #line 9913 "configure"
9913 #include "confdefs.h"
9914 /* System header to define __stub macros and hopefully few prototypes,
9915     which can conflict with char __res_query(); below.  */
9916 #include <assert.h>
9917 /* Override any gcc2 internal prototype to avoid an error.  */
9918 /* We use char because int might match the return type of a gcc2
9919     builtin and then its argument prototype would still apply.  */
9920 char __res_query();
9921 char (*f)();
9922
9923 int main() {
9924
9925 /* The GNU C library defines this for functions which it implements
9926     to always fail with ENOSYS.  Some functions are actually named
9927     something starting with __ and the normal name is an alias.  */
9928 #if defined (__stub___res_query) || defined (__stub_____res_query)
9929 choke me
9930 #else
9931 f = __res_query;
9932 #endif
9933
9934 ; return 0; }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9937   rm -rf conftest*
9938   eval "ac_cv_func___res_query=yes"
9939 else
9940   echo "configure: failed program was:" >&5
9941   cat conftest.$ac_ext >&5
9942   rm -rf conftest*
9943   eval "ac_cv_func___res_query=no"
9944 fi
9945 rm -f conftest*
9946 fi
9947
9948 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9949   echo "$ac_t""yes" 1>&6
9950   :
9951 else
9952   echo "$ac_t""no" 1>&6
9953 fi
9954
9955         ac_cv_func_res_query=$ac_cv_func___res_query
9956 fi
9957
9958 if test $ac_cv_func_res_query = no ; then 
9959         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9960 echo "configure:9961: checking for res_query in -lbind" >&5
9961 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9962 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9963   echo $ac_n "(cached) $ac_c" 1>&6
9964 else
9965   ac_save_LIBS="$LIBS"
9966 LIBS="-lbind  $LIBS"
9967 cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 /* Override any gcc2 internal prototype to avoid an error.  */
9971 /* We use char because int might match the return type of a gcc2
9972     builtin and then its argument prototype would still apply.  */
9973 char res_query();
9974
9975 int main() {
9976 res_query()
9977 ; return 0; }
9978 EOF
9979 if { (eval echo configure:9980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9980   rm -rf conftest*
9981   eval "ac_cv_lib_$ac_lib_var=yes"
9982 else
9983   echo "configure: failed program was:" >&5
9984   cat conftest.$ac_ext >&5
9985   rm -rf conftest*
9986   eval "ac_cv_lib_$ac_lib_var=no"
9987 fi
9988 rm -f conftest*
9989 LIBS="$ac_save_LIBS"
9990
9991 fi
9992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9993   echo "$ac_t""yes" 1>&6
9994     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9995     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9996   cat >> confdefs.h <<EOF
9997 #define $ac_tr_lib 1
9998 EOF
9999
10000   LIBS="-lbind $LIBS"
10001
10002 else
10003   echo "$ac_t""no" 1>&6
10004 fi
10005
10006         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10007 fi
10008
10009 if test $ac_cv_func_res_query = no ; then 
10010         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10011 echo "configure:10012: checking for __res_query in -lbind" >&5
10012 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10013 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10014   echo $ac_n "(cached) $ac_c" 1>&6
10015 else
10016   ac_save_LIBS="$LIBS"
10017 LIBS="-lbind  $LIBS"
10018 cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* Override any gcc2 internal prototype to avoid an error.  */
10022 /* We use char because int might match the return type of a gcc2
10023     builtin and then its argument prototype would still apply.  */
10024 char __res_query();
10025
10026 int main() {
10027 __res_query()
10028 ; return 0; }
10029 EOF
10030 if { (eval echo configure:10031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10031   rm -rf conftest*
10032   eval "ac_cv_lib_$ac_lib_var=yes"
10033 else
10034   echo "configure: failed program was:" >&5
10035   cat conftest.$ac_ext >&5
10036   rm -rf conftest*
10037   eval "ac_cv_lib_$ac_lib_var=no"
10038 fi
10039 rm -f conftest*
10040 LIBS="$ac_save_LIBS"
10041
10042 fi
10043 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10044   echo "$ac_t""yes" 1>&6
10045     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10046     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10047   cat >> confdefs.h <<EOF
10048 #define $ac_tr_lib 1
10049 EOF
10050
10051   LIBS="-lbind $LIBS"
10052
10053 else
10054   echo "$ac_t""no" 1>&6
10055 fi
10056
10057         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10058 fi
10059
10060 if test $ac_cv_func_res_query = no ; then 
10061         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10062 echo "configure:10063: checking for res_query in -lresolv" >&5
10063 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10065   echo $ac_n "(cached) $ac_c" 1>&6
10066 else
10067   ac_save_LIBS="$LIBS"
10068 LIBS="-lresolv  $LIBS"
10069 cat > conftest.$ac_ext <<EOF
10070 #line 10071 "configure"
10071 #include "confdefs.h"
10072 /* Override any gcc2 internal prototype to avoid an error.  */
10073 /* We use char because int might match the return type of a gcc2
10074     builtin and then its argument prototype would still apply.  */
10075 char res_query();
10076
10077 int main() {
10078 res_query()
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=yes"
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   eval "ac_cv_lib_$ac_lib_var=no"
10089 fi
10090 rm -f conftest*
10091 LIBS="$ac_save_LIBS"
10092
10093 fi
10094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10097     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10098   cat >> confdefs.h <<EOF
10099 #define $ac_tr_lib 1
10100 EOF
10101
10102   LIBS="-lresolv $LIBS"
10103
10104 else
10105   echo "$ac_t""no" 1>&6
10106 fi
10107
10108         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10109 fi
10110
10111 if test $ac_cv_func_res_query = no ; then 
10112         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10113 echo "configure:10114: checking for __res_query in -lresolv" >&5
10114 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10116   echo $ac_n "(cached) $ac_c" 1>&6
10117 else
10118   ac_save_LIBS="$LIBS"
10119 LIBS="-lresolv  $LIBS"
10120 cat > conftest.$ac_ext <<EOF
10121 #line 10122 "configure"
10122 #include "confdefs.h"
10123 /* Override any gcc2 internal prototype to avoid an error.  */
10124 /* We use char because int might match the return type of a gcc2
10125     builtin and then its argument prototype would still apply.  */
10126 char __res_query();
10127
10128 int main() {
10129 __res_query()
10130 ; return 0; }
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=yes"
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_lib_$ac_lib_var=no"
10140 fi
10141 rm -f conftest*
10142 LIBS="$ac_save_LIBS"
10143
10144 fi
10145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10146   echo "$ac_t""yes" 1>&6
10147     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10149   cat >> confdefs.h <<EOF
10150 #define $ac_tr_lib 1
10151 EOF
10152
10153   LIBS="-lresolv $LIBS"
10154
10155 else
10156   echo "$ac_t""no" 1>&6
10157 fi
10158
10159         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10160 fi
10161
10162 if test "$ac_cv_func_res_query" = yes ; then
10163         cat >> confdefs.h <<\EOF
10164 #define HAVE_RES_QUERY 1
10165 EOF
10166
10167
10168         if test $ol_enable_dnssrv != no ; then
10169                 ol_link_dnssrv=yes
10170         fi
10171 fi
10172
10173 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10174         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10175 fi
10176
10177 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10178 do
10179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10180 echo "configure:10181: checking for $ac_func" >&5
10181 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 /* System header to define __stub macros and hopefully few prototypes,
10188     which can conflict with char $ac_func(); below.  */
10189 #include <assert.h>
10190 /* Override any gcc2 internal prototype to avoid an error.  */
10191 /* We use char because int might match the return type of a gcc2
10192     builtin and then its argument prototype would still apply.  */
10193 char $ac_func();
10194 char (*f)();
10195
10196 int main() {
10197
10198 /* The GNU C library defines this for functions which it implements
10199     to always fail with ENOSYS.  Some functions are actually named
10200     something starting with __ and the normal name is an alias.  */
10201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10202 choke me
10203 #else
10204 f = $ac_func;
10205 #endif
10206
10207 ; return 0; }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10210   rm -rf conftest*
10211   eval "ac_cv_func_$ac_func=yes"
10212 else
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_func_$ac_func=no"
10217 fi
10218 rm -f conftest*
10219 fi
10220
10221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10222   echo "$ac_t""yes" 1>&6
10223     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10224   cat >> confdefs.h <<EOF
10225 #define $ac_tr_func 1
10226 EOF
10227  
10228 else
10229   echo "$ac_t""no" 1>&6
10230 fi
10231 done
10232
10233
10234 ol_link_ipv6=no
10235 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10236         if test $ol_enable_ipv6 = yes ; then
10237                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10238         fi
10239 elif test $ol_enable_ipv6 != no ; then
10240         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10241 echo "configure:10242: checking INET6_ADDRSTRLEN" >&5
10242 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10243   echo $ac_n "(cached) $ac_c" 1>&6
10244 else
10245   
10246                 cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249
10250 #                       include <netinet/in.h>
10251 #                       ifdef INET6_ADDRSTRLEN
10252                                 __has_inet6_addrstrlen__;
10253 #                       endif
10254                 
10255 EOF
10256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10257   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10258   rm -rf conftest*
10259   ol_cv_inet6_addrstrlen=yes
10260 else
10261   rm -rf conftest*
10262   ol_cv_inet6_addrstrlen=no
10263 fi
10264 rm -f conftest*
10265
10266 fi
10267
10268 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10269
10270
10271         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10272 echo "configure:10273: checking struct sockaddr_storage" >&5
10273 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10274   echo $ac_n "(cached) $ac_c" 1>&6
10275 else
10276   
10277                 cat > conftest.$ac_ext <<EOF
10278 #line 10279 "configure"
10279 #include "confdefs.h"
10280
10281 #include <sys/types.h>
10282 #include <sys/socket.h>
10283
10284 int main() {
10285
10286                         struct sockaddr_storage ss;
10287
10288 ; return 0; }
10289 EOF
10290 if { (eval echo configure:10291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10291   rm -rf conftest*
10292   ol_cv_struct_sockaddr_storage=yes
10293 else
10294   echo "configure: failed program was:" >&5
10295   cat conftest.$ac_ext >&5
10296   rm -rf conftest*
10297   ol_cv_struct_sockaddr_storage=no
10298 fi
10299 rm -f conftest*
10300 fi
10301
10302 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10303
10304         if test $ol_cv_inet6_addrstrlen = yes \
10305                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10306                 ol_link_ipv6=yes
10307         elif test $ol_enable_ipv6 = yes \
10308                         -a $ol_cv_inet6_addrstrlen = no ; then
10309                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10310         elif test $ol_enable_ipv6 = yes \
10311                         -a $ol_cv_struct_sockaddr_storage = no ; then
10312                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10313         fi
10314 fi
10315
10316 if test $ol_enable_local != no ; then
10317         for ac_hdr in sys/un.h 
10318 do
10319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10321 echo "configure:10322: checking for $ac_hdr" >&5
10322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10323   echo $ac_n "(cached) $ac_c" 1>&6
10324 else
10325   cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 #include <$ac_hdr>
10329 EOF
10330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10331 { (eval echo configure:10332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10333 if test -z "$ac_err"; then
10334   rm -rf conftest*
10335   eval "ac_cv_header_$ac_safe=yes"
10336 else
10337   echo "$ac_err" >&5
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=no"
10342 fi
10343 rm -f conftest*
10344 fi
10345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10346   echo "$ac_t""yes" 1>&6
10347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10348   cat >> confdefs.h <<EOF
10349 #define $ac_tr_hdr 1
10350 EOF
10351  
10352 else
10353   echo "$ac_t""no" 1>&6
10354 fi
10355 done
10356
10357
10358         if test $ol_enable_local = auto ; then
10359                 ol_enable_local=$ac_cv_header_sys_un_h
10360         elif test $ac_cv_header_sys_un_h = no ; then
10361                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10362         fi
10363 fi
10364
10365 ol_link_kbind=no
10366 ol_link_kpasswd=no
10367 ol_link_krb5=no
10368 ol_link_krb4=no
10369
10370 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10371         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10372         -o $ol_with_kerberos = k425 ; then
10373
10374         for ac_hdr in krb5.h
10375 do
10376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10378 echo "configure:10379: checking for $ac_hdr" >&5
10379 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10380   echo $ac_n "(cached) $ac_c" 1>&6
10381 else
10382   cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385 #include <$ac_hdr>
10386 EOF
10387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10388 { (eval echo configure:10389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10390 if test -z "$ac_err"; then
10391   rm -rf conftest*
10392   eval "ac_cv_header_$ac_safe=yes"
10393 else
10394   echo "$ac_err" >&5
10395   echo "configure: failed program was:" >&5
10396   cat conftest.$ac_ext >&5
10397   rm -rf conftest*
10398   eval "ac_cv_header_$ac_safe=no"
10399 fi
10400 rm -f conftest*
10401 fi
10402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10403   echo "$ac_t""yes" 1>&6
10404     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10405   cat >> confdefs.h <<EOF
10406 #define $ac_tr_hdr 1
10407 EOF
10408  
10409 else
10410   echo "$ac_t""no" 1>&6
10411 fi
10412 done
10413
10414
10415         if test $ac_cv_header_krb5_h = yes ; then
10416                                 for ac_hdr in heim_err.h
10417 do
10418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10420 echo "configure:10421: checking for $ac_hdr" >&5
10421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10422   echo $ac_n "(cached) $ac_c" 1>&6
10423 else
10424   cat > conftest.$ac_ext <<EOF
10425 #line 10426 "configure"
10426 #include "confdefs.h"
10427 #include <$ac_hdr>
10428 EOF
10429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10430 { (eval echo configure:10431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10432 if test -z "$ac_err"; then
10433   rm -rf conftest*
10434   eval "ac_cv_header_$ac_safe=yes"
10435 else
10436   echo "$ac_err" >&5
10437   echo "configure: failed program was:" >&5
10438   cat conftest.$ac_ext >&5
10439   rm -rf conftest*
10440   eval "ac_cv_header_$ac_safe=no"
10441 fi
10442 rm -f conftest*
10443 fi
10444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10445   echo "$ac_t""yes" 1>&6
10446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10447   cat >> confdefs.h <<EOF
10448 #define $ac_tr_hdr 1
10449 EOF
10450  
10451 else
10452   echo "$ac_t""no" 1>&6
10453 fi
10454 done
10455
10456                 if test $ac_cv_header_heim_err_h = yes ; then
10457                         krb5_impl=heimdal
10458                 else
10459                         krb5_impl=mit
10460                 fi
10461
10462                 if test $krb5_impl = mit; then
10463                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10464 echo "configure:10465: checking for main in -lk5crypto" >&5
10465 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10466 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10467   echo $ac_n "(cached) $ac_c" 1>&6
10468 else
10469   ac_save_LIBS="$LIBS"
10470 LIBS="-lk5crypto  $LIBS"
10471 cat > conftest.$ac_ext <<EOF
10472 #line 10473 "configure"
10473 #include "confdefs.h"
10474
10475 int main() {
10476 main()
10477 ; return 0; }
10478 EOF
10479 if { (eval echo configure:10480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10480   rm -rf conftest*
10481   eval "ac_cv_lib_$ac_lib_var=yes"
10482 else
10483   echo "configure: failed program was:" >&5
10484   cat conftest.$ac_ext >&5
10485   rm -rf conftest*
10486   eval "ac_cv_lib_$ac_lib_var=no"
10487 fi
10488 rm -f conftest*
10489 LIBS="$ac_save_LIBS"
10490
10491 fi
10492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10493   echo "$ac_t""yes" 1>&6
10494   krb5crypto=k5crypto
10495 else
10496   echo "$ac_t""no" 1>&6
10497 krb5crypto=crypto
10498 fi
10499
10500
10501                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10502 echo "configure:10503: checking for main in -lkrb5" >&5
10503 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10504 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10505   echo $ac_n "(cached) $ac_c" 1>&6
10506 else
10507   ac_save_LIBS="$LIBS"
10508 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10509 cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512
10513 int main() {
10514 main()
10515 ; return 0; }
10516 EOF
10517 if { (eval echo configure:10518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10518   rm -rf conftest*
10519   eval "ac_cv_lib_$ac_lib_var=yes"
10520 else
10521   echo "configure: failed program was:" >&5
10522   cat conftest.$ac_ext >&5
10523   rm -rf conftest*
10524   eval "ac_cv_lib_$ac_lib_var=no"
10525 fi
10526 rm -f conftest*
10527 LIBS="$ac_save_LIBS"
10528
10529 fi
10530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10531   echo "$ac_t""yes" 1>&6
10532   have_krb5=yes
10533                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10534 else
10535   echo "$ac_t""no" 1>&6
10536 have_krb5=no
10537 fi
10538
10539
10540                 elif test $krb5_impl = heimdal; then
10541                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10542 echo "configure:10543: checking for main in -ldes" >&5
10543 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10544 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   ac_save_LIBS="$LIBS"
10548 LIBS="-ldes  $LIBS"
10549 cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552
10553 int main() {
10554 main()
10555 ; return 0; }
10556 EOF
10557 if { (eval echo configure:10558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10558   rm -rf conftest*
10559   eval "ac_cv_lib_$ac_lib_var=yes"
10560 else
10561   echo "configure: failed program was:" >&5
10562   cat conftest.$ac_ext >&5
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=no"
10565 fi
10566 rm -f conftest*
10567 LIBS="$ac_save_LIBS"
10568
10569 fi
10570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10571   echo "$ac_t""yes" 1>&6
10572   krb5crypto=des
10573 else
10574   echo "$ac_t""no" 1>&6
10575 krb5crypto=crypto
10576 fi
10577
10578
10579                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10580 echo "configure:10581: checking for main in -lkrb5" >&5
10581 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10583   echo $ac_n "(cached) $ac_c" 1>&6
10584 else
10585   ac_save_LIBS="$LIBS"
10586 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10587 cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590
10591 int main() {
10592 main()
10593 ; return 0; }
10594 EOF
10595 if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10596   rm -rf conftest*
10597   eval "ac_cv_lib_$ac_lib_var=yes"
10598 else
10599   echo "configure: failed program was:" >&5
10600   cat conftest.$ac_ext >&5
10601   rm -rf conftest*
10602   eval "ac_cv_lib_$ac_lib_var=no"
10603 fi
10604 rm -f conftest*
10605 LIBS="$ac_save_LIBS"
10606
10607 fi
10608 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10609   echo "$ac_t""yes" 1>&6
10610   have_krb5=yes
10611                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10612 else
10613   echo "$ac_t""no" 1>&6
10614 have_krb5=no
10615 fi
10616
10617
10618                         cat >> confdefs.h <<\EOF
10619 #define HAVE_HEIMDAL_KERBEROS 1
10620 EOF
10621
10622
10623                 else
10624                         have_krb5=no
10625                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10626                 fi
10627
10628                 if test $have_krb5 = yes ; then
10629                         ol_link_krb5=yes
10630
10631                         cat >> confdefs.h <<\EOF
10632 #define HAVE_KRB5 1
10633 EOF
10634
10635
10636                         if test $ol_enable_kpasswd != no ; then
10637                                 ol_link_kpasswd=yes;
10638                         fi
10639
10640                         if test $ol_with_kerberos = k5only ; then
10641                                 ol_with_kerberos=found
10642                         fi
10643
10644                 elif test $ol_with_kerberos != auto ; then
10645                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10646                 fi
10647
10648         fi
10649 fi
10650
10651 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10652         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10653
10654         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10655 do
10656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10658 echo "configure:10659: checking for $ac_hdr" >&5
10659 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10660   echo $ac_n "(cached) $ac_c" 1>&6
10661 else
10662   cat > conftest.$ac_ext <<EOF
10663 #line 10664 "configure"
10664 #include "confdefs.h"
10665 #include <$ac_hdr>
10666 EOF
10667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10668 { (eval echo configure:10669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10670 if test -z "$ac_err"; then
10671   rm -rf conftest*
10672   eval "ac_cv_header_$ac_safe=yes"
10673 else
10674   echo "$ac_err" >&5
10675   echo "configure: failed program was:" >&5
10676   cat conftest.$ac_ext >&5
10677   rm -rf conftest*
10678   eval "ac_cv_header_$ac_safe=no"
10679 fi
10680 rm -f conftest*
10681 fi
10682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10683   echo "$ac_t""yes" 1>&6
10684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10685   cat >> confdefs.h <<EOF
10686 #define $ac_tr_hdr 1
10687 EOF
10688  
10689 else
10690   echo "$ac_t""no" 1>&6
10691 fi
10692 done
10693
10694
10695         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10696                 if test $krb5_impl = mit; then
10697                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10698 echo "configure:10699: checking for main in -lkrb4" >&5
10699 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   ac_save_LIBS="$LIBS"
10704 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10705 cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708
10709 int main() {
10710 main()
10711 ; return 0; }
10712 EOF
10713 if { (eval echo configure:10714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10714   rm -rf conftest*
10715   eval "ac_cv_lib_$ac_lib_var=yes"
10716 else
10717   echo "configure: failed program was:" >&5
10718   cat conftest.$ac_ext >&5
10719   rm -rf conftest*
10720   eval "ac_cv_lib_$ac_lib_var=no"
10721 fi
10722 rm -f conftest*
10723 LIBS="$ac_save_LIBS"
10724
10725 fi
10726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10727   echo "$ac_t""yes" 1>&6
10728   have_k425=yes
10729                                 KRB4_LIBS="-lkrb4 -ldes425"
10730 else
10731   echo "$ac_t""no" 1>&6
10732 have_k425=no
10733 fi
10734
10735
10736                 elif test $krb5_impl = heimdal; then
10737                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10738 echo "configure:10739: checking for main in -lkrb4" >&5
10739 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   ac_save_LIBS="$LIBS"
10744 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10745 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748
10749 int main() {
10750 main()
10751 ; return 0; }
10752 EOF
10753 if { (eval echo configure:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10754   rm -rf conftest*
10755   eval "ac_cv_lib_$ac_lib_var=yes"
10756 else
10757   echo "configure: failed program was:" >&5
10758   cat conftest.$ac_ext >&5
10759   rm -rf conftest*
10760   eval "ac_cv_lib_$ac_lib_var=no"
10761 fi
10762 rm -f conftest*
10763 LIBS="$ac_save_LIBS"
10764
10765 fi
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10767   echo "$ac_t""yes" 1>&6
10768   have_k425=yes
10769                                 KRB4_LIBS="-lkrb4"
10770 else
10771   echo "$ac_t""no" 1>&6
10772 have_k425=no
10773 fi
10774
10775
10776                 else
10777                         have_425=no
10778                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10779                 fi
10780
10781                 if test $have_k425 = yes ; then
10782                         ol_with_kerberos=found
10783                         ol_link_krb4=yes
10784
10785                         cat >> confdefs.h <<\EOF
10786 #define HAVE_KRB425 1
10787 EOF
10788
10789                         cat >> confdefs.h <<\EOF
10790 #define HAVE_KRB4 1
10791 EOF
10792
10793
10794                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10795 echo "configure:10796: checking for des_debug in Kerberos libraries" >&5
10796 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10797   echo $ac_n "(cached) $ac_c" 1>&6
10798 else
10799   
10800                                                                 save_LIBS="$LIBS"
10801                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10802                                 cat > conftest.$ac_ext <<EOF
10803 #line 10804 "configure"
10804 #include "confdefs.h"
10805
10806 #include <kerberosIV/krb.h>
10807 #include <kerberosIV/des.h>
10808 extern int des_debug;
10809
10810 int main() {
10811
10812 des_debug = 1;
10813
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10817   rm -rf conftest*
10818   ol_cv_var_des_debug=yes
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   ol_cv_var_des_debug=no
10824 fi
10825 rm -f conftest*
10826                                                                 LIBS="$save_LIBS"
10827                         
10828 fi
10829
10830 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10831
10832                         if test $ol_cv_var_des_debug = yes ; then
10833                                 cat >> confdefs.h <<\EOF
10834 #define HAVE_DES_DEBUG 1
10835 EOF
10836
10837                         fi
10838
10839                         LIBS="$save_LIBS"
10840                 fi
10841         fi
10842 fi
10843
10844 if test $ol_link_krb5 = yes ; then
10845         ol_with_kerberos=found
10846 fi
10847
10848 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10849         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10850
10851         for ac_hdr in krb.h des.h krb-archaeology.h 
10852 do
10853 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10854 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10855 echo "configure:10856: checking for $ac_hdr" >&5
10856 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10857   echo $ac_n "(cached) $ac_c" 1>&6
10858 else
10859   cat > conftest.$ac_ext <<EOF
10860 #line 10861 "configure"
10861 #include "confdefs.h"
10862 #include <$ac_hdr>
10863 EOF
10864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10865 { (eval echo configure:10866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10867 if test -z "$ac_err"; then
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=yes"
10870 else
10871   echo "$ac_err" >&5
10872   echo "configure: failed program was:" >&5
10873   cat conftest.$ac_ext >&5
10874   rm -rf conftest*
10875   eval "ac_cv_header_$ac_safe=no"
10876 fi
10877 rm -f conftest*
10878 fi
10879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10882   cat >> confdefs.h <<EOF
10883 #define $ac_tr_hdr 1
10884 EOF
10885  
10886 else
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 done
10890
10891
10892         if test $ac_cv_header_krb_h = yes ; then
10893                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10894 echo "configure:10895: checking for main in -lkrb" >&5
10895 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10897   echo $ac_n "(cached) $ac_c" 1>&6
10898 else
10899   ac_save_LIBS="$LIBS"
10900 LIBS="-lkrb -ldes $LIBS"
10901 cat > conftest.$ac_ext <<EOF
10902 #line 10903 "configure"
10903 #include "confdefs.h"
10904
10905 int main() {
10906 main()
10907 ; return 0; }
10908 EOF
10909 if { (eval echo configure:10910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=yes"
10912 else
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_lib_$ac_lib_var=no"
10917 fi
10918 rm -f conftest*
10919 LIBS="$ac_save_LIBS"
10920
10921 fi
10922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10923   echo "$ac_t""yes" 1>&6
10924   have_k4=yes
10925 else
10926   echo "$ac_t""no" 1>&6
10927 have_k4=no
10928 fi
10929
10930
10931                 if test $have_k4 = yes ; then
10932                         ol_with_kerberos=found
10933                         ol_link_krb4=yes
10934
10935                         cat >> confdefs.h <<\EOF
10936 #define HAVE_KRB4 1
10937 EOF
10938
10939
10940                         KRB4_LIBS="-lkrb -ldes"
10941
10942                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10943                                 cat >> confdefs.h <<\EOF
10944 #define HAVE_KTH_KERBEROS 1
10945 EOF
10946
10947                         fi
10948                 fi
10949         fi
10950 fi
10951
10952 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10953         ol_link_kpasswd=yes
10954 fi
10955
10956 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10957         ol_link_kbind=yes
10958
10959 elif test $ol_enable_kbind = yes ; then
10960         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10961 fi
10962
10963 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10964         cat >> confdefs.h <<\EOF
10965 #define HAVE_KERBEROS 1
10966 EOF
10967
10968
10969 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10970         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10971 fi
10972
10973 ol_link_tls=no
10974 if test $ol_with_tls != no ; then
10975         for ac_hdr in openssl/ssl.h ssl.h
10976 do
10977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10979 echo "configure:10980: checking for $ac_hdr" >&5
10980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10981   echo $ac_n "(cached) $ac_c" 1>&6
10982 else
10983   cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986 #include <$ac_hdr>
10987 EOF
10988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10989 { (eval echo configure:10990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10991 if test -z "$ac_err"; then
10992   rm -rf conftest*
10993   eval "ac_cv_header_$ac_safe=yes"
10994 else
10995   echo "$ac_err" >&5
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_header_$ac_safe=no"
11000 fi
11001 rm -f conftest*
11002 fi
11003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11004   echo "$ac_t""yes" 1>&6
11005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11006   cat >> confdefs.h <<EOF
11007 #define $ac_tr_hdr 1
11008 EOF
11009  
11010 else
11011   echo "$ac_t""no" 1>&6
11012 fi
11013 done
11014
11015         
11016         if test $ac_cv_header_openssl_ssl_h = yes \
11017                 -o $ac_cv_header_ssl_h = yes ; then
11018                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11019 echo "configure:11020: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11020 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   ac_save_LIBS="$LIBS"
11025 LIBS="-lssl -lcrypto $LIBS"
11026 cat > conftest.$ac_ext <<EOF
11027 #line 11028 "configure"
11028 #include "confdefs.h"
11029 /* Override any gcc2 internal prototype to avoid an error.  */
11030 /* We use char because int might match the return type of a gcc2
11031     builtin and then its argument prototype would still apply.  */
11032 char SSLeay_add_ssl_algorithms();
11033
11034 int main() {
11035 SSLeay_add_ssl_algorithms()
11036 ; return 0; }
11037 EOF
11038 if { (eval echo configure:11039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11039   rm -rf conftest*
11040   eval "ac_cv_lib_$ac_lib_var=yes"
11041 else
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -rf conftest*
11045   eval "ac_cv_lib_$ac_lib_var=no"
11046 fi
11047 rm -f conftest*
11048 LIBS="$ac_save_LIBS"
11049
11050 fi
11051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11052   echo "$ac_t""yes" 1>&6
11053   have_ssleay=yes
11054                         need_rsaref=no
11055 else
11056   echo "$ac_t""no" 1>&6
11057 have_ssleay=no
11058 fi
11059
11060                         
11061                 if test $have_ssleay = no ; then
11062                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11063 echo "configure:11064: checking for SSL_library_init in -lssl" >&5
11064 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11065 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11066   echo $ac_n "(cached) $ac_c" 1>&6
11067 else
11068   ac_save_LIBS="$LIBS"
11069 LIBS="-lssl -lcrypto $LIBS"
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 /* Override any gcc2 internal prototype to avoid an error.  */
11074 /* We use char because int might match the return type of a gcc2
11075     builtin and then its argument prototype would still apply.  */
11076 char SSL_library_init();
11077
11078 int main() {
11079 SSL_library_init()
11080 ; return 0; }
11081 EOF
11082 if { (eval echo configure:11083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11083   rm -rf conftest*
11084   eval "ac_cv_lib_$ac_lib_var=yes"
11085 else
11086   echo "configure: failed program was:" >&5
11087   cat conftest.$ac_ext >&5
11088   rm -rf conftest*
11089   eval "ac_cv_lib_$ac_lib_var=no"
11090 fi
11091 rm -f conftest*
11092 LIBS="$ac_save_LIBS"
11093
11094 fi
11095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11096   echo "$ac_t""yes" 1>&6
11097   have_ssleay=yes
11098                                 need_rsaref=no
11099 else
11100   echo "$ac_t""no" 1>&6
11101 have_ssleay=no
11102 fi
11103
11104                 fi
11105
11106                 if test $have_ssleay = no ; then
11107                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11108 echo "configure:11109: checking for ssl3_accept in -lssl" >&5
11109 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11111   echo $ac_n "(cached) $ac_c" 1>&6
11112 else
11113   ac_save_LIBS="$LIBS"
11114 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11115 cat > conftest.$ac_ext <<EOF
11116 #line 11117 "configure"
11117 #include "confdefs.h"
11118 /* Override any gcc2 internal prototype to avoid an error.  */
11119 /* We use char because int might match the return type of a gcc2
11120     builtin and then its argument prototype would still apply.  */
11121 char ssl3_accept();
11122
11123 int main() {
11124 ssl3_accept()
11125 ; return 0; }
11126 EOF
11127 if { (eval echo configure:11128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11128   rm -rf conftest*
11129   eval "ac_cv_lib_$ac_lib_var=yes"
11130 else
11131   echo "configure: failed program was:" >&5
11132   cat conftest.$ac_ext >&5
11133   rm -rf conftest*
11134   eval "ac_cv_lib_$ac_lib_var=no"
11135 fi
11136 rm -f conftest*
11137 LIBS="$ac_save_LIBS"
11138
11139 fi
11140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142   have_ssleay=yes
11143                                 need_rsaref=yes
11144 else
11145   echo "$ac_t""no" 1>&6
11146 have_ssleay=no
11147 fi
11148
11149                 fi
11150
11151                 if test $have_ssleay = yes ; then
11152                         ol_with_tls=found
11153                         ol_link_tls=yes
11154
11155                         cat >> confdefs.h <<\EOF
11156 #define HAVE_SSLEAY 1
11157 EOF
11158
11159
11160                         if test $need_rsaref = yes; then
11161                                 cat >> confdefs.h <<\EOF
11162 #define HAVE_RSAREF 1
11163 EOF
11164
11165
11166                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11167                         else
11168                                 TLS_LIBS="-lssl -lcrypto"
11169                         fi
11170                 fi
11171         fi
11172
11173 else
11174         echo "configure: warning: TLS data protection not supported!" 1>&2
11175 fi
11176
11177 if test $ol_link_tls = yes ; then
11178         cat >> confdefs.h <<\EOF
11179 #define HAVE_TLS 1
11180 EOF
11181
11182
11183 elif test $ol_with_tls = auto ; then
11184         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11185         echo "configure: warning: TLS data protection not supported!" 1>&2
11186
11187 elif test $ol_with_tls != no ; then
11188         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11189 fi
11190
11191 if test $ol_enable_lmpasswd != no; then
11192         if test $ol_link_tls != yes ; then
11193                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11194         fi
11195
11196         cat >> confdefs.h <<\EOF
11197 #define SLAPD_LMHASH 1
11198 EOF
11199
11200 fi
11201
11202 ol_link_threads=no
11203
11204 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11205         -o $ol_with_threads = nt ; then
11206
11207         
11208         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11209 echo "configure:11210: checking for _beginthread" >&5
11210 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11211   echo $ac_n "(cached) $ac_c" 1>&6
11212 else
11213   cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* System header to define __stub macros and hopefully few prototypes,
11217     which can conflict with char _beginthread(); below.  */
11218 #include <assert.h>
11219 /* Override any gcc2 internal prototype to avoid an error.  */
11220 /* We use char because int might match the return type of a gcc2
11221     builtin and then its argument prototype would still apply.  */
11222 char _beginthread();
11223 char (*f)();
11224
11225 int main() {
11226
11227 /* The GNU C library defines this for functions which it implements
11228     to always fail with ENOSYS.  Some functions are actually named
11229     something starting with __ and the normal name is an alias.  */
11230 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11231 choke me
11232 #else
11233 f = _beginthread;
11234 #endif
11235
11236 ; return 0; }
11237 EOF
11238 if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11239   rm -rf conftest*
11240   eval "ac_cv_func__beginthread=yes"
11241 else
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -rf conftest*
11245   eval "ac_cv_func__beginthread=no"
11246 fi
11247 rm -f conftest*
11248 fi
11249
11250 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11251   echo "$ac_t""yes" 1>&6
11252   :
11253 else
11254   echo "$ac_t""no" 1>&6
11255 fi
11256
11257
11258         if test $ac_cv_func__beginthread = yes ; then
11259                 cat >> confdefs.h <<\EOF
11260 #define HAVE_NT_THREADS 1
11261 EOF
11262
11263                 ol_cv_nt_threads=yes
11264         fi
11265
11266
11267         if test "$ol_cv_nt_threads" = yes ; then
11268                 ol_link_threads=nt
11269                 ol_with_threads=found
11270                 ol_with_yielding_select=yes
11271
11272                 cat >> confdefs.h <<\EOF
11273 #define HAVE_NT_SERVICE_MANAGER 1
11274 EOF
11275
11276                 cat >> confdefs.h <<\EOF
11277 #define HAVE_NT_EVENT_LOG 1
11278 EOF
11279
11280         fi
11281
11282         if test $ol_with_threads = nt ; then
11283                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11284         fi
11285 fi
11286
11287 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11288         -o $ol_with_threads = posix ; then
11289
11290         for ac_hdr in pthread.h
11291 do
11292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11294 echo "configure:11295: checking for $ac_hdr" >&5
11295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11296   echo $ac_n "(cached) $ac_c" 1>&6
11297 else
11298   cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include <$ac_hdr>
11302 EOF
11303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11304 { (eval echo configure:11305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11306 if test -z "$ac_err"; then
11307   rm -rf conftest*
11308   eval "ac_cv_header_$ac_safe=yes"
11309 else
11310   echo "$ac_err" >&5
11311   echo "configure: failed program was:" >&5
11312   cat conftest.$ac_ext >&5
11313   rm -rf conftest*
11314   eval "ac_cv_header_$ac_safe=no"
11315 fi
11316 rm -f conftest*
11317 fi
11318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11319   echo "$ac_t""yes" 1>&6
11320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11321   cat >> confdefs.h <<EOF
11322 #define $ac_tr_hdr 1
11323 EOF
11324  
11325 else
11326   echo "$ac_t""no" 1>&6
11327 fi
11328 done
11329
11330
11331         if test $ac_cv_header_pthread_h = yes ; then
11332                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11333 echo "configure:11334: checking POSIX thread version" >&5
11334 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11335   echo $ac_n "(cached) $ac_c" 1>&6
11336 else
11337   
11338         cat > conftest.$ac_ext <<EOF
11339 #line 11340 "configure"
11340 #include "confdefs.h"
11341
11342 #               include <pthread.h>
11343         
11344 int main() {
11345
11346                 int i = PTHREAD_CREATE_JOINABLE;
11347         
11348 ; return 0; }
11349 EOF
11350 if { (eval echo configure:11351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11351   rm -rf conftest*
11352   
11353         cat > conftest.$ac_ext <<EOF
11354 #line 11355 "configure"
11355 #include "confdefs.h"
11356 #include <pthread.h>
11357 EOF
11358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11359   egrep "pthread_detach" >/dev/null 2>&1; then
11360   rm -rf conftest*
11361   ol_cv_pthread_version=10
11362 else
11363   rm -rf conftest*
11364   ol_cv_pthread_version=8
11365 fi
11366 rm -f conftest*
11367
11368 else
11369   echo "configure: failed program was:" >&5
11370   cat conftest.$ac_ext >&5
11371   rm -rf conftest*
11372   
11373         cat > conftest.$ac_ext <<EOF
11374 #line 11375 "configure"
11375 #include "confdefs.h"
11376
11377 #               include <pthread.h>
11378 #               ifdef PTHREAD_CREATE_UNDETACHED
11379                 draft7
11380 #               endif
11381         
11382 EOF
11383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11384   egrep "draft7" >/dev/null 2>&1; then
11385   rm -rf conftest*
11386   ol_cv_pthread_version=7
11387 else
11388   rm -rf conftest*
11389   
11390         cat > conftest.$ac_ext <<EOF
11391 #line 11392 "configure"
11392 #include "confdefs.h"
11393 #include <pthread.h>
11394 EOF
11395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11396   egrep "pthread_attr_init" >/dev/null 2>&1; then
11397   rm -rf conftest*
11398   ol_cv_pthread_version=6
11399 else
11400   rm -rf conftest*
11401   
11402         cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405
11406 #               include <pthread.h>
11407 #ifdef          PTHREAD_MUTEX_INITIALIZER
11408                 draft5
11409 #endif
11410         
11411 EOF
11412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11413   egrep "draft5" >/dev/null 2>&1; then
11414   rm -rf conftest*
11415   ol_cv_pthread_version=5
11416 else
11417   rm -rf conftest*
11418   ol_cv_pthread_version=4
11419 fi
11420 rm -f conftest*
11421  
11422 fi
11423 rm -f conftest*
11424  
11425 fi
11426 rm -f conftest*
11427  
11428 fi
11429 rm -f conftest*
11430
11431 fi
11432
11433 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11434
11435
11436                 if test $ol_cv_pthread_version != 0 ; then
11437                         cat >> confdefs.h <<EOF
11438 #define HAVE_PTHREADS $ol_cv_pthread_version
11439 EOF
11440
11441                 else
11442                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11443                 fi
11444
11445                 # consider threads found
11446                 ol_with_threads=found
11447
11448                 
11449         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11450 echo "configure:11451: checking for LinuxThreads pthread.h" >&5
11451 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 #include <pthread.h>
11458 EOF
11459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11460   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11461   rm -rf conftest*
11462   ol_cv_header_linux_threads=yes
11463 else
11464   rm -rf conftest*
11465   ol_cv_header_linux_threads=no
11466 fi
11467 rm -f conftest*
11468
11469                 
11470 fi
11471
11472 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11473         if test $ol_cv_header_linux_threads = yes; then
11474                 cat >> confdefs.h <<\EOF
11475 #define HAVE_LINUX_THREADS 1
11476 EOF
11477
11478         fi
11479
11480                 
11481         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11482 echo "configure:11483: checking for GNU Pth pthread.h" >&5
11483 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 #include <pthread.h>
11490 #ifdef _POSIX_THREAD_IS_GNU_PTH
11491         __gnu_pth__;
11492 #endif
11493
11494 EOF
11495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11496   egrep "__gnu_pth__" >/dev/null 2>&1; then
11497   rm -rf conftest*
11498   ol_cv_header_gnu_pth_pthread_h=yes
11499 else
11500   rm -rf conftest*
11501   ol_cv_header_gnu_pth_pthread_h=no
11502 fi
11503 rm -f conftest*
11504
11505                 
11506 fi
11507
11508 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11509
11510
11511                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11512                         for ac_hdr in sched.h
11513 do
11514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11516 echo "configure:11517: checking for $ac_hdr" >&5
11517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11518   echo $ac_n "(cached) $ac_c" 1>&6
11519 else
11520   cat > conftest.$ac_ext <<EOF
11521 #line 11522 "configure"
11522 #include "confdefs.h"
11523 #include <$ac_hdr>
11524 EOF
11525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11526 { (eval echo configure:11527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11528 if test -z "$ac_err"; then
11529   rm -rf conftest*
11530   eval "ac_cv_header_$ac_safe=yes"
11531 else
11532   echo "$ac_err" >&5
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   eval "ac_cv_header_$ac_safe=no"
11537 fi
11538 rm -f conftest*
11539 fi
11540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11541   echo "$ac_t""yes" 1>&6
11542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11543   cat >> confdefs.h <<EOF
11544 #define $ac_tr_hdr 1
11545 EOF
11546  
11547 else
11548   echo "$ac_t""no" 1>&6
11549 fi
11550 done
11551
11552                 fi
11553
11554                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11555                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11556 echo "configure:11557: checking for pthread_create in default libraries" >&5
11557 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11558   echo $ac_n "(cached) $ac_c" 1>&6
11559 else
11560   
11561                 if test "$cross_compiling" = yes; then
11562   cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565 /* pthread test headers */
11566 #include <pthread.h>
11567 #if HAVE_PTHREADS < 7
11568 #include <errno.h>
11569 #endif
11570 #ifndef NULL
11571 #define NULL (void*)0
11572 #endif
11573
11574 static void *task(p)
11575         void *p;
11576 {
11577         return (void *) (p == NULL);
11578 }
11579
11580 int main() {
11581
11582         /* pthread test function */
11583 #ifndef PTHREAD_CREATE_DETACHED
11584 #define PTHREAD_CREATE_DETACHED 1
11585 #endif
11586         pthread_t t;
11587         int status;
11588         int detach = PTHREAD_CREATE_DETACHED;
11589
11590 #if HAVE_PTHREADS > 4
11591         /* Final pthreads */
11592         pthread_attr_t attr;
11593
11594         status = pthread_attr_init(&attr);
11595         if( status ) return status;
11596
11597 #if HAVE_PTHREADS < 7
11598         status = pthread_attr_setdetachstate(&attr, &detach);
11599         if( status < 0 ) status = errno;
11600 #else
11601         status = pthread_attr_setdetachstate(&attr, detach);
11602 #endif
11603         if( status ) return status;
11604         status = pthread_create( &t, &attr, task, NULL );
11605 #if HAVE_PTHREADS < 7
11606         if( status < 0 ) status = errno;
11607 #endif
11608         if( status ) return status;
11609 #else
11610         /* Draft 4 pthreads */
11611         status = pthread_create( &t, pthread_attr_default, task, NULL );
11612         if( status ) return errno;
11613
11614         /* give thread a chance to complete */
11615         /* it should remain joinable and hence detachable */
11616         sleep( 1 );
11617
11618         status = pthread_detach( &t );
11619         if( status ) return errno;
11620 #endif
11621
11622 #ifdef HAVE_LINUX_THREADS
11623         pthread_kill_other_threads_np();
11624 #endif
11625
11626         return 0;
11627
11628 ; return 0; }
11629 EOF
11630 if { (eval echo configure:11631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11631   rm -rf conftest*
11632   ol_cv_pthread_create=yes
11633 else
11634   echo "configure: failed program was:" >&5
11635   cat conftest.$ac_ext >&5
11636   rm -rf conftest*
11637   ol_cv_pthread_create=no
11638 fi
11639 rm -f conftest*
11640 else
11641   cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644 /* pthread test headers */
11645 #include <pthread.h>
11646 #if HAVE_PTHREADS < 7
11647 #include <errno.h>
11648 #endif
11649 #ifndef NULL
11650 #define NULL (void*)0
11651 #endif
11652
11653 static void *task(p)
11654         void *p;
11655 {
11656         return (void *) (p == NULL);
11657 }
11658
11659
11660 int main(argc, argv)
11661         int argc;
11662         char **argv;
11663 {
11664
11665         /* pthread test function */
11666 #ifndef PTHREAD_CREATE_DETACHED
11667 #define PTHREAD_CREATE_DETACHED 1
11668 #endif
11669         pthread_t t;
11670         int status;
11671         int detach = PTHREAD_CREATE_DETACHED;
11672
11673 #if HAVE_PTHREADS > 4
11674         /* Final pthreads */
11675         pthread_attr_t attr;
11676
11677         status = pthread_attr_init(&attr);
11678         if( status ) return status;
11679
11680 #if HAVE_PTHREADS < 7
11681         status = pthread_attr_setdetachstate(&attr, &detach);
11682         if( status < 0 ) status = errno;
11683 #else
11684         status = pthread_attr_setdetachstate(&attr, detach);
11685 #endif
11686         if( status ) return status;
11687         status = pthread_create( &t, &attr, task, NULL );
11688 #if HAVE_PTHREADS < 7
11689         if( status < 0 ) status = errno;
11690 #endif
11691         if( status ) return status;
11692 #else
11693         /* Draft 4 pthreads */
11694         status = pthread_create( &t, pthread_attr_default, task, NULL );
11695         if( status ) return errno;
11696
11697         /* give thread a chance to complete */
11698         /* it should remain joinable and hence detachable */
11699         sleep( 1 );
11700
11701         status = pthread_detach( &t );
11702         if( status ) return errno;
11703 #endif
11704
11705 #ifdef HAVE_LINUX_THREADS
11706         pthread_kill_other_threads_np();
11707 #endif
11708
11709         return 0;
11710
11711 }
11712
11713 EOF
11714 if { (eval echo configure:11715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11715 then
11716   ol_cv_pthread_create=yes
11717 else
11718   echo "configure: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   rm -fr conftest*
11721   ol_cv_pthread_create=no
11722 fi
11723 rm -fr conftest*
11724 fi
11725
11726 fi
11727
11728 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11729
11730                 if test $ol_cv_pthread_create != no ; then
11731                         ol_link_threads=posix
11732                         ol_link_pthreads=""
11733                 fi
11734                 
11735                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11736 if test "$ol_link_threads" = no ; then
11737         # try -kthread
11738         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11739 echo "configure:11740: checking for pthread link with -kthread" >&5
11740 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11741   echo $ac_n "(cached) $ac_c" 1>&6
11742 else
11743   
11744                 # save the flags
11745                 ol_LIBS="$LIBS"
11746                 LIBS="-kthread $LIBS"
11747
11748                 if test "$cross_compiling" = yes; then
11749   cat > conftest.$ac_ext <<EOF
11750 #line 11751 "configure"
11751 #include "confdefs.h"
11752 /* pthread test headers */
11753 #include <pthread.h>
11754 #if HAVE_PTHREADS < 7
11755 #include <errno.h>
11756 #endif
11757 #ifndef NULL
11758 #define NULL (void*)0
11759 #endif
11760
11761 static void *task(p)
11762         void *p;
11763 {
11764         return (void *) (p == NULL);
11765 }
11766
11767 int main() {
11768
11769         /* pthread test function */
11770 #ifndef PTHREAD_CREATE_DETACHED
11771 #define PTHREAD_CREATE_DETACHED 1
11772 #endif
11773         pthread_t t;
11774         int status;
11775         int detach = PTHREAD_CREATE_DETACHED;
11776
11777 #if HAVE_PTHREADS > 4
11778         /* Final pthreads */
11779         pthread_attr_t attr;
11780
11781         status = pthread_attr_init(&attr);
11782         if( status ) return status;
11783
11784 #if HAVE_PTHREADS < 7
11785         status = pthread_attr_setdetachstate(&attr, &detach);
11786         if( status < 0 ) status = errno;
11787 #else
11788         status = pthread_attr_setdetachstate(&attr, detach);
11789 #endif
11790         if( status ) return status;
11791         status = pthread_create( &t, &attr, task, NULL );
11792 #if HAVE_PTHREADS < 7
11793         if( status < 0 ) status = errno;
11794 #endif
11795         if( status ) return status;
11796 #else
11797         /* Draft 4 pthreads */
11798         status = pthread_create( &t, pthread_attr_default, task, NULL );
11799         if( status ) return errno;
11800
11801         /* give thread a chance to complete */
11802         /* it should remain joinable and hence detachable */
11803         sleep( 1 );
11804
11805         status = pthread_detach( &t );
11806         if( status ) return errno;
11807 #endif
11808
11809 #ifdef HAVE_LINUX_THREADS
11810         pthread_kill_other_threads_np();
11811 #endif
11812
11813         return 0;
11814
11815 ; return 0; }
11816 EOF
11817 if { (eval echo configure:11818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11818   rm -rf conftest*
11819   ol_cv_pthread_kthread=yes
11820 else
11821   echo "configure: failed program was:" >&5
11822   cat conftest.$ac_ext >&5
11823   rm -rf conftest*
11824   ol_cv_pthread_kthread=no
11825 fi
11826 rm -f conftest*
11827 else
11828   cat > conftest.$ac_ext <<EOF
11829 #line 11830 "configure"
11830 #include "confdefs.h"
11831 /* pthread test headers */
11832 #include <pthread.h>
11833 #if HAVE_PTHREADS < 7
11834 #include <errno.h>
11835 #endif
11836 #ifndef NULL
11837 #define NULL (void*)0
11838 #endif
11839
11840 static void *task(p)
11841         void *p;
11842 {
11843         return (void *) (p == NULL);
11844 }
11845
11846
11847 int main(argc, argv)
11848         int argc;
11849         char **argv;
11850 {
11851
11852         /* pthread test function */
11853 #ifndef PTHREAD_CREATE_DETACHED
11854 #define PTHREAD_CREATE_DETACHED 1
11855 #endif
11856         pthread_t t;
11857         int status;
11858         int detach = PTHREAD_CREATE_DETACHED;
11859
11860 #if HAVE_PTHREADS > 4
11861         /* Final pthreads */
11862         pthread_attr_t attr;
11863
11864         status = pthread_attr_init(&attr);
11865         if( status ) return status;
11866
11867 #if HAVE_PTHREADS < 7
11868         status = pthread_attr_setdetachstate(&attr, &detach);
11869         if( status < 0 ) status = errno;
11870 #else
11871         status = pthread_attr_setdetachstate(&attr, detach);
11872 #endif
11873         if( status ) return status;
11874         status = pthread_create( &t, &attr, task, NULL );
11875 #if HAVE_PTHREADS < 7
11876         if( status < 0 ) status = errno;
11877 #endif
11878         if( status ) return status;
11879 #else
11880         /* Draft 4 pthreads */
11881         status = pthread_create( &t, pthread_attr_default, task, NULL );
11882         if( status ) return errno;
11883
11884         /* give thread a chance to complete */
11885         /* it should remain joinable and hence detachable */
11886         sleep( 1 );
11887
11888         status = pthread_detach( &t );
11889         if( status ) return errno;
11890 #endif
11891
11892 #ifdef HAVE_LINUX_THREADS
11893         pthread_kill_other_threads_np();
11894 #endif
11895
11896         return 0;
11897
11898 }
11899
11900 EOF
11901 if { (eval echo configure:11902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11902 then
11903   ol_cv_pthread_kthread=yes
11904 else
11905   echo "configure: failed program was:" >&5
11906   cat conftest.$ac_ext >&5
11907   rm -fr conftest*
11908   ol_cv_pthread_kthread=no
11909 fi
11910 rm -fr conftest*
11911 fi
11912
11913
11914                 # restore the LIBS
11915                 LIBS="$ol_LIBS"
11916         
11917 fi
11918
11919 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11920
11921         if test $ol_cv_pthread_kthread = yes ; then
11922                 ol_link_pthreads="-kthread"
11923                 ol_link_threads=posix
11924         fi
11925 fi
11926
11927                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11928 if test "$ol_link_threads" = no ; then
11929         # try -pthread
11930         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11931 echo "configure:11932: checking for pthread link with -pthread" >&5
11932 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11933   echo $ac_n "(cached) $ac_c" 1>&6
11934 else
11935   
11936                 # save the flags
11937                 ol_LIBS="$LIBS"
11938                 LIBS="-pthread $LIBS"
11939
11940                 if test "$cross_compiling" = yes; then
11941   cat > conftest.$ac_ext <<EOF
11942 #line 11943 "configure"
11943 #include "confdefs.h"
11944 /* pthread test headers */
11945 #include <pthread.h>
11946 #if HAVE_PTHREADS < 7
11947 #include <errno.h>
11948 #endif
11949 #ifndef NULL
11950 #define NULL (void*)0
11951 #endif
11952
11953 static void *task(p)
11954         void *p;
11955 {
11956         return (void *) (p == NULL);
11957 }
11958
11959 int main() {
11960
11961         /* pthread test function */
11962 #ifndef PTHREAD_CREATE_DETACHED
11963 #define PTHREAD_CREATE_DETACHED 1
11964 #endif
11965         pthread_t t;
11966         int status;
11967         int detach = PTHREAD_CREATE_DETACHED;
11968
11969 #if HAVE_PTHREADS > 4
11970         /* Final pthreads */
11971         pthread_attr_t attr;
11972
11973         status = pthread_attr_init(&attr);
11974         if( status ) return status;
11975
11976 #if HAVE_PTHREADS < 7
11977         status = pthread_attr_setdetachstate(&attr, &detach);
11978         if( status < 0 ) status = errno;
11979 #else
11980         status = pthread_attr_setdetachstate(&attr, detach);
11981 #endif
11982         if( status ) return status;
11983         status = pthread_create( &t, &attr, task, NULL );
11984 #if HAVE_PTHREADS < 7
11985         if( status < 0 ) status = errno;
11986 #endif
11987         if( status ) return status;
11988 #else
11989         /* Draft 4 pthreads */
11990         status = pthread_create( &t, pthread_attr_default, task, NULL );
11991         if( status ) return errno;
11992
11993         /* give thread a chance to complete */
11994         /* it should remain joinable and hence detachable */
11995         sleep( 1 );
11996
11997         status = pthread_detach( &t );
11998         if( status ) return errno;
11999 #endif
12000
12001 #ifdef HAVE_LINUX_THREADS
12002         pthread_kill_other_threads_np();
12003 #endif
12004
12005         return 0;
12006
12007 ; return 0; }
12008 EOF
12009 if { (eval echo configure:12010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12010   rm -rf conftest*
12011   ol_cv_pthread_pthread=yes
12012 else
12013   echo "configure: failed program was:" >&5
12014   cat conftest.$ac_ext >&5
12015   rm -rf conftest*
12016   ol_cv_pthread_pthread=no
12017 fi
12018 rm -f conftest*
12019 else
12020   cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023 /* pthread test headers */
12024 #include <pthread.h>
12025 #if HAVE_PTHREADS < 7
12026 #include <errno.h>
12027 #endif
12028 #ifndef NULL
12029 #define NULL (void*)0
12030 #endif
12031
12032 static void *task(p)
12033         void *p;
12034 {
12035         return (void *) (p == NULL);
12036 }
12037
12038
12039 int main(argc, argv)
12040         int argc;
12041         char **argv;
12042 {
12043
12044         /* pthread test function */
12045 #ifndef PTHREAD_CREATE_DETACHED
12046 #define PTHREAD_CREATE_DETACHED 1
12047 #endif
12048         pthread_t t;
12049         int status;
12050         int detach = PTHREAD_CREATE_DETACHED;
12051
12052 #if HAVE_PTHREADS > 4
12053         /* Final pthreads */
12054         pthread_attr_t attr;
12055
12056         status = pthread_attr_init(&attr);
12057         if( status ) return status;
12058
12059 #if HAVE_PTHREADS < 7
12060         status = pthread_attr_setdetachstate(&attr, &detach);
12061         if( status < 0 ) status = errno;
12062 #else
12063         status = pthread_attr_setdetachstate(&attr, detach);
12064 #endif
12065         if( status ) return status;
12066         status = pthread_create( &t, &attr, task, NULL );
12067 #if HAVE_PTHREADS < 7
12068         if( status < 0 ) status = errno;
12069 #endif
12070         if( status ) return status;
12071 #else
12072         /* Draft 4 pthreads */
12073         status = pthread_create( &t, pthread_attr_default, task, NULL );
12074         if( status ) return errno;
12075
12076         /* give thread a chance to complete */
12077         /* it should remain joinable and hence detachable */
12078         sleep( 1 );
12079
12080         status = pthread_detach( &t );
12081         if( status ) return errno;
12082 #endif
12083
12084 #ifdef HAVE_LINUX_THREADS
12085         pthread_kill_other_threads_np();
12086 #endif
12087
12088         return 0;
12089
12090 }
12091
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12094 then
12095   ol_cv_pthread_pthread=yes
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -fr conftest*
12100   ol_cv_pthread_pthread=no
12101 fi
12102 rm -fr conftest*
12103 fi
12104
12105
12106                 # restore the LIBS
12107                 LIBS="$ol_LIBS"
12108         
12109 fi
12110
12111 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12112
12113         if test $ol_cv_pthread_pthread = yes ; then
12114                 ol_link_pthreads="-pthread"
12115                 ol_link_threads=posix
12116         fi
12117 fi
12118
12119                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12120 if test "$ol_link_threads" = no ; then
12121         # try -pthreads
12122         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12123 echo "configure:12124: checking for pthread link with -pthreads" >&5
12124 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12125   echo $ac_n "(cached) $ac_c" 1>&6
12126 else
12127   
12128                 # save the flags
12129                 ol_LIBS="$LIBS"
12130                 LIBS="-pthreads $LIBS"
12131
12132                 if test "$cross_compiling" = yes; then
12133   cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136 /* pthread test headers */
12137 #include <pthread.h>
12138 #if HAVE_PTHREADS < 7
12139 #include <errno.h>
12140 #endif
12141 #ifndef NULL
12142 #define NULL (void*)0
12143 #endif
12144
12145 static void *task(p)
12146         void *p;
12147 {
12148         return (void *) (p == NULL);
12149 }
12150
12151 int main() {
12152
12153         /* pthread test function */
12154 #ifndef PTHREAD_CREATE_DETACHED
12155 #define PTHREAD_CREATE_DETACHED 1
12156 #endif
12157         pthread_t t;
12158         int status;
12159         int detach = PTHREAD_CREATE_DETACHED;
12160
12161 #if HAVE_PTHREADS > 4
12162         /* Final pthreads */
12163         pthread_attr_t attr;
12164
12165         status = pthread_attr_init(&attr);
12166         if( status ) return status;
12167
12168 #if HAVE_PTHREADS < 7
12169         status = pthread_attr_setdetachstate(&attr, &detach);
12170         if( status < 0 ) status = errno;
12171 #else
12172         status = pthread_attr_setdetachstate(&attr, detach);
12173 #endif
12174         if( status ) return status;
12175         status = pthread_create( &t, &attr, task, NULL );
12176 #if HAVE_PTHREADS < 7
12177         if( status < 0 ) status = errno;
12178 #endif
12179         if( status ) return status;
12180 #else
12181         /* Draft 4 pthreads */
12182         status = pthread_create( &t, pthread_attr_default, task, NULL );
12183         if( status ) return errno;
12184
12185         /* give thread a chance to complete */
12186         /* it should remain joinable and hence detachable */
12187         sleep( 1 );
12188
12189         status = pthread_detach( &t );
12190         if( status ) return errno;
12191 #endif
12192
12193 #ifdef HAVE_LINUX_THREADS
12194         pthread_kill_other_threads_np();
12195 #endif
12196
12197         return 0;
12198
12199 ; return 0; }
12200 EOF
12201 if { (eval echo configure:12202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12202   rm -rf conftest*
12203   ol_cv_pthread_pthreads=yes
12204 else
12205   echo "configure: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   rm -rf conftest*
12208   ol_cv_pthread_pthreads=no
12209 fi
12210 rm -f conftest*
12211 else
12212   cat > conftest.$ac_ext <<EOF
12213 #line 12214 "configure"
12214 #include "confdefs.h"
12215 /* pthread test headers */
12216 #include <pthread.h>
12217 #if HAVE_PTHREADS < 7
12218 #include <errno.h>
12219 #endif
12220 #ifndef NULL
12221 #define NULL (void*)0
12222 #endif
12223
12224 static void *task(p)
12225         void *p;
12226 {
12227         return (void *) (p == NULL);
12228 }
12229
12230
12231 int main(argc, argv)
12232         int argc;
12233         char **argv;
12234 {
12235
12236         /* pthread test function */
12237 #ifndef PTHREAD_CREATE_DETACHED
12238 #define PTHREAD_CREATE_DETACHED 1
12239 #endif
12240         pthread_t t;
12241         int status;
12242         int detach = PTHREAD_CREATE_DETACHED;
12243
12244 #if HAVE_PTHREADS > 4
12245         /* Final pthreads */
12246         pthread_attr_t attr;
12247
12248         status = pthread_attr_init(&attr);
12249         if( status ) return status;
12250
12251 #if HAVE_PTHREADS < 7
12252         status = pthread_attr_setdetachstate(&attr, &detach);
12253         if( status < 0 ) status = errno;
12254 #else
12255         status = pthread_attr_setdetachstate(&attr, detach);
12256 #endif
12257         if( status ) return status;
12258         status = pthread_create( &t, &attr, task, NULL );
12259 #if HAVE_PTHREADS < 7
12260         if( status < 0 ) status = errno;
12261 #endif
12262         if( status ) return status;
12263 #else
12264         /* Draft 4 pthreads */
12265         status = pthread_create( &t, pthread_attr_default, task, NULL );
12266         if( status ) return errno;
12267
12268         /* give thread a chance to complete */
12269         /* it should remain joinable and hence detachable */
12270         sleep( 1 );
12271
12272         status = pthread_detach( &t );
12273         if( status ) return errno;
12274 #endif
12275
12276 #ifdef HAVE_LINUX_THREADS
12277         pthread_kill_other_threads_np();
12278 #endif
12279
12280         return 0;
12281
12282 }
12283
12284 EOF
12285 if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12286 then
12287   ol_cv_pthread_pthreads=yes
12288 else
12289   echo "configure: failed program was:" >&5
12290   cat conftest.$ac_ext >&5
12291   rm -fr conftest*
12292   ol_cv_pthread_pthreads=no
12293 fi
12294 rm -fr conftest*
12295 fi
12296
12297
12298                 # restore the LIBS
12299                 LIBS="$ol_LIBS"
12300         
12301 fi
12302
12303 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12304
12305         if test $ol_cv_pthread_pthreads = yes ; then
12306                 ol_link_pthreads="-pthreads"
12307                 ol_link_threads=posix
12308         fi
12309 fi
12310
12311                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12312 if test "$ol_link_threads" = no ; then
12313         # try -mthreads
12314         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12315 echo "configure:12316: checking for pthread link with -mthreads" >&5
12316 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12317   echo $ac_n "(cached) $ac_c" 1>&6
12318 else
12319   
12320                 # save the flags
12321                 ol_LIBS="$LIBS"
12322                 LIBS="-mthreads $LIBS"
12323
12324                 if test "$cross_compiling" = yes; then
12325   cat > conftest.$ac_ext <<EOF
12326 #line 12327 "configure"
12327 #include "confdefs.h"
12328 /* pthread test headers */
12329 #include <pthread.h>
12330 #if HAVE_PTHREADS < 7
12331 #include <errno.h>
12332 #endif
12333 #ifndef NULL
12334 #define NULL (void*)0
12335 #endif
12336
12337 static void *task(p)
12338         void *p;
12339 {
12340         return (void *) (p == NULL);
12341 }
12342
12343 int main() {
12344
12345         /* pthread test function */
12346 #ifndef PTHREAD_CREATE_DETACHED
12347 #define PTHREAD_CREATE_DETACHED 1
12348 #endif
12349         pthread_t t;
12350         int status;
12351         int detach = PTHREAD_CREATE_DETACHED;
12352
12353 #if HAVE_PTHREADS > 4
12354         /* Final pthreads */
12355         pthread_attr_t attr;
12356
12357         status = pthread_attr_init(&attr);
12358         if( status ) return status;
12359
12360 #if HAVE_PTHREADS < 7
12361         status = pthread_attr_setdetachstate(&attr, &detach);
12362         if( status < 0 ) status = errno;
12363 #else
12364         status = pthread_attr_setdetachstate(&attr, detach);
12365 #endif
12366         if( status ) return status;
12367         status = pthread_create( &t, &attr, task, NULL );
12368 #if HAVE_PTHREADS < 7
12369         if( status < 0 ) status = errno;
12370 #endif
12371         if( status ) return status;
12372 #else
12373         /* Draft 4 pthreads */
12374         status = pthread_create( &t, pthread_attr_default, task, NULL );
12375         if( status ) return errno;
12376
12377         /* give thread a chance to complete */
12378         /* it should remain joinable and hence detachable */
12379         sleep( 1 );
12380
12381         status = pthread_detach( &t );
12382         if( status ) return errno;
12383 #endif
12384
12385 #ifdef HAVE_LINUX_THREADS
12386         pthread_kill_other_threads_np();
12387 #endif
12388
12389         return 0;
12390
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394   rm -rf conftest*
12395   ol_cv_pthread_mthreads=yes
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   ol_cv_pthread_mthreads=no
12401 fi
12402 rm -f conftest*
12403 else
12404   cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 /* pthread test headers */
12408 #include <pthread.h>
12409 #if HAVE_PTHREADS < 7
12410 #include <errno.h>
12411 #endif
12412 #ifndef NULL
12413 #define NULL (void*)0
12414 #endif
12415
12416 static void *task(p)
12417         void *p;
12418 {
12419         return (void *) (p == NULL);
12420 }
12421
12422
12423 int main(argc, argv)
12424         int argc;
12425         char **argv;
12426 {
12427
12428         /* pthread test function */
12429 #ifndef PTHREAD_CREATE_DETACHED
12430 #define PTHREAD_CREATE_DETACHED 1
12431 #endif
12432         pthread_t t;
12433         int status;
12434         int detach = PTHREAD_CREATE_DETACHED;
12435
12436 #if HAVE_PTHREADS > 4
12437         /* Final pthreads */
12438         pthread_attr_t attr;
12439
12440         status = pthread_attr_init(&attr);
12441         if( status ) return status;
12442
12443 #if HAVE_PTHREADS < 7
12444         status = pthread_attr_setdetachstate(&attr, &detach);
12445         if( status < 0 ) status = errno;
12446 #else
12447         status = pthread_attr_setdetachstate(&attr, detach);
12448 #endif
12449         if( status ) return status;
12450         status = pthread_create( &t, &attr, task, NULL );
12451 #if HAVE_PTHREADS < 7
12452         if( status < 0 ) status = errno;
12453 #endif
12454         if( status ) return status;
12455 #else
12456         /* Draft 4 pthreads */
12457         status = pthread_create( &t, pthread_attr_default, task, NULL );
12458         if( status ) return errno;
12459
12460         /* give thread a chance to complete */
12461         /* it should remain joinable and hence detachable */
12462         sleep( 1 );
12463
12464         status = pthread_detach( &t );
12465         if( status ) return errno;
12466 #endif
12467
12468 #ifdef HAVE_LINUX_THREADS
12469         pthread_kill_other_threads_np();
12470 #endif
12471
12472         return 0;
12473
12474 }
12475
12476 EOF
12477 if { (eval echo configure:12478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12478 then
12479   ol_cv_pthread_mthreads=yes
12480 else
12481   echo "configure: failed program was:" >&5
12482   cat conftest.$ac_ext >&5
12483   rm -fr conftest*
12484   ol_cv_pthread_mthreads=no
12485 fi
12486 rm -fr conftest*
12487 fi
12488
12489
12490                 # restore the LIBS
12491                 LIBS="$ol_LIBS"
12492         
12493 fi
12494
12495 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12496
12497         if test $ol_cv_pthread_mthreads = yes ; then
12498                 ol_link_pthreads="-mthreads"
12499                 ol_link_threads=posix
12500         fi
12501 fi
12502
12503                 # Pthread try link: -thread (ol_cv_pthread_thread)
12504 if test "$ol_link_threads" = no ; then
12505         # try -thread
12506         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12507 echo "configure:12508: checking for pthread link with -thread" >&5
12508 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12509   echo $ac_n "(cached) $ac_c" 1>&6
12510 else
12511   
12512                 # save the flags
12513                 ol_LIBS="$LIBS"
12514                 LIBS="-thread $LIBS"
12515
12516                 if test "$cross_compiling" = yes; then
12517   cat > conftest.$ac_ext <<EOF
12518 #line 12519 "configure"
12519 #include "confdefs.h"
12520 /* pthread test headers */
12521 #include <pthread.h>
12522 #if HAVE_PTHREADS < 7
12523 #include <errno.h>
12524 #endif
12525 #ifndef NULL
12526 #define NULL (void*)0
12527 #endif
12528
12529 static void *task(p)
12530         void *p;
12531 {
12532         return (void *) (p == NULL);
12533 }
12534
12535 int main() {
12536
12537         /* pthread test function */
12538 #ifndef PTHREAD_CREATE_DETACHED
12539 #define PTHREAD_CREATE_DETACHED 1
12540 #endif
12541         pthread_t t;
12542         int status;
12543         int detach = PTHREAD_CREATE_DETACHED;
12544
12545 #if HAVE_PTHREADS > 4
12546         /* Final pthreads */
12547         pthread_attr_t attr;
12548
12549         status = pthread_attr_init(&attr);
12550         if( status ) return status;
12551
12552 #if HAVE_PTHREADS < 7
12553         status = pthread_attr_setdetachstate(&attr, &detach);
12554         if( status < 0 ) status = errno;
12555 #else
12556         status = pthread_attr_setdetachstate(&attr, detach);
12557 #endif
12558         if( status ) return status;
12559         status = pthread_create( &t, &attr, task, NULL );
12560 #if HAVE_PTHREADS < 7
12561         if( status < 0 ) status = errno;
12562 #endif
12563         if( status ) return status;
12564 #else
12565         /* Draft 4 pthreads */
12566         status = pthread_create( &t, pthread_attr_default, task, NULL );
12567         if( status ) return errno;
12568
12569         /* give thread a chance to complete */
12570         /* it should remain joinable and hence detachable */
12571         sleep( 1 );
12572
12573         status = pthread_detach( &t );
12574         if( status ) return errno;
12575 #endif
12576
12577 #ifdef HAVE_LINUX_THREADS
12578         pthread_kill_other_threads_np();
12579 #endif
12580
12581         return 0;
12582
12583 ; return 0; }
12584 EOF
12585 if { (eval echo configure:12586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12586   rm -rf conftest*
12587   ol_cv_pthread_thread=yes
12588 else
12589   echo "configure: failed program was:" >&5
12590   cat conftest.$ac_ext >&5
12591   rm -rf conftest*
12592   ol_cv_pthread_thread=no
12593 fi
12594 rm -f conftest*
12595 else
12596   cat > conftest.$ac_ext <<EOF
12597 #line 12598 "configure"
12598 #include "confdefs.h"
12599 /* pthread test headers */
12600 #include <pthread.h>
12601 #if HAVE_PTHREADS < 7
12602 #include <errno.h>
12603 #endif
12604 #ifndef NULL
12605 #define NULL (void*)0
12606 #endif
12607
12608 static void *task(p)
12609         void *p;
12610 {
12611         return (void *) (p == NULL);
12612 }
12613
12614
12615 int main(argc, argv)
12616         int argc;
12617         char **argv;
12618 {
12619
12620         /* pthread test function */
12621 #ifndef PTHREAD_CREATE_DETACHED
12622 #define PTHREAD_CREATE_DETACHED 1
12623 #endif
12624         pthread_t t;
12625         int status;
12626         int detach = PTHREAD_CREATE_DETACHED;
12627
12628 #if HAVE_PTHREADS > 4
12629         /* Final pthreads */
12630         pthread_attr_t attr;
12631
12632         status = pthread_attr_init(&attr);
12633         if( status ) return status;
12634
12635 #if HAVE_PTHREADS < 7
12636         status = pthread_attr_setdetachstate(&attr, &detach);
12637         if( status < 0 ) status = errno;
12638 #else
12639         status = pthread_attr_setdetachstate(&attr, detach);
12640 #endif
12641         if( status ) return status;
12642         status = pthread_create( &t, &attr, task, NULL );
12643 #if HAVE_PTHREADS < 7
12644         if( status < 0 ) status = errno;
12645 #endif
12646         if( status ) return status;
12647 #else
12648         /* Draft 4 pthreads */
12649         status = pthread_create( &t, pthread_attr_default, task, NULL );
12650         if( status ) return errno;
12651
12652         /* give thread a chance to complete */
12653         /* it should remain joinable and hence detachable */
12654         sleep( 1 );
12655
12656         status = pthread_detach( &t );
12657         if( status ) return errno;
12658 #endif
12659
12660 #ifdef HAVE_LINUX_THREADS
12661         pthread_kill_other_threads_np();
12662 #endif
12663
12664         return 0;
12665
12666 }
12667
12668 EOF
12669 if { (eval echo configure:12670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12670 then
12671   ol_cv_pthread_thread=yes
12672 else
12673   echo "configure: failed program was:" >&5
12674   cat conftest.$ac_ext >&5
12675   rm -fr conftest*
12676   ol_cv_pthread_thread=no
12677 fi
12678 rm -fr conftest*
12679 fi
12680
12681
12682                 # restore the LIBS
12683                 LIBS="$ol_LIBS"
12684         
12685 fi
12686
12687 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12688
12689         if test $ol_cv_pthread_thread = yes ; then
12690                 ol_link_pthreads="-thread"
12691                 ol_link_threads=posix
12692         fi
12693 fi
12694
12695
12696                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12697 if test "$ol_link_threads" = no ; then
12698         # try -lpthread -lmach -lexc -lc_r
12699         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12700 echo "configure:12701: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12701 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12702   echo $ac_n "(cached) $ac_c" 1>&6
12703 else
12704   
12705                 # save the flags
12706                 ol_LIBS="$LIBS"
12707                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12708
12709                 if test "$cross_compiling" = yes; then
12710   cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 /* pthread test headers */
12714 #include <pthread.h>
12715 #if HAVE_PTHREADS < 7
12716 #include <errno.h>
12717 #endif
12718 #ifndef NULL
12719 #define NULL (void*)0
12720 #endif
12721
12722 static void *task(p)
12723         void *p;
12724 {
12725         return (void *) (p == NULL);
12726 }
12727
12728 int main() {
12729
12730         /* pthread test function */
12731 #ifndef PTHREAD_CREATE_DETACHED
12732 #define PTHREAD_CREATE_DETACHED 1
12733 #endif
12734         pthread_t t;
12735         int status;
12736         int detach = PTHREAD_CREATE_DETACHED;
12737
12738 #if HAVE_PTHREADS > 4
12739         /* Final pthreads */
12740         pthread_attr_t attr;
12741
12742         status = pthread_attr_init(&attr);
12743         if( status ) return status;
12744
12745 #if HAVE_PTHREADS < 7
12746         status = pthread_attr_setdetachstate(&attr, &detach);
12747         if( status < 0 ) status = errno;
12748 #else
12749         status = pthread_attr_setdetachstate(&attr, detach);
12750 #endif
12751         if( status ) return status;
12752         status = pthread_create( &t, &attr, task, NULL );
12753 #if HAVE_PTHREADS < 7
12754         if( status < 0 ) status = errno;
12755 #endif
12756         if( status ) return status;
12757 #else
12758         /* Draft 4 pthreads */
12759         status = pthread_create( &t, pthread_attr_default, task, NULL );
12760         if( status ) return errno;
12761
12762         /* give thread a chance to complete */
12763         /* it should remain joinable and hence detachable */
12764         sleep( 1 );
12765
12766         status = pthread_detach( &t );
12767         if( status ) return errno;
12768 #endif
12769
12770 #ifdef HAVE_LINUX_THREADS
12771         pthread_kill_other_threads_np();
12772 #endif
12773
12774         return 0;
12775
12776 ; return 0; }
12777 EOF
12778 if { (eval echo configure:12779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12779   rm -rf conftest*
12780   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12781 else
12782   echo "configure: failed program was:" >&5
12783   cat conftest.$ac_ext >&5
12784   rm -rf conftest*
12785   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12786 fi
12787 rm -f conftest*
12788 else
12789   cat > conftest.$ac_ext <<EOF
12790 #line 12791 "configure"
12791 #include "confdefs.h"
12792 /* pthread test headers */
12793 #include <pthread.h>
12794 #if HAVE_PTHREADS < 7
12795 #include <errno.h>
12796 #endif
12797 #ifndef NULL
12798 #define NULL (void*)0
12799 #endif
12800
12801 static void *task(p)
12802         void *p;
12803 {
12804         return (void *) (p == NULL);
12805 }
12806
12807
12808 int main(argc, argv)
12809         int argc;
12810         char **argv;
12811 {
12812
12813         /* pthread test function */
12814 #ifndef PTHREAD_CREATE_DETACHED
12815 #define PTHREAD_CREATE_DETACHED 1
12816 #endif
12817         pthread_t t;
12818         int status;
12819         int detach = PTHREAD_CREATE_DETACHED;
12820
12821 #if HAVE_PTHREADS > 4
12822         /* Final pthreads */
12823         pthread_attr_t attr;
12824
12825         status = pthread_attr_init(&attr);
12826         if( status ) return status;
12827
12828 #if HAVE_PTHREADS < 7
12829         status = pthread_attr_setdetachstate(&attr, &detach);
12830         if( status < 0 ) status = errno;
12831 #else
12832         status = pthread_attr_setdetachstate(&attr, detach);
12833 #endif
12834         if( status ) return status;
12835         status = pthread_create( &t, &attr, task, NULL );
12836 #if HAVE_PTHREADS < 7
12837         if( status < 0 ) status = errno;
12838 #endif
12839         if( status ) return status;
12840 #else
12841         /* Draft 4 pthreads */
12842         status = pthread_create( &t, pthread_attr_default, task, NULL );
12843         if( status ) return errno;
12844
12845         /* give thread a chance to complete */
12846         /* it should remain joinable and hence detachable */
12847         sleep( 1 );
12848
12849         status = pthread_detach( &t );
12850         if( status ) return errno;
12851 #endif
12852
12853 #ifdef HAVE_LINUX_THREADS
12854         pthread_kill_other_threads_np();
12855 #endif
12856
12857         return 0;
12858
12859 }
12860
12861 EOF
12862 if { (eval echo configure:12863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12863 then
12864   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12865 else
12866   echo "configure: failed program was:" >&5
12867   cat conftest.$ac_ext >&5
12868   rm -fr conftest*
12869   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12870 fi
12871 rm -fr conftest*
12872 fi
12873
12874
12875                 # restore the LIBS
12876                 LIBS="$ol_LIBS"
12877         
12878 fi
12879
12880 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12881
12882         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12883                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12884                 ol_link_threads=posix
12885         fi
12886 fi
12887
12888                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12889 if test "$ol_link_threads" = no ; then
12890         # try -lpthread -lmach -lexc
12891         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12892 echo "configure:12893: checking for pthread link with -lpthread -lmach -lexc" >&5
12893 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12894   echo $ac_n "(cached) $ac_c" 1>&6
12895 else
12896   
12897                 # save the flags
12898                 ol_LIBS="$LIBS"
12899                 LIBS="-lpthread -lmach -lexc $LIBS"
12900
12901                 if test "$cross_compiling" = yes; then
12902   cat > conftest.$ac_ext <<EOF
12903 #line 12904 "configure"
12904 #include "confdefs.h"
12905 /* pthread test headers */
12906 #include <pthread.h>
12907 #if HAVE_PTHREADS < 7
12908 #include <errno.h>
12909 #endif
12910 #ifndef NULL
12911 #define NULL (void*)0
12912 #endif
12913
12914 static void *task(p)
12915         void *p;
12916 {
12917         return (void *) (p == NULL);
12918 }
12919
12920 int main() {
12921
12922         /* pthread test function */
12923 #ifndef PTHREAD_CREATE_DETACHED
12924 #define PTHREAD_CREATE_DETACHED 1
12925 #endif
12926         pthread_t t;
12927         int status;
12928         int detach = PTHREAD_CREATE_DETACHED;
12929
12930 #if HAVE_PTHREADS > 4
12931         /* Final pthreads */
12932         pthread_attr_t attr;
12933
12934         status = pthread_attr_init(&attr);
12935         if( status ) return status;
12936
12937 #if HAVE_PTHREADS < 7
12938         status = pthread_attr_setdetachstate(&attr, &detach);
12939         if( status < 0 ) status = errno;
12940 #else
12941         status = pthread_attr_setdetachstate(&attr, detach);
12942 #endif
12943         if( status ) return status;
12944         status = pthread_create( &t, &attr, task, NULL );
12945 #if HAVE_PTHREADS < 7
12946         if( status < 0 ) status = errno;
12947 #endif
12948         if( status ) return status;
12949 #else
12950         /* Draft 4 pthreads */
12951         status = pthread_create( &t, pthread_attr_default, task, NULL );
12952         if( status ) return errno;
12953
12954         /* give thread a chance to complete */
12955         /* it should remain joinable and hence detachable */
12956         sleep( 1 );
12957
12958         status = pthread_detach( &t );
12959         if( status ) return errno;
12960 #endif
12961
12962 #ifdef HAVE_LINUX_THREADS
12963         pthread_kill_other_threads_np();
12964 #endif
12965
12966         return 0;
12967
12968 ; return 0; }
12969 EOF
12970 if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12971   rm -rf conftest*
12972   ol_cv_pthread_lpthread_lmach_lexc=yes
12973 else
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -rf conftest*
12977   ol_cv_pthread_lpthread_lmach_lexc=no
12978 fi
12979 rm -f conftest*
12980 else
12981   cat > conftest.$ac_ext <<EOF
12982 #line 12983 "configure"
12983 #include "confdefs.h"
12984 /* pthread test headers */
12985 #include <pthread.h>
12986 #if HAVE_PTHREADS < 7
12987 #include <errno.h>
12988 #endif
12989 #ifndef NULL
12990 #define NULL (void*)0
12991 #endif
12992
12993 static void *task(p)
12994         void *p;
12995 {
12996         return (void *) (p == NULL);
12997 }
12998
12999
13000 int main(argc, argv)
13001         int argc;
13002         char **argv;
13003 {
13004
13005         /* pthread test function */
13006 #ifndef PTHREAD_CREATE_DETACHED
13007 #define PTHREAD_CREATE_DETACHED 1
13008 #endif
13009         pthread_t t;
13010         int status;
13011         int detach = PTHREAD_CREATE_DETACHED;
13012
13013 #if HAVE_PTHREADS > 4
13014         /* Final pthreads */
13015         pthread_attr_t attr;
13016
13017         status = pthread_attr_init(&attr);
13018         if( status ) return status;
13019
13020 #if HAVE_PTHREADS < 7
13021         status = pthread_attr_setdetachstate(&attr, &detach);
13022         if( status < 0 ) status = errno;
13023 #else
13024         status = pthread_attr_setdetachstate(&attr, detach);
13025 #endif
13026         if( status ) return status;
13027         status = pthread_create( &t, &attr, task, NULL );
13028 #if HAVE_PTHREADS < 7
13029         if( status < 0 ) status = errno;
13030 #endif
13031         if( status ) return status;
13032 #else
13033         /* Draft 4 pthreads */
13034         status = pthread_create( &t, pthread_attr_default, task, NULL );
13035         if( status ) return errno;
13036
13037         /* give thread a chance to complete */
13038         /* it should remain joinable and hence detachable */
13039         sleep( 1 );
13040
13041         status = pthread_detach( &t );
13042         if( status ) return errno;
13043 #endif
13044
13045 #ifdef HAVE_LINUX_THREADS
13046         pthread_kill_other_threads_np();
13047 #endif
13048
13049         return 0;
13050
13051 }
13052
13053 EOF
13054 if { (eval echo configure:13055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13055 then
13056   ol_cv_pthread_lpthread_lmach_lexc=yes
13057 else
13058   echo "configure: failed program was:" >&5
13059   cat conftest.$ac_ext >&5
13060   rm -fr conftest*
13061   ol_cv_pthread_lpthread_lmach_lexc=no
13062 fi
13063 rm -fr conftest*
13064 fi
13065
13066
13067                 # restore the LIBS
13068                 LIBS="$ol_LIBS"
13069         
13070 fi
13071
13072 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13073
13074         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13075                 ol_link_pthreads="-lpthread -lmach -lexc"
13076                 ol_link_threads=posix
13077         fi
13078 fi
13079
13080
13081                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13082 if test "$ol_link_threads" = no ; then
13083         # try -lpthread -Wl,-woff,85
13084         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13085 echo "configure:13086: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13086 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13087   echo $ac_n "(cached) $ac_c" 1>&6
13088 else
13089   
13090                 # save the flags
13091                 ol_LIBS="$LIBS"
13092                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13093
13094                 if test "$cross_compiling" = yes; then
13095   cat > conftest.$ac_ext <<EOF
13096 #line 13097 "configure"
13097 #include "confdefs.h"
13098 /* pthread test headers */
13099 #include <pthread.h>
13100 #if HAVE_PTHREADS < 7
13101 #include <errno.h>
13102 #endif
13103 #ifndef NULL
13104 #define NULL (void*)0
13105 #endif
13106
13107 static void *task(p)
13108         void *p;
13109 {
13110         return (void *) (p == NULL);
13111 }
13112
13113 int main() {
13114
13115         /* pthread test function */
13116 #ifndef PTHREAD_CREATE_DETACHED
13117 #define PTHREAD_CREATE_DETACHED 1
13118 #endif
13119         pthread_t t;
13120         int status;
13121         int detach = PTHREAD_CREATE_DETACHED;
13122
13123 #if HAVE_PTHREADS > 4
13124         /* Final pthreads */
13125         pthread_attr_t attr;
13126
13127         status = pthread_attr_init(&attr);
13128         if( status ) return status;
13129
13130 #if HAVE_PTHREADS < 7
13131         status = pthread_attr_setdetachstate(&attr, &detach);
13132         if( status < 0 ) status = errno;
13133 #else
13134         status = pthread_attr_setdetachstate(&attr, detach);
13135 #endif
13136         if( status ) return status;
13137         status = pthread_create( &t, &attr, task, NULL );
13138 #if HAVE_PTHREADS < 7
13139         if( status < 0 ) status = errno;
13140 #endif
13141         if( status ) return status;
13142 #else
13143         /* Draft 4 pthreads */
13144         status = pthread_create( &t, pthread_attr_default, task, NULL );
13145         if( status ) return errno;
13146
13147         /* give thread a chance to complete */
13148         /* it should remain joinable and hence detachable */
13149         sleep( 1 );
13150
13151         status = pthread_detach( &t );
13152         if( status ) return errno;
13153 #endif
13154
13155 #ifdef HAVE_LINUX_THREADS
13156         pthread_kill_other_threads_np();
13157 #endif
13158
13159         return 0;
13160
13161 ; return 0; }
13162 EOF
13163 if { (eval echo configure:13164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13164   rm -rf conftest*
13165   ol_cv_pthread_lib_lpthread_woff=yes
13166 else
13167   echo "configure: failed program was:" >&5
13168   cat conftest.$ac_ext >&5
13169   rm -rf conftest*
13170   ol_cv_pthread_lib_lpthread_woff=no
13171 fi
13172 rm -f conftest*
13173 else
13174   cat > conftest.$ac_ext <<EOF
13175 #line 13176 "configure"
13176 #include "confdefs.h"
13177 /* pthread test headers */
13178 #include <pthread.h>
13179 #if HAVE_PTHREADS < 7
13180 #include <errno.h>
13181 #endif
13182 #ifndef NULL
13183 #define NULL (void*)0
13184 #endif
13185
13186 static void *task(p)
13187         void *p;
13188 {
13189         return (void *) (p == NULL);
13190 }
13191
13192
13193 int main(argc, argv)
13194         int argc;
13195         char **argv;
13196 {
13197
13198         /* pthread test function */
13199 #ifndef PTHREAD_CREATE_DETACHED
13200 #define PTHREAD_CREATE_DETACHED 1
13201 #endif
13202         pthread_t t;
13203         int status;
13204         int detach = PTHREAD_CREATE_DETACHED;
13205
13206 #if HAVE_PTHREADS > 4
13207         /* Final pthreads */
13208         pthread_attr_t attr;
13209
13210         status = pthread_attr_init(&attr);
13211         if( status ) return status;
13212
13213 #if HAVE_PTHREADS < 7
13214         status = pthread_attr_setdetachstate(&attr, &detach);
13215         if( status < 0 ) status = errno;
13216 #else
13217         status = pthread_attr_setdetachstate(&attr, detach);
13218 #endif
13219         if( status ) return status;
13220         status = pthread_create( &t, &attr, task, NULL );
13221 #if HAVE_PTHREADS < 7
13222         if( status < 0 ) status = errno;
13223 #endif
13224         if( status ) return status;
13225 #else
13226         /* Draft 4 pthreads */
13227         status = pthread_create( &t, pthread_attr_default, task, NULL );
13228         if( status ) return errno;
13229
13230         /* give thread a chance to complete */
13231         /* it should remain joinable and hence detachable */
13232         sleep( 1 );
13233
13234         status = pthread_detach( &t );
13235         if( status ) return errno;
13236 #endif
13237
13238 #ifdef HAVE_LINUX_THREADS
13239         pthread_kill_other_threads_np();
13240 #endif
13241
13242         return 0;
13243
13244 }
13245
13246 EOF
13247 if { (eval echo configure:13248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13248 then
13249   ol_cv_pthread_lib_lpthread_woff=yes
13250 else
13251   echo "configure: failed program was:" >&5
13252   cat conftest.$ac_ext >&5
13253   rm -fr conftest*
13254   ol_cv_pthread_lib_lpthread_woff=no
13255 fi
13256 rm -fr conftest*
13257 fi
13258
13259
13260                 # restore the LIBS
13261                 LIBS="$ol_LIBS"
13262         
13263 fi
13264
13265 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13266
13267         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13268                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13269                 ol_link_threads=posix
13270         fi
13271 fi
13272
13273
13274                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13275 if test "$ol_link_threads" = no ; then
13276         # try -lpthread
13277         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13278 echo "configure:13279: checking for pthread link with -lpthread" >&5
13279 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13280   echo $ac_n "(cached) $ac_c" 1>&6
13281 else
13282   
13283                 # save the flags
13284                 ol_LIBS="$LIBS"
13285                 LIBS="-lpthread $LIBS"
13286
13287                 if test "$cross_compiling" = yes; then
13288   cat > conftest.$ac_ext <<EOF
13289 #line 13290 "configure"
13290 #include "confdefs.h"
13291 /* pthread test headers */
13292 #include <pthread.h>
13293 #if HAVE_PTHREADS < 7
13294 #include <errno.h>
13295 #endif
13296 #ifndef NULL
13297 #define NULL (void*)0
13298 #endif
13299
13300 static void *task(p)
13301         void *p;
13302 {
13303         return (void *) (p == NULL);
13304 }
13305
13306 int main() {
13307
13308         /* pthread test function */
13309 #ifndef PTHREAD_CREATE_DETACHED
13310 #define PTHREAD_CREATE_DETACHED 1
13311 #endif
13312         pthread_t t;
13313         int status;
13314         int detach = PTHREAD_CREATE_DETACHED;
13315
13316 #if HAVE_PTHREADS > 4
13317         /* Final pthreads */
13318         pthread_attr_t attr;
13319
13320         status = pthread_attr_init(&attr);
13321         if( status ) return status;
13322
13323 #if HAVE_PTHREADS < 7
13324         status = pthread_attr_setdetachstate(&attr, &detach);
13325         if( status < 0 ) status = errno;
13326 #else
13327         status = pthread_attr_setdetachstate(&attr, detach);
13328 #endif
13329         if( status ) return status;
13330         status = pthread_create( &t, &attr, task, NULL );
13331 #if HAVE_PTHREADS < 7
13332         if( status < 0 ) status = errno;
13333 #endif
13334         if( status ) return status;
13335 #else
13336         /* Draft 4 pthreads */
13337         status = pthread_create( &t, pthread_attr_default, task, NULL );
13338         if( status ) return errno;
13339
13340         /* give thread a chance to complete */
13341         /* it should remain joinable and hence detachable */
13342         sleep( 1 );
13343
13344         status = pthread_detach( &t );
13345         if( status ) return errno;
13346 #endif
13347
13348 #ifdef HAVE_LINUX_THREADS
13349         pthread_kill_other_threads_np();
13350 #endif
13351
13352         return 0;
13353
13354 ; return 0; }
13355 EOF
13356 if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13357   rm -rf conftest*
13358   ol_cv_pthread_lpthread=yes
13359 else
13360   echo "configure: failed program was:" >&5
13361   cat conftest.$ac_ext >&5
13362   rm -rf conftest*
13363   ol_cv_pthread_lpthread=no
13364 fi
13365 rm -f conftest*
13366 else
13367   cat > conftest.$ac_ext <<EOF
13368 #line 13369 "configure"
13369 #include "confdefs.h"
13370 /* pthread test headers */
13371 #include <pthread.h>
13372 #if HAVE_PTHREADS < 7
13373 #include <errno.h>
13374 #endif
13375 #ifndef NULL
13376 #define NULL (void*)0
13377 #endif
13378
13379 static void *task(p)
13380         void *p;
13381 {
13382         return (void *) (p == NULL);
13383 }
13384
13385
13386 int main(argc, argv)
13387         int argc;
13388         char **argv;
13389 {
13390
13391         /* pthread test function */
13392 #ifndef PTHREAD_CREATE_DETACHED
13393 #define PTHREAD_CREATE_DETACHED 1
13394 #endif
13395         pthread_t t;
13396         int status;
13397         int detach = PTHREAD_CREATE_DETACHED;
13398
13399 #if HAVE_PTHREADS > 4
13400         /* Final pthreads */
13401         pthread_attr_t attr;
13402
13403         status = pthread_attr_init(&attr);
13404         if( status ) return status;
13405
13406 #if HAVE_PTHREADS < 7
13407         status = pthread_attr_setdetachstate(&attr, &detach);
13408         if( status < 0 ) status = errno;
13409 #else
13410         status = pthread_attr_setdetachstate(&attr, detach);
13411 #endif
13412         if( status ) return status;
13413         status = pthread_create( &t, &attr, task, NULL );
13414 #if HAVE_PTHREADS < 7
13415         if( status < 0 ) status = errno;
13416 #endif
13417         if( status ) return status;
13418 #else
13419         /* Draft 4 pthreads */
13420         status = pthread_create( &t, pthread_attr_default, task, NULL );
13421         if( status ) return errno;
13422
13423         /* give thread a chance to complete */
13424         /* it should remain joinable and hence detachable */
13425         sleep( 1 );
13426
13427         status = pthread_detach( &t );
13428         if( status ) return errno;
13429 #endif
13430
13431 #ifdef HAVE_LINUX_THREADS
13432         pthread_kill_other_threads_np();
13433 #endif
13434
13435         return 0;
13436
13437 }
13438
13439 EOF
13440 if { (eval echo configure:13441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13441 then
13442   ol_cv_pthread_lpthread=yes
13443 else
13444   echo "configure: failed program was:" >&5
13445   cat conftest.$ac_ext >&5
13446   rm -fr conftest*
13447   ol_cv_pthread_lpthread=no
13448 fi
13449 rm -fr conftest*
13450 fi
13451
13452
13453                 # restore the LIBS
13454                 LIBS="$ol_LIBS"
13455         
13456 fi
13457
13458 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13459
13460         if test $ol_cv_pthread_lpthread = yes ; then
13461                 ol_link_pthreads="-lpthread"
13462                 ol_link_threads=posix
13463         fi
13464 fi
13465
13466                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13467 if test "$ol_link_threads" = no ; then
13468         # try -lc_r
13469         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13470 echo "configure:13471: checking for pthread link with -lc_r" >&5
13471 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13472   echo $ac_n "(cached) $ac_c" 1>&6
13473 else
13474   
13475                 # save the flags
13476                 ol_LIBS="$LIBS"
13477                 LIBS="-lc_r $LIBS"
13478
13479                 if test "$cross_compiling" = yes; then
13480   cat > conftest.$ac_ext <<EOF
13481 #line 13482 "configure"
13482 #include "confdefs.h"
13483 /* pthread test headers */
13484 #include <pthread.h>
13485 #if HAVE_PTHREADS < 7
13486 #include <errno.h>
13487 #endif
13488 #ifndef NULL
13489 #define NULL (void*)0
13490 #endif
13491
13492 static void *task(p)
13493         void *p;
13494 {
13495         return (void *) (p == NULL);
13496 }
13497
13498 int main() {
13499
13500         /* pthread test function */
13501 #ifndef PTHREAD_CREATE_DETACHED
13502 #define PTHREAD_CREATE_DETACHED 1
13503 #endif
13504         pthread_t t;
13505         int status;
13506         int detach = PTHREAD_CREATE_DETACHED;
13507
13508 #if HAVE_PTHREADS > 4
13509         /* Final pthreads */
13510         pthread_attr_t attr;
13511
13512         status = pthread_attr_init(&attr);
13513         if( status ) return status;
13514
13515 #if HAVE_PTHREADS < 7
13516         status = pthread_attr_setdetachstate(&attr, &detach);
13517         if( status < 0 ) status = errno;
13518 #else
13519         status = pthread_attr_setdetachstate(&attr, detach);
13520 #endif
13521         if( status ) return status;
13522         status = pthread_create( &t, &attr, task, NULL );
13523 #if HAVE_PTHREADS < 7
13524         if( status < 0 ) status = errno;
13525 #endif
13526         if( status ) return status;
13527 #else
13528         /* Draft 4 pthreads */
13529         status = pthread_create( &t, pthread_attr_default, task, NULL );
13530         if( status ) return errno;
13531
13532         /* give thread a chance to complete */
13533         /* it should remain joinable and hence detachable */
13534         sleep( 1 );
13535
13536         status = pthread_detach( &t );
13537         if( status ) return errno;
13538 #endif
13539
13540 #ifdef HAVE_LINUX_THREADS
13541         pthread_kill_other_threads_np();
13542 #endif
13543
13544         return 0;
13545
13546 ; return 0; }
13547 EOF
13548 if { (eval echo configure:13549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13549   rm -rf conftest*
13550   ol_cv_pthread_lc_r=yes
13551 else
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -rf conftest*
13555   ol_cv_pthread_lc_r=no
13556 fi
13557 rm -f conftest*
13558 else
13559   cat > conftest.$ac_ext <<EOF
13560 #line 13561 "configure"
13561 #include "confdefs.h"
13562 /* pthread test headers */
13563 #include <pthread.h>
13564 #if HAVE_PTHREADS < 7
13565 #include <errno.h>
13566 #endif
13567 #ifndef NULL
13568 #define NULL (void*)0
13569 #endif
13570
13571 static void *task(p)
13572         void *p;
13573 {
13574         return (void *) (p == NULL);
13575 }
13576
13577
13578 int main(argc, argv)
13579         int argc;
13580         char **argv;
13581 {
13582
13583         /* pthread test function */
13584 #ifndef PTHREAD_CREATE_DETACHED
13585 #define PTHREAD_CREATE_DETACHED 1
13586 #endif
13587         pthread_t t;
13588         int status;
13589         int detach = PTHREAD_CREATE_DETACHED;
13590
13591 #if HAVE_PTHREADS > 4
13592         /* Final pthreads */
13593         pthread_attr_t attr;
13594
13595         status = pthread_attr_init(&attr);
13596         if( status ) return status;
13597
13598 #if HAVE_PTHREADS < 7
13599         status = pthread_attr_setdetachstate(&attr, &detach);
13600         if( status < 0 ) status = errno;
13601 #else
13602         status = pthread_attr_setdetachstate(&attr, detach);
13603 #endif
13604         if( status ) return status;
13605         status = pthread_create( &t, &attr, task, NULL );
13606 #if HAVE_PTHREADS < 7
13607         if( status < 0 ) status = errno;
13608 #endif
13609         if( status ) return status;
13610 #else
13611         /* Draft 4 pthreads */
13612         status = pthread_create( &t, pthread_attr_default, task, NULL );
13613         if( status ) return errno;
13614
13615         /* give thread a chance to complete */
13616         /* it should remain joinable and hence detachable */
13617         sleep( 1 );
13618
13619         status = pthread_detach( &t );
13620         if( status ) return errno;
13621 #endif
13622
13623 #ifdef HAVE_LINUX_THREADS
13624         pthread_kill_other_threads_np();
13625 #endif
13626
13627         return 0;
13628
13629 }
13630
13631 EOF
13632 if { (eval echo configure:13633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13633 then
13634   ol_cv_pthread_lc_r=yes
13635 else
13636   echo "configure: failed program was:" >&5
13637   cat conftest.$ac_ext >&5
13638   rm -fr conftest*
13639   ol_cv_pthread_lc_r=no
13640 fi
13641 rm -fr conftest*
13642 fi
13643
13644
13645                 # restore the LIBS
13646                 LIBS="$ol_LIBS"
13647         
13648 fi
13649
13650 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13651
13652         if test $ol_cv_pthread_lc_r = yes ; then
13653                 ol_link_pthreads="-lc_r"
13654                 ol_link_threads=posix
13655         fi
13656 fi
13657
13658
13659                 # Pthread try link: -threads (ol_cv_pthread_threads)
13660 if test "$ol_link_threads" = no ; then
13661         # try -threads
13662         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13663 echo "configure:13664: checking for pthread link with -threads" >&5
13664 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13665   echo $ac_n "(cached) $ac_c" 1>&6
13666 else
13667   
13668                 # save the flags
13669                 ol_LIBS="$LIBS"
13670                 LIBS="-threads $LIBS"
13671
13672                 if test "$cross_compiling" = yes; then
13673   cat > conftest.$ac_ext <<EOF
13674 #line 13675 "configure"
13675 #include "confdefs.h"
13676 /* pthread test headers */
13677 #include <pthread.h>
13678 #if HAVE_PTHREADS < 7
13679 #include <errno.h>
13680 #endif
13681 #ifndef NULL
13682 #define NULL (void*)0
13683 #endif
13684
13685 static void *task(p)
13686         void *p;
13687 {
13688         return (void *) (p == NULL);
13689 }
13690
13691 int main() {
13692
13693         /* pthread test function */
13694 #ifndef PTHREAD_CREATE_DETACHED
13695 #define PTHREAD_CREATE_DETACHED 1
13696 #endif
13697         pthread_t t;
13698         int status;
13699         int detach = PTHREAD_CREATE_DETACHED;
13700
13701 #if HAVE_PTHREADS > 4
13702         /* Final pthreads */
13703         pthread_attr_t attr;
13704
13705         status = pthread_attr_init(&attr);
13706         if( status ) return status;
13707
13708 #if HAVE_PTHREADS < 7
13709         status = pthread_attr_setdetachstate(&attr, &detach);
13710         if( status < 0 ) status = errno;
13711 #else
13712         status = pthread_attr_setdetachstate(&attr, detach);
13713 #endif
13714         if( status ) return status;
13715         status = pthread_create( &t, &attr, task, NULL );
13716 #if HAVE_PTHREADS < 7
13717         if( status < 0 ) status = errno;
13718 #endif
13719         if( status ) return status;
13720 #else
13721         /* Draft 4 pthreads */
13722         status = pthread_create( &t, pthread_attr_default, task, NULL );
13723         if( status ) return errno;
13724
13725         /* give thread a chance to complete */
13726         /* it should remain joinable and hence detachable */
13727         sleep( 1 );
13728
13729         status = pthread_detach( &t );
13730         if( status ) return errno;
13731 #endif
13732
13733 #ifdef HAVE_LINUX_THREADS
13734         pthread_kill_other_threads_np();
13735 #endif
13736
13737         return 0;
13738
13739 ; return 0; }
13740 EOF
13741 if { (eval echo configure:13742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13742   rm -rf conftest*
13743   ol_cv_pthread_threads=yes
13744 else
13745   echo "configure: failed program was:" >&5
13746   cat conftest.$ac_ext >&5
13747   rm -rf conftest*
13748   ol_cv_pthread_threads=no
13749 fi
13750 rm -f conftest*
13751 else
13752   cat > conftest.$ac_ext <<EOF
13753 #line 13754 "configure"
13754 #include "confdefs.h"
13755 /* pthread test headers */
13756 #include <pthread.h>
13757 #if HAVE_PTHREADS < 7
13758 #include <errno.h>
13759 #endif
13760 #ifndef NULL
13761 #define NULL (void*)0
13762 #endif
13763
13764 static void *task(p)
13765         void *p;
13766 {
13767         return (void *) (p == NULL);
13768 }
13769
13770
13771 int main(argc, argv)
13772         int argc;
13773         char **argv;
13774 {
13775
13776         /* pthread test function */
13777 #ifndef PTHREAD_CREATE_DETACHED
13778 #define PTHREAD_CREATE_DETACHED 1
13779 #endif
13780         pthread_t t;
13781         int status;
13782         int detach = PTHREAD_CREATE_DETACHED;
13783
13784 #if HAVE_PTHREADS > 4
13785         /* Final pthreads */
13786         pthread_attr_t attr;
13787
13788         status = pthread_attr_init(&attr);
13789         if( status ) return status;
13790
13791 #if HAVE_PTHREADS < 7
13792         status = pthread_attr_setdetachstate(&attr, &detach);
13793         if( status < 0 ) status = errno;
13794 #else
13795         status = pthread_attr_setdetachstate(&attr, detach);
13796 #endif
13797         if( status ) return status;
13798         status = pthread_create( &t, &attr, task, NULL );
13799 #if HAVE_PTHREADS < 7
13800         if( status < 0 ) status = errno;
13801 #endif
13802         if( status ) return status;
13803 #else
13804         /* Draft 4 pthreads */
13805         status = pthread_create( &t, pthread_attr_default, task, NULL );
13806         if( status ) return errno;
13807
13808         /* give thread a chance to complete */
13809         /* it should remain joinable and hence detachable */
13810         sleep( 1 );
13811
13812         status = pthread_detach( &t );
13813         if( status ) return errno;
13814 #endif
13815
13816 #ifdef HAVE_LINUX_THREADS
13817         pthread_kill_other_threads_np();
13818 #endif
13819
13820         return 0;
13821
13822 }
13823
13824 EOF
13825 if { (eval echo configure:13826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13826 then
13827   ol_cv_pthread_threads=yes
13828 else
13829   echo "configure: failed program was:" >&5
13830   cat conftest.$ac_ext >&5
13831   rm -fr conftest*
13832   ol_cv_pthread_threads=no
13833 fi
13834 rm -fr conftest*
13835 fi
13836
13837
13838                 # restore the LIBS
13839                 LIBS="$ol_LIBS"
13840         
13841 fi
13842
13843 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13844
13845         if test $ol_cv_pthread_threads = yes ; then
13846                 ol_link_pthreads="-threads"
13847                 ol_link_threads=posix
13848         fi
13849 fi
13850
13851
13852                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13853 if test "$ol_link_threads" = no ; then
13854         # try -lpthreads -lmach -lexc -lc_r
13855         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13856 echo "configure:13857: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13857 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13858   echo $ac_n "(cached) $ac_c" 1>&6
13859 else
13860   
13861                 # save the flags
13862                 ol_LIBS="$LIBS"
13863                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13864
13865                 if test "$cross_compiling" = yes; then
13866   cat > conftest.$ac_ext <<EOF
13867 #line 13868 "configure"
13868 #include "confdefs.h"
13869 /* pthread test headers */
13870 #include <pthread.h>
13871 #if HAVE_PTHREADS < 7
13872 #include <errno.h>
13873 #endif
13874 #ifndef NULL
13875 #define NULL (void*)0
13876 #endif
13877
13878 static void *task(p)
13879         void *p;
13880 {
13881         return (void *) (p == NULL);
13882 }
13883
13884 int main() {
13885
13886         /* pthread test function */
13887 #ifndef PTHREAD_CREATE_DETACHED
13888 #define PTHREAD_CREATE_DETACHED 1
13889 #endif
13890         pthread_t t;
13891         int status;
13892         int detach = PTHREAD_CREATE_DETACHED;
13893
13894 #if HAVE_PTHREADS > 4
13895         /* Final pthreads */
13896         pthread_attr_t attr;
13897
13898         status = pthread_attr_init(&attr);
13899         if( status ) return status;
13900
13901 #if HAVE_PTHREADS < 7
13902         status = pthread_attr_setdetachstate(&attr, &detach);
13903         if( status < 0 ) status = errno;
13904 #else
13905         status = pthread_attr_setdetachstate(&attr, detach);
13906 #endif
13907         if( status ) return status;
13908         status = pthread_create( &t, &attr, task, NULL );
13909 #if HAVE_PTHREADS < 7
13910         if( status < 0 ) status = errno;
13911 #endif
13912         if( status ) return status;
13913 #else
13914         /* Draft 4 pthreads */
13915         status = pthread_create( &t, pthread_attr_default, task, NULL );
13916         if( status ) return errno;
13917
13918         /* give thread a chance to complete */
13919         /* it should remain joinable and hence detachable */
13920         sleep( 1 );
13921
13922         status = pthread_detach( &t );
13923         if( status ) return errno;
13924 #endif
13925
13926 #ifdef HAVE_LINUX_THREADS
13927         pthread_kill_other_threads_np();
13928 #endif
13929
13930         return 0;
13931
13932 ; return 0; }
13933 EOF
13934 if { (eval echo configure:13935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13935   rm -rf conftest*
13936   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13937 else
13938   echo "configure: failed program was:" >&5
13939   cat conftest.$ac_ext >&5
13940   rm -rf conftest*
13941   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13942 fi
13943 rm -f conftest*
13944 else
13945   cat > conftest.$ac_ext <<EOF
13946 #line 13947 "configure"
13947 #include "confdefs.h"
13948 /* pthread test headers */
13949 #include <pthread.h>
13950 #if HAVE_PTHREADS < 7
13951 #include <errno.h>
13952 #endif
13953 #ifndef NULL
13954 #define NULL (void*)0
13955 #endif
13956
13957 static void *task(p)
13958         void *p;
13959 {
13960         return (void *) (p == NULL);
13961 }
13962
13963
13964 int main(argc, argv)
13965         int argc;
13966         char **argv;
13967 {
13968
13969         /* pthread test function */
13970 #ifndef PTHREAD_CREATE_DETACHED
13971 #define PTHREAD_CREATE_DETACHED 1
13972 #endif
13973         pthread_t t;
13974         int status;
13975         int detach = PTHREAD_CREATE_DETACHED;
13976
13977 #if HAVE_PTHREADS > 4
13978         /* Final pthreads */
13979         pthread_attr_t attr;
13980
13981         status = pthread_attr_init(&attr);
13982         if( status ) return status;
13983
13984 #if HAVE_PTHREADS < 7
13985         status = pthread_attr_setdetachstate(&attr, &detach);
13986         if( status < 0 ) status = errno;
13987 #else
13988         status = pthread_attr_setdetachstate(&attr, detach);
13989 #endif
13990         if( status ) return status;
13991         status = pthread_create( &t, &attr, task, NULL );
13992 #if HAVE_PTHREADS < 7
13993         if( status < 0 ) status = errno;
13994 #endif
13995         if( status ) return status;
13996 #else
13997         /* Draft 4 pthreads */
13998         status = pthread_create( &t, pthread_attr_default, task, NULL );
13999         if( status ) return errno;
14000
14001         /* give thread a chance to complete */
14002         /* it should remain joinable and hence detachable */
14003         sleep( 1 );
14004
14005         status = pthread_detach( &t );
14006         if( status ) return errno;
14007 #endif
14008
14009 #ifdef HAVE_LINUX_THREADS
14010         pthread_kill_other_threads_np();
14011 #endif
14012
14013         return 0;
14014
14015 }
14016
14017 EOF
14018 if { (eval echo configure:14019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14019 then
14020   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14021 else
14022   echo "configure: failed program was:" >&5
14023   cat conftest.$ac_ext >&5
14024   rm -fr conftest*
14025   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14026 fi
14027 rm -fr conftest*
14028 fi
14029
14030
14031                 # restore the LIBS
14032                 LIBS="$ol_LIBS"
14033         
14034 fi
14035
14036 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14037
14038         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14039                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14040                 ol_link_threads=posix
14041         fi
14042 fi
14043
14044                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14045 if test "$ol_link_threads" = no ; then
14046         # try -lpthreads -lmach -lexc
14047         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14048 echo "configure:14049: checking for pthread link with -lpthreads -lmach -lexc" >&5
14049 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14050   echo $ac_n "(cached) $ac_c" 1>&6
14051 else
14052   
14053                 # save the flags
14054                 ol_LIBS="$LIBS"
14055                 LIBS="-lpthreads -lmach -lexc $LIBS"
14056
14057                 if test "$cross_compiling" = yes; then
14058   cat > conftest.$ac_ext <<EOF
14059 #line 14060 "configure"
14060 #include "confdefs.h"
14061 /* pthread test headers */
14062 #include <pthread.h>
14063 #if HAVE_PTHREADS < 7
14064 #include <errno.h>
14065 #endif
14066 #ifndef NULL
14067 #define NULL (void*)0
14068 #endif
14069
14070 static void *task(p)
14071         void *p;
14072 {
14073         return (void *) (p == NULL);
14074 }
14075
14076 int main() {
14077
14078         /* pthread test function */
14079 #ifndef PTHREAD_CREATE_DETACHED
14080 #define PTHREAD_CREATE_DETACHED 1
14081 #endif
14082         pthread_t t;
14083         int status;
14084         int detach = PTHREAD_CREATE_DETACHED;
14085
14086 #if HAVE_PTHREADS > 4
14087         /* Final pthreads */
14088         pthread_attr_t attr;
14089
14090         status = pthread_attr_init(&attr);
14091         if( status ) return status;
14092
14093 #if HAVE_PTHREADS < 7
14094         status = pthread_attr_setdetachstate(&attr, &detach);
14095         if( status < 0 ) status = errno;
14096 #else
14097         status = pthread_attr_setdetachstate(&attr, detach);
14098 #endif
14099         if( status ) return status;
14100         status = pthread_create( &t, &attr, task, NULL );
14101 #if HAVE_PTHREADS < 7
14102         if( status < 0 ) status = errno;
14103 #endif
14104         if( status ) return status;
14105 #else
14106         /* Draft 4 pthreads */
14107         status = pthread_create( &t, pthread_attr_default, task, NULL );
14108         if( status ) return errno;
14109
14110         /* give thread a chance to complete */
14111         /* it should remain joinable and hence detachable */
14112         sleep( 1 );
14113
14114         status = pthread_detach( &t );
14115         if( status ) return errno;
14116 #endif
14117
14118 #ifdef HAVE_LINUX_THREADS
14119         pthread_kill_other_threads_np();
14120 #endif
14121
14122         return 0;
14123
14124 ; return 0; }
14125 EOF
14126 if { (eval echo configure:14127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14127   rm -rf conftest*
14128   ol_cv_pthread_lpthreads_lmach_lexc=yes
14129 else
14130   echo "configure: failed program was:" >&5
14131   cat conftest.$ac_ext >&5
14132   rm -rf conftest*
14133   ol_cv_pthread_lpthreads_lmach_lexc=no
14134 fi
14135 rm -f conftest*
14136 else
14137   cat > conftest.$ac_ext <<EOF
14138 #line 14139 "configure"
14139 #include "confdefs.h"
14140 /* pthread test headers */
14141 #include <pthread.h>
14142 #if HAVE_PTHREADS < 7
14143 #include <errno.h>
14144 #endif
14145 #ifndef NULL
14146 #define NULL (void*)0
14147 #endif
14148
14149 static void *task(p)
14150         void *p;
14151 {
14152         return (void *) (p == NULL);
14153 }
14154
14155
14156 int main(argc, argv)
14157         int argc;
14158         char **argv;
14159 {
14160
14161         /* pthread test function */
14162 #ifndef PTHREAD_CREATE_DETACHED
14163 #define PTHREAD_CREATE_DETACHED 1
14164 #endif
14165         pthread_t t;
14166         int status;
14167         int detach = PTHREAD_CREATE_DETACHED;
14168
14169 #if HAVE_PTHREADS > 4
14170         /* Final pthreads */
14171         pthread_attr_t attr;
14172
14173         status = pthread_attr_init(&attr);
14174         if( status ) return status;
14175
14176 #if HAVE_PTHREADS < 7
14177         status = pthread_attr_setdetachstate(&attr, &detach);
14178         if( status < 0 ) status = errno;
14179 #else
14180         status = pthread_attr_setdetachstate(&attr, detach);
14181 #endif
14182         if( status ) return status;
14183         status = pthread_create( &t, &attr, task, NULL );
14184 #if HAVE_PTHREADS < 7
14185         if( status < 0 ) status = errno;
14186 #endif
14187         if( status ) return status;
14188 #else
14189         /* Draft 4 pthreads */
14190         status = pthread_create( &t, pthread_attr_default, task, NULL );
14191         if( status ) return errno;
14192
14193         /* give thread a chance to complete */
14194         /* it should remain joinable and hence detachable */
14195         sleep( 1 );
14196
14197         status = pthread_detach( &t );
14198         if( status ) return errno;
14199 #endif
14200
14201 #ifdef HAVE_LINUX_THREADS
14202         pthread_kill_other_threads_np();
14203 #endif
14204
14205         return 0;
14206
14207 }
14208
14209 EOF
14210 if { (eval echo configure:14211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14211 then
14212   ol_cv_pthread_lpthreads_lmach_lexc=yes
14213 else
14214   echo "configure: failed program was:" >&5
14215   cat conftest.$ac_ext >&5
14216   rm -fr conftest*
14217   ol_cv_pthread_lpthreads_lmach_lexc=no
14218 fi
14219 rm -fr conftest*
14220 fi
14221
14222
14223                 # restore the LIBS
14224                 LIBS="$ol_LIBS"
14225         
14226 fi
14227
14228 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14229
14230         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14231                 ol_link_pthreads="-lpthreads -lmach -lexc"
14232                 ol_link_threads=posix
14233         fi
14234 fi
14235
14236                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14237 if test "$ol_link_threads" = no ; then
14238         # try -lpthreads -lexc
14239         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14240 echo "configure:14241: checking for pthread link with -lpthreads -lexc" >&5
14241 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14242   echo $ac_n "(cached) $ac_c" 1>&6
14243 else
14244   
14245                 # save the flags
14246                 ol_LIBS="$LIBS"
14247                 LIBS="-lpthreads -lexc $LIBS"
14248
14249                 if test "$cross_compiling" = yes; then
14250   cat > conftest.$ac_ext <<EOF
14251 #line 14252 "configure"
14252 #include "confdefs.h"
14253 /* pthread test headers */
14254 #include <pthread.h>
14255 #if HAVE_PTHREADS < 7
14256 #include <errno.h>
14257 #endif
14258 #ifndef NULL
14259 #define NULL (void*)0
14260 #endif
14261
14262 static void *task(p)
14263         void *p;
14264 {
14265         return (void *) (p == NULL);
14266 }
14267
14268 int main() {
14269
14270         /* pthread test function */
14271 #ifndef PTHREAD_CREATE_DETACHED
14272 #define PTHREAD_CREATE_DETACHED 1
14273 #endif
14274         pthread_t t;
14275         int status;
14276         int detach = PTHREAD_CREATE_DETACHED;
14277
14278 #if HAVE_PTHREADS > 4
14279         /* Final pthreads */
14280         pthread_attr_t attr;
14281
14282         status = pthread_attr_init(&attr);
14283         if( status ) return status;
14284
14285 #if HAVE_PTHREADS < 7
14286         status = pthread_attr_setdetachstate(&attr, &detach);
14287         if( status < 0 ) status = errno;
14288 #else
14289         status = pthread_attr_setdetachstate(&attr, detach);
14290 #endif
14291         if( status ) return status;
14292         status = pthread_create( &t, &attr, task, NULL );
14293 #if HAVE_PTHREADS < 7
14294         if( status < 0 ) status = errno;
14295 #endif
14296         if( status ) return status;
14297 #else
14298         /* Draft 4 pthreads */
14299         status = pthread_create( &t, pthread_attr_default, task, NULL );
14300         if( status ) return errno;
14301
14302         /* give thread a chance to complete */
14303         /* it should remain joinable and hence detachable */
14304         sleep( 1 );
14305
14306         status = pthread_detach( &t );
14307         if( status ) return errno;
14308 #endif
14309
14310 #ifdef HAVE_LINUX_THREADS
14311         pthread_kill_other_threads_np();
14312 #endif
14313
14314         return 0;
14315
14316 ; return 0; }
14317 EOF
14318 if { (eval echo configure:14319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14319   rm -rf conftest*
14320   ol_cv_pthread_lpthreads_lexc=yes
14321 else
14322   echo "configure: failed program was:" >&5
14323   cat conftest.$ac_ext >&5
14324   rm -rf conftest*
14325   ol_cv_pthread_lpthreads_lexc=no
14326 fi
14327 rm -f conftest*
14328 else
14329   cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 /* pthread test headers */
14333 #include <pthread.h>
14334 #if HAVE_PTHREADS < 7
14335 #include <errno.h>
14336 #endif
14337 #ifndef NULL
14338 #define NULL (void*)0
14339 #endif
14340
14341 static void *task(p)
14342         void *p;
14343 {
14344         return (void *) (p == NULL);
14345 }
14346
14347
14348 int main(argc, argv)
14349         int argc;
14350         char **argv;
14351 {
14352
14353         /* pthread test function */
14354 #ifndef PTHREAD_CREATE_DETACHED
14355 #define PTHREAD_CREATE_DETACHED 1
14356 #endif
14357         pthread_t t;
14358         int status;
14359         int detach = PTHREAD_CREATE_DETACHED;
14360
14361 #if HAVE_PTHREADS > 4
14362         /* Final pthreads */
14363         pthread_attr_t attr;
14364
14365         status = pthread_attr_init(&attr);
14366         if( status ) return status;
14367
14368 #if HAVE_PTHREADS < 7
14369         status = pthread_attr_setdetachstate(&attr, &detach);
14370         if( status < 0 ) status = errno;
14371 #else
14372         status = pthread_attr_setdetachstate(&attr, detach);
14373 #endif
14374         if( status ) return status;
14375         status = pthread_create( &t, &attr, task, NULL );
14376 #if HAVE_PTHREADS < 7
14377         if( status < 0 ) status = errno;
14378 #endif
14379         if( status ) return status;
14380 #else
14381         /* Draft 4 pthreads */
14382         status = pthread_create( &t, pthread_attr_default, task, NULL );
14383         if( status ) return errno;
14384
14385         /* give thread a chance to complete */
14386         /* it should remain joinable and hence detachable */
14387         sleep( 1 );
14388
14389         status = pthread_detach( &t );
14390         if( status ) return errno;
14391 #endif
14392
14393 #ifdef HAVE_LINUX_THREADS
14394         pthread_kill_other_threads_np();
14395 #endif
14396
14397         return 0;
14398
14399 }
14400
14401 EOF
14402 if { (eval echo configure:14403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14403 then
14404   ol_cv_pthread_lpthreads_lexc=yes
14405 else
14406   echo "configure: failed program was:" >&5
14407   cat conftest.$ac_ext >&5
14408   rm -fr conftest*
14409   ol_cv_pthread_lpthreads_lexc=no
14410 fi
14411 rm -fr conftest*
14412 fi
14413
14414
14415                 # restore the LIBS
14416                 LIBS="$ol_LIBS"
14417         
14418 fi
14419
14420 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14421
14422         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14423                 ol_link_pthreads="-lpthreads -lexc"
14424                 ol_link_threads=posix
14425         fi
14426 fi
14427
14428
14429                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14430 if test "$ol_link_threads" = no ; then
14431         # try -lpthreads
14432         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14433 echo "configure:14434: checking for pthread link with -lpthreads" >&5
14434 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14435   echo $ac_n "(cached) $ac_c" 1>&6
14436 else
14437   
14438                 # save the flags
14439                 ol_LIBS="$LIBS"
14440                 LIBS="-lpthreads $LIBS"
14441
14442                 if test "$cross_compiling" = yes; then
14443   cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446 /* pthread test headers */
14447 #include <pthread.h>
14448 #if HAVE_PTHREADS < 7
14449 #include <errno.h>
14450 #endif
14451 #ifndef NULL
14452 #define NULL (void*)0
14453 #endif
14454
14455 static void *task(p)
14456         void *p;
14457 {
14458         return (void *) (p == NULL);
14459 }
14460
14461 int main() {
14462
14463         /* pthread test function */
14464 #ifndef PTHREAD_CREATE_DETACHED
14465 #define PTHREAD_CREATE_DETACHED 1
14466 #endif
14467         pthread_t t;
14468         int status;
14469         int detach = PTHREAD_CREATE_DETACHED;
14470
14471 #if HAVE_PTHREADS > 4
14472         /* Final pthreads */
14473         pthread_attr_t attr;
14474
14475         status = pthread_attr_init(&attr);
14476         if( status ) return status;
14477
14478 #if HAVE_PTHREADS < 7
14479         status = pthread_attr_setdetachstate(&attr, &detach);
14480         if( status < 0 ) status = errno;
14481 #else
14482         status = pthread_attr_setdetachstate(&attr, detach);
14483 #endif
14484         if( status ) return status;
14485         status = pthread_create( &t, &attr, task, NULL );
14486 #if HAVE_PTHREADS < 7
14487         if( status < 0 ) status = errno;
14488 #endif
14489         if( status ) return status;
14490 #else
14491         /* Draft 4 pthreads */
14492         status = pthread_create( &t, pthread_attr_default, task, NULL );
14493         if( status ) return errno;
14494
14495         /* give thread a chance to complete */
14496         /* it should remain joinable and hence detachable */
14497         sleep( 1 );
14498
14499         status = pthread_detach( &t );
14500         if( status ) return errno;
14501 #endif
14502
14503 #ifdef HAVE_LINUX_THREADS
14504         pthread_kill_other_threads_np();
14505 #endif
14506
14507         return 0;
14508
14509 ; return 0; }
14510 EOF
14511 if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14512   rm -rf conftest*
14513   ol_cv_pthread_lib_lpthreads=yes
14514 else
14515   echo "configure: failed program was:" >&5
14516   cat conftest.$ac_ext >&5
14517   rm -rf conftest*
14518   ol_cv_pthread_lib_lpthreads=no
14519 fi
14520 rm -f conftest*
14521 else
14522   cat > conftest.$ac_ext <<EOF
14523 #line 14524 "configure"
14524 #include "confdefs.h"
14525 /* pthread test headers */
14526 #include <pthread.h>
14527 #if HAVE_PTHREADS < 7
14528 #include <errno.h>
14529 #endif
14530 #ifndef NULL
14531 #define NULL (void*)0
14532 #endif
14533
14534 static void *task(p)
14535         void *p;
14536 {
14537         return (void *) (p == NULL);
14538 }
14539
14540
14541 int main(argc, argv)
14542         int argc;
14543         char **argv;
14544 {
14545
14546         /* pthread test function */
14547 #ifndef PTHREAD_CREATE_DETACHED
14548 #define PTHREAD_CREATE_DETACHED 1
14549 #endif
14550         pthread_t t;
14551         int status;
14552         int detach = PTHREAD_CREATE_DETACHED;
14553
14554 #if HAVE_PTHREADS > 4
14555         /* Final pthreads */
14556         pthread_attr_t attr;
14557
14558         status = pthread_attr_init(&attr);
14559         if( status ) return status;
14560
14561 #if HAVE_PTHREADS < 7
14562         status = pthread_attr_setdetachstate(&attr, &detach);
14563         if( status < 0 ) status = errno;
14564 #else
14565         status = pthread_attr_setdetachstate(&attr, detach);
14566 #endif
14567         if( status ) return status;
14568         status = pthread_create( &t, &attr, task, NULL );
14569 #if HAVE_PTHREADS < 7
14570         if( status < 0 ) status = errno;
14571 #endif
14572         if( status ) return status;
14573 #else
14574         /* Draft 4 pthreads */
14575         status = pthread_create( &t, pthread_attr_default, task, NULL );
14576         if( status ) return errno;
14577
14578         /* give thread a chance to complete */
14579         /* it should remain joinable and hence detachable */
14580         sleep( 1 );
14581
14582         status = pthread_detach( &t );
14583         if( status ) return errno;
14584 #endif
14585
14586 #ifdef HAVE_LINUX_THREADS
14587         pthread_kill_other_threads_np();
14588 #endif
14589
14590         return 0;
14591
14592 }
14593
14594 EOF
14595 if { (eval echo configure:14596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14596 then
14597   ol_cv_pthread_lib_lpthreads=yes
14598 else
14599   echo "configure: failed program was:" >&5
14600   cat conftest.$ac_ext >&5
14601   rm -fr conftest*
14602   ol_cv_pthread_lib_lpthreads=no
14603 fi
14604 rm -fr conftest*
14605 fi
14606
14607
14608                 # restore the LIBS
14609                 LIBS="$ol_LIBS"
14610         
14611 fi
14612
14613 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14614
14615         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14616                 ol_link_pthreads="-lpthreads"
14617                 ol_link_threads=posix
14618         fi
14619 fi
14620
14621
14622                 if test $ol_link_threads != no ; then
14623                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14624
14625                                                 save_CPPFLAGS="$CPPFLAGS"
14626                         save_LIBS="$LIBS"
14627                         LIBS="$LTHREAD_LIBS $LIBS"
14628
14629                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14630 do
14631 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14632 echo "configure:14633: checking for $ac_func" >&5
14633 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14634   echo $ac_n "(cached) $ac_c" 1>&6
14635 else
14636   cat > conftest.$ac_ext <<EOF
14637 #line 14638 "configure"
14638 #include "confdefs.h"
14639 /* System header to define __stub macros and hopefully few prototypes,
14640     which can conflict with char $ac_func(); below.  */
14641 #include <assert.h>
14642 /* Override any gcc2 internal prototype to avoid an error.  */
14643 /* We use char because int might match the return type of a gcc2
14644     builtin and then its argument prototype would still apply.  */
14645 char $ac_func();
14646 char (*f)();
14647
14648 int main() {
14649
14650 /* The GNU C library defines this for functions which it implements
14651     to always fail with ENOSYS.  Some functions are actually named
14652     something starting with __ and the normal name is an alias.  */
14653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14654 choke me
14655 #else
14656 f = $ac_func;
14657 #endif
14658
14659 ; return 0; }
14660 EOF
14661 if { (eval echo configure:14662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14662   rm -rf conftest*
14663   eval "ac_cv_func_$ac_func=yes"
14664 else
14665   echo "configure: failed program was:" >&5
14666   cat conftest.$ac_ext >&5
14667   rm -rf conftest*
14668   eval "ac_cv_func_$ac_func=no"
14669 fi
14670 rm -f conftest*
14671 fi
14672
14673 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14674   echo "$ac_t""yes" 1>&6
14675     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14676   cat >> confdefs.h <<EOF
14677 #define $ac_tr_func 1
14678 EOF
14679  
14680 else
14681   echo "$ac_t""no" 1>&6
14682 fi
14683 done
14684
14685
14686                         if test $ac_cv_func_sched_yield = no -a \
14687                                 $ac_cv_func_pthread_yield = no -a \
14688                                 $ac_cv_func_thr_yield = no ; then
14689                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14690 echo "configure:14691: checking for sched_yield in -lrt" >&5
14691 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14692 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14693   echo $ac_n "(cached) $ac_c" 1>&6
14694 else
14695   ac_save_LIBS="$LIBS"
14696 LIBS="-lrt  $LIBS"
14697 cat > conftest.$ac_ext <<EOF
14698 #line 14699 "configure"
14699 #include "confdefs.h"
14700 /* Override any gcc2 internal prototype to avoid an error.  */
14701 /* We use char because int might match the return type of a gcc2
14702     builtin and then its argument prototype would still apply.  */
14703 char sched_yield();
14704
14705 int main() {
14706 sched_yield()
14707 ; return 0; }
14708 EOF
14709 if { (eval echo configure:14710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14710   rm -rf conftest*
14711   eval "ac_cv_lib_$ac_lib_var=yes"
14712 else
14713   echo "configure: failed program was:" >&5
14714   cat conftest.$ac_ext >&5
14715   rm -rf conftest*
14716   eval "ac_cv_lib_$ac_lib_var=no"
14717 fi
14718 rm -f conftest*
14719 LIBS="$ac_save_LIBS"
14720
14721 fi
14722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14723   echo "$ac_t""yes" 1>&6
14724   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14725                                         cat >> confdefs.h <<\EOF
14726 #define HAVE_SCHED_YIELD 1
14727 EOF
14728
14729                                         ac_cv_func_sched_yield=yes
14730 else
14731   echo "$ac_t""no" 1>&6
14732 ac_cv_func_sched_yield=no
14733 fi
14734
14735                         fi
14736                         if test $ac_cv_func_sched_yield = no -a \
14737                                 $ac_cv_func_pthread_yield = no -a \
14738                                 "$ac_cv_func_thr_yield" = no ; then
14739                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14740                         fi
14741
14742                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14743 do
14744 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14745 echo "configure:14746: checking for $ac_func" >&5
14746 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14747   echo $ac_n "(cached) $ac_c" 1>&6
14748 else
14749   cat > conftest.$ac_ext <<EOF
14750 #line 14751 "configure"
14751 #include "confdefs.h"
14752 /* System header to define __stub macros and hopefully few prototypes,
14753     which can conflict with char $ac_func(); below.  */
14754 #include <assert.h>
14755 /* Override any gcc2 internal prototype to avoid an error.  */
14756 /* We use char because int might match the return type of a gcc2
14757     builtin and then its argument prototype would still apply.  */
14758 char $ac_func();
14759 char (*f)();
14760
14761 int main() {
14762
14763 /* The GNU C library defines this for functions which it implements
14764     to always fail with ENOSYS.  Some functions are actually named
14765     something starting with __ and the normal name is an alias.  */
14766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14767 choke me
14768 #else
14769 f = $ac_func;
14770 #endif
14771
14772 ; return 0; }
14773 EOF
14774 if { (eval echo configure:14775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14775   rm -rf conftest*
14776   eval "ac_cv_func_$ac_func=yes"
14777 else
14778   echo "configure: failed program was:" >&5
14779   cat conftest.$ac_ext >&5
14780   rm -rf conftest*
14781   eval "ac_cv_func_$ac_func=no"
14782 fi
14783 rm -f conftest*
14784 fi
14785
14786 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14787   echo "$ac_t""yes" 1>&6
14788     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14789   cat >> confdefs.h <<EOF
14790 #define $ac_tr_func 1
14791 EOF
14792  
14793 else
14794   echo "$ac_t""no" 1>&6
14795 fi
14796 done
14797
14798
14799                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14800 echo "configure:14801: checking for pthread_detach with <pthread.h>" >&5
14801 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14802   echo $ac_n "(cached) $ac_c" 1>&6
14803 else
14804   
14805                                                                 cat > conftest.$ac_ext <<EOF
14806 #line 14807 "configure"
14807 #include "confdefs.h"
14808
14809 #include <pthread.h>
14810 #ifndef NULL
14811 #define NULL (void*)0
14812 #endif
14813
14814 int main() {
14815 pthread_detach(NULL);
14816 ; return 0; }
14817 EOF
14818 if { (eval echo configure:14819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14819   rm -rf conftest*
14820   ol_cv_func_pthread_detach=yes
14821 else
14822   echo "configure: failed program was:" >&5
14823   cat conftest.$ac_ext >&5
14824   rm -rf conftest*
14825   ol_cv_func_pthread_detach=no
14826 fi
14827 rm -f conftest*
14828                         
14829 fi
14830
14831 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14832
14833                         if test $ol_cv_func_pthread_detach = no ; then
14834                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14835                         fi
14836
14837                         cat >> confdefs.h <<\EOF
14838 #define HAVE_PTHREAD_DETACH 1
14839 EOF
14840
14841
14842                                                 for ac_func in \
14843                                 pthread_setconcurrency \
14844                                 pthread_getconcurrency \
14845                                 thr_setconcurrency \
14846                                 thr_getconcurrency \
14847                         
14848 do
14849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14850 echo "configure:14851: checking for $ac_func" >&5
14851 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14852   echo $ac_n "(cached) $ac_c" 1>&6
14853 else
14854   cat > conftest.$ac_ext <<EOF
14855 #line 14856 "configure"
14856 #include "confdefs.h"
14857 /* System header to define __stub macros and hopefully few prototypes,
14858     which can conflict with char $ac_func(); below.  */
14859 #include <assert.h>
14860 /* Override any gcc2 internal prototype to avoid an error.  */
14861 /* We use char because int might match the return type of a gcc2
14862     builtin and then its argument prototype would still apply.  */
14863 char $ac_func();
14864 char (*f)();
14865
14866 int main() {
14867
14868 /* The GNU C library defines this for functions which it implements
14869     to always fail with ENOSYS.  Some functions are actually named
14870     something starting with __ and the normal name is an alias.  */
14871 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14872 choke me
14873 #else
14874 f = $ac_func;
14875 #endif
14876
14877 ; return 0; }
14878 EOF
14879 if { (eval echo configure:14880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14880   rm -rf conftest*
14881   eval "ac_cv_func_$ac_func=yes"
14882 else
14883   echo "configure: failed program was:" >&5
14884   cat conftest.$ac_ext >&5
14885   rm -rf conftest*
14886   eval "ac_cv_func_$ac_func=no"
14887 fi
14888 rm -f conftest*
14889 fi
14890
14891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14892   echo "$ac_t""yes" 1>&6
14893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14894   cat >> confdefs.h <<EOF
14895 #define $ac_tr_func 1
14896 EOF
14897  
14898 else
14899   echo "$ac_t""no" 1>&6
14900 fi
14901 done
14902
14903
14904                         
14905         for ac_func in pthread_kill_other_threads_np
14906 do
14907 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14908 echo "configure:14909: checking for $ac_func" >&5
14909 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14910   echo $ac_n "(cached) $ac_c" 1>&6
14911 else
14912   cat > conftest.$ac_ext <<EOF
14913 #line 14914 "configure"
14914 #include "confdefs.h"
14915 /* System header to define __stub macros and hopefully few prototypes,
14916     which can conflict with char $ac_func(); below.  */
14917 #include <assert.h>
14918 /* Override any gcc2 internal prototype to avoid an error.  */
14919 /* We use char because int might match the return type of a gcc2
14920     builtin and then its argument prototype would still apply.  */
14921 char $ac_func();
14922 char (*f)();
14923
14924 int main() {
14925
14926 /* The GNU C library defines this for functions which it implements
14927     to always fail with ENOSYS.  Some functions are actually named
14928     something starting with __ and the normal name is an alias.  */
14929 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14930 choke me
14931 #else
14932 f = $ac_func;
14933 #endif
14934
14935 ; return 0; }
14936 EOF
14937 if { (eval echo configure:14938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14938   rm -rf conftest*
14939   eval "ac_cv_func_$ac_func=yes"
14940 else
14941   echo "configure: failed program was:" >&5
14942   cat conftest.$ac_ext >&5
14943   rm -rf conftest*
14944   eval "ac_cv_func_$ac_func=no"
14945 fi
14946 rm -f conftest*
14947 fi
14948
14949 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14950   echo "$ac_t""yes" 1>&6
14951     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14952   cat >> confdefs.h <<EOF
14953 #define $ac_tr_func 1
14954 EOF
14955  
14956 else
14957   echo "$ac_t""no" 1>&6
14958 fi
14959 done
14960
14961         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14962 echo "configure:14963: checking for LinuxThreads implementation" >&5
14963 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14964   echo $ac_n "(cached) $ac_c" 1>&6
14965 else
14966   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14967 fi
14968
14969 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14970
14971                         
14972         
14973         
14974         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14975 echo "configure:14976: checking for LinuxThreads consistency" >&5
14976 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14977   echo $ac_n "(cached) $ac_c" 1>&6
14978 else
14979   
14980                 if test $ol_cv_header_linux_threads = yes -a \
14981                         $ol_cv_sys_linux_threads = yes; then
14982                         ol_cv_linux_threads=yes
14983                 elif test $ol_cv_header_linux_threads = no -a \
14984                         $ol_cv_sys_linux_threads = no; then
14985                         ol_cv_linux_threads=no
14986                 else
14987                         ol_cv_linux_threads=error
14988                 fi
14989         
14990 fi
14991
14992 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14993
14994
14995                         if test $ol_cv_linux_threads = error; then
14996                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14997                         fi
14998
14999                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15000 echo "configure:15001: checking if pthread_create() works" >&5
15001 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15002   echo $ac_n "(cached) $ac_c" 1>&6
15003 else
15004   
15005                         if test "$cross_compiling" = yes; then
15006                                 ol_cv_pthread_create_works=yes
15007 else
15008   cat > conftest.$ac_ext <<EOF
15009 #line 15010 "configure"
15010 #include "confdefs.h"
15011 /* pthread test headers */
15012 #include <pthread.h>
15013 #if HAVE_PTHREADS < 7
15014 #include <errno.h>
15015 #endif
15016 #ifndef NULL
15017 #define NULL (void*)0
15018 #endif
15019
15020 static void *task(p)
15021         void *p;
15022 {
15023         return (void *) (p == NULL);
15024 }
15025
15026
15027 int main(argc, argv)
15028         int argc;
15029         char **argv;
15030 {
15031
15032         /* pthread test function */
15033 #ifndef PTHREAD_CREATE_DETACHED
15034 #define PTHREAD_CREATE_DETACHED 1
15035 #endif
15036         pthread_t t;
15037         int status;
15038         int detach = PTHREAD_CREATE_DETACHED;
15039
15040 #if HAVE_PTHREADS > 4
15041         /* Final pthreads */
15042         pthread_attr_t attr;
15043
15044         status = pthread_attr_init(&attr);
15045         if( status ) return status;
15046
15047 #if HAVE_PTHREADS < 7
15048         status = pthread_attr_setdetachstate(&attr, &detach);
15049         if( status < 0 ) status = errno;
15050 #else
15051         status = pthread_attr_setdetachstate(&attr, detach);
15052 #endif
15053         if( status ) return status;
15054         status = pthread_create( &t, &attr, task, NULL );
15055 #if HAVE_PTHREADS < 7
15056         if( status < 0 ) status = errno;
15057 #endif
15058         if( status ) return status;
15059 #else
15060         /* Draft 4 pthreads */
15061         status = pthread_create( &t, pthread_attr_default, task, NULL );
15062         if( status ) return errno;
15063
15064         /* give thread a chance to complete */
15065         /* it should remain joinable and hence detachable */
15066         sleep( 1 );
15067
15068         status = pthread_detach( &t );
15069         if( status ) return errno;
15070 #endif
15071
15072 #ifdef HAVE_LINUX_THREADS
15073         pthread_kill_other_threads_np();
15074 #endif
15075
15076         return 0;
15077
15078 }
15079
15080 EOF
15081 if { (eval echo configure:15082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15082 then
15083   ol_cv_pthread_create_works=yes
15084 else
15085   echo "configure: failed program was:" >&5
15086   cat conftest.$ac_ext >&5
15087   rm -fr conftest*
15088   ol_cv_pthread_create_works=no
15089 fi
15090 rm -fr conftest*
15091 fi
15092
15093 fi
15094
15095 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15096
15097                         if test $ol_cv_pthread_create_works = no ; then
15098                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15099                         fi
15100
15101                                                 if test $ol_with_yielding_select = auto ; then
15102                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15103 echo "configure:15104: checking if select yields when using pthreads" >&5
15104 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15105   echo $ac_n "(cached) $ac_c" 1>&6
15106 else
15107   
15108                                 if test "$cross_compiling" = yes; then
15109   ol_cv_pthread_select_yields=cross
15110 else
15111   cat > conftest.$ac_ext <<EOF
15112 #line 15113 "configure"
15113 #include "confdefs.h"
15114
15115 #include <sys/types.h>
15116 #include <sys/time.h>
15117 #include <unistd.h>
15118 #include <pthread.h>
15119 #ifndef NULL
15120 #define NULL (void*) 0
15121 #endif
15122
15123 static int fildes[2];
15124
15125 static void *task(p)
15126         void *p;
15127 {
15128         int i;
15129         struct timeval tv;
15130
15131         fd_set rfds;
15132
15133         tv.tv_sec=10;
15134         tv.tv_usec=0;
15135
15136         FD_ZERO(&rfds);
15137         FD_SET(fildes[0], &rfds);
15138
15139         /* we're not interested in any fds */
15140         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15141
15142         if(i < 0) {
15143                 perror("select");
15144                 exit(10);
15145         }
15146
15147         exit(0); /* if we exit here, the select blocked the whole process */
15148 }
15149
15150 int main(argc, argv)
15151         int argc;
15152         char **argv;
15153 {
15154         pthread_t t;
15155
15156         /* create a pipe to select */
15157         if(pipe(&fildes[0])) {
15158                 perror("select");
15159                 exit(1);
15160         }
15161
15162 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15163         (void) pthread_setconcurrency(2);
15164 #else
15165 #ifdef HAVE_THR_SETCONCURRENCY
15166         /* Set Solaris LWP concurrency to 2 */
15167         thr_setconcurrency(2);
15168 #endif
15169 #endif
15170
15171 #if HAVE_PTHREADS < 6
15172         pthread_create(&t, pthread_attr_default, task, NULL);
15173 #else
15174         pthread_create(&t, NULL, task, NULL);
15175 #endif
15176
15177         /* make sure task runs first */
15178 #if HAVE_THR_YIELD
15179         thr_yield();
15180 #elif defined( HAVE_SCHED_YIELD )
15181         sched_yield();
15182 #elif defined( HAVE_PTHREAD_YIELD )
15183         pthread_yield();
15184 #endif
15185
15186         exit(2);
15187 }
15188 EOF
15189 if { (eval echo configure:15190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15190 then
15191   ol_cv_pthread_select_yields=no
15192 else
15193   echo "configure: failed program was:" >&5
15194   cat conftest.$ac_ext >&5
15195   rm -fr conftest*
15196   ol_cv_pthread_select_yields=yes
15197 fi
15198 rm -fr conftest*
15199 fi
15200
15201 fi
15202
15203 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15204
15205                                 if test $ol_cv_pthread_select_yields = cross ; then
15206                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15207                                 fi
15208
15209                                 if test $ol_cv_pthread_select_yields = yes ; then
15210                                         ol_with_yielding_select=yes
15211                                 fi
15212                         fi
15213
15214                                                 CPPFLAGS="$save_CPPFLAGS"
15215                         LIBS="$save_LIBS"
15216                 else
15217                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15218                 fi
15219         fi
15220
15221         if test $ol_with_threads = posix ; then
15222                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15223         fi
15224 fi
15225
15226 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15227         -o $ol_with_threads = mach ; then
15228
15229                 for ac_hdr in mach/cthreads.h cthreads.h
15230 do
15231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15233 echo "configure:15234: checking for $ac_hdr" >&5
15234 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15235   echo $ac_n "(cached) $ac_c" 1>&6
15236 else
15237   cat > conftest.$ac_ext <<EOF
15238 #line 15239 "configure"
15239 #include "confdefs.h"
15240 #include <$ac_hdr>
15241 EOF
15242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15243 { (eval echo configure:15244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15245 if test -z "$ac_err"; then
15246   rm -rf conftest*
15247   eval "ac_cv_header_$ac_safe=yes"
15248 else
15249   echo "$ac_err" >&5
15250   echo "configure: failed program was:" >&5
15251   cat conftest.$ac_ext >&5
15252   rm -rf conftest*
15253   eval "ac_cv_header_$ac_safe=no"
15254 fi
15255 rm -f conftest*
15256 fi
15257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15258   echo "$ac_t""yes" 1>&6
15259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15260   cat >> confdefs.h <<EOF
15261 #define $ac_tr_hdr 1
15262 EOF
15263  
15264 else
15265   echo "$ac_t""no" 1>&6
15266 fi
15267 done
15268
15269         if test $ac_cv_header_mach_cthreads_h = yes ; then
15270                 ol_with_threads=found
15271
15272                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15273 echo "configure:15274: checking for cthread_fork" >&5
15274 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15275   echo $ac_n "(cached) $ac_c" 1>&6
15276 else
15277   cat > conftest.$ac_ext <<EOF
15278 #line 15279 "configure"
15279 #include "confdefs.h"
15280 /* System header to define __stub macros and hopefully few prototypes,
15281     which can conflict with char cthread_fork(); below.  */
15282 #include <assert.h>
15283 /* Override any gcc2 internal prototype to avoid an error.  */
15284 /* We use char because int might match the return type of a gcc2
15285     builtin and then its argument prototype would still apply.  */
15286 char cthread_fork();
15287 char (*f)();
15288
15289 int main() {
15290
15291 /* The GNU C library defines this for functions which it implements
15292     to always fail with ENOSYS.  Some functions are actually named
15293     something starting with __ and the normal name is an alias.  */
15294 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15295 choke me
15296 #else
15297 f = cthread_fork;
15298 #endif
15299
15300 ; return 0; }
15301 EOF
15302 if { (eval echo configure:15303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15303   rm -rf conftest*
15304   eval "ac_cv_func_cthread_fork=yes"
15305 else
15306   echo "configure: failed program was:" >&5
15307   cat conftest.$ac_ext >&5
15308   rm -rf conftest*
15309   eval "ac_cv_func_cthread_fork=no"
15310 fi
15311 rm -f conftest*
15312 fi
15313
15314 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15315   echo "$ac_t""yes" 1>&6
15316   ol_link_threads=yes
15317 else
15318   echo "$ac_t""no" 1>&6
15319 fi
15320
15321
15322                 if test $ol_link_threads = no ; then
15323                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15324 echo "configure:15325: checking for cthread_fork with -all_load" >&5
15325 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15326   echo $ac_n "(cached) $ac_c" 1>&6
15327 else
15328   
15329                                                                 save_LIBS="$LIBS"
15330                                 LIBS="-all_load $LIBS"
15331                                 cat > conftest.$ac_ext <<EOF
15332 #line 15333 "configure"
15333 #include "confdefs.h"
15334 #include <mach/cthreads.h>
15335 int main() {
15336
15337                                         cthread_fork((void *)0, (void *)0);
15338                                         
15339 ; return 0; }
15340 EOF
15341 if { (eval echo configure:15342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15342   rm -rf conftest*
15343   ol_cv_cthread_all_load=yes
15344 else
15345   echo "configure: failed program was:" >&5
15346   cat conftest.$ac_ext >&5
15347   rm -rf conftest*
15348   ol_cv_cthread_all_load=no
15349 fi
15350 rm -f conftest*
15351                                                                 LIBS="$save_LIBS"
15352                         
15353 fi
15354
15355 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15356
15357                         if test $ol_cv_cthread_all_load = yes ; then
15358                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15359                                 ol_link_threads=mach
15360                                 ol_with_threads=found
15361                         fi
15362                 fi
15363
15364         elif test $ac_cv_header_cthreads_h = yes ; then
15365                                 
15366                 ol_with_threads=found
15367  
15368                                 save_LIBS="$LIBS"
15369                 LIBS="$LIBS -lthreads"
15370                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15371 echo "configure:15372: checking for cthread_fork" >&5
15372 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15373   echo $ac_n "(cached) $ac_c" 1>&6
15374 else
15375   cat > conftest.$ac_ext <<EOF
15376 #line 15377 "configure"
15377 #include "confdefs.h"
15378 /* System header to define __stub macros and hopefully few prototypes,
15379     which can conflict with char cthread_fork(); below.  */
15380 #include <assert.h>
15381 /* Override any gcc2 internal prototype to avoid an error.  */
15382 /* We use char because int might match the return type of a gcc2
15383     builtin and then its argument prototype would still apply.  */
15384 char cthread_fork();
15385 char (*f)();
15386
15387 int main() {
15388
15389 /* The GNU C library defines this for functions which it implements
15390     to always fail with ENOSYS.  Some functions are actually named
15391     something starting with __ and the normal name is an alias.  */
15392 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15393 choke me
15394 #else
15395 f = cthread_fork;
15396 #endif
15397
15398 ; return 0; }
15399 EOF
15400 if { (eval echo configure:15401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15401   rm -rf conftest*
15402   eval "ac_cv_func_cthread_fork=yes"
15403 else
15404   echo "configure: failed program was:" >&5
15405   cat conftest.$ac_ext >&5
15406   rm -rf conftest*
15407   eval "ac_cv_func_cthread_fork=no"
15408 fi
15409 rm -f conftest*
15410 fi
15411
15412 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15413   echo "$ac_t""yes" 1>&6
15414   ol_link_threads=yes
15415 else
15416   echo "$ac_t""no" 1>&6
15417 fi
15418
15419                 LIBS="$save_LIBS"
15420
15421                 if test $ol_link_threads = yes ; then
15422                         LTHREAD_LIBS="-lthreads"
15423                         ol_link_threads=mach
15424                         ol_with_threads=found
15425                 else
15426                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15427                 fi
15428
15429         elif test $ol_with_threads = mach ; then
15430                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15431         fi
15432
15433         if test $ol_link_threads = mach ; then
15434                 cat >> confdefs.h <<\EOF
15435 #define HAVE_MACH_CTHREADS 1
15436 EOF
15437
15438         elif test $ol_with_threads = found ; then
15439                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15440         fi
15441 fi
15442
15443 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15444         -o $ol_with_threads = pth ; then
15445
15446         for ac_hdr in pth.h
15447 do
15448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15450 echo "configure:15451: checking for $ac_hdr" >&5
15451 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15452   echo $ac_n "(cached) $ac_c" 1>&6
15453 else
15454   cat > conftest.$ac_ext <<EOF
15455 #line 15456 "configure"
15456 #include "confdefs.h"
15457 #include <$ac_hdr>
15458 EOF
15459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15460 { (eval echo configure:15461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15462 if test -z "$ac_err"; then
15463   rm -rf conftest*
15464   eval "ac_cv_header_$ac_safe=yes"
15465 else
15466   echo "$ac_err" >&5
15467   echo "configure: failed program was:" >&5
15468   cat conftest.$ac_ext >&5
15469   rm -rf conftest*
15470   eval "ac_cv_header_$ac_safe=no"
15471 fi
15472 rm -f conftest*
15473 fi
15474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15475   echo "$ac_t""yes" 1>&6
15476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15477   cat >> confdefs.h <<EOF
15478 #define $ac_tr_hdr 1
15479 EOF
15480  
15481 else
15482   echo "$ac_t""no" 1>&6
15483 fi
15484 done
15485
15486
15487         if test $ac_cv_header_pth_h = yes ; then
15488                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15489 echo "configure:15490: checking for pth_version in -lpth" >&5
15490 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15491 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15492   echo $ac_n "(cached) $ac_c" 1>&6
15493 else
15494   ac_save_LIBS="$LIBS"
15495 LIBS="-lpth  $LIBS"
15496 cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499 /* Override any gcc2 internal prototype to avoid an error.  */
15500 /* We use char because int might match the return type of a gcc2
15501     builtin and then its argument prototype would still apply.  */
15502 char pth_version();
15503
15504 int main() {
15505 pth_version()
15506 ; return 0; }
15507 EOF
15508 if { (eval echo configure:15509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15509   rm -rf conftest*
15510   eval "ac_cv_lib_$ac_lib_var=yes"
15511 else
15512   echo "configure: failed program was:" >&5
15513   cat conftest.$ac_ext >&5
15514   rm -rf conftest*
15515   eval "ac_cv_lib_$ac_lib_var=no"
15516 fi
15517 rm -f conftest*
15518 LIBS="$ac_save_LIBS"
15519
15520 fi
15521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15522   echo "$ac_t""yes" 1>&6
15523   have_pth=yes
15524 else
15525   echo "$ac_t""no" 1>&6
15526 have_pth=no
15527 fi
15528
15529
15530                 if test $have_pth = yes ; then
15531                         cat >> confdefs.h <<\EOF
15532 #define HAVE_GNU_PTH 1
15533 EOF
15534
15535                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15536                         ol_link_threads=pth
15537                         ol_with_threads=found
15538
15539                         if test $ol_with_yielding_select = auto ; then
15540                                 ol_with_yielding_select=yes
15541                         fi
15542                 fi
15543         fi
15544 fi
15545
15546 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15547         -o $ol_with_threads = lwp ; then
15548
15549                 for ac_hdr in thread.h synch.h
15550 do
15551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15553 echo "configure:15554: checking for $ac_hdr" >&5
15554 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15555   echo $ac_n "(cached) $ac_c" 1>&6
15556 else
15557   cat > conftest.$ac_ext <<EOF
15558 #line 15559 "configure"
15559 #include "confdefs.h"
15560 #include <$ac_hdr>
15561 EOF
15562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15563 { (eval echo configure:15564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15565 if test -z "$ac_err"; then
15566   rm -rf conftest*
15567   eval "ac_cv_header_$ac_safe=yes"
15568 else
15569   echo "$ac_err" >&5
15570   echo "configure: failed program was:" >&5
15571   cat conftest.$ac_ext >&5
15572   rm -rf conftest*
15573   eval "ac_cv_header_$ac_safe=no"
15574 fi
15575 rm -f conftest*
15576 fi
15577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15578   echo "$ac_t""yes" 1>&6
15579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15580   cat >> confdefs.h <<EOF
15581 #define $ac_tr_hdr 1
15582 EOF
15583  
15584 else
15585   echo "$ac_t""no" 1>&6
15586 fi
15587 done
15588
15589         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15590                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15591 echo "configure:15592: checking for thr_create in -lthread" >&5
15592 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15594   echo $ac_n "(cached) $ac_c" 1>&6
15595 else
15596   ac_save_LIBS="$LIBS"
15597 LIBS="-lthread  $LIBS"
15598 cat > conftest.$ac_ext <<EOF
15599 #line 15600 "configure"
15600 #include "confdefs.h"
15601 /* Override any gcc2 internal prototype to avoid an error.  */
15602 /* We use char because int might match the return type of a gcc2
15603     builtin and then its argument prototype would still apply.  */
15604 char thr_create();
15605
15606 int main() {
15607 thr_create()
15608 ; return 0; }
15609 EOF
15610 if { (eval echo configure:15611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15611   rm -rf conftest*
15612   eval "ac_cv_lib_$ac_lib_var=yes"
15613 else
15614   echo "configure: failed program was:" >&5
15615   cat conftest.$ac_ext >&5
15616   rm -rf conftest*
15617   eval "ac_cv_lib_$ac_lib_var=no"
15618 fi
15619 rm -f conftest*
15620 LIBS="$ac_save_LIBS"
15621
15622 fi
15623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15624   echo "$ac_t""yes" 1>&6
15625   have_thr=yes
15626 else
15627   echo "$ac_t""no" 1>&6
15628 have_thr=no
15629 fi
15630
15631
15632                 if test $have_thr = yes ; then
15633                         cat >> confdefs.h <<\EOF
15634 #define HAVE_THR 1
15635 EOF
15636
15637                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15638                         ol_link_threads=thr
15639
15640                         if test $ol_with_yielding_select = auto ; then
15641                                 ol_with_yielding_select=yes
15642                         fi
15643
15644                                                 for ac_func in \
15645                                 thr_setconcurrency \
15646                                 thr_getconcurrency \
15647                         
15648 do
15649 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15650 echo "configure:15651: checking for $ac_func" >&5
15651 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15652   echo $ac_n "(cached) $ac_c" 1>&6
15653 else
15654   cat > conftest.$ac_ext <<EOF
15655 #line 15656 "configure"
15656 #include "confdefs.h"
15657 /* System header to define __stub macros and hopefully few prototypes,
15658     which can conflict with char $ac_func(); below.  */
15659 #include <assert.h>
15660 /* Override any gcc2 internal prototype to avoid an error.  */
15661 /* We use char because int might match the return type of a gcc2
15662     builtin and then its argument prototype would still apply.  */
15663 char $ac_func();
15664 char (*f)();
15665
15666 int main() {
15667
15668 /* The GNU C library defines this for functions which it implements
15669     to always fail with ENOSYS.  Some functions are actually named
15670     something starting with __ and the normal name is an alias.  */
15671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15672 choke me
15673 #else
15674 f = $ac_func;
15675 #endif
15676
15677 ; return 0; }
15678 EOF
15679 if { (eval echo configure:15680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15680   rm -rf conftest*
15681   eval "ac_cv_func_$ac_func=yes"
15682 else
15683   echo "configure: failed program was:" >&5
15684   cat conftest.$ac_ext >&5
15685   rm -rf conftest*
15686   eval "ac_cv_func_$ac_func=no"
15687 fi
15688 rm -f conftest*
15689 fi
15690
15691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15692   echo "$ac_t""yes" 1>&6
15693     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15694   cat >> confdefs.h <<EOF
15695 #define $ac_tr_func 1
15696 EOF
15697  
15698 else
15699   echo "$ac_t""no" 1>&6
15700 fi
15701 done
15702
15703                 fi
15704         fi
15705
15706                 for ac_hdr in lwp/lwp.h
15707 do
15708 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15709 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15710 echo "configure:15711: checking for $ac_hdr" >&5
15711 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15712   echo $ac_n "(cached) $ac_c" 1>&6
15713 else
15714   cat > conftest.$ac_ext <<EOF
15715 #line 15716 "configure"
15716 #include "confdefs.h"
15717 #include <$ac_hdr>
15718 EOF
15719 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15720 { (eval echo configure:15721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15721 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15722 if test -z "$ac_err"; then
15723   rm -rf conftest*
15724   eval "ac_cv_header_$ac_safe=yes"
15725 else
15726   echo "$ac_err" >&5
15727   echo "configure: failed program was:" >&5
15728   cat conftest.$ac_ext >&5
15729   rm -rf conftest*
15730   eval "ac_cv_header_$ac_safe=no"
15731 fi
15732 rm -f conftest*
15733 fi
15734 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15735   echo "$ac_t""yes" 1>&6
15736     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15737   cat >> confdefs.h <<EOF
15738 #define $ac_tr_hdr 1
15739 EOF
15740  
15741 else
15742   echo "$ac_t""no" 1>&6
15743 fi
15744 done
15745
15746         if test $ac_cv_header_lwp_lwp_h = yes ; then
15747                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15748 echo "configure:15749: checking for lwp_create in -llwp" >&5
15749 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15751   echo $ac_n "(cached) $ac_c" 1>&6
15752 else
15753   ac_save_LIBS="$LIBS"
15754 LIBS="-llwp  $LIBS"
15755 cat > conftest.$ac_ext <<EOF
15756 #line 15757 "configure"
15757 #include "confdefs.h"
15758 /* Override any gcc2 internal prototype to avoid an error.  */
15759 /* We use char because int might match the return type of a gcc2
15760     builtin and then its argument prototype would still apply.  */
15761 char lwp_create();
15762
15763 int main() {
15764 lwp_create()
15765 ; return 0; }
15766 EOF
15767 if { (eval echo configure:15768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15768   rm -rf conftest*
15769   eval "ac_cv_lib_$ac_lib_var=yes"
15770 else
15771   echo "configure: failed program was:" >&5
15772   cat conftest.$ac_ext >&5
15773   rm -rf conftest*
15774   eval "ac_cv_lib_$ac_lib_var=no"
15775 fi
15776 rm -f conftest*
15777 LIBS="$ac_save_LIBS"
15778
15779 fi
15780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15781   echo "$ac_t""yes" 1>&6
15782   have_lwp=yes
15783 else
15784   echo "$ac_t""no" 1>&6
15785 have_lwp=no
15786 fi
15787
15788
15789                 if test $have_lwp = yes ; then
15790                         cat >> confdefs.h <<\EOF
15791 #define HAVE_LWP 1
15792 EOF
15793
15794                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15795                         ol_link_threads=lwp
15796
15797                         if test $ol_with_yielding_select = auto ; then
15798                                 ol_with_yielding_select=no
15799                         fi
15800                 fi
15801         fi
15802 fi
15803
15804 if test $ol_with_yielding_select = yes ; then
15805         cat >> confdefs.h <<\EOF
15806 #define HAVE_YIELDING_SELECT 1
15807 EOF
15808
15809 fi
15810
15811 if test $ol_with_threads = manual ; then
15812                 ol_link_threads=yes
15813
15814         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15815
15816         for ac_hdr in pthread.h sched.h
15817 do
15818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15820 echo "configure:15821: checking for $ac_hdr" >&5
15821 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15822   echo $ac_n "(cached) $ac_c" 1>&6
15823 else
15824   cat > conftest.$ac_ext <<EOF
15825 #line 15826 "configure"
15826 #include "confdefs.h"
15827 #include <$ac_hdr>
15828 EOF
15829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15830 { (eval echo configure:15831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15832 if test -z "$ac_err"; then
15833   rm -rf conftest*
15834   eval "ac_cv_header_$ac_safe=yes"
15835 else
15836   echo "$ac_err" >&5
15837   echo "configure: failed program was:" >&5
15838   cat conftest.$ac_ext >&5
15839   rm -rf conftest*
15840   eval "ac_cv_header_$ac_safe=no"
15841 fi
15842 rm -f conftest*
15843 fi
15844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15845   echo "$ac_t""yes" 1>&6
15846     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15847   cat >> confdefs.h <<EOF
15848 #define $ac_tr_hdr 1
15849 EOF
15850  
15851 else
15852   echo "$ac_t""no" 1>&6
15853 fi
15854 done
15855
15856         for ac_func in sched_yield pthread_yield
15857 do
15858 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15859 echo "configure:15860: checking for $ac_func" >&5
15860 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15861   echo $ac_n "(cached) $ac_c" 1>&6
15862 else
15863   cat > conftest.$ac_ext <<EOF
15864 #line 15865 "configure"
15865 #include "confdefs.h"
15866 /* System header to define __stub macros and hopefully few prototypes,
15867     which can conflict with char $ac_func(); below.  */
15868 #include <assert.h>
15869 /* Override any gcc2 internal prototype to avoid an error.  */
15870 /* We use char because int might match the return type of a gcc2
15871     builtin and then its argument prototype would still apply.  */
15872 char $ac_func();
15873 char (*f)();
15874
15875 int main() {
15876
15877 /* The GNU C library defines this for functions which it implements
15878     to always fail with ENOSYS.  Some functions are actually named
15879     something starting with __ and the normal name is an alias.  */
15880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15881 choke me
15882 #else
15883 f = $ac_func;
15884 #endif
15885
15886 ; return 0; }
15887 EOF
15888 if { (eval echo configure:15889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15889   rm -rf conftest*
15890   eval "ac_cv_func_$ac_func=yes"
15891 else
15892   echo "configure: failed program was:" >&5
15893   cat conftest.$ac_ext >&5
15894   rm -rf conftest*
15895   eval "ac_cv_func_$ac_func=no"
15896 fi
15897 rm -f conftest*
15898 fi
15899
15900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15901   echo "$ac_t""yes" 1>&6
15902     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15903   cat >> confdefs.h <<EOF
15904 #define $ac_tr_func 1
15905 EOF
15906  
15907 else
15908   echo "$ac_t""no" 1>&6
15909 fi
15910 done
15911
15912         
15913         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15914 echo "configure:15915: checking for LinuxThreads pthread.h" >&5
15915 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15916   echo $ac_n "(cached) $ac_c" 1>&6
15917 else
15918   cat > conftest.$ac_ext <<EOF
15919 #line 15920 "configure"
15920 #include "confdefs.h"
15921 #include <pthread.h>
15922 EOF
15923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15924   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15925   rm -rf conftest*
15926   ol_cv_header_linux_threads=yes
15927 else
15928   rm -rf conftest*
15929   ol_cv_header_linux_threads=no
15930 fi
15931 rm -f conftest*
15932
15933                 
15934 fi
15935
15936 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15937         if test $ol_cv_header_linux_threads = yes; then
15938                 cat >> confdefs.h <<\EOF
15939 #define HAVE_LINUX_THREADS 1
15940 EOF
15941
15942         fi
15943
15944
15945         for ac_hdr in mach/cthreads.h
15946 do
15947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15949 echo "configure:15950: checking for $ac_hdr" >&5
15950 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15951   echo $ac_n "(cached) $ac_c" 1>&6
15952 else
15953   cat > conftest.$ac_ext <<EOF
15954 #line 15955 "configure"
15955 #include "confdefs.h"
15956 #include <$ac_hdr>
15957 EOF
15958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15959 { (eval echo configure:15960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15961 if test -z "$ac_err"; then
15962   rm -rf conftest*
15963   eval "ac_cv_header_$ac_safe=yes"
15964 else
15965   echo "$ac_err" >&5
15966   echo "configure: failed program was:" >&5
15967   cat conftest.$ac_ext >&5
15968   rm -rf conftest*
15969   eval "ac_cv_header_$ac_safe=no"
15970 fi
15971 rm -f conftest*
15972 fi
15973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15974   echo "$ac_t""yes" 1>&6
15975     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15976   cat >> confdefs.h <<EOF
15977 #define $ac_tr_hdr 1
15978 EOF
15979  
15980 else
15981   echo "$ac_t""no" 1>&6
15982 fi
15983 done
15984
15985         for ac_hdr in lwp/lwp.h
15986 do
15987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15989 echo "configure:15990: checking for $ac_hdr" >&5
15990 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15991   echo $ac_n "(cached) $ac_c" 1>&6
15992 else
15993   cat > conftest.$ac_ext <<EOF
15994 #line 15995 "configure"
15995 #include "confdefs.h"
15996 #include <$ac_hdr>
15997 EOF
15998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15999 { (eval echo configure:16000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16001 if test -z "$ac_err"; then
16002   rm -rf conftest*
16003   eval "ac_cv_header_$ac_safe=yes"
16004 else
16005   echo "$ac_err" >&5
16006   echo "configure: failed program was:" >&5
16007   cat conftest.$ac_ext >&5
16008   rm -rf conftest*
16009   eval "ac_cv_header_$ac_safe=no"
16010 fi
16011 rm -f conftest*
16012 fi
16013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16014   echo "$ac_t""yes" 1>&6
16015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16016   cat >> confdefs.h <<EOF
16017 #define $ac_tr_hdr 1
16018 EOF
16019  
16020 else
16021   echo "$ac_t""no" 1>&6
16022 fi
16023 done
16024
16025         for ac_hdr in thread.h synch.h
16026 do
16027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16029 echo "configure:16030: checking for $ac_hdr" >&5
16030 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16031   echo $ac_n "(cached) $ac_c" 1>&6
16032 else
16033   cat > conftest.$ac_ext <<EOF
16034 #line 16035 "configure"
16035 #include "confdefs.h"
16036 #include <$ac_hdr>
16037 EOF
16038 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16039 { (eval echo configure:16040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16040 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16041 if test -z "$ac_err"; then
16042   rm -rf conftest*
16043   eval "ac_cv_header_$ac_safe=yes"
16044 else
16045   echo "$ac_err" >&5
16046   echo "configure: failed program was:" >&5
16047   cat conftest.$ac_ext >&5
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=no"
16050 fi
16051 rm -f conftest*
16052 fi
16053 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16054   echo "$ac_t""yes" 1>&6
16055     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16056   cat >> confdefs.h <<EOF
16057 #define $ac_tr_hdr 1
16058 EOF
16059  
16060 else
16061   echo "$ac_t""no" 1>&6
16062 fi
16063 done
16064
16065 fi
16066
16067 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16068                         cat >> confdefs.h <<\EOF
16069 #define REENTRANT 1
16070 EOF
16071
16072         cat >> confdefs.h <<\EOF
16073 #define _REENTRANT 1
16074 EOF
16075
16076         cat >> confdefs.h <<\EOF
16077 #define THREAD_SAFE 1
16078 EOF
16079
16080         cat >> confdefs.h <<\EOF
16081 #define _THREAD_SAFE 1
16082 EOF
16083
16084         cat >> confdefs.h <<\EOF
16085 #define THREADSAFE 1
16086 EOF
16087
16088         cat >> confdefs.h <<\EOF
16089 #define _THREADSAFE 1
16090 EOF
16091
16092         cat >> confdefs.h <<\EOF
16093 #define _SGI_MP_SOURCE 1
16094 EOF
16095
16096
16097                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16098 echo "configure:16099: checking for thread specific errno" >&5
16099 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16100   echo $ac_n "(cached) $ac_c" 1>&6
16101 else
16102   
16103                 cat > conftest.$ac_ext <<EOF
16104 #line 16105 "configure"
16105 #include "confdefs.h"
16106 #include <errno.h>
16107 int main() {
16108 errno = 0;
16109 ; return 0; }
16110 EOF
16111 if { (eval echo configure:16112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16112   rm -rf conftest*
16113   ol_cv_errno_thread_specific=yes
16114 else
16115   echo "configure: failed program was:" >&5
16116   cat conftest.$ac_ext >&5
16117   rm -rf conftest*
16118   ol_cv_errno_thread_specific=no
16119 fi
16120 rm -f conftest*
16121         
16122 fi
16123
16124 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16125
16126                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16127 echo "configure:16128: checking for thread specific h_errno" >&5
16128 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16129   echo $ac_n "(cached) $ac_c" 1>&6
16130 else
16131   
16132                 cat > conftest.$ac_ext <<EOF
16133 #line 16134 "configure"
16134 #include "confdefs.h"
16135 #include <netdb.h>
16136 int main() {
16137 h_errno = 0;
16138 ; return 0; }
16139 EOF
16140 if { (eval echo configure:16141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16141   rm -rf conftest*
16142   ol_cv_h_errno_thread_specific=yes
16143 else
16144   echo "configure: failed program was:" >&5
16145   cat conftest.$ac_ext >&5
16146   rm -rf conftest*
16147   ol_cv_h_errno_thread_specific=no
16148 fi
16149 rm -f conftest*
16150         
16151 fi
16152
16153 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16154
16155         if test $ol_cv_errno_thread_specific != yes \
16156                 -o $ol_cv_h_errno_thread_specific != yes ; then
16157                 LIBS="$LTHREAD_LIBS $LIBS"
16158                 LTHREAD_LIBS=""
16159         fi
16160
16161 fi  
16162
16163 if test $ol_link_threads = no ; then
16164         if test $ol_with_threads = yes ; then
16165                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16166         fi
16167
16168         if test $ol_with_threads = auto ; then
16169                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16170                 ol_with_threads=no
16171         fi
16172
16173         cat >> confdefs.h <<\EOF
16174 #define NO_THREADS 1
16175 EOF
16176
16177         LTHREAD_LIBS=""
16178 fi
16179
16180 if test $ol_link_threads != no ; then
16181         cat >> confdefs.h <<\EOF
16182 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16183 EOF
16184
16185 fi
16186
16187 for ac_func in \
16188         ctime_r                 \
16189         gethostbyname_r gethostbyaddr_r \
16190
16191 do
16192 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16193 echo "configure:16194: checking for $ac_func" >&5
16194 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16195   echo $ac_n "(cached) $ac_c" 1>&6
16196 else
16197   cat > conftest.$ac_ext <<EOF
16198 #line 16199 "configure"
16199 #include "confdefs.h"
16200 /* System header to define __stub macros and hopefully few prototypes,
16201     which can conflict with char $ac_func(); below.  */
16202 #include <assert.h>
16203 /* Override any gcc2 internal prototype to avoid an error.  */
16204 /* We use char because int might match the return type of a gcc2
16205     builtin and then its argument prototype would still apply.  */
16206 char $ac_func();
16207 char (*f)();
16208
16209 int main() {
16210
16211 /* The GNU C library defines this for functions which it implements
16212     to always fail with ENOSYS.  Some functions are actually named
16213     something starting with __ and the normal name is an alias.  */
16214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16215 choke me
16216 #else
16217 f = $ac_func;
16218 #endif
16219
16220 ; return 0; }
16221 EOF
16222 if { (eval echo configure:16223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16223   rm -rf conftest*
16224   eval "ac_cv_func_$ac_func=yes"
16225 else
16226   echo "configure: failed program was:" >&5
16227   cat conftest.$ac_ext >&5
16228   rm -rf conftest*
16229   eval "ac_cv_func_$ac_func=no"
16230 fi
16231 rm -f conftest*
16232 fi
16233
16234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16235   echo "$ac_t""yes" 1>&6
16236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16237   cat >> confdefs.h <<EOF
16238 #define $ac_tr_func 1
16239 EOF
16240  
16241 else
16242   echo "$ac_t""no" 1>&6
16243 fi
16244 done
16245
16246
16247 if test "$ac_cv_func_ctime_r" = no ; then
16248         ol_cv_func_ctime_r_nargs=0
16249 else
16250         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16251 echo "configure:16252: checking number of arguments of ctime_r" >&5
16252 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16253   echo $ac_n "(cached) $ac_c" 1>&6
16254 else
16255   cat > conftest.$ac_ext <<EOF
16256 #line 16257 "configure"
16257 #include "confdefs.h"
16258 #include <time.h>
16259 int main() {
16260 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16261 ; return 0; }
16262 EOF
16263 if { (eval echo configure:16264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16264   rm -rf conftest*
16265   ol_cv_func_ctime_r_nargs3=yes
16266 else
16267   echo "configure: failed program was:" >&5
16268   cat conftest.$ac_ext >&5
16269   rm -rf conftest*
16270   ol_cv_func_ctime_r_nargs3=no
16271 fi
16272 rm -f conftest*
16273
16274         cat > conftest.$ac_ext <<EOF
16275 #line 16276 "configure"
16276 #include "confdefs.h"
16277 #include <time.h>
16278 int main() {
16279 time_t ti; char *buffer; ctime_r(&ti,buffer);
16280 ; return 0; }
16281 EOF
16282 if { (eval echo configure:16283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16283   rm -rf conftest*
16284   ol_cv_func_ctime_r_nargs2=yes
16285 else
16286   echo "configure: failed program was:" >&5
16287   cat conftest.$ac_ext >&5
16288   rm -rf conftest*
16289   ol_cv_func_ctime_r_nargs2=no
16290 fi
16291 rm -f conftest*
16292
16293         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16294                 $ol_cv_func_ctime_r_nargs2 = no ; then
16295
16296                 ol_cv_func_ctime_r_nargs=3
16297
16298         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16299                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16300
16301                 ol_cv_func_ctime_r_nargs=2
16302
16303         else
16304                 ol_cv_func_ctime_r_nargs=0
16305         fi
16306   
16307 fi
16308
16309 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16310
16311   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16312         cat >> confdefs.h <<EOF
16313 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16314 EOF
16315
16316   fi
16317
16318 fi
16319
16320 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16321         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16322 echo "configure:16323: checking number of arguments of gethostbyname_r" >&5
16323 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16324   echo $ac_n "(cached) $ac_c" 1>&6
16325 else
16326   cat > conftest.$ac_ext <<EOF
16327 #line 16328 "configure"
16328 #include "confdefs.h"
16329 #include <sys/types.h>
16330 #include <sys/socket.h>
16331 #include <netinet/in.h>
16332 #include <netdb.h>
16333 #define BUFSIZE (sizeof(struct hostent)+10)
16334 int main() {
16335 struct hostent hent; char buffer[BUFSIZE];
16336                 int bufsize=BUFSIZE;int h_errno;
16337                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16338                         buffer, bufsize, &h_errno);
16339 ; return 0; }
16340 EOF
16341 if { (eval echo configure:16342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16342   rm -rf conftest*
16343   ol_cv_func_gethostbyname_r_nargs5=yes
16344 else
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   ol_cv_func_gethostbyname_r_nargs5=no
16349 fi
16350 rm -f conftest*
16351
16352         cat > conftest.$ac_ext <<EOF
16353 #line 16354 "configure"
16354 #include "confdefs.h"
16355 #include <sys/types.h>
16356 #include <sys/socket.h>
16357 #include <netinet/in.h>
16358 #include <netdb.h>
16359 #define BUFSIZE (sizeof(struct hostent)+10)
16360 int main() {
16361 struct hostent hent;struct hostent *rhent;
16362                 char buffer[BUFSIZE];
16363                 int bufsize=BUFSIZE;int h_errno;
16364                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16365                         &rhent, &h_errno);
16366 ; return 0; }
16367 EOF
16368 if { (eval echo configure:16369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16369   rm -rf conftest*
16370   ol_cv_func_gethostbyname_r_nargs6=yes
16371 else
16372   echo "configure: failed program was:" >&5
16373   cat conftest.$ac_ext >&5
16374   rm -rf conftest*
16375   ol_cv_func_gethostbyname_r_nargs6=no
16376 fi
16377 rm -f conftest*
16378
16379         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16380                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16381
16382                 ol_cv_func_gethostbyname_r_nargs=5
16383
16384         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16385                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16386
16387                 ol_cv_func_gethostbyname_r_nargs=6
16388
16389         else
16390                 ol_cv_func_gethostbyname_r_nargs=0
16391         fi
16392   
16393 fi
16394
16395 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16396   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16397         cat >> confdefs.h <<EOF
16398 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16399 EOF
16400
16401   fi
16402
16403 else
16404         ol_cv_func_gethostbyname_r_nargs=0
16405 fi
16406  
16407 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16408         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16409 echo "configure:16410: checking number of arguments of gethostbyaddr_r" >&5
16410 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16411   echo $ac_n "(cached) $ac_c" 1>&6
16412 else
16413   cat > conftest.$ac_ext <<EOF
16414 #line 16415 "configure"
16415 #include "confdefs.h"
16416 #include <sys/types.h>
16417 #include <sys/socket.h>
16418 #include <netinet/in.h>
16419 #include <netdb.h>
16420 #define BUFSIZE (sizeof(struct hostent)+10)
16421 int main() {
16422 struct hostent hent; char buffer[BUFSIZE]; 
16423             struct in_addr add;
16424             size_t alen=sizeof(struct in_addr);
16425             int bufsize=BUFSIZE;int h_errno;
16426                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16427                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16428 ; return 0; }
16429 EOF
16430 if { (eval echo configure:16431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16431   rm -rf conftest*
16432   ol_cv_func_gethostbyaddr_r_nargs7=yes
16433 else
16434   echo "configure: failed program was:" >&5
16435   cat conftest.$ac_ext >&5
16436   rm -rf conftest*
16437   ol_cv_func_gethostbyaddr_r_nargs7=no
16438 fi
16439 rm -f conftest*
16440
16441         cat > conftest.$ac_ext <<EOF
16442 #line 16443 "configure"
16443 #include "confdefs.h"
16444 #include <sys/types.h>
16445 #include <sys/socket.h>
16446 #include <netinet/in.h>
16447 #include <netdb.h>
16448 #define BUFSIZE (sizeof(struct hostent)+10)
16449 int main() {
16450 struct hostent hent;
16451                 struct hostent *rhent; char buffer[BUFSIZE]; 
16452                 struct in_addr add;
16453                 size_t alen=sizeof(struct in_addr);
16454                 int bufsize=BUFSIZE;int h_errno;
16455                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16456                         alen, AF_INET, &hent, buffer, bufsize, 
16457                         &rhent, &h_errno);
16458 ; return 0; }
16459 EOF
16460 if { (eval echo configure:16461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16461   rm -rf conftest*
16462   ol_cv_func_gethostbyaddr_r_nargs8=yes
16463 else
16464   echo "configure: failed program was:" >&5
16465   cat conftest.$ac_ext >&5
16466   rm -rf conftest*
16467   ol_cv_func_gethostbyaddr_r_nargs8=no
16468 fi
16469 rm -f conftest*
16470
16471         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16472                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16473
16474                 ol_cv_func_gethostbyaddr_r_nargs=7
16475
16476         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16477                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16478
16479                 ol_cv_func_gethostbyaddr_r_nargs=8
16480
16481         else
16482                 ol_cv_func_gethostbyaddr_r_nargs=0
16483         fi
16484   
16485 fi
16486
16487 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16488   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16489     cat >> confdefs.h <<EOF
16490 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16491 EOF
16492
16493   fi
16494
16495 else
16496         ol_cv_func_gethostbyaddr_r_nargs=0
16497 fi
16498
16499 ol_link_ldbm=no 
16500
16501 if test $ol_with_ldbm_api = auto \
16502         -o $ol_with_ldbm_api = berkeley \
16503         -o $ol_with_ldbm_api = bcompat ; then
16504
16505         if test $ol_with_ldbm_api = bcompat; then \
16506                 for ac_hdr in db_185.h db.h
16507 do
16508 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16509 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16510 echo "configure:16511: checking for $ac_hdr" >&5
16511 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16512   echo $ac_n "(cached) $ac_c" 1>&6
16513 else
16514   cat > conftest.$ac_ext <<EOF
16515 #line 16516 "configure"
16516 #include "confdefs.h"
16517 #include <$ac_hdr>
16518 EOF
16519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16520 { (eval echo configure:16521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16522 if test -z "$ac_err"; then
16523   rm -rf conftest*
16524   eval "ac_cv_header_$ac_safe=yes"
16525 else
16526   echo "$ac_err" >&5
16527   echo "configure: failed program was:" >&5
16528   cat conftest.$ac_ext >&5
16529   rm -rf conftest*
16530   eval "ac_cv_header_$ac_safe=no"
16531 fi
16532 rm -f conftest*
16533 fi
16534 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16535   echo "$ac_t""yes" 1>&6
16536     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16537   cat >> confdefs.h <<EOF
16538 #define $ac_tr_hdr 1
16539 EOF
16540  
16541 else
16542   echo "$ac_t""no" 1>&6
16543 fi
16544 done
16545
16546 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16547         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16548 echo "configure:16549: checking if Berkeley DB header compatibility" >&5
16549 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16550   echo $ac_n "(cached) $ac_c" 1>&6
16551 else
16552   
16553                 cat > conftest.$ac_ext <<EOF
16554 #line 16555 "configure"
16555 #include "confdefs.h"
16556
16557 #if HAVE_DB_185_H
16558 #       include <db_185.h>
16559 #else
16560 #       include <db.h>
16561 #endif
16562
16563  /* this check could be improved */
16564 #ifndef DB_VERSION_MAJOR
16565 #       define DB_VERSION_MAJOR 1
16566 #endif
16567
16568 #if DB_VERSION_MAJOR == 1 
16569         __db_version_1
16570 #endif
16571
16572 EOF
16573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16574   egrep "__db_version_1" >/dev/null 2>&1; then
16575   rm -rf conftest*
16576   ol_cv_header_db1=yes
16577 else
16578   rm -rf conftest*
16579   ol_cv_header_db1=no
16580 fi
16581 rm -f conftest*
16582
16583 fi
16584
16585 echo "$ac_t""$ol_cv_header_db1" 1>&6
16586
16587         if test $ol_cv_header_db1 = yes ; then
16588                 ol_cv_lib_db=no
16589 if test $ol_cv_lib_db = no ; then
16590         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16591 echo "configure:16592: checking for Berkeley DB link (default)" >&5
16592 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   
16596         ol_DB_LIB=
16597         ol_LIBS=$LIBS
16598         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16599
16600         cat > conftest.$ac_ext <<EOF
16601 #line 16602 "configure"
16602 #include "confdefs.h"
16603
16604 #ifdef HAVE_DB_185_H
16605 # include <db_185.h>
16606 #else
16607 # include <db.h>
16608 #endif
16609
16610 #ifndef DB_VERSION_MAJOR
16611 # define DB_VERSION_MAJOR 1
16612 #endif
16613
16614 #ifndef NULL
16615 #define NULL ((void*)0)
16616 #endif
16617
16618 int main() {
16619
16620 #if DB_VERSION_MAJOR > 1
16621         {
16622                 char *version;
16623                 int major, minor, patch;
16624
16625                 version = db_version( &major, &minor, &patch );
16626
16627                 if( major != DB_VERSION_MAJOR ||
16628                         minor < DB_VERSION_MINOR )
16629                 {
16630                         printf("Berkeley DB version mismatch\n"
16631                                 "\texpected: %s\n\tgot: %s\n",
16632                                 DB_VERSION_STRING, version);
16633                         return 1;
16634                 }
16635         }
16636 #endif
16637
16638 #if DB_VERSION_MAJOR > 2
16639         db_env_create( NULL, 0 );
16640 #elif DB_VERSION_MAJOR > 1
16641         db_appexit( NULL );
16642 #else
16643         (void) dbopen( NULL, 0, 0, 0, NULL);
16644 #endif
16645
16646 ; return 0; }
16647 EOF
16648 if { (eval echo configure:16649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16649   rm -rf conftest*
16650   ol_cv_db_none=yes
16651 else
16652   echo "configure: failed program was:" >&5
16653   cat conftest.$ac_ext >&5
16654   rm -rf conftest*
16655   ol_cv_db_none=no
16656 fi
16657 rm -f conftest*
16658
16659         LIBS="$ol_LIBS"
16660
16661 fi
16662
16663 echo "$ac_t""$ol_cv_db_none" 1>&6
16664
16665         if test $ol_cv_db_none = yes ; then
16666                 ol_cv_lib_db=yes
16667         fi
16668 fi
16669
16670 if test $ol_cv_lib_db = no ; then
16671         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16672 echo "configure:16673: checking for Berkeley DB link (-ldb41)" >&5
16673 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16674   echo $ac_n "(cached) $ac_c" 1>&6
16675 else
16676   
16677         ol_DB_LIB=-ldb41
16678         ol_LIBS=$LIBS
16679         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16680
16681         cat > conftest.$ac_ext <<EOF
16682 #line 16683 "configure"
16683 #include "confdefs.h"
16684
16685 #ifdef HAVE_DB_185_H
16686 # include <db_185.h>
16687 #else
16688 # include <db.h>
16689 #endif
16690
16691 #ifndef DB_VERSION_MAJOR
16692 # define DB_VERSION_MAJOR 1
16693 #endif
16694
16695 #ifndef NULL
16696 #define NULL ((void*)0)
16697 #endif
16698
16699 int main() {
16700
16701 #if DB_VERSION_MAJOR > 1
16702         {
16703                 char *version;
16704                 int major, minor, patch;
16705
16706                 version = db_version( &major, &minor, &patch );
16707
16708                 if( major != DB_VERSION_MAJOR ||
16709                         minor < DB_VERSION_MINOR )
16710                 {
16711                         printf("Berkeley DB version mismatch\n"
16712                                 "\texpected: %s\n\tgot: %s\n",
16713                                 DB_VERSION_STRING, version);
16714                         return 1;
16715                 }
16716         }
16717 #endif
16718
16719 #if DB_VERSION_MAJOR > 2
16720         db_env_create( NULL, 0 );
16721 #elif DB_VERSION_MAJOR > 1
16722         db_appexit( NULL );
16723 #else
16724         (void) dbopen( NULL, 0, 0, 0, NULL);
16725 #endif
16726
16727 ; return 0; }
16728 EOF
16729 if { (eval echo configure:16730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16730   rm -rf conftest*
16731   ol_cv_db_db41=yes
16732 else
16733   echo "configure: failed program was:" >&5
16734   cat conftest.$ac_ext >&5
16735   rm -rf conftest*
16736   ol_cv_db_db41=no
16737 fi
16738 rm -f conftest*
16739
16740         LIBS="$ol_LIBS"
16741
16742 fi
16743
16744 echo "$ac_t""$ol_cv_db_db41" 1>&6
16745
16746         if test $ol_cv_db_db41 = yes ; then
16747                 ol_cv_lib_db=-ldb41
16748         fi
16749 fi
16750
16751 if test $ol_cv_lib_db = no ; then
16752         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16753 echo "configure:16754: checking for Berkeley DB link (-ldb-41)" >&5
16754 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16755   echo $ac_n "(cached) $ac_c" 1>&6
16756 else
16757   
16758         ol_DB_LIB=-ldb-41
16759         ol_LIBS=$LIBS
16760         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16761
16762         cat > conftest.$ac_ext <<EOF
16763 #line 16764 "configure"
16764 #include "confdefs.h"
16765
16766 #ifdef HAVE_DB_185_H
16767 # include <db_185.h>
16768 #else
16769 # include <db.h>
16770 #endif
16771
16772 #ifndef DB_VERSION_MAJOR
16773 # define DB_VERSION_MAJOR 1
16774 #endif
16775
16776 #ifndef NULL
16777 #define NULL ((void*)0)
16778 #endif
16779
16780 int main() {
16781
16782 #if DB_VERSION_MAJOR > 1
16783         {
16784                 char *version;
16785                 int major, minor, patch;
16786
16787                 version = db_version( &major, &minor, &patch );
16788
16789                 if( major != DB_VERSION_MAJOR ||
16790                         minor < DB_VERSION_MINOR )
16791                 {
16792                         printf("Berkeley DB version mismatch\n"
16793                                 "\texpected: %s\n\tgot: %s\n",
16794                                 DB_VERSION_STRING, version);
16795                         return 1;
16796                 }
16797         }
16798 #endif
16799
16800 #if DB_VERSION_MAJOR > 2
16801         db_env_create( NULL, 0 );
16802 #elif DB_VERSION_MAJOR > 1
16803         db_appexit( NULL );
16804 #else
16805         (void) dbopen( NULL, 0, 0, 0, NULL);
16806 #endif
16807
16808 ; return 0; }
16809 EOF
16810 if { (eval echo configure:16811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16811   rm -rf conftest*
16812   ol_cv_db_db_41=yes
16813 else
16814   echo "configure: failed program was:" >&5
16815   cat conftest.$ac_ext >&5
16816   rm -rf conftest*
16817   ol_cv_db_db_41=no
16818 fi
16819 rm -f conftest*
16820
16821         LIBS="$ol_LIBS"
16822
16823 fi
16824
16825 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16826
16827         if test $ol_cv_db_db_41 = yes ; then
16828                 ol_cv_lib_db=-ldb-41
16829         fi
16830 fi
16831
16832 if test $ol_cv_lib_db = no ; then
16833         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16834 echo "configure:16835: checking for Berkeley DB link (-ldb-4.1)" >&5
16835 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16836   echo $ac_n "(cached) $ac_c" 1>&6
16837 else
16838   
16839         ol_DB_LIB=-ldb-4.1
16840         ol_LIBS=$LIBS
16841         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16842
16843         cat > conftest.$ac_ext <<EOF
16844 #line 16845 "configure"
16845 #include "confdefs.h"
16846
16847 #ifdef HAVE_DB_185_H
16848 # include <db_185.h>
16849 #else
16850 # include <db.h>
16851 #endif
16852
16853 #ifndef DB_VERSION_MAJOR
16854 # define DB_VERSION_MAJOR 1
16855 #endif
16856
16857 #ifndef NULL
16858 #define NULL ((void*)0)
16859 #endif
16860
16861 int main() {
16862
16863 #if DB_VERSION_MAJOR > 1
16864         {
16865                 char *version;
16866                 int major, minor, patch;
16867
16868                 version = db_version( &major, &minor, &patch );
16869
16870                 if( major != DB_VERSION_MAJOR ||
16871                         minor < DB_VERSION_MINOR )
16872                 {
16873                         printf("Berkeley DB version mismatch\n"
16874                                 "\texpected: %s\n\tgot: %s\n",
16875                                 DB_VERSION_STRING, version);
16876                         return 1;
16877                 }
16878         }
16879 #endif
16880
16881 #if DB_VERSION_MAJOR > 2
16882         db_env_create( NULL, 0 );
16883 #elif DB_VERSION_MAJOR > 1
16884         db_appexit( NULL );
16885 #else
16886         (void) dbopen( NULL, 0, 0, 0, NULL);
16887 #endif
16888
16889 ; return 0; }
16890 EOF
16891 if { (eval echo configure:16892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16892   rm -rf conftest*
16893   ol_cv_db_db_4_dot_1=yes
16894 else
16895   echo "configure: failed program was:" >&5
16896   cat conftest.$ac_ext >&5
16897   rm -rf conftest*
16898   ol_cv_db_db_4_dot_1=no
16899 fi
16900 rm -f conftest*
16901
16902         LIBS="$ol_LIBS"
16903
16904 fi
16905
16906 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16907
16908         if test $ol_cv_db_db_4_dot_1 = yes ; then
16909                 ol_cv_lib_db=-ldb-4.1
16910         fi
16911 fi
16912
16913 if test $ol_cv_lib_db = no ; then
16914         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16915 echo "configure:16916: checking for Berkeley DB link (-ldb-4-1)" >&5
16916 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16917   echo $ac_n "(cached) $ac_c" 1>&6
16918 else
16919   
16920         ol_DB_LIB=-ldb-4-1
16921         ol_LIBS=$LIBS
16922         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16923
16924         cat > conftest.$ac_ext <<EOF
16925 #line 16926 "configure"
16926 #include "confdefs.h"
16927
16928 #ifdef HAVE_DB_185_H
16929 # include <db_185.h>
16930 #else
16931 # include <db.h>
16932 #endif
16933
16934 #ifndef DB_VERSION_MAJOR
16935 # define DB_VERSION_MAJOR 1
16936 #endif
16937
16938 #ifndef NULL
16939 #define NULL ((void*)0)
16940 #endif
16941
16942 int main() {
16943
16944 #if DB_VERSION_MAJOR > 1
16945         {
16946                 char *version;
16947                 int major, minor, patch;
16948
16949                 version = db_version( &major, &minor, &patch );
16950
16951                 if( major != DB_VERSION_MAJOR ||
16952                         minor < DB_VERSION_MINOR )
16953                 {
16954                         printf("Berkeley DB version mismatch\n"
16955                                 "\texpected: %s\n\tgot: %s\n",
16956                                 DB_VERSION_STRING, version);
16957                         return 1;
16958                 }
16959         }
16960 #endif
16961
16962 #if DB_VERSION_MAJOR > 2
16963         db_env_create( NULL, 0 );
16964 #elif DB_VERSION_MAJOR > 1
16965         db_appexit( NULL );
16966 #else
16967         (void) dbopen( NULL, 0, 0, 0, NULL);
16968 #endif
16969
16970 ; return 0; }
16971 EOF
16972 if { (eval echo configure:16973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16973   rm -rf conftest*
16974   ol_cv_db_db_4_1=yes
16975 else
16976   echo "configure: failed program was:" >&5
16977   cat conftest.$ac_ext >&5
16978   rm -rf conftest*
16979   ol_cv_db_db_4_1=no
16980 fi
16981 rm -f conftest*
16982
16983         LIBS="$ol_LIBS"
16984
16985 fi
16986
16987 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
16988
16989         if test $ol_cv_db_db_4_1 = yes ; then
16990                 ol_cv_lib_db=-ldb-4-1
16991         fi
16992 fi
16993
16994 if test $ol_cv_lib_db = no ; then
16995         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16996 echo "configure:16997: checking for Berkeley DB link (-ldb-4)" >&5
16997 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16998   echo $ac_n "(cached) $ac_c" 1>&6
16999 else
17000   
17001         ol_DB_LIB=-ldb-4
17002         ol_LIBS=$LIBS
17003         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17004
17005         cat > conftest.$ac_ext <<EOF
17006 #line 17007 "configure"
17007 #include "confdefs.h"
17008
17009 #ifdef HAVE_DB_185_H
17010 # include <db_185.h>
17011 #else
17012 # include <db.h>
17013 #endif
17014
17015 #ifndef DB_VERSION_MAJOR
17016 # define DB_VERSION_MAJOR 1
17017 #endif
17018
17019 #ifndef NULL
17020 #define NULL ((void*)0)
17021 #endif
17022
17023 int main() {
17024
17025 #if DB_VERSION_MAJOR > 1
17026         {
17027                 char *version;
17028                 int major, minor, patch;
17029
17030                 version = db_version( &major, &minor, &patch );
17031
17032                 if( major != DB_VERSION_MAJOR ||
17033                         minor < DB_VERSION_MINOR )
17034                 {
17035                         printf("Berkeley DB version mismatch\n"
17036                                 "\texpected: %s\n\tgot: %s\n",
17037                                 DB_VERSION_STRING, version);
17038                         return 1;
17039                 }
17040         }
17041 #endif
17042
17043 #if DB_VERSION_MAJOR > 2
17044         db_env_create( NULL, 0 );
17045 #elif DB_VERSION_MAJOR > 1
17046         db_appexit( NULL );
17047 #else
17048         (void) dbopen( NULL, 0, 0, 0, NULL);
17049 #endif
17050
17051 ; return 0; }
17052 EOF
17053 if { (eval echo configure:17054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17054   rm -rf conftest*
17055   ol_cv_db_db_4=yes
17056 else
17057   echo "configure: failed program was:" >&5
17058   cat conftest.$ac_ext >&5
17059   rm -rf conftest*
17060   ol_cv_db_db_4=no
17061 fi
17062 rm -f conftest*
17063
17064         LIBS="$ol_LIBS"
17065
17066 fi
17067
17068 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17069
17070         if test $ol_cv_db_db_4 = yes ; then
17071                 ol_cv_lib_db=-ldb-4
17072         fi
17073 fi
17074
17075 if test $ol_cv_lib_db = no ; then
17076         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17077 echo "configure:17078: checking for Berkeley DB link (-ldb4)" >&5
17078 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17079   echo $ac_n "(cached) $ac_c" 1>&6
17080 else
17081   
17082         ol_DB_LIB=-ldb4
17083         ol_LIBS=$LIBS
17084         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17085
17086         cat > conftest.$ac_ext <<EOF
17087 #line 17088 "configure"
17088 #include "confdefs.h"
17089
17090 #ifdef HAVE_DB_185_H
17091 # include <db_185.h>
17092 #else
17093 # include <db.h>
17094 #endif
17095
17096 #ifndef DB_VERSION_MAJOR
17097 # define DB_VERSION_MAJOR 1
17098 #endif
17099
17100 #ifndef NULL
17101 #define NULL ((void*)0)
17102 #endif
17103
17104 int main() {
17105
17106 #if DB_VERSION_MAJOR > 1
17107         {
17108                 char *version;
17109                 int major, minor, patch;
17110
17111                 version = db_version( &major, &minor, &patch );
17112
17113                 if( major != DB_VERSION_MAJOR ||
17114                         minor < DB_VERSION_MINOR )
17115                 {
17116                         printf("Berkeley DB version mismatch\n"
17117                                 "\texpected: %s\n\tgot: %s\n",
17118                                 DB_VERSION_STRING, version);
17119                         return 1;
17120                 }
17121         }
17122 #endif
17123
17124 #if DB_VERSION_MAJOR > 2
17125         db_env_create( NULL, 0 );
17126 #elif DB_VERSION_MAJOR > 1
17127         db_appexit( NULL );
17128 #else
17129         (void) dbopen( NULL, 0, 0, 0, NULL);
17130 #endif
17131
17132 ; return 0; }
17133 EOF
17134 if { (eval echo configure:17135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17135   rm -rf conftest*
17136   ol_cv_db_db4=yes
17137 else
17138   echo "configure: failed program was:" >&5
17139   cat conftest.$ac_ext >&5
17140   rm -rf conftest*
17141   ol_cv_db_db4=no
17142 fi
17143 rm -f conftest*
17144
17145         LIBS="$ol_LIBS"
17146
17147 fi
17148
17149 echo "$ac_t""$ol_cv_db_db4" 1>&6
17150
17151         if test $ol_cv_db_db4 = yes ; then
17152                 ol_cv_lib_db=-ldb4
17153         fi
17154 fi
17155
17156 if test $ol_cv_lib_db = no ; then
17157         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17158 echo "configure:17159: checking for Berkeley DB link (-ldb)" >&5
17159 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17160   echo $ac_n "(cached) $ac_c" 1>&6
17161 else
17162   
17163         ol_DB_LIB=-ldb
17164         ol_LIBS=$LIBS
17165         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17166
17167         cat > conftest.$ac_ext <<EOF
17168 #line 17169 "configure"
17169 #include "confdefs.h"
17170
17171 #ifdef HAVE_DB_185_H
17172 # include <db_185.h>
17173 #else
17174 # include <db.h>
17175 #endif
17176
17177 #ifndef DB_VERSION_MAJOR
17178 # define DB_VERSION_MAJOR 1
17179 #endif
17180
17181 #ifndef NULL
17182 #define NULL ((void*)0)
17183 #endif
17184
17185 int main() {
17186
17187 #if DB_VERSION_MAJOR > 1
17188         {
17189                 char *version;
17190                 int major, minor, patch;
17191
17192                 version = db_version( &major, &minor, &patch );
17193
17194                 if( major != DB_VERSION_MAJOR ||
17195                         minor < DB_VERSION_MINOR )
17196                 {
17197                         printf("Berkeley DB version mismatch\n"
17198                                 "\texpected: %s\n\tgot: %s\n",
17199                                 DB_VERSION_STRING, version);
17200                         return 1;
17201                 }
17202         }
17203 #endif
17204
17205 #if DB_VERSION_MAJOR > 2
17206         db_env_create( NULL, 0 );
17207 #elif DB_VERSION_MAJOR > 1
17208         db_appexit( NULL );
17209 #else
17210         (void) dbopen( NULL, 0, 0, 0, NULL);
17211 #endif
17212
17213 ; return 0; }
17214 EOF
17215 if { (eval echo configure:17216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17216   rm -rf conftest*
17217   ol_cv_db_db=yes
17218 else
17219   echo "configure: failed program was:" >&5
17220   cat conftest.$ac_ext >&5
17221   rm -rf conftest*
17222   ol_cv_db_db=no
17223 fi
17224 rm -f conftest*
17225
17226         LIBS="$ol_LIBS"
17227
17228 fi
17229
17230 echo "$ac_t""$ol_cv_db_db" 1>&6
17231
17232         if test $ol_cv_db_db = yes ; then
17233                 ol_cv_lib_db=-ldb
17234         fi
17235 fi
17236
17237 if test $ol_cv_lib_db = no ; then
17238         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17239 echo "configure:17240: checking for Berkeley DB link (-ldb3)" >&5
17240 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17241   echo $ac_n "(cached) $ac_c" 1>&6
17242 else
17243   
17244         ol_DB_LIB=-ldb3
17245         ol_LIBS=$LIBS
17246         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17247
17248         cat > conftest.$ac_ext <<EOF
17249 #line 17250 "configure"
17250 #include "confdefs.h"
17251
17252 #ifdef HAVE_DB_185_H
17253 # include <db_185.h>
17254 #else
17255 # include <db.h>
17256 #endif
17257
17258 #ifndef DB_VERSION_MAJOR
17259 # define DB_VERSION_MAJOR 1
17260 #endif
17261
17262 #ifndef NULL
17263 #define NULL ((void*)0)
17264 #endif
17265
17266 int main() {
17267
17268 #if DB_VERSION_MAJOR > 1
17269         {
17270                 char *version;
17271                 int major, minor, patch;
17272
17273                 version = db_version( &major, &minor, &patch );
17274
17275                 if( major != DB_VERSION_MAJOR ||
17276                         minor < DB_VERSION_MINOR )
17277                 {
17278                         printf("Berkeley DB version mismatch\n"
17279                                 "\texpected: %s\n\tgot: %s\n",
17280                                 DB_VERSION_STRING, version);
17281                         return 1;
17282                 }
17283         }
17284 #endif
17285
17286 #if DB_VERSION_MAJOR > 2
17287         db_env_create( NULL, 0 );
17288 #elif DB_VERSION_MAJOR > 1
17289         db_appexit( NULL );
17290 #else
17291         (void) dbopen( NULL, 0, 0, 0, NULL);
17292 #endif
17293
17294 ; return 0; }
17295 EOF
17296 if { (eval echo configure:17297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17297   rm -rf conftest*
17298   ol_cv_db_db3=yes
17299 else
17300   echo "configure: failed program was:" >&5
17301   cat conftest.$ac_ext >&5
17302   rm -rf conftest*
17303   ol_cv_db_db3=no
17304 fi
17305 rm -f conftest*
17306
17307         LIBS="$ol_LIBS"
17308
17309 fi
17310
17311 echo "$ac_t""$ol_cv_db_db3" 1>&6
17312
17313         if test $ol_cv_db_db3 = yes ; then
17314                 ol_cv_lib_db=-ldb3
17315         fi
17316 fi
17317
17318 if test $ol_cv_lib_db = no ; then
17319         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17320 echo "configure:17321: checking for Berkeley DB link (-ldb-3)" >&5
17321 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17322   echo $ac_n "(cached) $ac_c" 1>&6
17323 else
17324   
17325         ol_DB_LIB=-ldb-3
17326         ol_LIBS=$LIBS
17327         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17328
17329         cat > conftest.$ac_ext <<EOF
17330 #line 17331 "configure"
17331 #include "confdefs.h"
17332
17333 #ifdef HAVE_DB_185_H
17334 # include <db_185.h>
17335 #else
17336 # include <db.h>
17337 #endif
17338
17339 #ifndef DB_VERSION_MAJOR
17340 # define DB_VERSION_MAJOR 1
17341 #endif
17342
17343 #ifndef NULL
17344 #define NULL ((void*)0)
17345 #endif
17346
17347 int main() {
17348
17349 #if DB_VERSION_MAJOR > 1
17350         {
17351                 char *version;
17352                 int major, minor, patch;
17353
17354                 version = db_version( &major, &minor, &patch );
17355
17356                 if( major != DB_VERSION_MAJOR ||
17357                         minor < DB_VERSION_MINOR )
17358                 {
17359                         printf("Berkeley DB version mismatch\n"
17360                                 "\texpected: %s\n\tgot: %s\n",
17361                                 DB_VERSION_STRING, version);
17362                         return 1;
17363                 }
17364         }
17365 #endif
17366
17367 #if DB_VERSION_MAJOR > 2
17368         db_env_create( NULL, 0 );
17369 #elif DB_VERSION_MAJOR > 1
17370         db_appexit( NULL );
17371 #else
17372         (void) dbopen( NULL, 0, 0, 0, NULL);
17373 #endif
17374
17375 ; return 0; }
17376 EOF
17377 if { (eval echo configure:17378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17378   rm -rf conftest*
17379   ol_cv_db_db_3=yes
17380 else
17381   echo "configure: failed program was:" >&5
17382   cat conftest.$ac_ext >&5
17383   rm -rf conftest*
17384   ol_cv_db_db_3=no
17385 fi
17386 rm -f conftest*
17387
17388         LIBS="$ol_LIBS"
17389
17390 fi
17391
17392 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17393
17394         if test $ol_cv_db_db_3 = yes ; then
17395                 ol_cv_lib_db=-ldb-3
17396         fi
17397 fi
17398
17399 if test $ol_cv_lib_db = no ; then
17400         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17401 echo "configure:17402: checking for Berkeley DB link (-ldb2)" >&5
17402 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17403   echo $ac_n "(cached) $ac_c" 1>&6
17404 else
17405   
17406         ol_DB_LIB=-ldb2
17407         ol_LIBS=$LIBS
17408         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17409
17410         cat > conftest.$ac_ext <<EOF
17411 #line 17412 "configure"
17412 #include "confdefs.h"
17413
17414 #ifdef HAVE_DB_185_H
17415 # include <db_185.h>
17416 #else
17417 # include <db.h>
17418 #endif
17419
17420 #ifndef DB_VERSION_MAJOR
17421 # define DB_VERSION_MAJOR 1
17422 #endif
17423
17424 #ifndef NULL
17425 #define NULL ((void*)0)
17426 #endif
17427
17428 int main() {
17429
17430 #if DB_VERSION_MAJOR > 1
17431         {
17432                 char *version;
17433                 int major, minor, patch;
17434
17435                 version = db_version( &major, &minor, &patch );
17436
17437                 if( major != DB_VERSION_MAJOR ||
17438                         minor < DB_VERSION_MINOR )
17439                 {
17440                         printf("Berkeley DB version mismatch\n"
17441                                 "\texpected: %s\n\tgot: %s\n",
17442                                 DB_VERSION_STRING, version);
17443                         return 1;
17444                 }
17445         }
17446 #endif
17447
17448 #if DB_VERSION_MAJOR > 2
17449         db_env_create( NULL, 0 );
17450 #elif DB_VERSION_MAJOR > 1
17451         db_appexit( NULL );
17452 #else
17453         (void) dbopen( NULL, 0, 0, 0, NULL);
17454 #endif
17455
17456 ; return 0; }
17457 EOF
17458 if { (eval echo configure:17459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17459   rm -rf conftest*
17460   ol_cv_db_db2=yes
17461 else
17462   echo "configure: failed program was:" >&5
17463   cat conftest.$ac_ext >&5
17464   rm -rf conftest*
17465   ol_cv_db_db2=no
17466 fi
17467 rm -f conftest*
17468
17469         LIBS="$ol_LIBS"
17470
17471 fi
17472
17473 echo "$ac_t""$ol_cv_db_db2" 1>&6
17474
17475         if test $ol_cv_db_db2 = yes ; then
17476                 ol_cv_lib_db=-ldb2
17477         fi
17478 fi
17479
17480 if test $ol_cv_lib_db = no ; then
17481         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17482 echo "configure:17483: checking for Berkeley DB link (-ldb-2)" >&5
17483 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17484   echo $ac_n "(cached) $ac_c" 1>&6
17485 else
17486   
17487         ol_DB_LIB=-ldb-2
17488         ol_LIBS=$LIBS
17489         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17490
17491         cat > conftest.$ac_ext <<EOF
17492 #line 17493 "configure"
17493 #include "confdefs.h"
17494
17495 #ifdef HAVE_DB_185_H
17496 # include <db_185.h>
17497 #else
17498 # include <db.h>
17499 #endif
17500
17501 #ifndef DB_VERSION_MAJOR
17502 # define DB_VERSION_MAJOR 1
17503 #endif
17504
17505 #ifndef NULL
17506 #define NULL ((void*)0)
17507 #endif
17508
17509 int main() {
17510
17511 #if DB_VERSION_MAJOR > 1
17512         {
17513                 char *version;
17514                 int major, minor, patch;
17515
17516                 version = db_version( &major, &minor, &patch );
17517
17518                 if( major != DB_VERSION_MAJOR ||
17519                         minor < DB_VERSION_MINOR )
17520                 {
17521                         printf("Berkeley DB version mismatch\n"
17522                                 "\texpected: %s\n\tgot: %s\n",
17523                                 DB_VERSION_STRING, version);
17524                         return 1;
17525                 }
17526         }
17527 #endif
17528
17529 #if DB_VERSION_MAJOR > 2
17530         db_env_create( NULL, 0 );
17531 #elif DB_VERSION_MAJOR > 1
17532         db_appexit( NULL );
17533 #else
17534         (void) dbopen( NULL, 0, 0, 0, NULL);
17535 #endif
17536
17537 ; return 0; }
17538 EOF
17539 if { (eval echo configure:17540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17540   rm -rf conftest*
17541   ol_cv_db_db_2=yes
17542 else
17543   echo "configure: failed program was:" >&5
17544   cat conftest.$ac_ext >&5
17545   rm -rf conftest*
17546   ol_cv_db_db_2=no
17547 fi
17548 rm -f conftest*
17549
17550         LIBS="$ol_LIBS"
17551
17552 fi
17553
17554 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17555
17556         if test $ol_cv_db_db_2 = yes ; then
17557                 ol_cv_lib_db=-ldb-2
17558         fi
17559 fi
17560
17561 if test $ol_cv_lib_db = no ; then
17562         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17563 echo "configure:17564: checking for Berkeley DB link (-ldb1)" >&5
17564 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17565   echo $ac_n "(cached) $ac_c" 1>&6
17566 else
17567   
17568         ol_DB_LIB=-ldb1
17569         ol_LIBS=$LIBS
17570         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17571
17572         cat > conftest.$ac_ext <<EOF
17573 #line 17574 "configure"
17574 #include "confdefs.h"
17575
17576 #ifdef HAVE_DB_185_H
17577 # include <db_185.h>
17578 #else
17579 # include <db.h>
17580 #endif
17581
17582 #ifndef DB_VERSION_MAJOR
17583 # define DB_VERSION_MAJOR 1
17584 #endif
17585
17586 #ifndef NULL
17587 #define NULL ((void*)0)
17588 #endif
17589
17590 int main() {
17591
17592 #if DB_VERSION_MAJOR > 1
17593         {
17594                 char *version;
17595                 int major, minor, patch;
17596
17597                 version = db_version( &major, &minor, &patch );
17598
17599                 if( major != DB_VERSION_MAJOR ||
17600                         minor < DB_VERSION_MINOR )
17601                 {
17602                         printf("Berkeley DB version mismatch\n"
17603                                 "\texpected: %s\n\tgot: %s\n",
17604                                 DB_VERSION_STRING, version);
17605                         return 1;
17606                 }
17607         }
17608 #endif
17609
17610 #if DB_VERSION_MAJOR > 2
17611         db_env_create( NULL, 0 );
17612 #elif DB_VERSION_MAJOR > 1
17613         db_appexit( NULL );
17614 #else
17615         (void) dbopen( NULL, 0, 0, 0, NULL);
17616 #endif
17617
17618 ; return 0; }
17619 EOF
17620 if { (eval echo configure:17621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17621   rm -rf conftest*
17622   ol_cv_db_db1=yes
17623 else
17624   echo "configure: failed program was:" >&5
17625   cat conftest.$ac_ext >&5
17626   rm -rf conftest*
17627   ol_cv_db_db1=no
17628 fi
17629 rm -f conftest*
17630
17631         LIBS="$ol_LIBS"
17632
17633 fi
17634
17635 echo "$ac_t""$ol_cv_db_db1" 1>&6
17636
17637         if test $ol_cv_db_db1 = yes ; then
17638                 ol_cv_lib_db=-ldb1
17639         fi
17640 fi
17641
17642 if test $ol_cv_lib_db = no ; then
17643         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17644 echo "configure:17645: checking for Berkeley DB link (-ldb-1)" >&5
17645 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17646   echo $ac_n "(cached) $ac_c" 1>&6
17647 else
17648   
17649         ol_DB_LIB=-ldb-1
17650         ol_LIBS=$LIBS
17651         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17652
17653         cat > conftest.$ac_ext <<EOF
17654 #line 17655 "configure"
17655 #include "confdefs.h"
17656
17657 #ifdef HAVE_DB_185_H
17658 # include <db_185.h>
17659 #else
17660 # include <db.h>
17661 #endif
17662
17663 #ifndef DB_VERSION_MAJOR
17664 # define DB_VERSION_MAJOR 1
17665 #endif
17666
17667 #ifndef NULL
17668 #define NULL ((void*)0)
17669 #endif
17670
17671 int main() {
17672
17673 #if DB_VERSION_MAJOR > 1
17674         {
17675                 char *version;
17676                 int major, minor, patch;
17677
17678                 version = db_version( &major, &minor, &patch );
17679
17680                 if( major != DB_VERSION_MAJOR ||
17681                         minor < DB_VERSION_MINOR )
17682                 {
17683                         printf("Berkeley DB version mismatch\n"
17684                                 "\texpected: %s\n\tgot: %s\n",
17685                                 DB_VERSION_STRING, version);
17686                         return 1;
17687                 }
17688         }
17689 #endif
17690
17691 #if DB_VERSION_MAJOR > 2
17692         db_env_create( NULL, 0 );
17693 #elif DB_VERSION_MAJOR > 1
17694         db_appexit( NULL );
17695 #else
17696         (void) dbopen( NULL, 0, 0, 0, NULL);
17697 #endif
17698
17699 ; return 0; }
17700 EOF
17701 if { (eval echo configure:17702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17702   rm -rf conftest*
17703   ol_cv_db_db_1=yes
17704 else
17705   echo "configure: failed program was:" >&5
17706   cat conftest.$ac_ext >&5
17707   rm -rf conftest*
17708   ol_cv_db_db_1=no
17709 fi
17710 rm -f conftest*
17711
17712         LIBS="$ol_LIBS"
17713
17714 fi
17715
17716 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17717
17718         if test $ol_cv_db_db_1 = yes ; then
17719                 ol_cv_lib_db=-ldb-1
17720         fi
17721 fi
17722
17723
17724                 if test "$ol_cv_lib_db" != no ; then
17725                         ol_cv_berkeley_db=yes
17726                 fi
17727         fi
17728 fi
17729
17730         else
17731                 ol_cv_berkeley_db=no
17732 for ac_hdr in db.h
17733 do
17734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17736 echo "configure:17737: checking for $ac_hdr" >&5
17737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17738   echo $ac_n "(cached) $ac_c" 1>&6
17739 else
17740   cat > conftest.$ac_ext <<EOF
17741 #line 17742 "configure"
17742 #include "confdefs.h"
17743 #include <$ac_hdr>
17744 EOF
17745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17746 { (eval echo configure:17747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17748 if test -z "$ac_err"; then
17749   rm -rf conftest*
17750   eval "ac_cv_header_$ac_safe=yes"
17751 else
17752   echo "$ac_err" >&5
17753   echo "configure: failed program was:" >&5
17754   cat conftest.$ac_ext >&5
17755   rm -rf conftest*
17756   eval "ac_cv_header_$ac_safe=no"
17757 fi
17758 rm -f conftest*
17759 fi
17760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17761   echo "$ac_t""yes" 1>&6
17762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17763   cat >> confdefs.h <<EOF
17764 #define $ac_tr_hdr 1
17765 EOF
17766  
17767 else
17768   echo "$ac_t""no" 1>&6
17769 fi
17770 done
17771
17772 if test $ac_cv_header_db_h = yes; then
17773         ol_cv_lib_db=no
17774 if test $ol_cv_lib_db = no ; then
17775         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17776 echo "configure:17777: checking for Berkeley DB link (default)" >&5
17777 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17778   echo $ac_n "(cached) $ac_c" 1>&6
17779 else
17780   
17781         ol_DB_LIB=
17782         ol_LIBS=$LIBS
17783         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17784
17785         cat > conftest.$ac_ext <<EOF
17786 #line 17787 "configure"
17787 #include "confdefs.h"
17788
17789 #ifdef HAVE_DB_185_H
17790 # include <db_185.h>
17791 #else
17792 # include <db.h>
17793 #endif
17794
17795 #ifndef DB_VERSION_MAJOR
17796 # define DB_VERSION_MAJOR 1
17797 #endif
17798
17799 #ifndef NULL
17800 #define NULL ((void*)0)
17801 #endif
17802
17803 int main() {
17804
17805 #if DB_VERSION_MAJOR > 1
17806         {
17807                 char *version;
17808                 int major, minor, patch;
17809
17810                 version = db_version( &major, &minor, &patch );
17811
17812                 if( major != DB_VERSION_MAJOR ||
17813                         minor < DB_VERSION_MINOR )
17814                 {
17815                         printf("Berkeley DB version mismatch\n"
17816                                 "\texpected: %s\n\tgot: %s\n",
17817                                 DB_VERSION_STRING, version);
17818                         return 1;
17819                 }
17820         }
17821 #endif
17822
17823 #if DB_VERSION_MAJOR > 2
17824         db_env_create( NULL, 0 );
17825 #elif DB_VERSION_MAJOR > 1
17826         db_appexit( NULL );
17827 #else
17828         (void) dbopen( NULL, 0, 0, 0, NULL);
17829 #endif
17830
17831 ; return 0; }
17832 EOF
17833 if { (eval echo configure:17834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17834   rm -rf conftest*
17835   ol_cv_db_none=yes
17836 else
17837   echo "configure: failed program was:" >&5
17838   cat conftest.$ac_ext >&5
17839   rm -rf conftest*
17840   ol_cv_db_none=no
17841 fi
17842 rm -f conftest*
17843
17844         LIBS="$ol_LIBS"
17845
17846 fi
17847
17848 echo "$ac_t""$ol_cv_db_none" 1>&6
17849
17850         if test $ol_cv_db_none = yes ; then
17851                 ol_cv_lib_db=yes
17852         fi
17853 fi
17854
17855 if test $ol_cv_lib_db = no ; then
17856         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17857 echo "configure:17858: checking for Berkeley DB link (-ldb41)" >&5
17858 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17859   echo $ac_n "(cached) $ac_c" 1>&6
17860 else
17861   
17862         ol_DB_LIB=-ldb41
17863         ol_LIBS=$LIBS
17864         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17865
17866         cat > conftest.$ac_ext <<EOF
17867 #line 17868 "configure"
17868 #include "confdefs.h"
17869
17870 #ifdef HAVE_DB_185_H
17871 # include <db_185.h>
17872 #else
17873 # include <db.h>
17874 #endif
17875
17876 #ifndef DB_VERSION_MAJOR
17877 # define DB_VERSION_MAJOR 1
17878 #endif
17879
17880 #ifndef NULL
17881 #define NULL ((void*)0)
17882 #endif
17883
17884 int main() {
17885
17886 #if DB_VERSION_MAJOR > 1
17887         {
17888                 char *version;
17889                 int major, minor, patch;
17890
17891                 version = db_version( &major, &minor, &patch );
17892
17893                 if( major != DB_VERSION_MAJOR ||
17894                         minor < DB_VERSION_MINOR )
17895                 {
17896                         printf("Berkeley DB version mismatch\n"
17897                                 "\texpected: %s\n\tgot: %s\n",
17898                                 DB_VERSION_STRING, version);
17899                         return 1;
17900                 }
17901         }
17902 #endif
17903
17904 #if DB_VERSION_MAJOR > 2
17905         db_env_create( NULL, 0 );
17906 #elif DB_VERSION_MAJOR > 1
17907         db_appexit( NULL );
17908 #else
17909         (void) dbopen( NULL, 0, 0, 0, NULL);
17910 #endif
17911
17912 ; return 0; }
17913 EOF
17914 if { (eval echo configure:17915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17915   rm -rf conftest*
17916   ol_cv_db_db41=yes
17917 else
17918   echo "configure: failed program was:" >&5
17919   cat conftest.$ac_ext >&5
17920   rm -rf conftest*
17921   ol_cv_db_db41=no
17922 fi
17923 rm -f conftest*
17924
17925         LIBS="$ol_LIBS"
17926
17927 fi
17928
17929 echo "$ac_t""$ol_cv_db_db41" 1>&6
17930
17931         if test $ol_cv_db_db41 = yes ; then
17932                 ol_cv_lib_db=-ldb41
17933         fi
17934 fi
17935
17936 if test $ol_cv_lib_db = no ; then
17937         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17938 echo "configure:17939: checking for Berkeley DB link (-ldb-41)" >&5
17939 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17940   echo $ac_n "(cached) $ac_c" 1>&6
17941 else
17942   
17943         ol_DB_LIB=-ldb-41
17944         ol_LIBS=$LIBS
17945         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17946
17947         cat > conftest.$ac_ext <<EOF
17948 #line 17949 "configure"
17949 #include "confdefs.h"
17950
17951 #ifdef HAVE_DB_185_H
17952 # include <db_185.h>
17953 #else
17954 # include <db.h>
17955 #endif
17956
17957 #ifndef DB_VERSION_MAJOR
17958 # define DB_VERSION_MAJOR 1
17959 #endif
17960
17961 #ifndef NULL
17962 #define NULL ((void*)0)
17963 #endif
17964
17965 int main() {
17966
17967 #if DB_VERSION_MAJOR > 1
17968         {
17969                 char *version;
17970                 int major, minor, patch;
17971
17972                 version = db_version( &major, &minor, &patch );
17973
17974                 if( major != DB_VERSION_MAJOR ||
17975                         minor < DB_VERSION_MINOR )
17976                 {
17977                         printf("Berkeley DB version mismatch\n"
17978                                 "\texpected: %s\n\tgot: %s\n",
17979                                 DB_VERSION_STRING, version);
17980                         return 1;
17981                 }
17982         }
17983 #endif
17984
17985 #if DB_VERSION_MAJOR > 2
17986         db_env_create( NULL, 0 );
17987 #elif DB_VERSION_MAJOR > 1
17988         db_appexit( NULL );
17989 #else
17990         (void) dbopen( NULL, 0, 0, 0, NULL);
17991 #endif
17992
17993 ; return 0; }
17994 EOF
17995 if { (eval echo configure:17996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17996   rm -rf conftest*
17997   ol_cv_db_db_41=yes
17998 else
17999   echo "configure: failed program was:" >&5
18000   cat conftest.$ac_ext >&5
18001   rm -rf conftest*
18002   ol_cv_db_db_41=no
18003 fi
18004 rm -f conftest*
18005
18006         LIBS="$ol_LIBS"
18007
18008 fi
18009
18010 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18011
18012         if test $ol_cv_db_db_41 = yes ; then
18013                 ol_cv_lib_db=-ldb-41
18014         fi
18015 fi
18016
18017 if test $ol_cv_lib_db = no ; then
18018         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18019 echo "configure:18020: checking for Berkeley DB link (-ldb-4.1)" >&5
18020 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18021   echo $ac_n "(cached) $ac_c" 1>&6
18022 else
18023   
18024         ol_DB_LIB=-ldb-4.1
18025         ol_LIBS=$LIBS
18026         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18027
18028         cat > conftest.$ac_ext <<EOF
18029 #line 18030 "configure"
18030 #include "confdefs.h"
18031
18032 #ifdef HAVE_DB_185_H
18033 # include <db_185.h>
18034 #else
18035 # include <db.h>
18036 #endif
18037
18038 #ifndef DB_VERSION_MAJOR
18039 # define DB_VERSION_MAJOR 1
18040 #endif
18041
18042 #ifndef NULL
18043 #define NULL ((void*)0)
18044 #endif
18045
18046 int main() {
18047
18048 #if DB_VERSION_MAJOR > 1
18049         {
18050                 char *version;
18051                 int major, minor, patch;
18052
18053                 version = db_version( &major, &minor, &patch );
18054
18055                 if( major != DB_VERSION_MAJOR ||
18056                         minor < DB_VERSION_MINOR )
18057                 {
18058                         printf("Berkeley DB version mismatch\n"
18059                                 "\texpected: %s\n\tgot: %s\n",
18060                                 DB_VERSION_STRING, version);
18061                         return 1;
18062                 }
18063         }
18064 #endif
18065
18066 #if DB_VERSION_MAJOR > 2
18067         db_env_create( NULL, 0 );
18068 #elif DB_VERSION_MAJOR > 1
18069         db_appexit( NULL );
18070 #else
18071         (void) dbopen( NULL, 0, 0, 0, NULL);
18072 #endif
18073
18074 ; return 0; }
18075 EOF
18076 if { (eval echo configure:18077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18077   rm -rf conftest*
18078   ol_cv_db_db_4_dot_1=yes
18079 else
18080   echo "configure: failed program was:" >&5
18081   cat conftest.$ac_ext >&5
18082   rm -rf conftest*
18083   ol_cv_db_db_4_dot_1=no
18084 fi
18085 rm -f conftest*
18086
18087         LIBS="$ol_LIBS"
18088
18089 fi
18090
18091 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18092
18093         if test $ol_cv_db_db_4_dot_1 = yes ; then
18094                 ol_cv_lib_db=-ldb-4.1
18095         fi
18096 fi
18097
18098 if test $ol_cv_lib_db = no ; then
18099         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18100 echo "configure:18101: checking for Berkeley DB link (-ldb-4-1)" >&5
18101 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18102   echo $ac_n "(cached) $ac_c" 1>&6
18103 else
18104   
18105         ol_DB_LIB=-ldb-4-1
18106         ol_LIBS=$LIBS
18107         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18108
18109         cat > conftest.$ac_ext <<EOF
18110 #line 18111 "configure"
18111 #include "confdefs.h"
18112
18113 #ifdef HAVE_DB_185_H
18114 # include <db_185.h>
18115 #else
18116 # include <db.h>
18117 #endif
18118
18119 #ifndef DB_VERSION_MAJOR
18120 # define DB_VERSION_MAJOR 1
18121 #endif
18122
18123 #ifndef NULL
18124 #define NULL ((void*)0)
18125 #endif
18126
18127 int main() {
18128
18129 #if DB_VERSION_MAJOR > 1
18130         {
18131                 char *version;
18132                 int major, minor, patch;
18133
18134                 version = db_version( &major, &minor, &patch );
18135
18136                 if( major != DB_VERSION_MAJOR ||
18137                         minor < DB_VERSION_MINOR )
18138                 {
18139                         printf("Berkeley DB version mismatch\n"
18140                                 "\texpected: %s\n\tgot: %s\n",
18141                                 DB_VERSION_STRING, version);
18142                         return 1;
18143                 }
18144         }
18145 #endif
18146
18147 #if DB_VERSION_MAJOR > 2
18148         db_env_create( NULL, 0 );
18149 #elif DB_VERSION_MAJOR > 1
18150         db_appexit( NULL );
18151 #else
18152         (void) dbopen( NULL, 0, 0, 0, NULL);
18153 #endif
18154
18155 ; return 0; }
18156 EOF
18157 if { (eval echo configure:18158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18158   rm -rf conftest*
18159   ol_cv_db_db_4_1=yes
18160 else
18161   echo "configure: failed program was:" >&5
18162   cat conftest.$ac_ext >&5
18163   rm -rf conftest*
18164   ol_cv_db_db_4_1=no
18165 fi
18166 rm -f conftest*
18167
18168         LIBS="$ol_LIBS"
18169
18170 fi
18171
18172 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18173
18174         if test $ol_cv_db_db_4_1 = yes ; then
18175                 ol_cv_lib_db=-ldb-4-1
18176         fi
18177 fi
18178
18179 if test $ol_cv_lib_db = no ; then
18180         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18181 echo "configure:18182: checking for Berkeley DB link (-ldb-4)" >&5
18182 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18183   echo $ac_n "(cached) $ac_c" 1>&6
18184 else
18185   
18186         ol_DB_LIB=-ldb-4
18187         ol_LIBS=$LIBS
18188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18189
18190         cat > conftest.$ac_ext <<EOF
18191 #line 18192 "configure"
18192 #include "confdefs.h"
18193
18194 #ifdef HAVE_DB_185_H
18195 # include <db_185.h>
18196 #else
18197 # include <db.h>
18198 #endif
18199
18200 #ifndef DB_VERSION_MAJOR
18201 # define DB_VERSION_MAJOR 1
18202 #endif
18203
18204 #ifndef NULL
18205 #define NULL ((void*)0)
18206 #endif
18207
18208 int main() {
18209
18210 #if DB_VERSION_MAJOR > 1
18211         {
18212                 char *version;
18213                 int major, minor, patch;
18214
18215                 version = db_version( &major, &minor, &patch );
18216
18217                 if( major != DB_VERSION_MAJOR ||
18218                         minor < DB_VERSION_MINOR )
18219                 {
18220                         printf("Berkeley DB version mismatch\n"
18221                                 "\texpected: %s\n\tgot: %s\n",
18222                                 DB_VERSION_STRING, version);
18223                         return 1;
18224                 }
18225         }
18226 #endif
18227
18228 #if DB_VERSION_MAJOR > 2
18229         db_env_create( NULL, 0 );
18230 #elif DB_VERSION_MAJOR > 1
18231         db_appexit( NULL );
18232 #else
18233         (void) dbopen( NULL, 0, 0, 0, NULL);
18234 #endif
18235
18236 ; return 0; }
18237 EOF
18238 if { (eval echo configure:18239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18239   rm -rf conftest*
18240   ol_cv_db_db_4=yes
18241 else
18242   echo "configure: failed program was:" >&5
18243   cat conftest.$ac_ext >&5
18244   rm -rf conftest*
18245   ol_cv_db_db_4=no
18246 fi
18247 rm -f conftest*
18248
18249         LIBS="$ol_LIBS"
18250
18251 fi
18252
18253 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18254
18255         if test $ol_cv_db_db_4 = yes ; then
18256                 ol_cv_lib_db=-ldb-4
18257         fi
18258 fi
18259
18260 if test $ol_cv_lib_db = no ; then
18261         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18262 echo "configure:18263: checking for Berkeley DB link (-ldb4)" >&5
18263 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18264   echo $ac_n "(cached) $ac_c" 1>&6
18265 else
18266   
18267         ol_DB_LIB=-ldb4
18268         ol_LIBS=$LIBS
18269         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18270
18271         cat > conftest.$ac_ext <<EOF
18272 #line 18273 "configure"
18273 #include "confdefs.h"
18274
18275 #ifdef HAVE_DB_185_H
18276 # include <db_185.h>
18277 #else
18278 # include <db.h>
18279 #endif
18280
18281 #ifndef DB_VERSION_MAJOR
18282 # define DB_VERSION_MAJOR 1
18283 #endif
18284
18285 #ifndef NULL
18286 #define NULL ((void*)0)
18287 #endif
18288
18289 int main() {
18290
18291 #if DB_VERSION_MAJOR > 1
18292         {
18293                 char *version;
18294                 int major, minor, patch;
18295
18296                 version = db_version( &major, &minor, &patch );
18297
18298                 if( major != DB_VERSION_MAJOR ||
18299                         minor < DB_VERSION_MINOR )
18300                 {
18301                         printf("Berkeley DB version mismatch\n"
18302                                 "\texpected: %s\n\tgot: %s\n",
18303                                 DB_VERSION_STRING, version);
18304                         return 1;
18305                 }
18306         }
18307 #endif
18308
18309 #if DB_VERSION_MAJOR > 2
18310         db_env_create( NULL, 0 );
18311 #elif DB_VERSION_MAJOR > 1
18312         db_appexit( NULL );
18313 #else
18314         (void) dbopen( NULL, 0, 0, 0, NULL);
18315 #endif
18316
18317 ; return 0; }
18318 EOF
18319 if { (eval echo configure:18320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18320   rm -rf conftest*
18321   ol_cv_db_db4=yes
18322 else
18323   echo "configure: failed program was:" >&5
18324   cat conftest.$ac_ext >&5
18325   rm -rf conftest*
18326   ol_cv_db_db4=no
18327 fi
18328 rm -f conftest*
18329
18330         LIBS="$ol_LIBS"
18331
18332 fi
18333
18334 echo "$ac_t""$ol_cv_db_db4" 1>&6
18335
18336         if test $ol_cv_db_db4 = yes ; then
18337                 ol_cv_lib_db=-ldb4
18338         fi
18339 fi
18340
18341 if test $ol_cv_lib_db = no ; then
18342         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18343 echo "configure:18344: checking for Berkeley DB link (-ldb)" >&5
18344 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347   
18348         ol_DB_LIB=-ldb
18349         ol_LIBS=$LIBS
18350         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18351
18352         cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355
18356 #ifdef HAVE_DB_185_H
18357 # include <db_185.h>
18358 #else
18359 # include <db.h>
18360 #endif
18361
18362 #ifndef DB_VERSION_MAJOR
18363 # define DB_VERSION_MAJOR 1
18364 #endif
18365
18366 #ifndef NULL
18367 #define NULL ((void*)0)
18368 #endif
18369
18370 int main() {
18371
18372 #if DB_VERSION_MAJOR > 1
18373         {
18374                 char *version;
18375                 int major, minor, patch;
18376
18377                 version = db_version( &major, &minor, &patch );
18378
18379                 if( major != DB_VERSION_MAJOR ||
18380                         minor < DB_VERSION_MINOR )
18381                 {
18382                         printf("Berkeley DB version mismatch\n"
18383                                 "\texpected: %s\n\tgot: %s\n",
18384                                 DB_VERSION_STRING, version);
18385                         return 1;
18386                 }
18387         }
18388 #endif
18389
18390 #if DB_VERSION_MAJOR > 2
18391         db_env_create( NULL, 0 );
18392 #elif DB_VERSION_MAJOR > 1
18393         db_appexit( NULL );
18394 #else
18395         (void) dbopen( NULL, 0, 0, 0, NULL);
18396 #endif
18397
18398 ; return 0; }
18399 EOF
18400 if { (eval echo configure:18401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18401   rm -rf conftest*
18402   ol_cv_db_db=yes
18403 else
18404   echo "configure: failed program was:" >&5
18405   cat conftest.$ac_ext >&5
18406   rm -rf conftest*
18407   ol_cv_db_db=no
18408 fi
18409 rm -f conftest*
18410
18411         LIBS="$ol_LIBS"
18412
18413 fi
18414
18415 echo "$ac_t""$ol_cv_db_db" 1>&6
18416
18417         if test $ol_cv_db_db = yes ; then
18418                 ol_cv_lib_db=-ldb
18419         fi
18420 fi
18421
18422 if test $ol_cv_lib_db = no ; then
18423         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18424 echo "configure:18425: checking for Berkeley DB link (-ldb3)" >&5
18425 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18426   echo $ac_n "(cached) $ac_c" 1>&6
18427 else
18428   
18429         ol_DB_LIB=-ldb3
18430         ol_LIBS=$LIBS
18431         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18432
18433         cat > conftest.$ac_ext <<EOF
18434 #line 18435 "configure"
18435 #include "confdefs.h"
18436
18437 #ifdef HAVE_DB_185_H
18438 # include <db_185.h>
18439 #else
18440 # include <db.h>
18441 #endif
18442
18443 #ifndef DB_VERSION_MAJOR
18444 # define DB_VERSION_MAJOR 1
18445 #endif
18446
18447 #ifndef NULL
18448 #define NULL ((void*)0)
18449 #endif
18450
18451 int main() {
18452
18453 #if DB_VERSION_MAJOR > 1
18454         {
18455                 char *version;
18456                 int major, minor, patch;
18457
18458                 version = db_version( &major, &minor, &patch );
18459
18460                 if( major != DB_VERSION_MAJOR ||
18461                         minor < DB_VERSION_MINOR )
18462                 {
18463                         printf("Berkeley DB version mismatch\n"
18464                                 "\texpected: %s\n\tgot: %s\n",
18465                                 DB_VERSION_STRING, version);
18466                         return 1;
18467                 }
18468         }
18469 #endif
18470
18471 #if DB_VERSION_MAJOR > 2
18472         db_env_create( NULL, 0 );
18473 #elif DB_VERSION_MAJOR > 1
18474         db_appexit( NULL );
18475 #else
18476         (void) dbopen( NULL, 0, 0, 0, NULL);
18477 #endif
18478
18479 ; return 0; }
18480 EOF
18481 if { (eval echo configure:18482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18482   rm -rf conftest*
18483   ol_cv_db_db3=yes
18484 else
18485   echo "configure: failed program was:" >&5
18486   cat conftest.$ac_ext >&5
18487   rm -rf conftest*
18488   ol_cv_db_db3=no
18489 fi
18490 rm -f conftest*
18491
18492         LIBS="$ol_LIBS"
18493
18494 fi
18495
18496 echo "$ac_t""$ol_cv_db_db3" 1>&6
18497
18498         if test $ol_cv_db_db3 = yes ; then
18499                 ol_cv_lib_db=-ldb3
18500         fi
18501 fi
18502
18503 if test $ol_cv_lib_db = no ; then
18504         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18505 echo "configure:18506: checking for Berkeley DB link (-ldb-3)" >&5
18506 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18507   echo $ac_n "(cached) $ac_c" 1>&6
18508 else
18509   
18510         ol_DB_LIB=-ldb-3
18511         ol_LIBS=$LIBS
18512         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18513
18514         cat > conftest.$ac_ext <<EOF
18515 #line 18516 "configure"
18516 #include "confdefs.h"
18517
18518 #ifdef HAVE_DB_185_H
18519 # include <db_185.h>
18520 #else
18521 # include <db.h>
18522 #endif
18523
18524 #ifndef DB_VERSION_MAJOR
18525 # define DB_VERSION_MAJOR 1
18526 #endif
18527
18528 #ifndef NULL
18529 #define NULL ((void*)0)
18530 #endif
18531
18532 int main() {
18533
18534 #if DB_VERSION_MAJOR > 1
18535         {
18536                 char *version;
18537                 int major, minor, patch;
18538
18539                 version = db_version( &major, &minor, &patch );
18540
18541                 if( major != DB_VERSION_MAJOR ||
18542                         minor < DB_VERSION_MINOR )
18543                 {
18544                         printf("Berkeley DB version mismatch\n"
18545                                 "\texpected: %s\n\tgot: %s\n",
18546                                 DB_VERSION_STRING, version);
18547                         return 1;
18548                 }
18549         }
18550 #endif
18551
18552 #if DB_VERSION_MAJOR > 2
18553         db_env_create( NULL, 0 );
18554 #elif DB_VERSION_MAJOR > 1
18555         db_appexit( NULL );
18556 #else
18557         (void) dbopen( NULL, 0, 0, 0, NULL);
18558 #endif
18559
18560 ; return 0; }
18561 EOF
18562 if { (eval echo configure:18563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18563   rm -rf conftest*
18564   ol_cv_db_db_3=yes
18565 else
18566   echo "configure: failed program was:" >&5
18567   cat conftest.$ac_ext >&5
18568   rm -rf conftest*
18569   ol_cv_db_db_3=no
18570 fi
18571 rm -f conftest*
18572
18573         LIBS="$ol_LIBS"
18574
18575 fi
18576
18577 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18578
18579         if test $ol_cv_db_db_3 = yes ; then
18580                 ol_cv_lib_db=-ldb-3
18581         fi
18582 fi
18583
18584 if test $ol_cv_lib_db = no ; then
18585         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18586 echo "configure:18587: checking for Berkeley DB link (-ldb2)" >&5
18587 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18588   echo $ac_n "(cached) $ac_c" 1>&6
18589 else
18590   
18591         ol_DB_LIB=-ldb2
18592         ol_LIBS=$LIBS
18593         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18594
18595         cat > conftest.$ac_ext <<EOF
18596 #line 18597 "configure"
18597 #include "confdefs.h"
18598
18599 #ifdef HAVE_DB_185_H
18600 # include <db_185.h>
18601 #else
18602 # include <db.h>
18603 #endif
18604
18605 #ifndef DB_VERSION_MAJOR
18606 # define DB_VERSION_MAJOR 1
18607 #endif
18608
18609 #ifndef NULL
18610 #define NULL ((void*)0)
18611 #endif
18612
18613 int main() {
18614
18615 #if DB_VERSION_MAJOR > 1
18616         {
18617                 char *version;
18618                 int major, minor, patch;
18619
18620                 version = db_version( &major, &minor, &patch );
18621
18622                 if( major != DB_VERSION_MAJOR ||
18623                         minor < DB_VERSION_MINOR )
18624                 {
18625                         printf("Berkeley DB version mismatch\n"
18626                                 "\texpected: %s\n\tgot: %s\n",
18627                                 DB_VERSION_STRING, version);
18628                         return 1;
18629                 }
18630         }
18631 #endif
18632
18633 #if DB_VERSION_MAJOR > 2
18634         db_env_create( NULL, 0 );
18635 #elif DB_VERSION_MAJOR > 1
18636         db_appexit( NULL );
18637 #else
18638         (void) dbopen( NULL, 0, 0, 0, NULL);
18639 #endif
18640
18641 ; return 0; }
18642 EOF
18643 if { (eval echo configure:18644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18644   rm -rf conftest*
18645   ol_cv_db_db2=yes
18646 else
18647   echo "configure: failed program was:" >&5
18648   cat conftest.$ac_ext >&5
18649   rm -rf conftest*
18650   ol_cv_db_db2=no
18651 fi
18652 rm -f conftest*
18653
18654         LIBS="$ol_LIBS"
18655
18656 fi
18657
18658 echo "$ac_t""$ol_cv_db_db2" 1>&6
18659
18660         if test $ol_cv_db_db2 = yes ; then
18661                 ol_cv_lib_db=-ldb2
18662         fi
18663 fi
18664
18665 if test $ol_cv_lib_db = no ; then
18666         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18667 echo "configure:18668: checking for Berkeley DB link (-ldb-2)" >&5
18668 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18669   echo $ac_n "(cached) $ac_c" 1>&6
18670 else
18671   
18672         ol_DB_LIB=-ldb-2
18673         ol_LIBS=$LIBS
18674         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18675
18676         cat > conftest.$ac_ext <<EOF
18677 #line 18678 "configure"
18678 #include "confdefs.h"
18679
18680 #ifdef HAVE_DB_185_H
18681 # include <db_185.h>
18682 #else
18683 # include <db.h>
18684 #endif
18685
18686 #ifndef DB_VERSION_MAJOR
18687 # define DB_VERSION_MAJOR 1
18688 #endif
18689
18690 #ifndef NULL
18691 #define NULL ((void*)0)
18692 #endif
18693
18694 int main() {
18695
18696 #if DB_VERSION_MAJOR > 1
18697         {
18698                 char *version;
18699                 int major, minor, patch;
18700
18701                 version = db_version( &major, &minor, &patch );
18702
18703                 if( major != DB_VERSION_MAJOR ||
18704                         minor < DB_VERSION_MINOR )
18705                 {
18706                         printf("Berkeley DB version mismatch\n"
18707                                 "\texpected: %s\n\tgot: %s\n",
18708                                 DB_VERSION_STRING, version);
18709                         return 1;
18710                 }
18711         }
18712 #endif
18713
18714 #if DB_VERSION_MAJOR > 2
18715         db_env_create( NULL, 0 );
18716 #elif DB_VERSION_MAJOR > 1
18717         db_appexit( NULL );
18718 #else
18719         (void) dbopen( NULL, 0, 0, 0, NULL);
18720 #endif
18721
18722 ; return 0; }
18723 EOF
18724 if { (eval echo configure:18725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18725   rm -rf conftest*
18726   ol_cv_db_db_2=yes
18727 else
18728   echo "configure: failed program was:" >&5
18729   cat conftest.$ac_ext >&5
18730   rm -rf conftest*
18731   ol_cv_db_db_2=no
18732 fi
18733 rm -f conftest*
18734
18735         LIBS="$ol_LIBS"
18736
18737 fi
18738
18739 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18740
18741         if test $ol_cv_db_db_2 = yes ; then
18742                 ol_cv_lib_db=-ldb-2
18743         fi
18744 fi
18745
18746 if test $ol_cv_lib_db = no ; then
18747         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18748 echo "configure:18749: checking for Berkeley DB link (-ldb1)" >&5
18749 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18750   echo $ac_n "(cached) $ac_c" 1>&6
18751 else
18752   
18753         ol_DB_LIB=-ldb1
18754         ol_LIBS=$LIBS
18755         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18756
18757         cat > conftest.$ac_ext <<EOF
18758 #line 18759 "configure"
18759 #include "confdefs.h"
18760
18761 #ifdef HAVE_DB_185_H
18762 # include <db_185.h>
18763 #else
18764 # include <db.h>
18765 #endif
18766
18767 #ifndef DB_VERSION_MAJOR
18768 # define DB_VERSION_MAJOR 1
18769 #endif
18770
18771 #ifndef NULL
18772 #define NULL ((void*)0)
18773 #endif
18774
18775 int main() {
18776
18777 #if DB_VERSION_MAJOR > 1
18778         {
18779                 char *version;
18780                 int major, minor, patch;
18781
18782                 version = db_version( &major, &minor, &patch );
18783
18784                 if( major != DB_VERSION_MAJOR ||
18785                         minor < DB_VERSION_MINOR )
18786                 {
18787                         printf("Berkeley DB version mismatch\n"
18788                                 "\texpected: %s\n\tgot: %s\n",
18789                                 DB_VERSION_STRING, version);
18790                         return 1;
18791                 }
18792         }
18793 #endif
18794
18795 #if DB_VERSION_MAJOR > 2
18796         db_env_create( NULL, 0 );
18797 #elif DB_VERSION_MAJOR > 1
18798         db_appexit( NULL );
18799 #else
18800         (void) dbopen( NULL, 0, 0, 0, NULL);
18801 #endif
18802
18803 ; return 0; }
18804 EOF
18805 if { (eval echo configure:18806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18806   rm -rf conftest*
18807   ol_cv_db_db1=yes
18808 else
18809   echo "configure: failed program was:" >&5
18810   cat conftest.$ac_ext >&5
18811   rm -rf conftest*
18812   ol_cv_db_db1=no
18813 fi
18814 rm -f conftest*
18815
18816         LIBS="$ol_LIBS"
18817
18818 fi
18819
18820 echo "$ac_t""$ol_cv_db_db1" 1>&6
18821
18822         if test $ol_cv_db_db1 = yes ; then
18823                 ol_cv_lib_db=-ldb1
18824         fi
18825 fi
18826
18827 if test $ol_cv_lib_db = no ; then
18828         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18829 echo "configure:18830: checking for Berkeley DB link (-ldb-1)" >&5
18830 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18831   echo $ac_n "(cached) $ac_c" 1>&6
18832 else
18833   
18834         ol_DB_LIB=-ldb-1
18835         ol_LIBS=$LIBS
18836         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18837
18838         cat > conftest.$ac_ext <<EOF
18839 #line 18840 "configure"
18840 #include "confdefs.h"
18841
18842 #ifdef HAVE_DB_185_H
18843 # include <db_185.h>
18844 #else
18845 # include <db.h>
18846 #endif
18847
18848 #ifndef DB_VERSION_MAJOR
18849 # define DB_VERSION_MAJOR 1
18850 #endif
18851
18852 #ifndef NULL
18853 #define NULL ((void*)0)
18854 #endif
18855
18856 int main() {
18857
18858 #if DB_VERSION_MAJOR > 1
18859         {
18860                 char *version;
18861                 int major, minor, patch;
18862
18863                 version = db_version( &major, &minor, &patch );
18864
18865                 if( major != DB_VERSION_MAJOR ||
18866                         minor < DB_VERSION_MINOR )
18867                 {
18868                         printf("Berkeley DB version mismatch\n"
18869                                 "\texpected: %s\n\tgot: %s\n",
18870                                 DB_VERSION_STRING, version);
18871                         return 1;
18872                 }
18873         }
18874 #endif
18875
18876 #if DB_VERSION_MAJOR > 2
18877         db_env_create( NULL, 0 );
18878 #elif DB_VERSION_MAJOR > 1
18879         db_appexit( NULL );
18880 #else
18881         (void) dbopen( NULL, 0, 0, 0, NULL);
18882 #endif
18883
18884 ; return 0; }
18885 EOF
18886 if { (eval echo configure:18887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18887   rm -rf conftest*
18888   ol_cv_db_db_1=yes
18889 else
18890   echo "configure: failed program was:" >&5
18891   cat conftest.$ac_ext >&5
18892   rm -rf conftest*
18893   ol_cv_db_db_1=no
18894 fi
18895 rm -f conftest*
18896
18897         LIBS="$ol_LIBS"
18898
18899 fi
18900
18901 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18902
18903         if test $ol_cv_db_db_1 = yes ; then
18904                 ol_cv_lib_db=-ldb-1
18905         fi
18906 fi
18907
18908
18909         if test "$ol_cv_lib_db" != no ; then
18910                 ol_cv_berkeley_db=yes
18911                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18912 echo "configure:18913: checking for Berkeley DB thread support" >&5
18913 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18914   echo $ac_n "(cached) $ac_c" 1>&6
18915 else
18916   
18917         ol_LIBS="$LIBS"
18918         LIBS="$LTHREAD_LIBS $LIBS"
18919         if test $ol_cv_lib_db != yes ; then
18920                 LIBS="$ol_cv_lib_db $LIBS"
18921         fi
18922
18923         if test "$cross_compiling" = yes; then
18924   ol_cv_berkeley_db_thread=cross
18925 else
18926   cat > conftest.$ac_ext <<EOF
18927 #line 18928 "configure"
18928 #include "confdefs.h"
18929
18930 #ifdef HAVE_DB_185_H
18931         choke me;
18932 #else
18933 #include <db.h>
18934 #endif
18935 #ifndef NULL
18936 #define NULL ((void *)0)
18937 #endif
18938 main()
18939 {
18940         int rc;
18941         u_int32_t flags = DB_CREATE |
18942 #ifdef DB_PRIVATE
18943                 DB_PRIVATE |
18944 #endif
18945                 DB_THREAD;
18946
18947 #if DB_VERSION_MAJOR > 2
18948         DB_ENV *env = NULL;
18949
18950         rc = db_env_create( &env, 0 );
18951
18952         flags |= DB_INIT_MPOOL;
18953 #ifdef DB_MPOOL_PRIVATE
18954         flags |= DB_MPOOL_PRIVATE;
18955 #endif
18956
18957         if( rc ) {
18958                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18959                 return rc;
18960         }
18961
18962 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18963         rc = env->open( env, NULL, flags, 0 );
18964 #else
18965         rc = env->open( env, NULL, NULL, flags, 0 );
18966 #endif
18967
18968         if ( rc == 0 ) {
18969                 rc = env->close( env, 0 );
18970         }
18971
18972         if( rc ) {
18973                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18974                 return rc;
18975         }
18976
18977 #else
18978         DB_ENV env;
18979         memset( &env, '\0', sizeof(env) );
18980
18981         rc = db_appinit( NULL, NULL, &env, flags );
18982
18983         if( rc == 0 ) {
18984                 db_appexit( &env );
18985         }
18986
18987         unlink("__db_mpool.share");
18988         unlink("__db_lock.share");
18989 #endif
18990
18991         return rc;
18992 }
18993 EOF
18994 if { (eval echo configure:18995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18995 then
18996   ol_cv_berkeley_db_thread=yes
18997 else
18998   echo "configure: failed program was:" >&5
18999   cat conftest.$ac_ext >&5
19000   rm -fr conftest*
19001   ol_cv_berkeley_db_thread=no
19002 fi
19003 rm -fr conftest*
19004 fi
19005
19006
19007         LIBS="$ol_LIBS"
19008
19009 fi
19010
19011 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19012
19013         if test $ol_cv_berkeley_db_thread != no ; then
19014                 cat >> confdefs.h <<\EOF
19015 #define HAVE_BERKELEY_DB_THREAD 1
19016 EOF
19017
19018         fi
19019
19020         fi
19021 fi
19022
19023         fi
19024
19025         if test $ol_cv_berkeley_db != no ; then
19026                 cat >> confdefs.h <<\EOF
19027 #define HAVE_BERKELEY_DB 1
19028 EOF
19029
19030
19031                 ol_link_ldbm=berkeley
19032                 ol_with_ldbm_api=berkeley
19033
19034                 if test $ol_with_ldbm_type = hash ; then
19035                         cat >> confdefs.h <<\EOF
19036 #define LDBM_USE_DBHASH 1
19037 EOF
19038
19039                 else
19040                         cat >> confdefs.h <<\EOF
19041 #define LDBM_USE_DBBTREE 1
19042 EOF
19043
19044                 fi
19045
19046                                                 if test $ol_cv_lib_db != yes ; then
19047                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19048                 fi
19049         fi
19050 fi
19051
19052 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19053         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19054 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19055         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19056 echo "configure:19057: checking Berkeley DB version for BDB backend" >&5
19057 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19058   echo $ac_n "(cached) $ac_c" 1>&6
19059 else
19060   
19061         cat > conftest.$ac_ext <<EOF
19062 #line 19063 "configure"
19063 #include "confdefs.h"
19064
19065 #include <db.h>
19066
19067  /* this check could be improved */
19068 #ifndef DB_VERSION_MAJOR
19069 #       define DB_VERSION_MAJOR 1
19070 #endif
19071 #ifndef DB_VERSION_MINOR
19072 #       define DB_VERSION_MINOR 0
19073 #endif
19074
19075 /* require 4.1 or later */
19076 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19077         __db_version_compat
19078 #endif
19079         
19080 EOF
19081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19082   egrep "__db_version_compat" >/dev/null 2>&1; then
19083   rm -rf conftest*
19084   ol_cv_bdb_compat=yes
19085 else
19086   rm -rf conftest*
19087   ol_cv_bdb_compat=no
19088 fi
19089 rm -f conftest*
19090
19091 fi
19092
19093 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19094
19095
19096         if test $ol_cv_bdb_compat = yes ; then
19097                 ol_enable_bdb=yes
19098         elif test $ol_enable_bdb = yes ; then
19099                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19100         else
19101                 ol_enable_bdb=no
19102         fi
19103 fi
19104
19105 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19106         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19107         ol_with_ldbm_api=none
19108 fi
19109
19110 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19111         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19112 echo "configure:19113: checking for MDBM library" >&5
19113 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19114   echo $ac_n "(cached) $ac_c" 1>&6
19115 else
19116         ol_LIBS="$LIBS"
19117         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19118 echo "configure:19119: checking for mdbm_set_chain" >&5
19119 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19120   echo $ac_n "(cached) $ac_c" 1>&6
19121 else
19122   cat > conftest.$ac_ext <<EOF
19123 #line 19124 "configure"
19124 #include "confdefs.h"
19125 /* System header to define __stub macros and hopefully few prototypes,
19126     which can conflict with char mdbm_set_chain(); below.  */
19127 #include <assert.h>
19128 /* Override any gcc2 internal prototype to avoid an error.  */
19129 /* We use char because int might match the return type of a gcc2
19130     builtin and then its argument prototype would still apply.  */
19131 char mdbm_set_chain();
19132 char (*f)();
19133
19134 int main() {
19135
19136 /* The GNU C library defines this for functions which it implements
19137     to always fail with ENOSYS.  Some functions are actually named
19138     something starting with __ and the normal name is an alias.  */
19139 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19140 choke me
19141 #else
19142 f = mdbm_set_chain;
19143 #endif
19144
19145 ; return 0; }
19146 EOF
19147 if { (eval echo configure:19148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19148   rm -rf conftest*
19149   eval "ac_cv_func_mdbm_set_chain=yes"
19150 else
19151   echo "configure: failed program was:" >&5
19152   cat conftest.$ac_ext >&5
19153   rm -rf conftest*
19154   eval "ac_cv_func_mdbm_set_chain=no"
19155 fi
19156 rm -f conftest*
19157 fi
19158
19159 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19160   echo "$ac_t""yes" 1>&6
19161   ol_cv_lib_mdbm=yes
19162 else
19163   echo "$ac_t""no" 1>&6
19164
19165                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19166 echo "configure:19167: checking for mdbm_set_chain in -lmdbm" >&5
19167 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19168 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19169   echo $ac_n "(cached) $ac_c" 1>&6
19170 else
19171   ac_save_LIBS="$LIBS"
19172 LIBS="-lmdbm  $LIBS"
19173 cat > conftest.$ac_ext <<EOF
19174 #line 19175 "configure"
19175 #include "confdefs.h"
19176 /* Override any gcc2 internal prototype to avoid an error.  */
19177 /* We use char because int might match the return type of a gcc2
19178     builtin and then its argument prototype would still apply.  */
19179 char mdbm_set_chain();
19180
19181 int main() {
19182 mdbm_set_chain()
19183 ; return 0; }
19184 EOF
19185 if { (eval echo configure:19186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19186   rm -rf conftest*
19187   eval "ac_cv_lib_$ac_lib_var=yes"
19188 else
19189   echo "configure: failed program was:" >&5
19190   cat conftest.$ac_ext >&5
19191   rm -rf conftest*
19192   eval "ac_cv_lib_$ac_lib_var=no"
19193 fi
19194 rm -f conftest*
19195 LIBS="$ac_save_LIBS"
19196
19197 fi
19198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19199   echo "$ac_t""yes" 1>&6
19200   ol_cv_lib_mdbm=-lmdbm
19201 else
19202   echo "$ac_t""no" 1>&6
19203 ol_cv_lib_mdbm=no
19204 fi
19205
19206         
19207 fi
19208
19209         LIBS="$ol_LIBS"
19210
19211 fi
19212
19213 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19214
19215
19216  for ac_hdr in mdbm.h
19217 do
19218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19220 echo "configure:19221: checking for $ac_hdr" >&5
19221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19222   echo $ac_n "(cached) $ac_c" 1>&6
19223 else
19224   cat > conftest.$ac_ext <<EOF
19225 #line 19226 "configure"
19226 #include "confdefs.h"
19227 #include <$ac_hdr>
19228 EOF
19229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19230 { (eval echo configure:19231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19232 if test -z "$ac_err"; then
19233   rm -rf conftest*
19234   eval "ac_cv_header_$ac_safe=yes"
19235 else
19236   echo "$ac_err" >&5
19237   echo "configure: failed program was:" >&5
19238   cat conftest.$ac_ext >&5
19239   rm -rf conftest*
19240   eval "ac_cv_header_$ac_safe=no"
19241 fi
19242 rm -f conftest*
19243 fi
19244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19245   echo "$ac_t""yes" 1>&6
19246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19247   cat >> confdefs.h <<EOF
19248 #define $ac_tr_hdr 1
19249 EOF
19250  
19251 else
19252   echo "$ac_t""no" 1>&6
19253 fi
19254 done
19255
19256  echo $ac_n "checking for db""... $ac_c" 1>&6
19257 echo "configure:19258: checking for db" >&5
19258 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19259   echo $ac_n "(cached) $ac_c" 1>&6
19260 else
19261   
19262         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19263                 ol_cv_mdbm=no
19264         else
19265                 ol_cv_mdbm=yes
19266         fi
19267
19268 fi
19269
19270 echo "$ac_t""$ol_cv_mdbm" 1>&6
19271  if test $ol_cv_mdbm = yes ; then
19272         cat >> confdefs.h <<\EOF
19273 #define HAVE_MDBM 1
19274 EOF
19275
19276  fi
19277
19278
19279         if test $ol_cv_mdbm = yes ; then
19280                 ol_link_ldbm=mdbm
19281                 ol_with_ldbm_api=mdbm
19282                 if test $ol_cv_lib_mdbm != yes ; then
19283                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19284                 fi
19285         fi
19286 fi
19287
19288 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19289         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19290 echo "configure:19291: checking for GDBM library" >&5
19291 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19292   echo $ac_n "(cached) $ac_c" 1>&6
19293 else
19294         ol_LIBS="$LIBS"
19295         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19296 echo "configure:19297: checking for gdbm_open" >&5
19297 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19298   echo $ac_n "(cached) $ac_c" 1>&6
19299 else
19300   cat > conftest.$ac_ext <<EOF
19301 #line 19302 "configure"
19302 #include "confdefs.h"
19303 /* System header to define __stub macros and hopefully few prototypes,
19304     which can conflict with char gdbm_open(); below.  */
19305 #include <assert.h>
19306 /* Override any gcc2 internal prototype to avoid an error.  */
19307 /* We use char because int might match the return type of a gcc2
19308     builtin and then its argument prototype would still apply.  */
19309 char gdbm_open();
19310 char (*f)();
19311
19312 int main() {
19313
19314 /* The GNU C library defines this for functions which it implements
19315     to always fail with ENOSYS.  Some functions are actually named
19316     something starting with __ and the normal name is an alias.  */
19317 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19318 choke me
19319 #else
19320 f = gdbm_open;
19321 #endif
19322
19323 ; return 0; }
19324 EOF
19325 if { (eval echo configure:19326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19326   rm -rf conftest*
19327   eval "ac_cv_func_gdbm_open=yes"
19328 else
19329   echo "configure: failed program was:" >&5
19330   cat conftest.$ac_ext >&5
19331   rm -rf conftest*
19332   eval "ac_cv_func_gdbm_open=no"
19333 fi
19334 rm -f conftest*
19335 fi
19336
19337 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19338   echo "$ac_t""yes" 1>&6
19339   ol_cv_lib_gdbm=yes
19340 else
19341   echo "$ac_t""no" 1>&6
19342
19343                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19344 echo "configure:19345: checking for gdbm_open in -lgdbm" >&5
19345 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19347   echo $ac_n "(cached) $ac_c" 1>&6
19348 else
19349   ac_save_LIBS="$LIBS"
19350 LIBS="-lgdbm  $LIBS"
19351 cat > conftest.$ac_ext <<EOF
19352 #line 19353 "configure"
19353 #include "confdefs.h"
19354 /* Override any gcc2 internal prototype to avoid an error.  */
19355 /* We use char because int might match the return type of a gcc2
19356     builtin and then its argument prototype would still apply.  */
19357 char gdbm_open();
19358
19359 int main() {
19360 gdbm_open()
19361 ; return 0; }
19362 EOF
19363 if { (eval echo configure:19364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19364   rm -rf conftest*
19365   eval "ac_cv_lib_$ac_lib_var=yes"
19366 else
19367   echo "configure: failed program was:" >&5
19368   cat conftest.$ac_ext >&5
19369   rm -rf conftest*
19370   eval "ac_cv_lib_$ac_lib_var=no"
19371 fi
19372 rm -f conftest*
19373 LIBS="$ac_save_LIBS"
19374
19375 fi
19376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19377   echo "$ac_t""yes" 1>&6
19378   ol_cv_lib_gdbm=-lgdbm
19379 else
19380   echo "$ac_t""no" 1>&6
19381 ol_cv_lib_gdbm=no
19382 fi
19383
19384         
19385 fi
19386
19387         LIBS="$ol_LIBS"
19388
19389 fi
19390
19391 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19392
19393
19394  for ac_hdr in gdbm.h
19395 do
19396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19398 echo "configure:19399: checking for $ac_hdr" >&5
19399 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19400   echo $ac_n "(cached) $ac_c" 1>&6
19401 else
19402   cat > conftest.$ac_ext <<EOF
19403 #line 19404 "configure"
19404 #include "confdefs.h"
19405 #include <$ac_hdr>
19406 EOF
19407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19408 { (eval echo configure:19409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19410 if test -z "$ac_err"; then
19411   rm -rf conftest*
19412   eval "ac_cv_header_$ac_safe=yes"
19413 else
19414   echo "$ac_err" >&5
19415   echo "configure: failed program was:" >&5
19416   cat conftest.$ac_ext >&5
19417   rm -rf conftest*
19418   eval "ac_cv_header_$ac_safe=no"
19419 fi
19420 rm -f conftest*
19421 fi
19422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19423   echo "$ac_t""yes" 1>&6
19424     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19425   cat >> confdefs.h <<EOF
19426 #define $ac_tr_hdr 1
19427 EOF
19428  
19429 else
19430   echo "$ac_t""no" 1>&6
19431 fi
19432 done
19433
19434  echo $ac_n "checking for db""... $ac_c" 1>&6
19435 echo "configure:19436: checking for db" >&5
19436 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19437   echo $ac_n "(cached) $ac_c" 1>&6
19438 else
19439   
19440         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19441                 ol_cv_gdbm=no
19442         else
19443                 ol_cv_gdbm=yes
19444         fi
19445
19446 fi
19447
19448 echo "$ac_t""$ol_cv_gdbm" 1>&6
19449  if test $ol_cv_gdbm = yes ; then
19450         cat >> confdefs.h <<\EOF
19451 #define HAVE_GDBM 1
19452 EOF
19453
19454  fi
19455
19456
19457         if test $ol_cv_gdbm = yes ; then
19458                 ol_link_ldbm=gdbm
19459                 ol_with_ldbm_api=gdbm
19460
19461                 if test $ol_cv_lib_gdbm != yes ; then
19462                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19463                 fi
19464         fi
19465 fi
19466
19467 if test $ol_with_ldbm_api = ndbm ; then
19468         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19469 echo "configure:19470: checking for NDBM library" >&5
19470 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19471   echo $ac_n "(cached) $ac_c" 1>&6
19472 else
19473         ol_LIBS="$LIBS"
19474         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19475 echo "configure:19476: checking for dbm_open" >&5
19476 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19477   echo $ac_n "(cached) $ac_c" 1>&6
19478 else
19479   cat > conftest.$ac_ext <<EOF
19480 #line 19481 "configure"
19481 #include "confdefs.h"
19482 /* System header to define __stub macros and hopefully few prototypes,
19483     which can conflict with char dbm_open(); below.  */
19484 #include <assert.h>
19485 /* Override any gcc2 internal prototype to avoid an error.  */
19486 /* We use char because int might match the return type of a gcc2
19487     builtin and then its argument prototype would still apply.  */
19488 char dbm_open();
19489 char (*f)();
19490
19491 int main() {
19492
19493 /* The GNU C library defines this for functions which it implements
19494     to always fail with ENOSYS.  Some functions are actually named
19495     something starting with __ and the normal name is an alias.  */
19496 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19497 choke me
19498 #else
19499 f = dbm_open;
19500 #endif
19501
19502 ; return 0; }
19503 EOF
19504 if { (eval echo configure:19505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19505   rm -rf conftest*
19506   eval "ac_cv_func_dbm_open=yes"
19507 else
19508   echo "configure: failed program was:" >&5
19509   cat conftest.$ac_ext >&5
19510   rm -rf conftest*
19511   eval "ac_cv_func_dbm_open=no"
19512 fi
19513 rm -f conftest*
19514 fi
19515
19516 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19517   echo "$ac_t""yes" 1>&6
19518   ol_cv_lib_ndbm=yes
19519 else
19520   echo "$ac_t""no" 1>&6
19521
19522                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19523 echo "configure:19524: checking for dbm_open in -lndbm" >&5
19524 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19525 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19526   echo $ac_n "(cached) $ac_c" 1>&6
19527 else
19528   ac_save_LIBS="$LIBS"
19529 LIBS="-lndbm  $LIBS"
19530 cat > conftest.$ac_ext <<EOF
19531 #line 19532 "configure"
19532 #include "confdefs.h"
19533 /* Override any gcc2 internal prototype to avoid an error.  */
19534 /* We use char because int might match the return type of a gcc2
19535     builtin and then its argument prototype would still apply.  */
19536 char dbm_open();
19537
19538 int main() {
19539 dbm_open()
19540 ; return 0; }
19541 EOF
19542 if { (eval echo configure:19543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19543   rm -rf conftest*
19544   eval "ac_cv_lib_$ac_lib_var=yes"
19545 else
19546   echo "configure: failed program was:" >&5
19547   cat conftest.$ac_ext >&5
19548   rm -rf conftest*
19549   eval "ac_cv_lib_$ac_lib_var=no"
19550 fi
19551 rm -f conftest*
19552 LIBS="$ac_save_LIBS"
19553
19554 fi
19555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19556   echo "$ac_t""yes" 1>&6
19557   ol_cv_lib_ndbm=-lndbm
19558 else
19559   echo "$ac_t""no" 1>&6
19560
19561                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19562 echo "configure:19563: checking for dbm_open in -ldbm" >&5
19563 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19565   echo $ac_n "(cached) $ac_c" 1>&6
19566 else
19567   ac_save_LIBS="$LIBS"
19568 LIBS="-ldbm  $LIBS"
19569 cat > conftest.$ac_ext <<EOF
19570 #line 19571 "configure"
19571 #include "confdefs.h"
19572 /* Override any gcc2 internal prototype to avoid an error.  */
19573 /* We use char because int might match the return type of a gcc2
19574     builtin and then its argument prototype would still apply.  */
19575 char dbm_open();
19576
19577 int main() {
19578 dbm_open()
19579 ; return 0; }
19580 EOF
19581 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19582   rm -rf conftest*
19583   eval "ac_cv_lib_$ac_lib_var=yes"
19584 else
19585   echo "configure: failed program was:" >&5
19586   cat conftest.$ac_ext >&5
19587   rm -rf conftest*
19588   eval "ac_cv_lib_$ac_lib_var=no"
19589 fi
19590 rm -f conftest*
19591 LIBS="$ac_save_LIBS"
19592
19593 fi
19594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19595   echo "$ac_t""yes" 1>&6
19596   ol_cv_lib_ndbm=-ldbm
19597 else
19598   echo "$ac_t""no" 1>&6
19599 ol_cv_lib_ndbm=no
19600 fi
19601                 
19602 fi
19603
19604         
19605 fi
19606
19607         LIBS="$ol_LIBS"
19608
19609 fi
19610
19611 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19612
19613
19614  for ac_hdr in ndbm.h
19615 do
19616 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19617 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19618 echo "configure:19619: checking for $ac_hdr" >&5
19619 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19620   echo $ac_n "(cached) $ac_c" 1>&6
19621 else
19622   cat > conftest.$ac_ext <<EOF
19623 #line 19624 "configure"
19624 #include "confdefs.h"
19625 #include <$ac_hdr>
19626 EOF
19627 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19628 { (eval echo configure:19629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19629 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19630 if test -z "$ac_err"; then
19631   rm -rf conftest*
19632   eval "ac_cv_header_$ac_safe=yes"
19633 else
19634   echo "$ac_err" >&5
19635   echo "configure: failed program was:" >&5
19636   cat conftest.$ac_ext >&5
19637   rm -rf conftest*
19638   eval "ac_cv_header_$ac_safe=no"
19639 fi
19640 rm -f conftest*
19641 fi
19642 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19643   echo "$ac_t""yes" 1>&6
19644     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19645   cat >> confdefs.h <<EOF
19646 #define $ac_tr_hdr 1
19647 EOF
19648  
19649 else
19650   echo "$ac_t""no" 1>&6
19651 fi
19652 done
19653
19654  echo $ac_n "checking for db""... $ac_c" 1>&6
19655 echo "configure:19656: checking for db" >&5
19656 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19657   echo $ac_n "(cached) $ac_c" 1>&6
19658 else
19659   
19660         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19661                 ol_cv_ndbm=no
19662         else
19663                 ol_cv_ndbm=yes
19664         fi
19665
19666 fi
19667
19668 echo "$ac_t""$ol_cv_ndbm" 1>&6
19669  if test $ol_cv_ndbm = yes ; then
19670         cat >> confdefs.h <<\EOF
19671 #define HAVE_NDBM 1
19672 EOF
19673
19674  fi
19675
19676
19677         if test $ol_cv_ndbm = yes ; then
19678                 ol_link_ldbm=ndbm
19679                 ol_with_ldbm_api=ndbm
19680
19681                 if test $ol_cv_lib_ndbm != yes ; then
19682                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19683                 fi
19684         fi
19685 fi
19686
19687 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19688         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19689         if test $ol_enable_ldbm = yes ; then
19690                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19691         fi
19692
19693         echo "configure: warning: disabling LDBM" 1>&2
19694         ol_enable_ldbm=no
19695 fi
19696
19697
19698 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19699         BUILD_LIBS_DYNAMIC=shared
19700         cat >> confdefs.h <<\EOF
19701 #define LDAP_LIBS_DYNAMIC 1
19702 EOF
19703
19704         LTSTATIC=""
19705 else
19706         BUILD_LIBS_DYNAMIC=static
19707         LTSTATIC="-static"
19708 fi
19709
19710 if test $ol_enable_wrappers != no ; then
19711         for ac_hdr in tcpd.h
19712 do
19713 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19714 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19715 echo "configure:19716: checking for $ac_hdr" >&5
19716 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19717   echo $ac_n "(cached) $ac_c" 1>&6
19718 else
19719   cat > conftest.$ac_ext <<EOF
19720 #line 19721 "configure"
19721 #include "confdefs.h"
19722 #include <$ac_hdr>
19723 EOF
19724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19725 { (eval echo configure:19726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19727 if test -z "$ac_err"; then
19728   rm -rf conftest*
19729   eval "ac_cv_header_$ac_safe=yes"
19730 else
19731   echo "$ac_err" >&5
19732   echo "configure: failed program was:" >&5
19733   cat conftest.$ac_ext >&5
19734   rm -rf conftest*
19735   eval "ac_cv_header_$ac_safe=no"
19736 fi
19737 rm -f conftest*
19738 fi
19739 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19740   echo "$ac_t""yes" 1>&6
19741     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19742   cat >> confdefs.h <<EOF
19743 #define $ac_tr_hdr 1
19744 EOF
19745  
19746                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19747 echo "configure:19748: checking for TCP wrappers library" >&5
19748                 save_LIBS="$LIBS"
19749                 LIBS="$LIBS -lwrap"
19750                 cat > conftest.$ac_ext <<EOF
19751 #line 19752 "configure"
19752 #include "confdefs.h"
19753
19754 #include <tcpd.h>
19755 int allow_severity = 0;
19756 int deny_severity  = 0;
19757
19758 struct request_info *req;
19759                 
19760 int main() {
19761
19762 hosts_access(req)
19763                 
19764 ; return 0; }
19765 EOF
19766 if { (eval echo configure:19767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19767   rm -rf conftest*
19768   echo "$ac_t""-lwrap" 1>&6
19769                 have_wrappers=yes
19770                 LIBS="$save_LIBS"
19771 else
19772   echo "configure: failed program was:" >&5
19773   cat conftest.$ac_ext >&5
19774   rm -rf conftest*
19775   
19776                                 LIBS="$LIBS -lnsl"
19777                 cat > conftest.$ac_ext <<EOF
19778 #line 19779 "configure"
19779 #include "confdefs.h"
19780
19781 #include <tcpd.h>
19782 int allow_severity = 0;
19783 int deny_severity  = 0;
19784
19785 struct request_info *req;
19786                 
19787 int main() {
19788
19789 hosts_access(req)
19790                 
19791 ; return 0; }
19792 EOF
19793 if { (eval echo configure:19794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19794   rm -rf conftest*
19795   echo "$ac_t""-lwrap -lnsl" 1>&6
19796                 have_wrappers=yes
19797                 LIBS="$save_LIBS -lnsl"
19798 else
19799   echo "configure: failed program was:" >&5
19800   cat conftest.$ac_ext >&5
19801   rm -rf conftest*
19802   
19803                 echo "$ac_t""no" 1>&6
19804                 have_wrappers=no
19805                 LIBS=$save_LIBS
19806 fi
19807 rm -f conftest*
19808 fi
19809 rm -f conftest*
19810 else
19811   echo "$ac_t""no" 1>&6
19812 have_wrappers=no
19813 fi
19814 done
19815
19816
19817         if test $have_wrappers = yes ; then
19818                 cat >> confdefs.h <<\EOF
19819 #define HAVE_TCPD 1
19820 EOF
19821
19822                 WRAP_LIBS="-lwrap"
19823         elif test $ol_enable_wrappers = yes ; then
19824                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19825         else
19826                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19827                 WRAP_LIBS=""
19828         fi
19829 fi
19830
19831 if test $ol_enable_syslog != no ; then
19832         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19833 echo "configure:19834: checking for openlog" >&5
19834 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19835   echo $ac_n "(cached) $ac_c" 1>&6
19836 else
19837   cat > conftest.$ac_ext <<EOF
19838 #line 19839 "configure"
19839 #include "confdefs.h"
19840 /* System header to define __stub macros and hopefully few prototypes,
19841     which can conflict with char openlog(); below.  */
19842 #include <assert.h>
19843 /* Override any gcc2 internal prototype to avoid an error.  */
19844 /* We use char because int might match the return type of a gcc2
19845     builtin and then its argument prototype would still apply.  */
19846 char openlog();
19847 char (*f)();
19848
19849 int main() {
19850
19851 /* The GNU C library defines this for functions which it implements
19852     to always fail with ENOSYS.  Some functions are actually named
19853     something starting with __ and the normal name is an alias.  */
19854 #if defined (__stub_openlog) || defined (__stub___openlog)
19855 choke me
19856 #else
19857 f = openlog;
19858 #endif
19859
19860 ; return 0; }
19861 EOF
19862 if { (eval echo configure:19863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19863   rm -rf conftest*
19864   eval "ac_cv_func_openlog=yes"
19865 else
19866   echo "configure: failed program was:" >&5
19867   cat conftest.$ac_ext >&5
19868   rm -rf conftest*
19869   eval "ac_cv_func_openlog=no"
19870 fi
19871 rm -f conftest*
19872 fi
19873
19874 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19875   echo "$ac_t""yes" 1>&6
19876   :
19877 else
19878   echo "$ac_t""no" 1>&6
19879 fi
19880
19881         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19882                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19883         fi
19884         ol_enable_syslog=$ac_cv_func_openlog
19885 fi
19886
19887
19888 ol_link_sql=no
19889 if test $ol_enable_sql != no ; then
19890         for ac_hdr in sql.h sqlext.h
19891 do
19892 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19893 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19894 echo "configure:19895: checking for $ac_hdr" >&5
19895 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19896   echo $ac_n "(cached) $ac_c" 1>&6
19897 else
19898   cat > conftest.$ac_ext <<EOF
19899 #line 19900 "configure"
19900 #include "confdefs.h"
19901 #include <$ac_hdr>
19902 EOF
19903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19904 { (eval echo configure:19905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19906 if test -z "$ac_err"; then
19907   rm -rf conftest*
19908   eval "ac_cv_header_$ac_safe=yes"
19909 else
19910   echo "$ac_err" >&5
19911   echo "configure: failed program was:" >&5
19912   cat conftest.$ac_ext >&5
19913   rm -rf conftest*
19914   eval "ac_cv_header_$ac_safe=no"
19915 fi
19916 rm -f conftest*
19917 fi
19918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19919   echo "$ac_t""yes" 1>&6
19920     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19921   cat >> confdefs.h <<EOF
19922 #define $ac_tr_hdr 1
19923 EOF
19924  
19925 else
19926   echo "$ac_t""no" 1>&6
19927 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19928         
19929 fi
19930 done
19931
19932
19933         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19934 echo "configure:19935: checking for SQLDriverConnect in -liodbc" >&5
19935 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19937   echo $ac_n "(cached) $ac_c" 1>&6
19938 else
19939   ac_save_LIBS="$LIBS"
19940 LIBS="-liodbc  $LIBS"
19941 cat > conftest.$ac_ext <<EOF
19942 #line 19943 "configure"
19943 #include "confdefs.h"
19944 /* Override any gcc2 internal prototype to avoid an error.  */
19945 /* We use char because int might match the return type of a gcc2
19946     builtin and then its argument prototype would still apply.  */
19947 char SQLDriverConnect();
19948
19949 int main() {
19950 SQLDriverConnect()
19951 ; return 0; }
19952 EOF
19953 if { (eval echo configure:19954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19954   rm -rf conftest*
19955   eval "ac_cv_lib_$ac_lib_var=yes"
19956 else
19957   echo "configure: failed program was:" >&5
19958   cat conftest.$ac_ext >&5
19959   rm -rf conftest*
19960   eval "ac_cv_lib_$ac_lib_var=no"
19961 fi
19962 rm -f conftest*
19963 LIBS="$ac_save_LIBS"
19964
19965 fi
19966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19967   echo "$ac_t""yes" 1>&6
19968   have_iodbc=yes
19969 else
19970   echo "$ac_t""no" 1>&6
19971 have_iodbc=no
19972 fi
19973
19974         if test $have_iodbc = yes ; then
19975                 ol_link_sql="-liodbc"
19976         else
19977                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19978 echo "configure:19979: checking for SQLDriverConnect in -lodbc" >&5
19979 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19981   echo $ac_n "(cached) $ac_c" 1>&6
19982 else
19983   ac_save_LIBS="$LIBS"
19984 LIBS="-lodbc  $LIBS"
19985 cat > conftest.$ac_ext <<EOF
19986 #line 19987 "configure"
19987 #include "confdefs.h"
19988 /* Override any gcc2 internal prototype to avoid an error.  */
19989 /* We use char because int might match the return type of a gcc2
19990     builtin and then its argument prototype would still apply.  */
19991 char SQLDriverConnect();
19992
19993 int main() {
19994 SQLDriverConnect()
19995 ; return 0; }
19996 EOF
19997 if { (eval echo configure:19998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19998   rm -rf conftest*
19999   eval "ac_cv_lib_$ac_lib_var=yes"
20000 else
20001   echo "configure: failed program was:" >&5
20002   cat conftest.$ac_ext >&5
20003   rm -rf conftest*
20004   eval "ac_cv_lib_$ac_lib_var=no"
20005 fi
20006 rm -f conftest*
20007 LIBS="$ac_save_LIBS"
20008
20009 fi
20010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20011   echo "$ac_t""yes" 1>&6
20012   have_odbc=yes
20013 else
20014   echo "$ac_t""no" 1>&6
20015 have_odbc=no
20016 fi
20017
20018                 if test $have_odbc = yes ; then
20019                         ol_link_sql="-lodbc"
20020                 fi
20021         fi
20022
20023         if test $ol_link_sql != no ; then
20024                 SLAPD_SQL_LIBS="$ol_link_sql"
20025
20026         elif test $ol_enable_sql != auto ; then
20027                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20028         fi
20029 fi
20030
20031 ol_link_termcap=no
20032 for ac_hdr in termcap.h ncurses.h
20033 do
20034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20036 echo "configure:20037: checking for $ac_hdr" >&5
20037 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20038   echo $ac_n "(cached) $ac_c" 1>&6
20039 else
20040   cat > conftest.$ac_ext <<EOF
20041 #line 20042 "configure"
20042 #include "confdefs.h"
20043 #include <$ac_hdr>
20044 EOF
20045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20046 { (eval echo configure:20047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20048 if test -z "$ac_err"; then
20049   rm -rf conftest*
20050   eval "ac_cv_header_$ac_safe=yes"
20051 else
20052   echo "$ac_err" >&5
20053   echo "configure: failed program was:" >&5
20054   cat conftest.$ac_ext >&5
20055   rm -rf conftest*
20056   eval "ac_cv_header_$ac_safe=no"
20057 fi
20058 rm -f conftest*
20059 fi
20060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20061   echo "$ac_t""yes" 1>&6
20062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20063   cat >> confdefs.h <<EOF
20064 #define $ac_tr_hdr 1
20065 EOF
20066  
20067 else
20068   echo "$ac_t""no" 1>&6
20069 fi
20070 done
20071
20072
20073 if test $ol_link_termcap = no ; then
20074         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20075 echo "configure:20076: checking for tputs in -ltermcap" >&5
20076 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20078   echo $ac_n "(cached) $ac_c" 1>&6
20079 else
20080   ac_save_LIBS="$LIBS"
20081 LIBS="-ltermcap  $LIBS"
20082 cat > conftest.$ac_ext <<EOF
20083 #line 20084 "configure"
20084 #include "confdefs.h"
20085 /* Override any gcc2 internal prototype to avoid an error.  */
20086 /* We use char because int might match the return type of a gcc2
20087     builtin and then its argument prototype would still apply.  */
20088 char tputs();
20089
20090 int main() {
20091 tputs()
20092 ; return 0; }
20093 EOF
20094 if { (eval echo configure:20095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20095   rm -rf conftest*
20096   eval "ac_cv_lib_$ac_lib_var=yes"
20097 else
20098   echo "configure: failed program was:" >&5
20099   cat conftest.$ac_ext >&5
20100   rm -rf conftest*
20101   eval "ac_cv_lib_$ac_lib_var=no"
20102 fi
20103 rm -f conftest*
20104 LIBS="$ac_save_LIBS"
20105
20106 fi
20107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20108   echo "$ac_t""yes" 1>&6
20109   have_termcap=yes
20110 else
20111   echo "$ac_t""no" 1>&6
20112 have_termcap=no
20113 fi
20114
20115         if test $have_termcap = yes ; then
20116                 cat >> confdefs.h <<\EOF
20117 #define HAVE_TERMCAP 1
20118 EOF
20119
20120                 ol_link_termcap=yes
20121                 TERMCAP_LIBS=-ltermcap
20122         fi
20123 fi
20124
20125 if test $ol_link_termcap = no ; then
20126         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20127 echo "configure:20128: checking for initscr in -lncurses" >&5
20128 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20129 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20130   echo $ac_n "(cached) $ac_c" 1>&6
20131 else
20132   ac_save_LIBS="$LIBS"
20133 LIBS="-lncurses  $LIBS"
20134 cat > conftest.$ac_ext <<EOF
20135 #line 20136 "configure"
20136 #include "confdefs.h"
20137 /* Override any gcc2 internal prototype to avoid an error.  */
20138 /* We use char because int might match the return type of a gcc2
20139     builtin and then its argument prototype would still apply.  */
20140 char initscr();
20141
20142 int main() {
20143 initscr()
20144 ; return 0; }
20145 EOF
20146 if { (eval echo configure:20147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20147   rm -rf conftest*
20148   eval "ac_cv_lib_$ac_lib_var=yes"
20149 else
20150   echo "configure: failed program was:" >&5
20151   cat conftest.$ac_ext >&5
20152   rm -rf conftest*
20153   eval "ac_cv_lib_$ac_lib_var=no"
20154 fi
20155 rm -f conftest*
20156 LIBS="$ac_save_LIBS"
20157
20158 fi
20159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20160   echo "$ac_t""yes" 1>&6
20161   have_ncurses=yes
20162 else
20163   echo "$ac_t""no" 1>&6
20164 have_ncurses=no
20165 fi
20166
20167         if test $have_ncurses = yes ; then
20168                 cat >> confdefs.h <<\EOF
20169 #define HAVE_NCURSES 1
20170 EOF
20171
20172                 ol_link_termcap=yes
20173                 TERMCAP_LIBS=-lncurses
20174         fi
20175 fi
20176
20177 if test $ol_link_termcap = no ; then
20178         cat >> confdefs.h <<\EOF
20179 #define NO_TERMCAP 1
20180 EOF
20181
20182         TERMCAP_LIBS=
20183 fi
20184
20185 ol_link_sasl=no
20186 ol_link_spasswd=no
20187 if test $ol_with_cyrus_sasl != no ; then
20188         for ac_hdr in sasl/sasl.h sasl.h
20189 do
20190 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20191 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20192 echo "configure:20193: checking for $ac_hdr" >&5
20193 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20194   echo $ac_n "(cached) $ac_c" 1>&6
20195 else
20196   cat > conftest.$ac_ext <<EOF
20197 #line 20198 "configure"
20198 #include "confdefs.h"
20199 #include <$ac_hdr>
20200 EOF
20201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20202 { (eval echo configure:20203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20204 if test -z "$ac_err"; then
20205   rm -rf conftest*
20206   eval "ac_cv_header_$ac_safe=yes"
20207 else
20208   echo "$ac_err" >&5
20209   echo "configure: failed program was:" >&5
20210   cat conftest.$ac_ext >&5
20211   rm -rf conftest*
20212   eval "ac_cv_header_$ac_safe=no"
20213 fi
20214 rm -f conftest*
20215 fi
20216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20217   echo "$ac_t""yes" 1>&6
20218     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20219   cat >> confdefs.h <<EOF
20220 #define $ac_tr_hdr 1
20221 EOF
20222  
20223 else
20224   echo "$ac_t""no" 1>&6
20225 fi
20226 done
20227
20228
20229         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20230                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20231 echo "configure:20232: checking for sasl_client_init in -lsasl2" >&5
20232 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20233 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20234   echo $ac_n "(cached) $ac_c" 1>&6
20235 else
20236   ac_save_LIBS="$LIBS"
20237 LIBS="-lsasl2  $LIBS"
20238 cat > conftest.$ac_ext <<EOF
20239 #line 20240 "configure"
20240 #include "confdefs.h"
20241 /* Override any gcc2 internal prototype to avoid an error.  */
20242 /* We use char because int might match the return type of a gcc2
20243     builtin and then its argument prototype would still apply.  */
20244 char sasl_client_init();
20245
20246 int main() {
20247 sasl_client_init()
20248 ; return 0; }
20249 EOF
20250 if { (eval echo configure:20251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20251   rm -rf conftest*
20252   eval "ac_cv_lib_$ac_lib_var=yes"
20253 else
20254   echo "configure: failed program was:" >&5
20255   cat conftest.$ac_ext >&5
20256   rm -rf conftest*
20257   eval "ac_cv_lib_$ac_lib_var=no"
20258 fi
20259 rm -f conftest*
20260 LIBS="$ac_save_LIBS"
20261
20262 fi
20263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20264   echo "$ac_t""yes" 1>&6
20265   ol_link_sasl="-lsasl2"
20266 else
20267   echo "$ac_t""no" 1>&6
20268 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20269 echo "configure:20270: checking for sasl_client_init in -lsasl" >&5
20270 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20271 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20272   echo $ac_n "(cached) $ac_c" 1>&6
20273 else
20274   ac_save_LIBS="$LIBS"
20275 LIBS="-lsasl  $LIBS"
20276 cat > conftest.$ac_ext <<EOF
20277 #line 20278 "configure"
20278 #include "confdefs.h"
20279 /* Override any gcc2 internal prototype to avoid an error.  */
20280 /* We use char because int might match the return type of a gcc2
20281     builtin and then its argument prototype would still apply.  */
20282 char sasl_client_init();
20283
20284 int main() {
20285 sasl_client_init()
20286 ; return 0; }
20287 EOF
20288 if { (eval echo configure:20289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20289   rm -rf conftest*
20290   eval "ac_cv_lib_$ac_lib_var=yes"
20291 else
20292   echo "configure: failed program was:" >&5
20293   cat conftest.$ac_ext >&5
20294   rm -rf conftest*
20295   eval "ac_cv_lib_$ac_lib_var=no"
20296 fi
20297 rm -f conftest*
20298 LIBS="$ac_save_LIBS"
20299
20300 fi
20301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20302   echo "$ac_t""yes" 1>&6
20303   ol_link_sasl="-lsasl"
20304 else
20305   echo "$ac_t""no" 1>&6
20306 fi
20307
20308 fi
20309
20310         fi
20311
20312         if test $ol_link_sasl = no ; then
20313                 if test $ol_with_cyrus_sasl != auto ; then
20314                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20315                 else
20316                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20317                         echo "configure: warning: SASL authentication not supported!" 1>&2
20318                         if test $ol_link_tls = no ; then
20319                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20320                         fi
20321                 fi
20322         else
20323                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20324 echo "configure:20325: checking Cyrus SASL library version" >&5
20325 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20326   echo $ac_n "(cached) $ac_c" 1>&6
20327 else
20328   
20329         cat > conftest.$ac_ext <<EOF
20330 #line 20331 "configure"
20331 #include "confdefs.h"
20332
20333 #ifdef HAVE_SASL_SASL_H
20334 #include <sasl/sasl.h>
20335 #else
20336 #include <sasl.h>
20337 #endif
20338
20339 /* require 2.1.3 or later */
20340 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20341         char *__sasl_compat = "1.5.x okay";
20342 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20343         char *__sasl_compat = "2.2+ or better okay (we guess)";
20344 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20345         && SASL_VERSION_STEP >=3
20346         char *__sasl_compat = "2.1.3+ or better okay";
20347 #endif
20348         
20349 EOF
20350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20351   egrep "__sasl_compat" >/dev/null 2>&1; then
20352   rm -rf conftest*
20353   ol_cv_sasl_compat=yes
20354 else
20355   rm -rf conftest*
20356   ol_cv_sasl_compat=no
20357 fi
20358 rm -f conftest*
20359
20360 fi
20361
20362 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20363
20364                 if test $ol_cv_sasl_compat = no ; then
20365                         ol_link_sasl=no
20366                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20367                 fi
20368
20369                 cat >> confdefs.h <<\EOF
20370 #define HAVE_CYRUS_SASL 1
20371 EOF
20372
20373                 SASL_LIBS="$ol_link_sasl"
20374                 if test $ol_enable_spasswd != no ; then
20375                         ol_link_spasswd=yes
20376                 fi
20377
20378                 ac_save_LIBS="$LIBS"
20379                 LIBS="$LIBS $ol_link_sasl"
20380                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20381 echo "configure:20382: checking for sasl_version" >&5
20382 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20383   echo $ac_n "(cached) $ac_c" 1>&6
20384 else
20385   cat > conftest.$ac_ext <<EOF
20386 #line 20387 "configure"
20387 #include "confdefs.h"
20388 /* System header to define __stub macros and hopefully few prototypes,
20389     which can conflict with char sasl_version(); below.  */
20390 #include <assert.h>
20391 /* Override any gcc2 internal prototype to avoid an error.  */
20392 /* We use char because int might match the return type of a gcc2
20393     builtin and then its argument prototype would still apply.  */
20394 char sasl_version();
20395 char (*f)();
20396
20397 int main() {
20398
20399 /* The GNU C library defines this for functions which it implements
20400     to always fail with ENOSYS.  Some functions are actually named
20401     something starting with __ and the normal name is an alias.  */
20402 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20403 choke me
20404 #else
20405 f = sasl_version;
20406 #endif
20407
20408 ; return 0; }
20409 EOF
20410 if { (eval echo configure:20411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20411   rm -rf conftest*
20412   eval "ac_cv_func_sasl_version=yes"
20413 else
20414   echo "configure: failed program was:" >&5
20415   cat conftest.$ac_ext >&5
20416   rm -rf conftest*
20417   eval "ac_cv_func_sasl_version=no"
20418 fi
20419 rm -f conftest*
20420 fi
20421
20422 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20423   echo "$ac_t""yes" 1>&6
20424   cat >> confdefs.h <<\EOF
20425 #define HAVE_SASL_VERSION 1
20426 EOF
20427
20428 else
20429   echo "$ac_t""no" 1>&6
20430 fi
20431
20432                 LIBS="$ac_save_LIBS"
20433         fi
20434
20435 else
20436         echo "configure: warning: SASL authentication not supported!" 1>&2
20437         if test $ol_link_tls = no ; then
20438                 echo "configure: warning: Strong authentication not supported!" 1>&2
20439         fi
20440 fi
20441
20442 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20443         dev=no
20444         if test -r /dev/urandom ; then
20445                 dev="/dev/urandom";
20446         elif test -r /idev/urandom ; then
20447                 dev="/idev/urandom";
20448         elif test -r /dev/srandom ; then
20449                 dev="/dev/srandom";
20450         elif test -r /dev/random ; then
20451                 dev="/dev/random";
20452         elif test -r /idev/random ; then
20453                 dev="/idev/random";
20454         fi
20455
20456         if test $dev != no ; then
20457                 cat >> confdefs.h <<EOF
20458 #define URANDOM_DEVICE "$dev"
20459 EOF
20460
20461         fi
20462 fi
20463
20464 ol_link_fetch=no
20465 if test $ol_with_fetch != no ; then
20466         ol_LIBS=$LIBS
20467 LIBS="-lfetch -lcom_err $LIBS"
20468 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20469 echo "configure:20470: checking fetch(3) library" >&5
20470 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20471   echo $ac_n "(cached) $ac_c" 1>&6
20472 else
20473   
20474         cat > conftest.$ac_ext <<EOF
20475 #line 20476 "configure"
20476 #include "confdefs.h"
20477
20478 #include <sys/param.h>
20479 #include <stdio.h>
20480 #include <fetch.h>
20481 int main() {
20482 struct url *u = fetchParseURL("file:///"); 
20483 ; return 0; }
20484 EOF
20485 if { (eval echo configure:20486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20486   rm -rf conftest*
20487   ol_cv_lib_fetch=yes
20488 else
20489   echo "configure: failed program was:" >&5
20490   cat conftest.$ac_ext >&5
20491   rm -rf conftest*
20492   ol_cv_lib_fetch=no
20493 fi
20494 rm -f conftest*
20495 fi
20496
20497 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20498 LIBS=$ol_LIBS
20499 if test $ol_cv_lib_fetch != no ; then
20500         ol_link_fetch="-lfetch -lcom_err"
20501         cat >> confdefs.h <<\EOF
20502 #define HAVE_FETCH 1
20503 EOF
20504
20505 fi
20506
20507
20508         if test $ol_cv_lib_fetch != no ; then
20509                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20510                 ol_link_fetch=freebsd
20511
20512         elif test $ol_with_fetch != auto ; then
20513                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20514         fi 
20515 fi
20516
20517 ol_link_readline=no
20518 if test $ol_with_readline != no ; then
20519         for ac_hdr in readline/readline.h readline/history.h
20520 do
20521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20523 echo "configure:20524: checking for $ac_hdr" >&5
20524 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20525   echo $ac_n "(cached) $ac_c" 1>&6
20526 else
20527   cat > conftest.$ac_ext <<EOF
20528 #line 20529 "configure"
20529 #include "confdefs.h"
20530 #include <$ac_hdr>
20531 EOF
20532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20533 { (eval echo configure:20534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20535 if test -z "$ac_err"; then
20536   rm -rf conftest*
20537   eval "ac_cv_header_$ac_safe=yes"
20538 else
20539   echo "$ac_err" >&5
20540   echo "configure: failed program was:" >&5
20541   cat conftest.$ac_ext >&5
20542   rm -rf conftest*
20543   eval "ac_cv_header_$ac_safe=no"
20544 fi
20545 rm -f conftest*
20546 fi
20547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20548   echo "$ac_t""yes" 1>&6
20549     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20550   cat >> confdefs.h <<EOF
20551 #define $ac_tr_hdr 1
20552 EOF
20553  
20554 else
20555   echo "$ac_t""no" 1>&6
20556 fi
20557 done
20558
20559
20560         if test $ac_cv_header_readline_readline_h = yes ; then
20561                 save_LIBS="$LIBS"
20562                 LIBS="$TERMCAP_LIBS $LIBS"
20563                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20564 echo "configure:20565: checking for readline in -lreadline" >&5
20565 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20566 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20567   echo $ac_n "(cached) $ac_c" 1>&6
20568 else
20569   ac_save_LIBS="$LIBS"
20570 LIBS="-lreadline  $LIBS"
20571 cat > conftest.$ac_ext <<EOF
20572 #line 20573 "configure"
20573 #include "confdefs.h"
20574 /* Override any gcc2 internal prototype to avoid an error.  */
20575 /* We use char because int might match the return type of a gcc2
20576     builtin and then its argument prototype would still apply.  */
20577 char readline();
20578
20579 int main() {
20580 readline()
20581 ; return 0; }
20582 EOF
20583 if { (eval echo configure:20584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20584   rm -rf conftest*
20585   eval "ac_cv_lib_$ac_lib_var=yes"
20586 else
20587   echo "configure: failed program was:" >&5
20588   cat conftest.$ac_ext >&5
20589   rm -rf conftest*
20590   eval "ac_cv_lib_$ac_lib_var=no"
20591 fi
20592 rm -f conftest*
20593 LIBS="$ac_save_LIBS"
20594
20595 fi
20596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20597   echo "$ac_t""yes" 1>&6
20598   have_readline=yes
20599 else
20600   echo "$ac_t""no" 1>&6
20601 have_readline=no
20602 fi
20603
20604                 LIBS="$save_LIBS"
20605                         
20606                 if test $have_readline = yes ; then
20607                         ol_with_readline=found
20608                         ol_link_readline=yes
20609
20610                         READLINE_LIBS="-lreadline"
20611                 fi
20612         fi
20613 fi
20614
20615 if test $ol_link_readline = yes ; then
20616         cat >> confdefs.h <<\EOF
20617 #define HAVE_READLINE 1
20618 EOF
20619
20620 fi
20621
20622
20623 if test $ol_enable_crypt != no ; then
20624         save_LIBS="$LIBS"
20625         LIBS="$TLS_LIBS $LIBS"
20626
20627         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20628 echo "configure:20629: checking for crypt" >&5
20629 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20630   echo $ac_n "(cached) $ac_c" 1>&6
20631 else
20632   cat > conftest.$ac_ext <<EOF
20633 #line 20634 "configure"
20634 #include "confdefs.h"
20635 /* System header to define __stub macros and hopefully few prototypes,
20636     which can conflict with char crypt(); below.  */
20637 #include <assert.h>
20638 /* Override any gcc2 internal prototype to avoid an error.  */
20639 /* We use char because int might match the return type of a gcc2
20640     builtin and then its argument prototype would still apply.  */
20641 char crypt();
20642 char (*f)();
20643
20644 int main() {
20645
20646 /* The GNU C library defines this for functions which it implements
20647     to always fail with ENOSYS.  Some functions are actually named
20648     something starting with __ and the normal name is an alias.  */
20649 #if defined (__stub_crypt) || defined (__stub___crypt)
20650 choke me
20651 #else
20652 f = crypt;
20653 #endif
20654
20655 ; return 0; }
20656 EOF
20657 if { (eval echo configure:20658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20658   rm -rf conftest*
20659   eval "ac_cv_func_crypt=yes"
20660 else
20661   echo "configure: failed program was:" >&5
20662   cat conftest.$ac_ext >&5
20663   rm -rf conftest*
20664   eval "ac_cv_func_crypt=no"
20665 fi
20666 rm -f conftest*
20667 fi
20668
20669 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20670   echo "$ac_t""yes" 1>&6
20671   have_crypt=yes
20672 else
20673   echo "$ac_t""no" 1>&6
20674
20675                 LIBS="$save_LIBS"
20676                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20677 echo "configure:20678: checking for crypt in -lcrypt" >&5
20678 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20680   echo $ac_n "(cached) $ac_c" 1>&6
20681 else
20682   ac_save_LIBS="$LIBS"
20683 LIBS="-lcrypt  $LIBS"
20684 cat > conftest.$ac_ext <<EOF
20685 #line 20686 "configure"
20686 #include "confdefs.h"
20687 /* Override any gcc2 internal prototype to avoid an error.  */
20688 /* We use char because int might match the return type of a gcc2
20689     builtin and then its argument prototype would still apply.  */
20690 char crypt();
20691
20692 int main() {
20693 crypt()
20694 ; return 0; }
20695 EOF
20696 if { (eval echo configure:20697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20697   rm -rf conftest*
20698   eval "ac_cv_lib_$ac_lib_var=yes"
20699 else
20700   echo "configure: failed program was:" >&5
20701   cat conftest.$ac_ext >&5
20702   rm -rf conftest*
20703   eval "ac_cv_lib_$ac_lib_var=no"
20704 fi
20705 rm -f conftest*
20706 LIBS="$ac_save_LIBS"
20707
20708 fi
20709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20710   echo "$ac_t""yes" 1>&6
20711   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20712                         have_crypt=yes
20713 else
20714   echo "$ac_t""no" 1>&6
20715 have_crypt=no
20716 fi
20717
20718 fi
20719
20720
20721         LIBS="$save_LIBS"
20722
20723         if test $have_crypt = yes ; then
20724                 cat >> confdefs.h <<\EOF
20725 #define HAVE_CRYPT 1
20726 EOF
20727
20728         else
20729                 echo "configure: warning: could not find crypt" 1>&2
20730                 if test $ol_enable_crypt = yes ; then
20731                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20732                 fi
20733
20734                 echo "configure: warning: disabling crypt support" 1>&2
20735                 ol_enable_crypt=no
20736         fi
20737 fi
20738
20739 if test $ol_enable_proctitle != no ; then
20740         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20741 echo "configure:20742: checking for setproctitle" >&5
20742 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20743   echo $ac_n "(cached) $ac_c" 1>&6
20744 else
20745   cat > conftest.$ac_ext <<EOF
20746 #line 20747 "configure"
20747 #include "confdefs.h"
20748 /* System header to define __stub macros and hopefully few prototypes,
20749     which can conflict with char setproctitle(); below.  */
20750 #include <assert.h>
20751 /* Override any gcc2 internal prototype to avoid an error.  */
20752 /* We use char because int might match the return type of a gcc2
20753     builtin and then its argument prototype would still apply.  */
20754 char setproctitle();
20755 char (*f)();
20756
20757 int main() {
20758
20759 /* The GNU C library defines this for functions which it implements
20760     to always fail with ENOSYS.  Some functions are actually named
20761     something starting with __ and the normal name is an alias.  */
20762 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20763 choke me
20764 #else
20765 f = setproctitle;
20766 #endif
20767
20768 ; return 0; }
20769 EOF
20770 if { (eval echo configure:20771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20771   rm -rf conftest*
20772   eval "ac_cv_func_setproctitle=yes"
20773 else
20774   echo "configure: failed program was:" >&5
20775   cat conftest.$ac_ext >&5
20776   rm -rf conftest*
20777   eval "ac_cv_func_setproctitle=no"
20778 fi
20779 rm -f conftest*
20780 fi
20781
20782 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20783   echo "$ac_t""yes" 1>&6
20784   have_setproctitle=yes
20785 else
20786   echo "$ac_t""no" 1>&6
20787
20788                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20789 echo "configure:20790: checking for setproctitle in -lutil" >&5
20790 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20792   echo $ac_n "(cached) $ac_c" 1>&6
20793 else
20794   ac_save_LIBS="$LIBS"
20795 LIBS="-lutil  $LIBS"
20796 cat > conftest.$ac_ext <<EOF
20797 #line 20798 "configure"
20798 #include "confdefs.h"
20799 /* Override any gcc2 internal prototype to avoid an error.  */
20800 /* We use char because int might match the return type of a gcc2
20801     builtin and then its argument prototype would still apply.  */
20802 char setproctitle();
20803
20804 int main() {
20805 setproctitle()
20806 ; return 0; }
20807 EOF
20808 if { (eval echo configure:20809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20809   rm -rf conftest*
20810   eval "ac_cv_lib_$ac_lib_var=yes"
20811 else
20812   echo "configure: failed program was:" >&5
20813   cat conftest.$ac_ext >&5
20814   rm -rf conftest*
20815   eval "ac_cv_lib_$ac_lib_var=no"
20816 fi
20817 rm -f conftest*
20818 LIBS="$ac_save_LIBS"
20819
20820 fi
20821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20822   echo "$ac_t""yes" 1>&6
20823   have_setproctitle=yes
20824                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20825 else
20826   echo "$ac_t""no" 1>&6
20827 have_setproctitle=no
20828                         LIBOBJS="$LIBOBJS setproctitle.o"
20829                         LIBSRCS="$LIBSRCS setproctitle.c"
20830 fi
20831
20832 fi
20833
20834
20835         if test $have_setproctitle = yes ; then
20836                 cat >> confdefs.h <<\EOF
20837 #define HAVE_SETPROCTITLE 1
20838 EOF
20839
20840         fi
20841 fi
20842
20843 if test $ol_enable_slp != no ; then
20844         for ac_hdr in slp.h 
20845 do
20846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20848 echo "configure:20849: checking for $ac_hdr" >&5
20849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20850   echo $ac_n "(cached) $ac_c" 1>&6
20851 else
20852   cat > conftest.$ac_ext <<EOF
20853 #line 20854 "configure"
20854 #include "confdefs.h"
20855 #include <$ac_hdr>
20856 EOF
20857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20858 { (eval echo configure:20859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20860 if test -z "$ac_err"; then
20861   rm -rf conftest*
20862   eval "ac_cv_header_$ac_safe=yes"
20863 else
20864   echo "$ac_err" >&5
20865   echo "configure: failed program was:" >&5
20866   cat conftest.$ac_ext >&5
20867   rm -rf conftest*
20868   eval "ac_cv_header_$ac_safe=no"
20869 fi
20870 rm -f conftest*
20871 fi
20872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20873   echo "$ac_t""yes" 1>&6
20874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20875   cat >> confdefs.h <<EOF
20876 #define $ac_tr_hdr 1
20877 EOF
20878  
20879 else
20880   echo "$ac_t""no" 1>&6
20881 fi
20882 done
20883
20884
20885         if test $ac_cv_header_slp_h = yes ; then
20886                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20887 echo "configure:20888: checking for SLPOpen in -lslp" >&5
20888 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20889 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20890   echo $ac_n "(cached) $ac_c" 1>&6
20891 else
20892   ac_save_LIBS="$LIBS"
20893 LIBS="-lslp  $LIBS"
20894 cat > conftest.$ac_ext <<EOF
20895 #line 20896 "configure"
20896 #include "confdefs.h"
20897 /* Override any gcc2 internal prototype to avoid an error.  */
20898 /* We use char because int might match the return type of a gcc2
20899     builtin and then its argument prototype would still apply.  */
20900 char SLPOpen();
20901
20902 int main() {
20903 SLPOpen()
20904 ; return 0; }
20905 EOF
20906 if { (eval echo configure:20907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20907   rm -rf conftest*
20908   eval "ac_cv_lib_$ac_lib_var=yes"
20909 else
20910   echo "configure: failed program was:" >&5
20911   cat conftest.$ac_ext >&5
20912   rm -rf conftest*
20913   eval "ac_cv_lib_$ac_lib_var=no"
20914 fi
20915 rm -f conftest*
20916 LIBS="$ac_save_LIBS"
20917
20918 fi
20919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20920   echo "$ac_t""yes" 1>&6
20921   have_slp=yes
20922 else
20923   echo "$ac_t""no" 1>&6
20924 have_slp=no
20925 fi
20926
20927                 if test $have_slp = yes ; then
20928                         cat >> confdefs.h <<\EOF
20929 #define HAVE_SLP 1
20930 EOF
20931
20932                         SLAPD_SLP_LIBS=-lslp
20933                 fi
20934
20935         elif test $ol_enable_slp = yes ; then
20936                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20937         fi
20938 fi
20939
20940 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20941 echo "configure:20942: checking for ANSI C header files" >&5
20942 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20943   echo $ac_n "(cached) $ac_c" 1>&6
20944 else
20945   cat > conftest.$ac_ext <<EOF
20946 #line 20947 "configure"
20947 #include "confdefs.h"
20948 #include <stdlib.h>
20949 #include <stdarg.h>
20950 #include <string.h>
20951 #include <float.h>
20952 EOF
20953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20954 { (eval echo configure:20955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20956 if test -z "$ac_err"; then
20957   rm -rf conftest*
20958   ac_cv_header_stdc=yes
20959 else
20960   echo "$ac_err" >&5
20961   echo "configure: failed program was:" >&5
20962   cat conftest.$ac_ext >&5
20963   rm -rf conftest*
20964   ac_cv_header_stdc=no
20965 fi
20966 rm -f conftest*
20967
20968 if test $ac_cv_header_stdc = yes; then
20969   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20970 cat > conftest.$ac_ext <<EOF
20971 #line 20972 "configure"
20972 #include "confdefs.h"
20973 #include <string.h>
20974 EOF
20975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20976   egrep "memchr" >/dev/null 2>&1; then
20977   :
20978 else
20979   rm -rf conftest*
20980   ac_cv_header_stdc=no
20981 fi
20982 rm -f conftest*
20983
20984 fi
20985
20986 if test $ac_cv_header_stdc = yes; then
20987   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20988 cat > conftest.$ac_ext <<EOF
20989 #line 20990 "configure"
20990 #include "confdefs.h"
20991 #include <stdlib.h>
20992 EOF
20993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20994   egrep "free" >/dev/null 2>&1; then
20995   :
20996 else
20997   rm -rf conftest*
20998   ac_cv_header_stdc=no
20999 fi
21000 rm -f conftest*
21001
21002 fi
21003
21004 if test $ac_cv_header_stdc = yes; then
21005   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21006 if test "$cross_compiling" = yes; then
21007   :
21008 else
21009   cat > conftest.$ac_ext <<EOF
21010 #line 21011 "configure"
21011 #include "confdefs.h"
21012 #include <ctype.h>
21013 #if ((' ' & 0x0FF) == 0x020)
21014 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21015 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21016 #else
21017 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21018  || ('j' <= (c) && (c) <= 'r') \
21019  || ('s' <= (c) && (c) <= 'z'))
21020 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21021 #endif
21022 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21023 int main () { int i; for (i = 0; i < 256; i++)
21024 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21025 exit (0); }
21026
21027 EOF
21028 if { (eval echo configure:21029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21029 then
21030   :
21031 else
21032   echo "configure: failed program was:" >&5
21033   cat conftest.$ac_ext >&5
21034   rm -fr conftest*
21035   ac_cv_header_stdc=no
21036 fi
21037 rm -fr conftest*
21038 fi
21039
21040 fi
21041 fi
21042
21043 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21044 if test $ac_cv_header_stdc = yes; then
21045   cat >> confdefs.h <<\EOF
21046 #define STDC_HEADERS 1
21047 EOF
21048
21049 fi
21050
21051 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21052 echo "configure:21053: checking for mode_t" >&5
21053 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21054   echo $ac_n "(cached) $ac_c" 1>&6
21055 else
21056   cat > conftest.$ac_ext <<EOF
21057 #line 21058 "configure"
21058 #include "confdefs.h"
21059 #include <sys/types.h>
21060 #if STDC_HEADERS
21061 #include <stdlib.h>
21062 #include <stddef.h>
21063 #endif
21064
21065 EOF
21066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21067   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21068   rm -rf conftest*
21069   eval "ac_cv_type_mode_t=yes"
21070 else
21071   rm -rf conftest*
21072   eval "ac_cv_type_mode_t=no"
21073 fi
21074 rm -f conftest*
21075
21076 fi
21077 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21078   echo "$ac_t""yes" 1>&6
21079 else
21080   echo "$ac_t""no" 1>&6
21081   cat >> confdefs.h <<EOF
21082 #define mode_t int
21083 EOF
21084
21085 fi
21086
21087 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21088 echo "configure:21089: checking for off_t" >&5
21089 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21090   echo $ac_n "(cached) $ac_c" 1>&6
21091 else
21092   cat > conftest.$ac_ext <<EOF
21093 #line 21094 "configure"
21094 #include "confdefs.h"
21095 #include <sys/types.h>
21096 #if STDC_HEADERS
21097 #include <stdlib.h>
21098 #include <stddef.h>
21099 #endif
21100
21101 EOF
21102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21103   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21104   rm -rf conftest*
21105   eval "ac_cv_type_off_t=yes"
21106 else
21107   rm -rf conftest*
21108   eval "ac_cv_type_off_t=no"
21109 fi
21110 rm -f conftest*
21111
21112 fi
21113 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21114   echo "$ac_t""yes" 1>&6
21115 else
21116   echo "$ac_t""no" 1>&6
21117   cat >> confdefs.h <<EOF
21118 #define off_t long
21119 EOF
21120
21121 fi
21122
21123 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21124 echo "configure:21125: checking for pid_t" >&5
21125 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21126   echo $ac_n "(cached) $ac_c" 1>&6
21127 else
21128   cat > conftest.$ac_ext <<EOF
21129 #line 21130 "configure"
21130 #include "confdefs.h"
21131 #include <sys/types.h>
21132 #if STDC_HEADERS
21133 #include <stdlib.h>
21134 #include <stddef.h>
21135 #endif
21136
21137 EOF
21138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21139   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21140   rm -rf conftest*
21141   eval "ac_cv_type_pid_t=yes"
21142 else
21143   rm -rf conftest*
21144   eval "ac_cv_type_pid_t=no"
21145 fi
21146 rm -f conftest*
21147
21148 fi
21149 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21150   echo "$ac_t""yes" 1>&6
21151 else
21152   echo "$ac_t""no" 1>&6
21153   cat >> confdefs.h <<EOF
21154 #define pid_t int
21155 EOF
21156
21157 fi
21158
21159 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21160 echo "configure:21161: checking for ptrdiff_t" >&5
21161 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21162   echo $ac_n "(cached) $ac_c" 1>&6
21163 else
21164   cat > conftest.$ac_ext <<EOF
21165 #line 21166 "configure"
21166 #include "confdefs.h"
21167 #include <stddef.h>
21168 int main() {
21169 ptrdiff_t p
21170 ; return 0; }
21171 EOF
21172 if { (eval echo configure:21173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21173   rm -rf conftest*
21174   am_cv_type_ptrdiff_t=yes
21175 else
21176   echo "configure: failed program was:" >&5
21177   cat conftest.$ac_ext >&5
21178   rm -rf conftest*
21179   am_cv_type_ptrdiff_t=no
21180 fi
21181 rm -f conftest*
21182 fi
21183
21184 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21185    if test $am_cv_type_ptrdiff_t = yes; then
21186      cat >> confdefs.h <<\EOF
21187 #define HAVE_PTRDIFF_T 1
21188 EOF
21189
21190    fi
21191
21192 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21193 echo "configure:21194: checking return type of signal handlers" >&5
21194 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21195   echo $ac_n "(cached) $ac_c" 1>&6
21196 else
21197   cat > conftest.$ac_ext <<EOF
21198 #line 21199 "configure"
21199 #include "confdefs.h"
21200 #include <sys/types.h>
21201 #include <signal.h>
21202 #ifdef signal
21203 #undef signal
21204 #endif
21205 #ifdef __cplusplus
21206 extern "C" void (*signal (int, void (*)(int)))(int);
21207 #else
21208 void (*signal ()) ();
21209 #endif
21210
21211 int main() {
21212 int i;
21213 ; return 0; }
21214 EOF
21215 if { (eval echo configure:21216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21216   rm -rf conftest*
21217   ac_cv_type_signal=void
21218 else
21219   echo "configure: failed program was:" >&5
21220   cat conftest.$ac_ext >&5
21221   rm -rf conftest*
21222   ac_cv_type_signal=int
21223 fi
21224 rm -f conftest*
21225 fi
21226
21227 echo "$ac_t""$ac_cv_type_signal" 1>&6
21228 cat >> confdefs.h <<EOF
21229 #define RETSIGTYPE $ac_cv_type_signal
21230 EOF
21231
21232
21233 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21234 echo "configure:21235: checking for size_t" >&5
21235 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21236   echo $ac_n "(cached) $ac_c" 1>&6
21237 else
21238   cat > conftest.$ac_ext <<EOF
21239 #line 21240 "configure"
21240 #include "confdefs.h"
21241 #include <sys/types.h>
21242 #if STDC_HEADERS
21243 #include <stdlib.h>
21244 #include <stddef.h>
21245 #endif
21246
21247 EOF
21248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21249   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21250   rm -rf conftest*
21251   eval "ac_cv_type_size_t=yes"
21252 else
21253   rm -rf conftest*
21254   eval "ac_cv_type_size_t=no"
21255 fi
21256 rm -f conftest*
21257
21258 fi
21259 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21260   echo "$ac_t""yes" 1>&6
21261 else
21262   echo "$ac_t""no" 1>&6
21263   cat >> confdefs.h <<EOF
21264 #define size_t unsigned
21265 EOF
21266
21267 fi
21268
21269
21270 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21271 echo "configure:21272: checking for ssize_t" >&5
21272 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21273   echo $ac_n "(cached) $ac_c" 1>&6
21274 else
21275   cat > conftest.$ac_ext <<EOF
21276 #line 21277 "configure"
21277 #include "confdefs.h"
21278 #include <sys/types.h>
21279 #if STDC_HEADERS
21280 #include <stdlib.h>
21281 #include <stddef.h>
21282 #endif
21283
21284 EOF
21285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21286   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21287   rm -rf conftest*
21288   eval "ac_cv_type_ssize_t=yes"
21289 else
21290   rm -rf conftest*
21291   eval "ac_cv_type_ssize_t=no"
21292 fi
21293 rm -f conftest*
21294
21295 fi
21296 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21297   echo "$ac_t""yes" 1>&6
21298 else
21299   echo "$ac_t""no" 1>&6
21300   cat >> confdefs.h <<EOF
21301 #define ssize_t signed int
21302 EOF
21303
21304 fi
21305
21306 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21307 echo "configure:21308: checking for caddr_t" >&5
21308 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21309   echo $ac_n "(cached) $ac_c" 1>&6
21310 else
21311   cat > conftest.$ac_ext <<EOF
21312 #line 21313 "configure"
21313 #include "confdefs.h"
21314 #include <sys/types.h>
21315 #if STDC_HEADERS
21316 #include <stdlib.h>
21317 #include <stddef.h>
21318 #endif
21319
21320 EOF
21321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21322   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21323   rm -rf conftest*
21324   eval "ac_cv_type_caddr_t=yes"
21325 else
21326   rm -rf conftest*
21327   eval "ac_cv_type_caddr_t=no"
21328 fi
21329 rm -f conftest*
21330
21331 fi
21332 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21333   echo "$ac_t""yes" 1>&6
21334 else
21335   echo "$ac_t""no" 1>&6
21336   cat >> confdefs.h <<EOF
21337 #define caddr_t char *
21338 EOF
21339
21340 fi
21341
21342
21343 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21344 echo "configure:21345: checking for socklen_t" >&5
21345 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21346   echo $ac_n "(cached) $ac_c" 1>&6
21347 else
21348   cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351
21352 #ifdef HAVE_SYS_TYPES_H
21353 #include <sys/types.h>
21354 #endif
21355 #ifdef HAVE_SYS_SOCKET_H
21356 #include <sys/socket.h>
21357 #endif
21358
21359 int main() {
21360 socklen_t len;
21361 ; return 0; }
21362 EOF
21363 if { (eval echo configure:21364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21364   rm -rf conftest*
21365   ol_cv_type_socklen_t=yes
21366 else
21367   echo "configure: failed program was:" >&5
21368   cat conftest.$ac_ext >&5
21369   rm -rf conftest*
21370   ol_cv_type_socklen_t=no
21371 fi
21372 rm -f conftest*
21373 fi
21374
21375 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21376   if test $ol_cv_type_socklen_t = no; then
21377     cat >> confdefs.h <<\EOF
21378 #define socklen_t int
21379 EOF
21380
21381   fi
21382  
21383 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21384 echo "configure:21385: checking for member st_blksize in aggregate type struct stat" >&5
21385 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21386   echo $ac_n "(cached) $ac_c" 1>&6
21387 else
21388   cat > conftest.$ac_ext <<EOF
21389 #line 21390 "configure"
21390 #include "confdefs.h"
21391 #include <sys/types.h>
21392 #include <sys/stat.h>
21393 int main() {
21394 struct stat foo; foo.st_blksize;
21395 ; return 0; }
21396 EOF
21397 if { (eval echo configure:21398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21398   rm -rf conftest*
21399   ac_cv_c_struct_member_st_blksize=yes
21400 else
21401   echo "configure: failed program was:" >&5
21402   cat conftest.$ac_ext >&5
21403   rm -rf conftest*
21404   ac_cv_c_struct_member_st_blksize=no
21405 fi
21406 rm -f conftest*
21407 fi
21408
21409 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21410 st_blksize="$ac_cv_c_struct_member_st_blksize"
21411 if test $ac_cv_c_struct_member_st_blksize = yes; then
21412   cat >> confdefs.h <<\EOF
21413 #define HAVE_ST_BLKSIZE 1
21414 EOF
21415
21416 fi
21417
21418 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21419 echo "configure:21420: checking whether time.h and sys/time.h may both be included" >&5
21420 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21421   echo $ac_n "(cached) $ac_c" 1>&6
21422 else
21423   cat > conftest.$ac_ext <<EOF
21424 #line 21425 "configure"
21425 #include "confdefs.h"
21426 #include <sys/types.h>
21427 #include <sys/time.h>
21428 #include <time.h>
21429 int main() {
21430 struct tm *tp;
21431 ; return 0; }
21432 EOF
21433 if { (eval echo configure:21434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21434   rm -rf conftest*
21435   ac_cv_header_time=yes
21436 else
21437   echo "configure: failed program was:" >&5
21438   cat conftest.$ac_ext >&5
21439   rm -rf conftest*
21440   ac_cv_header_time=no
21441 fi
21442 rm -f conftest*
21443 fi
21444
21445 echo "$ac_t""$ac_cv_header_time" 1>&6
21446 if test $ac_cv_header_time = yes; then
21447   cat >> confdefs.h <<\EOF
21448 #define TIME_WITH_SYS_TIME 1
21449 EOF
21450
21451 fi
21452
21453 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21454 echo "configure:21455: checking whether struct tm is in sys/time.h or time.h" >&5
21455 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21456   echo $ac_n "(cached) $ac_c" 1>&6
21457 else
21458   cat > conftest.$ac_ext <<EOF
21459 #line 21460 "configure"
21460 #include "confdefs.h"
21461 #include <sys/types.h>
21462 #include <time.h>
21463 int main() {
21464 struct tm *tp; tp->tm_sec;
21465 ; return 0; }
21466 EOF
21467 if { (eval echo configure:21468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21468   rm -rf conftest*
21469   ac_cv_struct_tm=time.h
21470 else
21471   echo "configure: failed program was:" >&5
21472   cat conftest.$ac_ext >&5
21473   rm -rf conftest*
21474   ac_cv_struct_tm=sys/time.h
21475 fi
21476 rm -f conftest*
21477 fi
21478
21479 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21480 if test $ac_cv_struct_tm = sys/time.h; then
21481   cat >> confdefs.h <<\EOF
21482 #define TM_IN_SYS_TIME 1
21483 EOF
21484
21485 fi
21486
21487 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21488 echo "configure:21489: checking for uid_t in sys/types.h" >&5
21489 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21490   echo $ac_n "(cached) $ac_c" 1>&6
21491 else
21492   cat > conftest.$ac_ext <<EOF
21493 #line 21494 "configure"
21494 #include "confdefs.h"
21495 #include <sys/types.h>
21496 EOF
21497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21498   egrep "uid_t" >/dev/null 2>&1; then
21499   rm -rf conftest*
21500   ac_cv_type_uid_t=yes
21501 else
21502   rm -rf conftest*
21503   ac_cv_type_uid_t=no
21504 fi
21505 rm -f conftest*
21506
21507 fi
21508
21509 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21510 if test $ac_cv_type_uid_t = no; then
21511   cat >> confdefs.h <<\EOF
21512 #define uid_t int
21513 EOF
21514
21515   cat >> confdefs.h <<\EOF
21516 #define gid_t int
21517 EOF
21518
21519 fi
21520
21521 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21522 echo "configure:21523: checking for sig_atomic_t" >&5
21523 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21524   echo $ac_n "(cached) $ac_c" 1>&6
21525 else
21526   cat > conftest.$ac_ext <<EOF
21527 #line 21528 "configure"
21528 #include "confdefs.h"
21529 #include <signal.h>
21530 int main() {
21531 sig_atomic_t atomic;
21532 ; return 0; }
21533 EOF
21534 if { (eval echo configure:21535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21535   rm -rf conftest*
21536   ol_cv_type_sig_atomic_t=yes
21537 else
21538   echo "configure: failed program was:" >&5
21539   cat conftest.$ac_ext >&5
21540   rm -rf conftest*
21541   ol_cv_type_sig_atomic_t=no
21542 fi
21543 rm -f conftest*
21544 fi
21545
21546 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21547   if test $ol_cv_type_sig_atomic_t = no; then
21548     cat >> confdefs.h <<\EOF
21549 #define sig_atomic_t int
21550 EOF
21551
21552   fi
21553  
21554
21555
21556 # test for pw_gecos in struct passwd
21557 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21558 echo "configure:21559: checking struct passwd for pw_gecos" >&5
21559 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21560   echo $ac_n "(cached) $ac_c" 1>&6
21561 else
21562   
21563         cat > conftest.$ac_ext <<EOF
21564 #line 21565 "configure"
21565 #include "confdefs.h"
21566 #include <pwd.h>
21567 int main() {
21568
21569         struct passwd pwd;
21570         pwd.pw_gecos = pwd.pw_name;
21571
21572 ; return 0; }
21573 EOF
21574 if { (eval echo configure:21575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21575   rm -rf conftest*
21576   ol_cv_struct_passwd_pw_gecos=yes
21577 else
21578   echo "configure: failed program was:" >&5
21579   cat conftest.$ac_ext >&5
21580   rm -rf conftest*
21581   ol_cv_struct_passwd_pw_gecos=no
21582 fi
21583 rm -f conftest*
21584 fi
21585
21586 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21587 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21588         cat >> confdefs.h <<\EOF
21589 #define HAVE_PW_GECOS 1
21590 EOF
21591
21592 fi
21593
21594 # test for pw_passwd in struct passwd
21595 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21596 echo "configure:21597: checking struct passwd for pw_passwd" >&5
21597 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21598   echo $ac_n "(cached) $ac_c" 1>&6
21599 else
21600   
21601         cat > conftest.$ac_ext <<EOF
21602 #line 21603 "configure"
21603 #include "confdefs.h"
21604 #include <pwd.h>
21605 int main() {
21606
21607         struct passwd pwd;
21608         pwd.pw_passwd = pwd.pw_name;
21609
21610 ; return 0; }
21611 EOF
21612 if { (eval echo configure:21613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21613   rm -rf conftest*
21614   ol_cv_struct_passwd_pw_passwd=yes
21615 else
21616   echo "configure: failed program was:" >&5
21617   cat conftest.$ac_ext >&5
21618   rm -rf conftest*
21619   ol_cv_struct_passwd_pw_passwd=no
21620 fi
21621 rm -f conftest*
21622 fi
21623
21624 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21625 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21626         cat >> confdefs.h <<\EOF
21627 #define HAVE_PW_PASSWD 1
21628 EOF
21629
21630 fi
21631
21632
21633 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21634 echo "configure:21635: checking if toupper() requires islower()" >&5
21635 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21636   echo $ac_n "(cached) $ac_c" 1>&6
21637 else
21638   
21639         if test "$cross_compiling" = yes; then
21640   ol_cv_c_upper_lower=safe
21641 else
21642   cat > conftest.$ac_ext <<EOF
21643 #line 21644 "configure"
21644 #include "confdefs.h"
21645
21646 #include <ctype.h>
21647 main()
21648 {
21649         if ('C' == toupper('C'))
21650                 exit(0);
21651         else
21652                 exit(1);
21653 }
21654 EOF
21655 if { (eval echo configure:21656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21656 then
21657   ol_cv_c_upper_lower=no
21658 else
21659   echo "configure: failed program was:" >&5
21660   cat conftest.$ac_ext >&5
21661   rm -fr conftest*
21662   ol_cv_c_upper_lower=yes
21663 fi
21664 rm -fr conftest*
21665 fi
21666
21667 fi
21668
21669 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21670 if test $ol_cv_c_upper_lower != no ; then
21671         cat >> confdefs.h <<\EOF
21672 #define C_UPPER_LOWER 1
21673 EOF
21674
21675 fi
21676
21677 echo $ac_n "checking for working const""... $ac_c" 1>&6
21678 echo "configure:21679: checking for working const" >&5
21679 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21680   echo $ac_n "(cached) $ac_c" 1>&6
21681 else
21682   cat > conftest.$ac_ext <<EOF
21683 #line 21684 "configure"
21684 #include "confdefs.h"
21685
21686 int main() {
21687
21688 /* Ultrix mips cc rejects this.  */
21689 typedef int charset[2]; const charset x;
21690 /* SunOS 4.1.1 cc rejects this.  */
21691 char const *const *ccp;
21692 char **p;
21693 /* NEC SVR4.0.2 mips cc rejects this.  */
21694 struct point {int x, y;};
21695 static struct point const zero = {0,0};
21696 /* AIX XL C 1.02.0.0 rejects this.
21697    It does not let you subtract one const X* pointer from another in an arm
21698    of an if-expression whose if-part is not a constant expression */
21699 const char *g = "string";
21700 ccp = &g + (g ? g-g : 0);
21701 /* HPUX 7.0 cc rejects these. */
21702 ++ccp;
21703 p = (char**) ccp;
21704 ccp = (char const *const *) p;
21705 { /* SCO 3.2v4 cc rejects this.  */
21706   char *t;
21707   char const *s = 0 ? (char *) 0 : (char const *) 0;
21708
21709   *t++ = 0;
21710 }
21711 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21712   int x[] = {25, 17};
21713   const int *foo = &x[0];
21714   ++foo;
21715 }
21716 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21717   typedef const int *iptr;
21718   iptr p = 0;
21719   ++p;
21720 }
21721 { /* AIX XL C 1.02.0.0 rejects this saying
21722      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21723   struct s { int j; const int *ap[3]; };
21724   struct s *b; b->j = 5;
21725 }
21726 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21727   const int foo = 10;
21728 }
21729
21730 ; return 0; }
21731 EOF
21732 if { (eval echo configure:21733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21733   rm -rf conftest*
21734   ac_cv_c_const=yes
21735 else
21736   echo "configure: failed program was:" >&5
21737   cat conftest.$ac_ext >&5
21738   rm -rf conftest*
21739   ac_cv_c_const=no
21740 fi
21741 rm -f conftest*
21742 fi
21743
21744 echo "$ac_t""$ac_cv_c_const" 1>&6
21745 if test $ac_cv_c_const = no; then
21746   cat >> confdefs.h <<\EOF
21747 #define const 
21748 EOF
21749
21750 fi
21751
21752 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21753 echo "configure:21754: checking if compiler understands volatile" >&5
21754 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21755   echo $ac_n "(cached) $ac_c" 1>&6
21756 else
21757   cat > conftest.$ac_ext <<EOF
21758 #line 21759 "configure"
21759 #include "confdefs.h"
21760 int x, y, z;
21761 int main() {
21762 volatile int a; int * volatile b = x ? &y : &z;
21763       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21764       *b = 0;
21765 ; return 0; }
21766 EOF
21767 if { (eval echo configure:21768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21768   rm -rf conftest*
21769   ol_cv_c_volatile=yes
21770 else
21771   echo "configure: failed program was:" >&5
21772   cat conftest.$ac_ext >&5
21773   rm -rf conftest*
21774   ol_cv_c_volatile=no
21775 fi
21776 rm -f conftest*
21777 fi
21778
21779 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21780   if test $ol_cv_c_volatile = yes; then
21781     : 
21782   else
21783     cat >> confdefs.h <<\EOF
21784 #define volatile 
21785 EOF
21786
21787   fi
21788  
21789
21790 if test $cross_compiling = yes ; then
21791         cat >> confdefs.h <<\EOF
21792 #define CROSS_COMPILING 1
21793 EOF
21794
21795 else
21796         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21797 echo "configure:21798: checking whether byte ordering is bigendian" >&5
21798 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21799   echo $ac_n "(cached) $ac_c" 1>&6
21800 else
21801   ac_cv_c_bigendian=unknown
21802 # See if sys/param.h defines the BYTE_ORDER macro.
21803 cat > conftest.$ac_ext <<EOF
21804 #line 21805 "configure"
21805 #include "confdefs.h"
21806 #include <sys/types.h>
21807 #include <sys/param.h>
21808 int main() {
21809
21810 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21811  bogus endian macros
21812 #endif
21813 ; return 0; }
21814 EOF
21815 if { (eval echo configure:21816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21816   rm -rf conftest*
21817   # It does; now see whether it defined to BIG_ENDIAN or not.
21818 cat > conftest.$ac_ext <<EOF
21819 #line 21820 "configure"
21820 #include "confdefs.h"
21821 #include <sys/types.h>
21822 #include <sys/param.h>
21823 int main() {
21824
21825 #if BYTE_ORDER != BIG_ENDIAN
21826  not big endian
21827 #endif
21828 ; return 0; }
21829 EOF
21830 if { (eval echo configure:21831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21831   rm -rf conftest*
21832   ac_cv_c_bigendian=yes
21833 else
21834   echo "configure: failed program was:" >&5
21835   cat conftest.$ac_ext >&5
21836   rm -rf conftest*
21837   ac_cv_c_bigendian=no
21838 fi
21839 rm -f conftest*
21840 else
21841   echo "configure: failed program was:" >&5
21842   cat conftest.$ac_ext >&5
21843 fi
21844 rm -f conftest*
21845 if test $ac_cv_c_bigendian = unknown; then
21846 if test "$cross_compiling" = yes; then
21847     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21848 else
21849   cat > conftest.$ac_ext <<EOF
21850 #line 21851 "configure"
21851 #include "confdefs.h"
21852 main () {
21853   /* Are we little or big endian?  From Harbison&Steele.  */
21854   union
21855   {
21856     long l;
21857     char c[sizeof (long)];
21858   } u;
21859   u.l = 1;
21860   exit (u.c[sizeof (long) - 1] == 1);
21861 }
21862 EOF
21863 if { (eval echo configure:21864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21864 then
21865   ac_cv_c_bigendian=no
21866 else
21867   echo "configure: failed program was:" >&5
21868   cat conftest.$ac_ext >&5
21869   rm -fr conftest*
21870   ac_cv_c_bigendian=yes
21871 fi
21872 rm -fr conftest*
21873 fi
21874
21875 fi
21876 fi
21877
21878 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21879 if test $ac_cv_c_bigendian = yes; then
21880   cat >> confdefs.h <<\EOF
21881 #define WORDS_BIGENDIAN 1
21882 EOF
21883
21884 fi
21885
21886 fi
21887
21888 echo $ac_n "checking size of short""... $ac_c" 1>&6
21889 echo "configure:21890: checking size of short" >&5 
21890 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21891   echo $ac_n "(cached) $ac_c" 1>&6
21892 else
21893   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21894   cat > conftest.$ac_ext <<EOF
21895 #line 21896 "configure"
21896 #include "confdefs.h"
21897 #include "confdefs.h" 
21898 #include <sys/types.h> 
21899  
21900
21901 int main() {
21902 switch (0) case 0: case (sizeof (short) == $ac_size):;
21903 ; return 0; }
21904 EOF
21905 if { (eval echo configure:21906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21906   rm -rf conftest*
21907   ac_cv_sizeof_short=$ac_size
21908 else
21909   echo "configure: failed program was:" >&5
21910   cat conftest.$ac_ext >&5
21911 fi
21912 rm -f conftest* 
21913   if test x$ac_cv_sizeof_short != x ; then break; fi 
21914 done 
21915
21916 fi
21917  
21918 if test x$ac_cv_sizeof_short = x ; then 
21919   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21920 fi 
21921 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21922 cat >> confdefs.h <<EOF
21923 #define SIZEOF_SHORT $ac_cv_sizeof_short
21924 EOF
21925  
21926  
21927 echo $ac_n "checking size of int""... $ac_c" 1>&6
21928 echo "configure:21929: checking size of int" >&5 
21929 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21930   echo $ac_n "(cached) $ac_c" 1>&6
21931 else
21932   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21933   cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936 #include "confdefs.h" 
21937 #include <sys/types.h> 
21938  
21939
21940 int main() {
21941 switch (0) case 0: case (sizeof (int) == $ac_size):;
21942 ; return 0; }
21943 EOF
21944 if { (eval echo configure:21945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21945   rm -rf conftest*
21946   ac_cv_sizeof_int=$ac_size
21947 else
21948   echo "configure: failed program was:" >&5
21949   cat conftest.$ac_ext >&5
21950 fi
21951 rm -f conftest* 
21952   if test x$ac_cv_sizeof_int != x ; then break; fi 
21953 done 
21954
21955 fi
21956  
21957 if test x$ac_cv_sizeof_int = x ; then 
21958   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21959 fi 
21960 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21961 cat >> confdefs.h <<EOF
21962 #define SIZEOF_INT $ac_cv_sizeof_int
21963 EOF
21964  
21965  
21966 echo $ac_n "checking size of long""... $ac_c" 1>&6
21967 echo "configure:21968: checking size of long" >&5 
21968 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21969   echo $ac_n "(cached) $ac_c" 1>&6
21970 else
21971   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21972   cat > conftest.$ac_ext <<EOF
21973 #line 21974 "configure"
21974 #include "confdefs.h"
21975 #include "confdefs.h" 
21976 #include <sys/types.h> 
21977  
21978
21979 int main() {
21980 switch (0) case 0: case (sizeof (long) == $ac_size):;
21981 ; return 0; }
21982 EOF
21983 if { (eval echo configure:21984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21984   rm -rf conftest*
21985   ac_cv_sizeof_long=$ac_size
21986 else
21987   echo "configure: failed program was:" >&5
21988   cat conftest.$ac_ext >&5
21989 fi
21990 rm -f conftest* 
21991   if test x$ac_cv_sizeof_long != x ; then break; fi 
21992 done 
21993
21994 fi
21995  
21996 if test x$ac_cv_sizeof_long = x ; then 
21997   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21998 fi 
21999 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22000 cat >> confdefs.h <<EOF
22001 #define SIZEOF_LONG $ac_cv_sizeof_long
22002 EOF
22003  
22004
22005
22006 if test "$ac_cv_sizeof_int" -lt 4 ; then
22007         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22008
22009         cat >> confdefs.h <<\EOF
22010 #define LBER_INT_T long
22011 EOF
22012
22013 else
22014         cat >> confdefs.h <<\EOF
22015 #define LBER_INT_T int
22016 EOF
22017
22018 fi
22019
22020 cat >> confdefs.h <<\EOF
22021 #define LBER_LEN_T long
22022 EOF
22023
22024 cat >> confdefs.h <<\EOF
22025 #define LBER_SOCKET_T int
22026 EOF
22027
22028 cat >> confdefs.h <<\EOF
22029 #define LBER_TAG_T long
22030 EOF
22031
22032
22033 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22034 echo "configure:22035: checking for 8-bit clean memcmp" >&5
22035 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22036   echo $ac_n "(cached) $ac_c" 1>&6
22037 else
22038   if test "$cross_compiling" = yes; then
22039   ac_cv_func_memcmp_clean=no
22040 else
22041   cat > conftest.$ac_ext <<EOF
22042 #line 22043 "configure"
22043 #include "confdefs.h"
22044
22045 main()
22046 {
22047   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22048   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22049 }
22050
22051 EOF
22052 if { (eval echo configure:22053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22053 then
22054   ac_cv_func_memcmp_clean=yes
22055 else
22056   echo "configure: failed program was:" >&5
22057   cat conftest.$ac_ext >&5
22058   rm -fr conftest*
22059   ac_cv_func_memcmp_clean=no
22060 fi
22061 rm -fr conftest*
22062 fi
22063
22064 fi
22065
22066 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22067 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22068
22069 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22070 echo "configure:22071: checking for strftime" >&5
22071 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22072   echo $ac_n "(cached) $ac_c" 1>&6
22073 else
22074   cat > conftest.$ac_ext <<EOF
22075 #line 22076 "configure"
22076 #include "confdefs.h"
22077 /* System header to define __stub macros and hopefully few prototypes,
22078     which can conflict with char strftime(); below.  */
22079 #include <assert.h>
22080 /* Override any gcc2 internal prototype to avoid an error.  */
22081 /* We use char because int might match the return type of a gcc2
22082     builtin and then its argument prototype would still apply.  */
22083 char strftime();
22084 char (*f)();
22085
22086 int main() {
22087
22088 /* The GNU C library defines this for functions which it implements
22089     to always fail with ENOSYS.  Some functions are actually named
22090     something starting with __ and the normal name is an alias.  */
22091 #if defined (__stub_strftime) || defined (__stub___strftime)
22092 choke me
22093 #else
22094 f = strftime;
22095 #endif
22096
22097 ; return 0; }
22098 EOF
22099 if { (eval echo configure:22100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22100   rm -rf conftest*
22101   eval "ac_cv_func_strftime=yes"
22102 else
22103   echo "configure: failed program was:" >&5
22104   cat conftest.$ac_ext >&5
22105   rm -rf conftest*
22106   eval "ac_cv_func_strftime=no"
22107 fi
22108 rm -f conftest*
22109 fi
22110
22111 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22112   echo "$ac_t""yes" 1>&6
22113   cat >> confdefs.h <<\EOF
22114 #define HAVE_STRFTIME 1
22115 EOF
22116
22117 else
22118   echo "$ac_t""no" 1>&6
22119 # strftime is in -lintl on SCO UNIX.
22120 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22121 echo "configure:22122: checking for strftime in -lintl" >&5
22122 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22124   echo $ac_n "(cached) $ac_c" 1>&6
22125 else
22126   ac_save_LIBS="$LIBS"
22127 LIBS="-lintl  $LIBS"
22128 cat > conftest.$ac_ext <<EOF
22129 #line 22130 "configure"
22130 #include "confdefs.h"
22131 /* Override any gcc2 internal prototype to avoid an error.  */
22132 /* We use char because int might match the return type of a gcc2
22133     builtin and then its argument prototype would still apply.  */
22134 char strftime();
22135
22136 int main() {
22137 strftime()
22138 ; return 0; }
22139 EOF
22140 if { (eval echo configure:22141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22141   rm -rf conftest*
22142   eval "ac_cv_lib_$ac_lib_var=yes"
22143 else
22144   echo "configure: failed program was:" >&5
22145   cat conftest.$ac_ext >&5
22146   rm -rf conftest*
22147   eval "ac_cv_lib_$ac_lib_var=no"
22148 fi
22149 rm -f conftest*
22150 LIBS="$ac_save_LIBS"
22151
22152 fi
22153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22154   echo "$ac_t""yes" 1>&6
22155   cat >> confdefs.h <<\EOF
22156 #define HAVE_STRFTIME 1
22157 EOF
22158
22159 LIBS="-lintl $LIBS"
22160 else
22161   echo "$ac_t""no" 1>&6
22162 fi
22163
22164 fi
22165
22166
22167 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22168 echo "configure:22169: checking for inet_aton()" >&5
22169 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22170   echo $ac_n "(cached) $ac_c" 1>&6
22171 else
22172   cat > conftest.$ac_ext <<EOF
22173 #line 22174 "configure"
22174 #include "confdefs.h"
22175
22176 #ifdef HAVE_SYS_TYPES_H
22177 #       include <sys/types.h>
22178 #endif
22179 #ifdef HAVE_SYS_SOCKET_H
22180 #       include <sys/socket.h>
22181 #       ifdef HAVE_SYS_SELECT_H
22182 #               include <sys/select.h>
22183 #       endif
22184 #       include <netinet/in.h>
22185 #       ifdef HAVE_ARPA_INET_H
22186 #               include <arpa/inet.h>
22187 #       endif
22188 #endif
22189
22190 int main() {
22191 struct in_addr in;
22192 int rc = inet_aton( "255.255.255.255", &in );
22193 ; return 0; }
22194 EOF
22195 if { (eval echo configure:22196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22196   rm -rf conftest*
22197   ol_cv_func_inet_aton=yes
22198 else
22199   echo "configure: failed program was:" >&5
22200   cat conftest.$ac_ext >&5
22201   rm -rf conftest*
22202   ol_cv_func_inet_aton=no
22203 fi
22204 rm -f conftest*
22205 fi
22206
22207 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22208   if test $ol_cv_func_inet_aton != no; then
22209     cat >> confdefs.h <<\EOF
22210 #define HAVE_INET_ATON 1
22211 EOF
22212
22213   fi
22214  
22215
22216 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22217 echo "configure:22218: checking for _spawnlp" >&5
22218 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22219   echo $ac_n "(cached) $ac_c" 1>&6
22220 else
22221   cat > conftest.$ac_ext <<EOF
22222 #line 22223 "configure"
22223 #include "confdefs.h"
22224 /* System header to define __stub macros and hopefully few prototypes,
22225     which can conflict with char _spawnlp(); below.  */
22226 #include <assert.h>
22227 /* Override any gcc2 internal prototype to avoid an error.  */
22228 /* We use char because int might match the return type of a gcc2
22229     builtin and then its argument prototype would still apply.  */
22230 char _spawnlp();
22231 char (*f)();
22232
22233 int main() {
22234
22235 /* The GNU C library defines this for functions which it implements
22236     to always fail with ENOSYS.  Some functions are actually named
22237     something starting with __ and the normal name is an alias.  */
22238 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22239 choke me
22240 #else
22241 f = _spawnlp;
22242 #endif
22243
22244 ; return 0; }
22245 EOF
22246 if { (eval echo configure:22247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22247   rm -rf conftest*
22248   eval "ac_cv_func__spawnlp=yes"
22249 else
22250   echo "configure: failed program was:" >&5
22251   cat conftest.$ac_ext >&5
22252   rm -rf conftest*
22253   eval "ac_cv_func__spawnlp=no"
22254 fi
22255 rm -f conftest*
22256 fi
22257
22258 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22259   echo "$ac_t""yes" 1>&6
22260   cat >> confdefs.h <<\EOF
22261 #define HAVE_SPAWNLP 1
22262 EOF
22263
22264 else
22265   echo "$ac_t""no" 1>&6
22266 fi
22267
22268
22269 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22270 echo "configure:22271: checking for _snprintf" >&5
22271 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22272   echo $ac_n "(cached) $ac_c" 1>&6
22273 else
22274   cat > conftest.$ac_ext <<EOF
22275 #line 22276 "configure"
22276 #include "confdefs.h"
22277 /* System header to define __stub macros and hopefully few prototypes,
22278     which can conflict with char _snprintf(); below.  */
22279 #include <assert.h>
22280 /* Override any gcc2 internal prototype to avoid an error.  */
22281 /* We use char because int might match the return type of a gcc2
22282     builtin and then its argument prototype would still apply.  */
22283 char _snprintf();
22284 char (*f)();
22285
22286 int main() {
22287
22288 /* The GNU C library defines this for functions which it implements
22289     to always fail with ENOSYS.  Some functions are actually named
22290     something starting with __ and the normal name is an alias.  */
22291 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22292 choke me
22293 #else
22294 f = _snprintf;
22295 #endif
22296
22297 ; return 0; }
22298 EOF
22299 if { (eval echo configure:22300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22300   rm -rf conftest*
22301   eval "ac_cv_func__snprintf=yes"
22302 else
22303   echo "configure: failed program was:" >&5
22304   cat conftest.$ac_ext >&5
22305   rm -rf conftest*
22306   eval "ac_cv_func__snprintf=no"
22307 fi
22308 rm -f conftest*
22309 fi
22310
22311 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22312   echo "$ac_t""yes" 1>&6
22313   ac_cv_func_snprintf=yes
22314         cat >> confdefs.h <<\EOF
22315 #define snprintf _snprintf
22316 EOF
22317
22318
22319 else
22320   echo "$ac_t""no" 1>&6
22321 fi
22322
22323
22324 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22325 echo "configure:22326: checking for _vsnprintf" >&5
22326 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22327   echo $ac_n "(cached) $ac_c" 1>&6
22328 else
22329   cat > conftest.$ac_ext <<EOF
22330 #line 22331 "configure"
22331 #include "confdefs.h"
22332 /* System header to define __stub macros and hopefully few prototypes,
22333     which can conflict with char _vsnprintf(); below.  */
22334 #include <assert.h>
22335 /* Override any gcc2 internal prototype to avoid an error.  */
22336 /* We use char because int might match the return type of a gcc2
22337     builtin and then its argument prototype would still apply.  */
22338 char _vsnprintf();
22339 char (*f)();
22340
22341 int main() {
22342
22343 /* The GNU C library defines this for functions which it implements
22344     to always fail with ENOSYS.  Some functions are actually named
22345     something starting with __ and the normal name is an alias.  */
22346 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22347 choke me
22348 #else
22349 f = _vsnprintf;
22350 #endif
22351
22352 ; return 0; }
22353 EOF
22354 if { (eval echo configure:22355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22355   rm -rf conftest*
22356   eval "ac_cv_func__vsnprintf=yes"
22357 else
22358   echo "configure: failed program was:" >&5
22359   cat conftest.$ac_ext >&5
22360   rm -rf conftest*
22361   eval "ac_cv_func__vsnprintf=no"
22362 fi
22363 rm -f conftest*
22364 fi
22365
22366 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22367   echo "$ac_t""yes" 1>&6
22368   ac_cv_func_vsnprintf=yes
22369         cat >> confdefs.h <<\EOF
22370 #define vsnprintf _vsnprintf
22371 EOF
22372
22373
22374 else
22375   echo "$ac_t""no" 1>&6
22376 fi
22377
22378
22379 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22380 echo "configure:22381: checking for vprintf" >&5
22381 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22382   echo $ac_n "(cached) $ac_c" 1>&6
22383 else
22384   cat > conftest.$ac_ext <<EOF
22385 #line 22386 "configure"
22386 #include "confdefs.h"
22387 /* System header to define __stub macros and hopefully few prototypes,
22388     which can conflict with char vprintf(); below.  */
22389 #include <assert.h>
22390 /* Override any gcc2 internal prototype to avoid an error.  */
22391 /* We use char because int might match the return type of a gcc2
22392     builtin and then its argument prototype would still apply.  */
22393 char vprintf();
22394 char (*f)();
22395
22396 int main() {
22397
22398 /* The GNU C library defines this for functions which it implements
22399     to always fail with ENOSYS.  Some functions are actually named
22400     something starting with __ and the normal name is an alias.  */
22401 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22402 choke me
22403 #else
22404 f = vprintf;
22405 #endif
22406
22407 ; return 0; }
22408 EOF
22409 if { (eval echo configure:22410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22410   rm -rf conftest*
22411   eval "ac_cv_func_vprintf=yes"
22412 else
22413   echo "configure: failed program was:" >&5
22414   cat conftest.$ac_ext >&5
22415   rm -rf conftest*
22416   eval "ac_cv_func_vprintf=no"
22417 fi
22418 rm -f conftest*
22419 fi
22420
22421 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22422   echo "$ac_t""yes" 1>&6
22423   cat >> confdefs.h <<\EOF
22424 #define HAVE_VPRINTF 1
22425 EOF
22426
22427 else
22428   echo "$ac_t""no" 1>&6
22429 fi
22430
22431 if test "$ac_cv_func_vprintf" != yes; then
22432 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22433 echo "configure:22434: checking for _doprnt" >&5
22434 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22435   echo $ac_n "(cached) $ac_c" 1>&6
22436 else
22437   cat > conftest.$ac_ext <<EOF
22438 #line 22439 "configure"
22439 #include "confdefs.h"
22440 /* System header to define __stub macros and hopefully few prototypes,
22441     which can conflict with char _doprnt(); below.  */
22442 #include <assert.h>
22443 /* Override any gcc2 internal prototype to avoid an error.  */
22444 /* We use char because int might match the return type of a gcc2
22445     builtin and then its argument prototype would still apply.  */
22446 char _doprnt();
22447 char (*f)();
22448
22449 int main() {
22450
22451 /* The GNU C library defines this for functions which it implements
22452     to always fail with ENOSYS.  Some functions are actually named
22453     something starting with __ and the normal name is an alias.  */
22454 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22455 choke me
22456 #else
22457 f = _doprnt;
22458 #endif
22459
22460 ; return 0; }
22461 EOF
22462 if { (eval echo configure:22463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22463   rm -rf conftest*
22464   eval "ac_cv_func__doprnt=yes"
22465 else
22466   echo "configure: failed program was:" >&5
22467   cat conftest.$ac_ext >&5
22468   rm -rf conftest*
22469   eval "ac_cv_func__doprnt=no"
22470 fi
22471 rm -f conftest*
22472 fi
22473
22474 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22475   echo "$ac_t""yes" 1>&6
22476   cat >> confdefs.h <<\EOF
22477 #define HAVE_DOPRNT 1
22478 EOF
22479
22480 else
22481   echo "$ac_t""no" 1>&6
22482 fi
22483
22484 fi
22485
22486
22487 if test $ac_cv_func_vprintf = yes ; then
22488                 for ac_func in snprintf vsnprintf
22489 do
22490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22491 echo "configure:22492: checking for $ac_func" >&5
22492 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22493   echo $ac_n "(cached) $ac_c" 1>&6
22494 else
22495   cat > conftest.$ac_ext <<EOF
22496 #line 22497 "configure"
22497 #include "confdefs.h"
22498 /* System header to define __stub macros and hopefully few prototypes,
22499     which can conflict with char $ac_func(); below.  */
22500 #include <assert.h>
22501 /* Override any gcc2 internal prototype to avoid an error.  */
22502 /* We use char because int might match the return type of a gcc2
22503     builtin and then its argument prototype would still apply.  */
22504 char $ac_func();
22505 char (*f)();
22506
22507 int main() {
22508
22509 /* The GNU C library defines this for functions which it implements
22510     to always fail with ENOSYS.  Some functions are actually named
22511     something starting with __ and the normal name is an alias.  */
22512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22513 choke me
22514 #else
22515 f = $ac_func;
22516 #endif
22517
22518 ; return 0; }
22519 EOF
22520 if { (eval echo configure:22521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22521   rm -rf conftest*
22522   eval "ac_cv_func_$ac_func=yes"
22523 else
22524   echo "configure: failed program was:" >&5
22525   cat conftest.$ac_ext >&5
22526   rm -rf conftest*
22527   eval "ac_cv_func_$ac_func=no"
22528 fi
22529 rm -f conftest*
22530 fi
22531
22532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22533   echo "$ac_t""yes" 1>&6
22534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22535   cat >> confdefs.h <<EOF
22536 #define $ac_tr_func 1
22537 EOF
22538  
22539 else
22540   echo "$ac_t""no" 1>&6
22541 fi
22542 done
22543
22544 fi
22545
22546 for ac_func in \
22547         bcopy                   \
22548         closesocket             \
22549         chroot                  \
22550         endgrent                \
22551         endpwent                \
22552         fcntl                   \
22553         flock                   \
22554         fstat                   \
22555         getdtablesize   \
22556         getgrgid                \
22557         gethostname             \
22558         getpass                 \
22559         getpassphrase   \
22560         getpwuid                \
22561         getpwnam                \
22562         getspnam                \
22563         gettimeofday    \
22564         initgroups              \
22565         lockf                   \
22566         memcpy                  \
22567         memmove                 \
22568         mkstemp                 \
22569         mktemp                  \
22570         pipe                    \
22571         read                    \
22572         recv                    \
22573         recvfrom                \
22574         setpwfile               \
22575         setgid                  \
22576         setegid                 \
22577         setsid                  \
22578         setuid                  \
22579         seteuid                 \
22580         sigaction               \
22581         signal                  \
22582         sigset                  \
22583         strdup                  \
22584         strerror                \
22585         strpbrk                 \
22586         strrchr                 \
22587         strsep                  \
22588         strstr                  \
22589         strtol                  \
22590         strtoul                 \
22591         strspn                  \
22592         sysconf                 \
22593         usleep                  \
22594         waitpid                 \
22595         wait4                   \
22596         write                   \
22597         send                    \
22598         sendmsg                 \
22599         sendto                  \
22600
22601 do
22602 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22603 echo "configure:22604: checking for $ac_func" >&5
22604 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22605   echo $ac_n "(cached) $ac_c" 1>&6
22606 else
22607   cat > conftest.$ac_ext <<EOF
22608 #line 22609 "configure"
22609 #include "confdefs.h"
22610 /* System header to define __stub macros and hopefully few prototypes,
22611     which can conflict with char $ac_func(); below.  */
22612 #include <assert.h>
22613 /* Override any gcc2 internal prototype to avoid an error.  */
22614 /* We use char because int might match the return type of a gcc2
22615     builtin and then its argument prototype would still apply.  */
22616 char $ac_func();
22617 char (*f)();
22618
22619 int main() {
22620
22621 /* The GNU C library defines this for functions which it implements
22622     to always fail with ENOSYS.  Some functions are actually named
22623     something starting with __ and the normal name is an alias.  */
22624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22625 choke me
22626 #else
22627 f = $ac_func;
22628 #endif
22629
22630 ; return 0; }
22631 EOF
22632 if { (eval echo configure:22633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22633   rm -rf conftest*
22634   eval "ac_cv_func_$ac_func=yes"
22635 else
22636   echo "configure: failed program was:" >&5
22637   cat conftest.$ac_ext >&5
22638   rm -rf conftest*
22639   eval "ac_cv_func_$ac_func=no"
22640 fi
22641 rm -f conftest*
22642 fi
22643
22644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22645   echo "$ac_t""yes" 1>&6
22646     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22647   cat >> confdefs.h <<EOF
22648 #define $ac_tr_func 1
22649 EOF
22650  
22651 else
22652   echo "$ac_t""no" 1>&6
22653 fi
22654 done
22655
22656
22657 for ac_func in getopt getpeereid
22658 do
22659 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22660 echo "configure:22661: checking for $ac_func" >&5
22661 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22662   echo $ac_n "(cached) $ac_c" 1>&6
22663 else
22664   cat > conftest.$ac_ext <<EOF
22665 #line 22666 "configure"
22666 #include "confdefs.h"
22667 /* System header to define __stub macros and hopefully few prototypes,
22668     which can conflict with char $ac_func(); below.  */
22669 #include <assert.h>
22670 /* Override any gcc2 internal prototype to avoid an error.  */
22671 /* We use char because int might match the return type of a gcc2
22672     builtin and then its argument prototype would still apply.  */
22673 char $ac_func();
22674 char (*f)();
22675
22676 int main() {
22677
22678 /* The GNU C library defines this for functions which it implements
22679     to always fail with ENOSYS.  Some functions are actually named
22680     something starting with __ and the normal name is an alias.  */
22681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22682 choke me
22683 #else
22684 f = $ac_func;
22685 #endif
22686
22687 ; return 0; }
22688 EOF
22689 if { (eval echo configure:22690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22690   rm -rf conftest*
22691   eval "ac_cv_func_$ac_func=yes"
22692 else
22693   echo "configure: failed program was:" >&5
22694   cat conftest.$ac_ext >&5
22695   rm -rf conftest*
22696   eval "ac_cv_func_$ac_func=no"
22697 fi
22698 rm -f conftest*
22699 fi
22700
22701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22702   echo "$ac_t""yes" 1>&6
22703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22704   cat >> confdefs.h <<EOF
22705 #define $ac_tr_func 1
22706 EOF
22707  
22708 else
22709   echo "$ac_t""no" 1>&6
22710 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22711 fi
22712 done
22713
22714
22715
22716 if test "$ac_cv_func_getopt" != yes; then
22717         LIBSRCS="$LIBSRCS getopt.c"
22718 fi
22719 if test "$ac_cv_func_getpeereid" != yes; then
22720         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22721 echo "configure:22722: checking for msg_accrights in msghdr" >&5
22722 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22723   echo $ac_n "(cached) $ac_c" 1>&6
22724 else
22725   cat > conftest.$ac_ext <<EOF
22726 #line 22727 "configure"
22727 #include "confdefs.h"
22728 #include <sys/socket.h>
22729 int main() {
22730 struct msghdr m; m.msg_accrightslen=0
22731 ; return 0; }
22732 EOF
22733 if { (eval echo configure:22734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22734   rm -rf conftest*
22735   ol_cv_msghdr_msg_accrights=yes
22736 else
22737   echo "configure: failed program was:" >&5
22738   cat conftest.$ac_ext >&5
22739   rm -rf conftest*
22740   ol_cv_msghdr_msg_accrights=no
22741 fi
22742 rm -f conftest*
22743         
22744 fi
22745
22746 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22747   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22748         cat >> confdefs.h <<\EOF
22749 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22750 EOF
22751
22752   fi
22753
22754         LIBSRCS="$LIBSRCS getpeereid.c"
22755 fi
22756 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22757         if test "$ac_cv_func_snprintf" != yes; then
22758                 cat >> confdefs.h <<\EOF
22759 #define snprintf ber_pvt_snprintf
22760 EOF
22761
22762         fi
22763         if test "$ac_cv_func_vsnprintf" != yes; then
22764                 cat >> confdefs.h <<\EOF
22765 #define vsnprintf ber_pvt_vsnprintf
22766 EOF
22767
22768         fi
22769 fi
22770
22771 # Check Configuration
22772 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22773 echo "configure:22774: checking declaration of sys_errlist" >&5
22774 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22775   echo $ac_n "(cached) $ac_c" 1>&6
22776 else
22777   
22778         cat > conftest.$ac_ext <<EOF
22779 #line 22780 "configure"
22780 #include "confdefs.h"
22781
22782 #include <stdio.h>
22783 #include <sys/types.h>
22784 #include <errno.h>
22785 #ifdef WINNT
22786 #include <stdlib.h>
22787 #endif 
22788 int main() {
22789 char *c = (char *) *sys_errlist
22790 ; return 0; }
22791 EOF
22792 if { (eval echo configure:22793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22793   rm -rf conftest*
22794   ol_cv_dcl_sys_errlist=yes
22795         ol_cv_have_sys_errlist=yes
22796 else
22797   echo "configure: failed program was:" >&5
22798   cat conftest.$ac_ext >&5
22799   rm -rf conftest*
22800   ol_cv_dcl_sys_errlist=no
22801 fi
22802 rm -f conftest*
22803 fi
22804
22805 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22806 #
22807 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22808 if test $ol_cv_dcl_sys_errlist = no ; then
22809         cat >> confdefs.h <<\EOF
22810 #define DECL_SYS_ERRLIST 1
22811 EOF
22812
22813
22814         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22815 echo "configure:22816: checking existence of sys_errlist" >&5
22816 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22817   echo $ac_n "(cached) $ac_c" 1>&6
22818 else
22819   
22820                 cat > conftest.$ac_ext <<EOF
22821 #line 22822 "configure"
22822 #include "confdefs.h"
22823 #include <errno.h>
22824 int main() {
22825 char *c = (char *) *sys_errlist
22826 ; return 0; }
22827 EOF
22828 if { (eval echo configure:22829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22829   rm -rf conftest*
22830   ol_cv_have_sys_errlist=yes
22831 else
22832   echo "configure: failed program was:" >&5
22833   cat conftest.$ac_ext >&5
22834   rm -rf conftest*
22835   ol_cv_have_sys_errlist=no
22836 fi
22837 rm -f conftest*
22838 fi
22839
22840 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22841 fi
22842 if test $ol_cv_have_sys_errlist = yes ; then
22843         cat >> confdefs.h <<\EOF
22844 #define HAVE_SYS_ERRLIST 1
22845 EOF
22846
22847 fi
22848
22849
22850
22851 if test "$ol_enable_debug" != no ; then
22852         cat >> confdefs.h <<\EOF
22853 #define LDAP_DEBUG 1
22854 EOF
22855
22856 fi
22857 if test "$ol_enable_syslog" = yes ; then
22858         cat >> confdefs.h <<\EOF
22859 #define LDAP_SYSLOG 1
22860 EOF
22861
22862 fi
22863 if test "$ol_link_kbind" != no ; then
22864         cat >> confdefs.h <<\EOF
22865 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22866 EOF
22867
22868 fi
22869 if test "$ol_enable_proctitle" != no ; then
22870         cat >> confdefs.h <<\EOF
22871 #define LDAP_PROCTITLE 1
22872 EOF
22873
22874 fi
22875 if test "$ol_enable_referrals" != no ; then
22876         cat >> confdefs.h <<\EOF
22877 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22878 EOF
22879
22880 fi
22881 if test "$ol_enable_local" != no; then
22882         cat >> confdefs.h <<\EOF
22883 #define LDAP_PF_LOCAL 1
22884 EOF
22885
22886 fi
22887 if test "$ol_link_ipv6" != no; then
22888         cat >> confdefs.h <<\EOF
22889 #define LDAP_PF_INET6 1
22890 EOF
22891
22892 fi
22893 if test "$ol_enable_cleartext" != no ; then
22894         cat >> confdefs.h <<\EOF
22895 #define SLAPD_CLEARTEXT 1
22896 EOF
22897
22898 fi
22899 if test "$ol_enable_crypt" != no ; then
22900         cat >> confdefs.h <<\EOF
22901 #define SLAPD_CRYPT 1
22902 EOF
22903
22904 fi
22905 if test "$ol_link_kpasswd" != no ; then
22906         cat >> confdefs.h <<\EOF
22907 #define SLAPD_KPASSWD 1
22908 EOF
22909
22910 fi
22911 if test "$ol_link_spasswd" != no ; then
22912         cat >> confdefs.h <<\EOF
22913 #define SLAPD_SPASSWD 1
22914 EOF
22915
22916 fi
22917 if test "$ol_enable_multimaster" != no ; then
22918         cat >> confdefs.h <<\EOF
22919 #define SLAPD_MULTIMASTER 1
22920 EOF
22921
22922 fi
22923 if test "$ol_enable_phonetic" != no ; then
22924         cat >> confdefs.h <<\EOF
22925 #define SLAPD_PHONETIC 1
22926 EOF
22927
22928 fi
22929 if test "$ol_enable_rlookups" != no ; then
22930         cat >> confdefs.h <<\EOF
22931 #define SLAPD_RLOOKUPS 1
22932 EOF
22933
22934 fi
22935 if test "$ol_enable_aci" != no ; then
22936         cat >> confdefs.h <<\EOF
22937 #define SLAPD_ACI_ENABLED 1
22938 EOF
22939
22940 fi
22941
22942 if test "$ol_link_modules" != no ; then
22943         cat >> confdefs.h <<\EOF
22944 #define SLAPD_MODULES 1
22945 EOF
22946
22947         BUILD_SLAPD=yes
22948         SLAPD_MODULES_LDFLAGS="-dlopen self"
22949 fi
22950
22951 if test "$ol_enable_bdb" != no ; then
22952         cat >> confdefs.h <<\EOF
22953 #define SLAPD_BDB 1
22954 EOF
22955
22956         BUILD_SLAPD=yes
22957         BUILD_BDB=yes
22958         if test "$ol_with_bdb_module" != static ; then
22959                 cat >> confdefs.h <<\EOF
22960 #define SLAPD_BDB_DYNAMIC 1
22961 EOF
22962
22963                 BUILD_BDB=mod
22964                 BUILD_BDB_DYNAMIC=shared
22965                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22966         else
22967                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22968         fi
22969 fi
22970
22971 if test "$ol_link_dnssrv" != no ; then
22972         cat >> confdefs.h <<\EOF
22973 #define SLAPD_DNSSRV 1
22974 EOF
22975
22976         BUILD_SLAPD=yes
22977         BUILD_DNSSRV=yes
22978         if test "$ol_with_dnssrv_module" != static ; then
22979                 cat >> confdefs.h <<\EOF
22980 #define SLAPD_DNSSRV_DYNAMIC 1
22981 EOF
22982
22983                 BUILD_DNSSRV=mod
22984                 BUILD_DNSSRV_DYNAMIC=shared
22985                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22986         else
22987                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22988         fi
22989 fi
22990
22991 if test "$ol_enable_ldap" != no ; then
22992         cat >> confdefs.h <<\EOF
22993 #define SLAPD_LDAP 1
22994 EOF
22995
22996         BUILD_SLAPD=yes
22997         BUILD_LDAP=yes
22998         if test "$ol_with_ldap_module" != static ; then
22999                 cat >> confdefs.h <<\EOF
23000 #define SLAPD_LDAP_DYNAMIC 1
23001 EOF
23002
23003                 BUILD_LDAP=mod
23004                 BUILD_LDAP_DYNAMIC=shared
23005                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23006         else
23007                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23008         fi
23009 fi
23010
23011 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23012         cat >> confdefs.h <<\EOF
23013 #define SLAPD_LDBM 1
23014 EOF
23015
23016         BUILD_SLAPD=yes
23017         BUILD_LDBM=yes
23018         if test "$ol_with_ldbm_module" != static ; then
23019                 cat >> confdefs.h <<\EOF
23020 #define SLAPD_LDBM_DYNAMIC 1
23021 EOF
23022
23023                 BUILD_LDBM=mod
23024                 BUILD_LDBM_DYNAMIC=shared
23025                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23026         else
23027                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23028         fi
23029 fi
23030
23031 if test "$ol_enable_meta" != no ; then
23032         if test "$ol_enable_ldap" = no ; then
23033                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23034         fi
23035         if test "$ol_enable_rewrite" = no ; then
23036                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23037         fi
23038         cat >> confdefs.h <<\EOF
23039 #define SLAPD_META 1
23040 EOF
23041
23042         BUILD_SLAPD=yes
23043         BUILD_META=yes
23044         BUILD_REWRITE=yes
23045         if test "$ol_with_meta_module" != static ; then
23046                 cat >> confdefs.h <<\EOF
23047 #define SLAPD_META_DYNAMIC 1
23048 EOF
23049
23050                 BUILD_META=mod
23051                 BUILD_META_DYNAMIC=shared
23052                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23053         else
23054                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23055         fi
23056 fi
23057
23058 if test "$ol_enable_monitor" != no ; then
23059         cat >> confdefs.h <<\EOF
23060 #define SLAPD_MONITOR 1
23061 EOF
23062
23063         BUILD_SLAPD=yes
23064         BUILD_MONITOR=yes
23065         if test "$ol_with_monitor_module" != static ; then
23066                 cat >> confdefs.h <<\EOF
23067 #define SLAPD_MONITOR_DYNAMIC 1
23068 EOF
23069
23070                 BUILD_MONITOR=mod
23071                 BUILD_MONITOR_DYNAMIC=shared
23072                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23073         else
23074                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23075         fi
23076 fi
23077
23078 if test "$ol_enable_null" != no ; then
23079         cat >> confdefs.h <<\EOF
23080 #define SLAPD_NULL 1
23081 EOF
23082
23083         BUILD_SLAPD=yes
23084         BUILD_NULL=yes
23085         if test "$ol_with_null_module" != static ; then
23086                 cat >> confdefs.h <<\EOF
23087 #define SLAPD_NULL_DYNAMIC 1
23088 EOF
23089
23090                 BUILD_NULL=mod
23091                 BUILD_NULL_DYNAMIC=shared
23092                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23093         else
23094                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23095         fi
23096 fi
23097
23098 if test "$ol_enable_passwd" != no ; then
23099         cat >> confdefs.h <<\EOF
23100 #define SLAPD_PASSWD 1
23101 EOF
23102
23103         BUILD_SLAPD=yes
23104         BUILD_PASSWD=yes
23105         if test "$ol_with_passwd_module" != static ; then
23106                 cat >> confdefs.h <<\EOF
23107 #define SLAPD_PASSWD_DYNAMIC 1
23108 EOF
23109
23110                 BUILD_PASSWD=mod
23111                 BUILD_PASSWD_DYNAMIC=shared
23112                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23113         else
23114                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23115         fi
23116 fi
23117
23118 if test "$ol_link_perl" != no ; then
23119         cat >> confdefs.h <<\EOF
23120 #define SLAPD_PERL 1
23121 EOF
23122
23123         BUILD_SLAPD=yes
23124         BUILD_PERL=yes
23125         if test "$ol_with_perl_module" != static ; then
23126                 cat >> confdefs.h <<\EOF
23127 #define SLAPD_PERL_DYNAMIC 1
23128 EOF
23129
23130                 BUILD_PERL=mod
23131                 BUILD_PERL_DYNAMIC=shared
23132                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23133         else
23134                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23135         fi
23136 fi
23137
23138 if test "$ol_enable_shell" != no ; then
23139         if test "$ol_link_thread" != no ; then
23140                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23141         fi
23142         cat >> confdefs.h <<\EOF
23143 #define SLAPD_SHELL 1
23144 EOF
23145
23146         BUILD_SLAPD=yes
23147         BUILD_SHELL=yes
23148         if test "$ol_with_shell_module" != static ; then
23149                 cat >> confdefs.h <<\EOF
23150 #define SLAPD_SHELL_DYNAMIC 1
23151 EOF
23152
23153                 BUILD_SHELL=mod
23154                 BUILD_SHELL_DYNAMIC=shared
23155                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23156         else
23157                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23158         fi
23159 fi
23160
23161 if test "$ol_link_sql" != no ; then
23162         cat >> confdefs.h <<\EOF
23163 #define SLAPD_SQL 1
23164 EOF
23165
23166         BUILD_SLAPD=yes
23167         BUILD_SQL=yes
23168         if test "$ol_with_sql_module" != static; then
23169                 cat >> confdefs.h <<\EOF
23170 #define SLAPD_SQL_DYNAMIC 1
23171 EOF
23172
23173                 BUILD_SQL=mod
23174                 BUILD_SQL_DYNAMIC=shared
23175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23176         else
23177                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23178         fi
23179 fi
23180
23181 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23182         $BUILD_SLAPD = yes ; then
23183         BUILD_SLURPD=yes
23184 fi
23185
23186 if test "$ol_enable_rewrite" != no ; then
23187         cat >> confdefs.h <<\EOF
23188 #define ENABLE_REWRITE 1
23189 EOF
23190
23191         BUILD_REWRITE=yes
23192 fi
23193
23194
23195
23196 if test "$ac_cv_mingw32" = yes ; then
23197         PLAT=NT
23198         SLAPD_MODULES_LDFLAGS=
23199 else
23200         PLAT=UNIX
23201 fi
23202
23203 if test -z "$SLAPD_STATIC_BACKENDS"; then
23204         SLAPD_NO_STATIC='#'
23205 else
23206         SLAPD_NO_STATIC=
23207 fi
23208
23209
23210
23211
23212
23213
23214   
23215   
23216   
23217   
23218   
23219   
23220   
23221   
23222   
23223   
23224   
23225   
23226   
23227   
23228   
23229   
23230   
23231   
23232   
23233   
23234   
23235   
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273 # Check whether --with-xxinstall or --without-xxinstall was given.
23274 if test "${with_xxinstall+set}" = set; then
23275   withval="$with_xxinstall"
23276   :
23277 fi
23278
23279
23280
23281 trap '' 1 2 15
23282
23283 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23284
23285 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23286 # Let make expand exec_prefix.
23287 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23288
23289 # Any assignment to VPATH causes Sun make to only execute
23290 # the first set of double-colon rules, so remove it if not needed.
23291 # If there is a colon in the path, we need to keep it.
23292 if test "x$srcdir" = x.; then
23293   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23294 fi
23295
23296 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23297
23298 DEFS=-DHAVE_CONFIG_H
23299
23300 # Without the "./", some shells look in PATH for config.status.
23301 : ${CONFIG_STATUS=./config.status}
23302
23303 echo creating $CONFIG_STATUS
23304 rm -f $CONFIG_STATUS
23305 cat > $CONFIG_STATUS <<EOF
23306 #! /bin/sh
23307 # Generated automatically by configure.
23308 # Run this file to recreate the current configuration.
23309 # This directory was configured as follows,
23310 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23311 #
23312 # $0 $ac_configure_args
23313 #
23314 # Compiler output produced by configure, useful for debugging
23315 # configure, is in ./config.log if it exists.
23316
23317 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23318 for ac_option
23319 do
23320   case "\$ac_option" in
23321   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23322     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23323     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23324   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23325     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23326     exit 0 ;;
23327   -help | --help | --hel | --he | --h)
23328     echo "\$ac_cs_usage"; exit 0 ;;
23329   *) echo "\$ac_cs_usage"; exit 1 ;;
23330   esac
23331 done
23332
23333 ac_given_srcdir=$srcdir
23334 ac_given_INSTALL="$INSTALL"
23335
23336 trap 'rm -fr `echo "\
23337 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23338 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23339 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23340 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23341 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23342 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23343 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23344 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23345 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23346 include/Makefile:build/top.mk:include/Makefile.in \
23347 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23348 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23349 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23350 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23351 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23352 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23353 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23354 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23355 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23356 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23357 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23358 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23359 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23360 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23361 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23362 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23363 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23364 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23365 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23366 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23367 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23368 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23369 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23370 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23371 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23372 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23373 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23374 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23375  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23376 EOF
23377 cat >> $CONFIG_STATUS <<EOF
23378
23379 # Protect against being on the right side of a sed subst in config.status.
23380 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23381  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23382 $ac_vpsub
23383 $extrasub
23384 s%@SHELL@%$SHELL%g
23385 s%@CFLAGS@%$CFLAGS%g
23386 s%@CPPFLAGS@%$CPPFLAGS%g
23387 s%@CXXFLAGS@%$CXXFLAGS%g
23388 s%@FFLAGS@%$FFLAGS%g
23389 s%@DEFS@%$DEFS%g
23390 s%@LDFLAGS@%$LDFLAGS%g
23391 s%@LIBS@%$LIBS%g
23392 s%@exec_prefix@%$exec_prefix%g
23393 s%@prefix@%$prefix%g
23394 s%@program_transform_name@%$program_transform_name%g
23395 s%@bindir@%$bindir%g
23396 s%@sbindir@%$sbindir%g
23397 s%@libexecdir@%$libexecdir%g
23398 s%@datadir@%$datadir%g
23399 s%@sysconfdir@%$sysconfdir%g
23400 s%@sharedstatedir@%$sharedstatedir%g
23401 s%@localstatedir@%$localstatedir%g
23402 s%@libdir@%$libdir%g
23403 s%@includedir@%$includedir%g
23404 s%@oldincludedir@%$oldincludedir%g
23405 s%@infodir@%$infodir%g
23406 s%@mandir@%$mandir%g
23407 s%@host@%$host%g
23408 s%@host_alias@%$host_alias%g
23409 s%@host_cpu@%$host_cpu%g
23410 s%@host_vendor@%$host_vendor%g
23411 s%@host_os@%$host_os%g
23412 s%@target@%$target%g
23413 s%@target_alias@%$target_alias%g
23414 s%@target_cpu@%$target_cpu%g
23415 s%@target_vendor@%$target_vendor%g
23416 s%@target_os@%$target_os%g
23417 s%@build@%$build%g
23418 s%@build_alias@%$build_alias%g
23419 s%@build_cpu@%$build_cpu%g
23420 s%@build_vendor@%$build_vendor%g
23421 s%@build_os@%$build_os%g
23422 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23423 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23424 s%@INSTALL_DATA@%$INSTALL_DATA%g
23425 s%@PACKAGE@%$PACKAGE%g
23426 s%@VERSION@%$VERSION%g
23427 s%@ACLOCAL@%$ACLOCAL%g
23428 s%@AUTOCONF@%$AUTOCONF%g
23429 s%@AUTOMAKE@%$AUTOMAKE%g
23430 s%@AUTOHEADER@%$AUTOHEADER%g
23431 s%@MAKEINFO@%$MAKEINFO%g
23432 s%@install_sh@%$install_sh%g
23433 s%@AMTAR@%$AMTAR%g
23434 s%@AWK@%$AWK%g
23435 s%@AMTARFLAGS@%$AMTARFLAGS%g
23436 s%@SET_MAKE@%$SET_MAKE%g
23437 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23438 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23439 s%@top_builddir@%$top_builddir%g
23440 s%@ldap_subdir@%$ldap_subdir%g
23441 s%@CC@%$CC%g
23442 s%@AR@%$AR%g
23443 s%@LN_S@%$LN_S%g
23444 s%@OBJEXT@%$OBJEXT%g
23445 s%@EXEEXT@%$EXEEXT%g
23446 s%@ECHO@%$ECHO%g
23447 s%@RANLIB@%$RANLIB%g
23448 s%@STRIP@%$STRIP%g
23449 s%@DLLTOOL@%$DLLTOOL%g
23450 s%@AS@%$AS%g
23451 s%@OBJDUMP@%$OBJDUMP%g
23452 s%@CPP@%$CPP%g
23453 s%@LIBTOOL@%$LIBTOOL%g
23454 s%@LN_H@%$LN_H%g
23455 s%@PERLBIN@%$PERLBIN%g
23456 s%@OL_MKDEP@%$OL_MKDEP%g
23457 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23458 s%@LTSTATIC@%$LTSTATIC%g
23459 s%@LIBOBJS@%$LIBOBJS%g
23460 s%@LIBSRCS@%$LIBSRCS%g
23461 s%@PLAT@%$PLAT%g
23462 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23463 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23464 s%@BUILD_BDB@%$BUILD_BDB%g
23465 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23466 s%@BUILD_LDAP@%$BUILD_LDAP%g
23467 s%@BUILD_LDBM@%$BUILD_LDBM%g
23468 s%@BUILD_META@%$BUILD_META%g
23469 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23470 s%@BUILD_NULL@%$BUILD_NULL%g
23471 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23472 s%@BUILD_PERL@%$BUILD_PERL%g
23473 s%@BUILD_SHELL@%$BUILD_SHELL%g
23474 s%@BUILD_SQL@%$BUILD_SQL%g
23475 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23476 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23477 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23478 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23479 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23480 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23481 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23482 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23483 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23484 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23485 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23486 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23487 s%@LDAP_LIBS@%$LDAP_LIBS%g
23488 s%@LDIF_LIBS@%$LDIF_LIBS%g
23489 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23490 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23491 s%@LDBM_LIBS@%$LDBM_LIBS%g
23492 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23493 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23494 s%@WRAP_LIBS@%$WRAP_LIBS%g
23495 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23496 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23497 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23498 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23499 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23500 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23501 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23502 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23503 s%@KRB4_LIBS@%$KRB4_LIBS%g
23504 s%@KRB5_LIBS@%$KRB5_LIBS%g
23505 s%@READLINE_LIBS@%$READLINE_LIBS%g
23506 s%@SASL_LIBS@%$SASL_LIBS%g
23507 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23508 s%@TLS_LIBS@%$TLS_LIBS%g
23509 s%@MODULES_LIBS@%$MODULES_LIBS%g
23510 s%@AUTH_LIBS@%$AUTH_LIBS%g
23511 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23512 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23513 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23514 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23515
23516 CEOF
23517 EOF
23518
23519 cat >> $CONFIG_STATUS <<\EOF
23520
23521 # Split the substitutions into bite-sized pieces for seds with
23522 # small command number limits, like on Digital OSF/1 and HP-UX.
23523 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23524 ac_file=1 # Number of current file.
23525 ac_beg=1 # First line for current file.
23526 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23527 ac_more_lines=:
23528 ac_sed_cmds=""
23529 while $ac_more_lines; do
23530   if test $ac_beg -gt 1; then
23531     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23532   else
23533     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23534   fi
23535   if test ! -s conftest.s$ac_file; then
23536     ac_more_lines=false
23537     rm -f conftest.s$ac_file
23538   else
23539     if test -z "$ac_sed_cmds"; then
23540       ac_sed_cmds="sed -f conftest.s$ac_file"
23541     else
23542       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23543     fi
23544     ac_file=`expr $ac_file + 1`
23545     ac_beg=$ac_end
23546     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23547   fi
23548 done
23549 if test -z "$ac_sed_cmds"; then
23550   ac_sed_cmds=cat
23551 fi
23552 EOF
23553
23554 cat >> $CONFIG_STATUS <<EOF
23555
23556 CONFIG_FILES=\${CONFIG_FILES-"\
23557 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23558 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23559 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23560 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23561 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23562 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23563 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23564 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23565 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23566 include/Makefile:build/top.mk:include/Makefile.in \
23567 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23568 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23569 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23570 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23571 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23572 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23573 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23574 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23575 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23576 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23577 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23578 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23579 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23580 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23581 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23582 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23583 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23584 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23585 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23586 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23587 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23588 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23589 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23590 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23591 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23592 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23593 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23594 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23595 "}
23596 EOF
23597 cat >> $CONFIG_STATUS <<\EOF
23598 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23599   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23600   case "$ac_file" in
23601   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23602        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23603   *) ac_file_in="${ac_file}.in" ;;
23604   esac
23605
23606   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23607
23608   # Remove last slash and all that follows it.  Not all systems have dirname.
23609   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23610   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23611     # The file is in a subdirectory.
23612     test ! -d "$ac_dir" && mkdir "$ac_dir"
23613     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23614     # A "../" for each directory in $ac_dir_suffix.
23615     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23616   else
23617     ac_dir_suffix= ac_dots=
23618   fi
23619
23620   case "$ac_given_srcdir" in
23621   .)  srcdir=.
23622       if test -z "$ac_dots"; then top_srcdir=.
23623       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23624   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23625   *) # Relative path.
23626     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23627     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23628   esac
23629
23630   case "$ac_given_INSTALL" in
23631   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23632   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23633   esac
23634
23635   echo creating "$ac_file"
23636   rm -f "$ac_file"
23637   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23638   case "$ac_file" in
23639   *[Mm]akefile*) ac_comsub="1i\\
23640 # $configure_input" ;;
23641   *) ac_comsub= ;;
23642   esac
23643
23644   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23645   sed -e "$ac_comsub
23646 s%@configure_input@%$configure_input%g
23647 s%@srcdir@%$srcdir%g
23648 s%@top_srcdir@%$top_srcdir%g
23649 s%@INSTALL@%$INSTALL%g
23650 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23651 fi; done
23652 rm -f conftest.s*
23653
23654 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23655 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23656 #
23657 # ac_d sets the value in "#define NAME VALUE" lines.
23658 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23659 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23660 ac_dC='\3'
23661 ac_dD='%g'
23662 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23663 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23664 ac_uB='\([      ]\)%\1#\2define\3'
23665 ac_uC=' '
23666 ac_uD='\4%g'
23667 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23668 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23669 ac_eB='$%\1#\2define\3'
23670 ac_eC=' '
23671 ac_eD='%g'
23672
23673 if test "${CONFIG_HEADERS+set}" != set; then
23674 EOF
23675 cat >> $CONFIG_STATUS <<EOF
23676   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23677 EOF
23678 cat >> $CONFIG_STATUS <<\EOF
23679 fi
23680 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23681   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23682   case "$ac_file" in
23683   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23684        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23685   *) ac_file_in="${ac_file}.in" ;;
23686   esac
23687
23688   echo creating $ac_file
23689
23690   rm -f conftest.frag conftest.in conftest.out
23691   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23692   cat $ac_file_inputs > conftest.in
23693
23694 EOF
23695
23696 # Transform confdefs.h into a sed script conftest.vals that substitutes
23697 # the proper values into config.h.in to produce config.h.  And first:
23698 # Protect against being on the right side of a sed subst in config.status.
23699 # Protect against being in an unquoted here document in config.status.
23700 rm -f conftest.vals
23701 cat > conftest.hdr <<\EOF
23702 s/[\\&%]/\\&/g
23703 s%[\\$`]%\\&%g
23704 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23705 s%ac_d%ac_u%gp
23706 s%ac_u%ac_e%gp
23707 EOF
23708 sed -n -f conftest.hdr confdefs.h > conftest.vals
23709 rm -f conftest.hdr
23710
23711 # This sed command replaces #undef with comments.  This is necessary, for
23712 # example, in the case of _POSIX_SOURCE, which is predefined and required
23713 # on some systems where configure will not decide to define it.
23714 cat >> conftest.vals <<\EOF
23715 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23716 EOF
23717
23718 # Break up conftest.vals because some shells have a limit on
23719 # the size of here documents, and old seds have small limits too.
23720
23721 rm -f conftest.tail
23722 while :
23723 do
23724   ac_lines=`grep -c . conftest.vals`
23725   # grep -c gives empty output for an empty file on some AIX systems.
23726   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23727   # Write a limited-size here document to conftest.frag.
23728   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23729   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23730   echo 'CEOF
23731   sed -f conftest.frag conftest.in > conftest.out
23732   rm -f conftest.in
23733   mv conftest.out conftest.in
23734 ' >> $CONFIG_STATUS
23735   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23736   rm -f conftest.vals
23737   mv conftest.tail conftest.vals
23738 done
23739 rm -f conftest.vals
23740
23741 cat >> $CONFIG_STATUS <<\EOF
23742   rm -f conftest.frag conftest.h
23743   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23744   cat conftest.in >> conftest.h
23745   rm -f conftest.in
23746   if cmp -s $ac_file conftest.h 2>/dev/null; then
23747     echo "$ac_file is unchanged"
23748     rm -f conftest.h
23749   else
23750     # Remove last slash and all that follows it.  Not all systems have dirname.
23751       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23752       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23753       # The file is in a subdirectory.
23754       test ! -d "$ac_dir" && mkdir "$ac_dir"
23755     fi
23756     rm -f $ac_file
23757     mv conftest.h $ac_file
23758   fi
23759 fi; done
23760
23761 EOF
23762 cat >> $CONFIG_STATUS <<EOF
23763
23764 EOF
23765 cat >> $CONFIG_STATUS <<\EOF
23766
23767 date > stamp-h
23768 echo Please run \"make depend\" to build dependencies
23769
23770 exit 0
23771 EOF
23772 chmod +x $CONFIG_STATUS
23773 rm -fr confdefs* $ac_clean_files
23774 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23775