]> git.sur5r.net Git - openldap/blob - configure
More for 2.2beta
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.5 2003/09/22 04:09:38 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos 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-kpasswd      enable Kerberos password verification [no]"
69 ac_help="$ac_help
70     --enable-lmpasswd     enable LAN Manager passwords [no]"
71 ac_help="$ac_help
72     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
73 ac_help="$ac_help
74     --enable-modules      enable dynamic module support [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-slapi        enable SLAPI support (experimental) [no]"
81 ac_help="$ac_help
82     --enable-slp          enable SLPv2 support [no]"
83 ac_help="$ac_help
84     --enable-wrappers     enable tcp wrapper support [no]"
85 ac_help="$ac_help
86     --enable-bdb          enable Berkeley DB backend [yes]"
87 ac_help="$ac_help
88     --with-bdb-module     module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-dnssrv       enable dnssrv backend [no]"
91 ac_help="$ac_help
92     --with-dnssrv-module  module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend [no]"
95 ac_help="$ac_help
96     --with-hdb-module     module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [no]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type static|dynamic [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
109 ac_help="$ac_help
110     --enable-meta         enable metadirectory backend [no]"
111 ac_help="$ac_help
112     --with-meta-module    module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-monitor      enable monitor backend [no]"
115 ac_help="$ac_help
116     --with-monitor-module module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-null         enable null backend [no]"
119 ac_help="$ac_help
120     --with-null-module    module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138
139 SLURPD (Replication Daemon) Options:"
140 ac_help="$ac_help
141   --enable-slurpd         enable building slurpd [auto]"
142 ac_help="$ac_help
143
144 Library Generation & Linking Options"
145 ac_help="$ac_help
146   --enable-static[=PKGS]  build static libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-shared[=PKGS]  build shared libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
151 ac_help="$ac_help
152   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
153
154 # Find the correct PATH separator.  Usually this is `:', but
155 # DJGPP uses `;' like DOS.
156 if test "X${PATH_SEPARATOR+set}" != Xset; then
157   UNAME=${UNAME-`uname 2>/dev/null`}
158   case X$UNAME in
159     *-DOS) lt_cv_sys_path_separator=';' ;;
160     *)     lt_cv_sys_path_separator=':' ;;
161   esac
162   PATH_SEPARATOR=$lt_cv_sys_path_separator
163 fi
164
165
166 # Check that we are running under the correct shell.
167 SHELL=${CONFIG_SHELL-/bin/sh}
168
169 case X$ECHO in
170 X*--fallback-echo)
171   # Remove one level of quotation (which was required for Make).
172   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
173   ;;
174 esac
175
176 echo=${ECHO-echo}
177 if test "X$1" = X--no-reexec; then
178   # Discard the --no-reexec flag, and continue.
179   shift
180 elif test "X$1" = X--fallback-echo; then
181   # Avoid inline document here, it may be left over
182   :
183 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
184   # Yippee, $echo works!
185   :
186 else
187   # Restart under the correct shell.
188   exec $SHELL "$0" --no-reexec ${1+"$@"}
189 fi
190
191 if test "X$1" = X--fallback-echo; then
192   # used as fallback echo
193   shift
194   cat <<EOF
195
196 EOF
197   exit 0
198 fi
199
200 # The HP-UX ksh and POSIX shell print the target directory to stdout
201 # if CDPATH is set.
202 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
203
204 if test -z "$ECHO"; then
205 if test "X${echo_test_string+set}" != Xset; then
206 # find a string as large as possible, as long as the shell can cope with it
207   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
208     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
209     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
210        echo_test_string="`eval $cmd`" &&
211        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
212     then
213       break
214     fi
215   done
216 fi
217
218 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
219    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
220    test "X$echo_testing_string" = "X$echo_test_string"; then
221   :
222 else
223   # The Solaris, AIX, and Digital Unix default echo programs unquote
224   # backslashes.  This makes it impossible to quote backslashes using
225   #   echo "$something" | sed 's/\\/\\\\/g'
226   #
227   # So, first we look for a working echo in the user's PATH.
228
229   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
230   for dir in $PATH /usr/ucb; do
231     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
232        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
233        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
234        test "X$echo_testing_string" = "X$echo_test_string"; then
235       echo="$dir/echo"
236       break
237     fi
238   done
239   IFS="$save_ifs"
240
241   if test "X$echo" = Xecho; then
242     # We didn't find a better echo, so look for alternatives.
243     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
244        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
245        test "X$echo_testing_string" = "X$echo_test_string"; then
246       # This shell has a builtin print -r that does the trick.
247       echo='print -r'
248     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
249          test "X$CONFIG_SHELL" != X/bin/ksh; then
250       # If we have ksh, try running configure again with it.
251       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
252       export ORIGINAL_CONFIG_SHELL
253       CONFIG_SHELL=/bin/ksh
254       export CONFIG_SHELL
255       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
256     else
257       # Try using printf.
258       echo='printf %s\n'
259       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
260          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
261          test "X$echo_testing_string" = "X$echo_test_string"; then
262         # Cool, printf works
263         :
264       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
265            test "X$echo_testing_string" = 'X\t' &&
266            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
267            test "X$echo_testing_string" = "X$echo_test_string"; then
268         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
269         export CONFIG_SHELL
270         SHELL="$CONFIG_SHELL"
271         export SHELL
272         echo="$CONFIG_SHELL $0 --fallback-echo"
273       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       else
279         # maybe with a smaller string...
280         prev=:
281
282         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
283           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
284           then
285             break
286           fi
287           prev="$cmd"
288         done
289
290         if test "$prev" != 'sed 50q "$0"'; then
291           echo_test_string=`eval $prev`
292           export echo_test_string
293           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
294         else
295           # Oops.  We lost completely, so just stick with echo.
296           echo=echo
297         fi
298       fi
299     fi
300   fi
301 fi
302 fi
303
304 # Copy echo and quote the copy suitably for passing to libtool from
305 # the Makefile, instead of quoting the original, which is used later.
306 ECHO=$echo
307 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
308    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
309 fi
310
311
312 ac_help="$ac_help
313   --disable-libtool-lock  avoid locking (might break parallel builds)"
314 ac_help="$ac_help
315   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
316 ac_help="$ac_help
317
318 See INSTALL file for further details."
319
320 # Initialize some variables set by options.
321 # The variables have the same names as the options, with
322 # dashes changed to underlines.
323 build=NONE
324 cache_file=./config.cache
325 exec_prefix=NONE
326 host=NONE
327 no_create=
328 nonopt=NONE
329 no_recursion=
330 prefix=NONE
331 program_prefix=NONE
332 program_suffix=NONE
333 program_transform_name=s,x,x,
334 silent=
335 site=
336 srcdir=
337 target=NONE
338 verbose=
339 x_includes=NONE
340 x_libraries=NONE
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 # Initialize some other variables.
355 subdirs=
356 MFLAGS= MAKEFLAGS=
357 SHELL=${CONFIG_SHELL-/bin/sh}
358 # Maximum number of lines to put in a shell here document.
359 ac_max_here_lines=12
360
361 ac_prev=
362 for ac_option
363 do
364
365   # If the previous option needs an argument, assign it.
366   if test -n "$ac_prev"; then
367     eval "$ac_prev=\$ac_option"
368     ac_prev=
369     continue
370   fi
371
372   case "$ac_option" in
373   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
374   *) ac_optarg= ;;
375   esac
376
377   # Accept the important Cygnus configure options, so we can diagnose typos.
378
379   case "$ac_option" in
380
381   -bindir | --bindir | --bindi | --bind | --bin | --bi)
382     ac_prev=bindir ;;
383   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
384     bindir="$ac_optarg" ;;
385
386   -build | --build | --buil | --bui | --bu)
387     ac_prev=build ;;
388   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
389     build="$ac_optarg" ;;
390
391   -cache-file | --cache-file | --cache-fil | --cache-fi \
392   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
393     ac_prev=cache_file ;;
394   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
395   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
396     cache_file="$ac_optarg" ;;
397
398   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
399     ac_prev=datadir ;;
400   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
401   | --da=*)
402     datadir="$ac_optarg" ;;
403
404   -disable-* | --disable-*)
405     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
408       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
409     fi
410     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
411     eval "enable_${ac_feature}=no" ;;
412
413   -enable-* | --enable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     case "$ac_option" in
421       *=*) ;;
422       *) ac_optarg=yes ;;
423     esac
424     eval "enable_${ac_feature}='$ac_optarg'" ;;
425
426   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
427   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
428   | --exec | --exe | --ex)
429     ac_prev=exec_prefix ;;
430   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
431   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
432   | --exec=* | --exe=* | --ex=*)
433     exec_prefix="$ac_optarg" ;;
434
435   -gas | --gas | --ga | --g)
436     # Obsolete; use --with-gas.
437     with_gas=yes ;;
438
439   -help | --help | --hel | --he)
440     # Omit some internal or obsolete options to make the list less imposing.
441     # This message is too long to be a string in the A/UX 3.1 sh.
442     cat << EOF
443 Usage: configure [options] [host]
444 Options: [defaults in brackets after descriptions]
445 Configuration:
446   --cache-file=FILE       cache test results in FILE
447   --help                  print this message
448   --no-create             do not create output files
449   --quiet, --silent       do not print \`checking...' messages
450   --version               print the version of autoconf that created configure
451 Directory and file names:
452   --prefix=PREFIX         install architecture-independent files in PREFIX
453                           [$ac_default_prefix]
454   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
455                           [same as prefix]
456   --bindir=DIR            user executables in DIR [EPREFIX/bin]
457   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
458   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
459   --datadir=DIR           read-only architecture-independent data in DIR
460                           [PREFIX/share]
461   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
462   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
463                           [PREFIX/com]
464   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
465   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
466   --includedir=DIR        C header files in DIR [PREFIX/include]
467   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
468   --infodir=DIR           info documentation in DIR [PREFIX/info]
469   --mandir=DIR            man documentation in DIR [PREFIX/man]
470   --srcdir=DIR            find the sources in DIR [configure dir or ..]
471   --program-prefix=PREFIX prepend PREFIX to installed program names
472   --program-suffix=SUFFIX append SUFFIX to installed program names
473   --program-transform-name=PROGRAM
474                           run sed PROGRAM on installed program names
475 EOF
476     cat << EOF
477 Host type:
478   --build=BUILD           configure for building on BUILD [BUILD=HOST]
479   --host=HOST             configure for HOST [guessed]
480   --target=TARGET         configure for TARGET [TARGET=HOST]
481 Features and packages:
482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
484   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
485   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
486   --x-includes=DIR        X include files are in DIR
487   --x-libraries=DIR       X library files are in DIR
488 EOF
489     if test -n "$ac_help"; then
490       echo "--enable and --with options recognized:$ac_help"
491     fi
492     exit 0 ;;
493
494   -host | --host | --hos | --ho)
495     ac_prev=host ;;
496   -host=* | --host=* | --hos=* | --ho=*)
497     host="$ac_optarg" ;;
498
499   -includedir | --includedir | --includedi | --included | --include \
500   | --includ | --inclu | --incl | --inc)
501     ac_prev=includedir ;;
502   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
503   | --includ=* | --inclu=* | --incl=* | --inc=*)
504     includedir="$ac_optarg" ;;
505
506   -infodir | --infodir | --infodi | --infod | --info | --inf)
507     ac_prev=infodir ;;
508   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
509     infodir="$ac_optarg" ;;
510
511   -libdir | --libdir | --libdi | --libd)
512     ac_prev=libdir ;;
513   -libdir=* | --libdir=* | --libdi=* | --libd=*)
514     libdir="$ac_optarg" ;;
515
516   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
517   | --libexe | --libex | --libe)
518     ac_prev=libexecdir ;;
519   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
520   | --libexe=* | --libex=* | --libe=*)
521     libexecdir="$ac_optarg" ;;
522
523   -localstatedir | --localstatedir | --localstatedi | --localstated \
524   | --localstate | --localstat | --localsta | --localst \
525   | --locals | --local | --loca | --loc | --lo)
526     ac_prev=localstatedir ;;
527   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
528   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
529   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
530     localstatedir="$ac_optarg" ;;
531
532   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
533     ac_prev=mandir ;;
534   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
535     mandir="$ac_optarg" ;;
536
537   -nfp | --nfp | --nf)
538     # Obsolete; use --without-fp.
539     with_fp=no ;;
540
541   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
542   | --no-cr | --no-c)
543     no_create=yes ;;
544
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
547     no_recursion=yes ;;
548
549   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
550   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
551   | --oldin | --oldi | --old | --ol | --o)
552     ac_prev=oldincludedir ;;
553   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
554   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
555   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
556     oldincludedir="$ac_optarg" ;;
557
558   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
559     ac_prev=prefix ;;
560   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
561     prefix="$ac_optarg" ;;
562
563   -program-prefix | --program-prefix | --program-prefi | --program-pref \
564   | --program-pre | --program-pr | --program-p)
565     ac_prev=program_prefix ;;
566   -program-prefix=* | --program-prefix=* | --program-prefi=* \
567   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
568     program_prefix="$ac_optarg" ;;
569
570   -program-suffix | --program-suffix | --program-suffi | --program-suff \
571   | --program-suf | --program-su | --program-s)
572     ac_prev=program_suffix ;;
573   -program-suffix=* | --program-suffix=* | --program-suffi=* \
574   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
575     program_suffix="$ac_optarg" ;;
576
577   -program-transform-name | --program-transform-name \
578   | --program-transform-nam | --program-transform-na \
579   | --program-transform-n | --program-transform- \
580   | --program-transform | --program-transfor \
581   | --program-transfo | --program-transf \
582   | --program-trans | --program-tran \
583   | --progr-tra | --program-tr | --program-t)
584     ac_prev=program_transform_name ;;
585   -program-transform-name=* | --program-transform-name=* \
586   | --program-transform-nam=* | --program-transform-na=* \
587   | --program-transform-n=* | --program-transform-=* \
588   | --program-transform=* | --program-transfor=* \
589   | --program-transfo=* | --program-transf=* \
590   | --program-trans=* | --program-tran=* \
591   | --progr-tra=* | --program-tr=* | --program-t=*)
592     program_transform_name="$ac_optarg" ;;
593
594   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
595   | -silent | --silent | --silen | --sile | --sil)
596     silent=yes ;;
597
598   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
599     ac_prev=sbindir ;;
600   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
601   | --sbi=* | --sb=*)
602     sbindir="$ac_optarg" ;;
603
604   -sharedstatedir | --sharedstatedir | --sharedstatedi \
605   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
606   | --sharedst | --shareds | --shared | --share | --shar \
607   | --sha | --sh)
608     ac_prev=sharedstatedir ;;
609   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
610   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
611   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
612   | --sha=* | --sh=*)
613     sharedstatedir="$ac_optarg" ;;
614
615   -site | --site | --sit)
616     ac_prev=site ;;
617   -site=* | --site=* | --sit=*)
618     site="$ac_optarg" ;;
619
620   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
621     ac_prev=srcdir ;;
622   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
623     srcdir="$ac_optarg" ;;
624
625   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
626   | --syscon | --sysco | --sysc | --sys | --sy)
627     ac_prev=sysconfdir ;;
628   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
629   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
630     sysconfdir="$ac_optarg" ;;
631
632   -target | --target | --targe | --targ | --tar | --ta | --t)
633     ac_prev=target ;;
634   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
635     target="$ac_optarg" ;;
636
637   -v | -verbose | --verbose | --verbos | --verbo | --verb)
638     verbose=yes ;;
639
640   -version | --version | --versio | --versi | --vers)
641     echo "configure generated by autoconf version 2.13.1"
642     exit 0 ;;
643
644   -with-* | --with-*)
645     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
646     # Reject names that are not valid shell variable names.
647     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
648       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
649     fi
650     ac_package=`echo $ac_package| sed 's/-/_/g'`
651     case "$ac_option" in
652       *=*) ;;
653       *) ac_optarg=yes ;;
654     esac
655     eval "with_${ac_package}='$ac_optarg'" ;;
656
657   -without-* | --without-*)
658     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     eval "with_${ac_package}=no" ;;
665
666   --x)
667     # Obsolete; use --with-x.
668     with_x=yes ;;
669
670   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
671   | --x-incl | --x-inc | --x-in | --x-i)
672     ac_prev=x_includes ;;
673   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
674   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
675     x_includes="$ac_optarg" ;;
676
677   -x-libraries | --x-libraries | --x-librarie | --x-librari \
678   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
679     ac_prev=x_libraries ;;
680   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
681   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
682     x_libraries="$ac_optarg" ;;
683
684   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
685     ;;
686
687   *)
688     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
689       echo "configure: warning: $ac_option: invalid host type" 1>&2
690     fi
691     if test "x$nonopt" != xNONE; then
692       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
693     fi
694     nonopt="$ac_option"
695     ;;
696
697   esac
698 done
699
700 if test -n "$ac_prev"; then
701   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
702 fi
703
704 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
705
706 # File descriptor usage:
707 # 0 standard input
708 # 1 file creation
709 # 2 errors and warnings
710 # 3 some systems may open it to /dev/tty
711 # 4 used on the Kubota Titan
712 # 6 checking for... messages and results
713 # 5 compiler messages saved in config.log
714 if test "$silent" = yes; then
715   exec 6>/dev/null
716 else
717   exec 6>&1
718 fi
719 exec 5>./config.log
720
721 echo "\
722 This file contains any messages produced by compilers while
723 running configure, to aid debugging if configure makes a mistake.
724 " 1>&5
725
726 # Strip out --no-create and --no-recursion so they do not pile up.
727 # Also quote any args containing shell metacharacters.
728 ac_configure_args=
729 for ac_arg
730 do
731   case "$ac_arg" in
732   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
733   | --no-cr | --no-c) ;;
734   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
736   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
737   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
738   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
739   esac
740 done
741
742 # NLS nuisances.
743 # Only set these to C if already set.  These must not be set unconditionally
744 # because not all systems understand e.g. LANG=C (notably SCO).
745 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
746 # Non-C LC_CTYPE values break the ctype check.
747 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
748 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
749 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
750 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
751
752 # confdefs.h avoids OS command line length limits that DEFS can exceed.
753 rm -rf conftest* confdefs.h
754 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
755 echo > confdefs.h
756
757 # A filename unique to this package, relative to the directory that
758 # configure is in, which we can look for to find out if srcdir is correct.
759 ac_unique_file=build/version.sh
760
761 # Find the source files, if location was not specified.
762 if test -z "$srcdir"; then
763   ac_srcdir_defaulted=yes
764   # Try the directory containing this script, then its parent.
765   ac_prog=$0
766   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
767   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
768   srcdir=$ac_confdir
769   if test ! -r $srcdir/$ac_unique_file; then
770     srcdir=..
771   fi
772 else
773   ac_srcdir_defaulted=no
774 fi
775 if test ! -r $srcdir/$ac_unique_file; then
776   if test "$ac_srcdir_defaulted" = yes; then
777     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
778   else
779     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
780   fi
781 fi
782 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
783
784 # Prefer explicitly selected file to automatically selected ones.
785 if test -z "$CONFIG_SITE"; then
786   if test "x$prefix" != xNONE; then
787     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
788   else
789     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
790   fi
791 fi
792 for ac_site_file in $CONFIG_SITE; do
793   if test -r "$ac_site_file"; then
794     echo "loading site script $ac_site_file"
795     . "$ac_site_file"
796   fi
797 done
798
799
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 ac_exeext=
808 ac_objext=o
809 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
810   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
811   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
812     ac_n= ac_c='
813 ' ac_t='        '
814   else
815     ac_n=-n ac_c= ac_t=
816   fi
817 else
818   ac_n= ac_c='\c' ac_t=
819 fi
820
821
822 # set unset (borrowed from autoconf 2.49c)
823 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
824   ol_unset=unset
825 else
826   ol_unset=false
827 fi
828 # unset CDPATH
829 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
830
831 ac_aux_dir=
832 for ac_dir in build $srcdir/build; do
833   if test -f $ac_dir/install-sh; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/install-sh -c"
836     break
837   elif test -f $ac_dir/install.sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install.sh -c"
840     break
841   elif test -f $ac_dir/shtool; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/shtool install -c"
844     break
845   fi
846 done
847 if test -z "$ac_aux_dir"; then
848   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
849 fi
850 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
851 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
852 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
853
854 eval `$ac_aux_dir/version.sh`
855 if test -z "$OL_STRING"; then
856         { echo "configure: error: could not determine version" 1>&2; exit 1; }
857 fi
858
859 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
860         ac_cv_shtool="$ac_aux_dir/shtool"
861 else
862         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
863 fi
864
865 SHTOOL="$ac_cv_shtool"
866
867 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
868 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
869
870 OPENLDAP_CVS=""
871 if test -d $ac_aux_dir/CVS; then
872         OPENLDAP_CVS="(from CVS sources) "
873 fi
874
875 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
876
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
881
882 # Make sure we can run config.sub.
883   if $ac_config_sub sun4 >/dev/null 2>&1; then :
884     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
885   fi
886
887   ac_cv_host_alias=$host
888   case "$ac_cv_host_alias" in
889   NONE)
890     case $nonopt in
891     NONE)
892       if ac_cv_host_alias=`$ac_config_guess`; then :
893       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
894       fi ;;
895     *) ac_cv_host_alias=$nonopt ;;
896     esac ;;
897   esac
898
899   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
900   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
901   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
902   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
903 else
904   echo $ac_n "(cached) $ac_c" 1>&6
905 fi
906
907 echo "$ac_t""$ac_cv_host" 1>&6
908
909 host=$ac_cv_host
910 host_alias=$ac_cv_host_alias
911 host_cpu=$ac_cv_host_cpu
912 host_vendor=$ac_cv_host_vendor
913 host_os=$ac_cv_host_os
914
915
916
917
918
919 echo $ac_n "checking target system type""... $ac_c" 1>&6
920 echo "configure:921: checking target system type" >&5
921 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
922
923 # Make sure we can run config.sub.
924   if $ac_config_sub sun4 >/dev/null 2>&1; then :
925     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926   fi
927
928   ac_cv_target_alias=$target
929   case "$ac_cv_target_alias" in
930   NONE)
931     case $nonopt in
932     NONE)
933       ac_cv_target_alias=$host_alias ;;
934
935     *) ac_cv_target_alias=$nonopt ;;
936     esac ;;
937   esac
938
939   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
940   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
941   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
942   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
943 else
944   echo $ac_n "(cached) $ac_c" 1>&6
945 fi
946
947 echo "$ac_t""$ac_cv_target" 1>&6
948
949 target=$ac_cv_target
950 target_alias=$ac_cv_target_alias
951 target_cpu=$ac_cv_target_cpu
952 target_vendor=$ac_cv_target_vendor
953 target_os=$ac_cv_target_os
954
955
956
957
958
959 echo $ac_n "checking build system type""... $ac_c" 1>&6
960 echo "configure:961: checking build system type" >&5
961 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
962
963 # Make sure we can run config.sub.
964   if $ac_config_sub sun4 >/dev/null 2>&1; then :
965     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966   fi
967
968   ac_cv_build_alias=$build
969   case "$ac_cv_build_alias" in
970   NONE)
971     case $nonopt in
972     NONE)
973       ac_cv_build_alias=$host_alias ;;
974
975     *) ac_cv_build_alias=$nonopt ;;
976     esac ;;
977   esac
978
979   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
980   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983 else
984   echo $ac_n "(cached) $ac_c" 1>&6
985 fi
986
987 echo "$ac_t""$ac_cv_build" 1>&6
988
989 build=$ac_cv_build
990 build_alias=$ac_cv_build_alias
991 build_cpu=$ac_cv_build_cpu
992 build_vendor=$ac_cv_build_vendor
993 build_os=$ac_cv_build_os
994
995
996
997
998
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1002 #
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 #    same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 #    as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1011
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1018
1019 test "$host_alias" != "$target_alias" &&
1020   test "$program_prefix$program_suffix$program_transform_name" = \
1021     NONENONEs,x,x, &&
1022   program_prefix=${target_alias}-
1023
1024
1025 # Find a good install program.  We prefer a C program (faster),
1026 # so one script is as good as another.  But avoid the broken or
1027 # incompatible versions:
1028 # SysV /etc/install, /usr/sbin/install
1029 # SunOS /usr/etc/install
1030 # IRIX /sbin/install
1031 # AIX /bin/install
1032 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1033 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1034 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1035 # ./install, which can be erroneously created by make from ./install.sh.
1036 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1037 echo "configure:1038: checking for a BSD compatible install" >&5
1038 if test -z "$INSTALL"; then
1039 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1040   echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1043   for ac_dir in $PATH; do
1044     # Account for people who put trailing slashes in PATH elements.
1045     case "$ac_dir/" in
1046     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1047     *)
1048       # OSF1 and SCO ODT 3.0 have their own names for install.
1049       # Don't use installbsd from OSF since it installs stuff as root
1050       # by default.
1051       for ac_prog in ginstall scoinst install; do
1052         if test -f $ac_dir/$ac_prog; then
1053           if test $ac_prog = install &&
1054             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1055             # AIX install.  It has an incompatible calling convention.
1056             :
1057           elif test $ac_prog = install &&
1058             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # program-specific install script used by HP pwplus--don't use.
1060             :
1061           else
1062             ac_cv_path_install="$ac_dir/$ac_prog -c"
1063             break 2
1064           fi
1065         fi
1066       done
1067       ;;
1068     esac
1069   done
1070   IFS="$ac_save_IFS"
1071
1072 fi
1073   if test "${ac_cv_path_install+set}" = set; then
1074     INSTALL="$ac_cv_path_install"
1075   else
1076     # As a last resort, use the slow shell script.  We don't cache a
1077     # path for INSTALL within a source directory, because that will
1078     # break other packages using the cache if that directory is
1079     # removed, or if the path is relative.
1080     INSTALL="$ac_install_sh"
1081   fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether build environment is sane" >&5
1095 # Just in case
1096 sleep 1
1097 echo timestamp > conftestfile
1098 # Do `set' in a subshell so we don't clobber the current shell's
1099 # arguments.  Must try -L first in case configure is actually a
1100 # symlink; some systems play weird games with the mod time of symlinks
1101 # (eg FreeBSD returns the mod time of the symlink's containing
1102 # directory).
1103 if (
1104    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1105    if test "$*" = "X"; then
1106       # -L didn't work.
1107       set X `ls -t $srcdir/configure conftestfile`
1108    fi
1109    if test "$*" != "X $srcdir/configure conftestfile" \
1110       && test "$*" != "X conftestfile $srcdir/configure"; then
1111
1112       # If neither matched, then we have a broken ls.  This can happen
1113       # if, for instance, CONFIG_SHELL is bash and it inherits a
1114       # broken ls alias from the environment.  This has actually
1115       # happened.  Such a system could not be considered "sane".
1116       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1117 alias in your environment" 1>&2; exit 1; }
1118    fi
1119
1120    test "$2" = conftestfile
1121    )
1122 then
1123    # Ok.
1124    :
1125 else
1126    { echo "configure: error: newly created file is older than distributed files!
1127 Check your system clock" 1>&2; exit 1; }
1128 fi
1129 rm -f conftest*
1130 echo "$ac_t""yes" 1>&6
1131 if test "$program_transform_name" = s,x,x,; then
1132   program_transform_name=
1133 else
1134   # Double any \ or $.  echo might interpret backslashes.
1135   cat <<\EOF_SED > conftestsed
1136 s,\\,\\\\,g; s,\$,$$,g
1137 EOF_SED
1138   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1139   rm -f conftestsed
1140 fi
1141 test "$program_prefix" != NONE &&
1142   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1143 # Use a double $ so make ignores it.
1144 test "$program_suffix" != NONE &&
1145   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1146
1147 # sed with no file args requires a program.
1148 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1149
1150 for ac_prog in mawk gawk nawk awk
1151 do
1152 # Extract the first word of "$ac_prog", so it can be a program name with args.
1153 set dummy $ac_prog; ac_word=$2
1154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1155 echo "configure:1156: checking for $ac_word" >&5
1156 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$AWK"; then
1160   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1161 else
1162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1163   ac_dummy="$PATH"
1164   for ac_dir in $ac_dummy; do
1165     test -z "$ac_dir" && ac_dir=.
1166     if test -f $ac_dir/$ac_word; then
1167       ac_cv_prog_AWK="$ac_prog"
1168       break
1169     fi
1170   done
1171   IFS="$ac_save_ifs"
1172 fi
1173 fi
1174 AWK="$ac_cv_prog_AWK"
1175 if test -n "$AWK"; then
1176   echo "$ac_t""$AWK" 1>&6
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 test -n "$AWK" && break
1182 done
1183
1184 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1185 echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5
1186 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1187 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftestmake <<\EOF
1191 all:
1192         @echo 'ac_maketemp="${MAKE}"'
1193 EOF
1194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1195 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1196 if test -n "$ac_maketemp"; then
1197   eval ac_cv_prog_make_${ac_make}_set=yes
1198 else
1199   eval ac_cv_prog_make_${ac_make}_set=no
1200 fi
1201 rm -f conftestmake
1202 fi
1203 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205   SET_MAKE=
1206 else
1207   echo "$ac_t""no" 1>&6
1208   SET_MAKE="MAKE=${MAKE-make}"
1209 fi
1210
1211
1212
1213 PACKAGE=$OL_PACKAGE
1214
1215 VERSION=$OL_VERSION
1216
1217 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1218   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1219 fi
1220
1221
1222
1223 missing_dir=`cd $ac_aux_dir && pwd`
1224 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1225 echo "configure:1226: checking for working aclocal" >&5
1226 # Run test in a subshell; some versions of sh will print an error if
1227 # an executable is not found, even if stderr is redirected.
1228 # Redirect stdin to placate older versions of autoconf.  Sigh.
1229 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1230    ACLOCAL=aclocal
1231    echo "$ac_t""found" 1>&6
1232 else
1233    ACLOCAL="$missing_dir/missing aclocal"
1234    echo "$ac_t""missing" 1>&6
1235 fi
1236
1237 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working autoconf" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1243    AUTOCONF=autoconf
1244    echo "$ac_t""found" 1>&6
1245 else
1246    AUTOCONF="$missing_dir/missing autoconf"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working automake" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (automake --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOMAKE=automake
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOMAKE="$missing_dir/missing automake"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working autoheader" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOHEADER=autoheader
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOHEADER="$missing_dir/missing autoheader"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working makeinfo" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1282    MAKEINFO=makeinfo
1283    echo "$ac_t""found" 1>&6
1284 else
1285    MAKEINFO="$missing_dir/missing makeinfo"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 install_sh="$missing_dir/install-sh"
1290 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1291
1292 for ac_prog in gnutar gtar tar
1293 do
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_word" >&5
1298 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   if test -n "$AMTAR"; then
1302   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1303 else
1304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1305   ac_dummy="$PATH"
1306   for ac_dir in $ac_dummy; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_AMTAR="$ac_prog"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314 fi
1315 fi
1316 AMTAR="$ac_cv_prog_AMTAR"
1317 if test -n "$AMTAR"; then
1318   echo "$ac_t""$AMTAR" 1>&6
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 test -n "$AMTAR" && break
1324 done
1325
1326
1327 AMTARFLAGS=
1328 if test -n "$AMTAR"; then
1329   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1330         AMTARFLAGS=o
1331   fi
1332 fi
1333
1334 cat >> confdefs.h <<EOF
1335 #define OPENLDAP_PACKAGE "$PACKAGE"
1336 EOF
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_VERSION "$VERSION"
1340 EOF
1341
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION $OL_API_INC
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1357 EOF
1358
1359
1360 OPENLDAP_LIBVERSION=$OL_API_LIB
1361
1362 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1363
1364
1365
1366 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1367 echo "configure:1368: checking configure arguments" >&5
1368
1369
1370 top_builddir=`pwd`
1371
1372 ldap_subdir="/openldap"
1373
1374 # Check whether --with-subdir or --without-subdir was given.
1375 if test "${with_subdir+set}" = set; then
1376   withval="$with_subdir"
1377   case "$withval" in
1378         no) ldap_subdir=""
1379                 ;;
1380         yes)
1381                 ;;
1382         /*|\\*)
1383                 ldap_subdir="$withval"
1384                 ;;
1385         *)
1386                 ldap_subdir="/$withval"
1387                 ;;
1388 esac
1389
1390 fi
1391
1392
1393 # OpenLDAP --enable-debug
1394         # Check whether --enable-debug or --disable-debug was given.
1395 if test "${enable_debug+set}" = set; then
1396   enableval="$enable_debug"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no ; do
1400                 if test "$enableval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1406         fi
1407         ol_enable_debug="$ol_arg"
1408
1409 else
1410         ol_enable_debug="yes"
1411 fi
1412 # end --enable-debug
1413 # OpenLDAP --enable-dynamic
1414         # Check whether --enable-dynamic or --disable-dynamic was given.
1415 if test "${enable_dynamic+set}" = set; then
1416   enableval="$enable_dynamic"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1426         fi
1427         ol_enable_dynamic="$ol_arg"
1428
1429 else
1430         ol_enable_dynamic="no"
1431 fi
1432 # end --enable-dynamic
1433 # OpenLDAP --enable-syslog
1434         # Check whether --enable-syslog or --disable-syslog was given.
1435 if test "${enable_syslog+set}" = set; then
1436   enableval="$enable_syslog"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1446         fi
1447         ol_enable_syslog="$ol_arg"
1448
1449 else
1450         ol_enable_syslog="auto"
1451 fi
1452 # end --enable-syslog
1453 # OpenLDAP --enable-proctitle
1454         # Check whether --enable-proctitle or --disable-proctitle was given.
1455 if test "${enable_proctitle+set}" = set; then
1456   enableval="$enable_proctitle"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1466         fi
1467         ol_enable_proctitle="$ol_arg"
1468
1469 else
1470         ol_enable_proctitle="yes"
1471 fi
1472 # end --enable-proctitle
1473 ol_enable_referrals=${ol_enable_referrals-no}
1474 ol_enable_kbind=${ol_enable_kbind-no}
1475 # OpenLDAP --enable-ipv6
1476         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1477 if test "${enable_ipv6+set}" = set; then
1478   enableval="$enable_ipv6"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ipv6="$ol_arg"
1490
1491 else
1492         ol_enable_ipv6="auto"
1493 fi
1494 # end --enable-ipv6
1495 # OpenLDAP --enable-local
1496         # Check whether --enable-local or --disable-local was given.
1497 if test "${enable_local+set}" = set; then
1498   enableval="$enable_local"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1508         fi
1509         ol_enable_local="$ol_arg"
1510
1511 else
1512         ol_enable_local="auto"
1513 fi
1514 # end --enable-local
1515 # OpenLDAP --enable-x_compile
1516         # Check whether --enable-x_compile or --disable-x_compile was given.
1517 if test "${enable_x_compile+set}" = set; then
1518   enableval="$enable_x_compile"
1519   
1520         ol_arg=invalid
1521         for ol_val in yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1528         fi
1529         ol_enable_x_compile="$ol_arg"
1530
1531 else
1532         ol_enable_x_compile="no"
1533 fi
1534 # end --enable-x_compile
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 # OpenLDAP --with-kerberos
1580         # Check whether --with-kerberos or --without-kerberos was given.
1581 if test "${with_kerberos+set}" = set; then
1582   withval="$with_kerberos"
1583   
1584         ol_arg=invalid
1585         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1586                 if test "$withval" = "$ol_val" ; then
1587                         ol_arg="$ol_val"
1588                 fi
1589         done
1590         if test "$ol_arg" = "invalid" ; then
1591                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1592         fi
1593         ol_with_kerberos="$ol_arg"
1594
1595 else
1596         ol_with_kerberos="auto"
1597 fi
1598 # end --with-kerberos
1599
1600 # OpenLDAP --with-threads
1601         # Check whether --with-threads or --without-threads was given.
1602 if test "${with_threads+set}" = set; then
1603   withval="$with_threads"
1604   
1605         ol_arg=invalid
1606         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1607                 if test "$withval" = "$ol_val" ; then
1608                         ol_arg="$ol_val"
1609                 fi
1610         done
1611         if test "$ol_arg" = "invalid" ; then
1612                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1613         fi
1614         ol_with_threads="$ol_arg"
1615
1616 else
1617         ol_with_threads="auto"
1618 fi
1619 # end --with-threads
1620
1621 # OpenLDAP --with-tls
1622         # Check whether --with-tls or --without-tls was given.
1623 if test "${with_tls+set}" = set; then
1624   withval="$with_tls"
1625   
1626         ol_arg=invalid
1627         for ol_val in auto ssleay openssl yes no  ; do
1628                 if test "$withval" = "$ol_val" ; then
1629                         ol_arg="$ol_val"
1630                 fi
1631         done
1632         if test "$ol_arg" = "invalid" ; then
1633                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1634         fi
1635         ol_with_tls="$ol_arg"
1636
1637 else
1638         ol_with_tls="auto"
1639 fi
1640 # end --with-tls
1641
1642 # OpenLDAP --with-yielding_select
1643         # Check whether --with-yielding_select or --without-yielding_select was given.
1644 if test "${with_yielding_select+set}" = set; then
1645   withval="$with_yielding_select"
1646   
1647         ol_arg=invalid
1648         for ol_val in auto yes no manual  ; do
1649                 if test "$withval" = "$ol_val" ; then
1650                         ol_arg="$ol_val"
1651                 fi
1652         done
1653         if test "$ol_arg" = "invalid" ; then
1654                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1655         fi
1656         ol_with_yielding_select="$ol_arg"
1657
1658 else
1659         ol_with_yielding_select="auto"
1660 fi
1661 # end --with-yielding_select
1662
1663
1664
1665 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1666 if test "${with_xxslapdoptions+set}" = set; then
1667   withval="$with_xxslapdoptions"
1668   :
1669 fi
1670
1671 # OpenLDAP --enable-slapd
1672         # Check whether --enable-slapd or --disable-slapd was given.
1673 if test "${enable_slapd+set}" = set; then
1674   enableval="$enable_slapd"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1684         fi
1685         ol_enable_slapd="$ol_arg"
1686
1687 else
1688         ol_enable_slapd="yes"
1689 fi
1690 # end --enable-slapd
1691 # OpenLDAP --enable-aci
1692         # Check whether --enable-aci or --disable-aci was given.
1693 if test "${enable_aci+set}" = set; then
1694   enableval="$enable_aci"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1704         fi
1705         ol_enable_aci="$ol_arg"
1706
1707 else
1708         ol_enable_aci="no"
1709 fi
1710 # end --enable-aci
1711 # OpenLDAP --enable-cleartext
1712         # Check whether --enable-cleartext or --disable-cleartext was given.
1713 if test "${enable_cleartext+set}" = set; then
1714   enableval="$enable_cleartext"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1724         fi
1725         ol_enable_cleartext="$ol_arg"
1726
1727 else
1728         ol_enable_cleartext="yes"
1729 fi
1730 # end --enable-cleartext
1731 # OpenLDAP --enable-crypt
1732         # Check whether --enable-crypt or --disable-crypt was given.
1733 if test "${enable_crypt+set}" = set; then
1734   enableval="$enable_crypt"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1744         fi
1745         ol_enable_crypt="$ol_arg"
1746
1747 else
1748         ol_enable_crypt="no"
1749 fi
1750 # end --enable-crypt
1751 # OpenLDAP --enable-kpasswd
1752         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1753 if test "${enable_kpasswd+set}" = set; then
1754   enableval="$enable_kpasswd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_kpasswd="$ol_arg"
1766
1767 else
1768         ol_enable_kpasswd="no"
1769 fi
1770 # end --enable-kpasswd
1771 # OpenLDAP --enable-lmpasswd
1772         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1773 if test "${enable_lmpasswd+set}" = set; then
1774   enableval="$enable_lmpasswd"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1784         fi
1785         ol_enable_lmpasswd="$ol_arg"
1786
1787 else
1788         ol_enable_lmpasswd="no"
1789 fi
1790 # end --enable-lmpasswd
1791 # OpenLDAP --enable-spasswd
1792         # Check whether --enable-spasswd or --disable-spasswd was given.
1793 if test "${enable_spasswd+set}" = set; then
1794   enableval="$enable_spasswd"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1804         fi
1805         ol_enable_spasswd="$ol_arg"
1806
1807 else
1808         ol_enable_spasswd="no"
1809 fi
1810 # end --enable-spasswd
1811 # OpenLDAP --enable-modules
1812         # Check whether --enable-modules or --disable-modules was given.
1813 if test "${enable_modules+set}" = set; then
1814   enableval="$enable_modules"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1824         fi
1825         ol_enable_modules="$ol_arg"
1826
1827 else
1828         ol_enable_modules="no"
1829 fi
1830 # end --enable-modules
1831 ol_enable_multimaster=${ol_enable_multimaster-no}
1832 # OpenLDAP --enable-rewrite
1833         # Check whether --enable-rewrite or --disable-rewrite was given.
1834 if test "${enable_rewrite+set}" = set; then
1835   enableval="$enable_rewrite"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1845         fi
1846         ol_enable_rewrite="$ol_arg"
1847
1848 else
1849         ol_enable_rewrite="no"
1850 fi
1851 # end --enable-rewrite
1852 # OpenLDAP --enable-rlookups
1853         # Check whether --enable-rlookups or --disable-rlookups was given.
1854 if test "${enable_rlookups+set}" = set; then
1855   enableval="$enable_rlookups"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1865         fi
1866         ol_enable_rlookups="$ol_arg"
1867
1868 else
1869         ol_enable_rlookups="no"
1870 fi
1871 # end --enable-rlookups
1872 # OpenLDAP --enable-slapi
1873         # Check whether --enable-slapi or --disable-slapi was given.
1874 if test "${enable_slapi+set}" = set; then
1875   enableval="$enable_slapi"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1885         fi
1886         ol_enable_slapi="$ol_arg"
1887
1888 else
1889         ol_enable_slapi="no"
1890 fi
1891 # end --enable-slapi
1892 # OpenLDAP --enable-slp
1893         # Check whether --enable-slp or --disable-slp was given.
1894 if test "${enable_slp+set}" = set; then
1895   enableval="$enable_slp"
1896   
1897         ol_arg=invalid
1898         for ol_val in auto yes no ; do
1899                 if test "$enableval" = "$ol_val" ; then
1900                         ol_arg="$ol_val"
1901                 fi
1902         done
1903         if test "$ol_arg" = "invalid" ; then
1904                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1905         fi
1906         ol_enable_slp="$ol_arg"
1907
1908 else
1909         ol_enable_slp="no"
1910 fi
1911 # end --enable-slp
1912 # OpenLDAP --enable-wrappers
1913         # Check whether --enable-wrappers or --disable-wrappers was given.
1914 if test "${enable_wrappers+set}" = set; then
1915   enableval="$enable_wrappers"
1916   
1917         ol_arg=invalid
1918         for ol_val in auto yes no ; do
1919                 if test "$enableval" = "$ol_val" ; then
1920                         ol_arg="$ol_val"
1921                 fi
1922         done
1923         if test "$ol_arg" = "invalid" ; then
1924                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1925         fi
1926         ol_enable_wrappers="$ol_arg"
1927
1928 else
1929         ol_enable_wrappers="no"
1930 fi
1931 # end --enable-wrappers
1932
1933
1934 # OpenLDAP --enable-bdb
1935         # Check whether --enable-bdb or --disable-bdb was given.
1936 if test "${enable_bdb+set}" = set; then
1937   enableval="$enable_bdb"
1938   
1939         ol_arg=invalid
1940         for ol_val in auto yes no ; do
1941                 if test "$enableval" = "$ol_val" ; then
1942                         ol_arg="$ol_val"
1943                 fi
1944         done
1945         if test "$ol_arg" = "invalid" ; then
1946                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1947         fi
1948         ol_enable_bdb="$ol_arg"
1949
1950 else
1951         ol_enable_bdb="yes"
1952 fi
1953 # end --enable-bdb
1954 # OpenLDAP --with-bdb_module
1955         # Check whether --with-bdb_module or --without-bdb_module was given.
1956 if test "${with_bdb_module+set}" = set; then
1957   withval="$with_bdb_module"
1958   
1959         ol_arg=invalid
1960         for ol_val in static dynamic ; do
1961                 if test "$withval" = "$ol_val" ; then
1962                         ol_arg="$ol_val"
1963                 fi
1964         done
1965         if test "$ol_arg" = "invalid" ; then
1966                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1967         fi
1968         ol_with_bdb_module="$ol_arg"
1969
1970 else
1971         ol_with_bdb_module="static"
1972 fi
1973 # end --with-bdb_module
1974
1975 # OpenLDAP --enable-dnssrv
1976         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1977 if test "${enable_dnssrv+set}" = set; then
1978   enableval="$enable_dnssrv"
1979   
1980         ol_arg=invalid
1981         for ol_val in auto yes no ; do
1982                 if test "$enableval" = "$ol_val" ; then
1983                         ol_arg="$ol_val"
1984                 fi
1985         done
1986         if test "$ol_arg" = "invalid" ; then
1987                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1988         fi
1989         ol_enable_dnssrv="$ol_arg"
1990
1991 else
1992         ol_enable_dnssrv="no"
1993 fi
1994 # end --enable-dnssrv
1995 # OpenLDAP --with-dnssrv_module
1996         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1997 if test "${with_dnssrv_module+set}" = set; then
1998   withval="$with_dnssrv_module"
1999   
2000         ol_arg=invalid
2001         for ol_val in static dynamic ; do
2002                 if test "$withval" = "$ol_val" ; then
2003                         ol_arg="$ol_val"
2004                 fi
2005         done
2006         if test "$ol_arg" = "invalid" ; then
2007                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2008         fi
2009         ol_with_dnssrv_module="$ol_arg"
2010
2011 else
2012         ol_with_dnssrv_module="static"
2013 fi
2014 # end --with-dnssrv_module
2015
2016 # OpenLDAP --enable-hdb
2017         # Check whether --enable-hdb or --disable-hdb was given.
2018 if test "${enable_hdb+set}" = set; then
2019   enableval="$enable_hdb"
2020   
2021         ol_arg=invalid
2022         for ol_val in auto yes no ; do
2023                 if test "$enableval" = "$ol_val" ; then
2024                         ol_arg="$ol_val"
2025                 fi
2026         done
2027         if test "$ol_arg" = "invalid" ; then
2028                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2029         fi
2030         ol_enable_hdb="$ol_arg"
2031
2032 else
2033         ol_enable_hdb="no"
2034 fi
2035 # end --enable-hdb
2036 # OpenLDAP --with-hdb_module
2037         # Check whether --with-hdb_module or --without-hdb_module was given.
2038 if test "${with_hdb_module+set}" = set; then
2039   withval="$with_hdb_module"
2040   
2041         ol_arg=invalid
2042         for ol_val in static dynamic ; do
2043                 if test "$withval" = "$ol_val" ; then
2044                         ol_arg="$ol_val"
2045                 fi
2046         done
2047         if test "$ol_arg" = "invalid" ; then
2048                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2049         fi
2050         ol_with_hdb_module="$ol_arg"
2051
2052 else
2053         ol_with_hdb_module="static"
2054 fi
2055 # end --with-hdb_module
2056
2057 # OpenLDAP --enable-ldap
2058         # Check whether --enable-ldap or --disable-ldap was given.
2059 if test "${enable_ldap+set}" = set; then
2060   enableval="$enable_ldap"
2061   
2062         ol_arg=invalid
2063         for ol_val in auto yes no ; do
2064                 if test "$enableval" = "$ol_val" ; then
2065                         ol_arg="$ol_val"
2066                 fi
2067         done
2068         if test "$ol_arg" = "invalid" ; then
2069                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2070         fi
2071         ol_enable_ldap="$ol_arg"
2072
2073 else
2074         ol_enable_ldap="no"
2075 fi
2076 # end --enable-ldap
2077 # OpenLDAP --with-ldap_module
2078         # Check whether --with-ldap_module or --without-ldap_module was given.
2079 if test "${with_ldap_module+set}" = set; then
2080   withval="$with_ldap_module"
2081   
2082         ol_arg=invalid
2083         for ol_val in static dynamic ; do
2084                 if test "$withval" = "$ol_val" ; then
2085                         ol_arg="$ol_val"
2086                 fi
2087         done
2088         if test "$ol_arg" = "invalid" ; then
2089                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2090         fi
2091         ol_with_ldap_module="$ol_arg"
2092
2093 else
2094         ol_with_ldap_module="static"
2095 fi
2096 # end --with-ldap_module
2097
2098 # OpenLDAP --enable-ldbm
2099         # Check whether --enable-ldbm or --disable-ldbm was given.
2100 if test "${enable_ldbm+set}" = set; then
2101   enableval="$enable_ldbm"
2102   
2103         ol_arg=invalid
2104         for ol_val in auto yes no ; do
2105                 if test "$enableval" = "$ol_val" ; then
2106                         ol_arg="$ol_val"
2107                 fi
2108         done
2109         if test "$ol_arg" = "invalid" ; then
2110                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2111         fi
2112         ol_enable_ldbm="$ol_arg"
2113
2114 else
2115         ol_enable_ldbm="no"
2116 fi
2117 # end --enable-ldbm
2118 # OpenLDAP --with-ldbm_api
2119         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2120 if test "${with_ldbm_api+set}" = set; then
2121   withval="$with_ldbm_api"
2122   
2123         ol_arg=invalid
2124         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2125                 if test "$withval" = "$ol_val" ; then
2126                         ol_arg="$ol_val"
2127                 fi
2128         done
2129         if test "$ol_arg" = "invalid" ; then
2130                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2131         fi
2132         ol_with_ldbm_api="$ol_arg"
2133
2134 else
2135         ol_with_ldbm_api="auto"
2136 fi
2137 # end --with-ldbm_api
2138
2139 # OpenLDAP --with-ldbm_module
2140         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2141 if test "${with_ldbm_module+set}" = set; then
2142   withval="$with_ldbm_module"
2143   
2144         ol_arg=invalid
2145         for ol_val in static dynamic ; do
2146                 if test "$withval" = "$ol_val" ; then
2147                         ol_arg="$ol_val"
2148                 fi
2149         done
2150         if test "$ol_arg" = "invalid" ; then
2151                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2152         fi
2153         ol_with_ldbm_module="$ol_arg"
2154
2155 else
2156         ol_with_ldbm_module="static"
2157 fi
2158 # end --with-ldbm_module
2159
2160 # OpenLDAP --with-ldbm_type
2161         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2162 if test "${with_ldbm_type+set}" = set; then
2163   withval="$with_ldbm_type"
2164   
2165         ol_arg=invalid
2166         for ol_val in auto btree hash ; do
2167                 if test "$withval" = "$ol_val" ; then
2168                         ol_arg="$ol_val"
2169                 fi
2170         done
2171         if test "$ol_arg" = "invalid" ; then
2172                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2173         fi
2174         ol_with_ldbm_type="$ol_arg"
2175
2176 else
2177         ol_with_ldbm_type="auto"
2178 fi
2179 # end --with-ldbm_type
2180
2181 # OpenLDAP --enable-meta
2182         # Check whether --enable-meta or --disable-meta was given.
2183 if test "${enable_meta+set}" = set; then
2184   enableval="$enable_meta"
2185   
2186         ol_arg=invalid
2187         for ol_val in auto yes no ; do
2188                 if test "$enableval" = "$ol_val" ; then
2189                         ol_arg="$ol_val"
2190                 fi
2191         done
2192         if test "$ol_arg" = "invalid" ; then
2193                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2194         fi
2195         ol_enable_meta="$ol_arg"
2196
2197 else
2198         ol_enable_meta="no"
2199 fi
2200 # end --enable-meta
2201 # OpenLDAP --with-meta_module
2202         # Check whether --with-meta_module or --without-meta_module was given.
2203 if test "${with_meta_module+set}" = set; then
2204   withval="$with_meta_module"
2205   
2206         ol_arg=invalid
2207         for ol_val in static dynamic ; do
2208                 if test "$withval" = "$ol_val" ; then
2209                         ol_arg="$ol_val"
2210                 fi
2211         done
2212         if test "$ol_arg" = "invalid" ; then
2213                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2214         fi
2215         ol_with_meta_module="$ol_arg"
2216
2217 else
2218         ol_with_meta_module="static"
2219 fi
2220 # end --with-meta_module
2221
2222 # OpenLDAP --enable-monitor
2223         # Check whether --enable-monitor or --disable-monitor was given.
2224 if test "${enable_monitor+set}" = set; then
2225   enableval="$enable_monitor"
2226   
2227         ol_arg=invalid
2228         for ol_val in auto yes no ; do
2229                 if test "$enableval" = "$ol_val" ; then
2230                         ol_arg="$ol_val"
2231                 fi
2232         done
2233         if test "$ol_arg" = "invalid" ; then
2234                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2235         fi
2236         ol_enable_monitor="$ol_arg"
2237
2238 else
2239         ol_enable_monitor="no"
2240 fi
2241 # end --enable-monitor
2242 # OpenLDAP --with-monitor_module
2243         # Check whether --with-monitor_module or --without-monitor_module was given.
2244 if test "${with_monitor_module+set}" = set; then
2245   withval="$with_monitor_module"
2246   
2247         ol_arg=invalid
2248         for ol_val in static dynamic ; do
2249                 if test "$withval" = "$ol_val" ; then
2250                         ol_arg="$ol_val"
2251                 fi
2252         done
2253         if test "$ol_arg" = "invalid" ; then
2254                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2255         fi
2256         ol_with_monitor_module="$ol_arg"
2257
2258 else
2259         ol_with_monitor_module="static"
2260 fi
2261 # end --with-monitor_module
2262
2263 # OpenLDAP --enable-null
2264         # Check whether --enable-null or --disable-null was given.
2265 if test "${enable_null+set}" = set; then
2266   enableval="$enable_null"
2267   
2268         ol_arg=invalid
2269         for ol_val in auto yes no ; do
2270                 if test "$enableval" = "$ol_val" ; then
2271                         ol_arg="$ol_val"
2272                 fi
2273         done
2274         if test "$ol_arg" = "invalid" ; then
2275                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2276         fi
2277         ol_enable_null="$ol_arg"
2278
2279 else
2280         ol_enable_null="no"
2281 fi
2282 # end --enable-null
2283 # OpenLDAP --with-null_module
2284         # Check whether --with-null_module or --without-null_module was given.
2285 if test "${with_null_module+set}" = set; then
2286   withval="$with_null_module"
2287   
2288         ol_arg=invalid
2289         for ol_val in static dynamic ; do
2290                 if test "$withval" = "$ol_val" ; then
2291                         ol_arg="$ol_val"
2292                 fi
2293         done
2294         if test "$ol_arg" = "invalid" ; then
2295                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2296         fi
2297         ol_with_null_module="$ol_arg"
2298
2299 else
2300         ol_with_null_module="static"
2301 fi
2302 # end --with-null_module
2303
2304 # OpenLDAP --enable-passwd
2305         # Check whether --enable-passwd or --disable-passwd was given.
2306 if test "${enable_passwd+set}" = set; then
2307   enableval="$enable_passwd"
2308   
2309         ol_arg=invalid
2310         for ol_val in auto yes no ; do
2311                 if test "$enableval" = "$ol_val" ; then
2312                         ol_arg="$ol_val"
2313                 fi
2314         done
2315         if test "$ol_arg" = "invalid" ; then
2316                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2317         fi
2318         ol_enable_passwd="$ol_arg"
2319
2320 else
2321         ol_enable_passwd="no"
2322 fi
2323 # end --enable-passwd
2324 # OpenLDAP --with-passwd_module
2325         # Check whether --with-passwd_module or --without-passwd_module was given.
2326 if test "${with_passwd_module+set}" = set; then
2327   withval="$with_passwd_module"
2328   
2329         ol_arg=invalid
2330         for ol_val in static dynamic ; do
2331                 if test "$withval" = "$ol_val" ; then
2332                         ol_arg="$ol_val"
2333                 fi
2334         done
2335         if test "$ol_arg" = "invalid" ; then
2336                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2337         fi
2338         ol_with_passwd_module="$ol_arg"
2339
2340 else
2341         ol_with_passwd_module="static"
2342 fi
2343 # end --with-passwd_module
2344
2345 # OpenLDAP --enable-perl
2346         # Check whether --enable-perl or --disable-perl was given.
2347 if test "${enable_perl+set}" = set; then
2348   enableval="$enable_perl"
2349   
2350         ol_arg=invalid
2351         for ol_val in auto yes no ; do
2352                 if test "$enableval" = "$ol_val" ; then
2353                         ol_arg="$ol_val"
2354                 fi
2355         done
2356         if test "$ol_arg" = "invalid" ; then
2357                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2358         fi
2359         ol_enable_perl="$ol_arg"
2360
2361 else
2362         ol_enable_perl="no"
2363 fi
2364 # end --enable-perl
2365 # OpenLDAP --with-perl_module
2366         # Check whether --with-perl_module or --without-perl_module was given.
2367 if test "${with_perl_module+set}" = set; then
2368   withval="$with_perl_module"
2369   
2370         ol_arg=invalid
2371         for ol_val in static dynamic ; do
2372                 if test "$withval" = "$ol_val" ; then
2373                         ol_arg="$ol_val"
2374                 fi
2375         done
2376         if test "$ol_arg" = "invalid" ; then
2377                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2378         fi
2379         ol_with_perl_module="$ol_arg"
2380
2381 else
2382         ol_with_perl_module="static"
2383 fi
2384 # end --with-perl_module
2385
2386 # OpenLDAP --enable-shell
2387         # Check whether --enable-shell or --disable-shell was given.
2388 if test "${enable_shell+set}" = set; then
2389   enableval="$enable_shell"
2390   
2391         ol_arg=invalid
2392         for ol_val in auto yes no ; do
2393                 if test "$enableval" = "$ol_val" ; then
2394                         ol_arg="$ol_val"
2395                 fi
2396         done
2397         if test "$ol_arg" = "invalid" ; then
2398                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2399         fi
2400         ol_enable_shell="$ol_arg"
2401
2402 else
2403         ol_enable_shell="no"
2404 fi
2405 # end --enable-shell
2406 # OpenLDAP --with-shell_module
2407         # Check whether --with-shell_module or --without-shell_module was given.
2408 if test "${with_shell_module+set}" = set; then
2409   withval="$with_shell_module"
2410   
2411         ol_arg=invalid
2412         for ol_val in static dynamic ; do
2413                 if test "$withval" = "$ol_val" ; then
2414                         ol_arg="$ol_val"
2415                 fi
2416         done
2417         if test "$ol_arg" = "invalid" ; then
2418                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2419         fi
2420         ol_with_shell_module="$ol_arg"
2421
2422 else
2423         ol_with_shell_module="static"
2424 fi
2425 # end --with-shell_module
2426
2427 # OpenLDAP --enable-sql
2428         # Check whether --enable-sql or --disable-sql was given.
2429 if test "${enable_sql+set}" = set; then
2430   enableval="$enable_sql"
2431   
2432         ol_arg=invalid
2433         for ol_val in auto yes no ; do
2434                 if test "$enableval" = "$ol_val" ; then
2435                         ol_arg="$ol_val"
2436                 fi
2437         done
2438         if test "$ol_arg" = "invalid" ; then
2439                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2440         fi
2441         ol_enable_sql="$ol_arg"
2442
2443 else
2444         ol_enable_sql="no"
2445 fi
2446 # end --enable-sql
2447 # OpenLDAP --with-sql_module
2448         # Check whether --with-sql_module or --without-sql_module was given.
2449 if test "${with_sql_module+set}" = set; then
2450   withval="$with_sql_module"
2451   
2452         ol_arg=invalid
2453         for ol_val in static dynamic ; do
2454                 if test "$withval" = "$ol_val" ; then
2455                         ol_arg="$ol_val"
2456                 fi
2457         done
2458         if test "$ol_arg" = "invalid" ; then
2459                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2460         fi
2461         ol_with_sql_module="$ol_arg"
2462
2463 else
2464         ol_with_sql_module="static"
2465 fi
2466 # end --with-sql_module
2467
2468
2469 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2470 if test "${with_xxslurpdoptions+set}" = set; then
2471   withval="$with_xxslurpdoptions"
2472   :
2473 fi
2474
2475 # OpenLDAP --enable-slurpd
2476         # Check whether --enable-slurpd or --disable-slurpd was given.
2477 if test "${enable_slurpd+set}" = set; then
2478   enableval="$enable_slurpd"
2479   
2480         ol_arg=invalid
2481         for ol_val in auto yes no ; do
2482                 if test "$enableval" = "$ol_val" ; then
2483                         ol_arg="$ol_val"
2484                 fi
2485         done
2486         if test "$ol_arg" = "invalid" ; then
2487                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2488         fi
2489         ol_enable_slurpd="$ol_arg"
2490
2491 else
2492         ol_enable_slurpd="auto"
2493 fi
2494 # end --enable-slurpd
2495
2496 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2497 if test "${with_xxliboptions+set}" = set; then
2498   withval="$with_xxliboptions"
2499   :
2500 fi
2501
2502 # Check whether --enable-static or --disable-static was given.
2503 if test "${enable_static+set}" = set; then
2504   enableval="$enable_static"
2505   p=${PACKAGE-default}
2506 case $enableval in
2507 yes) enable_static=yes ;;
2508 no) enable_static=no ;;
2509 *)
2510   enable_static=no
2511   # Look at the argument we got.  We use all the common list separators.
2512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2513   for pkg in $enableval; do
2514     if test "X$pkg" = "X$p"; then
2515       enable_static=yes
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519   ;;
2520 esac
2521 else
2522   enable_static=yes
2523 fi
2524
2525 # Check whether --enable-shared or --disable-shared was given.
2526 if test "${enable_shared+set}" = set; then
2527   enableval="$enable_shared"
2528   p=${PACKAGE-default}
2529 case $enableval in
2530 yes) enable_shared=yes ;;
2531 no) enable_shared=no ;;
2532 *)
2533   enable_shared=no
2534   # Look at the argument we got.  We use all the common list separators.
2535   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2536   for pkg in $enableval; do
2537     if test "X$pkg" = "X$p"; then
2538       enable_shared=yes
2539     fi
2540   done
2541   IFS="$ac_save_ifs"
2542   ;;
2543 esac
2544 else
2545   enable_shared=yes
2546 fi
2547
2548
2549
2550 # validate options
2551 if test $ol_enable_slapd = no ; then
2552                 if test $ol_enable_slapi = yes ; then
2553                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2554         fi
2555         if test $ol_enable_bdb = yes ; then
2556                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2557         fi
2558         if test $ol_enable_dnssrv = yes ; then
2559                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2560         fi
2561         if test $ol_enable_hdb = yes ; then
2562                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2563         fi
2564         if test $ol_enable_ldap = yes ; then
2565                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2566         fi
2567         if test $ol_enable_ldbm = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2569         fi
2570         if test $ol_enable_meta = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2572         fi
2573         if test $ol_enable_monitor = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2575         fi
2576         if test $ol_enable_null = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2578         fi
2579         if test $ol_enable_passwd = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2581         fi
2582         if test $ol_enable_perl = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2584         fi
2585         if test $ol_enable_shell = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2587         fi
2588         if test $ol_enable_sql = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2590         fi
2591         if test $ol_enable_modules = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2593         fi
2594         if test $ol_enable_multimaster = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2596         fi
2597         if test $ol_enable_wrappers = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2599         fi
2600         if test $ol_enable_rlookups = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2602         fi
2603         if test $ol_enable_aci = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2605         fi
2606         if test $ol_with_ldbm_api != auto ; then
2607                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2608         fi
2609         if test $ol_with_ldbm_type != auto ; then
2610                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2611         fi
2612         if test $ol_with_bdb_module != static ; then
2613                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2614         fi
2615         if test $ol_with_dnssrv_module != static ; then
2616                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2617         fi
2618         if test $ol_with_hdb_module != static ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2620         fi
2621         if test $ol_with_ldap_module != static ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2623         fi
2624         if test $ol_with_ldbm_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2626         fi
2627         if test $ol_with_meta_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2629         fi
2630         if test $ol_with_monitor_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2632         fi
2633         if test $ol_with_null_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2635         fi
2636         if test $ol_with_passwd_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2638         fi
2639         if test $ol_with_perl_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2641         fi
2642         if test $ol_with_shell_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2644         fi
2645         if test $ol_with_sql_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2647         fi
2648         if test $ol_enable_slurpd = yes ; then
2649                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2650         fi
2651         if test $ol_enable_rewrite = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2653         fi
2654
2655         # force settings to no
2656         ol_enable_slapi=no
2657         ol_enable_bdb=no
2658         ol_enable_dnssrv=no
2659         ol_enable_hdb=no
2660         ol_enable_ldap=no
2661         ol_enable_ldbm=no
2662         ol_enable_meta=no
2663         ol_enable_monitor=no
2664         ol_enable_null=no
2665         ol_enable_passwd=no
2666         ol_enable_perl=no
2667         ol_enable_shell=no
2668         ol_enable_sql=no
2669
2670         ol_enable_modules=no
2671         ol_enable_multimaster=no
2672         ol_enable_rlookups=no
2673         ol_enable_aci=no
2674         ol_enable_wrappers=no
2675         ol_enable_dynamic=no
2676
2677         ol_with_ldbm_api=no
2678         ol_with_ldbm_type=no
2679
2680         ol_with_bdb_module=static
2681         ol_with_dnssrv_module=static
2682         ol_with_hdb_module=static
2683         ol_with_ldap_module=static
2684         ol_with_ldbm_module=static
2685         ol_with_meta_module=static
2686         ol_with_monitor_module=static
2687         ol_with_null_module=static
2688         ol_with_passwd_module=static
2689         ol_with_perl_module=static
2690         ol_with_shell_module=static
2691         ol_with_sql_module=static
2692
2693         ol_enable_slurpd=no
2694
2695         ol_enable_rewrite=no
2696
2697 elif test $ol_enable_ldbm = no ; then
2698         
2699         if test $ol_with_ldbm_api != auto ; then
2700                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2701         fi
2702
2703         if test $ol_with_ldbm_type != auto ; then
2704                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2705         fi
2706
2707         if test $ol_with_ldbm_module != static ; then
2708                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2709         fi
2710
2711         if test $ol_enable_modules != yes -a \
2712                 $ol_enable_bdb = no -a \
2713                 $ol_enable_dnssrv = no -a \
2714                 $ol_enable_hdb = no -a \
2715                 $ol_enable_ldap = no -a \
2716                 $ol_enable_meta = no -a \
2717                 $ol_enable_monitor = no -a \
2718                 $ol_enable_null = no -a \
2719                 $ol_enable_passwd = no -a \
2720                 $ol_enable_perl = no -a \
2721                 $ol_enable_shell = no -a \
2722                 $ol_enable_sql = no ; then
2723
2724                 if test $ol_enable_slapd = yes ; then
2725                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2726                 else
2727                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2728                         ol_enable_slapd=no
2729                 fi
2730         fi
2731
2732         ol_with_ldbm_api=no
2733         ol_with_ldbm_type=no
2734         ol_with_ldbm_module=static
2735
2736         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2737                 ol_with_ldbm_api=berkeley
2738         fi
2739
2740 else
2741                 if test $ol_with_ldbm_api = gdbm -a \
2742                 $ol_with_ldbm_type = btree ; then
2743                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2744         fi
2745         if test $ol_with_ldbm_api = mdbm -a \
2746                 $ol_with_ldbm_type = btree ; then
2747                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2748         fi
2749         if test $ol_with_ldbm_api = ndbm -a \
2750                 $ol_with_ldbm_type = btree ; then
2751                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2752         fi
2753
2754         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2755                 if test $ol_with_ldbm_api = auto ; then
2756                         ol_with_ldbm_api=berkeley
2757                 elif test $ol_with_ldbm_api != berkeley ; then
2758                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2759                 fi
2760
2761         elif test $ol_enable_bdb = auto ; then
2762                 if test $ol_with_ldbm_api != berkeley \
2763                         -o $ol_with_ldbm_api != auto ; then
2764                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2765                         ol_enable_bdb=no
2766                 fi
2767         fi
2768 fi
2769
2770 if test $ol_enable_slurpd = yes ; then
2771                 if test $ol_with_threads = no ; then
2772                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2773         fi
2774 fi
2775
2776 if test $ol_enable_lmpasswd = yes ; then
2777         if test $ol_with_tls = no ; then
2778                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2783         if test $ol_with_kerberos = no ; then
2784                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2785         elif test $ol_with_kerberos = auto ; then
2786                 ol_with_kerberos=yes
2787         fi
2788
2789 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2790         if test $ol_with_kerberos = auto ; then
2791                 ol_with_kerberos=no
2792         elif test $ol_with_kerberos != no ; then
2793                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2794                 ol_with_kerberos=no
2795         fi
2796 fi
2797
2798 if test $ol_enable_spasswd = yes ; then
2799         if test $ol_with_cyrus_sasl = no ; then
2800                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2801         fi
2802         ol_with_cyrus_sasl=yes
2803 fi
2804
2805 echo "$ac_t""done" 1>&6
2806
2807 LDAP_LIBS=
2808 LDIF_LIBS=
2809 LDBM_LIBS=
2810 LTHREAD_LIBS=
2811 LUTIL_LIBS=
2812
2813 SLAPD_LIBS=
2814 SLURPD_LIBS=
2815
2816 BUILD_SLAPD=no
2817 BUILD_SLURPD=no
2818
2819 BUILD_THREAD=no
2820
2821 BUILD_SLAPI=no
2822 SLAPD_SLAPI_DEPEND=
2823
2824 BUILD_BDB=no
2825 BUILD_DNSSRV=no
2826 BUILD_HDB=no
2827 BUILD_LDAP=no
2828 BUILD_LDBM=no
2829 BUILD_META=no
2830 BUILD_MONITOR=no
2831 BUILD_CACHE=no
2832 BUILD_NULL=no
2833 BUILD_PASSWD=no
2834 BUILD_PERL=no
2835 BUILD_SHELL=no
2836 BUILD_SQL=no
2837
2838 BUILD_BDB_DYNAMIC=static
2839 BUILD_DNSSRV_DYNAMIC=static
2840 BUILD_HDB_DYNAMIC=static
2841 BUILD_LDAP_DYNAMIC=static
2842 BUILD_LDBM_DYNAMIC=static
2843 BUILD_META_DYNAMIC=static
2844 BUILD_MONITOR_DYNAMIC=static
2845 BUILD_NULL_DYNAMIC=static
2846 BUILD_PASSWD_DYNAMIC=static
2847 BUILD_PERL_DYNAMIC=static
2848 BUILD_SHELL_DYNAMIC=static
2849 BUILD_SQL_DYNAMIC=static
2850
2851 SLAPD_MODULES_LDFLAGS=
2852 SLAPD_MODULES_CPPFLAGS=
2853
2854 SLAPD_STATIC_BACKENDS=
2855 SLAPD_DYNAMIC_BACKENDS=
2856
2857 SLAPD_PERL_LDFLAGS=
2858 MOD_PERL_LDFLAGS=
2859 PERL_CPPFLAGS=
2860
2861 SLAPD_SQL_LDFLAGS=
2862 SLAPD_SQL_LIBS=
2863 SLAPD_SQL_INCLUDES=
2864
2865 KRB4_LIBS=
2866 KRB5_LIBS=
2867 SASL_LIBS=
2868 TERMCAP_LIBS=
2869 TLS_LIBS=
2870 MODULES_LIBS=
2871 SLAPI_LIBS=
2872 LIBSLAPI=
2873 LIBSLAPITOOLS=
2874 AUTH_LIBS=
2875
2876 SLAPD_SLP_LIBS=
2877
2878
2879 # Find a good install program.  We prefer a C program (faster),
2880 # so one script is as good as another.  But avoid the broken or
2881 # incompatible versions:
2882 # SysV /etc/install, /usr/sbin/install
2883 # SunOS /usr/etc/install
2884 # IRIX /sbin/install
2885 # AIX /bin/install
2886 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2887 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2888 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2889 # ./install, which can be erroneously created by make from ./install.sh.
2890 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2891 echo "configure:2892: checking for a BSD compatible install" >&5
2892 if test -z "$INSTALL"; then
2893 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2894   echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2897   for ac_dir in $PATH; do
2898     # Account for people who put trailing slashes in PATH elements.
2899     case "$ac_dir/" in
2900     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2901     *)
2902       # OSF1 and SCO ODT 3.0 have their own names for install.
2903       # Don't use installbsd from OSF since it installs stuff as root
2904       # by default.
2905       for ac_prog in ginstall scoinst install; do
2906         if test -f $ac_dir/$ac_prog; then
2907           if test $ac_prog = install &&
2908             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2909             # AIX install.  It has an incompatible calling convention.
2910             :
2911           elif test $ac_prog = install &&
2912             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2913             # program-specific install script used by HP pwplus--don't use.
2914             :
2915           else
2916             ac_cv_path_install="$ac_dir/$ac_prog -c"
2917             break 2
2918           fi
2919         fi
2920       done
2921       ;;
2922     esac
2923   done
2924   IFS="$ac_save_IFS"
2925
2926 fi
2927   if test "${ac_cv_path_install+set}" = set; then
2928     INSTALL="$ac_cv_path_install"
2929   else
2930     # As a last resort, use the slow shell script.  We don't cache a
2931     # path for INSTALL within a source directory, because that will
2932     # break other packages using the cache if that directory is
2933     # removed, or if the path is relative.
2934     INSTALL="$ac_install_sh"
2935   fi
2936 fi
2937 echo "$ac_t""$INSTALL" 1>&6
2938
2939 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2940 # It thinks the first close brace ends the variable substitution.
2941 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2942
2943 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2944
2945 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2946
2947
2948 cat >> confdefs.h <<\EOF
2949 #define HAVE_MKVERSION 1
2950 EOF
2951
2952
2953
2954
2955 ol_aix_threads=no
2956 case "$target" in
2957 *-*-aix*)       if test -z "$CC" ; then
2958                 case "$ol_with_threads" in
2959                 auto | yes |  posix) ol_aix_threads=yes ;;
2960                 esac
2961         fi
2962 ;;
2963 esac
2964
2965 if test $ol_aix_threads = yes ; then
2966         if test -z "${CC}" ; then
2967                 for ac_prog in cc_r xlc_r cc
2968 do
2969 # Extract the first word of "$ac_prog", so it can be a program name with args.
2970 set dummy $ac_prog; ac_word=$2
2971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2972 echo "configure:2973: checking for $ac_word" >&5
2973 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2974   echo $ac_n "(cached) $ac_c" 1>&6
2975 else
2976   if test -n "$CC"; then
2977   ac_cv_prog_CC="$CC" # Let the user override the test.
2978 else
2979   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2980   ac_dummy="$PATH"
2981   for ac_dir in $ac_dummy; do
2982     test -z "$ac_dir" && ac_dir=.
2983     if test -f $ac_dir/$ac_word; then
2984       ac_cv_prog_CC="$ac_prog"
2985       break
2986     fi
2987   done
2988   IFS="$ac_save_ifs"
2989 fi
2990 fi
2991 CC="$ac_cv_prog_CC"
2992 if test -n "$CC"; then
2993   echo "$ac_t""$CC" 1>&6
2994 else
2995   echo "$ac_t""no" 1>&6
2996 fi
2997
2998 test -n "$CC" && break
2999 done
3000
3001
3002                 if test "$CC" = cc ; then
3003                                                 if test $ol_with_threads != auto ; then
3004                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3005                         else
3006                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3007                         fi
3008                         ol_with_threads=no
3009                 fi
3010         fi
3011
3012         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3013                 ol_with_threads=posix
3014                 ol_cv_pthread_create=yes
3015         fi
3016 fi
3017
3018 if test -z "${CC}"; then
3019         for ac_prog in cc gcc
3020 do
3021 # Extract the first word of "$ac_prog", so it can be a program name with args.
3022 set dummy $ac_prog; ac_word=$2
3023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3024 echo "configure:3025: checking for $ac_word" >&5
3025 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3026   echo $ac_n "(cached) $ac_c" 1>&6
3027 else
3028   if test -n "$CC"; then
3029   ac_cv_prog_CC="$CC" # Let the user override the test.
3030 else
3031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3032   ac_dummy="$PATH"
3033   for ac_dir in $ac_dummy; do
3034     test -z "$ac_dir" && ac_dir=.
3035     if test -f $ac_dir/$ac_word; then
3036       ac_cv_prog_CC="$ac_prog"
3037       break
3038     fi
3039   done
3040   IFS="$ac_save_ifs"
3041 fi
3042 fi
3043 CC="$ac_cv_prog_CC"
3044 if test -n "$CC"; then
3045   echo "$ac_t""$CC" 1>&6
3046 else
3047   echo "$ac_t""no" 1>&6
3048 fi
3049
3050 test -n "$CC" && break
3051 done
3052 test -n "$CC" || CC="missing"
3053
3054
3055         if test "${CC}" = "missing" ; then
3056                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3057         fi
3058 fi
3059
3060 if test -z "${AR}"; then
3061         for ac_prog in ar gar
3062 do
3063 # Extract the first word of "$ac_prog", so it can be a program name with args.
3064 set dummy $ac_prog; ac_word=$2
3065 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3066 echo "configure:3067: checking for $ac_word" >&5
3067 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   if test -n "$AR"; then
3071   ac_cv_prog_AR="$AR" # Let the user override the test.
3072 else
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3074   ac_dummy="$PATH"
3075   for ac_dir in $ac_dummy; do
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/$ac_word; then
3078       ac_cv_prog_AR="$ac_prog"
3079       break
3080     fi
3081   done
3082   IFS="$ac_save_ifs"
3083 fi
3084 fi
3085 AR="$ac_cv_prog_AR"
3086 if test -n "$AR"; then
3087   echo "$ac_t""$AR" 1>&6
3088 else
3089   echo "$ac_t""no" 1>&6
3090 fi
3091
3092 test -n "$AR" && break
3093 done
3094 test -n "$AR" || AR="missing"
3095
3096
3097         if test "${AR}" = "missing" ; then
3098                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3099         fi
3100 fi
3101
3102
3103
3104 # Find the correct PATH separator.  Usually this is `:', but
3105 # DJGPP uses `;' like DOS.
3106 if test "X${PATH_SEPARATOR+set}" != Xset; then
3107   UNAME=${UNAME-`uname 2>/dev/null`}
3108   case X$UNAME in
3109     *-DOS) lt_cv_sys_path_separator=';' ;;
3110     *)     lt_cv_sys_path_separator=':' ;;
3111   esac
3112   PATH_SEPARATOR=$lt_cv_sys_path_separator
3113 fi
3114
3115 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3116 echo "configure:3117: checking for Cygwin environment" >&5
3117 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   cat > conftest.$ac_ext <<EOF
3121 #line 3122 "configure"
3122 #include "confdefs.h"
3123
3124 int main() {
3125
3126 #ifndef __CYGWIN__
3127 #define __CYGWIN__ __CYGWIN32__
3128 #endif
3129 return __CYGWIN__;
3130 ; return 0; }
3131 EOF
3132 if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3133   rm -rf conftest*
3134   ac_cv_cygwin=yes
3135 else
3136   echo "configure: failed program was:" >&5
3137   cat conftest.$ac_ext >&5
3138   rm -rf conftest*
3139   ac_cv_cygwin=no
3140 fi
3141 rm -f conftest*
3142 fi
3143
3144 echo "$ac_t""$ac_cv_cygwin" 1>&6
3145 CYGWIN=
3146 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3147 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3148 echo "configure:3149: checking for mingw32 environment" >&5
3149 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155
3156 int main() {
3157 return __MINGW32__;
3158 ; return 0; }
3159 EOF
3160 if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3161   rm -rf conftest*
3162   ac_cv_mingw32=yes
3163 else
3164   echo "configure: failed program was:" >&5
3165   cat conftest.$ac_ext >&5
3166   rm -rf conftest*
3167   ac_cv_mingw32=no
3168 fi
3169 rm -f conftest*
3170 fi
3171
3172 echo "$ac_t""$ac_cv_mingw32" 1>&6
3173 MINGW32=
3174 test "$ac_cv_mingw32" = yes && MINGW32=yes
3175 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for EMX OS/2 environment" >&5
3177 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185 return __EMX__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_emxos2=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_emxos2=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_emxos2" 1>&6
3201 EMXOS2=
3202 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3203 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3204 echo "configure:3205: checking how to run the C preprocessor" >&5
3205 # On Suns, sometimes $CPP names a directory.
3206 if test -n "$CPP" && test -d "$CPP"; then
3207   CPP=
3208 fi
3209 if test -z "$CPP"; then
3210 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213     # This must be in double quotes, not single quotes, because CPP may get
3214   # substituted into the Makefile and "${CC-cc}" will confuse make.
3215   CPP="${CC-cc} -E"
3216   # On the NeXT, cc -E runs the code through the compiler's parser,
3217   # not just through cpp.
3218   cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3221 #include <assert.h>
3222 Syntax Error
3223 EOF
3224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3225 { (eval echo configure:3226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3227 if test -z "$ac_err"; then
3228   :
3229 else
3230   echo "$ac_err" >&5
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   CPP="${CC-cc} -E -traditional-cpp"
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <assert.h>
3239 Syntax Error
3240 EOF
3241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3242 { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3244 if test -z "$ac_err"; then
3245   :
3246 else
3247   echo "$ac_err" >&5
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   CPP="${CC-cc} -nologo -E"
3252   cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 #include <assert.h>
3256 Syntax Error
3257 EOF
3258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3259 { (eval echo configure:3260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3261 if test -z "$ac_err"; then
3262   :
3263 else
3264   echo "$ac_err" >&5
3265   echo "configure: failed program was:" >&5
3266   cat conftest.$ac_ext >&5
3267   rm -rf conftest*
3268   CPP=/lib/cpp
3269 fi
3270 rm -f conftest*
3271 fi
3272 rm -f conftest*
3273 fi
3274 rm -f conftest*
3275   ac_cv_prog_CPP="$CPP"
3276 fi
3277   CPP="$ac_cv_prog_CPP"
3278 else
3279   ac_cv_prog_CPP="$CPP"
3280 fi
3281 echo "$ac_t""$CPP" 1>&6
3282
3283 # Check whether --enable-fast-install or --disable-fast-install was given.
3284 if test "${enable_fast_install+set}" = set; then
3285   enableval="$enable_fast_install"
3286   p=${PACKAGE-default}
3287 case $enableval in
3288 yes) enable_fast_install=yes ;;
3289 no) enable_fast_install=no ;;
3290 *)
3291   enable_fast_install=no
3292   # Look at the argument we got.  We use all the common list separators.
3293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3294   for pkg in $enableval; do
3295     if test "X$pkg" = "X$p"; then
3296       enable_fast_install=yes
3297     fi
3298   done
3299   IFS="$ac_save_ifs"
3300   ;;
3301 esac
3302 else
3303   enable_fast_install=yes
3304 fi
3305
3306 # Extract the first word of "gcc", so it can be a program name with args.
3307 set dummy gcc; ac_word=$2
3308 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3309 echo "configure:3310: checking for $ac_word" >&5
3310 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   if test -n "$CC"; then
3314   ac_cv_prog_CC="$CC" # Let the user override the test.
3315 else
3316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3317   ac_dummy="$PATH"
3318   for ac_dir in $ac_dummy; do
3319     test -z "$ac_dir" && ac_dir=.
3320     if test -f $ac_dir/$ac_word; then
3321       ac_cv_prog_CC="gcc"
3322       break
3323     fi
3324   done
3325   IFS="$ac_save_ifs"
3326 fi
3327 fi
3328 CC="$ac_cv_prog_CC"
3329 if test -n "$CC"; then
3330   echo "$ac_t""$CC" 1>&6
3331 else
3332   echo "$ac_t""no" 1>&6
3333 fi
3334
3335 if test -z "$CC"; then
3336   # Extract the first word of "cc", so it can be a program name with args.
3337 set dummy cc; ac_word=$2
3338 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_word" >&5
3340 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3341   echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343   if test -n "$CC"; then
3344   ac_cv_prog_CC="$CC" # Let the user override the test.
3345 else
3346   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3347   ac_prog_rejected=no
3348   ac_dummy="$PATH"
3349   for ac_dir in $ac_dummy; do
3350     test -z "$ac_dir" && ac_dir=.
3351     if test -f $ac_dir/$ac_word; then
3352       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3353         ac_prog_rejected=yes
3354         continue
3355       fi
3356       ac_cv_prog_CC="cc"
3357       break
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361 if test $ac_prog_rejected = yes; then
3362   # We found a bogon in the path, so make sure we never use it.
3363   set dummy $ac_cv_prog_CC
3364   shift
3365   if test $# -gt 0; then
3366     # We chose a different compiler from the bogus one.
3367     # However, it has the same basename, so the bogon will be chosen
3368     # first if we set CC to just the basename; use the full file name.
3369     shift
3370     set dummy "$ac_dir/$ac_word" "$@"
3371     shift
3372     ac_cv_prog_CC="$@"
3373   fi
3374 fi
3375 fi
3376 fi
3377 CC="$ac_cv_prog_CC"
3378 if test -n "$CC"; then
3379   echo "$ac_t""$CC" 1>&6
3380 else
3381   echo "$ac_t""no" 1>&6
3382 fi
3383
3384   if test -z "$CC"; then
3385     case "`uname -s`" in
3386     *win32* | *WIN32* | *CYGWIN*)
3387       # Extract the first word of "cl", so it can be a program name with args.
3388 set dummy cl; ac_word=$2
3389 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3390 echo "configure:3391: checking for $ac_word" >&5
3391 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   if test -n "$CC"; then
3395   ac_cv_prog_CC="$CC" # Let the user override the test.
3396 else
3397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3398   ac_dummy="$PATH"
3399   for ac_dir in $ac_dummy; do
3400     test -z "$ac_dir" && ac_dir=.
3401     if test -f $ac_dir/$ac_word; then
3402       ac_cv_prog_CC="cl"
3403       break
3404     fi
3405   done
3406   IFS="$ac_save_ifs"
3407 fi
3408 fi
3409 CC="$ac_cv_prog_CC"
3410 if test -n "$CC"; then
3411   echo "$ac_t""$CC" 1>&6
3412 else
3413   echo "$ac_t""no" 1>&6
3414 fi
3415  ;;
3416     esac
3417   fi
3418   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3419 fi
3420
3421 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3422 echo "configure:3423: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3423
3424 ac_ext=c
3425 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3426 ac_cpp='$CPP $CPPFLAGS'
3427 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3428 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3429 cross_compiling=$ac_cv_prog_cc_cross
3430
3431 cat > conftest.$ac_ext << EOF
3432
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435
3436 main(){return(0);}
3437 EOF
3438 if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3439   ac_cv_prog_cc_works=yes
3440   # If we can't run a trivial program, we are probably using a cross compiler.
3441   if (./conftest; exit) 2>/dev/null; then
3442     ac_cv_prog_cc_cross=no
3443   else
3444     ac_cv_prog_cc_cross=yes
3445   fi
3446 else
3447   echo "configure: failed program was:" >&5
3448   cat conftest.$ac_ext >&5
3449   ac_cv_prog_cc_works=no
3450 fi
3451 rm -fr conftest*
3452 ac_ext=c
3453 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3454 ac_cpp='$CPP $CPPFLAGS'
3455 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3456 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3457 cross_compiling=$ac_cv_prog_cc_cross
3458
3459 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3460 if test $ac_cv_prog_cc_works = no; then
3461   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3462 fi
3463 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3464 echo "configure:3465: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3465 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3466 cross_compiling=$ac_cv_prog_cc_cross
3467
3468 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3469 echo "configure:3470: checking whether we are using GNU C" >&5
3470 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3471   echo $ac_n "(cached) $ac_c" 1>&6
3472 else
3473   cat > conftest.c <<EOF
3474 #ifdef __GNUC__
3475   yes;
3476 #endif
3477 EOF
3478 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3479   ac_cv_prog_gcc=yes
3480 else
3481   ac_cv_prog_gcc=no
3482 fi
3483 fi
3484
3485 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3486
3487 if test $ac_cv_prog_gcc = yes; then
3488   GCC=yes
3489 else
3490   GCC=
3491 fi
3492
3493 ac_test_CFLAGS="${CFLAGS+set}"
3494 ac_save_CFLAGS="$CFLAGS"
3495 CFLAGS=
3496 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3497 echo "configure:3498: checking whether ${CC-cc} accepts -g" >&5
3498 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3499   echo $ac_n "(cached) $ac_c" 1>&6
3500 else
3501   echo 'void f(){}' > conftest.c
3502 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3503   ac_cv_prog_cc_g=yes
3504 else
3505   ac_cv_prog_cc_g=no
3506 fi
3507 rm -f conftest*
3508
3509 fi
3510
3511 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3512 if test "$ac_test_CFLAGS" = set; then
3513   CFLAGS="$ac_save_CFLAGS"
3514 elif test $ac_cv_prog_cc_g = yes; then
3515   if test "$GCC" = yes; then
3516     CFLAGS="-g -O2"
3517   else
3518     CFLAGS="-g"
3519   fi
3520 else
3521   if test "$GCC" = yes; then
3522     CFLAGS="-O2"
3523   else
3524     CFLAGS=
3525   fi
3526 fi
3527
3528 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3529 if test "${with_gnu_ld+set}" = set; then
3530   withval="$with_gnu_ld"
3531   test "$withval" = no || with_gnu_ld=yes
3532 else
3533   with_gnu_ld=no
3534 fi
3535
3536 ac_prog=ld
3537 if test "$GCC" = yes; then
3538   # Check if gcc -print-prog-name=ld gives a path.
3539   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3540 echo "configure:3541: checking for ld used by GCC" >&5
3541   case $host in
3542   *-*-mingw*)
3543     # gcc leaves a trailing carriage return which upsets mingw
3544     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3545   *)
3546     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3547   esac
3548   case $ac_prog in
3549     # Accept absolute paths.
3550     [\\/]* | [A-Za-z]:[\\/]*)
3551       re_direlt='/[^/][^/]*/\.\./'
3552       # Canonicalize the path of ld
3553       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3554       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3555         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3556       done
3557       test -z "$LD" && LD="$ac_prog"
3558       ;;
3559   "")
3560     # If it fails, then pretend we aren't using GCC.
3561     ac_prog=ld
3562     ;;
3563   *)
3564     # If it is relative, then search for the first ld in PATH.
3565     with_gnu_ld=unknown
3566     ;;
3567   esac
3568 elif test "$with_gnu_ld" = yes; then
3569   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3570 echo "configure:3571: checking for GNU ld" >&5
3571 else
3572   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3573 echo "configure:3574: checking for non-GNU ld" >&5
3574 fi
3575 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3576   echo $ac_n "(cached) $ac_c" 1>&6
3577 else
3578   if test -z "$LD"; then
3579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3580   for ac_dir in $PATH; do
3581     test -z "$ac_dir" && ac_dir=.
3582     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3583       lt_cv_path_LD="$ac_dir/$ac_prog"
3584       # Check to see if the program is GNU ld.  I'd rather use --version,
3585       # but apparently some GNU ld's only accept -v.
3586       # Break only if it was the GNU/non-GNU ld that we prefer.
3587       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3588         test "$with_gnu_ld" != no && break
3589       else
3590         test "$with_gnu_ld" != yes && break
3591       fi
3592     fi
3593   done
3594   IFS="$ac_save_ifs"
3595 else
3596   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3597 fi
3598 fi
3599
3600 LD="$lt_cv_path_LD"
3601 if test -n "$LD"; then
3602   echo "$ac_t""$LD" 1>&6
3603 else
3604   echo "$ac_t""no" 1>&6
3605 fi
3606 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3607 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3608 echo "configure:3609: checking if the linker ($LD) is GNU ld" >&5
3609 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3613 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3614   lt_cv_prog_gnu_ld=yes
3615 else
3616   lt_cv_prog_gnu_ld=no
3617 fi
3618 fi
3619
3620 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3621 with_gnu_ld=$lt_cv_prog_gnu_ld
3622
3623
3624 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3625 echo "configure:3626: checking for $LD option to reload object files" >&5
3626 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3627   echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629   lt_cv_ld_reload_flag='-r'
3630 fi
3631
3632 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3633 reload_flag=$lt_cv_ld_reload_flag
3634 test -n "$reload_flag" && reload_flag=" $reload_flag"
3635
3636 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3637 echo "configure:3638: checking for BSD-compatible nm" >&5
3638 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   if test -n "$NM"; then
3642   # Let the user override the test.
3643   lt_cv_path_NM="$NM"
3644 else
3645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3646   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3647     test -z "$ac_dir" && ac_dir=.
3648     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3649     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3650       # Check to see if the nm accepts a BSD-compat flag.
3651       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3652       #   nm: unknown option "B" ignored
3653       # Tru64's nm complains that /dev/null is an invalid object file
3654       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3655         lt_cv_path_NM="$tmp_nm -B"
3656         break
3657       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3658         lt_cv_path_NM="$tmp_nm -p"
3659         break
3660       else
3661         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3662         continue # so that we can try to find one that supports BSD flags
3663       fi
3664     fi
3665   done
3666   IFS="$ac_save_ifs"
3667   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3668 fi
3669 fi
3670
3671 NM="$lt_cv_path_NM"
3672 echo "$ac_t""$NM" 1>&6
3673
3674 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3675 echo "configure:3676: checking for a sed that does not truncate output" >&5
3676 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   # Loop through the user's path and test for sed and gsed.
3680 # Then use that list of sed's as ones to test for truncation.
3681 as_executable_p="test -f"
3682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683 for as_dir in $PATH
3684 do
3685   IFS=$as_save_IFS
3686   test -z "$as_dir" && as_dir=.
3687   for ac_prog in sed gsed; do
3688     for ac_exec_ext in '' $ac_executable_extensions; do
3689       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3690         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3691       fi
3692     done
3693   done
3694 done
3695
3696   # Create a temporary directory, and hook for its removal unless debugging.
3697 $debug ||
3698 {
3699   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3700   trap '{ (exit 1); exit 1; }' 1 2 13 15
3701 }
3702
3703 # Create a (secure) tmp directory for tmp files.
3704 : ${TMPDIR=/tmp}
3705 {
3706   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3707   test -n "$tmp" && test -d "$tmp"
3708 }  ||
3709 {
3710   tmp=$TMPDIR/sed$$-$RANDOM
3711   (umask 077 && mkdir $tmp)
3712 } ||
3713 {
3714    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3715    { (exit 1); exit 1; }
3716 }
3717   _max=0
3718   _count=0
3719   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3720   # along with /bin/sed that truncates output.
3721   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3722     test ! -f ${_sed} && break
3723     cat /dev/null > "$tmp/sed.in"
3724     _count=0
3725     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3726     # Check for GNU sed and select it if it is found.
3727     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3728       lt_cv_path_SED=${_sed}
3729       break
3730     fi
3731     while true; do
3732       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3733       mv "$tmp/sed.tmp" "$tmp/sed.in"
3734       cp "$tmp/sed.in" "$tmp/sed.nl"
3735       echo >>"$tmp/sed.nl"
3736       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3737       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3738       # 40000 chars as input seems more than enough
3739       test $_count -gt 10 && break
3740       _count=`expr $_count + 1`
3741       if test $_count -gt $_max; then
3742         _max=$_count
3743         lt_cv_path_SED=$_sed
3744       fi
3745     done
3746   done
3747   rm -rf "$tmp"
3748
3749 fi
3750
3751 if test "X$SED" != "X"; then
3752   lt_cv_path_SED=$SED
3753 else
3754   SED=$lt_cv_path_SED
3755 fi
3756 echo "$ac_t""$SED" 1>&6
3757
3758 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3759 echo "configure:3760: checking whether ln -s works" >&5
3760 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3761   echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763   rm -f conftestdata
3764 if ln -s X conftestdata 2>/dev/null
3765 then
3766   rm -f conftestdata
3767   ac_cv_prog_LN_S="ln -s"
3768 else
3769   ac_cv_prog_LN_S=ln
3770 fi
3771 fi
3772 LN_S="$ac_cv_prog_LN_S"
3773 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3774   echo "$ac_t""yes" 1>&6
3775 else
3776   echo "$ac_t""no" 1>&6
3777 fi
3778
3779 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3780 echo "configure:3781: checking how to recognise dependent libraries" >&5
3781 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   lt_cv_file_magic_cmd='$MAGIC_CMD'
3785 lt_cv_file_magic_test_file=
3786 lt_cv_deplibs_check_method='unknown'
3787 # Need to set the preceding variable on all platforms that support
3788 # interlibrary dependencies.
3789 # 'none' -- dependencies not supported.
3790 # `unknown' -- same as none, but documents that we really don't know.
3791 # 'pass_all' -- all dependencies passed with no checks.
3792 # 'test_compile' -- check by making test program.
3793 # 'file_magic [[regex]]' -- check by looking for files in library path
3794 # which responds to the $file_magic_cmd with a given egrep regex.
3795 # If you have `file' or equivalent on your system and you're not sure
3796 # whether `pass_all' will *always* work, you probably want this one.
3797
3798 case $host_os in
3799 aix4* | aix5*)
3800   lt_cv_deplibs_check_method=pass_all
3801   ;;
3802
3803 beos*)
3804   lt_cv_deplibs_check_method=pass_all
3805   ;;
3806
3807 bsdi4*)
3808   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3809   lt_cv_file_magic_cmd='/usr/bin/file -L'
3810   lt_cv_file_magic_test_file=/shlib/libc.so
3811   ;;
3812
3813 cygwin* | mingw* | pw32*)
3814   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3815   lt_cv_file_magic_cmd='$OBJDUMP -f'
3816   ;;
3817
3818 darwin* | rhapsody*)
3819   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3820   lt_cv_file_magic_cmd='/usr/bin/file -L'
3821   case "$host_os" in
3822   rhapsody* | darwin1.[012])
3823     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3824     ;;
3825   *) # Darwin 1.3 on
3826     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3827     ;;
3828   esac
3829   ;;
3830
3831 freebsd*)
3832   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3833     case $host_cpu in
3834     i*86 )
3835       # Not sure whether the presence of OpenBSD here was a mistake.
3836       # Let's accept both of them until this is cleared up.
3837       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3838       lt_cv_file_magic_cmd=/usr/bin/file
3839       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3840       ;;
3841     esac
3842   else
3843     lt_cv_deplibs_check_method=pass_all
3844   fi
3845   ;;
3846
3847 gnu*)
3848   lt_cv_deplibs_check_method=pass_all
3849   ;;
3850
3851 hpux10.20*|hpux11*)
3852   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3853   lt_cv_file_magic_cmd=/usr/bin/file
3854   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3855   ;;
3856
3857 irix5* | irix6* | nonstopux*)
3858   case $host_os in
3859   irix5* | nonstopux*)
3860     # this will be overridden with pass_all, but let us keep it just in case
3861     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3862     ;;
3863   *)
3864     case $LD in
3865     *-32|*"-32 ") libmagic=32-bit;;
3866     *-n32|*"-n32 ") libmagic=N32;;
3867     *-64|*"-64 ") libmagic=64-bit;;
3868     *) libmagic=never-match;;
3869     esac
3870     # this will be overridden with pass_all, but let us keep it just in case
3871     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3872     ;;
3873   esac
3874   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3875   lt_cv_deplibs_check_method=pass_all
3876   ;;
3877
3878 # This must be Linux ELF.
3879 linux-gnu*)
3880   case $host_cpu in
3881   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3882     lt_cv_deplibs_check_method=pass_all ;;
3883   *)
3884     # glibc up to 2.1.1 does not perform some relocations on ARM
3885     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3886   esac
3887   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3888   ;;
3889
3890 netbsd*)
3891   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3892     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3893   else
3894     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3895   fi
3896   ;;
3897
3898 newos6*)
3899   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3900   lt_cv_file_magic_cmd=/usr/bin/file
3901   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3902   ;;
3903
3904 openbsd*)
3905   lt_cv_file_magic_cmd=/usr/bin/file
3906   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3907   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3908     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3909   else
3910     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3911   fi
3912   ;;
3913
3914 osf3* | osf4* | osf5*)
3915   # this will be overridden with pass_all, but let us keep it just in case
3916   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3917   lt_cv_file_magic_test_file=/shlib/libc.so
3918   lt_cv_deplibs_check_method=pass_all
3919   ;;
3920
3921 sco3.2v5*)
3922   lt_cv_deplibs_check_method=pass_all
3923   ;;
3924
3925 solaris*)
3926   lt_cv_deplibs_check_method=pass_all
3927   lt_cv_file_magic_test_file=/lib/libc.so
3928   ;;
3929
3930 sysv5uw[78]* | sysv4*uw2*)
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3935   case $host_vendor in
3936   motorola)
3937     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]'
3938     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3939     ;;
3940   ncr)
3941     lt_cv_deplibs_check_method=pass_all
3942     ;;
3943   sequent)
3944     lt_cv_file_magic_cmd='/bin/file'
3945     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3946     ;;
3947   sni)
3948     lt_cv_file_magic_cmd='/bin/file'
3949     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3950     lt_cv_file_magic_test_file=/lib/libc.so
3951     ;;
3952   siemens)
3953     lt_cv_deplibs_check_method=pass_all
3954     ;;
3955   esac
3956   ;;
3957 esac
3958
3959 fi
3960
3961 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3962 file_magic_cmd=$lt_cv_file_magic_cmd
3963 deplibs_check_method=$lt_cv_deplibs_check_method
3964
3965 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3966 echo "configure:3967: checking for object suffix" >&5
3967 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3968   echo $ac_n "(cached) $ac_c" 1>&6
3969 else
3970   rm -f conftest*
3971 echo 'int i = 1;' > conftest.$ac_ext
3972 if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3973   for ac_file in conftest.*; do
3974     case $ac_file in
3975     *.c) ;;
3976     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3977     esac
3978   done
3979 else
3980   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3981 fi
3982 rm -f conftest*
3983 fi
3984
3985 echo "$ac_t""$ac_cv_objext" 1>&6
3986 OBJEXT=$ac_cv_objext
3987 ac_objext=$ac_cv_objext
3988
3989
3990
3991
3992 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3993 echo "configure:3994: checking for executable suffix" >&5
3994 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3995   echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3998   ac_cv_exeext=.exe
3999 else
4000   rm -f conftest*
4001   echo 'int main () { return 0; }' > conftest.$ac_ext
4002   ac_cv_exeext=
4003   if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4004     for file in conftest.*; do
4005       case $file in
4006       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4007       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4008       esac
4009     done
4010   else
4011     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4012   fi
4013   rm -f conftest*
4014   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4015 fi
4016 fi
4017
4018 EXEEXT=""
4019 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4020 echo "$ac_t""${ac_cv_exeext}" 1>&6
4021 ac_exeext=$EXEEXT
4022
4023 if test $host != $build; then
4024   ac_tool_prefix=${host_alias}-
4025 else
4026   ac_tool_prefix=
4027 fi
4028
4029
4030
4031
4032 # Check for command to grab the raw symbol name followed by C symbol from nm.
4033 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4034 echo "configure:4035: checking command to parse $NM output" >&5
4035 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4036   echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4038   
4039 # These are sane defaults that work on at least a few old systems.
4040 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4041
4042 # Character class describing NM global symbol codes.
4043 symcode='[BCDEGRST]'
4044
4045 # Regexp to match symbols that can be accessed directly from C.
4046 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4047
4048 # Transform the above into a raw symbol and a C symbol.
4049 symxfrm='\1 \2\3 \3'
4050
4051 # Transform an extracted symbol line into a proper C declaration
4052 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4053
4054 # Transform an extracted symbol line into symbol name and symbol address
4055 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'"
4056
4057 # Define system-specific variables.
4058 case $host_os in
4059 aix*)
4060   symcode='[BCDT]'
4061   ;;
4062 cygwin* | mingw* | pw32*)
4063   symcode='[ABCDGISTW]'
4064   ;;
4065 hpux*) # Its linker distinguishes data from code symbols
4066   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4067   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'"
4068   ;;
4069 irix* | nonstopux*)
4070   symcode='[BCDEGRST]'
4071   ;;
4072 osf*)
4073   symcode='[BCDEGQRST]'
4074   ;;
4075 solaris* | sysv5*)
4076   symcode='[BDT]'
4077   ;;
4078 sysv4)
4079   symcode='[DFNSTU]'
4080   ;;
4081 esac
4082
4083 # Handle CRLF in mingw tool chain
4084 opt_cr=
4085 case $host_os in
4086 mingw*)
4087   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4088   ;;
4089 esac
4090
4091 # If we're using GNU nm, then use its standard symbol codes.
4092 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4093   symcode='[ABCDGISTW]'
4094 fi
4095
4096 # Try without a prefix undercore, then with it.
4097 for ac_symprfx in "" "_"; do
4098
4099   # Write the raw and C identifiers.
4100 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4101
4102   # Check to see that the pipe works correctly.
4103   pipe_works=no
4104   rm -f conftest*
4105   cat > conftest.$ac_ext <<EOF
4106 #ifdef __cplusplus
4107 extern "C" {
4108 #endif
4109 char nm_test_var;
4110 void nm_test_func(){}
4111 #ifdef __cplusplus
4112 }
4113 #endif
4114 int main(){nm_test_var='a';nm_test_func();return(0);}
4115 EOF
4116
4117   if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4118     # Now try to grab the symbols.
4119     nlist=conftest.nm
4120     if { (eval echo configure:4121: \"$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
4121       # Try sorting and uniquifying the output.
4122       if sort "$nlist" | uniq > "$nlist"T; then
4123         mv -f "$nlist"T "$nlist"
4124       else
4125         rm -f "$nlist"T
4126       fi
4127
4128       # Make sure that we snagged all the symbols we need.
4129       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4130         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4131           cat <<EOF > conftest.$ac_ext
4132 #ifdef __cplusplus
4133 extern "C" {
4134 #endif
4135
4136 EOF
4137           # Now generate the symbol file.
4138           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4139
4140           cat <<EOF >> conftest.$ac_ext
4141 #if defined (__STDC__) && __STDC__
4142 # define lt_ptr void *
4143 #else
4144 # define lt_ptr char *
4145 # define const
4146 #endif
4147
4148 /* The mapping between symbol names and symbols. */
4149 const struct {
4150   const char *name;
4151   lt_ptr address;
4152 }
4153 lt_preloaded_symbols[] =
4154 {
4155 EOF
4156           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4157           cat <<\EOF >> conftest.$ac_ext
4158   {0, (lt_ptr) 0}
4159 };
4160
4161 #ifdef __cplusplus
4162 }
4163 #endif
4164 EOF
4165           # Now try linking the two files.
4166           mv conftest.$ac_objext conftstm.$ac_objext
4167           save_LIBS="$LIBS"
4168           save_CFLAGS="$CFLAGS"
4169           LIBS="conftstm.$ac_objext"
4170           CFLAGS="$CFLAGS$no_builtin_flag"
4171           if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4172             pipe_works=yes
4173           fi
4174           LIBS="$save_LIBS"
4175           CFLAGS="$save_CFLAGS"
4176         else
4177           echo "cannot find nm_test_func in $nlist" >&5
4178         fi
4179       else
4180         echo "cannot find nm_test_var in $nlist" >&5
4181       fi
4182     else
4183       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4184     fi
4185   else
4186     echo "$progname: failed program was:" >&5
4187     cat conftest.$ac_ext >&5
4188   fi
4189   rm -f conftest* conftst*
4190
4191   # Do not use the global_symbol_pipe unless it works.
4192   if test "$pipe_works" = yes; then
4193     break
4194   else
4195     lt_cv_sys_global_symbol_pipe=
4196   fi
4197 done
4198
4199 fi
4200
4201 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4202 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4203   global_symbol_to_cdecl=
4204   global_symbol_to_c_name_address=
4205 else
4206   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4207   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4208 fi
4209 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4210 then
4211   echo "$ac_t""failed" 1>&6
4212 else
4213   echo "$ac_t""ok" 1>&6
4214 fi
4215
4216 for ac_hdr in dlfcn.h
4217 do
4218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4220 echo "configure:4221: checking for $ac_hdr" >&5
4221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <$ac_hdr>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4247   cat >> confdefs.h <<EOF
4248 #define $ac_tr_hdr 1
4249 EOF
4250  
4251 else
4252   echo "$ac_t""no" 1>&6
4253 fi
4254 done
4255
4256
4257
4258
4259
4260
4261 # Only perform the check for file, if the check method requires it
4262 case $deplibs_check_method in
4263 file_magic*)
4264   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4265     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4266 echo "configure:4267: checking for ${ac_tool_prefix}file" >&5
4267 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   case $MAGIC_CMD in
4271   /*)
4272   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4273   ;;
4274   ?:/*)
4275   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4276   ;;
4277   *)
4278   ac_save_MAGIC_CMD="$MAGIC_CMD"
4279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4280   ac_dummy="/usr/bin:$PATH"
4281   for ac_dir in $ac_dummy; do
4282     test -z "$ac_dir" && ac_dir=.
4283     if test -f $ac_dir/${ac_tool_prefix}file; then
4284       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4285       if test -n "$file_magic_test_file"; then
4286         case $deplibs_check_method in
4287         "file_magic "*)
4288           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4289           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4290           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4291             egrep "$file_magic_regex" > /dev/null; then
4292             :
4293           else
4294             cat <<EOF 1>&2
4295
4296 *** Warning: the command libtool uses to detect shared libraries,
4297 *** $file_magic_cmd, produces output that libtool cannot recognize.
4298 *** The result is that libtool may fail to recognize shared libraries
4299 *** as such.  This will affect the creation of libtool libraries that
4300 *** depend on shared libraries, but programs linked with such libtool
4301 *** libraries will work regardless of this problem.  Nevertheless, you
4302 *** may want to report the problem to your system manager and/or to
4303 *** bug-libtool@gnu.org
4304
4305 EOF
4306           fi ;;
4307         esac
4308       fi
4309       break
4310     fi
4311   done
4312   IFS="$ac_save_ifs"
4313   MAGIC_CMD="$ac_save_MAGIC_CMD"
4314   ;;
4315 esac
4316 fi
4317
4318 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4319 if test -n "$MAGIC_CMD"; then
4320   echo "$ac_t""$MAGIC_CMD" 1>&6
4321 else
4322   echo "$ac_t""no" 1>&6
4323 fi
4324
4325 if test -z "$lt_cv_path_MAGIC_CMD"; then
4326   if test -n "$ac_tool_prefix"; then
4327     echo $ac_n "checking for file""... $ac_c" 1>&6
4328 echo "configure:4329: checking for file" >&5
4329 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   case $MAGIC_CMD in
4333   /*)
4334   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4335   ;;
4336   ?:/*)
4337   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4338   ;;
4339   *)
4340   ac_save_MAGIC_CMD="$MAGIC_CMD"
4341   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4342   ac_dummy="/usr/bin:$PATH"
4343   for ac_dir in $ac_dummy; do
4344     test -z "$ac_dir" && ac_dir=.
4345     if test -f $ac_dir/file; then
4346       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4347       if test -n "$file_magic_test_file"; then
4348         case $deplibs_check_method in
4349         "file_magic "*)
4350           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4351           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4352           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4353             egrep "$file_magic_regex" > /dev/null; then
4354             :
4355           else
4356             cat <<EOF 1>&2
4357
4358 *** Warning: the command libtool uses to detect shared libraries,
4359 *** $file_magic_cmd, produces output that libtool cannot recognize.
4360 *** The result is that libtool may fail to recognize shared libraries
4361 *** as such.  This will affect the creation of libtool libraries that
4362 *** depend on shared libraries, but programs linked with such libtool
4363 *** libraries will work regardless of this problem.  Nevertheless, you
4364 *** may want to report the problem to your system manager and/or to
4365 *** bug-libtool@gnu.org
4366
4367 EOF
4368           fi ;;
4369         esac
4370       fi
4371       break
4372     fi
4373   done
4374   IFS="$ac_save_ifs"
4375   MAGIC_CMD="$ac_save_MAGIC_CMD"
4376   ;;
4377 esac
4378 fi
4379
4380 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4381 if test -n "$MAGIC_CMD"; then
4382   echo "$ac_t""$MAGIC_CMD" 1>&6
4383 else
4384   echo "$ac_t""no" 1>&6
4385 fi
4386
4387   else
4388     MAGIC_CMD=:
4389   fi
4390 fi
4391
4392   fi
4393   ;;
4394 esac
4395
4396 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4397 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4399 echo "configure:4400: checking for $ac_word" >&5
4400 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   if test -n "$RANLIB"; then
4404   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4405 else
4406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4407   ac_dummy="$PATH"
4408   for ac_dir in $ac_dummy; do
4409     test -z "$ac_dir" && ac_dir=.
4410     if test -f $ac_dir/$ac_word; then
4411       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4412       break
4413     fi
4414   done
4415   IFS="$ac_save_ifs"
4416 fi
4417 fi
4418 RANLIB="$ac_cv_prog_RANLIB"
4419 if test -n "$RANLIB"; then
4420   echo "$ac_t""$RANLIB" 1>&6
4421 else
4422   echo "$ac_t""no" 1>&6
4423 fi
4424
4425
4426 if test -z "$ac_cv_prog_RANLIB"; then
4427 if test -n "$ac_tool_prefix"; then
4428   # Extract the first word of "ranlib", so it can be a program name with args.
4429 set dummy ranlib; ac_word=$2
4430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4431 echo "configure:4432: checking for $ac_word" >&5
4432 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   if test -n "$RANLIB"; then
4436   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4437 else
4438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4439   ac_dummy="$PATH"
4440   for ac_dir in $ac_dummy; do
4441     test -z "$ac_dir" && ac_dir=.
4442     if test -f $ac_dir/$ac_word; then
4443       ac_cv_prog_RANLIB="ranlib"
4444       break
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4449 fi
4450 fi
4451 RANLIB="$ac_cv_prog_RANLIB"
4452 if test -n "$RANLIB"; then
4453   echo "$ac_t""$RANLIB" 1>&6
4454 else
4455   echo "$ac_t""no" 1>&6
4456 fi
4457
4458 else
4459   RANLIB=":"
4460 fi
4461 fi
4462
4463 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4464 set dummy ${ac_tool_prefix}strip; ac_word=$2
4465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4466 echo "configure:4467: checking for $ac_word" >&5
4467 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4468   echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470   if test -n "$STRIP"; then
4471   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4472 else
4473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4474   ac_dummy="$PATH"
4475   for ac_dir in $ac_dummy; do
4476     test -z "$ac_dir" && ac_dir=.
4477     if test -f $ac_dir/$ac_word; then
4478       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4479       break
4480     fi
4481   done
4482   IFS="$ac_save_ifs"
4483 fi
4484 fi
4485 STRIP="$ac_cv_prog_STRIP"
4486 if test -n "$STRIP"; then
4487   echo "$ac_t""$STRIP" 1>&6
4488 else
4489   echo "$ac_t""no" 1>&6
4490 fi
4491
4492
4493 if test -z "$ac_cv_prog_STRIP"; then
4494 if test -n "$ac_tool_prefix"; then
4495   # Extract the first word of "strip", so it can be a program name with args.
4496 set dummy strip; ac_word=$2
4497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4498 echo "configure:4499: checking for $ac_word" >&5
4499 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4500   echo $ac_n "(cached) $ac_c" 1>&6
4501 else
4502   if test -n "$STRIP"; then
4503   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4504 else
4505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4506   ac_dummy="$PATH"
4507   for ac_dir in $ac_dummy; do
4508     test -z "$ac_dir" && ac_dir=.
4509     if test -f $ac_dir/$ac_word; then
4510       ac_cv_prog_STRIP="strip"
4511       break
4512     fi
4513   done
4514   IFS="$ac_save_ifs"
4515   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4516 fi
4517 fi
4518 STRIP="$ac_cv_prog_STRIP"
4519 if test -n "$STRIP"; then
4520   echo "$ac_t""$STRIP" 1>&6
4521 else
4522   echo "$ac_t""no" 1>&6
4523 fi
4524
4525 else
4526   STRIP=":"
4527 fi
4528 fi
4529
4530
4531 enable_dlopen=yes
4532 enable_win32_dll=yes
4533
4534 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4535 if test "${enable_libtool_lock+set}" = set; then
4536   enableval="$enable_libtool_lock"
4537   :
4538 fi
4539
4540 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4541
4542 # Some flags need to be propagated to the compiler or linker for good
4543 # libtool support.
4544 case $host in
4545 *-*-irix6*)
4546   # Find out which ABI we are using.
4547   echo '#line 4548 "configure"' > conftest.$ac_ext
4548   if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4549     case `/usr/bin/file conftest.$ac_objext` in
4550     *32-bit*)
4551       LD="${LD-ld} -32"
4552       ;;
4553     *N32*)
4554       LD="${LD-ld} -n32"
4555       ;;
4556     *64-bit*)
4557       LD="${LD-ld} -64"
4558       ;;
4559     esac
4560   fi
4561   rm -rf conftest*
4562   ;;
4563
4564 *-*-sco3.2v5*)
4565   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4566   SAVE_CFLAGS="$CFLAGS"
4567   CFLAGS="$CFLAGS -belf"
4568   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4569 echo "configure:4570: checking whether the C compiler needs -belf" >&5
4570 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4571   echo $ac_n "(cached) $ac_c" 1>&6
4572 else
4573   
4574      ac_ext=c
4575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4576 ac_cpp='$CPP $CPPFLAGS'
4577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4579 cross_compiling=$ac_cv_prog_cc_cross
4580
4581      cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584
4585 int main() {
4586
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   lt_cv_cc_needs_belf=yes
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   lt_cv_cc_needs_belf=no
4597 fi
4598 rm -f conftest*
4599      ac_ext=c
4600 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4601 ac_cpp='$CPP $CPPFLAGS'
4602 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4603 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4604 cross_compiling=$ac_cv_prog_cc_cross
4605
4606 fi
4607
4608 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4609   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4610     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4611     CFLAGS="$SAVE_CFLAGS"
4612   fi
4613   ;;
4614
4615 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4616   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4617 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4619 echo "configure:4620: checking for $ac_word" >&5
4620 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   if test -n "$DLLTOOL"; then
4624   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4625 else
4626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4627   ac_dummy="$PATH"
4628   for ac_dir in $ac_dummy; do
4629     test -z "$ac_dir" && ac_dir=.
4630     if test -f $ac_dir/$ac_word; then
4631       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4632       break
4633     fi
4634   done
4635   IFS="$ac_save_ifs"
4636 fi
4637 fi
4638 DLLTOOL="$ac_cv_prog_DLLTOOL"
4639 if test -n "$DLLTOOL"; then
4640   echo "$ac_t""$DLLTOOL" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645
4646 if test -z "$ac_cv_prog_DLLTOOL"; then
4647 if test -n "$ac_tool_prefix"; then
4648   # Extract the first word of "dlltool", so it can be a program name with args.
4649 set dummy dlltool; ac_word=$2
4650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4651 echo "configure:4652: checking for $ac_word" >&5
4652 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$DLLTOOL"; then
4656   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4657 else
4658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4659   ac_dummy="$PATH"
4660   for ac_dir in $ac_dummy; do
4661     test -z "$ac_dir" && ac_dir=.
4662     if test -f $ac_dir/$ac_word; then
4663       ac_cv_prog_DLLTOOL="dlltool"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4669 fi
4670 fi
4671 DLLTOOL="$ac_cv_prog_DLLTOOL"
4672 if test -n "$DLLTOOL"; then
4673   echo "$ac_t""$DLLTOOL" 1>&6
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 else
4679   DLLTOOL="false"
4680 fi
4681 fi
4682
4683   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4684 set dummy ${ac_tool_prefix}as; ac_word=$2
4685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4686 echo "configure:4687: checking for $ac_word" >&5
4687 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   if test -n "$AS"; then
4691   ac_cv_prog_AS="$AS" # Let the user override the test.
4692 else
4693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4694   ac_dummy="$PATH"
4695   for ac_dir in $ac_dummy; do
4696     test -z "$ac_dir" && ac_dir=.
4697     if test -f $ac_dir/$ac_word; then
4698       ac_cv_prog_AS="${ac_tool_prefix}as"
4699       break
4700     fi
4701   done
4702   IFS="$ac_save_ifs"
4703 fi
4704 fi
4705 AS="$ac_cv_prog_AS"
4706 if test -n "$AS"; then
4707   echo "$ac_t""$AS" 1>&6
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711
4712
4713 if test -z "$ac_cv_prog_AS"; then
4714 if test -n "$ac_tool_prefix"; then
4715   # Extract the first word of "as", so it can be a program name with args.
4716 set dummy as; ac_word=$2
4717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_word" >&5
4719 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   if test -n "$AS"; then
4723   ac_cv_prog_AS="$AS" # Let the user override the test.
4724 else
4725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4726   ac_dummy="$PATH"
4727   for ac_dir in $ac_dummy; do
4728     test -z "$ac_dir" && ac_dir=.
4729     if test -f $ac_dir/$ac_word; then
4730       ac_cv_prog_AS="as"
4731       break
4732     fi
4733   done
4734   IFS="$ac_save_ifs"
4735   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4736 fi
4737 fi
4738 AS="$ac_cv_prog_AS"
4739 if test -n "$AS"; then
4740   echo "$ac_t""$AS" 1>&6
4741 else
4742   echo "$ac_t""no" 1>&6
4743 fi
4744
4745 else
4746   AS="false"
4747 fi
4748 fi
4749
4750   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4751 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4752 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4753 echo "configure:4754: checking for $ac_word" >&5
4754 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4755   echo $ac_n "(cached) $ac_c" 1>&6
4756 else
4757   if test -n "$OBJDUMP"; then
4758   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4759 else
4760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4761   ac_dummy="$PATH"
4762   for ac_dir in $ac_dummy; do
4763     test -z "$ac_dir" && ac_dir=.
4764     if test -f $ac_dir/$ac_word; then
4765       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4766       break
4767     fi
4768   done
4769   IFS="$ac_save_ifs"
4770 fi
4771 fi
4772 OBJDUMP="$ac_cv_prog_OBJDUMP"
4773 if test -n "$OBJDUMP"; then
4774   echo "$ac_t""$OBJDUMP" 1>&6
4775 else
4776   echo "$ac_t""no" 1>&6
4777 fi
4778
4779
4780 if test -z "$ac_cv_prog_OBJDUMP"; then
4781 if test -n "$ac_tool_prefix"; then
4782   # Extract the first word of "objdump", so it can be a program name with args.
4783 set dummy objdump; ac_word=$2
4784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4785 echo "configure:4786: checking for $ac_word" >&5
4786 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   if test -n "$OBJDUMP"; then
4790   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4791 else
4792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4793   ac_dummy="$PATH"
4794   for ac_dir in $ac_dummy; do
4795     test -z "$ac_dir" && ac_dir=.
4796     if test -f $ac_dir/$ac_word; then
4797       ac_cv_prog_OBJDUMP="objdump"
4798       break
4799     fi
4800   done
4801   IFS="$ac_save_ifs"
4802   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4803 fi
4804 fi
4805 OBJDUMP="$ac_cv_prog_OBJDUMP"
4806 if test -n "$OBJDUMP"; then
4807   echo "$ac_t""$OBJDUMP" 1>&6
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811
4812 else
4813   OBJDUMP="false"
4814 fi
4815 fi
4816
4817
4818   # recent cygwin and mingw systems supply a stub DllMain which the user
4819   # can override, but on older systems we have to supply one
4820   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4821 echo "configure:4822: checking if libtool should supply DllMain function" >&5
4822 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828
4829 int main() {
4830 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4831       DllMain (0, 0, 0);
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4835   rm -rf conftest*
4836   lt_cv_need_dllmain=no
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   lt_cv_need_dllmain=yes
4842 fi
4843 rm -f conftest*
4844 fi
4845
4846 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4847
4848   case $host/$CC in
4849   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4850     # old mingw systems require "-dll" to link a DLL, while more recent ones
4851     # require "-mdll"
4852     SAVE_CFLAGS="$CFLAGS"
4853     CFLAGS="$CFLAGS -mdll"
4854     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4855 echo "configure:4856: checking how to link DLLs" >&5
4856 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862
4863 int main() {
4864
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868   rm -rf conftest*
4869   lt_cv_cc_dll_switch=-mdll
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   lt_cv_cc_dll_switch=-dll
4875 fi
4876 rm -f conftest*
4877 fi
4878
4879 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4880     CFLAGS="$SAVE_CFLAGS" ;;
4881   *-*-cygwin* | *-*-pw32*)
4882     # cygwin systems need to pass --dll to the linker, and not link
4883     # crt.o which will require a WinMain@16 definition.
4884     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4885   esac
4886   ;;
4887   
4888 esac
4889
4890 # Sed substitution that helps us do robust quoting.  It backslashifies
4891 # metacharacters that are still active within double-quoted strings.
4892 Xsed='sed -e s/^X//'
4893 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4894
4895 # Same as above, but do not quote variable references.
4896 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4897
4898 # Sed substitution to delay expansion of an escaped shell variable in a
4899 # double_quote_subst'ed string.
4900 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4901
4902 # Constants:
4903 rm="rm -f"
4904
4905 # Global variables:
4906 default_ofile=libtool
4907 can_build_shared=yes
4908
4909 # All known linkers require a `.a' archive for static linking (except M$VC,
4910 # which needs '.lib').
4911 libext=a
4912 ltmain="$ac_aux_dir/ltmain.sh"
4913 ofile="$default_ofile"
4914 with_gnu_ld="$lt_cv_prog_gnu_ld"
4915 need_locks="$enable_libtool_lock"
4916
4917 old_CC="$CC"
4918 old_CFLAGS="$CFLAGS"
4919
4920 # Set sane defaults for various variables
4921 test -z "$AR" && AR=ar
4922 test -z "$AR_FLAGS" && AR_FLAGS=cru
4923 test -z "$AS" && AS=as
4924 test -z "$CC" && CC=cc
4925 test -z "$DLLTOOL" && DLLTOOL=dlltool
4926 test -z "$LD" && LD=ld
4927 test -z "$LN_S" && LN_S="ln -s"
4928 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4929 test -z "$NM" && NM=nm
4930 test -z "$OBJDUMP" && OBJDUMP=objdump
4931 test -z "$RANLIB" && RANLIB=:
4932 test -z "$STRIP" && STRIP=:
4933 test -z "$ac_objext" && ac_objext=o
4934
4935 if test x"$host" != x"$build"; then
4936   ac_tool_prefix=${host_alias}-
4937 else
4938   ac_tool_prefix=
4939 fi
4940
4941 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4942 case $host_os in
4943 linux-gnu*) ;;
4944 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4945 esac
4946
4947 case $host_os in
4948 aix3*)
4949   # AIX sometimes has problems with the GCC collect2 program.  For some
4950   # reason, if we set the COLLECT_NAMES environment variable, the problems
4951   # vanish in a puff of smoke.
4952   if test "X${COLLECT_NAMES+set}" != Xset; then
4953     COLLECT_NAMES=
4954     export COLLECT_NAMES
4955   fi
4956   ;;
4957 esac
4958
4959 # Determine commands to create old-style static archives.
4960 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4961 old_postinstall_cmds='chmod 644 $oldlib'
4962 old_postuninstall_cmds=
4963
4964 if test -n "$RANLIB"; then
4965   case $host_os in
4966   openbsd*)
4967     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4968     ;;
4969   *)
4970     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4971     ;;
4972   esac
4973   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4974 fi
4975
4976 # Allow CC to be a program name with arguments.
4977 set dummy $CC
4978 compiler="$2"
4979
4980 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4981 echo "configure:4982: checking for objdir" >&5
4982 rm -f .libs 2>/dev/null
4983 mkdir .libs 2>/dev/null
4984 if test -d .libs; then
4985   objdir=.libs
4986 else
4987   # MS-DOS does not allow filenames that begin with a dot.
4988   objdir=_libs
4989 fi
4990 rmdir .libs 2>/dev/null
4991 echo "$ac_t""$objdir" 1>&6
4992
4993
4994 # Check whether --with-pic or --without-pic was given.
4995 if test "${with_pic+set}" = set; then
4996   withval="$with_pic"
4997   pic_mode="$withval"
4998 else
4999   pic_mode=default
5000 fi
5001
5002 test -z "$pic_mode" && pic_mode=default
5003
5004 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5005 # in isolation, and that seeing it set (from the cache) indicates that
5006 # the associated values are set (in the cache) correctly too.
5007 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5008 echo "configure:5009: checking for $compiler option to produce PIC" >&5
5009 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012    lt_cv_prog_cc_pic=
5013   lt_cv_prog_cc_shlib=
5014   lt_cv_prog_cc_wl=
5015   lt_cv_prog_cc_static=
5016   lt_cv_prog_cc_no_builtin=
5017   lt_cv_prog_cc_can_build_shared=$can_build_shared
5018
5019   if test "$GCC" = yes; then
5020     lt_cv_prog_cc_wl='-Wl,'
5021     lt_cv_prog_cc_static='-static'
5022
5023     case $host_os in
5024     aix*)
5025       # Below there is a dirty hack to force normal static linking with -ldl
5026       # The problem is because libdl dynamically linked with both libc and
5027       # libC (AIX C++ library), which obviously doesn't included in libraries
5028       # list by gcc. This cause undefined symbols with -static flags.
5029       # This hack allows C programs to be linked with "-static -ldl", but
5030       # not sure about C++ programs.
5031       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5032       ;;
5033     amigaos*)
5034       # FIXME: we need at least 68020 code to build shared libraries, but
5035       # adding the `-m68020' flag to GCC prevents building anything better,
5036       # like `-m68040'.
5037       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5038       ;;
5039     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5040       # PIC is the default for these OSes.
5041       ;;
5042     darwin* | rhapsody*)
5043       # PIC is the default on this platform
5044       # Common symbols not allowed in MH_DYLIB files
5045       lt_cv_prog_cc_pic='-fno-common'
5046       ;;
5047     cygwin* | mingw* | pw32* | os2*)
5048       # This hack is so that the source file can tell whether it is being
5049       # built for inclusion in a dll (and should export symbols for example).
5050       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5051       ;;
5052     sysv4*MP*)
5053       if test -d /usr/nec; then
5054          lt_cv_prog_cc_pic=-Kconform_pic
5055       fi
5056       ;;
5057     *)
5058       lt_cv_prog_cc_pic='-fPIC'
5059       ;;
5060     esac
5061   else
5062     # PORTME Check for PIC flags for the system compiler.
5063     case $host_os in
5064     aix3* | aix4* | aix5*)
5065       lt_cv_prog_cc_wl='-Wl,'
5066       # All AIX code is PIC.
5067       if test "$host_cpu" = ia64; then
5068         # AIX 5 now supports IA64 processor
5069         lt_cv_prog_cc_static='-Bstatic'
5070       else
5071         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5072       fi
5073       ;;
5074
5075     hpux9* | hpux10* | hpux11*)
5076       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5077       lt_cv_prog_cc_wl='-Wl,'
5078       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5079       lt_cv_prog_cc_pic='+Z'
5080       ;;
5081
5082     irix5* | irix6* | nonstopux*)
5083       lt_cv_prog_cc_wl='-Wl,'
5084       lt_cv_prog_cc_static='-non_shared'
5085       # PIC (with -KPIC) is the default.
5086       ;;
5087
5088     cygwin* | mingw* | pw32* | os2*)
5089       # This hack is so that the source file can tell whether it is being
5090       # built for inclusion in a dll (and should export symbols for example).
5091       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5092       ;;
5093
5094     newsos6)
5095       lt_cv_prog_cc_pic='-KPIC'
5096       lt_cv_prog_cc_static='-Bstatic'
5097       ;;
5098
5099     osf3* | osf4* | osf5*)
5100       # All OSF/1 code is PIC.
5101       lt_cv_prog_cc_wl='-Wl,'
5102       lt_cv_prog_cc_static='-non_shared'
5103       ;;
5104
5105     sco3.2v5*)
5106       lt_cv_prog_cc_pic='-Kpic'
5107       lt_cv_prog_cc_static='-dn'
5108       lt_cv_prog_cc_shlib='-belf'
5109       ;;
5110
5111     solaris*)
5112       lt_cv_prog_cc_pic='-KPIC'
5113       lt_cv_prog_cc_static='-Bstatic'
5114       lt_cv_prog_cc_wl='-Wl,'
5115       ;;
5116
5117     sunos4*)
5118       lt_cv_prog_cc_pic='-PIC'
5119       lt_cv_prog_cc_static='-Bstatic'
5120       lt_cv_prog_cc_wl='-Qoption ld '
5121       ;;
5122
5123     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5124       lt_cv_prog_cc_pic='-KPIC'
5125       lt_cv_prog_cc_static='-Bstatic'
5126       lt_cv_prog_cc_wl='-Wl,'
5127       ;;
5128
5129     uts4*)
5130       lt_cv_prog_cc_pic='-pic'
5131       lt_cv_prog_cc_static='-Bstatic'
5132       ;;
5133
5134     sysv4*MP*)
5135       if test -d /usr/nec ;then
5136         lt_cv_prog_cc_pic='-Kconform_pic'
5137         lt_cv_prog_cc_static='-Bstatic'
5138       fi
5139       ;;
5140
5141     *)
5142       lt_cv_prog_cc_can_build_shared=no
5143       ;;
5144     esac
5145   fi
5146
5147 fi
5148
5149 if test -z "$lt_cv_prog_cc_pic"; then
5150   echo "$ac_t""none" 1>&6
5151 else
5152   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5153
5154   # Check to make sure the pic_flag actually works.
5155   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5156 echo "configure:5157: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5157   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5158   echo $ac_n "(cached) $ac_c" 1>&6
5159 else
5160       save_CFLAGS="$CFLAGS"
5161     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5162     cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165
5166 int main() {
5167
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5171   rm -rf conftest*
5172         case $host_os in
5173       hpux9* | hpux10* | hpux11*)
5174         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5175         # they create non-PIC objects.  So, if there were any warnings, we
5176         # assume that PIC is not supported.
5177         if test -s conftest.err; then
5178           lt_cv_prog_cc_pic_works=no
5179         else
5180           lt_cv_prog_cc_pic_works=yes
5181         fi
5182         ;;
5183       *)
5184         lt_cv_prog_cc_pic_works=yes
5185         ;;
5186       esac
5187     
5188 else
5189   echo "configure: failed program was:" >&5
5190   cat conftest.$ac_ext >&5
5191   rm -rf conftest*
5192         lt_cv_prog_cc_pic_works=no
5193     
5194 fi
5195 rm -f conftest*
5196     CFLAGS="$save_CFLAGS"
5197   
5198 fi
5199
5200
5201   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5202     lt_cv_prog_cc_pic=
5203     lt_cv_prog_cc_can_build_shared=no
5204   else
5205     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5206   fi
5207
5208   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5209 fi
5210
5211 # Check for any special shared library compilation flags.
5212 if test -n "$lt_cv_prog_cc_shlib"; then
5213   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5214   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5215   else
5216    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5217     lt_cv_prog_cc_can_build_shared=no
5218   fi
5219 fi
5220
5221 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5222 echo "configure:5223: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5223 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5224   echo $ac_n "(cached) $ac_c" 1>&6
5225 else
5226     lt_cv_prog_cc_static_works=no
5227   save_LDFLAGS="$LDFLAGS"
5228   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5229   cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232
5233 int main() {
5234
5235 ; return 0; }
5236 EOF
5237 if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5238   rm -rf conftest*
5239   lt_cv_prog_cc_static_works=yes
5240 else
5241   echo "configure: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243 fi
5244 rm -f conftest*
5245   LDFLAGS="$save_LDFLAGS"
5246
5247 fi
5248
5249
5250 # Belt *and* braces to stop my trousers falling down:
5251 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5252 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5253
5254 pic_flag="$lt_cv_prog_cc_pic"
5255 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5256 wl="$lt_cv_prog_cc_wl"
5257 link_static_flag="$lt_cv_prog_cc_static"
5258 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5259 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5260
5261
5262 # Check to see if options -o and -c are simultaneously supported by compiler
5263 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5264 echo "configure:5265: checking if $compiler supports -c -o file.$ac_objext" >&5
5265 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5266   echo $ac_n "(cached) $ac_c" 1>&6
5267 else
5268   
5269 $rm -r conftest 2>/dev/null
5270 mkdir conftest
5271 cd conftest
5272 echo "int some_variable = 0;" > conftest.$ac_ext
5273 mkdir out
5274 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5275 # that will create temporary files in the current directory regardless of
5276 # the output directory.  Thus, making CWD read-only will cause this test
5277 # to fail, enabling locking or at least warning the user not to do parallel
5278 # builds.
5279 chmod -w .
5280 save_CFLAGS="$CFLAGS"
5281 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5282 compiler_c_o=no
5283 if { (eval echo configure:5284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5284   # The compiler can only warn and ignore the option if not recognized
5285   # So say no if there are warnings
5286   if test -s out/conftest.err; then
5287     lt_cv_compiler_c_o=no
5288   else
5289     lt_cv_compiler_c_o=yes
5290   fi
5291 else
5292   # Append any errors to the config.log.
5293   cat out/conftest.err 1>&5
5294   lt_cv_compiler_c_o=no
5295 fi
5296 CFLAGS="$save_CFLAGS"
5297 chmod u+w .
5298 $rm conftest* out/*
5299 rmdir out
5300 cd ..
5301 rmdir conftest
5302 $rm -r conftest 2>/dev/null
5303
5304 fi
5305
5306 compiler_c_o=$lt_cv_compiler_c_o
5307 echo "$ac_t""$compiler_c_o" 1>&6
5308
5309 if test x"$compiler_c_o" = x"yes"; then
5310   # Check to see if we can write to a .lo
5311   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5312 echo "configure:5313: checking if $compiler supports -c -o file.lo" >&5
5313   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5314   echo $ac_n "(cached) $ac_c" 1>&6
5315 else
5316   
5317   lt_cv_compiler_o_lo=no
5318   save_CFLAGS="$CFLAGS"
5319   CFLAGS="$CFLAGS -c -o conftest.lo"
5320   save_objext="$ac_objext"
5321   ac_objext=lo
5322   cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325
5326 int main() {
5327 int some_variable = 0;
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5331   rm -rf conftest*
5332       # The compiler can only warn and ignore the option if not recognized
5333     # So say no if there are warnings
5334     if test -s conftest.err; then
5335       lt_cv_compiler_o_lo=no
5336     else
5337       lt_cv_compiler_o_lo=yes
5338     fi
5339   
5340 else
5341   echo "configure: failed program was:" >&5
5342   cat conftest.$ac_ext >&5
5343 fi
5344 rm -f conftest*
5345   ac_objext="$save_objext"
5346   CFLAGS="$save_CFLAGS"
5347   
5348 fi
5349
5350   compiler_o_lo=$lt_cv_compiler_o_lo
5351   echo "$ac_t""$compiler_o_lo" 1>&6
5352 else
5353   compiler_o_lo=no
5354 fi
5355
5356 # Check to see if we can do hard links to lock some files if needed
5357 hard_links="nottested"
5358 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5359   # do not overwrite the value of need_locks provided by the user
5360   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5361 echo "configure:5362: checking if we can lock with hard links" >&5
5362   hard_links=yes
5363   $rm conftest*
5364   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5365   touch conftest.a
5366   ln conftest.a conftest.b 2>&5 || hard_links=no
5367   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5368   echo "$ac_t""$hard_links" 1>&6
5369   if test "$hard_links" = no; then
5370     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5371     need_locks=warn
5372   fi
5373 else
5374   need_locks=no
5375 fi
5376
5377 if test "$GCC" = yes; then
5378   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5379   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5380 echo "configure:5381: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5381   echo "int some_variable = 0;" > conftest.$ac_ext
5382   save_CFLAGS="$CFLAGS"
5383   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5384   compiler_rtti_exceptions=no
5385   cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388
5389 int main() {
5390 int some_variable = 0;
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5394   rm -rf conftest*
5395       # The compiler can only warn and ignore the option if not recognized
5396     # So say no if there are warnings
5397     if test -s conftest.err; then
5398       compiler_rtti_exceptions=no
5399     else
5400       compiler_rtti_exceptions=yes
5401     fi
5402   
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406 fi
5407 rm -f conftest*
5408   CFLAGS="$save_CFLAGS"
5409   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5410
5411   if test "$compiler_rtti_exceptions" = "yes"; then
5412     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5413   else
5414     no_builtin_flag=' -fno-builtin'
5415   fi
5416 fi
5417
5418 # See if the linker supports building shared libraries.
5419 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5420 echo "configure:5421: checking whether the linker ($LD) supports shared libraries" >&5
5421
5422 allow_undefined_flag=
5423 no_undefined_flag=
5424 need_lib_prefix=unknown
5425 need_version=unknown
5426 # when you set need_version to no, make sure it does not cause -set_version
5427 # flags to be left without arguments
5428 archive_cmds=
5429 archive_expsym_cmds=
5430 old_archive_from_new_cmds=
5431 old_archive_from_expsyms_cmds=
5432 export_dynamic_flag_spec=
5433 whole_archive_flag_spec=
5434 thread_safe_flag_spec=
5435 hardcode_into_libs=no
5436 hardcode_libdir_flag_spec=
5437 hardcode_libdir_separator=
5438 hardcode_direct=no
5439 hardcode_minus_L=no
5440 hardcode_shlibpath_var=unsupported
5441 runpath_var=
5442 link_all_deplibs=unknown
5443 always_export_symbols=no
5444 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5445 # include_expsyms should be a list of space-separated symbols to be *always*
5446 # included in the symbol list
5447 include_expsyms=
5448 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5449 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5450 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5451 # as well as any symbol that contains `d'.
5452 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5453 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5454 # platforms (ab)use it in PIC code, but their linkers get confused if
5455 # the symbol is explicitly referenced.  Since portable code cannot
5456 # rely on this symbol name, it's probably fine to never include it in
5457 # preloaded symbol tables.
5458 extract_expsyms_cmds=
5459
5460 case $host_os in
5461 cygwin* | mingw* | pw32*)
5462   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5463   # When not using gcc, we currently assume that we are using
5464   # Microsoft Visual C++.
5465   if test "$GCC" != yes; then
5466     with_gnu_ld=no
5467   fi
5468   ;;
5469 openbsd*)
5470   with_gnu_ld=no
5471   ;;
5472 esac
5473
5474 ld_shlibs=yes
5475 if test "$with_gnu_ld" = yes; then
5476   # If archive_cmds runs LD, not CC, wlarc should be empty
5477   wlarc='${wl}'
5478
5479   # See if GNU ld supports shared libraries.
5480   case $host_os in
5481   aix3* | aix4* | aix5*)
5482     # On AIX, the GNU linker is very broken
5483     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5484     ld_shlibs=no
5485     cat <<EOF 1>&2
5486
5487 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5488 *** to be unable to reliably create shared libraries on AIX.
5489 *** Therefore, libtool is disabling shared libraries support.  If you
5490 *** really care for shared libraries, you may want to modify your PATH
5491 *** so that a non-GNU linker is found, and then restart.
5492
5493 EOF
5494     ;;
5495
5496   amigaos*)
5497     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)'
5498     hardcode_libdir_flag_spec='-L$libdir'
5499     hardcode_minus_L=yes
5500
5501     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5502     # that the semantics of dynamic libraries on AmigaOS, at least up
5503     # to version 4, is to share data among multiple programs linked
5504     # with the same dynamic library.  Since this doesn't match the
5505     # behavior of shared libraries on other platforms, we can use
5506     # them.
5507     ld_shlibs=no
5508     ;;
5509
5510   beos*)
5511     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5512       allow_undefined_flag=unsupported
5513       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5514       # support --undefined.  This deserves some investigation.  FIXME
5515       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5516     else
5517       ld_shlibs=no
5518     fi
5519     ;;
5520
5521   cygwin* | mingw* | pw32*)
5522     # hardcode_libdir_flag_spec is actually meaningless, as there is
5523     # no search path for DLLs.
5524     hardcode_libdir_flag_spec='-L$libdir'
5525     allow_undefined_flag=unsupported
5526     always_export_symbols=yes
5527
5528     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5529       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5530       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5531       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5532       else $CC -o impgen impgen.c ; fi)~
5533       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5534
5535     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5536
5537     # cygwin and mingw dlls have different entry points and sets of symbols
5538     # to exclude.
5539     # FIXME: what about values for MSVC?
5540     dll_entry=__cygwin_dll_entry@12
5541     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5542     case $host_os in
5543     mingw*)
5544       # mingw values
5545       dll_entry=_DllMainCRTStartup@12
5546       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5547       ;;
5548     esac
5549
5550     # mingw and cygwin differ, and it's simplest to just exclude the union
5551     # of the two symbol sets.
5552     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5553
5554     # recent cygwin and mingw systems supply a stub DllMain which the user
5555     # can override, but on older systems we have to supply one (in ltdll.c)
5556     if test "x$lt_cv_need_dllmain" = "xyes"; then
5557       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5558       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~
5559         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5560     else
5561       ltdll_obj=
5562       ltdll_cmds=
5563     fi
5564
5565     # Extract the symbol export list from an `--export-all' def file,
5566     # then regenerate the def file from the symbol export list, so that
5567     # the compiled dll only exports the symbol export list.
5568     # Be careful not to strip the DATA tag left be newer dlltools.
5569     export_symbols_cmds="$ltdll_cmds"'
5570       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5571       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5572
5573     # If the export-symbols file already is a .def file (1st line
5574     # is EXPORTS), use it as is.
5575     # If DATA tags from a recent dlltool are present, honour them!
5576     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5577         cp $export_symbols $output_objdir/$soname-def;
5578       else
5579         echo EXPORTS > $output_objdir/$soname-def;
5580         _lt_hint=1;
5581         cat $export_symbols | while read symbol; do
5582          set dummy \$symbol;
5583          case \$# in
5584            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5585            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5586            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5587          esac;
5588          _lt_hint=`expr 1 + \$_lt_hint`;
5589         done;
5590       fi~
5591       '"$ltdll_cmds"'
5592       $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~
5593       $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~
5594       $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~
5595       $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~
5596       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5597     ;;
5598
5599   netbsd*)
5600     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5601       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5602       wlarc=
5603     else
5604       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5605       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5606     fi
5607     ;;
5608
5609   solaris* | sysv5*)
5610     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5611       ld_shlibs=no
5612       cat <<EOF 1>&2
5613
5614 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5615 *** create shared libraries on Solaris systems.  Therefore, libtool
5616 *** is disabling shared libraries support.  We urge you to upgrade GNU
5617 *** binutils to release 2.9.1 or newer.  Another option is to modify
5618 *** your PATH or compiler configuration so that the native linker is
5619 *** used, and then restart.
5620
5621 EOF
5622     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5623       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5624       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5625     else
5626       ld_shlibs=no
5627     fi
5628     ;;
5629
5630   sunos4*)
5631     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5632     wlarc=
5633     hardcode_direct=yes
5634     hardcode_shlibpath_var=no
5635     ;;
5636
5637   *)
5638     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5639       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5641     else
5642       ld_shlibs=no
5643     fi
5644     ;;
5645   esac
5646
5647   if test "$ld_shlibs" = yes; then
5648     runpath_var=LD_RUN_PATH
5649     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5650     export_dynamic_flag_spec='${wl}--export-dynamic'
5651     case $host_os in
5652     cygwin* | mingw* | pw32*)
5653       # dlltool doesn't understand --whole-archive et. al.
5654       whole_archive_flag_spec=
5655       ;;
5656     *)
5657       # ancient GNU ld didn't support --whole-archive et. al.
5658       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5659         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5660       else
5661         whole_archive_flag_spec=
5662       fi
5663       ;;
5664     esac
5665   fi
5666 else
5667   # PORTME fill in a description of your system's linker (not GNU ld)
5668   case $host_os in
5669   aix3*)
5670     allow_undefined_flag=unsupported
5671     always_export_symbols=yes
5672     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'
5673     # Note: this linker hardcodes the directories in LIBPATH if there
5674     # are no directories specified by -L.
5675     hardcode_minus_L=yes
5676     if test "$GCC" = yes && test -z "$link_static_flag"; then
5677       # Neither direct hardcoding nor static linking is supported with a
5678       # broken collect2.
5679       hardcode_direct=unsupported
5680     fi
5681     ;;
5682
5683   aix4* | aix5*)
5684     if test "$host_cpu" = ia64; then
5685       # On IA64, the linker does run time linking by default, so we don't
5686       # have to do anything special.
5687       aix_use_runtimelinking=no
5688       exp_sym_flag='-Bexport'
5689       no_entry_flag=""
5690     else
5691       aix_use_runtimelinking=no
5692
5693       # Test if we are trying to use run time linking or normal
5694       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5695       # need to do runtime linking.
5696       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5697         for ld_flag in $LDFLAGS; do
5698           case $ld_flag in
5699           *-brtl*)
5700             aix_use_runtimelinking=yes
5701             break
5702           ;;
5703           esac
5704         done
5705       esac
5706
5707       exp_sym_flag='-bexport'
5708       no_entry_flag='-bnoentry'
5709     fi
5710
5711     # When large executables or shared objects are built, AIX ld can
5712     # have problems creating the table of contents.  If linking a library
5713     # or program results in "error TOC overflow" add -mminimal-toc to
5714     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5715     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5716
5717     hardcode_direct=yes
5718     archive_cmds=''
5719     hardcode_libdir_separator=':'
5720     if test "$GCC" = yes; then
5721       case $host_os in aix4.[012]|aix4.[012].*)
5722         collect2name=`${CC} -print-prog-name=collect2`
5723         if test -f "$collect2name" && \
5724           strings "$collect2name" | grep resolve_lib_name >/dev/null
5725         then
5726           # We have reworked collect2
5727           hardcode_direct=yes
5728         else
5729           # We have old collect2
5730           hardcode_direct=unsupported
5731           # It fails to find uninstalled libraries when the uninstalled
5732           # path is not listed in the libpath.  Setting hardcode_minus_L
5733           # to unsupported forces relinking
5734           hardcode_minus_L=yes
5735           hardcode_libdir_flag_spec='-L$libdir'
5736           hardcode_libdir_separator=
5737         fi
5738       esac
5739
5740       shared_flag='-shared'
5741     else
5742       # not using gcc
5743       if test "$host_cpu" = ia64; then
5744         shared_flag='${wl}-G'
5745       else
5746         if test "$aix_use_runtimelinking" = yes; then
5747           shared_flag='${wl}-G'
5748         else
5749           shared_flag='${wl}-bM:SRE'
5750         fi
5751       fi
5752     fi
5753
5754     # It seems that -bexpall can do strange things, so it is better to
5755     # generate a list of symbols to export.
5756     always_export_symbols=yes
5757     if test "$aix_use_runtimelinking" = yes; then
5758       # Warning - without using the other runtime loading flags (-brtl),
5759       # -berok will link without error, but may produce a broken library.
5760       allow_undefined_flag='-berok'
5761       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5762       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"
5763     else
5764       if test "$host_cpu" = ia64; then
5765         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5766         allow_undefined_flag="-z nodefs"
5767         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"
5768       else
5769         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5770         # Warning - without using the other run time loading flags,
5771         # -berok will link without error, but may produce a broken library.
5772         allow_undefined_flag='${wl}-berok'
5773         # This is a bit strange, but is similar to how AIX traditionally builds
5774         # it's shared libraries.
5775         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'
5776       fi
5777     fi
5778     ;;
5779
5780   amigaos*)
5781     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)'
5782     hardcode_libdir_flag_spec='-L$libdir'
5783     hardcode_minus_L=yes
5784     # see comment about different semantics on the GNU ld section
5785     ld_shlibs=no
5786     ;;
5787
5788   cygwin* | mingw* | pw32*)
5789     # When not using gcc, we currently assume that we are using
5790     # Microsoft Visual C++.
5791     # hardcode_libdir_flag_spec is actually meaningless, as there is
5792     # no search path for DLLs.
5793     hardcode_libdir_flag_spec=' '
5794     allow_undefined_flag=unsupported
5795     # Tell ltmain to make .lib files, not .a files.
5796     libext=lib
5797     # FIXME: Setting linknames here is a bad hack.
5798     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5799     # The linker will automatically build a .lib file if we build a DLL.
5800     old_archive_from_new_cmds='true'
5801     # FIXME: Should let the user specify the lib program.
5802     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5803     fix_srcfile_path='`cygpath -w "$srcfile"`'
5804     ;;
5805
5806   darwin* | rhapsody*)
5807     case "$host_os" in
5808     rhapsody* | darwin1.[012])
5809       allow_undefined_flag='-undefined suppress'
5810       ;;
5811     *) # Darwin 1.3 on
5812       allow_undefined_flag='-flat_namespace -undefined suppress'
5813       ;;
5814     esac
5815     # FIXME: Relying on posixy $() will cause problems for
5816     #        cross-compilation, but unfortunately the echo tests do not
5817     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5818     #        `"' quotes if we put them in here... so don't!
5819     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)'
5820     # We need to add '_' to the symbols in $export_symbols first
5821     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5822     hardcode_direct=yes
5823     hardcode_shlibpath_var=no
5824     whole_archive_flag_spec='-all_load $convenience'
5825     ;;
5826
5827   freebsd1*)
5828     ld_shlibs=no
5829     ;;
5830
5831   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5832   # support.  Future versions do this automatically, but an explicit c++rt0.o
5833   # does not break anything, and helps significantly (at the cost of a little
5834   # extra space).
5835   freebsd2.2*)
5836     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5837     hardcode_libdir_flag_spec='-R$libdir'
5838     hardcode_direct=yes
5839     hardcode_shlibpath_var=no
5840     ;;
5841
5842   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5843   freebsd2*)
5844     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5845     hardcode_direct=yes
5846     hardcode_minus_L=yes
5847     hardcode_shlibpath_var=no
5848     ;;
5849
5850   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5851   freebsd*)
5852     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5853     hardcode_libdir_flag_spec='-R$libdir'
5854     hardcode_direct=yes
5855     hardcode_shlibpath_var=no
5856     ;;
5857
5858   hpux9* | hpux10* | hpux11*)
5859     case $host_os in
5860     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' ;;
5861     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5862     esac
5863     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5864     hardcode_libdir_separator=:
5865     hardcode_direct=yes
5866     hardcode_minus_L=yes # Not in the search PATH, but as the default
5867                          # location of the library.
5868     export_dynamic_flag_spec='${wl}-E'
5869     ;;
5870
5871   irix5* | irix6* | nonstopux*)
5872     if test "$GCC" = yes; then
5873       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'
5874       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5875     else
5876       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'
5877       hardcode_libdir_flag_spec='-rpath $libdir'
5878     fi
5879     hardcode_libdir_separator=:
5880     link_all_deplibs=yes
5881     ;;
5882
5883   netbsd*)
5884     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5885       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5886     else
5887       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5888     fi
5889     hardcode_libdir_flag_spec='-R$libdir'
5890     hardcode_direct=yes
5891     hardcode_shlibpath_var=no
5892     ;;
5893
5894   newsos6)
5895     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5896     hardcode_direct=yes
5897     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5898     hardcode_libdir_separator=:
5899     hardcode_shlibpath_var=no
5900     ;;
5901
5902   openbsd*)
5903     hardcode_direct=yes
5904     hardcode_shlibpath_var=no
5905     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5906       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5907       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5908       export_dynamic_flag_spec='${wl}-E'
5909     else
5910       case "$host_os" in
5911       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5912         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5913         hardcode_libdir_flag_spec='-R$libdir'
5914         ;;
5915       *)
5916         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5917         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5918         ;;
5919       esac
5920     fi
5921     ;;
5922
5923   os2*)
5924     hardcode_libdir_flag_spec='-L$libdir'
5925     hardcode_minus_L=yes
5926     allow_undefined_flag=unsupported
5927     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'
5928     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5929     ;;
5930
5931   osf3*)
5932     if test "$GCC" = yes; then
5933       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5934       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'
5935     else
5936       allow_undefined_flag=' -expect_unresolved \*'
5937       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'
5938     fi
5939     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5940     hardcode_libdir_separator=:
5941     ;;
5942
5943   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5944     if test "$GCC" = yes; then
5945       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5946       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'
5947       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5948     else
5949       allow_undefined_flag=' -expect_unresolved \*'
5950       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'
5951       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5952       $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'
5953
5954       #Both c and cxx compiler support -rpath directly
5955       hardcode_libdir_flag_spec='-rpath $libdir'
5956     fi
5957     hardcode_libdir_separator=:
5958     ;;
5959
5960   sco3.2v5*)
5961     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5962     hardcode_shlibpath_var=no
5963     runpath_var=LD_RUN_PATH
5964     hardcode_runpath_var=yes
5965     export_dynamic_flag_spec='${wl}-Bexport'
5966     ;;
5967
5968   solaris*)
5969     # gcc --version < 3.0 without binutils cannot create self contained
5970     # shared libraries reliably, requiring libgcc.a to resolve some of
5971     # the object symbols generated in some cases.  Libraries that use
5972     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5973     # a copy of libgcc.a into every shared library to guarantee resolving
5974     # such symbols causes other problems:  According to Tim Van Holder
5975     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5976     # (to the application) exception stack for one thing.
5977     no_undefined_flag=' -z defs'
5978     if test "$GCC" = yes; then
5979       case `$CC --version 2>/dev/null` in
5980       [12].*)
5981         cat <<EOF 1>&2
5982
5983 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5984 *** create self contained shared libraries on Solaris systems, without
5985 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5986 *** -no-undefined support, which will at least allow you to build shared
5987 *** libraries.  However, you may find that when you link such libraries
5988 *** into an application without using GCC, you have to manually add
5989 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5990 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5991 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5992
5993 EOF
5994         no_undefined_flag=
5995         ;;
5996       esac
5997     fi
5998     # $CC -shared without GNU ld will not create a library from C++
5999     # object files and a static libstdc++, better avoid it by now
6000     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6002                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6003     hardcode_libdir_flag_spec='-R$libdir'
6004     hardcode_shlibpath_var=no
6005     case $host_os in
6006     solaris2.[0-5] | solaris2.[0-5].*) ;;
6007     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6008       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6009     esac
6010     link_all_deplibs=yes
6011     ;;
6012
6013   sunos4*)
6014     if test "x$host_vendor" = xsequent; then
6015       # Use $CC to link under sequent, because it throws in some extra .o
6016       # files that make .init and .fini sections work.
6017       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6018     else
6019       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6020     fi
6021     hardcode_libdir_flag_spec='-L$libdir'
6022     hardcode_direct=yes
6023     hardcode_minus_L=yes
6024     hardcode_shlibpath_var=no
6025     ;;
6026
6027   sysv4)
6028     case $host_vendor in
6029       sni)
6030         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6031         hardcode_direct=yes # is this really true???
6032         ;;
6033       siemens)
6034         ## LD is ld it makes a PLAMLIB
6035         ## CC just makes a GrossModule.
6036         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6037         reload_cmds='$CC -r -o $output$reload_objs'
6038         hardcode_direct=no
6039         ;;
6040       motorola)
6041         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6042         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6043         ;;
6044     esac
6045     runpath_var='LD_RUN_PATH'
6046     hardcode_shlibpath_var=no
6047     ;;
6048
6049   sysv4.3*)
6050     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6051     hardcode_shlibpath_var=no
6052     export_dynamic_flag_spec='-Bexport'
6053     ;;
6054
6055   sysv5*)
6056     no_undefined_flag=' -z text'
6057     # $CC -shared without GNU ld will not create a library from C++
6058     # object files and a static libstdc++, better avoid it by now
6059     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6060     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6061                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6062     hardcode_libdir_flag_spec=
6063     hardcode_shlibpath_var=no
6064     runpath_var='LD_RUN_PATH'
6065     ;;
6066
6067   uts4*)
6068     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6069     hardcode_libdir_flag_spec='-L$libdir'
6070     hardcode_shlibpath_var=no
6071     ;;
6072
6073   dgux*)
6074     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6075     hardcode_libdir_flag_spec='-L$libdir'
6076     hardcode_shlibpath_var=no
6077     ;;
6078
6079   sysv4*MP*)
6080     if test -d /usr/nec; then
6081       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6082       hardcode_shlibpath_var=no
6083       runpath_var=LD_RUN_PATH
6084       hardcode_runpath_var=yes
6085       ld_shlibs=yes
6086     fi
6087     ;;
6088
6089   sysv4.2uw2*)
6090     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6091     hardcode_direct=yes
6092     hardcode_minus_L=no
6093     hardcode_shlibpath_var=no
6094     hardcode_runpath_var=yes
6095     runpath_var=LD_RUN_PATH
6096     ;;
6097
6098   sysv5uw7* | unixware7*)
6099     no_undefined_flag='${wl}-z ${wl}text'
6100     if test "$GCC" = yes; then
6101       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6102     else
6103       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6104     fi
6105     runpath_var='LD_RUN_PATH'
6106     hardcode_shlibpath_var=no
6107     ;;
6108
6109   *)
6110     ld_shlibs=no
6111     ;;
6112   esac
6113 fi
6114 echo "$ac_t""$ld_shlibs" 1>&6
6115 test "$ld_shlibs" = no && can_build_shared=no
6116
6117 # Check hardcoding attributes.
6118 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6119 echo "configure:6120: checking how to hardcode library paths into programs" >&5
6120 hardcode_action=
6121 if test -n "$hardcode_libdir_flag_spec" || \
6122    test -n "$runpath_var"; then
6123
6124   # We can hardcode non-existant directories.
6125   if test "$hardcode_direct" != no &&
6126      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6127      # have to relink, otherwise we might link with an installed library
6128      # when we should be linking with a yet-to-be-installed one
6129      ## test "$hardcode_shlibpath_var" != no &&
6130      test "$hardcode_minus_L" != no; then
6131     # Linking always hardcodes the temporary library directory.
6132     hardcode_action=relink
6133   else
6134     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6135     hardcode_action=immediate
6136   fi
6137 else
6138   # We cannot hardcode anything, or else we can only hardcode existing
6139   # directories.
6140   hardcode_action=unsupported
6141 fi
6142 echo "$ac_t""$hardcode_action" 1>&6
6143
6144 striplib=
6145 old_striplib=
6146 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6147 echo "configure:6148: checking whether stripping libraries is possible" >&5
6148 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6149   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6150   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6151   echo "$ac_t""yes" 1>&6
6152 else
6153   echo "$ac_t""no" 1>&6
6154 fi
6155
6156 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6157 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6158
6159 # PORTME Fill in your ld.so characteristics
6160 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6161 echo "configure:6162: checking dynamic linker characteristics" >&5
6162 library_names_spec=
6163 libname_spec='lib$name'
6164 soname_spec=
6165 postinstall_cmds=
6166 postuninstall_cmds=
6167 finish_cmds=
6168 finish_eval=
6169 shlibpath_var=
6170 shlibpath_overrides_runpath=unknown
6171 version_type=none
6172 dynamic_linker="$host_os ld.so"
6173 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6174 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6175
6176 case $host_os in
6177 aix3*)
6178   version_type=linux
6179   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6180   shlibpath_var=LIBPATH
6181
6182   # AIX has no versioning support, so we append a major version to the name.
6183   soname_spec='${libname}${release}.so$major'
6184   ;;
6185
6186 aix4* | aix5*)
6187   version_type=linux
6188   need_lib_prefix=no
6189   need_version=no
6190   hardcode_into_libs=yes
6191   if test "$host_cpu" = ia64; then
6192     # AIX 5 supports IA64
6193     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6194     shlibpath_var=LD_LIBRARY_PATH
6195   else
6196     # With GCC up to 2.95.x, collect2 would create an import file
6197     # for dependence libraries.  The import file would start with
6198     # the line `#! .'.  This would cause the generated library to
6199     # depend on `.', always an invalid library.  This was fixed in
6200     # development snapshots of GCC prior to 3.0.
6201     case $host_os in
6202       aix4 | aix4.[01] | aix4.[01].*)
6203         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6204              echo ' yes '
6205              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6206           :
6207         else
6208           can_build_shared=no
6209         fi
6210         ;;
6211     esac
6212     # AIX (on Power*) has no versioning support, so currently we can
6213     # not hardcode correct soname into executable. Probably we can
6214     # add versioning support to collect2, so additional links can
6215     # be useful in future.
6216     if test "$aix_use_runtimelinking" = yes; then
6217       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6218       # instead of lib<name>.a to let people know that these are not
6219       # typical AIX shared libraries.
6220       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6221     else
6222       # We preserve .a as extension for shared libraries through AIX4.2
6223       # and later when we are not doing run time linking.
6224       library_names_spec='${libname}${release}.a $libname.a'
6225       soname_spec='${libname}${release}.so$major'
6226     fi
6227     shlibpath_var=LIBPATH
6228   fi
6229   hardcode_into_libs=yes
6230   ;;
6231
6232 amigaos*)
6233   library_names_spec='$libname.ixlibrary $libname.a'
6234   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6235   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'
6236   ;;
6237
6238 beos*)
6239   library_names_spec='${libname}.so'
6240   dynamic_linker="$host_os ld.so"
6241   shlibpath_var=LIBRARY_PATH
6242   ;;
6243
6244 bsdi4*)
6245   version_type=linux
6246   need_version=no
6247   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6248   soname_spec='${libname}${release}.so$major'
6249   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6250   shlibpath_var=LD_LIBRARY_PATH
6251   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6252   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6253   export_dynamic_flag_spec=-rdynamic
6254   # the default ld.so.conf also contains /usr/contrib/lib and
6255   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6256   # libtool to hard-code these into programs
6257   ;;
6258
6259 cygwin* | mingw* | pw32*)
6260   version_type=windows
6261   need_version=no
6262   need_lib_prefix=no
6263   case $GCC,$host_os in
6264   yes,cygwin*)
6265     library_names_spec='$libname.dll.a'
6266     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6267     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6268       dldir=$destdir/`dirname \$dlpath`~
6269       test -d \$dldir || mkdir -p \$dldir~
6270       $install_prog .libs/$dlname \$dldir/$dlname'
6271     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6272       dlpath=$dir/\$dldll~
6273        $rm \$dlpath'
6274     ;;
6275   yes,mingw*)
6276     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6277     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6278     ;;
6279   yes,pw32*)
6280     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6281     ;;
6282   *)
6283     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6284     ;;
6285   esac
6286   dynamic_linker='Win32 ld.exe'
6287   # FIXME: first we should search . and the directory the executable is in
6288   shlibpath_var=PATH
6289   ;;
6290
6291 darwin* | rhapsody*)
6292   dynamic_linker="$host_os dyld"
6293   version_type=darwin
6294   need_lib_prefix=no
6295   need_version=no
6296   # FIXME: Relying on posixy $() will cause problems for
6297   #        cross-compilation, but unfortunately the echo tests do not
6298   #        yet detect zsh echo's removal of \ escapes.
6299   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)'
6300   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6301   shlibpath_overrides_runpath=yes
6302   shlibpath_var=DYLD_LIBRARY_PATH
6303   ;;
6304
6305 freebsd1*)
6306   dynamic_linker=no
6307   ;;
6308
6309 freebsd*)
6310   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6311   version_type=freebsd-$objformat
6312   case $version_type in
6313     freebsd-elf*)
6314       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6315       need_version=no
6316       need_lib_prefix=no
6317       ;;
6318     freebsd-*)
6319       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6320       need_version=yes
6321       ;;
6322   esac
6323   shlibpath_var=LD_LIBRARY_PATH
6324   case $host_os in
6325   freebsd2*)
6326     shlibpath_overrides_runpath=yes
6327     ;;
6328   *)
6329     shlibpath_overrides_runpath=no
6330     hardcode_into_libs=yes
6331     ;;
6332   esac
6333   ;;
6334
6335 gnu*)
6336   version_type=linux
6337   need_lib_prefix=no
6338   need_version=no
6339   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6340   soname_spec='${libname}${release}.so$major'
6341   shlibpath_var=LD_LIBRARY_PATH
6342   hardcode_into_libs=yes
6343   ;;
6344
6345 hpux9* | hpux10* | hpux11*)
6346   # Give a soname corresponding to the major version so that dld.sl refuses to
6347   # link against other versions.
6348   dynamic_linker="$host_os dld.sl"
6349   version_type=sunos
6350   need_lib_prefix=no
6351   need_version=no
6352   shlibpath_var=SHLIB_PATH
6353   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6354   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6355   soname_spec='${libname}${release}.sl$major'
6356   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6357   postinstall_cmds='chmod 555 $lib'
6358   ;;
6359
6360 irix5* | irix6* | nonstopux*)
6361   case $host_os in
6362     nonstopux*) version_type=nonstopux ;;
6363     *)          version_type=irix ;;
6364   esac
6365   need_lib_prefix=no
6366   need_version=no
6367   soname_spec='${libname}${release}.so$major'
6368   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6369   case $host_os in
6370   irix5* | nonstopux*)
6371     libsuff= shlibsuff=
6372     ;;
6373   *)
6374     case $LD in # libtool.m4 will add one of these switches to LD
6375     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6376     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6377     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6378     *) libsuff= shlibsuff= libmagic=never-match;;
6379     esac
6380     ;;
6381   esac
6382   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6383   shlibpath_overrides_runpath=no
6384   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6385   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6386   ;;
6387
6388 # No shared lib support for Linux oldld, aout, or coff.
6389 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6390   dynamic_linker=no
6391   ;;
6392
6393 # This must be Linux ELF.
6394 linux-gnu*)
6395   version_type=linux
6396   need_lib_prefix=no
6397   need_version=no
6398   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6399   soname_spec='${libname}${release}.so$major'
6400   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6401   shlibpath_var=LD_LIBRARY_PATH
6402   shlibpath_overrides_runpath=no
6403   # This implies no fast_install, which is unacceptable.
6404   # Some rework will be needed to allow for fast_install
6405   # before this can be enabled.
6406   hardcode_into_libs=yes
6407
6408   # We used to test for /lib/ld.so.1 and disable shared libraries on
6409   # powerpc, because MkLinux only supported shared libraries with the
6410   # GNU dynamic linker.  Since this was broken with cross compilers,
6411   # most powerpc-linux boxes support dynamic linking these days and
6412   # people can always --disable-shared, the test was removed, and we
6413   # assume the GNU/Linux dynamic linker is in use.
6414   dynamic_linker='GNU/Linux ld.so'
6415   ;;
6416
6417 netbsd*)
6418   version_type=sunos
6419   need_lib_prefix=no
6420   need_version=no
6421   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6422     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6423     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6424     dynamic_linker='NetBSD (a.out) ld.so'
6425   else
6426     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6427     soname_spec='${libname}${release}.so$major'
6428     dynamic_linker='NetBSD ld.elf_so'
6429   fi
6430   shlibpath_var=LD_LIBRARY_PATH
6431   shlibpath_overrides_runpath=yes
6432   hardcode_into_libs=yes
6433   ;;
6434
6435 newsos6)
6436   version_type=linux
6437   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6438   shlibpath_var=LD_LIBRARY_PATH
6439   shlibpath_overrides_runpath=yes
6440   ;;
6441
6442 openbsd*)
6443   version_type=sunos
6444   need_lib_prefix=no
6445   need_version=no
6446   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6447     case "$host_os" in
6448     openbsd2.[89] | openbsd2.[89].*)
6449       shlibpath_overrides_runpath=no
6450       ;;
6451     *)
6452       shlibpath_overrides_runpath=yes
6453       ;;
6454     esac
6455   else
6456     shlibpath_overrides_runpath=yes
6457   fi
6458   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6459   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6460   shlibpath_var=LD_LIBRARY_PATH
6461   ;;
6462
6463 os2*)
6464   libname_spec='$name'
6465   need_lib_prefix=no
6466   library_names_spec='$libname.dll $libname.a'
6467   dynamic_linker='OS/2 ld.exe'
6468   shlibpath_var=LIBPATH
6469   ;;
6470
6471 osf3* | osf4* | osf5*)
6472   version_type=osf
6473   need_version=no
6474   soname_spec='${libname}${release}.so$major'
6475   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6476   shlibpath_var=LD_LIBRARY_PATH
6477   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6478   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6479   hardcode_into_libs=yes
6480   ;;
6481
6482 sco3.2v5*)
6483   version_type=osf
6484   soname_spec='${libname}${release}.so$major'
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6486   shlibpath_var=LD_LIBRARY_PATH
6487   ;;
6488
6489 solaris*)
6490   version_type=linux
6491   need_lib_prefix=no
6492   need_version=no
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   soname_spec='${libname}${release}.so$major'
6495   shlibpath_var=LD_LIBRARY_PATH
6496   shlibpath_overrides_runpath=yes
6497   hardcode_into_libs=yes
6498   # ldd complains unless libraries are executable
6499   postinstall_cmds='chmod +x $lib'
6500   ;;
6501
6502 sunos4*)
6503   version_type=sunos
6504   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6505   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6506   shlibpath_var=LD_LIBRARY_PATH
6507   shlibpath_overrides_runpath=yes
6508   if test "$with_gnu_ld" = yes; then
6509     need_lib_prefix=no
6510   fi
6511   need_version=yes
6512   ;;
6513
6514 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6515   version_type=linux
6516   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6517   soname_spec='${libname}${release}.so$major'
6518   shlibpath_var=LD_LIBRARY_PATH
6519   case $host_vendor in
6520     sni)
6521       shlibpath_overrides_runpath=no
6522       need_lib_prefix=no
6523       export_dynamic_flag_spec='${wl}-Blargedynsym'
6524       runpath_var=LD_RUN_PATH
6525       ;;
6526     siemens)
6527       need_lib_prefix=no
6528       ;;
6529     motorola)
6530       need_lib_prefix=no
6531       need_version=no
6532       shlibpath_overrides_runpath=no
6533       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6534       ;;
6535   esac
6536   ;;
6537
6538 uts4*)
6539   version_type=linux
6540   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6541   soname_spec='${libname}${release}.so$major'
6542   shlibpath_var=LD_LIBRARY_PATH
6543   ;;
6544
6545 dgux*)
6546   version_type=linux
6547   need_lib_prefix=no
6548   need_version=no
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6550   soname_spec='${libname}${release}.so$major'
6551   shlibpath_var=LD_LIBRARY_PATH
6552   ;;
6553
6554 sysv4*MP*)
6555   if test -d /usr/nec ;then
6556     version_type=linux
6557     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6558     soname_spec='$libname.so.$major'
6559     shlibpath_var=LD_LIBRARY_PATH
6560   fi
6561   ;;
6562
6563 *)
6564   dynamic_linker=no
6565   ;;
6566 esac
6567 echo "$ac_t""$dynamic_linker" 1>&6
6568 test "$dynamic_linker" = no && can_build_shared=no
6569
6570 # Report the final consequences.
6571 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6572 echo "configure:6573: checking if libtool supports shared libraries" >&5
6573 echo "$ac_t""$can_build_shared" 1>&6
6574
6575 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6576 echo "configure:6577: checking whether to build shared libraries" >&5
6577 test "$can_build_shared" = "no" && enable_shared=no
6578
6579 # On AIX, shared libraries and static libraries use the same namespace, and
6580 # are all built from PIC.
6581 case "$host_os" in
6582 aix3*)
6583   test "$enable_shared" = yes && enable_static=no
6584   if test -n "$RANLIB"; then
6585     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6586     postinstall_cmds='$RANLIB $lib'
6587   fi
6588   ;;
6589
6590 aix4*)
6591   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6592     test "$enable_shared" = yes && enable_static=no
6593   fi
6594   ;;
6595 esac
6596 echo "$ac_t""$enable_shared" 1>&6
6597
6598 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6599 echo "configure:6600: checking whether to build static libraries" >&5
6600 # Make sure either enable_shared or enable_static is yes.
6601 test "$enable_shared" = yes || enable_static=yes
6602 echo "$ac_t""$enable_static" 1>&6
6603
6604 if test "$hardcode_action" = relink; then
6605   # Fast installation is not supported
6606   enable_fast_install=no
6607 elif test "$shlibpath_overrides_runpath" = yes ||
6608      test "$enable_shared" = no; then
6609   # Fast installation is not necessary
6610   enable_fast_install=needless
6611 fi
6612
6613 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6614 if test "$GCC" = yes; then
6615   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6616 fi
6617
6618 if test "x$enable_dlopen" != xyes; then
6619   enable_dlopen=unknown
6620   enable_dlopen_self=unknown
6621   enable_dlopen_self_static=unknown
6622 else
6623   lt_cv_dlopen=no
6624   lt_cv_dlopen_libs=
6625
6626   case $host_os in
6627   beos*)
6628     lt_cv_dlopen="load_add_on"
6629     lt_cv_dlopen_libs=
6630     lt_cv_dlopen_self=yes
6631     ;;
6632
6633   cygwin* | mingw* | pw32*)
6634     lt_cv_dlopen="LoadLibrary"
6635     lt_cv_dlopen_libs=
6636    ;;
6637
6638   *)
6639     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6640 echo "configure:6641: checking for shl_load" >&5
6641 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6642   echo $ac_n "(cached) $ac_c" 1>&6
6643 else
6644   cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6647 /* System header to define __stub macros and hopefully few prototypes,
6648     which can conflict with char shl_load(); below.  */
6649 #include <assert.h>
6650 /* Override any gcc2 internal prototype to avoid an error.  */
6651 /* We use char because int might match the return type of a gcc2
6652     builtin and then its argument prototype would still apply.  */
6653 char shl_load();
6654 char (*f)();
6655
6656 int main() {
6657
6658 /* The GNU C library defines this for functions which it implements
6659     to always fail with ENOSYS.  Some functions are actually named
6660     something starting with __ and the normal name is an alias.  */
6661 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6662 choke me
6663 #else
6664 f = shl_load;
6665 #endif
6666
6667 ; return 0; }
6668 EOF
6669 if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6670   rm -rf conftest*
6671   eval "ac_cv_func_shl_load=yes"
6672 else
6673   echo "configure: failed program was:" >&5
6674   cat conftest.$ac_ext >&5
6675   rm -rf conftest*
6676   eval "ac_cv_func_shl_load=no"
6677 fi
6678 rm -f conftest*
6679 fi
6680
6681 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6682   echo "$ac_t""yes" 1>&6
6683   lt_cv_dlopen="shl_load"
6684 else
6685   echo "$ac_t""no" 1>&6
6686 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6687 echo "configure:6688: checking for shl_load in -ldld" >&5
6688 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6690   echo $ac_n "(cached) $ac_c" 1>&6
6691 else
6692   ac_save_LIBS="$LIBS"
6693 LIBS="-ldld  $LIBS"
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 /* We use char because int might match the return type of a gcc2
6699     builtin and then its argument prototype would still apply.  */
6700 char shl_load();
6701
6702 int main() {
6703 shl_load()
6704 ; return 0; }
6705 EOF
6706 if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6707   rm -rf conftest*
6708   eval "ac_cv_lib_$ac_lib_var=yes"
6709 else
6710   echo "configure: failed program was:" >&5
6711   cat conftest.$ac_ext >&5
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=no"
6714 fi
6715 rm -f conftest*
6716 LIBS="$ac_save_LIBS"
6717
6718 fi
6719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6720   echo "$ac_t""yes" 1>&6
6721   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6722 else
6723   echo "$ac_t""no" 1>&6
6724 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6725 echo "configure:6726: checking for dlopen" >&5
6726 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729   cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 /* System header to define __stub macros and hopefully few prototypes,
6733     which can conflict with char dlopen(); below.  */
6734 #include <assert.h>
6735 /* Override any gcc2 internal prototype to avoid an error.  */
6736 /* We use char because int might match the return type of a gcc2
6737     builtin and then its argument prototype would still apply.  */
6738 char dlopen();
6739 char (*f)();
6740
6741 int main() {
6742
6743 /* The GNU C library defines this for functions which it implements
6744     to always fail with ENOSYS.  Some functions are actually named
6745     something starting with __ and the normal name is an alias.  */
6746 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6747 choke me
6748 #else
6749 f = dlopen;
6750 #endif
6751
6752 ; return 0; }
6753 EOF
6754 if { (eval echo configure:6755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6755   rm -rf conftest*
6756   eval "ac_cv_func_dlopen=yes"
6757 else
6758   echo "configure: failed program was:" >&5
6759   cat conftest.$ac_ext >&5
6760   rm -rf conftest*
6761   eval "ac_cv_func_dlopen=no"
6762 fi
6763 rm -f conftest*
6764 fi
6765
6766 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6767   echo "$ac_t""yes" 1>&6
6768   lt_cv_dlopen="dlopen"
6769 else
6770   echo "$ac_t""no" 1>&6
6771 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6772 echo "configure:6773: checking for dlopen in -ldl" >&5
6773 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6774 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6775   echo $ac_n "(cached) $ac_c" 1>&6
6776 else
6777   ac_save_LIBS="$LIBS"
6778 LIBS="-ldl  $LIBS"
6779 cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782 /* Override any gcc2 internal prototype to avoid an error.  */
6783 /* We use char because int might match the return type of a gcc2
6784     builtin and then its argument prototype would still apply.  */
6785 char dlopen();
6786
6787 int main() {
6788 dlopen()
6789 ; return 0; }
6790 EOF
6791 if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=yes"
6794 else
6795   echo "configure: failed program was:" >&5
6796   cat conftest.$ac_ext >&5
6797   rm -rf conftest*
6798   eval "ac_cv_lib_$ac_lib_var=no"
6799 fi
6800 rm -f conftest*
6801 LIBS="$ac_save_LIBS"
6802
6803 fi
6804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6805   echo "$ac_t""yes" 1>&6
6806   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6807 else
6808   echo "$ac_t""no" 1>&6
6809 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6810 echo "configure:6811: checking for dlopen in -lsvld" >&5
6811 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6813   echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815   ac_save_LIBS="$LIBS"
6816 LIBS="-lsvld  $LIBS"
6817 cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 /* Override any gcc2 internal prototype to avoid an error.  */
6821 /* We use char because int might match the return type of a gcc2
6822     builtin and then its argument prototype would still apply.  */
6823 char dlopen();
6824
6825 int main() {
6826 dlopen()
6827 ; return 0; }
6828 EOF
6829 if { (eval echo configure:6830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6830   rm -rf conftest*
6831   eval "ac_cv_lib_$ac_lib_var=yes"
6832 else
6833   echo "configure: failed program was:" >&5
6834   cat conftest.$ac_ext >&5
6835   rm -rf conftest*
6836   eval "ac_cv_lib_$ac_lib_var=no"
6837 fi
6838 rm -f conftest*
6839 LIBS="$ac_save_LIBS"
6840
6841 fi
6842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6843   echo "$ac_t""yes" 1>&6
6844   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6845 else
6846   echo "$ac_t""no" 1>&6
6847 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6848 echo "configure:6849: checking for dld_link in -ldld" >&5
6849 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6850 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6851   echo $ac_n "(cached) $ac_c" 1>&6
6852 else
6853   ac_save_LIBS="$LIBS"
6854 LIBS="-ldld  $LIBS"
6855 cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 /* We use char because int might match the return type of a gcc2
6860     builtin and then its argument prototype would still apply.  */
6861 char dld_link();
6862
6863 int main() {
6864 dld_link()
6865 ; return 0; }
6866 EOF
6867 if { (eval echo configure:6868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6868   rm -rf conftest*
6869   eval "ac_cv_lib_$ac_lib_var=yes"
6870 else
6871   echo "configure: failed program was:" >&5
6872   cat conftest.$ac_ext >&5
6873   rm -rf conftest*
6874   eval "ac_cv_lib_$ac_lib_var=no"
6875 fi
6876 rm -f conftest*
6877 LIBS="$ac_save_LIBS"
6878
6879 fi
6880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6881   echo "$ac_t""yes" 1>&6
6882   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6883 else
6884   echo "$ac_t""no" 1>&6
6885 fi
6886
6887               
6888 fi
6889
6890             
6891 fi
6892
6893           
6894 fi
6895
6896         
6897 fi
6898
6899       
6900 fi
6901
6902     ;;
6903   esac
6904
6905   if test "x$lt_cv_dlopen" != xno; then
6906     enable_dlopen=yes
6907   else
6908     enable_dlopen=no
6909   fi
6910
6911   case $lt_cv_dlopen in
6912   dlopen)
6913     save_CPPFLAGS="$CPPFLAGS"
6914         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6915
6916     save_LDFLAGS="$LDFLAGS"
6917     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6918
6919     save_LIBS="$LIBS"
6920     LIBS="$lt_cv_dlopen_libs $LIBS"
6921
6922     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6923 echo "configure:6924: checking whether a program can dlopen itself" >&5
6924 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6925   echo $ac_n "(cached) $ac_c" 1>&6
6926 else
6927           if test "$cross_compiling" = yes; then :
6928   lt_cv_dlopen_self=cross
6929 else
6930     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6931   lt_status=$lt_dlunknown
6932   cat > conftest.$ac_ext <<EOF
6933 #line 6934 "configure"
6934 #include "confdefs.h"
6935
6936 #if HAVE_DLFCN_H
6937 #include <dlfcn.h>
6938 #endif
6939
6940 #include <stdio.h>
6941
6942 #ifdef RTLD_GLOBAL
6943 #  define LT_DLGLOBAL           RTLD_GLOBAL
6944 #else
6945 #  ifdef DL_GLOBAL
6946 #    define LT_DLGLOBAL         DL_GLOBAL
6947 #  else
6948 #    define LT_DLGLOBAL         0
6949 #  endif
6950 #endif
6951
6952 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6953    find out it does not work in some platform. */
6954 #ifndef LT_DLLAZY_OR_NOW
6955 #  ifdef RTLD_LAZY
6956 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6957 #  else
6958 #    ifdef DL_LAZY
6959 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6960 #    else
6961 #      ifdef RTLD_NOW
6962 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6963 #      else
6964 #        ifdef DL_NOW
6965 #          define LT_DLLAZY_OR_NOW      DL_NOW
6966 #        else
6967 #          define LT_DLLAZY_OR_NOW      0
6968 #        endif
6969 #      endif
6970 #    endif
6971 #  endif
6972 #endif
6973
6974 #ifdef __cplusplus
6975 extern "C" void exit (int);
6976 #endif
6977
6978 void fnord() { int i=42;}
6979 int main ()
6980 {
6981   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6982   int status = $lt_dlunknown;
6983
6984   if (self)
6985     {
6986       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6987       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6988       /* dlclose (self); */
6989     }
6990
6991     exit (status);
6992 }
6993 EOF
6994   if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6995     (./conftest; exit; ) 2>/dev/null
6996     lt_status=$?
6997     case x$lt_status in
6998       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6999       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7000       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7001     esac
7002   else :
7003     # compilation failed
7004     lt_cv_dlopen_self=no
7005   fi
7006 fi
7007 rm -fr conftest*
7008
7009     
7010 fi
7011
7012 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7013
7014     if test "x$lt_cv_dlopen_self" = xyes; then
7015       LDFLAGS="$LDFLAGS $link_static_flag"
7016       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7017 echo "configure:7018: checking whether a statically linked program can dlopen itself" >&5
7018 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7019   echo $ac_n "(cached) $ac_c" 1>&6
7020 else
7021           if test "$cross_compiling" = yes; then :
7022   lt_cv_dlopen_self_static=cross
7023 else
7024     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7025   lt_status=$lt_dlunknown
7026   cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029
7030 #if HAVE_DLFCN_H
7031 #include <dlfcn.h>
7032 #endif
7033
7034 #include <stdio.h>
7035
7036 #ifdef RTLD_GLOBAL
7037 #  define LT_DLGLOBAL           RTLD_GLOBAL
7038 #else
7039 #  ifdef DL_GLOBAL
7040 #    define LT_DLGLOBAL         DL_GLOBAL
7041 #  else
7042 #    define LT_DLGLOBAL         0
7043 #  endif
7044 #endif
7045
7046 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7047    find out it does not work in some platform. */
7048 #ifndef LT_DLLAZY_OR_NOW
7049 #  ifdef RTLD_LAZY
7050 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7051 #  else
7052 #    ifdef DL_LAZY
7053 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7054 #    else
7055 #      ifdef RTLD_NOW
7056 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7057 #      else
7058 #        ifdef DL_NOW
7059 #          define LT_DLLAZY_OR_NOW      DL_NOW
7060 #        else
7061 #          define LT_DLLAZY_OR_NOW      0
7062 #        endif
7063 #      endif
7064 #    endif
7065 #  endif
7066 #endif
7067
7068 #ifdef __cplusplus
7069 extern "C" void exit (int);
7070 #endif
7071
7072 void fnord() { int i=42;}
7073 int main ()
7074 {
7075   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7076   int status = $lt_dlunknown;
7077
7078   if (self)
7079     {
7080       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7081       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7082       /* dlclose (self); */
7083     }
7084
7085     exit (status);
7086 }
7087 EOF
7088   if { (eval echo configure:7089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7089     (./conftest; exit; ) 2>/dev/null
7090     lt_status=$?
7091     case x$lt_status in
7092       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7093       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7094       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7095     esac
7096   else :
7097     # compilation failed
7098     lt_cv_dlopen_self_static=no
7099   fi
7100 fi
7101 rm -fr conftest*
7102
7103       
7104 fi
7105
7106 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7107     fi
7108
7109     CPPFLAGS="$save_CPPFLAGS"
7110     LDFLAGS="$save_LDFLAGS"
7111     LIBS="$save_LIBS"
7112     ;;
7113   esac
7114
7115   case $lt_cv_dlopen_self in
7116   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7117   *) enable_dlopen_self=unknown ;;
7118   esac
7119
7120   case $lt_cv_dlopen_self_static in
7121   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7122   *) enable_dlopen_self_static=unknown ;;
7123   esac
7124 fi
7125
7126
7127 if test "$enable_shared" = yes && test "$GCC" = yes; then
7128   case $archive_cmds in
7129   *'~'*)
7130     # FIXME: we may have to deal with multi-command sequences.
7131     ;;
7132   '$CC '*)
7133     # Test whether the compiler implicitly links with -lc since on some
7134     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7135     # to ld, don't add -lc before -lgcc.
7136     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7137 echo "configure:7138: checking whether -lc should be explicitly linked in" >&5
7138     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7139   echo $ac_n "(cached) $ac_c" 1>&6
7140 else
7141   $rm conftest*
7142     echo 'static int dummy;' > conftest.$ac_ext
7143
7144     if { (eval echo configure:7145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7145       soname=conftest
7146       lib=conftest
7147       libobjs=conftest.$ac_objext
7148       deplibs=
7149       wl=$lt_cv_prog_cc_wl
7150       compiler_flags=-v
7151       linker_flags=-v
7152       verstring=
7153       output_objdir=.
7154       libname=conftest
7155       save_allow_undefined_flag=$allow_undefined_flag
7156       allow_undefined_flag=
7157       if { (eval echo configure:7158: \"$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; }
7158       then
7159         lt_cv_archive_cmds_need_lc=no
7160       else
7161         lt_cv_archive_cmds_need_lc=yes
7162       fi
7163       allow_undefined_flag=$save_allow_undefined_flag
7164     else
7165       cat conftest.err 1>&5
7166     fi
7167 fi
7168
7169     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7170     ;;
7171   esac
7172 fi
7173 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7174
7175 # The second clause should only fire when bootstrapping the
7176 # libtool distribution, otherwise you forgot to ship ltmain.sh
7177 # with your package, and you will get complaints that there are
7178 # no rules to generate ltmain.sh.
7179 if test -f "$ltmain"; then
7180   :
7181 else
7182   # If there is no Makefile yet, we rely on a make rule to execute
7183   # `config.status --recheck' to rerun these tests and create the
7184   # libtool script then.
7185   test -f Makefile && make "$ltmain"
7186 fi
7187
7188 if test -f "$ltmain"; then
7189   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7190   $rm -f "${ofile}T"
7191
7192   echo creating $ofile
7193
7194   # Now quote all the things that may contain metacharacters while being
7195   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7196   # variables and quote the copies for generation of the libtool script.
7197   for var in echo old_CC old_CFLAGS SED \
7198     AR AR_FLAGS CC LD LN_S NM SHELL \
7199     reload_flag reload_cmds wl \
7200     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7201     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7202     library_names_spec soname_spec \
7203     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7204     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7205     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7206     old_striplib striplib file_magic_cmd export_symbols_cmds \
7207     deplibs_check_method allow_undefined_flag no_undefined_flag \
7208     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7209     global_symbol_to_c_name_address \
7210     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7211     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7212     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7213
7214     case $var in
7215     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7216     old_postinstall_cmds | old_postuninstall_cmds | \
7217     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7218     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7219     postinstall_cmds | postuninstall_cmds | \
7220     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7221       # Double-quote double-evaled strings.
7222       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7223       ;;
7224     *)
7225       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7226       ;;
7227     esac
7228   done
7229
7230   cat <<__EOF__ > "${ofile}T"
7231 #! $SHELL
7232
7233 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7234 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7235 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7236 #
7237 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7238 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7239 #
7240 # This program is free software; you can redistribute it and/or modify
7241 # it under the terms of the GNU General Public License as published by
7242 # the Free Software Foundation; either version 2 of the License, or
7243 # (at your option) any later version.
7244 #
7245 # This program is distributed in the hope that it will be useful, but
7246 # WITHOUT ANY WARRANTY; without even the implied warranty of
7247 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7248 # General Public License for more details.
7249 #
7250 # You should have received a copy of the GNU General Public License
7251 # along with this program; if not, write to the Free Software
7252 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7253 #
7254 # As a special exception to the GNU General Public License, if you
7255 # distribute this file as part of a program that contains a
7256 # configuration script generated by Autoconf, you may include it under
7257 # the same distribution terms that you use for the rest of that program.
7258
7259 # A sed that does not truncate output.
7260 SED=$lt_SED
7261
7262 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7263 Xsed="${SED} -e s/^X//"
7264
7265 # The HP-UX ksh and POSIX shell print the target directory to stdout
7266 # if CDPATH is set.
7267 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7268
7269 # ### BEGIN LIBTOOL CONFIG
7270
7271 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7272
7273 # Shell to use when invoking shell scripts.
7274 SHELL=$lt_SHELL
7275
7276 # Whether or not to build shared libraries.
7277 build_libtool_libs=$enable_shared
7278
7279 # Whether or not to build static libraries.
7280 build_old_libs=$enable_static
7281
7282 # Whether or not to add -lc for building shared libraries.
7283 build_libtool_need_lc=$need_lc
7284
7285 # Whether or not to optimize for fast installation.
7286 fast_install=$enable_fast_install
7287
7288 # The host system.
7289 host_alias=$host_alias
7290 host=$host
7291
7292 # An echo program that does not interpret backslashes.
7293 echo=$lt_echo
7294
7295 # The archiver.
7296 AR=$lt_AR
7297 AR_FLAGS=$lt_AR_FLAGS
7298
7299 # The default C compiler.
7300 CC=$lt_CC
7301
7302 # Is the compiler the GNU C compiler?
7303 with_gcc=$GCC
7304
7305 # The linker used to build libraries.
7306 LD=$lt_LD
7307
7308 # Whether we need hard or soft links.
7309 LN_S=$lt_LN_S
7310
7311 # A BSD-compatible nm program.
7312 NM=$lt_NM
7313
7314 # A symbol stripping program
7315 STRIP=$STRIP
7316
7317 # Used to examine libraries when file_magic_cmd begins "file"
7318 MAGIC_CMD=$MAGIC_CMD
7319
7320 # Used on cygwin: DLL creation program.
7321 DLLTOOL="$DLLTOOL"
7322
7323 # Used on cygwin: object dumper.
7324 OBJDUMP="$OBJDUMP"
7325
7326 # Used on cygwin: assembler.
7327 AS="$AS"
7328
7329 # The name of the directory that contains temporary libtool files.
7330 objdir=$objdir
7331
7332 # How to create reloadable object files.
7333 reload_flag=$lt_reload_flag
7334 reload_cmds=$lt_reload_cmds
7335
7336 # How to pass a linker flag through the compiler.
7337 wl=$lt_wl
7338
7339 # Object file suffix (normally "o").
7340 objext="$ac_objext"
7341
7342 # Old archive suffix (normally "a").
7343 libext="$libext"
7344
7345 # Executable file suffix (normally "").
7346 exeext="$exeext"
7347
7348 # Additional compiler flags for building library objects.
7349 pic_flag=$lt_pic_flag
7350 pic_mode=$pic_mode
7351
7352 # Does compiler simultaneously support -c and -o options?
7353 compiler_c_o=$lt_compiler_c_o
7354
7355 # Can we write directly to a .lo ?
7356 compiler_o_lo=$lt_compiler_o_lo
7357
7358 # Must we lock files when doing compilation ?
7359 need_locks=$lt_need_locks
7360
7361 # Do we need the lib prefix for modules?
7362 need_lib_prefix=$need_lib_prefix
7363
7364 # Do we need a version for libraries?
7365 need_version=$need_version
7366
7367 # Whether dlopen is supported.
7368 dlopen_support=$enable_dlopen
7369
7370 # Whether dlopen of programs is supported.
7371 dlopen_self=$enable_dlopen_self
7372
7373 # Whether dlopen of statically linked programs is supported.
7374 dlopen_self_static=$enable_dlopen_self_static
7375
7376 # Compiler flag to prevent dynamic linking.
7377 link_static_flag=$lt_link_static_flag
7378
7379 # Compiler flag to turn off builtin functions.
7380 no_builtin_flag=$lt_no_builtin_flag
7381
7382 # Compiler flag to allow reflexive dlopens.
7383 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7384
7385 # Compiler flag to generate shared objects directly from archives.
7386 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7387
7388 # Compiler flag to generate thread-safe objects.
7389 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7390
7391 # Library versioning type.
7392 version_type=$version_type
7393
7394 # Format of library name prefix.
7395 libname_spec=$lt_libname_spec
7396
7397 # List of archive names.  First name is the real one, the rest are links.
7398 # The last name is the one that the linker finds with -lNAME.
7399 library_names_spec=$lt_library_names_spec
7400
7401 # The coded name of the library, if different from the real name.
7402 soname_spec=$lt_soname_spec
7403
7404 # Commands used to build and install an old-style archive.
7405 RANLIB=$lt_RANLIB
7406 old_archive_cmds=$lt_old_archive_cmds
7407 old_postinstall_cmds=$lt_old_postinstall_cmds
7408 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7409
7410 # Create an old-style archive from a shared archive.
7411 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7412
7413 # Create a temporary old-style archive to link instead of a shared archive.
7414 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7415
7416 # Commands used to build and install a shared archive.
7417 archive_cmds=$lt_archive_cmds
7418 archive_expsym_cmds=$lt_archive_expsym_cmds
7419 postinstall_cmds=$lt_postinstall_cmds
7420 postuninstall_cmds=$lt_postuninstall_cmds
7421
7422 # Commands to strip libraries.
7423 old_striplib=$lt_old_striplib
7424 striplib=$lt_striplib
7425
7426 # Method to check whether dependent libraries are shared objects.
7427 deplibs_check_method=$lt_deplibs_check_method
7428
7429 # Command to use when deplibs_check_method == file_magic.
7430 file_magic_cmd=$lt_file_magic_cmd
7431
7432 # Flag that allows shared libraries with undefined symbols to be built.
7433 allow_undefined_flag=$lt_allow_undefined_flag
7434
7435 # Flag that forces no undefined symbols.
7436 no_undefined_flag=$lt_no_undefined_flag
7437
7438 # Commands used to finish a libtool library installation in a directory.
7439 finish_cmds=$lt_finish_cmds
7440
7441 # Same as above, but a single script fragment to be evaled but not shown.
7442 finish_eval=$lt_finish_eval
7443
7444 # Take the output of nm and produce a listing of raw symbols and C names.
7445 global_symbol_pipe=$lt_global_symbol_pipe
7446
7447 # Transform the output of nm in a proper C declaration
7448 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7449
7450 # Transform the output of nm in a C name address pair
7451 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7452
7453 # This is the shared library runtime path variable.
7454 runpath_var=$runpath_var
7455
7456 # This is the shared library path variable.
7457 shlibpath_var=$shlibpath_var
7458
7459 # Is shlibpath searched before the hard-coded library search path?
7460 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7461
7462 # How to hardcode a shared library path into an executable.
7463 hardcode_action=$hardcode_action
7464
7465 # Whether we should hardcode library paths into libraries.
7466 hardcode_into_libs=$hardcode_into_libs
7467
7468 # Flag to hardcode \$libdir into a binary during linking.
7469 # This must work even if \$libdir does not exist.
7470 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7471
7472 # Whether we need a single -rpath flag with a separated argument.
7473 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7474
7475 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7476 # resulting binary.
7477 hardcode_direct=$hardcode_direct
7478
7479 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7480 # resulting binary.
7481 hardcode_minus_L=$hardcode_minus_L
7482
7483 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7484 # the resulting binary.
7485 hardcode_shlibpath_var=$hardcode_shlibpath_var
7486
7487 # Variables whose values should be saved in libtool wrapper scripts and
7488 # restored at relink time.
7489 variables_saved_for_relink="$variables_saved_for_relink"
7490
7491 # Whether libtool must link a program against all its dependency libraries.
7492 link_all_deplibs=$link_all_deplibs
7493
7494 # Compile-time system search path for libraries
7495 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7496
7497 # Run-time system search path for libraries
7498 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7499
7500 # Fix the shell variable \$srcfile for the compiler.
7501 fix_srcfile_path="$fix_srcfile_path"
7502
7503 # Set to yes if exported symbols are required.
7504 always_export_symbols=$always_export_symbols
7505
7506 # The commands to list exported symbols.
7507 export_symbols_cmds=$lt_export_symbols_cmds
7508
7509 # The commands to extract the exported symbol list from a shared archive.
7510 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7511
7512 # Symbols that should not be listed in the preloaded symbols.
7513 exclude_expsyms=$lt_exclude_expsyms
7514
7515 # Symbols that must always be exported.
7516 include_expsyms=$lt_include_expsyms
7517
7518 # ### END LIBTOOL CONFIG
7519
7520 __EOF__
7521
7522   case $host_os in
7523   aix3*)
7524     cat <<\EOF >> "${ofile}T"
7525
7526 # AIX sometimes has problems with the GCC collect2 program.  For some
7527 # reason, if we set the COLLECT_NAMES environment variable, the problems
7528 # vanish in a puff of smoke.
7529 if test "X${COLLECT_NAMES+set}" != Xset; then
7530   COLLECT_NAMES=
7531   export COLLECT_NAMES
7532 fi
7533 EOF
7534     ;;
7535   esac
7536
7537   case $host_os in
7538   cygwin* | mingw* | pw32* | os2*)
7539     cat <<'EOF' >> "${ofile}T"
7540       # This is a source program that is used to create dlls on Windows
7541       # Don't remove nor modify the starting and closing comments
7542 # /* ltdll.c starts here */
7543 # #define WIN32_LEAN_AND_MEAN
7544 # #include <windows.h>
7545 # #undef WIN32_LEAN_AND_MEAN
7546 # #include <stdio.h>
7547 #
7548 # #ifndef __CYGWIN__
7549 # #  ifdef __CYGWIN32__
7550 # #    define __CYGWIN__ __CYGWIN32__
7551 # #  endif
7552 # #endif
7553 #
7554 # #ifdef __cplusplus
7555 # extern "C" {
7556 # #endif
7557 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7558 # #ifdef __cplusplus
7559 # }
7560 # #endif
7561 #
7562 # #ifdef __CYGWIN__
7563 # #include <cygwin/cygwin_dll.h>
7564 # DECLARE_CYGWIN_DLL( DllMain );
7565 # #endif
7566 # HINSTANCE __hDllInstance_base;
7567 #
7568 # BOOL APIENTRY
7569 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7570 # {
7571 #   __hDllInstance_base = hInst;
7572 #   return TRUE;
7573 # }
7574 # /* ltdll.c ends here */
7575         # This is a source program that is used to create import libraries
7576         # on Windows for dlls which lack them. Don't remove nor modify the
7577         # starting and closing comments
7578 # /* impgen.c starts here */
7579 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7580 #
7581 #  This file is part of GNU libtool.
7582 #
7583 #  This program is free software; you can redistribute it and/or modify
7584 #  it under the terms of the GNU General Public License as published by
7585 #  the Free Software Foundation; either version 2 of the License, or
7586 #  (at your option) any later version.
7587 #
7588 #  This program is distributed in the hope that it will be useful,
7589 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7590 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7591 #  GNU General Public License for more details.
7592 #
7593 #  You should have received a copy of the GNU General Public License
7594 #  along with this program; if not, write to the Free Software
7595 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7596 #  */
7597 #
7598 # #include <stdio.h>            /* for printf() */
7599 # #include <unistd.h>           /* for open(), lseek(), read() */
7600 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7601 # #include <string.h>           /* for strdup() */
7602 #
7603 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7604 # #ifndef O_BINARY
7605 # #define O_BINARY 0
7606 # #endif
7607 #
7608 # static unsigned int
7609 # pe_get16 (fd, offset)
7610 #      int fd;
7611 #      int offset;
7612 # {
7613 #   unsigned char b[2];
7614 #   lseek (fd, offset, SEEK_SET);
7615 #   read (fd, b, 2);
7616 #   return b[0] + (b[1]<<8);
7617 # }
7618 #
7619 # static unsigned int
7620 # pe_get32 (fd, offset)
7621 #     int fd;
7622 #     int offset;
7623 # {
7624 #   unsigned char b[4];
7625 #   lseek (fd, offset, SEEK_SET);
7626 #   read (fd, b, 4);
7627 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7628 # }
7629 #
7630 # static unsigned int
7631 # pe_as32 (ptr)
7632 #      void *ptr;
7633 # {
7634 #   unsigned char *b = ptr;
7635 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7636 # }
7637 #
7638 # int
7639 # main (argc, argv)
7640 #     int argc;
7641 #     char *argv[];
7642 # {
7643 #     int dll;
7644 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7645 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7646 #     unsigned long name_rvas, nexp;
7647 #     unsigned char *expdata, *erva;
7648 #     char *filename, *dll_name;
7649 #
7650 #     filename = argv[1];
7651 #
7652 #     dll = open(filename, O_RDONLY|O_BINARY);
7653 #     if (dll < 1)
7654 #       return 1;
7655 #
7656 #     dll_name = filename;
7657 #
7658 #     for (i=0; filename[i]; i++)
7659 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7660 #           dll_name = filename + i +1;
7661 #
7662 #     pe_header_offset = pe_get32 (dll, 0x3c);
7663 #     opthdr_ofs = pe_header_offset + 4 + 20;
7664 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7665 #
7666 #     if (num_entries < 1) /* no exports */
7667 #       return 1;
7668 #
7669 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7670 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7671 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7672 #     secptr = (pe_header_offset + 4 + 20 +
7673 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7674 #
7675 #     expptr = 0;
7676 #     for (i = 0; i < nsections; i++)
7677 #     {
7678 #       char sname[8];
7679 #       unsigned long secptr1 = secptr + 40 * i;
7680 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7681 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7682 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7683 #       lseek(dll, secptr1, SEEK_SET);
7684 #       read(dll, sname, 8);
7685 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7686 #       {
7687 #           expptr = fptr + (export_rva - vaddr);
7688 #           if (export_rva + export_size > vaddr + vsize)
7689 #               export_size = vsize - (export_rva - vaddr);
7690 #           break;
7691 #       }
7692 #     }
7693 #
7694 #     expdata = (unsigned char*)malloc(export_size);
7695 #     lseek (dll, expptr, SEEK_SET);
7696 #     read (dll, expdata, export_size);
7697 #     erva = expdata - export_rva;
7698 #
7699 #     nexp = pe_as32 (expdata+24);
7700 #     name_rvas = pe_as32 (expdata+32);
7701 #
7702 #     printf ("EXPORTS\n");
7703 #     for (i = 0; i<nexp; i++)
7704 #     {
7705 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7706 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7707 #     }
7708 #
7709 #     return 0;
7710 # }
7711 # /* impgen.c ends here */
7712
7713 EOF
7714     ;;
7715   esac
7716
7717   # We use sed instead of cat because bash on DJGPP gets confused if
7718   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7719   # text mode, it properly converts lines to CR/LF.  This bash problem
7720   # is reportedly fixed, but why not run on old versions too?
7721   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7722
7723   mv -f "${ofile}T" "$ofile" || \
7724     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7725   chmod +x "$ofile"
7726 fi
7727
7728
7729
7730
7731
7732 # This can be used to rebuild libtool when needed
7733 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7734
7735 # Always use our own libtool.
7736 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7737
7738 # Prevent multiple expansion
7739
7740
7741
7742 # test for ln hardlink support
7743 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7744 echo "configure:7745: checking whether ln works" >&5
7745 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   rm -f conftest.src conftest.dst
7749 echo "conftest" > conftest.src
7750 if ln conftest.src conftest.dst 2>/dev/null
7751 then
7752   ol_cv_prog_LN_H="ln"
7753 else
7754   ol_cv_prog_LN_H="cp"
7755 fi
7756 rm -f conftest.src conftest.dst
7757
7758 fi
7759 LN_H="$ol_cv_prog_LN_H"
7760 if test "$ol_cv_prog_LN_H" = "ln"; then
7761         echo "$ac_t""yes" 1>&6
7762 else
7763         echo "$ac_t""no" 1>&6
7764 fi
7765
7766 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7767 echo "configure:7768: checking whether ln -s works" >&5
7768 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7769   echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7771   rm -f conftestdata
7772 if ln -s X conftestdata 2>/dev/null
7773 then
7774   rm -f conftestdata
7775   ac_cv_prog_LN_S="ln -s"
7776 else
7777   ac_cv_prog_LN_S=ln
7778 fi
7779 fi
7780 LN_S="$ac_cv_prog_LN_S"
7781 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7782   echo "$ac_t""yes" 1>&6
7783 else
7784   echo "$ac_t""no" 1>&6
7785 fi
7786
7787
7788 ol_link_perl=no
7789 if test $ol_enable_perl != no ; then
7790         # Extract the first word of "perl", so it can be a program name with args.
7791 set dummy perl; ac_word=$2
7792 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7793 echo "configure:7794: checking for $ac_word" >&5
7794 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7795   echo $ac_n "(cached) $ac_c" 1>&6
7796 else
7797   case "$PERLBIN" in
7798   /*)
7799   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7800   ;;
7801   ?:/*)
7802   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7803   ;;
7804   *)
7805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7806   ac_dummy="$PATH"
7807   for ac_dir in $ac_dummy; do 
7808     test -z "$ac_dir" && ac_dir=.
7809     if test -f $ac_dir/$ac_word; then
7810       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7811       break
7812     fi
7813   done
7814   IFS="$ac_save_ifs"
7815   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7816   ;;
7817 esac
7818 fi
7819 PERLBIN="$ac_cv_path_PERLBIN"
7820 if test -n "$PERLBIN"; then
7821   echo "$ac_t""$PERLBIN" 1>&6
7822 else
7823   echo "$ac_t""no" 1>&6
7824 fi
7825
7826
7827         if test "no$PERLBIN" = "no" ; then
7828                 if test $ol_enable_perl = yes ; then
7829                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7830                 fi
7831
7832         else
7833                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7834                 if test x"$ol_with_perl_module" = "xstatic" ; then
7835                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7836                 else
7837                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7838                 fi
7839                                 ol_link_perl=yes
7840         fi
7841 fi
7842
7843 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7844 echo "configure:7845: checking how to run the C preprocessor" >&5
7845 # On Suns, sometimes $CPP names a directory.
7846 if test -n "$CPP" && test -d "$CPP"; then
7847   CPP=
7848 fi
7849 if test -z "$CPP"; then
7850 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853     # This must be in double quotes, not single quotes, because CPP may get
7854   # substituted into the Makefile and "${CC-cc}" will confuse make.
7855   CPP="${CC-cc} -E"
7856   # On the NeXT, cc -E runs the code through the compiler's parser,
7857   # not just through cpp.
7858   cat > conftest.$ac_ext <<EOF
7859 #line 7860 "configure"
7860 #include "confdefs.h"
7861 #include <assert.h>
7862 Syntax Error
7863 EOF
7864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7865 { (eval echo configure:7866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7867 if test -z "$ac_err"; then
7868   :
7869 else
7870   echo "$ac_err" >&5
7871   echo "configure: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   rm -rf conftest*
7874   CPP="${CC-cc} -E -traditional-cpp"
7875   cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 #include <assert.h>
7879 Syntax Error
7880 EOF
7881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7882 { (eval echo configure:7883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7884 if test -z "$ac_err"; then
7885   :
7886 else
7887   echo "$ac_err" >&5
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891   CPP="${CC-cc} -nologo -E"
7892   cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 #include <assert.h>
7896 Syntax Error
7897 EOF
7898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7899 { (eval echo configure:7900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7901 if test -z "$ac_err"; then
7902   :
7903 else
7904   echo "$ac_err" >&5
7905   echo "configure: failed program was:" >&5
7906   cat conftest.$ac_ext >&5
7907   rm -rf conftest*
7908   CPP=/lib/cpp
7909 fi
7910 rm -f conftest*
7911 fi
7912 rm -f conftest*
7913 fi
7914 rm -f conftest*
7915   ac_cv_prog_CPP="$CPP"
7916 fi
7917   CPP="$ac_cv_prog_CPP"
7918 else
7919   ac_cv_prog_CPP="$CPP"
7920 fi
7921 echo "$ac_t""$CPP" 1>&6
7922
7923
7924 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7925         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7926
7927 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7928         echo "configure: warning: programs compiled here do run here..." 1>&2
7929         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7930
7931 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7932         echo "configure: warning: programs compiled here do not run here..." 1>&2
7933         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7934 fi
7935
7936
7937 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7938 echo "configure:7939: checking for Cygwin environment" >&5
7939 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945
7946 int main() {
7947
7948 #ifndef __CYGWIN__
7949 #define __CYGWIN__ __CYGWIN32__
7950 #endif
7951 return __CYGWIN__;
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7955   rm -rf conftest*
7956   ac_cv_cygwin=yes
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   ac_cv_cygwin=no
7962 fi
7963 rm -f conftest*
7964 fi
7965
7966 echo "$ac_t""$ac_cv_cygwin" 1>&6
7967 CYGWIN=
7968 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7969 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7970 echo "configure:7971: checking for mingw32 environment" >&5
7971 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7972   echo $ac_n "(cached) $ac_c" 1>&6
7973 else
7974   cat > conftest.$ac_ext <<EOF
7975 #line 7976 "configure"
7976 #include "confdefs.h"
7977
7978 int main() {
7979 return __MINGW32__;
7980 ; return 0; }
7981 EOF
7982 if { (eval echo configure:7983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7983   rm -rf conftest*
7984   ac_cv_mingw32=yes
7985 else
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -rf conftest*
7989   ac_cv_mingw32=no
7990 fi
7991 rm -f conftest*
7992 fi
7993
7994 echo "$ac_t""$ac_cv_mingw32" 1>&6
7995 MINGW32=
7996 test "$ac_cv_mingw32" = yes && MINGW32=yes
7997
7998
7999
8000 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8001 echo "configure:8002: checking for executable suffix" >&5
8002 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8003   echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8006   ac_cv_exeext=.exe
8007 else
8008   rm -f conftest*
8009   echo 'int main () { return 0; }' > conftest.$ac_ext
8010   ac_cv_exeext=
8011   if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8012     for file in conftest.*; do
8013       case $file in
8014       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8015       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8016       esac
8017     done
8018   else
8019     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8020   fi
8021   rm -f conftest*
8022   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8023 fi
8024 fi
8025
8026 EXEEXT=""
8027 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8028 echo "$ac_t""${ac_cv_exeext}" 1>&6
8029 ac_exeext=$EXEEXT
8030
8031 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8032 echo "configure:8033: checking for object suffix" >&5
8033 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8034   echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036   rm -f conftest*
8037 echo 'int i = 1;' > conftest.$ac_ext
8038 if { (eval echo configure:8039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8039   for ac_file in conftest.*; do
8040     case $ac_file in
8041     *.c) ;;
8042     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8043     esac
8044   done
8045 else
8046   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8047 fi
8048 rm -f conftest*
8049 fi
8050
8051 echo "$ac_t""$ac_cv_objext" 1>&6
8052 OBJEXT=$ac_cv_objext
8053 ac_objext=$ac_cv_objext
8054
8055
8056 cat >> confdefs.h <<EOF
8057 #define EXEEXT "${EXEEXT}"
8058 EOF
8059
8060
8061 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8062 echo "configure:8063: checking for be_app in -lbe" >&5
8063 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8065   echo $ac_n "(cached) $ac_c" 1>&6
8066 else
8067   ac_save_LIBS="$LIBS"
8068 LIBS="-lbe -lroot -lnet $LIBS"
8069 cat > conftest.$ac_ext <<EOF
8070 #line 8071 "configure"
8071 #include "confdefs.h"
8072 /* Override any gcc2 internal prototype to avoid an error.  */
8073 /* We use char because int might match the return type of a gcc2
8074     builtin and then its argument prototype would still apply.  */
8075 char be_app();
8076
8077 int main() {
8078 be_app()
8079 ; return 0; }
8080 EOF
8081 if { (eval echo configure:8082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8082   rm -rf conftest*
8083   eval "ac_cv_lib_$ac_lib_var=yes"
8084 else
8085   echo "configure: failed program was:" >&5
8086   cat conftest.$ac_ext >&5
8087   rm -rf conftest*
8088   eval "ac_cv_lib_$ac_lib_var=no"
8089 fi
8090 rm -f conftest*
8091 LIBS="$ac_save_LIBS"
8092
8093 fi
8094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8095   echo "$ac_t""yes" 1>&6
8096   LIBS="$LIBS -lbe -lroot -lnet"
8097 else
8098   echo "$ac_t""no" 1>&6
8099 :
8100 fi
8101
8102
8103
8104
8105
8106 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8107 echo "configure:8108: checking for ${CC-cc} option to accept ANSI C" >&5
8108 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8109   echo $ac_n "(cached) $ac_c" 1>&6
8110 else
8111   am_cv_prog_cc_stdc=no
8112 ac_save_CC="$CC"
8113 # Don't try gcc -ansi; that turns off useful extensions and
8114 # breaks some systems' header files.
8115 # AIX                   -qlanglvl=ansi
8116 # Ultrix and OSF/1      -std1
8117 # HP-UX 10.20 and later -Ae
8118 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8119 # SVR4                  -Xc -D__EXTENSIONS__
8120 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8121 do
8122   CC="$ac_save_CC $ac_arg"
8123   cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 #include <stdarg.h>
8127 #include <stdio.h>
8128 #include <sys/types.h>
8129 #include <sys/stat.h>
8130 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8131 struct buf { int x; };
8132 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8133 static char *e (p, i)
8134      char **p;
8135      int i;
8136 {
8137   return p[i];
8138 }
8139 static char *f (char * (*g) (char **, int), char **p, ...)
8140 {
8141   char *s;
8142   va_list v;
8143   va_start (v,p);
8144   s = g (p, va_arg (v,int));
8145   va_end (v);
8146   return s;
8147 }
8148 int test (int i, double x);
8149 struct s1 {int (*f) (int a);};
8150 struct s2 {int (*f) (double a);};
8151 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8152 int argc;
8153 char **argv;
8154
8155 int main() {
8156
8157 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8158
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8162   rm -rf conftest*
8163   am_cv_prog_cc_stdc="$ac_arg"; break
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167 fi
8168 rm -f conftest*
8169 done
8170 CC="$ac_save_CC"
8171
8172 fi
8173
8174 if test -z "$am_cv_prog_cc_stdc"; then
8175   echo "$ac_t""none needed" 1>&6
8176 else
8177   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8178 fi
8179 case "x$am_cv_prog_cc_stdc" in
8180   x|xno) ;;
8181   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8182 esac
8183
8184 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8185         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8186 fi
8187
8188 # test for make depend flag
8189 OL_MKDEP=
8190 OL_MKDEP_FLAGS=
8191 if test -z "${MKDEP}"; then
8192         OL_MKDEP="${CC-cc}"
8193         if test -z "${MKDEP_FLAGS}"; then
8194                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8195 echo "configure:8196: checking for ${OL_MKDEP} depend flag" >&5
8196 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8197   echo $ac_n "(cached) $ac_c" 1>&6
8198 else
8199   
8200                         ol_cv_mkdep=no
8201                         for flag in "-M" "-xM"; do
8202                                 cat > conftest.c <<EOF
8203  noCode;
8204 EOF
8205                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8206                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8207                                 then
8208                                         if test ! -f conftest."${ac_object}" ; then
8209                                                 ol_cv_mkdep=$flag
8210                                                 OL_MKDEP_FLAGS="$flag"
8211                                                 break
8212                                         fi
8213                                 fi
8214                         done
8215                         rm -f conftest*
8216                 
8217 fi
8218
8219 echo "$ac_t""$ol_cv_mkdep" 1>&6
8220         else
8221                 cc_cv_mkdep=yes
8222                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8223         fi
8224 else
8225         cc_cv_mkdep=yes
8226         OL_MKDEP="${MKDEP}"
8227         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8228 fi
8229
8230
8231
8232 if test "${ol_cv_mkdep}" = no ; then
8233         # this will soon become an error
8234         echo "configure: warning: do not know how to generate dependencies" 1>&2
8235 fi
8236
8237 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8238 echo "configure:8239: checking for afopen in -ls" >&5
8239 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8240 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8241   echo $ac_n "(cached) $ac_c" 1>&6
8242 else
8243   ac_save_LIBS="$LIBS"
8244 LIBS="-ls  $LIBS"
8245 cat > conftest.$ac_ext <<EOF
8246 #line 8247 "configure"
8247 #include "confdefs.h"
8248 /* Override any gcc2 internal prototype to avoid an error.  */
8249 /* We use char because int might match the return type of a gcc2
8250     builtin and then its argument prototype would still apply.  */
8251 char afopen();
8252
8253 int main() {
8254 afopen()
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8258   rm -rf conftest*
8259   eval "ac_cv_lib_$ac_lib_var=yes"
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   eval "ac_cv_lib_$ac_lib_var=no"
8265 fi
8266 rm -f conftest*
8267 LIBS="$ac_save_LIBS"
8268
8269 fi
8270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8271   echo "$ac_t""yes" 1>&6
8272   
8273         AUTH_LIBS=-ls
8274         cat >> confdefs.h <<\EOF
8275 #define HAVE_AIX_SECURITY 1
8276 EOF
8277
8278
8279 else
8280   echo "$ac_t""no" 1>&6
8281 fi
8282
8283
8284 case "$target" in
8285 *-ibm-openedition)
8286         ac_cv_func_getopt=no
8287         cat >> confdefs.h <<\EOF
8288 #define BOTH_STRINGS_H 1
8289 EOF
8290
8291         ;;
8292 esac
8293
8294 ol_link_modules=no
8295 if test $ol_enable_modules != no ; then
8296         for ac_hdr in ltdl.h
8297 do
8298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8300 echo "configure:8301: checking for $ac_hdr" >&5
8301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8302   echo $ac_n "(cached) $ac_c" 1>&6
8303 else
8304   cat > conftest.$ac_ext <<EOF
8305 #line 8306 "configure"
8306 #include "confdefs.h"
8307 #include <$ac_hdr>
8308 EOF
8309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8310 { (eval echo configure:8311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8312 if test -z "$ac_err"; then
8313   rm -rf conftest*
8314   eval "ac_cv_header_$ac_safe=yes"
8315 else
8316   echo "$ac_err" >&5
8317   echo "configure: failed program was:" >&5
8318   cat conftest.$ac_ext >&5
8319   rm -rf conftest*
8320   eval "ac_cv_header_$ac_safe=no"
8321 fi
8322 rm -f conftest*
8323 fi
8324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8325   echo "$ac_t""yes" 1>&6
8326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8327   cat >> confdefs.h <<EOF
8328 #define $ac_tr_hdr 1
8329 EOF
8330  
8331 else
8332   echo "$ac_t""no" 1>&6
8333 fi
8334 done
8335
8336
8337         if test $ac_cv_header_ltdl_h = no ; then
8338                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8339         fi
8340
8341         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8342 echo "configure:8343: checking for lt_dlinit in -lltdl" >&5
8343 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8344 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8345   echo $ac_n "(cached) $ac_c" 1>&6
8346 else
8347   ac_save_LIBS="$LIBS"
8348 LIBS="-lltdl  $LIBS"
8349 cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 /* Override any gcc2 internal prototype to avoid an error.  */
8353 /* We use char because int might match the return type of a gcc2
8354     builtin and then its argument prototype would still apply.  */
8355 char lt_dlinit();
8356
8357 int main() {
8358 lt_dlinit()
8359 ; return 0; }
8360 EOF
8361 if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8362   rm -rf conftest*
8363   eval "ac_cv_lib_$ac_lib_var=yes"
8364 else
8365   echo "configure: failed program was:" >&5
8366   cat conftest.$ac_ext >&5
8367   rm -rf conftest*
8368   eval "ac_cv_lib_$ac_lib_var=no"
8369 fi
8370 rm -f conftest*
8371 LIBS="$ac_save_LIBS"
8372
8373 fi
8374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8375   echo "$ac_t""yes" 1>&6
8376   
8377                 MODULES_LIBS=-lltdl
8378                 cat >> confdefs.h <<\EOF
8379 #define HAVE_LIBLTDL 1
8380 EOF
8381
8382         
8383 else
8384   echo "$ac_t""no" 1>&6
8385 fi
8386
8387
8388         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8389                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8390         fi
8391         ol_link_modules=yes
8392 else
8393         ol_with_bdb_module=static
8394         ol_with_dnssrv_module=static
8395         ol_with_hdb_module=static
8396         ol_with_ldap_module=static
8397         ol_with_ldbm_module=static
8398         ol_with_meta_module=static
8399         ol_with_monitor_module=static
8400         ol_with_null_module=static
8401         ol_with_passwd_module=static
8402         ol_with_perl_module=static
8403         ol_with_shell_module=static
8404         ol_with_sql_module=static
8405 fi
8406
8407 # test for EBCDIC
8408 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8409 echo "configure:8410: checking for EBCDIC" >&5
8410 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8411   echo $ac_n "(cached) $ac_c" 1>&6
8412 else
8413   
8414         cat > conftest.$ac_ext <<EOF
8415 #line 8416 "configure"
8416 #include "confdefs.h"
8417
8418 #if !('M' == 0xd4)
8419 #include <__ASCII__/generate_error.h>
8420 #endif
8421
8422 EOF
8423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8424 { (eval echo configure:8425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8426 if test -z "$ac_err"; then
8427   rm -rf conftest*
8428   ol_cv_cpp_ebcdic=yes
8429 else
8430   echo "$ac_err" >&5
8431   echo "configure: failed program was:" >&5
8432   cat conftest.$ac_ext >&5
8433   rm -rf conftest*
8434   ol_cv_cpp_ebcdic=no
8435 fi
8436 rm -f conftest*
8437 fi
8438
8439 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8440 if test $ol_cv_cpp_ebcdic = yes ; then
8441         cat >> confdefs.h <<\EOF
8442 #define HAVE_EBCDIC 1
8443 EOF
8444
8445 fi
8446
8447 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8448 echo "configure:8449: checking for ANSI C header files" >&5
8449 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8450   echo $ac_n "(cached) $ac_c" 1>&6
8451 else
8452   cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 #include <stdlib.h>
8456 #include <stdarg.h>
8457 #include <string.h>
8458 #include <float.h>
8459 EOF
8460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8461 { (eval echo configure:8462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8463 if test -z "$ac_err"; then
8464   rm -rf conftest*
8465   ol_cv_header_stdc=yes
8466 else
8467   echo "$ac_err" >&5
8468   echo "configure: failed program was:" >&5
8469   cat conftest.$ac_ext >&5
8470   rm -rf conftest*
8471   ol_cv_header_stdc=no
8472 fi
8473 rm -f conftest*
8474
8475 if test $ol_cv_header_stdc = yes; then
8476   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8477 cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <string.h>
8481 EOF
8482 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8483   egrep "memchr" >/dev/null 2>&1; then
8484   :
8485 else
8486   rm -rf conftest*
8487   ol_cv_header_stdc=no
8488 fi
8489 rm -f conftest*
8490
8491 fi
8492
8493 if test $ol_cv_header_stdc = yes; then
8494   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8495 cat > conftest.$ac_ext <<EOF
8496 #line 8497 "configure"
8497 #include "confdefs.h"
8498 #include <stdlib.h>
8499 EOF
8500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8501   egrep "free" >/dev/null 2>&1; then
8502   :
8503 else
8504   rm -rf conftest*
8505   ol_cv_header_stdc=no
8506 fi
8507 rm -f conftest*
8508
8509 fi
8510
8511 if test $ol_cv_header_stdc = yes; then
8512   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8513 if test "$cross_compiling" = yes; then
8514   :
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <ctype.h>
8520 #ifndef HAVE_EBCDIC
8521 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8522 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8523 #else
8524 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8525                 || ('j' <= (c) && (c) <= 'r') \
8526                 || ('s' <= (c) && (c) <= 'z'))
8527 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8528 #endif
8529 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8530 int main () { int i; for (i = 0; i < 256; i++)
8531 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8532 exit (0); }
8533
8534 EOF
8535 if { (eval echo configure:8536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8536 then
8537   :
8538 else
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -fr conftest*
8542   ol_cv_header_stdc=no
8543 fi
8544 rm -fr conftest*
8545 fi
8546
8547 fi
8548 fi
8549
8550 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8551 if test $ol_cv_header_stdc = yes; then
8552   cat >> confdefs.h <<\EOF
8553 #define STDC_HEADERS 1
8554 EOF
8555
8556 fi
8557 ac_cv_header_stdc=disable
8558
8559
8560 if test $ol_cv_header_stdc != yes; then
8561         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8562 fi
8563
8564 ac_header_dirent=no
8565 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8566 do
8567 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8568 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8569 echo "configure:8570: checking for $ac_hdr that defines DIR" >&5
8570 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8571   echo $ac_n "(cached) $ac_c" 1>&6
8572 else
8573   cat > conftest.$ac_ext <<EOF
8574 #line 8575 "configure"
8575 #include "confdefs.h"
8576 #include <sys/types.h>
8577 #include <$ac_hdr>
8578 int main() {
8579 DIR *dirp = 0;
8580 ; return 0; }
8581 EOF
8582 if { (eval echo configure:8583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8583   rm -rf conftest*
8584   eval "ac_cv_header_dirent_$ac_safe=yes"
8585 else
8586   echo "configure: failed program was:" >&5
8587   cat conftest.$ac_ext >&5
8588   rm -rf conftest*
8589   eval "ac_cv_header_dirent_$ac_safe=no"
8590 fi
8591 rm -f conftest*
8592 fi
8593 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8594   echo "$ac_t""yes" 1>&6
8595     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8596   cat >> confdefs.h <<EOF
8597 #define $ac_tr_hdr 1
8598 EOF
8599  ac_header_dirent=$ac_hdr; break
8600 else
8601   echo "$ac_t""no" 1>&6
8602 fi
8603 done
8604 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8605 if test $ac_header_dirent = dirent.h; then
8606 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8607 echo "configure:8608: checking for opendir in -ldir" >&5
8608 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8610   echo $ac_n "(cached) $ac_c" 1>&6
8611 else
8612   ac_save_LIBS="$LIBS"
8613 LIBS="-ldir  $LIBS"
8614 cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617 /* Override any gcc2 internal prototype to avoid an error.  */
8618 /* We use char because int might match the return type of a gcc2
8619     builtin and then its argument prototype would still apply.  */
8620 char opendir();
8621
8622 int main() {
8623 opendir()
8624 ; return 0; }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8627   rm -rf conftest*
8628   eval "ac_cv_lib_$ac_lib_var=yes"
8629 else
8630   echo "configure: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   rm -rf conftest*
8633   eval "ac_cv_lib_$ac_lib_var=no"
8634 fi
8635 rm -f conftest*
8636 LIBS="$ac_save_LIBS"
8637
8638 fi
8639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8640   echo "$ac_t""yes" 1>&6
8641   LIBS="$LIBS -ldir"
8642 else
8643   echo "$ac_t""no" 1>&6
8644 fi
8645
8646 else
8647 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8648 echo "configure:8649: checking for opendir in -lx" >&5
8649 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8650 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8651   echo $ac_n "(cached) $ac_c" 1>&6
8652 else
8653   ac_save_LIBS="$LIBS"
8654 LIBS="-lx  $LIBS"
8655 cat > conftest.$ac_ext <<EOF
8656 #line 8657 "configure"
8657 #include "confdefs.h"
8658 /* Override any gcc2 internal prototype to avoid an error.  */
8659 /* We use char because int might match the return type of a gcc2
8660     builtin and then its argument prototype would still apply.  */
8661 char opendir();
8662
8663 int main() {
8664 opendir()
8665 ; return 0; }
8666 EOF
8667 if { (eval echo configure:8668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8668   rm -rf conftest*
8669   eval "ac_cv_lib_$ac_lib_var=yes"
8670 else
8671   echo "configure: failed program was:" >&5
8672   cat conftest.$ac_ext >&5
8673   rm -rf conftest*
8674   eval "ac_cv_lib_$ac_lib_var=no"
8675 fi
8676 rm -f conftest*
8677 LIBS="$ac_save_LIBS"
8678
8679 fi
8680 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8681   echo "$ac_t""yes" 1>&6
8682   LIBS="$LIBS -lx"
8683 else
8684   echo "$ac_t""no" 1>&6
8685 fi
8686
8687 fi
8688
8689 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8690 echo "configure:8691: checking for sys/wait.h that is POSIX.1 compatible" >&5
8691 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8692   echo $ac_n "(cached) $ac_c" 1>&6
8693 else
8694   cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 #include <sys/types.h>
8698 #include <sys/wait.h>
8699 #ifndef WEXITSTATUS
8700 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8701 #endif
8702 #ifndef WIFEXITED
8703 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8704 #endif
8705 int main() {
8706 int s;
8707 wait (&s);
8708 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8709 ; return 0; }
8710 EOF
8711 if { (eval echo configure:8712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8712   rm -rf conftest*
8713   ac_cv_header_sys_wait_h=yes
8714 else
8715   echo "configure: failed program was:" >&5
8716   cat conftest.$ac_ext >&5
8717   rm -rf conftest*
8718   ac_cv_header_sys_wait_h=no
8719 fi
8720 rm -f conftest*
8721 fi
8722
8723 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8724 if test $ac_cv_header_sys_wait_h = yes; then
8725   cat >> confdefs.h <<\EOF
8726 #define HAVE_SYS_WAIT_H 1
8727 EOF
8728
8729 fi
8730
8731 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8732 echo "configure:8733: checking POSIX termios" >&5
8733 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8734   echo $ac_n "(cached) $ac_c" 1>&6
8735 else
8736   cat > conftest.$ac_ext <<EOF
8737 #line 8738 "configure"
8738 #include "confdefs.h"
8739 #include <sys/types.h>
8740 #include <unistd.h>
8741 #include <termios.h>
8742 int main() {
8743 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8744    tcgetattr(0, 0);
8745 ; return 0; }
8746 EOF
8747 if { (eval echo configure:8748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8748   rm -rf conftest*
8749   am_cv_sys_posix_termios=yes
8750 else
8751   echo "configure: failed program was:" >&5
8752   cat conftest.$ac_ext >&5
8753   rm -rf conftest*
8754   am_cv_sys_posix_termios=no
8755 fi
8756 rm -f conftest*
8757 fi
8758
8759 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8760
8761
8762  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8763 echo "configure:8764: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8764 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8765   echo $ac_n "(cached) $ac_c" 1>&6
8766 else
8767   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8768
8769   gwinsz_in_termios_h=no
8770   if test $am_cv_sys_posix_termios = yes; then
8771     cat > conftest.$ac_ext <<EOF
8772 #line 8773 "configure"
8773 #include "confdefs.h"
8774 #include <sys/types.h>
8775 #     include <termios.h>
8776 #     ifdef TIOCGWINSZ
8777         yes
8778 #     endif
8779     
8780 EOF
8781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8782   egrep "yes" >/dev/null 2>&1; then
8783   rm -rf conftest*
8784   gwinsz_in_termios_h=yes
8785 fi
8786 rm -f conftest*
8787
8788   fi
8789
8790   if test $gwinsz_in_termios_h = no; then
8791     cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 #include <sys/types.h>
8795 #     include <sys/ioctl.h>
8796 #     ifdef TIOCGWINSZ
8797         yes
8798 #     endif
8799     
8800 EOF
8801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8802   egrep "yes" >/dev/null 2>&1; then
8803   rm -rf conftest*
8804   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8805 fi
8806 rm -f conftest*
8807
8808   fi
8809   
8810 fi
8811
8812 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8813   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8814     cat >> confdefs.h <<\EOF
8815 #define GWINSZ_IN_SYS_IOCTL 1
8816 EOF
8817
8818   fi
8819
8820 if test $am_cv_sys_posix_termios = yes ; then
8821         cat >> confdefs.h <<\EOF
8822 #define HAVE_POSIX_TERMIOS 1
8823 EOF
8824
8825 fi
8826
8827 for ac_hdr in \
8828         arpa/inet.h             \
8829         arpa/nameser.h  \
8830         assert.h                \
8831         conio.h                 \
8832         crypt.h                 \
8833         direct.h                \
8834         errno.h                 \
8835         fcntl.h                 \
8836         filio.h                 \
8837         getopt.h                \
8838         grp.h                   \
8839         io.h                    \
8840         libutil.h               \
8841         limits.h                \
8842         locale.h                \
8843         netinet/tcp.h   \
8844         malloc.h                \
8845         memory.h                \
8846         psap.h                  \
8847         pwd.h                   \
8848         process.h               \
8849         resolv.h                \
8850         sgtty.h                 \
8851         shadow.h                \
8852         stddef.h                \
8853         string.h                \
8854         strings.h               \
8855         sysexits.h              \
8856         sys/file.h              \
8857         sys/filio.h             \
8858         sys/errno.h             \
8859         sys/ioctl.h             \
8860         sys/param.h             \
8861         sys/resource.h  \
8862         sys/select.h    \
8863         sys/socket.h    \
8864         sys/stat.h              \
8865         sys/syslog.h    \
8866         sys/time.h              \
8867         sys/types.h             \
8868         sys/ucred.h             \
8869         sys/uio.h               \
8870         syslog.h                \
8871         termios.h               \
8872         unistd.h                \
8873         winsock.h               \
8874         winsock2.h              \
8875
8876 do
8877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8879 echo "configure:8880: checking for $ac_hdr" >&5
8880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8881   echo $ac_n "(cached) $ac_c" 1>&6
8882 else
8883   cat > conftest.$ac_ext <<EOF
8884 #line 8885 "configure"
8885 #include "confdefs.h"
8886 #include <$ac_hdr>
8887 EOF
8888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8889 { (eval echo configure:8890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8891 if test -z "$ac_err"; then
8892   rm -rf conftest*
8893   eval "ac_cv_header_$ac_safe=yes"
8894 else
8895   echo "$ac_err" >&5
8896   echo "configure: failed program was:" >&5
8897   cat conftest.$ac_ext >&5
8898   rm -rf conftest*
8899   eval "ac_cv_header_$ac_safe=no"
8900 fi
8901 rm -f conftest*
8902 fi
8903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8904   echo "$ac_t""yes" 1>&6
8905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8906   cat >> confdefs.h <<EOF
8907 #define $ac_tr_hdr 1
8908 EOF
8909  
8910 else
8911   echo "$ac_t""no" 1>&6
8912 fi
8913 done
8914
8915
8916
8917
8918 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8919 echo "configure:8920: checking for dlopen" >&5
8920 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8921   echo $ac_n "(cached) $ac_c" 1>&6
8922 else
8923   cat > conftest.$ac_ext <<EOF
8924 #line 8925 "configure"
8925 #include "confdefs.h"
8926 /* System header to define __stub macros and hopefully few prototypes,
8927     which can conflict with char dlopen(); below.  */
8928 #include <assert.h>
8929 /* Override any gcc2 internal prototype to avoid an error.  */
8930 /* We use char because int might match the return type of a gcc2
8931     builtin and then its argument prototype would still apply.  */
8932 char dlopen();
8933 char (*f)();
8934
8935 int main() {
8936
8937 /* The GNU C library defines this for functions which it implements
8938     to always fail with ENOSYS.  Some functions are actually named
8939     something starting with __ and the normal name is an alias.  */
8940 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8941 choke me
8942 #else
8943 f = dlopen;
8944 #endif
8945
8946 ; return 0; }
8947 EOF
8948 if { (eval echo configure:8949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8949   rm -rf conftest*
8950   eval "ac_cv_func_dlopen=yes"
8951 else
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -rf conftest*
8955   eval "ac_cv_func_dlopen=no"
8956 fi
8957 rm -f conftest*
8958 fi
8959
8960 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962   :
8963 else
8964   echo "$ac_t""no" 1>&6
8965 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8966 echo "configure:8967: checking for dlopen in -ldl" >&5
8967 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8969   echo $ac_n "(cached) $ac_c" 1>&6
8970 else
8971   ac_save_LIBS="$LIBS"
8972 LIBS="-ldl  $LIBS"
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 /* Override any gcc2 internal prototype to avoid an error.  */
8977 /* We use char because int might match the return type of a gcc2
8978     builtin and then its argument prototype would still apply.  */
8979 char dlopen();
8980
8981 int main() {
8982 dlopen()
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   eval "ac_cv_lib_$ac_lib_var=yes"
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=no"
8993 fi
8994 rm -f conftest*
8995 LIBS="$ac_save_LIBS"
8996
8997 fi
8998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8999   echo "$ac_t""yes" 1>&6
9000     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9001     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9002   cat >> confdefs.h <<EOF
9003 #define $ac_tr_lib 1
9004 EOF
9005
9006   LIBS="-ldl $LIBS"
9007
9008 else
9009   echo "$ac_t""no" 1>&6
9010 fi
9011
9012 fi
9013
9014
9015 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9016 echo "configure:9017: checking for sigset in -lV3" >&5
9017 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9018 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9019   echo $ac_n "(cached) $ac_c" 1>&6
9020 else
9021   ac_save_LIBS="$LIBS"
9022 LIBS="-lV3  $LIBS"
9023 cat > conftest.$ac_ext <<EOF
9024 #line 9025 "configure"
9025 #include "confdefs.h"
9026 /* Override any gcc2 internal prototype to avoid an error.  */
9027 /* We use char because int might match the return type of a gcc2
9028     builtin and then its argument prototype would still apply.  */
9029 char sigset();
9030
9031 int main() {
9032 sigset()
9033 ; return 0; }
9034 EOF
9035 if { (eval echo configure:9036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9036   rm -rf conftest*
9037   eval "ac_cv_lib_$ac_lib_var=yes"
9038 else
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   eval "ac_cv_lib_$ac_lib_var=no"
9043 fi
9044 rm -f conftest*
9045 LIBS="$ac_save_LIBS"
9046
9047 fi
9048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9049   echo "$ac_t""yes" 1>&6
9050     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9051     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9052   cat >> confdefs.h <<EOF
9053 #define $ac_tr_lib 1
9054 EOF
9055
9056   LIBS="-lV3 $LIBS"
9057
9058 else
9059   echo "$ac_t""no" 1>&6
9060 fi
9061
9062
9063 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9064 echo "configure:9065: checking for winsock" >&5
9065 save_LIBS="$LIBS"
9066 for curlib in ws2_32 wsock32; do
9067         LIBS="$LIBS -l$curlib"
9068         cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071
9072                         char socket@12();
9073                         char select@20();
9074                         char closesocket@4();
9075                         char gethostname@8();
9076                         
9077 int main() {
9078
9079                         socket@12();
9080                         select@20();
9081                         closesocket@4();
9082                         gethostname@8();
9083                         
9084 ; return 0; }
9085 EOF
9086 if { (eval echo configure:9087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9087   rm -rf conftest*
9088   have_winsock=yes
9089 else
9090   echo "configure: failed program was:" >&5
9091   cat conftest.$ac_ext >&5
9092   rm -rf conftest*
9093   have_winsock=no
9094 fi
9095 rm -f conftest*
9096
9097         if test $have_winsock = yes; then
9098                 cat >> confdefs.h <<\EOF
9099 #define HAVE_WINSOCK 1
9100 EOF
9101
9102                 ac_cv_func_socket=yes
9103                 ac_cv_func_select=yes
9104                 ac_cv_func_closesocket=yes
9105                 ac_cv_func_gethostname=yes
9106                 if test $curlib = ws2_32; then
9107                         have_winsock=winsock2
9108                         cat >> confdefs.h <<\EOF
9109 #define HAVE_WINSOCK2 1
9110 EOF
9111
9112                 fi
9113                 break
9114         fi
9115         LIBS="$save_LIBS"
9116 done
9117 echo "$ac_t""$have_winsock" 1>&6
9118
9119
9120 echo $ac_n "checking for socket""... $ac_c" 1>&6
9121 echo "configure:9122: checking for socket" >&5
9122 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 /* System header to define __stub macros and hopefully few prototypes,
9129     which can conflict with char socket(); below.  */
9130 #include <assert.h>
9131 /* Override any gcc2 internal prototype to avoid an error.  */
9132 /* We use char because int might match the return type of a gcc2
9133     builtin and then its argument prototype would still apply.  */
9134 char socket();
9135 char (*f)();
9136
9137 int main() {
9138
9139 /* The GNU C library defines this for functions which it implements
9140     to always fail with ENOSYS.  Some functions are actually named
9141     something starting with __ and the normal name is an alias.  */
9142 #if defined (__stub_socket) || defined (__stub___socket)
9143 choke me
9144 #else
9145 f = socket;
9146 #endif
9147
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9151   rm -rf conftest*
9152   eval "ac_cv_func_socket=yes"
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_func_socket=no"
9158 fi
9159 rm -f conftest*
9160 fi
9161
9162 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164   :
9165 else
9166   echo "$ac_t""no" 1>&6
9167         
9168         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9169 echo "configure:9170: checking for main in -lsocket" >&5
9170 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   ac_save_LIBS="$LIBS"
9175 LIBS="-lsocket  $LIBS"
9176 cat > conftest.$ac_ext <<EOF
9177 #line 9178 "configure"
9178 #include "confdefs.h"
9179
9180 int main() {
9181 main()
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9185   rm -rf conftest*
9186   eval "ac_cv_lib_$ac_lib_var=yes"
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   eval "ac_cv_lib_$ac_lib_var=no"
9192 fi
9193 rm -f conftest*
9194 LIBS="$ac_save_LIBS"
9195
9196 fi
9197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9198   echo "$ac_t""yes" 1>&6
9199     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9200     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9201   cat >> confdefs.h <<EOF
9202 #define $ac_tr_lib 1
9203 EOF
9204
9205   LIBS="-lsocket $LIBS"
9206
9207 else
9208   echo "$ac_t""no" 1>&6
9209 fi
9210
9211         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9212 echo "configure:9213: checking for main in -lnet" >&5
9213 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   ac_save_LIBS="$LIBS"
9218 LIBS="-lnet  $LIBS"
9219 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222
9223 int main() {
9224 main()
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_lib_$ac_lib_var=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_lib_$ac_lib_var=no"
9235 fi
9236 rm -f conftest*
9237 LIBS="$ac_save_LIBS"
9238
9239 fi
9240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9241   echo "$ac_t""yes" 1>&6
9242     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9243     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9244   cat >> confdefs.h <<EOF
9245 #define $ac_tr_lib 1
9246 EOF
9247
9248   LIBS="-lnet $LIBS"
9249
9250 else
9251   echo "$ac_t""no" 1>&6
9252 fi
9253
9254         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9255 echo "configure:9256: checking for main in -lnsl_s" >&5
9256 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260   ac_save_LIBS="$LIBS"
9261 LIBS="-lnsl_s  $LIBS"
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265
9266 int main() {
9267 main()
9268 ; return 0; }
9269 EOF
9270 if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9271   rm -rf conftest*
9272   eval "ac_cv_lib_$ac_lib_var=yes"
9273 else
9274   echo "configure: failed program was:" >&5
9275   cat conftest.$ac_ext >&5
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=no"
9278 fi
9279 rm -f conftest*
9280 LIBS="$ac_save_LIBS"
9281
9282 fi
9283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9284   echo "$ac_t""yes" 1>&6
9285     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9287   cat >> confdefs.h <<EOF
9288 #define $ac_tr_lib 1
9289 EOF
9290
9291   LIBS="-lnsl_s $LIBS"
9292
9293 else
9294   echo "$ac_t""no" 1>&6
9295 fi
9296
9297         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9298 echo "configure:9299: checking for main in -lnsl" >&5
9299 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   ac_save_LIBS="$LIBS"
9304 LIBS="-lnsl  $LIBS"
9305 cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308
9309 int main() {
9310 main()
9311 ; return 0; }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9314   rm -rf conftest*
9315   eval "ac_cv_lib_$ac_lib_var=yes"
9316 else
9317   echo "configure: failed program was:" >&5
9318   cat conftest.$ac_ext >&5
9319   rm -rf conftest*
9320   eval "ac_cv_lib_$ac_lib_var=no"
9321 fi
9322 rm -f conftest*
9323 LIBS="$ac_save_LIBS"
9324
9325 fi
9326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9327   echo "$ac_t""yes" 1>&6
9328     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9330   cat >> confdefs.h <<EOF
9331 #define $ac_tr_lib 1
9332 EOF
9333
9334   LIBS="-lnsl $LIBS"
9335
9336 else
9337   echo "$ac_t""no" 1>&6
9338 fi
9339
9340         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9341 echo "configure:9342: checking for socket in -linet" >&5
9342 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   ac_save_LIBS="$LIBS"
9347 LIBS="-linet  $LIBS"
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351 /* Override any gcc2 internal prototype to avoid an error.  */
9352 /* We use char because int might match the return type of a gcc2
9353     builtin and then its argument prototype would still apply.  */
9354 char socket();
9355
9356 int main() {
9357 socket()
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9361   rm -rf conftest*
9362   eval "ac_cv_lib_$ac_lib_var=yes"
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   eval "ac_cv_lib_$ac_lib_var=no"
9368 fi
9369 rm -f conftest*
9370 LIBS="$ac_save_LIBS"
9371
9372 fi
9373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9374   echo "$ac_t""yes" 1>&6
9375     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9376     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9377   cat >> confdefs.h <<EOF
9378 #define $ac_tr_lib 1
9379 EOF
9380
9381   LIBS="-linet $LIBS"
9382
9383 else
9384   echo "$ac_t""no" 1>&6
9385 fi
9386
9387         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9388 echo "configure:9389: checking for main in -lgen" >&5
9389 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9391   echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393   ac_save_LIBS="$LIBS"
9394 LIBS="-lgen  $LIBS"
9395 cat > conftest.$ac_ext <<EOF
9396 #line 9397 "configure"
9397 #include "confdefs.h"
9398
9399 int main() {
9400 main()
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9404   rm -rf conftest*
9405   eval "ac_cv_lib_$ac_lib_var=yes"
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -rf conftest*
9410   eval "ac_cv_lib_$ac_lib_var=no"
9411 fi
9412 rm -f conftest*
9413 LIBS="$ac_save_LIBS"
9414
9415 fi
9416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9417   echo "$ac_t""yes" 1>&6
9418     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9419     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9420   cat >> confdefs.h <<EOF
9421 #define $ac_tr_lib 1
9422 EOF
9423
9424   LIBS="-lgen $LIBS"
9425
9426 else
9427   echo "$ac_t""no" 1>&6
9428 fi
9429
9430
9431 fi
9432
9433
9434 echo $ac_n "checking for select""... $ac_c" 1>&6
9435 echo "configure:9436: checking for select" >&5
9436 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439   cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442 /* System header to define __stub macros and hopefully few prototypes,
9443     which can conflict with char select(); below.  */
9444 #include <assert.h>
9445 /* Override any gcc2 internal prototype to avoid an error.  */
9446 /* We use char because int might match the return type of a gcc2
9447     builtin and then its argument prototype would still apply.  */
9448 char select();
9449 char (*f)();
9450
9451 int main() {
9452
9453 /* The GNU C library defines this for functions which it implements
9454     to always fail with ENOSYS.  Some functions are actually named
9455     something starting with __ and the normal name is an alias.  */
9456 #if defined (__stub_select) || defined (__stub___select)
9457 choke me
9458 #else
9459 f = select;
9460 #endif
9461
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9465   rm -rf conftest*
9466   eval "ac_cv_func_select=yes"
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_func_select=no"
9472 fi
9473 rm -f conftest*
9474 fi
9475
9476 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9477   echo "$ac_t""yes" 1>&6
9478   :
9479 else
9480   echo "$ac_t""no" 1>&6
9481 { echo "configure: error: select() required." 1>&2; exit 1; }
9482 fi
9483
9484
9485 if test "${ac_cv_header_winsock_h}" != yes; then
9486                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9487 echo "configure:9488: checking types of arguments for select()" >&5
9488  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9498      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9499       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9500        cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #ifdef HAVE_SYS_TYPES_H
9504 #include <sys/types.h>
9505 #endif
9506 #ifdef HAVE_SYS_TIME_H
9507 #include <sys/time.h>
9508 #endif
9509 #ifdef HAVE_SYS_SELECT_H
9510 #include <sys/select.h>
9511 #endif
9512 #ifdef HAVE_SYS_SOCKET_H
9513 #include <sys/socket.h>
9514 #endif
9515 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);
9516 int main() {
9517
9518 ; return 0; }
9519 EOF
9520 if { (eval echo configure:9521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9521   rm -rf conftest*
9522           ac_not_found=no ; break 3
9523 else
9524   echo "configure: failed program was:" >&5
9525   cat conftest.$ac_ext >&5
9526   rm -rf conftest*
9527   ac_not_found=yes
9528 fi
9529 rm -f conftest*
9530       done
9531      done
9532     done
9533    
9534 fi
9535   
9536 fi
9537  
9538 fi
9539  if test "$ac_not_found" = yes; then
9540   ac_cv_func_select_arg1=int 
9541   ac_cv_func_select_arg234='int *' 
9542   ac_cv_func_select_arg5='struct timeval *'
9543  fi
9544  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9545  cat >> confdefs.h <<EOF
9546 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9547 EOF
9548
9549  cat >> confdefs.h <<EOF
9550 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9551 EOF
9552
9553  cat >> confdefs.h <<EOF
9554 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9555 EOF
9556
9557
9558 fi
9559
9560
9561 for ac_hdr in regex.h 
9562 do
9563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9565 echo "configure:9566: checking for $ac_hdr" >&5
9566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9567   echo $ac_n "(cached) $ac_c" 1>&6
9568 else
9569   cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572 #include <$ac_hdr>
9573 EOF
9574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9575 { (eval echo configure:9576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9577 if test -z "$ac_err"; then
9578   rm -rf conftest*
9579   eval "ac_cv_header_$ac_safe=yes"
9580 else
9581   echo "$ac_err" >&5
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   eval "ac_cv_header_$ac_safe=no"
9586 fi
9587 rm -f conftest*
9588 fi
9589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9592   cat >> confdefs.h <<EOF
9593 #define $ac_tr_hdr 1
9594 EOF
9595  
9596 else
9597   echo "$ac_t""no" 1>&6
9598 fi
9599 done
9600
9601 if test "$ac_cv_header_regex_h" != yes ; then
9602         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9603 fi
9604
9605 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9606 echo "configure:9607: checking for library containing regfree" >&5
9607 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9608   echo $ac_n "(cached) $ac_c" 1>&6
9609 else
9610   ac_func_search_save_LIBS="$LIBS"
9611 ac_cv_search_regfree="no"
9612 cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 /* Override any gcc2 internal prototype to avoid an error.  */
9616 /* We use char because int might match the return type of a gcc2
9617     builtin and then its argument prototype would still apply.  */
9618 char regfree();
9619
9620 int main() {
9621 regfree()
9622 ; return 0; }
9623 EOF
9624 if { (eval echo configure:9625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9625   rm -rf conftest*
9626   ac_cv_search_regfree="none required"
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630 fi
9631 rm -f conftest*
9632 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9633 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char regfree();
9641
9642 int main() {
9643 regfree()
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   ac_cv_search_regfree="-l$ac_lib"
9649 break
9650 else
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653 fi
9654 rm -f conftest*
9655 done
9656 LIBS="$ac_func_search_save_LIBS"
9657 fi
9658
9659 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9660 if test "$ac_cv_search_regfree" != "no"; then
9661   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9662   :
9663 else :
9664   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9665 fi
9666
9667
9668 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9669 echo "configure:9670: checking for compatible POSIX regex" >&5
9670 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   
9674         if test "$cross_compiling" = yes; then
9675   ol_cv_c_posix_regex=cross
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680
9681 #include <sys/types.h>
9682 #include <regex.h>
9683 static char *pattern, *string;
9684 main()
9685 {
9686         int rc;
9687         regex_t re;
9688
9689         pattern = "^A";
9690
9691         if(regcomp(&re, pattern, 0)) {
9692                 return -1;
9693         }
9694         
9695         string = "ALL MATCH";
9696         
9697         rc = regexec(&re, string, 0, (void*)0, 0);
9698
9699         regfree(&re);
9700
9701         return rc;
9702 }
9703 EOF
9704 if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9705 then
9706   ol_cv_c_posix_regex=yes
9707 else
9708   echo "configure: failed program was:" >&5
9709   cat conftest.$ac_ext >&5
9710   rm -fr conftest*
9711   ol_cv_c_posix_regex=no
9712 fi
9713 rm -fr conftest*
9714 fi
9715
9716 fi
9717
9718 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9719
9720 if test "$ol_cv_c_posix_regex" = no ; then
9721         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9722 fi
9723
9724
9725 have_uuid=no
9726 for ac_hdr in sys/uuid.h
9727 do
9728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9730 echo "configure:9731: checking for $ac_hdr" >&5
9731 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737 #include <$ac_hdr>
9738 EOF
9739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9740 { (eval echo configure:9741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9742 if test -z "$ac_err"; then
9743   rm -rf conftest*
9744   eval "ac_cv_header_$ac_safe=yes"
9745 else
9746   echo "$ac_err" >&5
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -rf conftest*
9750   eval "ac_cv_header_$ac_safe=no"
9751 fi
9752 rm -f conftest*
9753 fi
9754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9755   echo "$ac_t""yes" 1>&6
9756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9757   cat >> confdefs.h <<EOF
9758 #define $ac_tr_hdr 1
9759 EOF
9760  
9761 else
9762   echo "$ac_t""no" 1>&6
9763 fi
9764 done
9765
9766 if test $ac_cv_header_sys_uuid_h = yes ; then
9767         save_LIBS="$LIBS"
9768         
9769 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9770 echo "configure:9771: checking for library containing uuid_to_str" >&5
9771 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   ac_func_search_save_LIBS="$LIBS"
9775 ac_cv_search_uuid_to_str="no"
9776 cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 /* Override any gcc2 internal prototype to avoid an error.  */
9780 /* We use char because int might match the return type of a gcc2
9781     builtin and then its argument prototype would still apply.  */
9782 char uuid_to_str();
9783
9784 int main() {
9785 uuid_to_str()
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9789   rm -rf conftest*
9790   ac_cv_search_uuid_to_str="none required"
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794 fi
9795 rm -f conftest*
9796 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9797 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9798 cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 /* Override any gcc2 internal prototype to avoid an error.  */
9802 /* We use char because int might match the return type of a gcc2
9803     builtin and then its argument prototype would still apply.  */
9804 char uuid_to_str();
9805
9806 int main() {
9807 uuid_to_str()
9808 ; return 0; }
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9811   rm -rf conftest*
9812   ac_cv_search_uuid_to_str="-l$ac_lib"
9813 break
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817 fi
9818 rm -f conftest*
9819 done
9820 LIBS="$ac_func_search_save_LIBS"
9821 fi
9822
9823 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9824 if test "$ac_cv_search_uuid_to_str" != "no"; then
9825   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9826   have_uuid=yes
9827 else :
9828   :
9829 fi
9830         LIBS="$save_LIBS"
9831
9832         if test have_uuid = yes ; then
9833                 cat >> confdefs.h <<\EOF
9834 #define HAVE_UUID_TO_STR 1
9835 EOF
9836
9837
9838                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9839                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9840         fi
9841 fi
9842
9843 if test $have_uuid = no ; then
9844         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9845 echo "configure:9846: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9846         save_LIBS="$LIBS"
9847         LIBS="$LIBS -lrpcrt4"
9848         cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.h"
9851
9852                 char UuidCreate@4();
9853                 char UuidToStringA@8();
9854                 
9855 int main() {
9856
9857                 UuidCreate@4();
9858                 UuidToStringA@8();
9859                 
9860 ; return 0; }
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863   rm -rf conftest*
9864   need_rpcrt=yes
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868   rm -rf conftest*
9869   need_rpcrt=no
9870 fi
9871 rm -f conftest*
9872         if test $need_rpcrt = yes; then
9873                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9874         fi
9875         LIBS="$save_LIBS"
9876         echo "$ac_t""$need_rpcrt" 1>&6
9877 fi
9878
9879 ol_link_dnssrv=no
9880 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9881 echo "configure:9882: checking for res_query" >&5
9882 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* System header to define __stub macros and hopefully few prototypes,
9889     which can conflict with char res_query(); below.  */
9890 #include <assert.h>
9891 /* Override any gcc2 internal prototype to avoid an error.  */
9892 /* We use char because int might match the return type of a gcc2
9893     builtin and then its argument prototype would still apply.  */
9894 char res_query();
9895 char (*f)();
9896
9897 int main() {
9898
9899 /* The GNU C library defines this for functions which it implements
9900     to always fail with ENOSYS.  Some functions are actually named
9901     something starting with __ and the normal name is an alias.  */
9902 #if defined (__stub_res_query) || defined (__stub___res_query)
9903 choke me
9904 #else
9905 f = res_query;
9906 #endif
9907
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   eval "ac_cv_func_res_query=yes"
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   eval "ac_cv_func_res_query=no"
9918 fi
9919 rm -f conftest*
9920 fi
9921
9922 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9923   echo "$ac_t""yes" 1>&6
9924   :
9925 else
9926   echo "$ac_t""no" 1>&6
9927 fi
9928
9929 if test $ac_cv_func_res_query = no ; then 
9930         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9931 echo "configure:9932: checking for __res_query" >&5
9932 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9933   echo $ac_n "(cached) $ac_c" 1>&6
9934 else
9935   cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 /* System header to define __stub macros and hopefully few prototypes,
9939     which can conflict with char __res_query(); below.  */
9940 #include <assert.h>
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 /* We use char because int might match the return type of a gcc2
9943     builtin and then its argument prototype would still apply.  */
9944 char __res_query();
9945 char (*f)();
9946
9947 int main() {
9948
9949 /* The GNU C library defines this for functions which it implements
9950     to always fail with ENOSYS.  Some functions are actually named
9951     something starting with __ and the normal name is an alias.  */
9952 #if defined (__stub___res_query) || defined (__stub_____res_query)
9953 choke me
9954 #else
9955 f = __res_query;
9956 #endif
9957
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   eval "ac_cv_func___res_query=yes"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   eval "ac_cv_func___res_query=no"
9968 fi
9969 rm -f conftest*
9970 fi
9971
9972 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9973   echo "$ac_t""yes" 1>&6
9974   :
9975 else
9976   echo "$ac_t""no" 1>&6
9977 fi
9978
9979         ac_cv_func_res_query=$ac_cv_func___res_query
9980 fi
9981
9982 if test $ac_cv_func_res_query = no ; then 
9983         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9984 echo "configure:9985: checking for res_query in -lbind" >&5
9985 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9987   echo $ac_n "(cached) $ac_c" 1>&6
9988 else
9989   ac_save_LIBS="$LIBS"
9990 LIBS="-lbind  $LIBS"
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 /* We use char because int might match the return type of a gcc2
9996     builtin and then its argument prototype would still apply.  */
9997 char res_query();
9998
9999 int main() {
10000 res_query()
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10004   rm -rf conftest*
10005   eval "ac_cv_lib_$ac_lib_var=yes"
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_lib_$ac_lib_var=no"
10011 fi
10012 rm -f conftest*
10013 LIBS="$ac_save_LIBS"
10014
10015 fi
10016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10017   echo "$ac_t""yes" 1>&6
10018     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10020   cat >> confdefs.h <<EOF
10021 #define $ac_tr_lib 1
10022 EOF
10023
10024   LIBS="-lbind $LIBS"
10025
10026 else
10027   echo "$ac_t""no" 1>&6
10028 fi
10029
10030         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10031 fi
10032
10033 if test $ac_cv_func_res_query = no ; then 
10034         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10035 echo "configure:10036: checking for __res_query in -lbind" >&5
10036 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   ac_save_LIBS="$LIBS"
10041 LIBS="-lbind  $LIBS"
10042 cat > conftest.$ac_ext <<EOF
10043 #line 10044 "configure"
10044 #include "confdefs.h"
10045 /* Override any gcc2 internal prototype to avoid an error.  */
10046 /* We use char because int might match the return type of a gcc2
10047     builtin and then its argument prototype would still apply.  */
10048 char __res_query();
10049
10050 int main() {
10051 __res_query()
10052 ; return 0; }
10053 EOF
10054 if { (eval echo configure:10055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=yes"
10057 else
10058   echo "configure: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   rm -rf conftest*
10061   eval "ac_cv_lib_$ac_lib_var=no"
10062 fi
10063 rm -f conftest*
10064 LIBS="$ac_save_LIBS"
10065
10066 fi
10067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10071   cat >> confdefs.h <<EOF
10072 #define $ac_tr_lib 1
10073 EOF
10074
10075   LIBS="-lbind $LIBS"
10076
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10082 fi
10083
10084 if test $ac_cv_func_res_query = no ; then 
10085         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10086 echo "configure:10087: checking for res_query in -lresolv" >&5
10087 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10089   echo $ac_n "(cached) $ac_c" 1>&6
10090 else
10091   ac_save_LIBS="$LIBS"
10092 LIBS="-lresolv  $LIBS"
10093 cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 /* Override any gcc2 internal prototype to avoid an error.  */
10097 /* We use char because int might match the return type of a gcc2
10098     builtin and then its argument prototype would still apply.  */
10099 char res_query();
10100
10101 int main() {
10102 res_query()
10103 ; return 0; }
10104 EOF
10105 if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10106   rm -rf conftest*
10107   eval "ac_cv_lib_$ac_lib_var=yes"
10108 else
10109   echo "configure: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   rm -rf conftest*
10112   eval "ac_cv_lib_$ac_lib_var=no"
10113 fi
10114 rm -f conftest*
10115 LIBS="$ac_save_LIBS"
10116
10117 fi
10118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10119   echo "$ac_t""yes" 1>&6
10120     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10122   cat >> confdefs.h <<EOF
10123 #define $ac_tr_lib 1
10124 EOF
10125
10126   LIBS="-lresolv $LIBS"
10127
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131
10132         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10133 fi
10134
10135 if test $ac_cv_func_res_query = no ; then 
10136         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10137 echo "configure:10138: checking for __res_query in -lresolv" >&5
10138 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   ac_save_LIBS="$LIBS"
10143 LIBS="-lresolv  $LIBS"
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char __res_query();
10151
10152 int main() {
10153 __res_query()
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=yes"
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=no"
10164 fi
10165 rm -f conftest*
10166 LIBS="$ac_save_LIBS"
10167
10168 fi
10169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10173   cat >> confdefs.h <<EOF
10174 #define $ac_tr_lib 1
10175 EOF
10176
10177   LIBS="-lresolv $LIBS"
10178
10179 else
10180   echo "$ac_t""no" 1>&6
10181 fi
10182
10183         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10184 fi
10185
10186 if test "$ac_cv_func_res_query" = yes ; then
10187         cat >> confdefs.h <<\EOF
10188 #define HAVE_RES_QUERY 1
10189 EOF
10190
10191
10192         if test $ol_enable_dnssrv != no ; then
10193                 ol_link_dnssrv=yes
10194         fi
10195 fi
10196
10197 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10198         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10199 fi
10200
10201 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10202 do
10203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10204 echo "configure:10205: checking for $ac_func" >&5
10205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10206   echo $ac_n "(cached) $ac_c" 1>&6
10207 else
10208   cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 /* System header to define __stub macros and hopefully few prototypes,
10212     which can conflict with char $ac_func(); below.  */
10213 #include <assert.h>
10214 /* Override any gcc2 internal prototype to avoid an error.  */
10215 /* We use char because int might match the return type of a gcc2
10216     builtin and then its argument prototype would still apply.  */
10217 char $ac_func();
10218 char (*f)();
10219
10220 int main() {
10221
10222 /* The GNU C library defines this for functions which it implements
10223     to always fail with ENOSYS.  Some functions are actually named
10224     something starting with __ and the normal name is an alias.  */
10225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10226 choke me
10227 #else
10228 f = $ac_func;
10229 #endif
10230
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10234   rm -rf conftest*
10235   eval "ac_cv_func_$ac_func=yes"
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   eval "ac_cv_func_$ac_func=no"
10241 fi
10242 rm -f conftest*
10243 fi
10244
10245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10246   echo "$ac_t""yes" 1>&6
10247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10248   cat >> confdefs.h <<EOF
10249 #define $ac_tr_func 1
10250 EOF
10251  
10252 else
10253   echo "$ac_t""no" 1>&6
10254 fi
10255 done
10256
10257
10258 ol_link_ipv6=no
10259 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10260         if test $ol_enable_ipv6 = yes ; then
10261                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10262         fi
10263 elif test $ol_enable_ipv6 != no ; then
10264         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10265 echo "configure:10266: checking INET6_ADDRSTRLEN" >&5
10266 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   
10270                 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273
10274 #                       include <netinet/in.h>
10275 #                       ifdef INET6_ADDRSTRLEN
10276                                 __has_inet6_addrstrlen__;
10277 #                       endif
10278                 
10279 EOF
10280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10281   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10282   rm -rf conftest*
10283   ol_cv_inet6_addrstrlen=yes
10284 else
10285   rm -rf conftest*
10286   ol_cv_inet6_addrstrlen=no
10287 fi
10288 rm -f conftest*
10289
10290 fi
10291
10292 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10293
10294
10295         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10296 echo "configure:10297: checking struct sockaddr_storage" >&5
10297 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301                 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 #include <sys/types.h>
10306 #include <sys/socket.h>
10307
10308 int main() {
10309
10310                         struct sockaddr_storage ss;
10311
10312 ; return 0; }
10313 EOF
10314 if { (eval echo configure:10315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10315   rm -rf conftest*
10316   ol_cv_struct_sockaddr_storage=yes
10317 else
10318   echo "configure: failed program was:" >&5
10319   cat conftest.$ac_ext >&5
10320   rm -rf conftest*
10321   ol_cv_struct_sockaddr_storage=no
10322 fi
10323 rm -f conftest*
10324 fi
10325
10326 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10327
10328         if test $ol_cv_inet6_addrstrlen = yes \
10329                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10330                 ol_link_ipv6=yes
10331         elif test $ol_enable_ipv6 = yes \
10332                         -a $ol_cv_inet6_addrstrlen = no ; then
10333                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10334         elif test $ol_enable_ipv6 = yes \
10335                         -a $ol_cv_struct_sockaddr_storage = no ; then
10336                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10337         fi
10338 fi
10339
10340 if test $ol_enable_local != no ; then
10341         for ac_hdr in sys/un.h 
10342 do
10343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10345 echo "configure:10346: checking for $ac_hdr" >&5
10346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10347   echo $ac_n "(cached) $ac_c" 1>&6
10348 else
10349   cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <$ac_hdr>
10353 EOF
10354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10355 { (eval echo configure:10356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10357 if test -z "$ac_err"; then
10358   rm -rf conftest*
10359   eval "ac_cv_header_$ac_safe=yes"
10360 else
10361   echo "$ac_err" >&5
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_header_$ac_safe=no"
10366 fi
10367 rm -f conftest*
10368 fi
10369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10370   echo "$ac_t""yes" 1>&6
10371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10372   cat >> confdefs.h <<EOF
10373 #define $ac_tr_hdr 1
10374 EOF
10375  
10376 else
10377   echo "$ac_t""no" 1>&6
10378 fi
10379 done
10380
10381
10382         if test $ol_enable_local = auto ; then
10383                 ol_enable_local=$ac_cv_header_sys_un_h
10384         elif test $ac_cv_header_sys_un_h = no ; then
10385                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10386         fi
10387 fi
10388
10389 ol_link_kbind=no
10390 ol_link_kpasswd=no
10391 ol_link_krb5=no
10392 ol_link_krb4=no
10393
10394 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10395         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10396         -o $ol_with_kerberos = k425 ; then
10397
10398         for ac_hdr in krb5.h
10399 do
10400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10402 echo "configure:10403: checking for $ac_hdr" >&5
10403 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10404   echo $ac_n "(cached) $ac_c" 1>&6
10405 else
10406   cat > conftest.$ac_ext <<EOF
10407 #line 10408 "configure"
10408 #include "confdefs.h"
10409 #include <$ac_hdr>
10410 EOF
10411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10412 { (eval echo configure:10413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10414 if test -z "$ac_err"; then
10415   rm -rf conftest*
10416   eval "ac_cv_header_$ac_safe=yes"
10417 else
10418   echo "$ac_err" >&5
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=no"
10423 fi
10424 rm -f conftest*
10425 fi
10426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10427   echo "$ac_t""yes" 1>&6
10428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10429   cat >> confdefs.h <<EOF
10430 #define $ac_tr_hdr 1
10431 EOF
10432  
10433 else
10434   echo "$ac_t""no" 1>&6
10435 fi
10436 done
10437
10438
10439         if test $ac_cv_header_krb5_h = yes ; then
10440                                 for ac_hdr in heim_err.h
10441 do
10442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10444 echo "configure:10445: checking for $ac_hdr" >&5
10445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10446   echo $ac_n "(cached) $ac_c" 1>&6
10447 else
10448   cat > conftest.$ac_ext <<EOF
10449 #line 10450 "configure"
10450 #include "confdefs.h"
10451 #include <$ac_hdr>
10452 EOF
10453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10454 { (eval echo configure:10455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10456 if test -z "$ac_err"; then
10457   rm -rf conftest*
10458   eval "ac_cv_header_$ac_safe=yes"
10459 else
10460   echo "$ac_err" >&5
10461   echo "configure: failed program was:" >&5
10462   cat conftest.$ac_ext >&5
10463   rm -rf conftest*
10464   eval "ac_cv_header_$ac_safe=no"
10465 fi
10466 rm -f conftest*
10467 fi
10468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10469   echo "$ac_t""yes" 1>&6
10470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10471   cat >> confdefs.h <<EOF
10472 #define $ac_tr_hdr 1
10473 EOF
10474  
10475 else
10476   echo "$ac_t""no" 1>&6
10477 fi
10478 done
10479
10480                 if test $ac_cv_header_heim_err_h = yes ; then
10481                         krb5_impl=heimdal
10482                 else
10483                         krb5_impl=mit
10484                 fi
10485
10486                 if test $krb5_impl = mit; then
10487                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10488 echo "configure:10489: checking for main in -lk5crypto" >&5
10489 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10491   echo $ac_n "(cached) $ac_c" 1>&6
10492 else
10493   ac_save_LIBS="$LIBS"
10494 LIBS="-lk5crypto  $LIBS"
10495 cat > conftest.$ac_ext <<EOF
10496 #line 10497 "configure"
10497 #include "confdefs.h"
10498
10499 int main() {
10500 main()
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_lib_$ac_lib_var=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_lib_$ac_lib_var=no"
10511 fi
10512 rm -f conftest*
10513 LIBS="$ac_save_LIBS"
10514
10515 fi
10516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10517   echo "$ac_t""yes" 1>&6
10518   krb5crypto=k5crypto
10519 else
10520   echo "$ac_t""no" 1>&6
10521 krb5crypto=crypto
10522 fi
10523
10524
10525                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10526 echo "configure:10527: checking for main in -lkrb5" >&5
10527 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10528 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10529   echo $ac_n "(cached) $ac_c" 1>&6
10530 else
10531   ac_save_LIBS="$LIBS"
10532 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10533 cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536
10537 int main() {
10538 main()
10539 ; return 0; }
10540 EOF
10541 if { (eval echo configure:10542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10542   rm -rf conftest*
10543   eval "ac_cv_lib_$ac_lib_var=yes"
10544 else
10545   echo "configure: failed program was:" >&5
10546   cat conftest.$ac_ext >&5
10547   rm -rf conftest*
10548   eval "ac_cv_lib_$ac_lib_var=no"
10549 fi
10550 rm -f conftest*
10551 LIBS="$ac_save_LIBS"
10552
10553 fi
10554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10555   echo "$ac_t""yes" 1>&6
10556   have_krb5=yes
10557                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10558 else
10559   echo "$ac_t""no" 1>&6
10560 have_krb5=no
10561 fi
10562
10563
10564                 elif test $krb5_impl = heimdal; then
10565                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10566 echo "configure:10567: checking for main in -ldes" >&5
10567 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10569   echo $ac_n "(cached) $ac_c" 1>&6
10570 else
10571   ac_save_LIBS="$LIBS"
10572 LIBS="-ldes  $LIBS"
10573 cat > conftest.$ac_ext <<EOF
10574 #line 10575 "configure"
10575 #include "confdefs.h"
10576
10577 int main() {
10578 main()
10579 ; return 0; }
10580 EOF
10581 if { (eval echo configure:10582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10582   rm -rf conftest*
10583   eval "ac_cv_lib_$ac_lib_var=yes"
10584 else
10585   echo "configure: failed program was:" >&5
10586   cat conftest.$ac_ext >&5
10587   rm -rf conftest*
10588   eval "ac_cv_lib_$ac_lib_var=no"
10589 fi
10590 rm -f conftest*
10591 LIBS="$ac_save_LIBS"
10592
10593 fi
10594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   krb5crypto=des
10597 else
10598   echo "$ac_t""no" 1>&6
10599 krb5crypto=crypto
10600 fi
10601
10602
10603                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10604 echo "configure:10605: checking for main in -lkrb5" >&5
10605 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10607   echo $ac_n "(cached) $ac_c" 1>&6
10608 else
10609   ac_save_LIBS="$LIBS"
10610 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10611 cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614
10615 int main() {
10616 main()
10617 ; return 0; }
10618 EOF
10619 if { (eval echo configure:10620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10620   rm -rf conftest*
10621   eval "ac_cv_lib_$ac_lib_var=yes"
10622 else
10623   echo "configure: failed program was:" >&5
10624   cat conftest.$ac_ext >&5
10625   rm -rf conftest*
10626   eval "ac_cv_lib_$ac_lib_var=no"
10627 fi
10628 rm -f conftest*
10629 LIBS="$ac_save_LIBS"
10630
10631 fi
10632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10633   echo "$ac_t""yes" 1>&6
10634   have_krb5=yes
10635                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10636 else
10637   echo "$ac_t""no" 1>&6
10638 have_krb5=no
10639 fi
10640
10641
10642                         cat >> confdefs.h <<\EOF
10643 #define HAVE_HEIMDAL_KERBEROS 1
10644 EOF
10645
10646
10647                 else
10648                         have_krb5=no
10649                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10650                 fi
10651
10652                 if test $have_krb5 = yes ; then
10653                         ol_link_krb5=yes
10654
10655                         cat >> confdefs.h <<\EOF
10656 #define HAVE_KRB5 1
10657 EOF
10658
10659
10660                         if test $ol_enable_kpasswd != no ; then
10661                                 ol_link_kpasswd=yes;
10662                         fi
10663
10664                         if test $ol_with_kerberos = k5only ; then
10665                                 ol_with_kerberos=found
10666                         fi
10667
10668                 elif test $ol_with_kerberos != auto ; then
10669                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10670                 fi
10671
10672         fi
10673 fi
10674
10675 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10676         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10677
10678         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10679 do
10680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10681 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10682 echo "configure:10683: checking for $ac_hdr" >&5
10683 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10684   echo $ac_n "(cached) $ac_c" 1>&6
10685 else
10686   cat > conftest.$ac_ext <<EOF
10687 #line 10688 "configure"
10688 #include "confdefs.h"
10689 #include <$ac_hdr>
10690 EOF
10691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10692 { (eval echo configure:10693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10694 if test -z "$ac_err"; then
10695   rm -rf conftest*
10696   eval "ac_cv_header_$ac_safe=yes"
10697 else
10698   echo "$ac_err" >&5
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   eval "ac_cv_header_$ac_safe=no"
10703 fi
10704 rm -f conftest*
10705 fi
10706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10707   echo "$ac_t""yes" 1>&6
10708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10709   cat >> confdefs.h <<EOF
10710 #define $ac_tr_hdr 1
10711 EOF
10712  
10713 else
10714   echo "$ac_t""no" 1>&6
10715 fi
10716 done
10717
10718
10719         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10720                 if test $krb5_impl = mit; then
10721                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10722 echo "configure:10723: checking for main in -lkrb4" >&5
10723 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10725   echo $ac_n "(cached) $ac_c" 1>&6
10726 else
10727   ac_save_LIBS="$LIBS"
10728 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10729 cat > conftest.$ac_ext <<EOF
10730 #line 10731 "configure"
10731 #include "confdefs.h"
10732
10733 int main() {
10734 main()
10735 ; return 0; }
10736 EOF
10737 if { (eval echo configure:10738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=yes"
10740 else
10741   echo "configure: failed program was:" >&5
10742   cat conftest.$ac_ext >&5
10743   rm -rf conftest*
10744   eval "ac_cv_lib_$ac_lib_var=no"
10745 fi
10746 rm -f conftest*
10747 LIBS="$ac_save_LIBS"
10748
10749 fi
10750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10751   echo "$ac_t""yes" 1>&6
10752   have_k425=yes
10753                                 KRB4_LIBS="-lkrb4 -ldes425"
10754 else
10755   echo "$ac_t""no" 1>&6
10756 have_k425=no
10757 fi
10758
10759
10760                 elif test $krb5_impl = heimdal; then
10761                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10762 echo "configure:10763: checking for main in -lkrb4" >&5
10763 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10764 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10765   echo $ac_n "(cached) $ac_c" 1>&6
10766 else
10767   ac_save_LIBS="$LIBS"
10768 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10769 cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772
10773 int main() {
10774 main()
10775 ; return 0; }
10776 EOF
10777 if { (eval echo configure:10778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10778   rm -rf conftest*
10779   eval "ac_cv_lib_$ac_lib_var=yes"
10780 else
10781   echo "configure: failed program was:" >&5
10782   cat conftest.$ac_ext >&5
10783   rm -rf conftest*
10784   eval "ac_cv_lib_$ac_lib_var=no"
10785 fi
10786 rm -f conftest*
10787 LIBS="$ac_save_LIBS"
10788
10789 fi
10790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10791   echo "$ac_t""yes" 1>&6
10792   have_k425=yes
10793                                 KRB4_LIBS="-lkrb4"
10794 else
10795   echo "$ac_t""no" 1>&6
10796 have_k425=no
10797 fi
10798
10799
10800                 else
10801                         have_425=no
10802                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10803                 fi
10804
10805                 if test $have_k425 = yes ; then
10806                         ol_with_kerberos=found
10807                         ol_link_krb4=yes
10808
10809                         cat >> confdefs.h <<\EOF
10810 #define HAVE_KRB425 1
10811 EOF
10812
10813                         cat >> confdefs.h <<\EOF
10814 #define HAVE_KRB4 1
10815 EOF
10816
10817
10818                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10819 echo "configure:10820: checking for des_debug in Kerberos libraries" >&5
10820 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10821   echo $ac_n "(cached) $ac_c" 1>&6
10822 else
10823   
10824                                                                 save_LIBS="$LIBS"
10825                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10826                                 cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829
10830 #include <kerberosIV/krb.h>
10831 #include <kerberosIV/des.h>
10832 extern int des_debug;
10833
10834 int main() {
10835
10836 des_debug = 1;
10837
10838 ; return 0; }
10839 EOF
10840 if { (eval echo configure:10841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10841   rm -rf conftest*
10842   ol_cv_var_des_debug=yes
10843 else
10844   echo "configure: failed program was:" >&5
10845   cat conftest.$ac_ext >&5
10846   rm -rf conftest*
10847   ol_cv_var_des_debug=no
10848 fi
10849 rm -f conftest*
10850                                                                 LIBS="$save_LIBS"
10851                         
10852 fi
10853
10854 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10855
10856                         if test $ol_cv_var_des_debug = yes ; then
10857                                 cat >> confdefs.h <<\EOF
10858 #define HAVE_DES_DEBUG 1
10859 EOF
10860
10861                         fi
10862
10863                         LIBS="$save_LIBS"
10864                 fi
10865         fi
10866 fi
10867
10868 if test $ol_link_krb5 = yes ; then
10869         ol_with_kerberos=found
10870 fi
10871
10872 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10873         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10874
10875         for ac_hdr in krb.h des.h krb-archaeology.h 
10876 do
10877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10879 echo "configure:10880: checking for $ac_hdr" >&5
10880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10881   echo $ac_n "(cached) $ac_c" 1>&6
10882 else
10883   cat > conftest.$ac_ext <<EOF
10884 #line 10885 "configure"
10885 #include "confdefs.h"
10886 #include <$ac_hdr>
10887 EOF
10888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10889 { (eval echo configure:10890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10891 if test -z "$ac_err"; then
10892   rm -rf conftest*
10893   eval "ac_cv_header_$ac_safe=yes"
10894 else
10895   echo "$ac_err" >&5
10896   echo "configure: failed program was:" >&5
10897   cat conftest.$ac_ext >&5
10898   rm -rf conftest*
10899   eval "ac_cv_header_$ac_safe=no"
10900 fi
10901 rm -f conftest*
10902 fi
10903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10904   echo "$ac_t""yes" 1>&6
10905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10906   cat >> confdefs.h <<EOF
10907 #define $ac_tr_hdr 1
10908 EOF
10909  
10910 else
10911   echo "$ac_t""no" 1>&6
10912 fi
10913 done
10914
10915
10916         if test $ac_cv_header_krb_h = yes ; then
10917                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10918 echo "configure:10919: checking for main in -lkrb" >&5
10919 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10920 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10921   echo $ac_n "(cached) $ac_c" 1>&6
10922 else
10923   ac_save_LIBS="$LIBS"
10924 LIBS="-lkrb -ldes $LIBS"
10925 cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928
10929 int main() {
10930 main()
10931 ; return 0; }
10932 EOF
10933 if { (eval echo configure:10934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10934   rm -rf conftest*
10935   eval "ac_cv_lib_$ac_lib_var=yes"
10936 else
10937   echo "configure: failed program was:" >&5
10938   cat conftest.$ac_ext >&5
10939   rm -rf conftest*
10940   eval "ac_cv_lib_$ac_lib_var=no"
10941 fi
10942 rm -f conftest*
10943 LIBS="$ac_save_LIBS"
10944
10945 fi
10946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10947   echo "$ac_t""yes" 1>&6
10948   have_k4=yes
10949 else
10950   echo "$ac_t""no" 1>&6
10951 have_k4=no
10952 fi
10953
10954
10955                 if test $have_k4 = yes ; then
10956                         ol_with_kerberos=found
10957                         ol_link_krb4=yes
10958
10959                         cat >> confdefs.h <<\EOF
10960 #define HAVE_KRB4 1
10961 EOF
10962
10963
10964                         KRB4_LIBS="-lkrb -ldes"
10965
10966                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10967                                 cat >> confdefs.h <<\EOF
10968 #define HAVE_KTH_KERBEROS 1
10969 EOF
10970
10971                         fi
10972                 fi
10973         fi
10974 fi
10975
10976 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10977         ol_link_kpasswd=yes
10978 fi
10979
10980 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10981         ol_link_kbind=yes
10982
10983 elif test $ol_enable_kbind = yes ; then
10984         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10985 fi
10986
10987 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10988         cat >> confdefs.h <<\EOF
10989 #define HAVE_KERBEROS 1
10990 EOF
10991
10992
10993 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10994         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10995 fi
10996
10997 ol_link_tls=no
10998 if test $ol_with_tls != no ; then
10999         for ac_hdr in openssl/ssl.h ssl.h
11000 do
11001 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11002 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11003 echo "configure:11004: checking for $ac_hdr" >&5
11004 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11005   echo $ac_n "(cached) $ac_c" 1>&6
11006 else
11007   cat > conftest.$ac_ext <<EOF
11008 #line 11009 "configure"
11009 #include "confdefs.h"
11010 #include <$ac_hdr>
11011 EOF
11012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11013 { (eval echo configure:11014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11015 if test -z "$ac_err"; then
11016   rm -rf conftest*
11017   eval "ac_cv_header_$ac_safe=yes"
11018 else
11019   echo "$ac_err" >&5
11020   echo "configure: failed program was:" >&5
11021   cat conftest.$ac_ext >&5
11022   rm -rf conftest*
11023   eval "ac_cv_header_$ac_safe=no"
11024 fi
11025 rm -f conftest*
11026 fi
11027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11028   echo "$ac_t""yes" 1>&6
11029     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11030   cat >> confdefs.h <<EOF
11031 #define $ac_tr_hdr 1
11032 EOF
11033  
11034 else
11035   echo "$ac_t""no" 1>&6
11036 fi
11037 done
11038
11039         
11040         if test $ac_cv_header_openssl_ssl_h = yes \
11041                 -o $ac_cv_header_ssl_h = yes ; then
11042                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11043 echo "configure:11044: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11044 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11045 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11046   echo $ac_n "(cached) $ac_c" 1>&6
11047 else
11048   ac_save_LIBS="$LIBS"
11049 LIBS="-lssl -lcrypto $LIBS"
11050 cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 /* Override any gcc2 internal prototype to avoid an error.  */
11054 /* We use char because int might match the return type of a gcc2
11055     builtin and then its argument prototype would still apply.  */
11056 char SSLeay_add_ssl_algorithms();
11057
11058 int main() {
11059 SSLeay_add_ssl_algorithms()
11060 ; return 0; }
11061 EOF
11062 if { (eval echo configure:11063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11063   rm -rf conftest*
11064   eval "ac_cv_lib_$ac_lib_var=yes"
11065 else
11066   echo "configure: failed program was:" >&5
11067   cat conftest.$ac_ext >&5
11068   rm -rf conftest*
11069   eval "ac_cv_lib_$ac_lib_var=no"
11070 fi
11071 rm -f conftest*
11072 LIBS="$ac_save_LIBS"
11073
11074 fi
11075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11076   echo "$ac_t""yes" 1>&6
11077   have_ssleay=yes
11078                         need_rsaref=no
11079 else
11080   echo "$ac_t""no" 1>&6
11081 have_ssleay=no
11082 fi
11083
11084                         
11085                 if test $have_ssleay = no ; then
11086                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11087 echo "configure:11088: checking for SSL_library_init in -lssl" >&5
11088 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11090   echo $ac_n "(cached) $ac_c" 1>&6
11091 else
11092   ac_save_LIBS="$LIBS"
11093 LIBS="-lssl -lcrypto $LIBS"
11094 cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097 /* Override any gcc2 internal prototype to avoid an error.  */
11098 /* We use char because int might match the return type of a gcc2
11099     builtin and then its argument prototype would still apply.  */
11100 char SSL_library_init();
11101
11102 int main() {
11103 SSL_library_init()
11104 ; return 0; }
11105 EOF
11106 if { (eval echo configure:11107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11107   rm -rf conftest*
11108   eval "ac_cv_lib_$ac_lib_var=yes"
11109 else
11110   echo "configure: failed program was:" >&5
11111   cat conftest.$ac_ext >&5
11112   rm -rf conftest*
11113   eval "ac_cv_lib_$ac_lib_var=no"
11114 fi
11115 rm -f conftest*
11116 LIBS="$ac_save_LIBS"
11117
11118 fi
11119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11120   echo "$ac_t""yes" 1>&6
11121   have_ssleay=yes
11122                                 need_rsaref=no
11123 else
11124   echo "$ac_t""no" 1>&6
11125 have_ssleay=no
11126 fi
11127
11128                 fi
11129
11130                 if test $have_ssleay = no ; then
11131                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11132 echo "configure:11133: checking for ssl3_accept in -lssl" >&5
11133 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11135   echo $ac_n "(cached) $ac_c" 1>&6
11136 else
11137   ac_save_LIBS="$LIBS"
11138 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11139 cat > conftest.$ac_ext <<EOF
11140 #line 11141 "configure"
11141 #include "confdefs.h"
11142 /* Override any gcc2 internal prototype to avoid an error.  */
11143 /* We use char because int might match the return type of a gcc2
11144     builtin and then its argument prototype would still apply.  */
11145 char ssl3_accept();
11146
11147 int main() {
11148 ssl3_accept()
11149 ; return 0; }
11150 EOF
11151 if { (eval echo configure:11152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11152   rm -rf conftest*
11153   eval "ac_cv_lib_$ac_lib_var=yes"
11154 else
11155   echo "configure: failed program was:" >&5
11156   cat conftest.$ac_ext >&5
11157   rm -rf conftest*
11158   eval "ac_cv_lib_$ac_lib_var=no"
11159 fi
11160 rm -f conftest*
11161 LIBS="$ac_save_LIBS"
11162
11163 fi
11164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11165   echo "$ac_t""yes" 1>&6
11166   have_ssleay=yes
11167                                 need_rsaref=yes
11168 else
11169   echo "$ac_t""no" 1>&6
11170 have_ssleay=no
11171 fi
11172
11173                 fi
11174
11175                 if test $have_ssleay = yes ; then
11176                         ol_with_tls=found
11177                         ol_link_tls=yes
11178
11179                         cat >> confdefs.h <<\EOF
11180 #define HAVE_SSLEAY 1
11181 EOF
11182
11183
11184                         if test $need_rsaref = yes; then
11185                                 cat >> confdefs.h <<\EOF
11186 #define HAVE_RSAREF 1
11187 EOF
11188
11189
11190                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11191                         else
11192                                 TLS_LIBS="-lssl -lcrypto"
11193                         fi
11194                 fi
11195         fi
11196
11197 else
11198         echo "configure: warning: TLS data protection not supported!" 1>&2
11199 fi
11200
11201 if test $ol_link_tls = yes ; then
11202         cat >> confdefs.h <<\EOF
11203 #define HAVE_TLS 1
11204 EOF
11205
11206
11207 elif test $ol_with_tls = auto ; then
11208         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11209         echo "configure: warning: TLS data protection not supported!" 1>&2
11210
11211 elif test $ol_with_tls != no ; then
11212         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11213 fi
11214
11215 if test $ol_enable_lmpasswd != no; then
11216         if test $ol_link_tls != yes ; then
11217                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11218         fi
11219
11220         cat >> confdefs.h <<\EOF
11221 #define SLAPD_LMHASH 1
11222 EOF
11223
11224 fi
11225
11226 ol_link_threads=no
11227
11228 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11229         -o $ol_with_threads = nt ; then
11230
11231         
11232         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11233 echo "configure:11234: checking for _beginthread" >&5
11234 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240 /* System header to define __stub macros and hopefully few prototypes,
11241     which can conflict with char _beginthread(); below.  */
11242 #include <assert.h>
11243 /* Override any gcc2 internal prototype to avoid an error.  */
11244 /* We use char because int might match the return type of a gcc2
11245     builtin and then its argument prototype would still apply.  */
11246 char _beginthread();
11247 char (*f)();
11248
11249 int main() {
11250
11251 /* The GNU C library defines this for functions which it implements
11252     to always fail with ENOSYS.  Some functions are actually named
11253     something starting with __ and the normal name is an alias.  */
11254 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11255 choke me
11256 #else
11257 f = _beginthread;
11258 #endif
11259
11260 ; return 0; }
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11263   rm -rf conftest*
11264   eval "ac_cv_func__beginthread=yes"
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   eval "ac_cv_func__beginthread=no"
11270 fi
11271 rm -f conftest*
11272 fi
11273
11274 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11275   echo "$ac_t""yes" 1>&6
11276   :
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280
11281
11282         if test $ac_cv_func__beginthread = yes ; then
11283                 cat >> confdefs.h <<\EOF
11284 #define HAVE_NT_THREADS 1
11285 EOF
11286
11287                 ol_cv_nt_threads=yes
11288         fi
11289
11290
11291         if test "$ol_cv_nt_threads" = yes ; then
11292                 ol_link_threads=nt
11293                 ol_with_threads=found
11294                 ol_with_yielding_select=yes
11295
11296                 cat >> confdefs.h <<\EOF
11297 #define HAVE_NT_SERVICE_MANAGER 1
11298 EOF
11299
11300                 cat >> confdefs.h <<\EOF
11301 #define HAVE_NT_EVENT_LOG 1
11302 EOF
11303
11304         fi
11305
11306         if test $ol_with_threads = nt ; then
11307                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11308         fi
11309 fi
11310
11311 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11312         -o $ol_with_threads = posix ; then
11313
11314         for ac_hdr in pthread.h
11315 do
11316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11318 echo "configure:11319: checking for $ac_hdr" >&5
11319 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11320   echo $ac_n "(cached) $ac_c" 1>&6
11321 else
11322   cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325 #include <$ac_hdr>
11326 EOF
11327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11328 { (eval echo configure:11329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11330 if test -z "$ac_err"; then
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=yes"
11333 else
11334   echo "$ac_err" >&5
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_header_$ac_safe=no"
11339 fi
11340 rm -f conftest*
11341 fi
11342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11343   echo "$ac_t""yes" 1>&6
11344     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11345   cat >> confdefs.h <<EOF
11346 #define $ac_tr_hdr 1
11347 EOF
11348  
11349 else
11350   echo "$ac_t""no" 1>&6
11351 fi
11352 done
11353
11354
11355         if test $ac_cv_header_pthread_h = yes ; then
11356                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11357 echo "configure:11358: checking POSIX thread version" >&5
11358 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11359   echo $ac_n "(cached) $ac_c" 1>&6
11360 else
11361   
11362         cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365
11366 #               include <pthread.h>
11367         
11368 int main() {
11369
11370                 int i = PTHREAD_CREATE_JOINABLE;
11371         
11372 ; return 0; }
11373 EOF
11374 if { (eval echo configure:11375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11375   rm -rf conftest*
11376   
11377         cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380 #include <pthread.h>
11381 EOF
11382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11383   egrep "pthread_detach" >/dev/null 2>&1; then
11384   rm -rf conftest*
11385   ol_cv_pthread_version=10
11386 else
11387   rm -rf conftest*
11388   ol_cv_pthread_version=8
11389 fi
11390 rm -f conftest*
11391
11392 else
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -rf conftest*
11396   
11397         cat > conftest.$ac_ext <<EOF
11398 #line 11399 "configure"
11399 #include "confdefs.h"
11400
11401 #               include <pthread.h>
11402 #               ifdef PTHREAD_CREATE_UNDETACHED
11403                 draft7
11404 #               endif
11405         
11406 EOF
11407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11408   egrep "draft7" >/dev/null 2>&1; then
11409   rm -rf conftest*
11410   ol_cv_pthread_version=7
11411 else
11412   rm -rf conftest*
11413   
11414         cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417 #include <pthread.h>
11418 EOF
11419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11420   egrep "pthread_attr_init" >/dev/null 2>&1; then
11421   rm -rf conftest*
11422   ol_cv_pthread_version=6
11423 else
11424   rm -rf conftest*
11425   
11426         cat > conftest.$ac_ext <<EOF
11427 #line 11428 "configure"
11428 #include "confdefs.h"
11429
11430 #               include <pthread.h>
11431 #ifdef          PTHREAD_MUTEX_INITIALIZER
11432                 draft5
11433 #endif
11434         
11435 EOF
11436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11437   egrep "draft5" >/dev/null 2>&1; then
11438   rm -rf conftest*
11439   ol_cv_pthread_version=5
11440 else
11441   rm -rf conftest*
11442   ol_cv_pthread_version=4
11443 fi
11444 rm -f conftest*
11445  
11446 fi
11447 rm -f conftest*
11448  
11449 fi
11450 rm -f conftest*
11451  
11452 fi
11453 rm -f conftest*
11454
11455 fi
11456
11457 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11458
11459
11460                 if test $ol_cv_pthread_version != 0 ; then
11461                         cat >> confdefs.h <<EOF
11462 #define HAVE_PTHREADS $ol_cv_pthread_version
11463 EOF
11464
11465                 else
11466                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11467                 fi
11468
11469                 # consider threads found
11470                 ol_with_threads=found
11471
11472                 
11473         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11474 echo "configure:11475: checking for LinuxThreads pthread.h" >&5
11475 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11476   echo $ac_n "(cached) $ac_c" 1>&6
11477 else
11478   cat > conftest.$ac_ext <<EOF
11479 #line 11480 "configure"
11480 #include "confdefs.h"
11481 #include <pthread.h>
11482 EOF
11483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11484   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11485   rm -rf conftest*
11486   ol_cv_header_linux_threads=yes
11487 else
11488   rm -rf conftest*
11489   ol_cv_header_linux_threads=no
11490 fi
11491 rm -f conftest*
11492
11493                 
11494 fi
11495
11496 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11497         if test $ol_cv_header_linux_threads = yes; then
11498                 cat >> confdefs.h <<\EOF
11499 #define HAVE_LINUX_THREADS 1
11500 EOF
11501
11502         fi
11503
11504                 
11505         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11506 echo "configure:11507: checking for GNU Pth pthread.h" >&5
11507 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11508   echo $ac_n "(cached) $ac_c" 1>&6
11509 else
11510   cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513 #include <pthread.h>
11514 #ifdef _POSIX_THREAD_IS_GNU_PTH
11515         __gnu_pth__;
11516 #endif
11517
11518 EOF
11519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11520   egrep "__gnu_pth__" >/dev/null 2>&1; then
11521   rm -rf conftest*
11522   ol_cv_header_gnu_pth_pthread_h=yes
11523 else
11524   rm -rf conftest*
11525   ol_cv_header_gnu_pth_pthread_h=no
11526 fi
11527 rm -f conftest*
11528
11529                 
11530 fi
11531
11532 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11533
11534
11535                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11536                         for ac_hdr in sched.h
11537 do
11538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11540 echo "configure:11541: checking for $ac_hdr" >&5
11541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11542   echo $ac_n "(cached) $ac_c" 1>&6
11543 else
11544   cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 #include <$ac_hdr>
11548 EOF
11549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11550 { (eval echo configure:11551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11552 if test -z "$ac_err"; then
11553   rm -rf conftest*
11554   eval "ac_cv_header_$ac_safe=yes"
11555 else
11556   echo "$ac_err" >&5
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -rf conftest*
11560   eval "ac_cv_header_$ac_safe=no"
11561 fi
11562 rm -f conftest*
11563 fi
11564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11565   echo "$ac_t""yes" 1>&6
11566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11567   cat >> confdefs.h <<EOF
11568 #define $ac_tr_hdr 1
11569 EOF
11570  
11571 else
11572   echo "$ac_t""no" 1>&6
11573 fi
11574 done
11575
11576                 fi
11577
11578                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11579                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11580 echo "configure:11581: checking for pthread_create in default libraries" >&5
11581 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11582   echo $ac_n "(cached) $ac_c" 1>&6
11583 else
11584   
11585                 if test "$cross_compiling" = yes; then
11586   cat > conftest.$ac_ext <<EOF
11587 #line 11588 "configure"
11588 #include "confdefs.h"
11589 /* pthread test headers */
11590 #include <pthread.h>
11591 #if HAVE_PTHREADS < 7
11592 #include <errno.h>
11593 #endif
11594 #ifndef NULL
11595 #define NULL (void*)0
11596 #endif
11597
11598 static void *task(p)
11599         void *p;
11600 {
11601         return (void *) (p == NULL);
11602 }
11603
11604 int main() {
11605
11606         /* pthread test function */
11607 #ifndef PTHREAD_CREATE_DETACHED
11608 #define PTHREAD_CREATE_DETACHED 1
11609 #endif
11610         pthread_t t;
11611         int status;
11612         int detach = PTHREAD_CREATE_DETACHED;
11613
11614 #if HAVE_PTHREADS > 4
11615         /* Final pthreads */
11616         pthread_attr_t attr;
11617
11618         status = pthread_attr_init(&attr);
11619         if( status ) return status;
11620
11621 #if HAVE_PTHREADS < 7
11622         status = pthread_attr_setdetachstate(&attr, &detach);
11623         if( status < 0 ) status = errno;
11624 #else
11625         status = pthread_attr_setdetachstate(&attr, detach);
11626 #endif
11627         if( status ) return status;
11628         status = pthread_create( &t, &attr, task, NULL );
11629 #if HAVE_PTHREADS < 7
11630         if( status < 0 ) status = errno;
11631 #endif
11632         if( status ) return status;
11633 #else
11634         /* Draft 4 pthreads */
11635         status = pthread_create( &t, pthread_attr_default, task, NULL );
11636         if( status ) return errno;
11637
11638         /* give thread a chance to complete */
11639         /* it should remain joinable and hence detachable */
11640         sleep( 1 );
11641
11642         status = pthread_detach( &t );
11643         if( status ) return errno;
11644 #endif
11645
11646 #ifdef HAVE_LINUX_THREADS
11647         pthread_kill_other_threads_np();
11648 #endif
11649
11650         return 0;
11651
11652 ; return 0; }
11653 EOF
11654 if { (eval echo configure:11655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11655   rm -rf conftest*
11656   ol_cv_pthread_create=yes
11657 else
11658   echo "configure: failed program was:" >&5
11659   cat conftest.$ac_ext >&5
11660   rm -rf conftest*
11661   ol_cv_pthread_create=no
11662 fi
11663 rm -f conftest*
11664 else
11665   cat > conftest.$ac_ext <<EOF
11666 #line 11667 "configure"
11667 #include "confdefs.h"
11668 /* pthread test headers */
11669 #include <pthread.h>
11670 #if HAVE_PTHREADS < 7
11671 #include <errno.h>
11672 #endif
11673 #ifndef NULL
11674 #define NULL (void*)0
11675 #endif
11676
11677 static void *task(p)
11678         void *p;
11679 {
11680         return (void *) (p == NULL);
11681 }
11682
11683
11684 int main(argc, argv)
11685         int argc;
11686         char **argv;
11687 {
11688
11689         /* pthread test function */
11690 #ifndef PTHREAD_CREATE_DETACHED
11691 #define PTHREAD_CREATE_DETACHED 1
11692 #endif
11693         pthread_t t;
11694         int status;
11695         int detach = PTHREAD_CREATE_DETACHED;
11696
11697 #if HAVE_PTHREADS > 4
11698         /* Final pthreads */
11699         pthread_attr_t attr;
11700
11701         status = pthread_attr_init(&attr);
11702         if( status ) return status;
11703
11704 #if HAVE_PTHREADS < 7
11705         status = pthread_attr_setdetachstate(&attr, &detach);
11706         if( status < 0 ) status = errno;
11707 #else
11708         status = pthread_attr_setdetachstate(&attr, detach);
11709 #endif
11710         if( status ) return status;
11711         status = pthread_create( &t, &attr, task, NULL );
11712 #if HAVE_PTHREADS < 7
11713         if( status < 0 ) status = errno;
11714 #endif
11715         if( status ) return status;
11716 #else
11717         /* Draft 4 pthreads */
11718         status = pthread_create( &t, pthread_attr_default, task, NULL );
11719         if( status ) return errno;
11720
11721         /* give thread a chance to complete */
11722         /* it should remain joinable and hence detachable */
11723         sleep( 1 );
11724
11725         status = pthread_detach( &t );
11726         if( status ) return errno;
11727 #endif
11728
11729 #ifdef HAVE_LINUX_THREADS
11730         pthread_kill_other_threads_np();
11731 #endif
11732
11733         return 0;
11734
11735 }
11736
11737 EOF
11738 if { (eval echo configure:11739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11739 then
11740   ol_cv_pthread_create=yes
11741 else
11742   echo "configure: failed program was:" >&5
11743   cat conftest.$ac_ext >&5
11744   rm -fr conftest*
11745   ol_cv_pthread_create=no
11746 fi
11747 rm -fr conftest*
11748 fi
11749
11750 fi
11751
11752 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11753
11754                 if test $ol_cv_pthread_create != no ; then
11755                         ol_link_threads=posix
11756                         ol_link_pthreads=""
11757                 fi
11758                 
11759                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11760 if test "$ol_link_threads" = no ; then
11761         # try -kthread
11762         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11763 echo "configure:11764: checking for pthread link with -kthread" >&5
11764 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11765   echo $ac_n "(cached) $ac_c" 1>&6
11766 else
11767   
11768                 # save the flags
11769                 ol_LIBS="$LIBS"
11770                 LIBS="-kthread $LIBS"
11771
11772                 if test "$cross_compiling" = yes; then
11773   cat > conftest.$ac_ext <<EOF
11774 #line 11775 "configure"
11775 #include "confdefs.h"
11776 /* pthread test headers */
11777 #include <pthread.h>
11778 #if HAVE_PTHREADS < 7
11779 #include <errno.h>
11780 #endif
11781 #ifndef NULL
11782 #define NULL (void*)0
11783 #endif
11784
11785 static void *task(p)
11786         void *p;
11787 {
11788         return (void *) (p == NULL);
11789 }
11790
11791 int main() {
11792
11793         /* pthread test function */
11794 #ifndef PTHREAD_CREATE_DETACHED
11795 #define PTHREAD_CREATE_DETACHED 1
11796 #endif
11797         pthread_t t;
11798         int status;
11799         int detach = PTHREAD_CREATE_DETACHED;
11800
11801 #if HAVE_PTHREADS > 4
11802         /* Final pthreads */
11803         pthread_attr_t attr;
11804
11805         status = pthread_attr_init(&attr);
11806         if( status ) return status;
11807
11808 #if HAVE_PTHREADS < 7
11809         status = pthread_attr_setdetachstate(&attr, &detach);
11810         if( status < 0 ) status = errno;
11811 #else
11812         status = pthread_attr_setdetachstate(&attr, detach);
11813 #endif
11814         if( status ) return status;
11815         status = pthread_create( &t, &attr, task, NULL );
11816 #if HAVE_PTHREADS < 7
11817         if( status < 0 ) status = errno;
11818 #endif
11819         if( status ) return status;
11820 #else
11821         /* Draft 4 pthreads */
11822         status = pthread_create( &t, pthread_attr_default, task, NULL );
11823         if( status ) return errno;
11824
11825         /* give thread a chance to complete */
11826         /* it should remain joinable and hence detachable */
11827         sleep( 1 );
11828
11829         status = pthread_detach( &t );
11830         if( status ) return errno;
11831 #endif
11832
11833 #ifdef HAVE_LINUX_THREADS
11834         pthread_kill_other_threads_np();
11835 #endif
11836
11837         return 0;
11838
11839 ; return 0; }
11840 EOF
11841 if { (eval echo configure:11842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11842   rm -rf conftest*
11843   ol_cv_pthread_kthread=yes
11844 else
11845   echo "configure: failed program was:" >&5
11846   cat conftest.$ac_ext >&5
11847   rm -rf conftest*
11848   ol_cv_pthread_kthread=no
11849 fi
11850 rm -f conftest*
11851 else
11852   cat > conftest.$ac_ext <<EOF
11853 #line 11854 "configure"
11854 #include "confdefs.h"
11855 /* pthread test headers */
11856 #include <pthread.h>
11857 #if HAVE_PTHREADS < 7
11858 #include <errno.h>
11859 #endif
11860 #ifndef NULL
11861 #define NULL (void*)0
11862 #endif
11863
11864 static void *task(p)
11865         void *p;
11866 {
11867         return (void *) (p == NULL);
11868 }
11869
11870
11871 int main(argc, argv)
11872         int argc;
11873         char **argv;
11874 {
11875
11876         /* pthread test function */
11877 #ifndef PTHREAD_CREATE_DETACHED
11878 #define PTHREAD_CREATE_DETACHED 1
11879 #endif
11880         pthread_t t;
11881         int status;
11882         int detach = PTHREAD_CREATE_DETACHED;
11883
11884 #if HAVE_PTHREADS > 4
11885         /* Final pthreads */
11886         pthread_attr_t attr;
11887
11888         status = pthread_attr_init(&attr);
11889         if( status ) return status;
11890
11891 #if HAVE_PTHREADS < 7
11892         status = pthread_attr_setdetachstate(&attr, &detach);
11893         if( status < 0 ) status = errno;
11894 #else
11895         status = pthread_attr_setdetachstate(&attr, detach);
11896 #endif
11897         if( status ) return status;
11898         status = pthread_create( &t, &attr, task, NULL );
11899 #if HAVE_PTHREADS < 7
11900         if( status < 0 ) status = errno;
11901 #endif
11902         if( status ) return status;
11903 #else
11904         /* Draft 4 pthreads */
11905         status = pthread_create( &t, pthread_attr_default, task, NULL );
11906         if( status ) return errno;
11907
11908         /* give thread a chance to complete */
11909         /* it should remain joinable and hence detachable */
11910         sleep( 1 );
11911
11912         status = pthread_detach( &t );
11913         if( status ) return errno;
11914 #endif
11915
11916 #ifdef HAVE_LINUX_THREADS
11917         pthread_kill_other_threads_np();
11918 #endif
11919
11920         return 0;
11921
11922 }
11923
11924 EOF
11925 if { (eval echo configure:11926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11926 then
11927   ol_cv_pthread_kthread=yes
11928 else
11929   echo "configure: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   rm -fr conftest*
11932   ol_cv_pthread_kthread=no
11933 fi
11934 rm -fr conftest*
11935 fi
11936
11937
11938                 # restore the LIBS
11939                 LIBS="$ol_LIBS"
11940         
11941 fi
11942
11943 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11944
11945         if test $ol_cv_pthread_kthread = yes ; then
11946                 ol_link_pthreads="-kthread"
11947                 ol_link_threads=posix
11948         fi
11949 fi
11950
11951                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11952 if test "$ol_link_threads" = no ; then
11953         # try -pthread
11954         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11955 echo "configure:11956: checking for pthread link with -pthread" >&5
11956 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11957   echo $ac_n "(cached) $ac_c" 1>&6
11958 else
11959   
11960                 # save the flags
11961                 ol_LIBS="$LIBS"
11962                 LIBS="-pthread $LIBS"
11963
11964                 if test "$cross_compiling" = yes; then
11965   cat > conftest.$ac_ext <<EOF
11966 #line 11967 "configure"
11967 #include "confdefs.h"
11968 /* pthread test headers */
11969 #include <pthread.h>
11970 #if HAVE_PTHREADS < 7
11971 #include <errno.h>
11972 #endif
11973 #ifndef NULL
11974 #define NULL (void*)0
11975 #endif
11976
11977 static void *task(p)
11978         void *p;
11979 {
11980         return (void *) (p == NULL);
11981 }
11982
11983 int main() {
11984
11985         /* pthread test function */
11986 #ifndef PTHREAD_CREATE_DETACHED
11987 #define PTHREAD_CREATE_DETACHED 1
11988 #endif
11989         pthread_t t;
11990         int status;
11991         int detach = PTHREAD_CREATE_DETACHED;
11992
11993 #if HAVE_PTHREADS > 4
11994         /* Final pthreads */
11995         pthread_attr_t attr;
11996
11997         status = pthread_attr_init(&attr);
11998         if( status ) return status;
11999
12000 #if HAVE_PTHREADS < 7
12001         status = pthread_attr_setdetachstate(&attr, &detach);
12002         if( status < 0 ) status = errno;
12003 #else
12004         status = pthread_attr_setdetachstate(&attr, detach);
12005 #endif
12006         if( status ) return status;
12007         status = pthread_create( &t, &attr, task, NULL );
12008 #if HAVE_PTHREADS < 7
12009         if( status < 0 ) status = errno;
12010 #endif
12011         if( status ) return status;
12012 #else
12013         /* Draft 4 pthreads */
12014         status = pthread_create( &t, pthread_attr_default, task, NULL );
12015         if( status ) return errno;
12016
12017         /* give thread a chance to complete */
12018         /* it should remain joinable and hence detachable */
12019         sleep( 1 );
12020
12021         status = pthread_detach( &t );
12022         if( status ) return errno;
12023 #endif
12024
12025 #ifdef HAVE_LINUX_THREADS
12026         pthread_kill_other_threads_np();
12027 #endif
12028
12029         return 0;
12030
12031 ; return 0; }
12032 EOF
12033 if { (eval echo configure:12034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12034   rm -rf conftest*
12035   ol_cv_pthread_pthread=yes
12036 else
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   ol_cv_pthread_pthread=no
12041 fi
12042 rm -f conftest*
12043 else
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047 /* pthread test headers */
12048 #include <pthread.h>
12049 #if HAVE_PTHREADS < 7
12050 #include <errno.h>
12051 #endif
12052 #ifndef NULL
12053 #define NULL (void*)0
12054 #endif
12055
12056 static void *task(p)
12057         void *p;
12058 {
12059         return (void *) (p == NULL);
12060 }
12061
12062
12063 int main(argc, argv)
12064         int argc;
12065         char **argv;
12066 {
12067
12068         /* pthread test function */
12069 #ifndef PTHREAD_CREATE_DETACHED
12070 #define PTHREAD_CREATE_DETACHED 1
12071 #endif
12072         pthread_t t;
12073         int status;
12074         int detach = PTHREAD_CREATE_DETACHED;
12075
12076 #if HAVE_PTHREADS > 4
12077         /* Final pthreads */
12078         pthread_attr_t attr;
12079
12080         status = pthread_attr_init(&attr);
12081         if( status ) return status;
12082
12083 #if HAVE_PTHREADS < 7
12084         status = pthread_attr_setdetachstate(&attr, &detach);
12085         if( status < 0 ) status = errno;
12086 #else
12087         status = pthread_attr_setdetachstate(&attr, detach);
12088 #endif
12089         if( status ) return status;
12090         status = pthread_create( &t, &attr, task, NULL );
12091 #if HAVE_PTHREADS < 7
12092         if( status < 0 ) status = errno;
12093 #endif
12094         if( status ) return status;
12095 #else
12096         /* Draft 4 pthreads */
12097         status = pthread_create( &t, pthread_attr_default, task, NULL );
12098         if( status ) return errno;
12099
12100         /* give thread a chance to complete */
12101         /* it should remain joinable and hence detachable */
12102         sleep( 1 );
12103
12104         status = pthread_detach( &t );
12105         if( status ) return errno;
12106 #endif
12107
12108 #ifdef HAVE_LINUX_THREADS
12109         pthread_kill_other_threads_np();
12110 #endif
12111
12112         return 0;
12113
12114 }
12115
12116 EOF
12117 if { (eval echo configure:12118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12118 then
12119   ol_cv_pthread_pthread=yes
12120 else
12121   echo "configure: failed program was:" >&5
12122   cat conftest.$ac_ext >&5
12123   rm -fr conftest*
12124   ol_cv_pthread_pthread=no
12125 fi
12126 rm -fr conftest*
12127 fi
12128
12129
12130                 # restore the LIBS
12131                 LIBS="$ol_LIBS"
12132         
12133 fi
12134
12135 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12136
12137         if test $ol_cv_pthread_pthread = yes ; then
12138                 ol_link_pthreads="-pthread"
12139                 ol_link_threads=posix
12140         fi
12141 fi
12142
12143                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12144 if test "$ol_link_threads" = no ; then
12145         # try -pthreads
12146         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12147 echo "configure:12148: checking for pthread link with -pthreads" >&5
12148 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12149   echo $ac_n "(cached) $ac_c" 1>&6
12150 else
12151   
12152                 # save the flags
12153                 ol_LIBS="$LIBS"
12154                 LIBS="-pthreads $LIBS"
12155
12156                 if test "$cross_compiling" = yes; then
12157   cat > conftest.$ac_ext <<EOF
12158 #line 12159 "configure"
12159 #include "confdefs.h"
12160 /* pthread test headers */
12161 #include <pthread.h>
12162 #if HAVE_PTHREADS < 7
12163 #include <errno.h>
12164 #endif
12165 #ifndef NULL
12166 #define NULL (void*)0
12167 #endif
12168
12169 static void *task(p)
12170         void *p;
12171 {
12172         return (void *) (p == NULL);
12173 }
12174
12175 int main() {
12176
12177         /* pthread test function */
12178 #ifndef PTHREAD_CREATE_DETACHED
12179 #define PTHREAD_CREATE_DETACHED 1
12180 #endif
12181         pthread_t t;
12182         int status;
12183         int detach = PTHREAD_CREATE_DETACHED;
12184
12185 #if HAVE_PTHREADS > 4
12186         /* Final pthreads */
12187         pthread_attr_t attr;
12188
12189         status = pthread_attr_init(&attr);
12190         if( status ) return status;
12191
12192 #if HAVE_PTHREADS < 7
12193         status = pthread_attr_setdetachstate(&attr, &detach);
12194         if( status < 0 ) status = errno;
12195 #else
12196         status = pthread_attr_setdetachstate(&attr, detach);
12197 #endif
12198         if( status ) return status;
12199         status = pthread_create( &t, &attr, task, NULL );
12200 #if HAVE_PTHREADS < 7
12201         if( status < 0 ) status = errno;
12202 #endif
12203         if( status ) return status;
12204 #else
12205         /* Draft 4 pthreads */
12206         status = pthread_create( &t, pthread_attr_default, task, NULL );
12207         if( status ) return errno;
12208
12209         /* give thread a chance to complete */
12210         /* it should remain joinable and hence detachable */
12211         sleep( 1 );
12212
12213         status = pthread_detach( &t );
12214         if( status ) return errno;
12215 #endif
12216
12217 #ifdef HAVE_LINUX_THREADS
12218         pthread_kill_other_threads_np();
12219 #endif
12220
12221         return 0;
12222
12223 ; return 0; }
12224 EOF
12225 if { (eval echo configure:12226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12226   rm -rf conftest*
12227   ol_cv_pthread_pthreads=yes
12228 else
12229   echo "configure: failed program was:" >&5
12230   cat conftest.$ac_ext >&5
12231   rm -rf conftest*
12232   ol_cv_pthread_pthreads=no
12233 fi
12234 rm -f conftest*
12235 else
12236   cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239 /* pthread test headers */
12240 #include <pthread.h>
12241 #if HAVE_PTHREADS < 7
12242 #include <errno.h>
12243 #endif
12244 #ifndef NULL
12245 #define NULL (void*)0
12246 #endif
12247
12248 static void *task(p)
12249         void *p;
12250 {
12251         return (void *) (p == NULL);
12252 }
12253
12254
12255 int main(argc, argv)
12256         int argc;
12257         char **argv;
12258 {
12259
12260         /* pthread test function */
12261 #ifndef PTHREAD_CREATE_DETACHED
12262 #define PTHREAD_CREATE_DETACHED 1
12263 #endif
12264         pthread_t t;
12265         int status;
12266         int detach = PTHREAD_CREATE_DETACHED;
12267
12268 #if HAVE_PTHREADS > 4
12269         /* Final pthreads */
12270         pthread_attr_t attr;
12271
12272         status = pthread_attr_init(&attr);
12273         if( status ) return status;
12274
12275 #if HAVE_PTHREADS < 7
12276         status = pthread_attr_setdetachstate(&attr, &detach);
12277         if( status < 0 ) status = errno;
12278 #else
12279         status = pthread_attr_setdetachstate(&attr, detach);
12280 #endif
12281         if( status ) return status;
12282         status = pthread_create( &t, &attr, task, NULL );
12283 #if HAVE_PTHREADS < 7
12284         if( status < 0 ) status = errno;
12285 #endif
12286         if( status ) return status;
12287 #else
12288         /* Draft 4 pthreads */
12289         status = pthread_create( &t, pthread_attr_default, task, NULL );
12290         if( status ) return errno;
12291
12292         /* give thread a chance to complete */
12293         /* it should remain joinable and hence detachable */
12294         sleep( 1 );
12295
12296         status = pthread_detach( &t );
12297         if( status ) return errno;
12298 #endif
12299
12300 #ifdef HAVE_LINUX_THREADS
12301         pthread_kill_other_threads_np();
12302 #endif
12303
12304         return 0;
12305
12306 }
12307
12308 EOF
12309 if { (eval echo configure:12310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12310 then
12311   ol_cv_pthread_pthreads=yes
12312 else
12313   echo "configure: failed program was:" >&5
12314   cat conftest.$ac_ext >&5
12315   rm -fr conftest*
12316   ol_cv_pthread_pthreads=no
12317 fi
12318 rm -fr conftest*
12319 fi
12320
12321
12322                 # restore the LIBS
12323                 LIBS="$ol_LIBS"
12324         
12325 fi
12326
12327 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12328
12329         if test $ol_cv_pthread_pthreads = yes ; then
12330                 ol_link_pthreads="-pthreads"
12331                 ol_link_threads=posix
12332         fi
12333 fi
12334
12335                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12336 if test "$ol_link_threads" = no ; then
12337         # try -mthreads
12338         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12339 echo "configure:12340: checking for pthread link with -mthreads" >&5
12340 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12341   echo $ac_n "(cached) $ac_c" 1>&6
12342 else
12343   
12344                 # save the flags
12345                 ol_LIBS="$LIBS"
12346                 LIBS="-mthreads $LIBS"
12347
12348                 if test "$cross_compiling" = yes; then
12349   cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 /* pthread test headers */
12353 #include <pthread.h>
12354 #if HAVE_PTHREADS < 7
12355 #include <errno.h>
12356 #endif
12357 #ifndef NULL
12358 #define NULL (void*)0
12359 #endif
12360
12361 static void *task(p)
12362         void *p;
12363 {
12364         return (void *) (p == NULL);
12365 }
12366
12367 int main() {
12368
12369         /* pthread test function */
12370 #ifndef PTHREAD_CREATE_DETACHED
12371 #define PTHREAD_CREATE_DETACHED 1
12372 #endif
12373         pthread_t t;
12374         int status;
12375         int detach = PTHREAD_CREATE_DETACHED;
12376
12377 #if HAVE_PTHREADS > 4
12378         /* Final pthreads */
12379         pthread_attr_t attr;
12380
12381         status = pthread_attr_init(&attr);
12382         if( status ) return status;
12383
12384 #if HAVE_PTHREADS < 7
12385         status = pthread_attr_setdetachstate(&attr, &detach);
12386         if( status < 0 ) status = errno;
12387 #else
12388         status = pthread_attr_setdetachstate(&attr, detach);
12389 #endif
12390         if( status ) return status;
12391         status = pthread_create( &t, &attr, task, NULL );
12392 #if HAVE_PTHREADS < 7
12393         if( status < 0 ) status = errno;
12394 #endif
12395         if( status ) return status;
12396 #else
12397         /* Draft 4 pthreads */
12398         status = pthread_create( &t, pthread_attr_default, task, NULL );
12399         if( status ) return errno;
12400
12401         /* give thread a chance to complete */
12402         /* it should remain joinable and hence detachable */
12403         sleep( 1 );
12404
12405         status = pthread_detach( &t );
12406         if( status ) return errno;
12407 #endif
12408
12409 #ifdef HAVE_LINUX_THREADS
12410         pthread_kill_other_threads_np();
12411 #endif
12412
12413         return 0;
12414
12415 ; return 0; }
12416 EOF
12417 if { (eval echo configure:12418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12418   rm -rf conftest*
12419   ol_cv_pthread_mthreads=yes
12420 else
12421   echo "configure: failed program was:" >&5
12422   cat conftest.$ac_ext >&5
12423   rm -rf conftest*
12424   ol_cv_pthread_mthreads=no
12425 fi
12426 rm -f conftest*
12427 else
12428   cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 /* pthread test headers */
12432 #include <pthread.h>
12433 #if HAVE_PTHREADS < 7
12434 #include <errno.h>
12435 #endif
12436 #ifndef NULL
12437 #define NULL (void*)0
12438 #endif
12439
12440 static void *task(p)
12441         void *p;
12442 {
12443         return (void *) (p == NULL);
12444 }
12445
12446
12447 int main(argc, argv)
12448         int argc;
12449         char **argv;
12450 {
12451
12452         /* pthread test function */
12453 #ifndef PTHREAD_CREATE_DETACHED
12454 #define PTHREAD_CREATE_DETACHED 1
12455 #endif
12456         pthread_t t;
12457         int status;
12458         int detach = PTHREAD_CREATE_DETACHED;
12459
12460 #if HAVE_PTHREADS > 4
12461         /* Final pthreads */
12462         pthread_attr_t attr;
12463
12464         status = pthread_attr_init(&attr);
12465         if( status ) return status;
12466
12467 #if HAVE_PTHREADS < 7
12468         status = pthread_attr_setdetachstate(&attr, &detach);
12469         if( status < 0 ) status = errno;
12470 #else
12471         status = pthread_attr_setdetachstate(&attr, detach);
12472 #endif
12473         if( status ) return status;
12474         status = pthread_create( &t, &attr, task, NULL );
12475 #if HAVE_PTHREADS < 7
12476         if( status < 0 ) status = errno;
12477 #endif
12478         if( status ) return status;
12479 #else
12480         /* Draft 4 pthreads */
12481         status = pthread_create( &t, pthread_attr_default, task, NULL );
12482         if( status ) return errno;
12483
12484         /* give thread a chance to complete */
12485         /* it should remain joinable and hence detachable */
12486         sleep( 1 );
12487
12488         status = pthread_detach( &t );
12489         if( status ) return errno;
12490 #endif
12491
12492 #ifdef HAVE_LINUX_THREADS
12493         pthread_kill_other_threads_np();
12494 #endif
12495
12496         return 0;
12497
12498 }
12499
12500 EOF
12501 if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12502 then
12503   ol_cv_pthread_mthreads=yes
12504 else
12505   echo "configure: failed program was:" >&5
12506   cat conftest.$ac_ext >&5
12507   rm -fr conftest*
12508   ol_cv_pthread_mthreads=no
12509 fi
12510 rm -fr conftest*
12511 fi
12512
12513
12514                 # restore the LIBS
12515                 LIBS="$ol_LIBS"
12516         
12517 fi
12518
12519 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12520
12521         if test $ol_cv_pthread_mthreads = yes ; then
12522                 ol_link_pthreads="-mthreads"
12523                 ol_link_threads=posix
12524         fi
12525 fi
12526
12527                 # Pthread try link: -thread (ol_cv_pthread_thread)
12528 if test "$ol_link_threads" = no ; then
12529         # try -thread
12530         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12531 echo "configure:12532: checking for pthread link with -thread" >&5
12532 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12533   echo $ac_n "(cached) $ac_c" 1>&6
12534 else
12535   
12536                 # save the flags
12537                 ol_LIBS="$LIBS"
12538                 LIBS="-thread $LIBS"
12539
12540                 if test "$cross_compiling" = yes; then
12541   cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 /* pthread test headers */
12545 #include <pthread.h>
12546 #if HAVE_PTHREADS < 7
12547 #include <errno.h>
12548 #endif
12549 #ifndef NULL
12550 #define NULL (void*)0
12551 #endif
12552
12553 static void *task(p)
12554         void *p;
12555 {
12556         return (void *) (p == NULL);
12557 }
12558
12559 int main() {
12560
12561         /* pthread test function */
12562 #ifndef PTHREAD_CREATE_DETACHED
12563 #define PTHREAD_CREATE_DETACHED 1
12564 #endif
12565         pthread_t t;
12566         int status;
12567         int detach = PTHREAD_CREATE_DETACHED;
12568
12569 #if HAVE_PTHREADS > 4
12570         /* Final pthreads */
12571         pthread_attr_t attr;
12572
12573         status = pthread_attr_init(&attr);
12574         if( status ) return status;
12575
12576 #if HAVE_PTHREADS < 7
12577         status = pthread_attr_setdetachstate(&attr, &detach);
12578         if( status < 0 ) status = errno;
12579 #else
12580         status = pthread_attr_setdetachstate(&attr, detach);
12581 #endif
12582         if( status ) return status;
12583         status = pthread_create( &t, &attr, task, NULL );
12584 #if HAVE_PTHREADS < 7
12585         if( status < 0 ) status = errno;
12586 #endif
12587         if( status ) return status;
12588 #else
12589         /* Draft 4 pthreads */
12590         status = pthread_create( &t, pthread_attr_default, task, NULL );
12591         if( status ) return errno;
12592
12593         /* give thread a chance to complete */
12594         /* it should remain joinable and hence detachable */
12595         sleep( 1 );
12596
12597         status = pthread_detach( &t );
12598         if( status ) return errno;
12599 #endif
12600
12601 #ifdef HAVE_LINUX_THREADS
12602         pthread_kill_other_threads_np();
12603 #endif
12604
12605         return 0;
12606
12607 ; return 0; }
12608 EOF
12609 if { (eval echo configure:12610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12610   rm -rf conftest*
12611   ol_cv_pthread_thread=yes
12612 else
12613   echo "configure: failed program was:" >&5
12614   cat conftest.$ac_ext >&5
12615   rm -rf conftest*
12616   ol_cv_pthread_thread=no
12617 fi
12618 rm -f conftest*
12619 else
12620   cat > conftest.$ac_ext <<EOF
12621 #line 12622 "configure"
12622 #include "confdefs.h"
12623 /* pthread test headers */
12624 #include <pthread.h>
12625 #if HAVE_PTHREADS < 7
12626 #include <errno.h>
12627 #endif
12628 #ifndef NULL
12629 #define NULL (void*)0
12630 #endif
12631
12632 static void *task(p)
12633         void *p;
12634 {
12635         return (void *) (p == NULL);
12636 }
12637
12638
12639 int main(argc, argv)
12640         int argc;
12641         char **argv;
12642 {
12643
12644         /* pthread test function */
12645 #ifndef PTHREAD_CREATE_DETACHED
12646 #define PTHREAD_CREATE_DETACHED 1
12647 #endif
12648         pthread_t t;
12649         int status;
12650         int detach = PTHREAD_CREATE_DETACHED;
12651
12652 #if HAVE_PTHREADS > 4
12653         /* Final pthreads */
12654         pthread_attr_t attr;
12655
12656         status = pthread_attr_init(&attr);
12657         if( status ) return status;
12658
12659 #if HAVE_PTHREADS < 7
12660         status = pthread_attr_setdetachstate(&attr, &detach);
12661         if( status < 0 ) status = errno;
12662 #else
12663         status = pthread_attr_setdetachstate(&attr, detach);
12664 #endif
12665         if( status ) return status;
12666         status = pthread_create( &t, &attr, task, NULL );
12667 #if HAVE_PTHREADS < 7
12668         if( status < 0 ) status = errno;
12669 #endif
12670         if( status ) return status;
12671 #else
12672         /* Draft 4 pthreads */
12673         status = pthread_create( &t, pthread_attr_default, task, NULL );
12674         if( status ) return errno;
12675
12676         /* give thread a chance to complete */
12677         /* it should remain joinable and hence detachable */
12678         sleep( 1 );
12679
12680         status = pthread_detach( &t );
12681         if( status ) return errno;
12682 #endif
12683
12684 #ifdef HAVE_LINUX_THREADS
12685         pthread_kill_other_threads_np();
12686 #endif
12687
12688         return 0;
12689
12690 }
12691
12692 EOF
12693 if { (eval echo configure:12694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12694 then
12695   ol_cv_pthread_thread=yes
12696 else
12697   echo "configure: failed program was:" >&5
12698   cat conftest.$ac_ext >&5
12699   rm -fr conftest*
12700   ol_cv_pthread_thread=no
12701 fi
12702 rm -fr conftest*
12703 fi
12704
12705
12706                 # restore the LIBS
12707                 LIBS="$ol_LIBS"
12708         
12709 fi
12710
12711 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12712
12713         if test $ol_cv_pthread_thread = yes ; then
12714                 ol_link_pthreads="-thread"
12715                 ol_link_threads=posix
12716         fi
12717 fi
12718
12719
12720                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12721 if test "$ol_link_threads" = no ; then
12722         # try -lpthread -lmach -lexc -lc_r
12723         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12724 echo "configure:12725: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12725 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12726   echo $ac_n "(cached) $ac_c" 1>&6
12727 else
12728   
12729                 # save the flags
12730                 ol_LIBS="$LIBS"
12731                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12732
12733                 if test "$cross_compiling" = yes; then
12734   cat > conftest.$ac_ext <<EOF
12735 #line 12736 "configure"
12736 #include "confdefs.h"
12737 /* pthread test headers */
12738 #include <pthread.h>
12739 #if HAVE_PTHREADS < 7
12740 #include <errno.h>
12741 #endif
12742 #ifndef NULL
12743 #define NULL (void*)0
12744 #endif
12745
12746 static void *task(p)
12747         void *p;
12748 {
12749         return (void *) (p == NULL);
12750 }
12751
12752 int main() {
12753
12754         /* pthread test function */
12755 #ifndef PTHREAD_CREATE_DETACHED
12756 #define PTHREAD_CREATE_DETACHED 1
12757 #endif
12758         pthread_t t;
12759         int status;
12760         int detach = PTHREAD_CREATE_DETACHED;
12761
12762 #if HAVE_PTHREADS > 4
12763         /* Final pthreads */
12764         pthread_attr_t attr;
12765
12766         status = pthread_attr_init(&attr);
12767         if( status ) return status;
12768
12769 #if HAVE_PTHREADS < 7
12770         status = pthread_attr_setdetachstate(&attr, &detach);
12771         if( status < 0 ) status = errno;
12772 #else
12773         status = pthread_attr_setdetachstate(&attr, detach);
12774 #endif
12775         if( status ) return status;
12776         status = pthread_create( &t, &attr, task, NULL );
12777 #if HAVE_PTHREADS < 7
12778         if( status < 0 ) status = errno;
12779 #endif
12780         if( status ) return status;
12781 #else
12782         /* Draft 4 pthreads */
12783         status = pthread_create( &t, pthread_attr_default, task, NULL );
12784         if( status ) return errno;
12785
12786         /* give thread a chance to complete */
12787         /* it should remain joinable and hence detachable */
12788         sleep( 1 );
12789
12790         status = pthread_detach( &t );
12791         if( status ) return errno;
12792 #endif
12793
12794 #ifdef HAVE_LINUX_THREADS
12795         pthread_kill_other_threads_np();
12796 #endif
12797
12798         return 0;
12799
12800 ; return 0; }
12801 EOF
12802 if { (eval echo configure:12803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12803   rm -rf conftest*
12804   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12805 else
12806   echo "configure: failed program was:" >&5
12807   cat conftest.$ac_ext >&5
12808   rm -rf conftest*
12809   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12810 fi
12811 rm -f conftest*
12812 else
12813   cat > conftest.$ac_ext <<EOF
12814 #line 12815 "configure"
12815 #include "confdefs.h"
12816 /* pthread test headers */
12817 #include <pthread.h>
12818 #if HAVE_PTHREADS < 7
12819 #include <errno.h>
12820 #endif
12821 #ifndef NULL
12822 #define NULL (void*)0
12823 #endif
12824
12825 static void *task(p)
12826         void *p;
12827 {
12828         return (void *) (p == NULL);
12829 }
12830
12831
12832 int main(argc, argv)
12833         int argc;
12834         char **argv;
12835 {
12836
12837         /* pthread test function */
12838 #ifndef PTHREAD_CREATE_DETACHED
12839 #define PTHREAD_CREATE_DETACHED 1
12840 #endif
12841         pthread_t t;
12842         int status;
12843         int detach = PTHREAD_CREATE_DETACHED;
12844
12845 #if HAVE_PTHREADS > 4
12846         /* Final pthreads */
12847         pthread_attr_t attr;
12848
12849         status = pthread_attr_init(&attr);
12850         if( status ) return status;
12851
12852 #if HAVE_PTHREADS < 7
12853         status = pthread_attr_setdetachstate(&attr, &detach);
12854         if( status < 0 ) status = errno;
12855 #else
12856         status = pthread_attr_setdetachstate(&attr, detach);
12857 #endif
12858         if( status ) return status;
12859         status = pthread_create( &t, &attr, task, NULL );
12860 #if HAVE_PTHREADS < 7
12861         if( status < 0 ) status = errno;
12862 #endif
12863         if( status ) return status;
12864 #else
12865         /* Draft 4 pthreads */
12866         status = pthread_create( &t, pthread_attr_default, task, NULL );
12867         if( status ) return errno;
12868
12869         /* give thread a chance to complete */
12870         /* it should remain joinable and hence detachable */
12871         sleep( 1 );
12872
12873         status = pthread_detach( &t );
12874         if( status ) return errno;
12875 #endif
12876
12877 #ifdef HAVE_LINUX_THREADS
12878         pthread_kill_other_threads_np();
12879 #endif
12880
12881         return 0;
12882
12883 }
12884
12885 EOF
12886 if { (eval echo configure:12887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12887 then
12888   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12889 else
12890   echo "configure: failed program was:" >&5
12891   cat conftest.$ac_ext >&5
12892   rm -fr conftest*
12893   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12894 fi
12895 rm -fr conftest*
12896 fi
12897
12898
12899                 # restore the LIBS
12900                 LIBS="$ol_LIBS"
12901         
12902 fi
12903
12904 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12905
12906         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12907                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12908                 ol_link_threads=posix
12909         fi
12910 fi
12911
12912                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12913 if test "$ol_link_threads" = no ; then
12914         # try -lpthread -lmach -lexc
12915         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12916 echo "configure:12917: checking for pthread link with -lpthread -lmach -lexc" >&5
12917 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12918   echo $ac_n "(cached) $ac_c" 1>&6
12919 else
12920   
12921                 # save the flags
12922                 ol_LIBS="$LIBS"
12923                 LIBS="-lpthread -lmach -lexc $LIBS"
12924
12925                 if test "$cross_compiling" = yes; then
12926   cat > conftest.$ac_ext <<EOF
12927 #line 12928 "configure"
12928 #include "confdefs.h"
12929 /* pthread test headers */
12930 #include <pthread.h>
12931 #if HAVE_PTHREADS < 7
12932 #include <errno.h>
12933 #endif
12934 #ifndef NULL
12935 #define NULL (void*)0
12936 #endif
12937
12938 static void *task(p)
12939         void *p;
12940 {
12941         return (void *) (p == NULL);
12942 }
12943
12944 int main() {
12945
12946         /* pthread test function */
12947 #ifndef PTHREAD_CREATE_DETACHED
12948 #define PTHREAD_CREATE_DETACHED 1
12949 #endif
12950         pthread_t t;
12951         int status;
12952         int detach = PTHREAD_CREATE_DETACHED;
12953
12954 #if HAVE_PTHREADS > 4
12955         /* Final pthreads */
12956         pthread_attr_t attr;
12957
12958         status = pthread_attr_init(&attr);
12959         if( status ) return status;
12960
12961 #if HAVE_PTHREADS < 7
12962         status = pthread_attr_setdetachstate(&attr, &detach);
12963         if( status < 0 ) status = errno;
12964 #else
12965         status = pthread_attr_setdetachstate(&attr, detach);
12966 #endif
12967         if( status ) return status;
12968         status = pthread_create( &t, &attr, task, NULL );
12969 #if HAVE_PTHREADS < 7
12970         if( status < 0 ) status = errno;
12971 #endif
12972         if( status ) return status;
12973 #else
12974         /* Draft 4 pthreads */
12975         status = pthread_create( &t, pthread_attr_default, task, NULL );
12976         if( status ) return errno;
12977
12978         /* give thread a chance to complete */
12979         /* it should remain joinable and hence detachable */
12980         sleep( 1 );
12981
12982         status = pthread_detach( &t );
12983         if( status ) return errno;
12984 #endif
12985
12986 #ifdef HAVE_LINUX_THREADS
12987         pthread_kill_other_threads_np();
12988 #endif
12989
12990         return 0;
12991
12992 ; return 0; }
12993 EOF
12994 if { (eval echo configure:12995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12995   rm -rf conftest*
12996   ol_cv_pthread_lpthread_lmach_lexc=yes
12997 else
12998   echo "configure: failed program was:" >&5
12999   cat conftest.$ac_ext >&5
13000   rm -rf conftest*
13001   ol_cv_pthread_lpthread_lmach_lexc=no
13002 fi
13003 rm -f conftest*
13004 else
13005   cat > conftest.$ac_ext <<EOF
13006 #line 13007 "configure"
13007 #include "confdefs.h"
13008 /* pthread test headers */
13009 #include <pthread.h>
13010 #if HAVE_PTHREADS < 7
13011 #include <errno.h>
13012 #endif
13013 #ifndef NULL
13014 #define NULL (void*)0
13015 #endif
13016
13017 static void *task(p)
13018         void *p;
13019 {
13020         return (void *) (p == NULL);
13021 }
13022
13023
13024 int main(argc, argv)
13025         int argc;
13026         char **argv;
13027 {
13028
13029         /* pthread test function */
13030 #ifndef PTHREAD_CREATE_DETACHED
13031 #define PTHREAD_CREATE_DETACHED 1
13032 #endif
13033         pthread_t t;
13034         int status;
13035         int detach = PTHREAD_CREATE_DETACHED;
13036
13037 #if HAVE_PTHREADS > 4
13038         /* Final pthreads */
13039         pthread_attr_t attr;
13040
13041         status = pthread_attr_init(&attr);
13042         if( status ) return status;
13043
13044 #if HAVE_PTHREADS < 7
13045         status = pthread_attr_setdetachstate(&attr, &detach);
13046         if( status < 0 ) status = errno;
13047 #else
13048         status = pthread_attr_setdetachstate(&attr, detach);
13049 #endif
13050         if( status ) return status;
13051         status = pthread_create( &t, &attr, task, NULL );
13052 #if HAVE_PTHREADS < 7
13053         if( status < 0 ) status = errno;
13054 #endif
13055         if( status ) return status;
13056 #else
13057         /* Draft 4 pthreads */
13058         status = pthread_create( &t, pthread_attr_default, task, NULL );
13059         if( status ) return errno;
13060
13061         /* give thread a chance to complete */
13062         /* it should remain joinable and hence detachable */
13063         sleep( 1 );
13064
13065         status = pthread_detach( &t );
13066         if( status ) return errno;
13067 #endif
13068
13069 #ifdef HAVE_LINUX_THREADS
13070         pthread_kill_other_threads_np();
13071 #endif
13072
13073         return 0;
13074
13075 }
13076
13077 EOF
13078 if { (eval echo configure:13079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13079 then
13080   ol_cv_pthread_lpthread_lmach_lexc=yes
13081 else
13082   echo "configure: failed program was:" >&5
13083   cat conftest.$ac_ext >&5
13084   rm -fr conftest*
13085   ol_cv_pthread_lpthread_lmach_lexc=no
13086 fi
13087 rm -fr conftest*
13088 fi
13089
13090
13091                 # restore the LIBS
13092                 LIBS="$ol_LIBS"
13093         
13094 fi
13095
13096 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13097
13098         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13099                 ol_link_pthreads="-lpthread -lmach -lexc"
13100                 ol_link_threads=posix
13101         fi
13102 fi
13103
13104
13105                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13106 if test "$ol_link_threads" = no ; then
13107         # try -lpthread -Wl,-woff,85
13108         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13109 echo "configure:13110: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13110 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13111   echo $ac_n "(cached) $ac_c" 1>&6
13112 else
13113   
13114                 # save the flags
13115                 ol_LIBS="$LIBS"
13116                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13117
13118                 if test "$cross_compiling" = yes; then
13119   cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 /* pthread test headers */
13123 #include <pthread.h>
13124 #if HAVE_PTHREADS < 7
13125 #include <errno.h>
13126 #endif
13127 #ifndef NULL
13128 #define NULL (void*)0
13129 #endif
13130
13131 static void *task(p)
13132         void *p;
13133 {
13134         return (void *) (p == NULL);
13135 }
13136
13137 int main() {
13138
13139         /* pthread test function */
13140 #ifndef PTHREAD_CREATE_DETACHED
13141 #define PTHREAD_CREATE_DETACHED 1
13142 #endif
13143         pthread_t t;
13144         int status;
13145         int detach = PTHREAD_CREATE_DETACHED;
13146
13147 #if HAVE_PTHREADS > 4
13148         /* Final pthreads */
13149         pthread_attr_t attr;
13150
13151         status = pthread_attr_init(&attr);
13152         if( status ) return status;
13153
13154 #if HAVE_PTHREADS < 7
13155         status = pthread_attr_setdetachstate(&attr, &detach);
13156         if( status < 0 ) status = errno;
13157 #else
13158         status = pthread_attr_setdetachstate(&attr, detach);
13159 #endif
13160         if( status ) return status;
13161         status = pthread_create( &t, &attr, task, NULL );
13162 #if HAVE_PTHREADS < 7
13163         if( status < 0 ) status = errno;
13164 #endif
13165         if( status ) return status;
13166 #else
13167         /* Draft 4 pthreads */
13168         status = pthread_create( &t, pthread_attr_default, task, NULL );
13169         if( status ) return errno;
13170
13171         /* give thread a chance to complete */
13172         /* it should remain joinable and hence detachable */
13173         sleep( 1 );
13174
13175         status = pthread_detach( &t );
13176         if( status ) return errno;
13177 #endif
13178
13179 #ifdef HAVE_LINUX_THREADS
13180         pthread_kill_other_threads_np();
13181 #endif
13182
13183         return 0;
13184
13185 ; return 0; }
13186 EOF
13187 if { (eval echo configure:13188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13188   rm -rf conftest*
13189   ol_cv_pthread_lib_lpthread_woff=yes
13190 else
13191   echo "configure: failed program was:" >&5
13192   cat conftest.$ac_ext >&5
13193   rm -rf conftest*
13194   ol_cv_pthread_lib_lpthread_woff=no
13195 fi
13196 rm -f conftest*
13197 else
13198   cat > conftest.$ac_ext <<EOF
13199 #line 13200 "configure"
13200 #include "confdefs.h"
13201 /* pthread test headers */
13202 #include <pthread.h>
13203 #if HAVE_PTHREADS < 7
13204 #include <errno.h>
13205 #endif
13206 #ifndef NULL
13207 #define NULL (void*)0
13208 #endif
13209
13210 static void *task(p)
13211         void *p;
13212 {
13213         return (void *) (p == NULL);
13214 }
13215
13216
13217 int main(argc, argv)
13218         int argc;
13219         char **argv;
13220 {
13221
13222         /* pthread test function */
13223 #ifndef PTHREAD_CREATE_DETACHED
13224 #define PTHREAD_CREATE_DETACHED 1
13225 #endif
13226         pthread_t t;
13227         int status;
13228         int detach = PTHREAD_CREATE_DETACHED;
13229
13230 #if HAVE_PTHREADS > 4
13231         /* Final pthreads */
13232         pthread_attr_t attr;
13233
13234         status = pthread_attr_init(&attr);
13235         if( status ) return status;
13236
13237 #if HAVE_PTHREADS < 7
13238         status = pthread_attr_setdetachstate(&attr, &detach);
13239         if( status < 0 ) status = errno;
13240 #else
13241         status = pthread_attr_setdetachstate(&attr, detach);
13242 #endif
13243         if( status ) return status;
13244         status = pthread_create( &t, &attr, task, NULL );
13245 #if HAVE_PTHREADS < 7
13246         if( status < 0 ) status = errno;
13247 #endif
13248         if( status ) return status;
13249 #else
13250         /* Draft 4 pthreads */
13251         status = pthread_create( &t, pthread_attr_default, task, NULL );
13252         if( status ) return errno;
13253
13254         /* give thread a chance to complete */
13255         /* it should remain joinable and hence detachable */
13256         sleep( 1 );
13257
13258         status = pthread_detach( &t );
13259         if( status ) return errno;
13260 #endif
13261
13262 #ifdef HAVE_LINUX_THREADS
13263         pthread_kill_other_threads_np();
13264 #endif
13265
13266         return 0;
13267
13268 }
13269
13270 EOF
13271 if { (eval echo configure:13272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13272 then
13273   ol_cv_pthread_lib_lpthread_woff=yes
13274 else
13275   echo "configure: failed program was:" >&5
13276   cat conftest.$ac_ext >&5
13277   rm -fr conftest*
13278   ol_cv_pthread_lib_lpthread_woff=no
13279 fi
13280 rm -fr conftest*
13281 fi
13282
13283
13284                 # restore the LIBS
13285                 LIBS="$ol_LIBS"
13286         
13287 fi
13288
13289 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13290
13291         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13292                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13293                 ol_link_threads=posix
13294         fi
13295 fi
13296
13297
13298                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13299 if test "$ol_link_threads" = no ; then
13300         # try -lpthread
13301         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13302 echo "configure:13303: checking for pthread link with -lpthread" >&5
13303 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13304   echo $ac_n "(cached) $ac_c" 1>&6
13305 else
13306   
13307                 # save the flags
13308                 ol_LIBS="$LIBS"
13309                 LIBS="-lpthread $LIBS"
13310
13311                 if test "$cross_compiling" = yes; then
13312   cat > conftest.$ac_ext <<EOF
13313 #line 13314 "configure"
13314 #include "confdefs.h"
13315 /* pthread test headers */
13316 #include <pthread.h>
13317 #if HAVE_PTHREADS < 7
13318 #include <errno.h>
13319 #endif
13320 #ifndef NULL
13321 #define NULL (void*)0
13322 #endif
13323
13324 static void *task(p)
13325         void *p;
13326 {
13327         return (void *) (p == NULL);
13328 }
13329
13330 int main() {
13331
13332         /* pthread test function */
13333 #ifndef PTHREAD_CREATE_DETACHED
13334 #define PTHREAD_CREATE_DETACHED 1
13335 #endif
13336         pthread_t t;
13337         int status;
13338         int detach = PTHREAD_CREATE_DETACHED;
13339
13340 #if HAVE_PTHREADS > 4
13341         /* Final pthreads */
13342         pthread_attr_t attr;
13343
13344         status = pthread_attr_init(&attr);
13345         if( status ) return status;
13346
13347 #if HAVE_PTHREADS < 7
13348         status = pthread_attr_setdetachstate(&attr, &detach);
13349         if( status < 0 ) status = errno;
13350 #else
13351         status = pthread_attr_setdetachstate(&attr, detach);
13352 #endif
13353         if( status ) return status;
13354         status = pthread_create( &t, &attr, task, NULL );
13355 #if HAVE_PTHREADS < 7
13356         if( status < 0 ) status = errno;
13357 #endif
13358         if( status ) return status;
13359 #else
13360         /* Draft 4 pthreads */
13361         status = pthread_create( &t, pthread_attr_default, task, NULL );
13362         if( status ) return errno;
13363
13364         /* give thread a chance to complete */
13365         /* it should remain joinable and hence detachable */
13366         sleep( 1 );
13367
13368         status = pthread_detach( &t );
13369         if( status ) return errno;
13370 #endif
13371
13372 #ifdef HAVE_LINUX_THREADS
13373         pthread_kill_other_threads_np();
13374 #endif
13375
13376         return 0;
13377
13378 ; return 0; }
13379 EOF
13380 if { (eval echo configure:13381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13381   rm -rf conftest*
13382   ol_cv_pthread_lpthread=yes
13383 else
13384   echo "configure: failed program was:" >&5
13385   cat conftest.$ac_ext >&5
13386   rm -rf conftest*
13387   ol_cv_pthread_lpthread=no
13388 fi
13389 rm -f conftest*
13390 else
13391   cat > conftest.$ac_ext <<EOF
13392 #line 13393 "configure"
13393 #include "confdefs.h"
13394 /* pthread test headers */
13395 #include <pthread.h>
13396 #if HAVE_PTHREADS < 7
13397 #include <errno.h>
13398 #endif
13399 #ifndef NULL
13400 #define NULL (void*)0
13401 #endif
13402
13403 static void *task(p)
13404         void *p;
13405 {
13406         return (void *) (p == NULL);
13407 }
13408
13409
13410 int main(argc, argv)
13411         int argc;
13412         char **argv;
13413 {
13414
13415         /* pthread test function */
13416 #ifndef PTHREAD_CREATE_DETACHED
13417 #define PTHREAD_CREATE_DETACHED 1
13418 #endif
13419         pthread_t t;
13420         int status;
13421         int detach = PTHREAD_CREATE_DETACHED;
13422
13423 #if HAVE_PTHREADS > 4
13424         /* Final pthreads */
13425         pthread_attr_t attr;
13426
13427         status = pthread_attr_init(&attr);
13428         if( status ) return status;
13429
13430 #if HAVE_PTHREADS < 7
13431         status = pthread_attr_setdetachstate(&attr, &detach);
13432         if( status < 0 ) status = errno;
13433 #else
13434         status = pthread_attr_setdetachstate(&attr, detach);
13435 #endif
13436         if( status ) return status;
13437         status = pthread_create( &t, &attr, task, NULL );
13438 #if HAVE_PTHREADS < 7
13439         if( status < 0 ) status = errno;
13440 #endif
13441         if( status ) return status;
13442 #else
13443         /* Draft 4 pthreads */
13444         status = pthread_create( &t, pthread_attr_default, task, NULL );
13445         if( status ) return errno;
13446
13447         /* give thread a chance to complete */
13448         /* it should remain joinable and hence detachable */
13449         sleep( 1 );
13450
13451         status = pthread_detach( &t );
13452         if( status ) return errno;
13453 #endif
13454
13455 #ifdef HAVE_LINUX_THREADS
13456         pthread_kill_other_threads_np();
13457 #endif
13458
13459         return 0;
13460
13461 }
13462
13463 EOF
13464 if { (eval echo configure:13465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13465 then
13466   ol_cv_pthread_lpthread=yes
13467 else
13468   echo "configure: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   rm -fr conftest*
13471   ol_cv_pthread_lpthread=no
13472 fi
13473 rm -fr conftest*
13474 fi
13475
13476
13477                 # restore the LIBS
13478                 LIBS="$ol_LIBS"
13479         
13480 fi
13481
13482 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13483
13484         if test $ol_cv_pthread_lpthread = yes ; then
13485                 ol_link_pthreads="-lpthread"
13486                 ol_link_threads=posix
13487         fi
13488 fi
13489
13490                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13491 if test "$ol_link_threads" = no ; then
13492         # try -lc_r
13493         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13494 echo "configure:13495: checking for pthread link with -lc_r" >&5
13495 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13496   echo $ac_n "(cached) $ac_c" 1>&6
13497 else
13498   
13499                 # save the flags
13500                 ol_LIBS="$LIBS"
13501                 LIBS="-lc_r $LIBS"
13502
13503                 if test "$cross_compiling" = yes; then
13504   cat > conftest.$ac_ext <<EOF
13505 #line 13506 "configure"
13506 #include "confdefs.h"
13507 /* pthread test headers */
13508 #include <pthread.h>
13509 #if HAVE_PTHREADS < 7
13510 #include <errno.h>
13511 #endif
13512 #ifndef NULL
13513 #define NULL (void*)0
13514 #endif
13515
13516 static void *task(p)
13517         void *p;
13518 {
13519         return (void *) (p == NULL);
13520 }
13521
13522 int main() {
13523
13524         /* pthread test function */
13525 #ifndef PTHREAD_CREATE_DETACHED
13526 #define PTHREAD_CREATE_DETACHED 1
13527 #endif
13528         pthread_t t;
13529         int status;
13530         int detach = PTHREAD_CREATE_DETACHED;
13531
13532 #if HAVE_PTHREADS > 4
13533         /* Final pthreads */
13534         pthread_attr_t attr;
13535
13536         status = pthread_attr_init(&attr);
13537         if( status ) return status;
13538
13539 #if HAVE_PTHREADS < 7
13540         status = pthread_attr_setdetachstate(&attr, &detach);
13541         if( status < 0 ) status = errno;
13542 #else
13543         status = pthread_attr_setdetachstate(&attr, detach);
13544 #endif
13545         if( status ) return status;
13546         status = pthread_create( &t, &attr, task, NULL );
13547 #if HAVE_PTHREADS < 7
13548         if( status < 0 ) status = errno;
13549 #endif
13550         if( status ) return status;
13551 #else
13552         /* Draft 4 pthreads */
13553         status = pthread_create( &t, pthread_attr_default, task, NULL );
13554         if( status ) return errno;
13555
13556         /* give thread a chance to complete */
13557         /* it should remain joinable and hence detachable */
13558         sleep( 1 );
13559
13560         status = pthread_detach( &t );
13561         if( status ) return errno;
13562 #endif
13563
13564 #ifdef HAVE_LINUX_THREADS
13565         pthread_kill_other_threads_np();
13566 #endif
13567
13568         return 0;
13569
13570 ; return 0; }
13571 EOF
13572 if { (eval echo configure:13573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13573   rm -rf conftest*
13574   ol_cv_pthread_lc_r=yes
13575 else
13576   echo "configure: failed program was:" >&5
13577   cat conftest.$ac_ext >&5
13578   rm -rf conftest*
13579   ol_cv_pthread_lc_r=no
13580 fi
13581 rm -f conftest*
13582 else
13583   cat > conftest.$ac_ext <<EOF
13584 #line 13585 "configure"
13585 #include "confdefs.h"
13586 /* pthread test headers */
13587 #include <pthread.h>
13588 #if HAVE_PTHREADS < 7
13589 #include <errno.h>
13590 #endif
13591 #ifndef NULL
13592 #define NULL (void*)0
13593 #endif
13594
13595 static void *task(p)
13596         void *p;
13597 {
13598         return (void *) (p == NULL);
13599 }
13600
13601
13602 int main(argc, argv)
13603         int argc;
13604         char **argv;
13605 {
13606
13607         /* pthread test function */
13608 #ifndef PTHREAD_CREATE_DETACHED
13609 #define PTHREAD_CREATE_DETACHED 1
13610 #endif
13611         pthread_t t;
13612         int status;
13613         int detach = PTHREAD_CREATE_DETACHED;
13614
13615 #if HAVE_PTHREADS > 4
13616         /* Final pthreads */
13617         pthread_attr_t attr;
13618
13619         status = pthread_attr_init(&attr);
13620         if( status ) return status;
13621
13622 #if HAVE_PTHREADS < 7
13623         status = pthread_attr_setdetachstate(&attr, &detach);
13624         if( status < 0 ) status = errno;
13625 #else
13626         status = pthread_attr_setdetachstate(&attr, detach);
13627 #endif
13628         if( status ) return status;
13629         status = pthread_create( &t, &attr, task, NULL );
13630 #if HAVE_PTHREADS < 7
13631         if( status < 0 ) status = errno;
13632 #endif
13633         if( status ) return status;
13634 #else
13635         /* Draft 4 pthreads */
13636         status = pthread_create( &t, pthread_attr_default, task, NULL );
13637         if( status ) return errno;
13638
13639         /* give thread a chance to complete */
13640         /* it should remain joinable and hence detachable */
13641         sleep( 1 );
13642
13643         status = pthread_detach( &t );
13644         if( status ) return errno;
13645 #endif
13646
13647 #ifdef HAVE_LINUX_THREADS
13648         pthread_kill_other_threads_np();
13649 #endif
13650
13651         return 0;
13652
13653 }
13654
13655 EOF
13656 if { (eval echo configure:13657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13657 then
13658   ol_cv_pthread_lc_r=yes
13659 else
13660   echo "configure: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   rm -fr conftest*
13663   ol_cv_pthread_lc_r=no
13664 fi
13665 rm -fr conftest*
13666 fi
13667
13668
13669                 # restore the LIBS
13670                 LIBS="$ol_LIBS"
13671         
13672 fi
13673
13674 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13675
13676         if test $ol_cv_pthread_lc_r = yes ; then
13677                 ol_link_pthreads="-lc_r"
13678                 ol_link_threads=posix
13679         fi
13680 fi
13681
13682
13683                 # Pthread try link: -threads (ol_cv_pthread_threads)
13684 if test "$ol_link_threads" = no ; then
13685         # try -threads
13686         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13687 echo "configure:13688: checking for pthread link with -threads" >&5
13688 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13689   echo $ac_n "(cached) $ac_c" 1>&6
13690 else
13691   
13692                 # save the flags
13693                 ol_LIBS="$LIBS"
13694                 LIBS="-threads $LIBS"
13695
13696                 if test "$cross_compiling" = yes; then
13697   cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 /* pthread test headers */
13701 #include <pthread.h>
13702 #if HAVE_PTHREADS < 7
13703 #include <errno.h>
13704 #endif
13705 #ifndef NULL
13706 #define NULL (void*)0
13707 #endif
13708
13709 static void *task(p)
13710         void *p;
13711 {
13712         return (void *) (p == NULL);
13713 }
13714
13715 int main() {
13716
13717         /* pthread test function */
13718 #ifndef PTHREAD_CREATE_DETACHED
13719 #define PTHREAD_CREATE_DETACHED 1
13720 #endif
13721         pthread_t t;
13722         int status;
13723         int detach = PTHREAD_CREATE_DETACHED;
13724
13725 #if HAVE_PTHREADS > 4
13726         /* Final pthreads */
13727         pthread_attr_t attr;
13728
13729         status = pthread_attr_init(&attr);
13730         if( status ) return status;
13731
13732 #if HAVE_PTHREADS < 7
13733         status = pthread_attr_setdetachstate(&attr, &detach);
13734         if( status < 0 ) status = errno;
13735 #else
13736         status = pthread_attr_setdetachstate(&attr, detach);
13737 #endif
13738         if( status ) return status;
13739         status = pthread_create( &t, &attr, task, NULL );
13740 #if HAVE_PTHREADS < 7
13741         if( status < 0 ) status = errno;
13742 #endif
13743         if( status ) return status;
13744 #else
13745         /* Draft 4 pthreads */
13746         status = pthread_create( &t, pthread_attr_default, task, NULL );
13747         if( status ) return errno;
13748
13749         /* give thread a chance to complete */
13750         /* it should remain joinable and hence detachable */
13751         sleep( 1 );
13752
13753         status = pthread_detach( &t );
13754         if( status ) return errno;
13755 #endif
13756
13757 #ifdef HAVE_LINUX_THREADS
13758         pthread_kill_other_threads_np();
13759 #endif
13760
13761         return 0;
13762
13763 ; return 0; }
13764 EOF
13765 if { (eval echo configure:13766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13766   rm -rf conftest*
13767   ol_cv_pthread_threads=yes
13768 else
13769   echo "configure: failed program was:" >&5
13770   cat conftest.$ac_ext >&5
13771   rm -rf conftest*
13772   ol_cv_pthread_threads=no
13773 fi
13774 rm -f conftest*
13775 else
13776   cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* pthread test headers */
13780 #include <pthread.h>
13781 #if HAVE_PTHREADS < 7
13782 #include <errno.h>
13783 #endif
13784 #ifndef NULL
13785 #define NULL (void*)0
13786 #endif
13787
13788 static void *task(p)
13789         void *p;
13790 {
13791         return (void *) (p == NULL);
13792 }
13793
13794
13795 int main(argc, argv)
13796         int argc;
13797         char **argv;
13798 {
13799
13800         /* pthread test function */
13801 #ifndef PTHREAD_CREATE_DETACHED
13802 #define PTHREAD_CREATE_DETACHED 1
13803 #endif
13804         pthread_t t;
13805         int status;
13806         int detach = PTHREAD_CREATE_DETACHED;
13807
13808 #if HAVE_PTHREADS > 4
13809         /* Final pthreads */
13810         pthread_attr_t attr;
13811
13812         status = pthread_attr_init(&attr);
13813         if( status ) return status;
13814
13815 #if HAVE_PTHREADS < 7
13816         status = pthread_attr_setdetachstate(&attr, &detach);
13817         if( status < 0 ) status = errno;
13818 #else
13819         status = pthread_attr_setdetachstate(&attr, detach);
13820 #endif
13821         if( status ) return status;
13822         status = pthread_create( &t, &attr, task, NULL );
13823 #if HAVE_PTHREADS < 7
13824         if( status < 0 ) status = errno;
13825 #endif
13826         if( status ) return status;
13827 #else
13828         /* Draft 4 pthreads */
13829         status = pthread_create( &t, pthread_attr_default, task, NULL );
13830         if( status ) return errno;
13831
13832         /* give thread a chance to complete */
13833         /* it should remain joinable and hence detachable */
13834         sleep( 1 );
13835
13836         status = pthread_detach( &t );
13837         if( status ) return errno;
13838 #endif
13839
13840 #ifdef HAVE_LINUX_THREADS
13841         pthread_kill_other_threads_np();
13842 #endif
13843
13844         return 0;
13845
13846 }
13847
13848 EOF
13849 if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13850 then
13851   ol_cv_pthread_threads=yes
13852 else
13853   echo "configure: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   rm -fr conftest*
13856   ol_cv_pthread_threads=no
13857 fi
13858 rm -fr conftest*
13859 fi
13860
13861
13862                 # restore the LIBS
13863                 LIBS="$ol_LIBS"
13864         
13865 fi
13866
13867 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13868
13869         if test $ol_cv_pthread_threads = yes ; then
13870                 ol_link_pthreads="-threads"
13871                 ol_link_threads=posix
13872         fi
13873 fi
13874
13875
13876                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13877 if test "$ol_link_threads" = no ; then
13878         # try -lpthreads -lmach -lexc -lc_r
13879         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13880 echo "configure:13881: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13881 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13882   echo $ac_n "(cached) $ac_c" 1>&6
13883 else
13884   
13885                 # save the flags
13886                 ol_LIBS="$LIBS"
13887                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13888
13889                 if test "$cross_compiling" = yes; then
13890   cat > conftest.$ac_ext <<EOF
13891 #line 13892 "configure"
13892 #include "confdefs.h"
13893 /* pthread test headers */
13894 #include <pthread.h>
13895 #if HAVE_PTHREADS < 7
13896 #include <errno.h>
13897 #endif
13898 #ifndef NULL
13899 #define NULL (void*)0
13900 #endif
13901
13902 static void *task(p)
13903         void *p;
13904 {
13905         return (void *) (p == NULL);
13906 }
13907
13908 int main() {
13909
13910         /* pthread test function */
13911 #ifndef PTHREAD_CREATE_DETACHED
13912 #define PTHREAD_CREATE_DETACHED 1
13913 #endif
13914         pthread_t t;
13915         int status;
13916         int detach = PTHREAD_CREATE_DETACHED;
13917
13918 #if HAVE_PTHREADS > 4
13919         /* Final pthreads */
13920         pthread_attr_t attr;
13921
13922         status = pthread_attr_init(&attr);
13923         if( status ) return status;
13924
13925 #if HAVE_PTHREADS < 7
13926         status = pthread_attr_setdetachstate(&attr, &detach);
13927         if( status < 0 ) status = errno;
13928 #else
13929         status = pthread_attr_setdetachstate(&attr, detach);
13930 #endif
13931         if( status ) return status;
13932         status = pthread_create( &t, &attr, task, NULL );
13933 #if HAVE_PTHREADS < 7
13934         if( status < 0 ) status = errno;
13935 #endif
13936         if( status ) return status;
13937 #else
13938         /* Draft 4 pthreads */
13939         status = pthread_create( &t, pthread_attr_default, task, NULL );
13940         if( status ) return errno;
13941
13942         /* give thread a chance to complete */
13943         /* it should remain joinable and hence detachable */
13944         sleep( 1 );
13945
13946         status = pthread_detach( &t );
13947         if( status ) return errno;
13948 #endif
13949
13950 #ifdef HAVE_LINUX_THREADS
13951         pthread_kill_other_threads_np();
13952 #endif
13953
13954         return 0;
13955
13956 ; return 0; }
13957 EOF
13958 if { (eval echo configure:13959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13959   rm -rf conftest*
13960   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13961 else
13962   echo "configure: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964   rm -rf conftest*
13965   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13966 fi
13967 rm -f conftest*
13968 else
13969   cat > conftest.$ac_ext <<EOF
13970 #line 13971 "configure"
13971 #include "confdefs.h"
13972 /* pthread test headers */
13973 #include <pthread.h>
13974 #if HAVE_PTHREADS < 7
13975 #include <errno.h>
13976 #endif
13977 #ifndef NULL
13978 #define NULL (void*)0
13979 #endif
13980
13981 static void *task(p)
13982         void *p;
13983 {
13984         return (void *) (p == NULL);
13985 }
13986
13987
13988 int main(argc, argv)
13989         int argc;
13990         char **argv;
13991 {
13992
13993         /* pthread test function */
13994 #ifndef PTHREAD_CREATE_DETACHED
13995 #define PTHREAD_CREATE_DETACHED 1
13996 #endif
13997         pthread_t t;
13998         int status;
13999         int detach = PTHREAD_CREATE_DETACHED;
14000
14001 #if HAVE_PTHREADS > 4
14002         /* Final pthreads */
14003         pthread_attr_t attr;
14004
14005         status = pthread_attr_init(&attr);
14006         if( status ) return status;
14007
14008 #if HAVE_PTHREADS < 7
14009         status = pthread_attr_setdetachstate(&attr, &detach);
14010         if( status < 0 ) status = errno;
14011 #else
14012         status = pthread_attr_setdetachstate(&attr, detach);
14013 #endif
14014         if( status ) return status;
14015         status = pthread_create( &t, &attr, task, NULL );
14016 #if HAVE_PTHREADS < 7
14017         if( status < 0 ) status = errno;
14018 #endif
14019         if( status ) return status;
14020 #else
14021         /* Draft 4 pthreads */
14022         status = pthread_create( &t, pthread_attr_default, task, NULL );
14023         if( status ) return errno;
14024
14025         /* give thread a chance to complete */
14026         /* it should remain joinable and hence detachable */
14027         sleep( 1 );
14028
14029         status = pthread_detach( &t );
14030         if( status ) return errno;
14031 #endif
14032
14033 #ifdef HAVE_LINUX_THREADS
14034         pthread_kill_other_threads_np();
14035 #endif
14036
14037         return 0;
14038
14039 }
14040
14041 EOF
14042 if { (eval echo configure:14043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14043 then
14044   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14045 else
14046   echo "configure: failed program was:" >&5
14047   cat conftest.$ac_ext >&5
14048   rm -fr conftest*
14049   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14050 fi
14051 rm -fr conftest*
14052 fi
14053
14054
14055                 # restore the LIBS
14056                 LIBS="$ol_LIBS"
14057         
14058 fi
14059
14060 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14061
14062         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14063                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14064                 ol_link_threads=posix
14065         fi
14066 fi
14067
14068                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14069 if test "$ol_link_threads" = no ; then
14070         # try -lpthreads -lmach -lexc
14071         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14072 echo "configure:14073: checking for pthread link with -lpthreads -lmach -lexc" >&5
14073 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14074   echo $ac_n "(cached) $ac_c" 1>&6
14075 else
14076   
14077                 # save the flags
14078                 ol_LIBS="$LIBS"
14079                 LIBS="-lpthreads -lmach -lexc $LIBS"
14080
14081                 if test "$cross_compiling" = yes; then
14082   cat > conftest.$ac_ext <<EOF
14083 #line 14084 "configure"
14084 #include "confdefs.h"
14085 /* pthread test headers */
14086 #include <pthread.h>
14087 #if HAVE_PTHREADS < 7
14088 #include <errno.h>
14089 #endif
14090 #ifndef NULL
14091 #define NULL (void*)0
14092 #endif
14093
14094 static void *task(p)
14095         void *p;
14096 {
14097         return (void *) (p == NULL);
14098 }
14099
14100 int main() {
14101
14102         /* pthread test function */
14103 #ifndef PTHREAD_CREATE_DETACHED
14104 #define PTHREAD_CREATE_DETACHED 1
14105 #endif
14106         pthread_t t;
14107         int status;
14108         int detach = PTHREAD_CREATE_DETACHED;
14109
14110 #if HAVE_PTHREADS > 4
14111         /* Final pthreads */
14112         pthread_attr_t attr;
14113
14114         status = pthread_attr_init(&attr);
14115         if( status ) return status;
14116
14117 #if HAVE_PTHREADS < 7
14118         status = pthread_attr_setdetachstate(&attr, &detach);
14119         if( status < 0 ) status = errno;
14120 #else
14121         status = pthread_attr_setdetachstate(&attr, detach);
14122 #endif
14123         if( status ) return status;
14124         status = pthread_create( &t, &attr, task, NULL );
14125 #if HAVE_PTHREADS < 7
14126         if( status < 0 ) status = errno;
14127 #endif
14128         if( status ) return status;
14129 #else
14130         /* Draft 4 pthreads */
14131         status = pthread_create( &t, pthread_attr_default, task, NULL );
14132         if( status ) return errno;
14133
14134         /* give thread a chance to complete */
14135         /* it should remain joinable and hence detachable */
14136         sleep( 1 );
14137
14138         status = pthread_detach( &t );
14139         if( status ) return errno;
14140 #endif
14141
14142 #ifdef HAVE_LINUX_THREADS
14143         pthread_kill_other_threads_np();
14144 #endif
14145
14146         return 0;
14147
14148 ; return 0; }
14149 EOF
14150 if { (eval echo configure:14151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14151   rm -rf conftest*
14152   ol_cv_pthread_lpthreads_lmach_lexc=yes
14153 else
14154   echo "configure: failed program was:" >&5
14155   cat conftest.$ac_ext >&5
14156   rm -rf conftest*
14157   ol_cv_pthread_lpthreads_lmach_lexc=no
14158 fi
14159 rm -f conftest*
14160 else
14161   cat > conftest.$ac_ext <<EOF
14162 #line 14163 "configure"
14163 #include "confdefs.h"
14164 /* pthread test headers */
14165 #include <pthread.h>
14166 #if HAVE_PTHREADS < 7
14167 #include <errno.h>
14168 #endif
14169 #ifndef NULL
14170 #define NULL (void*)0
14171 #endif
14172
14173 static void *task(p)
14174         void *p;
14175 {
14176         return (void *) (p == NULL);
14177 }
14178
14179
14180 int main(argc, argv)
14181         int argc;
14182         char **argv;
14183 {
14184
14185         /* pthread test function */
14186 #ifndef PTHREAD_CREATE_DETACHED
14187 #define PTHREAD_CREATE_DETACHED 1
14188 #endif
14189         pthread_t t;
14190         int status;
14191         int detach = PTHREAD_CREATE_DETACHED;
14192
14193 #if HAVE_PTHREADS > 4
14194         /* Final pthreads */
14195         pthread_attr_t attr;
14196
14197         status = pthread_attr_init(&attr);
14198         if( status ) return status;
14199
14200 #if HAVE_PTHREADS < 7
14201         status = pthread_attr_setdetachstate(&attr, &detach);
14202         if( status < 0 ) status = errno;
14203 #else
14204         status = pthread_attr_setdetachstate(&attr, detach);
14205 #endif
14206         if( status ) return status;
14207         status = pthread_create( &t, &attr, task, NULL );
14208 #if HAVE_PTHREADS < 7
14209         if( status < 0 ) status = errno;
14210 #endif
14211         if( status ) return status;
14212 #else
14213         /* Draft 4 pthreads */
14214         status = pthread_create( &t, pthread_attr_default, task, NULL );
14215         if( status ) return errno;
14216
14217         /* give thread a chance to complete */
14218         /* it should remain joinable and hence detachable */
14219         sleep( 1 );
14220
14221         status = pthread_detach( &t );
14222         if( status ) return errno;
14223 #endif
14224
14225 #ifdef HAVE_LINUX_THREADS
14226         pthread_kill_other_threads_np();
14227 #endif
14228
14229         return 0;
14230
14231 }
14232
14233 EOF
14234 if { (eval echo configure:14235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14235 then
14236   ol_cv_pthread_lpthreads_lmach_lexc=yes
14237 else
14238   echo "configure: failed program was:" >&5
14239   cat conftest.$ac_ext >&5
14240   rm -fr conftest*
14241   ol_cv_pthread_lpthreads_lmach_lexc=no
14242 fi
14243 rm -fr conftest*
14244 fi
14245
14246
14247                 # restore the LIBS
14248                 LIBS="$ol_LIBS"
14249         
14250 fi
14251
14252 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14253
14254         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14255                 ol_link_pthreads="-lpthreads -lmach -lexc"
14256                 ol_link_threads=posix
14257         fi
14258 fi
14259
14260                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14261 if test "$ol_link_threads" = no ; then
14262         # try -lpthreads -lexc
14263         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14264 echo "configure:14265: checking for pthread link with -lpthreads -lexc" >&5
14265 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14266   echo $ac_n "(cached) $ac_c" 1>&6
14267 else
14268   
14269                 # save the flags
14270                 ol_LIBS="$LIBS"
14271                 LIBS="-lpthreads -lexc $LIBS"
14272
14273                 if test "$cross_compiling" = yes; then
14274   cat > conftest.$ac_ext <<EOF
14275 #line 14276 "configure"
14276 #include "confdefs.h"
14277 /* pthread test headers */
14278 #include <pthread.h>
14279 #if HAVE_PTHREADS < 7
14280 #include <errno.h>
14281 #endif
14282 #ifndef NULL
14283 #define NULL (void*)0
14284 #endif
14285
14286 static void *task(p)
14287         void *p;
14288 {
14289         return (void *) (p == NULL);
14290 }
14291
14292 int main() {
14293
14294         /* pthread test function */
14295 #ifndef PTHREAD_CREATE_DETACHED
14296 #define PTHREAD_CREATE_DETACHED 1
14297 #endif
14298         pthread_t t;
14299         int status;
14300         int detach = PTHREAD_CREATE_DETACHED;
14301
14302 #if HAVE_PTHREADS > 4
14303         /* Final pthreads */
14304         pthread_attr_t attr;
14305
14306         status = pthread_attr_init(&attr);
14307         if( status ) return status;
14308
14309 #if HAVE_PTHREADS < 7
14310         status = pthread_attr_setdetachstate(&attr, &detach);
14311         if( status < 0 ) status = errno;
14312 #else
14313         status = pthread_attr_setdetachstate(&attr, detach);
14314 #endif
14315         if( status ) return status;
14316         status = pthread_create( &t, &attr, task, NULL );
14317 #if HAVE_PTHREADS < 7
14318         if( status < 0 ) status = errno;
14319 #endif
14320         if( status ) return status;
14321 #else
14322         /* Draft 4 pthreads */
14323         status = pthread_create( &t, pthread_attr_default, task, NULL );
14324         if( status ) return errno;
14325
14326         /* give thread a chance to complete */
14327         /* it should remain joinable and hence detachable */
14328         sleep( 1 );
14329
14330         status = pthread_detach( &t );
14331         if( status ) return errno;
14332 #endif
14333
14334 #ifdef HAVE_LINUX_THREADS
14335         pthread_kill_other_threads_np();
14336 #endif
14337
14338         return 0;
14339
14340 ; return 0; }
14341 EOF
14342 if { (eval echo configure:14343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14343   rm -rf conftest*
14344   ol_cv_pthread_lpthreads_lexc=yes
14345 else
14346   echo "configure: failed program was:" >&5
14347   cat conftest.$ac_ext >&5
14348   rm -rf conftest*
14349   ol_cv_pthread_lpthreads_lexc=no
14350 fi
14351 rm -f conftest*
14352 else
14353   cat > conftest.$ac_ext <<EOF
14354 #line 14355 "configure"
14355 #include "confdefs.h"
14356 /* pthread test headers */
14357 #include <pthread.h>
14358 #if HAVE_PTHREADS < 7
14359 #include <errno.h>
14360 #endif
14361 #ifndef NULL
14362 #define NULL (void*)0
14363 #endif
14364
14365 static void *task(p)
14366         void *p;
14367 {
14368         return (void *) (p == NULL);
14369 }
14370
14371
14372 int main(argc, argv)
14373         int argc;
14374         char **argv;
14375 {
14376
14377         /* pthread test function */
14378 #ifndef PTHREAD_CREATE_DETACHED
14379 #define PTHREAD_CREATE_DETACHED 1
14380 #endif
14381         pthread_t t;
14382         int status;
14383         int detach = PTHREAD_CREATE_DETACHED;
14384
14385 #if HAVE_PTHREADS > 4
14386         /* Final pthreads */
14387         pthread_attr_t attr;
14388
14389         status = pthread_attr_init(&attr);
14390         if( status ) return status;
14391
14392 #if HAVE_PTHREADS < 7
14393         status = pthread_attr_setdetachstate(&attr, &detach);
14394         if( status < 0 ) status = errno;
14395 #else
14396         status = pthread_attr_setdetachstate(&attr, detach);
14397 #endif
14398         if( status ) return status;
14399         status = pthread_create( &t, &attr, task, NULL );
14400 #if HAVE_PTHREADS < 7
14401         if( status < 0 ) status = errno;
14402 #endif
14403         if( status ) return status;
14404 #else
14405         /* Draft 4 pthreads */
14406         status = pthread_create( &t, pthread_attr_default, task, NULL );
14407         if( status ) return errno;
14408
14409         /* give thread a chance to complete */
14410         /* it should remain joinable and hence detachable */
14411         sleep( 1 );
14412
14413         status = pthread_detach( &t );
14414         if( status ) return errno;
14415 #endif
14416
14417 #ifdef HAVE_LINUX_THREADS
14418         pthread_kill_other_threads_np();
14419 #endif
14420
14421         return 0;
14422
14423 }
14424
14425 EOF
14426 if { (eval echo configure:14427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14427 then
14428   ol_cv_pthread_lpthreads_lexc=yes
14429 else
14430   echo "configure: failed program was:" >&5
14431   cat conftest.$ac_ext >&5
14432   rm -fr conftest*
14433   ol_cv_pthread_lpthreads_lexc=no
14434 fi
14435 rm -fr conftest*
14436 fi
14437
14438
14439                 # restore the LIBS
14440                 LIBS="$ol_LIBS"
14441         
14442 fi
14443
14444 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14445
14446         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14447                 ol_link_pthreads="-lpthreads -lexc"
14448                 ol_link_threads=posix
14449         fi
14450 fi
14451
14452
14453                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14454 if test "$ol_link_threads" = no ; then
14455         # try -lpthreads
14456         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14457 echo "configure:14458: checking for pthread link with -lpthreads" >&5
14458 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14459   echo $ac_n "(cached) $ac_c" 1>&6
14460 else
14461   
14462                 # save the flags
14463                 ol_LIBS="$LIBS"
14464                 LIBS="-lpthreads $LIBS"
14465
14466                 if test "$cross_compiling" = yes; then
14467   cat > conftest.$ac_ext <<EOF
14468 #line 14469 "configure"
14469 #include "confdefs.h"
14470 /* pthread test headers */
14471 #include <pthread.h>
14472 #if HAVE_PTHREADS < 7
14473 #include <errno.h>
14474 #endif
14475 #ifndef NULL
14476 #define NULL (void*)0
14477 #endif
14478
14479 static void *task(p)
14480         void *p;
14481 {
14482         return (void *) (p == NULL);
14483 }
14484
14485 int main() {
14486
14487         /* pthread test function */
14488 #ifndef PTHREAD_CREATE_DETACHED
14489 #define PTHREAD_CREATE_DETACHED 1
14490 #endif
14491         pthread_t t;
14492         int status;
14493         int detach = PTHREAD_CREATE_DETACHED;
14494
14495 #if HAVE_PTHREADS > 4
14496         /* Final pthreads */
14497         pthread_attr_t attr;
14498
14499         status = pthread_attr_init(&attr);
14500         if( status ) return status;
14501
14502 #if HAVE_PTHREADS < 7
14503         status = pthread_attr_setdetachstate(&attr, &detach);
14504         if( status < 0 ) status = errno;
14505 #else
14506         status = pthread_attr_setdetachstate(&attr, detach);
14507 #endif
14508         if( status ) return status;
14509         status = pthread_create( &t, &attr, task, NULL );
14510 #if HAVE_PTHREADS < 7
14511         if( status < 0 ) status = errno;
14512 #endif
14513         if( status ) return status;
14514 #else
14515         /* Draft 4 pthreads */
14516         status = pthread_create( &t, pthread_attr_default, task, NULL );
14517         if( status ) return errno;
14518
14519         /* give thread a chance to complete */
14520         /* it should remain joinable and hence detachable */
14521         sleep( 1 );
14522
14523         status = pthread_detach( &t );
14524         if( status ) return errno;
14525 #endif
14526
14527 #ifdef HAVE_LINUX_THREADS
14528         pthread_kill_other_threads_np();
14529 #endif
14530
14531         return 0;
14532
14533 ; return 0; }
14534 EOF
14535 if { (eval echo configure:14536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14536   rm -rf conftest*
14537   ol_cv_pthread_lib_lpthreads=yes
14538 else
14539   echo "configure: failed program was:" >&5
14540   cat conftest.$ac_ext >&5
14541   rm -rf conftest*
14542   ol_cv_pthread_lib_lpthreads=no
14543 fi
14544 rm -f conftest*
14545 else
14546   cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 /* pthread test headers */
14550 #include <pthread.h>
14551 #if HAVE_PTHREADS < 7
14552 #include <errno.h>
14553 #endif
14554 #ifndef NULL
14555 #define NULL (void*)0
14556 #endif
14557
14558 static void *task(p)
14559         void *p;
14560 {
14561         return (void *) (p == NULL);
14562 }
14563
14564
14565 int main(argc, argv)
14566         int argc;
14567         char **argv;
14568 {
14569
14570         /* pthread test function */
14571 #ifndef PTHREAD_CREATE_DETACHED
14572 #define PTHREAD_CREATE_DETACHED 1
14573 #endif
14574         pthread_t t;
14575         int status;
14576         int detach = PTHREAD_CREATE_DETACHED;
14577
14578 #if HAVE_PTHREADS > 4
14579         /* Final pthreads */
14580         pthread_attr_t attr;
14581
14582         status = pthread_attr_init(&attr);
14583         if( status ) return status;
14584
14585 #if HAVE_PTHREADS < 7
14586         status = pthread_attr_setdetachstate(&attr, &detach);
14587         if( status < 0 ) status = errno;
14588 #else
14589         status = pthread_attr_setdetachstate(&attr, detach);
14590 #endif
14591         if( status ) return status;
14592         status = pthread_create( &t, &attr, task, NULL );
14593 #if HAVE_PTHREADS < 7
14594         if( status < 0 ) status = errno;
14595 #endif
14596         if( status ) return status;
14597 #else
14598         /* Draft 4 pthreads */
14599         status = pthread_create( &t, pthread_attr_default, task, NULL );
14600         if( status ) return errno;
14601
14602         /* give thread a chance to complete */
14603         /* it should remain joinable and hence detachable */
14604         sleep( 1 );
14605
14606         status = pthread_detach( &t );
14607         if( status ) return errno;
14608 #endif
14609
14610 #ifdef HAVE_LINUX_THREADS
14611         pthread_kill_other_threads_np();
14612 #endif
14613
14614         return 0;
14615
14616 }
14617
14618 EOF
14619 if { (eval echo configure:14620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14620 then
14621   ol_cv_pthread_lib_lpthreads=yes
14622 else
14623   echo "configure: failed program was:" >&5
14624   cat conftest.$ac_ext >&5
14625   rm -fr conftest*
14626   ol_cv_pthread_lib_lpthreads=no
14627 fi
14628 rm -fr conftest*
14629 fi
14630
14631
14632                 # restore the LIBS
14633                 LIBS="$ol_LIBS"
14634         
14635 fi
14636
14637 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14638
14639         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14640                 ol_link_pthreads="-lpthreads"
14641                 ol_link_threads=posix
14642         fi
14643 fi
14644
14645
14646                 if test $ol_link_threads != no ; then
14647                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14648
14649                                                 save_CPPFLAGS="$CPPFLAGS"
14650                         save_LIBS="$LIBS"
14651                         LIBS="$LTHREAD_LIBS $LIBS"
14652
14653                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14654 do
14655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14656 echo "configure:14657: checking for $ac_func" >&5
14657 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14658   echo $ac_n "(cached) $ac_c" 1>&6
14659 else
14660   cat > conftest.$ac_ext <<EOF
14661 #line 14662 "configure"
14662 #include "confdefs.h"
14663 /* System header to define __stub macros and hopefully few prototypes,
14664     which can conflict with char $ac_func(); below.  */
14665 #include <assert.h>
14666 /* Override any gcc2 internal prototype to avoid an error.  */
14667 /* We use char because int might match the return type of a gcc2
14668     builtin and then its argument prototype would still apply.  */
14669 char $ac_func();
14670 char (*f)();
14671
14672 int main() {
14673
14674 /* The GNU C library defines this for functions which it implements
14675     to always fail with ENOSYS.  Some functions are actually named
14676     something starting with __ and the normal name is an alias.  */
14677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14678 choke me
14679 #else
14680 f = $ac_func;
14681 #endif
14682
14683 ; return 0; }
14684 EOF
14685 if { (eval echo configure:14686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14686   rm -rf conftest*
14687   eval "ac_cv_func_$ac_func=yes"
14688 else
14689   echo "configure: failed program was:" >&5
14690   cat conftest.$ac_ext >&5
14691   rm -rf conftest*
14692   eval "ac_cv_func_$ac_func=no"
14693 fi
14694 rm -f conftest*
14695 fi
14696
14697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14698   echo "$ac_t""yes" 1>&6
14699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14700   cat >> confdefs.h <<EOF
14701 #define $ac_tr_func 1
14702 EOF
14703  
14704 else
14705   echo "$ac_t""no" 1>&6
14706 fi
14707 done
14708
14709
14710                         if test $ac_cv_func_sched_yield = no -a \
14711                                 $ac_cv_func_pthread_yield = no -a \
14712                                 $ac_cv_func_thr_yield = no ; then
14713                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14714 echo "configure:14715: checking for sched_yield in -lrt" >&5
14715 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14716 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14717   echo $ac_n "(cached) $ac_c" 1>&6
14718 else
14719   ac_save_LIBS="$LIBS"
14720 LIBS="-lrt  $LIBS"
14721 cat > conftest.$ac_ext <<EOF
14722 #line 14723 "configure"
14723 #include "confdefs.h"
14724 /* Override any gcc2 internal prototype to avoid an error.  */
14725 /* We use char because int might match the return type of a gcc2
14726     builtin and then its argument prototype would still apply.  */
14727 char sched_yield();
14728
14729 int main() {
14730 sched_yield()
14731 ; return 0; }
14732 EOF
14733 if { (eval echo configure:14734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14734   rm -rf conftest*
14735   eval "ac_cv_lib_$ac_lib_var=yes"
14736 else
14737   echo "configure: failed program was:" >&5
14738   cat conftest.$ac_ext >&5
14739   rm -rf conftest*
14740   eval "ac_cv_lib_$ac_lib_var=no"
14741 fi
14742 rm -f conftest*
14743 LIBS="$ac_save_LIBS"
14744
14745 fi
14746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14747   echo "$ac_t""yes" 1>&6
14748   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14749                                         cat >> confdefs.h <<\EOF
14750 #define HAVE_SCHED_YIELD 1
14751 EOF
14752
14753                                         ac_cv_func_sched_yield=yes
14754 else
14755   echo "$ac_t""no" 1>&6
14756 ac_cv_func_sched_yield=no
14757 fi
14758
14759                         fi
14760                         if test $ac_cv_func_sched_yield = no -a \
14761                                 $ac_cv_func_pthread_yield = no -a \
14762                                 "$ac_cv_func_thr_yield" = no ; then
14763                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14764                         fi
14765
14766                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14767 do
14768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14769 echo "configure:14770: checking for $ac_func" >&5
14770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14771   echo $ac_n "(cached) $ac_c" 1>&6
14772 else
14773   cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776 /* System header to define __stub macros and hopefully few prototypes,
14777     which can conflict with char $ac_func(); below.  */
14778 #include <assert.h>
14779 /* Override any gcc2 internal prototype to avoid an error.  */
14780 /* We use char because int might match the return type of a gcc2
14781     builtin and then its argument prototype would still apply.  */
14782 char $ac_func();
14783 char (*f)();
14784
14785 int main() {
14786
14787 /* The GNU C library defines this for functions which it implements
14788     to always fail with ENOSYS.  Some functions are actually named
14789     something starting with __ and the normal name is an alias.  */
14790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14791 choke me
14792 #else
14793 f = $ac_func;
14794 #endif
14795
14796 ; return 0; }
14797 EOF
14798 if { (eval echo configure:14799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14799   rm -rf conftest*
14800   eval "ac_cv_func_$ac_func=yes"
14801 else
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804   rm -rf conftest*
14805   eval "ac_cv_func_$ac_func=no"
14806 fi
14807 rm -f conftest*
14808 fi
14809
14810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14811   echo "$ac_t""yes" 1>&6
14812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14813   cat >> confdefs.h <<EOF
14814 #define $ac_tr_func 1
14815 EOF
14816  
14817 else
14818   echo "$ac_t""no" 1>&6
14819 fi
14820 done
14821
14822
14823                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14824 echo "configure:14825: checking for pthread_detach with <pthread.h>" >&5
14825 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14826   echo $ac_n "(cached) $ac_c" 1>&6
14827 else
14828   
14829                                                                 cat > conftest.$ac_ext <<EOF
14830 #line 14831 "configure"
14831 #include "confdefs.h"
14832
14833 #include <pthread.h>
14834 #ifndef NULL
14835 #define NULL (void*)0
14836 #endif
14837
14838 int main() {
14839 pthread_detach(NULL);
14840 ; return 0; }
14841 EOF
14842 if { (eval echo configure:14843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14843   rm -rf conftest*
14844   ol_cv_func_pthread_detach=yes
14845 else
14846   echo "configure: failed program was:" >&5
14847   cat conftest.$ac_ext >&5
14848   rm -rf conftest*
14849   ol_cv_func_pthread_detach=no
14850 fi
14851 rm -f conftest*
14852                         
14853 fi
14854
14855 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14856
14857                         if test $ol_cv_func_pthread_detach = no ; then
14858                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14859                         fi
14860
14861                         cat >> confdefs.h <<\EOF
14862 #define HAVE_PTHREAD_DETACH 1
14863 EOF
14864
14865
14866                                                 for ac_func in \
14867                                 pthread_setconcurrency \
14868                                 pthread_getconcurrency \
14869                                 thr_setconcurrency \
14870                                 thr_getconcurrency \
14871                         
14872 do
14873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14874 echo "configure:14875: checking for $ac_func" >&5
14875 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14876   echo $ac_n "(cached) $ac_c" 1>&6
14877 else
14878   cat > conftest.$ac_ext <<EOF
14879 #line 14880 "configure"
14880 #include "confdefs.h"
14881 /* System header to define __stub macros and hopefully few prototypes,
14882     which can conflict with char $ac_func(); below.  */
14883 #include <assert.h>
14884 /* Override any gcc2 internal prototype to avoid an error.  */
14885 /* We use char because int might match the return type of a gcc2
14886     builtin and then its argument prototype would still apply.  */
14887 char $ac_func();
14888 char (*f)();
14889
14890 int main() {
14891
14892 /* The GNU C library defines this for functions which it implements
14893     to always fail with ENOSYS.  Some functions are actually named
14894     something starting with __ and the normal name is an alias.  */
14895 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14896 choke me
14897 #else
14898 f = $ac_func;
14899 #endif
14900
14901 ; return 0; }
14902 EOF
14903 if { (eval echo configure:14904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14904   rm -rf conftest*
14905   eval "ac_cv_func_$ac_func=yes"
14906 else
14907   echo "configure: failed program was:" >&5
14908   cat conftest.$ac_ext >&5
14909   rm -rf conftest*
14910   eval "ac_cv_func_$ac_func=no"
14911 fi
14912 rm -f conftest*
14913 fi
14914
14915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14916   echo "$ac_t""yes" 1>&6
14917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14918   cat >> confdefs.h <<EOF
14919 #define $ac_tr_func 1
14920 EOF
14921  
14922 else
14923   echo "$ac_t""no" 1>&6
14924 fi
14925 done
14926
14927
14928                         
14929         for ac_func in pthread_kill_other_threads_np
14930 do
14931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14932 echo "configure:14933: checking for $ac_func" >&5
14933 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14934   echo $ac_n "(cached) $ac_c" 1>&6
14935 else
14936   cat > conftest.$ac_ext <<EOF
14937 #line 14938 "configure"
14938 #include "confdefs.h"
14939 /* System header to define __stub macros and hopefully few prototypes,
14940     which can conflict with char $ac_func(); below.  */
14941 #include <assert.h>
14942 /* Override any gcc2 internal prototype to avoid an error.  */
14943 /* We use char because int might match the return type of a gcc2
14944     builtin and then its argument prototype would still apply.  */
14945 char $ac_func();
14946 char (*f)();
14947
14948 int main() {
14949
14950 /* The GNU C library defines this for functions which it implements
14951     to always fail with ENOSYS.  Some functions are actually named
14952     something starting with __ and the normal name is an alias.  */
14953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14954 choke me
14955 #else
14956 f = $ac_func;
14957 #endif
14958
14959 ; return 0; }
14960 EOF
14961 if { (eval echo configure:14962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14962   rm -rf conftest*
14963   eval "ac_cv_func_$ac_func=yes"
14964 else
14965   echo "configure: failed program was:" >&5
14966   cat conftest.$ac_ext >&5
14967   rm -rf conftest*
14968   eval "ac_cv_func_$ac_func=no"
14969 fi
14970 rm -f conftest*
14971 fi
14972
14973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14974   echo "$ac_t""yes" 1>&6
14975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14976   cat >> confdefs.h <<EOF
14977 #define $ac_tr_func 1
14978 EOF
14979  
14980 else
14981   echo "$ac_t""no" 1>&6
14982 fi
14983 done
14984
14985         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14986 echo "configure:14987: checking for LinuxThreads implementation" >&5
14987 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14988   echo $ac_n "(cached) $ac_c" 1>&6
14989 else
14990   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14991 fi
14992
14993 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14994
14995                         
14996         
14997         
14998         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14999 echo "configure:15000: checking for LinuxThreads consistency" >&5
15000 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15001   echo $ac_n "(cached) $ac_c" 1>&6
15002 else
15003   
15004                 if test $ol_cv_header_linux_threads = yes -a \
15005                         $ol_cv_sys_linux_threads = yes; then
15006                         ol_cv_linux_threads=yes
15007                 elif test $ol_cv_header_linux_threads = no -a \
15008                         $ol_cv_sys_linux_threads = no; then
15009                         ol_cv_linux_threads=no
15010                 else
15011                         ol_cv_linux_threads=error
15012                 fi
15013         
15014 fi
15015
15016 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15017
15018
15019                         if test $ol_cv_linux_threads = error; then
15020                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15021                         fi
15022
15023                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15024 echo "configure:15025: checking if pthread_create() works" >&5
15025 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15026   echo $ac_n "(cached) $ac_c" 1>&6
15027 else
15028   
15029                         if test "$cross_compiling" = yes; then
15030                                 ol_cv_pthread_create_works=yes
15031 else
15032   cat > conftest.$ac_ext <<EOF
15033 #line 15034 "configure"
15034 #include "confdefs.h"
15035 /* pthread test headers */
15036 #include <pthread.h>
15037 #if HAVE_PTHREADS < 7
15038 #include <errno.h>
15039 #endif
15040 #ifndef NULL
15041 #define NULL (void*)0
15042 #endif
15043
15044 static void *task(p)
15045         void *p;
15046 {
15047         return (void *) (p == NULL);
15048 }
15049
15050
15051 int main(argc, argv)
15052         int argc;
15053         char **argv;
15054 {
15055
15056         /* pthread test function */
15057 #ifndef PTHREAD_CREATE_DETACHED
15058 #define PTHREAD_CREATE_DETACHED 1
15059 #endif
15060         pthread_t t;
15061         int status;
15062         int detach = PTHREAD_CREATE_DETACHED;
15063
15064 #if HAVE_PTHREADS > 4
15065         /* Final pthreads */
15066         pthread_attr_t attr;
15067
15068         status = pthread_attr_init(&attr);
15069         if( status ) return status;
15070
15071 #if HAVE_PTHREADS < 7
15072         status = pthread_attr_setdetachstate(&attr, &detach);
15073         if( status < 0 ) status = errno;
15074 #else
15075         status = pthread_attr_setdetachstate(&attr, detach);
15076 #endif
15077         if( status ) return status;
15078         status = pthread_create( &t, &attr, task, NULL );
15079 #if HAVE_PTHREADS < 7
15080         if( status < 0 ) status = errno;
15081 #endif
15082         if( status ) return status;
15083 #else
15084         /* Draft 4 pthreads */
15085         status = pthread_create( &t, pthread_attr_default, task, NULL );
15086         if( status ) return errno;
15087
15088         /* give thread a chance to complete */
15089         /* it should remain joinable and hence detachable */
15090         sleep( 1 );
15091
15092         status = pthread_detach( &t );
15093         if( status ) return errno;
15094 #endif
15095
15096 #ifdef HAVE_LINUX_THREADS
15097         pthread_kill_other_threads_np();
15098 #endif
15099
15100         return 0;
15101
15102 }
15103
15104 EOF
15105 if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15106 then
15107   ol_cv_pthread_create_works=yes
15108 else
15109   echo "configure: failed program was:" >&5
15110   cat conftest.$ac_ext >&5
15111   rm -fr conftest*
15112   ol_cv_pthread_create_works=no
15113 fi
15114 rm -fr conftest*
15115 fi
15116
15117 fi
15118
15119 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15120
15121                         if test $ol_cv_pthread_create_works = no ; then
15122                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15123                         fi
15124
15125                                                 if test $ol_with_yielding_select = auto ; then
15126                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15127 echo "configure:15128: checking if select yields when using pthreads" >&5
15128 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15129   echo $ac_n "(cached) $ac_c" 1>&6
15130 else
15131   
15132                                 if test "$cross_compiling" = yes; then
15133   ol_cv_pthread_select_yields=cross
15134 else
15135   cat > conftest.$ac_ext <<EOF
15136 #line 15137 "configure"
15137 #include "confdefs.h"
15138
15139 #include <sys/types.h>
15140 #include <sys/time.h>
15141 #include <unistd.h>
15142 #include <pthread.h>
15143 #ifndef NULL
15144 #define NULL (void*) 0
15145 #endif
15146
15147 static int fildes[2];
15148
15149 static void *task(p)
15150         void *p;
15151 {
15152         int i;
15153         struct timeval tv;
15154
15155         fd_set rfds;
15156
15157         tv.tv_sec=10;
15158         tv.tv_usec=0;
15159
15160         FD_ZERO(&rfds);
15161         FD_SET(fildes[0], &rfds);
15162
15163         /* we're not interested in any fds */
15164         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15165
15166         if(i < 0) {
15167                 perror("select");
15168                 exit(10);
15169         }
15170
15171         exit(0); /* if we exit here, the select blocked the whole process */
15172 }
15173
15174 int main(argc, argv)
15175         int argc;
15176         char **argv;
15177 {
15178         pthread_t t;
15179
15180         /* create a pipe to select */
15181         if(pipe(&fildes[0])) {
15182                 perror("select");
15183                 exit(1);
15184         }
15185
15186 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15187         (void) pthread_setconcurrency(2);
15188 #else
15189 #ifdef HAVE_THR_SETCONCURRENCY
15190         /* Set Solaris LWP concurrency to 2 */
15191         thr_setconcurrency(2);
15192 #endif
15193 #endif
15194
15195 #if HAVE_PTHREADS < 6
15196         pthread_create(&t, pthread_attr_default, task, NULL);
15197 #else
15198         pthread_create(&t, NULL, task, NULL);
15199 #endif
15200
15201         /* make sure task runs first */
15202 #if HAVE_THR_YIELD
15203         thr_yield();
15204 #elif defined( HAVE_SCHED_YIELD )
15205         sched_yield();
15206 #elif defined( HAVE_PTHREAD_YIELD )
15207         pthread_yield();
15208 #endif
15209
15210         exit(2);
15211 }
15212 EOF
15213 if { (eval echo configure:15214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15214 then
15215   ol_cv_pthread_select_yields=no
15216 else
15217   echo "configure: failed program was:" >&5
15218   cat conftest.$ac_ext >&5
15219   rm -fr conftest*
15220   ol_cv_pthread_select_yields=yes
15221 fi
15222 rm -fr conftest*
15223 fi
15224
15225 fi
15226
15227 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15228
15229                                 if test $ol_cv_pthread_select_yields = cross ; then
15230                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15231                                 fi
15232
15233                                 if test $ol_cv_pthread_select_yields = yes ; then
15234                                         ol_with_yielding_select=yes
15235                                 fi
15236                         fi
15237
15238                                                 CPPFLAGS="$save_CPPFLAGS"
15239                         LIBS="$save_LIBS"
15240                 else
15241                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15242                 fi
15243         fi
15244
15245         if test $ol_with_threads = posix ; then
15246                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15247         fi
15248 fi
15249
15250 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15251         -o $ol_with_threads = mach ; then
15252
15253                 for ac_hdr in mach/cthreads.h cthreads.h
15254 do
15255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15257 echo "configure:15258: checking for $ac_hdr" >&5
15258 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15259   echo $ac_n "(cached) $ac_c" 1>&6
15260 else
15261   cat > conftest.$ac_ext <<EOF
15262 #line 15263 "configure"
15263 #include "confdefs.h"
15264 #include <$ac_hdr>
15265 EOF
15266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15267 { (eval echo configure:15268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15269 if test -z "$ac_err"; then
15270   rm -rf conftest*
15271   eval "ac_cv_header_$ac_safe=yes"
15272 else
15273   echo "$ac_err" >&5
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -rf conftest*
15277   eval "ac_cv_header_$ac_safe=no"
15278 fi
15279 rm -f conftest*
15280 fi
15281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15282   echo "$ac_t""yes" 1>&6
15283     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15284   cat >> confdefs.h <<EOF
15285 #define $ac_tr_hdr 1
15286 EOF
15287  
15288 else
15289   echo "$ac_t""no" 1>&6
15290 fi
15291 done
15292
15293         if test $ac_cv_header_mach_cthreads_h = yes ; then
15294                 ol_with_threads=found
15295
15296                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15297 echo "configure:15298: checking for cthread_fork" >&5
15298 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15299   echo $ac_n "(cached) $ac_c" 1>&6
15300 else
15301   cat > conftest.$ac_ext <<EOF
15302 #line 15303 "configure"
15303 #include "confdefs.h"
15304 /* System header to define __stub macros and hopefully few prototypes,
15305     which can conflict with char cthread_fork(); below.  */
15306 #include <assert.h>
15307 /* Override any gcc2 internal prototype to avoid an error.  */
15308 /* We use char because int might match the return type of a gcc2
15309     builtin and then its argument prototype would still apply.  */
15310 char cthread_fork();
15311 char (*f)();
15312
15313 int main() {
15314
15315 /* The GNU C library defines this for functions which it implements
15316     to always fail with ENOSYS.  Some functions are actually named
15317     something starting with __ and the normal name is an alias.  */
15318 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15319 choke me
15320 #else
15321 f = cthread_fork;
15322 #endif
15323
15324 ; return 0; }
15325 EOF
15326 if { (eval echo configure:15327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15327   rm -rf conftest*
15328   eval "ac_cv_func_cthread_fork=yes"
15329 else
15330   echo "configure: failed program was:" >&5
15331   cat conftest.$ac_ext >&5
15332   rm -rf conftest*
15333   eval "ac_cv_func_cthread_fork=no"
15334 fi
15335 rm -f conftest*
15336 fi
15337
15338 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15339   echo "$ac_t""yes" 1>&6
15340   ol_link_threads=yes
15341 else
15342   echo "$ac_t""no" 1>&6
15343 fi
15344
15345
15346                 if test $ol_link_threads = no ; then
15347                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15348 echo "configure:15349: checking for cthread_fork with -all_load" >&5
15349 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15350   echo $ac_n "(cached) $ac_c" 1>&6
15351 else
15352   
15353                                                                 save_LIBS="$LIBS"
15354                                 LIBS="-all_load $LIBS"
15355                                 cat > conftest.$ac_ext <<EOF
15356 #line 15357 "configure"
15357 #include "confdefs.h"
15358 #include <mach/cthreads.h>
15359 int main() {
15360
15361                                         cthread_fork((void *)0, (void *)0);
15362                                         
15363 ; return 0; }
15364 EOF
15365 if { (eval echo configure:15366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15366   rm -rf conftest*
15367   ol_cv_cthread_all_load=yes
15368 else
15369   echo "configure: failed program was:" >&5
15370   cat conftest.$ac_ext >&5
15371   rm -rf conftest*
15372   ol_cv_cthread_all_load=no
15373 fi
15374 rm -f conftest*
15375                                                                 LIBS="$save_LIBS"
15376                         
15377 fi
15378
15379 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15380
15381                         if test $ol_cv_cthread_all_load = yes ; then
15382                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15383                                 ol_link_threads=mach
15384                                 ol_with_threads=found
15385                         fi
15386                 fi
15387
15388         elif test $ac_cv_header_cthreads_h = yes ; then
15389                                 
15390                 ol_with_threads=found
15391  
15392                                 save_LIBS="$LIBS"
15393                 LIBS="$LIBS -lthreads"
15394                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15395 echo "configure:15396: checking for cthread_fork" >&5
15396 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15397   echo $ac_n "(cached) $ac_c" 1>&6
15398 else
15399   cat > conftest.$ac_ext <<EOF
15400 #line 15401 "configure"
15401 #include "confdefs.h"
15402 /* System header to define __stub macros and hopefully few prototypes,
15403     which can conflict with char cthread_fork(); below.  */
15404 #include <assert.h>
15405 /* Override any gcc2 internal prototype to avoid an error.  */
15406 /* We use char because int might match the return type of a gcc2
15407     builtin and then its argument prototype would still apply.  */
15408 char cthread_fork();
15409 char (*f)();
15410
15411 int main() {
15412
15413 /* The GNU C library defines this for functions which it implements
15414     to always fail with ENOSYS.  Some functions are actually named
15415     something starting with __ and the normal name is an alias.  */
15416 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15417 choke me
15418 #else
15419 f = cthread_fork;
15420 #endif
15421
15422 ; return 0; }
15423 EOF
15424 if { (eval echo configure:15425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15425   rm -rf conftest*
15426   eval "ac_cv_func_cthread_fork=yes"
15427 else
15428   echo "configure: failed program was:" >&5
15429   cat conftest.$ac_ext >&5
15430   rm -rf conftest*
15431   eval "ac_cv_func_cthread_fork=no"
15432 fi
15433 rm -f conftest*
15434 fi
15435
15436 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15437   echo "$ac_t""yes" 1>&6
15438   ol_link_threads=yes
15439 else
15440   echo "$ac_t""no" 1>&6
15441 fi
15442
15443                 LIBS="$save_LIBS"
15444
15445                 if test $ol_link_threads = yes ; then
15446                         LTHREAD_LIBS="-lthreads"
15447                         ol_link_threads=mach
15448                         ol_with_threads=found
15449                 else
15450                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15451                 fi
15452
15453         elif test $ol_with_threads = mach ; then
15454                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15455         fi
15456
15457         if test $ol_link_threads = mach ; then
15458                 cat >> confdefs.h <<\EOF
15459 #define HAVE_MACH_CTHREADS 1
15460 EOF
15461
15462         elif test $ol_with_threads = found ; then
15463                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15464         fi
15465 fi
15466
15467 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15468         -o $ol_with_threads = pth ; then
15469
15470         for ac_hdr in pth.h
15471 do
15472 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15473 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15474 echo "configure:15475: checking for $ac_hdr" >&5
15475 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15476   echo $ac_n "(cached) $ac_c" 1>&6
15477 else
15478   cat > conftest.$ac_ext <<EOF
15479 #line 15480 "configure"
15480 #include "confdefs.h"
15481 #include <$ac_hdr>
15482 EOF
15483 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15484 { (eval echo configure:15485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15485 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15486 if test -z "$ac_err"; then
15487   rm -rf conftest*
15488   eval "ac_cv_header_$ac_safe=yes"
15489 else
15490   echo "$ac_err" >&5
15491   echo "configure: failed program was:" >&5
15492   cat conftest.$ac_ext >&5
15493   rm -rf conftest*
15494   eval "ac_cv_header_$ac_safe=no"
15495 fi
15496 rm -f conftest*
15497 fi
15498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15499   echo "$ac_t""yes" 1>&6
15500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15501   cat >> confdefs.h <<EOF
15502 #define $ac_tr_hdr 1
15503 EOF
15504  
15505 else
15506   echo "$ac_t""no" 1>&6
15507 fi
15508 done
15509
15510
15511         if test $ac_cv_header_pth_h = yes ; then
15512                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15513 echo "configure:15514: checking for pth_version in -lpth" >&5
15514 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15516   echo $ac_n "(cached) $ac_c" 1>&6
15517 else
15518   ac_save_LIBS="$LIBS"
15519 LIBS="-lpth  $LIBS"
15520 cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 /* Override any gcc2 internal prototype to avoid an error.  */
15524 /* We use char because int might match the return type of a gcc2
15525     builtin and then its argument prototype would still apply.  */
15526 char pth_version();
15527
15528 int main() {
15529 pth_version()
15530 ; return 0; }
15531 EOF
15532 if { (eval echo configure:15533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15533   rm -rf conftest*
15534   eval "ac_cv_lib_$ac_lib_var=yes"
15535 else
15536   echo "configure: failed program was:" >&5
15537   cat conftest.$ac_ext >&5
15538   rm -rf conftest*
15539   eval "ac_cv_lib_$ac_lib_var=no"
15540 fi
15541 rm -f conftest*
15542 LIBS="$ac_save_LIBS"
15543
15544 fi
15545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15546   echo "$ac_t""yes" 1>&6
15547   have_pth=yes
15548 else
15549   echo "$ac_t""no" 1>&6
15550 have_pth=no
15551 fi
15552
15553
15554                 if test $have_pth = yes ; then
15555                         cat >> confdefs.h <<\EOF
15556 #define HAVE_GNU_PTH 1
15557 EOF
15558
15559                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15560                         ol_link_threads=pth
15561                         ol_with_threads=found
15562
15563                         if test $ol_with_yielding_select = auto ; then
15564                                 ol_with_yielding_select=yes
15565                         fi
15566                 fi
15567         fi
15568 fi
15569
15570 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15571         -o $ol_with_threads = lwp ; then
15572
15573                 for ac_hdr in thread.h synch.h
15574 do
15575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15577 echo "configure:15578: checking for $ac_hdr" >&5
15578 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15579   echo $ac_n "(cached) $ac_c" 1>&6
15580 else
15581   cat > conftest.$ac_ext <<EOF
15582 #line 15583 "configure"
15583 #include "confdefs.h"
15584 #include <$ac_hdr>
15585 EOF
15586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15587 { (eval echo configure:15588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15589 if test -z "$ac_err"; then
15590   rm -rf conftest*
15591   eval "ac_cv_header_$ac_safe=yes"
15592 else
15593   echo "$ac_err" >&5
15594   echo "configure: failed program was:" >&5
15595   cat conftest.$ac_ext >&5
15596   rm -rf conftest*
15597   eval "ac_cv_header_$ac_safe=no"
15598 fi
15599 rm -f conftest*
15600 fi
15601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15602   echo "$ac_t""yes" 1>&6
15603     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15604   cat >> confdefs.h <<EOF
15605 #define $ac_tr_hdr 1
15606 EOF
15607  
15608 else
15609   echo "$ac_t""no" 1>&6
15610 fi
15611 done
15612
15613         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15614                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15615 echo "configure:15616: checking for thr_create in -lthread" >&5
15616 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15617 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15618   echo $ac_n "(cached) $ac_c" 1>&6
15619 else
15620   ac_save_LIBS="$LIBS"
15621 LIBS="-lthread  $LIBS"
15622 cat > conftest.$ac_ext <<EOF
15623 #line 15624 "configure"
15624 #include "confdefs.h"
15625 /* Override any gcc2 internal prototype to avoid an error.  */
15626 /* We use char because int might match the return type of a gcc2
15627     builtin and then its argument prototype would still apply.  */
15628 char thr_create();
15629
15630 int main() {
15631 thr_create()
15632 ; return 0; }
15633 EOF
15634 if { (eval echo configure:15635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15635   rm -rf conftest*
15636   eval "ac_cv_lib_$ac_lib_var=yes"
15637 else
15638   echo "configure: failed program was:" >&5
15639   cat conftest.$ac_ext >&5
15640   rm -rf conftest*
15641   eval "ac_cv_lib_$ac_lib_var=no"
15642 fi
15643 rm -f conftest*
15644 LIBS="$ac_save_LIBS"
15645
15646 fi
15647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15648   echo "$ac_t""yes" 1>&6
15649   have_thr=yes
15650 else
15651   echo "$ac_t""no" 1>&6
15652 have_thr=no
15653 fi
15654
15655
15656                 if test $have_thr = yes ; then
15657                         cat >> confdefs.h <<\EOF
15658 #define HAVE_THR 1
15659 EOF
15660
15661                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15662                         ol_link_threads=thr
15663
15664                         if test $ol_with_yielding_select = auto ; then
15665                                 ol_with_yielding_select=yes
15666                         fi
15667
15668                                                 for ac_func in \
15669                                 thr_setconcurrency \
15670                                 thr_getconcurrency \
15671                         
15672 do
15673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15674 echo "configure:15675: checking for $ac_func" >&5
15675 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   cat > conftest.$ac_ext <<EOF
15679 #line 15680 "configure"
15680 #include "confdefs.h"
15681 /* System header to define __stub macros and hopefully few prototypes,
15682     which can conflict with char $ac_func(); below.  */
15683 #include <assert.h>
15684 /* Override any gcc2 internal prototype to avoid an error.  */
15685 /* We use char because int might match the return type of a gcc2
15686     builtin and then its argument prototype would still apply.  */
15687 char $ac_func();
15688 char (*f)();
15689
15690 int main() {
15691
15692 /* The GNU C library defines this for functions which it implements
15693     to always fail with ENOSYS.  Some functions are actually named
15694     something starting with __ and the normal name is an alias.  */
15695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15696 choke me
15697 #else
15698 f = $ac_func;
15699 #endif
15700
15701 ; return 0; }
15702 EOF
15703 if { (eval echo configure:15704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15704   rm -rf conftest*
15705   eval "ac_cv_func_$ac_func=yes"
15706 else
15707   echo "configure: failed program was:" >&5
15708   cat conftest.$ac_ext >&5
15709   rm -rf conftest*
15710   eval "ac_cv_func_$ac_func=no"
15711 fi
15712 rm -f conftest*
15713 fi
15714
15715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15716   echo "$ac_t""yes" 1>&6
15717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15718   cat >> confdefs.h <<EOF
15719 #define $ac_tr_func 1
15720 EOF
15721  
15722 else
15723   echo "$ac_t""no" 1>&6
15724 fi
15725 done
15726
15727                 fi
15728         fi
15729
15730                 for ac_hdr in lwp/lwp.h
15731 do
15732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15734 echo "configure:15735: checking for $ac_hdr" >&5
15735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15736   echo $ac_n "(cached) $ac_c" 1>&6
15737 else
15738   cat > conftest.$ac_ext <<EOF
15739 #line 15740 "configure"
15740 #include "confdefs.h"
15741 #include <$ac_hdr>
15742 EOF
15743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15744 { (eval echo configure:15745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15746 if test -z "$ac_err"; then
15747   rm -rf conftest*
15748   eval "ac_cv_header_$ac_safe=yes"
15749 else
15750   echo "$ac_err" >&5
15751   echo "configure: failed program was:" >&5
15752   cat conftest.$ac_ext >&5
15753   rm -rf conftest*
15754   eval "ac_cv_header_$ac_safe=no"
15755 fi
15756 rm -f conftest*
15757 fi
15758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15759   echo "$ac_t""yes" 1>&6
15760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15761   cat >> confdefs.h <<EOF
15762 #define $ac_tr_hdr 1
15763 EOF
15764  
15765 else
15766   echo "$ac_t""no" 1>&6
15767 fi
15768 done
15769
15770         if test $ac_cv_header_lwp_lwp_h = yes ; then
15771                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15772 echo "configure:15773: checking for lwp_create in -llwp" >&5
15773 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15774 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15775   echo $ac_n "(cached) $ac_c" 1>&6
15776 else
15777   ac_save_LIBS="$LIBS"
15778 LIBS="-llwp  $LIBS"
15779 cat > conftest.$ac_ext <<EOF
15780 #line 15781 "configure"
15781 #include "confdefs.h"
15782 /* Override any gcc2 internal prototype to avoid an error.  */
15783 /* We use char because int might match the return type of a gcc2
15784     builtin and then its argument prototype would still apply.  */
15785 char lwp_create();
15786
15787 int main() {
15788 lwp_create()
15789 ; return 0; }
15790 EOF
15791 if { (eval echo configure:15792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15792   rm -rf conftest*
15793   eval "ac_cv_lib_$ac_lib_var=yes"
15794 else
15795   echo "configure: failed program was:" >&5
15796   cat conftest.$ac_ext >&5
15797   rm -rf conftest*
15798   eval "ac_cv_lib_$ac_lib_var=no"
15799 fi
15800 rm -f conftest*
15801 LIBS="$ac_save_LIBS"
15802
15803 fi
15804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15805   echo "$ac_t""yes" 1>&6
15806   have_lwp=yes
15807 else
15808   echo "$ac_t""no" 1>&6
15809 have_lwp=no
15810 fi
15811
15812
15813                 if test $have_lwp = yes ; then
15814                         cat >> confdefs.h <<\EOF
15815 #define HAVE_LWP 1
15816 EOF
15817
15818                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15819                         ol_link_threads=lwp
15820
15821                         if test $ol_with_yielding_select = auto ; then
15822                                 ol_with_yielding_select=no
15823                         fi
15824                 fi
15825         fi
15826 fi
15827
15828 if test $ol_with_yielding_select = yes ; then
15829         cat >> confdefs.h <<\EOF
15830 #define HAVE_YIELDING_SELECT 1
15831 EOF
15832
15833 fi
15834
15835 if test $ol_with_threads = manual ; then
15836                 ol_link_threads=yes
15837
15838         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15839
15840         for ac_hdr in pthread.h sched.h
15841 do
15842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15844 echo "configure:15845: checking for $ac_hdr" >&5
15845 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15846   echo $ac_n "(cached) $ac_c" 1>&6
15847 else
15848   cat > conftest.$ac_ext <<EOF
15849 #line 15850 "configure"
15850 #include "confdefs.h"
15851 #include <$ac_hdr>
15852 EOF
15853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15854 { (eval echo configure:15855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15856 if test -z "$ac_err"; then
15857   rm -rf conftest*
15858   eval "ac_cv_header_$ac_safe=yes"
15859 else
15860   echo "$ac_err" >&5
15861   echo "configure: failed program was:" >&5
15862   cat conftest.$ac_ext >&5
15863   rm -rf conftest*
15864   eval "ac_cv_header_$ac_safe=no"
15865 fi
15866 rm -f conftest*
15867 fi
15868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15869   echo "$ac_t""yes" 1>&6
15870     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15871   cat >> confdefs.h <<EOF
15872 #define $ac_tr_hdr 1
15873 EOF
15874  
15875 else
15876   echo "$ac_t""no" 1>&6
15877 fi
15878 done
15879
15880         for ac_func in sched_yield pthread_yield
15881 do
15882 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15883 echo "configure:15884: checking for $ac_func" >&5
15884 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15885   echo $ac_n "(cached) $ac_c" 1>&6
15886 else
15887   cat > conftest.$ac_ext <<EOF
15888 #line 15889 "configure"
15889 #include "confdefs.h"
15890 /* System header to define __stub macros and hopefully few prototypes,
15891     which can conflict with char $ac_func(); below.  */
15892 #include <assert.h>
15893 /* Override any gcc2 internal prototype to avoid an error.  */
15894 /* We use char because int might match the return type of a gcc2
15895     builtin and then its argument prototype would still apply.  */
15896 char $ac_func();
15897 char (*f)();
15898
15899 int main() {
15900
15901 /* The GNU C library defines this for functions which it implements
15902     to always fail with ENOSYS.  Some functions are actually named
15903     something starting with __ and the normal name is an alias.  */
15904 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15905 choke me
15906 #else
15907 f = $ac_func;
15908 #endif
15909
15910 ; return 0; }
15911 EOF
15912 if { (eval echo configure:15913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15913   rm -rf conftest*
15914   eval "ac_cv_func_$ac_func=yes"
15915 else
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -rf conftest*
15919   eval "ac_cv_func_$ac_func=no"
15920 fi
15921 rm -f conftest*
15922 fi
15923
15924 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15925   echo "$ac_t""yes" 1>&6
15926     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15927   cat >> confdefs.h <<EOF
15928 #define $ac_tr_func 1
15929 EOF
15930  
15931 else
15932   echo "$ac_t""no" 1>&6
15933 fi
15934 done
15935
15936         
15937         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15938 echo "configure:15939: checking for LinuxThreads pthread.h" >&5
15939 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   cat > conftest.$ac_ext <<EOF
15943 #line 15944 "configure"
15944 #include "confdefs.h"
15945 #include <pthread.h>
15946 EOF
15947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15948   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15949   rm -rf conftest*
15950   ol_cv_header_linux_threads=yes
15951 else
15952   rm -rf conftest*
15953   ol_cv_header_linux_threads=no
15954 fi
15955 rm -f conftest*
15956
15957                 
15958 fi
15959
15960 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15961         if test $ol_cv_header_linux_threads = yes; then
15962                 cat >> confdefs.h <<\EOF
15963 #define HAVE_LINUX_THREADS 1
15964 EOF
15965
15966         fi
15967
15968
15969         for ac_hdr in mach/cthreads.h
15970 do
15971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15973 echo "configure:15974: checking for $ac_hdr" >&5
15974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15975   echo $ac_n "(cached) $ac_c" 1>&6
15976 else
15977   cat > conftest.$ac_ext <<EOF
15978 #line 15979 "configure"
15979 #include "confdefs.h"
15980 #include <$ac_hdr>
15981 EOF
15982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15983 { (eval echo configure:15984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15985 if test -z "$ac_err"; then
15986   rm -rf conftest*
15987   eval "ac_cv_header_$ac_safe=yes"
15988 else
15989   echo "$ac_err" >&5
15990   echo "configure: failed program was:" >&5
15991   cat conftest.$ac_ext >&5
15992   rm -rf conftest*
15993   eval "ac_cv_header_$ac_safe=no"
15994 fi
15995 rm -f conftest*
15996 fi
15997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15998   echo "$ac_t""yes" 1>&6
15999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16000   cat >> confdefs.h <<EOF
16001 #define $ac_tr_hdr 1
16002 EOF
16003  
16004 else
16005   echo "$ac_t""no" 1>&6
16006 fi
16007 done
16008
16009         for ac_hdr in lwp/lwp.h
16010 do
16011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16013 echo "configure:16014: checking for $ac_hdr" >&5
16014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16015   echo $ac_n "(cached) $ac_c" 1>&6
16016 else
16017   cat > conftest.$ac_ext <<EOF
16018 #line 16019 "configure"
16019 #include "confdefs.h"
16020 #include <$ac_hdr>
16021 EOF
16022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16023 { (eval echo configure:16024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16025 if test -z "$ac_err"; then
16026   rm -rf conftest*
16027   eval "ac_cv_header_$ac_safe=yes"
16028 else
16029   echo "$ac_err" >&5
16030   echo "configure: failed program was:" >&5
16031   cat conftest.$ac_ext >&5
16032   rm -rf conftest*
16033   eval "ac_cv_header_$ac_safe=no"
16034 fi
16035 rm -f conftest*
16036 fi
16037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16038   echo "$ac_t""yes" 1>&6
16039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16040   cat >> confdefs.h <<EOF
16041 #define $ac_tr_hdr 1
16042 EOF
16043  
16044 else
16045   echo "$ac_t""no" 1>&6
16046 fi
16047 done
16048
16049         for ac_hdr in thread.h synch.h
16050 do
16051 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16052 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16053 echo "configure:16054: checking for $ac_hdr" >&5
16054 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16055   echo $ac_n "(cached) $ac_c" 1>&6
16056 else
16057   cat > conftest.$ac_ext <<EOF
16058 #line 16059 "configure"
16059 #include "confdefs.h"
16060 #include <$ac_hdr>
16061 EOF
16062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16063 { (eval echo configure:16064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16065 if test -z "$ac_err"; then
16066   rm -rf conftest*
16067   eval "ac_cv_header_$ac_safe=yes"
16068 else
16069   echo "$ac_err" >&5
16070   echo "configure: failed program was:" >&5
16071   cat conftest.$ac_ext >&5
16072   rm -rf conftest*
16073   eval "ac_cv_header_$ac_safe=no"
16074 fi
16075 rm -f conftest*
16076 fi
16077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16078   echo "$ac_t""yes" 1>&6
16079     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16080   cat >> confdefs.h <<EOF
16081 #define $ac_tr_hdr 1
16082 EOF
16083  
16084 else
16085   echo "$ac_t""no" 1>&6
16086 fi
16087 done
16088
16089 fi
16090
16091 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16092                         cat >> confdefs.h <<\EOF
16093 #define REENTRANT 1
16094 EOF
16095
16096         cat >> confdefs.h <<\EOF
16097 #define _REENTRANT 1
16098 EOF
16099
16100         cat >> confdefs.h <<\EOF
16101 #define THREAD_SAFE 1
16102 EOF
16103
16104         cat >> confdefs.h <<\EOF
16105 #define _THREAD_SAFE 1
16106 EOF
16107
16108         cat >> confdefs.h <<\EOF
16109 #define THREADSAFE 1
16110 EOF
16111
16112         cat >> confdefs.h <<\EOF
16113 #define _THREADSAFE 1
16114 EOF
16115
16116         cat >> confdefs.h <<\EOF
16117 #define _SGI_MP_SOURCE 1
16118 EOF
16119
16120
16121                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16122 echo "configure:16123: checking for thread specific errno" >&5
16123 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16124   echo $ac_n "(cached) $ac_c" 1>&6
16125 else
16126   
16127                 cat > conftest.$ac_ext <<EOF
16128 #line 16129 "configure"
16129 #include "confdefs.h"
16130 #include <errno.h>
16131 int main() {
16132 errno = 0;
16133 ; return 0; }
16134 EOF
16135 if { (eval echo configure:16136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16136   rm -rf conftest*
16137   ol_cv_errno_thread_specific=yes
16138 else
16139   echo "configure: failed program was:" >&5
16140   cat conftest.$ac_ext >&5
16141   rm -rf conftest*
16142   ol_cv_errno_thread_specific=no
16143 fi
16144 rm -f conftest*
16145         
16146 fi
16147
16148 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16149
16150                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16151 echo "configure:16152: checking for thread specific h_errno" >&5
16152 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16153   echo $ac_n "(cached) $ac_c" 1>&6
16154 else
16155   
16156                 cat > conftest.$ac_ext <<EOF
16157 #line 16158 "configure"
16158 #include "confdefs.h"
16159 #include <netdb.h>
16160 int main() {
16161 h_errno = 0;
16162 ; return 0; }
16163 EOF
16164 if { (eval echo configure:16165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16165   rm -rf conftest*
16166   ol_cv_h_errno_thread_specific=yes
16167 else
16168   echo "configure: failed program was:" >&5
16169   cat conftest.$ac_ext >&5
16170   rm -rf conftest*
16171   ol_cv_h_errno_thread_specific=no
16172 fi
16173 rm -f conftest*
16174         
16175 fi
16176
16177 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16178
16179         if test $ol_cv_errno_thread_specific != yes \
16180                 -o $ol_cv_h_errno_thread_specific != yes ; then
16181                 LIBS="$LTHREAD_LIBS $LIBS"
16182                 LTHREAD_LIBS=""
16183         fi
16184
16185 fi  
16186
16187 if test $ol_link_threads = no ; then
16188         if test $ol_with_threads = yes ; then
16189                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16190         fi
16191
16192         if test $ol_with_threads = auto ; then
16193                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16194                 ol_with_threads=no
16195         fi
16196
16197         cat >> confdefs.h <<\EOF
16198 #define NO_THREADS 1
16199 EOF
16200
16201         LTHREAD_LIBS=""
16202 fi
16203
16204 if test $ol_link_threads != no ; then
16205         cat >> confdefs.h <<\EOF
16206 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16207 EOF
16208
16209 fi
16210
16211 for ac_func in \
16212         ctime_r                 \
16213         gethostbyname_r gethostbyaddr_r \
16214
16215 do
16216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16217 echo "configure:16218: checking for $ac_func" >&5
16218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   cat > conftest.$ac_ext <<EOF
16222 #line 16223 "configure"
16223 #include "confdefs.h"
16224 /* System header to define __stub macros and hopefully few prototypes,
16225     which can conflict with char $ac_func(); below.  */
16226 #include <assert.h>
16227 /* Override any gcc2 internal prototype to avoid an error.  */
16228 /* We use char because int might match the return type of a gcc2
16229     builtin and then its argument prototype would still apply.  */
16230 char $ac_func();
16231 char (*f)();
16232
16233 int main() {
16234
16235 /* The GNU C library defines this for functions which it implements
16236     to always fail with ENOSYS.  Some functions are actually named
16237     something starting with __ and the normal name is an alias.  */
16238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16239 choke me
16240 #else
16241 f = $ac_func;
16242 #endif
16243
16244 ; return 0; }
16245 EOF
16246 if { (eval echo configure:16247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16247   rm -rf conftest*
16248   eval "ac_cv_func_$ac_func=yes"
16249 else
16250   echo "configure: failed program was:" >&5
16251   cat conftest.$ac_ext >&5
16252   rm -rf conftest*
16253   eval "ac_cv_func_$ac_func=no"
16254 fi
16255 rm -f conftest*
16256 fi
16257
16258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16259   echo "$ac_t""yes" 1>&6
16260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16261   cat >> confdefs.h <<EOF
16262 #define $ac_tr_func 1
16263 EOF
16264  
16265 else
16266   echo "$ac_t""no" 1>&6
16267 fi
16268 done
16269
16270
16271 if test "$ac_cv_func_ctime_r" = no ; then
16272         ol_cv_func_ctime_r_nargs=0
16273 else
16274         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16275 echo "configure:16276: checking number of arguments of ctime_r" >&5
16276 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16277   echo $ac_n "(cached) $ac_c" 1>&6
16278 else
16279   cat > conftest.$ac_ext <<EOF
16280 #line 16281 "configure"
16281 #include "confdefs.h"
16282 #include <time.h>
16283 int main() {
16284 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16285 ; return 0; }
16286 EOF
16287 if { (eval echo configure:16288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16288   rm -rf conftest*
16289   ol_cv_func_ctime_r_nargs3=yes
16290 else
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   ol_cv_func_ctime_r_nargs3=no
16295 fi
16296 rm -f conftest*
16297
16298         cat > conftest.$ac_ext <<EOF
16299 #line 16300 "configure"
16300 #include "confdefs.h"
16301 #include <time.h>
16302 int main() {
16303 time_t ti; char *buffer; ctime_r(&ti,buffer);
16304 ; return 0; }
16305 EOF
16306 if { (eval echo configure:16307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16307   rm -rf conftest*
16308   ol_cv_func_ctime_r_nargs2=yes
16309 else
16310   echo "configure: failed program was:" >&5
16311   cat conftest.$ac_ext >&5
16312   rm -rf conftest*
16313   ol_cv_func_ctime_r_nargs2=no
16314 fi
16315 rm -f conftest*
16316
16317         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16318                 $ol_cv_func_ctime_r_nargs2 = no ; then
16319
16320                 ol_cv_func_ctime_r_nargs=3
16321
16322         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16323                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16324
16325                 ol_cv_func_ctime_r_nargs=2
16326
16327         else
16328                 ol_cv_func_ctime_r_nargs=0
16329         fi
16330   
16331 fi
16332
16333 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16334
16335   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16336         cat >> confdefs.h <<EOF
16337 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16338 EOF
16339
16340   fi
16341
16342 fi
16343
16344 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16345         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16346 echo "configure:16347: checking number of arguments of gethostbyname_r" >&5
16347 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16348   echo $ac_n "(cached) $ac_c" 1>&6
16349 else
16350   cat > conftest.$ac_ext <<EOF
16351 #line 16352 "configure"
16352 #include "confdefs.h"
16353 #include <sys/types.h>
16354 #include <sys/socket.h>
16355 #include <netinet/in.h>
16356 #include <netdb.h>
16357 #define BUFSIZE (sizeof(struct hostent)+10)
16358 int main() {
16359 struct hostent hent; char buffer[BUFSIZE];
16360                 int bufsize=BUFSIZE;int h_errno;
16361                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16362                         buffer, bufsize, &h_errno);
16363 ; return 0; }
16364 EOF
16365 if { (eval echo configure:16366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16366   rm -rf conftest*
16367   ol_cv_func_gethostbyname_r_nargs5=yes
16368 else
16369   echo "configure: failed program was:" >&5
16370   cat conftest.$ac_ext >&5
16371   rm -rf conftest*
16372   ol_cv_func_gethostbyname_r_nargs5=no
16373 fi
16374 rm -f conftest*
16375
16376         cat > conftest.$ac_ext <<EOF
16377 #line 16378 "configure"
16378 #include "confdefs.h"
16379 #include <sys/types.h>
16380 #include <sys/socket.h>
16381 #include <netinet/in.h>
16382 #include <netdb.h>
16383 #define BUFSIZE (sizeof(struct hostent)+10)
16384 int main() {
16385 struct hostent hent;struct hostent *rhent;
16386                 char buffer[BUFSIZE];
16387                 int bufsize=BUFSIZE;int h_errno;
16388                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16389                         &rhent, &h_errno);
16390 ; return 0; }
16391 EOF
16392 if { (eval echo configure:16393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16393   rm -rf conftest*
16394   ol_cv_func_gethostbyname_r_nargs6=yes
16395 else
16396   echo "configure: failed program was:" >&5
16397   cat conftest.$ac_ext >&5
16398   rm -rf conftest*
16399   ol_cv_func_gethostbyname_r_nargs6=no
16400 fi
16401 rm -f conftest*
16402
16403         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16404                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16405
16406                 ol_cv_func_gethostbyname_r_nargs=5
16407
16408         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16409                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16410
16411                 ol_cv_func_gethostbyname_r_nargs=6
16412
16413         else
16414                 ol_cv_func_gethostbyname_r_nargs=0
16415         fi
16416   
16417 fi
16418
16419 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16420   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16421         cat >> confdefs.h <<EOF
16422 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16423 EOF
16424
16425   fi
16426
16427 else
16428         ol_cv_func_gethostbyname_r_nargs=0
16429 fi
16430  
16431 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16432         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16433 echo "configure:16434: checking number of arguments of gethostbyaddr_r" >&5
16434 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16435   echo $ac_n "(cached) $ac_c" 1>&6
16436 else
16437   cat > conftest.$ac_ext <<EOF
16438 #line 16439 "configure"
16439 #include "confdefs.h"
16440 #include <sys/types.h>
16441 #include <sys/socket.h>
16442 #include <netinet/in.h>
16443 #include <netdb.h>
16444 #define BUFSIZE (sizeof(struct hostent)+10)
16445 int main() {
16446 struct hostent hent; char buffer[BUFSIZE]; 
16447             struct in_addr add;
16448             size_t alen=sizeof(struct in_addr);
16449             int bufsize=BUFSIZE;int h_errno;
16450                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16451                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16452 ; return 0; }
16453 EOF
16454 if { (eval echo configure:16455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16455   rm -rf conftest*
16456   ol_cv_func_gethostbyaddr_r_nargs7=yes
16457 else
16458   echo "configure: failed program was:" >&5
16459   cat conftest.$ac_ext >&5
16460   rm -rf conftest*
16461   ol_cv_func_gethostbyaddr_r_nargs7=no
16462 fi
16463 rm -f conftest*
16464
16465         cat > conftest.$ac_ext <<EOF
16466 #line 16467 "configure"
16467 #include "confdefs.h"
16468 #include <sys/types.h>
16469 #include <sys/socket.h>
16470 #include <netinet/in.h>
16471 #include <netdb.h>
16472 #define BUFSIZE (sizeof(struct hostent)+10)
16473 int main() {
16474 struct hostent hent;
16475                 struct hostent *rhent; char buffer[BUFSIZE]; 
16476                 struct in_addr add;
16477                 size_t alen=sizeof(struct in_addr);
16478                 int bufsize=BUFSIZE;int h_errno;
16479                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16480                         alen, AF_INET, &hent, buffer, bufsize, 
16481                         &rhent, &h_errno);
16482 ; return 0; }
16483 EOF
16484 if { (eval echo configure:16485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16485   rm -rf conftest*
16486   ol_cv_func_gethostbyaddr_r_nargs8=yes
16487 else
16488   echo "configure: failed program was:" >&5
16489   cat conftest.$ac_ext >&5
16490   rm -rf conftest*
16491   ol_cv_func_gethostbyaddr_r_nargs8=no
16492 fi
16493 rm -f conftest*
16494
16495         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16496                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16497
16498                 ol_cv_func_gethostbyaddr_r_nargs=7
16499
16500         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16501                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16502
16503                 ol_cv_func_gethostbyaddr_r_nargs=8
16504
16505         else
16506                 ol_cv_func_gethostbyaddr_r_nargs=0
16507         fi
16508   
16509 fi
16510
16511 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16512   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16513     cat >> confdefs.h <<EOF
16514 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16515 EOF
16516
16517   fi
16518
16519 else
16520         ol_cv_func_gethostbyaddr_r_nargs=0
16521 fi
16522
16523 ol_link_ldbm=no 
16524
16525 if test $ol_with_ldbm_api = auto \
16526         -o $ol_with_ldbm_api = berkeley \
16527         -o $ol_with_ldbm_api = bcompat ; then
16528
16529         if test $ol_with_ldbm_api = bcompat; then \
16530                 for ac_hdr in db_185.h db.h
16531 do
16532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16534 echo "configure:16535: checking for $ac_hdr" >&5
16535 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16536   echo $ac_n "(cached) $ac_c" 1>&6
16537 else
16538   cat > conftest.$ac_ext <<EOF
16539 #line 16540 "configure"
16540 #include "confdefs.h"
16541 #include <$ac_hdr>
16542 EOF
16543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16544 { (eval echo configure:16545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16546 if test -z "$ac_err"; then
16547   rm -rf conftest*
16548   eval "ac_cv_header_$ac_safe=yes"
16549 else
16550   echo "$ac_err" >&5
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   eval "ac_cv_header_$ac_safe=no"
16555 fi
16556 rm -f conftest*
16557 fi
16558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16559   echo "$ac_t""yes" 1>&6
16560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16561   cat >> confdefs.h <<EOF
16562 #define $ac_tr_hdr 1
16563 EOF
16564  
16565 else
16566   echo "$ac_t""no" 1>&6
16567 fi
16568 done
16569
16570 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16571         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16572 echo "configure:16573: checking if Berkeley DB header compatibility" >&5
16573 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16574   echo $ac_n "(cached) $ac_c" 1>&6
16575 else
16576   
16577                 cat > conftest.$ac_ext <<EOF
16578 #line 16579 "configure"
16579 #include "confdefs.h"
16580
16581 #if HAVE_DB_185_H
16582 #       include <db_185.h>
16583 #else
16584 #       include <db.h>
16585 #endif
16586
16587  /* this check could be improved */
16588 #ifndef DB_VERSION_MAJOR
16589 #       define DB_VERSION_MAJOR 1
16590 #endif
16591
16592 #if DB_VERSION_MAJOR == 1 
16593         __db_version_1
16594 #endif
16595
16596 EOF
16597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16598   egrep "__db_version_1" >/dev/null 2>&1; then
16599   rm -rf conftest*
16600   ol_cv_header_db1=yes
16601 else
16602   rm -rf conftest*
16603   ol_cv_header_db1=no
16604 fi
16605 rm -f conftest*
16606
16607 fi
16608
16609 echo "$ac_t""$ol_cv_header_db1" 1>&6
16610
16611         if test $ol_cv_header_db1 = yes ; then
16612                 ol_cv_lib_db=no
16613 if test $ol_cv_lib_db = no ; then
16614         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16615 echo "configure:16616: checking for Berkeley DB link (default)" >&5
16616 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16617   echo $ac_n "(cached) $ac_c" 1>&6
16618 else
16619   
16620         ol_DB_LIB=
16621         ol_LIBS=$LIBS
16622         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16623
16624         cat > conftest.$ac_ext <<EOF
16625 #line 16626 "configure"
16626 #include "confdefs.h"
16627
16628 #ifdef HAVE_DB_185_H
16629 # include <db_185.h>
16630 #else
16631 # include <db.h>
16632 #endif
16633
16634 #ifndef DB_VERSION_MAJOR
16635 # define DB_VERSION_MAJOR 1
16636 #endif
16637
16638 #ifndef NULL
16639 #define NULL ((void*)0)
16640 #endif
16641
16642 int main() {
16643
16644 #if DB_VERSION_MAJOR > 1
16645         {
16646                 char *version;
16647                 int major, minor, patch;
16648
16649                 version = db_version( &major, &minor, &patch );
16650
16651                 if( major != DB_VERSION_MAJOR ||
16652                         minor < DB_VERSION_MINOR )
16653                 {
16654                         printf("Berkeley DB version mismatch\n"
16655                                 "\texpected: %s\n\tgot: %s\n",
16656                                 DB_VERSION_STRING, version);
16657                         return 1;
16658                 }
16659         }
16660 #endif
16661
16662 #if DB_VERSION_MAJOR > 2
16663         db_env_create( NULL, 0 );
16664 #elif DB_VERSION_MAJOR > 1
16665         db_appexit( NULL );
16666 #else
16667         (void) dbopen( NULL, 0, 0, 0, NULL);
16668 #endif
16669
16670 ; return 0; }
16671 EOF
16672 if { (eval echo configure:16673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16673   rm -rf conftest*
16674   ol_cv_db_none=yes
16675 else
16676   echo "configure: failed program was:" >&5
16677   cat conftest.$ac_ext >&5
16678   rm -rf conftest*
16679   ol_cv_db_none=no
16680 fi
16681 rm -f conftest*
16682
16683         LIBS="$ol_LIBS"
16684
16685 fi
16686
16687 echo "$ac_t""$ol_cv_db_none" 1>&6
16688
16689         if test $ol_cv_db_none = yes ; then
16690                 ol_cv_lib_db=yes
16691         fi
16692 fi
16693
16694 if test $ol_cv_lib_db = no ; then
16695         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16696 echo "configure:16697: checking for Berkeley DB link (-ldb41)" >&5
16697 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16698   echo $ac_n "(cached) $ac_c" 1>&6
16699 else
16700   
16701         ol_DB_LIB=-ldb41
16702         ol_LIBS=$LIBS
16703         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16704
16705         cat > conftest.$ac_ext <<EOF
16706 #line 16707 "configure"
16707 #include "confdefs.h"
16708
16709 #ifdef HAVE_DB_185_H
16710 # include <db_185.h>
16711 #else
16712 # include <db.h>
16713 #endif
16714
16715 #ifndef DB_VERSION_MAJOR
16716 # define DB_VERSION_MAJOR 1
16717 #endif
16718
16719 #ifndef NULL
16720 #define NULL ((void*)0)
16721 #endif
16722
16723 int main() {
16724
16725 #if DB_VERSION_MAJOR > 1
16726         {
16727                 char *version;
16728                 int major, minor, patch;
16729
16730                 version = db_version( &major, &minor, &patch );
16731
16732                 if( major != DB_VERSION_MAJOR ||
16733                         minor < DB_VERSION_MINOR )
16734                 {
16735                         printf("Berkeley DB version mismatch\n"
16736                                 "\texpected: %s\n\tgot: %s\n",
16737                                 DB_VERSION_STRING, version);
16738                         return 1;
16739                 }
16740         }
16741 #endif
16742
16743 #if DB_VERSION_MAJOR > 2
16744         db_env_create( NULL, 0 );
16745 #elif DB_VERSION_MAJOR > 1
16746         db_appexit( NULL );
16747 #else
16748         (void) dbopen( NULL, 0, 0, 0, NULL);
16749 #endif
16750
16751 ; return 0; }
16752 EOF
16753 if { (eval echo configure:16754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16754   rm -rf conftest*
16755   ol_cv_db_db41=yes
16756 else
16757   echo "configure: failed program was:" >&5
16758   cat conftest.$ac_ext >&5
16759   rm -rf conftest*
16760   ol_cv_db_db41=no
16761 fi
16762 rm -f conftest*
16763
16764         LIBS="$ol_LIBS"
16765
16766 fi
16767
16768 echo "$ac_t""$ol_cv_db_db41" 1>&6
16769
16770         if test $ol_cv_db_db41 = yes ; then
16771                 ol_cv_lib_db=-ldb41
16772         fi
16773 fi
16774
16775 if test $ol_cv_lib_db = no ; then
16776         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16777 echo "configure:16778: checking for Berkeley DB link (-ldb-41)" >&5
16778 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16779   echo $ac_n "(cached) $ac_c" 1>&6
16780 else
16781   
16782         ol_DB_LIB=-ldb-41
16783         ol_LIBS=$LIBS
16784         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16785
16786         cat > conftest.$ac_ext <<EOF
16787 #line 16788 "configure"
16788 #include "confdefs.h"
16789
16790 #ifdef HAVE_DB_185_H
16791 # include <db_185.h>
16792 #else
16793 # include <db.h>
16794 #endif
16795
16796 #ifndef DB_VERSION_MAJOR
16797 # define DB_VERSION_MAJOR 1
16798 #endif
16799
16800 #ifndef NULL
16801 #define NULL ((void*)0)
16802 #endif
16803
16804 int main() {
16805
16806 #if DB_VERSION_MAJOR > 1
16807         {
16808                 char *version;
16809                 int major, minor, patch;
16810
16811                 version = db_version( &major, &minor, &patch );
16812
16813                 if( major != DB_VERSION_MAJOR ||
16814                         minor < DB_VERSION_MINOR )
16815                 {
16816                         printf("Berkeley DB version mismatch\n"
16817                                 "\texpected: %s\n\tgot: %s\n",
16818                                 DB_VERSION_STRING, version);
16819                         return 1;
16820                 }
16821         }
16822 #endif
16823
16824 #if DB_VERSION_MAJOR > 2
16825         db_env_create( NULL, 0 );
16826 #elif DB_VERSION_MAJOR > 1
16827         db_appexit( NULL );
16828 #else
16829         (void) dbopen( NULL, 0, 0, 0, NULL);
16830 #endif
16831
16832 ; return 0; }
16833 EOF
16834 if { (eval echo configure:16835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16835   rm -rf conftest*
16836   ol_cv_db_db_41=yes
16837 else
16838   echo "configure: failed program was:" >&5
16839   cat conftest.$ac_ext >&5
16840   rm -rf conftest*
16841   ol_cv_db_db_41=no
16842 fi
16843 rm -f conftest*
16844
16845         LIBS="$ol_LIBS"
16846
16847 fi
16848
16849 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16850
16851         if test $ol_cv_db_db_41 = yes ; then
16852                 ol_cv_lib_db=-ldb-41
16853         fi
16854 fi
16855
16856 if test $ol_cv_lib_db = no ; then
16857         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16858 echo "configure:16859: checking for Berkeley DB link (-ldb-4.1)" >&5
16859 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16860   echo $ac_n "(cached) $ac_c" 1>&6
16861 else
16862   
16863         ol_DB_LIB=-ldb-4.1
16864         ol_LIBS=$LIBS
16865         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16866
16867         cat > conftest.$ac_ext <<EOF
16868 #line 16869 "configure"
16869 #include "confdefs.h"
16870
16871 #ifdef HAVE_DB_185_H
16872 # include <db_185.h>
16873 #else
16874 # include <db.h>
16875 #endif
16876
16877 #ifndef DB_VERSION_MAJOR
16878 # define DB_VERSION_MAJOR 1
16879 #endif
16880
16881 #ifndef NULL
16882 #define NULL ((void*)0)
16883 #endif
16884
16885 int main() {
16886
16887 #if DB_VERSION_MAJOR > 1
16888         {
16889                 char *version;
16890                 int major, minor, patch;
16891
16892                 version = db_version( &major, &minor, &patch );
16893
16894                 if( major != DB_VERSION_MAJOR ||
16895                         minor < DB_VERSION_MINOR )
16896                 {
16897                         printf("Berkeley DB version mismatch\n"
16898                                 "\texpected: %s\n\tgot: %s\n",
16899                                 DB_VERSION_STRING, version);
16900                         return 1;
16901                 }
16902         }
16903 #endif
16904
16905 #if DB_VERSION_MAJOR > 2
16906         db_env_create( NULL, 0 );
16907 #elif DB_VERSION_MAJOR > 1
16908         db_appexit( NULL );
16909 #else
16910         (void) dbopen( NULL, 0, 0, 0, NULL);
16911 #endif
16912
16913 ; return 0; }
16914 EOF
16915 if { (eval echo configure:16916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16916   rm -rf conftest*
16917   ol_cv_db_db_4_dot_1=yes
16918 else
16919   echo "configure: failed program was:" >&5
16920   cat conftest.$ac_ext >&5
16921   rm -rf conftest*
16922   ol_cv_db_db_4_dot_1=no
16923 fi
16924 rm -f conftest*
16925
16926         LIBS="$ol_LIBS"
16927
16928 fi
16929
16930 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16931
16932         if test $ol_cv_db_db_4_dot_1 = yes ; then
16933                 ol_cv_lib_db=-ldb-4.1
16934         fi
16935 fi
16936
16937 if test $ol_cv_lib_db = no ; then
16938         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16939 echo "configure:16940: checking for Berkeley DB link (-ldb-4-1)" >&5
16940 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16941   echo $ac_n "(cached) $ac_c" 1>&6
16942 else
16943   
16944         ol_DB_LIB=-ldb-4-1
16945         ol_LIBS=$LIBS
16946         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16947
16948         cat > conftest.$ac_ext <<EOF
16949 #line 16950 "configure"
16950 #include "confdefs.h"
16951
16952 #ifdef HAVE_DB_185_H
16953 # include <db_185.h>
16954 #else
16955 # include <db.h>
16956 #endif
16957
16958 #ifndef DB_VERSION_MAJOR
16959 # define DB_VERSION_MAJOR 1
16960 #endif
16961
16962 #ifndef NULL
16963 #define NULL ((void*)0)
16964 #endif
16965
16966 int main() {
16967
16968 #if DB_VERSION_MAJOR > 1
16969         {
16970                 char *version;
16971                 int major, minor, patch;
16972
16973                 version = db_version( &major, &minor, &patch );
16974
16975                 if( major != DB_VERSION_MAJOR ||
16976                         minor < DB_VERSION_MINOR )
16977                 {
16978                         printf("Berkeley DB version mismatch\n"
16979                                 "\texpected: %s\n\tgot: %s\n",
16980                                 DB_VERSION_STRING, version);
16981                         return 1;
16982                 }
16983         }
16984 #endif
16985
16986 #if DB_VERSION_MAJOR > 2
16987         db_env_create( NULL, 0 );
16988 #elif DB_VERSION_MAJOR > 1
16989         db_appexit( NULL );
16990 #else
16991         (void) dbopen( NULL, 0, 0, 0, NULL);
16992 #endif
16993
16994 ; return 0; }
16995 EOF
16996 if { (eval echo configure:16997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16997   rm -rf conftest*
16998   ol_cv_db_db_4_1=yes
16999 else
17000   echo "configure: failed program was:" >&5
17001   cat conftest.$ac_ext >&5
17002   rm -rf conftest*
17003   ol_cv_db_db_4_1=no
17004 fi
17005 rm -f conftest*
17006
17007         LIBS="$ol_LIBS"
17008
17009 fi
17010
17011 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17012
17013         if test $ol_cv_db_db_4_1 = yes ; then
17014                 ol_cv_lib_db=-ldb-4-1
17015         fi
17016 fi
17017
17018 if test $ol_cv_lib_db = no ; then
17019         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17020 echo "configure:17021: checking for Berkeley DB link (-ldb-4)" >&5
17021 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17022   echo $ac_n "(cached) $ac_c" 1>&6
17023 else
17024   
17025         ol_DB_LIB=-ldb-4
17026         ol_LIBS=$LIBS
17027         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17028
17029         cat > conftest.$ac_ext <<EOF
17030 #line 17031 "configure"
17031 #include "confdefs.h"
17032
17033 #ifdef HAVE_DB_185_H
17034 # include <db_185.h>
17035 #else
17036 # include <db.h>
17037 #endif
17038
17039 #ifndef DB_VERSION_MAJOR
17040 # define DB_VERSION_MAJOR 1
17041 #endif
17042
17043 #ifndef NULL
17044 #define NULL ((void*)0)
17045 #endif
17046
17047 int main() {
17048
17049 #if DB_VERSION_MAJOR > 1
17050         {
17051                 char *version;
17052                 int major, minor, patch;
17053
17054                 version = db_version( &major, &minor, &patch );
17055
17056                 if( major != DB_VERSION_MAJOR ||
17057                         minor < DB_VERSION_MINOR )
17058                 {
17059                         printf("Berkeley DB version mismatch\n"
17060                                 "\texpected: %s\n\tgot: %s\n",
17061                                 DB_VERSION_STRING, version);
17062                         return 1;
17063                 }
17064         }
17065 #endif
17066
17067 #if DB_VERSION_MAJOR > 2
17068         db_env_create( NULL, 0 );
17069 #elif DB_VERSION_MAJOR > 1
17070         db_appexit( NULL );
17071 #else
17072         (void) dbopen( NULL, 0, 0, 0, NULL);
17073 #endif
17074
17075 ; return 0; }
17076 EOF
17077 if { (eval echo configure:17078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17078   rm -rf conftest*
17079   ol_cv_db_db_4=yes
17080 else
17081   echo "configure: failed program was:" >&5
17082   cat conftest.$ac_ext >&5
17083   rm -rf conftest*
17084   ol_cv_db_db_4=no
17085 fi
17086 rm -f conftest*
17087
17088         LIBS="$ol_LIBS"
17089
17090 fi
17091
17092 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17093
17094         if test $ol_cv_db_db_4 = yes ; then
17095                 ol_cv_lib_db=-ldb-4
17096         fi
17097 fi
17098
17099 if test $ol_cv_lib_db = no ; then
17100         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17101 echo "configure:17102: checking for Berkeley DB link (-ldb4)" >&5
17102 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17103   echo $ac_n "(cached) $ac_c" 1>&6
17104 else
17105   
17106         ol_DB_LIB=-ldb4
17107         ol_LIBS=$LIBS
17108         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17109
17110         cat > conftest.$ac_ext <<EOF
17111 #line 17112 "configure"
17112 #include "confdefs.h"
17113
17114 #ifdef HAVE_DB_185_H
17115 # include <db_185.h>
17116 #else
17117 # include <db.h>
17118 #endif
17119
17120 #ifndef DB_VERSION_MAJOR
17121 # define DB_VERSION_MAJOR 1
17122 #endif
17123
17124 #ifndef NULL
17125 #define NULL ((void*)0)
17126 #endif
17127
17128 int main() {
17129
17130 #if DB_VERSION_MAJOR > 1
17131         {
17132                 char *version;
17133                 int major, minor, patch;
17134
17135                 version = db_version( &major, &minor, &patch );
17136
17137                 if( major != DB_VERSION_MAJOR ||
17138                         minor < DB_VERSION_MINOR )
17139                 {
17140                         printf("Berkeley DB version mismatch\n"
17141                                 "\texpected: %s\n\tgot: %s\n",
17142                                 DB_VERSION_STRING, version);
17143                         return 1;
17144                 }
17145         }
17146 #endif
17147
17148 #if DB_VERSION_MAJOR > 2
17149         db_env_create( NULL, 0 );
17150 #elif DB_VERSION_MAJOR > 1
17151         db_appexit( NULL );
17152 #else
17153         (void) dbopen( NULL, 0, 0, 0, NULL);
17154 #endif
17155
17156 ; return 0; }
17157 EOF
17158 if { (eval echo configure:17159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17159   rm -rf conftest*
17160   ol_cv_db_db4=yes
17161 else
17162   echo "configure: failed program was:" >&5
17163   cat conftest.$ac_ext >&5
17164   rm -rf conftest*
17165   ol_cv_db_db4=no
17166 fi
17167 rm -f conftest*
17168
17169         LIBS="$ol_LIBS"
17170
17171 fi
17172
17173 echo "$ac_t""$ol_cv_db_db4" 1>&6
17174
17175         if test $ol_cv_db_db4 = yes ; then
17176                 ol_cv_lib_db=-ldb4
17177         fi
17178 fi
17179
17180 if test $ol_cv_lib_db = no ; then
17181         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17182 echo "configure:17183: checking for Berkeley DB link (-ldb)" >&5
17183 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17184   echo $ac_n "(cached) $ac_c" 1>&6
17185 else
17186   
17187         ol_DB_LIB=-ldb
17188         ol_LIBS=$LIBS
17189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17190
17191         cat > conftest.$ac_ext <<EOF
17192 #line 17193 "configure"
17193 #include "confdefs.h"
17194
17195 #ifdef HAVE_DB_185_H
17196 # include <db_185.h>
17197 #else
17198 # include <db.h>
17199 #endif
17200
17201 #ifndef DB_VERSION_MAJOR
17202 # define DB_VERSION_MAJOR 1
17203 #endif
17204
17205 #ifndef NULL
17206 #define NULL ((void*)0)
17207 #endif
17208
17209 int main() {
17210
17211 #if DB_VERSION_MAJOR > 1
17212         {
17213                 char *version;
17214                 int major, minor, patch;
17215
17216                 version = db_version( &major, &minor, &patch );
17217
17218                 if( major != DB_VERSION_MAJOR ||
17219                         minor < DB_VERSION_MINOR )
17220                 {
17221                         printf("Berkeley DB version mismatch\n"
17222                                 "\texpected: %s\n\tgot: %s\n",
17223                                 DB_VERSION_STRING, version);
17224                         return 1;
17225                 }
17226         }
17227 #endif
17228
17229 #if DB_VERSION_MAJOR > 2
17230         db_env_create( NULL, 0 );
17231 #elif DB_VERSION_MAJOR > 1
17232         db_appexit( NULL );
17233 #else
17234         (void) dbopen( NULL, 0, 0, 0, NULL);
17235 #endif
17236
17237 ; return 0; }
17238 EOF
17239 if { (eval echo configure:17240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17240   rm -rf conftest*
17241   ol_cv_db_db=yes
17242 else
17243   echo "configure: failed program was:" >&5
17244   cat conftest.$ac_ext >&5
17245   rm -rf conftest*
17246   ol_cv_db_db=no
17247 fi
17248 rm -f conftest*
17249
17250         LIBS="$ol_LIBS"
17251
17252 fi
17253
17254 echo "$ac_t""$ol_cv_db_db" 1>&6
17255
17256         if test $ol_cv_db_db = yes ; then
17257                 ol_cv_lib_db=-ldb
17258         fi
17259 fi
17260
17261 if test $ol_cv_lib_db = no ; then
17262         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17263 echo "configure:17264: checking for Berkeley DB link (-ldb3)" >&5
17264 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17265   echo $ac_n "(cached) $ac_c" 1>&6
17266 else
17267   
17268         ol_DB_LIB=-ldb3
17269         ol_LIBS=$LIBS
17270         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17271
17272         cat > conftest.$ac_ext <<EOF
17273 #line 17274 "configure"
17274 #include "confdefs.h"
17275
17276 #ifdef HAVE_DB_185_H
17277 # include <db_185.h>
17278 #else
17279 # include <db.h>
17280 #endif
17281
17282 #ifndef DB_VERSION_MAJOR
17283 # define DB_VERSION_MAJOR 1
17284 #endif
17285
17286 #ifndef NULL
17287 #define NULL ((void*)0)
17288 #endif
17289
17290 int main() {
17291
17292 #if DB_VERSION_MAJOR > 1
17293         {
17294                 char *version;
17295                 int major, minor, patch;
17296
17297                 version = db_version( &major, &minor, &patch );
17298
17299                 if( major != DB_VERSION_MAJOR ||
17300                         minor < DB_VERSION_MINOR )
17301                 {
17302                         printf("Berkeley DB version mismatch\n"
17303                                 "\texpected: %s\n\tgot: %s\n",
17304                                 DB_VERSION_STRING, version);
17305                         return 1;
17306                 }
17307         }
17308 #endif
17309
17310 #if DB_VERSION_MAJOR > 2
17311         db_env_create( NULL, 0 );
17312 #elif DB_VERSION_MAJOR > 1
17313         db_appexit( NULL );
17314 #else
17315         (void) dbopen( NULL, 0, 0, 0, NULL);
17316 #endif
17317
17318 ; return 0; }
17319 EOF
17320 if { (eval echo configure:17321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17321   rm -rf conftest*
17322   ol_cv_db_db3=yes
17323 else
17324   echo "configure: failed program was:" >&5
17325   cat conftest.$ac_ext >&5
17326   rm -rf conftest*
17327   ol_cv_db_db3=no
17328 fi
17329 rm -f conftest*
17330
17331         LIBS="$ol_LIBS"
17332
17333 fi
17334
17335 echo "$ac_t""$ol_cv_db_db3" 1>&6
17336
17337         if test $ol_cv_db_db3 = yes ; then
17338                 ol_cv_lib_db=-ldb3
17339         fi
17340 fi
17341
17342 if test $ol_cv_lib_db = no ; then
17343         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17344 echo "configure:17345: checking for Berkeley DB link (-ldb-3)" >&5
17345 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17346   echo $ac_n "(cached) $ac_c" 1>&6
17347 else
17348   
17349         ol_DB_LIB=-ldb-3
17350         ol_LIBS=$LIBS
17351         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17352
17353         cat > conftest.$ac_ext <<EOF
17354 #line 17355 "configure"
17355 #include "confdefs.h"
17356
17357 #ifdef HAVE_DB_185_H
17358 # include <db_185.h>
17359 #else
17360 # include <db.h>
17361 #endif
17362
17363 #ifndef DB_VERSION_MAJOR
17364 # define DB_VERSION_MAJOR 1
17365 #endif
17366
17367 #ifndef NULL
17368 #define NULL ((void*)0)
17369 #endif
17370
17371 int main() {
17372
17373 #if DB_VERSION_MAJOR > 1
17374         {
17375                 char *version;
17376                 int major, minor, patch;
17377
17378                 version = db_version( &major, &minor, &patch );
17379
17380                 if( major != DB_VERSION_MAJOR ||
17381                         minor < DB_VERSION_MINOR )
17382                 {
17383                         printf("Berkeley DB version mismatch\n"
17384                                 "\texpected: %s\n\tgot: %s\n",
17385                                 DB_VERSION_STRING, version);
17386                         return 1;
17387                 }
17388         }
17389 #endif
17390
17391 #if DB_VERSION_MAJOR > 2
17392         db_env_create( NULL, 0 );
17393 #elif DB_VERSION_MAJOR > 1
17394         db_appexit( NULL );
17395 #else
17396         (void) dbopen( NULL, 0, 0, 0, NULL);
17397 #endif
17398
17399 ; return 0; }
17400 EOF
17401 if { (eval echo configure:17402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17402   rm -rf conftest*
17403   ol_cv_db_db_3=yes
17404 else
17405   echo "configure: failed program was:" >&5
17406   cat conftest.$ac_ext >&5
17407   rm -rf conftest*
17408   ol_cv_db_db_3=no
17409 fi
17410 rm -f conftest*
17411
17412         LIBS="$ol_LIBS"
17413
17414 fi
17415
17416 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17417
17418         if test $ol_cv_db_db_3 = yes ; then
17419                 ol_cv_lib_db=-ldb-3
17420         fi
17421 fi
17422
17423 if test $ol_cv_lib_db = no ; then
17424         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17425 echo "configure:17426: checking for Berkeley DB link (-ldb2)" >&5
17426 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17427   echo $ac_n "(cached) $ac_c" 1>&6
17428 else
17429   
17430         ol_DB_LIB=-ldb2
17431         ol_LIBS=$LIBS
17432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17433
17434         cat > conftest.$ac_ext <<EOF
17435 #line 17436 "configure"
17436 #include "confdefs.h"
17437
17438 #ifdef HAVE_DB_185_H
17439 # include <db_185.h>
17440 #else
17441 # include <db.h>
17442 #endif
17443
17444 #ifndef DB_VERSION_MAJOR
17445 # define DB_VERSION_MAJOR 1
17446 #endif
17447
17448 #ifndef NULL
17449 #define NULL ((void*)0)
17450 #endif
17451
17452 int main() {
17453
17454 #if DB_VERSION_MAJOR > 1
17455         {
17456                 char *version;
17457                 int major, minor, patch;
17458
17459                 version = db_version( &major, &minor, &patch );
17460
17461                 if( major != DB_VERSION_MAJOR ||
17462                         minor < DB_VERSION_MINOR )
17463                 {
17464                         printf("Berkeley DB version mismatch\n"
17465                                 "\texpected: %s\n\tgot: %s\n",
17466                                 DB_VERSION_STRING, version);
17467                         return 1;
17468                 }
17469         }
17470 #endif
17471
17472 #if DB_VERSION_MAJOR > 2
17473         db_env_create( NULL, 0 );
17474 #elif DB_VERSION_MAJOR > 1
17475         db_appexit( NULL );
17476 #else
17477         (void) dbopen( NULL, 0, 0, 0, NULL);
17478 #endif
17479
17480 ; return 0; }
17481 EOF
17482 if { (eval echo configure:17483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17483   rm -rf conftest*
17484   ol_cv_db_db2=yes
17485 else
17486   echo "configure: failed program was:" >&5
17487   cat conftest.$ac_ext >&5
17488   rm -rf conftest*
17489   ol_cv_db_db2=no
17490 fi
17491 rm -f conftest*
17492
17493         LIBS="$ol_LIBS"
17494
17495 fi
17496
17497 echo "$ac_t""$ol_cv_db_db2" 1>&6
17498
17499         if test $ol_cv_db_db2 = yes ; then
17500                 ol_cv_lib_db=-ldb2
17501         fi
17502 fi
17503
17504 if test $ol_cv_lib_db = no ; then
17505         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17506 echo "configure:17507: checking for Berkeley DB link (-ldb-2)" >&5
17507 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17508   echo $ac_n "(cached) $ac_c" 1>&6
17509 else
17510   
17511         ol_DB_LIB=-ldb-2
17512         ol_LIBS=$LIBS
17513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17514
17515         cat > conftest.$ac_ext <<EOF
17516 #line 17517 "configure"
17517 #include "confdefs.h"
17518
17519 #ifdef HAVE_DB_185_H
17520 # include <db_185.h>
17521 #else
17522 # include <db.h>
17523 #endif
17524
17525 #ifndef DB_VERSION_MAJOR
17526 # define DB_VERSION_MAJOR 1
17527 #endif
17528
17529 #ifndef NULL
17530 #define NULL ((void*)0)
17531 #endif
17532
17533 int main() {
17534
17535 #if DB_VERSION_MAJOR > 1
17536         {
17537                 char *version;
17538                 int major, minor, patch;
17539
17540                 version = db_version( &major, &minor, &patch );
17541
17542                 if( major != DB_VERSION_MAJOR ||
17543                         minor < DB_VERSION_MINOR )
17544                 {
17545                         printf("Berkeley DB version mismatch\n"
17546                                 "\texpected: %s\n\tgot: %s\n",
17547                                 DB_VERSION_STRING, version);
17548                         return 1;
17549                 }
17550         }
17551 #endif
17552
17553 #if DB_VERSION_MAJOR > 2
17554         db_env_create( NULL, 0 );
17555 #elif DB_VERSION_MAJOR > 1
17556         db_appexit( NULL );
17557 #else
17558         (void) dbopen( NULL, 0, 0, 0, NULL);
17559 #endif
17560
17561 ; return 0; }
17562 EOF
17563 if { (eval echo configure:17564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17564   rm -rf conftest*
17565   ol_cv_db_db_2=yes
17566 else
17567   echo "configure: failed program was:" >&5
17568   cat conftest.$ac_ext >&5
17569   rm -rf conftest*
17570   ol_cv_db_db_2=no
17571 fi
17572 rm -f conftest*
17573
17574         LIBS="$ol_LIBS"
17575
17576 fi
17577
17578 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17579
17580         if test $ol_cv_db_db_2 = yes ; then
17581                 ol_cv_lib_db=-ldb-2
17582         fi
17583 fi
17584
17585 if test $ol_cv_lib_db = no ; then
17586         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17587 echo "configure:17588: checking for Berkeley DB link (-ldb1)" >&5
17588 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17589   echo $ac_n "(cached) $ac_c" 1>&6
17590 else
17591   
17592         ol_DB_LIB=-ldb1
17593         ol_LIBS=$LIBS
17594         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17595
17596         cat > conftest.$ac_ext <<EOF
17597 #line 17598 "configure"
17598 #include "confdefs.h"
17599
17600 #ifdef HAVE_DB_185_H
17601 # include <db_185.h>
17602 #else
17603 # include <db.h>
17604 #endif
17605
17606 #ifndef DB_VERSION_MAJOR
17607 # define DB_VERSION_MAJOR 1
17608 #endif
17609
17610 #ifndef NULL
17611 #define NULL ((void*)0)
17612 #endif
17613
17614 int main() {
17615
17616 #if DB_VERSION_MAJOR > 1
17617         {
17618                 char *version;
17619                 int major, minor, patch;
17620
17621                 version = db_version( &major, &minor, &patch );
17622
17623                 if( major != DB_VERSION_MAJOR ||
17624                         minor < DB_VERSION_MINOR )
17625                 {
17626                         printf("Berkeley DB version mismatch\n"
17627                                 "\texpected: %s\n\tgot: %s\n",
17628                                 DB_VERSION_STRING, version);
17629                         return 1;
17630                 }
17631         }
17632 #endif
17633
17634 #if DB_VERSION_MAJOR > 2
17635         db_env_create( NULL, 0 );
17636 #elif DB_VERSION_MAJOR > 1
17637         db_appexit( NULL );
17638 #else
17639         (void) dbopen( NULL, 0, 0, 0, NULL);
17640 #endif
17641
17642 ; return 0; }
17643 EOF
17644 if { (eval echo configure:17645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17645   rm -rf conftest*
17646   ol_cv_db_db1=yes
17647 else
17648   echo "configure: failed program was:" >&5
17649   cat conftest.$ac_ext >&5
17650   rm -rf conftest*
17651   ol_cv_db_db1=no
17652 fi
17653 rm -f conftest*
17654
17655         LIBS="$ol_LIBS"
17656
17657 fi
17658
17659 echo "$ac_t""$ol_cv_db_db1" 1>&6
17660
17661         if test $ol_cv_db_db1 = yes ; then
17662                 ol_cv_lib_db=-ldb1
17663         fi
17664 fi
17665
17666 if test $ol_cv_lib_db = no ; then
17667         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17668 echo "configure:17669: checking for Berkeley DB link (-ldb-1)" >&5
17669 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17670   echo $ac_n "(cached) $ac_c" 1>&6
17671 else
17672   
17673         ol_DB_LIB=-ldb-1
17674         ol_LIBS=$LIBS
17675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17676
17677         cat > conftest.$ac_ext <<EOF
17678 #line 17679 "configure"
17679 #include "confdefs.h"
17680
17681 #ifdef HAVE_DB_185_H
17682 # include <db_185.h>
17683 #else
17684 # include <db.h>
17685 #endif
17686
17687 #ifndef DB_VERSION_MAJOR
17688 # define DB_VERSION_MAJOR 1
17689 #endif
17690
17691 #ifndef NULL
17692 #define NULL ((void*)0)
17693 #endif
17694
17695 int main() {
17696
17697 #if DB_VERSION_MAJOR > 1
17698         {
17699                 char *version;
17700                 int major, minor, patch;
17701
17702                 version = db_version( &major, &minor, &patch );
17703
17704                 if( major != DB_VERSION_MAJOR ||
17705                         minor < DB_VERSION_MINOR )
17706                 {
17707                         printf("Berkeley DB version mismatch\n"
17708                                 "\texpected: %s\n\tgot: %s\n",
17709                                 DB_VERSION_STRING, version);
17710                         return 1;
17711                 }
17712         }
17713 #endif
17714
17715 #if DB_VERSION_MAJOR > 2
17716         db_env_create( NULL, 0 );
17717 #elif DB_VERSION_MAJOR > 1
17718         db_appexit( NULL );
17719 #else
17720         (void) dbopen( NULL, 0, 0, 0, NULL);
17721 #endif
17722
17723 ; return 0; }
17724 EOF
17725 if { (eval echo configure:17726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17726   rm -rf conftest*
17727   ol_cv_db_db_1=yes
17728 else
17729   echo "configure: failed program was:" >&5
17730   cat conftest.$ac_ext >&5
17731   rm -rf conftest*
17732   ol_cv_db_db_1=no
17733 fi
17734 rm -f conftest*
17735
17736         LIBS="$ol_LIBS"
17737
17738 fi
17739
17740 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17741
17742         if test $ol_cv_db_db_1 = yes ; then
17743                 ol_cv_lib_db=-ldb-1
17744         fi
17745 fi
17746
17747
17748                 if test "$ol_cv_lib_db" != no ; then
17749                         ol_cv_berkeley_db=yes
17750                 fi
17751         fi
17752 fi
17753
17754         else
17755                 ol_cv_berkeley_db=no
17756 for ac_hdr in db.h
17757 do
17758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17760 echo "configure:17761: checking for $ac_hdr" >&5
17761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17762   echo $ac_n "(cached) $ac_c" 1>&6
17763 else
17764   cat > conftest.$ac_ext <<EOF
17765 #line 17766 "configure"
17766 #include "confdefs.h"
17767 #include <$ac_hdr>
17768 EOF
17769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17770 { (eval echo configure:17771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17772 if test -z "$ac_err"; then
17773   rm -rf conftest*
17774   eval "ac_cv_header_$ac_safe=yes"
17775 else
17776   echo "$ac_err" >&5
17777   echo "configure: failed program was:" >&5
17778   cat conftest.$ac_ext >&5
17779   rm -rf conftest*
17780   eval "ac_cv_header_$ac_safe=no"
17781 fi
17782 rm -f conftest*
17783 fi
17784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17785   echo "$ac_t""yes" 1>&6
17786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17787   cat >> confdefs.h <<EOF
17788 #define $ac_tr_hdr 1
17789 EOF
17790  
17791 else
17792   echo "$ac_t""no" 1>&6
17793 fi
17794 done
17795
17796 if test $ac_cv_header_db_h = yes; then
17797         ol_cv_lib_db=no
17798 if test $ol_cv_lib_db = no ; then
17799         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17800 echo "configure:17801: checking for Berkeley DB link (default)" >&5
17801 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17802   echo $ac_n "(cached) $ac_c" 1>&6
17803 else
17804   
17805         ol_DB_LIB=
17806         ol_LIBS=$LIBS
17807         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17808
17809         cat > conftest.$ac_ext <<EOF
17810 #line 17811 "configure"
17811 #include "confdefs.h"
17812
17813 #ifdef HAVE_DB_185_H
17814 # include <db_185.h>
17815 #else
17816 # include <db.h>
17817 #endif
17818
17819 #ifndef DB_VERSION_MAJOR
17820 # define DB_VERSION_MAJOR 1
17821 #endif
17822
17823 #ifndef NULL
17824 #define NULL ((void*)0)
17825 #endif
17826
17827 int main() {
17828
17829 #if DB_VERSION_MAJOR > 1
17830         {
17831                 char *version;
17832                 int major, minor, patch;
17833
17834                 version = db_version( &major, &minor, &patch );
17835
17836                 if( major != DB_VERSION_MAJOR ||
17837                         minor < DB_VERSION_MINOR )
17838                 {
17839                         printf("Berkeley DB version mismatch\n"
17840                                 "\texpected: %s\n\tgot: %s\n",
17841                                 DB_VERSION_STRING, version);
17842                         return 1;
17843                 }
17844         }
17845 #endif
17846
17847 #if DB_VERSION_MAJOR > 2
17848         db_env_create( NULL, 0 );
17849 #elif DB_VERSION_MAJOR > 1
17850         db_appexit( NULL );
17851 #else
17852         (void) dbopen( NULL, 0, 0, 0, NULL);
17853 #endif
17854
17855 ; return 0; }
17856 EOF
17857 if { (eval echo configure:17858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17858   rm -rf conftest*
17859   ol_cv_db_none=yes
17860 else
17861   echo "configure: failed program was:" >&5
17862   cat conftest.$ac_ext >&5
17863   rm -rf conftest*
17864   ol_cv_db_none=no
17865 fi
17866 rm -f conftest*
17867
17868         LIBS="$ol_LIBS"
17869
17870 fi
17871
17872 echo "$ac_t""$ol_cv_db_none" 1>&6
17873
17874         if test $ol_cv_db_none = yes ; then
17875                 ol_cv_lib_db=yes
17876         fi
17877 fi
17878
17879 if test $ol_cv_lib_db = no ; then
17880         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17881 echo "configure:17882: checking for Berkeley DB link (-ldb41)" >&5
17882 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17883   echo $ac_n "(cached) $ac_c" 1>&6
17884 else
17885   
17886         ol_DB_LIB=-ldb41
17887         ol_LIBS=$LIBS
17888         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17889
17890         cat > conftest.$ac_ext <<EOF
17891 #line 17892 "configure"
17892 #include "confdefs.h"
17893
17894 #ifdef HAVE_DB_185_H
17895 # include <db_185.h>
17896 #else
17897 # include <db.h>
17898 #endif
17899
17900 #ifndef DB_VERSION_MAJOR
17901 # define DB_VERSION_MAJOR 1
17902 #endif
17903
17904 #ifndef NULL
17905 #define NULL ((void*)0)
17906 #endif
17907
17908 int main() {
17909
17910 #if DB_VERSION_MAJOR > 1
17911         {
17912                 char *version;
17913                 int major, minor, patch;
17914
17915                 version = db_version( &major, &minor, &patch );
17916
17917                 if( major != DB_VERSION_MAJOR ||
17918                         minor < DB_VERSION_MINOR )
17919                 {
17920                         printf("Berkeley DB version mismatch\n"
17921                                 "\texpected: %s\n\tgot: %s\n",
17922                                 DB_VERSION_STRING, version);
17923                         return 1;
17924                 }
17925         }
17926 #endif
17927
17928 #if DB_VERSION_MAJOR > 2
17929         db_env_create( NULL, 0 );
17930 #elif DB_VERSION_MAJOR > 1
17931         db_appexit( NULL );
17932 #else
17933         (void) dbopen( NULL, 0, 0, 0, NULL);
17934 #endif
17935
17936 ; return 0; }
17937 EOF
17938 if { (eval echo configure:17939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17939   rm -rf conftest*
17940   ol_cv_db_db41=yes
17941 else
17942   echo "configure: failed program was:" >&5
17943   cat conftest.$ac_ext >&5
17944   rm -rf conftest*
17945   ol_cv_db_db41=no
17946 fi
17947 rm -f conftest*
17948
17949         LIBS="$ol_LIBS"
17950
17951 fi
17952
17953 echo "$ac_t""$ol_cv_db_db41" 1>&6
17954
17955         if test $ol_cv_db_db41 = yes ; then
17956                 ol_cv_lib_db=-ldb41
17957         fi
17958 fi
17959
17960 if test $ol_cv_lib_db = no ; then
17961         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17962 echo "configure:17963: checking for Berkeley DB link (-ldb-41)" >&5
17963 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17964   echo $ac_n "(cached) $ac_c" 1>&6
17965 else
17966   
17967         ol_DB_LIB=-ldb-41
17968         ol_LIBS=$LIBS
17969         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17970
17971         cat > conftest.$ac_ext <<EOF
17972 #line 17973 "configure"
17973 #include "confdefs.h"
17974
17975 #ifdef HAVE_DB_185_H
17976 # include <db_185.h>
17977 #else
17978 # include <db.h>
17979 #endif
17980
17981 #ifndef DB_VERSION_MAJOR
17982 # define DB_VERSION_MAJOR 1
17983 #endif
17984
17985 #ifndef NULL
17986 #define NULL ((void*)0)
17987 #endif
17988
17989 int main() {
17990
17991 #if DB_VERSION_MAJOR > 1
17992         {
17993                 char *version;
17994                 int major, minor, patch;
17995
17996                 version = db_version( &major, &minor, &patch );
17997
17998                 if( major != DB_VERSION_MAJOR ||
17999                         minor < DB_VERSION_MINOR )
18000                 {
18001                         printf("Berkeley DB version mismatch\n"
18002                                 "\texpected: %s\n\tgot: %s\n",
18003                                 DB_VERSION_STRING, version);
18004                         return 1;
18005                 }
18006         }
18007 #endif
18008
18009 #if DB_VERSION_MAJOR > 2
18010         db_env_create( NULL, 0 );
18011 #elif DB_VERSION_MAJOR > 1
18012         db_appexit( NULL );
18013 #else
18014         (void) dbopen( NULL, 0, 0, 0, NULL);
18015 #endif
18016
18017 ; return 0; }
18018 EOF
18019 if { (eval echo configure:18020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18020   rm -rf conftest*
18021   ol_cv_db_db_41=yes
18022 else
18023   echo "configure: failed program was:" >&5
18024   cat conftest.$ac_ext >&5
18025   rm -rf conftest*
18026   ol_cv_db_db_41=no
18027 fi
18028 rm -f conftest*
18029
18030         LIBS="$ol_LIBS"
18031
18032 fi
18033
18034 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18035
18036         if test $ol_cv_db_db_41 = yes ; then
18037                 ol_cv_lib_db=-ldb-41
18038         fi
18039 fi
18040
18041 if test $ol_cv_lib_db = no ; then
18042         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18043 echo "configure:18044: checking for Berkeley DB link (-ldb-4.1)" >&5
18044 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18045   echo $ac_n "(cached) $ac_c" 1>&6
18046 else
18047   
18048         ol_DB_LIB=-ldb-4.1
18049         ol_LIBS=$LIBS
18050         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18051
18052         cat > conftest.$ac_ext <<EOF
18053 #line 18054 "configure"
18054 #include "confdefs.h"
18055
18056 #ifdef HAVE_DB_185_H
18057 # include <db_185.h>
18058 #else
18059 # include <db.h>
18060 #endif
18061
18062 #ifndef DB_VERSION_MAJOR
18063 # define DB_VERSION_MAJOR 1
18064 #endif
18065
18066 #ifndef NULL
18067 #define NULL ((void*)0)
18068 #endif
18069
18070 int main() {
18071
18072 #if DB_VERSION_MAJOR > 1
18073         {
18074                 char *version;
18075                 int major, minor, patch;
18076
18077                 version = db_version( &major, &minor, &patch );
18078
18079                 if( major != DB_VERSION_MAJOR ||
18080                         minor < DB_VERSION_MINOR )
18081                 {
18082                         printf("Berkeley DB version mismatch\n"
18083                                 "\texpected: %s\n\tgot: %s\n",
18084                                 DB_VERSION_STRING, version);
18085                         return 1;
18086                 }
18087         }
18088 #endif
18089
18090 #if DB_VERSION_MAJOR > 2
18091         db_env_create( NULL, 0 );
18092 #elif DB_VERSION_MAJOR > 1
18093         db_appexit( NULL );
18094 #else
18095         (void) dbopen( NULL, 0, 0, 0, NULL);
18096 #endif
18097
18098 ; return 0; }
18099 EOF
18100 if { (eval echo configure:18101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18101   rm -rf conftest*
18102   ol_cv_db_db_4_dot_1=yes
18103 else
18104   echo "configure: failed program was:" >&5
18105   cat conftest.$ac_ext >&5
18106   rm -rf conftest*
18107   ol_cv_db_db_4_dot_1=no
18108 fi
18109 rm -f conftest*
18110
18111         LIBS="$ol_LIBS"
18112
18113 fi
18114
18115 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18116
18117         if test $ol_cv_db_db_4_dot_1 = yes ; then
18118                 ol_cv_lib_db=-ldb-4.1
18119         fi
18120 fi
18121
18122 if test $ol_cv_lib_db = no ; then
18123         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18124 echo "configure:18125: checking for Berkeley DB link (-ldb-4-1)" >&5
18125 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18126   echo $ac_n "(cached) $ac_c" 1>&6
18127 else
18128   
18129         ol_DB_LIB=-ldb-4-1
18130         ol_LIBS=$LIBS
18131         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18132
18133         cat > conftest.$ac_ext <<EOF
18134 #line 18135 "configure"
18135 #include "confdefs.h"
18136
18137 #ifdef HAVE_DB_185_H
18138 # include <db_185.h>
18139 #else
18140 # include <db.h>
18141 #endif
18142
18143 #ifndef DB_VERSION_MAJOR
18144 # define DB_VERSION_MAJOR 1
18145 #endif
18146
18147 #ifndef NULL
18148 #define NULL ((void*)0)
18149 #endif
18150
18151 int main() {
18152
18153 #if DB_VERSION_MAJOR > 1
18154         {
18155                 char *version;
18156                 int major, minor, patch;
18157
18158                 version = db_version( &major, &minor, &patch );
18159
18160                 if( major != DB_VERSION_MAJOR ||
18161                         minor < DB_VERSION_MINOR )
18162                 {
18163                         printf("Berkeley DB version mismatch\n"
18164                                 "\texpected: %s\n\tgot: %s\n",
18165                                 DB_VERSION_STRING, version);
18166                         return 1;
18167                 }
18168         }
18169 #endif
18170
18171 #if DB_VERSION_MAJOR > 2
18172         db_env_create( NULL, 0 );
18173 #elif DB_VERSION_MAJOR > 1
18174         db_appexit( NULL );
18175 #else
18176         (void) dbopen( NULL, 0, 0, 0, NULL);
18177 #endif
18178
18179 ; return 0; }
18180 EOF
18181 if { (eval echo configure:18182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18182   rm -rf conftest*
18183   ol_cv_db_db_4_1=yes
18184 else
18185   echo "configure: failed program was:" >&5
18186   cat conftest.$ac_ext >&5
18187   rm -rf conftest*
18188   ol_cv_db_db_4_1=no
18189 fi
18190 rm -f conftest*
18191
18192         LIBS="$ol_LIBS"
18193
18194 fi
18195
18196 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18197
18198         if test $ol_cv_db_db_4_1 = yes ; then
18199                 ol_cv_lib_db=-ldb-4-1
18200         fi
18201 fi
18202
18203 if test $ol_cv_lib_db = no ; then
18204         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18205 echo "configure:18206: checking for Berkeley DB link (-ldb-4)" >&5
18206 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18207   echo $ac_n "(cached) $ac_c" 1>&6
18208 else
18209   
18210         ol_DB_LIB=-ldb-4
18211         ol_LIBS=$LIBS
18212         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18213
18214         cat > conftest.$ac_ext <<EOF
18215 #line 18216 "configure"
18216 #include "confdefs.h"
18217
18218 #ifdef HAVE_DB_185_H
18219 # include <db_185.h>
18220 #else
18221 # include <db.h>
18222 #endif
18223
18224 #ifndef DB_VERSION_MAJOR
18225 # define DB_VERSION_MAJOR 1
18226 #endif
18227
18228 #ifndef NULL
18229 #define NULL ((void*)0)
18230 #endif
18231
18232 int main() {
18233
18234 #if DB_VERSION_MAJOR > 1
18235         {
18236                 char *version;
18237                 int major, minor, patch;
18238
18239                 version = db_version( &major, &minor, &patch );
18240
18241                 if( major != DB_VERSION_MAJOR ||
18242                         minor < DB_VERSION_MINOR )
18243                 {
18244                         printf("Berkeley DB version mismatch\n"
18245                                 "\texpected: %s\n\tgot: %s\n",
18246                                 DB_VERSION_STRING, version);
18247                         return 1;
18248                 }
18249         }
18250 #endif
18251
18252 #if DB_VERSION_MAJOR > 2
18253         db_env_create( NULL, 0 );
18254 #elif DB_VERSION_MAJOR > 1
18255         db_appexit( NULL );
18256 #else
18257         (void) dbopen( NULL, 0, 0, 0, NULL);
18258 #endif
18259
18260 ; return 0; }
18261 EOF
18262 if { (eval echo configure:18263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18263   rm -rf conftest*
18264   ol_cv_db_db_4=yes
18265 else
18266   echo "configure: failed program was:" >&5
18267   cat conftest.$ac_ext >&5
18268   rm -rf conftest*
18269   ol_cv_db_db_4=no
18270 fi
18271 rm -f conftest*
18272
18273         LIBS="$ol_LIBS"
18274
18275 fi
18276
18277 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18278
18279         if test $ol_cv_db_db_4 = yes ; then
18280                 ol_cv_lib_db=-ldb-4
18281         fi
18282 fi
18283
18284 if test $ol_cv_lib_db = no ; then
18285         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18286 echo "configure:18287: checking for Berkeley DB link (-ldb4)" >&5
18287 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18288   echo $ac_n "(cached) $ac_c" 1>&6
18289 else
18290   
18291         ol_DB_LIB=-ldb4
18292         ol_LIBS=$LIBS
18293         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18294
18295         cat > conftest.$ac_ext <<EOF
18296 #line 18297 "configure"
18297 #include "confdefs.h"
18298
18299 #ifdef HAVE_DB_185_H
18300 # include <db_185.h>
18301 #else
18302 # include <db.h>
18303 #endif
18304
18305 #ifndef DB_VERSION_MAJOR
18306 # define DB_VERSION_MAJOR 1
18307 #endif
18308
18309 #ifndef NULL
18310 #define NULL ((void*)0)
18311 #endif
18312
18313 int main() {
18314
18315 #if DB_VERSION_MAJOR > 1
18316         {
18317                 char *version;
18318                 int major, minor, patch;
18319
18320                 version = db_version( &major, &minor, &patch );
18321
18322                 if( major != DB_VERSION_MAJOR ||
18323                         minor < DB_VERSION_MINOR )
18324                 {
18325                         printf("Berkeley DB version mismatch\n"
18326                                 "\texpected: %s\n\tgot: %s\n",
18327                                 DB_VERSION_STRING, version);
18328                         return 1;
18329                 }
18330         }
18331 #endif
18332
18333 #if DB_VERSION_MAJOR > 2
18334         db_env_create( NULL, 0 );
18335 #elif DB_VERSION_MAJOR > 1
18336         db_appexit( NULL );
18337 #else
18338         (void) dbopen( NULL, 0, 0, 0, NULL);
18339 #endif
18340
18341 ; return 0; }
18342 EOF
18343 if { (eval echo configure:18344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18344   rm -rf conftest*
18345   ol_cv_db_db4=yes
18346 else
18347   echo "configure: failed program was:" >&5
18348   cat conftest.$ac_ext >&5
18349   rm -rf conftest*
18350   ol_cv_db_db4=no
18351 fi
18352 rm -f conftest*
18353
18354         LIBS="$ol_LIBS"
18355
18356 fi
18357
18358 echo "$ac_t""$ol_cv_db_db4" 1>&6
18359
18360         if test $ol_cv_db_db4 = yes ; then
18361                 ol_cv_lib_db=-ldb4
18362         fi
18363 fi
18364
18365 if test $ol_cv_lib_db = no ; then
18366         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18367 echo "configure:18368: checking for Berkeley DB link (-ldb)" >&5
18368 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18369   echo $ac_n "(cached) $ac_c" 1>&6
18370 else
18371   
18372         ol_DB_LIB=-ldb
18373         ol_LIBS=$LIBS
18374         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18375
18376         cat > conftest.$ac_ext <<EOF
18377 #line 18378 "configure"
18378 #include "confdefs.h"
18379
18380 #ifdef HAVE_DB_185_H
18381 # include <db_185.h>
18382 #else
18383 # include <db.h>
18384 #endif
18385
18386 #ifndef DB_VERSION_MAJOR
18387 # define DB_VERSION_MAJOR 1
18388 #endif
18389
18390 #ifndef NULL
18391 #define NULL ((void*)0)
18392 #endif
18393
18394 int main() {
18395
18396 #if DB_VERSION_MAJOR > 1
18397         {
18398                 char *version;
18399                 int major, minor, patch;
18400
18401                 version = db_version( &major, &minor, &patch );
18402
18403                 if( major != DB_VERSION_MAJOR ||
18404                         minor < DB_VERSION_MINOR )
18405                 {
18406                         printf("Berkeley DB version mismatch\n"
18407                                 "\texpected: %s\n\tgot: %s\n",
18408                                 DB_VERSION_STRING, version);
18409                         return 1;
18410                 }
18411         }
18412 #endif
18413
18414 #if DB_VERSION_MAJOR > 2
18415         db_env_create( NULL, 0 );
18416 #elif DB_VERSION_MAJOR > 1
18417         db_appexit( NULL );
18418 #else
18419         (void) dbopen( NULL, 0, 0, 0, NULL);
18420 #endif
18421
18422 ; return 0; }
18423 EOF
18424 if { (eval echo configure:18425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18425   rm -rf conftest*
18426   ol_cv_db_db=yes
18427 else
18428   echo "configure: failed program was:" >&5
18429   cat conftest.$ac_ext >&5
18430   rm -rf conftest*
18431   ol_cv_db_db=no
18432 fi
18433 rm -f conftest*
18434
18435         LIBS="$ol_LIBS"
18436
18437 fi
18438
18439 echo "$ac_t""$ol_cv_db_db" 1>&6
18440
18441         if test $ol_cv_db_db = yes ; then
18442                 ol_cv_lib_db=-ldb
18443         fi
18444 fi
18445
18446 if test $ol_cv_lib_db = no ; then
18447         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18448 echo "configure:18449: checking for Berkeley DB link (-ldb3)" >&5
18449 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18450   echo $ac_n "(cached) $ac_c" 1>&6
18451 else
18452   
18453         ol_DB_LIB=-ldb3
18454         ol_LIBS=$LIBS
18455         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18456
18457         cat > conftest.$ac_ext <<EOF
18458 #line 18459 "configure"
18459 #include "confdefs.h"
18460
18461 #ifdef HAVE_DB_185_H
18462 # include <db_185.h>
18463 #else
18464 # include <db.h>
18465 #endif
18466
18467 #ifndef DB_VERSION_MAJOR
18468 # define DB_VERSION_MAJOR 1
18469 #endif
18470
18471 #ifndef NULL
18472 #define NULL ((void*)0)
18473 #endif
18474
18475 int main() {
18476
18477 #if DB_VERSION_MAJOR > 1
18478         {
18479                 char *version;
18480                 int major, minor, patch;
18481
18482                 version = db_version( &major, &minor, &patch );
18483
18484                 if( major != DB_VERSION_MAJOR ||
18485                         minor < DB_VERSION_MINOR )
18486                 {
18487                         printf("Berkeley DB version mismatch\n"
18488                                 "\texpected: %s\n\tgot: %s\n",
18489                                 DB_VERSION_STRING, version);
18490                         return 1;
18491                 }
18492         }
18493 #endif
18494
18495 #if DB_VERSION_MAJOR > 2
18496         db_env_create( NULL, 0 );
18497 #elif DB_VERSION_MAJOR > 1
18498         db_appexit( NULL );
18499 #else
18500         (void) dbopen( NULL, 0, 0, 0, NULL);
18501 #endif
18502
18503 ; return 0; }
18504 EOF
18505 if { (eval echo configure:18506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18506   rm -rf conftest*
18507   ol_cv_db_db3=yes
18508 else
18509   echo "configure: failed program was:" >&5
18510   cat conftest.$ac_ext >&5
18511   rm -rf conftest*
18512   ol_cv_db_db3=no
18513 fi
18514 rm -f conftest*
18515
18516         LIBS="$ol_LIBS"
18517
18518 fi
18519
18520 echo "$ac_t""$ol_cv_db_db3" 1>&6
18521
18522         if test $ol_cv_db_db3 = yes ; then
18523                 ol_cv_lib_db=-ldb3
18524         fi
18525 fi
18526
18527 if test $ol_cv_lib_db = no ; then
18528         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18529 echo "configure:18530: checking for Berkeley DB link (-ldb-3)" >&5
18530 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18531   echo $ac_n "(cached) $ac_c" 1>&6
18532 else
18533   
18534         ol_DB_LIB=-ldb-3
18535         ol_LIBS=$LIBS
18536         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18537
18538         cat > conftest.$ac_ext <<EOF
18539 #line 18540 "configure"
18540 #include "confdefs.h"
18541
18542 #ifdef HAVE_DB_185_H
18543 # include <db_185.h>
18544 #else
18545 # include <db.h>
18546 #endif
18547
18548 #ifndef DB_VERSION_MAJOR
18549 # define DB_VERSION_MAJOR 1
18550 #endif
18551
18552 #ifndef NULL
18553 #define NULL ((void*)0)
18554 #endif
18555
18556 int main() {
18557
18558 #if DB_VERSION_MAJOR > 1
18559         {
18560                 char *version;
18561                 int major, minor, patch;
18562
18563                 version = db_version( &major, &minor, &patch );
18564
18565                 if( major != DB_VERSION_MAJOR ||
18566                         minor < DB_VERSION_MINOR )
18567                 {
18568                         printf("Berkeley DB version mismatch\n"
18569                                 "\texpected: %s\n\tgot: %s\n",
18570                                 DB_VERSION_STRING, version);
18571                         return 1;
18572                 }
18573         }
18574 #endif
18575
18576 #if DB_VERSION_MAJOR > 2
18577         db_env_create( NULL, 0 );
18578 #elif DB_VERSION_MAJOR > 1
18579         db_appexit( NULL );
18580 #else
18581         (void) dbopen( NULL, 0, 0, 0, NULL);
18582 #endif
18583
18584 ; return 0; }
18585 EOF
18586 if { (eval echo configure:18587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18587   rm -rf conftest*
18588   ol_cv_db_db_3=yes
18589 else
18590   echo "configure: failed program was:" >&5
18591   cat conftest.$ac_ext >&5
18592   rm -rf conftest*
18593   ol_cv_db_db_3=no
18594 fi
18595 rm -f conftest*
18596
18597         LIBS="$ol_LIBS"
18598
18599 fi
18600
18601 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18602
18603         if test $ol_cv_db_db_3 = yes ; then
18604                 ol_cv_lib_db=-ldb-3
18605         fi
18606 fi
18607
18608 if test $ol_cv_lib_db = no ; then
18609         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18610 echo "configure:18611: checking for Berkeley DB link (-ldb2)" >&5
18611 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18612   echo $ac_n "(cached) $ac_c" 1>&6
18613 else
18614   
18615         ol_DB_LIB=-ldb2
18616         ol_LIBS=$LIBS
18617         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18618
18619         cat > conftest.$ac_ext <<EOF
18620 #line 18621 "configure"
18621 #include "confdefs.h"
18622
18623 #ifdef HAVE_DB_185_H
18624 # include <db_185.h>
18625 #else
18626 # include <db.h>
18627 #endif
18628
18629 #ifndef DB_VERSION_MAJOR
18630 # define DB_VERSION_MAJOR 1
18631 #endif
18632
18633 #ifndef NULL
18634 #define NULL ((void*)0)
18635 #endif
18636
18637 int main() {
18638
18639 #if DB_VERSION_MAJOR > 1
18640         {
18641                 char *version;
18642                 int major, minor, patch;
18643
18644                 version = db_version( &major, &minor, &patch );
18645
18646                 if( major != DB_VERSION_MAJOR ||
18647                         minor < DB_VERSION_MINOR )
18648                 {
18649                         printf("Berkeley DB version mismatch\n"
18650                                 "\texpected: %s\n\tgot: %s\n",
18651                                 DB_VERSION_STRING, version);
18652                         return 1;
18653                 }
18654         }
18655 #endif
18656
18657 #if DB_VERSION_MAJOR > 2
18658         db_env_create( NULL, 0 );
18659 #elif DB_VERSION_MAJOR > 1
18660         db_appexit( NULL );
18661 #else
18662         (void) dbopen( NULL, 0, 0, 0, NULL);
18663 #endif
18664
18665 ; return 0; }
18666 EOF
18667 if { (eval echo configure:18668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18668   rm -rf conftest*
18669   ol_cv_db_db2=yes
18670 else
18671   echo "configure: failed program was:" >&5
18672   cat conftest.$ac_ext >&5
18673   rm -rf conftest*
18674   ol_cv_db_db2=no
18675 fi
18676 rm -f conftest*
18677
18678         LIBS="$ol_LIBS"
18679
18680 fi
18681
18682 echo "$ac_t""$ol_cv_db_db2" 1>&6
18683
18684         if test $ol_cv_db_db2 = yes ; then
18685                 ol_cv_lib_db=-ldb2
18686         fi
18687 fi
18688
18689 if test $ol_cv_lib_db = no ; then
18690         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18691 echo "configure:18692: checking for Berkeley DB link (-ldb-2)" >&5
18692 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18693   echo $ac_n "(cached) $ac_c" 1>&6
18694 else
18695   
18696         ol_DB_LIB=-ldb-2
18697         ol_LIBS=$LIBS
18698         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18699
18700         cat > conftest.$ac_ext <<EOF
18701 #line 18702 "configure"
18702 #include "confdefs.h"
18703
18704 #ifdef HAVE_DB_185_H
18705 # include <db_185.h>
18706 #else
18707 # include <db.h>
18708 #endif
18709
18710 #ifndef DB_VERSION_MAJOR
18711 # define DB_VERSION_MAJOR 1
18712 #endif
18713
18714 #ifndef NULL
18715 #define NULL ((void*)0)
18716 #endif
18717
18718 int main() {
18719
18720 #if DB_VERSION_MAJOR > 1
18721         {
18722                 char *version;
18723                 int major, minor, patch;
18724
18725                 version = db_version( &major, &minor, &patch );
18726
18727                 if( major != DB_VERSION_MAJOR ||
18728                         minor < DB_VERSION_MINOR )
18729                 {
18730                         printf("Berkeley DB version mismatch\n"
18731                                 "\texpected: %s\n\tgot: %s\n",
18732                                 DB_VERSION_STRING, version);
18733                         return 1;
18734                 }
18735         }
18736 #endif
18737
18738 #if DB_VERSION_MAJOR > 2
18739         db_env_create( NULL, 0 );
18740 #elif DB_VERSION_MAJOR > 1
18741         db_appexit( NULL );
18742 #else
18743         (void) dbopen( NULL, 0, 0, 0, NULL);
18744 #endif
18745
18746 ; return 0; }
18747 EOF
18748 if { (eval echo configure:18749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18749   rm -rf conftest*
18750   ol_cv_db_db_2=yes
18751 else
18752   echo "configure: failed program was:" >&5
18753   cat conftest.$ac_ext >&5
18754   rm -rf conftest*
18755   ol_cv_db_db_2=no
18756 fi
18757 rm -f conftest*
18758
18759         LIBS="$ol_LIBS"
18760
18761 fi
18762
18763 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18764
18765         if test $ol_cv_db_db_2 = yes ; then
18766                 ol_cv_lib_db=-ldb-2
18767         fi
18768 fi
18769
18770 if test $ol_cv_lib_db = no ; then
18771         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18772 echo "configure:18773: checking for Berkeley DB link (-ldb1)" >&5
18773 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18774   echo $ac_n "(cached) $ac_c" 1>&6
18775 else
18776   
18777         ol_DB_LIB=-ldb1
18778         ol_LIBS=$LIBS
18779         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18780
18781         cat > conftest.$ac_ext <<EOF
18782 #line 18783 "configure"
18783 #include "confdefs.h"
18784
18785 #ifdef HAVE_DB_185_H
18786 # include <db_185.h>
18787 #else
18788 # include <db.h>
18789 #endif
18790
18791 #ifndef DB_VERSION_MAJOR
18792 # define DB_VERSION_MAJOR 1
18793 #endif
18794
18795 #ifndef NULL
18796 #define NULL ((void*)0)
18797 #endif
18798
18799 int main() {
18800
18801 #if DB_VERSION_MAJOR > 1
18802         {
18803                 char *version;
18804                 int major, minor, patch;
18805
18806                 version = db_version( &major, &minor, &patch );
18807
18808                 if( major != DB_VERSION_MAJOR ||
18809                         minor < DB_VERSION_MINOR )
18810                 {
18811                         printf("Berkeley DB version mismatch\n"
18812                                 "\texpected: %s\n\tgot: %s\n",
18813                                 DB_VERSION_STRING, version);
18814                         return 1;
18815                 }
18816         }
18817 #endif
18818
18819 #if DB_VERSION_MAJOR > 2
18820         db_env_create( NULL, 0 );
18821 #elif DB_VERSION_MAJOR > 1
18822         db_appexit( NULL );
18823 #else
18824         (void) dbopen( NULL, 0, 0, 0, NULL);
18825 #endif
18826
18827 ; return 0; }
18828 EOF
18829 if { (eval echo configure:18830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18830   rm -rf conftest*
18831   ol_cv_db_db1=yes
18832 else
18833   echo "configure: failed program was:" >&5
18834   cat conftest.$ac_ext >&5
18835   rm -rf conftest*
18836   ol_cv_db_db1=no
18837 fi
18838 rm -f conftest*
18839
18840         LIBS="$ol_LIBS"
18841
18842 fi
18843
18844 echo "$ac_t""$ol_cv_db_db1" 1>&6
18845
18846         if test $ol_cv_db_db1 = yes ; then
18847                 ol_cv_lib_db=-ldb1
18848         fi
18849 fi
18850
18851 if test $ol_cv_lib_db = no ; then
18852         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18853 echo "configure:18854: checking for Berkeley DB link (-ldb-1)" >&5
18854 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18855   echo $ac_n "(cached) $ac_c" 1>&6
18856 else
18857   
18858         ol_DB_LIB=-ldb-1
18859         ol_LIBS=$LIBS
18860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18861
18862         cat > conftest.$ac_ext <<EOF
18863 #line 18864 "configure"
18864 #include "confdefs.h"
18865
18866 #ifdef HAVE_DB_185_H
18867 # include <db_185.h>
18868 #else
18869 # include <db.h>
18870 #endif
18871
18872 #ifndef DB_VERSION_MAJOR
18873 # define DB_VERSION_MAJOR 1
18874 #endif
18875
18876 #ifndef NULL
18877 #define NULL ((void*)0)
18878 #endif
18879
18880 int main() {
18881
18882 #if DB_VERSION_MAJOR > 1
18883         {
18884                 char *version;
18885                 int major, minor, patch;
18886
18887                 version = db_version( &major, &minor, &patch );
18888
18889                 if( major != DB_VERSION_MAJOR ||
18890                         minor < DB_VERSION_MINOR )
18891                 {
18892                         printf("Berkeley DB version mismatch\n"
18893                                 "\texpected: %s\n\tgot: %s\n",
18894                                 DB_VERSION_STRING, version);
18895                         return 1;
18896                 }
18897         }
18898 #endif
18899
18900 #if DB_VERSION_MAJOR > 2
18901         db_env_create( NULL, 0 );
18902 #elif DB_VERSION_MAJOR > 1
18903         db_appexit( NULL );
18904 #else
18905         (void) dbopen( NULL, 0, 0, 0, NULL);
18906 #endif
18907
18908 ; return 0; }
18909 EOF
18910 if { (eval echo configure:18911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18911   rm -rf conftest*
18912   ol_cv_db_db_1=yes
18913 else
18914   echo "configure: failed program was:" >&5
18915   cat conftest.$ac_ext >&5
18916   rm -rf conftest*
18917   ol_cv_db_db_1=no
18918 fi
18919 rm -f conftest*
18920
18921         LIBS="$ol_LIBS"
18922
18923 fi
18924
18925 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18926
18927         if test $ol_cv_db_db_1 = yes ; then
18928                 ol_cv_lib_db=-ldb-1
18929         fi
18930 fi
18931
18932
18933         if test "$ol_cv_lib_db" != no ; then
18934                 ol_cv_berkeley_db=yes
18935                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18936 echo "configure:18937: checking for Berkeley DB thread support" >&5
18937 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18938   echo $ac_n "(cached) $ac_c" 1>&6
18939 else
18940   
18941         ol_LIBS="$LIBS"
18942         LIBS="$LTHREAD_LIBS $LIBS"
18943         if test $ol_cv_lib_db != yes ; then
18944                 LIBS="$ol_cv_lib_db $LIBS"
18945         fi
18946
18947         if test "$cross_compiling" = yes; then
18948   ol_cv_berkeley_db_thread=cross
18949 else
18950   cat > conftest.$ac_ext <<EOF
18951 #line 18952 "configure"
18952 #include "confdefs.h"
18953
18954 #ifdef HAVE_DB_185_H
18955         choke me;
18956 #else
18957 #include <db.h>
18958 #endif
18959 #ifndef NULL
18960 #define NULL ((void *)0)
18961 #endif
18962 main()
18963 {
18964         int rc;
18965         u_int32_t flags = DB_CREATE |
18966 #ifdef DB_PRIVATE
18967                 DB_PRIVATE |
18968 #endif
18969                 DB_THREAD;
18970
18971 #if DB_VERSION_MAJOR > 2
18972         DB_ENV *env = NULL;
18973
18974         rc = db_env_create( &env, 0 );
18975
18976         flags |= DB_INIT_MPOOL;
18977 #ifdef DB_MPOOL_PRIVATE
18978         flags |= DB_MPOOL_PRIVATE;
18979 #endif
18980
18981         if( rc ) {
18982                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18983                 return rc;
18984         }
18985
18986 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18987         rc = env->open( env, NULL, flags, 0 );
18988 #else
18989         rc = env->open( env, NULL, NULL, flags, 0 );
18990 #endif
18991
18992         if ( rc == 0 ) {
18993                 rc = env->close( env, 0 );
18994         }
18995
18996         if( rc ) {
18997                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18998                 return rc;
18999         }
19000
19001 #else
19002         DB_ENV env;
19003         memset( &env, '\0', sizeof(env) );
19004
19005         rc = db_appinit( NULL, NULL, &env, flags );
19006
19007         if( rc == 0 ) {
19008                 db_appexit( &env );
19009         }
19010
19011         unlink("__db_mpool.share");
19012         unlink("__db_lock.share");
19013 #endif
19014
19015         return rc;
19016 }
19017 EOF
19018 if { (eval echo configure:19019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19019 then
19020   ol_cv_berkeley_db_thread=yes
19021 else
19022   echo "configure: failed program was:" >&5
19023   cat conftest.$ac_ext >&5
19024   rm -fr conftest*
19025   ol_cv_berkeley_db_thread=no
19026 fi
19027 rm -fr conftest*
19028 fi
19029
19030
19031         LIBS="$ol_LIBS"
19032
19033 fi
19034
19035 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19036
19037         if test $ol_cv_berkeley_db_thread != no ; then
19038                 cat >> confdefs.h <<\EOF
19039 #define HAVE_BERKELEY_DB_THREAD 1
19040 EOF
19041
19042         fi
19043
19044         fi
19045 fi
19046
19047         fi
19048
19049         if test $ol_cv_berkeley_db != no ; then
19050                 cat >> confdefs.h <<\EOF
19051 #define HAVE_BERKELEY_DB 1
19052 EOF
19053
19054
19055                 ol_link_ldbm=berkeley
19056                 ol_with_ldbm_api=berkeley
19057
19058                 if test $ol_with_ldbm_type = hash ; then
19059                         cat >> confdefs.h <<\EOF
19060 #define LDBM_USE_DBHASH 1
19061 EOF
19062
19063                 else
19064                         cat >> confdefs.h <<\EOF
19065 #define LDBM_USE_DBBTREE 1
19066 EOF
19067
19068                 fi
19069
19070                                                 if test $ol_cv_lib_db != yes ; then
19071                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19072                 fi
19073         fi
19074 fi
19075
19076 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19077         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19078 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19079         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19080 echo "configure:19081: checking Berkeley DB version for BDB backend" >&5
19081 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19082   echo $ac_n "(cached) $ac_c" 1>&6
19083 else
19084   
19085         cat > conftest.$ac_ext <<EOF
19086 #line 19087 "configure"
19087 #include "confdefs.h"
19088
19089 #include <db.h>
19090
19091  /* this check could be improved */
19092 #ifndef DB_VERSION_MAJOR
19093 #       define DB_VERSION_MAJOR 1
19094 #endif
19095 #ifndef DB_VERSION_MINOR
19096 #       define DB_VERSION_MINOR 0
19097 #endif
19098
19099 /* require 4.1 or later */
19100 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19101         __db_version_compat
19102 #endif
19103         
19104 EOF
19105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19106   egrep "__db_version_compat" >/dev/null 2>&1; then
19107   rm -rf conftest*
19108   ol_cv_bdb_compat=yes
19109 else
19110   rm -rf conftest*
19111   ol_cv_bdb_compat=no
19112 fi
19113 rm -f conftest*
19114
19115 fi
19116
19117 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19118
19119
19120         if test $ol_cv_bdb_compat = yes ; then
19121                 ol_enable_bdb=yes
19122         elif test $ol_enable_bdb = yes ; then
19123                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19124         else
19125                 ol_enable_bdb=no
19126         fi
19127 fi
19128 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19129         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19130 fi
19131
19132 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19133         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19134         ol_with_ldbm_api=none
19135 fi
19136
19137 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19138         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19139 echo "configure:19140: checking for MDBM library" >&5
19140 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19141   echo $ac_n "(cached) $ac_c" 1>&6
19142 else
19143         ol_LIBS="$LIBS"
19144         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19145 echo "configure:19146: checking for mdbm_set_chain" >&5
19146 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19147   echo $ac_n "(cached) $ac_c" 1>&6
19148 else
19149   cat > conftest.$ac_ext <<EOF
19150 #line 19151 "configure"
19151 #include "confdefs.h"
19152 /* System header to define __stub macros and hopefully few prototypes,
19153     which can conflict with char mdbm_set_chain(); below.  */
19154 #include <assert.h>
19155 /* Override any gcc2 internal prototype to avoid an error.  */
19156 /* We use char because int might match the return type of a gcc2
19157     builtin and then its argument prototype would still apply.  */
19158 char mdbm_set_chain();
19159 char (*f)();
19160
19161 int main() {
19162
19163 /* The GNU C library defines this for functions which it implements
19164     to always fail with ENOSYS.  Some functions are actually named
19165     something starting with __ and the normal name is an alias.  */
19166 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19167 choke me
19168 #else
19169 f = mdbm_set_chain;
19170 #endif
19171
19172 ; return 0; }
19173 EOF
19174 if { (eval echo configure:19175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19175   rm -rf conftest*
19176   eval "ac_cv_func_mdbm_set_chain=yes"
19177 else
19178   echo "configure: failed program was:" >&5
19179   cat conftest.$ac_ext >&5
19180   rm -rf conftest*
19181   eval "ac_cv_func_mdbm_set_chain=no"
19182 fi
19183 rm -f conftest*
19184 fi
19185
19186 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19187   echo "$ac_t""yes" 1>&6
19188   ol_cv_lib_mdbm=yes
19189 else
19190   echo "$ac_t""no" 1>&6
19191
19192                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19193 echo "configure:19194: checking for mdbm_set_chain in -lmdbm" >&5
19194 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19196   echo $ac_n "(cached) $ac_c" 1>&6
19197 else
19198   ac_save_LIBS="$LIBS"
19199 LIBS="-lmdbm  $LIBS"
19200 cat > conftest.$ac_ext <<EOF
19201 #line 19202 "configure"
19202 #include "confdefs.h"
19203 /* Override any gcc2 internal prototype to avoid an error.  */
19204 /* We use char because int might match the return type of a gcc2
19205     builtin and then its argument prototype would still apply.  */
19206 char mdbm_set_chain();
19207
19208 int main() {
19209 mdbm_set_chain()
19210 ; return 0; }
19211 EOF
19212 if { (eval echo configure:19213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19213   rm -rf conftest*
19214   eval "ac_cv_lib_$ac_lib_var=yes"
19215 else
19216   echo "configure: failed program was:" >&5
19217   cat conftest.$ac_ext >&5
19218   rm -rf conftest*
19219   eval "ac_cv_lib_$ac_lib_var=no"
19220 fi
19221 rm -f conftest*
19222 LIBS="$ac_save_LIBS"
19223
19224 fi
19225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19226   echo "$ac_t""yes" 1>&6
19227   ol_cv_lib_mdbm=-lmdbm
19228 else
19229   echo "$ac_t""no" 1>&6
19230 ol_cv_lib_mdbm=no
19231 fi
19232
19233         
19234 fi
19235
19236         LIBS="$ol_LIBS"
19237
19238 fi
19239
19240 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19241
19242
19243  for ac_hdr in mdbm.h
19244 do
19245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19247 echo "configure:19248: checking for $ac_hdr" >&5
19248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19249   echo $ac_n "(cached) $ac_c" 1>&6
19250 else
19251   cat > conftest.$ac_ext <<EOF
19252 #line 19253 "configure"
19253 #include "confdefs.h"
19254 #include <$ac_hdr>
19255 EOF
19256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19257 { (eval echo configure:19258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19259 if test -z "$ac_err"; then
19260   rm -rf conftest*
19261   eval "ac_cv_header_$ac_safe=yes"
19262 else
19263   echo "$ac_err" >&5
19264   echo "configure: failed program was:" >&5
19265   cat conftest.$ac_ext >&5
19266   rm -rf conftest*
19267   eval "ac_cv_header_$ac_safe=no"
19268 fi
19269 rm -f conftest*
19270 fi
19271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19272   echo "$ac_t""yes" 1>&6
19273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19274   cat >> confdefs.h <<EOF
19275 #define $ac_tr_hdr 1
19276 EOF
19277  
19278 else
19279   echo "$ac_t""no" 1>&6
19280 fi
19281 done
19282
19283  echo $ac_n "checking for db""... $ac_c" 1>&6
19284 echo "configure:19285: checking for db" >&5
19285 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19286   echo $ac_n "(cached) $ac_c" 1>&6
19287 else
19288   
19289         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19290                 ol_cv_mdbm=no
19291         else
19292                 ol_cv_mdbm=yes
19293         fi
19294
19295 fi
19296
19297 echo "$ac_t""$ol_cv_mdbm" 1>&6
19298  if test $ol_cv_mdbm = yes ; then
19299         cat >> confdefs.h <<\EOF
19300 #define HAVE_MDBM 1
19301 EOF
19302
19303  fi
19304
19305
19306         if test $ol_cv_mdbm = yes ; then
19307                 ol_link_ldbm=mdbm
19308                 ol_with_ldbm_api=mdbm
19309                 if test $ol_cv_lib_mdbm != yes ; then
19310                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19311                 fi
19312         fi
19313 fi
19314
19315 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19316         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19317 echo "configure:19318: checking for GDBM library" >&5
19318 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19319   echo $ac_n "(cached) $ac_c" 1>&6
19320 else
19321         ol_LIBS="$LIBS"
19322         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19323 echo "configure:19324: checking for gdbm_open" >&5
19324 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19325   echo $ac_n "(cached) $ac_c" 1>&6
19326 else
19327   cat > conftest.$ac_ext <<EOF
19328 #line 19329 "configure"
19329 #include "confdefs.h"
19330 /* System header to define __stub macros and hopefully few prototypes,
19331     which can conflict with char gdbm_open(); below.  */
19332 #include <assert.h>
19333 /* Override any gcc2 internal prototype to avoid an error.  */
19334 /* We use char because int might match the return type of a gcc2
19335     builtin and then its argument prototype would still apply.  */
19336 char gdbm_open();
19337 char (*f)();
19338
19339 int main() {
19340
19341 /* The GNU C library defines this for functions which it implements
19342     to always fail with ENOSYS.  Some functions are actually named
19343     something starting with __ and the normal name is an alias.  */
19344 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19345 choke me
19346 #else
19347 f = gdbm_open;
19348 #endif
19349
19350 ; return 0; }
19351 EOF
19352 if { (eval echo configure:19353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19353   rm -rf conftest*
19354   eval "ac_cv_func_gdbm_open=yes"
19355 else
19356   echo "configure: failed program was:" >&5
19357   cat conftest.$ac_ext >&5
19358   rm -rf conftest*
19359   eval "ac_cv_func_gdbm_open=no"
19360 fi
19361 rm -f conftest*
19362 fi
19363
19364 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19365   echo "$ac_t""yes" 1>&6
19366   ol_cv_lib_gdbm=yes
19367 else
19368   echo "$ac_t""no" 1>&6
19369
19370                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19371 echo "configure:19372: checking for gdbm_open in -lgdbm" >&5
19372 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19374   echo $ac_n "(cached) $ac_c" 1>&6
19375 else
19376   ac_save_LIBS="$LIBS"
19377 LIBS="-lgdbm  $LIBS"
19378 cat > conftest.$ac_ext <<EOF
19379 #line 19380 "configure"
19380 #include "confdefs.h"
19381 /* Override any gcc2 internal prototype to avoid an error.  */
19382 /* We use char because int might match the return type of a gcc2
19383     builtin and then its argument prototype would still apply.  */
19384 char gdbm_open();
19385
19386 int main() {
19387 gdbm_open()
19388 ; return 0; }
19389 EOF
19390 if { (eval echo configure:19391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19391   rm -rf conftest*
19392   eval "ac_cv_lib_$ac_lib_var=yes"
19393 else
19394   echo "configure: failed program was:" >&5
19395   cat conftest.$ac_ext >&5
19396   rm -rf conftest*
19397   eval "ac_cv_lib_$ac_lib_var=no"
19398 fi
19399 rm -f conftest*
19400 LIBS="$ac_save_LIBS"
19401
19402 fi
19403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19404   echo "$ac_t""yes" 1>&6
19405   ol_cv_lib_gdbm=-lgdbm
19406 else
19407   echo "$ac_t""no" 1>&6
19408 ol_cv_lib_gdbm=no
19409 fi
19410
19411         
19412 fi
19413
19414         LIBS="$ol_LIBS"
19415
19416 fi
19417
19418 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19419
19420
19421  for ac_hdr in gdbm.h
19422 do
19423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19425 echo "configure:19426: checking for $ac_hdr" >&5
19426 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19427   echo $ac_n "(cached) $ac_c" 1>&6
19428 else
19429   cat > conftest.$ac_ext <<EOF
19430 #line 19431 "configure"
19431 #include "confdefs.h"
19432 #include <$ac_hdr>
19433 EOF
19434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19435 { (eval echo configure:19436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19437 if test -z "$ac_err"; then
19438   rm -rf conftest*
19439   eval "ac_cv_header_$ac_safe=yes"
19440 else
19441   echo "$ac_err" >&5
19442   echo "configure: failed program was:" >&5
19443   cat conftest.$ac_ext >&5
19444   rm -rf conftest*
19445   eval "ac_cv_header_$ac_safe=no"
19446 fi
19447 rm -f conftest*
19448 fi
19449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19450   echo "$ac_t""yes" 1>&6
19451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19452   cat >> confdefs.h <<EOF
19453 #define $ac_tr_hdr 1
19454 EOF
19455  
19456 else
19457   echo "$ac_t""no" 1>&6
19458 fi
19459 done
19460
19461  echo $ac_n "checking for db""... $ac_c" 1>&6
19462 echo "configure:19463: checking for db" >&5
19463 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19464   echo $ac_n "(cached) $ac_c" 1>&6
19465 else
19466   
19467         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19468                 ol_cv_gdbm=no
19469         else
19470                 ol_cv_gdbm=yes
19471         fi
19472
19473 fi
19474
19475 echo "$ac_t""$ol_cv_gdbm" 1>&6
19476  if test $ol_cv_gdbm = yes ; then
19477         cat >> confdefs.h <<\EOF
19478 #define HAVE_GDBM 1
19479 EOF
19480
19481  fi
19482
19483
19484         if test $ol_cv_gdbm = yes ; then
19485                 ol_link_ldbm=gdbm
19486                 ol_with_ldbm_api=gdbm
19487
19488                 if test $ol_cv_lib_gdbm != yes ; then
19489                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19490                 fi
19491         fi
19492 fi
19493
19494 if test $ol_with_ldbm_api = ndbm ; then
19495         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19496 echo "configure:19497: checking for NDBM library" >&5
19497 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19498   echo $ac_n "(cached) $ac_c" 1>&6
19499 else
19500         ol_LIBS="$LIBS"
19501         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19502 echo "configure:19503: checking for dbm_open" >&5
19503 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19504   echo $ac_n "(cached) $ac_c" 1>&6
19505 else
19506   cat > conftest.$ac_ext <<EOF
19507 #line 19508 "configure"
19508 #include "confdefs.h"
19509 /* System header to define __stub macros and hopefully few prototypes,
19510     which can conflict with char dbm_open(); below.  */
19511 #include <assert.h>
19512 /* Override any gcc2 internal prototype to avoid an error.  */
19513 /* We use char because int might match the return type of a gcc2
19514     builtin and then its argument prototype would still apply.  */
19515 char dbm_open();
19516 char (*f)();
19517
19518 int main() {
19519
19520 /* The GNU C library defines this for functions which it implements
19521     to always fail with ENOSYS.  Some functions are actually named
19522     something starting with __ and the normal name is an alias.  */
19523 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19524 choke me
19525 #else
19526 f = dbm_open;
19527 #endif
19528
19529 ; return 0; }
19530 EOF
19531 if { (eval echo configure:19532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19532   rm -rf conftest*
19533   eval "ac_cv_func_dbm_open=yes"
19534 else
19535   echo "configure: failed program was:" >&5
19536   cat conftest.$ac_ext >&5
19537   rm -rf conftest*
19538   eval "ac_cv_func_dbm_open=no"
19539 fi
19540 rm -f conftest*
19541 fi
19542
19543 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19544   echo "$ac_t""yes" 1>&6
19545   ol_cv_lib_ndbm=yes
19546 else
19547   echo "$ac_t""no" 1>&6
19548
19549                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19550 echo "configure:19551: checking for dbm_open in -lndbm" >&5
19551 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19552 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19553   echo $ac_n "(cached) $ac_c" 1>&6
19554 else
19555   ac_save_LIBS="$LIBS"
19556 LIBS="-lndbm  $LIBS"
19557 cat > conftest.$ac_ext <<EOF
19558 #line 19559 "configure"
19559 #include "confdefs.h"
19560 /* Override any gcc2 internal prototype to avoid an error.  */
19561 /* We use char because int might match the return type of a gcc2
19562     builtin and then its argument prototype would still apply.  */
19563 char dbm_open();
19564
19565 int main() {
19566 dbm_open()
19567 ; return 0; }
19568 EOF
19569 if { (eval echo configure:19570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19570   rm -rf conftest*
19571   eval "ac_cv_lib_$ac_lib_var=yes"
19572 else
19573   echo "configure: failed program was:" >&5
19574   cat conftest.$ac_ext >&5
19575   rm -rf conftest*
19576   eval "ac_cv_lib_$ac_lib_var=no"
19577 fi
19578 rm -f conftest*
19579 LIBS="$ac_save_LIBS"
19580
19581 fi
19582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19583   echo "$ac_t""yes" 1>&6
19584   ol_cv_lib_ndbm=-lndbm
19585 else
19586   echo "$ac_t""no" 1>&6
19587
19588                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19589 echo "configure:19590: checking for dbm_open in -ldbm" >&5
19590 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19591 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19592   echo $ac_n "(cached) $ac_c" 1>&6
19593 else
19594   ac_save_LIBS="$LIBS"
19595 LIBS="-ldbm  $LIBS"
19596 cat > conftest.$ac_ext <<EOF
19597 #line 19598 "configure"
19598 #include "confdefs.h"
19599 /* Override any gcc2 internal prototype to avoid an error.  */
19600 /* We use char because int might match the return type of a gcc2
19601     builtin and then its argument prototype would still apply.  */
19602 char dbm_open();
19603
19604 int main() {
19605 dbm_open()
19606 ; return 0; }
19607 EOF
19608 if { (eval echo configure:19609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19609   rm -rf conftest*
19610   eval "ac_cv_lib_$ac_lib_var=yes"
19611 else
19612   echo "configure: failed program was:" >&5
19613   cat conftest.$ac_ext >&5
19614   rm -rf conftest*
19615   eval "ac_cv_lib_$ac_lib_var=no"
19616 fi
19617 rm -f conftest*
19618 LIBS="$ac_save_LIBS"
19619
19620 fi
19621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19622   echo "$ac_t""yes" 1>&6
19623   ol_cv_lib_ndbm=-ldbm
19624 else
19625   echo "$ac_t""no" 1>&6
19626 ol_cv_lib_ndbm=no
19627 fi
19628                 
19629 fi
19630
19631         
19632 fi
19633
19634         LIBS="$ol_LIBS"
19635
19636 fi
19637
19638 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19639
19640
19641  for ac_hdr in ndbm.h
19642 do
19643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19644 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19645 echo "configure:19646: checking for $ac_hdr" >&5
19646 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19647   echo $ac_n "(cached) $ac_c" 1>&6
19648 else
19649   cat > conftest.$ac_ext <<EOF
19650 #line 19651 "configure"
19651 #include "confdefs.h"
19652 #include <$ac_hdr>
19653 EOF
19654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19655 { (eval echo configure:19656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19656 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19657 if test -z "$ac_err"; then
19658   rm -rf conftest*
19659   eval "ac_cv_header_$ac_safe=yes"
19660 else
19661   echo "$ac_err" >&5
19662   echo "configure: failed program was:" >&5
19663   cat conftest.$ac_ext >&5
19664   rm -rf conftest*
19665   eval "ac_cv_header_$ac_safe=no"
19666 fi
19667 rm -f conftest*
19668 fi
19669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19670   echo "$ac_t""yes" 1>&6
19671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19672   cat >> confdefs.h <<EOF
19673 #define $ac_tr_hdr 1
19674 EOF
19675  
19676 else
19677   echo "$ac_t""no" 1>&6
19678 fi
19679 done
19680
19681  echo $ac_n "checking for db""... $ac_c" 1>&6
19682 echo "configure:19683: checking for db" >&5
19683 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19684   echo $ac_n "(cached) $ac_c" 1>&6
19685 else
19686   
19687         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19688                 ol_cv_ndbm=no
19689         else
19690                 ol_cv_ndbm=yes
19691         fi
19692
19693 fi
19694
19695 echo "$ac_t""$ol_cv_ndbm" 1>&6
19696  if test $ol_cv_ndbm = yes ; then
19697         cat >> confdefs.h <<\EOF
19698 #define HAVE_NDBM 1
19699 EOF
19700
19701  fi
19702
19703
19704         if test $ol_cv_ndbm = yes ; then
19705                 ol_link_ldbm=ndbm
19706                 ol_with_ldbm_api=ndbm
19707
19708                 if test $ol_cv_lib_ndbm != yes ; then
19709                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19710                 fi
19711         fi
19712 fi
19713
19714 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19715         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19716         if test $ol_enable_ldbm = yes ; then
19717                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19718         fi
19719
19720         echo "configure: warning: disabling LDBM" 1>&2
19721         ol_enable_ldbm=no
19722 fi
19723
19724
19725 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19726         BUILD_LIBS_DYNAMIC=shared
19727         cat >> confdefs.h <<\EOF
19728 #define LDAP_LIBS_DYNAMIC 1
19729 EOF
19730
19731         LTSTATIC=""
19732 else
19733         BUILD_LIBS_DYNAMIC=static
19734         LTSTATIC="-static"
19735 fi
19736
19737 if test $ol_enable_wrappers != no ; then
19738         for ac_hdr in tcpd.h
19739 do
19740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19742 echo "configure:19743: checking for $ac_hdr" >&5
19743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19744   echo $ac_n "(cached) $ac_c" 1>&6
19745 else
19746   cat > conftest.$ac_ext <<EOF
19747 #line 19748 "configure"
19748 #include "confdefs.h"
19749 #include <$ac_hdr>
19750 EOF
19751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19752 { (eval echo configure:19753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19754 if test -z "$ac_err"; then
19755   rm -rf conftest*
19756   eval "ac_cv_header_$ac_safe=yes"
19757 else
19758   echo "$ac_err" >&5
19759   echo "configure: failed program was:" >&5
19760   cat conftest.$ac_ext >&5
19761   rm -rf conftest*
19762   eval "ac_cv_header_$ac_safe=no"
19763 fi
19764 rm -f conftest*
19765 fi
19766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19767   echo "$ac_t""yes" 1>&6
19768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19769   cat >> confdefs.h <<EOF
19770 #define $ac_tr_hdr 1
19771 EOF
19772  
19773                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19774 echo "configure:19775: checking for TCP wrappers library" >&5
19775                 save_LIBS="$LIBS"
19776                 LIBS="$LIBS -lwrap"
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" 1>&6
19796                 have_wrappers=yes
19797                 LIBS="$save_LIBS"
19798 else
19799   echo "configure: failed program was:" >&5
19800   cat conftest.$ac_ext >&5
19801   rm -rf conftest*
19802   
19803                                 LIBS="$LIBS -lnsl"
19804                 cat > conftest.$ac_ext <<EOF
19805 #line 19806 "configure"
19806 #include "confdefs.h"
19807
19808 #include <tcpd.h>
19809 int allow_severity = 0;
19810 int deny_severity  = 0;
19811
19812 struct request_info *req;
19813                 
19814 int main() {
19815
19816 hosts_access(req)
19817                 
19818 ; return 0; }
19819 EOF
19820 if { (eval echo configure:19821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19821   rm -rf conftest*
19822   echo "$ac_t""-lwrap -lnsl" 1>&6
19823                 have_wrappers=yes
19824                 LIBS="$save_LIBS -lnsl"
19825 else
19826   echo "configure: failed program was:" >&5
19827   cat conftest.$ac_ext >&5
19828   rm -rf conftest*
19829   
19830                 echo "$ac_t""no" 1>&6
19831                 have_wrappers=no
19832                 LIBS=$save_LIBS
19833 fi
19834 rm -f conftest*
19835 fi
19836 rm -f conftest*
19837 else
19838   echo "$ac_t""no" 1>&6
19839 have_wrappers=no
19840 fi
19841 done
19842
19843
19844         if test $have_wrappers = yes ; then
19845                 cat >> confdefs.h <<\EOF
19846 #define HAVE_TCPD 1
19847 EOF
19848
19849                 WRAP_LIBS="-lwrap"
19850         elif test $ol_enable_wrappers = yes ; then
19851                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19852         else
19853                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19854                 WRAP_LIBS=""
19855         fi
19856 fi
19857
19858 if test $ol_enable_syslog != no ; then
19859         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19860 echo "configure:19861: checking for openlog" >&5
19861 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19862   echo $ac_n "(cached) $ac_c" 1>&6
19863 else
19864   cat > conftest.$ac_ext <<EOF
19865 #line 19866 "configure"
19866 #include "confdefs.h"
19867 /* System header to define __stub macros and hopefully few prototypes,
19868     which can conflict with char openlog(); below.  */
19869 #include <assert.h>
19870 /* Override any gcc2 internal prototype to avoid an error.  */
19871 /* We use char because int might match the return type of a gcc2
19872     builtin and then its argument prototype would still apply.  */
19873 char openlog();
19874 char (*f)();
19875
19876 int main() {
19877
19878 /* The GNU C library defines this for functions which it implements
19879     to always fail with ENOSYS.  Some functions are actually named
19880     something starting with __ and the normal name is an alias.  */
19881 #if defined (__stub_openlog) || defined (__stub___openlog)
19882 choke me
19883 #else
19884 f = openlog;
19885 #endif
19886
19887 ; return 0; }
19888 EOF
19889 if { (eval echo configure:19890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19890   rm -rf conftest*
19891   eval "ac_cv_func_openlog=yes"
19892 else
19893   echo "configure: failed program was:" >&5
19894   cat conftest.$ac_ext >&5
19895   rm -rf conftest*
19896   eval "ac_cv_func_openlog=no"
19897 fi
19898 rm -f conftest*
19899 fi
19900
19901 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19902   echo "$ac_t""yes" 1>&6
19903   :
19904 else
19905   echo "$ac_t""no" 1>&6
19906 fi
19907
19908         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19909                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19910         fi
19911         ol_enable_syslog=$ac_cv_func_openlog
19912 fi
19913
19914
19915 ol_link_sql=no
19916 if test $ol_enable_sql != no ; then
19917         for ac_hdr in sql.h sqlext.h
19918 do
19919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19921 echo "configure:19922: checking for $ac_hdr" >&5
19922 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19923   echo $ac_n "(cached) $ac_c" 1>&6
19924 else
19925   cat > conftest.$ac_ext <<EOF
19926 #line 19927 "configure"
19927 #include "confdefs.h"
19928 #include <$ac_hdr>
19929 EOF
19930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19931 { (eval echo configure:19932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19933 if test -z "$ac_err"; then
19934   rm -rf conftest*
19935   eval "ac_cv_header_$ac_safe=yes"
19936 else
19937   echo "$ac_err" >&5
19938   echo "configure: failed program was:" >&5
19939   cat conftest.$ac_ext >&5
19940   rm -rf conftest*
19941   eval "ac_cv_header_$ac_safe=no"
19942 fi
19943 rm -f conftest*
19944 fi
19945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19946   echo "$ac_t""yes" 1>&6
19947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19948   cat >> confdefs.h <<EOF
19949 #define $ac_tr_hdr 1
19950 EOF
19951  
19952 else
19953   echo "$ac_t""no" 1>&6
19954 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19955         
19956 fi
19957 done
19958
19959
19960         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19961 echo "configure:19962: checking for SQLDriverConnect in -liodbc" >&5
19962 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19964   echo $ac_n "(cached) $ac_c" 1>&6
19965 else
19966   ac_save_LIBS="$LIBS"
19967 LIBS="-liodbc  $LIBS"
19968 cat > conftest.$ac_ext <<EOF
19969 #line 19970 "configure"
19970 #include "confdefs.h"
19971 /* Override any gcc2 internal prototype to avoid an error.  */
19972 /* We use char because int might match the return type of a gcc2
19973     builtin and then its argument prototype would still apply.  */
19974 char SQLDriverConnect();
19975
19976 int main() {
19977 SQLDriverConnect()
19978 ; return 0; }
19979 EOF
19980 if { (eval echo configure:19981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19981   rm -rf conftest*
19982   eval "ac_cv_lib_$ac_lib_var=yes"
19983 else
19984   echo "configure: failed program was:" >&5
19985   cat conftest.$ac_ext >&5
19986   rm -rf conftest*
19987   eval "ac_cv_lib_$ac_lib_var=no"
19988 fi
19989 rm -f conftest*
19990 LIBS="$ac_save_LIBS"
19991
19992 fi
19993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19994   echo "$ac_t""yes" 1>&6
19995   have_iodbc=yes
19996 else
19997   echo "$ac_t""no" 1>&6
19998 have_iodbc=no
19999 fi
20000
20001         if test $have_iodbc = yes ; then
20002                 ol_link_sql="-liodbc"
20003         else
20004                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20005 echo "configure:20006: checking for SQLDriverConnect in -lodbc" >&5
20006 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20008   echo $ac_n "(cached) $ac_c" 1>&6
20009 else
20010   ac_save_LIBS="$LIBS"
20011 LIBS="-lodbc  $LIBS"
20012 cat > conftest.$ac_ext <<EOF
20013 #line 20014 "configure"
20014 #include "confdefs.h"
20015 /* Override any gcc2 internal prototype to avoid an error.  */
20016 /* We use char because int might match the return type of a gcc2
20017     builtin and then its argument prototype would still apply.  */
20018 char SQLDriverConnect();
20019
20020 int main() {
20021 SQLDriverConnect()
20022 ; return 0; }
20023 EOF
20024 if { (eval echo configure:20025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20025   rm -rf conftest*
20026   eval "ac_cv_lib_$ac_lib_var=yes"
20027 else
20028   echo "configure: failed program was:" >&5
20029   cat conftest.$ac_ext >&5
20030   rm -rf conftest*
20031   eval "ac_cv_lib_$ac_lib_var=no"
20032 fi
20033 rm -f conftest*
20034 LIBS="$ac_save_LIBS"
20035
20036 fi
20037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20038   echo "$ac_t""yes" 1>&6
20039   have_odbc=yes
20040 else
20041   echo "$ac_t""no" 1>&6
20042 have_odbc=no
20043 fi
20044
20045                 if test $have_odbc = yes ; then
20046                         ol_link_sql="-lodbc"
20047                 fi
20048         fi
20049
20050         if test $ol_link_sql != no ; then
20051                 SLAPD_SQL_LIBS="$ol_link_sql"
20052
20053         elif test $ol_enable_sql != auto ; then
20054                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20055         fi
20056 fi
20057
20058 ol_link_termcap=no
20059 for ac_hdr in termcap.h ncurses.h
20060 do
20061 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20062 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20063 echo "configure:20064: checking for $ac_hdr" >&5
20064 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20065   echo $ac_n "(cached) $ac_c" 1>&6
20066 else
20067   cat > conftest.$ac_ext <<EOF
20068 #line 20069 "configure"
20069 #include "confdefs.h"
20070 #include <$ac_hdr>
20071 EOF
20072 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20073 { (eval echo configure:20074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20074 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20075 if test -z "$ac_err"; then
20076   rm -rf conftest*
20077   eval "ac_cv_header_$ac_safe=yes"
20078 else
20079   echo "$ac_err" >&5
20080   echo "configure: failed program was:" >&5
20081   cat conftest.$ac_ext >&5
20082   rm -rf conftest*
20083   eval "ac_cv_header_$ac_safe=no"
20084 fi
20085 rm -f conftest*
20086 fi
20087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20088   echo "$ac_t""yes" 1>&6
20089     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20090   cat >> confdefs.h <<EOF
20091 #define $ac_tr_hdr 1
20092 EOF
20093  
20094 else
20095   echo "$ac_t""no" 1>&6
20096 fi
20097 done
20098
20099
20100 if test $ol_link_termcap = no ; then
20101         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20102 echo "configure:20103: checking for tputs in -ltermcap" >&5
20103 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20105   echo $ac_n "(cached) $ac_c" 1>&6
20106 else
20107   ac_save_LIBS="$LIBS"
20108 LIBS="-ltermcap  $LIBS"
20109 cat > conftest.$ac_ext <<EOF
20110 #line 20111 "configure"
20111 #include "confdefs.h"
20112 /* Override any gcc2 internal prototype to avoid an error.  */
20113 /* We use char because int might match the return type of a gcc2
20114     builtin and then its argument prototype would still apply.  */
20115 char tputs();
20116
20117 int main() {
20118 tputs()
20119 ; return 0; }
20120 EOF
20121 if { (eval echo configure:20122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20122   rm -rf conftest*
20123   eval "ac_cv_lib_$ac_lib_var=yes"
20124 else
20125   echo "configure: failed program was:" >&5
20126   cat conftest.$ac_ext >&5
20127   rm -rf conftest*
20128   eval "ac_cv_lib_$ac_lib_var=no"
20129 fi
20130 rm -f conftest*
20131 LIBS="$ac_save_LIBS"
20132
20133 fi
20134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20135   echo "$ac_t""yes" 1>&6
20136   have_termcap=yes
20137 else
20138   echo "$ac_t""no" 1>&6
20139 have_termcap=no
20140 fi
20141
20142         if test $have_termcap = yes ; then
20143                 cat >> confdefs.h <<\EOF
20144 #define HAVE_TERMCAP 1
20145 EOF
20146
20147                 ol_link_termcap=yes
20148                 TERMCAP_LIBS=-ltermcap
20149         fi
20150 fi
20151
20152 if test $ol_link_termcap = no ; then
20153         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20154 echo "configure:20155: checking for initscr in -lncurses" >&5
20155 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20157   echo $ac_n "(cached) $ac_c" 1>&6
20158 else
20159   ac_save_LIBS="$LIBS"
20160 LIBS="-lncurses  $LIBS"
20161 cat > conftest.$ac_ext <<EOF
20162 #line 20163 "configure"
20163 #include "confdefs.h"
20164 /* Override any gcc2 internal prototype to avoid an error.  */
20165 /* We use char because int might match the return type of a gcc2
20166     builtin and then its argument prototype would still apply.  */
20167 char initscr();
20168
20169 int main() {
20170 initscr()
20171 ; return 0; }
20172 EOF
20173 if { (eval echo configure:20174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20174   rm -rf conftest*
20175   eval "ac_cv_lib_$ac_lib_var=yes"
20176 else
20177   echo "configure: failed program was:" >&5
20178   cat conftest.$ac_ext >&5
20179   rm -rf conftest*
20180   eval "ac_cv_lib_$ac_lib_var=no"
20181 fi
20182 rm -f conftest*
20183 LIBS="$ac_save_LIBS"
20184
20185 fi
20186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20187   echo "$ac_t""yes" 1>&6
20188   have_ncurses=yes
20189 else
20190   echo "$ac_t""no" 1>&6
20191 have_ncurses=no
20192 fi
20193
20194         if test $have_ncurses = yes ; then
20195                 cat >> confdefs.h <<\EOF
20196 #define HAVE_NCURSES 1
20197 EOF
20198
20199                 ol_link_termcap=yes
20200                 TERMCAP_LIBS=-lncurses
20201         fi
20202 fi
20203
20204 if test $ol_link_termcap = no ; then
20205         cat >> confdefs.h <<\EOF
20206 #define NO_TERMCAP 1
20207 EOF
20208
20209         TERMCAP_LIBS=
20210 fi
20211
20212 ol_link_sasl=no
20213 ol_link_spasswd=no
20214 if test $ol_with_cyrus_sasl != no ; then
20215         for ac_hdr in sasl/sasl.h sasl.h
20216 do
20217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20219 echo "configure:20220: checking for $ac_hdr" >&5
20220 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20221   echo $ac_n "(cached) $ac_c" 1>&6
20222 else
20223   cat > conftest.$ac_ext <<EOF
20224 #line 20225 "configure"
20225 #include "confdefs.h"
20226 #include <$ac_hdr>
20227 EOF
20228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20229 { (eval echo configure:20230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20231 if test -z "$ac_err"; then
20232   rm -rf conftest*
20233   eval "ac_cv_header_$ac_safe=yes"
20234 else
20235   echo "$ac_err" >&5
20236   echo "configure: failed program was:" >&5
20237   cat conftest.$ac_ext >&5
20238   rm -rf conftest*
20239   eval "ac_cv_header_$ac_safe=no"
20240 fi
20241 rm -f conftest*
20242 fi
20243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20244   echo "$ac_t""yes" 1>&6
20245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20246   cat >> confdefs.h <<EOF
20247 #define $ac_tr_hdr 1
20248 EOF
20249  
20250 else
20251   echo "$ac_t""no" 1>&6
20252 fi
20253 done
20254
20255
20256         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20257                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20258 echo "configure:20259: checking for sasl_client_init in -lsasl2" >&5
20259 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20261   echo $ac_n "(cached) $ac_c" 1>&6
20262 else
20263   ac_save_LIBS="$LIBS"
20264 LIBS="-lsasl2  $LIBS"
20265 cat > conftest.$ac_ext <<EOF
20266 #line 20267 "configure"
20267 #include "confdefs.h"
20268 /* Override any gcc2 internal prototype to avoid an error.  */
20269 /* We use char because int might match the return type of a gcc2
20270     builtin and then its argument prototype would still apply.  */
20271 char sasl_client_init();
20272
20273 int main() {
20274 sasl_client_init()
20275 ; return 0; }
20276 EOF
20277 if { (eval echo configure:20278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20278   rm -rf conftest*
20279   eval "ac_cv_lib_$ac_lib_var=yes"
20280 else
20281   echo "configure: failed program was:" >&5
20282   cat conftest.$ac_ext >&5
20283   rm -rf conftest*
20284   eval "ac_cv_lib_$ac_lib_var=no"
20285 fi
20286 rm -f conftest*
20287 LIBS="$ac_save_LIBS"
20288
20289 fi
20290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20291   echo "$ac_t""yes" 1>&6
20292   ol_link_sasl="-lsasl2"
20293 else
20294   echo "$ac_t""no" 1>&6
20295 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20296 echo "configure:20297: checking for sasl_client_init in -lsasl" >&5
20297 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20299   echo $ac_n "(cached) $ac_c" 1>&6
20300 else
20301   ac_save_LIBS="$LIBS"
20302 LIBS="-lsasl  $LIBS"
20303 cat > conftest.$ac_ext <<EOF
20304 #line 20305 "configure"
20305 #include "confdefs.h"
20306 /* Override any gcc2 internal prototype to avoid an error.  */
20307 /* We use char because int might match the return type of a gcc2
20308     builtin and then its argument prototype would still apply.  */
20309 char sasl_client_init();
20310
20311 int main() {
20312 sasl_client_init()
20313 ; return 0; }
20314 EOF
20315 if { (eval echo configure:20316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20316   rm -rf conftest*
20317   eval "ac_cv_lib_$ac_lib_var=yes"
20318 else
20319   echo "configure: failed program was:" >&5
20320   cat conftest.$ac_ext >&5
20321   rm -rf conftest*
20322   eval "ac_cv_lib_$ac_lib_var=no"
20323 fi
20324 rm -f conftest*
20325 LIBS="$ac_save_LIBS"
20326
20327 fi
20328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20329   echo "$ac_t""yes" 1>&6
20330   ol_link_sasl="-lsasl"
20331 else
20332   echo "$ac_t""no" 1>&6
20333 fi
20334
20335 fi
20336
20337         fi
20338
20339         if test $ol_link_sasl = no ; then
20340                 if test $ol_with_cyrus_sasl != auto ; then
20341                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20342                 else
20343                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20344                         echo "configure: warning: SASL authentication not supported!" 1>&2
20345                         if test $ol_link_tls = no ; then
20346                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20347                         fi
20348                 fi
20349         else
20350                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20351 echo "configure:20352: checking Cyrus SASL library version" >&5
20352 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20353   echo $ac_n "(cached) $ac_c" 1>&6
20354 else
20355   
20356         cat > conftest.$ac_ext <<EOF
20357 #line 20358 "configure"
20358 #include "confdefs.h"
20359
20360 #ifdef HAVE_SASL_SASL_H
20361 #include <sasl/sasl.h>
20362 #else
20363 #include <sasl.h>
20364 #endif
20365
20366 /* require 2.1.3 or later */
20367 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20368         char *__sasl_compat = "2.2+ or better okay (we guess)";
20369 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20370         && SASL_VERSION_STEP >=3
20371         char *__sasl_compat = "2.1.3+ or better okay";
20372 #endif
20373         
20374 EOF
20375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20376   egrep "__sasl_compat" >/dev/null 2>&1; then
20377   rm -rf conftest*
20378   ol_cv_sasl_compat=yes
20379 else
20380   rm -rf conftest*
20381   ol_cv_sasl_compat=no
20382 fi
20383 rm -f conftest*
20384
20385 fi
20386
20387 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20388
20389                 if test $ol_cv_sasl_compat = no ; then
20390                         ol_link_sasl=no
20391                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20392                 fi
20393
20394                 cat >> confdefs.h <<\EOF
20395 #define HAVE_CYRUS_SASL 1
20396 EOF
20397
20398                 SASL_LIBS="$ol_link_sasl"
20399                 if test $ol_enable_spasswd != no ; then
20400                         ol_link_spasswd=yes
20401                 fi
20402
20403                 ac_save_LIBS="$LIBS"
20404                 LIBS="$LIBS $ol_link_sasl"
20405                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20406 echo "configure:20407: checking for sasl_version" >&5
20407 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20408   echo $ac_n "(cached) $ac_c" 1>&6
20409 else
20410   cat > conftest.$ac_ext <<EOF
20411 #line 20412 "configure"
20412 #include "confdefs.h"
20413 /* System header to define __stub macros and hopefully few prototypes,
20414     which can conflict with char sasl_version(); below.  */
20415 #include <assert.h>
20416 /* Override any gcc2 internal prototype to avoid an error.  */
20417 /* We use char because int might match the return type of a gcc2
20418     builtin and then its argument prototype would still apply.  */
20419 char sasl_version();
20420 char (*f)();
20421
20422 int main() {
20423
20424 /* The GNU C library defines this for functions which it implements
20425     to always fail with ENOSYS.  Some functions are actually named
20426     something starting with __ and the normal name is an alias.  */
20427 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20428 choke me
20429 #else
20430 f = sasl_version;
20431 #endif
20432
20433 ; return 0; }
20434 EOF
20435 if { (eval echo configure:20436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20436   rm -rf conftest*
20437   eval "ac_cv_func_sasl_version=yes"
20438 else
20439   echo "configure: failed program was:" >&5
20440   cat conftest.$ac_ext >&5
20441   rm -rf conftest*
20442   eval "ac_cv_func_sasl_version=no"
20443 fi
20444 rm -f conftest*
20445 fi
20446
20447 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20448   echo "$ac_t""yes" 1>&6
20449   cat >> confdefs.h <<\EOF
20450 #define HAVE_SASL_VERSION 1
20451 EOF
20452
20453 else
20454   echo "$ac_t""no" 1>&6
20455 fi
20456
20457                 LIBS="$ac_save_LIBS"
20458         fi
20459
20460 else
20461         echo "configure: warning: SASL authentication not supported!" 1>&2
20462         if test $ol_link_tls = no ; then
20463                 echo "configure: warning: Strong authentication not supported!" 1>&2
20464         fi
20465 fi
20466
20467 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20468         dev=no
20469         if test -r /dev/urandom ; then
20470                 dev="/dev/urandom";
20471         elif test -r /idev/urandom ; then
20472                 dev="/idev/urandom";
20473         elif test -r /dev/srandom ; then
20474                 dev="/dev/srandom";
20475         elif test -r /dev/random ; then
20476                 dev="/dev/random";
20477         elif test -r /idev/random ; then
20478                 dev="/idev/random";
20479         fi
20480
20481         if test $dev != no ; then
20482                 cat >> confdefs.h <<EOF
20483 #define URANDOM_DEVICE "$dev"
20484 EOF
20485
20486         fi
20487 fi
20488
20489 ol_link_fetch=no
20490 if test $ol_with_fetch != no ; then
20491         ol_LIBS=$LIBS
20492 LIBS="-lfetch -lcom_err $LIBS"
20493 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20494 echo "configure:20495: checking fetch(3) library" >&5
20495 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20496   echo $ac_n "(cached) $ac_c" 1>&6
20497 else
20498   
20499         cat > conftest.$ac_ext <<EOF
20500 #line 20501 "configure"
20501 #include "confdefs.h"
20502
20503 #include <sys/param.h>
20504 #include <stdio.h>
20505 #include <fetch.h>
20506 int main() {
20507 struct url *u = fetchParseURL("file:///"); 
20508 ; return 0; }
20509 EOF
20510 if { (eval echo configure:20511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20511   rm -rf conftest*
20512   ol_cv_lib_fetch=yes
20513 else
20514   echo "configure: failed program was:" >&5
20515   cat conftest.$ac_ext >&5
20516   rm -rf conftest*
20517   ol_cv_lib_fetch=no
20518 fi
20519 rm -f conftest*
20520 fi
20521
20522 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20523 LIBS=$ol_LIBS
20524 if test $ol_cv_lib_fetch != no ; then
20525         ol_link_fetch="-lfetch -lcom_err"
20526         cat >> confdefs.h <<\EOF
20527 #define HAVE_FETCH 1
20528 EOF
20529
20530 fi
20531
20532
20533         if test $ol_cv_lib_fetch != no ; then
20534                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20535                 ol_link_fetch=freebsd
20536
20537         elif test $ol_with_fetch != auto ; then
20538                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20539         fi 
20540 fi
20541
20542 if test $ol_enable_crypt != no ; then
20543         save_LIBS="$LIBS"
20544         LIBS="$TLS_LIBS $LIBS"
20545
20546         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20547 echo "configure:20548: checking for crypt" >&5
20548 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20549   echo $ac_n "(cached) $ac_c" 1>&6
20550 else
20551   cat > conftest.$ac_ext <<EOF
20552 #line 20553 "configure"
20553 #include "confdefs.h"
20554 /* System header to define __stub macros and hopefully few prototypes,
20555     which can conflict with char crypt(); below.  */
20556 #include <assert.h>
20557 /* Override any gcc2 internal prototype to avoid an error.  */
20558 /* We use char because int might match the return type of a gcc2
20559     builtin and then its argument prototype would still apply.  */
20560 char crypt();
20561 char (*f)();
20562
20563 int main() {
20564
20565 /* The GNU C library defines this for functions which it implements
20566     to always fail with ENOSYS.  Some functions are actually named
20567     something starting with __ and the normal name is an alias.  */
20568 #if defined (__stub_crypt) || defined (__stub___crypt)
20569 choke me
20570 #else
20571 f = crypt;
20572 #endif
20573
20574 ; return 0; }
20575 EOF
20576 if { (eval echo configure:20577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20577   rm -rf conftest*
20578   eval "ac_cv_func_crypt=yes"
20579 else
20580   echo "configure: failed program was:" >&5
20581   cat conftest.$ac_ext >&5
20582   rm -rf conftest*
20583   eval "ac_cv_func_crypt=no"
20584 fi
20585 rm -f conftest*
20586 fi
20587
20588 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20589   echo "$ac_t""yes" 1>&6
20590   have_crypt=yes
20591 else
20592   echo "$ac_t""no" 1>&6
20593
20594                 LIBS="$save_LIBS"
20595                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20596 echo "configure:20597: checking for crypt in -lcrypt" >&5
20597 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20598 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20599   echo $ac_n "(cached) $ac_c" 1>&6
20600 else
20601   ac_save_LIBS="$LIBS"
20602 LIBS="-lcrypt  $LIBS"
20603 cat > conftest.$ac_ext <<EOF
20604 #line 20605 "configure"
20605 #include "confdefs.h"
20606 /* Override any gcc2 internal prototype to avoid an error.  */
20607 /* We use char because int might match the return type of a gcc2
20608     builtin and then its argument prototype would still apply.  */
20609 char crypt();
20610
20611 int main() {
20612 crypt()
20613 ; return 0; }
20614 EOF
20615 if { (eval echo configure:20616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20616   rm -rf conftest*
20617   eval "ac_cv_lib_$ac_lib_var=yes"
20618 else
20619   echo "configure: failed program was:" >&5
20620   cat conftest.$ac_ext >&5
20621   rm -rf conftest*
20622   eval "ac_cv_lib_$ac_lib_var=no"
20623 fi
20624 rm -f conftest*
20625 LIBS="$ac_save_LIBS"
20626
20627 fi
20628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20629   echo "$ac_t""yes" 1>&6
20630   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20631                         have_crypt=yes
20632 else
20633   echo "$ac_t""no" 1>&6
20634 have_crypt=no
20635 fi
20636
20637 fi
20638
20639
20640         LIBS="$save_LIBS"
20641
20642         if test $have_crypt = yes ; then
20643                 cat >> confdefs.h <<\EOF
20644 #define HAVE_CRYPT 1
20645 EOF
20646
20647         else
20648                 echo "configure: warning: could not find crypt" 1>&2
20649                 if test $ol_enable_crypt = yes ; then
20650                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20651                 fi
20652
20653                 echo "configure: warning: disabling crypt support" 1>&2
20654                 ol_enable_crypt=no
20655         fi
20656 fi
20657
20658 if test $ol_enable_proctitle != no ; then
20659         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20660 echo "configure:20661: checking for setproctitle" >&5
20661 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20662   echo $ac_n "(cached) $ac_c" 1>&6
20663 else
20664   cat > conftest.$ac_ext <<EOF
20665 #line 20666 "configure"
20666 #include "confdefs.h"
20667 /* System header to define __stub macros and hopefully few prototypes,
20668     which can conflict with char setproctitle(); below.  */
20669 #include <assert.h>
20670 /* Override any gcc2 internal prototype to avoid an error.  */
20671 /* We use char because int might match the return type of a gcc2
20672     builtin and then its argument prototype would still apply.  */
20673 char setproctitle();
20674 char (*f)();
20675
20676 int main() {
20677
20678 /* The GNU C library defines this for functions which it implements
20679     to always fail with ENOSYS.  Some functions are actually named
20680     something starting with __ and the normal name is an alias.  */
20681 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20682 choke me
20683 #else
20684 f = setproctitle;
20685 #endif
20686
20687 ; return 0; }
20688 EOF
20689 if { (eval echo configure:20690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20690   rm -rf conftest*
20691   eval "ac_cv_func_setproctitle=yes"
20692 else
20693   echo "configure: failed program was:" >&5
20694   cat conftest.$ac_ext >&5
20695   rm -rf conftest*
20696   eval "ac_cv_func_setproctitle=no"
20697 fi
20698 rm -f conftest*
20699 fi
20700
20701 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20702   echo "$ac_t""yes" 1>&6
20703   have_setproctitle=yes
20704 else
20705   echo "$ac_t""no" 1>&6
20706
20707                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20708 echo "configure:20709: checking for setproctitle in -lutil" >&5
20709 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20710 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20711   echo $ac_n "(cached) $ac_c" 1>&6
20712 else
20713   ac_save_LIBS="$LIBS"
20714 LIBS="-lutil  $LIBS"
20715 cat > conftest.$ac_ext <<EOF
20716 #line 20717 "configure"
20717 #include "confdefs.h"
20718 /* Override any gcc2 internal prototype to avoid an error.  */
20719 /* We use char because int might match the return type of a gcc2
20720     builtin and then its argument prototype would still apply.  */
20721 char setproctitle();
20722
20723 int main() {
20724 setproctitle()
20725 ; return 0; }
20726 EOF
20727 if { (eval echo configure:20728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20728   rm -rf conftest*
20729   eval "ac_cv_lib_$ac_lib_var=yes"
20730 else
20731   echo "configure: failed program was:" >&5
20732   cat conftest.$ac_ext >&5
20733   rm -rf conftest*
20734   eval "ac_cv_lib_$ac_lib_var=no"
20735 fi
20736 rm -f conftest*
20737 LIBS="$ac_save_LIBS"
20738
20739 fi
20740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20741   echo "$ac_t""yes" 1>&6
20742   have_setproctitle=yes
20743                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20744 else
20745   echo "$ac_t""no" 1>&6
20746 have_setproctitle=no
20747                         LIBOBJS="$LIBOBJS setproctitle.o"
20748                         LIBSRCS="$LIBSRCS setproctitle.c"
20749 fi
20750
20751 fi
20752
20753
20754         if test $have_setproctitle = yes ; then
20755                 cat >> confdefs.h <<\EOF
20756 #define HAVE_SETPROCTITLE 1
20757 EOF
20758
20759         fi
20760 fi
20761
20762 if test $ol_enable_slp != no ; then
20763         for ac_hdr in slp.h 
20764 do
20765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20767 echo "configure:20768: checking for $ac_hdr" >&5
20768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20769   echo $ac_n "(cached) $ac_c" 1>&6
20770 else
20771   cat > conftest.$ac_ext <<EOF
20772 #line 20773 "configure"
20773 #include "confdefs.h"
20774 #include <$ac_hdr>
20775 EOF
20776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20777 { (eval echo configure:20778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20779 if test -z "$ac_err"; then
20780   rm -rf conftest*
20781   eval "ac_cv_header_$ac_safe=yes"
20782 else
20783   echo "$ac_err" >&5
20784   echo "configure: failed program was:" >&5
20785   cat conftest.$ac_ext >&5
20786   rm -rf conftest*
20787   eval "ac_cv_header_$ac_safe=no"
20788 fi
20789 rm -f conftest*
20790 fi
20791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20792   echo "$ac_t""yes" 1>&6
20793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20794   cat >> confdefs.h <<EOF
20795 #define $ac_tr_hdr 1
20796 EOF
20797  
20798 else
20799   echo "$ac_t""no" 1>&6
20800 fi
20801 done
20802
20803
20804         if test $ac_cv_header_slp_h = yes ; then
20805                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20806 echo "configure:20807: checking for SLPOpen in -lslp" >&5
20807 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20809   echo $ac_n "(cached) $ac_c" 1>&6
20810 else
20811   ac_save_LIBS="$LIBS"
20812 LIBS="-lslp  $LIBS"
20813 cat > conftest.$ac_ext <<EOF
20814 #line 20815 "configure"
20815 #include "confdefs.h"
20816 /* Override any gcc2 internal prototype to avoid an error.  */
20817 /* We use char because int might match the return type of a gcc2
20818     builtin and then its argument prototype would still apply.  */
20819 char SLPOpen();
20820
20821 int main() {
20822 SLPOpen()
20823 ; return 0; }
20824 EOF
20825 if { (eval echo configure:20826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20826   rm -rf conftest*
20827   eval "ac_cv_lib_$ac_lib_var=yes"
20828 else
20829   echo "configure: failed program was:" >&5
20830   cat conftest.$ac_ext >&5
20831   rm -rf conftest*
20832   eval "ac_cv_lib_$ac_lib_var=no"
20833 fi
20834 rm -f conftest*
20835 LIBS="$ac_save_LIBS"
20836
20837 fi
20838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20839   echo "$ac_t""yes" 1>&6
20840   have_slp=yes
20841 else
20842   echo "$ac_t""no" 1>&6
20843 have_slp=no
20844 fi
20845
20846                 if test $have_slp = yes ; then
20847                         cat >> confdefs.h <<\EOF
20848 #define HAVE_SLP 1
20849 EOF
20850
20851                         SLAPD_SLP_LIBS=-lslp
20852                 fi
20853
20854         elif test $ol_enable_slp = yes ; then
20855                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20856         fi
20857 fi
20858
20859
20860 echo $ac_n "checking long long""... $ac_c" 1>&6
20861 echo "configure:20862: checking long long" >&5
20862 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20863   echo $ac_n "(cached) $ac_c" 1>&6
20864 else
20865   
20866         cat > conftest.$ac_ext <<EOF
20867 #line 20868 "configure"
20868 #include "confdefs.h"
20869
20870 int main() {
20871 long long x;
20872 ; return 0; }
20873 EOF
20874 if { (eval echo configure:20875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20875   rm -rf conftest*
20876   ol_cv_type_long_long=yes
20877 else
20878   echo "configure: failed program was:" >&5
20879   cat conftest.$ac_ext >&5
20880   rm -rf conftest*
20881   ol_cv_type_long_long=no
20882 fi
20883 rm -f conftest*
20884 fi
20885
20886 echo "$ac_t""$ol_cv_type_long_long" 1>&6
20887 if test $ol_cv_type_long_long = yes; then
20888         cat >> confdefs.h <<\EOF
20889 #define HAVE_LONG_LONG 1
20890 EOF
20891
20892 fi
20893
20894 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20895 echo "configure:20896: checking for ANSI C header files" >&5
20896 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20897   echo $ac_n "(cached) $ac_c" 1>&6
20898 else
20899   cat > conftest.$ac_ext <<EOF
20900 #line 20901 "configure"
20901 #include "confdefs.h"
20902 #include <stdlib.h>
20903 #include <stdarg.h>
20904 #include <string.h>
20905 #include <float.h>
20906 EOF
20907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20908 { (eval echo configure:20909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20910 if test -z "$ac_err"; then
20911   rm -rf conftest*
20912   ac_cv_header_stdc=yes
20913 else
20914   echo "$ac_err" >&5
20915   echo "configure: failed program was:" >&5
20916   cat conftest.$ac_ext >&5
20917   rm -rf conftest*
20918   ac_cv_header_stdc=no
20919 fi
20920 rm -f conftest*
20921
20922 if test $ac_cv_header_stdc = yes; then
20923   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20924 cat > conftest.$ac_ext <<EOF
20925 #line 20926 "configure"
20926 #include "confdefs.h"
20927 #include <string.h>
20928 EOF
20929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20930   egrep "memchr" >/dev/null 2>&1; then
20931   :
20932 else
20933   rm -rf conftest*
20934   ac_cv_header_stdc=no
20935 fi
20936 rm -f conftest*
20937
20938 fi
20939
20940 if test $ac_cv_header_stdc = yes; then
20941   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20942 cat > conftest.$ac_ext <<EOF
20943 #line 20944 "configure"
20944 #include "confdefs.h"
20945 #include <stdlib.h>
20946 EOF
20947 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20948   egrep "free" >/dev/null 2>&1; then
20949   :
20950 else
20951   rm -rf conftest*
20952   ac_cv_header_stdc=no
20953 fi
20954 rm -f conftest*
20955
20956 fi
20957
20958 if test $ac_cv_header_stdc = yes; then
20959   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20960 if test "$cross_compiling" = yes; then
20961   :
20962 else
20963   cat > conftest.$ac_ext <<EOF
20964 #line 20965 "configure"
20965 #include "confdefs.h"
20966 #include <ctype.h>
20967 #if ((' ' & 0x0FF) == 0x020)
20968 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20969 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20970 #else
20971 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20972  || ('j' <= (c) && (c) <= 'r') \
20973  || ('s' <= (c) && (c) <= 'z'))
20974 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20975 #endif
20976 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20977 int main () { int i; for (i = 0; i < 256; i++)
20978 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20979 exit (0); }
20980
20981 EOF
20982 if { (eval echo configure:20983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20983 then
20984   :
20985 else
20986   echo "configure: failed program was:" >&5
20987   cat conftest.$ac_ext >&5
20988   rm -fr conftest*
20989   ac_cv_header_stdc=no
20990 fi
20991 rm -fr conftest*
20992 fi
20993
20994 fi
20995 fi
20996
20997 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20998 if test $ac_cv_header_stdc = yes; then
20999   cat >> confdefs.h <<\EOF
21000 #define STDC_HEADERS 1
21001 EOF
21002
21003 fi
21004
21005 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21006 echo "configure:21007: checking for mode_t" >&5
21007 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21008   echo $ac_n "(cached) $ac_c" 1>&6
21009 else
21010   cat > conftest.$ac_ext <<EOF
21011 #line 21012 "configure"
21012 #include "confdefs.h"
21013 #include <sys/types.h>
21014 #if STDC_HEADERS
21015 #include <stdlib.h>
21016 #include <stddef.h>
21017 #endif
21018
21019 EOF
21020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21021   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21022   rm -rf conftest*
21023   eval "ac_cv_type_mode_t=yes"
21024 else
21025   rm -rf conftest*
21026   eval "ac_cv_type_mode_t=no"
21027 fi
21028 rm -f conftest*
21029
21030 fi
21031 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21032   echo "$ac_t""yes" 1>&6
21033 else
21034   echo "$ac_t""no" 1>&6
21035   cat >> confdefs.h <<EOF
21036 #define mode_t int
21037 EOF
21038
21039 fi
21040
21041 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21042 echo "configure:21043: checking for off_t" >&5
21043 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21044   echo $ac_n "(cached) $ac_c" 1>&6
21045 else
21046   cat > conftest.$ac_ext <<EOF
21047 #line 21048 "configure"
21048 #include "confdefs.h"
21049 #include <sys/types.h>
21050 #if STDC_HEADERS
21051 #include <stdlib.h>
21052 #include <stddef.h>
21053 #endif
21054
21055 EOF
21056 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21057   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21058   rm -rf conftest*
21059   eval "ac_cv_type_off_t=yes"
21060 else
21061   rm -rf conftest*
21062   eval "ac_cv_type_off_t=no"
21063 fi
21064 rm -f conftest*
21065
21066 fi
21067 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21068   echo "$ac_t""yes" 1>&6
21069 else
21070   echo "$ac_t""no" 1>&6
21071   cat >> confdefs.h <<EOF
21072 #define off_t long
21073 EOF
21074
21075 fi
21076
21077 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21078 echo "configure:21079: checking for pid_t" >&5
21079 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21080   echo $ac_n "(cached) $ac_c" 1>&6
21081 else
21082   cat > conftest.$ac_ext <<EOF
21083 #line 21084 "configure"
21084 #include "confdefs.h"
21085 #include <sys/types.h>
21086 #if STDC_HEADERS
21087 #include <stdlib.h>
21088 #include <stddef.h>
21089 #endif
21090
21091 EOF
21092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21093   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21094   rm -rf conftest*
21095   eval "ac_cv_type_pid_t=yes"
21096 else
21097   rm -rf conftest*
21098   eval "ac_cv_type_pid_t=no"
21099 fi
21100 rm -f conftest*
21101
21102 fi
21103 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21104   echo "$ac_t""yes" 1>&6
21105 else
21106   echo "$ac_t""no" 1>&6
21107   cat >> confdefs.h <<EOF
21108 #define pid_t int
21109 EOF
21110
21111 fi
21112
21113 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21114 echo "configure:21115: checking for ptrdiff_t" >&5
21115 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21116   echo $ac_n "(cached) $ac_c" 1>&6
21117 else
21118   cat > conftest.$ac_ext <<EOF
21119 #line 21120 "configure"
21120 #include "confdefs.h"
21121 #include <stddef.h>
21122 int main() {
21123 ptrdiff_t p
21124 ; return 0; }
21125 EOF
21126 if { (eval echo configure:21127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21127   rm -rf conftest*
21128   am_cv_type_ptrdiff_t=yes
21129 else
21130   echo "configure: failed program was:" >&5
21131   cat conftest.$ac_ext >&5
21132   rm -rf conftest*
21133   am_cv_type_ptrdiff_t=no
21134 fi
21135 rm -f conftest*
21136 fi
21137
21138 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21139    if test $am_cv_type_ptrdiff_t = yes; then
21140      cat >> confdefs.h <<\EOF
21141 #define HAVE_PTRDIFF_T 1
21142 EOF
21143
21144    fi
21145
21146 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21147 echo "configure:21148: checking return type of signal handlers" >&5
21148 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21149   echo $ac_n "(cached) $ac_c" 1>&6
21150 else
21151   cat > conftest.$ac_ext <<EOF
21152 #line 21153 "configure"
21153 #include "confdefs.h"
21154 #include <sys/types.h>
21155 #include <signal.h>
21156 #ifdef signal
21157 #undef signal
21158 #endif
21159 #ifdef __cplusplus
21160 extern "C" void (*signal (int, void (*)(int)))(int);
21161 #else
21162 void (*signal ()) ();
21163 #endif
21164
21165 int main() {
21166 int i;
21167 ; return 0; }
21168 EOF
21169 if { (eval echo configure:21170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21170   rm -rf conftest*
21171   ac_cv_type_signal=void
21172 else
21173   echo "configure: failed program was:" >&5
21174   cat conftest.$ac_ext >&5
21175   rm -rf conftest*
21176   ac_cv_type_signal=int
21177 fi
21178 rm -f conftest*
21179 fi
21180
21181 echo "$ac_t""$ac_cv_type_signal" 1>&6
21182 cat >> confdefs.h <<EOF
21183 #define RETSIGTYPE $ac_cv_type_signal
21184 EOF
21185
21186
21187 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21188 echo "configure:21189: checking for size_t" >&5
21189 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21190   echo $ac_n "(cached) $ac_c" 1>&6
21191 else
21192   cat > conftest.$ac_ext <<EOF
21193 #line 21194 "configure"
21194 #include "confdefs.h"
21195 #include <sys/types.h>
21196 #if STDC_HEADERS
21197 #include <stdlib.h>
21198 #include <stddef.h>
21199 #endif
21200
21201 EOF
21202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21203   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21204   rm -rf conftest*
21205   eval "ac_cv_type_size_t=yes"
21206 else
21207   rm -rf conftest*
21208   eval "ac_cv_type_size_t=no"
21209 fi
21210 rm -f conftest*
21211
21212 fi
21213 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21214   echo "$ac_t""yes" 1>&6
21215 else
21216   echo "$ac_t""no" 1>&6
21217   cat >> confdefs.h <<EOF
21218 #define size_t unsigned
21219 EOF
21220
21221 fi
21222
21223
21224 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21225 echo "configure:21226: checking for ssize_t" >&5
21226 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21227   echo $ac_n "(cached) $ac_c" 1>&6
21228 else
21229   cat > conftest.$ac_ext <<EOF
21230 #line 21231 "configure"
21231 #include "confdefs.h"
21232 #include <sys/types.h>
21233 #if STDC_HEADERS
21234 #include <stdlib.h>
21235 #include <stddef.h>
21236 #endif
21237
21238 EOF
21239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21240   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21241   rm -rf conftest*
21242   eval "ac_cv_type_ssize_t=yes"
21243 else
21244   rm -rf conftest*
21245   eval "ac_cv_type_ssize_t=no"
21246 fi
21247 rm -f conftest*
21248
21249 fi
21250 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21251   echo "$ac_t""yes" 1>&6
21252 else
21253   echo "$ac_t""no" 1>&6
21254   cat >> confdefs.h <<EOF
21255 #define ssize_t signed int
21256 EOF
21257
21258 fi
21259
21260 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21261 echo "configure:21262: checking for caddr_t" >&5
21262 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21263   echo $ac_n "(cached) $ac_c" 1>&6
21264 else
21265   cat > conftest.$ac_ext <<EOF
21266 #line 21267 "configure"
21267 #include "confdefs.h"
21268 #include <sys/types.h>
21269 #if STDC_HEADERS
21270 #include <stdlib.h>
21271 #include <stddef.h>
21272 #endif
21273
21274 EOF
21275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21276   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21277   rm -rf conftest*
21278   eval "ac_cv_type_caddr_t=yes"
21279 else
21280   rm -rf conftest*
21281   eval "ac_cv_type_caddr_t=no"
21282 fi
21283 rm -f conftest*
21284
21285 fi
21286 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21287   echo "$ac_t""yes" 1>&6
21288 else
21289   echo "$ac_t""no" 1>&6
21290   cat >> confdefs.h <<EOF
21291 #define caddr_t char *
21292 EOF
21293
21294 fi
21295
21296
21297 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21298 echo "configure:21299: checking for socklen_t" >&5
21299 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21300   echo $ac_n "(cached) $ac_c" 1>&6
21301 else
21302   cat > conftest.$ac_ext <<EOF
21303 #line 21304 "configure"
21304 #include "confdefs.h"
21305
21306 #ifdef HAVE_SYS_TYPES_H
21307 #include <sys/types.h>
21308 #endif
21309 #ifdef HAVE_SYS_SOCKET_H
21310 #include <sys/socket.h>
21311 #endif
21312
21313 int main() {
21314 socklen_t len;
21315 ; return 0; }
21316 EOF
21317 if { (eval echo configure:21318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21318   rm -rf conftest*
21319   ol_cv_type_socklen_t=yes
21320 else
21321   echo "configure: failed program was:" >&5
21322   cat conftest.$ac_ext >&5
21323   rm -rf conftest*
21324   ol_cv_type_socklen_t=no
21325 fi
21326 rm -f conftest*
21327 fi
21328
21329 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21330   if test $ol_cv_type_socklen_t = no; then
21331     cat >> confdefs.h <<\EOF
21332 #define socklen_t int
21333 EOF
21334
21335   fi
21336  
21337 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21338 echo "configure:21339: checking for member st_blksize in aggregate type struct stat" >&5
21339 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21340   echo $ac_n "(cached) $ac_c" 1>&6
21341 else
21342   cat > conftest.$ac_ext <<EOF
21343 #line 21344 "configure"
21344 #include "confdefs.h"
21345 #include <sys/types.h>
21346 #include <sys/stat.h>
21347 int main() {
21348 struct stat foo; foo.st_blksize;
21349 ; return 0; }
21350 EOF
21351 if { (eval echo configure:21352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21352   rm -rf conftest*
21353   ac_cv_c_struct_member_st_blksize=yes
21354 else
21355   echo "configure: failed program was:" >&5
21356   cat conftest.$ac_ext >&5
21357   rm -rf conftest*
21358   ac_cv_c_struct_member_st_blksize=no
21359 fi
21360 rm -f conftest*
21361 fi
21362
21363 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21364 st_blksize="$ac_cv_c_struct_member_st_blksize"
21365 if test $ac_cv_c_struct_member_st_blksize = yes; then
21366   cat >> confdefs.h <<\EOF
21367 #define HAVE_ST_BLKSIZE 1
21368 EOF
21369
21370 fi
21371
21372 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21373 echo "configure:21374: checking whether time.h and sys/time.h may both be included" >&5
21374 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21375   echo $ac_n "(cached) $ac_c" 1>&6
21376 else
21377   cat > conftest.$ac_ext <<EOF
21378 #line 21379 "configure"
21379 #include "confdefs.h"
21380 #include <sys/types.h>
21381 #include <sys/time.h>
21382 #include <time.h>
21383 int main() {
21384 struct tm *tp;
21385 ; return 0; }
21386 EOF
21387 if { (eval echo configure:21388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21388   rm -rf conftest*
21389   ac_cv_header_time=yes
21390 else
21391   echo "configure: failed program was:" >&5
21392   cat conftest.$ac_ext >&5
21393   rm -rf conftest*
21394   ac_cv_header_time=no
21395 fi
21396 rm -f conftest*
21397 fi
21398
21399 echo "$ac_t""$ac_cv_header_time" 1>&6
21400 if test $ac_cv_header_time = yes; then
21401   cat >> confdefs.h <<\EOF
21402 #define TIME_WITH_SYS_TIME 1
21403 EOF
21404
21405 fi
21406
21407 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21408 echo "configure:21409: checking whether struct tm is in sys/time.h or time.h" >&5
21409 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21410   echo $ac_n "(cached) $ac_c" 1>&6
21411 else
21412   cat > conftest.$ac_ext <<EOF
21413 #line 21414 "configure"
21414 #include "confdefs.h"
21415 #include <sys/types.h>
21416 #include <time.h>
21417 int main() {
21418 struct tm *tp; tp->tm_sec;
21419 ; return 0; }
21420 EOF
21421 if { (eval echo configure:21422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21422   rm -rf conftest*
21423   ac_cv_struct_tm=time.h
21424 else
21425   echo "configure: failed program was:" >&5
21426   cat conftest.$ac_ext >&5
21427   rm -rf conftest*
21428   ac_cv_struct_tm=sys/time.h
21429 fi
21430 rm -f conftest*
21431 fi
21432
21433 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21434 if test $ac_cv_struct_tm = sys/time.h; then
21435   cat >> confdefs.h <<\EOF
21436 #define TM_IN_SYS_TIME 1
21437 EOF
21438
21439 fi
21440
21441 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21442 echo "configure:21443: checking for uid_t in sys/types.h" >&5
21443 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21444   echo $ac_n "(cached) $ac_c" 1>&6
21445 else
21446   cat > conftest.$ac_ext <<EOF
21447 #line 21448 "configure"
21448 #include "confdefs.h"
21449 #include <sys/types.h>
21450 EOF
21451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21452   egrep "uid_t" >/dev/null 2>&1; then
21453   rm -rf conftest*
21454   ac_cv_type_uid_t=yes
21455 else
21456   rm -rf conftest*
21457   ac_cv_type_uid_t=no
21458 fi
21459 rm -f conftest*
21460
21461 fi
21462
21463 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21464 if test $ac_cv_type_uid_t = no; then
21465   cat >> confdefs.h <<\EOF
21466 #define uid_t int
21467 EOF
21468
21469   cat >> confdefs.h <<\EOF
21470 #define gid_t int
21471 EOF
21472
21473 fi
21474
21475 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21476 echo "configure:21477: checking for sig_atomic_t" >&5
21477 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21478   echo $ac_n "(cached) $ac_c" 1>&6
21479 else
21480   cat > conftest.$ac_ext <<EOF
21481 #line 21482 "configure"
21482 #include "confdefs.h"
21483 #include <signal.h>
21484 int main() {
21485 sig_atomic_t atomic;
21486 ; return 0; }
21487 EOF
21488 if { (eval echo configure:21489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21489   rm -rf conftest*
21490   ol_cv_type_sig_atomic_t=yes
21491 else
21492   echo "configure: failed program was:" >&5
21493   cat conftest.$ac_ext >&5
21494   rm -rf conftest*
21495   ol_cv_type_sig_atomic_t=no
21496 fi
21497 rm -f conftest*
21498 fi
21499
21500 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21501   if test $ol_cv_type_sig_atomic_t = no; then
21502     cat >> confdefs.h <<\EOF
21503 #define sig_atomic_t int
21504 EOF
21505
21506   fi
21507  
21508
21509
21510 # test for pw_gecos in struct passwd
21511 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21512 echo "configure:21513: checking struct passwd for pw_gecos" >&5
21513 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21514   echo $ac_n "(cached) $ac_c" 1>&6
21515 else
21516   
21517         cat > conftest.$ac_ext <<EOF
21518 #line 21519 "configure"
21519 #include "confdefs.h"
21520 #include <pwd.h>
21521 int main() {
21522
21523         struct passwd pwd;
21524         pwd.pw_gecos = pwd.pw_name;
21525
21526 ; return 0; }
21527 EOF
21528 if { (eval echo configure:21529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21529   rm -rf conftest*
21530   ol_cv_struct_passwd_pw_gecos=yes
21531 else
21532   echo "configure: failed program was:" >&5
21533   cat conftest.$ac_ext >&5
21534   rm -rf conftest*
21535   ol_cv_struct_passwd_pw_gecos=no
21536 fi
21537 rm -f conftest*
21538 fi
21539
21540 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21541 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21542         cat >> confdefs.h <<\EOF
21543 #define HAVE_PW_GECOS 1
21544 EOF
21545
21546 fi
21547
21548 # test for pw_passwd in struct passwd
21549 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21550 echo "configure:21551: checking struct passwd for pw_passwd" >&5
21551 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21552   echo $ac_n "(cached) $ac_c" 1>&6
21553 else
21554   
21555         cat > conftest.$ac_ext <<EOF
21556 #line 21557 "configure"
21557 #include "confdefs.h"
21558 #include <pwd.h>
21559 int main() {
21560
21561         struct passwd pwd;
21562         pwd.pw_passwd = pwd.pw_name;
21563
21564 ; return 0; }
21565 EOF
21566 if { (eval echo configure:21567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21567   rm -rf conftest*
21568   ol_cv_struct_passwd_pw_passwd=yes
21569 else
21570   echo "configure: failed program was:" >&5
21571   cat conftest.$ac_ext >&5
21572   rm -rf conftest*
21573   ol_cv_struct_passwd_pw_passwd=no
21574 fi
21575 rm -f conftest*
21576 fi
21577
21578 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21579 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21580         cat >> confdefs.h <<\EOF
21581 #define HAVE_PW_PASSWD 1
21582 EOF
21583
21584 fi
21585
21586
21587 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21588 echo "configure:21589: checking if toupper() requires islower()" >&5
21589 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   
21593         if test "$cross_compiling" = yes; then
21594   ol_cv_c_upper_lower=safe
21595 else
21596   cat > conftest.$ac_ext <<EOF
21597 #line 21598 "configure"
21598 #include "confdefs.h"
21599
21600 #include <ctype.h>
21601 main()
21602 {
21603         if ('C' == toupper('C'))
21604                 exit(0);
21605         else
21606                 exit(1);
21607 }
21608 EOF
21609 if { (eval echo configure:21610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21610 then
21611   ol_cv_c_upper_lower=no
21612 else
21613   echo "configure: failed program was:" >&5
21614   cat conftest.$ac_ext >&5
21615   rm -fr conftest*
21616   ol_cv_c_upper_lower=yes
21617 fi
21618 rm -fr conftest*
21619 fi
21620
21621 fi
21622
21623 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21624 if test $ol_cv_c_upper_lower != no ; then
21625         cat >> confdefs.h <<\EOF
21626 #define C_UPPER_LOWER 1
21627 EOF
21628
21629 fi
21630
21631 echo $ac_n "checking for working const""... $ac_c" 1>&6
21632 echo "configure:21633: checking for working const" >&5
21633 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21634   echo $ac_n "(cached) $ac_c" 1>&6
21635 else
21636   cat > conftest.$ac_ext <<EOF
21637 #line 21638 "configure"
21638 #include "confdefs.h"
21639
21640 int main() {
21641
21642 /* Ultrix mips cc rejects this.  */
21643 typedef int charset[2]; const charset x;
21644 /* SunOS 4.1.1 cc rejects this.  */
21645 char const *const *ccp;
21646 char **p;
21647 /* NEC SVR4.0.2 mips cc rejects this.  */
21648 struct point {int x, y;};
21649 static struct point const zero = {0,0};
21650 /* AIX XL C 1.02.0.0 rejects this.
21651    It does not let you subtract one const X* pointer from another in an arm
21652    of an if-expression whose if-part is not a constant expression */
21653 const char *g = "string";
21654 ccp = &g + (g ? g-g : 0);
21655 /* HPUX 7.0 cc rejects these. */
21656 ++ccp;
21657 p = (char**) ccp;
21658 ccp = (char const *const *) p;
21659 { /* SCO 3.2v4 cc rejects this.  */
21660   char *t;
21661   char const *s = 0 ? (char *) 0 : (char const *) 0;
21662
21663   *t++ = 0;
21664 }
21665 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21666   int x[] = {25, 17};
21667   const int *foo = &x[0];
21668   ++foo;
21669 }
21670 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21671   typedef const int *iptr;
21672   iptr p = 0;
21673   ++p;
21674 }
21675 { /* AIX XL C 1.02.0.0 rejects this saying
21676      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21677   struct s { int j; const int *ap[3]; };
21678   struct s *b; b->j = 5;
21679 }
21680 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21681   const int foo = 10;
21682 }
21683
21684 ; return 0; }
21685 EOF
21686 if { (eval echo configure:21687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21687   rm -rf conftest*
21688   ac_cv_c_const=yes
21689 else
21690   echo "configure: failed program was:" >&5
21691   cat conftest.$ac_ext >&5
21692   rm -rf conftest*
21693   ac_cv_c_const=no
21694 fi
21695 rm -f conftest*
21696 fi
21697
21698 echo "$ac_t""$ac_cv_c_const" 1>&6
21699 if test $ac_cv_c_const = no; then
21700   cat >> confdefs.h <<\EOF
21701 #define const 
21702 EOF
21703
21704 fi
21705
21706 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21707 echo "configure:21708: checking if compiler understands volatile" >&5
21708 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21709   echo $ac_n "(cached) $ac_c" 1>&6
21710 else
21711   cat > conftest.$ac_ext <<EOF
21712 #line 21713 "configure"
21713 #include "confdefs.h"
21714 int x, y, z;
21715 int main() {
21716 volatile int a; int * volatile b = x ? &y : &z;
21717       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21718       *b = 0;
21719 ; return 0; }
21720 EOF
21721 if { (eval echo configure:21722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21722   rm -rf conftest*
21723   ol_cv_c_volatile=yes
21724 else
21725   echo "configure: failed program was:" >&5
21726   cat conftest.$ac_ext >&5
21727   rm -rf conftest*
21728   ol_cv_c_volatile=no
21729 fi
21730 rm -f conftest*
21731 fi
21732
21733 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21734   if test $ol_cv_c_volatile = yes; then
21735     : 
21736   else
21737     cat >> confdefs.h <<\EOF
21738 #define volatile 
21739 EOF
21740
21741   fi
21742  
21743
21744 if test $cross_compiling = yes ; then
21745         cat >> confdefs.h <<\EOF
21746 #define CROSS_COMPILING 1
21747 EOF
21748
21749 else
21750         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21751 echo "configure:21752: checking whether byte ordering is bigendian" >&5
21752 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21753   echo $ac_n "(cached) $ac_c" 1>&6
21754 else
21755   ac_cv_c_bigendian=unknown
21756 # See if sys/param.h defines the BYTE_ORDER macro.
21757 cat > conftest.$ac_ext <<EOF
21758 #line 21759 "configure"
21759 #include "confdefs.h"
21760 #include <sys/types.h>
21761 #include <sys/param.h>
21762 int main() {
21763
21764 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21765  bogus endian macros
21766 #endif
21767 ; return 0; }
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21770   rm -rf conftest*
21771   # It does; now see whether it defined to BIG_ENDIAN or not.
21772 cat > conftest.$ac_ext <<EOF
21773 #line 21774 "configure"
21774 #include "confdefs.h"
21775 #include <sys/types.h>
21776 #include <sys/param.h>
21777 int main() {
21778
21779 #if BYTE_ORDER != BIG_ENDIAN
21780  not big endian
21781 #endif
21782 ; return 0; }
21783 EOF
21784 if { (eval echo configure:21785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21785   rm -rf conftest*
21786   ac_cv_c_bigendian=yes
21787 else
21788   echo "configure: failed program was:" >&5
21789   cat conftest.$ac_ext >&5
21790   rm -rf conftest*
21791   ac_cv_c_bigendian=no
21792 fi
21793 rm -f conftest*
21794 else
21795   echo "configure: failed program was:" >&5
21796   cat conftest.$ac_ext >&5
21797 fi
21798 rm -f conftest*
21799 if test $ac_cv_c_bigendian = unknown; then
21800 if test "$cross_compiling" = yes; then
21801     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21802 else
21803   cat > conftest.$ac_ext <<EOF
21804 #line 21805 "configure"
21805 #include "confdefs.h"
21806 main () {
21807   /* Are we little or big endian?  From Harbison&Steele.  */
21808   union
21809   {
21810     long l;
21811     char c[sizeof (long)];
21812   } u;
21813   u.l = 1;
21814   exit (u.c[sizeof (long) - 1] == 1);
21815 }
21816 EOF
21817 if { (eval echo configure:21818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21818 then
21819   ac_cv_c_bigendian=no
21820 else
21821   echo "configure: failed program was:" >&5
21822   cat conftest.$ac_ext >&5
21823   rm -fr conftest*
21824   ac_cv_c_bigendian=yes
21825 fi
21826 rm -fr conftest*
21827 fi
21828
21829 fi
21830 fi
21831
21832 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21833 if test $ac_cv_c_bigendian = yes; then
21834   cat >> confdefs.h <<\EOF
21835 #define WORDS_BIGENDIAN 1
21836 EOF
21837
21838 fi
21839
21840 fi
21841
21842 echo $ac_n "checking size of short""... $ac_c" 1>&6
21843 echo "configure:21844: checking size of short" >&5 
21844 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21845   echo $ac_n "(cached) $ac_c" 1>&6
21846 else
21847   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21848   cat > conftest.$ac_ext <<EOF
21849 #line 21850 "configure"
21850 #include "confdefs.h"
21851 #include "confdefs.h" 
21852 #include <sys/types.h> 
21853  
21854
21855 int main() {
21856 switch (0) case 0: case (sizeof (short) == $ac_size):;
21857 ; return 0; }
21858 EOF
21859 if { (eval echo configure:21860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21860   rm -rf conftest*
21861   ac_cv_sizeof_short=$ac_size
21862 else
21863   echo "configure: failed program was:" >&5
21864   cat conftest.$ac_ext >&5
21865 fi
21866 rm -f conftest* 
21867   if test x$ac_cv_sizeof_short != x ; then break; fi 
21868 done 
21869
21870 fi
21871  
21872 if test x$ac_cv_sizeof_short = x ; then 
21873   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21874 fi 
21875 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21876 cat >> confdefs.h <<EOF
21877 #define SIZEOF_SHORT $ac_cv_sizeof_short
21878 EOF
21879  
21880  
21881 echo $ac_n "checking size of int""... $ac_c" 1>&6
21882 echo "configure:21883: checking size of int" >&5 
21883 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21884   echo $ac_n "(cached) $ac_c" 1>&6
21885 else
21886   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21887   cat > conftest.$ac_ext <<EOF
21888 #line 21889 "configure"
21889 #include "confdefs.h"
21890 #include "confdefs.h" 
21891 #include <sys/types.h> 
21892  
21893
21894 int main() {
21895 switch (0) case 0: case (sizeof (int) == $ac_size):;
21896 ; return 0; }
21897 EOF
21898 if { (eval echo configure:21899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21899   rm -rf conftest*
21900   ac_cv_sizeof_int=$ac_size
21901 else
21902   echo "configure: failed program was:" >&5
21903   cat conftest.$ac_ext >&5
21904 fi
21905 rm -f conftest* 
21906   if test x$ac_cv_sizeof_int != x ; then break; fi 
21907 done 
21908
21909 fi
21910  
21911 if test x$ac_cv_sizeof_int = x ; then 
21912   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21913 fi 
21914 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21915 cat >> confdefs.h <<EOF
21916 #define SIZEOF_INT $ac_cv_sizeof_int
21917 EOF
21918  
21919  
21920 echo $ac_n "checking size of long""... $ac_c" 1>&6
21921 echo "configure:21922: checking size of long" >&5 
21922 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21923   echo $ac_n "(cached) $ac_c" 1>&6
21924 else
21925   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21926   cat > conftest.$ac_ext <<EOF
21927 #line 21928 "configure"
21928 #include "confdefs.h"
21929 #include "confdefs.h" 
21930 #include <sys/types.h> 
21931  
21932
21933 int main() {
21934 switch (0) case 0: case (sizeof (long) == $ac_size):;
21935 ; return 0; }
21936 EOF
21937 if { (eval echo configure:21938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21938   rm -rf conftest*
21939   ac_cv_sizeof_long=$ac_size
21940 else
21941   echo "configure: failed program was:" >&5
21942   cat conftest.$ac_ext >&5
21943 fi
21944 rm -f conftest* 
21945   if test x$ac_cv_sizeof_long != x ; then break; fi 
21946 done 
21947
21948 fi
21949  
21950 if test x$ac_cv_sizeof_long = x ; then 
21951   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21952 fi 
21953 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21954 cat >> confdefs.h <<EOF
21955 #define SIZEOF_LONG $ac_cv_sizeof_long
21956 EOF
21957  
21958
21959
21960 if test "$ac_cv_sizeof_int" -lt 4 ; then
21961         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21962
21963         cat >> confdefs.h <<\EOF
21964 #define LBER_INT_T long
21965 EOF
21966
21967 else
21968         cat >> confdefs.h <<\EOF
21969 #define LBER_INT_T int
21970 EOF
21971
21972 fi
21973
21974 cat >> confdefs.h <<\EOF
21975 #define LBER_LEN_T long
21976 EOF
21977
21978 cat >> confdefs.h <<\EOF
21979 #define LBER_SOCKET_T int
21980 EOF
21981
21982 cat >> confdefs.h <<\EOF
21983 #define LBER_TAG_T long
21984 EOF
21985
21986
21987 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21988 echo "configure:21989: checking for 8-bit clean memcmp" >&5
21989 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21990   echo $ac_n "(cached) $ac_c" 1>&6
21991 else
21992   if test "$cross_compiling" = yes; then
21993   ac_cv_func_memcmp_clean=no
21994 else
21995   cat > conftest.$ac_ext <<EOF
21996 #line 21997 "configure"
21997 #include "confdefs.h"
21998
21999 main()
22000 {
22001   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22002   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22003 }
22004
22005 EOF
22006 if { (eval echo configure:22007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22007 then
22008   ac_cv_func_memcmp_clean=yes
22009 else
22010   echo "configure: failed program was:" >&5
22011   cat conftest.$ac_ext >&5
22012   rm -fr conftest*
22013   ac_cv_func_memcmp_clean=no
22014 fi
22015 rm -fr conftest*
22016 fi
22017
22018 fi
22019
22020 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22021 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22022
22023 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22024 echo "configure:22025: checking for strftime" >&5
22025 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22026   echo $ac_n "(cached) $ac_c" 1>&6
22027 else
22028   cat > conftest.$ac_ext <<EOF
22029 #line 22030 "configure"
22030 #include "confdefs.h"
22031 /* System header to define __stub macros and hopefully few prototypes,
22032     which can conflict with char strftime(); below.  */
22033 #include <assert.h>
22034 /* Override any gcc2 internal prototype to avoid an error.  */
22035 /* We use char because int might match the return type of a gcc2
22036     builtin and then its argument prototype would still apply.  */
22037 char strftime();
22038 char (*f)();
22039
22040 int main() {
22041
22042 /* The GNU C library defines this for functions which it implements
22043     to always fail with ENOSYS.  Some functions are actually named
22044     something starting with __ and the normal name is an alias.  */
22045 #if defined (__stub_strftime) || defined (__stub___strftime)
22046 choke me
22047 #else
22048 f = strftime;
22049 #endif
22050
22051 ; return 0; }
22052 EOF
22053 if { (eval echo configure:22054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22054   rm -rf conftest*
22055   eval "ac_cv_func_strftime=yes"
22056 else
22057   echo "configure: failed program was:" >&5
22058   cat conftest.$ac_ext >&5
22059   rm -rf conftest*
22060   eval "ac_cv_func_strftime=no"
22061 fi
22062 rm -f conftest*
22063 fi
22064
22065 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22066   echo "$ac_t""yes" 1>&6
22067   cat >> confdefs.h <<\EOF
22068 #define HAVE_STRFTIME 1
22069 EOF
22070
22071 else
22072   echo "$ac_t""no" 1>&6
22073 # strftime is in -lintl on SCO UNIX.
22074 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22075 echo "configure:22076: checking for strftime in -lintl" >&5
22076 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22078   echo $ac_n "(cached) $ac_c" 1>&6
22079 else
22080   ac_save_LIBS="$LIBS"
22081 LIBS="-lintl  $LIBS"
22082 cat > conftest.$ac_ext <<EOF
22083 #line 22084 "configure"
22084 #include "confdefs.h"
22085 /* Override any gcc2 internal prototype to avoid an error.  */
22086 /* We use char because int might match the return type of a gcc2
22087     builtin and then its argument prototype would still apply.  */
22088 char strftime();
22089
22090 int main() {
22091 strftime()
22092 ; return 0; }
22093 EOF
22094 if { (eval echo configure:22095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22095   rm -rf conftest*
22096   eval "ac_cv_lib_$ac_lib_var=yes"
22097 else
22098   echo "configure: failed program was:" >&5
22099   cat conftest.$ac_ext >&5
22100   rm -rf conftest*
22101   eval "ac_cv_lib_$ac_lib_var=no"
22102 fi
22103 rm -f conftest*
22104 LIBS="$ac_save_LIBS"
22105
22106 fi
22107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22108   echo "$ac_t""yes" 1>&6
22109   cat >> confdefs.h <<\EOF
22110 #define HAVE_STRFTIME 1
22111 EOF
22112
22113 LIBS="-lintl $LIBS"
22114 else
22115   echo "$ac_t""no" 1>&6
22116 fi
22117
22118 fi
22119
22120
22121 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22122 echo "configure:22123: checking for inet_aton()" >&5
22123 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22124   echo $ac_n "(cached) $ac_c" 1>&6
22125 else
22126   cat > conftest.$ac_ext <<EOF
22127 #line 22128 "configure"
22128 #include "confdefs.h"
22129
22130 #ifdef HAVE_SYS_TYPES_H
22131 #       include <sys/types.h>
22132 #endif
22133 #ifdef HAVE_SYS_SOCKET_H
22134 #       include <sys/socket.h>
22135 #       ifdef HAVE_SYS_SELECT_H
22136 #               include <sys/select.h>
22137 #       endif
22138 #       include <netinet/in.h>
22139 #       ifdef HAVE_ARPA_INET_H
22140 #               include <arpa/inet.h>
22141 #       endif
22142 #endif
22143
22144 int main() {
22145 struct in_addr in;
22146 int rc = inet_aton( "255.255.255.255", &in );
22147 ; return 0; }
22148 EOF
22149 if { (eval echo configure:22150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22150   rm -rf conftest*
22151   ol_cv_func_inet_aton=yes
22152 else
22153   echo "configure: failed program was:" >&5
22154   cat conftest.$ac_ext >&5
22155   rm -rf conftest*
22156   ol_cv_func_inet_aton=no
22157 fi
22158 rm -f conftest*
22159 fi
22160
22161 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22162   if test $ol_cv_func_inet_aton != no; then
22163     cat >> confdefs.h <<\EOF
22164 #define HAVE_INET_ATON 1
22165 EOF
22166
22167   fi
22168  
22169
22170 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22171 echo "configure:22172: checking for _spawnlp" >&5
22172 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22173   echo $ac_n "(cached) $ac_c" 1>&6
22174 else
22175   cat > conftest.$ac_ext <<EOF
22176 #line 22177 "configure"
22177 #include "confdefs.h"
22178 /* System header to define __stub macros and hopefully few prototypes,
22179     which can conflict with char _spawnlp(); below.  */
22180 #include <assert.h>
22181 /* Override any gcc2 internal prototype to avoid an error.  */
22182 /* We use char because int might match the return type of a gcc2
22183     builtin and then its argument prototype would still apply.  */
22184 char _spawnlp();
22185 char (*f)();
22186
22187 int main() {
22188
22189 /* The GNU C library defines this for functions which it implements
22190     to always fail with ENOSYS.  Some functions are actually named
22191     something starting with __ and the normal name is an alias.  */
22192 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22193 choke me
22194 #else
22195 f = _spawnlp;
22196 #endif
22197
22198 ; return 0; }
22199 EOF
22200 if { (eval echo configure:22201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22201   rm -rf conftest*
22202   eval "ac_cv_func__spawnlp=yes"
22203 else
22204   echo "configure: failed program was:" >&5
22205   cat conftest.$ac_ext >&5
22206   rm -rf conftest*
22207   eval "ac_cv_func__spawnlp=no"
22208 fi
22209 rm -f conftest*
22210 fi
22211
22212 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22213   echo "$ac_t""yes" 1>&6
22214   cat >> confdefs.h <<\EOF
22215 #define HAVE_SPAWNLP 1
22216 EOF
22217
22218 else
22219   echo "$ac_t""no" 1>&6
22220 fi
22221
22222
22223 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22224 echo "configure:22225: checking for _snprintf" >&5
22225 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22226   echo $ac_n "(cached) $ac_c" 1>&6
22227 else
22228   cat > conftest.$ac_ext <<EOF
22229 #line 22230 "configure"
22230 #include "confdefs.h"
22231 /* System header to define __stub macros and hopefully few prototypes,
22232     which can conflict with char _snprintf(); below.  */
22233 #include <assert.h>
22234 /* Override any gcc2 internal prototype to avoid an error.  */
22235 /* We use char because int might match the return type of a gcc2
22236     builtin and then its argument prototype would still apply.  */
22237 char _snprintf();
22238 char (*f)();
22239
22240 int main() {
22241
22242 /* The GNU C library defines this for functions which it implements
22243     to always fail with ENOSYS.  Some functions are actually named
22244     something starting with __ and the normal name is an alias.  */
22245 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22246 choke me
22247 #else
22248 f = _snprintf;
22249 #endif
22250
22251 ; return 0; }
22252 EOF
22253 if { (eval echo configure:22254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22254   rm -rf conftest*
22255   eval "ac_cv_func__snprintf=yes"
22256 else
22257   echo "configure: failed program was:" >&5
22258   cat conftest.$ac_ext >&5
22259   rm -rf conftest*
22260   eval "ac_cv_func__snprintf=no"
22261 fi
22262 rm -f conftest*
22263 fi
22264
22265 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22266   echo "$ac_t""yes" 1>&6
22267   ac_cv_func_snprintf=yes
22268         cat >> confdefs.h <<\EOF
22269 #define snprintf _snprintf
22270 EOF
22271
22272
22273 else
22274   echo "$ac_t""no" 1>&6
22275 fi
22276
22277
22278 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22279 echo "configure:22280: checking for _vsnprintf" >&5
22280 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22281   echo $ac_n "(cached) $ac_c" 1>&6
22282 else
22283   cat > conftest.$ac_ext <<EOF
22284 #line 22285 "configure"
22285 #include "confdefs.h"
22286 /* System header to define __stub macros and hopefully few prototypes,
22287     which can conflict with char _vsnprintf(); below.  */
22288 #include <assert.h>
22289 /* Override any gcc2 internal prototype to avoid an error.  */
22290 /* We use char because int might match the return type of a gcc2
22291     builtin and then its argument prototype would still apply.  */
22292 char _vsnprintf();
22293 char (*f)();
22294
22295 int main() {
22296
22297 /* The GNU C library defines this for functions which it implements
22298     to always fail with ENOSYS.  Some functions are actually named
22299     something starting with __ and the normal name is an alias.  */
22300 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22301 choke me
22302 #else
22303 f = _vsnprintf;
22304 #endif
22305
22306 ; return 0; }
22307 EOF
22308 if { (eval echo configure:22309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22309   rm -rf conftest*
22310   eval "ac_cv_func__vsnprintf=yes"
22311 else
22312   echo "configure: failed program was:" >&5
22313   cat conftest.$ac_ext >&5
22314   rm -rf conftest*
22315   eval "ac_cv_func__vsnprintf=no"
22316 fi
22317 rm -f conftest*
22318 fi
22319
22320 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22321   echo "$ac_t""yes" 1>&6
22322   ac_cv_func_vsnprintf=yes
22323         cat >> confdefs.h <<\EOF
22324 #define vsnprintf _vsnprintf
22325 EOF
22326
22327
22328 else
22329   echo "$ac_t""no" 1>&6
22330 fi
22331
22332
22333 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22334 echo "configure:22335: checking for vprintf" >&5
22335 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22336   echo $ac_n "(cached) $ac_c" 1>&6
22337 else
22338   cat > conftest.$ac_ext <<EOF
22339 #line 22340 "configure"
22340 #include "confdefs.h"
22341 /* System header to define __stub macros and hopefully few prototypes,
22342     which can conflict with char vprintf(); below.  */
22343 #include <assert.h>
22344 /* Override any gcc2 internal prototype to avoid an error.  */
22345 /* We use char because int might match the return type of a gcc2
22346     builtin and then its argument prototype would still apply.  */
22347 char vprintf();
22348 char (*f)();
22349
22350 int main() {
22351
22352 /* The GNU C library defines this for functions which it implements
22353     to always fail with ENOSYS.  Some functions are actually named
22354     something starting with __ and the normal name is an alias.  */
22355 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22356 choke me
22357 #else
22358 f = vprintf;
22359 #endif
22360
22361 ; return 0; }
22362 EOF
22363 if { (eval echo configure:22364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22364   rm -rf conftest*
22365   eval "ac_cv_func_vprintf=yes"
22366 else
22367   echo "configure: failed program was:" >&5
22368   cat conftest.$ac_ext >&5
22369   rm -rf conftest*
22370   eval "ac_cv_func_vprintf=no"
22371 fi
22372 rm -f conftest*
22373 fi
22374
22375 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22376   echo "$ac_t""yes" 1>&6
22377   cat >> confdefs.h <<\EOF
22378 #define HAVE_VPRINTF 1
22379 EOF
22380
22381 else
22382   echo "$ac_t""no" 1>&6
22383 fi
22384
22385 if test "$ac_cv_func_vprintf" != yes; then
22386 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22387 echo "configure:22388: checking for _doprnt" >&5
22388 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22389   echo $ac_n "(cached) $ac_c" 1>&6
22390 else
22391   cat > conftest.$ac_ext <<EOF
22392 #line 22393 "configure"
22393 #include "confdefs.h"
22394 /* System header to define __stub macros and hopefully few prototypes,
22395     which can conflict with char _doprnt(); below.  */
22396 #include <assert.h>
22397 /* Override any gcc2 internal prototype to avoid an error.  */
22398 /* We use char because int might match the return type of a gcc2
22399     builtin and then its argument prototype would still apply.  */
22400 char _doprnt();
22401 char (*f)();
22402
22403 int main() {
22404
22405 /* The GNU C library defines this for functions which it implements
22406     to always fail with ENOSYS.  Some functions are actually named
22407     something starting with __ and the normal name is an alias.  */
22408 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22409 choke me
22410 #else
22411 f = _doprnt;
22412 #endif
22413
22414 ; return 0; }
22415 EOF
22416 if { (eval echo configure:22417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22417   rm -rf conftest*
22418   eval "ac_cv_func__doprnt=yes"
22419 else
22420   echo "configure: failed program was:" >&5
22421   cat conftest.$ac_ext >&5
22422   rm -rf conftest*
22423   eval "ac_cv_func__doprnt=no"
22424 fi
22425 rm -f conftest*
22426 fi
22427
22428 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22429   echo "$ac_t""yes" 1>&6
22430   cat >> confdefs.h <<\EOF
22431 #define HAVE_DOPRNT 1
22432 EOF
22433
22434 else
22435   echo "$ac_t""no" 1>&6
22436 fi
22437
22438 fi
22439
22440
22441 if test $ac_cv_func_vprintf = yes ; then
22442                 for ac_func in snprintf vsnprintf
22443 do
22444 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22445 echo "configure:22446: checking for $ac_func" >&5
22446 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22447   echo $ac_n "(cached) $ac_c" 1>&6
22448 else
22449   cat > conftest.$ac_ext <<EOF
22450 #line 22451 "configure"
22451 #include "confdefs.h"
22452 /* System header to define __stub macros and hopefully few prototypes,
22453     which can conflict with char $ac_func(); below.  */
22454 #include <assert.h>
22455 /* Override any gcc2 internal prototype to avoid an error.  */
22456 /* We use char because int might match the return type of a gcc2
22457     builtin and then its argument prototype would still apply.  */
22458 char $ac_func();
22459 char (*f)();
22460
22461 int main() {
22462
22463 /* The GNU C library defines this for functions which it implements
22464     to always fail with ENOSYS.  Some functions are actually named
22465     something starting with __ and the normal name is an alias.  */
22466 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22467 choke me
22468 #else
22469 f = $ac_func;
22470 #endif
22471
22472 ; return 0; }
22473 EOF
22474 if { (eval echo configure:22475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22475   rm -rf conftest*
22476   eval "ac_cv_func_$ac_func=yes"
22477 else
22478   echo "configure: failed program was:" >&5
22479   cat conftest.$ac_ext >&5
22480   rm -rf conftest*
22481   eval "ac_cv_func_$ac_func=no"
22482 fi
22483 rm -f conftest*
22484 fi
22485
22486 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22487   echo "$ac_t""yes" 1>&6
22488     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22489   cat >> confdefs.h <<EOF
22490 #define $ac_tr_func 1
22491 EOF
22492  
22493 else
22494   echo "$ac_t""no" 1>&6
22495 fi
22496 done
22497
22498 fi
22499
22500 for ac_func in \
22501         bcopy                   \
22502         closesocket             \
22503         chroot                  \
22504         endgrent                \
22505         endpwent                \
22506         fcntl                   \
22507         flock                   \
22508         fstat                   \
22509         getdtablesize   \
22510         getgrgid                \
22511         gethostname             \
22512         getpass                 \
22513         getpassphrase   \
22514         getpwuid                \
22515         getpwnam                \
22516         getspnam                \
22517         gettimeofday    \
22518         initgroups              \
22519         lockf                   \
22520         memcpy                  \
22521         memmove                 \
22522         mkstemp                 \
22523         mktemp                  \
22524         pipe                    \
22525         read                    \
22526         recv                    \
22527         recvfrom                \
22528         setpwfile               \
22529         setgid                  \
22530         setegid                 \
22531         setsid                  \
22532         setuid                  \
22533         seteuid                 \
22534         sigaction               \
22535         signal                  \
22536         sigset                  \
22537         strdup                  \
22538         strerror                \
22539         strpbrk                 \
22540         strrchr                 \
22541         strsep                  \
22542         strstr                  \
22543         strtol                  \
22544         strtoul                 \
22545         strtoq                  \
22546         strtouq                 \
22547         strtoll                 \
22548         strspn                  \
22549         sysconf                 \
22550         usleep                  \
22551         waitpid                 \
22552         wait4                   \
22553         write                   \
22554         send                    \
22555         sendmsg                 \
22556         sendto                  \
22557
22558 do
22559 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22560 echo "configure:22561: checking for $ac_func" >&5
22561 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22562   echo $ac_n "(cached) $ac_c" 1>&6
22563 else
22564   cat > conftest.$ac_ext <<EOF
22565 #line 22566 "configure"
22566 #include "confdefs.h"
22567 /* System header to define __stub macros and hopefully few prototypes,
22568     which can conflict with char $ac_func(); below.  */
22569 #include <assert.h>
22570 /* Override any gcc2 internal prototype to avoid an error.  */
22571 /* We use char because int might match the return type of a gcc2
22572     builtin and then its argument prototype would still apply.  */
22573 char $ac_func();
22574 char (*f)();
22575
22576 int main() {
22577
22578 /* The GNU C library defines this for functions which it implements
22579     to always fail with ENOSYS.  Some functions are actually named
22580     something starting with __ and the normal name is an alias.  */
22581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22582 choke me
22583 #else
22584 f = $ac_func;
22585 #endif
22586
22587 ; return 0; }
22588 EOF
22589 if { (eval echo configure:22590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22590   rm -rf conftest*
22591   eval "ac_cv_func_$ac_func=yes"
22592 else
22593   echo "configure: failed program was:" >&5
22594   cat conftest.$ac_ext >&5
22595   rm -rf conftest*
22596   eval "ac_cv_func_$ac_func=no"
22597 fi
22598 rm -f conftest*
22599 fi
22600
22601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22602   echo "$ac_t""yes" 1>&6
22603     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22604   cat >> confdefs.h <<EOF
22605 #define $ac_tr_func 1
22606 EOF
22607  
22608 else
22609   echo "$ac_t""no" 1>&6
22610 fi
22611 done
22612
22613
22614 for ac_func in getopt getpeereid
22615 do
22616 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22617 echo "configure:22618: checking for $ac_func" >&5
22618 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22619   echo $ac_n "(cached) $ac_c" 1>&6
22620 else
22621   cat > conftest.$ac_ext <<EOF
22622 #line 22623 "configure"
22623 #include "confdefs.h"
22624 /* System header to define __stub macros and hopefully few prototypes,
22625     which can conflict with char $ac_func(); below.  */
22626 #include <assert.h>
22627 /* Override any gcc2 internal prototype to avoid an error.  */
22628 /* We use char because int might match the return type of a gcc2
22629     builtin and then its argument prototype would still apply.  */
22630 char $ac_func();
22631 char (*f)();
22632
22633 int main() {
22634
22635 /* The GNU C library defines this for functions which it implements
22636     to always fail with ENOSYS.  Some functions are actually named
22637     something starting with __ and the normal name is an alias.  */
22638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22639 choke me
22640 #else
22641 f = $ac_func;
22642 #endif
22643
22644 ; return 0; }
22645 EOF
22646 if { (eval echo configure:22647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22647   rm -rf conftest*
22648   eval "ac_cv_func_$ac_func=yes"
22649 else
22650   echo "configure: failed program was:" >&5
22651   cat conftest.$ac_ext >&5
22652   rm -rf conftest*
22653   eval "ac_cv_func_$ac_func=no"
22654 fi
22655 rm -f conftest*
22656 fi
22657
22658 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22659   echo "$ac_t""yes" 1>&6
22660     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22661   cat >> confdefs.h <<EOF
22662 #define $ac_tr_func 1
22663 EOF
22664  
22665 else
22666   echo "$ac_t""no" 1>&6
22667 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22668 fi
22669 done
22670
22671
22672
22673 if test "$ac_cv_func_getopt" != yes; then
22674         LIBSRCS="$LIBSRCS getopt.c"
22675 fi
22676 if test "$ac_cv_func_getpeereid" != yes; then
22677         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22678 echo "configure:22679: checking for msg_accrights in msghdr" >&5
22679 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22680   echo $ac_n "(cached) $ac_c" 1>&6
22681 else
22682   cat > conftest.$ac_ext <<EOF
22683 #line 22684 "configure"
22684 #include "confdefs.h"
22685 #include <sys/socket.h>
22686 int main() {
22687 struct msghdr m; m.msg_accrightslen=0
22688 ; return 0; }
22689 EOF
22690 if { (eval echo configure:22691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22691   rm -rf conftest*
22692   ol_cv_msghdr_msg_accrights=yes
22693 else
22694   echo "configure: failed program was:" >&5
22695   cat conftest.$ac_ext >&5
22696   rm -rf conftest*
22697   ol_cv_msghdr_msg_accrights=no
22698 fi
22699 rm -f conftest*
22700         
22701 fi
22702
22703 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22704   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22705         cat >> confdefs.h <<\EOF
22706 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22707 EOF
22708
22709   fi
22710
22711         LIBSRCS="$LIBSRCS getpeereid.c"
22712 fi
22713 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22714         if test "$ac_cv_func_snprintf" != yes; then
22715                 cat >> confdefs.h <<\EOF
22716 #define snprintf ber_pvt_snprintf
22717 EOF
22718
22719         fi
22720         if test "$ac_cv_func_vsnprintf" != yes; then
22721                 cat >> confdefs.h <<\EOF
22722 #define vsnprintf ber_pvt_vsnprintf
22723 EOF
22724
22725         fi
22726 fi
22727
22728 # Check Configuration
22729 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22730 echo "configure:22731: checking declaration of sys_errlist" >&5
22731 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22732   echo $ac_n "(cached) $ac_c" 1>&6
22733 else
22734   
22735         cat > conftest.$ac_ext <<EOF
22736 #line 22737 "configure"
22737 #include "confdefs.h"
22738
22739 #include <stdio.h>
22740 #include <sys/types.h>
22741 #include <errno.h>
22742 #ifdef WINNT
22743 #include <stdlib.h>
22744 #endif 
22745 int main() {
22746 char *c = (char *) *sys_errlist
22747 ; return 0; }
22748 EOF
22749 if { (eval echo configure:22750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22750   rm -rf conftest*
22751   ol_cv_dcl_sys_errlist=yes
22752         ol_cv_have_sys_errlist=yes
22753 else
22754   echo "configure: failed program was:" >&5
22755   cat conftest.$ac_ext >&5
22756   rm -rf conftest*
22757   ol_cv_dcl_sys_errlist=no
22758 fi
22759 rm -f conftest*
22760 fi
22761
22762 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22763 #
22764 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22765 if test $ol_cv_dcl_sys_errlist = no ; then
22766         cat >> confdefs.h <<\EOF
22767 #define DECL_SYS_ERRLIST 1
22768 EOF
22769
22770
22771         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22772 echo "configure:22773: checking existence of sys_errlist" >&5
22773 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22774   echo $ac_n "(cached) $ac_c" 1>&6
22775 else
22776   
22777                 cat > conftest.$ac_ext <<EOF
22778 #line 22779 "configure"
22779 #include "confdefs.h"
22780 #include <errno.h>
22781 int main() {
22782 char *c = (char *) *sys_errlist
22783 ; return 0; }
22784 EOF
22785 if { (eval echo configure:22786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22786   rm -rf conftest*
22787   ol_cv_have_sys_errlist=yes
22788 else
22789   echo "configure: failed program was:" >&5
22790   cat conftest.$ac_ext >&5
22791   rm -rf conftest*
22792   ol_cv_have_sys_errlist=no
22793 fi
22794 rm -f conftest*
22795 fi
22796
22797 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22798 fi
22799 if test $ol_cv_have_sys_errlist = yes ; then
22800         cat >> confdefs.h <<\EOF
22801 #define HAVE_SYS_ERRLIST 1
22802 EOF
22803
22804 fi
22805
22806
22807
22808 if test "$ol_enable_slapi" != no ; then
22809                         for ac_hdr in ltdl.h
22810 do
22811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22813 echo "configure:22814: checking for $ac_hdr" >&5
22814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22815   echo $ac_n "(cached) $ac_c" 1>&6
22816 else
22817   cat > conftest.$ac_ext <<EOF
22818 #line 22819 "configure"
22819 #include "confdefs.h"
22820 #include <$ac_hdr>
22821 EOF
22822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22823 { (eval echo configure:22824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22825 if test -z "$ac_err"; then
22826   rm -rf conftest*
22827   eval "ac_cv_header_$ac_safe=yes"
22828 else
22829   echo "$ac_err" >&5
22830   echo "configure: failed program was:" >&5
22831   cat conftest.$ac_ext >&5
22832   rm -rf conftest*
22833   eval "ac_cv_header_$ac_safe=no"
22834 fi
22835 rm -f conftest*
22836 fi
22837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22838   echo "$ac_t""yes" 1>&6
22839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22840   cat >> confdefs.h <<EOF
22841 #define $ac_tr_hdr 1
22842 EOF
22843  
22844 else
22845   echo "$ac_t""no" 1>&6
22846 fi
22847 done
22848
22849
22850         if test $ac_cv_header_ltdl_h != yes ; then
22851                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22852         fi
22853         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22854 echo "configure:22855: checking for lt_dlinit in -lltdl" >&5
22855 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22856 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22857   echo $ac_n "(cached) $ac_c" 1>&6
22858 else
22859   ac_save_LIBS="$LIBS"
22860 LIBS="-lltdl  $LIBS"
22861 cat > conftest.$ac_ext <<EOF
22862 #line 22863 "configure"
22863 #include "confdefs.h"
22864 /* Override any gcc2 internal prototype to avoid an error.  */
22865 /* We use char because int might match the return type of a gcc2
22866     builtin and then its argument prototype would still apply.  */
22867 char lt_dlinit();
22868
22869 int main() {
22870 lt_dlinit()
22871 ; return 0; }
22872 EOF
22873 if { (eval echo configure:22874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22874   rm -rf conftest*
22875   eval "ac_cv_lib_$ac_lib_var=yes"
22876 else
22877   echo "configure: failed program was:" >&5
22878   cat conftest.$ac_ext >&5
22879   rm -rf conftest*
22880   eval "ac_cv_lib_$ac_lib_var=no"
22881 fi
22882 rm -f conftest*
22883 LIBS="$ac_save_LIBS"
22884
22885 fi
22886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22887   echo "$ac_t""yes" 1>&6
22888   
22889                 SLAPI_LIBS=-lltdl
22890                 LIBSLAPI=libslapi.a
22891                 LIBSLAPITOOLS=../libslapi.a
22892                 cat >> confdefs.h <<\EOF
22893 #define HAVE_LIBLTDL 1
22894 EOF
22895
22896         
22897 else
22898   echo "$ac_t""no" 1>&6
22899 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22900 fi
22901
22902
22903         cat >> confdefs.h <<\EOF
22904 #define LDAP_SLAPI 1
22905 EOF
22906
22907 fi
22908
22909 if test "$ol_enable_debug" != no ; then
22910         cat >> confdefs.h <<\EOF
22911 #define LDAP_DEBUG 1
22912 EOF
22913
22914 fi
22915 if test "$ol_enable_syslog" = yes ; then
22916         cat >> confdefs.h <<\EOF
22917 #define LDAP_SYSLOG 1
22918 EOF
22919
22920 fi
22921 if test "$ol_link_kbind" != no ; then
22922         cat >> confdefs.h <<\EOF
22923 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22924 EOF
22925
22926 fi
22927 if test "$ol_enable_proctitle" != no ; then
22928         cat >> confdefs.h <<\EOF
22929 #define LDAP_PROCTITLE 1
22930 EOF
22931
22932 fi
22933 if test "$ol_enable_referrals" != no ; then
22934         cat >> confdefs.h <<\EOF
22935 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22936 EOF
22937
22938 fi
22939 if test "$ol_enable_local" != no; then
22940         cat >> confdefs.h <<\EOF
22941 #define LDAP_PF_LOCAL 1
22942 EOF
22943
22944 fi
22945 if test "$ol_link_ipv6" != no; then
22946         cat >> confdefs.h <<\EOF
22947 #define LDAP_PF_INET6 1
22948 EOF
22949
22950 fi
22951 if test "$ol_enable_cleartext" != no ; then
22952         cat >> confdefs.h <<\EOF
22953 #define SLAPD_CLEARTEXT 1
22954 EOF
22955
22956 fi
22957 if test "$ol_enable_crypt" != no ; then
22958         cat >> confdefs.h <<\EOF
22959 #define SLAPD_CRYPT 1
22960 EOF
22961
22962 fi
22963 if test "$ol_link_kpasswd" != no ; then
22964         cat >> confdefs.h <<\EOF
22965 #define SLAPD_KPASSWD 1
22966 EOF
22967
22968 fi
22969 if test "$ol_link_spasswd" != no ; then
22970         cat >> confdefs.h <<\EOF
22971 #define SLAPD_SPASSWD 1
22972 EOF
22973
22974 fi
22975 if test "$ol_enable_multimaster" != no ; then
22976         cat >> confdefs.h <<\EOF
22977 #define SLAPD_MULTIMASTER 1
22978 EOF
22979
22980 fi
22981 if test "$ol_enable_rlookups" != no ; then
22982         cat >> confdefs.h <<\EOF
22983 #define SLAPD_RLOOKUPS 1
22984 EOF
22985
22986 fi
22987 if test "$ol_enable_aci" != no ; then
22988         cat >> confdefs.h <<\EOF
22989 #define SLAPD_ACI_ENABLED 1
22990 EOF
22991
22992 fi
22993
22994 if test "$ol_link_modules" != no ; then
22995         cat >> confdefs.h <<\EOF
22996 #define SLAPD_MODULES 1
22997 EOF
22998
22999         BUILD_SLAPD=yes
23000         SLAPD_MODULES_LDFLAGS="-dlopen self"
23001 fi
23002
23003 if test "$ol_enable_bdb" != no ; then
23004         cat >> confdefs.h <<\EOF
23005 #define SLAPD_BDB 1
23006 EOF
23007
23008         BUILD_SLAPD=yes
23009         BUILD_BDB=yes
23010         if test "$ol_with_bdb_module" != static ; then
23011                 cat >> confdefs.h <<\EOF
23012 #define SLAPD_BDB_DYNAMIC 1
23013 EOF
23014
23015                 BUILD_BDB=mod
23016                 BUILD_BDB_DYNAMIC=shared
23017                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23018         else
23019                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23020         fi
23021 fi
23022
23023 if test "$ol_link_dnssrv" != no ; then
23024         cat >> confdefs.h <<\EOF
23025 #define SLAPD_DNSSRV 1
23026 EOF
23027
23028         BUILD_SLAPD=yes
23029         BUILD_DNSSRV=yes
23030         if test "$ol_with_dnssrv_module" != static ; then
23031                 cat >> confdefs.h <<\EOF
23032 #define SLAPD_DNSSRV_DYNAMIC 1
23033 EOF
23034
23035                 BUILD_DNSSRV=mod
23036                 BUILD_DNSSRV_DYNAMIC=shared
23037                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23038         else
23039                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23040         fi
23041 fi
23042
23043 if test "$ol_enable_hdb" != no ; then
23044         cat >> confdefs.h <<\EOF
23045 #define SLAPD_HDB 1
23046 EOF
23047
23048         BUILD_SLAPD=yes
23049         BUILD_HDB=yes
23050         if test "$ol_with_hdb_module" != static ; then
23051                 cat >> confdefs.h <<\EOF
23052 #define SLAPD_HDB_DYNAMIC 1
23053 EOF
23054
23055                 BUILD_HDB=mod
23056                 BUILD_HDB_DYNAMIC=shared
23057                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23058         else
23059                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23060         fi
23061 fi
23062
23063 if test "$ol_enable_ldap" != no ; then
23064         cat >> confdefs.h <<\EOF
23065 #define SLAPD_LDAP 1
23066 EOF
23067
23068         BUILD_SLAPD=yes
23069         BUILD_LDAP=yes
23070         if test "$ol_with_ldap_module" != static ; then
23071                 cat >> confdefs.h <<\EOF
23072 #define SLAPD_LDAP_DYNAMIC 1
23073 EOF
23074
23075                 BUILD_LDAP=mod
23076                 BUILD_LDAP_DYNAMIC=shared
23077                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23078         else
23079                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23080         fi
23081 fi
23082
23083 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23084         cat >> confdefs.h <<\EOF
23085 #define SLAPD_LDBM 1
23086 EOF
23087
23088         BUILD_SLAPD=yes
23089         BUILD_LDBM=yes
23090         if test "$ol_with_ldbm_module" != static ; then
23091                 cat >> confdefs.h <<\EOF
23092 #define SLAPD_LDBM_DYNAMIC 1
23093 EOF
23094
23095                 BUILD_LDBM=mod
23096                 BUILD_LDBM_DYNAMIC=shared
23097                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23098         else
23099                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23100         fi
23101 fi
23102
23103 if test "$ol_enable_meta" != no ; then
23104         if test "$ol_enable_ldap" = no ; then
23105                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23106         fi
23107         if test "$ol_enable_rewrite" = no ; then
23108                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23109         fi
23110         cat >> confdefs.h <<\EOF
23111 #define SLAPD_META 1
23112 EOF
23113
23114         BUILD_SLAPD=yes
23115         BUILD_META=yes
23116         BUILD_REWRITE=yes
23117         if test $ol_enable_ldbm = yes -o \
23118                 $ol_enable_bdb = yes ; then 
23119                 BUILD_CACHE=yes
23120         fi
23121         if test "$ol_with_meta_module" != static ; then
23122                 cat >> confdefs.h <<\EOF
23123 #define SLAPD_META_DYNAMIC 1
23124 EOF
23125
23126                 BUILD_META=mod
23127                 BUILD_META_DYNAMIC=shared
23128                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23129         else
23130                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23131         fi
23132 fi
23133
23134 if test "$ol_enable_monitor" != no ; then
23135         cat >> confdefs.h <<\EOF
23136 #define SLAPD_MONITOR 1
23137 EOF
23138
23139         BUILD_SLAPD=yes
23140         BUILD_MONITOR=yes
23141         if test "$ol_with_monitor_module" != static ; then
23142                 cat >> confdefs.h <<\EOF
23143 #define SLAPD_MONITOR_DYNAMIC 1
23144 EOF
23145
23146                 BUILD_MONITOR=mod
23147                 BUILD_MONITOR_DYNAMIC=shared
23148                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23149         else
23150                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23151         fi
23152 fi
23153
23154 if test "$ol_enable_null" != no ; then
23155         cat >> confdefs.h <<\EOF
23156 #define SLAPD_NULL 1
23157 EOF
23158
23159         BUILD_SLAPD=yes
23160         BUILD_NULL=yes
23161         if test "$ol_with_null_module" != static ; then
23162                 cat >> confdefs.h <<\EOF
23163 #define SLAPD_NULL_DYNAMIC 1
23164 EOF
23165
23166                 BUILD_NULL=mod
23167                 BUILD_NULL_DYNAMIC=shared
23168                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23169         else
23170                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23171         fi
23172 fi
23173
23174 if test "$ol_enable_passwd" != no ; then
23175         cat >> confdefs.h <<\EOF
23176 #define SLAPD_PASSWD 1
23177 EOF
23178
23179         BUILD_SLAPD=yes
23180         BUILD_PASSWD=yes
23181         if test "$ol_with_passwd_module" != static ; then
23182                 cat >> confdefs.h <<\EOF
23183 #define SLAPD_PASSWD_DYNAMIC 1
23184 EOF
23185
23186                 BUILD_PASSWD=mod
23187                 BUILD_PASSWD_DYNAMIC=shared
23188                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23189         else
23190                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23191         fi
23192 fi
23193
23194 if test "$ol_link_perl" != no ; then
23195         cat >> confdefs.h <<\EOF
23196 #define SLAPD_PERL 1
23197 EOF
23198
23199         BUILD_SLAPD=yes
23200         BUILD_PERL=yes
23201         if test "$ol_with_perl_module" != static ; then
23202                 cat >> confdefs.h <<\EOF
23203 #define SLAPD_PERL_DYNAMIC 1
23204 EOF
23205
23206                 BUILD_PERL=mod
23207                 BUILD_PERL_DYNAMIC=shared
23208                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23209         else
23210                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23211         fi
23212 fi
23213
23214 if test "$ol_enable_shell" != no ; then
23215         if test "$ol_link_thread" != no ; then
23216                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23217         fi
23218         cat >> confdefs.h <<\EOF
23219 #define SLAPD_SHELL 1
23220 EOF
23221
23222         BUILD_SLAPD=yes
23223         BUILD_SHELL=yes
23224         if test "$ol_with_shell_module" != static ; then
23225                 cat >> confdefs.h <<\EOF
23226 #define SLAPD_SHELL_DYNAMIC 1
23227 EOF
23228
23229                 BUILD_SHELL=mod
23230                 BUILD_SHELL_DYNAMIC=shared
23231                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23232         else
23233                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23234         fi
23235 fi
23236
23237 if test "$ol_link_sql" != no ; then
23238         cat >> confdefs.h <<\EOF
23239 #define SLAPD_SQL 1
23240 EOF
23241
23242         BUILD_SLAPD=yes
23243         BUILD_SQL=yes
23244         if test "$ol_with_sql_module" != static; then
23245                 cat >> confdefs.h <<\EOF
23246 #define SLAPD_SQL_DYNAMIC 1
23247 EOF
23248
23249                 BUILD_SQL=mod
23250                 BUILD_SQL_DYNAMIC=shared
23251                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23252         else
23253                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23254         fi
23255 fi
23256
23257 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23258         $BUILD_SLAPD = yes ; then
23259         BUILD_SLURPD=yes
23260 fi
23261
23262 if test "$ol_enable_rewrite" != no ; then
23263         cat >> confdefs.h <<\EOF
23264 #define ENABLE_REWRITE 1
23265 EOF
23266
23267         BUILD_REWRITE=yes
23268 fi
23269
23270 if test "$ol_enable_slapi" != no ; then
23271         cat >> confdefs.h <<\EOF
23272 #define ENABLE_SLAPI 1
23273 EOF
23274
23275         BUILD_SLAPI=yes
23276         SLAPD_SLAPI_DEPEND=libslapi.a
23277 fi
23278
23279
23280
23281 if test "$ac_cv_mingw32" = yes ; then
23282         PLAT=NT
23283         SLAPD_MODULES_LDFLAGS=
23284 else
23285         PLAT=UNIX
23286 fi
23287
23288 if test -z "$SLAPD_STATIC_BACKENDS"; then
23289         SLAPD_NO_STATIC='#'
23290 else
23291         SLAPD_NO_STATIC=
23292 fi
23293
23294
23295
23296
23297
23298
23299   
23300   
23301   
23302   
23303   
23304   
23305   
23306   
23307   
23308   
23309   
23310   
23311   
23312   
23313   
23314   
23315   
23316   
23317   
23318   
23319   
23320   
23321   
23322   
23323   
23324   
23325   
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365 # Check whether --with-xxinstall or --without-xxinstall was given.
23366 if test "${with_xxinstall+set}" = set; then
23367   withval="$with_xxinstall"
23368   :
23369 fi
23370
23371
23372
23373 trap '' 1 2 15
23374
23375 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23376
23377 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23378 # Let make expand exec_prefix.
23379 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23380
23381 # Any assignment to VPATH causes Sun make to only execute
23382 # the first set of double-colon rules, so remove it if not needed.
23383 # If there is a colon in the path, we need to keep it.
23384 if test "x$srcdir" = x.; then
23385   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23386 fi
23387
23388 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23389
23390 DEFS=-DHAVE_CONFIG_H
23391
23392 # Without the "./", some shells look in PATH for config.status.
23393 : ${CONFIG_STATUS=./config.status}
23394
23395 echo creating $CONFIG_STATUS
23396 rm -f $CONFIG_STATUS
23397 cat > $CONFIG_STATUS <<EOF
23398 #! /bin/sh
23399 # Generated automatically by configure.
23400 # Run this file to recreate the current configuration.
23401 # This directory was configured as follows,
23402 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23403 #
23404 # $0 $ac_configure_args
23405 #
23406 # Compiler output produced by configure, useful for debugging
23407 # configure, is in ./config.log if it exists.
23408
23409 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23410 for ac_option
23411 do
23412   case "\$ac_option" in
23413   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23414     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23415     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23416   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23417     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23418     exit 0 ;;
23419   -help | --help | --hel | --he | --h)
23420     echo "\$ac_cs_usage"; exit 0 ;;
23421   *) echo "\$ac_cs_usage"; exit 1 ;;
23422   esac
23423 done
23424
23425 ac_given_srcdir=$srcdir
23426 ac_given_INSTALL="$INSTALL"
23427
23428 trap 'rm -fr `echo "\
23429 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23430 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23431 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23432 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23433 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23434 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23435 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23436 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23437 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23438 include/Makefile:build/top.mk:include/Makefile.in \
23439 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23440 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23441 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23442 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23443 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23444 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23445 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23446 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23447 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23448 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23449 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23450 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23451 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23452 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23453 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23454 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23455 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23456 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23457 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23458 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23459 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23460 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23461 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23462 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23463 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23464 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23465 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23466 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23467 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23468 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23469  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23470 EOF
23471 cat >> $CONFIG_STATUS <<EOF
23472
23473 # Protect against being on the right side of a sed subst in config.status.
23474 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23475  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23476 $ac_vpsub
23477 $extrasub
23478 s%@SHELL@%$SHELL%g
23479 s%@CFLAGS@%$CFLAGS%g
23480 s%@CPPFLAGS@%$CPPFLAGS%g
23481 s%@CXXFLAGS@%$CXXFLAGS%g
23482 s%@FFLAGS@%$FFLAGS%g
23483 s%@DEFS@%$DEFS%g
23484 s%@LDFLAGS@%$LDFLAGS%g
23485 s%@LIBS@%$LIBS%g
23486 s%@exec_prefix@%$exec_prefix%g
23487 s%@prefix@%$prefix%g
23488 s%@program_transform_name@%$program_transform_name%g
23489 s%@bindir@%$bindir%g
23490 s%@sbindir@%$sbindir%g
23491 s%@libexecdir@%$libexecdir%g
23492 s%@datadir@%$datadir%g
23493 s%@sysconfdir@%$sysconfdir%g
23494 s%@sharedstatedir@%$sharedstatedir%g
23495 s%@localstatedir@%$localstatedir%g
23496 s%@libdir@%$libdir%g
23497 s%@includedir@%$includedir%g
23498 s%@oldincludedir@%$oldincludedir%g
23499 s%@infodir@%$infodir%g
23500 s%@mandir@%$mandir%g
23501 s%@host@%$host%g
23502 s%@host_alias@%$host_alias%g
23503 s%@host_cpu@%$host_cpu%g
23504 s%@host_vendor@%$host_vendor%g
23505 s%@host_os@%$host_os%g
23506 s%@target@%$target%g
23507 s%@target_alias@%$target_alias%g
23508 s%@target_cpu@%$target_cpu%g
23509 s%@target_vendor@%$target_vendor%g
23510 s%@target_os@%$target_os%g
23511 s%@build@%$build%g
23512 s%@build_alias@%$build_alias%g
23513 s%@build_cpu@%$build_cpu%g
23514 s%@build_vendor@%$build_vendor%g
23515 s%@build_os@%$build_os%g
23516 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23517 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23518 s%@INSTALL_DATA@%$INSTALL_DATA%g
23519 s%@PACKAGE@%$PACKAGE%g
23520 s%@VERSION@%$VERSION%g
23521 s%@ACLOCAL@%$ACLOCAL%g
23522 s%@AUTOCONF@%$AUTOCONF%g
23523 s%@AUTOMAKE@%$AUTOMAKE%g
23524 s%@AUTOHEADER@%$AUTOHEADER%g
23525 s%@MAKEINFO@%$MAKEINFO%g
23526 s%@install_sh@%$install_sh%g
23527 s%@AMTAR@%$AMTAR%g
23528 s%@AWK@%$AWK%g
23529 s%@AMTARFLAGS@%$AMTARFLAGS%g
23530 s%@SET_MAKE@%$SET_MAKE%g
23531 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23532 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23533 s%@top_builddir@%$top_builddir%g
23534 s%@ldap_subdir@%$ldap_subdir%g
23535 s%@CC@%$CC%g
23536 s%@AR@%$AR%g
23537 s%@LN_S@%$LN_S%g
23538 s%@OBJEXT@%$OBJEXT%g
23539 s%@EXEEXT@%$EXEEXT%g
23540 s%@ECHO@%$ECHO%g
23541 s%@RANLIB@%$RANLIB%g
23542 s%@STRIP@%$STRIP%g
23543 s%@DLLTOOL@%$DLLTOOL%g
23544 s%@AS@%$AS%g
23545 s%@OBJDUMP@%$OBJDUMP%g
23546 s%@CPP@%$CPP%g
23547 s%@LIBTOOL@%$LIBTOOL%g
23548 s%@LN_H@%$LN_H%g
23549 s%@PERLBIN@%$PERLBIN%g
23550 s%@OL_MKDEP@%$OL_MKDEP%g
23551 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23552 s%@LTSTATIC@%$LTSTATIC%g
23553 s%@LIBOBJS@%$LIBOBJS%g
23554 s%@LIBSRCS@%$LIBSRCS%g
23555 s%@PLAT@%$PLAT%g
23556 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23557 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23558 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23559 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23560 s%@BUILD_BDB@%$BUILD_BDB%g
23561 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23562 s%@BUILD_HDB@%$BUILD_HDB%g
23563 s%@BUILD_LDAP@%$BUILD_LDAP%g
23564 s%@BUILD_LDBM@%$BUILD_LDBM%g
23565 s%@BUILD_META@%$BUILD_META%g
23566 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23567 s%@BUILD_CACHE@%$BUILD_CACHE%g
23568 s%@BUILD_NULL@%$BUILD_NULL%g
23569 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23570 s%@BUILD_PERL@%$BUILD_PERL%g
23571 s%@BUILD_SHELL@%$BUILD_SHELL%g
23572 s%@BUILD_SQL@%$BUILD_SQL%g
23573 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23574 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23575 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23576 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23577 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23578 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23579 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23580 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23581 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23582 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23583 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23584 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23585 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23586 s%@LDAP_LIBS@%$LDAP_LIBS%g
23587 s%@LDIF_LIBS@%$LDIF_LIBS%g
23588 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23589 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23590 s%@LDBM_LIBS@%$LDBM_LIBS%g
23591 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23592 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23593 s%@WRAP_LIBS@%$WRAP_LIBS%g
23594 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23595 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23596 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23597 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23598 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23599 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23600 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23601 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23602 s%@KRB4_LIBS@%$KRB4_LIBS%g
23603 s%@KRB5_LIBS@%$KRB5_LIBS%g
23604 s%@SASL_LIBS@%$SASL_LIBS%g
23605 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23606 s%@TLS_LIBS@%$TLS_LIBS%g
23607 s%@MODULES_LIBS@%$MODULES_LIBS%g
23608 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23609 s%@LIBSLAPI@%$LIBSLAPI%g
23610 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23611 s%@AUTH_LIBS@%$AUTH_LIBS%g
23612 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23613 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23614 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23615 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23616
23617 CEOF
23618 EOF
23619
23620 cat >> $CONFIG_STATUS <<\EOF
23621
23622 # Split the substitutions into bite-sized pieces for seds with
23623 # small command number limits, like on Digital OSF/1 and HP-UX.
23624 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23625 ac_file=1 # Number of current file.
23626 ac_beg=1 # First line for current file.
23627 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23628 ac_more_lines=:
23629 ac_sed_cmds=""
23630 while $ac_more_lines; do
23631   if test $ac_beg -gt 1; then
23632     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23633   else
23634     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23635   fi
23636   if test ! -s conftest.s$ac_file; then
23637     ac_more_lines=false
23638     rm -f conftest.s$ac_file
23639   else
23640     if test -z "$ac_sed_cmds"; then
23641       ac_sed_cmds="sed -f conftest.s$ac_file"
23642     else
23643       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23644     fi
23645     ac_file=`expr $ac_file + 1`
23646     ac_beg=$ac_end
23647     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23648   fi
23649 done
23650 if test -z "$ac_sed_cmds"; then
23651   ac_sed_cmds=cat
23652 fi
23653 EOF
23654
23655 cat >> $CONFIG_STATUS <<EOF
23656
23657 CONFIG_FILES=\${CONFIG_FILES-"\
23658 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23659 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23660 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23661 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23662 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23663 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23664 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23665 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23666 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23667 include/Makefile:build/top.mk:include/Makefile.in \
23668 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23669 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23670 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23671 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23672 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23673 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23674 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23675 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23676 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23677 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23678 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23679 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23680 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23681 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23682 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23683 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23684 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23685 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23686 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23687 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23688 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23689 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23690 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23691 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23692 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23693 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23694 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23695 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23696 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23697 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23698 "}
23699 EOF
23700 cat >> $CONFIG_STATUS <<\EOF
23701 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23702   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23703   case "$ac_file" in
23704   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23705        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23706   *) ac_file_in="${ac_file}.in" ;;
23707   esac
23708
23709   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23710
23711   # Remove last slash and all that follows it.  Not all systems have dirname.
23712   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23713   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23714     # The file is in a subdirectory.
23715     test ! -d "$ac_dir" && mkdir "$ac_dir"
23716     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23717     # A "../" for each directory in $ac_dir_suffix.
23718     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23719   else
23720     ac_dir_suffix= ac_dots=
23721   fi
23722
23723   case "$ac_given_srcdir" in
23724   .)  srcdir=.
23725       if test -z "$ac_dots"; then top_srcdir=.
23726       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23727   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23728   *) # Relative path.
23729     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23730     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23731   esac
23732
23733   case "$ac_given_INSTALL" in
23734   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23735   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23736   esac
23737
23738   echo creating "$ac_file"
23739   rm -f "$ac_file"
23740   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23741   case "$ac_file" in
23742   *[Mm]akefile*) ac_comsub="1i\\
23743 # $configure_input" ;;
23744   *) ac_comsub= ;;
23745   esac
23746
23747   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23748   sed -e "$ac_comsub
23749 s%@configure_input@%$configure_input%g
23750 s%@srcdir@%$srcdir%g
23751 s%@top_srcdir@%$top_srcdir%g
23752 s%@INSTALL@%$INSTALL%g
23753 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23754 fi; done
23755 rm -f conftest.s*
23756
23757 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23758 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23759 #
23760 # ac_d sets the value in "#define NAME VALUE" lines.
23761 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23762 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23763 ac_dC='\3'
23764 ac_dD='%g'
23765 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23766 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23767 ac_uB='\([      ]\)%\1#\2define\3'
23768 ac_uC=' '
23769 ac_uD='\4%g'
23770 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23771 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23772 ac_eB='$%\1#\2define\3'
23773 ac_eC=' '
23774 ac_eD='%g'
23775
23776 if test "${CONFIG_HEADERS+set}" != set; then
23777 EOF
23778 cat >> $CONFIG_STATUS <<EOF
23779   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23780 EOF
23781 cat >> $CONFIG_STATUS <<\EOF
23782 fi
23783 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23784   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23785   case "$ac_file" in
23786   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23787        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23788   *) ac_file_in="${ac_file}.in" ;;
23789   esac
23790
23791   echo creating $ac_file
23792
23793   rm -f conftest.frag conftest.in conftest.out
23794   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23795   cat $ac_file_inputs > conftest.in
23796
23797 EOF
23798
23799 # Transform confdefs.h into a sed script conftest.vals that substitutes
23800 # the proper values into config.h.in to produce config.h.  And first:
23801 # Protect against being on the right side of a sed subst in config.status.
23802 # Protect against being in an unquoted here document in config.status.
23803 rm -f conftest.vals
23804 cat > conftest.hdr <<\EOF
23805 s/[\\&%]/\\&/g
23806 s%[\\$`]%\\&%g
23807 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23808 s%ac_d%ac_u%gp
23809 s%ac_u%ac_e%gp
23810 EOF
23811 sed -n -f conftest.hdr confdefs.h > conftest.vals
23812 rm -f conftest.hdr
23813
23814 # This sed command replaces #undef with comments.  This is necessary, for
23815 # example, in the case of _POSIX_SOURCE, which is predefined and required
23816 # on some systems where configure will not decide to define it.
23817 cat >> conftest.vals <<\EOF
23818 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23819 EOF
23820
23821 # Break up conftest.vals because some shells have a limit on
23822 # the size of here documents, and old seds have small limits too.
23823
23824 rm -f conftest.tail
23825 while :
23826 do
23827   ac_lines=`grep -c . conftest.vals`
23828   # grep -c gives empty output for an empty file on some AIX systems.
23829   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23830   # Write a limited-size here document to conftest.frag.
23831   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23832   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23833   echo 'CEOF
23834   sed -f conftest.frag conftest.in > conftest.out
23835   rm -f conftest.in
23836   mv conftest.out conftest.in
23837 ' >> $CONFIG_STATUS
23838   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23839   rm -f conftest.vals
23840   mv conftest.tail conftest.vals
23841 done
23842 rm -f conftest.vals
23843
23844 cat >> $CONFIG_STATUS <<\EOF
23845   rm -f conftest.frag conftest.h
23846   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23847   cat conftest.in >> conftest.h
23848   rm -f conftest.in
23849   if cmp -s $ac_file conftest.h 2>/dev/null; then
23850     echo "$ac_file is unchanged"
23851     rm -f conftest.h
23852   else
23853     # Remove last slash and all that follows it.  Not all systems have dirname.
23854       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23855       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23856       # The file is in a subdirectory.
23857       test ! -d "$ac_dir" && mkdir "$ac_dir"
23858     fi
23859     rm -f $ac_file
23860     mv conftest.h $ac_file
23861   fi
23862 fi; done
23863
23864 EOF
23865 cat >> $CONFIG_STATUS <<EOF
23866
23867 EOF
23868 cat >> $CONFIG_STATUS <<\EOF
23869
23870 date > stamp-h
23871 echo Please run \"make depend\" to build dependencies
23872
23873 exit 0
23874 EOF
23875 chmod +x $CONFIG_STATUS
23876 rm -fr confdefs* $ac_clean_files
23877 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23878