]> git.sur5r.net Git - openldap/blob - configure
5b79ea77d042ce77ed8e97461442b6f604fbede9
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.6 2003/09/22 14:34: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-threads          with threads [auto]"
50 ac_help="$ac_help
51   --with-tls              with TLS/SSL support [auto]"
52 ac_help="$ac_help
53   --with-yielding-select  with implicitly yielding select [auto]"
54 ac_help="$ac_help
55
56 SLAPD (Standalone LDAP Daemon) Options:"
57 ac_help="$ac_help
58   --enable-slapd          enable building slapd [yes]"
59 ac_help="$ac_help
60     --enable-aci          enable per-object ACIs (experimental) [no]"
61 ac_help="$ac_help
62     --enable-cleartext    enable cleartext passwords [yes]"
63 ac_help="$ac_help
64     --enable-crypt        enable crypt(3) passwords [no]"
65 ac_help="$ac_help
66     --enable-kpasswd      enable Kerberos password verification [no]"
67 ac_help="$ac_help
68     --enable-lmpasswd     enable LAN Manager passwords [no]"
69 ac_help="$ac_help
70     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
71 ac_help="$ac_help
72     --enable-modules      enable dynamic module support [no]"
73 ac_help="$ac_help
74     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
75 ac_help="$ac_help
76     --enable-rlookups     enable reverse lookups of client hostnames [no]"
77 ac_help="$ac_help
78     --enable-slapi        enable SLAPI support (experimental) [no]"
79 ac_help="$ac_help
80     --enable-slp          enable SLPv2 support [no]"
81 ac_help="$ac_help
82     --enable-wrappers     enable tcp wrapper support [no]"
83 ac_help="$ac_help
84     --enable-bdb          enable Berkeley DB backend [yes]"
85 ac_help="$ac_help
86     --with-bdb-module     module type static|dynamic [static]"
87 ac_help="$ac_help
88     --enable-dnssrv       enable dnssrv backend [no]"
89 ac_help="$ac_help
90     --with-dnssrv-module  module type static|dynamic [static]"
91 ac_help="$ac_help
92     --enable-hdb          enable Hierarchical DB backend [no]"
93 ac_help="$ac_help
94     --with-hdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend [no]"
97 ac_help="$ac_help
98     --with-ldap-module    module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend [no]"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
103 ac_help="$ac_help
104     --with-ldbm-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend [no]"
109 ac_help="$ac_help
110     --with-meta-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --enable-monitor      enable monitor backend [no]"
113 ac_help="$ac_help
114     --with-monitor-module module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-null         enable null backend [no]"
117 ac_help="$ac_help
118     --with-null-module    module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-passwd       enable passwd backend [no]"
121 ac_help="$ac_help
122     --with-passwd-module  module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-perl         enable perl backend [no]"
125 ac_help="$ac_help
126     --with-perl-module    module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-shell        enable shell backend [no]"
129 ac_help="$ac_help
130     --with-shell-module   module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-sql          enable sql backend [no]"
133 ac_help="$ac_help
134     --with-sql-module     module type static|dynamic [static]"
135 ac_help="$ac_help
136
137 SLURPD (Replication Daemon) Options:"
138 ac_help="$ac_help
139   --enable-slurpd         enable building slurpd [auto]"
140 ac_help="$ac_help
141
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151
152 # Find the correct PATH separator.  Usually this is `:', but
153 # DJGPP uses `;' like DOS.
154 if test "X${PATH_SEPARATOR+set}" != Xset; then
155   UNAME=${UNAME-`uname 2>/dev/null`}
156   case X$UNAME in
157     *-DOS) lt_cv_sys_path_separator=';' ;;
158     *)     lt_cv_sys_path_separator=':' ;;
159   esac
160   PATH_SEPARATOR=$lt_cv_sys_path_separator
161 fi
162
163
164 # Check that we are running under the correct shell.
165 SHELL=${CONFIG_SHELL-/bin/sh}
166
167 case X$ECHO in
168 X*--fallback-echo)
169   # Remove one level of quotation (which was required for Make).
170   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
171   ;;
172 esac
173
174 echo=${ECHO-echo}
175 if test "X$1" = X--no-reexec; then
176   # Discard the --no-reexec flag, and continue.
177   shift
178 elif test "X$1" = X--fallback-echo; then
179   # Avoid inline document here, it may be left over
180   :
181 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
182   # Yippee, $echo works!
183   :
184 else
185   # Restart under the correct shell.
186   exec $SHELL "$0" --no-reexec ${1+"$@"}
187 fi
188
189 if test "X$1" = X--fallback-echo; then
190   # used as fallback echo
191   shift
192   cat <<EOF
193
194 EOF
195   exit 0
196 fi
197
198 # The HP-UX ksh and POSIX shell print the target directory to stdout
199 # if CDPATH is set.
200 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
201
202 if test -z "$ECHO"; then
203 if test "X${echo_test_string+set}" != Xset; then
204 # find a string as large as possible, as long as the shell can cope with it
205   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
206     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
207     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
208        echo_test_string="`eval $cmd`" &&
209        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
210     then
211       break
212     fi
213   done
214 fi
215
216 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
217    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
218    test "X$echo_testing_string" = "X$echo_test_string"; then
219   :
220 else
221   # The Solaris, AIX, and Digital Unix default echo programs unquote
222   # backslashes.  This makes it impossible to quote backslashes using
223   #   echo "$something" | sed 's/\\/\\\\/g'
224   #
225   # So, first we look for a working echo in the user's PATH.
226
227   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
228   for dir in $PATH /usr/ucb; do
229     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
230        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
231        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
232        test "X$echo_testing_string" = "X$echo_test_string"; then
233       echo="$dir/echo"
234       break
235     fi
236   done
237   IFS="$save_ifs"
238
239   if test "X$echo" = Xecho; then
240     # We didn't find a better echo, so look for alternatives.
241     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       # This shell has a builtin print -r that does the trick.
245       echo='print -r'
246     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
247          test "X$CONFIG_SHELL" != X/bin/ksh; then
248       # If we have ksh, try running configure again with it.
249       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
250       export ORIGINAL_CONFIG_SHELL
251       CONFIG_SHELL=/bin/ksh
252       export CONFIG_SHELL
253       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
254     else
255       # Try using printf.
256       echo='printf %s\n'
257       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
258          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
259          test "X$echo_testing_string" = "X$echo_test_string"; then
260         # Cool, printf works
261         :
262       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
263            test "X$echo_testing_string" = 'X\t' &&
264            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
265            test "X$echo_testing_string" = "X$echo_test_string"; then
266         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
267         export CONFIG_SHELL
268         SHELL="$CONFIG_SHELL"
269         export SHELL
270         echo="$CONFIG_SHELL $0 --fallback-echo"
271       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
272            test "X$echo_testing_string" = 'X\t' &&
273            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
274            test "X$echo_testing_string" = "X$echo_test_string"; then
275         echo="$CONFIG_SHELL $0 --fallback-echo"
276       else
277         # maybe with a smaller string...
278         prev=:
279
280         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
281           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
282           then
283             break
284           fi
285           prev="$cmd"
286         done
287
288         if test "$prev" != 'sed 50q "$0"'; then
289           echo_test_string=`eval $prev`
290           export echo_test_string
291           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
292         else
293           # Oops.  We lost completely, so just stick with echo.
294           echo=echo
295         fi
296       fi
297     fi
298   fi
299 fi
300 fi
301
302 # Copy echo and quote the copy suitably for passing to libtool from
303 # the Makefile, instead of quoting the original, which is used later.
304 ECHO=$echo
305 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
306    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
307 fi
308
309
310 ac_help="$ac_help
311   --disable-libtool-lock  avoid locking (might break parallel builds)"
312 ac_help="$ac_help
313   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
314 ac_help="$ac_help
315
316 See INSTALL file for further details."
317
318 # Initialize some variables set by options.
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 build=NONE
322 cache_file=./config.cache
323 exec_prefix=NONE
324 host=NONE
325 no_create=
326 nonopt=NONE
327 no_recursion=
328 prefix=NONE
329 program_prefix=NONE
330 program_suffix=NONE
331 program_transform_name=s,x,x,
332 silent=
333 site=
334 srcdir=
335 target=NONE
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 # Initialize some other variables.
353 subdirs=
354 MFLAGS= MAKEFLAGS=
355 SHELL=${CONFIG_SHELL-/bin/sh}
356 # Maximum number of lines to put in a shell here document.
357 ac_max_here_lines=12
358
359 ac_prev=
360 for ac_option
361 do
362
363   # If the previous option needs an argument, assign it.
364   if test -n "$ac_prev"; then
365     eval "$ac_prev=\$ac_option"
366     ac_prev=
367     continue
368   fi
369
370   case "$ac_option" in
371   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
372   *) ac_optarg= ;;
373   esac
374
375   # Accept the important Cygnus configure options, so we can diagnose typos.
376
377   case "$ac_option" in
378
379   -bindir | --bindir | --bindi | --bind | --bin | --bi)
380     ac_prev=bindir ;;
381   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
382     bindir="$ac_optarg" ;;
383
384   -build | --build | --buil | --bui | --bu)
385     ac_prev=build ;;
386   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
387     build="$ac_optarg" ;;
388
389   -cache-file | --cache-file | --cache-fil | --cache-fi \
390   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
391     ac_prev=cache_file ;;
392   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
393   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
394     cache_file="$ac_optarg" ;;
395
396   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
397     ac_prev=datadir ;;
398   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
399   | --da=*)
400     datadir="$ac_optarg" ;;
401
402   -disable-* | --disable-*)
403     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
406       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
407     fi
408     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
409     eval "enable_${ac_feature}=no" ;;
410
411   -enable-* | --enable-*)
412     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
413     # Reject names that are not valid shell variable names.
414     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
415       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
416     fi
417     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
418     case "$ac_option" in
419       *=*) ;;
420       *) ac_optarg=yes ;;
421     esac
422     eval "enable_${ac_feature}='$ac_optarg'" ;;
423
424   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
425   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
426   | --exec | --exe | --ex)
427     ac_prev=exec_prefix ;;
428   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
429   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
430   | --exec=* | --exe=* | --ex=*)
431     exec_prefix="$ac_optarg" ;;
432
433   -gas | --gas | --ga | --g)
434     # Obsolete; use --with-gas.
435     with_gas=yes ;;
436
437   -help | --help | --hel | --he)
438     # Omit some internal or obsolete options to make the list less imposing.
439     # This message is too long to be a string in the A/UX 3.1 sh.
440     cat << EOF
441 Usage: configure [options] [host]
442 Options: [defaults in brackets after descriptions]
443 Configuration:
444   --cache-file=FILE       cache test results in FILE
445   --help                  print this message
446   --no-create             do not create output files
447   --quiet, --silent       do not print \`checking...' messages
448   --version               print the version of autoconf that created configure
449 Directory and file names:
450   --prefix=PREFIX         install architecture-independent files in PREFIX
451                           [$ac_default_prefix]
452   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
453                           [same as prefix]
454   --bindir=DIR            user executables in DIR [EPREFIX/bin]
455   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
456   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
457   --datadir=DIR           read-only architecture-independent data in DIR
458                           [PREFIX/share]
459   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
460   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
461                           [PREFIX/com]
462   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
463   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
464   --includedir=DIR        C header files in DIR [PREFIX/include]
465   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
466   --infodir=DIR           info documentation in DIR [PREFIX/info]
467   --mandir=DIR            man documentation in DIR [PREFIX/man]
468   --srcdir=DIR            find the sources in DIR [configure dir or ..]
469   --program-prefix=PREFIX prepend PREFIX to installed program names
470   --program-suffix=SUFFIX append SUFFIX to installed program names
471   --program-transform-name=PROGRAM
472                           run sed PROGRAM on installed program names
473 EOF
474     cat << EOF
475 Host type:
476   --build=BUILD           configure for building on BUILD [BUILD=HOST]
477   --host=HOST             configure for HOST [guessed]
478   --target=TARGET         configure for TARGET [TARGET=HOST]
479 Features and packages:
480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
482   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
483   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
484   --x-includes=DIR        X include files are in DIR
485   --x-libraries=DIR       X library files are in DIR
486 EOF
487     if test -n "$ac_help"; then
488       echo "--enable and --with options recognized:$ac_help"
489     fi
490     exit 0 ;;
491
492   -host | --host | --hos | --ho)
493     ac_prev=host ;;
494   -host=* | --host=* | --hos=* | --ho=*)
495     host="$ac_optarg" ;;
496
497   -includedir | --includedir | --includedi | --included | --include \
498   | --includ | --inclu | --incl | --inc)
499     ac_prev=includedir ;;
500   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
501   | --includ=* | --inclu=* | --incl=* | --inc=*)
502     includedir="$ac_optarg" ;;
503
504   -infodir | --infodir | --infodi | --infod | --info | --inf)
505     ac_prev=infodir ;;
506   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
507     infodir="$ac_optarg" ;;
508
509   -libdir | --libdir | --libdi | --libd)
510     ac_prev=libdir ;;
511   -libdir=* | --libdir=* | --libdi=* | --libd=*)
512     libdir="$ac_optarg" ;;
513
514   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
515   | --libexe | --libex | --libe)
516     ac_prev=libexecdir ;;
517   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
518   | --libexe=* | --libex=* | --libe=*)
519     libexecdir="$ac_optarg" ;;
520
521   -localstatedir | --localstatedir | --localstatedi | --localstated \
522   | --localstate | --localstat | --localsta | --localst \
523   | --locals | --local | --loca | --loc | --lo)
524     ac_prev=localstatedir ;;
525   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
526   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
527   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
528     localstatedir="$ac_optarg" ;;
529
530   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
531     ac_prev=mandir ;;
532   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
533     mandir="$ac_optarg" ;;
534
535   -nfp | --nfp | --nf)
536     # Obsolete; use --without-fp.
537     with_fp=no ;;
538
539   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540   | --no-cr | --no-c)
541     no_create=yes ;;
542
543   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
544   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
545     no_recursion=yes ;;
546
547   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
548   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
549   | --oldin | --oldi | --old | --ol | --o)
550     ac_prev=oldincludedir ;;
551   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
552   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
553   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
554     oldincludedir="$ac_optarg" ;;
555
556   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
557     ac_prev=prefix ;;
558   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
559     prefix="$ac_optarg" ;;
560
561   -program-prefix | --program-prefix | --program-prefi | --program-pref \
562   | --program-pre | --program-pr | --program-p)
563     ac_prev=program_prefix ;;
564   -program-prefix=* | --program-prefix=* | --program-prefi=* \
565   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
566     program_prefix="$ac_optarg" ;;
567
568   -program-suffix | --program-suffix | --program-suffi | --program-suff \
569   | --program-suf | --program-su | --program-s)
570     ac_prev=program_suffix ;;
571   -program-suffix=* | --program-suffix=* | --program-suffi=* \
572   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
573     program_suffix="$ac_optarg" ;;
574
575   -program-transform-name | --program-transform-name \
576   | --program-transform-nam | --program-transform-na \
577   | --program-transform-n | --program-transform- \
578   | --program-transform | --program-transfor \
579   | --program-transfo | --program-transf \
580   | --program-trans | --program-tran \
581   | --progr-tra | --program-tr | --program-t)
582     ac_prev=program_transform_name ;;
583   -program-transform-name=* | --program-transform-name=* \
584   | --program-transform-nam=* | --program-transform-na=* \
585   | --program-transform-n=* | --program-transform-=* \
586   | --program-transform=* | --program-transfor=* \
587   | --program-transfo=* | --program-transf=* \
588   | --program-trans=* | --program-tran=* \
589   | --progr-tra=* | --program-tr=* | --program-t=*)
590     program_transform_name="$ac_optarg" ;;
591
592   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
593   | -silent | --silent | --silen | --sile | --sil)
594     silent=yes ;;
595
596   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
597     ac_prev=sbindir ;;
598   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
599   | --sbi=* | --sb=*)
600     sbindir="$ac_optarg" ;;
601
602   -sharedstatedir | --sharedstatedir | --sharedstatedi \
603   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
604   | --sharedst | --shareds | --shared | --share | --shar \
605   | --sha | --sh)
606     ac_prev=sharedstatedir ;;
607   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
608   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
609   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
610   | --sha=* | --sh=*)
611     sharedstatedir="$ac_optarg" ;;
612
613   -site | --site | --sit)
614     ac_prev=site ;;
615   -site=* | --site=* | --sit=*)
616     site="$ac_optarg" ;;
617
618   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
619     ac_prev=srcdir ;;
620   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
621     srcdir="$ac_optarg" ;;
622
623   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
624   | --syscon | --sysco | --sysc | --sys | --sy)
625     ac_prev=sysconfdir ;;
626   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
627   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
628     sysconfdir="$ac_optarg" ;;
629
630   -target | --target | --targe | --targ | --tar | --ta | --t)
631     ac_prev=target ;;
632   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
633     target="$ac_optarg" ;;
634
635   -v | -verbose | --verbose | --verbos | --verbo | --verb)
636     verbose=yes ;;
637
638   -version | --version | --versio | --versi | --vers)
639     echo "configure generated by autoconf version 2.13.1"
640     exit 0 ;;
641
642   -with-* | --with-*)
643     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     case "$ac_option" in
650       *=*) ;;
651       *) ac_optarg=yes ;;
652     esac
653     eval "with_${ac_package}='$ac_optarg'" ;;
654
655   -without-* | --without-*)
656     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
657     # Reject names that are not valid shell variable names.
658     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
659       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
660     fi
661     ac_package=`echo $ac_package| sed 's/-/_/g'`
662     eval "with_${ac_package}=no" ;;
663
664   --x)
665     # Obsolete; use --with-x.
666     with_x=yes ;;
667
668   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
669   | --x-incl | --x-inc | --x-in | --x-i)
670     ac_prev=x_includes ;;
671   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
672   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
673     x_includes="$ac_optarg" ;;
674
675   -x-libraries | --x-libraries | --x-librarie | --x-librari \
676   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
677     ac_prev=x_libraries ;;
678   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
679   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
680     x_libraries="$ac_optarg" ;;
681
682   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
683     ;;
684
685   *)
686     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
687       echo "configure: warning: $ac_option: invalid host type" 1>&2
688     fi
689     if test "x$nonopt" != xNONE; then
690       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
691     fi
692     nonopt="$ac_option"
693     ;;
694
695   esac
696 done
697
698 if test -n "$ac_prev"; then
699   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
700 fi
701
702 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
703
704 # File descriptor usage:
705 # 0 standard input
706 # 1 file creation
707 # 2 errors and warnings
708 # 3 some systems may open it to /dev/tty
709 # 4 used on the Kubota Titan
710 # 6 checking for... messages and results
711 # 5 compiler messages saved in config.log
712 if test "$silent" = yes; then
713   exec 6>/dev/null
714 else
715   exec 6>&1
716 fi
717 exec 5>./config.log
718
719 echo "\
720 This file contains any messages produced by compilers while
721 running configure, to aid debugging if configure makes a mistake.
722 " 1>&5
723
724 # Strip out --no-create and --no-recursion so they do not pile up.
725 # Also quote any args containing shell metacharacters.
726 ac_configure_args=
727 for ac_arg
728 do
729   case "$ac_arg" in
730   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731   | --no-cr | --no-c) ;;
732   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
733   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
734   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
735   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
736   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
737   esac
738 done
739
740 # NLS nuisances.
741 # Only set these to C if already set.  These must not be set unconditionally
742 # because not all systems understand e.g. LANG=C (notably SCO).
743 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
744 # Non-C LC_CTYPE values break the ctype check.
745 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
746 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
747 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
748 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
749
750 # confdefs.h avoids OS command line length limits that DEFS can exceed.
751 rm -rf conftest* confdefs.h
752 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
753 echo > confdefs.h
754
755 # A filename unique to this package, relative to the directory that
756 # configure is in, which we can look for to find out if srcdir is correct.
757 ac_unique_file=build/version.sh
758
759 # Find the source files, if location was not specified.
760 if test -z "$srcdir"; then
761   ac_srcdir_defaulted=yes
762   # Try the directory containing this script, then its parent.
763   ac_prog=$0
764   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
765   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
766   srcdir=$ac_confdir
767   if test ! -r $srcdir/$ac_unique_file; then
768     srcdir=..
769   fi
770 else
771   ac_srcdir_defaulted=no
772 fi
773 if test ! -r $srcdir/$ac_unique_file; then
774   if test "$ac_srcdir_defaulted" = yes; then
775     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
776   else
777     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
778   fi
779 fi
780 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
781
782 # Prefer explicitly selected file to automatically selected ones.
783 if test -z "$CONFIG_SITE"; then
784   if test "x$prefix" != xNONE; then
785     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
786   else
787     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
788   fi
789 fi
790 for ac_site_file in $CONFIG_SITE; do
791   if test -r "$ac_site_file"; then
792     echo "loading site script $ac_site_file"
793     . "$ac_site_file"
794   fi
795 done
796
797
798 ac_ext=c
799 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
800 ac_cpp='$CPP $CPPFLAGS'
801 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
802 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 ac_exeext=
806 ac_objext=o
807 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
808   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
809   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
810     ac_n= ac_c='
811 ' ac_t='        '
812   else
813     ac_n=-n ac_c= ac_t=
814   fi
815 else
816   ac_n= ac_c='\c' ac_t=
817 fi
818
819
820 # set unset (borrowed from autoconf 2.49c)
821 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
822   ol_unset=unset
823 else
824   ol_unset=false
825 fi
826 # unset CDPATH
827 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
828
829 ac_aux_dir=
830 for ac_dir in build $srcdir/build; do
831   if test -f $ac_dir/install-sh; then
832     ac_aux_dir=$ac_dir
833     ac_install_sh="$ac_aux_dir/install-sh -c"
834     break
835   elif test -f $ac_dir/install.sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install.sh -c"
838     break
839   elif test -f $ac_dir/shtool; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/shtool install -c"
842     break
843   fi
844 done
845 if test -z "$ac_aux_dir"; then
846   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
847 fi
848 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
849 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
850 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
851
852 eval `$ac_aux_dir/version.sh`
853 if test -z "$OL_STRING"; then
854         { echo "configure: error: could not determine version" 1>&2; exit 1; }
855 fi
856
857 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
858         ac_cv_shtool="$ac_aux_dir/shtool"
859 else
860         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
861 fi
862
863 SHTOOL="$ac_cv_shtool"
864
865 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
866 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
867
868 OPENLDAP_CVS=""
869 if test -d $ac_aux_dir/CVS; then
870         OPENLDAP_CVS="(from CVS sources) "
871 fi
872
873 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
874
875
876 echo $ac_n "checking host system type""... $ac_c" 1>&6
877 echo "configure:878: checking host system type" >&5
878 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
879
880 # Make sure we can run config.sub.
881   if $ac_config_sub sun4 >/dev/null 2>&1; then :
882     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
883   fi
884
885   ac_cv_host_alias=$host
886   case "$ac_cv_host_alias" in
887   NONE)
888     case $nonopt in
889     NONE)
890       if ac_cv_host_alias=`$ac_config_guess`; then :
891       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
892       fi ;;
893     *) ac_cv_host_alias=$nonopt ;;
894     esac ;;
895   esac
896
897   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
898   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
899   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
900   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
901 else
902   echo $ac_n "(cached) $ac_c" 1>&6
903 fi
904
905 echo "$ac_t""$ac_cv_host" 1>&6
906
907 host=$ac_cv_host
908 host_alias=$ac_cv_host_alias
909 host_cpu=$ac_cv_host_cpu
910 host_vendor=$ac_cv_host_vendor
911 host_os=$ac_cv_host_os
912
913
914
915
916
917 echo $ac_n "checking target system type""... $ac_c" 1>&6
918 echo "configure:919: checking target system type" >&5
919 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
920
921 # Make sure we can run config.sub.
922   if $ac_config_sub sun4 >/dev/null 2>&1; then :
923     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
924   fi
925
926   ac_cv_target_alias=$target
927   case "$ac_cv_target_alias" in
928   NONE)
929     case $nonopt in
930     NONE)
931       ac_cv_target_alias=$host_alias ;;
932
933     *) ac_cv_target_alias=$nonopt ;;
934     esac ;;
935   esac
936
937   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
938   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
939   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
940   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
941 else
942   echo $ac_n "(cached) $ac_c" 1>&6
943 fi
944
945 echo "$ac_t""$ac_cv_target" 1>&6
946
947 target=$ac_cv_target
948 target_alias=$ac_cv_target_alias
949 target_cpu=$ac_cv_target_cpu
950 target_vendor=$ac_cv_target_vendor
951 target_os=$ac_cv_target_os
952
953
954
955
956
957 echo $ac_n "checking build system type""... $ac_c" 1>&6
958 echo "configure:959: checking build system type" >&5
959 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
960
961 # Make sure we can run config.sub.
962   if $ac_config_sub sun4 >/dev/null 2>&1; then :
963     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
964   fi
965
966   ac_cv_build_alias=$build
967   case "$ac_cv_build_alias" in
968   NONE)
969     case $nonopt in
970     NONE)
971       ac_cv_build_alias=$host_alias ;;
972
973     *) ac_cv_build_alias=$nonopt ;;
974     esac ;;
975   esac
976
977   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
978   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
979   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
980   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
981 else
982   echo $ac_n "(cached) $ac_c" 1>&6
983 fi
984
985 echo "$ac_t""$ac_cv_build" 1>&6
986
987 build=$ac_cv_build
988 build_alias=$ac_cv_build_alias
989 build_cpu=$ac_cv_build_cpu
990 build_vendor=$ac_cv_build_vendor
991 build_os=$ac_cv_build_os
992
993
994
995
996
997 # Do some error checking and defaulting for the host and target type.
998 # The inputs are:
999 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1000 #
1001 # The rules are:
1002 # 1. You are not allowed to specify --host, --target, and nonopt at the
1003 #    same time.
1004 # 2. Host defaults to nonopt.
1005 # 3. If nonopt is not specified, then host defaults to the current host,
1006 #    as determined by config.guess.
1007 # 4. Target and build default to nonopt.
1008 # 5. If nonopt is not specified, then target and build default to host.
1009
1010 # The aliases save the names the user supplied, while $host etc.
1011 # will get canonicalized.
1012 case $host---$target---$nonopt in
1013 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1014 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1015 esac
1016
1017 test "$host_alias" != "$target_alias" &&
1018   test "$program_prefix$program_suffix$program_transform_name" = \
1019     NONENONEs,x,x, &&
1020   program_prefix=${target_alias}-
1021
1022
1023 # Find a good install program.  We prefer a C program (faster),
1024 # so one script is as good as another.  But avoid the broken or
1025 # incompatible versions:
1026 # SysV /etc/install, /usr/sbin/install
1027 # SunOS /usr/etc/install
1028 # IRIX /sbin/install
1029 # AIX /bin/install
1030 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1031 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1032 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1033 # ./install, which can be erroneously created by make from ./install.sh.
1034 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1035 echo "configure:1036: checking for a BSD compatible install" >&5
1036 if test -z "$INSTALL"; then
1037 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1041   for ac_dir in $PATH; do
1042     # Account for people who put trailing slashes in PATH elements.
1043     case "$ac_dir/" in
1044     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1045     *)
1046       # OSF1 and SCO ODT 3.0 have their own names for install.
1047       # Don't use installbsd from OSF since it installs stuff as root
1048       # by default.
1049       for ac_prog in ginstall scoinst install; do
1050         if test -f $ac_dir/$ac_prog; then
1051           if test $ac_prog = install &&
1052             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1053             # AIX install.  It has an incompatible calling convention.
1054             :
1055           elif test $ac_prog = install &&
1056             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1057             # program-specific install script used by HP pwplus--don't use.
1058             :
1059           else
1060             ac_cv_path_install="$ac_dir/$ac_prog -c"
1061             break 2
1062           fi
1063         fi
1064       done
1065       ;;
1066     esac
1067   done
1068   IFS="$ac_save_IFS"
1069
1070 fi
1071   if test "${ac_cv_path_install+set}" = set; then
1072     INSTALL="$ac_cv_path_install"
1073   else
1074     # As a last resort, use the slow shell script.  We don't cache a
1075     # path for INSTALL within a source directory, because that will
1076     # break other packages using the cache if that directory is
1077     # removed, or if the path is relative.
1078     INSTALL="$ac_install_sh"
1079   fi
1080 fi
1081 echo "$ac_t""$INSTALL" 1>&6
1082
1083 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1084 # It thinks the first close brace ends the variable substitution.
1085 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1086
1087 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1088
1089 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1090
1091 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1092 echo "configure:1093: checking whether build environment is sane" >&5
1093 # Just in case
1094 sleep 1
1095 echo timestamp > conftestfile
1096 # Do `set' in a subshell so we don't clobber the current shell's
1097 # arguments.  Must try -L first in case configure is actually a
1098 # symlink; some systems play weird games with the mod time of symlinks
1099 # (eg FreeBSD returns the mod time of the symlink's containing
1100 # directory).
1101 if (
1102    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1103    if test "$*" = "X"; then
1104       # -L didn't work.
1105       set X `ls -t $srcdir/configure conftestfile`
1106    fi
1107    if test "$*" != "X $srcdir/configure conftestfile" \
1108       && test "$*" != "X conftestfile $srcdir/configure"; then
1109
1110       # If neither matched, then we have a broken ls.  This can happen
1111       # if, for instance, CONFIG_SHELL is bash and it inherits a
1112       # broken ls alias from the environment.  This has actually
1113       # happened.  Such a system could not be considered "sane".
1114       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1115 alias in your environment" 1>&2; exit 1; }
1116    fi
1117
1118    test "$2" = conftestfile
1119    )
1120 then
1121    # Ok.
1122    :
1123 else
1124    { echo "configure: error: newly created file is older than distributed files!
1125 Check your system clock" 1>&2; exit 1; }
1126 fi
1127 rm -f conftest*
1128 echo "$ac_t""yes" 1>&6
1129 if test "$program_transform_name" = s,x,x,; then
1130   program_transform_name=
1131 else
1132   # Double any \ or $.  echo might interpret backslashes.
1133   cat <<\EOF_SED > conftestsed
1134 s,\\,\\\\,g; s,\$,$$,g
1135 EOF_SED
1136   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1137   rm -f conftestsed
1138 fi
1139 test "$program_prefix" != NONE &&
1140   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1141 # Use a double $ so make ignores it.
1142 test "$program_suffix" != NONE &&
1143   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1144
1145 # sed with no file args requires a program.
1146 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1147
1148 for ac_prog in mawk gawk nawk awk
1149 do
1150 # Extract the first word of "$ac_prog", so it can be a program name with args.
1151 set dummy $ac_prog; ac_word=$2
1152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_word" >&5
1154 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1155   echo $ac_n "(cached) $ac_c" 1>&6
1156 else
1157   if test -n "$AWK"; then
1158   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1159 else
1160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1161   ac_dummy="$PATH"
1162   for ac_dir in $ac_dummy; do
1163     test -z "$ac_dir" && ac_dir=.
1164     if test -f $ac_dir/$ac_word; then
1165       ac_cv_prog_AWK="$ac_prog"
1166       break
1167     fi
1168   done
1169   IFS="$ac_save_ifs"
1170 fi
1171 fi
1172 AWK="$ac_cv_prog_AWK"
1173 if test -n "$AWK"; then
1174   echo "$ac_t""$AWK" 1>&6
1175 else
1176   echo "$ac_t""no" 1>&6
1177 fi
1178
1179 test -n "$AWK" && break
1180 done
1181
1182 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1183 echo "configure:1184: checking whether ${MAKE-make} sets \${MAKE}" >&5
1184 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1185 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1186   echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188   cat > conftestmake <<\EOF
1189 all:
1190         @echo 'ac_maketemp="${MAKE}"'
1191 EOF
1192 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1193 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1194 if test -n "$ac_maketemp"; then
1195   eval ac_cv_prog_make_${ac_make}_set=yes
1196 else
1197   eval ac_cv_prog_make_${ac_make}_set=no
1198 fi
1199 rm -f conftestmake
1200 fi
1201 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1202   echo "$ac_t""yes" 1>&6
1203   SET_MAKE=
1204 else
1205   echo "$ac_t""no" 1>&6
1206   SET_MAKE="MAKE=${MAKE-make}"
1207 fi
1208
1209
1210
1211 PACKAGE=$OL_PACKAGE
1212
1213 VERSION=$OL_VERSION
1214
1215 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1216   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1217 fi
1218
1219
1220
1221 missing_dir=`cd $ac_aux_dir && pwd`
1222 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1223 echo "configure:1224: checking for working aclocal" >&5
1224 # Run test in a subshell; some versions of sh will print an error if
1225 # an executable is not found, even if stderr is redirected.
1226 # Redirect stdin to placate older versions of autoconf.  Sigh.
1227 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1228    ACLOCAL=aclocal
1229    echo "$ac_t""found" 1>&6
1230 else
1231    ACLOCAL="$missing_dir/missing aclocal"
1232    echo "$ac_t""missing" 1>&6
1233 fi
1234
1235 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working autoconf" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1241    AUTOCONF=autoconf
1242    echo "$ac_t""found" 1>&6
1243 else
1244    AUTOCONF="$missing_dir/missing autoconf"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working automake" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (automake --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOMAKE=automake
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOMAKE="$missing_dir/missing automake"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working autoheader" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1267    AUTOHEADER=autoheader
1268    echo "$ac_t""found" 1>&6
1269 else
1270    AUTOHEADER="$missing_dir/missing autoheader"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1275 echo "configure:1276: checking for working makeinfo" >&5
1276 # Run test in a subshell; some versions of sh will print an error if
1277 # an executable is not found, even if stderr is redirected.
1278 # Redirect stdin to placate older versions of autoconf.  Sigh.
1279 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1280    MAKEINFO=makeinfo
1281    echo "$ac_t""found" 1>&6
1282 else
1283    MAKEINFO="$missing_dir/missing makeinfo"
1284    echo "$ac_t""missing" 1>&6
1285 fi
1286
1287 install_sh="$missing_dir/install-sh"
1288 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1289
1290 for ac_prog in gnutar gtar tar
1291 do
1292 # Extract the first word of "$ac_prog", so it can be a program name with args.
1293 set dummy $ac_prog; ac_word=$2
1294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1295 echo "configure:1296: checking for $ac_word" >&5
1296 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   if test -n "$AMTAR"; then
1300   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1301 else
1302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1303   ac_dummy="$PATH"
1304   for ac_dir in $ac_dummy; do
1305     test -z "$ac_dir" && ac_dir=.
1306     if test -f $ac_dir/$ac_word; then
1307       ac_cv_prog_AMTAR="$ac_prog"
1308       break
1309     fi
1310   done
1311   IFS="$ac_save_ifs"
1312 fi
1313 fi
1314 AMTAR="$ac_cv_prog_AMTAR"
1315 if test -n "$AMTAR"; then
1316   echo "$ac_t""$AMTAR" 1>&6
1317 else
1318   echo "$ac_t""no" 1>&6
1319 fi
1320
1321 test -n "$AMTAR" && break
1322 done
1323
1324
1325 AMTARFLAGS=
1326 if test -n "$AMTAR"; then
1327   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1328         AMTARFLAGS=o
1329   fi
1330 fi
1331
1332 cat >> confdefs.h <<EOF
1333 #define OPENLDAP_PACKAGE "$PACKAGE"
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define OPENLDAP_VERSION "$VERSION"
1338 EOF
1339
1340
1341 cat >> confdefs.h <<EOF
1342 #define LDAP_VENDOR_VERSION $OL_API_INC
1343 EOF
1344
1345 cat >> confdefs.h <<EOF
1346 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1355 EOF
1356
1357
1358 OPENLDAP_LIBVERSION=$OL_API_LIB
1359
1360 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1361
1362
1363
1364 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1365 echo "configure:1366: checking configure arguments" >&5
1366
1367
1368 top_builddir=`pwd`
1369
1370 ldap_subdir="/openldap"
1371
1372 # Check whether --with-subdir or --without-subdir was given.
1373 if test "${with_subdir+set}" = set; then
1374   withval="$with_subdir"
1375   case "$withval" in
1376         no) ldap_subdir=""
1377                 ;;
1378         yes)
1379                 ;;
1380         /*|\\*)
1381                 ldap_subdir="$withval"
1382                 ;;
1383         *)
1384                 ldap_subdir="/$withval"
1385                 ;;
1386 esac
1387
1388 fi
1389
1390
1391 # OpenLDAP --enable-debug
1392         # Check whether --enable-debug or --disable-debug was given.
1393 if test "${enable_debug+set}" = set; then
1394   enableval="$enable_debug"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1404         fi
1405         ol_enable_debug="$ol_arg"
1406
1407 else
1408         ol_enable_debug="yes"
1409 fi
1410 # end --enable-debug
1411 # OpenLDAP --enable-dynamic
1412         # Check whether --enable-dynamic or --disable-dynamic was given.
1413 if test "${enable_dynamic+set}" = set; then
1414   enableval="$enable_dynamic"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no ; do
1418                 if test "$enableval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1424         fi
1425         ol_enable_dynamic="$ol_arg"
1426
1427 else
1428         ol_enable_dynamic="no"
1429 fi
1430 # end --enable-dynamic
1431 # OpenLDAP --enable-syslog
1432         # Check whether --enable-syslog or --disable-syslog was given.
1433 if test "${enable_syslog+set}" = set; then
1434   enableval="$enable_syslog"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto yes no ; do
1438                 if test "$enableval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1444         fi
1445         ol_enable_syslog="$ol_arg"
1446
1447 else
1448         ol_enable_syslog="auto"
1449 fi
1450 # end --enable-syslog
1451 # OpenLDAP --enable-proctitle
1452         # Check whether --enable-proctitle or --disable-proctitle was given.
1453 if test "${enable_proctitle+set}" = set; then
1454   enableval="$enable_proctitle"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1464         fi
1465         ol_enable_proctitle="$ol_arg"
1466
1467 else
1468         ol_enable_proctitle="yes"
1469 fi
1470 # end --enable-proctitle
1471 ol_enable_referrals=${ol_enable_referrals-no}
1472 ol_enable_kbind=${ol_enable_kbind-no}
1473 # OpenLDAP --enable-ipv6
1474         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1475 if test "${enable_ipv6+set}" = set; then
1476   enableval="$enable_ipv6"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1486         fi
1487         ol_enable_ipv6="$ol_arg"
1488
1489 else
1490         ol_enable_ipv6="auto"
1491 fi
1492 # end --enable-ipv6
1493 # OpenLDAP --enable-local
1494         # Check whether --enable-local or --disable-local was given.
1495 if test "${enable_local+set}" = set; then
1496   enableval="$enable_local"
1497   
1498         ol_arg=invalid
1499         for ol_val in auto yes no ; do
1500                 if test "$enableval" = "$ol_val" ; then
1501                         ol_arg="$ol_val"
1502                 fi
1503         done
1504         if test "$ol_arg" = "invalid" ; then
1505                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1506         fi
1507         ol_enable_local="$ol_arg"
1508
1509 else
1510         ol_enable_local="auto"
1511 fi
1512 # end --enable-local
1513 # OpenLDAP --enable-x_compile
1514         # Check whether --enable-x_compile or --disable-x_compile was given.
1515 if test "${enable_x_compile+set}" = set; then
1516   enableval="$enable_x_compile"
1517   
1518         ol_arg=invalid
1519         for ol_val in yes no ; do
1520                 if test "$enableval" = "$ol_val" ; then
1521                         ol_arg="$ol_val"
1522                 fi
1523         done
1524         if test "$ol_arg" = "invalid" ; then
1525                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1526         fi
1527         ol_enable_x_compile="$ol_arg"
1528
1529 else
1530         ol_enable_x_compile="no"
1531 fi
1532 # end --enable-x_compile
1533
1534
1535 # OpenLDAP --with-cyrus_sasl
1536         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1537 if test "${with_cyrus_sasl+set}" = set; then
1538   withval="$with_cyrus_sasl"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no  ; do
1542                 if test "$withval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1548         fi
1549         ol_with_cyrus_sasl="$ol_arg"
1550
1551 else
1552         ol_with_cyrus_sasl="auto"
1553 fi
1554 # end --with-cyrus_sasl
1555
1556 # OpenLDAP --with-fetch
1557         # Check whether --with-fetch or --without-fetch was given.
1558 if test "${with_fetch+set}" = set; then
1559   withval="$with_fetch"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no  ; do
1563                 if test "$withval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1569         fi
1570         ol_with_fetch="$ol_arg"
1571
1572 else
1573         ol_with_fetch="auto"
1574 fi
1575 # end --with-fetch
1576
1577 ol_with_kerberos=${ol_with_kerberos-auto}
1578 # OpenLDAP --with-threads
1579         # Check whether --with-threads or --without-threads was given.
1580 if test "${with_threads+set}" = set; then
1581   withval="$with_threads"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1585                 if test "$withval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1591         fi
1592         ol_with_threads="$ol_arg"
1593
1594 else
1595         ol_with_threads="auto"
1596 fi
1597 # end --with-threads
1598
1599 # OpenLDAP --with-tls
1600         # Check whether --with-tls or --without-tls was given.
1601 if test "${with_tls+set}" = set; then
1602   withval="$with_tls"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto ssleay openssl yes no  ; do
1606                 if test "$withval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1612         fi
1613         ol_with_tls="$ol_arg"
1614
1615 else
1616         ol_with_tls="auto"
1617 fi
1618 # end --with-tls
1619
1620 # OpenLDAP --with-yielding_select
1621         # Check whether --with-yielding_select or --without-yielding_select was given.
1622 if test "${with_yielding_select+set}" = set; then
1623   withval="$with_yielding_select"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto yes no manual  ; do
1627                 if test "$withval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1633         fi
1634         ol_with_yielding_select="$ol_arg"
1635
1636 else
1637         ol_with_yielding_select="auto"
1638 fi
1639 # end --with-yielding_select
1640
1641
1642
1643 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1644 if test "${with_xxslapdoptions+set}" = set; then
1645   withval="$with_xxslapdoptions"
1646   :
1647 fi
1648
1649 # OpenLDAP --enable-slapd
1650         # Check whether --enable-slapd or --disable-slapd was given.
1651 if test "${enable_slapd+set}" = set; then
1652   enableval="$enable_slapd"
1653   
1654         ol_arg=invalid
1655         for ol_val in auto yes no ; do
1656                 if test "$enableval" = "$ol_val" ; then
1657                         ol_arg="$ol_val"
1658                 fi
1659         done
1660         if test "$ol_arg" = "invalid" ; then
1661                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1662         fi
1663         ol_enable_slapd="$ol_arg"
1664
1665 else
1666         ol_enable_slapd="yes"
1667 fi
1668 # end --enable-slapd
1669 # OpenLDAP --enable-aci
1670         # Check whether --enable-aci or --disable-aci was given.
1671 if test "${enable_aci+set}" = set; then
1672   enableval="$enable_aci"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto yes no ; do
1676                 if test "$enableval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1682         fi
1683         ol_enable_aci="$ol_arg"
1684
1685 else
1686         ol_enable_aci="no"
1687 fi
1688 # end --enable-aci
1689 # OpenLDAP --enable-cleartext
1690         # Check whether --enable-cleartext or --disable-cleartext was given.
1691 if test "${enable_cleartext+set}" = set; then
1692   enableval="$enable_cleartext"
1693   
1694         ol_arg=invalid
1695         for ol_val in auto yes no ; do
1696                 if test "$enableval" = "$ol_val" ; then
1697                         ol_arg="$ol_val"
1698                 fi
1699         done
1700         if test "$ol_arg" = "invalid" ; then
1701                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1702         fi
1703         ol_enable_cleartext="$ol_arg"
1704
1705 else
1706         ol_enable_cleartext="yes"
1707 fi
1708 # end --enable-cleartext
1709 # OpenLDAP --enable-crypt
1710         # Check whether --enable-crypt or --disable-crypt was given.
1711 if test "${enable_crypt+set}" = set; then
1712   enableval="$enable_crypt"
1713   
1714         ol_arg=invalid
1715         for ol_val in auto yes no ; do
1716                 if test "$enableval" = "$ol_val" ; then
1717                         ol_arg="$ol_val"
1718                 fi
1719         done
1720         if test "$ol_arg" = "invalid" ; then
1721                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1722         fi
1723         ol_enable_crypt="$ol_arg"
1724
1725 else
1726         ol_enable_crypt="no"
1727 fi
1728 # end --enable-crypt
1729 # OpenLDAP --enable-kpasswd
1730         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1731 if test "${enable_kpasswd+set}" = set; then
1732   enableval="$enable_kpasswd"
1733   
1734         ol_arg=invalid
1735         for ol_val in auto yes no ; do
1736                 if test "$enableval" = "$ol_val" ; then
1737                         ol_arg="$ol_val"
1738                 fi
1739         done
1740         if test "$ol_arg" = "invalid" ; then
1741                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1742         fi
1743         ol_enable_kpasswd="$ol_arg"
1744
1745 else
1746         ol_enable_kpasswd="no"
1747 fi
1748 # end --enable-kpasswd
1749 # OpenLDAP --enable-lmpasswd
1750         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1751 if test "${enable_lmpasswd+set}" = set; then
1752   enableval="$enable_lmpasswd"
1753   
1754         ol_arg=invalid
1755         for ol_val in auto yes no ; do
1756                 if test "$enableval" = "$ol_val" ; then
1757                         ol_arg="$ol_val"
1758                 fi
1759         done
1760         if test "$ol_arg" = "invalid" ; then
1761                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1762         fi
1763         ol_enable_lmpasswd="$ol_arg"
1764
1765 else
1766         ol_enable_lmpasswd="no"
1767 fi
1768 # end --enable-lmpasswd
1769 # OpenLDAP --enable-spasswd
1770         # Check whether --enable-spasswd or --disable-spasswd was given.
1771 if test "${enable_spasswd+set}" = set; then
1772   enableval="$enable_spasswd"
1773   
1774         ol_arg=invalid
1775         for ol_val in auto yes no ; do
1776                 if test "$enableval" = "$ol_val" ; then
1777                         ol_arg="$ol_val"
1778                 fi
1779         done
1780         if test "$ol_arg" = "invalid" ; then
1781                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1782         fi
1783         ol_enable_spasswd="$ol_arg"
1784
1785 else
1786         ol_enable_spasswd="no"
1787 fi
1788 # end --enable-spasswd
1789 # OpenLDAP --enable-modules
1790         # Check whether --enable-modules or --disable-modules was given.
1791 if test "${enable_modules+set}" = set; then
1792   enableval="$enable_modules"
1793   
1794         ol_arg=invalid
1795         for ol_val in auto yes no ; do
1796                 if test "$enableval" = "$ol_val" ; then
1797                         ol_arg="$ol_val"
1798                 fi
1799         done
1800         if test "$ol_arg" = "invalid" ; then
1801                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1802         fi
1803         ol_enable_modules="$ol_arg"
1804
1805 else
1806         ol_enable_modules="no"
1807 fi
1808 # end --enable-modules
1809 ol_enable_multimaster=${ol_enable_multimaster-no}
1810 # OpenLDAP --enable-rewrite
1811         # Check whether --enable-rewrite or --disable-rewrite was given.
1812 if test "${enable_rewrite+set}" = set; then
1813   enableval="$enable_rewrite"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1823         fi
1824         ol_enable_rewrite="$ol_arg"
1825
1826 else
1827         ol_enable_rewrite="no"
1828 fi
1829 # end --enable-rewrite
1830 # OpenLDAP --enable-rlookups
1831         # Check whether --enable-rlookups or --disable-rlookups was given.
1832 if test "${enable_rlookups+set}" = set; then
1833   enableval="$enable_rlookups"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1843         fi
1844         ol_enable_rlookups="$ol_arg"
1845
1846 else
1847         ol_enable_rlookups="no"
1848 fi
1849 # end --enable-rlookups
1850 # OpenLDAP --enable-slapi
1851         # Check whether --enable-slapi or --disable-slapi was given.
1852 if test "${enable_slapi+set}" = set; then
1853   enableval="$enable_slapi"
1854   
1855         ol_arg=invalid
1856         for ol_val in auto yes no ; do
1857                 if test "$enableval" = "$ol_val" ; then
1858                         ol_arg="$ol_val"
1859                 fi
1860         done
1861         if test "$ol_arg" = "invalid" ; then
1862                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1863         fi
1864         ol_enable_slapi="$ol_arg"
1865
1866 else
1867         ol_enable_slapi="no"
1868 fi
1869 # end --enable-slapi
1870 # OpenLDAP --enable-slp
1871         # Check whether --enable-slp or --disable-slp was given.
1872 if test "${enable_slp+set}" = set; then
1873   enableval="$enable_slp"
1874   
1875         ol_arg=invalid
1876         for ol_val in auto yes no ; do
1877                 if test "$enableval" = "$ol_val" ; then
1878                         ol_arg="$ol_val"
1879                 fi
1880         done
1881         if test "$ol_arg" = "invalid" ; then
1882                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1883         fi
1884         ol_enable_slp="$ol_arg"
1885
1886 else
1887         ol_enable_slp="no"
1888 fi
1889 # end --enable-slp
1890 # OpenLDAP --enable-wrappers
1891         # Check whether --enable-wrappers or --disable-wrappers was given.
1892 if test "${enable_wrappers+set}" = set; then
1893   enableval="$enable_wrappers"
1894   
1895         ol_arg=invalid
1896         for ol_val in auto yes no ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1903         fi
1904         ol_enable_wrappers="$ol_arg"
1905
1906 else
1907         ol_enable_wrappers="no"
1908 fi
1909 # end --enable-wrappers
1910
1911
1912 # OpenLDAP --enable-bdb
1913         # Check whether --enable-bdb or --disable-bdb was given.
1914 if test "${enable_bdb+set}" = set; then
1915   enableval="$enable_bdb"
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-bdb" 1>&2; exit 1; }
1925         fi
1926         ol_enable_bdb="$ol_arg"
1927
1928 else
1929         ol_enable_bdb="yes"
1930 fi
1931 # end --enable-bdb
1932 # OpenLDAP --with-bdb_module
1933         # Check whether --with-bdb_module or --without-bdb_module was given.
1934 if test "${with_bdb_module+set}" = set; then
1935   withval="$with_bdb_module"
1936   
1937         ol_arg=invalid
1938         for ol_val in static dynamic ; do
1939                 if test "$withval" = "$ol_val" ; then
1940                         ol_arg="$ol_val"
1941                 fi
1942         done
1943         if test "$ol_arg" = "invalid" ; then
1944                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1945         fi
1946         ol_with_bdb_module="$ol_arg"
1947
1948 else
1949         ol_with_bdb_module="static"
1950 fi
1951 # end --with-bdb_module
1952
1953 # OpenLDAP --enable-dnssrv
1954         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1955 if test "${enable_dnssrv+set}" = set; then
1956   enableval="$enable_dnssrv"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1966         fi
1967         ol_enable_dnssrv="$ol_arg"
1968
1969 else
1970         ol_enable_dnssrv="no"
1971 fi
1972 # end --enable-dnssrv
1973 # OpenLDAP --with-dnssrv_module
1974         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1975 if test "${with_dnssrv_module+set}" = set; then
1976   withval="$with_dnssrv_module"
1977   
1978         ol_arg=invalid
1979         for ol_val in static dynamic ; do
1980                 if test "$withval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1986         fi
1987         ol_with_dnssrv_module="$ol_arg"
1988
1989 else
1990         ol_with_dnssrv_module="static"
1991 fi
1992 # end --with-dnssrv_module
1993
1994 # OpenLDAP --enable-hdb
1995         # Check whether --enable-hdb or --disable-hdb was given.
1996 if test "${enable_hdb+set}" = set; then
1997   enableval="$enable_hdb"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2007         fi
2008         ol_enable_hdb="$ol_arg"
2009
2010 else
2011         ol_enable_hdb="no"
2012 fi
2013 # end --enable-hdb
2014 # OpenLDAP --with-hdb_module
2015         # Check whether --with-hdb_module or --without-hdb_module was given.
2016 if test "${with_hdb_module+set}" = set; then
2017   withval="$with_hdb_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_hdb_module="$ol_arg"
2029
2030 else
2031         ol_with_hdb_module="static"
2032 fi
2033 # end --with-hdb_module
2034
2035 # OpenLDAP --enable-ldap
2036         # Check whether --enable-ldap or --disable-ldap was given.
2037 if test "${enable_ldap+set}" = set; then
2038   enableval="$enable_ldap"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2048         fi
2049         ol_enable_ldap="$ol_arg"
2050
2051 else
2052         ol_enable_ldap="no"
2053 fi
2054 # end --enable-ldap
2055 # OpenLDAP --with-ldap_module
2056         # Check whether --with-ldap_module or --without-ldap_module was given.
2057 if test "${with_ldap_module+set}" = set; then
2058   withval="$with_ldap_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_ldap_module="$ol_arg"
2070
2071 else
2072         ol_with_ldap_module="static"
2073 fi
2074 # end --with-ldap_module
2075
2076 # OpenLDAP --enable-ldbm
2077         # Check whether --enable-ldbm or --disable-ldbm was given.
2078 if test "${enable_ldbm+set}" = set; then
2079   enableval="$enable_ldbm"
2080   
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2089         fi
2090         ol_enable_ldbm="$ol_arg"
2091
2092 else
2093         ol_enable_ldbm="no"
2094 fi
2095 # end --enable-ldbm
2096 # OpenLDAP --with-ldbm_api
2097         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2098 if test "${with_ldbm_api+set}" = set; then
2099   withval="$with_ldbm_api"
2100   
2101         ol_arg=invalid
2102         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2103                 if test "$withval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2109         fi
2110         ol_with_ldbm_api="$ol_arg"
2111
2112 else
2113         ol_with_ldbm_api="auto"
2114 fi
2115 # end --with-ldbm_api
2116
2117 # OpenLDAP --with-ldbm_module
2118         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2119 if test "${with_ldbm_module+set}" = set; then
2120   withval="$with_ldbm_module"
2121   
2122         ol_arg=invalid
2123         for ol_val in static dynamic ; do
2124                 if test "$withval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2130         fi
2131         ol_with_ldbm_module="$ol_arg"
2132
2133 else
2134         ol_with_ldbm_module="static"
2135 fi
2136 # end --with-ldbm_module
2137
2138 # OpenLDAP --with-ldbm_type
2139         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2140 if test "${with_ldbm_type+set}" = set; then
2141   withval="$with_ldbm_type"
2142   
2143         ol_arg=invalid
2144         for ol_val in auto btree hash ; do
2145                 if test "$withval" = "$ol_val" ; then
2146                         ol_arg="$ol_val"
2147                 fi
2148         done
2149         if test "$ol_arg" = "invalid" ; then
2150                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2151         fi
2152         ol_with_ldbm_type="$ol_arg"
2153
2154 else
2155         ol_with_ldbm_type="auto"
2156 fi
2157 # end --with-ldbm_type
2158
2159 # OpenLDAP --enable-meta
2160         # Check whether --enable-meta or --disable-meta was given.
2161 if test "${enable_meta+set}" = set; then
2162   enableval="$enable_meta"
2163   
2164         ol_arg=invalid
2165         for ol_val in auto yes no ; do
2166                 if test "$enableval" = "$ol_val" ; then
2167                         ol_arg="$ol_val"
2168                 fi
2169         done
2170         if test "$ol_arg" = "invalid" ; then
2171                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2172         fi
2173         ol_enable_meta="$ol_arg"
2174
2175 else
2176         ol_enable_meta="no"
2177 fi
2178 # end --enable-meta
2179 # OpenLDAP --with-meta_module
2180         # Check whether --with-meta_module or --without-meta_module was given.
2181 if test "${with_meta_module+set}" = set; then
2182   withval="$with_meta_module"
2183   
2184         ol_arg=invalid
2185         for ol_val in static dynamic ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2192         fi
2193         ol_with_meta_module="$ol_arg"
2194
2195 else
2196         ol_with_meta_module="static"
2197 fi
2198 # end --with-meta_module
2199
2200 # OpenLDAP --enable-monitor
2201         # Check whether --enable-monitor or --disable-monitor was given.
2202 if test "${enable_monitor+set}" = set; then
2203   enableval="$enable_monitor"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2213         fi
2214         ol_enable_monitor="$ol_arg"
2215
2216 else
2217         ol_enable_monitor="no"
2218 fi
2219 # end --enable-monitor
2220 # OpenLDAP --with-monitor_module
2221         # Check whether --with-monitor_module or --without-monitor_module was given.
2222 if test "${with_monitor_module+set}" = set; then
2223   withval="$with_monitor_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_monitor_module="$ol_arg"
2235
2236 else
2237         ol_with_monitor_module="static"
2238 fi
2239 # end --with-monitor_module
2240
2241 # OpenLDAP --enable-null
2242         # Check whether --enable-null or --disable-null was given.
2243 if test "${enable_null+set}" = set; then
2244   enableval="$enable_null"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2254         fi
2255         ol_enable_null="$ol_arg"
2256
2257 else
2258         ol_enable_null="no"
2259 fi
2260 # end --enable-null
2261 # OpenLDAP --with-null_module
2262         # Check whether --with-null_module or --without-null_module was given.
2263 if test "${with_null_module+set}" = set; then
2264   withval="$with_null_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_null_module="$ol_arg"
2276
2277 else
2278         ol_with_null_module="static"
2279 fi
2280 # end --with-null_module
2281
2282 # OpenLDAP --enable-passwd
2283         # Check whether --enable-passwd or --disable-passwd was given.
2284 if test "${enable_passwd+set}" = set; then
2285   enableval="$enable_passwd"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2295         fi
2296         ol_enable_passwd="$ol_arg"
2297
2298 else
2299         ol_enable_passwd="no"
2300 fi
2301 # end --enable-passwd
2302 # OpenLDAP --with-passwd_module
2303         # Check whether --with-passwd_module or --without-passwd_module was given.
2304 if test "${with_passwd_module+set}" = set; then
2305   withval="$with_passwd_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_passwd_module="$ol_arg"
2317
2318 else
2319         ol_with_passwd_module="static"
2320 fi
2321 # end --with-passwd_module
2322
2323 # OpenLDAP --enable-perl
2324         # Check whether --enable-perl or --disable-perl was given.
2325 if test "${enable_perl+set}" = set; then
2326   enableval="$enable_perl"
2327   
2328         ol_arg=invalid
2329         for ol_val in auto yes no ; do
2330                 if test "$enableval" = "$ol_val" ; then
2331                         ol_arg="$ol_val"
2332                 fi
2333         done
2334         if test "$ol_arg" = "invalid" ; then
2335                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2336         fi
2337         ol_enable_perl="$ol_arg"
2338
2339 else
2340         ol_enable_perl="no"
2341 fi
2342 # end --enable-perl
2343 # OpenLDAP --with-perl_module
2344         # Check whether --with-perl_module or --without-perl_module was given.
2345 if test "${with_perl_module+set}" = set; then
2346   withval="$with_perl_module"
2347   
2348         ol_arg=invalid
2349         for ol_val in static dynamic ; do
2350                 if test "$withval" = "$ol_val" ; then
2351                         ol_arg="$ol_val"
2352                 fi
2353         done
2354         if test "$ol_arg" = "invalid" ; then
2355                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2356         fi
2357         ol_with_perl_module="$ol_arg"
2358
2359 else
2360         ol_with_perl_module="static"
2361 fi
2362 # end --with-perl_module
2363
2364 # OpenLDAP --enable-shell
2365         # Check whether --enable-shell or --disable-shell was given.
2366 if test "${enable_shell+set}" = set; then
2367   enableval="$enable_shell"
2368   
2369         ol_arg=invalid
2370         for ol_val in auto yes no ; do
2371                 if test "$enableval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2377         fi
2378         ol_enable_shell="$ol_arg"
2379
2380 else
2381         ol_enable_shell="no"
2382 fi
2383 # end --enable-shell
2384 # OpenLDAP --with-shell_module
2385         # Check whether --with-shell_module or --without-shell_module was given.
2386 if test "${with_shell_module+set}" = set; then
2387   withval="$with_shell_module"
2388   
2389         ol_arg=invalid
2390         for ol_val in static dynamic ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2397         fi
2398         ol_with_shell_module="$ol_arg"
2399
2400 else
2401         ol_with_shell_module="static"
2402 fi
2403 # end --with-shell_module
2404
2405 # OpenLDAP --enable-sql
2406         # Check whether --enable-sql or --disable-sql was given.
2407 if test "${enable_sql+set}" = set; then
2408   enableval="$enable_sql"
2409   
2410         ol_arg=invalid
2411         for ol_val in auto yes no ; do
2412                 if test "$enableval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2418         fi
2419         ol_enable_sql="$ol_arg"
2420
2421 else
2422         ol_enable_sql="no"
2423 fi
2424 # end --enable-sql
2425 # OpenLDAP --with-sql_module
2426         # Check whether --with-sql_module or --without-sql_module was given.
2427 if test "${with_sql_module+set}" = set; then
2428   withval="$with_sql_module"
2429   
2430         ol_arg=invalid
2431         for ol_val in static dynamic ; do
2432                 if test "$withval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2438         fi
2439         ol_with_sql_module="$ol_arg"
2440
2441 else
2442         ol_with_sql_module="static"
2443 fi
2444 # end --with-sql_module
2445
2446
2447 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2448 if test "${with_xxslurpdoptions+set}" = set; then
2449   withval="$with_xxslurpdoptions"
2450   :
2451 fi
2452
2453 # OpenLDAP --enable-slurpd
2454         # Check whether --enable-slurpd or --disable-slurpd was given.
2455 if test "${enable_slurpd+set}" = set; then
2456   enableval="$enable_slurpd"
2457   
2458         ol_arg=invalid
2459         for ol_val in auto yes no ; do
2460                 if test "$enableval" = "$ol_val" ; then
2461                         ol_arg="$ol_val"
2462                 fi
2463         done
2464         if test "$ol_arg" = "invalid" ; then
2465                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2466         fi
2467         ol_enable_slurpd="$ol_arg"
2468
2469 else
2470         ol_enable_slurpd="auto"
2471 fi
2472 # end --enable-slurpd
2473
2474 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2475 if test "${with_xxliboptions+set}" = set; then
2476   withval="$with_xxliboptions"
2477   :
2478 fi
2479
2480 # Check whether --enable-static or --disable-static was given.
2481 if test "${enable_static+set}" = set; then
2482   enableval="$enable_static"
2483   p=${PACKAGE-default}
2484 case $enableval in
2485 yes) enable_static=yes ;;
2486 no) enable_static=no ;;
2487 *)
2488   enable_static=no
2489   # Look at the argument we got.  We use all the common list separators.
2490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2491   for pkg in $enableval; do
2492     if test "X$pkg" = "X$p"; then
2493       enable_static=yes
2494     fi
2495   done
2496   IFS="$ac_save_ifs"
2497   ;;
2498 esac
2499 else
2500   enable_static=yes
2501 fi
2502
2503 # Check whether --enable-shared or --disable-shared was given.
2504 if test "${enable_shared+set}" = set; then
2505   enableval="$enable_shared"
2506   p=${PACKAGE-default}
2507 case $enableval in
2508 yes) enable_shared=yes ;;
2509 no) enable_shared=no ;;
2510 *)
2511   enable_shared=no
2512   # Look at the argument we got.  We use all the common list separators.
2513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2514   for pkg in $enableval; do
2515     if test "X$pkg" = "X$p"; then
2516       enable_shared=yes
2517     fi
2518   done
2519   IFS="$ac_save_ifs"
2520   ;;
2521 esac
2522 else
2523   enable_shared=yes
2524 fi
2525
2526
2527
2528 # validate options
2529 if test $ol_enable_slapd = no ; then
2530                 if test $ol_enable_slapi = yes ; then
2531                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2532         fi
2533         if test $ol_enable_bdb = yes ; then
2534                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2535         fi
2536         if test $ol_enable_dnssrv = yes ; then
2537                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2538         fi
2539         if test $ol_enable_hdb = yes ; then
2540                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2541         fi
2542         if test $ol_enable_ldap = yes ; then
2543                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2544         fi
2545         if test $ol_enable_ldbm = yes ; then
2546                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2547         fi
2548         if test $ol_enable_meta = yes ; then
2549                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2550         fi
2551         if test $ol_enable_monitor = yes ; then
2552                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2553         fi
2554         if test $ol_enable_null = yes ; then
2555                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2556         fi
2557         if test $ol_enable_passwd = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2559         fi
2560         if test $ol_enable_perl = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2562         fi
2563         if test $ol_enable_shell = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2565         fi
2566         if test $ol_enable_sql = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2568         fi
2569         if test $ol_enable_modules = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2571         fi
2572         if test $ol_enable_multimaster = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2574         fi
2575         if test $ol_enable_wrappers = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2577         fi
2578         if test $ol_enable_rlookups = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2580         fi
2581         if test $ol_enable_aci = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2583         fi
2584         if test $ol_with_ldbm_api != auto ; then
2585                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2586         fi
2587         if test $ol_with_ldbm_type != auto ; then
2588                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2589         fi
2590         if test $ol_with_bdb_module != static ; then
2591                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2592         fi
2593         if test $ol_with_dnssrv_module != static ; then
2594                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2595         fi
2596         if test $ol_with_hdb_module != static ; then
2597                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2598         fi
2599         if test $ol_with_ldap_module != static ; then
2600                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2601         fi
2602         if test $ol_with_ldbm_module != static ; then
2603                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2604         fi
2605         if test $ol_with_meta_module != static ; then
2606                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2607         fi
2608         if test $ol_with_monitor_module != static ; then
2609                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2610         fi
2611         if test $ol_with_null_module != static ; then
2612                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2613         fi
2614         if test $ol_with_passwd_module != static ; then
2615                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2616         fi
2617         if test $ol_with_perl_module != static ; then
2618                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2619         fi
2620         if test $ol_with_shell_module != static ; then
2621                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2622         fi
2623         if test $ol_with_sql_module != static ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2625         fi
2626         if test $ol_enable_slurpd = yes ; then
2627                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2628         fi
2629         if test $ol_enable_rewrite = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2631         fi
2632
2633         # force settings to no
2634         ol_enable_slapi=no
2635         ol_enable_bdb=no
2636         ol_enable_dnssrv=no
2637         ol_enable_hdb=no
2638         ol_enable_ldap=no
2639         ol_enable_ldbm=no
2640         ol_enable_meta=no
2641         ol_enable_monitor=no
2642         ol_enable_null=no
2643         ol_enable_passwd=no
2644         ol_enable_perl=no
2645         ol_enable_shell=no
2646         ol_enable_sql=no
2647
2648         ol_enable_modules=no
2649         ol_enable_multimaster=no
2650         ol_enable_rlookups=no
2651         ol_enable_aci=no
2652         ol_enable_wrappers=no
2653         ol_enable_dynamic=no
2654
2655         ol_with_ldbm_api=no
2656         ol_with_ldbm_type=no
2657
2658         ol_with_bdb_module=static
2659         ol_with_dnssrv_module=static
2660         ol_with_hdb_module=static
2661         ol_with_ldap_module=static
2662         ol_with_ldbm_module=static
2663         ol_with_meta_module=static
2664         ol_with_monitor_module=static
2665         ol_with_null_module=static
2666         ol_with_passwd_module=static
2667         ol_with_perl_module=static
2668         ol_with_shell_module=static
2669         ol_with_sql_module=static
2670
2671         ol_enable_slurpd=no
2672
2673         ol_enable_rewrite=no
2674
2675 elif test $ol_enable_ldbm = no ; then
2676         
2677         if test $ol_with_ldbm_api != auto ; then
2678                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2679         fi
2680
2681         if test $ol_with_ldbm_type != auto ; then
2682                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2683         fi
2684
2685         if test $ol_with_ldbm_module != static ; then
2686                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2687         fi
2688
2689         if test $ol_enable_modules != yes -a \
2690                 $ol_enable_bdb = no -a \
2691                 $ol_enable_dnssrv = no -a \
2692                 $ol_enable_hdb = no -a \
2693                 $ol_enable_ldap = no -a \
2694                 $ol_enable_meta = no -a \
2695                 $ol_enable_monitor = no -a \
2696                 $ol_enable_null = no -a \
2697                 $ol_enable_passwd = no -a \
2698                 $ol_enable_perl = no -a \
2699                 $ol_enable_shell = no -a \
2700                 $ol_enable_sql = no ; then
2701
2702                 if test $ol_enable_slapd = yes ; then
2703                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2704                 else
2705                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2706                         ol_enable_slapd=no
2707                 fi
2708         fi
2709
2710         ol_with_ldbm_api=no
2711         ol_with_ldbm_type=no
2712         ol_with_ldbm_module=static
2713
2714         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2715                 ol_with_ldbm_api=berkeley
2716         fi
2717
2718 else
2719                 if test $ol_with_ldbm_api = gdbm -a \
2720                 $ol_with_ldbm_type = btree ; then
2721                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2722         fi
2723         if test $ol_with_ldbm_api = mdbm -a \
2724                 $ol_with_ldbm_type = btree ; then
2725                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2726         fi
2727         if test $ol_with_ldbm_api = ndbm -a \
2728                 $ol_with_ldbm_type = btree ; then
2729                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2730         fi
2731
2732         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2733                 if test $ol_with_ldbm_api = auto ; then
2734                         ol_with_ldbm_api=berkeley
2735                 elif test $ol_with_ldbm_api != berkeley ; then
2736                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2737                 fi
2738
2739         elif test $ol_enable_bdb = auto ; then
2740                 if test $ol_with_ldbm_api != berkeley \
2741                         -o $ol_with_ldbm_api != auto ; then
2742                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2743                         ol_enable_bdb=no
2744                 fi
2745         fi
2746 fi
2747
2748 if test $ol_enable_slurpd = yes ; then
2749                 if test $ol_with_threads = no ; then
2750                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2751         fi
2752 fi
2753
2754 if test $ol_enable_lmpasswd = yes ; then
2755         if test $ol_with_tls = no ; then
2756                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2757         fi
2758 fi
2759
2760 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2761         if test $ol_with_kerberos = no ; then
2762                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2763         elif test $ol_with_kerberos = auto ; then
2764                 ol_with_kerberos=yes
2765         fi
2766
2767 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2768         if test $ol_with_kerberos = auto ; then
2769                 ol_with_kerberos=no
2770         elif test $ol_with_kerberos != no ; then
2771                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2772                 ol_with_kerberos=no
2773         fi
2774 fi
2775
2776 if test $ol_enable_spasswd = yes ; then
2777         if test $ol_with_cyrus_sasl = no ; then
2778                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2779         fi
2780         ol_with_cyrus_sasl=yes
2781 fi
2782
2783 echo "$ac_t""done" 1>&6
2784
2785 LDAP_LIBS=
2786 LDIF_LIBS=
2787 LDBM_LIBS=
2788 LTHREAD_LIBS=
2789 LUTIL_LIBS=
2790
2791 SLAPD_LIBS=
2792 SLURPD_LIBS=
2793
2794 BUILD_SLAPD=no
2795 BUILD_SLURPD=no
2796
2797 BUILD_THREAD=no
2798
2799 BUILD_SLAPI=no
2800 SLAPD_SLAPI_DEPEND=
2801
2802 BUILD_BDB=no
2803 BUILD_DNSSRV=no
2804 BUILD_HDB=no
2805 BUILD_LDAP=no
2806 BUILD_LDBM=no
2807 BUILD_META=no
2808 BUILD_MONITOR=no
2809 BUILD_CACHE=no
2810 BUILD_NULL=no
2811 BUILD_PASSWD=no
2812 BUILD_PERL=no
2813 BUILD_SHELL=no
2814 BUILD_SQL=no
2815
2816 BUILD_BDB_DYNAMIC=static
2817 BUILD_DNSSRV_DYNAMIC=static
2818 BUILD_HDB_DYNAMIC=static
2819 BUILD_LDAP_DYNAMIC=static
2820 BUILD_LDBM_DYNAMIC=static
2821 BUILD_META_DYNAMIC=static
2822 BUILD_MONITOR_DYNAMIC=static
2823 BUILD_NULL_DYNAMIC=static
2824 BUILD_PASSWD_DYNAMIC=static
2825 BUILD_PERL_DYNAMIC=static
2826 BUILD_SHELL_DYNAMIC=static
2827 BUILD_SQL_DYNAMIC=static
2828
2829 SLAPD_MODULES_LDFLAGS=
2830 SLAPD_MODULES_CPPFLAGS=
2831
2832 SLAPD_STATIC_BACKENDS=
2833 SLAPD_DYNAMIC_BACKENDS=
2834
2835 SLAPD_PERL_LDFLAGS=
2836 MOD_PERL_LDFLAGS=
2837 PERL_CPPFLAGS=
2838
2839 SLAPD_SQL_LDFLAGS=
2840 SLAPD_SQL_LIBS=
2841 SLAPD_SQL_INCLUDES=
2842
2843 KRB4_LIBS=
2844 KRB5_LIBS=
2845 SASL_LIBS=
2846 TERMCAP_LIBS=
2847 TLS_LIBS=
2848 MODULES_LIBS=
2849 SLAPI_LIBS=
2850 LIBSLAPI=
2851 LIBSLAPITOOLS=
2852 AUTH_LIBS=
2853
2854 SLAPD_SLP_LIBS=
2855
2856
2857 # Find a good install program.  We prefer a C program (faster),
2858 # so one script is as good as another.  But avoid the broken or
2859 # incompatible versions:
2860 # SysV /etc/install, /usr/sbin/install
2861 # SunOS /usr/etc/install
2862 # IRIX /sbin/install
2863 # AIX /bin/install
2864 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2865 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2866 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2867 # ./install, which can be erroneously created by make from ./install.sh.
2868 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2869 echo "configure:2870: checking for a BSD compatible install" >&5
2870 if test -z "$INSTALL"; then
2871 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2875   for ac_dir in $PATH; do
2876     # Account for people who put trailing slashes in PATH elements.
2877     case "$ac_dir/" in
2878     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2879     *)
2880       # OSF1 and SCO ODT 3.0 have their own names for install.
2881       # Don't use installbsd from OSF since it installs stuff as root
2882       # by default.
2883       for ac_prog in ginstall scoinst install; do
2884         if test -f $ac_dir/$ac_prog; then
2885           if test $ac_prog = install &&
2886             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2887             # AIX install.  It has an incompatible calling convention.
2888             :
2889           elif test $ac_prog = install &&
2890             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2891             # program-specific install script used by HP pwplus--don't use.
2892             :
2893           else
2894             ac_cv_path_install="$ac_dir/$ac_prog -c"
2895             break 2
2896           fi
2897         fi
2898       done
2899       ;;
2900     esac
2901   done
2902   IFS="$ac_save_IFS"
2903
2904 fi
2905   if test "${ac_cv_path_install+set}" = set; then
2906     INSTALL="$ac_cv_path_install"
2907   else
2908     # As a last resort, use the slow shell script.  We don't cache a
2909     # path for INSTALL within a source directory, because that will
2910     # break other packages using the cache if that directory is
2911     # removed, or if the path is relative.
2912     INSTALL="$ac_install_sh"
2913   fi
2914 fi
2915 echo "$ac_t""$INSTALL" 1>&6
2916
2917 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2918 # It thinks the first close brace ends the variable substitution.
2919 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2920
2921 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2922
2923 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2924
2925
2926 cat >> confdefs.h <<\EOF
2927 #define HAVE_MKVERSION 1
2928 EOF
2929
2930
2931
2932
2933 ol_aix_threads=no
2934 case "$target" in
2935 *-*-aix*)       if test -z "$CC" ; then
2936                 case "$ol_with_threads" in
2937                 auto | yes |  posix) ol_aix_threads=yes ;;
2938                 esac
2939         fi
2940 ;;
2941 esac
2942
2943 if test $ol_aix_threads = yes ; then
2944         if test -z "${CC}" ; then
2945                 for ac_prog in cc_r xlc_r cc
2946 do
2947 # Extract the first word of "$ac_prog", so it can be a program name with args.
2948 set dummy $ac_prog; ac_word=$2
2949 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2950 echo "configure:2951: checking for $ac_word" >&5
2951 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   if test -n "$CC"; then
2955   ac_cv_prog_CC="$CC" # Let the user override the test.
2956 else
2957   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2958   ac_dummy="$PATH"
2959   for ac_dir in $ac_dummy; do
2960     test -z "$ac_dir" && ac_dir=.
2961     if test -f $ac_dir/$ac_word; then
2962       ac_cv_prog_CC="$ac_prog"
2963       break
2964     fi
2965   done
2966   IFS="$ac_save_ifs"
2967 fi
2968 fi
2969 CC="$ac_cv_prog_CC"
2970 if test -n "$CC"; then
2971   echo "$ac_t""$CC" 1>&6
2972 else
2973   echo "$ac_t""no" 1>&6
2974 fi
2975
2976 test -n "$CC" && break
2977 done
2978
2979
2980                 if test "$CC" = cc ; then
2981                                                 if test $ol_with_threads != auto ; then
2982                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2983                         else
2984                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2985                         fi
2986                         ol_with_threads=no
2987                 fi
2988         fi
2989
2990         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2991                 ol_with_threads=posix
2992                 ol_cv_pthread_create=yes
2993         fi
2994 fi
2995
2996 if test -z "${CC}"; then
2997         for ac_prog in cc gcc
2998 do
2999 # Extract the first word of "$ac_prog", so it can be a program name with args.
3000 set dummy $ac_prog; ac_word=$2
3001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3002 echo "configure:3003: checking for $ac_word" >&5
3003 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3004   echo $ac_n "(cached) $ac_c" 1>&6
3005 else
3006   if test -n "$CC"; then
3007   ac_cv_prog_CC="$CC" # Let the user override the test.
3008 else
3009   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3010   ac_dummy="$PATH"
3011   for ac_dir in $ac_dummy; do
3012     test -z "$ac_dir" && ac_dir=.
3013     if test -f $ac_dir/$ac_word; then
3014       ac_cv_prog_CC="$ac_prog"
3015       break
3016     fi
3017   done
3018   IFS="$ac_save_ifs"
3019 fi
3020 fi
3021 CC="$ac_cv_prog_CC"
3022 if test -n "$CC"; then
3023   echo "$ac_t""$CC" 1>&6
3024 else
3025   echo "$ac_t""no" 1>&6
3026 fi
3027
3028 test -n "$CC" && break
3029 done
3030 test -n "$CC" || CC="missing"
3031
3032
3033         if test "${CC}" = "missing" ; then
3034                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3035         fi
3036 fi
3037
3038 if test -z "${AR}"; then
3039         for ac_prog in ar gar
3040 do
3041 # Extract the first word of "$ac_prog", so it can be a program name with args.
3042 set dummy $ac_prog; ac_word=$2
3043 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3044 echo "configure:3045: checking for $ac_word" >&5
3045 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3046   echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048   if test -n "$AR"; then
3049   ac_cv_prog_AR="$AR" # Let the user override the test.
3050 else
3051   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3052   ac_dummy="$PATH"
3053   for ac_dir in $ac_dummy; do
3054     test -z "$ac_dir" && ac_dir=.
3055     if test -f $ac_dir/$ac_word; then
3056       ac_cv_prog_AR="$ac_prog"
3057       break
3058     fi
3059   done
3060   IFS="$ac_save_ifs"
3061 fi
3062 fi
3063 AR="$ac_cv_prog_AR"
3064 if test -n "$AR"; then
3065   echo "$ac_t""$AR" 1>&6
3066 else
3067   echo "$ac_t""no" 1>&6
3068 fi
3069
3070 test -n "$AR" && break
3071 done
3072 test -n "$AR" || AR="missing"
3073
3074
3075         if test "${AR}" = "missing" ; then
3076                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3077         fi
3078 fi
3079
3080
3081
3082 # Find the correct PATH separator.  Usually this is `:', but
3083 # DJGPP uses `;' like DOS.
3084 if test "X${PATH_SEPARATOR+set}" != Xset; then
3085   UNAME=${UNAME-`uname 2>/dev/null`}
3086   case X$UNAME in
3087     *-DOS) lt_cv_sys_path_separator=';' ;;
3088     *)     lt_cv_sys_path_separator=':' ;;
3089   esac
3090   PATH_SEPARATOR=$lt_cv_sys_path_separator
3091 fi
3092
3093 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3094 echo "configure:3095: checking for Cygwin environment" >&5
3095 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101
3102 int main() {
3103
3104 #ifndef __CYGWIN__
3105 #define __CYGWIN__ __CYGWIN32__
3106 #endif
3107 return __CYGWIN__;
3108 ; return 0; }
3109 EOF
3110 if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3111   rm -rf conftest*
3112   ac_cv_cygwin=yes
3113 else
3114   echo "configure: failed program was:" >&5
3115   cat conftest.$ac_ext >&5
3116   rm -rf conftest*
3117   ac_cv_cygwin=no
3118 fi
3119 rm -f conftest*
3120 fi
3121
3122 echo "$ac_t""$ac_cv_cygwin" 1>&6
3123 CYGWIN=
3124 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3125 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3126 echo "configure:3127: checking for mingw32 environment" >&5
3127 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130   cat > conftest.$ac_ext <<EOF
3131 #line 3132 "configure"
3132 #include "confdefs.h"
3133
3134 int main() {
3135 return __MINGW32__;
3136 ; return 0; }
3137 EOF
3138 if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3139   rm -rf conftest*
3140   ac_cv_mingw32=yes
3141 else
3142   echo "configure: failed program was:" >&5
3143   cat conftest.$ac_ext >&5
3144   rm -rf conftest*
3145   ac_cv_mingw32=no
3146 fi
3147 rm -f conftest*
3148 fi
3149
3150 echo "$ac_t""$ac_cv_mingw32" 1>&6
3151 MINGW32=
3152 test "$ac_cv_mingw32" = yes && MINGW32=yes
3153 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3154 echo "configure:3155: checking for EMX OS/2 environment" >&5
3155 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3156   echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158   cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161
3162 int main() {
3163 return __EMX__;
3164 ; return 0; }
3165 EOF
3166 if { (eval echo configure:3167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3167   rm -rf conftest*
3168   ac_cv_emxos2=yes
3169 else
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172   rm -rf conftest*
3173   ac_cv_emxos2=no
3174 fi
3175 rm -f conftest*
3176 fi
3177
3178 echo "$ac_t""$ac_cv_emxos2" 1>&6
3179 EMXOS2=
3180 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3181 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3182 echo "configure:3183: checking how to run the C preprocessor" >&5
3183 # On Suns, sometimes $CPP names a directory.
3184 if test -n "$CPP" && test -d "$CPP"; then
3185   CPP=
3186 fi
3187 if test -z "$CPP"; then
3188 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3189   echo $ac_n "(cached) $ac_c" 1>&6
3190 else
3191     # This must be in double quotes, not single quotes, because CPP may get
3192   # substituted into the Makefile and "${CC-cc}" will confuse make.
3193   CPP="${CC-cc} -E"
3194   # On the NeXT, cc -E runs the code through the compiler's parser,
3195   # not just through cpp.
3196   cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 #include <assert.h>
3200 Syntax Error
3201 EOF
3202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3203 { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205 if test -z "$ac_err"; then
3206   :
3207 else
3208   echo "$ac_err" >&5
3209   echo "configure: failed program was:" >&5
3210   cat conftest.$ac_ext >&5
3211   rm -rf conftest*
3212   CPP="${CC-cc} -E -traditional-cpp"
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 #include <assert.h>
3217 Syntax Error
3218 EOF
3219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3220 { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3222 if test -z "$ac_err"; then
3223   :
3224 else
3225   echo "$ac_err" >&5
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   CPP="${CC-cc} -nologo -E"
3230   cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233 #include <assert.h>
3234 Syntax Error
3235 EOF
3236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3237 { (eval echo configure:3238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3239 if test -z "$ac_err"; then
3240   :
3241 else
3242   echo "$ac_err" >&5
3243   echo "configure: failed program was:" >&5
3244   cat conftest.$ac_ext >&5
3245   rm -rf conftest*
3246   CPP=/lib/cpp
3247 fi
3248 rm -f conftest*
3249 fi
3250 rm -f conftest*
3251 fi
3252 rm -f conftest*
3253   ac_cv_prog_CPP="$CPP"
3254 fi
3255   CPP="$ac_cv_prog_CPP"
3256 else
3257   ac_cv_prog_CPP="$CPP"
3258 fi
3259 echo "$ac_t""$CPP" 1>&6
3260
3261 # Check whether --enable-fast-install or --disable-fast-install was given.
3262 if test "${enable_fast_install+set}" = set; then
3263   enableval="$enable_fast_install"
3264   p=${PACKAGE-default}
3265 case $enableval in
3266 yes) enable_fast_install=yes ;;
3267 no) enable_fast_install=no ;;
3268 *)
3269   enable_fast_install=no
3270   # Look at the argument we got.  We use all the common list separators.
3271   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3272   for pkg in $enableval; do
3273     if test "X$pkg" = "X$p"; then
3274       enable_fast_install=yes
3275     fi
3276   done
3277   IFS="$ac_save_ifs"
3278   ;;
3279 esac
3280 else
3281   enable_fast_install=yes
3282 fi
3283
3284 # Extract the first word of "gcc", so it can be a program name with args.
3285 set dummy gcc; ac_word=$2
3286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3287 echo "configure:3288: checking for $ac_word" >&5
3288 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   if test -n "$CC"; then
3292   ac_cv_prog_CC="$CC" # Let the user override the test.
3293 else
3294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3295   ac_dummy="$PATH"
3296   for ac_dir in $ac_dummy; do
3297     test -z "$ac_dir" && ac_dir=.
3298     if test -f $ac_dir/$ac_word; then
3299       ac_cv_prog_CC="gcc"
3300       break
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304 fi
3305 fi
3306 CC="$ac_cv_prog_CC"
3307 if test -n "$CC"; then
3308   echo "$ac_t""$CC" 1>&6
3309 else
3310   echo "$ac_t""no" 1>&6
3311 fi
3312
3313 if test -z "$CC"; then
3314   # Extract the first word of "cc", so it can be a program name with args.
3315 set dummy cc; ac_word=$2
3316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3317 echo "configure:3318: checking for $ac_word" >&5
3318 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3319   echo $ac_n "(cached) $ac_c" 1>&6
3320 else
3321   if test -n "$CC"; then
3322   ac_cv_prog_CC="$CC" # Let the user override the test.
3323 else
3324   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3325   ac_prog_rejected=no
3326   ac_dummy="$PATH"
3327   for ac_dir in $ac_dummy; do
3328     test -z "$ac_dir" && ac_dir=.
3329     if test -f $ac_dir/$ac_word; then
3330       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3331         ac_prog_rejected=yes
3332         continue
3333       fi
3334       ac_cv_prog_CC="cc"
3335       break
3336     fi
3337   done
3338   IFS="$ac_save_ifs"
3339 if test $ac_prog_rejected = yes; then
3340   # We found a bogon in the path, so make sure we never use it.
3341   set dummy $ac_cv_prog_CC
3342   shift
3343   if test $# -gt 0; then
3344     # We chose a different compiler from the bogus one.
3345     # However, it has the same basename, so the bogon will be chosen
3346     # first if we set CC to just the basename; use the full file name.
3347     shift
3348     set dummy "$ac_dir/$ac_word" "$@"
3349     shift
3350     ac_cv_prog_CC="$@"
3351   fi
3352 fi
3353 fi
3354 fi
3355 CC="$ac_cv_prog_CC"
3356 if test -n "$CC"; then
3357   echo "$ac_t""$CC" 1>&6
3358 else
3359   echo "$ac_t""no" 1>&6
3360 fi
3361
3362   if test -z "$CC"; then
3363     case "`uname -s`" in
3364     *win32* | *WIN32* | *CYGWIN*)
3365       # Extract the first word of "cl", so it can be a program name with args.
3366 set dummy cl; ac_word=$2
3367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_word" >&5
3369 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3370   echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372   if test -n "$CC"; then
3373   ac_cv_prog_CC="$CC" # Let the user override the test.
3374 else
3375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3376   ac_dummy="$PATH"
3377   for ac_dir in $ac_dummy; do
3378     test -z "$ac_dir" && ac_dir=.
3379     if test -f $ac_dir/$ac_word; then
3380       ac_cv_prog_CC="cl"
3381       break
3382     fi
3383   done
3384   IFS="$ac_save_ifs"
3385 fi
3386 fi
3387 CC="$ac_cv_prog_CC"
3388 if test -n "$CC"; then
3389   echo "$ac_t""$CC" 1>&6
3390 else
3391   echo "$ac_t""no" 1>&6
3392 fi
3393  ;;
3394     esac
3395   fi
3396   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3397 fi
3398
3399 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3400 echo "configure:3401: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3401
3402 ac_ext=c
3403 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3404 ac_cpp='$CPP $CPPFLAGS'
3405 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3406 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3407 cross_compiling=$ac_cv_prog_cc_cross
3408
3409 cat > conftest.$ac_ext << EOF
3410
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413
3414 main(){return(0);}
3415 EOF
3416 if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3417   ac_cv_prog_cc_works=yes
3418   # If we can't run a trivial program, we are probably using a cross compiler.
3419   if (./conftest; exit) 2>/dev/null; then
3420     ac_cv_prog_cc_cross=no
3421   else
3422     ac_cv_prog_cc_cross=yes
3423   fi
3424 else
3425   echo "configure: failed program was:" >&5
3426   cat conftest.$ac_ext >&5
3427   ac_cv_prog_cc_works=no
3428 fi
3429 rm -fr conftest*
3430 ac_ext=c
3431 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3432 ac_cpp='$CPP $CPPFLAGS'
3433 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3434 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3435 cross_compiling=$ac_cv_prog_cc_cross
3436
3437 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3438 if test $ac_cv_prog_cc_works = no; then
3439   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3440 fi
3441 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3442 echo "configure:3443: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3443 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3444 cross_compiling=$ac_cv_prog_cc_cross
3445
3446 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3447 echo "configure:3448: checking whether we are using GNU C" >&5
3448 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   cat > conftest.c <<EOF
3452 #ifdef __GNUC__
3453   yes;
3454 #endif
3455 EOF
3456 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3457   ac_cv_prog_gcc=yes
3458 else
3459   ac_cv_prog_gcc=no
3460 fi
3461 fi
3462
3463 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3464
3465 if test $ac_cv_prog_gcc = yes; then
3466   GCC=yes
3467 else
3468   GCC=
3469 fi
3470
3471 ac_test_CFLAGS="${CFLAGS+set}"
3472 ac_save_CFLAGS="$CFLAGS"
3473 CFLAGS=
3474 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3475 echo "configure:3476: checking whether ${CC-cc} accepts -g" >&5
3476 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   echo 'void f(){}' > conftest.c
3480 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3481   ac_cv_prog_cc_g=yes
3482 else
3483   ac_cv_prog_cc_g=no
3484 fi
3485 rm -f conftest*
3486
3487 fi
3488
3489 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3490 if test "$ac_test_CFLAGS" = set; then
3491   CFLAGS="$ac_save_CFLAGS"
3492 elif test $ac_cv_prog_cc_g = yes; then
3493   if test "$GCC" = yes; then
3494     CFLAGS="-g -O2"
3495   else
3496     CFLAGS="-g"
3497   fi
3498 else
3499   if test "$GCC" = yes; then
3500     CFLAGS="-O2"
3501   else
3502     CFLAGS=
3503   fi
3504 fi
3505
3506 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3507 if test "${with_gnu_ld+set}" = set; then
3508   withval="$with_gnu_ld"
3509   test "$withval" = no || with_gnu_ld=yes
3510 else
3511   with_gnu_ld=no
3512 fi
3513
3514 ac_prog=ld
3515 if test "$GCC" = yes; then
3516   # Check if gcc -print-prog-name=ld gives a path.
3517   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3518 echo "configure:3519: checking for ld used by GCC" >&5
3519   case $host in
3520   *-*-mingw*)
3521     # gcc leaves a trailing carriage return which upsets mingw
3522     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3523   *)
3524     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3525   esac
3526   case $ac_prog in
3527     # Accept absolute paths.
3528     [\\/]* | [A-Za-z]:[\\/]*)
3529       re_direlt='/[^/][^/]*/\.\./'
3530       # Canonicalize the path of ld
3531       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3532       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3533         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3534       done
3535       test -z "$LD" && LD="$ac_prog"
3536       ;;
3537   "")
3538     # If it fails, then pretend we aren't using GCC.
3539     ac_prog=ld
3540     ;;
3541   *)
3542     # If it is relative, then search for the first ld in PATH.
3543     with_gnu_ld=unknown
3544     ;;
3545   esac
3546 elif test "$with_gnu_ld" = yes; then
3547   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3548 echo "configure:3549: checking for GNU ld" >&5
3549 else
3550   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3551 echo "configure:3552: checking for non-GNU ld" >&5
3552 fi
3553 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3554   echo $ac_n "(cached) $ac_c" 1>&6
3555 else
3556   if test -z "$LD"; then
3557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3558   for ac_dir in $PATH; do
3559     test -z "$ac_dir" && ac_dir=.
3560     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3561       lt_cv_path_LD="$ac_dir/$ac_prog"
3562       # Check to see if the program is GNU ld.  I'd rather use --version,
3563       # but apparently some GNU ld's only accept -v.
3564       # Break only if it was the GNU/non-GNU ld that we prefer.
3565       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3566         test "$with_gnu_ld" != no && break
3567       else
3568         test "$with_gnu_ld" != yes && break
3569       fi
3570     fi
3571   done
3572   IFS="$ac_save_ifs"
3573 else
3574   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3575 fi
3576 fi
3577
3578 LD="$lt_cv_path_LD"
3579 if test -n "$LD"; then
3580   echo "$ac_t""$LD" 1>&6
3581 else
3582   echo "$ac_t""no" 1>&6
3583 fi
3584 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3585 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3586 echo "configure:3587: checking if the linker ($LD) is GNU ld" >&5
3587 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3588   echo $ac_n "(cached) $ac_c" 1>&6
3589 else
3590   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3591 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3592   lt_cv_prog_gnu_ld=yes
3593 else
3594   lt_cv_prog_gnu_ld=no
3595 fi
3596 fi
3597
3598 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3599 with_gnu_ld=$lt_cv_prog_gnu_ld
3600
3601
3602 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3603 echo "configure:3604: checking for $LD option to reload object files" >&5
3604 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   lt_cv_ld_reload_flag='-r'
3608 fi
3609
3610 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3611 reload_flag=$lt_cv_ld_reload_flag
3612 test -n "$reload_flag" && reload_flag=" $reload_flag"
3613
3614 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3615 echo "configure:3616: checking for BSD-compatible nm" >&5
3616 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   if test -n "$NM"; then
3620   # Let the user override the test.
3621   lt_cv_path_NM="$NM"
3622 else
3623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3624   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3625     test -z "$ac_dir" && ac_dir=.
3626     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3627     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3628       # Check to see if the nm accepts a BSD-compat flag.
3629       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3630       #   nm: unknown option "B" ignored
3631       # Tru64's nm complains that /dev/null is an invalid object file
3632       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3633         lt_cv_path_NM="$tmp_nm -B"
3634         break
3635       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3636         lt_cv_path_NM="$tmp_nm -p"
3637         break
3638       else
3639         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3640         continue # so that we can try to find one that supports BSD flags
3641       fi
3642     fi
3643   done
3644   IFS="$ac_save_ifs"
3645   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3646 fi
3647 fi
3648
3649 NM="$lt_cv_path_NM"
3650 echo "$ac_t""$NM" 1>&6
3651
3652 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3653 echo "configure:3654: checking for a sed that does not truncate output" >&5
3654 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   # Loop through the user's path and test for sed and gsed.
3658 # Then use that list of sed's as ones to test for truncation.
3659 as_executable_p="test -f"
3660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661 for as_dir in $PATH
3662 do
3663   IFS=$as_save_IFS
3664   test -z "$as_dir" && as_dir=.
3665   for ac_prog in sed gsed; do
3666     for ac_exec_ext in '' $ac_executable_extensions; do
3667       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3668         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3669       fi
3670     done
3671   done
3672 done
3673
3674   # Create a temporary directory, and hook for its removal unless debugging.
3675 $debug ||
3676 {
3677   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3678   trap '{ (exit 1); exit 1; }' 1 2 13 15
3679 }
3680
3681 # Create a (secure) tmp directory for tmp files.
3682 : ${TMPDIR=/tmp}
3683 {
3684   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3685   test -n "$tmp" && test -d "$tmp"
3686 }  ||
3687 {
3688   tmp=$TMPDIR/sed$$-$RANDOM
3689   (umask 077 && mkdir $tmp)
3690 } ||
3691 {
3692    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3693    { (exit 1); exit 1; }
3694 }
3695   _max=0
3696   _count=0
3697   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3698   # along with /bin/sed that truncates output.
3699   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3700     test ! -f ${_sed} && break
3701     cat /dev/null > "$tmp/sed.in"
3702     _count=0
3703     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3704     # Check for GNU sed and select it if it is found.
3705     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3706       lt_cv_path_SED=${_sed}
3707       break
3708     fi
3709     while true; do
3710       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3711       mv "$tmp/sed.tmp" "$tmp/sed.in"
3712       cp "$tmp/sed.in" "$tmp/sed.nl"
3713       echo >>"$tmp/sed.nl"
3714       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3715       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3716       # 40000 chars as input seems more than enough
3717       test $_count -gt 10 && break
3718       _count=`expr $_count + 1`
3719       if test $_count -gt $_max; then
3720         _max=$_count
3721         lt_cv_path_SED=$_sed
3722       fi
3723     done
3724   done
3725   rm -rf "$tmp"
3726
3727 fi
3728
3729 if test "X$SED" != "X"; then
3730   lt_cv_path_SED=$SED
3731 else
3732   SED=$lt_cv_path_SED
3733 fi
3734 echo "$ac_t""$SED" 1>&6
3735
3736 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3737 echo "configure:3738: checking whether ln -s works" >&5
3738 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   rm -f conftestdata
3742 if ln -s X conftestdata 2>/dev/null
3743 then
3744   rm -f conftestdata
3745   ac_cv_prog_LN_S="ln -s"
3746 else
3747   ac_cv_prog_LN_S=ln
3748 fi
3749 fi
3750 LN_S="$ac_cv_prog_LN_S"
3751 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3752   echo "$ac_t""yes" 1>&6
3753 else
3754   echo "$ac_t""no" 1>&6
3755 fi
3756
3757 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3758 echo "configure:3759: checking how to recognise dependent libraries" >&5
3759 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3760   echo $ac_n "(cached) $ac_c" 1>&6
3761 else
3762   lt_cv_file_magic_cmd='$MAGIC_CMD'
3763 lt_cv_file_magic_test_file=
3764 lt_cv_deplibs_check_method='unknown'
3765 # Need to set the preceding variable on all platforms that support
3766 # interlibrary dependencies.
3767 # 'none' -- dependencies not supported.
3768 # `unknown' -- same as none, but documents that we really don't know.
3769 # 'pass_all' -- all dependencies passed with no checks.
3770 # 'test_compile' -- check by making test program.
3771 # 'file_magic [[regex]]' -- check by looking for files in library path
3772 # which responds to the $file_magic_cmd with a given egrep regex.
3773 # If you have `file' or equivalent on your system and you're not sure
3774 # whether `pass_all' will *always* work, you probably want this one.
3775
3776 case $host_os in
3777 aix4* | aix5*)
3778   lt_cv_deplibs_check_method=pass_all
3779   ;;
3780
3781 beos*)
3782   lt_cv_deplibs_check_method=pass_all
3783   ;;
3784
3785 bsdi4*)
3786   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3787   lt_cv_file_magic_cmd='/usr/bin/file -L'
3788   lt_cv_file_magic_test_file=/shlib/libc.so
3789   ;;
3790
3791 cygwin* | mingw* | pw32*)
3792   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3793   lt_cv_file_magic_cmd='$OBJDUMP -f'
3794   ;;
3795
3796 darwin* | rhapsody*)
3797   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3798   lt_cv_file_magic_cmd='/usr/bin/file -L'
3799   case "$host_os" in
3800   rhapsody* | darwin1.[012])
3801     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3802     ;;
3803   *) # Darwin 1.3 on
3804     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3805     ;;
3806   esac
3807   ;;
3808
3809 freebsd*)
3810   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3811     case $host_cpu in
3812     i*86 )
3813       # Not sure whether the presence of OpenBSD here was a mistake.
3814       # Let's accept both of them until this is cleared up.
3815       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3816       lt_cv_file_magic_cmd=/usr/bin/file
3817       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3818       ;;
3819     esac
3820   else
3821     lt_cv_deplibs_check_method=pass_all
3822   fi
3823   ;;
3824
3825 gnu*)
3826   lt_cv_deplibs_check_method=pass_all
3827   ;;
3828
3829 hpux10.20*|hpux11*)
3830   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3831   lt_cv_file_magic_cmd=/usr/bin/file
3832   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3833   ;;
3834
3835 irix5* | irix6* | nonstopux*)
3836   case $host_os in
3837   irix5* | nonstopux*)
3838     # this will be overridden with pass_all, but let us keep it just in case
3839     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3840     ;;
3841   *)
3842     case $LD in
3843     *-32|*"-32 ") libmagic=32-bit;;
3844     *-n32|*"-n32 ") libmagic=N32;;
3845     *-64|*"-64 ") libmagic=64-bit;;
3846     *) libmagic=never-match;;
3847     esac
3848     # this will be overridden with pass_all, but let us keep it just in case
3849     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3850     ;;
3851   esac
3852   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3853   lt_cv_deplibs_check_method=pass_all
3854   ;;
3855
3856 # This must be Linux ELF.
3857 linux-gnu*)
3858   case $host_cpu in
3859   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3860     lt_cv_deplibs_check_method=pass_all ;;
3861   *)
3862     # glibc up to 2.1.1 does not perform some relocations on ARM
3863     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3864   esac
3865   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3866   ;;
3867
3868 netbsd*)
3869   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3870     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3871   else
3872     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3873   fi
3874   ;;
3875
3876 newos6*)
3877   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3878   lt_cv_file_magic_cmd=/usr/bin/file
3879   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3880   ;;
3881
3882 openbsd*)
3883   lt_cv_file_magic_cmd=/usr/bin/file
3884   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3885   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3886     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3887   else
3888     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3889   fi
3890   ;;
3891
3892 osf3* | osf4* | osf5*)
3893   # this will be overridden with pass_all, but let us keep it just in case
3894   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3895   lt_cv_file_magic_test_file=/shlib/libc.so
3896   lt_cv_deplibs_check_method=pass_all
3897   ;;
3898
3899 sco3.2v5*)
3900   lt_cv_deplibs_check_method=pass_all
3901   ;;
3902
3903 solaris*)
3904   lt_cv_deplibs_check_method=pass_all
3905   lt_cv_file_magic_test_file=/lib/libc.so
3906   ;;
3907
3908 sysv5uw[78]* | sysv4*uw2*)
3909   lt_cv_deplibs_check_method=pass_all
3910   ;;
3911
3912 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3913   case $host_vendor in
3914   motorola)
3915     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]'
3916     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3917     ;;
3918   ncr)
3919     lt_cv_deplibs_check_method=pass_all
3920     ;;
3921   sequent)
3922     lt_cv_file_magic_cmd='/bin/file'
3923     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3924     ;;
3925   sni)
3926     lt_cv_file_magic_cmd='/bin/file'
3927     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3928     lt_cv_file_magic_test_file=/lib/libc.so
3929     ;;
3930   siemens)
3931     lt_cv_deplibs_check_method=pass_all
3932     ;;
3933   esac
3934   ;;
3935 esac
3936
3937 fi
3938
3939 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3940 file_magic_cmd=$lt_cv_file_magic_cmd
3941 deplibs_check_method=$lt_cv_deplibs_check_method
3942
3943 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3944 echo "configure:3945: checking for object suffix" >&5
3945 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3946   echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948   rm -f conftest*
3949 echo 'int i = 1;' > conftest.$ac_ext
3950 if { (eval echo configure:3951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3951   for ac_file in conftest.*; do
3952     case $ac_file in
3953     *.c) ;;
3954     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3955     esac
3956   done
3957 else
3958   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3959 fi
3960 rm -f conftest*
3961 fi
3962
3963 echo "$ac_t""$ac_cv_objext" 1>&6
3964 OBJEXT=$ac_cv_objext
3965 ac_objext=$ac_cv_objext
3966
3967
3968
3969
3970 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3971 echo "configure:3972: checking for executable suffix" >&5
3972 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3973   echo $ac_n "(cached) $ac_c" 1>&6
3974 else
3975   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3976   ac_cv_exeext=.exe
3977 else
3978   rm -f conftest*
3979   echo 'int main () { return 0; }' > conftest.$ac_ext
3980   ac_cv_exeext=
3981   if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3982     for file in conftest.*; do
3983       case $file in
3984       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3985       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3986       esac
3987     done
3988   else
3989     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3990   fi
3991   rm -f conftest*
3992   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3993 fi
3994 fi
3995
3996 EXEEXT=""
3997 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3998 echo "$ac_t""${ac_cv_exeext}" 1>&6
3999 ac_exeext=$EXEEXT
4000
4001 if test $host != $build; then
4002   ac_tool_prefix=${host_alias}-
4003 else
4004   ac_tool_prefix=
4005 fi
4006
4007
4008
4009
4010 # Check for command to grab the raw symbol name followed by C symbol from nm.
4011 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4012 echo "configure:4013: checking command to parse $NM output" >&5
4013 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4014   echo $ac_n "(cached) $ac_c" 1>&6
4015 else
4016   
4017 # These are sane defaults that work on at least a few old systems.
4018 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4019
4020 # Character class describing NM global symbol codes.
4021 symcode='[BCDEGRST]'
4022
4023 # Regexp to match symbols that can be accessed directly from C.
4024 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4025
4026 # Transform the above into a raw symbol and a C symbol.
4027 symxfrm='\1 \2\3 \3'
4028
4029 # Transform an extracted symbol line into a proper C declaration
4030 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4031
4032 # Transform an extracted symbol line into symbol name and symbol address
4033 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'"
4034
4035 # Define system-specific variables.
4036 case $host_os in
4037 aix*)
4038   symcode='[BCDT]'
4039   ;;
4040 cygwin* | mingw* | pw32*)
4041   symcode='[ABCDGISTW]'
4042   ;;
4043 hpux*) # Its linker distinguishes data from code symbols
4044   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4045   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'"
4046   ;;
4047 irix* | nonstopux*)
4048   symcode='[BCDEGRST]'
4049   ;;
4050 osf*)
4051   symcode='[BCDEGQRST]'
4052   ;;
4053 solaris* | sysv5*)
4054   symcode='[BDT]'
4055   ;;
4056 sysv4)
4057   symcode='[DFNSTU]'
4058   ;;
4059 esac
4060
4061 # Handle CRLF in mingw tool chain
4062 opt_cr=
4063 case $host_os in
4064 mingw*)
4065   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4066   ;;
4067 esac
4068
4069 # If we're using GNU nm, then use its standard symbol codes.
4070 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4071   symcode='[ABCDGISTW]'
4072 fi
4073
4074 # Try without a prefix undercore, then with it.
4075 for ac_symprfx in "" "_"; do
4076
4077   # Write the raw and C identifiers.
4078 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4079
4080   # Check to see that the pipe works correctly.
4081   pipe_works=no
4082   rm -f conftest*
4083   cat > conftest.$ac_ext <<EOF
4084 #ifdef __cplusplus
4085 extern "C" {
4086 #endif
4087 char nm_test_var;
4088 void nm_test_func(){}
4089 #ifdef __cplusplus
4090 }
4091 #endif
4092 int main(){nm_test_var='a';nm_test_func();return(0);}
4093 EOF
4094
4095   if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4096     # Now try to grab the symbols.
4097     nlist=conftest.nm
4098     if { (eval echo configure:4099: \"$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
4099       # Try sorting and uniquifying the output.
4100       if sort "$nlist" | uniq > "$nlist"T; then
4101         mv -f "$nlist"T "$nlist"
4102       else
4103         rm -f "$nlist"T
4104       fi
4105
4106       # Make sure that we snagged all the symbols we need.
4107       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4108         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4109           cat <<EOF > conftest.$ac_ext
4110 #ifdef __cplusplus
4111 extern "C" {
4112 #endif
4113
4114 EOF
4115           # Now generate the symbol file.
4116           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4117
4118           cat <<EOF >> conftest.$ac_ext
4119 #if defined (__STDC__) && __STDC__
4120 # define lt_ptr void *
4121 #else
4122 # define lt_ptr char *
4123 # define const
4124 #endif
4125
4126 /* The mapping between symbol names and symbols. */
4127 const struct {
4128   const char *name;
4129   lt_ptr address;
4130 }
4131 lt_preloaded_symbols[] =
4132 {
4133 EOF
4134           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4135           cat <<\EOF >> conftest.$ac_ext
4136   {0, (lt_ptr) 0}
4137 };
4138
4139 #ifdef __cplusplus
4140 }
4141 #endif
4142 EOF
4143           # Now try linking the two files.
4144           mv conftest.$ac_objext conftstm.$ac_objext
4145           save_LIBS="$LIBS"
4146           save_CFLAGS="$CFLAGS"
4147           LIBS="conftstm.$ac_objext"
4148           CFLAGS="$CFLAGS$no_builtin_flag"
4149           if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4150             pipe_works=yes
4151           fi
4152           LIBS="$save_LIBS"
4153           CFLAGS="$save_CFLAGS"
4154         else
4155           echo "cannot find nm_test_func in $nlist" >&5
4156         fi
4157       else
4158         echo "cannot find nm_test_var in $nlist" >&5
4159       fi
4160     else
4161       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4162     fi
4163   else
4164     echo "$progname: failed program was:" >&5
4165     cat conftest.$ac_ext >&5
4166   fi
4167   rm -f conftest* conftst*
4168
4169   # Do not use the global_symbol_pipe unless it works.
4170   if test "$pipe_works" = yes; then
4171     break
4172   else
4173     lt_cv_sys_global_symbol_pipe=
4174   fi
4175 done
4176
4177 fi
4178
4179 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4180 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4181   global_symbol_to_cdecl=
4182   global_symbol_to_c_name_address=
4183 else
4184   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4185   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4186 fi
4187 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4188 then
4189   echo "$ac_t""failed" 1>&6
4190 else
4191   echo "$ac_t""ok" 1>&6
4192 fi
4193
4194 for ac_hdr in dlfcn.h
4195 do
4196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4198 echo "configure:4199: checking for $ac_hdr" >&5
4199 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4200   echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202   cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205 #include <$ac_hdr>
4206 EOF
4207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4208 { (eval echo configure:4209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4210 if test -z "$ac_err"; then
4211   rm -rf conftest*
4212   eval "ac_cv_header_$ac_safe=yes"
4213 else
4214   echo "$ac_err" >&5
4215   echo "configure: failed program was:" >&5
4216   cat conftest.$ac_ext >&5
4217   rm -rf conftest*
4218   eval "ac_cv_header_$ac_safe=no"
4219 fi
4220 rm -f conftest*
4221 fi
4222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4223   echo "$ac_t""yes" 1>&6
4224     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4225   cat >> confdefs.h <<EOF
4226 #define $ac_tr_hdr 1
4227 EOF
4228  
4229 else
4230   echo "$ac_t""no" 1>&6
4231 fi
4232 done
4233
4234
4235
4236
4237
4238
4239 # Only perform the check for file, if the check method requires it
4240 case $deplibs_check_method in
4241 file_magic*)
4242   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4243     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4244 echo "configure:4245: checking for ${ac_tool_prefix}file" >&5
4245 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4246   echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248   case $MAGIC_CMD in
4249   /*)
4250   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4251   ;;
4252   ?:/*)
4253   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4254   ;;
4255   *)
4256   ac_save_MAGIC_CMD="$MAGIC_CMD"
4257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4258   ac_dummy="/usr/bin:$PATH"
4259   for ac_dir in $ac_dummy; do
4260     test -z "$ac_dir" && ac_dir=.
4261     if test -f $ac_dir/${ac_tool_prefix}file; then
4262       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4263       if test -n "$file_magic_test_file"; then
4264         case $deplibs_check_method in
4265         "file_magic "*)
4266           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4267           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4268           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4269             egrep "$file_magic_regex" > /dev/null; then
4270             :
4271           else
4272             cat <<EOF 1>&2
4273
4274 *** Warning: the command libtool uses to detect shared libraries,
4275 *** $file_magic_cmd, produces output that libtool cannot recognize.
4276 *** The result is that libtool may fail to recognize shared libraries
4277 *** as such.  This will affect the creation of libtool libraries that
4278 *** depend on shared libraries, but programs linked with such libtool
4279 *** libraries will work regardless of this problem.  Nevertheless, you
4280 *** may want to report the problem to your system manager and/or to
4281 *** bug-libtool@gnu.org
4282
4283 EOF
4284           fi ;;
4285         esac
4286       fi
4287       break
4288     fi
4289   done
4290   IFS="$ac_save_ifs"
4291   MAGIC_CMD="$ac_save_MAGIC_CMD"
4292   ;;
4293 esac
4294 fi
4295
4296 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4297 if test -n "$MAGIC_CMD"; then
4298   echo "$ac_t""$MAGIC_CMD" 1>&6
4299 else
4300   echo "$ac_t""no" 1>&6
4301 fi
4302
4303 if test -z "$lt_cv_path_MAGIC_CMD"; then
4304   if test -n "$ac_tool_prefix"; then
4305     echo $ac_n "checking for file""... $ac_c" 1>&6
4306 echo "configure:4307: checking for file" >&5
4307 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   case $MAGIC_CMD in
4311   /*)
4312   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4313   ;;
4314   ?:/*)
4315   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4316   ;;
4317   *)
4318   ac_save_MAGIC_CMD="$MAGIC_CMD"
4319   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4320   ac_dummy="/usr/bin:$PATH"
4321   for ac_dir in $ac_dummy; do
4322     test -z "$ac_dir" && ac_dir=.
4323     if test -f $ac_dir/file; then
4324       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4325       if test -n "$file_magic_test_file"; then
4326         case $deplibs_check_method in
4327         "file_magic "*)
4328           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4329           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4330           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4331             egrep "$file_magic_regex" > /dev/null; then
4332             :
4333           else
4334             cat <<EOF 1>&2
4335
4336 *** Warning: the command libtool uses to detect shared libraries,
4337 *** $file_magic_cmd, produces output that libtool cannot recognize.
4338 *** The result is that libtool may fail to recognize shared libraries
4339 *** as such.  This will affect the creation of libtool libraries that
4340 *** depend on shared libraries, but programs linked with such libtool
4341 *** libraries will work regardless of this problem.  Nevertheless, you
4342 *** may want to report the problem to your system manager and/or to
4343 *** bug-libtool@gnu.org
4344
4345 EOF
4346           fi ;;
4347         esac
4348       fi
4349       break
4350     fi
4351   done
4352   IFS="$ac_save_ifs"
4353   MAGIC_CMD="$ac_save_MAGIC_CMD"
4354   ;;
4355 esac
4356 fi
4357
4358 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4359 if test -n "$MAGIC_CMD"; then
4360   echo "$ac_t""$MAGIC_CMD" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365   else
4366     MAGIC_CMD=:
4367   fi
4368 fi
4369
4370   fi
4371   ;;
4372 esac
4373
4374 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4375 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4377 echo "configure:4378: checking for $ac_word" >&5
4378 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4379   echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381   if test -n "$RANLIB"; then
4382   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4383 else
4384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4385   ac_dummy="$PATH"
4386   for ac_dir in $ac_dummy; do
4387     test -z "$ac_dir" && ac_dir=.
4388     if test -f $ac_dir/$ac_word; then
4389       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4390       break
4391     fi
4392   done
4393   IFS="$ac_save_ifs"
4394 fi
4395 fi
4396 RANLIB="$ac_cv_prog_RANLIB"
4397 if test -n "$RANLIB"; then
4398   echo "$ac_t""$RANLIB" 1>&6
4399 else
4400   echo "$ac_t""no" 1>&6
4401 fi
4402
4403
4404 if test -z "$ac_cv_prog_RANLIB"; then
4405 if test -n "$ac_tool_prefix"; then
4406   # Extract the first word of "ranlib", so it can be a program name with args.
4407 set dummy ranlib; ac_word=$2
4408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4409 echo "configure:4410: checking for $ac_word" >&5
4410 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   if test -n "$RANLIB"; then
4414   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4415 else
4416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4417   ac_dummy="$PATH"
4418   for ac_dir in $ac_dummy; do
4419     test -z "$ac_dir" && ac_dir=.
4420     if test -f $ac_dir/$ac_word; then
4421       ac_cv_prog_RANLIB="ranlib"
4422       break
4423     fi
4424   done
4425   IFS="$ac_save_ifs"
4426   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4427 fi
4428 fi
4429 RANLIB="$ac_cv_prog_RANLIB"
4430 if test -n "$RANLIB"; then
4431   echo "$ac_t""$RANLIB" 1>&6
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436 else
4437   RANLIB=":"
4438 fi
4439 fi
4440
4441 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4442 set dummy ${ac_tool_prefix}strip; ac_word=$2
4443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4444 echo "configure:4445: checking for $ac_word" >&5
4445 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   if test -n "$STRIP"; then
4449   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4450 else
4451   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4452   ac_dummy="$PATH"
4453   for ac_dir in $ac_dummy; do
4454     test -z "$ac_dir" && ac_dir=.
4455     if test -f $ac_dir/$ac_word; then
4456       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4457       break
4458     fi
4459   done
4460   IFS="$ac_save_ifs"
4461 fi
4462 fi
4463 STRIP="$ac_cv_prog_STRIP"
4464 if test -n "$STRIP"; then
4465   echo "$ac_t""$STRIP" 1>&6
4466 else
4467   echo "$ac_t""no" 1>&6
4468 fi
4469
4470
4471 if test -z "$ac_cv_prog_STRIP"; then
4472 if test -n "$ac_tool_prefix"; then
4473   # Extract the first word of "strip", so it can be a program name with args.
4474 set dummy strip; ac_word=$2
4475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4476 echo "configure:4477: checking for $ac_word" >&5
4477 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   if test -n "$STRIP"; then
4481   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4482 else
4483   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4484   ac_dummy="$PATH"
4485   for ac_dir in $ac_dummy; do
4486     test -z "$ac_dir" && ac_dir=.
4487     if test -f $ac_dir/$ac_word; then
4488       ac_cv_prog_STRIP="strip"
4489       break
4490     fi
4491   done
4492   IFS="$ac_save_ifs"
4493   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4494 fi
4495 fi
4496 STRIP="$ac_cv_prog_STRIP"
4497 if test -n "$STRIP"; then
4498   echo "$ac_t""$STRIP" 1>&6
4499 else
4500   echo "$ac_t""no" 1>&6
4501 fi
4502
4503 else
4504   STRIP=":"
4505 fi
4506 fi
4507
4508
4509 enable_dlopen=yes
4510 enable_win32_dll=yes
4511
4512 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4513 if test "${enable_libtool_lock+set}" = set; then
4514   enableval="$enable_libtool_lock"
4515   :
4516 fi
4517
4518 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4519
4520 # Some flags need to be propagated to the compiler or linker for good
4521 # libtool support.
4522 case $host in
4523 *-*-irix6*)
4524   # Find out which ABI we are using.
4525   echo '#line 4526 "configure"' > conftest.$ac_ext
4526   if { (eval echo configure:4527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4527     case `/usr/bin/file conftest.$ac_objext` in
4528     *32-bit*)
4529       LD="${LD-ld} -32"
4530       ;;
4531     *N32*)
4532       LD="${LD-ld} -n32"
4533       ;;
4534     *64-bit*)
4535       LD="${LD-ld} -64"
4536       ;;
4537     esac
4538   fi
4539   rm -rf conftest*
4540   ;;
4541
4542 *-*-sco3.2v5*)
4543   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4544   SAVE_CFLAGS="$CFLAGS"
4545   CFLAGS="$CFLAGS -belf"
4546   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4547 echo "configure:4548: checking whether the C compiler needs -belf" >&5
4548 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4549   echo $ac_n "(cached) $ac_c" 1>&6
4550 else
4551   
4552      ac_ext=c
4553 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4554 ac_cpp='$CPP $CPPFLAGS'
4555 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4556 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4557 cross_compiling=$ac_cv_prog_cc_cross
4558
4559      cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562
4563 int main() {
4564
4565 ; return 0; }
4566 EOF
4567 if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4568   rm -rf conftest*
4569   lt_cv_cc_needs_belf=yes
4570 else
4571   echo "configure: failed program was:" >&5
4572   cat conftest.$ac_ext >&5
4573   rm -rf conftest*
4574   lt_cv_cc_needs_belf=no
4575 fi
4576 rm -f conftest*
4577      ac_ext=c
4578 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4579 ac_cpp='$CPP $CPPFLAGS'
4580 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4581 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4582 cross_compiling=$ac_cv_prog_cc_cross
4583
4584 fi
4585
4586 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4587   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4588     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4589     CFLAGS="$SAVE_CFLAGS"
4590   fi
4591   ;;
4592
4593 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4594   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4595 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4597 echo "configure:4598: checking for $ac_word" >&5
4598 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4599   echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601   if test -n "$DLLTOOL"; then
4602   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4603 else
4604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4605   ac_dummy="$PATH"
4606   for ac_dir in $ac_dummy; do
4607     test -z "$ac_dir" && ac_dir=.
4608     if test -f $ac_dir/$ac_word; then
4609       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4610       break
4611     fi
4612   done
4613   IFS="$ac_save_ifs"
4614 fi
4615 fi
4616 DLLTOOL="$ac_cv_prog_DLLTOOL"
4617 if test -n "$DLLTOOL"; then
4618   echo "$ac_t""$DLLTOOL" 1>&6
4619 else
4620   echo "$ac_t""no" 1>&6
4621 fi
4622
4623
4624 if test -z "$ac_cv_prog_DLLTOOL"; then
4625 if test -n "$ac_tool_prefix"; then
4626   # Extract the first word of "dlltool", so it can be a program name with args.
4627 set dummy dlltool; ac_word=$2
4628 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4629 echo "configure:4630: checking for $ac_word" >&5
4630 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   if test -n "$DLLTOOL"; then
4634   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4635 else
4636   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4637   ac_dummy="$PATH"
4638   for ac_dir in $ac_dummy; do
4639     test -z "$ac_dir" && ac_dir=.
4640     if test -f $ac_dir/$ac_word; then
4641       ac_cv_prog_DLLTOOL="dlltool"
4642       break
4643     fi
4644   done
4645   IFS="$ac_save_ifs"
4646   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4647 fi
4648 fi
4649 DLLTOOL="$ac_cv_prog_DLLTOOL"
4650 if test -n "$DLLTOOL"; then
4651   echo "$ac_t""$DLLTOOL" 1>&6
4652 else
4653   echo "$ac_t""no" 1>&6
4654 fi
4655
4656 else
4657   DLLTOOL="false"
4658 fi
4659 fi
4660
4661   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4662 set dummy ${ac_tool_prefix}as; ac_word=$2
4663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4664 echo "configure:4665: checking for $ac_word" >&5
4665 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4666   echo $ac_n "(cached) $ac_c" 1>&6
4667 else
4668   if test -n "$AS"; then
4669   ac_cv_prog_AS="$AS" # Let the user override the test.
4670 else
4671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4672   ac_dummy="$PATH"
4673   for ac_dir in $ac_dummy; do
4674     test -z "$ac_dir" && ac_dir=.
4675     if test -f $ac_dir/$ac_word; then
4676       ac_cv_prog_AS="${ac_tool_prefix}as"
4677       break
4678     fi
4679   done
4680   IFS="$ac_save_ifs"
4681 fi
4682 fi
4683 AS="$ac_cv_prog_AS"
4684 if test -n "$AS"; then
4685   echo "$ac_t""$AS" 1>&6
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689
4690
4691 if test -z "$ac_cv_prog_AS"; then
4692 if test -n "$ac_tool_prefix"; then
4693   # Extract the first word of "as", so it can be a program name with args.
4694 set dummy as; ac_word=$2
4695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4696 echo "configure:4697: checking for $ac_word" >&5
4697 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4698   echo $ac_n "(cached) $ac_c" 1>&6
4699 else
4700   if test -n "$AS"; then
4701   ac_cv_prog_AS="$AS" # Let the user override the test.
4702 else
4703   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4704   ac_dummy="$PATH"
4705   for ac_dir in $ac_dummy; do
4706     test -z "$ac_dir" && ac_dir=.
4707     if test -f $ac_dir/$ac_word; then
4708       ac_cv_prog_AS="as"
4709       break
4710     fi
4711   done
4712   IFS="$ac_save_ifs"
4713   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4714 fi
4715 fi
4716 AS="$ac_cv_prog_AS"
4717 if test -n "$AS"; then
4718   echo "$ac_t""$AS" 1>&6
4719 else
4720   echo "$ac_t""no" 1>&6
4721 fi
4722
4723 else
4724   AS="false"
4725 fi
4726 fi
4727
4728   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4729 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4730 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4731 echo "configure:4732: checking for $ac_word" >&5
4732 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4733   echo $ac_n "(cached) $ac_c" 1>&6
4734 else
4735   if test -n "$OBJDUMP"; then
4736   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4737 else
4738   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4739   ac_dummy="$PATH"
4740   for ac_dir in $ac_dummy; do
4741     test -z "$ac_dir" && ac_dir=.
4742     if test -f $ac_dir/$ac_word; then
4743       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4744       break
4745     fi
4746   done
4747   IFS="$ac_save_ifs"
4748 fi
4749 fi
4750 OBJDUMP="$ac_cv_prog_OBJDUMP"
4751 if test -n "$OBJDUMP"; then
4752   echo "$ac_t""$OBJDUMP" 1>&6
4753 else
4754   echo "$ac_t""no" 1>&6
4755 fi
4756
4757
4758 if test -z "$ac_cv_prog_OBJDUMP"; then
4759 if test -n "$ac_tool_prefix"; then
4760   # Extract the first word of "objdump", so it can be a program name with args.
4761 set dummy objdump; ac_word=$2
4762 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4763 echo "configure:4764: checking for $ac_word" >&5
4764 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4765   echo $ac_n "(cached) $ac_c" 1>&6
4766 else
4767   if test -n "$OBJDUMP"; then
4768   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4769 else
4770   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4771   ac_dummy="$PATH"
4772   for ac_dir in $ac_dummy; do
4773     test -z "$ac_dir" && ac_dir=.
4774     if test -f $ac_dir/$ac_word; then
4775       ac_cv_prog_OBJDUMP="objdump"
4776       break
4777     fi
4778   done
4779   IFS="$ac_save_ifs"
4780   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4781 fi
4782 fi
4783 OBJDUMP="$ac_cv_prog_OBJDUMP"
4784 if test -n "$OBJDUMP"; then
4785   echo "$ac_t""$OBJDUMP" 1>&6
4786 else
4787   echo "$ac_t""no" 1>&6
4788 fi
4789
4790 else
4791   OBJDUMP="false"
4792 fi
4793 fi
4794
4795
4796   # recent cygwin and mingw systems supply a stub DllMain which the user
4797   # can override, but on older systems we have to supply one
4798   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4799 echo "configure:4800: checking if libtool should supply DllMain function" >&5
4800 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806
4807 int main() {
4808 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4809       DllMain (0, 0, 0);
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813   rm -rf conftest*
4814   lt_cv_need_dllmain=no
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818   rm -rf conftest*
4819   lt_cv_need_dllmain=yes
4820 fi
4821 rm -f conftest*
4822 fi
4823
4824 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4825
4826   case $host/$CC in
4827   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4828     # old mingw systems require "-dll" to link a DLL, while more recent ones
4829     # require "-mdll"
4830     SAVE_CFLAGS="$CFLAGS"
4831     CFLAGS="$CFLAGS -mdll"
4832     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4833 echo "configure:4834: checking how to link DLLs" >&5
4834 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4835   echo $ac_n "(cached) $ac_c" 1>&6
4836 else
4837   cat > conftest.$ac_ext <<EOF
4838 #line 4839 "configure"
4839 #include "confdefs.h"
4840
4841 int main() {
4842
4843 ; return 0; }
4844 EOF
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4846   rm -rf conftest*
4847   lt_cv_cc_dll_switch=-mdll
4848 else
4849   echo "configure: failed program was:" >&5
4850   cat conftest.$ac_ext >&5
4851   rm -rf conftest*
4852   lt_cv_cc_dll_switch=-dll
4853 fi
4854 rm -f conftest*
4855 fi
4856
4857 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4858     CFLAGS="$SAVE_CFLAGS" ;;
4859   *-*-cygwin* | *-*-pw32*)
4860     # cygwin systems need to pass --dll to the linker, and not link
4861     # crt.o which will require a WinMain@16 definition.
4862     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4863   esac
4864   ;;
4865   
4866 esac
4867
4868 # Sed substitution that helps us do robust quoting.  It backslashifies
4869 # metacharacters that are still active within double-quoted strings.
4870 Xsed='sed -e s/^X//'
4871 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4872
4873 # Same as above, but do not quote variable references.
4874 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4875
4876 # Sed substitution to delay expansion of an escaped shell variable in a
4877 # double_quote_subst'ed string.
4878 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4879
4880 # Constants:
4881 rm="rm -f"
4882
4883 # Global variables:
4884 default_ofile=libtool
4885 can_build_shared=yes
4886
4887 # All known linkers require a `.a' archive for static linking (except M$VC,
4888 # which needs '.lib').
4889 libext=a
4890 ltmain="$ac_aux_dir/ltmain.sh"
4891 ofile="$default_ofile"
4892 with_gnu_ld="$lt_cv_prog_gnu_ld"
4893 need_locks="$enable_libtool_lock"
4894
4895 old_CC="$CC"
4896 old_CFLAGS="$CFLAGS"
4897
4898 # Set sane defaults for various variables
4899 test -z "$AR" && AR=ar
4900 test -z "$AR_FLAGS" && AR_FLAGS=cru
4901 test -z "$AS" && AS=as
4902 test -z "$CC" && CC=cc
4903 test -z "$DLLTOOL" && DLLTOOL=dlltool
4904 test -z "$LD" && LD=ld
4905 test -z "$LN_S" && LN_S="ln -s"
4906 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4907 test -z "$NM" && NM=nm
4908 test -z "$OBJDUMP" && OBJDUMP=objdump
4909 test -z "$RANLIB" && RANLIB=:
4910 test -z "$STRIP" && STRIP=:
4911 test -z "$ac_objext" && ac_objext=o
4912
4913 if test x"$host" != x"$build"; then
4914   ac_tool_prefix=${host_alias}-
4915 else
4916   ac_tool_prefix=
4917 fi
4918
4919 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4920 case $host_os in
4921 linux-gnu*) ;;
4922 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4923 esac
4924
4925 case $host_os in
4926 aix3*)
4927   # AIX sometimes has problems with the GCC collect2 program.  For some
4928   # reason, if we set the COLLECT_NAMES environment variable, the problems
4929   # vanish in a puff of smoke.
4930   if test "X${COLLECT_NAMES+set}" != Xset; then
4931     COLLECT_NAMES=
4932     export COLLECT_NAMES
4933   fi
4934   ;;
4935 esac
4936
4937 # Determine commands to create old-style static archives.
4938 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4939 old_postinstall_cmds='chmod 644 $oldlib'
4940 old_postuninstall_cmds=
4941
4942 if test -n "$RANLIB"; then
4943   case $host_os in
4944   openbsd*)
4945     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4946     ;;
4947   *)
4948     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4949     ;;
4950   esac
4951   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4952 fi
4953
4954 # Allow CC to be a program name with arguments.
4955 set dummy $CC
4956 compiler="$2"
4957
4958 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4959 echo "configure:4960: checking for objdir" >&5
4960 rm -f .libs 2>/dev/null
4961 mkdir .libs 2>/dev/null
4962 if test -d .libs; then
4963   objdir=.libs
4964 else
4965   # MS-DOS does not allow filenames that begin with a dot.
4966   objdir=_libs
4967 fi
4968 rmdir .libs 2>/dev/null
4969 echo "$ac_t""$objdir" 1>&6
4970
4971
4972 # Check whether --with-pic or --without-pic was given.
4973 if test "${with_pic+set}" = set; then
4974   withval="$with_pic"
4975   pic_mode="$withval"
4976 else
4977   pic_mode=default
4978 fi
4979
4980 test -z "$pic_mode" && pic_mode=default
4981
4982 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4983 # in isolation, and that seeing it set (from the cache) indicates that
4984 # the associated values are set (in the cache) correctly too.
4985 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4986 echo "configure:4987: checking for $compiler option to produce PIC" >&5
4987 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990    lt_cv_prog_cc_pic=
4991   lt_cv_prog_cc_shlib=
4992   lt_cv_prog_cc_wl=
4993   lt_cv_prog_cc_static=
4994   lt_cv_prog_cc_no_builtin=
4995   lt_cv_prog_cc_can_build_shared=$can_build_shared
4996
4997   if test "$GCC" = yes; then
4998     lt_cv_prog_cc_wl='-Wl,'
4999     lt_cv_prog_cc_static='-static'
5000
5001     case $host_os in
5002     aix*)
5003       # Below there is a dirty hack to force normal static linking with -ldl
5004       # The problem is because libdl dynamically linked with both libc and
5005       # libC (AIX C++ library), which obviously doesn't included in libraries
5006       # list by gcc. This cause undefined symbols with -static flags.
5007       # This hack allows C programs to be linked with "-static -ldl", but
5008       # not sure about C++ programs.
5009       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5010       ;;
5011     amigaos*)
5012       # FIXME: we need at least 68020 code to build shared libraries, but
5013       # adding the `-m68020' flag to GCC prevents building anything better,
5014       # like `-m68040'.
5015       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5016       ;;
5017     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5018       # PIC is the default for these OSes.
5019       ;;
5020     darwin* | rhapsody*)
5021       # PIC is the default on this platform
5022       # Common symbols not allowed in MH_DYLIB files
5023       lt_cv_prog_cc_pic='-fno-common'
5024       ;;
5025     cygwin* | mingw* | pw32* | os2*)
5026       # This hack is so that the source file can tell whether it is being
5027       # built for inclusion in a dll (and should export symbols for example).
5028       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5029       ;;
5030     sysv4*MP*)
5031       if test -d /usr/nec; then
5032          lt_cv_prog_cc_pic=-Kconform_pic
5033       fi
5034       ;;
5035     *)
5036       lt_cv_prog_cc_pic='-fPIC'
5037       ;;
5038     esac
5039   else
5040     # PORTME Check for PIC flags for the system compiler.
5041     case $host_os in
5042     aix3* | aix4* | aix5*)
5043       lt_cv_prog_cc_wl='-Wl,'
5044       # All AIX code is PIC.
5045       if test "$host_cpu" = ia64; then
5046         # AIX 5 now supports IA64 processor
5047         lt_cv_prog_cc_static='-Bstatic'
5048       else
5049         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5050       fi
5051       ;;
5052
5053     hpux9* | hpux10* | hpux11*)
5054       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5055       lt_cv_prog_cc_wl='-Wl,'
5056       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5057       lt_cv_prog_cc_pic='+Z'
5058       ;;
5059
5060     irix5* | irix6* | nonstopux*)
5061       lt_cv_prog_cc_wl='-Wl,'
5062       lt_cv_prog_cc_static='-non_shared'
5063       # PIC (with -KPIC) is the default.
5064       ;;
5065
5066     cygwin* | mingw* | pw32* | os2*)
5067       # This hack is so that the source file can tell whether it is being
5068       # built for inclusion in a dll (and should export symbols for example).
5069       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5070       ;;
5071
5072     newsos6)
5073       lt_cv_prog_cc_pic='-KPIC'
5074       lt_cv_prog_cc_static='-Bstatic'
5075       ;;
5076
5077     osf3* | osf4* | osf5*)
5078       # All OSF/1 code is PIC.
5079       lt_cv_prog_cc_wl='-Wl,'
5080       lt_cv_prog_cc_static='-non_shared'
5081       ;;
5082
5083     sco3.2v5*)
5084       lt_cv_prog_cc_pic='-Kpic'
5085       lt_cv_prog_cc_static='-dn'
5086       lt_cv_prog_cc_shlib='-belf'
5087       ;;
5088
5089     solaris*)
5090       lt_cv_prog_cc_pic='-KPIC'
5091       lt_cv_prog_cc_static='-Bstatic'
5092       lt_cv_prog_cc_wl='-Wl,'
5093       ;;
5094
5095     sunos4*)
5096       lt_cv_prog_cc_pic='-PIC'
5097       lt_cv_prog_cc_static='-Bstatic'
5098       lt_cv_prog_cc_wl='-Qoption ld '
5099       ;;
5100
5101     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5102       lt_cv_prog_cc_pic='-KPIC'
5103       lt_cv_prog_cc_static='-Bstatic'
5104       lt_cv_prog_cc_wl='-Wl,'
5105       ;;
5106
5107     uts4*)
5108       lt_cv_prog_cc_pic='-pic'
5109       lt_cv_prog_cc_static='-Bstatic'
5110       ;;
5111
5112     sysv4*MP*)
5113       if test -d /usr/nec ;then
5114         lt_cv_prog_cc_pic='-Kconform_pic'
5115         lt_cv_prog_cc_static='-Bstatic'
5116       fi
5117       ;;
5118
5119     *)
5120       lt_cv_prog_cc_can_build_shared=no
5121       ;;
5122     esac
5123   fi
5124
5125 fi
5126
5127 if test -z "$lt_cv_prog_cc_pic"; then
5128   echo "$ac_t""none" 1>&6
5129 else
5130   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5131
5132   # Check to make sure the pic_flag actually works.
5133   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5134 echo "configure:5135: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5135   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5136   echo $ac_n "(cached) $ac_c" 1>&6
5137 else
5138       save_CFLAGS="$CFLAGS"
5139     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5140     cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5149   rm -rf conftest*
5150         case $host_os in
5151       hpux9* | hpux10* | hpux11*)
5152         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5153         # they create non-PIC objects.  So, if there were any warnings, we
5154         # assume that PIC is not supported.
5155         if test -s conftest.err; then
5156           lt_cv_prog_cc_pic_works=no
5157         else
5158           lt_cv_prog_cc_pic_works=yes
5159         fi
5160         ;;
5161       *)
5162         lt_cv_prog_cc_pic_works=yes
5163         ;;
5164       esac
5165     
5166 else
5167   echo "configure: failed program was:" >&5
5168   cat conftest.$ac_ext >&5
5169   rm -rf conftest*
5170         lt_cv_prog_cc_pic_works=no
5171     
5172 fi
5173 rm -f conftest*
5174     CFLAGS="$save_CFLAGS"
5175   
5176 fi
5177
5178
5179   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5180     lt_cv_prog_cc_pic=
5181     lt_cv_prog_cc_can_build_shared=no
5182   else
5183     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5184   fi
5185
5186   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5187 fi
5188
5189 # Check for any special shared library compilation flags.
5190 if test -n "$lt_cv_prog_cc_shlib"; then
5191   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5192   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5193   else
5194    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5195     lt_cv_prog_cc_can_build_shared=no
5196   fi
5197 fi
5198
5199 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5200 echo "configure:5201: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5201 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5202   echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204     lt_cv_prog_cc_static_works=no
5205   save_LDFLAGS="$LDFLAGS"
5206   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5207   cat > conftest.$ac_ext <<EOF
5208 #line 5209 "configure"
5209 #include "confdefs.h"
5210
5211 int main() {
5212
5213 ; return 0; }
5214 EOF
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5216   rm -rf conftest*
5217   lt_cv_prog_cc_static_works=yes
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221 fi
5222 rm -f conftest*
5223   LDFLAGS="$save_LDFLAGS"
5224
5225 fi
5226
5227
5228 # Belt *and* braces to stop my trousers falling down:
5229 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5230 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5231
5232 pic_flag="$lt_cv_prog_cc_pic"
5233 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5234 wl="$lt_cv_prog_cc_wl"
5235 link_static_flag="$lt_cv_prog_cc_static"
5236 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5237 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5238
5239
5240 # Check to see if options -o and -c are simultaneously supported by compiler
5241 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5242 echo "configure:5243: checking if $compiler supports -c -o file.$ac_objext" >&5
5243 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5244   echo $ac_n "(cached) $ac_c" 1>&6
5245 else
5246   
5247 $rm -r conftest 2>/dev/null
5248 mkdir conftest
5249 cd conftest
5250 echo "int some_variable = 0;" > conftest.$ac_ext
5251 mkdir out
5252 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5253 # that will create temporary files in the current directory regardless of
5254 # the output directory.  Thus, making CWD read-only will cause this test
5255 # to fail, enabling locking or at least warning the user not to do parallel
5256 # builds.
5257 chmod -w .
5258 save_CFLAGS="$CFLAGS"
5259 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5260 compiler_c_o=no
5261 if { (eval echo configure:5262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5262   # The compiler can only warn and ignore the option if not recognized
5263   # So say no if there are warnings
5264   if test -s out/conftest.err; then
5265     lt_cv_compiler_c_o=no
5266   else
5267     lt_cv_compiler_c_o=yes
5268   fi
5269 else
5270   # Append any errors to the config.log.
5271   cat out/conftest.err 1>&5
5272   lt_cv_compiler_c_o=no
5273 fi
5274 CFLAGS="$save_CFLAGS"
5275 chmod u+w .
5276 $rm conftest* out/*
5277 rmdir out
5278 cd ..
5279 rmdir conftest
5280 $rm -r conftest 2>/dev/null
5281
5282 fi
5283
5284 compiler_c_o=$lt_cv_compiler_c_o
5285 echo "$ac_t""$compiler_c_o" 1>&6
5286
5287 if test x"$compiler_c_o" = x"yes"; then
5288   # Check to see if we can write to a .lo
5289   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5290 echo "configure:5291: checking if $compiler supports -c -o file.lo" >&5
5291   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5292   echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294   
5295   lt_cv_compiler_o_lo=no
5296   save_CFLAGS="$CFLAGS"
5297   CFLAGS="$CFLAGS -c -o conftest.lo"
5298   save_objext="$ac_objext"
5299   ac_objext=lo
5300   cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303
5304 int main() {
5305 int some_variable = 0;
5306 ; return 0; }
5307 EOF
5308 if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5309   rm -rf conftest*
5310       # The compiler can only warn and ignore the option if not recognized
5311     # So say no if there are warnings
5312     if test -s conftest.err; then
5313       lt_cv_compiler_o_lo=no
5314     else
5315       lt_cv_compiler_o_lo=yes
5316     fi
5317   
5318 else
5319   echo "configure: failed program was:" >&5
5320   cat conftest.$ac_ext >&5
5321 fi
5322 rm -f conftest*
5323   ac_objext="$save_objext"
5324   CFLAGS="$save_CFLAGS"
5325   
5326 fi
5327
5328   compiler_o_lo=$lt_cv_compiler_o_lo
5329   echo "$ac_t""$compiler_o_lo" 1>&6
5330 else
5331   compiler_o_lo=no
5332 fi
5333
5334 # Check to see if we can do hard links to lock some files if needed
5335 hard_links="nottested"
5336 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5337   # do not overwrite the value of need_locks provided by the user
5338   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5339 echo "configure:5340: checking if we can lock with hard links" >&5
5340   hard_links=yes
5341   $rm conftest*
5342   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5343   touch conftest.a
5344   ln conftest.a conftest.b 2>&5 || hard_links=no
5345   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5346   echo "$ac_t""$hard_links" 1>&6
5347   if test "$hard_links" = no; then
5348     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5349     need_locks=warn
5350   fi
5351 else
5352   need_locks=no
5353 fi
5354
5355 if test "$GCC" = yes; then
5356   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5357   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5358 echo "configure:5359: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5359   echo "int some_variable = 0;" > conftest.$ac_ext
5360   save_CFLAGS="$CFLAGS"
5361   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5362   compiler_rtti_exceptions=no
5363   cat > conftest.$ac_ext <<EOF
5364 #line 5365 "configure"
5365 #include "confdefs.h"
5366
5367 int main() {
5368 int some_variable = 0;
5369 ; return 0; }
5370 EOF
5371 if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5372   rm -rf conftest*
5373       # The compiler can only warn and ignore the option if not recognized
5374     # So say no if there are warnings
5375     if test -s conftest.err; then
5376       compiler_rtti_exceptions=no
5377     else
5378       compiler_rtti_exceptions=yes
5379     fi
5380   
5381 else
5382   echo "configure: failed program was:" >&5
5383   cat conftest.$ac_ext >&5
5384 fi
5385 rm -f conftest*
5386   CFLAGS="$save_CFLAGS"
5387   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5388
5389   if test "$compiler_rtti_exceptions" = "yes"; then
5390     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5391   else
5392     no_builtin_flag=' -fno-builtin'
5393   fi
5394 fi
5395
5396 # See if the linker supports building shared libraries.
5397 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5398 echo "configure:5399: checking whether the linker ($LD) supports shared libraries" >&5
5399
5400 allow_undefined_flag=
5401 no_undefined_flag=
5402 need_lib_prefix=unknown
5403 need_version=unknown
5404 # when you set need_version to no, make sure it does not cause -set_version
5405 # flags to be left without arguments
5406 archive_cmds=
5407 archive_expsym_cmds=
5408 old_archive_from_new_cmds=
5409 old_archive_from_expsyms_cmds=
5410 export_dynamic_flag_spec=
5411 whole_archive_flag_spec=
5412 thread_safe_flag_spec=
5413 hardcode_into_libs=no
5414 hardcode_libdir_flag_spec=
5415 hardcode_libdir_separator=
5416 hardcode_direct=no
5417 hardcode_minus_L=no
5418 hardcode_shlibpath_var=unsupported
5419 runpath_var=
5420 link_all_deplibs=unknown
5421 always_export_symbols=no
5422 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5423 # include_expsyms should be a list of space-separated symbols to be *always*
5424 # included in the symbol list
5425 include_expsyms=
5426 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5427 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5428 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5429 # as well as any symbol that contains `d'.
5430 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5431 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5432 # platforms (ab)use it in PIC code, but their linkers get confused if
5433 # the symbol is explicitly referenced.  Since portable code cannot
5434 # rely on this symbol name, it's probably fine to never include it in
5435 # preloaded symbol tables.
5436 extract_expsyms_cmds=
5437
5438 case $host_os in
5439 cygwin* | mingw* | pw32*)
5440   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5441   # When not using gcc, we currently assume that we are using
5442   # Microsoft Visual C++.
5443   if test "$GCC" != yes; then
5444     with_gnu_ld=no
5445   fi
5446   ;;
5447 openbsd*)
5448   with_gnu_ld=no
5449   ;;
5450 esac
5451
5452 ld_shlibs=yes
5453 if test "$with_gnu_ld" = yes; then
5454   # If archive_cmds runs LD, not CC, wlarc should be empty
5455   wlarc='${wl}'
5456
5457   # See if GNU ld supports shared libraries.
5458   case $host_os in
5459   aix3* | aix4* | aix5*)
5460     # On AIX, the GNU linker is very broken
5461     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5462     ld_shlibs=no
5463     cat <<EOF 1>&2
5464
5465 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5466 *** to be unable to reliably create shared libraries on AIX.
5467 *** Therefore, libtool is disabling shared libraries support.  If you
5468 *** really care for shared libraries, you may want to modify your PATH
5469 *** so that a non-GNU linker is found, and then restart.
5470
5471 EOF
5472     ;;
5473
5474   amigaos*)
5475     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)'
5476     hardcode_libdir_flag_spec='-L$libdir'
5477     hardcode_minus_L=yes
5478
5479     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5480     # that the semantics of dynamic libraries on AmigaOS, at least up
5481     # to version 4, is to share data among multiple programs linked
5482     # with the same dynamic library.  Since this doesn't match the
5483     # behavior of shared libraries on other platforms, we can use
5484     # them.
5485     ld_shlibs=no
5486     ;;
5487
5488   beos*)
5489     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5490       allow_undefined_flag=unsupported
5491       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5492       # support --undefined.  This deserves some investigation.  FIXME
5493       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5494     else
5495       ld_shlibs=no
5496     fi
5497     ;;
5498
5499   cygwin* | mingw* | pw32*)
5500     # hardcode_libdir_flag_spec is actually meaningless, as there is
5501     # no search path for DLLs.
5502     hardcode_libdir_flag_spec='-L$libdir'
5503     allow_undefined_flag=unsupported
5504     always_export_symbols=yes
5505
5506     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5507       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5508       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5509       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5510       else $CC -o impgen impgen.c ; fi)~
5511       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5512
5513     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5514
5515     # cygwin and mingw dlls have different entry points and sets of symbols
5516     # to exclude.
5517     # FIXME: what about values for MSVC?
5518     dll_entry=__cygwin_dll_entry@12
5519     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5520     case $host_os in
5521     mingw*)
5522       # mingw values
5523       dll_entry=_DllMainCRTStartup@12
5524       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5525       ;;
5526     esac
5527
5528     # mingw and cygwin differ, and it's simplest to just exclude the union
5529     # of the two symbol sets.
5530     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5531
5532     # recent cygwin and mingw systems supply a stub DllMain which the user
5533     # can override, but on older systems we have to supply one (in ltdll.c)
5534     if test "x$lt_cv_need_dllmain" = "xyes"; then
5535       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5536       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~
5537         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5538     else
5539       ltdll_obj=
5540       ltdll_cmds=
5541     fi
5542
5543     # Extract the symbol export list from an `--export-all' def file,
5544     # then regenerate the def file from the symbol export list, so that
5545     # the compiled dll only exports the symbol export list.
5546     # Be careful not to strip the DATA tag left be newer dlltools.
5547     export_symbols_cmds="$ltdll_cmds"'
5548       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5549       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5550
5551     # If the export-symbols file already is a .def file (1st line
5552     # is EXPORTS), use it as is.
5553     # If DATA tags from a recent dlltool are present, honour them!
5554     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5555         cp $export_symbols $output_objdir/$soname-def;
5556       else
5557         echo EXPORTS > $output_objdir/$soname-def;
5558         _lt_hint=1;
5559         cat $export_symbols | while read symbol; do
5560          set dummy \$symbol;
5561          case \$# in
5562            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5563            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5564            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5565          esac;
5566          _lt_hint=`expr 1 + \$_lt_hint`;
5567         done;
5568       fi~
5569       '"$ltdll_cmds"'
5570       $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~
5571       $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~
5572       $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~
5573       $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~
5574       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5575     ;;
5576
5577   netbsd*)
5578     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5579       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5580       wlarc=
5581     else
5582       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5583       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5584     fi
5585     ;;
5586
5587   solaris* | sysv5*)
5588     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5589       ld_shlibs=no
5590       cat <<EOF 1>&2
5591
5592 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5593 *** create shared libraries on Solaris systems.  Therefore, libtool
5594 *** is disabling shared libraries support.  We urge you to upgrade GNU
5595 *** binutils to release 2.9.1 or newer.  Another option is to modify
5596 *** your PATH or compiler configuration so that the native linker is
5597 *** used, and then restart.
5598
5599 EOF
5600     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5601       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5602       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5603     else
5604       ld_shlibs=no
5605     fi
5606     ;;
5607
5608   sunos4*)
5609     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5610     wlarc=
5611     hardcode_direct=yes
5612     hardcode_shlibpath_var=no
5613     ;;
5614
5615   *)
5616     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5617       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5618       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5619     else
5620       ld_shlibs=no
5621     fi
5622     ;;
5623   esac
5624
5625   if test "$ld_shlibs" = yes; then
5626     runpath_var=LD_RUN_PATH
5627     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5628     export_dynamic_flag_spec='${wl}--export-dynamic'
5629     case $host_os in
5630     cygwin* | mingw* | pw32*)
5631       # dlltool doesn't understand --whole-archive et. al.
5632       whole_archive_flag_spec=
5633       ;;
5634     *)
5635       # ancient GNU ld didn't support --whole-archive et. al.
5636       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5637         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5638       else
5639         whole_archive_flag_spec=
5640       fi
5641       ;;
5642     esac
5643   fi
5644 else
5645   # PORTME fill in a description of your system's linker (not GNU ld)
5646   case $host_os in
5647   aix3*)
5648     allow_undefined_flag=unsupported
5649     always_export_symbols=yes
5650     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'
5651     # Note: this linker hardcodes the directories in LIBPATH if there
5652     # are no directories specified by -L.
5653     hardcode_minus_L=yes
5654     if test "$GCC" = yes && test -z "$link_static_flag"; then
5655       # Neither direct hardcoding nor static linking is supported with a
5656       # broken collect2.
5657       hardcode_direct=unsupported
5658     fi
5659     ;;
5660
5661   aix4* | aix5*)
5662     if test "$host_cpu" = ia64; then
5663       # On IA64, the linker does run time linking by default, so we don't
5664       # have to do anything special.
5665       aix_use_runtimelinking=no
5666       exp_sym_flag='-Bexport'
5667       no_entry_flag=""
5668     else
5669       aix_use_runtimelinking=no
5670
5671       # Test if we are trying to use run time linking or normal
5672       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5673       # need to do runtime linking.
5674       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5675         for ld_flag in $LDFLAGS; do
5676           case $ld_flag in
5677           *-brtl*)
5678             aix_use_runtimelinking=yes
5679             break
5680           ;;
5681           esac
5682         done
5683       esac
5684
5685       exp_sym_flag='-bexport'
5686       no_entry_flag='-bnoentry'
5687     fi
5688
5689     # When large executables or shared objects are built, AIX ld can
5690     # have problems creating the table of contents.  If linking a library
5691     # or program results in "error TOC overflow" add -mminimal-toc to
5692     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5693     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5694
5695     hardcode_direct=yes
5696     archive_cmds=''
5697     hardcode_libdir_separator=':'
5698     if test "$GCC" = yes; then
5699       case $host_os in aix4.[012]|aix4.[012].*)
5700         collect2name=`${CC} -print-prog-name=collect2`
5701         if test -f "$collect2name" && \
5702           strings "$collect2name" | grep resolve_lib_name >/dev/null
5703         then
5704           # We have reworked collect2
5705           hardcode_direct=yes
5706         else
5707           # We have old collect2
5708           hardcode_direct=unsupported
5709           # It fails to find uninstalled libraries when the uninstalled
5710           # path is not listed in the libpath.  Setting hardcode_minus_L
5711           # to unsupported forces relinking
5712           hardcode_minus_L=yes
5713           hardcode_libdir_flag_spec='-L$libdir'
5714           hardcode_libdir_separator=
5715         fi
5716       esac
5717
5718       shared_flag='-shared'
5719     else
5720       # not using gcc
5721       if test "$host_cpu" = ia64; then
5722         shared_flag='${wl}-G'
5723       else
5724         if test "$aix_use_runtimelinking" = yes; then
5725           shared_flag='${wl}-G'
5726         else
5727           shared_flag='${wl}-bM:SRE'
5728         fi
5729       fi
5730     fi
5731
5732     # It seems that -bexpall can do strange things, so it is better to
5733     # generate a list of symbols to export.
5734     always_export_symbols=yes
5735     if test "$aix_use_runtimelinking" = yes; then
5736       # Warning - without using the other runtime loading flags (-brtl),
5737       # -berok will link without error, but may produce a broken library.
5738       allow_undefined_flag='-berok'
5739       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5740       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"
5741     else
5742       if test "$host_cpu" = ia64; then
5743         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5744         allow_undefined_flag="-z nodefs"
5745         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"
5746       else
5747         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5748         # Warning - without using the other run time loading flags,
5749         # -berok will link without error, but may produce a broken library.
5750         allow_undefined_flag='${wl}-berok'
5751         # This is a bit strange, but is similar to how AIX traditionally builds
5752         # it's shared libraries.
5753         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'
5754       fi
5755     fi
5756     ;;
5757
5758   amigaos*)
5759     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)'
5760     hardcode_libdir_flag_spec='-L$libdir'
5761     hardcode_minus_L=yes
5762     # see comment about different semantics on the GNU ld section
5763     ld_shlibs=no
5764     ;;
5765
5766   cygwin* | mingw* | pw32*)
5767     # When not using gcc, we currently assume that we are using
5768     # Microsoft Visual C++.
5769     # hardcode_libdir_flag_spec is actually meaningless, as there is
5770     # no search path for DLLs.
5771     hardcode_libdir_flag_spec=' '
5772     allow_undefined_flag=unsupported
5773     # Tell ltmain to make .lib files, not .a files.
5774     libext=lib
5775     # FIXME: Setting linknames here is a bad hack.
5776     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5777     # The linker will automatically build a .lib file if we build a DLL.
5778     old_archive_from_new_cmds='true'
5779     # FIXME: Should let the user specify the lib program.
5780     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5781     fix_srcfile_path='`cygpath -w "$srcfile"`'
5782     ;;
5783
5784   darwin* | rhapsody*)
5785     case "$host_os" in
5786     rhapsody* | darwin1.[012])
5787       allow_undefined_flag='-undefined suppress'
5788       ;;
5789     *) # Darwin 1.3 on
5790       allow_undefined_flag='-flat_namespace -undefined suppress'
5791       ;;
5792     esac
5793     # FIXME: Relying on posixy $() will cause problems for
5794     #        cross-compilation, but unfortunately the echo tests do not
5795     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5796     #        `"' quotes if we put them in here... so don't!
5797     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)'
5798     # We need to add '_' to the symbols in $export_symbols first
5799     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5800     hardcode_direct=yes
5801     hardcode_shlibpath_var=no
5802     whole_archive_flag_spec='-all_load $convenience'
5803     ;;
5804
5805   freebsd1*)
5806     ld_shlibs=no
5807     ;;
5808
5809   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5810   # support.  Future versions do this automatically, but an explicit c++rt0.o
5811   # does not break anything, and helps significantly (at the cost of a little
5812   # extra space).
5813   freebsd2.2*)
5814     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5815     hardcode_libdir_flag_spec='-R$libdir'
5816     hardcode_direct=yes
5817     hardcode_shlibpath_var=no
5818     ;;
5819
5820   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5821   freebsd2*)
5822     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5823     hardcode_direct=yes
5824     hardcode_minus_L=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5829   freebsd*)
5830     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5831     hardcode_libdir_flag_spec='-R$libdir'
5832     hardcode_direct=yes
5833     hardcode_shlibpath_var=no
5834     ;;
5835
5836   hpux9* | hpux10* | hpux11*)
5837     case $host_os in
5838     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' ;;
5839     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5840     esac
5841     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5842     hardcode_libdir_separator=:
5843     hardcode_direct=yes
5844     hardcode_minus_L=yes # Not in the search PATH, but as the default
5845                          # location of the library.
5846     export_dynamic_flag_spec='${wl}-E'
5847     ;;
5848
5849   irix5* | irix6* | nonstopux*)
5850     if test "$GCC" = yes; then
5851       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'
5852       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5853     else
5854       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'
5855       hardcode_libdir_flag_spec='-rpath $libdir'
5856     fi
5857     hardcode_libdir_separator=:
5858     link_all_deplibs=yes
5859     ;;
5860
5861   netbsd*)
5862     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5863       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5864     else
5865       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5866     fi
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_direct=yes
5869     hardcode_shlibpath_var=no
5870     ;;
5871
5872   newsos6)
5873     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5874     hardcode_direct=yes
5875     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5876     hardcode_libdir_separator=:
5877     hardcode_shlibpath_var=no
5878     ;;
5879
5880   openbsd*)
5881     hardcode_direct=yes
5882     hardcode_shlibpath_var=no
5883     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5884       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5885       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5886       export_dynamic_flag_spec='${wl}-E'
5887     else
5888       case "$host_os" in
5889       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5890         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5891         hardcode_libdir_flag_spec='-R$libdir'
5892         ;;
5893       *)
5894         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5895         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5896         ;;
5897       esac
5898     fi
5899     ;;
5900
5901   os2*)
5902     hardcode_libdir_flag_spec='-L$libdir'
5903     hardcode_minus_L=yes
5904     allow_undefined_flag=unsupported
5905     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'
5906     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5907     ;;
5908
5909   osf3*)
5910     if test "$GCC" = yes; then
5911       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5912       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'
5913     else
5914       allow_undefined_flag=' -expect_unresolved \*'
5915       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'
5916     fi
5917     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5918     hardcode_libdir_separator=:
5919     ;;
5920
5921   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5922     if test "$GCC" = yes; then
5923       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5924       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'
5925       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5926     else
5927       allow_undefined_flag=' -expect_unresolved \*'
5928       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'
5929       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5930       $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'
5931
5932       #Both c and cxx compiler support -rpath directly
5933       hardcode_libdir_flag_spec='-rpath $libdir'
5934     fi
5935     hardcode_libdir_separator=:
5936     ;;
5937
5938   sco3.2v5*)
5939     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5940     hardcode_shlibpath_var=no
5941     runpath_var=LD_RUN_PATH
5942     hardcode_runpath_var=yes
5943     export_dynamic_flag_spec='${wl}-Bexport'
5944     ;;
5945
5946   solaris*)
5947     # gcc --version < 3.0 without binutils cannot create self contained
5948     # shared libraries reliably, requiring libgcc.a to resolve some of
5949     # the object symbols generated in some cases.  Libraries that use
5950     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5951     # a copy of libgcc.a into every shared library to guarantee resolving
5952     # such symbols causes other problems:  According to Tim Van Holder
5953     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5954     # (to the application) exception stack for one thing.
5955     no_undefined_flag=' -z defs'
5956     if test "$GCC" = yes; then
5957       case `$CC --version 2>/dev/null` in
5958       [12].*)
5959         cat <<EOF 1>&2
5960
5961 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5962 *** create self contained shared libraries on Solaris systems, without
5963 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5964 *** -no-undefined support, which will at least allow you to build shared
5965 *** libraries.  However, you may find that when you link such libraries
5966 *** into an application without using GCC, you have to manually add
5967 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5968 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5969 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5970
5971 EOF
5972         no_undefined_flag=
5973         ;;
5974       esac
5975     fi
5976     # $CC -shared without GNU ld will not create a library from C++
5977     # object files and a static libstdc++, better avoid it by now
5978     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5980                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5981     hardcode_libdir_flag_spec='-R$libdir'
5982     hardcode_shlibpath_var=no
5983     case $host_os in
5984     solaris2.[0-5] | solaris2.[0-5].*) ;;
5985     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5986       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5987     esac
5988     link_all_deplibs=yes
5989     ;;
5990
5991   sunos4*)
5992     if test "x$host_vendor" = xsequent; then
5993       # Use $CC to link under sequent, because it throws in some extra .o
5994       # files that make .init and .fini sections work.
5995       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5996     else
5997       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5998     fi
5999     hardcode_libdir_flag_spec='-L$libdir'
6000     hardcode_direct=yes
6001     hardcode_minus_L=yes
6002     hardcode_shlibpath_var=no
6003     ;;
6004
6005   sysv4)
6006     case $host_vendor in
6007       sni)
6008         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6009         hardcode_direct=yes # is this really true???
6010         ;;
6011       siemens)
6012         ## LD is ld it makes a PLAMLIB
6013         ## CC just makes a GrossModule.
6014         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6015         reload_cmds='$CC -r -o $output$reload_objs'
6016         hardcode_direct=no
6017         ;;
6018       motorola)
6019         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6020         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6021         ;;
6022     esac
6023     runpath_var='LD_RUN_PATH'
6024     hardcode_shlibpath_var=no
6025     ;;
6026
6027   sysv4.3*)
6028     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029     hardcode_shlibpath_var=no
6030     export_dynamic_flag_spec='-Bexport'
6031     ;;
6032
6033   sysv5*)
6034     no_undefined_flag=' -z text'
6035     # $CC -shared without GNU ld will not create a library from C++
6036     # object files and a static libstdc++, better avoid it by now
6037     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6038     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6039                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6040     hardcode_libdir_flag_spec=
6041     hardcode_shlibpath_var=no
6042     runpath_var='LD_RUN_PATH'
6043     ;;
6044
6045   uts4*)
6046     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047     hardcode_libdir_flag_spec='-L$libdir'
6048     hardcode_shlibpath_var=no
6049     ;;
6050
6051   dgux*)
6052     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6053     hardcode_libdir_flag_spec='-L$libdir'
6054     hardcode_shlibpath_var=no
6055     ;;
6056
6057   sysv4*MP*)
6058     if test -d /usr/nec; then
6059       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6060       hardcode_shlibpath_var=no
6061       runpath_var=LD_RUN_PATH
6062       hardcode_runpath_var=yes
6063       ld_shlibs=yes
6064     fi
6065     ;;
6066
6067   sysv4.2uw2*)
6068     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6069     hardcode_direct=yes
6070     hardcode_minus_L=no
6071     hardcode_shlibpath_var=no
6072     hardcode_runpath_var=yes
6073     runpath_var=LD_RUN_PATH
6074     ;;
6075
6076   sysv5uw7* | unixware7*)
6077     no_undefined_flag='${wl}-z ${wl}text'
6078     if test "$GCC" = yes; then
6079       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6080     else
6081       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6082     fi
6083     runpath_var='LD_RUN_PATH'
6084     hardcode_shlibpath_var=no
6085     ;;
6086
6087   *)
6088     ld_shlibs=no
6089     ;;
6090   esac
6091 fi
6092 echo "$ac_t""$ld_shlibs" 1>&6
6093 test "$ld_shlibs" = no && can_build_shared=no
6094
6095 # Check hardcoding attributes.
6096 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6097 echo "configure:6098: checking how to hardcode library paths into programs" >&5
6098 hardcode_action=
6099 if test -n "$hardcode_libdir_flag_spec" || \
6100    test -n "$runpath_var"; then
6101
6102   # We can hardcode non-existant directories.
6103   if test "$hardcode_direct" != no &&
6104      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6105      # have to relink, otherwise we might link with an installed library
6106      # when we should be linking with a yet-to-be-installed one
6107      ## test "$hardcode_shlibpath_var" != no &&
6108      test "$hardcode_minus_L" != no; then
6109     # Linking always hardcodes the temporary library directory.
6110     hardcode_action=relink
6111   else
6112     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6113     hardcode_action=immediate
6114   fi
6115 else
6116   # We cannot hardcode anything, or else we can only hardcode existing
6117   # directories.
6118   hardcode_action=unsupported
6119 fi
6120 echo "$ac_t""$hardcode_action" 1>&6
6121
6122 striplib=
6123 old_striplib=
6124 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6125 echo "configure:6126: checking whether stripping libraries is possible" >&5
6126 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6127   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6128   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6129   echo "$ac_t""yes" 1>&6
6130 else
6131   echo "$ac_t""no" 1>&6
6132 fi
6133
6134 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6135 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6136
6137 # PORTME Fill in your ld.so characteristics
6138 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6139 echo "configure:6140: checking dynamic linker characteristics" >&5
6140 library_names_spec=
6141 libname_spec='lib$name'
6142 soname_spec=
6143 postinstall_cmds=
6144 postuninstall_cmds=
6145 finish_cmds=
6146 finish_eval=
6147 shlibpath_var=
6148 shlibpath_overrides_runpath=unknown
6149 version_type=none
6150 dynamic_linker="$host_os ld.so"
6151 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6152 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6153
6154 case $host_os in
6155 aix3*)
6156   version_type=linux
6157   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6158   shlibpath_var=LIBPATH
6159
6160   # AIX has no versioning support, so we append a major version to the name.
6161   soname_spec='${libname}${release}.so$major'
6162   ;;
6163
6164 aix4* | aix5*)
6165   version_type=linux
6166   need_lib_prefix=no
6167   need_version=no
6168   hardcode_into_libs=yes
6169   if test "$host_cpu" = ia64; then
6170     # AIX 5 supports IA64
6171     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6172     shlibpath_var=LD_LIBRARY_PATH
6173   else
6174     # With GCC up to 2.95.x, collect2 would create an import file
6175     # for dependence libraries.  The import file would start with
6176     # the line `#! .'.  This would cause the generated library to
6177     # depend on `.', always an invalid library.  This was fixed in
6178     # development snapshots of GCC prior to 3.0.
6179     case $host_os in
6180       aix4 | aix4.[01] | aix4.[01].*)
6181         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6182              echo ' yes '
6183              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6184           :
6185         else
6186           can_build_shared=no
6187         fi
6188         ;;
6189     esac
6190     # AIX (on Power*) has no versioning support, so currently we can
6191     # not hardcode correct soname into executable. Probably we can
6192     # add versioning support to collect2, so additional links can
6193     # be useful in future.
6194     if test "$aix_use_runtimelinking" = yes; then
6195       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6196       # instead of lib<name>.a to let people know that these are not
6197       # typical AIX shared libraries.
6198       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6199     else
6200       # We preserve .a as extension for shared libraries through AIX4.2
6201       # and later when we are not doing run time linking.
6202       library_names_spec='${libname}${release}.a $libname.a'
6203       soname_spec='${libname}${release}.so$major'
6204     fi
6205     shlibpath_var=LIBPATH
6206   fi
6207   hardcode_into_libs=yes
6208   ;;
6209
6210 amigaos*)
6211   library_names_spec='$libname.ixlibrary $libname.a'
6212   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6213   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'
6214   ;;
6215
6216 beos*)
6217   library_names_spec='${libname}.so'
6218   dynamic_linker="$host_os ld.so"
6219   shlibpath_var=LIBRARY_PATH
6220   ;;
6221
6222 bsdi4*)
6223   version_type=linux
6224   need_version=no
6225   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6226   soname_spec='${libname}${release}.so$major'
6227   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6228   shlibpath_var=LD_LIBRARY_PATH
6229   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6230   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6231   export_dynamic_flag_spec=-rdynamic
6232   # the default ld.so.conf also contains /usr/contrib/lib and
6233   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6234   # libtool to hard-code these into programs
6235   ;;
6236
6237 cygwin* | mingw* | pw32*)
6238   version_type=windows
6239   need_version=no
6240   need_lib_prefix=no
6241   case $GCC,$host_os in
6242   yes,cygwin*)
6243     library_names_spec='$libname.dll.a'
6244     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6245     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6246       dldir=$destdir/`dirname \$dlpath`~
6247       test -d \$dldir || mkdir -p \$dldir~
6248       $install_prog .libs/$dlname \$dldir/$dlname'
6249     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6250       dlpath=$dir/\$dldll~
6251        $rm \$dlpath'
6252     ;;
6253   yes,mingw*)
6254     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6255     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6256     ;;
6257   yes,pw32*)
6258     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6259     ;;
6260   *)
6261     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6262     ;;
6263   esac
6264   dynamic_linker='Win32 ld.exe'
6265   # FIXME: first we should search . and the directory the executable is in
6266   shlibpath_var=PATH
6267   ;;
6268
6269 darwin* | rhapsody*)
6270   dynamic_linker="$host_os dyld"
6271   version_type=darwin
6272   need_lib_prefix=no
6273   need_version=no
6274   # FIXME: Relying on posixy $() will cause problems for
6275   #        cross-compilation, but unfortunately the echo tests do not
6276   #        yet detect zsh echo's removal of \ escapes.
6277   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)'
6278   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6279   shlibpath_overrides_runpath=yes
6280   shlibpath_var=DYLD_LIBRARY_PATH
6281   ;;
6282
6283 freebsd1*)
6284   dynamic_linker=no
6285   ;;
6286
6287 freebsd*)
6288   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6289   version_type=freebsd-$objformat
6290   case $version_type in
6291     freebsd-elf*)
6292       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6293       need_version=no
6294       need_lib_prefix=no
6295       ;;
6296     freebsd-*)
6297       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6298       need_version=yes
6299       ;;
6300   esac
6301   shlibpath_var=LD_LIBRARY_PATH
6302   case $host_os in
6303   freebsd2*)
6304     shlibpath_overrides_runpath=yes
6305     ;;
6306   *)
6307     shlibpath_overrides_runpath=no
6308     hardcode_into_libs=yes
6309     ;;
6310   esac
6311   ;;
6312
6313 gnu*)
6314   version_type=linux
6315   need_lib_prefix=no
6316   need_version=no
6317   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6318   soname_spec='${libname}${release}.so$major'
6319   shlibpath_var=LD_LIBRARY_PATH
6320   hardcode_into_libs=yes
6321   ;;
6322
6323 hpux9* | hpux10* | hpux11*)
6324   # Give a soname corresponding to the major version so that dld.sl refuses to
6325   # link against other versions.
6326   dynamic_linker="$host_os dld.sl"
6327   version_type=sunos
6328   need_lib_prefix=no
6329   need_version=no
6330   shlibpath_var=SHLIB_PATH
6331   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6332   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6333   soname_spec='${libname}${release}.sl$major'
6334   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6335   postinstall_cmds='chmod 555 $lib'
6336   ;;
6337
6338 irix5* | irix6* | nonstopux*)
6339   case $host_os in
6340     nonstopux*) version_type=nonstopux ;;
6341     *)          version_type=irix ;;
6342   esac
6343   need_lib_prefix=no
6344   need_version=no
6345   soname_spec='${libname}${release}.so$major'
6346   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6347   case $host_os in
6348   irix5* | nonstopux*)
6349     libsuff= shlibsuff=
6350     ;;
6351   *)
6352     case $LD in # libtool.m4 will add one of these switches to LD
6353     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6354     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6355     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6356     *) libsuff= shlibsuff= libmagic=never-match;;
6357     esac
6358     ;;
6359   esac
6360   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6361   shlibpath_overrides_runpath=no
6362   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6363   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6364   ;;
6365
6366 # No shared lib support for Linux oldld, aout, or coff.
6367 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6368   dynamic_linker=no
6369   ;;
6370
6371 # This must be Linux ELF.
6372 linux-gnu*)
6373   version_type=linux
6374   need_lib_prefix=no
6375   need_version=no
6376   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6377   soname_spec='${libname}${release}.so$major'
6378   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6379   shlibpath_var=LD_LIBRARY_PATH
6380   shlibpath_overrides_runpath=no
6381   # This implies no fast_install, which is unacceptable.
6382   # Some rework will be needed to allow for fast_install
6383   # before this can be enabled.
6384   hardcode_into_libs=yes
6385
6386   # We used to test for /lib/ld.so.1 and disable shared libraries on
6387   # powerpc, because MkLinux only supported shared libraries with the
6388   # GNU dynamic linker.  Since this was broken with cross compilers,
6389   # most powerpc-linux boxes support dynamic linking these days and
6390   # people can always --disable-shared, the test was removed, and we
6391   # assume the GNU/Linux dynamic linker is in use.
6392   dynamic_linker='GNU/Linux ld.so'
6393   ;;
6394
6395 netbsd*)
6396   version_type=sunos
6397   need_lib_prefix=no
6398   need_version=no
6399   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6400     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6401     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6402     dynamic_linker='NetBSD (a.out) ld.so'
6403   else
6404     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6405     soname_spec='${libname}${release}.so$major'
6406     dynamic_linker='NetBSD ld.elf_so'
6407   fi
6408   shlibpath_var=LD_LIBRARY_PATH
6409   shlibpath_overrides_runpath=yes
6410   hardcode_into_libs=yes
6411   ;;
6412
6413 newsos6)
6414   version_type=linux
6415   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6416   shlibpath_var=LD_LIBRARY_PATH
6417   shlibpath_overrides_runpath=yes
6418   ;;
6419
6420 openbsd*)
6421   version_type=sunos
6422   need_lib_prefix=no
6423   need_version=no
6424   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6425     case "$host_os" in
6426     openbsd2.[89] | openbsd2.[89].*)
6427       shlibpath_overrides_runpath=no
6428       ;;
6429     *)
6430       shlibpath_overrides_runpath=yes
6431       ;;
6432     esac
6433   else
6434     shlibpath_overrides_runpath=yes
6435   fi
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6437   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6438   shlibpath_var=LD_LIBRARY_PATH
6439   ;;
6440
6441 os2*)
6442   libname_spec='$name'
6443   need_lib_prefix=no
6444   library_names_spec='$libname.dll $libname.a'
6445   dynamic_linker='OS/2 ld.exe'
6446   shlibpath_var=LIBPATH
6447   ;;
6448
6449 osf3* | osf4* | osf5*)
6450   version_type=osf
6451   need_version=no
6452   soname_spec='${libname}${release}.so$major'
6453   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6454   shlibpath_var=LD_LIBRARY_PATH
6455   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6456   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6457   hardcode_into_libs=yes
6458   ;;
6459
6460 sco3.2v5*)
6461   version_type=osf
6462   soname_spec='${libname}${release}.so$major'
6463   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6464   shlibpath_var=LD_LIBRARY_PATH
6465   ;;
6466
6467 solaris*)
6468   version_type=linux
6469   need_lib_prefix=no
6470   need_version=no
6471   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6472   soname_spec='${libname}${release}.so$major'
6473   shlibpath_var=LD_LIBRARY_PATH
6474   shlibpath_overrides_runpath=yes
6475   hardcode_into_libs=yes
6476   # ldd complains unless libraries are executable
6477   postinstall_cmds='chmod +x $lib'
6478   ;;
6479
6480 sunos4*)
6481   version_type=sunos
6482   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6483   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6484   shlibpath_var=LD_LIBRARY_PATH
6485   shlibpath_overrides_runpath=yes
6486   if test "$with_gnu_ld" = yes; then
6487     need_lib_prefix=no
6488   fi
6489   need_version=yes
6490   ;;
6491
6492 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6493   version_type=linux
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   soname_spec='${libname}${release}.so$major'
6496   shlibpath_var=LD_LIBRARY_PATH
6497   case $host_vendor in
6498     sni)
6499       shlibpath_overrides_runpath=no
6500       need_lib_prefix=no
6501       export_dynamic_flag_spec='${wl}-Blargedynsym'
6502       runpath_var=LD_RUN_PATH
6503       ;;
6504     siemens)
6505       need_lib_prefix=no
6506       ;;
6507     motorola)
6508       need_lib_prefix=no
6509       need_version=no
6510       shlibpath_overrides_runpath=no
6511       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6512       ;;
6513   esac
6514   ;;
6515
6516 uts4*)
6517   version_type=linux
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6519   soname_spec='${libname}${release}.so$major'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   ;;
6522
6523 dgux*)
6524   version_type=linux
6525   need_lib_prefix=no
6526   need_version=no
6527   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6528   soname_spec='${libname}${release}.so$major'
6529   shlibpath_var=LD_LIBRARY_PATH
6530   ;;
6531
6532 sysv4*MP*)
6533   if test -d /usr/nec ;then
6534     version_type=linux
6535     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6536     soname_spec='$libname.so.$major'
6537     shlibpath_var=LD_LIBRARY_PATH
6538   fi
6539   ;;
6540
6541 *)
6542   dynamic_linker=no
6543   ;;
6544 esac
6545 echo "$ac_t""$dynamic_linker" 1>&6
6546 test "$dynamic_linker" = no && can_build_shared=no
6547
6548 # Report the final consequences.
6549 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6550 echo "configure:6551: checking if libtool supports shared libraries" >&5
6551 echo "$ac_t""$can_build_shared" 1>&6
6552
6553 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6554 echo "configure:6555: checking whether to build shared libraries" >&5
6555 test "$can_build_shared" = "no" && enable_shared=no
6556
6557 # On AIX, shared libraries and static libraries use the same namespace, and
6558 # are all built from PIC.
6559 case "$host_os" in
6560 aix3*)
6561   test "$enable_shared" = yes && enable_static=no
6562   if test -n "$RANLIB"; then
6563     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6564     postinstall_cmds='$RANLIB $lib'
6565   fi
6566   ;;
6567
6568 aix4*)
6569   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6570     test "$enable_shared" = yes && enable_static=no
6571   fi
6572   ;;
6573 esac
6574 echo "$ac_t""$enable_shared" 1>&6
6575
6576 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6577 echo "configure:6578: checking whether to build static libraries" >&5
6578 # Make sure either enable_shared or enable_static is yes.
6579 test "$enable_shared" = yes || enable_static=yes
6580 echo "$ac_t""$enable_static" 1>&6
6581
6582 if test "$hardcode_action" = relink; then
6583   # Fast installation is not supported
6584   enable_fast_install=no
6585 elif test "$shlibpath_overrides_runpath" = yes ||
6586      test "$enable_shared" = no; then
6587   # Fast installation is not necessary
6588   enable_fast_install=needless
6589 fi
6590
6591 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6592 if test "$GCC" = yes; then
6593   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6594 fi
6595
6596 if test "x$enable_dlopen" != xyes; then
6597   enable_dlopen=unknown
6598   enable_dlopen_self=unknown
6599   enable_dlopen_self_static=unknown
6600 else
6601   lt_cv_dlopen=no
6602   lt_cv_dlopen_libs=
6603
6604   case $host_os in
6605   beos*)
6606     lt_cv_dlopen="load_add_on"
6607     lt_cv_dlopen_libs=
6608     lt_cv_dlopen_self=yes
6609     ;;
6610
6611   cygwin* | mingw* | pw32*)
6612     lt_cv_dlopen="LoadLibrary"
6613     lt_cv_dlopen_libs=
6614    ;;
6615
6616   *)
6617     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6618 echo "configure:6619: checking for shl_load" >&5
6619 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 /* System header to define __stub macros and hopefully few prototypes,
6626     which can conflict with char shl_load(); below.  */
6627 #include <assert.h>
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char shl_load();
6632 char (*f)();
6633
6634 int main() {
6635
6636 /* The GNU C library defines this for functions which it implements
6637     to always fail with ENOSYS.  Some functions are actually named
6638     something starting with __ and the normal name is an alias.  */
6639 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6640 choke me
6641 #else
6642 f = shl_load;
6643 #endif
6644
6645 ; return 0; }
6646 EOF
6647 if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6648   rm -rf conftest*
6649   eval "ac_cv_func_shl_load=yes"
6650 else
6651   echo "configure: failed program was:" >&5
6652   cat conftest.$ac_ext >&5
6653   rm -rf conftest*
6654   eval "ac_cv_func_shl_load=no"
6655 fi
6656 rm -f conftest*
6657 fi
6658
6659 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6660   echo "$ac_t""yes" 1>&6
6661   lt_cv_dlopen="shl_load"
6662 else
6663   echo "$ac_t""no" 1>&6
6664 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6665 echo "configure:6666: checking for shl_load in -ldld" >&5
6666 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   ac_save_LIBS="$LIBS"
6671 LIBS="-ldld  $LIBS"
6672 cat > conftest.$ac_ext <<EOF
6673 #line 6674 "configure"
6674 #include "confdefs.h"
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 /* We use char because int might match the return type of a gcc2
6677     builtin and then its argument prototype would still apply.  */
6678 char shl_load();
6679
6680 int main() {
6681 shl_load()
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_lib_$ac_lib_var=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_lib_$ac_lib_var=no"
6692 fi
6693 rm -f conftest*
6694 LIBS="$ac_save_LIBS"
6695
6696 fi
6697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6698   echo "$ac_t""yes" 1>&6
6699   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6700 else
6701   echo "$ac_t""no" 1>&6
6702 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6703 echo "configure:6704: checking for dlopen" >&5
6704 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6705   echo $ac_n "(cached) $ac_c" 1>&6
6706 else
6707   cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* System header to define __stub macros and hopefully few prototypes,
6711     which can conflict with char dlopen(); below.  */
6712 #include <assert.h>
6713 /* Override any gcc2 internal prototype to avoid an error.  */
6714 /* We use char because int might match the return type of a gcc2
6715     builtin and then its argument prototype would still apply.  */
6716 char dlopen();
6717 char (*f)();
6718
6719 int main() {
6720
6721 /* The GNU C library defines this for functions which it implements
6722     to always fail with ENOSYS.  Some functions are actually named
6723     something starting with __ and the normal name is an alias.  */
6724 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6725 choke me
6726 #else
6727 f = dlopen;
6728 #endif
6729
6730 ; return 0; }
6731 EOF
6732 if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6733   rm -rf conftest*
6734   eval "ac_cv_func_dlopen=yes"
6735 else
6736   echo "configure: failed program was:" >&5
6737   cat conftest.$ac_ext >&5
6738   rm -rf conftest*
6739   eval "ac_cv_func_dlopen=no"
6740 fi
6741 rm -f conftest*
6742 fi
6743
6744 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746   lt_cv_dlopen="dlopen"
6747 else
6748   echo "$ac_t""no" 1>&6
6749 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6750 echo "configure:6751: checking for dlopen in -ldl" >&5
6751 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   ac_save_LIBS="$LIBS"
6756 LIBS="-ldl  $LIBS"
6757 cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* Override any gcc2 internal prototype to avoid an error.  */
6761 /* We use char because int might match the return type of a gcc2
6762     builtin and then its argument prototype would still apply.  */
6763 char dlopen();
6764
6765 int main() {
6766 dlopen()
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=no"
6777 fi
6778 rm -f conftest*
6779 LIBS="$ac_save_LIBS"
6780
6781 fi
6782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783   echo "$ac_t""yes" 1>&6
6784   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6785 else
6786   echo "$ac_t""no" 1>&6
6787 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6788 echo "configure:6789: checking for dlopen in -lsvld" >&5
6789 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6791   echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793   ac_save_LIBS="$LIBS"
6794 LIBS="-lsvld  $LIBS"
6795 cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 /* We use char because int might match the return type of a gcc2
6800     builtin and then its argument prototype would still apply.  */
6801 char dlopen();
6802
6803 int main() {
6804 dlopen()
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808   rm -rf conftest*
6809   eval "ac_cv_lib_$ac_lib_var=yes"
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=no"
6815 fi
6816 rm -f conftest*
6817 LIBS="$ac_save_LIBS"
6818
6819 fi
6820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6821   echo "$ac_t""yes" 1>&6
6822   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6823 else
6824   echo "$ac_t""no" 1>&6
6825 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6826 echo "configure:6827: checking for dld_link in -ldld" >&5
6827 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6828 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6829   echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831   ac_save_LIBS="$LIBS"
6832 LIBS="-ldld  $LIBS"
6833 cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836 /* Override any gcc2 internal prototype to avoid an error.  */
6837 /* We use char because int might match the return type of a gcc2
6838     builtin and then its argument prototype would still apply.  */
6839 char dld_link();
6840
6841 int main() {
6842 dld_link()
6843 ; return 0; }
6844 EOF
6845 if { (eval echo configure:6846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6846   rm -rf conftest*
6847   eval "ac_cv_lib_$ac_lib_var=yes"
6848 else
6849   echo "configure: failed program was:" >&5
6850   cat conftest.$ac_ext >&5
6851   rm -rf conftest*
6852   eval "ac_cv_lib_$ac_lib_var=no"
6853 fi
6854 rm -f conftest*
6855 LIBS="$ac_save_LIBS"
6856
6857 fi
6858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6859   echo "$ac_t""yes" 1>&6
6860   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6861 else
6862   echo "$ac_t""no" 1>&6
6863 fi
6864
6865               
6866 fi
6867
6868             
6869 fi
6870
6871           
6872 fi
6873
6874         
6875 fi
6876
6877       
6878 fi
6879
6880     ;;
6881   esac
6882
6883   if test "x$lt_cv_dlopen" != xno; then
6884     enable_dlopen=yes
6885   else
6886     enable_dlopen=no
6887   fi
6888
6889   case $lt_cv_dlopen in
6890   dlopen)
6891     save_CPPFLAGS="$CPPFLAGS"
6892         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6893
6894     save_LDFLAGS="$LDFLAGS"
6895     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6896
6897     save_LIBS="$LIBS"
6898     LIBS="$lt_cv_dlopen_libs $LIBS"
6899
6900     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6901 echo "configure:6902: checking whether a program can dlopen itself" >&5
6902 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905           if test "$cross_compiling" = yes; then :
6906   lt_cv_dlopen_self=cross
6907 else
6908     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6909   lt_status=$lt_dlunknown
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913
6914 #if HAVE_DLFCN_H
6915 #include <dlfcn.h>
6916 #endif
6917
6918 #include <stdio.h>
6919
6920 #ifdef RTLD_GLOBAL
6921 #  define LT_DLGLOBAL           RTLD_GLOBAL
6922 #else
6923 #  ifdef DL_GLOBAL
6924 #    define LT_DLGLOBAL         DL_GLOBAL
6925 #  else
6926 #    define LT_DLGLOBAL         0
6927 #  endif
6928 #endif
6929
6930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6931    find out it does not work in some platform. */
6932 #ifndef LT_DLLAZY_OR_NOW
6933 #  ifdef RTLD_LAZY
6934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6935 #  else
6936 #    ifdef DL_LAZY
6937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6938 #    else
6939 #      ifdef RTLD_NOW
6940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6941 #      else
6942 #        ifdef DL_NOW
6943 #          define LT_DLLAZY_OR_NOW      DL_NOW
6944 #        else
6945 #          define LT_DLLAZY_OR_NOW      0
6946 #        endif
6947 #      endif
6948 #    endif
6949 #  endif
6950 #endif
6951
6952 #ifdef __cplusplus
6953 extern "C" void exit (int);
6954 #endif
6955
6956 void fnord() { int i=42;}
6957 int main ()
6958 {
6959   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6960   int status = $lt_dlunknown;
6961
6962   if (self)
6963     {
6964       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6965       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6966       /* dlclose (self); */
6967     }
6968
6969     exit (status);
6970 }
6971 EOF
6972   if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6973     (./conftest; exit; ) 2>/dev/null
6974     lt_status=$?
6975     case x$lt_status in
6976       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6977       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6978       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6979     esac
6980   else :
6981     # compilation failed
6982     lt_cv_dlopen_self=no
6983   fi
6984 fi
6985 rm -fr conftest*
6986
6987     
6988 fi
6989
6990 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6991
6992     if test "x$lt_cv_dlopen_self" = xyes; then
6993       LDFLAGS="$LDFLAGS $link_static_flag"
6994       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6995 echo "configure:6996: checking whether a statically linked program can dlopen itself" >&5
6996 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999           if test "$cross_compiling" = yes; then :
7000   lt_cv_dlopen_self_static=cross
7001 else
7002     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7003   lt_status=$lt_dlunknown
7004   cat > conftest.$ac_ext <<EOF
7005 #line 7006 "configure"
7006 #include "confdefs.h"
7007
7008 #if HAVE_DLFCN_H
7009 #include <dlfcn.h>
7010 #endif
7011
7012 #include <stdio.h>
7013
7014 #ifdef RTLD_GLOBAL
7015 #  define LT_DLGLOBAL           RTLD_GLOBAL
7016 #else
7017 #  ifdef DL_GLOBAL
7018 #    define LT_DLGLOBAL         DL_GLOBAL
7019 #  else
7020 #    define LT_DLGLOBAL         0
7021 #  endif
7022 #endif
7023
7024 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7025    find out it does not work in some platform. */
7026 #ifndef LT_DLLAZY_OR_NOW
7027 #  ifdef RTLD_LAZY
7028 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7029 #  else
7030 #    ifdef DL_LAZY
7031 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7032 #    else
7033 #      ifdef RTLD_NOW
7034 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7035 #      else
7036 #        ifdef DL_NOW
7037 #          define LT_DLLAZY_OR_NOW      DL_NOW
7038 #        else
7039 #          define LT_DLLAZY_OR_NOW      0
7040 #        endif
7041 #      endif
7042 #    endif
7043 #  endif
7044 #endif
7045
7046 #ifdef __cplusplus
7047 extern "C" void exit (int);
7048 #endif
7049
7050 void fnord() { int i=42;}
7051 int main ()
7052 {
7053   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7054   int status = $lt_dlunknown;
7055
7056   if (self)
7057     {
7058       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7059       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7060       /* dlclose (self); */
7061     }
7062
7063     exit (status);
7064 }
7065 EOF
7066   if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7067     (./conftest; exit; ) 2>/dev/null
7068     lt_status=$?
7069     case x$lt_status in
7070       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7071       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7072       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7073     esac
7074   else :
7075     # compilation failed
7076     lt_cv_dlopen_self_static=no
7077   fi
7078 fi
7079 rm -fr conftest*
7080
7081       
7082 fi
7083
7084 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7085     fi
7086
7087     CPPFLAGS="$save_CPPFLAGS"
7088     LDFLAGS="$save_LDFLAGS"
7089     LIBS="$save_LIBS"
7090     ;;
7091   esac
7092
7093   case $lt_cv_dlopen_self in
7094   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7095   *) enable_dlopen_self=unknown ;;
7096   esac
7097
7098   case $lt_cv_dlopen_self_static in
7099   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7100   *) enable_dlopen_self_static=unknown ;;
7101   esac
7102 fi
7103
7104
7105 if test "$enable_shared" = yes && test "$GCC" = yes; then
7106   case $archive_cmds in
7107   *'~'*)
7108     # FIXME: we may have to deal with multi-command sequences.
7109     ;;
7110   '$CC '*)
7111     # Test whether the compiler implicitly links with -lc since on some
7112     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7113     # to ld, don't add -lc before -lgcc.
7114     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7115 echo "configure:7116: checking whether -lc should be explicitly linked in" >&5
7116     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   $rm conftest*
7120     echo 'static int dummy;' > conftest.$ac_ext
7121
7122     if { (eval echo configure:7123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7123       soname=conftest
7124       lib=conftest
7125       libobjs=conftest.$ac_objext
7126       deplibs=
7127       wl=$lt_cv_prog_cc_wl
7128       compiler_flags=-v
7129       linker_flags=-v
7130       verstring=
7131       output_objdir=.
7132       libname=conftest
7133       save_allow_undefined_flag=$allow_undefined_flag
7134       allow_undefined_flag=
7135       if { (eval echo configure:7136: \"$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; }
7136       then
7137         lt_cv_archive_cmds_need_lc=no
7138       else
7139         lt_cv_archive_cmds_need_lc=yes
7140       fi
7141       allow_undefined_flag=$save_allow_undefined_flag
7142     else
7143       cat conftest.err 1>&5
7144     fi
7145 fi
7146
7147     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7148     ;;
7149   esac
7150 fi
7151 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7152
7153 # The second clause should only fire when bootstrapping the
7154 # libtool distribution, otherwise you forgot to ship ltmain.sh
7155 # with your package, and you will get complaints that there are
7156 # no rules to generate ltmain.sh.
7157 if test -f "$ltmain"; then
7158   :
7159 else
7160   # If there is no Makefile yet, we rely on a make rule to execute
7161   # `config.status --recheck' to rerun these tests and create the
7162   # libtool script then.
7163   test -f Makefile && make "$ltmain"
7164 fi
7165
7166 if test -f "$ltmain"; then
7167   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7168   $rm -f "${ofile}T"
7169
7170   echo creating $ofile
7171
7172   # Now quote all the things that may contain metacharacters while being
7173   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7174   # variables and quote the copies for generation of the libtool script.
7175   for var in echo old_CC old_CFLAGS SED \
7176     AR AR_FLAGS CC LD LN_S NM SHELL \
7177     reload_flag reload_cmds wl \
7178     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7179     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7180     library_names_spec soname_spec \
7181     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7182     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7183     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7184     old_striplib striplib file_magic_cmd export_symbols_cmds \
7185     deplibs_check_method allow_undefined_flag no_undefined_flag \
7186     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7187     global_symbol_to_c_name_address \
7188     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7189     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7190     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7191
7192     case $var in
7193     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7194     old_postinstall_cmds | old_postuninstall_cmds | \
7195     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7196     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7197     postinstall_cmds | postuninstall_cmds | \
7198     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7199       # Double-quote double-evaled strings.
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7201       ;;
7202     *)
7203       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7204       ;;
7205     esac
7206   done
7207
7208   cat <<__EOF__ > "${ofile}T"
7209 #! $SHELL
7210
7211 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7212 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7213 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7214 #
7215 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7216 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7217 #
7218 # This program is free software; you can redistribute it and/or modify
7219 # it under the terms of the GNU General Public License as published by
7220 # the Free Software Foundation; either version 2 of the License, or
7221 # (at your option) any later version.
7222 #
7223 # This program is distributed in the hope that it will be useful, but
7224 # WITHOUT ANY WARRANTY; without even the implied warranty of
7225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7226 # General Public License for more details.
7227 #
7228 # You should have received a copy of the GNU General Public License
7229 # along with this program; if not, write to the Free Software
7230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7231 #
7232 # As a special exception to the GNU General Public License, if you
7233 # distribute this file as part of a program that contains a
7234 # configuration script generated by Autoconf, you may include it under
7235 # the same distribution terms that you use for the rest of that program.
7236
7237 # A sed that does not truncate output.
7238 SED=$lt_SED
7239
7240 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7241 Xsed="${SED} -e s/^X//"
7242
7243 # The HP-UX ksh and POSIX shell print the target directory to stdout
7244 # if CDPATH is set.
7245 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7246
7247 # ### BEGIN LIBTOOL CONFIG
7248
7249 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7250
7251 # Shell to use when invoking shell scripts.
7252 SHELL=$lt_SHELL
7253
7254 # Whether or not to build shared libraries.
7255 build_libtool_libs=$enable_shared
7256
7257 # Whether or not to build static libraries.
7258 build_old_libs=$enable_static
7259
7260 # Whether or not to add -lc for building shared libraries.
7261 build_libtool_need_lc=$need_lc
7262
7263 # Whether or not to optimize for fast installation.
7264 fast_install=$enable_fast_install
7265
7266 # The host system.
7267 host_alias=$host_alias
7268 host=$host
7269
7270 # An echo program that does not interpret backslashes.
7271 echo=$lt_echo
7272
7273 # The archiver.
7274 AR=$lt_AR
7275 AR_FLAGS=$lt_AR_FLAGS
7276
7277 # The default C compiler.
7278 CC=$lt_CC
7279
7280 # Is the compiler the GNU C compiler?
7281 with_gcc=$GCC
7282
7283 # The linker used to build libraries.
7284 LD=$lt_LD
7285
7286 # Whether we need hard or soft links.
7287 LN_S=$lt_LN_S
7288
7289 # A BSD-compatible nm program.
7290 NM=$lt_NM
7291
7292 # A symbol stripping program
7293 STRIP=$STRIP
7294
7295 # Used to examine libraries when file_magic_cmd begins "file"
7296 MAGIC_CMD=$MAGIC_CMD
7297
7298 # Used on cygwin: DLL creation program.
7299 DLLTOOL="$DLLTOOL"
7300
7301 # Used on cygwin: object dumper.
7302 OBJDUMP="$OBJDUMP"
7303
7304 # Used on cygwin: assembler.
7305 AS="$AS"
7306
7307 # The name of the directory that contains temporary libtool files.
7308 objdir=$objdir
7309
7310 # How to create reloadable object files.
7311 reload_flag=$lt_reload_flag
7312 reload_cmds=$lt_reload_cmds
7313
7314 # How to pass a linker flag through the compiler.
7315 wl=$lt_wl
7316
7317 # Object file suffix (normally "o").
7318 objext="$ac_objext"
7319
7320 # Old archive suffix (normally "a").
7321 libext="$libext"
7322
7323 # Executable file suffix (normally "").
7324 exeext="$exeext"
7325
7326 # Additional compiler flags for building library objects.
7327 pic_flag=$lt_pic_flag
7328 pic_mode=$pic_mode
7329
7330 # Does compiler simultaneously support -c and -o options?
7331 compiler_c_o=$lt_compiler_c_o
7332
7333 # Can we write directly to a .lo ?
7334 compiler_o_lo=$lt_compiler_o_lo
7335
7336 # Must we lock files when doing compilation ?
7337 need_locks=$lt_need_locks
7338
7339 # Do we need the lib prefix for modules?
7340 need_lib_prefix=$need_lib_prefix
7341
7342 # Do we need a version for libraries?
7343 need_version=$need_version
7344
7345 # Whether dlopen is supported.
7346 dlopen_support=$enable_dlopen
7347
7348 # Whether dlopen of programs is supported.
7349 dlopen_self=$enable_dlopen_self
7350
7351 # Whether dlopen of statically linked programs is supported.
7352 dlopen_self_static=$enable_dlopen_self_static
7353
7354 # Compiler flag to prevent dynamic linking.
7355 link_static_flag=$lt_link_static_flag
7356
7357 # Compiler flag to turn off builtin functions.
7358 no_builtin_flag=$lt_no_builtin_flag
7359
7360 # Compiler flag to allow reflexive dlopens.
7361 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7362
7363 # Compiler flag to generate shared objects directly from archives.
7364 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7365
7366 # Compiler flag to generate thread-safe objects.
7367 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7368
7369 # Library versioning type.
7370 version_type=$version_type
7371
7372 # Format of library name prefix.
7373 libname_spec=$lt_libname_spec
7374
7375 # List of archive names.  First name is the real one, the rest are links.
7376 # The last name is the one that the linker finds with -lNAME.
7377 library_names_spec=$lt_library_names_spec
7378
7379 # The coded name of the library, if different from the real name.
7380 soname_spec=$lt_soname_spec
7381
7382 # Commands used to build and install an old-style archive.
7383 RANLIB=$lt_RANLIB
7384 old_archive_cmds=$lt_old_archive_cmds
7385 old_postinstall_cmds=$lt_old_postinstall_cmds
7386 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7387
7388 # Create an old-style archive from a shared archive.
7389 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7390
7391 # Create a temporary old-style archive to link instead of a shared archive.
7392 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7393
7394 # Commands used to build and install a shared archive.
7395 archive_cmds=$lt_archive_cmds
7396 archive_expsym_cmds=$lt_archive_expsym_cmds
7397 postinstall_cmds=$lt_postinstall_cmds
7398 postuninstall_cmds=$lt_postuninstall_cmds
7399
7400 # Commands to strip libraries.
7401 old_striplib=$lt_old_striplib
7402 striplib=$lt_striplib
7403
7404 # Method to check whether dependent libraries are shared objects.
7405 deplibs_check_method=$lt_deplibs_check_method
7406
7407 # Command to use when deplibs_check_method == file_magic.
7408 file_magic_cmd=$lt_file_magic_cmd
7409
7410 # Flag that allows shared libraries with undefined symbols to be built.
7411 allow_undefined_flag=$lt_allow_undefined_flag
7412
7413 # Flag that forces no undefined symbols.
7414 no_undefined_flag=$lt_no_undefined_flag
7415
7416 # Commands used to finish a libtool library installation in a directory.
7417 finish_cmds=$lt_finish_cmds
7418
7419 # Same as above, but a single script fragment to be evaled but not shown.
7420 finish_eval=$lt_finish_eval
7421
7422 # Take the output of nm and produce a listing of raw symbols and C names.
7423 global_symbol_pipe=$lt_global_symbol_pipe
7424
7425 # Transform the output of nm in a proper C declaration
7426 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7427
7428 # Transform the output of nm in a C name address pair
7429 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7430
7431 # This is the shared library runtime path variable.
7432 runpath_var=$runpath_var
7433
7434 # This is the shared library path variable.
7435 shlibpath_var=$shlibpath_var
7436
7437 # Is shlibpath searched before the hard-coded library search path?
7438 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7439
7440 # How to hardcode a shared library path into an executable.
7441 hardcode_action=$hardcode_action
7442
7443 # Whether we should hardcode library paths into libraries.
7444 hardcode_into_libs=$hardcode_into_libs
7445
7446 # Flag to hardcode \$libdir into a binary during linking.
7447 # This must work even if \$libdir does not exist.
7448 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7449
7450 # Whether we need a single -rpath flag with a separated argument.
7451 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7452
7453 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7454 # resulting binary.
7455 hardcode_direct=$hardcode_direct
7456
7457 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7458 # resulting binary.
7459 hardcode_minus_L=$hardcode_minus_L
7460
7461 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7462 # the resulting binary.
7463 hardcode_shlibpath_var=$hardcode_shlibpath_var
7464
7465 # Variables whose values should be saved in libtool wrapper scripts and
7466 # restored at relink time.
7467 variables_saved_for_relink="$variables_saved_for_relink"
7468
7469 # Whether libtool must link a program against all its dependency libraries.
7470 link_all_deplibs=$link_all_deplibs
7471
7472 # Compile-time system search path for libraries
7473 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7474
7475 # Run-time system search path for libraries
7476 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7477
7478 # Fix the shell variable \$srcfile for the compiler.
7479 fix_srcfile_path="$fix_srcfile_path"
7480
7481 # Set to yes if exported symbols are required.
7482 always_export_symbols=$always_export_symbols
7483
7484 # The commands to list exported symbols.
7485 export_symbols_cmds=$lt_export_symbols_cmds
7486
7487 # The commands to extract the exported symbol list from a shared archive.
7488 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7489
7490 # Symbols that should not be listed in the preloaded symbols.
7491 exclude_expsyms=$lt_exclude_expsyms
7492
7493 # Symbols that must always be exported.
7494 include_expsyms=$lt_include_expsyms
7495
7496 # ### END LIBTOOL CONFIG
7497
7498 __EOF__
7499
7500   case $host_os in
7501   aix3*)
7502     cat <<\EOF >> "${ofile}T"
7503
7504 # AIX sometimes has problems with the GCC collect2 program.  For some
7505 # reason, if we set the COLLECT_NAMES environment variable, the problems
7506 # vanish in a puff of smoke.
7507 if test "X${COLLECT_NAMES+set}" != Xset; then
7508   COLLECT_NAMES=
7509   export COLLECT_NAMES
7510 fi
7511 EOF
7512     ;;
7513   esac
7514
7515   case $host_os in
7516   cygwin* | mingw* | pw32* | os2*)
7517     cat <<'EOF' >> "${ofile}T"
7518       # This is a source program that is used to create dlls on Windows
7519       # Don't remove nor modify the starting and closing comments
7520 # /* ltdll.c starts here */
7521 # #define WIN32_LEAN_AND_MEAN
7522 # #include <windows.h>
7523 # #undef WIN32_LEAN_AND_MEAN
7524 # #include <stdio.h>
7525 #
7526 # #ifndef __CYGWIN__
7527 # #  ifdef __CYGWIN32__
7528 # #    define __CYGWIN__ __CYGWIN32__
7529 # #  endif
7530 # #endif
7531 #
7532 # #ifdef __cplusplus
7533 # extern "C" {
7534 # #endif
7535 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7536 # #ifdef __cplusplus
7537 # }
7538 # #endif
7539 #
7540 # #ifdef __CYGWIN__
7541 # #include <cygwin/cygwin_dll.h>
7542 # DECLARE_CYGWIN_DLL( DllMain );
7543 # #endif
7544 # HINSTANCE __hDllInstance_base;
7545 #
7546 # BOOL APIENTRY
7547 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7548 # {
7549 #   __hDllInstance_base = hInst;
7550 #   return TRUE;
7551 # }
7552 # /* ltdll.c ends here */
7553         # This is a source program that is used to create import libraries
7554         # on Windows for dlls which lack them. Don't remove nor modify the
7555         # starting and closing comments
7556 # /* impgen.c starts here */
7557 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7558 #
7559 #  This file is part of GNU libtool.
7560 #
7561 #  This program is free software; you can redistribute it and/or modify
7562 #  it under the terms of the GNU General Public License as published by
7563 #  the Free Software Foundation; either version 2 of the License, or
7564 #  (at your option) any later version.
7565 #
7566 #  This program is distributed in the hope that it will be useful,
7567 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7568 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7569 #  GNU General Public License for more details.
7570 #
7571 #  You should have received a copy of the GNU General Public License
7572 #  along with this program; if not, write to the Free Software
7573 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7574 #  */
7575 #
7576 # #include <stdio.h>            /* for printf() */
7577 # #include <unistd.h>           /* for open(), lseek(), read() */
7578 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7579 # #include <string.h>           /* for strdup() */
7580 #
7581 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7582 # #ifndef O_BINARY
7583 # #define O_BINARY 0
7584 # #endif
7585 #
7586 # static unsigned int
7587 # pe_get16 (fd, offset)
7588 #      int fd;
7589 #      int offset;
7590 # {
7591 #   unsigned char b[2];
7592 #   lseek (fd, offset, SEEK_SET);
7593 #   read (fd, b, 2);
7594 #   return b[0] + (b[1]<<8);
7595 # }
7596 #
7597 # static unsigned int
7598 # pe_get32 (fd, offset)
7599 #     int fd;
7600 #     int offset;
7601 # {
7602 #   unsigned char b[4];
7603 #   lseek (fd, offset, SEEK_SET);
7604 #   read (fd, b, 4);
7605 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7606 # }
7607 #
7608 # static unsigned int
7609 # pe_as32 (ptr)
7610 #      void *ptr;
7611 # {
7612 #   unsigned char *b = ptr;
7613 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7614 # }
7615 #
7616 # int
7617 # main (argc, argv)
7618 #     int argc;
7619 #     char *argv[];
7620 # {
7621 #     int dll;
7622 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7623 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7624 #     unsigned long name_rvas, nexp;
7625 #     unsigned char *expdata, *erva;
7626 #     char *filename, *dll_name;
7627 #
7628 #     filename = argv[1];
7629 #
7630 #     dll = open(filename, O_RDONLY|O_BINARY);
7631 #     if (dll < 1)
7632 #       return 1;
7633 #
7634 #     dll_name = filename;
7635 #
7636 #     for (i=0; filename[i]; i++)
7637 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7638 #           dll_name = filename + i +1;
7639 #
7640 #     pe_header_offset = pe_get32 (dll, 0x3c);
7641 #     opthdr_ofs = pe_header_offset + 4 + 20;
7642 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7643 #
7644 #     if (num_entries < 1) /* no exports */
7645 #       return 1;
7646 #
7647 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7648 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7649 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7650 #     secptr = (pe_header_offset + 4 + 20 +
7651 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7652 #
7653 #     expptr = 0;
7654 #     for (i = 0; i < nsections; i++)
7655 #     {
7656 #       char sname[8];
7657 #       unsigned long secptr1 = secptr + 40 * i;
7658 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7659 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7660 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7661 #       lseek(dll, secptr1, SEEK_SET);
7662 #       read(dll, sname, 8);
7663 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7664 #       {
7665 #           expptr = fptr + (export_rva - vaddr);
7666 #           if (export_rva + export_size > vaddr + vsize)
7667 #               export_size = vsize - (export_rva - vaddr);
7668 #           break;
7669 #       }
7670 #     }
7671 #
7672 #     expdata = (unsigned char*)malloc(export_size);
7673 #     lseek (dll, expptr, SEEK_SET);
7674 #     read (dll, expdata, export_size);
7675 #     erva = expdata - export_rva;
7676 #
7677 #     nexp = pe_as32 (expdata+24);
7678 #     name_rvas = pe_as32 (expdata+32);
7679 #
7680 #     printf ("EXPORTS\n");
7681 #     for (i = 0; i<nexp; i++)
7682 #     {
7683 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7684 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7685 #     }
7686 #
7687 #     return 0;
7688 # }
7689 # /* impgen.c ends here */
7690
7691 EOF
7692     ;;
7693   esac
7694
7695   # We use sed instead of cat because bash on DJGPP gets confused if
7696   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7697   # text mode, it properly converts lines to CR/LF.  This bash problem
7698   # is reportedly fixed, but why not run on old versions too?
7699   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7700
7701   mv -f "${ofile}T" "$ofile" || \
7702     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7703   chmod +x "$ofile"
7704 fi
7705
7706
7707
7708
7709
7710 # This can be used to rebuild libtool when needed
7711 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7712
7713 # Always use our own libtool.
7714 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7715
7716 # Prevent multiple expansion
7717
7718
7719
7720 # test for ln hardlink support
7721 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7722 echo "configure:7723: checking whether ln works" >&5
7723 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   rm -f conftest.src conftest.dst
7727 echo "conftest" > conftest.src
7728 if ln conftest.src conftest.dst 2>/dev/null
7729 then
7730   ol_cv_prog_LN_H="ln"
7731 else
7732   ol_cv_prog_LN_H="cp"
7733 fi
7734 rm -f conftest.src conftest.dst
7735
7736 fi
7737 LN_H="$ol_cv_prog_LN_H"
7738 if test "$ol_cv_prog_LN_H" = "ln"; then
7739         echo "$ac_t""yes" 1>&6
7740 else
7741         echo "$ac_t""no" 1>&6
7742 fi
7743
7744 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7745 echo "configure:7746: checking whether ln -s works" >&5
7746 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7747   echo $ac_n "(cached) $ac_c" 1>&6
7748 else
7749   rm -f conftestdata
7750 if ln -s X conftestdata 2>/dev/null
7751 then
7752   rm -f conftestdata
7753   ac_cv_prog_LN_S="ln -s"
7754 else
7755   ac_cv_prog_LN_S=ln
7756 fi
7757 fi
7758 LN_S="$ac_cv_prog_LN_S"
7759 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7760   echo "$ac_t""yes" 1>&6
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764
7765
7766 ol_link_perl=no
7767 if test $ol_enable_perl != no ; then
7768         # Extract the first word of "perl", so it can be a program name with args.
7769 set dummy perl; ac_word=$2
7770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7771 echo "configure:7772: checking for $ac_word" >&5
7772 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7773   echo $ac_n "(cached) $ac_c" 1>&6
7774 else
7775   case "$PERLBIN" in
7776   /*)
7777   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7778   ;;
7779   ?:/*)
7780   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7781   ;;
7782   *)
7783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7784   ac_dummy="$PATH"
7785   for ac_dir in $ac_dummy; do 
7786     test -z "$ac_dir" && ac_dir=.
7787     if test -f $ac_dir/$ac_word; then
7788       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7789       break
7790     fi
7791   done
7792   IFS="$ac_save_ifs"
7793   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7794   ;;
7795 esac
7796 fi
7797 PERLBIN="$ac_cv_path_PERLBIN"
7798 if test -n "$PERLBIN"; then
7799   echo "$ac_t""$PERLBIN" 1>&6
7800 else
7801   echo "$ac_t""no" 1>&6
7802 fi
7803
7804
7805         if test "no$PERLBIN" = "no" ; then
7806                 if test $ol_enable_perl = yes ; then
7807                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7808                 fi
7809
7810         else
7811                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7812                 if test x"$ol_with_perl_module" = "xstatic" ; then
7813                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7814                 else
7815                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7816                 fi
7817                                 ol_link_perl=yes
7818         fi
7819 fi
7820
7821 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7822 echo "configure:7823: checking how to run the C preprocessor" >&5
7823 # On Suns, sometimes $CPP names a directory.
7824 if test -n "$CPP" && test -d "$CPP"; then
7825   CPP=
7826 fi
7827 if test -z "$CPP"; then
7828 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7829   echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831     # This must be in double quotes, not single quotes, because CPP may get
7832   # substituted into the Makefile and "${CC-cc}" will confuse make.
7833   CPP="${CC-cc} -E"
7834   # On the NeXT, cc -E runs the code through the compiler's parser,
7835   # not just through cpp.
7836   cat > conftest.$ac_ext <<EOF
7837 #line 7838 "configure"
7838 #include "confdefs.h"
7839 #include <assert.h>
7840 Syntax Error
7841 EOF
7842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7843 { (eval echo configure:7844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7845 if test -z "$ac_err"; then
7846   :
7847 else
7848   echo "$ac_err" >&5
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   CPP="${CC-cc} -E -traditional-cpp"
7853   cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 #include <assert.h>
7857 Syntax Error
7858 EOF
7859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7860 { (eval echo configure:7861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7862 if test -z "$ac_err"; then
7863   :
7864 else
7865   echo "$ac_err" >&5
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   CPP="${CC-cc} -nologo -E"
7870   cat > conftest.$ac_ext <<EOF
7871 #line 7872 "configure"
7872 #include "confdefs.h"
7873 #include <assert.h>
7874 Syntax Error
7875 EOF
7876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7877 { (eval echo configure:7878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7879 if test -z "$ac_err"; then
7880   :
7881 else
7882   echo "$ac_err" >&5
7883   echo "configure: failed program was:" >&5
7884   cat conftest.$ac_ext >&5
7885   rm -rf conftest*
7886   CPP=/lib/cpp
7887 fi
7888 rm -f conftest*
7889 fi
7890 rm -f conftest*
7891 fi
7892 rm -f conftest*
7893   ac_cv_prog_CPP="$CPP"
7894 fi
7895   CPP="$ac_cv_prog_CPP"
7896 else
7897   ac_cv_prog_CPP="$CPP"
7898 fi
7899 echo "$ac_t""$CPP" 1>&6
7900
7901
7902 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7903         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7904
7905 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7906         echo "configure: warning: programs compiled here do run here..." 1>&2
7907         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7908
7909 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7910         echo "configure: warning: programs compiled here do not run here..." 1>&2
7911         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7912 fi
7913
7914
7915 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7916 echo "configure:7917: checking for Cygwin environment" >&5
7917 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923
7924 int main() {
7925
7926 #ifndef __CYGWIN__
7927 #define __CYGWIN__ __CYGWIN32__
7928 #endif
7929 return __CYGWIN__;
7930 ; return 0; }
7931 EOF
7932 if { (eval echo configure:7933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7933   rm -rf conftest*
7934   ac_cv_cygwin=yes
7935 else
7936   echo "configure: failed program was:" >&5
7937   cat conftest.$ac_ext >&5
7938   rm -rf conftest*
7939   ac_cv_cygwin=no
7940 fi
7941 rm -f conftest*
7942 fi
7943
7944 echo "$ac_t""$ac_cv_cygwin" 1>&6
7945 CYGWIN=
7946 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7947 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7948 echo "configure:7949: checking for mingw32 environment" >&5
7949 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7950   echo $ac_n "(cached) $ac_c" 1>&6
7951 else
7952   cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955
7956 int main() {
7957 return __MINGW32__;
7958 ; return 0; }
7959 EOF
7960 if { (eval echo configure:7961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7961   rm -rf conftest*
7962   ac_cv_mingw32=yes
7963 else
7964   echo "configure: failed program was:" >&5
7965   cat conftest.$ac_ext >&5
7966   rm -rf conftest*
7967   ac_cv_mingw32=no
7968 fi
7969 rm -f conftest*
7970 fi
7971
7972 echo "$ac_t""$ac_cv_mingw32" 1>&6
7973 MINGW32=
7974 test "$ac_cv_mingw32" = yes && MINGW32=yes
7975
7976
7977
7978 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7979 echo "configure:7980: checking for executable suffix" >&5
7980 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7984   ac_cv_exeext=.exe
7985 else
7986   rm -f conftest*
7987   echo 'int main () { return 0; }' > conftest.$ac_ext
7988   ac_cv_exeext=
7989   if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7990     for file in conftest.*; do
7991       case $file in
7992       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7993       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7994       esac
7995     done
7996   else
7997     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7998   fi
7999   rm -f conftest*
8000   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8001 fi
8002 fi
8003
8004 EXEEXT=""
8005 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8006 echo "$ac_t""${ac_cv_exeext}" 1>&6
8007 ac_exeext=$EXEEXT
8008
8009 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8010 echo "configure:8011: checking for object suffix" >&5
8011 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   rm -f conftest*
8015 echo 'int i = 1;' > conftest.$ac_ext
8016 if { (eval echo configure:8017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8017   for ac_file in conftest.*; do
8018     case $ac_file in
8019     *.c) ;;
8020     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8021     esac
8022   done
8023 else
8024   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8025 fi
8026 rm -f conftest*
8027 fi
8028
8029 echo "$ac_t""$ac_cv_objext" 1>&6
8030 OBJEXT=$ac_cv_objext
8031 ac_objext=$ac_cv_objext
8032
8033
8034 cat >> confdefs.h <<EOF
8035 #define EXEEXT "${EXEEXT}"
8036 EOF
8037
8038
8039 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8040 echo "configure:8041: checking for be_app in -lbe" >&5
8041 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   ac_save_LIBS="$LIBS"
8046 LIBS="-lbe -lroot -lnet $LIBS"
8047 cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050 /* Override any gcc2 internal prototype to avoid an error.  */
8051 /* We use char because int might match the return type of a gcc2
8052     builtin and then its argument prototype would still apply.  */
8053 char be_app();
8054
8055 int main() {
8056 be_app()
8057 ; return 0; }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8060   rm -rf conftest*
8061   eval "ac_cv_lib_$ac_lib_var=yes"
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -rf conftest*
8066   eval "ac_cv_lib_$ac_lib_var=no"
8067 fi
8068 rm -f conftest*
8069 LIBS="$ac_save_LIBS"
8070
8071 fi
8072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8073   echo "$ac_t""yes" 1>&6
8074   LIBS="$LIBS -lbe -lroot -lnet"
8075 else
8076   echo "$ac_t""no" 1>&6
8077 :
8078 fi
8079
8080
8081
8082
8083
8084 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8085 echo "configure:8086: checking for ${CC-cc} option to accept ANSI C" >&5
8086 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8087   echo $ac_n "(cached) $ac_c" 1>&6
8088 else
8089   am_cv_prog_cc_stdc=no
8090 ac_save_CC="$CC"
8091 # Don't try gcc -ansi; that turns off useful extensions and
8092 # breaks some systems' header files.
8093 # AIX                   -qlanglvl=ansi
8094 # Ultrix and OSF/1      -std1
8095 # HP-UX 10.20 and later -Ae
8096 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8097 # SVR4                  -Xc -D__EXTENSIONS__
8098 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8099 do
8100   CC="$ac_save_CC $ac_arg"
8101   cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 #include <stdarg.h>
8105 #include <stdio.h>
8106 #include <sys/types.h>
8107 #include <sys/stat.h>
8108 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8109 struct buf { int x; };
8110 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8111 static char *e (p, i)
8112      char **p;
8113      int i;
8114 {
8115   return p[i];
8116 }
8117 static char *f (char * (*g) (char **, int), char **p, ...)
8118 {
8119   char *s;
8120   va_list v;
8121   va_start (v,p);
8122   s = g (p, va_arg (v,int));
8123   va_end (v);
8124   return s;
8125 }
8126 int test (int i, double x);
8127 struct s1 {int (*f) (int a);};
8128 struct s2 {int (*f) (double a);};
8129 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8130 int argc;
8131 char **argv;
8132
8133 int main() {
8134
8135 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8136
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8140   rm -rf conftest*
8141   am_cv_prog_cc_stdc="$ac_arg"; break
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145 fi
8146 rm -f conftest*
8147 done
8148 CC="$ac_save_CC"
8149
8150 fi
8151
8152 if test -z "$am_cv_prog_cc_stdc"; then
8153   echo "$ac_t""none needed" 1>&6
8154 else
8155   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8156 fi
8157 case "x$am_cv_prog_cc_stdc" in
8158   x|xno) ;;
8159   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8160 esac
8161
8162 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8163         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8164 fi
8165
8166 # test for make depend flag
8167 OL_MKDEP=
8168 OL_MKDEP_FLAGS=
8169 if test -z "${MKDEP}"; then
8170         OL_MKDEP="${CC-cc}"
8171         if test -z "${MKDEP_FLAGS}"; then
8172                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8173 echo "configure:8174: checking for ${OL_MKDEP} depend flag" >&5
8174 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8175   echo $ac_n "(cached) $ac_c" 1>&6
8176 else
8177   
8178                         ol_cv_mkdep=no
8179                         for flag in "-M" "-xM"; do
8180                                 cat > conftest.c <<EOF
8181  noCode;
8182 EOF
8183                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8184                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8185                                 then
8186                                         if test ! -f conftest."${ac_object}" ; then
8187                                                 ol_cv_mkdep=$flag
8188                                                 OL_MKDEP_FLAGS="$flag"
8189                                                 break
8190                                         fi
8191                                 fi
8192                         done
8193                         rm -f conftest*
8194                 
8195 fi
8196
8197 echo "$ac_t""$ol_cv_mkdep" 1>&6
8198         else
8199                 cc_cv_mkdep=yes
8200                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8201         fi
8202 else
8203         cc_cv_mkdep=yes
8204         OL_MKDEP="${MKDEP}"
8205         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8206 fi
8207
8208
8209
8210 if test "${ol_cv_mkdep}" = no ; then
8211         # this will soon become an error
8212         echo "configure: warning: do not know how to generate dependencies" 1>&2
8213 fi
8214
8215 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8216 echo "configure:8217: checking for afopen in -ls" >&5
8217 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8219   echo $ac_n "(cached) $ac_c" 1>&6
8220 else
8221   ac_save_LIBS="$LIBS"
8222 LIBS="-ls  $LIBS"
8223 cat > conftest.$ac_ext <<EOF
8224 #line 8225 "configure"
8225 #include "confdefs.h"
8226 /* Override any gcc2 internal prototype to avoid an error.  */
8227 /* We use char because int might match the return type of a gcc2
8228     builtin and then its argument prototype would still apply.  */
8229 char afopen();
8230
8231 int main() {
8232 afopen()
8233 ; return 0; }
8234 EOF
8235 if { (eval echo configure:8236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8236   rm -rf conftest*
8237   eval "ac_cv_lib_$ac_lib_var=yes"
8238 else
8239   echo "configure: failed program was:" >&5
8240   cat conftest.$ac_ext >&5
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=no"
8243 fi
8244 rm -f conftest*
8245 LIBS="$ac_save_LIBS"
8246
8247 fi
8248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8249   echo "$ac_t""yes" 1>&6
8250   
8251         AUTH_LIBS=-ls
8252         cat >> confdefs.h <<\EOF
8253 #define HAVE_AIX_SECURITY 1
8254 EOF
8255
8256
8257 else
8258   echo "$ac_t""no" 1>&6
8259 fi
8260
8261
8262 case "$target" in
8263 *-ibm-openedition)
8264         ac_cv_func_getopt=no
8265         cat >> confdefs.h <<\EOF
8266 #define BOTH_STRINGS_H 1
8267 EOF
8268
8269         ;;
8270 esac
8271
8272 ol_link_modules=no
8273 if test $ol_enable_modules != no ; then
8274         for ac_hdr in ltdl.h
8275 do
8276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8278 echo "configure:8279: checking for $ac_hdr" >&5
8279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8280   echo $ac_n "(cached) $ac_c" 1>&6
8281 else
8282   cat > conftest.$ac_ext <<EOF
8283 #line 8284 "configure"
8284 #include "confdefs.h"
8285 #include <$ac_hdr>
8286 EOF
8287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8288 { (eval echo configure:8289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8290 if test -z "$ac_err"; then
8291   rm -rf conftest*
8292   eval "ac_cv_header_$ac_safe=yes"
8293 else
8294   echo "$ac_err" >&5
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -rf conftest*
8298   eval "ac_cv_header_$ac_safe=no"
8299 fi
8300 rm -f conftest*
8301 fi
8302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8303   echo "$ac_t""yes" 1>&6
8304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8305   cat >> confdefs.h <<EOF
8306 #define $ac_tr_hdr 1
8307 EOF
8308  
8309 else
8310   echo "$ac_t""no" 1>&6
8311 fi
8312 done
8313
8314
8315         if test $ac_cv_header_ltdl_h = no ; then
8316                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8317         fi
8318
8319         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8320 echo "configure:8321: checking for lt_dlinit in -lltdl" >&5
8321 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   ac_save_LIBS="$LIBS"
8326 LIBS="-lltdl  $LIBS"
8327 cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 /* Override any gcc2 internal prototype to avoid an error.  */
8331 /* We use char because int might match the return type of a gcc2
8332     builtin and then its argument prototype would still apply.  */
8333 char lt_dlinit();
8334
8335 int main() {
8336 lt_dlinit()
8337 ; return 0; }
8338 EOF
8339 if { (eval echo configure:8340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=yes"
8342 else
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_lib_$ac_lib_var=no"
8347 fi
8348 rm -f conftest*
8349 LIBS="$ac_save_LIBS"
8350
8351 fi
8352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8353   echo "$ac_t""yes" 1>&6
8354   
8355                 MODULES_LIBS=-lltdl
8356                 cat >> confdefs.h <<\EOF
8357 #define HAVE_LIBLTDL 1
8358 EOF
8359
8360         
8361 else
8362   echo "$ac_t""no" 1>&6
8363 fi
8364
8365
8366         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8367                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8368         fi
8369         ol_link_modules=yes
8370 else
8371         ol_with_bdb_module=static
8372         ol_with_dnssrv_module=static
8373         ol_with_hdb_module=static
8374         ol_with_ldap_module=static
8375         ol_with_ldbm_module=static
8376         ol_with_meta_module=static
8377         ol_with_monitor_module=static
8378         ol_with_null_module=static
8379         ol_with_passwd_module=static
8380         ol_with_perl_module=static
8381         ol_with_shell_module=static
8382         ol_with_sql_module=static
8383 fi
8384
8385 # test for EBCDIC
8386 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8387 echo "configure:8388: checking for EBCDIC" >&5
8388 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8389   echo $ac_n "(cached) $ac_c" 1>&6
8390 else
8391   
8392         cat > conftest.$ac_ext <<EOF
8393 #line 8394 "configure"
8394 #include "confdefs.h"
8395
8396 #if !('M' == 0xd4)
8397 #include <__ASCII__/generate_error.h>
8398 #endif
8399
8400 EOF
8401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8402 { (eval echo configure:8403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8404 if test -z "$ac_err"; then
8405   rm -rf conftest*
8406   ol_cv_cpp_ebcdic=yes
8407 else
8408   echo "$ac_err" >&5
8409   echo "configure: failed program was:" >&5
8410   cat conftest.$ac_ext >&5
8411   rm -rf conftest*
8412   ol_cv_cpp_ebcdic=no
8413 fi
8414 rm -f conftest*
8415 fi
8416
8417 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8418 if test $ol_cv_cpp_ebcdic = yes ; then
8419         cat >> confdefs.h <<\EOF
8420 #define HAVE_EBCDIC 1
8421 EOF
8422
8423 fi
8424
8425 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8426 echo "configure:8427: checking for ANSI C header files" >&5
8427 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8428   echo $ac_n "(cached) $ac_c" 1>&6
8429 else
8430   cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433 #include <stdlib.h>
8434 #include <stdarg.h>
8435 #include <string.h>
8436 #include <float.h>
8437 EOF
8438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8439 { (eval echo configure:8440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8441 if test -z "$ac_err"; then
8442   rm -rf conftest*
8443   ol_cv_header_stdc=yes
8444 else
8445   echo "$ac_err" >&5
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   ol_cv_header_stdc=no
8450 fi
8451 rm -f conftest*
8452
8453 if test $ol_cv_header_stdc = yes; then
8454   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8458 #include <string.h>
8459 EOF
8460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8461   egrep "memchr" >/dev/null 2>&1; then
8462   :
8463 else
8464   rm -rf conftest*
8465   ol_cv_header_stdc=no
8466 fi
8467 rm -f conftest*
8468
8469 fi
8470
8471 if test $ol_cv_header_stdc = yes; then
8472   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8473 cat > conftest.$ac_ext <<EOF
8474 #line 8475 "configure"
8475 #include "confdefs.h"
8476 #include <stdlib.h>
8477 EOF
8478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8479   egrep "free" >/dev/null 2>&1; then
8480   :
8481 else
8482   rm -rf conftest*
8483   ol_cv_header_stdc=no
8484 fi
8485 rm -f conftest*
8486
8487 fi
8488
8489 if test $ol_cv_header_stdc = yes; then
8490   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8491 if test "$cross_compiling" = yes; then
8492   :
8493 else
8494   cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497 #include <ctype.h>
8498 #ifndef HAVE_EBCDIC
8499 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8500 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8501 #else
8502 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8503                 || ('j' <= (c) && (c) <= 'r') \
8504                 || ('s' <= (c) && (c) <= 'z'))
8505 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8506 #endif
8507 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8508 int main () { int i; for (i = 0; i < 256; i++)
8509 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8510 exit (0); }
8511
8512 EOF
8513 if { (eval echo configure:8514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8514 then
8515   :
8516 else
8517   echo "configure: failed program was:" >&5
8518   cat conftest.$ac_ext >&5
8519   rm -fr conftest*
8520   ol_cv_header_stdc=no
8521 fi
8522 rm -fr conftest*
8523 fi
8524
8525 fi
8526 fi
8527
8528 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8529 if test $ol_cv_header_stdc = yes; then
8530   cat >> confdefs.h <<\EOF
8531 #define STDC_HEADERS 1
8532 EOF
8533
8534 fi
8535 ac_cv_header_stdc=disable
8536
8537
8538 if test $ol_cv_header_stdc != yes; then
8539         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8540 fi
8541
8542 ac_header_dirent=no
8543 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8544 do
8545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8546 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8547 echo "configure:8548: checking for $ac_hdr that defines DIR" >&5
8548 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8549   echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <sys/types.h>
8555 #include <$ac_hdr>
8556 int main() {
8557 DIR *dirp = 0;
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8561   rm -rf conftest*
8562   eval "ac_cv_header_dirent_$ac_safe=yes"
8563 else
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   eval "ac_cv_header_dirent_$ac_safe=no"
8568 fi
8569 rm -f conftest*
8570 fi
8571 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8572   echo "$ac_t""yes" 1>&6
8573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8574   cat >> confdefs.h <<EOF
8575 #define $ac_tr_hdr 1
8576 EOF
8577  ac_header_dirent=$ac_hdr; break
8578 else
8579   echo "$ac_t""no" 1>&6
8580 fi
8581 done
8582 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8583 if test $ac_header_dirent = dirent.h; then
8584 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8585 echo "configure:8586: checking for opendir in -ldir" >&5
8586 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8588   echo $ac_n "(cached) $ac_c" 1>&6
8589 else
8590   ac_save_LIBS="$LIBS"
8591 LIBS="-ldir  $LIBS"
8592 cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 /* Override any gcc2 internal prototype to avoid an error.  */
8596 /* We use char because int might match the return type of a gcc2
8597     builtin and then its argument prototype would still apply.  */
8598 char opendir();
8599
8600 int main() {
8601 opendir()
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8605   rm -rf conftest*
8606   eval "ac_cv_lib_$ac_lib_var=yes"
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   eval "ac_cv_lib_$ac_lib_var=no"
8612 fi
8613 rm -f conftest*
8614 LIBS="$ac_save_LIBS"
8615
8616 fi
8617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8618   echo "$ac_t""yes" 1>&6
8619   LIBS="$LIBS -ldir"
8620 else
8621   echo "$ac_t""no" 1>&6
8622 fi
8623
8624 else
8625 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8626 echo "configure:8627: checking for opendir in -lx" >&5
8627 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   ac_save_LIBS="$LIBS"
8632 LIBS="-lx  $LIBS"
8633 cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* Override any gcc2 internal prototype to avoid an error.  */
8637 /* We use char because int might match the return type of a gcc2
8638     builtin and then its argument prototype would still apply.  */
8639 char opendir();
8640
8641 int main() {
8642 opendir()
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=no"
8653 fi
8654 rm -f conftest*
8655 LIBS="$ac_save_LIBS"
8656
8657 fi
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   LIBS="$LIBS -lx"
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 fi
8666
8667 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8668 echo "configure:8669: checking for sys/wait.h that is POSIX.1 compatible" >&5
8669 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   cat > conftest.$ac_ext <<EOF
8673 #line 8674 "configure"
8674 #include "confdefs.h"
8675 #include <sys/types.h>
8676 #include <sys/wait.h>
8677 #ifndef WEXITSTATUS
8678 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8679 #endif
8680 #ifndef WIFEXITED
8681 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8682 #endif
8683 int main() {
8684 int s;
8685 wait (&s);
8686 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8687 ; return 0; }
8688 EOF
8689 if { (eval echo configure:8690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8690   rm -rf conftest*
8691   ac_cv_header_sys_wait_h=yes
8692 else
8693   echo "configure: failed program was:" >&5
8694   cat conftest.$ac_ext >&5
8695   rm -rf conftest*
8696   ac_cv_header_sys_wait_h=no
8697 fi
8698 rm -f conftest*
8699 fi
8700
8701 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8702 if test $ac_cv_header_sys_wait_h = yes; then
8703   cat >> confdefs.h <<\EOF
8704 #define HAVE_SYS_WAIT_H 1
8705 EOF
8706
8707 fi
8708
8709 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8710 echo "configure:8711: checking POSIX termios" >&5
8711 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8712   echo $ac_n "(cached) $ac_c" 1>&6
8713 else
8714   cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 #include <sys/types.h>
8718 #include <unistd.h>
8719 #include <termios.h>
8720 int main() {
8721 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8722    tcgetattr(0, 0);
8723 ; return 0; }
8724 EOF
8725 if { (eval echo configure:8726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8726   rm -rf conftest*
8727   am_cv_sys_posix_termios=yes
8728 else
8729   echo "configure: failed program was:" >&5
8730   cat conftest.$ac_ext >&5
8731   rm -rf conftest*
8732   am_cv_sys_posix_termios=no
8733 fi
8734 rm -f conftest*
8735 fi
8736
8737 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8738
8739
8740  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8741 echo "configure:8742: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8742 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8743   echo $ac_n "(cached) $ac_c" 1>&6
8744 else
8745   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8746
8747   gwinsz_in_termios_h=no
8748   if test $am_cv_sys_posix_termios = yes; then
8749     cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 #include <sys/types.h>
8753 #     include <termios.h>
8754 #     ifdef TIOCGWINSZ
8755         yes
8756 #     endif
8757     
8758 EOF
8759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8760   egrep "yes" >/dev/null 2>&1; then
8761   rm -rf conftest*
8762   gwinsz_in_termios_h=yes
8763 fi
8764 rm -f conftest*
8765
8766   fi
8767
8768   if test $gwinsz_in_termios_h = no; then
8769     cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 #include <sys/types.h>
8773 #     include <sys/ioctl.h>
8774 #     ifdef TIOCGWINSZ
8775         yes
8776 #     endif
8777     
8778 EOF
8779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8780   egrep "yes" >/dev/null 2>&1; then
8781   rm -rf conftest*
8782   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8783 fi
8784 rm -f conftest*
8785
8786   fi
8787   
8788 fi
8789
8790 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8791   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8792     cat >> confdefs.h <<\EOF
8793 #define GWINSZ_IN_SYS_IOCTL 1
8794 EOF
8795
8796   fi
8797
8798 if test $am_cv_sys_posix_termios = yes ; then
8799         cat >> confdefs.h <<\EOF
8800 #define HAVE_POSIX_TERMIOS 1
8801 EOF
8802
8803 fi
8804
8805 for ac_hdr in \
8806         arpa/inet.h             \
8807         arpa/nameser.h  \
8808         assert.h                \
8809         conio.h                 \
8810         crypt.h                 \
8811         direct.h                \
8812         errno.h                 \
8813         fcntl.h                 \
8814         filio.h                 \
8815         getopt.h                \
8816         grp.h                   \
8817         io.h                    \
8818         libutil.h               \
8819         limits.h                \
8820         locale.h                \
8821         netinet/tcp.h   \
8822         malloc.h                \
8823         memory.h                \
8824         psap.h                  \
8825         pwd.h                   \
8826         process.h               \
8827         resolv.h                \
8828         sgtty.h                 \
8829         shadow.h                \
8830         stddef.h                \
8831         string.h                \
8832         strings.h               \
8833         sysexits.h              \
8834         sys/file.h              \
8835         sys/filio.h             \
8836         sys/errno.h             \
8837         sys/ioctl.h             \
8838         sys/param.h             \
8839         sys/resource.h  \
8840         sys/select.h    \
8841         sys/socket.h    \
8842         sys/stat.h              \
8843         sys/syslog.h    \
8844         sys/time.h              \
8845         sys/types.h             \
8846         sys/ucred.h             \
8847         sys/uio.h               \
8848         syslog.h                \
8849         termios.h               \
8850         unistd.h                \
8851         winsock.h               \
8852         winsock2.h              \
8853
8854 do
8855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8857 echo "configure:8858: checking for $ac_hdr" >&5
8858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8859   echo $ac_n "(cached) $ac_c" 1>&6
8860 else
8861   cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <$ac_hdr>
8865 EOF
8866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8867 { (eval echo configure:8868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8869 if test -z "$ac_err"; then
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=yes"
8872 else
8873   echo "$ac_err" >&5
8874   echo "configure: failed program was:" >&5
8875   cat conftest.$ac_ext >&5
8876   rm -rf conftest*
8877   eval "ac_cv_header_$ac_safe=no"
8878 fi
8879 rm -f conftest*
8880 fi
8881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8882   echo "$ac_t""yes" 1>&6
8883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8884   cat >> confdefs.h <<EOF
8885 #define $ac_tr_hdr 1
8886 EOF
8887  
8888 else
8889   echo "$ac_t""no" 1>&6
8890 fi
8891 done
8892
8893
8894
8895
8896 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8897 echo "configure:8898: checking for dlopen" >&5
8898 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8899   echo $ac_n "(cached) $ac_c" 1>&6
8900 else
8901   cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 /* System header to define __stub macros and hopefully few prototypes,
8905     which can conflict with char dlopen(); below.  */
8906 #include <assert.h>
8907 /* Override any gcc2 internal prototype to avoid an error.  */
8908 /* We use char because int might match the return type of a gcc2
8909     builtin and then its argument prototype would still apply.  */
8910 char dlopen();
8911 char (*f)();
8912
8913 int main() {
8914
8915 /* The GNU C library defines this for functions which it implements
8916     to always fail with ENOSYS.  Some functions are actually named
8917     something starting with __ and the normal name is an alias.  */
8918 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8919 choke me
8920 #else
8921 f = dlopen;
8922 #endif
8923
8924 ; return 0; }
8925 EOF
8926 if { (eval echo configure:8927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8927   rm -rf conftest*
8928   eval "ac_cv_func_dlopen=yes"
8929 else
8930   echo "configure: failed program was:" >&5
8931   cat conftest.$ac_ext >&5
8932   rm -rf conftest*
8933   eval "ac_cv_func_dlopen=no"
8934 fi
8935 rm -f conftest*
8936 fi
8937
8938 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8939   echo "$ac_t""yes" 1>&6
8940   :
8941 else
8942   echo "$ac_t""no" 1>&6
8943 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8944 echo "configure:8945: checking for dlopen in -ldl" >&5
8945 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8946 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8947   echo $ac_n "(cached) $ac_c" 1>&6
8948 else
8949   ac_save_LIBS="$LIBS"
8950 LIBS="-ldl  $LIBS"
8951 cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* Override any gcc2 internal prototype to avoid an error.  */
8955 /* We use char because int might match the return type of a gcc2
8956     builtin and then its argument prototype would still apply.  */
8957 char dlopen();
8958
8959 int main() {
8960 dlopen()
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964   rm -rf conftest*
8965   eval "ac_cv_lib_$ac_lib_var=yes"
8966 else
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_lib_$ac_lib_var=no"
8971 fi
8972 rm -f conftest*
8973 LIBS="$ac_save_LIBS"
8974
8975 fi
8976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8979     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8980   cat >> confdefs.h <<EOF
8981 #define $ac_tr_lib 1
8982 EOF
8983
8984   LIBS="-ldl $LIBS"
8985
8986 else
8987   echo "$ac_t""no" 1>&6
8988 fi
8989
8990 fi
8991
8992
8993 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8994 echo "configure:8995: checking for sigset in -lV3" >&5
8995 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8997   echo $ac_n "(cached) $ac_c" 1>&6
8998 else
8999   ac_save_LIBS="$LIBS"
9000 LIBS="-lV3  $LIBS"
9001 cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 /* Override any gcc2 internal prototype to avoid an error.  */
9005 /* We use char because int might match the return type of a gcc2
9006     builtin and then its argument prototype would still apply.  */
9007 char sigset();
9008
9009 int main() {
9010 sigset()
9011 ; return 0; }
9012 EOF
9013 if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9014   rm -rf conftest*
9015   eval "ac_cv_lib_$ac_lib_var=yes"
9016 else
9017   echo "configure: failed program was:" >&5
9018   cat conftest.$ac_ext >&5
9019   rm -rf conftest*
9020   eval "ac_cv_lib_$ac_lib_var=no"
9021 fi
9022 rm -f conftest*
9023 LIBS="$ac_save_LIBS"
9024
9025 fi
9026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9027   echo "$ac_t""yes" 1>&6
9028     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9029     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9030   cat >> confdefs.h <<EOF
9031 #define $ac_tr_lib 1
9032 EOF
9033
9034   LIBS="-lV3 $LIBS"
9035
9036 else
9037   echo "$ac_t""no" 1>&6
9038 fi
9039
9040
9041 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9042 echo "configure:9043: checking for winsock" >&5
9043 save_LIBS="$LIBS"
9044 for curlib in ws2_32 wsock32; do
9045         LIBS="$LIBS -l$curlib"
9046         cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049
9050                         char socket@12();
9051                         char select@20();
9052                         char closesocket@4();
9053                         char gethostname@8();
9054                         
9055 int main() {
9056
9057                         socket@12();
9058                         select@20();
9059                         closesocket@4();
9060                         gethostname@8();
9061                         
9062 ; return 0; }
9063 EOF
9064 if { (eval echo configure:9065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9065   rm -rf conftest*
9066   have_winsock=yes
9067 else
9068   echo "configure: failed program was:" >&5
9069   cat conftest.$ac_ext >&5
9070   rm -rf conftest*
9071   have_winsock=no
9072 fi
9073 rm -f conftest*
9074
9075         if test $have_winsock = yes; then
9076                 cat >> confdefs.h <<\EOF
9077 #define HAVE_WINSOCK 1
9078 EOF
9079
9080                 ac_cv_func_socket=yes
9081                 ac_cv_func_select=yes
9082                 ac_cv_func_closesocket=yes
9083                 ac_cv_func_gethostname=yes
9084                 if test $curlib = ws2_32; then
9085                         have_winsock=winsock2
9086                         cat >> confdefs.h <<\EOF
9087 #define HAVE_WINSOCK2 1
9088 EOF
9089
9090                 fi
9091                 break
9092         fi
9093         LIBS="$save_LIBS"
9094 done
9095 echo "$ac_t""$have_winsock" 1>&6
9096
9097
9098 echo $ac_n "checking for socket""... $ac_c" 1>&6
9099 echo "configure:9100: checking for socket" >&5
9100 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9101   echo $ac_n "(cached) $ac_c" 1>&6
9102 else
9103   cat > conftest.$ac_ext <<EOF
9104 #line 9105 "configure"
9105 #include "confdefs.h"
9106 /* System header to define __stub macros and hopefully few prototypes,
9107     which can conflict with char socket(); below.  */
9108 #include <assert.h>
9109 /* Override any gcc2 internal prototype to avoid an error.  */
9110 /* We use char because int might match the return type of a gcc2
9111     builtin and then its argument prototype would still apply.  */
9112 char socket();
9113 char (*f)();
9114
9115 int main() {
9116
9117 /* The GNU C library defines this for functions which it implements
9118     to always fail with ENOSYS.  Some functions are actually named
9119     something starting with __ and the normal name is an alias.  */
9120 #if defined (__stub_socket) || defined (__stub___socket)
9121 choke me
9122 #else
9123 f = socket;
9124 #endif
9125
9126 ; return 0; }
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9129   rm -rf conftest*
9130   eval "ac_cv_func_socket=yes"
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_func_socket=no"
9136 fi
9137 rm -f conftest*
9138 fi
9139
9140 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9141   echo "$ac_t""yes" 1>&6
9142   :
9143 else
9144   echo "$ac_t""no" 1>&6
9145         
9146         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9147 echo "configure:9148: checking for main in -lsocket" >&5
9148 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9150   echo $ac_n "(cached) $ac_c" 1>&6
9151 else
9152   ac_save_LIBS="$LIBS"
9153 LIBS="-lsocket  $LIBS"
9154 cat > conftest.$ac_ext <<EOF
9155 #line 9156 "configure"
9156 #include "confdefs.h"
9157
9158 int main() {
9159 main()
9160 ; return 0; }
9161 EOF
9162 if { (eval echo configure:9163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9163   rm -rf conftest*
9164   eval "ac_cv_lib_$ac_lib_var=yes"
9165 else
9166   echo "configure: failed program was:" >&5
9167   cat conftest.$ac_ext >&5
9168   rm -rf conftest*
9169   eval "ac_cv_lib_$ac_lib_var=no"
9170 fi
9171 rm -f conftest*
9172 LIBS="$ac_save_LIBS"
9173
9174 fi
9175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9176   echo "$ac_t""yes" 1>&6
9177     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9178     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9179   cat >> confdefs.h <<EOF
9180 #define $ac_tr_lib 1
9181 EOF
9182
9183   LIBS="-lsocket $LIBS"
9184
9185 else
9186   echo "$ac_t""no" 1>&6
9187 fi
9188
9189         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9190 echo "configure:9191: checking for main in -lnet" >&5
9191 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9193   echo $ac_n "(cached) $ac_c" 1>&6
9194 else
9195   ac_save_LIBS="$LIBS"
9196 LIBS="-lnet  $LIBS"
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200
9201 int main() {
9202 main()
9203 ; return 0; }
9204 EOF
9205 if { (eval echo configure:9206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=yes"
9208 else
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   eval "ac_cv_lib_$ac_lib_var=no"
9213 fi
9214 rm -f conftest*
9215 LIBS="$ac_save_LIBS"
9216
9217 fi
9218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9219   echo "$ac_t""yes" 1>&6
9220     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9221     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9222   cat >> confdefs.h <<EOF
9223 #define $ac_tr_lib 1
9224 EOF
9225
9226   LIBS="-lnet $LIBS"
9227
9228 else
9229   echo "$ac_t""no" 1>&6
9230 fi
9231
9232         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9233 echo "configure:9234: checking for main in -lnsl_s" >&5
9234 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   ac_save_LIBS="$LIBS"
9239 LIBS="-lnsl_s  $LIBS"
9240 cat > conftest.$ac_ext <<EOF
9241 #line 9242 "configure"
9242 #include "confdefs.h"
9243
9244 int main() {
9245 main()
9246 ; return 0; }
9247 EOF
9248 if { (eval echo configure:9249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=yes"
9251 else
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=no"
9256 fi
9257 rm -f conftest*
9258 LIBS="$ac_save_LIBS"
9259
9260 fi
9261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9262   echo "$ac_t""yes" 1>&6
9263     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9264     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9265   cat >> confdefs.h <<EOF
9266 #define $ac_tr_lib 1
9267 EOF
9268
9269   LIBS="-lnsl_s $LIBS"
9270
9271 else
9272   echo "$ac_t""no" 1>&6
9273 fi
9274
9275         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9276 echo "configure:9277: checking for main in -lnsl" >&5
9277 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   ac_save_LIBS="$LIBS"
9282 LIBS="-lnsl  $LIBS"
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286
9287 int main() {
9288 main()
9289 ; return 0; }
9290 EOF
9291 if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=yes"
9294 else
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297   rm -rf conftest*
9298   eval "ac_cv_lib_$ac_lib_var=no"
9299 fi
9300 rm -f conftest*
9301 LIBS="$ac_save_LIBS"
9302
9303 fi
9304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9305   echo "$ac_t""yes" 1>&6
9306     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9308   cat >> confdefs.h <<EOF
9309 #define $ac_tr_lib 1
9310 EOF
9311
9312   LIBS="-lnsl $LIBS"
9313
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9319 echo "configure:9320: checking for socket in -linet" >&5
9320 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   ac_save_LIBS="$LIBS"
9325 LIBS="-linet  $LIBS"
9326 cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329 /* Override any gcc2 internal prototype to avoid an error.  */
9330 /* We use char because int might match the return type of a gcc2
9331     builtin and then its argument prototype would still apply.  */
9332 char socket();
9333
9334 int main() {
9335 socket()
9336 ; return 0; }
9337 EOF
9338 if { (eval echo configure:9339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9339   rm -rf conftest*
9340   eval "ac_cv_lib_$ac_lib_var=yes"
9341 else
9342   echo "configure: failed program was:" >&5
9343   cat conftest.$ac_ext >&5
9344   rm -rf conftest*
9345   eval "ac_cv_lib_$ac_lib_var=no"
9346 fi
9347 rm -f conftest*
9348 LIBS="$ac_save_LIBS"
9349
9350 fi
9351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9352   echo "$ac_t""yes" 1>&6
9353     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9354     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9355   cat >> confdefs.h <<EOF
9356 #define $ac_tr_lib 1
9357 EOF
9358
9359   LIBS="-linet $LIBS"
9360
9361 else
9362   echo "$ac_t""no" 1>&6
9363 fi
9364
9365         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9366 echo "configure:9367: checking for main in -lgen" >&5
9367 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9369   echo $ac_n "(cached) $ac_c" 1>&6
9370 else
9371   ac_save_LIBS="$LIBS"
9372 LIBS="-lgen  $LIBS"
9373 cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376
9377 int main() {
9378 main()
9379 ; return 0; }
9380 EOF
9381 if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=yes"
9384 else
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=no"
9389 fi
9390 rm -f conftest*
9391 LIBS="$ac_save_LIBS"
9392
9393 fi
9394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9397     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9398   cat >> confdefs.h <<EOF
9399 #define $ac_tr_lib 1
9400 EOF
9401
9402   LIBS="-lgen $LIBS"
9403
9404 else
9405   echo "$ac_t""no" 1>&6
9406 fi
9407
9408
9409 fi
9410
9411
9412 echo $ac_n "checking for select""... $ac_c" 1>&6
9413 echo "configure:9414: checking for select" >&5
9414 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9415   echo $ac_n "(cached) $ac_c" 1>&6
9416 else
9417   cat > conftest.$ac_ext <<EOF
9418 #line 9419 "configure"
9419 #include "confdefs.h"
9420 /* System header to define __stub macros and hopefully few prototypes,
9421     which can conflict with char select(); below.  */
9422 #include <assert.h>
9423 /* Override any gcc2 internal prototype to avoid an error.  */
9424 /* We use char because int might match the return type of a gcc2
9425     builtin and then its argument prototype would still apply.  */
9426 char select();
9427 char (*f)();
9428
9429 int main() {
9430
9431 /* The GNU C library defines this for functions which it implements
9432     to always fail with ENOSYS.  Some functions are actually named
9433     something starting with __ and the normal name is an alias.  */
9434 #if defined (__stub_select) || defined (__stub___select)
9435 choke me
9436 #else
9437 f = select;
9438 #endif
9439
9440 ; return 0; }
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9443   rm -rf conftest*
9444   eval "ac_cv_func_select=yes"
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -rf conftest*
9449   eval "ac_cv_func_select=no"
9450 fi
9451 rm -f conftest*
9452 fi
9453
9454 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9455   echo "$ac_t""yes" 1>&6
9456   :
9457 else
9458   echo "$ac_t""no" 1>&6
9459 { echo "configure: error: select() required." 1>&2; exit 1; }
9460 fi
9461
9462
9463 if test "${ac_cv_header_winsock_h}" != yes; then
9464                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9465 echo "configure:9466: checking types of arguments for select()" >&5
9466  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9470   echo $ac_n "(cached) $ac_c" 1>&6
9471 else
9472     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9476      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9477       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9478        cat > conftest.$ac_ext <<EOF
9479 #line 9480 "configure"
9480 #include "confdefs.h"
9481 #ifdef HAVE_SYS_TYPES_H
9482 #include <sys/types.h>
9483 #endif
9484 #ifdef HAVE_SYS_TIME_H
9485 #include <sys/time.h>
9486 #endif
9487 #ifdef HAVE_SYS_SELECT_H
9488 #include <sys/select.h>
9489 #endif
9490 #ifdef HAVE_SYS_SOCKET_H
9491 #include <sys/socket.h>
9492 #endif
9493 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);
9494 int main() {
9495
9496 ; return 0; }
9497 EOF
9498 if { (eval echo configure:9499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9499   rm -rf conftest*
9500           ac_not_found=no ; break 3
9501 else
9502   echo "configure: failed program was:" >&5
9503   cat conftest.$ac_ext >&5
9504   rm -rf conftest*
9505   ac_not_found=yes
9506 fi
9507 rm -f conftest*
9508       done
9509      done
9510     done
9511    
9512 fi
9513   
9514 fi
9515  
9516 fi
9517  if test "$ac_not_found" = yes; then
9518   ac_cv_func_select_arg1=int 
9519   ac_cv_func_select_arg234='int *' 
9520   ac_cv_func_select_arg5='struct timeval *'
9521  fi
9522  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9523  cat >> confdefs.h <<EOF
9524 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9525 EOF
9526
9527  cat >> confdefs.h <<EOF
9528 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9529 EOF
9530
9531  cat >> confdefs.h <<EOF
9532 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9533 EOF
9534
9535
9536 fi
9537
9538
9539 for ac_hdr in regex.h 
9540 do
9541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9543 echo "configure:9544: checking for $ac_hdr" >&5
9544 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9545   echo $ac_n "(cached) $ac_c" 1>&6
9546 else
9547   cat > conftest.$ac_ext <<EOF
9548 #line 9549 "configure"
9549 #include "confdefs.h"
9550 #include <$ac_hdr>
9551 EOF
9552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9553 { (eval echo configure:9554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9555 if test -z "$ac_err"; then
9556   rm -rf conftest*
9557   eval "ac_cv_header_$ac_safe=yes"
9558 else
9559   echo "$ac_err" >&5
9560   echo "configure: failed program was:" >&5
9561   cat conftest.$ac_ext >&5
9562   rm -rf conftest*
9563   eval "ac_cv_header_$ac_safe=no"
9564 fi
9565 rm -f conftest*
9566 fi
9567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9568   echo "$ac_t""yes" 1>&6
9569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9570   cat >> confdefs.h <<EOF
9571 #define $ac_tr_hdr 1
9572 EOF
9573  
9574 else
9575   echo "$ac_t""no" 1>&6
9576 fi
9577 done
9578
9579 if test "$ac_cv_header_regex_h" != yes ; then
9580         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9581 fi
9582
9583 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9584 echo "configure:9585: checking for library containing regfree" >&5
9585 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9586   echo $ac_n "(cached) $ac_c" 1>&6
9587 else
9588   ac_func_search_save_LIBS="$LIBS"
9589 ac_cv_search_regfree="no"
9590 cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593 /* Override any gcc2 internal prototype to avoid an error.  */
9594 /* We use char because int might match the return type of a gcc2
9595     builtin and then its argument prototype would still apply.  */
9596 char regfree();
9597
9598 int main() {
9599 regfree()
9600 ; return 0; }
9601 EOF
9602 if { (eval echo configure:9603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9603   rm -rf conftest*
9604   ac_cv_search_regfree="none required"
9605 else
9606   echo "configure: failed program was:" >&5
9607   cat conftest.$ac_ext >&5
9608 fi
9609 rm -f conftest*
9610 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9611 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
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="-l$ac_lib"
9627 break
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631 fi
9632 rm -f conftest*
9633 done
9634 LIBS="$ac_func_search_save_LIBS"
9635 fi
9636
9637 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9638 if test "$ac_cv_search_regfree" != "no"; then
9639   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9640   :
9641 else :
9642   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9643 fi
9644
9645
9646 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9647 echo "configure:9648: checking for compatible POSIX regex" >&5
9648 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9649   echo $ac_n "(cached) $ac_c" 1>&6
9650 else
9651   
9652         if test "$cross_compiling" = yes; then
9653   ol_cv_c_posix_regex=cross
9654 else
9655   cat > conftest.$ac_ext <<EOF
9656 #line 9657 "configure"
9657 #include "confdefs.h"
9658
9659 #include <sys/types.h>
9660 #include <regex.h>
9661 static char *pattern, *string;
9662 main()
9663 {
9664         int rc;
9665         regex_t re;
9666
9667         pattern = "^A";
9668
9669         if(regcomp(&re, pattern, 0)) {
9670                 return -1;
9671         }
9672         
9673         string = "ALL MATCH";
9674         
9675         rc = regexec(&re, string, 0, (void*)0, 0);
9676
9677         regfree(&re);
9678
9679         return rc;
9680 }
9681 EOF
9682 if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9683 then
9684   ol_cv_c_posix_regex=yes
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -fr conftest*
9689   ol_cv_c_posix_regex=no
9690 fi
9691 rm -fr conftest*
9692 fi
9693
9694 fi
9695
9696 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9697
9698 if test "$ol_cv_c_posix_regex" = no ; then
9699         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9700 fi
9701
9702
9703 have_uuid=no
9704 for ac_hdr in sys/uuid.h
9705 do
9706 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9707 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9708 echo "configure:9709: checking for $ac_hdr" >&5
9709 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9710   echo $ac_n "(cached) $ac_c" 1>&6
9711 else
9712   cat > conftest.$ac_ext <<EOF
9713 #line 9714 "configure"
9714 #include "confdefs.h"
9715 #include <$ac_hdr>
9716 EOF
9717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9718 { (eval echo configure:9719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9720 if test -z "$ac_err"; then
9721   rm -rf conftest*
9722   eval "ac_cv_header_$ac_safe=yes"
9723 else
9724   echo "$ac_err" >&5
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -rf conftest*
9728   eval "ac_cv_header_$ac_safe=no"
9729 fi
9730 rm -f conftest*
9731 fi
9732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9733   echo "$ac_t""yes" 1>&6
9734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9735   cat >> confdefs.h <<EOF
9736 #define $ac_tr_hdr 1
9737 EOF
9738  
9739 else
9740   echo "$ac_t""no" 1>&6
9741 fi
9742 done
9743
9744 if test $ac_cv_header_sys_uuid_h = yes ; then
9745         save_LIBS="$LIBS"
9746         
9747 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9748 echo "configure:9749: checking for library containing uuid_to_str" >&5
9749 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9750   echo $ac_n "(cached) $ac_c" 1>&6
9751 else
9752   ac_func_search_save_LIBS="$LIBS"
9753 ac_cv_search_uuid_to_str="no"
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 /* Override any gcc2 internal prototype to avoid an error.  */
9758 /* We use char because int might match the return type of a gcc2
9759     builtin and then its argument prototype would still apply.  */
9760 char uuid_to_str();
9761
9762 int main() {
9763 uuid_to_str()
9764 ; return 0; }
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9767   rm -rf conftest*
9768   ac_cv_search_uuid_to_str="none required"
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772 fi
9773 rm -f conftest*
9774 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9775 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
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="-l$ac_lib"
9791 break
9792 else
9793   echo "configure: failed program was:" >&5
9794   cat conftest.$ac_ext >&5
9795 fi
9796 rm -f conftest*
9797 done
9798 LIBS="$ac_func_search_save_LIBS"
9799 fi
9800
9801 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9802 if test "$ac_cv_search_uuid_to_str" != "no"; then
9803   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9804   have_uuid=yes
9805 else :
9806   :
9807 fi
9808         LIBS="$save_LIBS"
9809
9810         if test have_uuid = yes ; then
9811                 cat >> confdefs.h <<\EOF
9812 #define HAVE_UUID_TO_STR 1
9813 EOF
9814
9815
9816                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9817                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9818         fi
9819 fi
9820
9821 if test $have_uuid = no ; then
9822         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9823 echo "configure:9824: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9824         save_LIBS="$LIBS"
9825         LIBS="$LIBS -lrpcrt4"
9826         cat > conftest.$ac_ext <<EOF
9827 #line 9828 "configure"
9828 #include "confdefs.h"
9829
9830                 char UuidCreate@4();
9831                 char UuidToStringA@8();
9832                 
9833 int main() {
9834
9835                 UuidCreate@4();
9836                 UuidToStringA@8();
9837                 
9838 ; return 0; }
9839 EOF
9840 if { (eval echo configure:9841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9841   rm -rf conftest*
9842   need_rpcrt=yes
9843 else
9844   echo "configure: failed program was:" >&5
9845   cat conftest.$ac_ext >&5
9846   rm -rf conftest*
9847   need_rpcrt=no
9848 fi
9849 rm -f conftest*
9850         if test $need_rpcrt = yes; then
9851                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9852         fi
9853         LIBS="$save_LIBS"
9854         echo "$ac_t""$need_rpcrt" 1>&6
9855 fi
9856
9857 ol_link_dnssrv=no
9858 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9859 echo "configure:9860: checking for res_query" >&5
9860 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9861   echo $ac_n "(cached) $ac_c" 1>&6
9862 else
9863   cat > conftest.$ac_ext <<EOF
9864 #line 9865 "configure"
9865 #include "confdefs.h"
9866 /* System header to define __stub macros and hopefully few prototypes,
9867     which can conflict with char res_query(); below.  */
9868 #include <assert.h>
9869 /* Override any gcc2 internal prototype to avoid an error.  */
9870 /* We use char because int might match the return type of a gcc2
9871     builtin and then its argument prototype would still apply.  */
9872 char res_query();
9873 char (*f)();
9874
9875 int main() {
9876
9877 /* The GNU C library defines this for functions which it implements
9878     to always fail with ENOSYS.  Some functions are actually named
9879     something starting with __ and the normal name is an alias.  */
9880 #if defined (__stub_res_query) || defined (__stub___res_query)
9881 choke me
9882 #else
9883 f = res_query;
9884 #endif
9885
9886 ; return 0; }
9887 EOF
9888 if { (eval echo configure:9889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9889   rm -rf conftest*
9890   eval "ac_cv_func_res_query=yes"
9891 else
9892   echo "configure: failed program was:" >&5
9893   cat conftest.$ac_ext >&5
9894   rm -rf conftest*
9895   eval "ac_cv_func_res_query=no"
9896 fi
9897 rm -f conftest*
9898 fi
9899
9900 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9901   echo "$ac_t""yes" 1>&6
9902   :
9903 else
9904   echo "$ac_t""no" 1>&6
9905 fi
9906
9907 if test $ac_cv_func_res_query = no ; then 
9908         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9909 echo "configure:9910: checking for __res_query" >&5
9910 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9911   echo $ac_n "(cached) $ac_c" 1>&6
9912 else
9913   cat > conftest.$ac_ext <<EOF
9914 #line 9915 "configure"
9915 #include "confdefs.h"
9916 /* System header to define __stub macros and hopefully few prototypes,
9917     which can conflict with char __res_query(); below.  */
9918 #include <assert.h>
9919 /* Override any gcc2 internal prototype to avoid an error.  */
9920 /* We use char because int might match the return type of a gcc2
9921     builtin and then its argument prototype would still apply.  */
9922 char __res_query();
9923 char (*f)();
9924
9925 int main() {
9926
9927 /* The GNU C library defines this for functions which it implements
9928     to always fail with ENOSYS.  Some functions are actually named
9929     something starting with __ and the normal name is an alias.  */
9930 #if defined (__stub___res_query) || defined (__stub_____res_query)
9931 choke me
9932 #else
9933 f = __res_query;
9934 #endif
9935
9936 ; return 0; }
9937 EOF
9938 if { (eval echo configure:9939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9939   rm -rf conftest*
9940   eval "ac_cv_func___res_query=yes"
9941 else
9942   echo "configure: failed program was:" >&5
9943   cat conftest.$ac_ext >&5
9944   rm -rf conftest*
9945   eval "ac_cv_func___res_query=no"
9946 fi
9947 rm -f conftest*
9948 fi
9949
9950 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9951   echo "$ac_t""yes" 1>&6
9952   :
9953 else
9954   echo "$ac_t""no" 1>&6
9955 fi
9956
9957         ac_cv_func_res_query=$ac_cv_func___res_query
9958 fi
9959
9960 if test $ac_cv_func_res_query = no ; then 
9961         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9962 echo "configure:9963: checking for res_query in -lbind" >&5
9963 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   ac_save_LIBS="$LIBS"
9968 LIBS="-lbind  $LIBS"
9969 cat > conftest.$ac_ext <<EOF
9970 #line 9971 "configure"
9971 #include "confdefs.h"
9972 /* Override any gcc2 internal prototype to avoid an error.  */
9973 /* We use char because int might match the return type of a gcc2
9974     builtin and then its argument prototype would still apply.  */
9975 char res_query();
9976
9977 int main() {
9978 res_query()
9979 ; return 0; }
9980 EOF
9981 if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9982   rm -rf conftest*
9983   eval "ac_cv_lib_$ac_lib_var=yes"
9984 else
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -rf conftest*
9988   eval "ac_cv_lib_$ac_lib_var=no"
9989 fi
9990 rm -f conftest*
9991 LIBS="$ac_save_LIBS"
9992
9993 fi
9994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9995   echo "$ac_t""yes" 1>&6
9996     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9998   cat >> confdefs.h <<EOF
9999 #define $ac_tr_lib 1
10000 EOF
10001
10002   LIBS="-lbind $LIBS"
10003
10004 else
10005   echo "$ac_t""no" 1>&6
10006 fi
10007
10008         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10009 fi
10010
10011 if test $ac_cv_func_res_query = no ; then 
10012         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10013 echo "configure:10014: checking for __res_query in -lbind" >&5
10014 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10016   echo $ac_n "(cached) $ac_c" 1>&6
10017 else
10018   ac_save_LIBS="$LIBS"
10019 LIBS="-lbind  $LIBS"
10020 cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023 /* Override any gcc2 internal prototype to avoid an error.  */
10024 /* We use char because int might match the return type of a gcc2
10025     builtin and then its argument prototype would still apply.  */
10026 char __res_query();
10027
10028 int main() {
10029 __res_query()
10030 ; return 0; }
10031 EOF
10032 if { (eval echo configure:10033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10033   rm -rf conftest*
10034   eval "ac_cv_lib_$ac_lib_var=yes"
10035 else
10036   echo "configure: failed program was:" >&5
10037   cat conftest.$ac_ext >&5
10038   rm -rf conftest*
10039   eval "ac_cv_lib_$ac_lib_var=no"
10040 fi
10041 rm -f conftest*
10042 LIBS="$ac_save_LIBS"
10043
10044 fi
10045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10046   echo "$ac_t""yes" 1>&6
10047     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10049   cat >> confdefs.h <<EOF
10050 #define $ac_tr_lib 1
10051 EOF
10052
10053   LIBS="-lbind $LIBS"
10054
10055 else
10056   echo "$ac_t""no" 1>&6
10057 fi
10058
10059         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10060 fi
10061
10062 if test $ac_cv_func_res_query = no ; then 
10063         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10064 echo "configure:10065: checking for res_query in -lresolv" >&5
10065 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10067   echo $ac_n "(cached) $ac_c" 1>&6
10068 else
10069   ac_save_LIBS="$LIBS"
10070 LIBS="-lresolv  $LIBS"
10071 cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10074 /* Override any gcc2 internal prototype to avoid an error.  */
10075 /* We use char because int might match the return type of a gcc2
10076     builtin and then its argument prototype would still apply.  */
10077 char res_query();
10078
10079 int main() {
10080 res_query()
10081 ; return 0; }
10082 EOF
10083 if { (eval echo configure:10084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10084   rm -rf conftest*
10085   eval "ac_cv_lib_$ac_lib_var=yes"
10086 else
10087   echo "configure: failed program was:" >&5
10088   cat conftest.$ac_ext >&5
10089   rm -rf conftest*
10090   eval "ac_cv_lib_$ac_lib_var=no"
10091 fi
10092 rm -f conftest*
10093 LIBS="$ac_save_LIBS"
10094
10095 fi
10096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10097   echo "$ac_t""yes" 1>&6
10098     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10100   cat >> confdefs.h <<EOF
10101 #define $ac_tr_lib 1
10102 EOF
10103
10104   LIBS="-lresolv $LIBS"
10105
10106 else
10107   echo "$ac_t""no" 1>&6
10108 fi
10109
10110         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10111 fi
10112
10113 if test $ac_cv_func_res_query = no ; then 
10114         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10115 echo "configure:10116: checking for __res_query in -lresolv" >&5
10116 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10117 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10118   echo $ac_n "(cached) $ac_c" 1>&6
10119 else
10120   ac_save_LIBS="$LIBS"
10121 LIBS="-lresolv  $LIBS"
10122 cat > conftest.$ac_ext <<EOF
10123 #line 10124 "configure"
10124 #include "confdefs.h"
10125 /* Override any gcc2 internal prototype to avoid an error.  */
10126 /* We use char because int might match the return type of a gcc2
10127     builtin and then its argument prototype would still apply.  */
10128 char __res_query();
10129
10130 int main() {
10131 __res_query()
10132 ; return 0; }
10133 EOF
10134 if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10135   rm -rf conftest*
10136   eval "ac_cv_lib_$ac_lib_var=yes"
10137 else
10138   echo "configure: failed program was:" >&5
10139   cat conftest.$ac_ext >&5
10140   rm -rf conftest*
10141   eval "ac_cv_lib_$ac_lib_var=no"
10142 fi
10143 rm -f conftest*
10144 LIBS="$ac_save_LIBS"
10145
10146 fi
10147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10148   echo "$ac_t""yes" 1>&6
10149     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10151   cat >> confdefs.h <<EOF
10152 #define $ac_tr_lib 1
10153 EOF
10154
10155   LIBS="-lresolv $LIBS"
10156
10157 else
10158   echo "$ac_t""no" 1>&6
10159 fi
10160
10161         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10162 fi
10163
10164 if test "$ac_cv_func_res_query" = yes ; then
10165         cat >> confdefs.h <<\EOF
10166 #define HAVE_RES_QUERY 1
10167 EOF
10168
10169
10170         if test $ol_enable_dnssrv != no ; then
10171                 ol_link_dnssrv=yes
10172         fi
10173 fi
10174
10175 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10176         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10177 fi
10178
10179 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10180 do
10181 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10182 echo "configure:10183: checking for $ac_func" >&5
10183 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10184   echo $ac_n "(cached) $ac_c" 1>&6
10185 else
10186   cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 /* System header to define __stub macros and hopefully few prototypes,
10190     which can conflict with char $ac_func(); below.  */
10191 #include <assert.h>
10192 /* Override any gcc2 internal prototype to avoid an error.  */
10193 /* We use char because int might match the return type of a gcc2
10194     builtin and then its argument prototype would still apply.  */
10195 char $ac_func();
10196 char (*f)();
10197
10198 int main() {
10199
10200 /* The GNU C library defines this for functions which it implements
10201     to always fail with ENOSYS.  Some functions are actually named
10202     something starting with __ and the normal name is an alias.  */
10203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10204 choke me
10205 #else
10206 f = $ac_func;
10207 #endif
10208
10209 ; return 0; }
10210 EOF
10211 if { (eval echo configure:10212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10212   rm -rf conftest*
10213   eval "ac_cv_func_$ac_func=yes"
10214 else
10215   echo "configure: failed program was:" >&5
10216   cat conftest.$ac_ext >&5
10217   rm -rf conftest*
10218   eval "ac_cv_func_$ac_func=no"
10219 fi
10220 rm -f conftest*
10221 fi
10222
10223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10224   echo "$ac_t""yes" 1>&6
10225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10226   cat >> confdefs.h <<EOF
10227 #define $ac_tr_func 1
10228 EOF
10229  
10230 else
10231   echo "$ac_t""no" 1>&6
10232 fi
10233 done
10234
10235
10236 ol_link_ipv6=no
10237 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10238         if test $ol_enable_ipv6 = yes ; then
10239                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10240         fi
10241 elif test $ol_enable_ipv6 != no ; then
10242         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10243 echo "configure:10244: checking INET6_ADDRSTRLEN" >&5
10244 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10245   echo $ac_n "(cached) $ac_c" 1>&6
10246 else
10247   
10248                 cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251
10252 #                       include <netinet/in.h>
10253 #                       ifdef INET6_ADDRSTRLEN
10254                                 __has_inet6_addrstrlen__;
10255 #                       endif
10256                 
10257 EOF
10258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10259   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10260   rm -rf conftest*
10261   ol_cv_inet6_addrstrlen=yes
10262 else
10263   rm -rf conftest*
10264   ol_cv_inet6_addrstrlen=no
10265 fi
10266 rm -f conftest*
10267
10268 fi
10269
10270 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10271
10272
10273         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10274 echo "configure:10275: checking struct sockaddr_storage" >&5
10275 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10276   echo $ac_n "(cached) $ac_c" 1>&6
10277 else
10278   
10279                 cat > conftest.$ac_ext <<EOF
10280 #line 10281 "configure"
10281 #include "confdefs.h"
10282
10283 #include <sys/types.h>
10284 #include <sys/socket.h>
10285
10286 int main() {
10287
10288                         struct sockaddr_storage ss;
10289
10290 ; return 0; }
10291 EOF
10292 if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10293   rm -rf conftest*
10294   ol_cv_struct_sockaddr_storage=yes
10295 else
10296   echo "configure: failed program was:" >&5
10297   cat conftest.$ac_ext >&5
10298   rm -rf conftest*
10299   ol_cv_struct_sockaddr_storage=no
10300 fi
10301 rm -f conftest*
10302 fi
10303
10304 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10305
10306         if test $ol_cv_inet6_addrstrlen = yes \
10307                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10308                 ol_link_ipv6=yes
10309         elif test $ol_enable_ipv6 = yes \
10310                         -a $ol_cv_inet6_addrstrlen = no ; then
10311                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10312         elif test $ol_enable_ipv6 = yes \
10313                         -a $ol_cv_struct_sockaddr_storage = no ; then
10314                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10315         fi
10316 fi
10317
10318 if test $ol_enable_local != no ; then
10319         for ac_hdr in sys/un.h 
10320 do
10321 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10322 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10323 echo "configure:10324: checking for $ac_hdr" >&5
10324 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10325   echo $ac_n "(cached) $ac_c" 1>&6
10326 else
10327   cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 #include <$ac_hdr>
10331 EOF
10332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10333 { (eval echo configure:10334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10335 if test -z "$ac_err"; then
10336   rm -rf conftest*
10337   eval "ac_cv_header_$ac_safe=yes"
10338 else
10339   echo "$ac_err" >&5
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_header_$ac_safe=no"
10344 fi
10345 rm -f conftest*
10346 fi
10347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10348   echo "$ac_t""yes" 1>&6
10349     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10350   cat >> confdefs.h <<EOF
10351 #define $ac_tr_hdr 1
10352 EOF
10353  
10354 else
10355   echo "$ac_t""no" 1>&6
10356 fi
10357 done
10358
10359
10360         if test $ol_enable_local = auto ; then
10361                 ol_enable_local=$ac_cv_header_sys_un_h
10362         elif test $ac_cv_header_sys_un_h = no ; then
10363                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10364         fi
10365 fi
10366
10367 ol_link_kbind=no
10368 ol_link_kpasswd=no
10369 ol_link_krb5=no
10370 ol_link_krb4=no
10371
10372 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10373         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10374         -o $ol_with_kerberos = k425 ; then
10375
10376         for ac_hdr in krb5.h
10377 do
10378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10380 echo "configure:10381: checking for $ac_hdr" >&5
10381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10382   echo $ac_n "(cached) $ac_c" 1>&6
10383 else
10384   cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387 #include <$ac_hdr>
10388 EOF
10389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10390 { (eval echo configure:10391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10392 if test -z "$ac_err"; then
10393   rm -rf conftest*
10394   eval "ac_cv_header_$ac_safe=yes"
10395 else
10396   echo "$ac_err" >&5
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_header_$ac_safe=no"
10401 fi
10402 rm -f conftest*
10403 fi
10404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10405   echo "$ac_t""yes" 1>&6
10406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10407   cat >> confdefs.h <<EOF
10408 #define $ac_tr_hdr 1
10409 EOF
10410  
10411 else
10412   echo "$ac_t""no" 1>&6
10413 fi
10414 done
10415
10416
10417         if test $ac_cv_header_krb5_h = yes ; then
10418                                 for ac_hdr in heim_err.h
10419 do
10420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10422 echo "configure:10423: checking for $ac_hdr" >&5
10423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10424   echo $ac_n "(cached) $ac_c" 1>&6
10425 else
10426   cat > conftest.$ac_ext <<EOF
10427 #line 10428 "configure"
10428 #include "confdefs.h"
10429 #include <$ac_hdr>
10430 EOF
10431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10432 { (eval echo configure:10433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10434 if test -z "$ac_err"; then
10435   rm -rf conftest*
10436   eval "ac_cv_header_$ac_safe=yes"
10437 else
10438   echo "$ac_err" >&5
10439   echo "configure: failed program was:" >&5
10440   cat conftest.$ac_ext >&5
10441   rm -rf conftest*
10442   eval "ac_cv_header_$ac_safe=no"
10443 fi
10444 rm -f conftest*
10445 fi
10446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10447   echo "$ac_t""yes" 1>&6
10448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10449   cat >> confdefs.h <<EOF
10450 #define $ac_tr_hdr 1
10451 EOF
10452  
10453 else
10454   echo "$ac_t""no" 1>&6
10455 fi
10456 done
10457
10458                 if test $ac_cv_header_heim_err_h = yes ; then
10459                         krb5_impl=heimdal
10460                 else
10461                         krb5_impl=mit
10462                 fi
10463
10464                 if test $krb5_impl = mit; then
10465                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10466 echo "configure:10467: checking for main in -lk5crypto" >&5
10467 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10468 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10469   echo $ac_n "(cached) $ac_c" 1>&6
10470 else
10471   ac_save_LIBS="$LIBS"
10472 LIBS="-lk5crypto  $LIBS"
10473 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476
10477 int main() {
10478 main()
10479 ; return 0; }
10480 EOF
10481 if { (eval echo configure:10482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10482   rm -rf conftest*
10483   eval "ac_cv_lib_$ac_lib_var=yes"
10484 else
10485   echo "configure: failed program was:" >&5
10486   cat conftest.$ac_ext >&5
10487   rm -rf conftest*
10488   eval "ac_cv_lib_$ac_lib_var=no"
10489 fi
10490 rm -f conftest*
10491 LIBS="$ac_save_LIBS"
10492
10493 fi
10494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10495   echo "$ac_t""yes" 1>&6
10496   krb5crypto=k5crypto
10497 else
10498   echo "$ac_t""no" 1>&6
10499 krb5crypto=crypto
10500 fi
10501
10502
10503                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10504 echo "configure:10505: checking for main in -lkrb5" >&5
10505 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   ac_save_LIBS="$LIBS"
10510 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10511 cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514
10515 int main() {
10516 main()
10517 ; return 0; }
10518 EOF
10519 if { (eval echo configure:10520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10520   rm -rf conftest*
10521   eval "ac_cv_lib_$ac_lib_var=yes"
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=no"
10527 fi
10528 rm -f conftest*
10529 LIBS="$ac_save_LIBS"
10530
10531 fi
10532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534   have_krb5=yes
10535                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10536 else
10537   echo "$ac_t""no" 1>&6
10538 have_krb5=no
10539 fi
10540
10541
10542                 elif test $krb5_impl = heimdal; then
10543                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10544 echo "configure:10545: checking for main in -ldes" >&5
10545 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10547   echo $ac_n "(cached) $ac_c" 1>&6
10548 else
10549   ac_save_LIBS="$LIBS"
10550 LIBS="-ldes  $LIBS"
10551 cat > conftest.$ac_ext <<EOF
10552 #line 10553 "configure"
10553 #include "confdefs.h"
10554
10555 int main() {
10556 main()
10557 ; return 0; }
10558 EOF
10559 if { (eval echo configure:10560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10560   rm -rf conftest*
10561   eval "ac_cv_lib_$ac_lib_var=yes"
10562 else
10563   echo "configure: failed program was:" >&5
10564   cat conftest.$ac_ext >&5
10565   rm -rf conftest*
10566   eval "ac_cv_lib_$ac_lib_var=no"
10567 fi
10568 rm -f conftest*
10569 LIBS="$ac_save_LIBS"
10570
10571 fi
10572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10573   echo "$ac_t""yes" 1>&6
10574   krb5crypto=des
10575 else
10576   echo "$ac_t""no" 1>&6
10577 krb5crypto=crypto
10578 fi
10579
10580
10581                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10582 echo "configure:10583: checking for main in -lkrb5" >&5
10583 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10585   echo $ac_n "(cached) $ac_c" 1>&6
10586 else
10587   ac_save_LIBS="$LIBS"
10588 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10589 cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592
10593 int main() {
10594 main()
10595 ; return 0; }
10596 EOF
10597 if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10598   rm -rf conftest*
10599   eval "ac_cv_lib_$ac_lib_var=yes"
10600 else
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_lib_$ac_lib_var=no"
10605 fi
10606 rm -f conftest*
10607 LIBS="$ac_save_LIBS"
10608
10609 fi
10610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10611   echo "$ac_t""yes" 1>&6
10612   have_krb5=yes
10613                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10614 else
10615   echo "$ac_t""no" 1>&6
10616 have_krb5=no
10617 fi
10618
10619
10620                         cat >> confdefs.h <<\EOF
10621 #define HAVE_HEIMDAL_KERBEROS 1
10622 EOF
10623
10624
10625                 else
10626                         have_krb5=no
10627                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10628                 fi
10629
10630                 if test $have_krb5 = yes ; then
10631                         ol_link_krb5=yes
10632
10633                         cat >> confdefs.h <<\EOF
10634 #define HAVE_KRB5 1
10635 EOF
10636
10637
10638                         if test $ol_enable_kpasswd != no ; then
10639                                 ol_link_kpasswd=yes;
10640                         fi
10641
10642                         if test $ol_with_kerberos = k5only ; then
10643                                 ol_with_kerberos=found
10644                         fi
10645
10646                 elif test $ol_with_kerberos != auto ; then
10647                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10648                 fi
10649
10650         fi
10651 fi
10652
10653 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10654         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10655
10656         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10657 do
10658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10660 echo "configure:10661: checking for $ac_hdr" >&5
10661 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   cat > conftest.$ac_ext <<EOF
10665 #line 10666 "configure"
10666 #include "confdefs.h"
10667 #include <$ac_hdr>
10668 EOF
10669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10670 { (eval echo configure:10671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10672 if test -z "$ac_err"; then
10673   rm -rf conftest*
10674   eval "ac_cv_header_$ac_safe=yes"
10675 else
10676   echo "$ac_err" >&5
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -rf conftest*
10680   eval "ac_cv_header_$ac_safe=no"
10681 fi
10682 rm -f conftest*
10683 fi
10684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10685   echo "$ac_t""yes" 1>&6
10686     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10687   cat >> confdefs.h <<EOF
10688 #define $ac_tr_hdr 1
10689 EOF
10690  
10691 else
10692   echo "$ac_t""no" 1>&6
10693 fi
10694 done
10695
10696
10697         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10698                 if test $krb5_impl = mit; then
10699                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10700 echo "configure:10701: checking for main in -lkrb4" >&5
10701 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10703   echo $ac_n "(cached) $ac_c" 1>&6
10704 else
10705   ac_save_LIBS="$LIBS"
10706 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10707 cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710
10711 int main() {
10712 main()
10713 ; return 0; }
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10716   rm -rf conftest*
10717   eval "ac_cv_lib_$ac_lib_var=yes"
10718 else
10719   echo "configure: failed program was:" >&5
10720   cat conftest.$ac_ext >&5
10721   rm -rf conftest*
10722   eval "ac_cv_lib_$ac_lib_var=no"
10723 fi
10724 rm -f conftest*
10725 LIBS="$ac_save_LIBS"
10726
10727 fi
10728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10729   echo "$ac_t""yes" 1>&6
10730   have_k425=yes
10731                                 KRB4_LIBS="-lkrb4 -ldes425"
10732 else
10733   echo "$ac_t""no" 1>&6
10734 have_k425=no
10735 fi
10736
10737
10738                 elif test $krb5_impl = heimdal; then
10739                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10740 echo "configure:10741: checking for main in -lkrb4" >&5
10741 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10742 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10743   echo $ac_n "(cached) $ac_c" 1>&6
10744 else
10745   ac_save_LIBS="$LIBS"
10746 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10747 cat > conftest.$ac_ext <<EOF
10748 #line 10749 "configure"
10749 #include "confdefs.h"
10750
10751 int main() {
10752 main()
10753 ; return 0; }
10754 EOF
10755 if { (eval echo configure:10756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10756   rm -rf conftest*
10757   eval "ac_cv_lib_$ac_lib_var=yes"
10758 else
10759   echo "configure: failed program was:" >&5
10760   cat conftest.$ac_ext >&5
10761   rm -rf conftest*
10762   eval "ac_cv_lib_$ac_lib_var=no"
10763 fi
10764 rm -f conftest*
10765 LIBS="$ac_save_LIBS"
10766
10767 fi
10768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10769   echo "$ac_t""yes" 1>&6
10770   have_k425=yes
10771                                 KRB4_LIBS="-lkrb4"
10772 else
10773   echo "$ac_t""no" 1>&6
10774 have_k425=no
10775 fi
10776
10777
10778                 else
10779                         have_425=no
10780                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10781                 fi
10782
10783                 if test $have_k425 = yes ; then
10784                         ol_with_kerberos=found
10785                         ol_link_krb4=yes
10786
10787                         cat >> confdefs.h <<\EOF
10788 #define HAVE_KRB425 1
10789 EOF
10790
10791                         cat >> confdefs.h <<\EOF
10792 #define HAVE_KRB4 1
10793 EOF
10794
10795
10796                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10797 echo "configure:10798: checking for des_debug in Kerberos libraries" >&5
10798 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10799   echo $ac_n "(cached) $ac_c" 1>&6
10800 else
10801   
10802                                                                 save_LIBS="$LIBS"
10803                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10804                                 cat > conftest.$ac_ext <<EOF
10805 #line 10806 "configure"
10806 #include "confdefs.h"
10807
10808 #include <kerberosIV/krb.h>
10809 #include <kerberosIV/des.h>
10810 extern int des_debug;
10811
10812 int main() {
10813
10814 des_debug = 1;
10815
10816 ; return 0; }
10817 EOF
10818 if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10819   rm -rf conftest*
10820   ol_cv_var_des_debug=yes
10821 else
10822   echo "configure: failed program was:" >&5
10823   cat conftest.$ac_ext >&5
10824   rm -rf conftest*
10825   ol_cv_var_des_debug=no
10826 fi
10827 rm -f conftest*
10828                                                                 LIBS="$save_LIBS"
10829                         
10830 fi
10831
10832 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10833
10834                         if test $ol_cv_var_des_debug = yes ; then
10835                                 cat >> confdefs.h <<\EOF
10836 #define HAVE_DES_DEBUG 1
10837 EOF
10838
10839                         fi
10840
10841                         LIBS="$save_LIBS"
10842                 fi
10843         fi
10844 fi
10845
10846 if test $ol_link_krb5 = yes ; then
10847         ol_with_kerberos=found
10848 fi
10849
10850 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10851         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10852
10853         for ac_hdr in krb.h des.h krb-archaeology.h 
10854 do
10855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10857 echo "configure:10858: checking for $ac_hdr" >&5
10858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10859   echo $ac_n "(cached) $ac_c" 1>&6
10860 else
10861   cat > conftest.$ac_ext <<EOF
10862 #line 10863 "configure"
10863 #include "confdefs.h"
10864 #include <$ac_hdr>
10865 EOF
10866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10867 { (eval echo configure:10868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10869 if test -z "$ac_err"; then
10870   rm -rf conftest*
10871   eval "ac_cv_header_$ac_safe=yes"
10872 else
10873   echo "$ac_err" >&5
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -rf conftest*
10877   eval "ac_cv_header_$ac_safe=no"
10878 fi
10879 rm -f conftest*
10880 fi
10881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10882   echo "$ac_t""yes" 1>&6
10883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10884   cat >> confdefs.h <<EOF
10885 #define $ac_tr_hdr 1
10886 EOF
10887  
10888 else
10889   echo "$ac_t""no" 1>&6
10890 fi
10891 done
10892
10893
10894         if test $ac_cv_header_krb_h = yes ; then
10895                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10896 echo "configure:10897: checking for main in -lkrb" >&5
10897 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10899   echo $ac_n "(cached) $ac_c" 1>&6
10900 else
10901   ac_save_LIBS="$LIBS"
10902 LIBS="-lkrb -ldes $LIBS"
10903 cat > conftest.$ac_ext <<EOF
10904 #line 10905 "configure"
10905 #include "confdefs.h"
10906
10907 int main() {
10908 main()
10909 ; return 0; }
10910 EOF
10911 if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10912   rm -rf conftest*
10913   eval "ac_cv_lib_$ac_lib_var=yes"
10914 else
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   eval "ac_cv_lib_$ac_lib_var=no"
10919 fi
10920 rm -f conftest*
10921 LIBS="$ac_save_LIBS"
10922
10923 fi
10924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10925   echo "$ac_t""yes" 1>&6
10926   have_k4=yes
10927 else
10928   echo "$ac_t""no" 1>&6
10929 have_k4=no
10930 fi
10931
10932
10933                 if test $have_k4 = yes ; then
10934                         ol_with_kerberos=found
10935                         ol_link_krb4=yes
10936
10937                         cat >> confdefs.h <<\EOF
10938 #define HAVE_KRB4 1
10939 EOF
10940
10941
10942                         KRB4_LIBS="-lkrb -ldes"
10943
10944                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10945                                 cat >> confdefs.h <<\EOF
10946 #define HAVE_KTH_KERBEROS 1
10947 EOF
10948
10949                         fi
10950                 fi
10951         fi
10952 fi
10953
10954 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10955         ol_link_kpasswd=yes
10956 fi
10957
10958 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10959         ol_link_kbind=yes
10960
10961 elif test $ol_enable_kbind = yes ; then
10962         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10963 fi
10964
10965 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10966         cat >> confdefs.h <<\EOF
10967 #define HAVE_KERBEROS 1
10968 EOF
10969
10970
10971 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10972         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10973 fi
10974
10975 ol_link_tls=no
10976 if test $ol_with_tls != no ; then
10977         for ac_hdr in openssl/ssl.h ssl.h
10978 do
10979 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10980 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10981 echo "configure:10982: checking for $ac_hdr" >&5
10982 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10983   echo $ac_n "(cached) $ac_c" 1>&6
10984 else
10985   cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 #include <$ac_hdr>
10989 EOF
10990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10991 { (eval echo configure:10992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10993 if test -z "$ac_err"; then
10994   rm -rf conftest*
10995   eval "ac_cv_header_$ac_safe=yes"
10996 else
10997   echo "$ac_err" >&5
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   eval "ac_cv_header_$ac_safe=no"
11002 fi
11003 rm -f conftest*
11004 fi
11005 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11006   echo "$ac_t""yes" 1>&6
11007     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11008   cat >> confdefs.h <<EOF
11009 #define $ac_tr_hdr 1
11010 EOF
11011  
11012 else
11013   echo "$ac_t""no" 1>&6
11014 fi
11015 done
11016
11017         
11018         if test $ac_cv_header_openssl_ssl_h = yes \
11019                 -o $ac_cv_header_ssl_h = yes ; then
11020                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11021 echo "configure:11022: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11022 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11024   echo $ac_n "(cached) $ac_c" 1>&6
11025 else
11026   ac_save_LIBS="$LIBS"
11027 LIBS="-lssl -lcrypto $LIBS"
11028 cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 /* Override any gcc2 internal prototype to avoid an error.  */
11032 /* We use char because int might match the return type of a gcc2
11033     builtin and then its argument prototype would still apply.  */
11034 char SSLeay_add_ssl_algorithms();
11035
11036 int main() {
11037 SSLeay_add_ssl_algorithms()
11038 ; return 0; }
11039 EOF
11040 if { (eval echo configure:11041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11041   rm -rf conftest*
11042   eval "ac_cv_lib_$ac_lib_var=yes"
11043 else
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_lib_$ac_lib_var=no"
11048 fi
11049 rm -f conftest*
11050 LIBS="$ac_save_LIBS"
11051
11052 fi
11053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11054   echo "$ac_t""yes" 1>&6
11055   have_ssleay=yes
11056                         need_rsaref=no
11057 else
11058   echo "$ac_t""no" 1>&6
11059 have_ssleay=no
11060 fi
11061
11062                         
11063                 if test $have_ssleay = no ; then
11064                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11065 echo "configure:11066: checking for SSL_library_init in -lssl" >&5
11066 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   ac_save_LIBS="$LIBS"
11071 LIBS="-lssl -lcrypto $LIBS"
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error.  */
11076 /* We use char because int might match the return type of a gcc2
11077     builtin and then its argument prototype would still apply.  */
11078 char SSL_library_init();
11079
11080 int main() {
11081 SSL_library_init()
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=no"
11092 fi
11093 rm -f conftest*
11094 LIBS="$ac_save_LIBS"
11095
11096 fi
11097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11098   echo "$ac_t""yes" 1>&6
11099   have_ssleay=yes
11100                                 need_rsaref=no
11101 else
11102   echo "$ac_t""no" 1>&6
11103 have_ssleay=no
11104 fi
11105
11106                 fi
11107
11108                 if test $have_ssleay = no ; then
11109                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11110 echo "configure:11111: checking for ssl3_accept in -lssl" >&5
11111 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11113   echo $ac_n "(cached) $ac_c" 1>&6
11114 else
11115   ac_save_LIBS="$LIBS"
11116 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11117 cat > conftest.$ac_ext <<EOF
11118 #line 11119 "configure"
11119 #include "confdefs.h"
11120 /* Override any gcc2 internal prototype to avoid an error.  */
11121 /* We use char because int might match the return type of a gcc2
11122     builtin and then its argument prototype would still apply.  */
11123 char ssl3_accept();
11124
11125 int main() {
11126 ssl3_accept()
11127 ; return 0; }
11128 EOF
11129 if { (eval echo configure:11130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11130   rm -rf conftest*
11131   eval "ac_cv_lib_$ac_lib_var=yes"
11132 else
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   eval "ac_cv_lib_$ac_lib_var=no"
11137 fi
11138 rm -f conftest*
11139 LIBS="$ac_save_LIBS"
11140
11141 fi
11142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144   have_ssleay=yes
11145                                 need_rsaref=yes
11146 else
11147   echo "$ac_t""no" 1>&6
11148 have_ssleay=no
11149 fi
11150
11151                 fi
11152
11153                 if test $have_ssleay = yes ; then
11154                         ol_with_tls=found
11155                         ol_link_tls=yes
11156
11157                         cat >> confdefs.h <<\EOF
11158 #define HAVE_SSLEAY 1
11159 EOF
11160
11161
11162                         if test $need_rsaref = yes; then
11163                                 cat >> confdefs.h <<\EOF
11164 #define HAVE_RSAREF 1
11165 EOF
11166
11167
11168                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11169                         else
11170                                 TLS_LIBS="-lssl -lcrypto"
11171                         fi
11172                 fi
11173         fi
11174
11175 else
11176         echo "configure: warning: TLS data protection not supported!" 1>&2
11177 fi
11178
11179 if test $ol_link_tls = yes ; then
11180         cat >> confdefs.h <<\EOF
11181 #define HAVE_TLS 1
11182 EOF
11183
11184
11185 elif test $ol_with_tls = auto ; then
11186         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11187         echo "configure: warning: TLS data protection not supported!" 1>&2
11188
11189 elif test $ol_with_tls != no ; then
11190         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11191 fi
11192
11193 if test $ol_enable_lmpasswd != no; then
11194         if test $ol_link_tls != yes ; then
11195                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11196         fi
11197
11198         cat >> confdefs.h <<\EOF
11199 #define SLAPD_LMHASH 1
11200 EOF
11201
11202 fi
11203
11204 ol_link_threads=no
11205
11206 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11207         -o $ol_with_threads = nt ; then
11208
11209         
11210         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11211 echo "configure:11212: checking for _beginthread" >&5
11212 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11213   echo $ac_n "(cached) $ac_c" 1>&6
11214 else
11215   cat > conftest.$ac_ext <<EOF
11216 #line 11217 "configure"
11217 #include "confdefs.h"
11218 /* System header to define __stub macros and hopefully few prototypes,
11219     which can conflict with char _beginthread(); below.  */
11220 #include <assert.h>
11221 /* Override any gcc2 internal prototype to avoid an error.  */
11222 /* We use char because int might match the return type of a gcc2
11223     builtin and then its argument prototype would still apply.  */
11224 char _beginthread();
11225 char (*f)();
11226
11227 int main() {
11228
11229 /* The GNU C library defines this for functions which it implements
11230     to always fail with ENOSYS.  Some functions are actually named
11231     something starting with __ and the normal name is an alias.  */
11232 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11233 choke me
11234 #else
11235 f = _beginthread;
11236 #endif
11237
11238 ; return 0; }
11239 EOF
11240 if { (eval echo configure:11241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11241   rm -rf conftest*
11242   eval "ac_cv_func__beginthread=yes"
11243 else
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_func__beginthread=no"
11248 fi
11249 rm -f conftest*
11250 fi
11251
11252 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11253   echo "$ac_t""yes" 1>&6
11254   :
11255 else
11256   echo "$ac_t""no" 1>&6
11257 fi
11258
11259
11260         if test $ac_cv_func__beginthread = yes ; then
11261                 cat >> confdefs.h <<\EOF
11262 #define HAVE_NT_THREADS 1
11263 EOF
11264
11265                 ol_cv_nt_threads=yes
11266         fi
11267
11268
11269         if test "$ol_cv_nt_threads" = yes ; then
11270                 ol_link_threads=nt
11271                 ol_with_threads=found
11272                 ol_with_yielding_select=yes
11273
11274                 cat >> confdefs.h <<\EOF
11275 #define HAVE_NT_SERVICE_MANAGER 1
11276 EOF
11277
11278                 cat >> confdefs.h <<\EOF
11279 #define HAVE_NT_EVENT_LOG 1
11280 EOF
11281
11282         fi
11283
11284         if test $ol_with_threads = nt ; then
11285                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11286         fi
11287 fi
11288
11289 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11290         -o $ol_with_threads = posix ; then
11291
11292         for ac_hdr in pthread.h
11293 do
11294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11296 echo "configure:11297: checking for $ac_hdr" >&5
11297 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   cat > conftest.$ac_ext <<EOF
11301 #line 11302 "configure"
11302 #include "confdefs.h"
11303 #include <$ac_hdr>
11304 EOF
11305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11306 { (eval echo configure:11307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11308 if test -z "$ac_err"; then
11309   rm -rf conftest*
11310   eval "ac_cv_header_$ac_safe=yes"
11311 else
11312   echo "$ac_err" >&5
11313   echo "configure: failed program was:" >&5
11314   cat conftest.$ac_ext >&5
11315   rm -rf conftest*
11316   eval "ac_cv_header_$ac_safe=no"
11317 fi
11318 rm -f conftest*
11319 fi
11320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11321   echo "$ac_t""yes" 1>&6
11322     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11323   cat >> confdefs.h <<EOF
11324 #define $ac_tr_hdr 1
11325 EOF
11326  
11327 else
11328   echo "$ac_t""no" 1>&6
11329 fi
11330 done
11331
11332
11333         if test $ac_cv_header_pthread_h = yes ; then
11334                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11335 echo "configure:11336: checking POSIX thread version" >&5
11336 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   
11340         cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343
11344 #               include <pthread.h>
11345         
11346 int main() {
11347
11348                 int i = PTHREAD_CREATE_JOINABLE;
11349         
11350 ; return 0; }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11353   rm -rf conftest*
11354   
11355         cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358 #include <pthread.h>
11359 EOF
11360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11361   egrep "pthread_detach" >/dev/null 2>&1; then
11362   rm -rf conftest*
11363   ol_cv_pthread_version=10
11364 else
11365   rm -rf conftest*
11366   ol_cv_pthread_version=8
11367 fi
11368 rm -f conftest*
11369
11370 else
11371   echo "configure: failed program was:" >&5
11372   cat conftest.$ac_ext >&5
11373   rm -rf conftest*
11374   
11375         cat > conftest.$ac_ext <<EOF
11376 #line 11377 "configure"
11377 #include "confdefs.h"
11378
11379 #               include <pthread.h>
11380 #               ifdef PTHREAD_CREATE_UNDETACHED
11381                 draft7
11382 #               endif
11383         
11384 EOF
11385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11386   egrep "draft7" >/dev/null 2>&1; then
11387   rm -rf conftest*
11388   ol_cv_pthread_version=7
11389 else
11390   rm -rf conftest*
11391   
11392         cat > conftest.$ac_ext <<EOF
11393 #line 11394 "configure"
11394 #include "confdefs.h"
11395 #include <pthread.h>
11396 EOF
11397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11398   egrep "pthread_attr_init" >/dev/null 2>&1; then
11399   rm -rf conftest*
11400   ol_cv_pthread_version=6
11401 else
11402   rm -rf conftest*
11403   
11404         cat > conftest.$ac_ext <<EOF
11405 #line 11406 "configure"
11406 #include "confdefs.h"
11407
11408 #               include <pthread.h>
11409 #ifdef          PTHREAD_MUTEX_INITIALIZER
11410                 draft5
11411 #endif
11412         
11413 EOF
11414 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11415   egrep "draft5" >/dev/null 2>&1; then
11416   rm -rf conftest*
11417   ol_cv_pthread_version=5
11418 else
11419   rm -rf conftest*
11420   ol_cv_pthread_version=4
11421 fi
11422 rm -f conftest*
11423  
11424 fi
11425 rm -f conftest*
11426  
11427 fi
11428 rm -f conftest*
11429  
11430 fi
11431 rm -f conftest*
11432
11433 fi
11434
11435 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11436
11437
11438                 if test $ol_cv_pthread_version != 0 ; then
11439                         cat >> confdefs.h <<EOF
11440 #define HAVE_PTHREADS $ol_cv_pthread_version
11441 EOF
11442
11443                 else
11444                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11445                 fi
11446
11447                 # consider threads found
11448                 ol_with_threads=found
11449
11450                 
11451         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11452 echo "configure:11453: checking for LinuxThreads pthread.h" >&5
11453 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11454   echo $ac_n "(cached) $ac_c" 1>&6
11455 else
11456   cat > conftest.$ac_ext <<EOF
11457 #line 11458 "configure"
11458 #include "confdefs.h"
11459 #include <pthread.h>
11460 EOF
11461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11462   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11463   rm -rf conftest*
11464   ol_cv_header_linux_threads=yes
11465 else
11466   rm -rf conftest*
11467   ol_cv_header_linux_threads=no
11468 fi
11469 rm -f conftest*
11470
11471                 
11472 fi
11473
11474 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11475         if test $ol_cv_header_linux_threads = yes; then
11476                 cat >> confdefs.h <<\EOF
11477 #define HAVE_LINUX_THREADS 1
11478 EOF
11479
11480         fi
11481
11482                 
11483         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11484 echo "configure:11485: checking for GNU Pth pthread.h" >&5
11485 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11486   echo $ac_n "(cached) $ac_c" 1>&6
11487 else
11488   cat > conftest.$ac_ext <<EOF
11489 #line 11490 "configure"
11490 #include "confdefs.h"
11491 #include <pthread.h>
11492 #ifdef _POSIX_THREAD_IS_GNU_PTH
11493         __gnu_pth__;
11494 #endif
11495
11496 EOF
11497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11498   egrep "__gnu_pth__" >/dev/null 2>&1; then
11499   rm -rf conftest*
11500   ol_cv_header_gnu_pth_pthread_h=yes
11501 else
11502   rm -rf conftest*
11503   ol_cv_header_gnu_pth_pthread_h=no
11504 fi
11505 rm -f conftest*
11506
11507                 
11508 fi
11509
11510 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11511
11512
11513                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11514                         for ac_hdr in sched.h
11515 do
11516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11518 echo "configure:11519: checking for $ac_hdr" >&5
11519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11520   echo $ac_n "(cached) $ac_c" 1>&6
11521 else
11522   cat > conftest.$ac_ext <<EOF
11523 #line 11524 "configure"
11524 #include "confdefs.h"
11525 #include <$ac_hdr>
11526 EOF
11527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11528 { (eval echo configure:11529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11530 if test -z "$ac_err"; then
11531   rm -rf conftest*
11532   eval "ac_cv_header_$ac_safe=yes"
11533 else
11534   echo "$ac_err" >&5
11535   echo "configure: failed program was:" >&5
11536   cat conftest.$ac_ext >&5
11537   rm -rf conftest*
11538   eval "ac_cv_header_$ac_safe=no"
11539 fi
11540 rm -f conftest*
11541 fi
11542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11543   echo "$ac_t""yes" 1>&6
11544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11545   cat >> confdefs.h <<EOF
11546 #define $ac_tr_hdr 1
11547 EOF
11548  
11549 else
11550   echo "$ac_t""no" 1>&6
11551 fi
11552 done
11553
11554                 fi
11555
11556                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11557                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11558 echo "configure:11559: checking for pthread_create in default libraries" >&5
11559 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11560   echo $ac_n "(cached) $ac_c" 1>&6
11561 else
11562   
11563                 if test "$cross_compiling" = yes; then
11564   cat > conftest.$ac_ext <<EOF
11565 #line 11566 "configure"
11566 #include "confdefs.h"
11567 /* pthread test headers */
11568 #include <pthread.h>
11569 #if HAVE_PTHREADS < 7
11570 #include <errno.h>
11571 #endif
11572 #ifndef NULL
11573 #define NULL (void*)0
11574 #endif
11575
11576 static void *task(p)
11577         void *p;
11578 {
11579         return (void *) (p == NULL);
11580 }
11581
11582 int main() {
11583
11584         /* pthread test function */
11585 #ifndef PTHREAD_CREATE_DETACHED
11586 #define PTHREAD_CREATE_DETACHED 1
11587 #endif
11588         pthread_t t;
11589         int status;
11590         int detach = PTHREAD_CREATE_DETACHED;
11591
11592 #if HAVE_PTHREADS > 4
11593         /* Final pthreads */
11594         pthread_attr_t attr;
11595
11596         status = pthread_attr_init(&attr);
11597         if( status ) return status;
11598
11599 #if HAVE_PTHREADS < 7
11600         status = pthread_attr_setdetachstate(&attr, &detach);
11601         if( status < 0 ) status = errno;
11602 #else
11603         status = pthread_attr_setdetachstate(&attr, detach);
11604 #endif
11605         if( status ) return status;
11606         status = pthread_create( &t, &attr, task, NULL );
11607 #if HAVE_PTHREADS < 7
11608         if( status < 0 ) status = errno;
11609 #endif
11610         if( status ) return status;
11611 #else
11612         /* Draft 4 pthreads */
11613         status = pthread_create( &t, pthread_attr_default, task, NULL );
11614         if( status ) return errno;
11615
11616         /* give thread a chance to complete */
11617         /* it should remain joinable and hence detachable */
11618         sleep( 1 );
11619
11620         status = pthread_detach( &t );
11621         if( status ) return errno;
11622 #endif
11623
11624 #ifdef HAVE_LINUX_THREADS
11625         pthread_kill_other_threads_np();
11626 #endif
11627
11628         return 0;
11629
11630 ; return 0; }
11631 EOF
11632 if { (eval echo configure:11633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11633   rm -rf conftest*
11634   ol_cv_pthread_create=yes
11635 else
11636   echo "configure: failed program was:" >&5
11637   cat conftest.$ac_ext >&5
11638   rm -rf conftest*
11639   ol_cv_pthread_create=no
11640 fi
11641 rm -f conftest*
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 /* pthread test headers */
11647 #include <pthread.h>
11648 #if HAVE_PTHREADS < 7
11649 #include <errno.h>
11650 #endif
11651 #ifndef NULL
11652 #define NULL (void*)0
11653 #endif
11654
11655 static void *task(p)
11656         void *p;
11657 {
11658         return (void *) (p == NULL);
11659 }
11660
11661
11662 int main(argc, argv)
11663         int argc;
11664         char **argv;
11665 {
11666
11667         /* pthread test function */
11668 #ifndef PTHREAD_CREATE_DETACHED
11669 #define PTHREAD_CREATE_DETACHED 1
11670 #endif
11671         pthread_t t;
11672         int status;
11673         int detach = PTHREAD_CREATE_DETACHED;
11674
11675 #if HAVE_PTHREADS > 4
11676         /* Final pthreads */
11677         pthread_attr_t attr;
11678
11679         status = pthread_attr_init(&attr);
11680         if( status ) return status;
11681
11682 #if HAVE_PTHREADS < 7
11683         status = pthread_attr_setdetachstate(&attr, &detach);
11684         if( status < 0 ) status = errno;
11685 #else
11686         status = pthread_attr_setdetachstate(&attr, detach);
11687 #endif
11688         if( status ) return status;
11689         status = pthread_create( &t, &attr, task, NULL );
11690 #if HAVE_PTHREADS < 7
11691         if( status < 0 ) status = errno;
11692 #endif
11693         if( status ) return status;
11694 #else
11695         /* Draft 4 pthreads */
11696         status = pthread_create( &t, pthread_attr_default, task, NULL );
11697         if( status ) return errno;
11698
11699         /* give thread a chance to complete */
11700         /* it should remain joinable and hence detachable */
11701         sleep( 1 );
11702
11703         status = pthread_detach( &t );
11704         if( status ) return errno;
11705 #endif
11706
11707 #ifdef HAVE_LINUX_THREADS
11708         pthread_kill_other_threads_np();
11709 #endif
11710
11711         return 0;
11712
11713 }
11714
11715 EOF
11716 if { (eval echo configure:11717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11717 then
11718   ol_cv_pthread_create=yes
11719 else
11720   echo "configure: failed program was:" >&5
11721   cat conftest.$ac_ext >&5
11722   rm -fr conftest*
11723   ol_cv_pthread_create=no
11724 fi
11725 rm -fr conftest*
11726 fi
11727
11728 fi
11729
11730 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11731
11732                 if test $ol_cv_pthread_create != no ; then
11733                         ol_link_threads=posix
11734                         ol_link_pthreads=""
11735                 fi
11736                 
11737                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11738 if test "$ol_link_threads" = no ; then
11739         # try -kthread
11740         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11741 echo "configure:11742: checking for pthread link with -kthread" >&5
11742 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11743   echo $ac_n "(cached) $ac_c" 1>&6
11744 else
11745   
11746                 # save the flags
11747                 ol_LIBS="$LIBS"
11748                 LIBS="-kthread $LIBS"
11749
11750                 if test "$cross_compiling" = yes; then
11751   cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 /* pthread test headers */
11755 #include <pthread.h>
11756 #if HAVE_PTHREADS < 7
11757 #include <errno.h>
11758 #endif
11759 #ifndef NULL
11760 #define NULL (void*)0
11761 #endif
11762
11763 static void *task(p)
11764         void *p;
11765 {
11766         return (void *) (p == NULL);
11767 }
11768
11769 int main() {
11770
11771         /* pthread test function */
11772 #ifndef PTHREAD_CREATE_DETACHED
11773 #define PTHREAD_CREATE_DETACHED 1
11774 #endif
11775         pthread_t t;
11776         int status;
11777         int detach = PTHREAD_CREATE_DETACHED;
11778
11779 #if HAVE_PTHREADS > 4
11780         /* Final pthreads */
11781         pthread_attr_t attr;
11782
11783         status = pthread_attr_init(&attr);
11784         if( status ) return status;
11785
11786 #if HAVE_PTHREADS < 7
11787         status = pthread_attr_setdetachstate(&attr, &detach);
11788         if( status < 0 ) status = errno;
11789 #else
11790         status = pthread_attr_setdetachstate(&attr, detach);
11791 #endif
11792         if( status ) return status;
11793         status = pthread_create( &t, &attr, task, NULL );
11794 #if HAVE_PTHREADS < 7
11795         if( status < 0 ) status = errno;
11796 #endif
11797         if( status ) return status;
11798 #else
11799         /* Draft 4 pthreads */
11800         status = pthread_create( &t, pthread_attr_default, task, NULL );
11801         if( status ) return errno;
11802
11803         /* give thread a chance to complete */
11804         /* it should remain joinable and hence detachable */
11805         sleep( 1 );
11806
11807         status = pthread_detach( &t );
11808         if( status ) return errno;
11809 #endif
11810
11811 #ifdef HAVE_LINUX_THREADS
11812         pthread_kill_other_threads_np();
11813 #endif
11814
11815         return 0;
11816
11817 ; return 0; }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11820   rm -rf conftest*
11821   ol_cv_pthread_kthread=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   ol_cv_pthread_kthread=no
11827 fi
11828 rm -f conftest*
11829 else
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* pthread test headers */
11834 #include <pthread.h>
11835 #if HAVE_PTHREADS < 7
11836 #include <errno.h>
11837 #endif
11838 #ifndef NULL
11839 #define NULL (void*)0
11840 #endif
11841
11842 static void *task(p)
11843         void *p;
11844 {
11845         return (void *) (p == NULL);
11846 }
11847
11848
11849 int main(argc, argv)
11850         int argc;
11851         char **argv;
11852 {
11853
11854         /* pthread test function */
11855 #ifndef PTHREAD_CREATE_DETACHED
11856 #define PTHREAD_CREATE_DETACHED 1
11857 #endif
11858         pthread_t t;
11859         int status;
11860         int detach = PTHREAD_CREATE_DETACHED;
11861
11862 #if HAVE_PTHREADS > 4
11863         /* Final pthreads */
11864         pthread_attr_t attr;
11865
11866         status = pthread_attr_init(&attr);
11867         if( status ) return status;
11868
11869 #if HAVE_PTHREADS < 7
11870         status = pthread_attr_setdetachstate(&attr, &detach);
11871         if( status < 0 ) status = errno;
11872 #else
11873         status = pthread_attr_setdetachstate(&attr, detach);
11874 #endif
11875         if( status ) return status;
11876         status = pthread_create( &t, &attr, task, NULL );
11877 #if HAVE_PTHREADS < 7
11878         if( status < 0 ) status = errno;
11879 #endif
11880         if( status ) return status;
11881 #else
11882         /* Draft 4 pthreads */
11883         status = pthread_create( &t, pthread_attr_default, task, NULL );
11884         if( status ) return errno;
11885
11886         /* give thread a chance to complete */
11887         /* it should remain joinable and hence detachable */
11888         sleep( 1 );
11889
11890         status = pthread_detach( &t );
11891         if( status ) return errno;
11892 #endif
11893
11894 #ifdef HAVE_LINUX_THREADS
11895         pthread_kill_other_threads_np();
11896 #endif
11897
11898         return 0;
11899
11900 }
11901
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11904 then
11905   ol_cv_pthread_kthread=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -fr conftest*
11910   ol_cv_pthread_kthread=no
11911 fi
11912 rm -fr conftest*
11913 fi
11914
11915
11916                 # restore the LIBS
11917                 LIBS="$ol_LIBS"
11918         
11919 fi
11920
11921 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11922
11923         if test $ol_cv_pthread_kthread = yes ; then
11924                 ol_link_pthreads="-kthread"
11925                 ol_link_threads=posix
11926         fi
11927 fi
11928
11929                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11930 if test "$ol_link_threads" = no ; then
11931         # try -pthread
11932         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11933 echo "configure:11934: checking for pthread link with -pthread" >&5
11934 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11935   echo $ac_n "(cached) $ac_c" 1>&6
11936 else
11937   
11938                 # save the flags
11939                 ol_LIBS="$LIBS"
11940                 LIBS="-pthread $LIBS"
11941
11942                 if test "$cross_compiling" = yes; then
11943   cat > conftest.$ac_ext <<EOF
11944 #line 11945 "configure"
11945 #include "confdefs.h"
11946 /* pthread test headers */
11947 #include <pthread.h>
11948 #if HAVE_PTHREADS < 7
11949 #include <errno.h>
11950 #endif
11951 #ifndef NULL
11952 #define NULL (void*)0
11953 #endif
11954
11955 static void *task(p)
11956         void *p;
11957 {
11958         return (void *) (p == NULL);
11959 }
11960
11961 int main() {
11962
11963         /* pthread test function */
11964 #ifndef PTHREAD_CREATE_DETACHED
11965 #define PTHREAD_CREATE_DETACHED 1
11966 #endif
11967         pthread_t t;
11968         int status;
11969         int detach = PTHREAD_CREATE_DETACHED;
11970
11971 #if HAVE_PTHREADS > 4
11972         /* Final pthreads */
11973         pthread_attr_t attr;
11974
11975         status = pthread_attr_init(&attr);
11976         if( status ) return status;
11977
11978 #if HAVE_PTHREADS < 7
11979         status = pthread_attr_setdetachstate(&attr, &detach);
11980         if( status < 0 ) status = errno;
11981 #else
11982         status = pthread_attr_setdetachstate(&attr, detach);
11983 #endif
11984         if( status ) return status;
11985         status = pthread_create( &t, &attr, task, NULL );
11986 #if HAVE_PTHREADS < 7
11987         if( status < 0 ) status = errno;
11988 #endif
11989         if( status ) return status;
11990 #else
11991         /* Draft 4 pthreads */
11992         status = pthread_create( &t, pthread_attr_default, task, NULL );
11993         if( status ) return errno;
11994
11995         /* give thread a chance to complete */
11996         /* it should remain joinable and hence detachable */
11997         sleep( 1 );
11998
11999         status = pthread_detach( &t );
12000         if( status ) return errno;
12001 #endif
12002
12003 #ifdef HAVE_LINUX_THREADS
12004         pthread_kill_other_threads_np();
12005 #endif
12006
12007         return 0;
12008
12009 ; return 0; }
12010 EOF
12011 if { (eval echo configure:12012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12012   rm -rf conftest*
12013   ol_cv_pthread_pthread=yes
12014 else
12015   echo "configure: failed program was:" >&5
12016   cat conftest.$ac_ext >&5
12017   rm -rf conftest*
12018   ol_cv_pthread_pthread=no
12019 fi
12020 rm -f conftest*
12021 else
12022   cat > conftest.$ac_ext <<EOF
12023 #line 12024 "configure"
12024 #include "confdefs.h"
12025 /* pthread test headers */
12026 #include <pthread.h>
12027 #if HAVE_PTHREADS < 7
12028 #include <errno.h>
12029 #endif
12030 #ifndef NULL
12031 #define NULL (void*)0
12032 #endif
12033
12034 static void *task(p)
12035         void *p;
12036 {
12037         return (void *) (p == NULL);
12038 }
12039
12040
12041 int main(argc, argv)
12042         int argc;
12043         char **argv;
12044 {
12045
12046         /* pthread test function */
12047 #ifndef PTHREAD_CREATE_DETACHED
12048 #define PTHREAD_CREATE_DETACHED 1
12049 #endif
12050         pthread_t t;
12051         int status;
12052         int detach = PTHREAD_CREATE_DETACHED;
12053
12054 #if HAVE_PTHREADS > 4
12055         /* Final pthreads */
12056         pthread_attr_t attr;
12057
12058         status = pthread_attr_init(&attr);
12059         if( status ) return status;
12060
12061 #if HAVE_PTHREADS < 7
12062         status = pthread_attr_setdetachstate(&attr, &detach);
12063         if( status < 0 ) status = errno;
12064 #else
12065         status = pthread_attr_setdetachstate(&attr, detach);
12066 #endif
12067         if( status ) return status;
12068         status = pthread_create( &t, &attr, task, NULL );
12069 #if HAVE_PTHREADS < 7
12070         if( status < 0 ) status = errno;
12071 #endif
12072         if( status ) return status;
12073 #else
12074         /* Draft 4 pthreads */
12075         status = pthread_create( &t, pthread_attr_default, task, NULL );
12076         if( status ) return errno;
12077
12078         /* give thread a chance to complete */
12079         /* it should remain joinable and hence detachable */
12080         sleep( 1 );
12081
12082         status = pthread_detach( &t );
12083         if( status ) return errno;
12084 #endif
12085
12086 #ifdef HAVE_LINUX_THREADS
12087         pthread_kill_other_threads_np();
12088 #endif
12089
12090         return 0;
12091
12092 }
12093
12094 EOF
12095 if { (eval echo configure:12096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12096 then
12097   ol_cv_pthread_pthread=yes
12098 else
12099   echo "configure: failed program was:" >&5
12100   cat conftest.$ac_ext >&5
12101   rm -fr conftest*
12102   ol_cv_pthread_pthread=no
12103 fi
12104 rm -fr conftest*
12105 fi
12106
12107
12108                 # restore the LIBS
12109                 LIBS="$ol_LIBS"
12110         
12111 fi
12112
12113 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12114
12115         if test $ol_cv_pthread_pthread = yes ; then
12116                 ol_link_pthreads="-pthread"
12117                 ol_link_threads=posix
12118         fi
12119 fi
12120
12121                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12122 if test "$ol_link_threads" = no ; then
12123         # try -pthreads
12124         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12125 echo "configure:12126: checking for pthread link with -pthreads" >&5
12126 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12127   echo $ac_n "(cached) $ac_c" 1>&6
12128 else
12129   
12130                 # save the flags
12131                 ol_LIBS="$LIBS"
12132                 LIBS="-pthreads $LIBS"
12133
12134                 if test "$cross_compiling" = yes; then
12135   cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138 /* pthread test headers */
12139 #include <pthread.h>
12140 #if HAVE_PTHREADS < 7
12141 #include <errno.h>
12142 #endif
12143 #ifndef NULL
12144 #define NULL (void*)0
12145 #endif
12146
12147 static void *task(p)
12148         void *p;
12149 {
12150         return (void *) (p == NULL);
12151 }
12152
12153 int main() {
12154
12155         /* pthread test function */
12156 #ifndef PTHREAD_CREATE_DETACHED
12157 #define PTHREAD_CREATE_DETACHED 1
12158 #endif
12159         pthread_t t;
12160         int status;
12161         int detach = PTHREAD_CREATE_DETACHED;
12162
12163 #if HAVE_PTHREADS > 4
12164         /* Final pthreads */
12165         pthread_attr_t attr;
12166
12167         status = pthread_attr_init(&attr);
12168         if( status ) return status;
12169
12170 #if HAVE_PTHREADS < 7
12171         status = pthread_attr_setdetachstate(&attr, &detach);
12172         if( status < 0 ) status = errno;
12173 #else
12174         status = pthread_attr_setdetachstate(&attr, detach);
12175 #endif
12176         if( status ) return status;
12177         status = pthread_create( &t, &attr, task, NULL );
12178 #if HAVE_PTHREADS < 7
12179         if( status < 0 ) status = errno;
12180 #endif
12181         if( status ) return status;
12182 #else
12183         /* Draft 4 pthreads */
12184         status = pthread_create( &t, pthread_attr_default, task, NULL );
12185         if( status ) return errno;
12186
12187         /* give thread a chance to complete */
12188         /* it should remain joinable and hence detachable */
12189         sleep( 1 );
12190
12191         status = pthread_detach( &t );
12192         if( status ) return errno;
12193 #endif
12194
12195 #ifdef HAVE_LINUX_THREADS
12196         pthread_kill_other_threads_np();
12197 #endif
12198
12199         return 0;
12200
12201 ; return 0; }
12202 EOF
12203 if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12204   rm -rf conftest*
12205   ol_cv_pthread_pthreads=yes
12206 else
12207   echo "configure: failed program was:" >&5
12208   cat conftest.$ac_ext >&5
12209   rm -rf conftest*
12210   ol_cv_pthread_pthreads=no
12211 fi
12212 rm -f conftest*
12213 else
12214   cat > conftest.$ac_ext <<EOF
12215 #line 12216 "configure"
12216 #include "confdefs.h"
12217 /* pthread test headers */
12218 #include <pthread.h>
12219 #if HAVE_PTHREADS < 7
12220 #include <errno.h>
12221 #endif
12222 #ifndef NULL
12223 #define NULL (void*)0
12224 #endif
12225
12226 static void *task(p)
12227         void *p;
12228 {
12229         return (void *) (p == NULL);
12230 }
12231
12232
12233 int main(argc, argv)
12234         int argc;
12235         char **argv;
12236 {
12237
12238         /* pthread test function */
12239 #ifndef PTHREAD_CREATE_DETACHED
12240 #define PTHREAD_CREATE_DETACHED 1
12241 #endif
12242         pthread_t t;
12243         int status;
12244         int detach = PTHREAD_CREATE_DETACHED;
12245
12246 #if HAVE_PTHREADS > 4
12247         /* Final pthreads */
12248         pthread_attr_t attr;
12249
12250         status = pthread_attr_init(&attr);
12251         if( status ) return status;
12252
12253 #if HAVE_PTHREADS < 7
12254         status = pthread_attr_setdetachstate(&attr, &detach);
12255         if( status < 0 ) status = errno;
12256 #else
12257         status = pthread_attr_setdetachstate(&attr, detach);
12258 #endif
12259         if( status ) return status;
12260         status = pthread_create( &t, &attr, task, NULL );
12261 #if HAVE_PTHREADS < 7
12262         if( status < 0 ) status = errno;
12263 #endif
12264         if( status ) return status;
12265 #else
12266         /* Draft 4 pthreads */
12267         status = pthread_create( &t, pthread_attr_default, task, NULL );
12268         if( status ) return errno;
12269
12270         /* give thread a chance to complete */
12271         /* it should remain joinable and hence detachable */
12272         sleep( 1 );
12273
12274         status = pthread_detach( &t );
12275         if( status ) return errno;
12276 #endif
12277
12278 #ifdef HAVE_LINUX_THREADS
12279         pthread_kill_other_threads_np();
12280 #endif
12281
12282         return 0;
12283
12284 }
12285
12286 EOF
12287 if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12288 then
12289   ol_cv_pthread_pthreads=yes
12290 else
12291   echo "configure: failed program was:" >&5
12292   cat conftest.$ac_ext >&5
12293   rm -fr conftest*
12294   ol_cv_pthread_pthreads=no
12295 fi
12296 rm -fr conftest*
12297 fi
12298
12299
12300                 # restore the LIBS
12301                 LIBS="$ol_LIBS"
12302         
12303 fi
12304
12305 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12306
12307         if test $ol_cv_pthread_pthreads = yes ; then
12308                 ol_link_pthreads="-pthreads"
12309                 ol_link_threads=posix
12310         fi
12311 fi
12312
12313                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12314 if test "$ol_link_threads" = no ; then
12315         # try -mthreads
12316         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12317 echo "configure:12318: checking for pthread link with -mthreads" >&5
12318 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   
12322                 # save the flags
12323                 ol_LIBS="$LIBS"
12324                 LIBS="-mthreads $LIBS"
12325
12326                 if test "$cross_compiling" = yes; then
12327   cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 /* pthread test headers */
12331 #include <pthread.h>
12332 #if HAVE_PTHREADS < 7
12333 #include <errno.h>
12334 #endif
12335 #ifndef NULL
12336 #define NULL (void*)0
12337 #endif
12338
12339 static void *task(p)
12340         void *p;
12341 {
12342         return (void *) (p == NULL);
12343 }
12344
12345 int main() {
12346
12347         /* pthread test function */
12348 #ifndef PTHREAD_CREATE_DETACHED
12349 #define PTHREAD_CREATE_DETACHED 1
12350 #endif
12351         pthread_t t;
12352         int status;
12353         int detach = PTHREAD_CREATE_DETACHED;
12354
12355 #if HAVE_PTHREADS > 4
12356         /* Final pthreads */
12357         pthread_attr_t attr;
12358
12359         status = pthread_attr_init(&attr);
12360         if( status ) return status;
12361
12362 #if HAVE_PTHREADS < 7
12363         status = pthread_attr_setdetachstate(&attr, &detach);
12364         if( status < 0 ) status = errno;
12365 #else
12366         status = pthread_attr_setdetachstate(&attr, detach);
12367 #endif
12368         if( status ) return status;
12369         status = pthread_create( &t, &attr, task, NULL );
12370 #if HAVE_PTHREADS < 7
12371         if( status < 0 ) status = errno;
12372 #endif
12373         if( status ) return status;
12374 #else
12375         /* Draft 4 pthreads */
12376         status = pthread_create( &t, pthread_attr_default, task, NULL );
12377         if( status ) return errno;
12378
12379         /* give thread a chance to complete */
12380         /* it should remain joinable and hence detachable */
12381         sleep( 1 );
12382
12383         status = pthread_detach( &t );
12384         if( status ) return errno;
12385 #endif
12386
12387 #ifdef HAVE_LINUX_THREADS
12388         pthread_kill_other_threads_np();
12389 #endif
12390
12391         return 0;
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12396   rm -rf conftest*
12397   ol_cv_pthread_mthreads=yes
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   ol_cv_pthread_mthreads=no
12403 fi
12404 rm -f conftest*
12405 else
12406   cat > conftest.$ac_ext <<EOF
12407 #line 12408 "configure"
12408 #include "confdefs.h"
12409 /* pthread test headers */
12410 #include <pthread.h>
12411 #if HAVE_PTHREADS < 7
12412 #include <errno.h>
12413 #endif
12414 #ifndef NULL
12415 #define NULL (void*)0
12416 #endif
12417
12418 static void *task(p)
12419         void *p;
12420 {
12421         return (void *) (p == NULL);
12422 }
12423
12424
12425 int main(argc, argv)
12426         int argc;
12427         char **argv;
12428 {
12429
12430         /* pthread test function */
12431 #ifndef PTHREAD_CREATE_DETACHED
12432 #define PTHREAD_CREATE_DETACHED 1
12433 #endif
12434         pthread_t t;
12435         int status;
12436         int detach = PTHREAD_CREATE_DETACHED;
12437
12438 #if HAVE_PTHREADS > 4
12439         /* Final pthreads */
12440         pthread_attr_t attr;
12441
12442         status = pthread_attr_init(&attr);
12443         if( status ) return status;
12444
12445 #if HAVE_PTHREADS < 7
12446         status = pthread_attr_setdetachstate(&attr, &detach);
12447         if( status < 0 ) status = errno;
12448 #else
12449         status = pthread_attr_setdetachstate(&attr, detach);
12450 #endif
12451         if( status ) return status;
12452         status = pthread_create( &t, &attr, task, NULL );
12453 #if HAVE_PTHREADS < 7
12454         if( status < 0 ) status = errno;
12455 #endif
12456         if( status ) return status;
12457 #else
12458         /* Draft 4 pthreads */
12459         status = pthread_create( &t, pthread_attr_default, task, NULL );
12460         if( status ) return errno;
12461
12462         /* give thread a chance to complete */
12463         /* it should remain joinable and hence detachable */
12464         sleep( 1 );
12465
12466         status = pthread_detach( &t );
12467         if( status ) return errno;
12468 #endif
12469
12470 #ifdef HAVE_LINUX_THREADS
12471         pthread_kill_other_threads_np();
12472 #endif
12473
12474         return 0;
12475
12476 }
12477
12478 EOF
12479 if { (eval echo configure:12480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12480 then
12481   ol_cv_pthread_mthreads=yes
12482 else
12483   echo "configure: failed program was:" >&5
12484   cat conftest.$ac_ext >&5
12485   rm -fr conftest*
12486   ol_cv_pthread_mthreads=no
12487 fi
12488 rm -fr conftest*
12489 fi
12490
12491
12492                 # restore the LIBS
12493                 LIBS="$ol_LIBS"
12494         
12495 fi
12496
12497 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12498
12499         if test $ol_cv_pthread_mthreads = yes ; then
12500                 ol_link_pthreads="-mthreads"
12501                 ol_link_threads=posix
12502         fi
12503 fi
12504
12505                 # Pthread try link: -thread (ol_cv_pthread_thread)
12506 if test "$ol_link_threads" = no ; then
12507         # try -thread
12508         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12509 echo "configure:12510: checking for pthread link with -thread" >&5
12510 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12511   echo $ac_n "(cached) $ac_c" 1>&6
12512 else
12513   
12514                 # save the flags
12515                 ol_LIBS="$LIBS"
12516                 LIBS="-thread $LIBS"
12517
12518                 if test "$cross_compiling" = yes; then
12519   cat > conftest.$ac_ext <<EOF
12520 #line 12521 "configure"
12521 #include "confdefs.h"
12522 /* pthread test headers */
12523 #include <pthread.h>
12524 #if HAVE_PTHREADS < 7
12525 #include <errno.h>
12526 #endif
12527 #ifndef NULL
12528 #define NULL (void*)0
12529 #endif
12530
12531 static void *task(p)
12532         void *p;
12533 {
12534         return (void *) (p == NULL);
12535 }
12536
12537 int main() {
12538
12539         /* pthread test function */
12540 #ifndef PTHREAD_CREATE_DETACHED
12541 #define PTHREAD_CREATE_DETACHED 1
12542 #endif
12543         pthread_t t;
12544         int status;
12545         int detach = PTHREAD_CREATE_DETACHED;
12546
12547 #if HAVE_PTHREADS > 4
12548         /* Final pthreads */
12549         pthread_attr_t attr;
12550
12551         status = pthread_attr_init(&attr);
12552         if( status ) return status;
12553
12554 #if HAVE_PTHREADS < 7
12555         status = pthread_attr_setdetachstate(&attr, &detach);
12556         if( status < 0 ) status = errno;
12557 #else
12558         status = pthread_attr_setdetachstate(&attr, detach);
12559 #endif
12560         if( status ) return status;
12561         status = pthread_create( &t, &attr, task, NULL );
12562 #if HAVE_PTHREADS < 7
12563         if( status < 0 ) status = errno;
12564 #endif
12565         if( status ) return status;
12566 #else
12567         /* Draft 4 pthreads */
12568         status = pthread_create( &t, pthread_attr_default, task, NULL );
12569         if( status ) return errno;
12570
12571         /* give thread a chance to complete */
12572         /* it should remain joinable and hence detachable */
12573         sleep( 1 );
12574
12575         status = pthread_detach( &t );
12576         if( status ) return errno;
12577 #endif
12578
12579 #ifdef HAVE_LINUX_THREADS
12580         pthread_kill_other_threads_np();
12581 #endif
12582
12583         return 0;
12584
12585 ; return 0; }
12586 EOF
12587 if { (eval echo configure:12588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12588   rm -rf conftest*
12589   ol_cv_pthread_thread=yes
12590 else
12591   echo "configure: failed program was:" >&5
12592   cat conftest.$ac_ext >&5
12593   rm -rf conftest*
12594   ol_cv_pthread_thread=no
12595 fi
12596 rm -f conftest*
12597 else
12598   cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 /* pthread test headers */
12602 #include <pthread.h>
12603 #if HAVE_PTHREADS < 7
12604 #include <errno.h>
12605 #endif
12606 #ifndef NULL
12607 #define NULL (void*)0
12608 #endif
12609
12610 static void *task(p)
12611         void *p;
12612 {
12613         return (void *) (p == NULL);
12614 }
12615
12616
12617 int main(argc, argv)
12618         int argc;
12619         char **argv;
12620 {
12621
12622         /* pthread test function */
12623 #ifndef PTHREAD_CREATE_DETACHED
12624 #define PTHREAD_CREATE_DETACHED 1
12625 #endif
12626         pthread_t t;
12627         int status;
12628         int detach = PTHREAD_CREATE_DETACHED;
12629
12630 #if HAVE_PTHREADS > 4
12631         /* Final pthreads */
12632         pthread_attr_t attr;
12633
12634         status = pthread_attr_init(&attr);
12635         if( status ) return status;
12636
12637 #if HAVE_PTHREADS < 7
12638         status = pthread_attr_setdetachstate(&attr, &detach);
12639         if( status < 0 ) status = errno;
12640 #else
12641         status = pthread_attr_setdetachstate(&attr, detach);
12642 #endif
12643         if( status ) return status;
12644         status = pthread_create( &t, &attr, task, NULL );
12645 #if HAVE_PTHREADS < 7
12646         if( status < 0 ) status = errno;
12647 #endif
12648         if( status ) return status;
12649 #else
12650         /* Draft 4 pthreads */
12651         status = pthread_create( &t, pthread_attr_default, task, NULL );
12652         if( status ) return errno;
12653
12654         /* give thread a chance to complete */
12655         /* it should remain joinable and hence detachable */
12656         sleep( 1 );
12657
12658         status = pthread_detach( &t );
12659         if( status ) return errno;
12660 #endif
12661
12662 #ifdef HAVE_LINUX_THREADS
12663         pthread_kill_other_threads_np();
12664 #endif
12665
12666         return 0;
12667
12668 }
12669
12670 EOF
12671 if { (eval echo configure:12672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12672 then
12673   ol_cv_pthread_thread=yes
12674 else
12675   echo "configure: failed program was:" >&5
12676   cat conftest.$ac_ext >&5
12677   rm -fr conftest*
12678   ol_cv_pthread_thread=no
12679 fi
12680 rm -fr conftest*
12681 fi
12682
12683
12684                 # restore the LIBS
12685                 LIBS="$ol_LIBS"
12686         
12687 fi
12688
12689 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12690
12691         if test $ol_cv_pthread_thread = yes ; then
12692                 ol_link_pthreads="-thread"
12693                 ol_link_threads=posix
12694         fi
12695 fi
12696
12697
12698                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12699 if test "$ol_link_threads" = no ; then
12700         # try -lpthread -lmach -lexc -lc_r
12701         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12702 echo "configure:12703: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12703 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12704   echo $ac_n "(cached) $ac_c" 1>&6
12705 else
12706   
12707                 # save the flags
12708                 ol_LIBS="$LIBS"
12709                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12710
12711                 if test "$cross_compiling" = yes; then
12712   cat > conftest.$ac_ext <<EOF
12713 #line 12714 "configure"
12714 #include "confdefs.h"
12715 /* pthread test headers */
12716 #include <pthread.h>
12717 #if HAVE_PTHREADS < 7
12718 #include <errno.h>
12719 #endif
12720 #ifndef NULL
12721 #define NULL (void*)0
12722 #endif
12723
12724 static void *task(p)
12725         void *p;
12726 {
12727         return (void *) (p == NULL);
12728 }
12729
12730 int main() {
12731
12732         /* pthread test function */
12733 #ifndef PTHREAD_CREATE_DETACHED
12734 #define PTHREAD_CREATE_DETACHED 1
12735 #endif
12736         pthread_t t;
12737         int status;
12738         int detach = PTHREAD_CREATE_DETACHED;
12739
12740 #if HAVE_PTHREADS > 4
12741         /* Final pthreads */
12742         pthread_attr_t attr;
12743
12744         status = pthread_attr_init(&attr);
12745         if( status ) return status;
12746
12747 #if HAVE_PTHREADS < 7
12748         status = pthread_attr_setdetachstate(&attr, &detach);
12749         if( status < 0 ) status = errno;
12750 #else
12751         status = pthread_attr_setdetachstate(&attr, detach);
12752 #endif
12753         if( status ) return status;
12754         status = pthread_create( &t, &attr, task, NULL );
12755 #if HAVE_PTHREADS < 7
12756         if( status < 0 ) status = errno;
12757 #endif
12758         if( status ) return status;
12759 #else
12760         /* Draft 4 pthreads */
12761         status = pthread_create( &t, pthread_attr_default, task, NULL );
12762         if( status ) return errno;
12763
12764         /* give thread a chance to complete */
12765         /* it should remain joinable and hence detachable */
12766         sleep( 1 );
12767
12768         status = pthread_detach( &t );
12769         if( status ) return errno;
12770 #endif
12771
12772 #ifdef HAVE_LINUX_THREADS
12773         pthread_kill_other_threads_np();
12774 #endif
12775
12776         return 0;
12777
12778 ; return 0; }
12779 EOF
12780 if { (eval echo configure:12781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12781   rm -rf conftest*
12782   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12783 else
12784   echo "configure: failed program was:" >&5
12785   cat conftest.$ac_ext >&5
12786   rm -rf conftest*
12787   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12788 fi
12789 rm -f conftest*
12790 else
12791   cat > conftest.$ac_ext <<EOF
12792 #line 12793 "configure"
12793 #include "confdefs.h"
12794 /* pthread test headers */
12795 #include <pthread.h>
12796 #if HAVE_PTHREADS < 7
12797 #include <errno.h>
12798 #endif
12799 #ifndef NULL
12800 #define NULL (void*)0
12801 #endif
12802
12803 static void *task(p)
12804         void *p;
12805 {
12806         return (void *) (p == NULL);
12807 }
12808
12809
12810 int main(argc, argv)
12811         int argc;
12812         char **argv;
12813 {
12814
12815         /* pthread test function */
12816 #ifndef PTHREAD_CREATE_DETACHED
12817 #define PTHREAD_CREATE_DETACHED 1
12818 #endif
12819         pthread_t t;
12820         int status;
12821         int detach = PTHREAD_CREATE_DETACHED;
12822
12823 #if HAVE_PTHREADS > 4
12824         /* Final pthreads */
12825         pthread_attr_t attr;
12826
12827         status = pthread_attr_init(&attr);
12828         if( status ) return status;
12829
12830 #if HAVE_PTHREADS < 7
12831         status = pthread_attr_setdetachstate(&attr, &detach);
12832         if( status < 0 ) status = errno;
12833 #else
12834         status = pthread_attr_setdetachstate(&attr, detach);
12835 #endif
12836         if( status ) return status;
12837         status = pthread_create( &t, &attr, task, NULL );
12838 #if HAVE_PTHREADS < 7
12839         if( status < 0 ) status = errno;
12840 #endif
12841         if( status ) return status;
12842 #else
12843         /* Draft 4 pthreads */
12844         status = pthread_create( &t, pthread_attr_default, task, NULL );
12845         if( status ) return errno;
12846
12847         /* give thread a chance to complete */
12848         /* it should remain joinable and hence detachable */
12849         sleep( 1 );
12850
12851         status = pthread_detach( &t );
12852         if( status ) return errno;
12853 #endif
12854
12855 #ifdef HAVE_LINUX_THREADS
12856         pthread_kill_other_threads_np();
12857 #endif
12858
12859         return 0;
12860
12861 }
12862
12863 EOF
12864 if { (eval echo configure:12865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12865 then
12866   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12867 else
12868   echo "configure: failed program was:" >&5
12869   cat conftest.$ac_ext >&5
12870   rm -fr conftest*
12871   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12872 fi
12873 rm -fr conftest*
12874 fi
12875
12876
12877                 # restore the LIBS
12878                 LIBS="$ol_LIBS"
12879         
12880 fi
12881
12882 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12883
12884         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12885                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12886                 ol_link_threads=posix
12887         fi
12888 fi
12889
12890                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12891 if test "$ol_link_threads" = no ; then
12892         # try -lpthread -lmach -lexc
12893         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12894 echo "configure:12895: checking for pthread link with -lpthread -lmach -lexc" >&5
12895 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12896   echo $ac_n "(cached) $ac_c" 1>&6
12897 else
12898   
12899                 # save the flags
12900                 ol_LIBS="$LIBS"
12901                 LIBS="-lpthread -lmach -lexc $LIBS"
12902
12903                 if test "$cross_compiling" = yes; then
12904   cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* pthread test headers */
12908 #include <pthread.h>
12909 #if HAVE_PTHREADS < 7
12910 #include <errno.h>
12911 #endif
12912 #ifndef NULL
12913 #define NULL (void*)0
12914 #endif
12915
12916 static void *task(p)
12917         void *p;
12918 {
12919         return (void *) (p == NULL);
12920 }
12921
12922 int main() {
12923
12924         /* pthread test function */
12925 #ifndef PTHREAD_CREATE_DETACHED
12926 #define PTHREAD_CREATE_DETACHED 1
12927 #endif
12928         pthread_t t;
12929         int status;
12930         int detach = PTHREAD_CREATE_DETACHED;
12931
12932 #if HAVE_PTHREADS > 4
12933         /* Final pthreads */
12934         pthread_attr_t attr;
12935
12936         status = pthread_attr_init(&attr);
12937         if( status ) return status;
12938
12939 #if HAVE_PTHREADS < 7
12940         status = pthread_attr_setdetachstate(&attr, &detach);
12941         if( status < 0 ) status = errno;
12942 #else
12943         status = pthread_attr_setdetachstate(&attr, detach);
12944 #endif
12945         if( status ) return status;
12946         status = pthread_create( &t, &attr, task, NULL );
12947 #if HAVE_PTHREADS < 7
12948         if( status < 0 ) status = errno;
12949 #endif
12950         if( status ) return status;
12951 #else
12952         /* Draft 4 pthreads */
12953         status = pthread_create( &t, pthread_attr_default, task, NULL );
12954         if( status ) return errno;
12955
12956         /* give thread a chance to complete */
12957         /* it should remain joinable and hence detachable */
12958         sleep( 1 );
12959
12960         status = pthread_detach( &t );
12961         if( status ) return errno;
12962 #endif
12963
12964 #ifdef HAVE_LINUX_THREADS
12965         pthread_kill_other_threads_np();
12966 #endif
12967
12968         return 0;
12969
12970 ; return 0; }
12971 EOF
12972 if { (eval echo configure:12973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12973   rm -rf conftest*
12974   ol_cv_pthread_lpthread_lmach_lexc=yes
12975 else
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -rf conftest*
12979   ol_cv_pthread_lpthread_lmach_lexc=no
12980 fi
12981 rm -f conftest*
12982 else
12983   cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* pthread test headers */
12987 #include <pthread.h>
12988 #if HAVE_PTHREADS < 7
12989 #include <errno.h>
12990 #endif
12991 #ifndef NULL
12992 #define NULL (void*)0
12993 #endif
12994
12995 static void *task(p)
12996         void *p;
12997 {
12998         return (void *) (p == NULL);
12999 }
13000
13001
13002 int main(argc, argv)
13003         int argc;
13004         char **argv;
13005 {
13006
13007         /* pthread test function */
13008 #ifndef PTHREAD_CREATE_DETACHED
13009 #define PTHREAD_CREATE_DETACHED 1
13010 #endif
13011         pthread_t t;
13012         int status;
13013         int detach = PTHREAD_CREATE_DETACHED;
13014
13015 #if HAVE_PTHREADS > 4
13016         /* Final pthreads */
13017         pthread_attr_t attr;
13018
13019         status = pthread_attr_init(&attr);
13020         if( status ) return status;
13021
13022 #if HAVE_PTHREADS < 7
13023         status = pthread_attr_setdetachstate(&attr, &detach);
13024         if( status < 0 ) status = errno;
13025 #else
13026         status = pthread_attr_setdetachstate(&attr, detach);
13027 #endif
13028         if( status ) return status;
13029         status = pthread_create( &t, &attr, task, NULL );
13030 #if HAVE_PTHREADS < 7
13031         if( status < 0 ) status = errno;
13032 #endif
13033         if( status ) return status;
13034 #else
13035         /* Draft 4 pthreads */
13036         status = pthread_create( &t, pthread_attr_default, task, NULL );
13037         if( status ) return errno;
13038
13039         /* give thread a chance to complete */
13040         /* it should remain joinable and hence detachable */
13041         sleep( 1 );
13042
13043         status = pthread_detach( &t );
13044         if( status ) return errno;
13045 #endif
13046
13047 #ifdef HAVE_LINUX_THREADS
13048         pthread_kill_other_threads_np();
13049 #endif
13050
13051         return 0;
13052
13053 }
13054
13055 EOF
13056 if { (eval echo configure:13057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13057 then
13058   ol_cv_pthread_lpthread_lmach_lexc=yes
13059 else
13060   echo "configure: failed program was:" >&5
13061   cat conftest.$ac_ext >&5
13062   rm -fr conftest*
13063   ol_cv_pthread_lpthread_lmach_lexc=no
13064 fi
13065 rm -fr conftest*
13066 fi
13067
13068
13069                 # restore the LIBS
13070                 LIBS="$ol_LIBS"
13071         
13072 fi
13073
13074 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13075
13076         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13077                 ol_link_pthreads="-lpthread -lmach -lexc"
13078                 ol_link_threads=posix
13079         fi
13080 fi
13081
13082
13083                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13084 if test "$ol_link_threads" = no ; then
13085         # try -lpthread -Wl,-woff,85
13086         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13087 echo "configure:13088: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13088 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13089   echo $ac_n "(cached) $ac_c" 1>&6
13090 else
13091   
13092                 # save the flags
13093                 ol_LIBS="$LIBS"
13094                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13095
13096                 if test "$cross_compiling" = yes; then
13097   cat > conftest.$ac_ext <<EOF
13098 #line 13099 "configure"
13099 #include "confdefs.h"
13100 /* pthread test headers */
13101 #include <pthread.h>
13102 #if HAVE_PTHREADS < 7
13103 #include <errno.h>
13104 #endif
13105 #ifndef NULL
13106 #define NULL (void*)0
13107 #endif
13108
13109 static void *task(p)
13110         void *p;
13111 {
13112         return (void *) (p == NULL);
13113 }
13114
13115 int main() {
13116
13117         /* pthread test function */
13118 #ifndef PTHREAD_CREATE_DETACHED
13119 #define PTHREAD_CREATE_DETACHED 1
13120 #endif
13121         pthread_t t;
13122         int status;
13123         int detach = PTHREAD_CREATE_DETACHED;
13124
13125 #if HAVE_PTHREADS > 4
13126         /* Final pthreads */
13127         pthread_attr_t attr;
13128
13129         status = pthread_attr_init(&attr);
13130         if( status ) return status;
13131
13132 #if HAVE_PTHREADS < 7
13133         status = pthread_attr_setdetachstate(&attr, &detach);
13134         if( status < 0 ) status = errno;
13135 #else
13136         status = pthread_attr_setdetachstate(&attr, detach);
13137 #endif
13138         if( status ) return status;
13139         status = pthread_create( &t, &attr, task, NULL );
13140 #if HAVE_PTHREADS < 7
13141         if( status < 0 ) status = errno;
13142 #endif
13143         if( status ) return status;
13144 #else
13145         /* Draft 4 pthreads */
13146         status = pthread_create( &t, pthread_attr_default, task, NULL );
13147         if( status ) return errno;
13148
13149         /* give thread a chance to complete */
13150         /* it should remain joinable and hence detachable */
13151         sleep( 1 );
13152
13153         status = pthread_detach( &t );
13154         if( status ) return errno;
13155 #endif
13156
13157 #ifdef HAVE_LINUX_THREADS
13158         pthread_kill_other_threads_np();
13159 #endif
13160
13161         return 0;
13162
13163 ; return 0; }
13164 EOF
13165 if { (eval echo configure:13166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13166   rm -rf conftest*
13167   ol_cv_pthread_lib_lpthread_woff=yes
13168 else
13169   echo "configure: failed program was:" >&5
13170   cat conftest.$ac_ext >&5
13171   rm -rf conftest*
13172   ol_cv_pthread_lib_lpthread_woff=no
13173 fi
13174 rm -f conftest*
13175 else
13176   cat > conftest.$ac_ext <<EOF
13177 #line 13178 "configure"
13178 #include "confdefs.h"
13179 /* pthread test headers */
13180 #include <pthread.h>
13181 #if HAVE_PTHREADS < 7
13182 #include <errno.h>
13183 #endif
13184 #ifndef NULL
13185 #define NULL (void*)0
13186 #endif
13187
13188 static void *task(p)
13189         void *p;
13190 {
13191         return (void *) (p == NULL);
13192 }
13193
13194
13195 int main(argc, argv)
13196         int argc;
13197         char **argv;
13198 {
13199
13200         /* pthread test function */
13201 #ifndef PTHREAD_CREATE_DETACHED
13202 #define PTHREAD_CREATE_DETACHED 1
13203 #endif
13204         pthread_t t;
13205         int status;
13206         int detach = PTHREAD_CREATE_DETACHED;
13207
13208 #if HAVE_PTHREADS > 4
13209         /* Final pthreads */
13210         pthread_attr_t attr;
13211
13212         status = pthread_attr_init(&attr);
13213         if( status ) return status;
13214
13215 #if HAVE_PTHREADS < 7
13216         status = pthread_attr_setdetachstate(&attr, &detach);
13217         if( status < 0 ) status = errno;
13218 #else
13219         status = pthread_attr_setdetachstate(&attr, detach);
13220 #endif
13221         if( status ) return status;
13222         status = pthread_create( &t, &attr, task, NULL );
13223 #if HAVE_PTHREADS < 7
13224         if( status < 0 ) status = errno;
13225 #endif
13226         if( status ) return status;
13227 #else
13228         /* Draft 4 pthreads */
13229         status = pthread_create( &t, pthread_attr_default, task, NULL );
13230         if( status ) return errno;
13231
13232         /* give thread a chance to complete */
13233         /* it should remain joinable and hence detachable */
13234         sleep( 1 );
13235
13236         status = pthread_detach( &t );
13237         if( status ) return errno;
13238 #endif
13239
13240 #ifdef HAVE_LINUX_THREADS
13241         pthread_kill_other_threads_np();
13242 #endif
13243
13244         return 0;
13245
13246 }
13247
13248 EOF
13249 if { (eval echo configure:13250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13250 then
13251   ol_cv_pthread_lib_lpthread_woff=yes
13252 else
13253   echo "configure: failed program was:" >&5
13254   cat conftest.$ac_ext >&5
13255   rm -fr conftest*
13256   ol_cv_pthread_lib_lpthread_woff=no
13257 fi
13258 rm -fr conftest*
13259 fi
13260
13261
13262                 # restore the LIBS
13263                 LIBS="$ol_LIBS"
13264         
13265 fi
13266
13267 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13268
13269         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13270                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13271                 ol_link_threads=posix
13272         fi
13273 fi
13274
13275
13276                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13277 if test "$ol_link_threads" = no ; then
13278         # try -lpthread
13279         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13280 echo "configure:13281: checking for pthread link with -lpthread" >&5
13281 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13282   echo $ac_n "(cached) $ac_c" 1>&6
13283 else
13284   
13285                 # save the flags
13286                 ol_LIBS="$LIBS"
13287                 LIBS="-lpthread $LIBS"
13288
13289                 if test "$cross_compiling" = yes; then
13290   cat > conftest.$ac_ext <<EOF
13291 #line 13292 "configure"
13292 #include "confdefs.h"
13293 /* pthread test headers */
13294 #include <pthread.h>
13295 #if HAVE_PTHREADS < 7
13296 #include <errno.h>
13297 #endif
13298 #ifndef NULL
13299 #define NULL (void*)0
13300 #endif
13301
13302 static void *task(p)
13303         void *p;
13304 {
13305         return (void *) (p == NULL);
13306 }
13307
13308 int main() {
13309
13310         /* pthread test function */
13311 #ifndef PTHREAD_CREATE_DETACHED
13312 #define PTHREAD_CREATE_DETACHED 1
13313 #endif
13314         pthread_t t;
13315         int status;
13316         int detach = PTHREAD_CREATE_DETACHED;
13317
13318 #if HAVE_PTHREADS > 4
13319         /* Final pthreads */
13320         pthread_attr_t attr;
13321
13322         status = pthread_attr_init(&attr);
13323         if( status ) return status;
13324
13325 #if HAVE_PTHREADS < 7
13326         status = pthread_attr_setdetachstate(&attr, &detach);
13327         if( status < 0 ) status = errno;
13328 #else
13329         status = pthread_attr_setdetachstate(&attr, detach);
13330 #endif
13331         if( status ) return status;
13332         status = pthread_create( &t, &attr, task, NULL );
13333 #if HAVE_PTHREADS < 7
13334         if( status < 0 ) status = errno;
13335 #endif
13336         if( status ) return status;
13337 #else
13338         /* Draft 4 pthreads */
13339         status = pthread_create( &t, pthread_attr_default, task, NULL );
13340         if( status ) return errno;
13341
13342         /* give thread a chance to complete */
13343         /* it should remain joinable and hence detachable */
13344         sleep( 1 );
13345
13346         status = pthread_detach( &t );
13347         if( status ) return errno;
13348 #endif
13349
13350 #ifdef HAVE_LINUX_THREADS
13351         pthread_kill_other_threads_np();
13352 #endif
13353
13354         return 0;
13355
13356 ; return 0; }
13357 EOF
13358 if { (eval echo configure:13359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13359   rm -rf conftest*
13360   ol_cv_pthread_lpthread=yes
13361 else
13362   echo "configure: failed program was:" >&5
13363   cat conftest.$ac_ext >&5
13364   rm -rf conftest*
13365   ol_cv_pthread_lpthread=no
13366 fi
13367 rm -f conftest*
13368 else
13369   cat > conftest.$ac_ext <<EOF
13370 #line 13371 "configure"
13371 #include "confdefs.h"
13372 /* pthread test headers */
13373 #include <pthread.h>
13374 #if HAVE_PTHREADS < 7
13375 #include <errno.h>
13376 #endif
13377 #ifndef NULL
13378 #define NULL (void*)0
13379 #endif
13380
13381 static void *task(p)
13382         void *p;
13383 {
13384         return (void *) (p == NULL);
13385 }
13386
13387
13388 int main(argc, argv)
13389         int argc;
13390         char **argv;
13391 {
13392
13393         /* pthread test function */
13394 #ifndef PTHREAD_CREATE_DETACHED
13395 #define PTHREAD_CREATE_DETACHED 1
13396 #endif
13397         pthread_t t;
13398         int status;
13399         int detach = PTHREAD_CREATE_DETACHED;
13400
13401 #if HAVE_PTHREADS > 4
13402         /* Final pthreads */
13403         pthread_attr_t attr;
13404
13405         status = pthread_attr_init(&attr);
13406         if( status ) return status;
13407
13408 #if HAVE_PTHREADS < 7
13409         status = pthread_attr_setdetachstate(&attr, &detach);
13410         if( status < 0 ) status = errno;
13411 #else
13412         status = pthread_attr_setdetachstate(&attr, detach);
13413 #endif
13414         if( status ) return status;
13415         status = pthread_create( &t, &attr, task, NULL );
13416 #if HAVE_PTHREADS < 7
13417         if( status < 0 ) status = errno;
13418 #endif
13419         if( status ) return status;
13420 #else
13421         /* Draft 4 pthreads */
13422         status = pthread_create( &t, pthread_attr_default, task, NULL );
13423         if( status ) return errno;
13424
13425         /* give thread a chance to complete */
13426         /* it should remain joinable and hence detachable */
13427         sleep( 1 );
13428
13429         status = pthread_detach( &t );
13430         if( status ) return errno;
13431 #endif
13432
13433 #ifdef HAVE_LINUX_THREADS
13434         pthread_kill_other_threads_np();
13435 #endif
13436
13437         return 0;
13438
13439 }
13440
13441 EOF
13442 if { (eval echo configure:13443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13443 then
13444   ol_cv_pthread_lpthread=yes
13445 else
13446   echo "configure: failed program was:" >&5
13447   cat conftest.$ac_ext >&5
13448   rm -fr conftest*
13449   ol_cv_pthread_lpthread=no
13450 fi
13451 rm -fr conftest*
13452 fi
13453
13454
13455                 # restore the LIBS
13456                 LIBS="$ol_LIBS"
13457         
13458 fi
13459
13460 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13461
13462         if test $ol_cv_pthread_lpthread = yes ; then
13463                 ol_link_pthreads="-lpthread"
13464                 ol_link_threads=posix
13465         fi
13466 fi
13467
13468                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13469 if test "$ol_link_threads" = no ; then
13470         # try -lc_r
13471         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13472 echo "configure:13473: checking for pthread link with -lc_r" >&5
13473 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13474   echo $ac_n "(cached) $ac_c" 1>&6
13475 else
13476   
13477                 # save the flags
13478                 ol_LIBS="$LIBS"
13479                 LIBS="-lc_r $LIBS"
13480
13481                 if test "$cross_compiling" = yes; then
13482   cat > conftest.$ac_ext <<EOF
13483 #line 13484 "configure"
13484 #include "confdefs.h"
13485 /* pthread test headers */
13486 #include <pthread.h>
13487 #if HAVE_PTHREADS < 7
13488 #include <errno.h>
13489 #endif
13490 #ifndef NULL
13491 #define NULL (void*)0
13492 #endif
13493
13494 static void *task(p)
13495         void *p;
13496 {
13497         return (void *) (p == NULL);
13498 }
13499
13500 int main() {
13501
13502         /* pthread test function */
13503 #ifndef PTHREAD_CREATE_DETACHED
13504 #define PTHREAD_CREATE_DETACHED 1
13505 #endif
13506         pthread_t t;
13507         int status;
13508         int detach = PTHREAD_CREATE_DETACHED;
13509
13510 #if HAVE_PTHREADS > 4
13511         /* Final pthreads */
13512         pthread_attr_t attr;
13513
13514         status = pthread_attr_init(&attr);
13515         if( status ) return status;
13516
13517 #if HAVE_PTHREADS < 7
13518         status = pthread_attr_setdetachstate(&attr, &detach);
13519         if( status < 0 ) status = errno;
13520 #else
13521         status = pthread_attr_setdetachstate(&attr, detach);
13522 #endif
13523         if( status ) return status;
13524         status = pthread_create( &t, &attr, task, NULL );
13525 #if HAVE_PTHREADS < 7
13526         if( status < 0 ) status = errno;
13527 #endif
13528         if( status ) return status;
13529 #else
13530         /* Draft 4 pthreads */
13531         status = pthread_create( &t, pthread_attr_default, task, NULL );
13532         if( status ) return errno;
13533
13534         /* give thread a chance to complete */
13535         /* it should remain joinable and hence detachable */
13536         sleep( 1 );
13537
13538         status = pthread_detach( &t );
13539         if( status ) return errno;
13540 #endif
13541
13542 #ifdef HAVE_LINUX_THREADS
13543         pthread_kill_other_threads_np();
13544 #endif
13545
13546         return 0;
13547
13548 ; return 0; }
13549 EOF
13550 if { (eval echo configure:13551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13551   rm -rf conftest*
13552   ol_cv_pthread_lc_r=yes
13553 else
13554   echo "configure: failed program was:" >&5
13555   cat conftest.$ac_ext >&5
13556   rm -rf conftest*
13557   ol_cv_pthread_lc_r=no
13558 fi
13559 rm -f conftest*
13560 else
13561   cat > conftest.$ac_ext <<EOF
13562 #line 13563 "configure"
13563 #include "confdefs.h"
13564 /* pthread test headers */
13565 #include <pthread.h>
13566 #if HAVE_PTHREADS < 7
13567 #include <errno.h>
13568 #endif
13569 #ifndef NULL
13570 #define NULL (void*)0
13571 #endif
13572
13573 static void *task(p)
13574         void *p;
13575 {
13576         return (void *) (p == NULL);
13577 }
13578
13579
13580 int main(argc, argv)
13581         int argc;
13582         char **argv;
13583 {
13584
13585         /* pthread test function */
13586 #ifndef PTHREAD_CREATE_DETACHED
13587 #define PTHREAD_CREATE_DETACHED 1
13588 #endif
13589         pthread_t t;
13590         int status;
13591         int detach = PTHREAD_CREATE_DETACHED;
13592
13593 #if HAVE_PTHREADS > 4
13594         /* Final pthreads */
13595         pthread_attr_t attr;
13596
13597         status = pthread_attr_init(&attr);
13598         if( status ) return status;
13599
13600 #if HAVE_PTHREADS < 7
13601         status = pthread_attr_setdetachstate(&attr, &detach);
13602         if( status < 0 ) status = errno;
13603 #else
13604         status = pthread_attr_setdetachstate(&attr, detach);
13605 #endif
13606         if( status ) return status;
13607         status = pthread_create( &t, &attr, task, NULL );
13608 #if HAVE_PTHREADS < 7
13609         if( status < 0 ) status = errno;
13610 #endif
13611         if( status ) return status;
13612 #else
13613         /* Draft 4 pthreads */
13614         status = pthread_create( &t, pthread_attr_default, task, NULL );
13615         if( status ) return errno;
13616
13617         /* give thread a chance to complete */
13618         /* it should remain joinable and hence detachable */
13619         sleep( 1 );
13620
13621         status = pthread_detach( &t );
13622         if( status ) return errno;
13623 #endif
13624
13625 #ifdef HAVE_LINUX_THREADS
13626         pthread_kill_other_threads_np();
13627 #endif
13628
13629         return 0;
13630
13631 }
13632
13633 EOF
13634 if { (eval echo configure:13635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13635 then
13636   ol_cv_pthread_lc_r=yes
13637 else
13638   echo "configure: failed program was:" >&5
13639   cat conftest.$ac_ext >&5
13640   rm -fr conftest*
13641   ol_cv_pthread_lc_r=no
13642 fi
13643 rm -fr conftest*
13644 fi
13645
13646
13647                 # restore the LIBS
13648                 LIBS="$ol_LIBS"
13649         
13650 fi
13651
13652 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13653
13654         if test $ol_cv_pthread_lc_r = yes ; then
13655                 ol_link_pthreads="-lc_r"
13656                 ol_link_threads=posix
13657         fi
13658 fi
13659
13660
13661                 # Pthread try link: -threads (ol_cv_pthread_threads)
13662 if test "$ol_link_threads" = no ; then
13663         # try -threads
13664         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13665 echo "configure:13666: checking for pthread link with -threads" >&5
13666 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13667   echo $ac_n "(cached) $ac_c" 1>&6
13668 else
13669   
13670                 # save the flags
13671                 ol_LIBS="$LIBS"
13672                 LIBS="-threads $LIBS"
13673
13674                 if test "$cross_compiling" = yes; then
13675   cat > conftest.$ac_ext <<EOF
13676 #line 13677 "configure"
13677 #include "confdefs.h"
13678 /* pthread test headers */
13679 #include <pthread.h>
13680 #if HAVE_PTHREADS < 7
13681 #include <errno.h>
13682 #endif
13683 #ifndef NULL
13684 #define NULL (void*)0
13685 #endif
13686
13687 static void *task(p)
13688         void *p;
13689 {
13690         return (void *) (p == NULL);
13691 }
13692
13693 int main() {
13694
13695         /* pthread test function */
13696 #ifndef PTHREAD_CREATE_DETACHED
13697 #define PTHREAD_CREATE_DETACHED 1
13698 #endif
13699         pthread_t t;
13700         int status;
13701         int detach = PTHREAD_CREATE_DETACHED;
13702
13703 #if HAVE_PTHREADS > 4
13704         /* Final pthreads */
13705         pthread_attr_t attr;
13706
13707         status = pthread_attr_init(&attr);
13708         if( status ) return status;
13709
13710 #if HAVE_PTHREADS < 7
13711         status = pthread_attr_setdetachstate(&attr, &detach);
13712         if( status < 0 ) status = errno;
13713 #else
13714         status = pthread_attr_setdetachstate(&attr, detach);
13715 #endif
13716         if( status ) return status;
13717         status = pthread_create( &t, &attr, task, NULL );
13718 #if HAVE_PTHREADS < 7
13719         if( status < 0 ) status = errno;
13720 #endif
13721         if( status ) return status;
13722 #else
13723         /* Draft 4 pthreads */
13724         status = pthread_create( &t, pthread_attr_default, task, NULL );
13725         if( status ) return errno;
13726
13727         /* give thread a chance to complete */
13728         /* it should remain joinable and hence detachable */
13729         sleep( 1 );
13730
13731         status = pthread_detach( &t );
13732         if( status ) return errno;
13733 #endif
13734
13735 #ifdef HAVE_LINUX_THREADS
13736         pthread_kill_other_threads_np();
13737 #endif
13738
13739         return 0;
13740
13741 ; return 0; }
13742 EOF
13743 if { (eval echo configure:13744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13744   rm -rf conftest*
13745   ol_cv_pthread_threads=yes
13746 else
13747   echo "configure: failed program was:" >&5
13748   cat conftest.$ac_ext >&5
13749   rm -rf conftest*
13750   ol_cv_pthread_threads=no
13751 fi
13752 rm -f conftest*
13753 else
13754   cat > conftest.$ac_ext <<EOF
13755 #line 13756 "configure"
13756 #include "confdefs.h"
13757 /* pthread test headers */
13758 #include <pthread.h>
13759 #if HAVE_PTHREADS < 7
13760 #include <errno.h>
13761 #endif
13762 #ifndef NULL
13763 #define NULL (void*)0
13764 #endif
13765
13766 static void *task(p)
13767         void *p;
13768 {
13769         return (void *) (p == NULL);
13770 }
13771
13772
13773 int main(argc, argv)
13774         int argc;
13775         char **argv;
13776 {
13777
13778         /* pthread test function */
13779 #ifndef PTHREAD_CREATE_DETACHED
13780 #define PTHREAD_CREATE_DETACHED 1
13781 #endif
13782         pthread_t t;
13783         int status;
13784         int detach = PTHREAD_CREATE_DETACHED;
13785
13786 #if HAVE_PTHREADS > 4
13787         /* Final pthreads */
13788         pthread_attr_t attr;
13789
13790         status = pthread_attr_init(&attr);
13791         if( status ) return status;
13792
13793 #if HAVE_PTHREADS < 7
13794         status = pthread_attr_setdetachstate(&attr, &detach);
13795         if( status < 0 ) status = errno;
13796 #else
13797         status = pthread_attr_setdetachstate(&attr, detach);
13798 #endif
13799         if( status ) return status;
13800         status = pthread_create( &t, &attr, task, NULL );
13801 #if HAVE_PTHREADS < 7
13802         if( status < 0 ) status = errno;
13803 #endif
13804         if( status ) return status;
13805 #else
13806         /* Draft 4 pthreads */
13807         status = pthread_create( &t, pthread_attr_default, task, NULL );
13808         if( status ) return errno;
13809
13810         /* give thread a chance to complete */
13811         /* it should remain joinable and hence detachable */
13812         sleep( 1 );
13813
13814         status = pthread_detach( &t );
13815         if( status ) return errno;
13816 #endif
13817
13818 #ifdef HAVE_LINUX_THREADS
13819         pthread_kill_other_threads_np();
13820 #endif
13821
13822         return 0;
13823
13824 }
13825
13826 EOF
13827 if { (eval echo configure:13828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13828 then
13829   ol_cv_pthread_threads=yes
13830 else
13831   echo "configure: failed program was:" >&5
13832   cat conftest.$ac_ext >&5
13833   rm -fr conftest*
13834   ol_cv_pthread_threads=no
13835 fi
13836 rm -fr conftest*
13837 fi
13838
13839
13840                 # restore the LIBS
13841                 LIBS="$ol_LIBS"
13842         
13843 fi
13844
13845 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13846
13847         if test $ol_cv_pthread_threads = yes ; then
13848                 ol_link_pthreads="-threads"
13849                 ol_link_threads=posix
13850         fi
13851 fi
13852
13853
13854                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13855 if test "$ol_link_threads" = no ; then
13856         # try -lpthreads -lmach -lexc -lc_r
13857         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13858 echo "configure:13859: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13859 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13860   echo $ac_n "(cached) $ac_c" 1>&6
13861 else
13862   
13863                 # save the flags
13864                 ol_LIBS="$LIBS"
13865                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13866
13867                 if test "$cross_compiling" = yes; then
13868   cat > conftest.$ac_ext <<EOF
13869 #line 13870 "configure"
13870 #include "confdefs.h"
13871 /* pthread test headers */
13872 #include <pthread.h>
13873 #if HAVE_PTHREADS < 7
13874 #include <errno.h>
13875 #endif
13876 #ifndef NULL
13877 #define NULL (void*)0
13878 #endif
13879
13880 static void *task(p)
13881         void *p;
13882 {
13883         return (void *) (p == NULL);
13884 }
13885
13886 int main() {
13887
13888         /* pthread test function */
13889 #ifndef PTHREAD_CREATE_DETACHED
13890 #define PTHREAD_CREATE_DETACHED 1
13891 #endif
13892         pthread_t t;
13893         int status;
13894         int detach = PTHREAD_CREATE_DETACHED;
13895
13896 #if HAVE_PTHREADS > 4
13897         /* Final pthreads */
13898         pthread_attr_t attr;
13899
13900         status = pthread_attr_init(&attr);
13901         if( status ) return status;
13902
13903 #if HAVE_PTHREADS < 7
13904         status = pthread_attr_setdetachstate(&attr, &detach);
13905         if( status < 0 ) status = errno;
13906 #else
13907         status = pthread_attr_setdetachstate(&attr, detach);
13908 #endif
13909         if( status ) return status;
13910         status = pthread_create( &t, &attr, task, NULL );
13911 #if HAVE_PTHREADS < 7
13912         if( status < 0 ) status = errno;
13913 #endif
13914         if( status ) return status;
13915 #else
13916         /* Draft 4 pthreads */
13917         status = pthread_create( &t, pthread_attr_default, task, NULL );
13918         if( status ) return errno;
13919
13920         /* give thread a chance to complete */
13921         /* it should remain joinable and hence detachable */
13922         sleep( 1 );
13923
13924         status = pthread_detach( &t );
13925         if( status ) return errno;
13926 #endif
13927
13928 #ifdef HAVE_LINUX_THREADS
13929         pthread_kill_other_threads_np();
13930 #endif
13931
13932         return 0;
13933
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13937   rm -rf conftest*
13938   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13939 else
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13944 fi
13945 rm -f conftest*
13946 else
13947   cat > conftest.$ac_ext <<EOF
13948 #line 13949 "configure"
13949 #include "confdefs.h"
13950 /* pthread test headers */
13951 #include <pthread.h>
13952 #if HAVE_PTHREADS < 7
13953 #include <errno.h>
13954 #endif
13955 #ifndef NULL
13956 #define NULL (void*)0
13957 #endif
13958
13959 static void *task(p)
13960         void *p;
13961 {
13962         return (void *) (p == NULL);
13963 }
13964
13965
13966 int main(argc, argv)
13967         int argc;
13968         char **argv;
13969 {
13970
13971         /* pthread test function */
13972 #ifndef PTHREAD_CREATE_DETACHED
13973 #define PTHREAD_CREATE_DETACHED 1
13974 #endif
13975         pthread_t t;
13976         int status;
13977         int detach = PTHREAD_CREATE_DETACHED;
13978
13979 #if HAVE_PTHREADS > 4
13980         /* Final pthreads */
13981         pthread_attr_t attr;
13982
13983         status = pthread_attr_init(&attr);
13984         if( status ) return status;
13985
13986 #if HAVE_PTHREADS < 7
13987         status = pthread_attr_setdetachstate(&attr, &detach);
13988         if( status < 0 ) status = errno;
13989 #else
13990         status = pthread_attr_setdetachstate(&attr, detach);
13991 #endif
13992         if( status ) return status;
13993         status = pthread_create( &t, &attr, task, NULL );
13994 #if HAVE_PTHREADS < 7
13995         if( status < 0 ) status = errno;
13996 #endif
13997         if( status ) return status;
13998 #else
13999         /* Draft 4 pthreads */
14000         status = pthread_create( &t, pthread_attr_default, task, NULL );
14001         if( status ) return errno;
14002
14003         /* give thread a chance to complete */
14004         /* it should remain joinable and hence detachable */
14005         sleep( 1 );
14006
14007         status = pthread_detach( &t );
14008         if( status ) return errno;
14009 #endif
14010
14011 #ifdef HAVE_LINUX_THREADS
14012         pthread_kill_other_threads_np();
14013 #endif
14014
14015         return 0;
14016
14017 }
14018
14019 EOF
14020 if { (eval echo configure:14021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14021 then
14022   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14023 else
14024   echo "configure: failed program was:" >&5
14025   cat conftest.$ac_ext >&5
14026   rm -fr conftest*
14027   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14028 fi
14029 rm -fr conftest*
14030 fi
14031
14032
14033                 # restore the LIBS
14034                 LIBS="$ol_LIBS"
14035         
14036 fi
14037
14038 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14039
14040         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14041                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14042                 ol_link_threads=posix
14043         fi
14044 fi
14045
14046                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14047 if test "$ol_link_threads" = no ; then
14048         # try -lpthreads -lmach -lexc
14049         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14050 echo "configure:14051: checking for pthread link with -lpthreads -lmach -lexc" >&5
14051 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14052   echo $ac_n "(cached) $ac_c" 1>&6
14053 else
14054   
14055                 # save the flags
14056                 ol_LIBS="$LIBS"
14057                 LIBS="-lpthreads -lmach -lexc $LIBS"
14058
14059                 if test "$cross_compiling" = yes; then
14060   cat > conftest.$ac_ext <<EOF
14061 #line 14062 "configure"
14062 #include "confdefs.h"
14063 /* pthread test headers */
14064 #include <pthread.h>
14065 #if HAVE_PTHREADS < 7
14066 #include <errno.h>
14067 #endif
14068 #ifndef NULL
14069 #define NULL (void*)0
14070 #endif
14071
14072 static void *task(p)
14073         void *p;
14074 {
14075         return (void *) (p == NULL);
14076 }
14077
14078 int main() {
14079
14080         /* pthread test function */
14081 #ifndef PTHREAD_CREATE_DETACHED
14082 #define PTHREAD_CREATE_DETACHED 1
14083 #endif
14084         pthread_t t;
14085         int status;
14086         int detach = PTHREAD_CREATE_DETACHED;
14087
14088 #if HAVE_PTHREADS > 4
14089         /* Final pthreads */
14090         pthread_attr_t attr;
14091
14092         status = pthread_attr_init(&attr);
14093         if( status ) return status;
14094
14095 #if HAVE_PTHREADS < 7
14096         status = pthread_attr_setdetachstate(&attr, &detach);
14097         if( status < 0 ) status = errno;
14098 #else
14099         status = pthread_attr_setdetachstate(&attr, detach);
14100 #endif
14101         if( status ) return status;
14102         status = pthread_create( &t, &attr, task, NULL );
14103 #if HAVE_PTHREADS < 7
14104         if( status < 0 ) status = errno;
14105 #endif
14106         if( status ) return status;
14107 #else
14108         /* Draft 4 pthreads */
14109         status = pthread_create( &t, pthread_attr_default, task, NULL );
14110         if( status ) return errno;
14111
14112         /* give thread a chance to complete */
14113         /* it should remain joinable and hence detachable */
14114         sleep( 1 );
14115
14116         status = pthread_detach( &t );
14117         if( status ) return errno;
14118 #endif
14119
14120 #ifdef HAVE_LINUX_THREADS
14121         pthread_kill_other_threads_np();
14122 #endif
14123
14124         return 0;
14125
14126 ; return 0; }
14127 EOF
14128 if { (eval echo configure:14129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14129   rm -rf conftest*
14130   ol_cv_pthread_lpthreads_lmach_lexc=yes
14131 else
14132   echo "configure: failed program was:" >&5
14133   cat conftest.$ac_ext >&5
14134   rm -rf conftest*
14135   ol_cv_pthread_lpthreads_lmach_lexc=no
14136 fi
14137 rm -f conftest*
14138 else
14139   cat > conftest.$ac_ext <<EOF
14140 #line 14141 "configure"
14141 #include "confdefs.h"
14142 /* pthread test headers */
14143 #include <pthread.h>
14144 #if HAVE_PTHREADS < 7
14145 #include <errno.h>
14146 #endif
14147 #ifndef NULL
14148 #define NULL (void*)0
14149 #endif
14150
14151 static void *task(p)
14152         void *p;
14153 {
14154         return (void *) (p == NULL);
14155 }
14156
14157
14158 int main(argc, argv)
14159         int argc;
14160         char **argv;
14161 {
14162
14163         /* pthread test function */
14164 #ifndef PTHREAD_CREATE_DETACHED
14165 #define PTHREAD_CREATE_DETACHED 1
14166 #endif
14167         pthread_t t;
14168         int status;
14169         int detach = PTHREAD_CREATE_DETACHED;
14170
14171 #if HAVE_PTHREADS > 4
14172         /* Final pthreads */
14173         pthread_attr_t attr;
14174
14175         status = pthread_attr_init(&attr);
14176         if( status ) return status;
14177
14178 #if HAVE_PTHREADS < 7
14179         status = pthread_attr_setdetachstate(&attr, &detach);
14180         if( status < 0 ) status = errno;
14181 #else
14182         status = pthread_attr_setdetachstate(&attr, detach);
14183 #endif
14184         if( status ) return status;
14185         status = pthread_create( &t, &attr, task, NULL );
14186 #if HAVE_PTHREADS < 7
14187         if( status < 0 ) status = errno;
14188 #endif
14189         if( status ) return status;
14190 #else
14191         /* Draft 4 pthreads */
14192         status = pthread_create( &t, pthread_attr_default, task, NULL );
14193         if( status ) return errno;
14194
14195         /* give thread a chance to complete */
14196         /* it should remain joinable and hence detachable */
14197         sleep( 1 );
14198
14199         status = pthread_detach( &t );
14200         if( status ) return errno;
14201 #endif
14202
14203 #ifdef HAVE_LINUX_THREADS
14204         pthread_kill_other_threads_np();
14205 #endif
14206
14207         return 0;
14208
14209 }
14210
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14213 then
14214   ol_cv_pthread_lpthreads_lmach_lexc=yes
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -fr conftest*
14219   ol_cv_pthread_lpthreads_lmach_lexc=no
14220 fi
14221 rm -fr conftest*
14222 fi
14223
14224
14225                 # restore the LIBS
14226                 LIBS="$ol_LIBS"
14227         
14228 fi
14229
14230 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14231
14232         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14233                 ol_link_pthreads="-lpthreads -lmach -lexc"
14234                 ol_link_threads=posix
14235         fi
14236 fi
14237
14238                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14239 if test "$ol_link_threads" = no ; then
14240         # try -lpthreads -lexc
14241         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14242 echo "configure:14243: checking for pthread link with -lpthreads -lexc" >&5
14243 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14244   echo $ac_n "(cached) $ac_c" 1>&6
14245 else
14246   
14247                 # save the flags
14248                 ol_LIBS="$LIBS"
14249                 LIBS="-lpthreads -lexc $LIBS"
14250
14251                 if test "$cross_compiling" = yes; then
14252   cat > conftest.$ac_ext <<EOF
14253 #line 14254 "configure"
14254 #include "confdefs.h"
14255 /* pthread test headers */
14256 #include <pthread.h>
14257 #if HAVE_PTHREADS < 7
14258 #include <errno.h>
14259 #endif
14260 #ifndef NULL
14261 #define NULL (void*)0
14262 #endif
14263
14264 static void *task(p)
14265         void *p;
14266 {
14267         return (void *) (p == NULL);
14268 }
14269
14270 int main() {
14271
14272         /* pthread test function */
14273 #ifndef PTHREAD_CREATE_DETACHED
14274 #define PTHREAD_CREATE_DETACHED 1
14275 #endif
14276         pthread_t t;
14277         int status;
14278         int detach = PTHREAD_CREATE_DETACHED;
14279
14280 #if HAVE_PTHREADS > 4
14281         /* Final pthreads */
14282         pthread_attr_t attr;
14283
14284         status = pthread_attr_init(&attr);
14285         if( status ) return status;
14286
14287 #if HAVE_PTHREADS < 7
14288         status = pthread_attr_setdetachstate(&attr, &detach);
14289         if( status < 0 ) status = errno;
14290 #else
14291         status = pthread_attr_setdetachstate(&attr, detach);
14292 #endif
14293         if( status ) return status;
14294         status = pthread_create( &t, &attr, task, NULL );
14295 #if HAVE_PTHREADS < 7
14296         if( status < 0 ) status = errno;
14297 #endif
14298         if( status ) return status;
14299 #else
14300         /* Draft 4 pthreads */
14301         status = pthread_create( &t, pthread_attr_default, task, NULL );
14302         if( status ) return errno;
14303
14304         /* give thread a chance to complete */
14305         /* it should remain joinable and hence detachable */
14306         sleep( 1 );
14307
14308         status = pthread_detach( &t );
14309         if( status ) return errno;
14310 #endif
14311
14312 #ifdef HAVE_LINUX_THREADS
14313         pthread_kill_other_threads_np();
14314 #endif
14315
14316         return 0;
14317
14318 ; return 0; }
14319 EOF
14320 if { (eval echo configure:14321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14321   rm -rf conftest*
14322   ol_cv_pthread_lpthreads_lexc=yes
14323 else
14324   echo "configure: failed program was:" >&5
14325   cat conftest.$ac_ext >&5
14326   rm -rf conftest*
14327   ol_cv_pthread_lpthreads_lexc=no
14328 fi
14329 rm -f conftest*
14330 else
14331   cat > conftest.$ac_ext <<EOF
14332 #line 14333 "configure"
14333 #include "confdefs.h"
14334 /* pthread test headers */
14335 #include <pthread.h>
14336 #if HAVE_PTHREADS < 7
14337 #include <errno.h>
14338 #endif
14339 #ifndef NULL
14340 #define NULL (void*)0
14341 #endif
14342
14343 static void *task(p)
14344         void *p;
14345 {
14346         return (void *) (p == NULL);
14347 }
14348
14349
14350 int main(argc, argv)
14351         int argc;
14352         char **argv;
14353 {
14354
14355         /* pthread test function */
14356 #ifndef PTHREAD_CREATE_DETACHED
14357 #define PTHREAD_CREATE_DETACHED 1
14358 #endif
14359         pthread_t t;
14360         int status;
14361         int detach = PTHREAD_CREATE_DETACHED;
14362
14363 #if HAVE_PTHREADS > 4
14364         /* Final pthreads */
14365         pthread_attr_t attr;
14366
14367         status = pthread_attr_init(&attr);
14368         if( status ) return status;
14369
14370 #if HAVE_PTHREADS < 7
14371         status = pthread_attr_setdetachstate(&attr, &detach);
14372         if( status < 0 ) status = errno;
14373 #else
14374         status = pthread_attr_setdetachstate(&attr, detach);
14375 #endif
14376         if( status ) return status;
14377         status = pthread_create( &t, &attr, task, NULL );
14378 #if HAVE_PTHREADS < 7
14379         if( status < 0 ) status = errno;
14380 #endif
14381         if( status ) return status;
14382 #else
14383         /* Draft 4 pthreads */
14384         status = pthread_create( &t, pthread_attr_default, task, NULL );
14385         if( status ) return errno;
14386
14387         /* give thread a chance to complete */
14388         /* it should remain joinable and hence detachable */
14389         sleep( 1 );
14390
14391         status = pthread_detach( &t );
14392         if( status ) return errno;
14393 #endif
14394
14395 #ifdef HAVE_LINUX_THREADS
14396         pthread_kill_other_threads_np();
14397 #endif
14398
14399         return 0;
14400
14401 }
14402
14403 EOF
14404 if { (eval echo configure:14405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14405 then
14406   ol_cv_pthread_lpthreads_lexc=yes
14407 else
14408   echo "configure: failed program was:" >&5
14409   cat conftest.$ac_ext >&5
14410   rm -fr conftest*
14411   ol_cv_pthread_lpthreads_lexc=no
14412 fi
14413 rm -fr conftest*
14414 fi
14415
14416
14417                 # restore the LIBS
14418                 LIBS="$ol_LIBS"
14419         
14420 fi
14421
14422 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14423
14424         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14425                 ol_link_pthreads="-lpthreads -lexc"
14426                 ol_link_threads=posix
14427         fi
14428 fi
14429
14430
14431                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14432 if test "$ol_link_threads" = no ; then
14433         # try -lpthreads
14434         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14435 echo "configure:14436: checking for pthread link with -lpthreads" >&5
14436 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14437   echo $ac_n "(cached) $ac_c" 1>&6
14438 else
14439   
14440                 # save the flags
14441                 ol_LIBS="$LIBS"
14442                 LIBS="-lpthreads $LIBS"
14443
14444                 if test "$cross_compiling" = yes; then
14445   cat > conftest.$ac_ext <<EOF
14446 #line 14447 "configure"
14447 #include "confdefs.h"
14448 /* pthread test headers */
14449 #include <pthread.h>
14450 #if HAVE_PTHREADS < 7
14451 #include <errno.h>
14452 #endif
14453 #ifndef NULL
14454 #define NULL (void*)0
14455 #endif
14456
14457 static void *task(p)
14458         void *p;
14459 {
14460         return (void *) (p == NULL);
14461 }
14462
14463 int main() {
14464
14465         /* pthread test function */
14466 #ifndef PTHREAD_CREATE_DETACHED
14467 #define PTHREAD_CREATE_DETACHED 1
14468 #endif
14469         pthread_t t;
14470         int status;
14471         int detach = PTHREAD_CREATE_DETACHED;
14472
14473 #if HAVE_PTHREADS > 4
14474         /* Final pthreads */
14475         pthread_attr_t attr;
14476
14477         status = pthread_attr_init(&attr);
14478         if( status ) return status;
14479
14480 #if HAVE_PTHREADS < 7
14481         status = pthread_attr_setdetachstate(&attr, &detach);
14482         if( status < 0 ) status = errno;
14483 #else
14484         status = pthread_attr_setdetachstate(&attr, detach);
14485 #endif
14486         if( status ) return status;
14487         status = pthread_create( &t, &attr, task, NULL );
14488 #if HAVE_PTHREADS < 7
14489         if( status < 0 ) status = errno;
14490 #endif
14491         if( status ) return status;
14492 #else
14493         /* Draft 4 pthreads */
14494         status = pthread_create( &t, pthread_attr_default, task, NULL );
14495         if( status ) return errno;
14496
14497         /* give thread a chance to complete */
14498         /* it should remain joinable and hence detachable */
14499         sleep( 1 );
14500
14501         status = pthread_detach( &t );
14502         if( status ) return errno;
14503 #endif
14504
14505 #ifdef HAVE_LINUX_THREADS
14506         pthread_kill_other_threads_np();
14507 #endif
14508
14509         return 0;
14510
14511 ; return 0; }
14512 EOF
14513 if { (eval echo configure:14514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14514   rm -rf conftest*
14515   ol_cv_pthread_lib_lpthreads=yes
14516 else
14517   echo "configure: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   rm -rf conftest*
14520   ol_cv_pthread_lib_lpthreads=no
14521 fi
14522 rm -f conftest*
14523 else
14524   cat > conftest.$ac_ext <<EOF
14525 #line 14526 "configure"
14526 #include "confdefs.h"
14527 /* pthread test headers */
14528 #include <pthread.h>
14529 #if HAVE_PTHREADS < 7
14530 #include <errno.h>
14531 #endif
14532 #ifndef NULL
14533 #define NULL (void*)0
14534 #endif
14535
14536 static void *task(p)
14537         void *p;
14538 {
14539         return (void *) (p == NULL);
14540 }
14541
14542
14543 int main(argc, argv)
14544         int argc;
14545         char **argv;
14546 {
14547
14548         /* pthread test function */
14549 #ifndef PTHREAD_CREATE_DETACHED
14550 #define PTHREAD_CREATE_DETACHED 1
14551 #endif
14552         pthread_t t;
14553         int status;
14554         int detach = PTHREAD_CREATE_DETACHED;
14555
14556 #if HAVE_PTHREADS > 4
14557         /* Final pthreads */
14558         pthread_attr_t attr;
14559
14560         status = pthread_attr_init(&attr);
14561         if( status ) return status;
14562
14563 #if HAVE_PTHREADS < 7
14564         status = pthread_attr_setdetachstate(&attr, &detach);
14565         if( status < 0 ) status = errno;
14566 #else
14567         status = pthread_attr_setdetachstate(&attr, detach);
14568 #endif
14569         if( status ) return status;
14570         status = pthread_create( &t, &attr, task, NULL );
14571 #if HAVE_PTHREADS < 7
14572         if( status < 0 ) status = errno;
14573 #endif
14574         if( status ) return status;
14575 #else
14576         /* Draft 4 pthreads */
14577         status = pthread_create( &t, pthread_attr_default, task, NULL );
14578         if( status ) return errno;
14579
14580         /* give thread a chance to complete */
14581         /* it should remain joinable and hence detachable */
14582         sleep( 1 );
14583
14584         status = pthread_detach( &t );
14585         if( status ) return errno;
14586 #endif
14587
14588 #ifdef HAVE_LINUX_THREADS
14589         pthread_kill_other_threads_np();
14590 #endif
14591
14592         return 0;
14593
14594 }
14595
14596 EOF
14597 if { (eval echo configure:14598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14598 then
14599   ol_cv_pthread_lib_lpthreads=yes
14600 else
14601   echo "configure: failed program was:" >&5
14602   cat conftest.$ac_ext >&5
14603   rm -fr conftest*
14604   ol_cv_pthread_lib_lpthreads=no
14605 fi
14606 rm -fr conftest*
14607 fi
14608
14609
14610                 # restore the LIBS
14611                 LIBS="$ol_LIBS"
14612         
14613 fi
14614
14615 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14616
14617         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14618                 ol_link_pthreads="-lpthreads"
14619                 ol_link_threads=posix
14620         fi
14621 fi
14622
14623
14624                 if test $ol_link_threads != no ; then
14625                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14626
14627                                                 save_CPPFLAGS="$CPPFLAGS"
14628                         save_LIBS="$LIBS"
14629                         LIBS="$LTHREAD_LIBS $LIBS"
14630
14631                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14632 do
14633 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14634 echo "configure:14635: checking for $ac_func" >&5
14635 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14636   echo $ac_n "(cached) $ac_c" 1>&6
14637 else
14638   cat > conftest.$ac_ext <<EOF
14639 #line 14640 "configure"
14640 #include "confdefs.h"
14641 /* System header to define __stub macros and hopefully few prototypes,
14642     which can conflict with char $ac_func(); below.  */
14643 #include <assert.h>
14644 /* Override any gcc2 internal prototype to avoid an error.  */
14645 /* We use char because int might match the return type of a gcc2
14646     builtin and then its argument prototype would still apply.  */
14647 char $ac_func();
14648 char (*f)();
14649
14650 int main() {
14651
14652 /* The GNU C library defines this for functions which it implements
14653     to always fail with ENOSYS.  Some functions are actually named
14654     something starting with __ and the normal name is an alias.  */
14655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14656 choke me
14657 #else
14658 f = $ac_func;
14659 #endif
14660
14661 ; return 0; }
14662 EOF
14663 if { (eval echo configure:14664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14664   rm -rf conftest*
14665   eval "ac_cv_func_$ac_func=yes"
14666 else
14667   echo "configure: failed program was:" >&5
14668   cat conftest.$ac_ext >&5
14669   rm -rf conftest*
14670   eval "ac_cv_func_$ac_func=no"
14671 fi
14672 rm -f conftest*
14673 fi
14674
14675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14676   echo "$ac_t""yes" 1>&6
14677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14678   cat >> confdefs.h <<EOF
14679 #define $ac_tr_func 1
14680 EOF
14681  
14682 else
14683   echo "$ac_t""no" 1>&6
14684 fi
14685 done
14686
14687
14688                         if test $ac_cv_func_sched_yield = no -a \
14689                                 $ac_cv_func_pthread_yield = no -a \
14690                                 $ac_cv_func_thr_yield = no ; then
14691                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14692 echo "configure:14693: checking for sched_yield in -lrt" >&5
14693 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14695   echo $ac_n "(cached) $ac_c" 1>&6
14696 else
14697   ac_save_LIBS="$LIBS"
14698 LIBS="-lrt  $LIBS"
14699 cat > conftest.$ac_ext <<EOF
14700 #line 14701 "configure"
14701 #include "confdefs.h"
14702 /* Override any gcc2 internal prototype to avoid an error.  */
14703 /* We use char because int might match the return type of a gcc2
14704     builtin and then its argument prototype would still apply.  */
14705 char sched_yield();
14706
14707 int main() {
14708 sched_yield()
14709 ; return 0; }
14710 EOF
14711 if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14712   rm -rf conftest*
14713   eval "ac_cv_lib_$ac_lib_var=yes"
14714 else
14715   echo "configure: failed program was:" >&5
14716   cat conftest.$ac_ext >&5
14717   rm -rf conftest*
14718   eval "ac_cv_lib_$ac_lib_var=no"
14719 fi
14720 rm -f conftest*
14721 LIBS="$ac_save_LIBS"
14722
14723 fi
14724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14725   echo "$ac_t""yes" 1>&6
14726   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14727                                         cat >> confdefs.h <<\EOF
14728 #define HAVE_SCHED_YIELD 1
14729 EOF
14730
14731                                         ac_cv_func_sched_yield=yes
14732 else
14733   echo "$ac_t""no" 1>&6
14734 ac_cv_func_sched_yield=no
14735 fi
14736
14737                         fi
14738                         if test $ac_cv_func_sched_yield = no -a \
14739                                 $ac_cv_func_pthread_yield = no -a \
14740                                 "$ac_cv_func_thr_yield" = no ; then
14741                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14742                         fi
14743
14744                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14745 do
14746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14747 echo "configure:14748: checking for $ac_func" >&5
14748 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14749   echo $ac_n "(cached) $ac_c" 1>&6
14750 else
14751   cat > conftest.$ac_ext <<EOF
14752 #line 14753 "configure"
14753 #include "confdefs.h"
14754 /* System header to define __stub macros and hopefully few prototypes,
14755     which can conflict with char $ac_func(); below.  */
14756 #include <assert.h>
14757 /* Override any gcc2 internal prototype to avoid an error.  */
14758 /* We use char because int might match the return type of a gcc2
14759     builtin and then its argument prototype would still apply.  */
14760 char $ac_func();
14761 char (*f)();
14762
14763 int main() {
14764
14765 /* The GNU C library defines this for functions which it implements
14766     to always fail with ENOSYS.  Some functions are actually named
14767     something starting with __ and the normal name is an alias.  */
14768 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14769 choke me
14770 #else
14771 f = $ac_func;
14772 #endif
14773
14774 ; return 0; }
14775 EOF
14776 if { (eval echo configure:14777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14777   rm -rf conftest*
14778   eval "ac_cv_func_$ac_func=yes"
14779 else
14780   echo "configure: failed program was:" >&5
14781   cat conftest.$ac_ext >&5
14782   rm -rf conftest*
14783   eval "ac_cv_func_$ac_func=no"
14784 fi
14785 rm -f conftest*
14786 fi
14787
14788 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14789   echo "$ac_t""yes" 1>&6
14790     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14791   cat >> confdefs.h <<EOF
14792 #define $ac_tr_func 1
14793 EOF
14794  
14795 else
14796   echo "$ac_t""no" 1>&6
14797 fi
14798 done
14799
14800
14801                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14802 echo "configure:14803: checking for pthread_detach with <pthread.h>" >&5
14803 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14804   echo $ac_n "(cached) $ac_c" 1>&6
14805 else
14806   
14807                                                                 cat > conftest.$ac_ext <<EOF
14808 #line 14809 "configure"
14809 #include "confdefs.h"
14810
14811 #include <pthread.h>
14812 #ifndef NULL
14813 #define NULL (void*)0
14814 #endif
14815
14816 int main() {
14817 pthread_detach(NULL);
14818 ; return 0; }
14819 EOF
14820 if { (eval echo configure:14821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14821   rm -rf conftest*
14822   ol_cv_func_pthread_detach=yes
14823 else
14824   echo "configure: failed program was:" >&5
14825   cat conftest.$ac_ext >&5
14826   rm -rf conftest*
14827   ol_cv_func_pthread_detach=no
14828 fi
14829 rm -f conftest*
14830                         
14831 fi
14832
14833 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14834
14835                         if test $ol_cv_func_pthread_detach = no ; then
14836                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14837                         fi
14838
14839                         cat >> confdefs.h <<\EOF
14840 #define HAVE_PTHREAD_DETACH 1
14841 EOF
14842
14843
14844                                                 for ac_func in \
14845                                 pthread_setconcurrency \
14846                                 pthread_getconcurrency \
14847                                 thr_setconcurrency \
14848                                 thr_getconcurrency \
14849                         
14850 do
14851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14852 echo "configure:14853: checking for $ac_func" >&5
14853 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14854   echo $ac_n "(cached) $ac_c" 1>&6
14855 else
14856   cat > conftest.$ac_ext <<EOF
14857 #line 14858 "configure"
14858 #include "confdefs.h"
14859 /* System header to define __stub macros and hopefully few prototypes,
14860     which can conflict with char $ac_func(); below.  */
14861 #include <assert.h>
14862 /* Override any gcc2 internal prototype to avoid an error.  */
14863 /* We use char because int might match the return type of a gcc2
14864     builtin and then its argument prototype would still apply.  */
14865 char $ac_func();
14866 char (*f)();
14867
14868 int main() {
14869
14870 /* The GNU C library defines this for functions which it implements
14871     to always fail with ENOSYS.  Some functions are actually named
14872     something starting with __ and the normal name is an alias.  */
14873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14874 choke me
14875 #else
14876 f = $ac_func;
14877 #endif
14878
14879 ; return 0; }
14880 EOF
14881 if { (eval echo configure:14882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14882   rm -rf conftest*
14883   eval "ac_cv_func_$ac_func=yes"
14884 else
14885   echo "configure: failed program was:" >&5
14886   cat conftest.$ac_ext >&5
14887   rm -rf conftest*
14888   eval "ac_cv_func_$ac_func=no"
14889 fi
14890 rm -f conftest*
14891 fi
14892
14893 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14894   echo "$ac_t""yes" 1>&6
14895     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14896   cat >> confdefs.h <<EOF
14897 #define $ac_tr_func 1
14898 EOF
14899  
14900 else
14901   echo "$ac_t""no" 1>&6
14902 fi
14903 done
14904
14905
14906                         
14907         for ac_func in pthread_kill_other_threads_np
14908 do
14909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14910 echo "configure:14911: checking for $ac_func" >&5
14911 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14912   echo $ac_n "(cached) $ac_c" 1>&6
14913 else
14914   cat > conftest.$ac_ext <<EOF
14915 #line 14916 "configure"
14916 #include "confdefs.h"
14917 /* System header to define __stub macros and hopefully few prototypes,
14918     which can conflict with char $ac_func(); below.  */
14919 #include <assert.h>
14920 /* Override any gcc2 internal prototype to avoid an error.  */
14921 /* We use char because int might match the return type of a gcc2
14922     builtin and then its argument prototype would still apply.  */
14923 char $ac_func();
14924 char (*f)();
14925
14926 int main() {
14927
14928 /* The GNU C library defines this for functions which it implements
14929     to always fail with ENOSYS.  Some functions are actually named
14930     something starting with __ and the normal name is an alias.  */
14931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14932 choke me
14933 #else
14934 f = $ac_func;
14935 #endif
14936
14937 ; return 0; }
14938 EOF
14939 if { (eval echo configure:14940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14940   rm -rf conftest*
14941   eval "ac_cv_func_$ac_func=yes"
14942 else
14943   echo "configure: failed program was:" >&5
14944   cat conftest.$ac_ext >&5
14945   rm -rf conftest*
14946   eval "ac_cv_func_$ac_func=no"
14947 fi
14948 rm -f conftest*
14949 fi
14950
14951 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14952   echo "$ac_t""yes" 1>&6
14953     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14954   cat >> confdefs.h <<EOF
14955 #define $ac_tr_func 1
14956 EOF
14957  
14958 else
14959   echo "$ac_t""no" 1>&6
14960 fi
14961 done
14962
14963         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14964 echo "configure:14965: checking for LinuxThreads implementation" >&5
14965 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14966   echo $ac_n "(cached) $ac_c" 1>&6
14967 else
14968   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14969 fi
14970
14971 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14972
14973                         
14974         
14975         
14976         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14977 echo "configure:14978: checking for LinuxThreads consistency" >&5
14978 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14979   echo $ac_n "(cached) $ac_c" 1>&6
14980 else
14981   
14982                 if test $ol_cv_header_linux_threads = yes -a \
14983                         $ol_cv_sys_linux_threads = yes; then
14984                         ol_cv_linux_threads=yes
14985                 elif test $ol_cv_header_linux_threads = no -a \
14986                         $ol_cv_sys_linux_threads = no; then
14987                         ol_cv_linux_threads=no
14988                 else
14989                         ol_cv_linux_threads=error
14990                 fi
14991         
14992 fi
14993
14994 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14995
14996
14997                         if test $ol_cv_linux_threads = error; then
14998                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14999                         fi
15000
15001                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15002 echo "configure:15003: checking if pthread_create() works" >&5
15003 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15004   echo $ac_n "(cached) $ac_c" 1>&6
15005 else
15006   
15007                         if test "$cross_compiling" = yes; then
15008                                 ol_cv_pthread_create_works=yes
15009 else
15010   cat > conftest.$ac_ext <<EOF
15011 #line 15012 "configure"
15012 #include "confdefs.h"
15013 /* pthread test headers */
15014 #include <pthread.h>
15015 #if HAVE_PTHREADS < 7
15016 #include <errno.h>
15017 #endif
15018 #ifndef NULL
15019 #define NULL (void*)0
15020 #endif
15021
15022 static void *task(p)
15023         void *p;
15024 {
15025         return (void *) (p == NULL);
15026 }
15027
15028
15029 int main(argc, argv)
15030         int argc;
15031         char **argv;
15032 {
15033
15034         /* pthread test function */
15035 #ifndef PTHREAD_CREATE_DETACHED
15036 #define PTHREAD_CREATE_DETACHED 1
15037 #endif
15038         pthread_t t;
15039         int status;
15040         int detach = PTHREAD_CREATE_DETACHED;
15041
15042 #if HAVE_PTHREADS > 4
15043         /* Final pthreads */
15044         pthread_attr_t attr;
15045
15046         status = pthread_attr_init(&attr);
15047         if( status ) return status;
15048
15049 #if HAVE_PTHREADS < 7
15050         status = pthread_attr_setdetachstate(&attr, &detach);
15051         if( status < 0 ) status = errno;
15052 #else
15053         status = pthread_attr_setdetachstate(&attr, detach);
15054 #endif
15055         if( status ) return status;
15056         status = pthread_create( &t, &attr, task, NULL );
15057 #if HAVE_PTHREADS < 7
15058         if( status < 0 ) status = errno;
15059 #endif
15060         if( status ) return status;
15061 #else
15062         /* Draft 4 pthreads */
15063         status = pthread_create( &t, pthread_attr_default, task, NULL );
15064         if( status ) return errno;
15065
15066         /* give thread a chance to complete */
15067         /* it should remain joinable and hence detachable */
15068         sleep( 1 );
15069
15070         status = pthread_detach( &t );
15071         if( status ) return errno;
15072 #endif
15073
15074 #ifdef HAVE_LINUX_THREADS
15075         pthread_kill_other_threads_np();
15076 #endif
15077
15078         return 0;
15079
15080 }
15081
15082 EOF
15083 if { (eval echo configure:15084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15084 then
15085   ol_cv_pthread_create_works=yes
15086 else
15087   echo "configure: failed program was:" >&5
15088   cat conftest.$ac_ext >&5
15089   rm -fr conftest*
15090   ol_cv_pthread_create_works=no
15091 fi
15092 rm -fr conftest*
15093 fi
15094
15095 fi
15096
15097 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15098
15099                         if test $ol_cv_pthread_create_works = no ; then
15100                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15101                         fi
15102
15103                                                 if test $ol_with_yielding_select = auto ; then
15104                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15105 echo "configure:15106: checking if select yields when using pthreads" >&5
15106 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15107   echo $ac_n "(cached) $ac_c" 1>&6
15108 else
15109   
15110                                 if test "$cross_compiling" = yes; then
15111   ol_cv_pthread_select_yields=cross
15112 else
15113   cat > conftest.$ac_ext <<EOF
15114 #line 15115 "configure"
15115 #include "confdefs.h"
15116
15117 #include <sys/types.h>
15118 #include <sys/time.h>
15119 #include <unistd.h>
15120 #include <pthread.h>
15121 #ifndef NULL
15122 #define NULL (void*) 0
15123 #endif
15124
15125 static int fildes[2];
15126
15127 static void *task(p)
15128         void *p;
15129 {
15130         int i;
15131         struct timeval tv;
15132
15133         fd_set rfds;
15134
15135         tv.tv_sec=10;
15136         tv.tv_usec=0;
15137
15138         FD_ZERO(&rfds);
15139         FD_SET(fildes[0], &rfds);
15140
15141         /* we're not interested in any fds */
15142         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15143
15144         if(i < 0) {
15145                 perror("select");
15146                 exit(10);
15147         }
15148
15149         exit(0); /* if we exit here, the select blocked the whole process */
15150 }
15151
15152 int main(argc, argv)
15153         int argc;
15154         char **argv;
15155 {
15156         pthread_t t;
15157
15158         /* create a pipe to select */
15159         if(pipe(&fildes[0])) {
15160                 perror("select");
15161                 exit(1);
15162         }
15163
15164 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15165         (void) pthread_setconcurrency(2);
15166 #else
15167 #ifdef HAVE_THR_SETCONCURRENCY
15168         /* Set Solaris LWP concurrency to 2 */
15169         thr_setconcurrency(2);
15170 #endif
15171 #endif
15172
15173 #if HAVE_PTHREADS < 6
15174         pthread_create(&t, pthread_attr_default, task, NULL);
15175 #else
15176         pthread_create(&t, NULL, task, NULL);
15177 #endif
15178
15179         /* make sure task runs first */
15180 #if HAVE_THR_YIELD
15181         thr_yield();
15182 #elif defined( HAVE_SCHED_YIELD )
15183         sched_yield();
15184 #elif defined( HAVE_PTHREAD_YIELD )
15185         pthread_yield();
15186 #endif
15187
15188         exit(2);
15189 }
15190 EOF
15191 if { (eval echo configure:15192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15192 then
15193   ol_cv_pthread_select_yields=no
15194 else
15195   echo "configure: failed program was:" >&5
15196   cat conftest.$ac_ext >&5
15197   rm -fr conftest*
15198   ol_cv_pthread_select_yields=yes
15199 fi
15200 rm -fr conftest*
15201 fi
15202
15203 fi
15204
15205 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15206
15207                                 if test $ol_cv_pthread_select_yields = cross ; then
15208                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15209                                 fi
15210
15211                                 if test $ol_cv_pthread_select_yields = yes ; then
15212                                         ol_with_yielding_select=yes
15213                                 fi
15214                         fi
15215
15216                                                 CPPFLAGS="$save_CPPFLAGS"
15217                         LIBS="$save_LIBS"
15218                 else
15219                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15220                 fi
15221         fi
15222
15223         if test $ol_with_threads = posix ; then
15224                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15225         fi
15226 fi
15227
15228 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15229         -o $ol_with_threads = mach ; then
15230
15231                 for ac_hdr in mach/cthreads.h cthreads.h
15232 do
15233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15235 echo "configure:15236: checking for $ac_hdr" >&5
15236 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15237   echo $ac_n "(cached) $ac_c" 1>&6
15238 else
15239   cat > conftest.$ac_ext <<EOF
15240 #line 15241 "configure"
15241 #include "confdefs.h"
15242 #include <$ac_hdr>
15243 EOF
15244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15245 { (eval echo configure:15246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15247 if test -z "$ac_err"; then
15248   rm -rf conftest*
15249   eval "ac_cv_header_$ac_safe=yes"
15250 else
15251   echo "$ac_err" >&5
15252   echo "configure: failed program was:" >&5
15253   cat conftest.$ac_ext >&5
15254   rm -rf conftest*
15255   eval "ac_cv_header_$ac_safe=no"
15256 fi
15257 rm -f conftest*
15258 fi
15259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15260   echo "$ac_t""yes" 1>&6
15261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15262   cat >> confdefs.h <<EOF
15263 #define $ac_tr_hdr 1
15264 EOF
15265  
15266 else
15267   echo "$ac_t""no" 1>&6
15268 fi
15269 done
15270
15271         if test $ac_cv_header_mach_cthreads_h = yes ; then
15272                 ol_with_threads=found
15273
15274                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15275 echo "configure:15276: checking for cthread_fork" >&5
15276 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15277   echo $ac_n "(cached) $ac_c" 1>&6
15278 else
15279   cat > conftest.$ac_ext <<EOF
15280 #line 15281 "configure"
15281 #include "confdefs.h"
15282 /* System header to define __stub macros and hopefully few prototypes,
15283     which can conflict with char cthread_fork(); below.  */
15284 #include <assert.h>
15285 /* Override any gcc2 internal prototype to avoid an error.  */
15286 /* We use char because int might match the return type of a gcc2
15287     builtin and then its argument prototype would still apply.  */
15288 char cthread_fork();
15289 char (*f)();
15290
15291 int main() {
15292
15293 /* The GNU C library defines this for functions which it implements
15294     to always fail with ENOSYS.  Some functions are actually named
15295     something starting with __ and the normal name is an alias.  */
15296 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15297 choke me
15298 #else
15299 f = cthread_fork;
15300 #endif
15301
15302 ; return 0; }
15303 EOF
15304 if { (eval echo configure:15305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15305   rm -rf conftest*
15306   eval "ac_cv_func_cthread_fork=yes"
15307 else
15308   echo "configure: failed program was:" >&5
15309   cat conftest.$ac_ext >&5
15310   rm -rf conftest*
15311   eval "ac_cv_func_cthread_fork=no"
15312 fi
15313 rm -f conftest*
15314 fi
15315
15316 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15317   echo "$ac_t""yes" 1>&6
15318   ol_link_threads=yes
15319 else
15320   echo "$ac_t""no" 1>&6
15321 fi
15322
15323
15324                 if test $ol_link_threads = no ; then
15325                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15326 echo "configure:15327: checking for cthread_fork with -all_load" >&5
15327 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15328   echo $ac_n "(cached) $ac_c" 1>&6
15329 else
15330   
15331                                                                 save_LIBS="$LIBS"
15332                                 LIBS="-all_load $LIBS"
15333                                 cat > conftest.$ac_ext <<EOF
15334 #line 15335 "configure"
15335 #include "confdefs.h"
15336 #include <mach/cthreads.h>
15337 int main() {
15338
15339                                         cthread_fork((void *)0, (void *)0);
15340                                         
15341 ; return 0; }
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15344   rm -rf conftest*
15345   ol_cv_cthread_all_load=yes
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   ol_cv_cthread_all_load=no
15351 fi
15352 rm -f conftest*
15353                                                                 LIBS="$save_LIBS"
15354                         
15355 fi
15356
15357 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15358
15359                         if test $ol_cv_cthread_all_load = yes ; then
15360                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15361                                 ol_link_threads=mach
15362                                 ol_with_threads=found
15363                         fi
15364                 fi
15365
15366         elif test $ac_cv_header_cthreads_h = yes ; then
15367                                 
15368                 ol_with_threads=found
15369  
15370                                 save_LIBS="$LIBS"
15371                 LIBS="$LIBS -lthreads"
15372                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15373 echo "configure:15374: checking for cthread_fork" >&5
15374 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15375   echo $ac_n "(cached) $ac_c" 1>&6
15376 else
15377   cat > conftest.$ac_ext <<EOF
15378 #line 15379 "configure"
15379 #include "confdefs.h"
15380 /* System header to define __stub macros and hopefully few prototypes,
15381     which can conflict with char cthread_fork(); below.  */
15382 #include <assert.h>
15383 /* Override any gcc2 internal prototype to avoid an error.  */
15384 /* We use char because int might match the return type of a gcc2
15385     builtin and then its argument prototype would still apply.  */
15386 char cthread_fork();
15387 char (*f)();
15388
15389 int main() {
15390
15391 /* The GNU C library defines this for functions which it implements
15392     to always fail with ENOSYS.  Some functions are actually named
15393     something starting with __ and the normal name is an alias.  */
15394 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15395 choke me
15396 #else
15397 f = cthread_fork;
15398 #endif
15399
15400 ; return 0; }
15401 EOF
15402 if { (eval echo configure:15403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15403   rm -rf conftest*
15404   eval "ac_cv_func_cthread_fork=yes"
15405 else
15406   echo "configure: failed program was:" >&5
15407   cat conftest.$ac_ext >&5
15408   rm -rf conftest*
15409   eval "ac_cv_func_cthread_fork=no"
15410 fi
15411 rm -f conftest*
15412 fi
15413
15414 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15415   echo "$ac_t""yes" 1>&6
15416   ol_link_threads=yes
15417 else
15418   echo "$ac_t""no" 1>&6
15419 fi
15420
15421                 LIBS="$save_LIBS"
15422
15423                 if test $ol_link_threads = yes ; then
15424                         LTHREAD_LIBS="-lthreads"
15425                         ol_link_threads=mach
15426                         ol_with_threads=found
15427                 else
15428                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15429                 fi
15430
15431         elif test $ol_with_threads = mach ; then
15432                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15433         fi
15434
15435         if test $ol_link_threads = mach ; then
15436                 cat >> confdefs.h <<\EOF
15437 #define HAVE_MACH_CTHREADS 1
15438 EOF
15439
15440         elif test $ol_with_threads = found ; then
15441                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15442         fi
15443 fi
15444
15445 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15446         -o $ol_with_threads = pth ; then
15447
15448         for ac_hdr in pth.h
15449 do
15450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15452 echo "configure:15453: checking for $ac_hdr" >&5
15453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 #include <$ac_hdr>
15460 EOF
15461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15462 { (eval echo configure:15463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15464 if test -z "$ac_err"; then
15465   rm -rf conftest*
15466   eval "ac_cv_header_$ac_safe=yes"
15467 else
15468   echo "$ac_err" >&5
15469   echo "configure: failed program was:" >&5
15470   cat conftest.$ac_ext >&5
15471   rm -rf conftest*
15472   eval "ac_cv_header_$ac_safe=no"
15473 fi
15474 rm -f conftest*
15475 fi
15476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15479   cat >> confdefs.h <<EOF
15480 #define $ac_tr_hdr 1
15481 EOF
15482  
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486 done
15487
15488
15489         if test $ac_cv_header_pth_h = yes ; then
15490                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15491 echo "configure:15492: checking for pth_version in -lpth" >&5
15492 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15494   echo $ac_n "(cached) $ac_c" 1>&6
15495 else
15496   ac_save_LIBS="$LIBS"
15497 LIBS="-lpth  $LIBS"
15498 cat > conftest.$ac_ext <<EOF
15499 #line 15500 "configure"
15500 #include "confdefs.h"
15501 /* Override any gcc2 internal prototype to avoid an error.  */
15502 /* We use char because int might match the return type of a gcc2
15503     builtin and then its argument prototype would still apply.  */
15504 char pth_version();
15505
15506 int main() {
15507 pth_version()
15508 ; return 0; }
15509 EOF
15510 if { (eval echo configure:15511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15511   rm -rf conftest*
15512   eval "ac_cv_lib_$ac_lib_var=yes"
15513 else
15514   echo "configure: failed program was:" >&5
15515   cat conftest.$ac_ext >&5
15516   rm -rf conftest*
15517   eval "ac_cv_lib_$ac_lib_var=no"
15518 fi
15519 rm -f conftest*
15520 LIBS="$ac_save_LIBS"
15521
15522 fi
15523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15524   echo "$ac_t""yes" 1>&6
15525   have_pth=yes
15526 else
15527   echo "$ac_t""no" 1>&6
15528 have_pth=no
15529 fi
15530
15531
15532                 if test $have_pth = yes ; then
15533                         cat >> confdefs.h <<\EOF
15534 #define HAVE_GNU_PTH 1
15535 EOF
15536
15537                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15538                         ol_link_threads=pth
15539                         ol_with_threads=found
15540
15541                         if test $ol_with_yielding_select = auto ; then
15542                                 ol_with_yielding_select=yes
15543                         fi
15544                 fi
15545         fi
15546 fi
15547
15548 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15549         -o $ol_with_threads = lwp ; then
15550
15551                 for ac_hdr in thread.h synch.h
15552 do
15553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15555 echo "configure:15556: checking for $ac_hdr" >&5
15556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15557   echo $ac_n "(cached) $ac_c" 1>&6
15558 else
15559   cat > conftest.$ac_ext <<EOF
15560 #line 15561 "configure"
15561 #include "confdefs.h"
15562 #include <$ac_hdr>
15563 EOF
15564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15565 { (eval echo configure:15566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15567 if test -z "$ac_err"; then
15568   rm -rf conftest*
15569   eval "ac_cv_header_$ac_safe=yes"
15570 else
15571   echo "$ac_err" >&5
15572   echo "configure: failed program was:" >&5
15573   cat conftest.$ac_ext >&5
15574   rm -rf conftest*
15575   eval "ac_cv_header_$ac_safe=no"
15576 fi
15577 rm -f conftest*
15578 fi
15579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15580   echo "$ac_t""yes" 1>&6
15581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15582   cat >> confdefs.h <<EOF
15583 #define $ac_tr_hdr 1
15584 EOF
15585  
15586 else
15587   echo "$ac_t""no" 1>&6
15588 fi
15589 done
15590
15591         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15592                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15593 echo "configure:15594: checking for thr_create in -lthread" >&5
15594 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15596   echo $ac_n "(cached) $ac_c" 1>&6
15597 else
15598   ac_save_LIBS="$LIBS"
15599 LIBS="-lthread  $LIBS"
15600 cat > conftest.$ac_ext <<EOF
15601 #line 15602 "configure"
15602 #include "confdefs.h"
15603 /* Override any gcc2 internal prototype to avoid an error.  */
15604 /* We use char because int might match the return type of a gcc2
15605     builtin and then its argument prototype would still apply.  */
15606 char thr_create();
15607
15608 int main() {
15609 thr_create()
15610 ; return 0; }
15611 EOF
15612 if { (eval echo configure:15613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15613   rm -rf conftest*
15614   eval "ac_cv_lib_$ac_lib_var=yes"
15615 else
15616   echo "configure: failed program was:" >&5
15617   cat conftest.$ac_ext >&5
15618   rm -rf conftest*
15619   eval "ac_cv_lib_$ac_lib_var=no"
15620 fi
15621 rm -f conftest*
15622 LIBS="$ac_save_LIBS"
15623
15624 fi
15625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15626   echo "$ac_t""yes" 1>&6
15627   have_thr=yes
15628 else
15629   echo "$ac_t""no" 1>&6
15630 have_thr=no
15631 fi
15632
15633
15634                 if test $have_thr = yes ; then
15635                         cat >> confdefs.h <<\EOF
15636 #define HAVE_THR 1
15637 EOF
15638
15639                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15640                         ol_link_threads=thr
15641
15642                         if test $ol_with_yielding_select = auto ; then
15643                                 ol_with_yielding_select=yes
15644                         fi
15645
15646                                                 for ac_func in \
15647                                 thr_setconcurrency \
15648                                 thr_getconcurrency \
15649                         
15650 do
15651 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15652 echo "configure:15653: checking for $ac_func" >&5
15653 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15654   echo $ac_n "(cached) $ac_c" 1>&6
15655 else
15656   cat > conftest.$ac_ext <<EOF
15657 #line 15658 "configure"
15658 #include "confdefs.h"
15659 /* System header to define __stub macros and hopefully few prototypes,
15660     which can conflict with char $ac_func(); below.  */
15661 #include <assert.h>
15662 /* Override any gcc2 internal prototype to avoid an error.  */
15663 /* We use char because int might match the return type of a gcc2
15664     builtin and then its argument prototype would still apply.  */
15665 char $ac_func();
15666 char (*f)();
15667
15668 int main() {
15669
15670 /* The GNU C library defines this for functions which it implements
15671     to always fail with ENOSYS.  Some functions are actually named
15672     something starting with __ and the normal name is an alias.  */
15673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15674 choke me
15675 #else
15676 f = $ac_func;
15677 #endif
15678
15679 ; return 0; }
15680 EOF
15681 if { (eval echo configure:15682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15682   rm -rf conftest*
15683   eval "ac_cv_func_$ac_func=yes"
15684 else
15685   echo "configure: failed program was:" >&5
15686   cat conftest.$ac_ext >&5
15687   rm -rf conftest*
15688   eval "ac_cv_func_$ac_func=no"
15689 fi
15690 rm -f conftest*
15691 fi
15692
15693 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15694   echo "$ac_t""yes" 1>&6
15695     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15696   cat >> confdefs.h <<EOF
15697 #define $ac_tr_func 1
15698 EOF
15699  
15700 else
15701   echo "$ac_t""no" 1>&6
15702 fi
15703 done
15704
15705                 fi
15706         fi
15707
15708                 for ac_hdr in lwp/lwp.h
15709 do
15710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15712 echo "configure:15713: checking for $ac_hdr" >&5
15713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15714   echo $ac_n "(cached) $ac_c" 1>&6
15715 else
15716   cat > conftest.$ac_ext <<EOF
15717 #line 15718 "configure"
15718 #include "confdefs.h"
15719 #include <$ac_hdr>
15720 EOF
15721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15722 { (eval echo configure:15723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15724 if test -z "$ac_err"; then
15725   rm -rf conftest*
15726   eval "ac_cv_header_$ac_safe=yes"
15727 else
15728   echo "$ac_err" >&5
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   eval "ac_cv_header_$ac_safe=no"
15733 fi
15734 rm -f conftest*
15735 fi
15736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15737   echo "$ac_t""yes" 1>&6
15738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15739   cat >> confdefs.h <<EOF
15740 #define $ac_tr_hdr 1
15741 EOF
15742  
15743 else
15744   echo "$ac_t""no" 1>&6
15745 fi
15746 done
15747
15748         if test $ac_cv_header_lwp_lwp_h = yes ; then
15749                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15750 echo "configure:15751: checking for lwp_create in -llwp" >&5
15751 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15753   echo $ac_n "(cached) $ac_c" 1>&6
15754 else
15755   ac_save_LIBS="$LIBS"
15756 LIBS="-llwp  $LIBS"
15757 cat > conftest.$ac_ext <<EOF
15758 #line 15759 "configure"
15759 #include "confdefs.h"
15760 /* Override any gcc2 internal prototype to avoid an error.  */
15761 /* We use char because int might match the return type of a gcc2
15762     builtin and then its argument prototype would still apply.  */
15763 char lwp_create();
15764
15765 int main() {
15766 lwp_create()
15767 ; return 0; }
15768 EOF
15769 if { (eval echo configure:15770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15770   rm -rf conftest*
15771   eval "ac_cv_lib_$ac_lib_var=yes"
15772 else
15773   echo "configure: failed program was:" >&5
15774   cat conftest.$ac_ext >&5
15775   rm -rf conftest*
15776   eval "ac_cv_lib_$ac_lib_var=no"
15777 fi
15778 rm -f conftest*
15779 LIBS="$ac_save_LIBS"
15780
15781 fi
15782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15783   echo "$ac_t""yes" 1>&6
15784   have_lwp=yes
15785 else
15786   echo "$ac_t""no" 1>&6
15787 have_lwp=no
15788 fi
15789
15790
15791                 if test $have_lwp = yes ; then
15792                         cat >> confdefs.h <<\EOF
15793 #define HAVE_LWP 1
15794 EOF
15795
15796                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15797                         ol_link_threads=lwp
15798
15799                         if test $ol_with_yielding_select = auto ; then
15800                                 ol_with_yielding_select=no
15801                         fi
15802                 fi
15803         fi
15804 fi
15805
15806 if test $ol_with_yielding_select = yes ; then
15807         cat >> confdefs.h <<\EOF
15808 #define HAVE_YIELDING_SELECT 1
15809 EOF
15810
15811 fi
15812
15813 if test $ol_with_threads = manual ; then
15814                 ol_link_threads=yes
15815
15816         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15817
15818         for ac_hdr in pthread.h sched.h
15819 do
15820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15822 echo "configure:15823: checking for $ac_hdr" >&5
15823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15824   echo $ac_n "(cached) $ac_c" 1>&6
15825 else
15826   cat > conftest.$ac_ext <<EOF
15827 #line 15828 "configure"
15828 #include "confdefs.h"
15829 #include <$ac_hdr>
15830 EOF
15831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15832 { (eval echo configure:15833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15834 if test -z "$ac_err"; then
15835   rm -rf conftest*
15836   eval "ac_cv_header_$ac_safe=yes"
15837 else
15838   echo "$ac_err" >&5
15839   echo "configure: failed program was:" >&5
15840   cat conftest.$ac_ext >&5
15841   rm -rf conftest*
15842   eval "ac_cv_header_$ac_safe=no"
15843 fi
15844 rm -f conftest*
15845 fi
15846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15847   echo "$ac_t""yes" 1>&6
15848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15849   cat >> confdefs.h <<EOF
15850 #define $ac_tr_hdr 1
15851 EOF
15852  
15853 else
15854   echo "$ac_t""no" 1>&6
15855 fi
15856 done
15857
15858         for ac_func in sched_yield pthread_yield
15859 do
15860 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15861 echo "configure:15862: checking for $ac_func" >&5
15862 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15863   echo $ac_n "(cached) $ac_c" 1>&6
15864 else
15865   cat > conftest.$ac_ext <<EOF
15866 #line 15867 "configure"
15867 #include "confdefs.h"
15868 /* System header to define __stub macros and hopefully few prototypes,
15869     which can conflict with char $ac_func(); below.  */
15870 #include <assert.h>
15871 /* Override any gcc2 internal prototype to avoid an error.  */
15872 /* We use char because int might match the return type of a gcc2
15873     builtin and then its argument prototype would still apply.  */
15874 char $ac_func();
15875 char (*f)();
15876
15877 int main() {
15878
15879 /* The GNU C library defines this for functions which it implements
15880     to always fail with ENOSYS.  Some functions are actually named
15881     something starting with __ and the normal name is an alias.  */
15882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15883 choke me
15884 #else
15885 f = $ac_func;
15886 #endif
15887
15888 ; return 0; }
15889 EOF
15890 if { (eval echo configure:15891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15891   rm -rf conftest*
15892   eval "ac_cv_func_$ac_func=yes"
15893 else
15894   echo "configure: failed program was:" >&5
15895   cat conftest.$ac_ext >&5
15896   rm -rf conftest*
15897   eval "ac_cv_func_$ac_func=no"
15898 fi
15899 rm -f conftest*
15900 fi
15901
15902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15903   echo "$ac_t""yes" 1>&6
15904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15905   cat >> confdefs.h <<EOF
15906 #define $ac_tr_func 1
15907 EOF
15908  
15909 else
15910   echo "$ac_t""no" 1>&6
15911 fi
15912 done
15913
15914         
15915         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15916 echo "configure:15917: checking for LinuxThreads pthread.h" >&5
15917 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15918   echo $ac_n "(cached) $ac_c" 1>&6
15919 else
15920   cat > conftest.$ac_ext <<EOF
15921 #line 15922 "configure"
15922 #include "confdefs.h"
15923 #include <pthread.h>
15924 EOF
15925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15926   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15927   rm -rf conftest*
15928   ol_cv_header_linux_threads=yes
15929 else
15930   rm -rf conftest*
15931   ol_cv_header_linux_threads=no
15932 fi
15933 rm -f conftest*
15934
15935                 
15936 fi
15937
15938 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15939         if test $ol_cv_header_linux_threads = yes; then
15940                 cat >> confdefs.h <<\EOF
15941 #define HAVE_LINUX_THREADS 1
15942 EOF
15943
15944         fi
15945
15946
15947         for ac_hdr in mach/cthreads.h
15948 do
15949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15951 echo "configure:15952: checking for $ac_hdr" >&5
15952 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15953   echo $ac_n "(cached) $ac_c" 1>&6
15954 else
15955   cat > conftest.$ac_ext <<EOF
15956 #line 15957 "configure"
15957 #include "confdefs.h"
15958 #include <$ac_hdr>
15959 EOF
15960 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15961 { (eval echo configure:15962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15962 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15963 if test -z "$ac_err"; then
15964   rm -rf conftest*
15965   eval "ac_cv_header_$ac_safe=yes"
15966 else
15967   echo "$ac_err" >&5
15968   echo "configure: failed program was:" >&5
15969   cat conftest.$ac_ext >&5
15970   rm -rf conftest*
15971   eval "ac_cv_header_$ac_safe=no"
15972 fi
15973 rm -f conftest*
15974 fi
15975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15976   echo "$ac_t""yes" 1>&6
15977     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15978   cat >> confdefs.h <<EOF
15979 #define $ac_tr_hdr 1
15980 EOF
15981  
15982 else
15983   echo "$ac_t""no" 1>&6
15984 fi
15985 done
15986
15987         for ac_hdr in lwp/lwp.h
15988 do
15989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15991 echo "configure:15992: checking for $ac_hdr" >&5
15992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15993   echo $ac_n "(cached) $ac_c" 1>&6
15994 else
15995   cat > conftest.$ac_ext <<EOF
15996 #line 15997 "configure"
15997 #include "confdefs.h"
15998 #include <$ac_hdr>
15999 EOF
16000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16001 { (eval echo configure:16002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16003 if test -z "$ac_err"; then
16004   rm -rf conftest*
16005   eval "ac_cv_header_$ac_safe=yes"
16006 else
16007   echo "$ac_err" >&5
16008   echo "configure: failed program was:" >&5
16009   cat conftest.$ac_ext >&5
16010   rm -rf conftest*
16011   eval "ac_cv_header_$ac_safe=no"
16012 fi
16013 rm -f conftest*
16014 fi
16015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16016   echo "$ac_t""yes" 1>&6
16017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16018   cat >> confdefs.h <<EOF
16019 #define $ac_tr_hdr 1
16020 EOF
16021  
16022 else
16023   echo "$ac_t""no" 1>&6
16024 fi
16025 done
16026
16027         for ac_hdr in thread.h synch.h
16028 do
16029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16031 echo "configure:16032: checking for $ac_hdr" >&5
16032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16033   echo $ac_n "(cached) $ac_c" 1>&6
16034 else
16035   cat > conftest.$ac_ext <<EOF
16036 #line 16037 "configure"
16037 #include "confdefs.h"
16038 #include <$ac_hdr>
16039 EOF
16040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16041 { (eval echo configure:16042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16043 if test -z "$ac_err"; then
16044   rm -rf conftest*
16045   eval "ac_cv_header_$ac_safe=yes"
16046 else
16047   echo "$ac_err" >&5
16048   echo "configure: failed program was:" >&5
16049   cat conftest.$ac_ext >&5
16050   rm -rf conftest*
16051   eval "ac_cv_header_$ac_safe=no"
16052 fi
16053 rm -f conftest*
16054 fi
16055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16056   echo "$ac_t""yes" 1>&6
16057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16058   cat >> confdefs.h <<EOF
16059 #define $ac_tr_hdr 1
16060 EOF
16061  
16062 else
16063   echo "$ac_t""no" 1>&6
16064 fi
16065 done
16066
16067 fi
16068
16069 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16070                         cat >> confdefs.h <<\EOF
16071 #define REENTRANT 1
16072 EOF
16073
16074         cat >> confdefs.h <<\EOF
16075 #define _REENTRANT 1
16076 EOF
16077
16078         cat >> confdefs.h <<\EOF
16079 #define THREAD_SAFE 1
16080 EOF
16081
16082         cat >> confdefs.h <<\EOF
16083 #define _THREAD_SAFE 1
16084 EOF
16085
16086         cat >> confdefs.h <<\EOF
16087 #define THREADSAFE 1
16088 EOF
16089
16090         cat >> confdefs.h <<\EOF
16091 #define _THREADSAFE 1
16092 EOF
16093
16094         cat >> confdefs.h <<\EOF
16095 #define _SGI_MP_SOURCE 1
16096 EOF
16097
16098
16099                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16100 echo "configure:16101: checking for thread specific errno" >&5
16101 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16102   echo $ac_n "(cached) $ac_c" 1>&6
16103 else
16104   
16105                 cat > conftest.$ac_ext <<EOF
16106 #line 16107 "configure"
16107 #include "confdefs.h"
16108 #include <errno.h>
16109 int main() {
16110 errno = 0;
16111 ; return 0; }
16112 EOF
16113 if { (eval echo configure:16114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16114   rm -rf conftest*
16115   ol_cv_errno_thread_specific=yes
16116 else
16117   echo "configure: failed program was:" >&5
16118   cat conftest.$ac_ext >&5
16119   rm -rf conftest*
16120   ol_cv_errno_thread_specific=no
16121 fi
16122 rm -f conftest*
16123         
16124 fi
16125
16126 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16127
16128                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16129 echo "configure:16130: checking for thread specific h_errno" >&5
16130 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16131   echo $ac_n "(cached) $ac_c" 1>&6
16132 else
16133   
16134                 cat > conftest.$ac_ext <<EOF
16135 #line 16136 "configure"
16136 #include "confdefs.h"
16137 #include <netdb.h>
16138 int main() {
16139 h_errno = 0;
16140 ; return 0; }
16141 EOF
16142 if { (eval echo configure:16143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16143   rm -rf conftest*
16144   ol_cv_h_errno_thread_specific=yes
16145 else
16146   echo "configure: failed program was:" >&5
16147   cat conftest.$ac_ext >&5
16148   rm -rf conftest*
16149   ol_cv_h_errno_thread_specific=no
16150 fi
16151 rm -f conftest*
16152         
16153 fi
16154
16155 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16156
16157         if test $ol_cv_errno_thread_specific != yes \
16158                 -o $ol_cv_h_errno_thread_specific != yes ; then
16159                 LIBS="$LTHREAD_LIBS $LIBS"
16160                 LTHREAD_LIBS=""
16161         fi
16162
16163 fi  
16164
16165 if test $ol_link_threads = no ; then
16166         if test $ol_with_threads = yes ; then
16167                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16168         fi
16169
16170         if test $ol_with_threads = auto ; then
16171                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16172                 ol_with_threads=no
16173         fi
16174
16175         cat >> confdefs.h <<\EOF
16176 #define NO_THREADS 1
16177 EOF
16178
16179         LTHREAD_LIBS=""
16180 fi
16181
16182 if test $ol_link_threads != no ; then
16183         cat >> confdefs.h <<\EOF
16184 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16185 EOF
16186
16187 fi
16188
16189 for ac_func in \
16190         ctime_r                 \
16191         gethostbyname_r gethostbyaddr_r \
16192
16193 do
16194 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16195 echo "configure:16196: checking for $ac_func" >&5
16196 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16197   echo $ac_n "(cached) $ac_c" 1>&6
16198 else
16199   cat > conftest.$ac_ext <<EOF
16200 #line 16201 "configure"
16201 #include "confdefs.h"
16202 /* System header to define __stub macros and hopefully few prototypes,
16203     which can conflict with char $ac_func(); below.  */
16204 #include <assert.h>
16205 /* Override any gcc2 internal prototype to avoid an error.  */
16206 /* We use char because int might match the return type of a gcc2
16207     builtin and then its argument prototype would still apply.  */
16208 char $ac_func();
16209 char (*f)();
16210
16211 int main() {
16212
16213 /* The GNU C library defines this for functions which it implements
16214     to always fail with ENOSYS.  Some functions are actually named
16215     something starting with __ and the normal name is an alias.  */
16216 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16217 choke me
16218 #else
16219 f = $ac_func;
16220 #endif
16221
16222 ; return 0; }
16223 EOF
16224 if { (eval echo configure:16225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16225   rm -rf conftest*
16226   eval "ac_cv_func_$ac_func=yes"
16227 else
16228   echo "configure: failed program was:" >&5
16229   cat conftest.$ac_ext >&5
16230   rm -rf conftest*
16231   eval "ac_cv_func_$ac_func=no"
16232 fi
16233 rm -f conftest*
16234 fi
16235
16236 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16237   echo "$ac_t""yes" 1>&6
16238     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16239   cat >> confdefs.h <<EOF
16240 #define $ac_tr_func 1
16241 EOF
16242  
16243 else
16244   echo "$ac_t""no" 1>&6
16245 fi
16246 done
16247
16248
16249 if test "$ac_cv_func_ctime_r" = no ; then
16250         ol_cv_func_ctime_r_nargs=0
16251 else
16252         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16253 echo "configure:16254: checking number of arguments of ctime_r" >&5
16254 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16255   echo $ac_n "(cached) $ac_c" 1>&6
16256 else
16257   cat > conftest.$ac_ext <<EOF
16258 #line 16259 "configure"
16259 #include "confdefs.h"
16260 #include <time.h>
16261 int main() {
16262 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16263 ; return 0; }
16264 EOF
16265 if { (eval echo configure:16266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16266   rm -rf conftest*
16267   ol_cv_func_ctime_r_nargs3=yes
16268 else
16269   echo "configure: failed program was:" >&5
16270   cat conftest.$ac_ext >&5
16271   rm -rf conftest*
16272   ol_cv_func_ctime_r_nargs3=no
16273 fi
16274 rm -f conftest*
16275
16276         cat > conftest.$ac_ext <<EOF
16277 #line 16278 "configure"
16278 #include "confdefs.h"
16279 #include <time.h>
16280 int main() {
16281 time_t ti; char *buffer; ctime_r(&ti,buffer);
16282 ; return 0; }
16283 EOF
16284 if { (eval echo configure:16285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16285   rm -rf conftest*
16286   ol_cv_func_ctime_r_nargs2=yes
16287 else
16288   echo "configure: failed program was:" >&5
16289   cat conftest.$ac_ext >&5
16290   rm -rf conftest*
16291   ol_cv_func_ctime_r_nargs2=no
16292 fi
16293 rm -f conftest*
16294
16295         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16296                 $ol_cv_func_ctime_r_nargs2 = no ; then
16297
16298                 ol_cv_func_ctime_r_nargs=3
16299
16300         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16301                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16302
16303                 ol_cv_func_ctime_r_nargs=2
16304
16305         else
16306                 ol_cv_func_ctime_r_nargs=0
16307         fi
16308   
16309 fi
16310
16311 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16312
16313   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16314         cat >> confdefs.h <<EOF
16315 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16316 EOF
16317
16318   fi
16319
16320 fi
16321
16322 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16323         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16324 echo "configure:16325: checking number of arguments of gethostbyname_r" >&5
16325 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   cat > conftest.$ac_ext <<EOF
16329 #line 16330 "configure"
16330 #include "confdefs.h"
16331 #include <sys/types.h>
16332 #include <sys/socket.h>
16333 #include <netinet/in.h>
16334 #include <netdb.h>
16335 #define BUFSIZE (sizeof(struct hostent)+10)
16336 int main() {
16337 struct hostent hent; char buffer[BUFSIZE];
16338                 int bufsize=BUFSIZE;int h_errno;
16339                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16340                         buffer, bufsize, &h_errno);
16341 ; return 0; }
16342 EOF
16343 if { (eval echo configure:16344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16344   rm -rf conftest*
16345   ol_cv_func_gethostbyname_r_nargs5=yes
16346 else
16347   echo "configure: failed program was:" >&5
16348   cat conftest.$ac_ext >&5
16349   rm -rf conftest*
16350   ol_cv_func_gethostbyname_r_nargs5=no
16351 fi
16352 rm -f conftest*
16353
16354         cat > conftest.$ac_ext <<EOF
16355 #line 16356 "configure"
16356 #include "confdefs.h"
16357 #include <sys/types.h>
16358 #include <sys/socket.h>
16359 #include <netinet/in.h>
16360 #include <netdb.h>
16361 #define BUFSIZE (sizeof(struct hostent)+10)
16362 int main() {
16363 struct hostent hent;struct hostent *rhent;
16364                 char buffer[BUFSIZE];
16365                 int bufsize=BUFSIZE;int h_errno;
16366                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16367                         &rhent, &h_errno);
16368 ; return 0; }
16369 EOF
16370 if { (eval echo configure:16371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16371   rm -rf conftest*
16372   ol_cv_func_gethostbyname_r_nargs6=yes
16373 else
16374   echo "configure: failed program was:" >&5
16375   cat conftest.$ac_ext >&5
16376   rm -rf conftest*
16377   ol_cv_func_gethostbyname_r_nargs6=no
16378 fi
16379 rm -f conftest*
16380
16381         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16382                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16383
16384                 ol_cv_func_gethostbyname_r_nargs=5
16385
16386         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16387                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16388
16389                 ol_cv_func_gethostbyname_r_nargs=6
16390
16391         else
16392                 ol_cv_func_gethostbyname_r_nargs=0
16393         fi
16394   
16395 fi
16396
16397 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16398   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16399         cat >> confdefs.h <<EOF
16400 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16401 EOF
16402
16403   fi
16404
16405 else
16406         ol_cv_func_gethostbyname_r_nargs=0
16407 fi
16408  
16409 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16410         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16411 echo "configure:16412: checking number of arguments of gethostbyaddr_r" >&5
16412 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16413   echo $ac_n "(cached) $ac_c" 1>&6
16414 else
16415   cat > conftest.$ac_ext <<EOF
16416 #line 16417 "configure"
16417 #include "confdefs.h"
16418 #include <sys/types.h>
16419 #include <sys/socket.h>
16420 #include <netinet/in.h>
16421 #include <netdb.h>
16422 #define BUFSIZE (sizeof(struct hostent)+10)
16423 int main() {
16424 struct hostent hent; char buffer[BUFSIZE]; 
16425             struct in_addr add;
16426             size_t alen=sizeof(struct in_addr);
16427             int bufsize=BUFSIZE;int h_errno;
16428                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16429                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16430 ; return 0; }
16431 EOF
16432 if { (eval echo configure:16433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16433   rm -rf conftest*
16434   ol_cv_func_gethostbyaddr_r_nargs7=yes
16435 else
16436   echo "configure: failed program was:" >&5
16437   cat conftest.$ac_ext >&5
16438   rm -rf conftest*
16439   ol_cv_func_gethostbyaddr_r_nargs7=no
16440 fi
16441 rm -f conftest*
16442
16443         cat > conftest.$ac_ext <<EOF
16444 #line 16445 "configure"
16445 #include "confdefs.h"
16446 #include <sys/types.h>
16447 #include <sys/socket.h>
16448 #include <netinet/in.h>
16449 #include <netdb.h>
16450 #define BUFSIZE (sizeof(struct hostent)+10)
16451 int main() {
16452 struct hostent hent;
16453                 struct hostent *rhent; char buffer[BUFSIZE]; 
16454                 struct in_addr add;
16455                 size_t alen=sizeof(struct in_addr);
16456                 int bufsize=BUFSIZE;int h_errno;
16457                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16458                         alen, AF_INET, &hent, buffer, bufsize, 
16459                         &rhent, &h_errno);
16460 ; return 0; }
16461 EOF
16462 if { (eval echo configure:16463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16463   rm -rf conftest*
16464   ol_cv_func_gethostbyaddr_r_nargs8=yes
16465 else
16466   echo "configure: failed program was:" >&5
16467   cat conftest.$ac_ext >&5
16468   rm -rf conftest*
16469   ol_cv_func_gethostbyaddr_r_nargs8=no
16470 fi
16471 rm -f conftest*
16472
16473         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16474                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16475
16476                 ol_cv_func_gethostbyaddr_r_nargs=7
16477
16478         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16479                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16480
16481                 ol_cv_func_gethostbyaddr_r_nargs=8
16482
16483         else
16484                 ol_cv_func_gethostbyaddr_r_nargs=0
16485         fi
16486   
16487 fi
16488
16489 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16490   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16491     cat >> confdefs.h <<EOF
16492 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16493 EOF
16494
16495   fi
16496
16497 else
16498         ol_cv_func_gethostbyaddr_r_nargs=0
16499 fi
16500
16501 ol_link_ldbm=no 
16502
16503 if test $ol_with_ldbm_api = auto \
16504         -o $ol_with_ldbm_api = berkeley \
16505         -o $ol_with_ldbm_api = bcompat ; then
16506
16507         if test $ol_with_ldbm_api = bcompat; then \
16508                 for ac_hdr in db_185.h db.h
16509 do
16510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16512 echo "configure:16513: checking for $ac_hdr" >&5
16513 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16514   echo $ac_n "(cached) $ac_c" 1>&6
16515 else
16516   cat > conftest.$ac_ext <<EOF
16517 #line 16518 "configure"
16518 #include "confdefs.h"
16519 #include <$ac_hdr>
16520 EOF
16521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16522 { (eval echo configure:16523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16524 if test -z "$ac_err"; then
16525   rm -rf conftest*
16526   eval "ac_cv_header_$ac_safe=yes"
16527 else
16528   echo "$ac_err" >&5
16529   echo "configure: failed program was:" >&5
16530   cat conftest.$ac_ext >&5
16531   rm -rf conftest*
16532   eval "ac_cv_header_$ac_safe=no"
16533 fi
16534 rm -f conftest*
16535 fi
16536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16537   echo "$ac_t""yes" 1>&6
16538     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16539   cat >> confdefs.h <<EOF
16540 #define $ac_tr_hdr 1
16541 EOF
16542  
16543 else
16544   echo "$ac_t""no" 1>&6
16545 fi
16546 done
16547
16548 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16549         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16550 echo "configure:16551: checking if Berkeley DB header compatibility" >&5
16551 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16552   echo $ac_n "(cached) $ac_c" 1>&6
16553 else
16554   
16555                 cat > conftest.$ac_ext <<EOF
16556 #line 16557 "configure"
16557 #include "confdefs.h"
16558
16559 #if HAVE_DB_185_H
16560 #       include <db_185.h>
16561 #else
16562 #       include <db.h>
16563 #endif
16564
16565  /* this check could be improved */
16566 #ifndef DB_VERSION_MAJOR
16567 #       define DB_VERSION_MAJOR 1
16568 #endif
16569
16570 #if DB_VERSION_MAJOR == 1 
16571         __db_version_1
16572 #endif
16573
16574 EOF
16575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16576   egrep "__db_version_1" >/dev/null 2>&1; then
16577   rm -rf conftest*
16578   ol_cv_header_db1=yes
16579 else
16580   rm -rf conftest*
16581   ol_cv_header_db1=no
16582 fi
16583 rm -f conftest*
16584
16585 fi
16586
16587 echo "$ac_t""$ol_cv_header_db1" 1>&6
16588
16589         if test $ol_cv_header_db1 = yes ; then
16590                 ol_cv_lib_db=no
16591 if test $ol_cv_lib_db = no ; then
16592         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16593 echo "configure:16594: checking for Berkeley DB link (default)" >&5
16594 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16595   echo $ac_n "(cached) $ac_c" 1>&6
16596 else
16597   
16598         ol_DB_LIB=
16599         ol_LIBS=$LIBS
16600         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16601
16602         cat > conftest.$ac_ext <<EOF
16603 #line 16604 "configure"
16604 #include "confdefs.h"
16605
16606 #ifdef HAVE_DB_185_H
16607 # include <db_185.h>
16608 #else
16609 # include <db.h>
16610 #endif
16611
16612 #ifndef DB_VERSION_MAJOR
16613 # define DB_VERSION_MAJOR 1
16614 #endif
16615
16616 #ifndef NULL
16617 #define NULL ((void*)0)
16618 #endif
16619
16620 int main() {
16621
16622 #if DB_VERSION_MAJOR > 1
16623         {
16624                 char *version;
16625                 int major, minor, patch;
16626
16627                 version = db_version( &major, &minor, &patch );
16628
16629                 if( major != DB_VERSION_MAJOR ||
16630                         minor < DB_VERSION_MINOR )
16631                 {
16632                         printf("Berkeley DB version mismatch\n"
16633                                 "\texpected: %s\n\tgot: %s\n",
16634                                 DB_VERSION_STRING, version);
16635                         return 1;
16636                 }
16637         }
16638 #endif
16639
16640 #if DB_VERSION_MAJOR > 2
16641         db_env_create( NULL, 0 );
16642 #elif DB_VERSION_MAJOR > 1
16643         db_appexit( NULL );
16644 #else
16645         (void) dbopen( NULL, 0, 0, 0, NULL);
16646 #endif
16647
16648 ; return 0; }
16649 EOF
16650 if { (eval echo configure:16651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16651   rm -rf conftest*
16652   ol_cv_db_none=yes
16653 else
16654   echo "configure: failed program was:" >&5
16655   cat conftest.$ac_ext >&5
16656   rm -rf conftest*
16657   ol_cv_db_none=no
16658 fi
16659 rm -f conftest*
16660
16661         LIBS="$ol_LIBS"
16662
16663 fi
16664
16665 echo "$ac_t""$ol_cv_db_none" 1>&6
16666
16667         if test $ol_cv_db_none = yes ; then
16668                 ol_cv_lib_db=yes
16669         fi
16670 fi
16671
16672 if test $ol_cv_lib_db = no ; then
16673         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16674 echo "configure:16675: checking for Berkeley DB link (-ldb41)" >&5
16675 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16676   echo $ac_n "(cached) $ac_c" 1>&6
16677 else
16678   
16679         ol_DB_LIB=-ldb41
16680         ol_LIBS=$LIBS
16681         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16682
16683         cat > conftest.$ac_ext <<EOF
16684 #line 16685 "configure"
16685 #include "confdefs.h"
16686
16687 #ifdef HAVE_DB_185_H
16688 # include <db_185.h>
16689 #else
16690 # include <db.h>
16691 #endif
16692
16693 #ifndef DB_VERSION_MAJOR
16694 # define DB_VERSION_MAJOR 1
16695 #endif
16696
16697 #ifndef NULL
16698 #define NULL ((void*)0)
16699 #endif
16700
16701 int main() {
16702
16703 #if DB_VERSION_MAJOR > 1
16704         {
16705                 char *version;
16706                 int major, minor, patch;
16707
16708                 version = db_version( &major, &minor, &patch );
16709
16710                 if( major != DB_VERSION_MAJOR ||
16711                         minor < DB_VERSION_MINOR )
16712                 {
16713                         printf("Berkeley DB version mismatch\n"
16714                                 "\texpected: %s\n\tgot: %s\n",
16715                                 DB_VERSION_STRING, version);
16716                         return 1;
16717                 }
16718         }
16719 #endif
16720
16721 #if DB_VERSION_MAJOR > 2
16722         db_env_create( NULL, 0 );
16723 #elif DB_VERSION_MAJOR > 1
16724         db_appexit( NULL );
16725 #else
16726         (void) dbopen( NULL, 0, 0, 0, NULL);
16727 #endif
16728
16729 ; return 0; }
16730 EOF
16731 if { (eval echo configure:16732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16732   rm -rf conftest*
16733   ol_cv_db_db41=yes
16734 else
16735   echo "configure: failed program was:" >&5
16736   cat conftest.$ac_ext >&5
16737   rm -rf conftest*
16738   ol_cv_db_db41=no
16739 fi
16740 rm -f conftest*
16741
16742         LIBS="$ol_LIBS"
16743
16744 fi
16745
16746 echo "$ac_t""$ol_cv_db_db41" 1>&6
16747
16748         if test $ol_cv_db_db41 = yes ; then
16749                 ol_cv_lib_db=-ldb41
16750         fi
16751 fi
16752
16753 if test $ol_cv_lib_db = no ; then
16754         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16755 echo "configure:16756: checking for Berkeley DB link (-ldb-41)" >&5
16756 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16757   echo $ac_n "(cached) $ac_c" 1>&6
16758 else
16759   
16760         ol_DB_LIB=-ldb-41
16761         ol_LIBS=$LIBS
16762         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16763
16764         cat > conftest.$ac_ext <<EOF
16765 #line 16766 "configure"
16766 #include "confdefs.h"
16767
16768 #ifdef HAVE_DB_185_H
16769 # include <db_185.h>
16770 #else
16771 # include <db.h>
16772 #endif
16773
16774 #ifndef DB_VERSION_MAJOR
16775 # define DB_VERSION_MAJOR 1
16776 #endif
16777
16778 #ifndef NULL
16779 #define NULL ((void*)0)
16780 #endif
16781
16782 int main() {
16783
16784 #if DB_VERSION_MAJOR > 1
16785         {
16786                 char *version;
16787                 int major, minor, patch;
16788
16789                 version = db_version( &major, &minor, &patch );
16790
16791                 if( major != DB_VERSION_MAJOR ||
16792                         minor < DB_VERSION_MINOR )
16793                 {
16794                         printf("Berkeley DB version mismatch\n"
16795                                 "\texpected: %s\n\tgot: %s\n",
16796                                 DB_VERSION_STRING, version);
16797                         return 1;
16798                 }
16799         }
16800 #endif
16801
16802 #if DB_VERSION_MAJOR > 2
16803         db_env_create( NULL, 0 );
16804 #elif DB_VERSION_MAJOR > 1
16805         db_appexit( NULL );
16806 #else
16807         (void) dbopen( NULL, 0, 0, 0, NULL);
16808 #endif
16809
16810 ; return 0; }
16811 EOF
16812 if { (eval echo configure:16813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16813   rm -rf conftest*
16814   ol_cv_db_db_41=yes
16815 else
16816   echo "configure: failed program was:" >&5
16817   cat conftest.$ac_ext >&5
16818   rm -rf conftest*
16819   ol_cv_db_db_41=no
16820 fi
16821 rm -f conftest*
16822
16823         LIBS="$ol_LIBS"
16824
16825 fi
16826
16827 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16828
16829         if test $ol_cv_db_db_41 = yes ; then
16830                 ol_cv_lib_db=-ldb-41
16831         fi
16832 fi
16833
16834 if test $ol_cv_lib_db = no ; then
16835         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16836 echo "configure:16837: checking for Berkeley DB link (-ldb-4.1)" >&5
16837 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16838   echo $ac_n "(cached) $ac_c" 1>&6
16839 else
16840   
16841         ol_DB_LIB=-ldb-4.1
16842         ol_LIBS=$LIBS
16843         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16844
16845         cat > conftest.$ac_ext <<EOF
16846 #line 16847 "configure"
16847 #include "confdefs.h"
16848
16849 #ifdef HAVE_DB_185_H
16850 # include <db_185.h>
16851 #else
16852 # include <db.h>
16853 #endif
16854
16855 #ifndef DB_VERSION_MAJOR
16856 # define DB_VERSION_MAJOR 1
16857 #endif
16858
16859 #ifndef NULL
16860 #define NULL ((void*)0)
16861 #endif
16862
16863 int main() {
16864
16865 #if DB_VERSION_MAJOR > 1
16866         {
16867                 char *version;
16868                 int major, minor, patch;
16869
16870                 version = db_version( &major, &minor, &patch );
16871
16872                 if( major != DB_VERSION_MAJOR ||
16873                         minor < DB_VERSION_MINOR )
16874                 {
16875                         printf("Berkeley DB version mismatch\n"
16876                                 "\texpected: %s\n\tgot: %s\n",
16877                                 DB_VERSION_STRING, version);
16878                         return 1;
16879                 }
16880         }
16881 #endif
16882
16883 #if DB_VERSION_MAJOR > 2
16884         db_env_create( NULL, 0 );
16885 #elif DB_VERSION_MAJOR > 1
16886         db_appexit( NULL );
16887 #else
16888         (void) dbopen( NULL, 0, 0, 0, NULL);
16889 #endif
16890
16891 ; return 0; }
16892 EOF
16893 if { (eval echo configure:16894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16894   rm -rf conftest*
16895   ol_cv_db_db_4_dot_1=yes
16896 else
16897   echo "configure: failed program was:" >&5
16898   cat conftest.$ac_ext >&5
16899   rm -rf conftest*
16900   ol_cv_db_db_4_dot_1=no
16901 fi
16902 rm -f conftest*
16903
16904         LIBS="$ol_LIBS"
16905
16906 fi
16907
16908 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16909
16910         if test $ol_cv_db_db_4_dot_1 = yes ; then
16911                 ol_cv_lib_db=-ldb-4.1
16912         fi
16913 fi
16914
16915 if test $ol_cv_lib_db = no ; then
16916         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16917 echo "configure:16918: checking for Berkeley DB link (-ldb-4-1)" >&5
16918 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16919   echo $ac_n "(cached) $ac_c" 1>&6
16920 else
16921   
16922         ol_DB_LIB=-ldb-4-1
16923         ol_LIBS=$LIBS
16924         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16925
16926         cat > conftest.$ac_ext <<EOF
16927 #line 16928 "configure"
16928 #include "confdefs.h"
16929
16930 #ifdef HAVE_DB_185_H
16931 # include <db_185.h>
16932 #else
16933 # include <db.h>
16934 #endif
16935
16936 #ifndef DB_VERSION_MAJOR
16937 # define DB_VERSION_MAJOR 1
16938 #endif
16939
16940 #ifndef NULL
16941 #define NULL ((void*)0)
16942 #endif
16943
16944 int main() {
16945
16946 #if DB_VERSION_MAJOR > 1
16947         {
16948                 char *version;
16949                 int major, minor, patch;
16950
16951                 version = db_version( &major, &minor, &patch );
16952
16953                 if( major != DB_VERSION_MAJOR ||
16954                         minor < DB_VERSION_MINOR )
16955                 {
16956                         printf("Berkeley DB version mismatch\n"
16957                                 "\texpected: %s\n\tgot: %s\n",
16958                                 DB_VERSION_STRING, version);
16959                         return 1;
16960                 }
16961         }
16962 #endif
16963
16964 #if DB_VERSION_MAJOR > 2
16965         db_env_create( NULL, 0 );
16966 #elif DB_VERSION_MAJOR > 1
16967         db_appexit( NULL );
16968 #else
16969         (void) dbopen( NULL, 0, 0, 0, NULL);
16970 #endif
16971
16972 ; return 0; }
16973 EOF
16974 if { (eval echo configure:16975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16975   rm -rf conftest*
16976   ol_cv_db_db_4_1=yes
16977 else
16978   echo "configure: failed program was:" >&5
16979   cat conftest.$ac_ext >&5
16980   rm -rf conftest*
16981   ol_cv_db_db_4_1=no
16982 fi
16983 rm -f conftest*
16984
16985         LIBS="$ol_LIBS"
16986
16987 fi
16988
16989 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
16990
16991         if test $ol_cv_db_db_4_1 = yes ; then
16992                 ol_cv_lib_db=-ldb-4-1
16993         fi
16994 fi
16995
16996 if test $ol_cv_lib_db = no ; then
16997         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16998 echo "configure:16999: checking for Berkeley DB link (-ldb-4)" >&5
16999 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17000   echo $ac_n "(cached) $ac_c" 1>&6
17001 else
17002   
17003         ol_DB_LIB=-ldb-4
17004         ol_LIBS=$LIBS
17005         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17006
17007         cat > conftest.$ac_ext <<EOF
17008 #line 17009 "configure"
17009 #include "confdefs.h"
17010
17011 #ifdef HAVE_DB_185_H
17012 # include <db_185.h>
17013 #else
17014 # include <db.h>
17015 #endif
17016
17017 #ifndef DB_VERSION_MAJOR
17018 # define DB_VERSION_MAJOR 1
17019 #endif
17020
17021 #ifndef NULL
17022 #define NULL ((void*)0)
17023 #endif
17024
17025 int main() {
17026
17027 #if DB_VERSION_MAJOR > 1
17028         {
17029                 char *version;
17030                 int major, minor, patch;
17031
17032                 version = db_version( &major, &minor, &patch );
17033
17034                 if( major != DB_VERSION_MAJOR ||
17035                         minor < DB_VERSION_MINOR )
17036                 {
17037                         printf("Berkeley DB version mismatch\n"
17038                                 "\texpected: %s\n\tgot: %s\n",
17039                                 DB_VERSION_STRING, version);
17040                         return 1;
17041                 }
17042         }
17043 #endif
17044
17045 #if DB_VERSION_MAJOR > 2
17046         db_env_create( NULL, 0 );
17047 #elif DB_VERSION_MAJOR > 1
17048         db_appexit( NULL );
17049 #else
17050         (void) dbopen( NULL, 0, 0, 0, NULL);
17051 #endif
17052
17053 ; return 0; }
17054 EOF
17055 if { (eval echo configure:17056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17056   rm -rf conftest*
17057   ol_cv_db_db_4=yes
17058 else
17059   echo "configure: failed program was:" >&5
17060   cat conftest.$ac_ext >&5
17061   rm -rf conftest*
17062   ol_cv_db_db_4=no
17063 fi
17064 rm -f conftest*
17065
17066         LIBS="$ol_LIBS"
17067
17068 fi
17069
17070 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17071
17072         if test $ol_cv_db_db_4 = yes ; then
17073                 ol_cv_lib_db=-ldb-4
17074         fi
17075 fi
17076
17077 if test $ol_cv_lib_db = no ; then
17078         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17079 echo "configure:17080: checking for Berkeley DB link (-ldb4)" >&5
17080 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17081   echo $ac_n "(cached) $ac_c" 1>&6
17082 else
17083   
17084         ol_DB_LIB=-ldb4
17085         ol_LIBS=$LIBS
17086         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17087
17088         cat > conftest.$ac_ext <<EOF
17089 #line 17090 "configure"
17090 #include "confdefs.h"
17091
17092 #ifdef HAVE_DB_185_H
17093 # include <db_185.h>
17094 #else
17095 # include <db.h>
17096 #endif
17097
17098 #ifndef DB_VERSION_MAJOR
17099 # define DB_VERSION_MAJOR 1
17100 #endif
17101
17102 #ifndef NULL
17103 #define NULL ((void*)0)
17104 #endif
17105
17106 int main() {
17107
17108 #if DB_VERSION_MAJOR > 1
17109         {
17110                 char *version;
17111                 int major, minor, patch;
17112
17113                 version = db_version( &major, &minor, &patch );
17114
17115                 if( major != DB_VERSION_MAJOR ||
17116                         minor < DB_VERSION_MINOR )
17117                 {
17118                         printf("Berkeley DB version mismatch\n"
17119                                 "\texpected: %s\n\tgot: %s\n",
17120                                 DB_VERSION_STRING, version);
17121                         return 1;
17122                 }
17123         }
17124 #endif
17125
17126 #if DB_VERSION_MAJOR > 2
17127         db_env_create( NULL, 0 );
17128 #elif DB_VERSION_MAJOR > 1
17129         db_appexit( NULL );
17130 #else
17131         (void) dbopen( NULL, 0, 0, 0, NULL);
17132 #endif
17133
17134 ; return 0; }
17135 EOF
17136 if { (eval echo configure:17137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17137   rm -rf conftest*
17138   ol_cv_db_db4=yes
17139 else
17140   echo "configure: failed program was:" >&5
17141   cat conftest.$ac_ext >&5
17142   rm -rf conftest*
17143   ol_cv_db_db4=no
17144 fi
17145 rm -f conftest*
17146
17147         LIBS="$ol_LIBS"
17148
17149 fi
17150
17151 echo "$ac_t""$ol_cv_db_db4" 1>&6
17152
17153         if test $ol_cv_db_db4 = yes ; then
17154                 ol_cv_lib_db=-ldb4
17155         fi
17156 fi
17157
17158 if test $ol_cv_lib_db = no ; then
17159         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17160 echo "configure:17161: checking for Berkeley DB link (-ldb)" >&5
17161 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17162   echo $ac_n "(cached) $ac_c" 1>&6
17163 else
17164   
17165         ol_DB_LIB=-ldb
17166         ol_LIBS=$LIBS
17167         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17168
17169         cat > conftest.$ac_ext <<EOF
17170 #line 17171 "configure"
17171 #include "confdefs.h"
17172
17173 #ifdef HAVE_DB_185_H
17174 # include <db_185.h>
17175 #else
17176 # include <db.h>
17177 #endif
17178
17179 #ifndef DB_VERSION_MAJOR
17180 # define DB_VERSION_MAJOR 1
17181 #endif
17182
17183 #ifndef NULL
17184 #define NULL ((void*)0)
17185 #endif
17186
17187 int main() {
17188
17189 #if DB_VERSION_MAJOR > 1
17190         {
17191                 char *version;
17192                 int major, minor, patch;
17193
17194                 version = db_version( &major, &minor, &patch );
17195
17196                 if( major != DB_VERSION_MAJOR ||
17197                         minor < DB_VERSION_MINOR )
17198                 {
17199                         printf("Berkeley DB version mismatch\n"
17200                                 "\texpected: %s\n\tgot: %s\n",
17201                                 DB_VERSION_STRING, version);
17202                         return 1;
17203                 }
17204         }
17205 #endif
17206
17207 #if DB_VERSION_MAJOR > 2
17208         db_env_create( NULL, 0 );
17209 #elif DB_VERSION_MAJOR > 1
17210         db_appexit( NULL );
17211 #else
17212         (void) dbopen( NULL, 0, 0, 0, NULL);
17213 #endif
17214
17215 ; return 0; }
17216 EOF
17217 if { (eval echo configure:17218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17218   rm -rf conftest*
17219   ol_cv_db_db=yes
17220 else
17221   echo "configure: failed program was:" >&5
17222   cat conftest.$ac_ext >&5
17223   rm -rf conftest*
17224   ol_cv_db_db=no
17225 fi
17226 rm -f conftest*
17227
17228         LIBS="$ol_LIBS"
17229
17230 fi
17231
17232 echo "$ac_t""$ol_cv_db_db" 1>&6
17233
17234         if test $ol_cv_db_db = yes ; then
17235                 ol_cv_lib_db=-ldb
17236         fi
17237 fi
17238
17239 if test $ol_cv_lib_db = no ; then
17240         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17241 echo "configure:17242: checking for Berkeley DB link (-ldb3)" >&5
17242 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17243   echo $ac_n "(cached) $ac_c" 1>&6
17244 else
17245   
17246         ol_DB_LIB=-ldb3
17247         ol_LIBS=$LIBS
17248         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17249
17250         cat > conftest.$ac_ext <<EOF
17251 #line 17252 "configure"
17252 #include "confdefs.h"
17253
17254 #ifdef HAVE_DB_185_H
17255 # include <db_185.h>
17256 #else
17257 # include <db.h>
17258 #endif
17259
17260 #ifndef DB_VERSION_MAJOR
17261 # define DB_VERSION_MAJOR 1
17262 #endif
17263
17264 #ifndef NULL
17265 #define NULL ((void*)0)
17266 #endif
17267
17268 int main() {
17269
17270 #if DB_VERSION_MAJOR > 1
17271         {
17272                 char *version;
17273                 int major, minor, patch;
17274
17275                 version = db_version( &major, &minor, &patch );
17276
17277                 if( major != DB_VERSION_MAJOR ||
17278                         minor < DB_VERSION_MINOR )
17279                 {
17280                         printf("Berkeley DB version mismatch\n"
17281                                 "\texpected: %s\n\tgot: %s\n",
17282                                 DB_VERSION_STRING, version);
17283                         return 1;
17284                 }
17285         }
17286 #endif
17287
17288 #if DB_VERSION_MAJOR > 2
17289         db_env_create( NULL, 0 );
17290 #elif DB_VERSION_MAJOR > 1
17291         db_appexit( NULL );
17292 #else
17293         (void) dbopen( NULL, 0, 0, 0, NULL);
17294 #endif
17295
17296 ; return 0; }
17297 EOF
17298 if { (eval echo configure:17299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17299   rm -rf conftest*
17300   ol_cv_db_db3=yes
17301 else
17302   echo "configure: failed program was:" >&5
17303   cat conftest.$ac_ext >&5
17304   rm -rf conftest*
17305   ol_cv_db_db3=no
17306 fi
17307 rm -f conftest*
17308
17309         LIBS="$ol_LIBS"
17310
17311 fi
17312
17313 echo "$ac_t""$ol_cv_db_db3" 1>&6
17314
17315         if test $ol_cv_db_db3 = yes ; then
17316                 ol_cv_lib_db=-ldb3
17317         fi
17318 fi
17319
17320 if test $ol_cv_lib_db = no ; then
17321         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17322 echo "configure:17323: checking for Berkeley DB link (-ldb-3)" >&5
17323 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17324   echo $ac_n "(cached) $ac_c" 1>&6
17325 else
17326   
17327         ol_DB_LIB=-ldb-3
17328         ol_LIBS=$LIBS
17329         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17330
17331         cat > conftest.$ac_ext <<EOF
17332 #line 17333 "configure"
17333 #include "confdefs.h"
17334
17335 #ifdef HAVE_DB_185_H
17336 # include <db_185.h>
17337 #else
17338 # include <db.h>
17339 #endif
17340
17341 #ifndef DB_VERSION_MAJOR
17342 # define DB_VERSION_MAJOR 1
17343 #endif
17344
17345 #ifndef NULL
17346 #define NULL ((void*)0)
17347 #endif
17348
17349 int main() {
17350
17351 #if DB_VERSION_MAJOR > 1
17352         {
17353                 char *version;
17354                 int major, minor, patch;
17355
17356                 version = db_version( &major, &minor, &patch );
17357
17358                 if( major != DB_VERSION_MAJOR ||
17359                         minor < DB_VERSION_MINOR )
17360                 {
17361                         printf("Berkeley DB version mismatch\n"
17362                                 "\texpected: %s\n\tgot: %s\n",
17363                                 DB_VERSION_STRING, version);
17364                         return 1;
17365                 }
17366         }
17367 #endif
17368
17369 #if DB_VERSION_MAJOR > 2
17370         db_env_create( NULL, 0 );
17371 #elif DB_VERSION_MAJOR > 1
17372         db_appexit( NULL );
17373 #else
17374         (void) dbopen( NULL, 0, 0, 0, NULL);
17375 #endif
17376
17377 ; return 0; }
17378 EOF
17379 if { (eval echo configure:17380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17380   rm -rf conftest*
17381   ol_cv_db_db_3=yes
17382 else
17383   echo "configure: failed program was:" >&5
17384   cat conftest.$ac_ext >&5
17385   rm -rf conftest*
17386   ol_cv_db_db_3=no
17387 fi
17388 rm -f conftest*
17389
17390         LIBS="$ol_LIBS"
17391
17392 fi
17393
17394 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17395
17396         if test $ol_cv_db_db_3 = yes ; then
17397                 ol_cv_lib_db=-ldb-3
17398         fi
17399 fi
17400
17401 if test $ol_cv_lib_db = no ; then
17402         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17403 echo "configure:17404: checking for Berkeley DB link (-ldb2)" >&5
17404 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17405   echo $ac_n "(cached) $ac_c" 1>&6
17406 else
17407   
17408         ol_DB_LIB=-ldb2
17409         ol_LIBS=$LIBS
17410         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17411
17412         cat > conftest.$ac_ext <<EOF
17413 #line 17414 "configure"
17414 #include "confdefs.h"
17415
17416 #ifdef HAVE_DB_185_H
17417 # include <db_185.h>
17418 #else
17419 # include <db.h>
17420 #endif
17421
17422 #ifndef DB_VERSION_MAJOR
17423 # define DB_VERSION_MAJOR 1
17424 #endif
17425
17426 #ifndef NULL
17427 #define NULL ((void*)0)
17428 #endif
17429
17430 int main() {
17431
17432 #if DB_VERSION_MAJOR > 1
17433         {
17434                 char *version;
17435                 int major, minor, patch;
17436
17437                 version = db_version( &major, &minor, &patch );
17438
17439                 if( major != DB_VERSION_MAJOR ||
17440                         minor < DB_VERSION_MINOR )
17441                 {
17442                         printf("Berkeley DB version mismatch\n"
17443                                 "\texpected: %s\n\tgot: %s\n",
17444                                 DB_VERSION_STRING, version);
17445                         return 1;
17446                 }
17447         }
17448 #endif
17449
17450 #if DB_VERSION_MAJOR > 2
17451         db_env_create( NULL, 0 );
17452 #elif DB_VERSION_MAJOR > 1
17453         db_appexit( NULL );
17454 #else
17455         (void) dbopen( NULL, 0, 0, 0, NULL);
17456 #endif
17457
17458 ; return 0; }
17459 EOF
17460 if { (eval echo configure:17461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17461   rm -rf conftest*
17462   ol_cv_db_db2=yes
17463 else
17464   echo "configure: failed program was:" >&5
17465   cat conftest.$ac_ext >&5
17466   rm -rf conftest*
17467   ol_cv_db_db2=no
17468 fi
17469 rm -f conftest*
17470
17471         LIBS="$ol_LIBS"
17472
17473 fi
17474
17475 echo "$ac_t""$ol_cv_db_db2" 1>&6
17476
17477         if test $ol_cv_db_db2 = yes ; then
17478                 ol_cv_lib_db=-ldb2
17479         fi
17480 fi
17481
17482 if test $ol_cv_lib_db = no ; then
17483         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17484 echo "configure:17485: checking for Berkeley DB link (-ldb-2)" >&5
17485 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17486   echo $ac_n "(cached) $ac_c" 1>&6
17487 else
17488   
17489         ol_DB_LIB=-ldb-2
17490         ol_LIBS=$LIBS
17491         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17492
17493         cat > conftest.$ac_ext <<EOF
17494 #line 17495 "configure"
17495 #include "confdefs.h"
17496
17497 #ifdef HAVE_DB_185_H
17498 # include <db_185.h>
17499 #else
17500 # include <db.h>
17501 #endif
17502
17503 #ifndef DB_VERSION_MAJOR
17504 # define DB_VERSION_MAJOR 1
17505 #endif
17506
17507 #ifndef NULL
17508 #define NULL ((void*)0)
17509 #endif
17510
17511 int main() {
17512
17513 #if DB_VERSION_MAJOR > 1
17514         {
17515                 char *version;
17516                 int major, minor, patch;
17517
17518                 version = db_version( &major, &minor, &patch );
17519
17520                 if( major != DB_VERSION_MAJOR ||
17521                         minor < DB_VERSION_MINOR )
17522                 {
17523                         printf("Berkeley DB version mismatch\n"
17524                                 "\texpected: %s\n\tgot: %s\n",
17525                                 DB_VERSION_STRING, version);
17526                         return 1;
17527                 }
17528         }
17529 #endif
17530
17531 #if DB_VERSION_MAJOR > 2
17532         db_env_create( NULL, 0 );
17533 #elif DB_VERSION_MAJOR > 1
17534         db_appexit( NULL );
17535 #else
17536         (void) dbopen( NULL, 0, 0, 0, NULL);
17537 #endif
17538
17539 ; return 0; }
17540 EOF
17541 if { (eval echo configure:17542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17542   rm -rf conftest*
17543   ol_cv_db_db_2=yes
17544 else
17545   echo "configure: failed program was:" >&5
17546   cat conftest.$ac_ext >&5
17547   rm -rf conftest*
17548   ol_cv_db_db_2=no
17549 fi
17550 rm -f conftest*
17551
17552         LIBS="$ol_LIBS"
17553
17554 fi
17555
17556 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17557
17558         if test $ol_cv_db_db_2 = yes ; then
17559                 ol_cv_lib_db=-ldb-2
17560         fi
17561 fi
17562
17563 if test $ol_cv_lib_db = no ; then
17564         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17565 echo "configure:17566: checking for Berkeley DB link (-ldb1)" >&5
17566 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17567   echo $ac_n "(cached) $ac_c" 1>&6
17568 else
17569   
17570         ol_DB_LIB=-ldb1
17571         ol_LIBS=$LIBS
17572         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17573
17574         cat > conftest.$ac_ext <<EOF
17575 #line 17576 "configure"
17576 #include "confdefs.h"
17577
17578 #ifdef HAVE_DB_185_H
17579 # include <db_185.h>
17580 #else
17581 # include <db.h>
17582 #endif
17583
17584 #ifndef DB_VERSION_MAJOR
17585 # define DB_VERSION_MAJOR 1
17586 #endif
17587
17588 #ifndef NULL
17589 #define NULL ((void*)0)
17590 #endif
17591
17592 int main() {
17593
17594 #if DB_VERSION_MAJOR > 1
17595         {
17596                 char *version;
17597                 int major, minor, patch;
17598
17599                 version = db_version( &major, &minor, &patch );
17600
17601                 if( major != DB_VERSION_MAJOR ||
17602                         minor < DB_VERSION_MINOR )
17603                 {
17604                         printf("Berkeley DB version mismatch\n"
17605                                 "\texpected: %s\n\tgot: %s\n",
17606                                 DB_VERSION_STRING, version);
17607                         return 1;
17608                 }
17609         }
17610 #endif
17611
17612 #if DB_VERSION_MAJOR > 2
17613         db_env_create( NULL, 0 );
17614 #elif DB_VERSION_MAJOR > 1
17615         db_appexit( NULL );
17616 #else
17617         (void) dbopen( NULL, 0, 0, 0, NULL);
17618 #endif
17619
17620 ; return 0; }
17621 EOF
17622 if { (eval echo configure:17623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17623   rm -rf conftest*
17624   ol_cv_db_db1=yes
17625 else
17626   echo "configure: failed program was:" >&5
17627   cat conftest.$ac_ext >&5
17628   rm -rf conftest*
17629   ol_cv_db_db1=no
17630 fi
17631 rm -f conftest*
17632
17633         LIBS="$ol_LIBS"
17634
17635 fi
17636
17637 echo "$ac_t""$ol_cv_db_db1" 1>&6
17638
17639         if test $ol_cv_db_db1 = yes ; then
17640                 ol_cv_lib_db=-ldb1
17641         fi
17642 fi
17643
17644 if test $ol_cv_lib_db = no ; then
17645         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17646 echo "configure:17647: checking for Berkeley DB link (-ldb-1)" >&5
17647 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17648   echo $ac_n "(cached) $ac_c" 1>&6
17649 else
17650   
17651         ol_DB_LIB=-ldb-1
17652         ol_LIBS=$LIBS
17653         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17654
17655         cat > conftest.$ac_ext <<EOF
17656 #line 17657 "configure"
17657 #include "confdefs.h"
17658
17659 #ifdef HAVE_DB_185_H
17660 # include <db_185.h>
17661 #else
17662 # include <db.h>
17663 #endif
17664
17665 #ifndef DB_VERSION_MAJOR
17666 # define DB_VERSION_MAJOR 1
17667 #endif
17668
17669 #ifndef NULL
17670 #define NULL ((void*)0)
17671 #endif
17672
17673 int main() {
17674
17675 #if DB_VERSION_MAJOR > 1
17676         {
17677                 char *version;
17678                 int major, minor, patch;
17679
17680                 version = db_version( &major, &minor, &patch );
17681
17682                 if( major != DB_VERSION_MAJOR ||
17683                         minor < DB_VERSION_MINOR )
17684                 {
17685                         printf("Berkeley DB version mismatch\n"
17686                                 "\texpected: %s\n\tgot: %s\n",
17687                                 DB_VERSION_STRING, version);
17688                         return 1;
17689                 }
17690         }
17691 #endif
17692
17693 #if DB_VERSION_MAJOR > 2
17694         db_env_create( NULL, 0 );
17695 #elif DB_VERSION_MAJOR > 1
17696         db_appexit( NULL );
17697 #else
17698         (void) dbopen( NULL, 0, 0, 0, NULL);
17699 #endif
17700
17701 ; return 0; }
17702 EOF
17703 if { (eval echo configure:17704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17704   rm -rf conftest*
17705   ol_cv_db_db_1=yes
17706 else
17707   echo "configure: failed program was:" >&5
17708   cat conftest.$ac_ext >&5
17709   rm -rf conftest*
17710   ol_cv_db_db_1=no
17711 fi
17712 rm -f conftest*
17713
17714         LIBS="$ol_LIBS"
17715
17716 fi
17717
17718 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17719
17720         if test $ol_cv_db_db_1 = yes ; then
17721                 ol_cv_lib_db=-ldb-1
17722         fi
17723 fi
17724
17725
17726                 if test "$ol_cv_lib_db" != no ; then
17727                         ol_cv_berkeley_db=yes
17728                 fi
17729         fi
17730 fi
17731
17732         else
17733                 ol_cv_berkeley_db=no
17734 for ac_hdr in db.h
17735 do
17736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17738 echo "configure:17739: checking for $ac_hdr" >&5
17739 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17740   echo $ac_n "(cached) $ac_c" 1>&6
17741 else
17742   cat > conftest.$ac_ext <<EOF
17743 #line 17744 "configure"
17744 #include "confdefs.h"
17745 #include <$ac_hdr>
17746 EOF
17747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17748 { (eval echo configure:17749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17750 if test -z "$ac_err"; then
17751   rm -rf conftest*
17752   eval "ac_cv_header_$ac_safe=yes"
17753 else
17754   echo "$ac_err" >&5
17755   echo "configure: failed program was:" >&5
17756   cat conftest.$ac_ext >&5
17757   rm -rf conftest*
17758   eval "ac_cv_header_$ac_safe=no"
17759 fi
17760 rm -f conftest*
17761 fi
17762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17763   echo "$ac_t""yes" 1>&6
17764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17765   cat >> confdefs.h <<EOF
17766 #define $ac_tr_hdr 1
17767 EOF
17768  
17769 else
17770   echo "$ac_t""no" 1>&6
17771 fi
17772 done
17773
17774 if test $ac_cv_header_db_h = yes; then
17775         ol_cv_lib_db=no
17776 if test $ol_cv_lib_db = no ; then
17777         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17778 echo "configure:17779: checking for Berkeley DB link (default)" >&5
17779 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17780   echo $ac_n "(cached) $ac_c" 1>&6
17781 else
17782   
17783         ol_DB_LIB=
17784         ol_LIBS=$LIBS
17785         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17786
17787         cat > conftest.$ac_ext <<EOF
17788 #line 17789 "configure"
17789 #include "confdefs.h"
17790
17791 #ifdef HAVE_DB_185_H
17792 # include <db_185.h>
17793 #else
17794 # include <db.h>
17795 #endif
17796
17797 #ifndef DB_VERSION_MAJOR
17798 # define DB_VERSION_MAJOR 1
17799 #endif
17800
17801 #ifndef NULL
17802 #define NULL ((void*)0)
17803 #endif
17804
17805 int main() {
17806
17807 #if DB_VERSION_MAJOR > 1
17808         {
17809                 char *version;
17810                 int major, minor, patch;
17811
17812                 version = db_version( &major, &minor, &patch );
17813
17814                 if( major != DB_VERSION_MAJOR ||
17815                         minor < DB_VERSION_MINOR )
17816                 {
17817                         printf("Berkeley DB version mismatch\n"
17818                                 "\texpected: %s\n\tgot: %s\n",
17819                                 DB_VERSION_STRING, version);
17820                         return 1;
17821                 }
17822         }
17823 #endif
17824
17825 #if DB_VERSION_MAJOR > 2
17826         db_env_create( NULL, 0 );
17827 #elif DB_VERSION_MAJOR > 1
17828         db_appexit( NULL );
17829 #else
17830         (void) dbopen( NULL, 0, 0, 0, NULL);
17831 #endif
17832
17833 ; return 0; }
17834 EOF
17835 if { (eval echo configure:17836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17836   rm -rf conftest*
17837   ol_cv_db_none=yes
17838 else
17839   echo "configure: failed program was:" >&5
17840   cat conftest.$ac_ext >&5
17841   rm -rf conftest*
17842   ol_cv_db_none=no
17843 fi
17844 rm -f conftest*
17845
17846         LIBS="$ol_LIBS"
17847
17848 fi
17849
17850 echo "$ac_t""$ol_cv_db_none" 1>&6
17851
17852         if test $ol_cv_db_none = yes ; then
17853                 ol_cv_lib_db=yes
17854         fi
17855 fi
17856
17857 if test $ol_cv_lib_db = no ; then
17858         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17859 echo "configure:17860: checking for Berkeley DB link (-ldb41)" >&5
17860 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17861   echo $ac_n "(cached) $ac_c" 1>&6
17862 else
17863   
17864         ol_DB_LIB=-ldb41
17865         ol_LIBS=$LIBS
17866         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17867
17868         cat > conftest.$ac_ext <<EOF
17869 #line 17870 "configure"
17870 #include "confdefs.h"
17871
17872 #ifdef HAVE_DB_185_H
17873 # include <db_185.h>
17874 #else
17875 # include <db.h>
17876 #endif
17877
17878 #ifndef DB_VERSION_MAJOR
17879 # define DB_VERSION_MAJOR 1
17880 #endif
17881
17882 #ifndef NULL
17883 #define NULL ((void*)0)
17884 #endif
17885
17886 int main() {
17887
17888 #if DB_VERSION_MAJOR > 1
17889         {
17890                 char *version;
17891                 int major, minor, patch;
17892
17893                 version = db_version( &major, &minor, &patch );
17894
17895                 if( major != DB_VERSION_MAJOR ||
17896                         minor < DB_VERSION_MINOR )
17897                 {
17898                         printf("Berkeley DB version mismatch\n"
17899                                 "\texpected: %s\n\tgot: %s\n",
17900                                 DB_VERSION_STRING, version);
17901                         return 1;
17902                 }
17903         }
17904 #endif
17905
17906 #if DB_VERSION_MAJOR > 2
17907         db_env_create( NULL, 0 );
17908 #elif DB_VERSION_MAJOR > 1
17909         db_appexit( NULL );
17910 #else
17911         (void) dbopen( NULL, 0, 0, 0, NULL);
17912 #endif
17913
17914 ; return 0; }
17915 EOF
17916 if { (eval echo configure:17917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17917   rm -rf conftest*
17918   ol_cv_db_db41=yes
17919 else
17920   echo "configure: failed program was:" >&5
17921   cat conftest.$ac_ext >&5
17922   rm -rf conftest*
17923   ol_cv_db_db41=no
17924 fi
17925 rm -f conftest*
17926
17927         LIBS="$ol_LIBS"
17928
17929 fi
17930
17931 echo "$ac_t""$ol_cv_db_db41" 1>&6
17932
17933         if test $ol_cv_db_db41 = yes ; then
17934                 ol_cv_lib_db=-ldb41
17935         fi
17936 fi
17937
17938 if test $ol_cv_lib_db = no ; then
17939         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17940 echo "configure:17941: checking for Berkeley DB link (-ldb-41)" >&5
17941 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17942   echo $ac_n "(cached) $ac_c" 1>&6
17943 else
17944   
17945         ol_DB_LIB=-ldb-41
17946         ol_LIBS=$LIBS
17947         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17948
17949         cat > conftest.$ac_ext <<EOF
17950 #line 17951 "configure"
17951 #include "confdefs.h"
17952
17953 #ifdef HAVE_DB_185_H
17954 # include <db_185.h>
17955 #else
17956 # include <db.h>
17957 #endif
17958
17959 #ifndef DB_VERSION_MAJOR
17960 # define DB_VERSION_MAJOR 1
17961 #endif
17962
17963 #ifndef NULL
17964 #define NULL ((void*)0)
17965 #endif
17966
17967 int main() {
17968
17969 #if DB_VERSION_MAJOR > 1
17970         {
17971                 char *version;
17972                 int major, minor, patch;
17973
17974                 version = db_version( &major, &minor, &patch );
17975
17976                 if( major != DB_VERSION_MAJOR ||
17977                         minor < DB_VERSION_MINOR )
17978                 {
17979                         printf("Berkeley DB version mismatch\n"
17980                                 "\texpected: %s\n\tgot: %s\n",
17981                                 DB_VERSION_STRING, version);
17982                         return 1;
17983                 }
17984         }
17985 #endif
17986
17987 #if DB_VERSION_MAJOR > 2
17988         db_env_create( NULL, 0 );
17989 #elif DB_VERSION_MAJOR > 1
17990         db_appexit( NULL );
17991 #else
17992         (void) dbopen( NULL, 0, 0, 0, NULL);
17993 #endif
17994
17995 ; return 0; }
17996 EOF
17997 if { (eval echo configure:17998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17998   rm -rf conftest*
17999   ol_cv_db_db_41=yes
18000 else
18001   echo "configure: failed program was:" >&5
18002   cat conftest.$ac_ext >&5
18003   rm -rf conftest*
18004   ol_cv_db_db_41=no
18005 fi
18006 rm -f conftest*
18007
18008         LIBS="$ol_LIBS"
18009
18010 fi
18011
18012 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18013
18014         if test $ol_cv_db_db_41 = yes ; then
18015                 ol_cv_lib_db=-ldb-41
18016         fi
18017 fi
18018
18019 if test $ol_cv_lib_db = no ; then
18020         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18021 echo "configure:18022: checking for Berkeley DB link (-ldb-4.1)" >&5
18022 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18023   echo $ac_n "(cached) $ac_c" 1>&6
18024 else
18025   
18026         ol_DB_LIB=-ldb-4.1
18027         ol_LIBS=$LIBS
18028         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18029
18030         cat > conftest.$ac_ext <<EOF
18031 #line 18032 "configure"
18032 #include "confdefs.h"
18033
18034 #ifdef HAVE_DB_185_H
18035 # include <db_185.h>
18036 #else
18037 # include <db.h>
18038 #endif
18039
18040 #ifndef DB_VERSION_MAJOR
18041 # define DB_VERSION_MAJOR 1
18042 #endif
18043
18044 #ifndef NULL
18045 #define NULL ((void*)0)
18046 #endif
18047
18048 int main() {
18049
18050 #if DB_VERSION_MAJOR > 1
18051         {
18052                 char *version;
18053                 int major, minor, patch;
18054
18055                 version = db_version( &major, &minor, &patch );
18056
18057                 if( major != DB_VERSION_MAJOR ||
18058                         minor < DB_VERSION_MINOR )
18059                 {
18060                         printf("Berkeley DB version mismatch\n"
18061                                 "\texpected: %s\n\tgot: %s\n",
18062                                 DB_VERSION_STRING, version);
18063                         return 1;
18064                 }
18065         }
18066 #endif
18067
18068 #if DB_VERSION_MAJOR > 2
18069         db_env_create( NULL, 0 );
18070 #elif DB_VERSION_MAJOR > 1
18071         db_appexit( NULL );
18072 #else
18073         (void) dbopen( NULL, 0, 0, 0, NULL);
18074 #endif
18075
18076 ; return 0; }
18077 EOF
18078 if { (eval echo configure:18079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18079   rm -rf conftest*
18080   ol_cv_db_db_4_dot_1=yes
18081 else
18082   echo "configure: failed program was:" >&5
18083   cat conftest.$ac_ext >&5
18084   rm -rf conftest*
18085   ol_cv_db_db_4_dot_1=no
18086 fi
18087 rm -f conftest*
18088
18089         LIBS="$ol_LIBS"
18090
18091 fi
18092
18093 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18094
18095         if test $ol_cv_db_db_4_dot_1 = yes ; then
18096                 ol_cv_lib_db=-ldb-4.1
18097         fi
18098 fi
18099
18100 if test $ol_cv_lib_db = no ; then
18101         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18102 echo "configure:18103: checking for Berkeley DB link (-ldb-4-1)" >&5
18103 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18104   echo $ac_n "(cached) $ac_c" 1>&6
18105 else
18106   
18107         ol_DB_LIB=-ldb-4-1
18108         ol_LIBS=$LIBS
18109         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18110
18111         cat > conftest.$ac_ext <<EOF
18112 #line 18113 "configure"
18113 #include "confdefs.h"
18114
18115 #ifdef HAVE_DB_185_H
18116 # include <db_185.h>
18117 #else
18118 # include <db.h>
18119 #endif
18120
18121 #ifndef DB_VERSION_MAJOR
18122 # define DB_VERSION_MAJOR 1
18123 #endif
18124
18125 #ifndef NULL
18126 #define NULL ((void*)0)
18127 #endif
18128
18129 int main() {
18130
18131 #if DB_VERSION_MAJOR > 1
18132         {
18133                 char *version;
18134                 int major, minor, patch;
18135
18136                 version = db_version( &major, &minor, &patch );
18137
18138                 if( major != DB_VERSION_MAJOR ||
18139                         minor < DB_VERSION_MINOR )
18140                 {
18141                         printf("Berkeley DB version mismatch\n"
18142                                 "\texpected: %s\n\tgot: %s\n",
18143                                 DB_VERSION_STRING, version);
18144                         return 1;
18145                 }
18146         }
18147 #endif
18148
18149 #if DB_VERSION_MAJOR > 2
18150         db_env_create( NULL, 0 );
18151 #elif DB_VERSION_MAJOR > 1
18152         db_appexit( NULL );
18153 #else
18154         (void) dbopen( NULL, 0, 0, 0, NULL);
18155 #endif
18156
18157 ; return 0; }
18158 EOF
18159 if { (eval echo configure:18160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18160   rm -rf conftest*
18161   ol_cv_db_db_4_1=yes
18162 else
18163   echo "configure: failed program was:" >&5
18164   cat conftest.$ac_ext >&5
18165   rm -rf conftest*
18166   ol_cv_db_db_4_1=no
18167 fi
18168 rm -f conftest*
18169
18170         LIBS="$ol_LIBS"
18171
18172 fi
18173
18174 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18175
18176         if test $ol_cv_db_db_4_1 = yes ; then
18177                 ol_cv_lib_db=-ldb-4-1
18178         fi
18179 fi
18180
18181 if test $ol_cv_lib_db = no ; then
18182         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18183 echo "configure:18184: checking for Berkeley DB link (-ldb-4)" >&5
18184 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18185   echo $ac_n "(cached) $ac_c" 1>&6
18186 else
18187   
18188         ol_DB_LIB=-ldb-4
18189         ol_LIBS=$LIBS
18190         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18191
18192         cat > conftest.$ac_ext <<EOF
18193 #line 18194 "configure"
18194 #include "confdefs.h"
18195
18196 #ifdef HAVE_DB_185_H
18197 # include <db_185.h>
18198 #else
18199 # include <db.h>
18200 #endif
18201
18202 #ifndef DB_VERSION_MAJOR
18203 # define DB_VERSION_MAJOR 1
18204 #endif
18205
18206 #ifndef NULL
18207 #define NULL ((void*)0)
18208 #endif
18209
18210 int main() {
18211
18212 #if DB_VERSION_MAJOR > 1
18213         {
18214                 char *version;
18215                 int major, minor, patch;
18216
18217                 version = db_version( &major, &minor, &patch );
18218
18219                 if( major != DB_VERSION_MAJOR ||
18220                         minor < DB_VERSION_MINOR )
18221                 {
18222                         printf("Berkeley DB version mismatch\n"
18223                                 "\texpected: %s\n\tgot: %s\n",
18224                                 DB_VERSION_STRING, version);
18225                         return 1;
18226                 }
18227         }
18228 #endif
18229
18230 #if DB_VERSION_MAJOR > 2
18231         db_env_create( NULL, 0 );
18232 #elif DB_VERSION_MAJOR > 1
18233         db_appexit( NULL );
18234 #else
18235         (void) dbopen( NULL, 0, 0, 0, NULL);
18236 #endif
18237
18238 ; return 0; }
18239 EOF
18240 if { (eval echo configure:18241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18241   rm -rf conftest*
18242   ol_cv_db_db_4=yes
18243 else
18244   echo "configure: failed program was:" >&5
18245   cat conftest.$ac_ext >&5
18246   rm -rf conftest*
18247   ol_cv_db_db_4=no
18248 fi
18249 rm -f conftest*
18250
18251         LIBS="$ol_LIBS"
18252
18253 fi
18254
18255 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18256
18257         if test $ol_cv_db_db_4 = yes ; then
18258                 ol_cv_lib_db=-ldb-4
18259         fi
18260 fi
18261
18262 if test $ol_cv_lib_db = no ; then
18263         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18264 echo "configure:18265: checking for Berkeley DB link (-ldb4)" >&5
18265 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18266   echo $ac_n "(cached) $ac_c" 1>&6
18267 else
18268   
18269         ol_DB_LIB=-ldb4
18270         ol_LIBS=$LIBS
18271         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18272
18273         cat > conftest.$ac_ext <<EOF
18274 #line 18275 "configure"
18275 #include "confdefs.h"
18276
18277 #ifdef HAVE_DB_185_H
18278 # include <db_185.h>
18279 #else
18280 # include <db.h>
18281 #endif
18282
18283 #ifndef DB_VERSION_MAJOR
18284 # define DB_VERSION_MAJOR 1
18285 #endif
18286
18287 #ifndef NULL
18288 #define NULL ((void*)0)
18289 #endif
18290
18291 int main() {
18292
18293 #if DB_VERSION_MAJOR > 1
18294         {
18295                 char *version;
18296                 int major, minor, patch;
18297
18298                 version = db_version( &major, &minor, &patch );
18299
18300                 if( major != DB_VERSION_MAJOR ||
18301                         minor < DB_VERSION_MINOR )
18302                 {
18303                         printf("Berkeley DB version mismatch\n"
18304                                 "\texpected: %s\n\tgot: %s\n",
18305                                 DB_VERSION_STRING, version);
18306                         return 1;
18307                 }
18308         }
18309 #endif
18310
18311 #if DB_VERSION_MAJOR > 2
18312         db_env_create( NULL, 0 );
18313 #elif DB_VERSION_MAJOR > 1
18314         db_appexit( NULL );
18315 #else
18316         (void) dbopen( NULL, 0, 0, 0, NULL);
18317 #endif
18318
18319 ; return 0; }
18320 EOF
18321 if { (eval echo configure:18322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18322   rm -rf conftest*
18323   ol_cv_db_db4=yes
18324 else
18325   echo "configure: failed program was:" >&5
18326   cat conftest.$ac_ext >&5
18327   rm -rf conftest*
18328   ol_cv_db_db4=no
18329 fi
18330 rm -f conftest*
18331
18332         LIBS="$ol_LIBS"
18333
18334 fi
18335
18336 echo "$ac_t""$ol_cv_db_db4" 1>&6
18337
18338         if test $ol_cv_db_db4 = yes ; then
18339                 ol_cv_lib_db=-ldb4
18340         fi
18341 fi
18342
18343 if test $ol_cv_lib_db = no ; then
18344         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18345 echo "configure:18346: checking for Berkeley DB link (-ldb)" >&5
18346 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18347   echo $ac_n "(cached) $ac_c" 1>&6
18348 else
18349   
18350         ol_DB_LIB=-ldb
18351         ol_LIBS=$LIBS
18352         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18353
18354         cat > conftest.$ac_ext <<EOF
18355 #line 18356 "configure"
18356 #include "confdefs.h"
18357
18358 #ifdef HAVE_DB_185_H
18359 # include <db_185.h>
18360 #else
18361 # include <db.h>
18362 #endif
18363
18364 #ifndef DB_VERSION_MAJOR
18365 # define DB_VERSION_MAJOR 1
18366 #endif
18367
18368 #ifndef NULL
18369 #define NULL ((void*)0)
18370 #endif
18371
18372 int main() {
18373
18374 #if DB_VERSION_MAJOR > 1
18375         {
18376                 char *version;
18377                 int major, minor, patch;
18378
18379                 version = db_version( &major, &minor, &patch );
18380
18381                 if( major != DB_VERSION_MAJOR ||
18382                         minor < DB_VERSION_MINOR )
18383                 {
18384                         printf("Berkeley DB version mismatch\n"
18385                                 "\texpected: %s\n\tgot: %s\n",
18386                                 DB_VERSION_STRING, version);
18387                         return 1;
18388                 }
18389         }
18390 #endif
18391
18392 #if DB_VERSION_MAJOR > 2
18393         db_env_create( NULL, 0 );
18394 #elif DB_VERSION_MAJOR > 1
18395         db_appexit( NULL );
18396 #else
18397         (void) dbopen( NULL, 0, 0, 0, NULL);
18398 #endif
18399
18400 ; return 0; }
18401 EOF
18402 if { (eval echo configure:18403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18403   rm -rf conftest*
18404   ol_cv_db_db=yes
18405 else
18406   echo "configure: failed program was:" >&5
18407   cat conftest.$ac_ext >&5
18408   rm -rf conftest*
18409   ol_cv_db_db=no
18410 fi
18411 rm -f conftest*
18412
18413         LIBS="$ol_LIBS"
18414
18415 fi
18416
18417 echo "$ac_t""$ol_cv_db_db" 1>&6
18418
18419         if test $ol_cv_db_db = yes ; then
18420                 ol_cv_lib_db=-ldb
18421         fi
18422 fi
18423
18424 if test $ol_cv_lib_db = no ; then
18425         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18426 echo "configure:18427: checking for Berkeley DB link (-ldb3)" >&5
18427 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18428   echo $ac_n "(cached) $ac_c" 1>&6
18429 else
18430   
18431         ol_DB_LIB=-ldb3
18432         ol_LIBS=$LIBS
18433         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18434
18435         cat > conftest.$ac_ext <<EOF
18436 #line 18437 "configure"
18437 #include "confdefs.h"
18438
18439 #ifdef HAVE_DB_185_H
18440 # include <db_185.h>
18441 #else
18442 # include <db.h>
18443 #endif
18444
18445 #ifndef DB_VERSION_MAJOR
18446 # define DB_VERSION_MAJOR 1
18447 #endif
18448
18449 #ifndef NULL
18450 #define NULL ((void*)0)
18451 #endif
18452
18453 int main() {
18454
18455 #if DB_VERSION_MAJOR > 1
18456         {
18457                 char *version;
18458                 int major, minor, patch;
18459
18460                 version = db_version( &major, &minor, &patch );
18461
18462                 if( major != DB_VERSION_MAJOR ||
18463                         minor < DB_VERSION_MINOR )
18464                 {
18465                         printf("Berkeley DB version mismatch\n"
18466                                 "\texpected: %s\n\tgot: %s\n",
18467                                 DB_VERSION_STRING, version);
18468                         return 1;
18469                 }
18470         }
18471 #endif
18472
18473 #if DB_VERSION_MAJOR > 2
18474         db_env_create( NULL, 0 );
18475 #elif DB_VERSION_MAJOR > 1
18476         db_appexit( NULL );
18477 #else
18478         (void) dbopen( NULL, 0, 0, 0, NULL);
18479 #endif
18480
18481 ; return 0; }
18482 EOF
18483 if { (eval echo configure:18484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18484   rm -rf conftest*
18485   ol_cv_db_db3=yes
18486 else
18487   echo "configure: failed program was:" >&5
18488   cat conftest.$ac_ext >&5
18489   rm -rf conftest*
18490   ol_cv_db_db3=no
18491 fi
18492 rm -f conftest*
18493
18494         LIBS="$ol_LIBS"
18495
18496 fi
18497
18498 echo "$ac_t""$ol_cv_db_db3" 1>&6
18499
18500         if test $ol_cv_db_db3 = yes ; then
18501                 ol_cv_lib_db=-ldb3
18502         fi
18503 fi
18504
18505 if test $ol_cv_lib_db = no ; then
18506         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18507 echo "configure:18508: checking for Berkeley DB link (-ldb-3)" >&5
18508 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18509   echo $ac_n "(cached) $ac_c" 1>&6
18510 else
18511   
18512         ol_DB_LIB=-ldb-3
18513         ol_LIBS=$LIBS
18514         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18515
18516         cat > conftest.$ac_ext <<EOF
18517 #line 18518 "configure"
18518 #include "confdefs.h"
18519
18520 #ifdef HAVE_DB_185_H
18521 # include <db_185.h>
18522 #else
18523 # include <db.h>
18524 #endif
18525
18526 #ifndef DB_VERSION_MAJOR
18527 # define DB_VERSION_MAJOR 1
18528 #endif
18529
18530 #ifndef NULL
18531 #define NULL ((void*)0)
18532 #endif
18533
18534 int main() {
18535
18536 #if DB_VERSION_MAJOR > 1
18537         {
18538                 char *version;
18539                 int major, minor, patch;
18540
18541                 version = db_version( &major, &minor, &patch );
18542
18543                 if( major != DB_VERSION_MAJOR ||
18544                         minor < DB_VERSION_MINOR )
18545                 {
18546                         printf("Berkeley DB version mismatch\n"
18547                                 "\texpected: %s\n\tgot: %s\n",
18548                                 DB_VERSION_STRING, version);
18549                         return 1;
18550                 }
18551         }
18552 #endif
18553
18554 #if DB_VERSION_MAJOR > 2
18555         db_env_create( NULL, 0 );
18556 #elif DB_VERSION_MAJOR > 1
18557         db_appexit( NULL );
18558 #else
18559         (void) dbopen( NULL, 0, 0, 0, NULL);
18560 #endif
18561
18562 ; return 0; }
18563 EOF
18564 if { (eval echo configure:18565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18565   rm -rf conftest*
18566   ol_cv_db_db_3=yes
18567 else
18568   echo "configure: failed program was:" >&5
18569   cat conftest.$ac_ext >&5
18570   rm -rf conftest*
18571   ol_cv_db_db_3=no
18572 fi
18573 rm -f conftest*
18574
18575         LIBS="$ol_LIBS"
18576
18577 fi
18578
18579 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18580
18581         if test $ol_cv_db_db_3 = yes ; then
18582                 ol_cv_lib_db=-ldb-3
18583         fi
18584 fi
18585
18586 if test $ol_cv_lib_db = no ; then
18587         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18588 echo "configure:18589: checking for Berkeley DB link (-ldb2)" >&5
18589 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18590   echo $ac_n "(cached) $ac_c" 1>&6
18591 else
18592   
18593         ol_DB_LIB=-ldb2
18594         ol_LIBS=$LIBS
18595         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18596
18597         cat > conftest.$ac_ext <<EOF
18598 #line 18599 "configure"
18599 #include "confdefs.h"
18600
18601 #ifdef HAVE_DB_185_H
18602 # include <db_185.h>
18603 #else
18604 # include <db.h>
18605 #endif
18606
18607 #ifndef DB_VERSION_MAJOR
18608 # define DB_VERSION_MAJOR 1
18609 #endif
18610
18611 #ifndef NULL
18612 #define NULL ((void*)0)
18613 #endif
18614
18615 int main() {
18616
18617 #if DB_VERSION_MAJOR > 1
18618         {
18619                 char *version;
18620                 int major, minor, patch;
18621
18622                 version = db_version( &major, &minor, &patch );
18623
18624                 if( major != DB_VERSION_MAJOR ||
18625                         minor < DB_VERSION_MINOR )
18626                 {
18627                         printf("Berkeley DB version mismatch\n"
18628                                 "\texpected: %s\n\tgot: %s\n",
18629                                 DB_VERSION_STRING, version);
18630                         return 1;
18631                 }
18632         }
18633 #endif
18634
18635 #if DB_VERSION_MAJOR > 2
18636         db_env_create( NULL, 0 );
18637 #elif DB_VERSION_MAJOR > 1
18638         db_appexit( NULL );
18639 #else
18640         (void) dbopen( NULL, 0, 0, 0, NULL);
18641 #endif
18642
18643 ; return 0; }
18644 EOF
18645 if { (eval echo configure:18646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18646   rm -rf conftest*
18647   ol_cv_db_db2=yes
18648 else
18649   echo "configure: failed program was:" >&5
18650   cat conftest.$ac_ext >&5
18651   rm -rf conftest*
18652   ol_cv_db_db2=no
18653 fi
18654 rm -f conftest*
18655
18656         LIBS="$ol_LIBS"
18657
18658 fi
18659
18660 echo "$ac_t""$ol_cv_db_db2" 1>&6
18661
18662         if test $ol_cv_db_db2 = yes ; then
18663                 ol_cv_lib_db=-ldb2
18664         fi
18665 fi
18666
18667 if test $ol_cv_lib_db = no ; then
18668         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18669 echo "configure:18670: checking for Berkeley DB link (-ldb-2)" >&5
18670 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18671   echo $ac_n "(cached) $ac_c" 1>&6
18672 else
18673   
18674         ol_DB_LIB=-ldb-2
18675         ol_LIBS=$LIBS
18676         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18677
18678         cat > conftest.$ac_ext <<EOF
18679 #line 18680 "configure"
18680 #include "confdefs.h"
18681
18682 #ifdef HAVE_DB_185_H
18683 # include <db_185.h>
18684 #else
18685 # include <db.h>
18686 #endif
18687
18688 #ifndef DB_VERSION_MAJOR
18689 # define DB_VERSION_MAJOR 1
18690 #endif
18691
18692 #ifndef NULL
18693 #define NULL ((void*)0)
18694 #endif
18695
18696 int main() {
18697
18698 #if DB_VERSION_MAJOR > 1
18699         {
18700                 char *version;
18701                 int major, minor, patch;
18702
18703                 version = db_version( &major, &minor, &patch );
18704
18705                 if( major != DB_VERSION_MAJOR ||
18706                         minor < DB_VERSION_MINOR )
18707                 {
18708                         printf("Berkeley DB version mismatch\n"
18709                                 "\texpected: %s\n\tgot: %s\n",
18710                                 DB_VERSION_STRING, version);
18711                         return 1;
18712                 }
18713         }
18714 #endif
18715
18716 #if DB_VERSION_MAJOR > 2
18717         db_env_create( NULL, 0 );
18718 #elif DB_VERSION_MAJOR > 1
18719         db_appexit( NULL );
18720 #else
18721         (void) dbopen( NULL, 0, 0, 0, NULL);
18722 #endif
18723
18724 ; return 0; }
18725 EOF
18726 if { (eval echo configure:18727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18727   rm -rf conftest*
18728   ol_cv_db_db_2=yes
18729 else
18730   echo "configure: failed program was:" >&5
18731   cat conftest.$ac_ext >&5
18732   rm -rf conftest*
18733   ol_cv_db_db_2=no
18734 fi
18735 rm -f conftest*
18736
18737         LIBS="$ol_LIBS"
18738
18739 fi
18740
18741 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18742
18743         if test $ol_cv_db_db_2 = yes ; then
18744                 ol_cv_lib_db=-ldb-2
18745         fi
18746 fi
18747
18748 if test $ol_cv_lib_db = no ; then
18749         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18750 echo "configure:18751: checking for Berkeley DB link (-ldb1)" >&5
18751 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18752   echo $ac_n "(cached) $ac_c" 1>&6
18753 else
18754   
18755         ol_DB_LIB=-ldb1
18756         ol_LIBS=$LIBS
18757         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18758
18759         cat > conftest.$ac_ext <<EOF
18760 #line 18761 "configure"
18761 #include "confdefs.h"
18762
18763 #ifdef HAVE_DB_185_H
18764 # include <db_185.h>
18765 #else
18766 # include <db.h>
18767 #endif
18768
18769 #ifndef DB_VERSION_MAJOR
18770 # define DB_VERSION_MAJOR 1
18771 #endif
18772
18773 #ifndef NULL
18774 #define NULL ((void*)0)
18775 #endif
18776
18777 int main() {
18778
18779 #if DB_VERSION_MAJOR > 1
18780         {
18781                 char *version;
18782                 int major, minor, patch;
18783
18784                 version = db_version( &major, &minor, &patch );
18785
18786                 if( major != DB_VERSION_MAJOR ||
18787                         minor < DB_VERSION_MINOR )
18788                 {
18789                         printf("Berkeley DB version mismatch\n"
18790                                 "\texpected: %s\n\tgot: %s\n",
18791                                 DB_VERSION_STRING, version);
18792                         return 1;
18793                 }
18794         }
18795 #endif
18796
18797 #if DB_VERSION_MAJOR > 2
18798         db_env_create( NULL, 0 );
18799 #elif DB_VERSION_MAJOR > 1
18800         db_appexit( NULL );
18801 #else
18802         (void) dbopen( NULL, 0, 0, 0, NULL);
18803 #endif
18804
18805 ; return 0; }
18806 EOF
18807 if { (eval echo configure:18808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18808   rm -rf conftest*
18809   ol_cv_db_db1=yes
18810 else
18811   echo "configure: failed program was:" >&5
18812   cat conftest.$ac_ext >&5
18813   rm -rf conftest*
18814   ol_cv_db_db1=no
18815 fi
18816 rm -f conftest*
18817
18818         LIBS="$ol_LIBS"
18819
18820 fi
18821
18822 echo "$ac_t""$ol_cv_db_db1" 1>&6
18823
18824         if test $ol_cv_db_db1 = yes ; then
18825                 ol_cv_lib_db=-ldb1
18826         fi
18827 fi
18828
18829 if test $ol_cv_lib_db = no ; then
18830         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18831 echo "configure:18832: checking for Berkeley DB link (-ldb-1)" >&5
18832 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18833   echo $ac_n "(cached) $ac_c" 1>&6
18834 else
18835   
18836         ol_DB_LIB=-ldb-1
18837         ol_LIBS=$LIBS
18838         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18839
18840         cat > conftest.$ac_ext <<EOF
18841 #line 18842 "configure"
18842 #include "confdefs.h"
18843
18844 #ifdef HAVE_DB_185_H
18845 # include <db_185.h>
18846 #else
18847 # include <db.h>
18848 #endif
18849
18850 #ifndef DB_VERSION_MAJOR
18851 # define DB_VERSION_MAJOR 1
18852 #endif
18853
18854 #ifndef NULL
18855 #define NULL ((void*)0)
18856 #endif
18857
18858 int main() {
18859
18860 #if DB_VERSION_MAJOR > 1
18861         {
18862                 char *version;
18863                 int major, minor, patch;
18864
18865                 version = db_version( &major, &minor, &patch );
18866
18867                 if( major != DB_VERSION_MAJOR ||
18868                         minor < DB_VERSION_MINOR )
18869                 {
18870                         printf("Berkeley DB version mismatch\n"
18871                                 "\texpected: %s\n\tgot: %s\n",
18872                                 DB_VERSION_STRING, version);
18873                         return 1;
18874                 }
18875         }
18876 #endif
18877
18878 #if DB_VERSION_MAJOR > 2
18879         db_env_create( NULL, 0 );
18880 #elif DB_VERSION_MAJOR > 1
18881         db_appexit( NULL );
18882 #else
18883         (void) dbopen( NULL, 0, 0, 0, NULL);
18884 #endif
18885
18886 ; return 0; }
18887 EOF
18888 if { (eval echo configure:18889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18889   rm -rf conftest*
18890   ol_cv_db_db_1=yes
18891 else
18892   echo "configure: failed program was:" >&5
18893   cat conftest.$ac_ext >&5
18894   rm -rf conftest*
18895   ol_cv_db_db_1=no
18896 fi
18897 rm -f conftest*
18898
18899         LIBS="$ol_LIBS"
18900
18901 fi
18902
18903 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18904
18905         if test $ol_cv_db_db_1 = yes ; then
18906                 ol_cv_lib_db=-ldb-1
18907         fi
18908 fi
18909
18910
18911         if test "$ol_cv_lib_db" != no ; then
18912                 ol_cv_berkeley_db=yes
18913                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18914 echo "configure:18915: checking for Berkeley DB thread support" >&5
18915 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18916   echo $ac_n "(cached) $ac_c" 1>&6
18917 else
18918   
18919         ol_LIBS="$LIBS"
18920         LIBS="$LTHREAD_LIBS $LIBS"
18921         if test $ol_cv_lib_db != yes ; then
18922                 LIBS="$ol_cv_lib_db $LIBS"
18923         fi
18924
18925         if test "$cross_compiling" = yes; then
18926   ol_cv_berkeley_db_thread=cross
18927 else
18928   cat > conftest.$ac_ext <<EOF
18929 #line 18930 "configure"
18930 #include "confdefs.h"
18931
18932 #ifdef HAVE_DB_185_H
18933         choke me;
18934 #else
18935 #include <db.h>
18936 #endif
18937 #ifndef NULL
18938 #define NULL ((void *)0)
18939 #endif
18940 main()
18941 {
18942         int rc;
18943         u_int32_t flags = DB_CREATE |
18944 #ifdef DB_PRIVATE
18945                 DB_PRIVATE |
18946 #endif
18947                 DB_THREAD;
18948
18949 #if DB_VERSION_MAJOR > 2
18950         DB_ENV *env = NULL;
18951
18952         rc = db_env_create( &env, 0 );
18953
18954         flags |= DB_INIT_MPOOL;
18955 #ifdef DB_MPOOL_PRIVATE
18956         flags |= DB_MPOOL_PRIVATE;
18957 #endif
18958
18959         if( rc ) {
18960                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18961                 return rc;
18962         }
18963
18964 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18965         rc = env->open( env, NULL, flags, 0 );
18966 #else
18967         rc = env->open( env, NULL, NULL, flags, 0 );
18968 #endif
18969
18970         if ( rc == 0 ) {
18971                 rc = env->close( env, 0 );
18972         }
18973
18974         if( rc ) {
18975                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18976                 return rc;
18977         }
18978
18979 #else
18980         DB_ENV env;
18981         memset( &env, '\0', sizeof(env) );
18982
18983         rc = db_appinit( NULL, NULL, &env, flags );
18984
18985         if( rc == 0 ) {
18986                 db_appexit( &env );
18987         }
18988
18989         unlink("__db_mpool.share");
18990         unlink("__db_lock.share");
18991 #endif
18992
18993         return rc;
18994 }
18995 EOF
18996 if { (eval echo configure:18997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18997 then
18998   ol_cv_berkeley_db_thread=yes
18999 else
19000   echo "configure: failed program was:" >&5
19001   cat conftest.$ac_ext >&5
19002   rm -fr conftest*
19003   ol_cv_berkeley_db_thread=no
19004 fi
19005 rm -fr conftest*
19006 fi
19007
19008
19009         LIBS="$ol_LIBS"
19010
19011 fi
19012
19013 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19014
19015         if test $ol_cv_berkeley_db_thread != no ; then
19016                 cat >> confdefs.h <<\EOF
19017 #define HAVE_BERKELEY_DB_THREAD 1
19018 EOF
19019
19020         fi
19021
19022         fi
19023 fi
19024
19025         fi
19026
19027         if test $ol_cv_berkeley_db != no ; then
19028                 cat >> confdefs.h <<\EOF
19029 #define HAVE_BERKELEY_DB 1
19030 EOF
19031
19032
19033                 ol_link_ldbm=berkeley
19034                 ol_with_ldbm_api=berkeley
19035
19036                 if test $ol_with_ldbm_type = hash ; then
19037                         cat >> confdefs.h <<\EOF
19038 #define LDBM_USE_DBHASH 1
19039 EOF
19040
19041                 else
19042                         cat >> confdefs.h <<\EOF
19043 #define LDBM_USE_DBBTREE 1
19044 EOF
19045
19046                 fi
19047
19048                                                 if test $ol_cv_lib_db != yes ; then
19049                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19050                 fi
19051         fi
19052 fi
19053
19054 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19055         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19056 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19057         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19058 echo "configure:19059: checking Berkeley DB version for BDB backend" >&5
19059 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19060   echo $ac_n "(cached) $ac_c" 1>&6
19061 else
19062   
19063         cat > conftest.$ac_ext <<EOF
19064 #line 19065 "configure"
19065 #include "confdefs.h"
19066
19067 #include <db.h>
19068
19069  /* this check could be improved */
19070 #ifndef DB_VERSION_MAJOR
19071 #       define DB_VERSION_MAJOR 1
19072 #endif
19073 #ifndef DB_VERSION_MINOR
19074 #       define DB_VERSION_MINOR 0
19075 #endif
19076
19077 /* require 4.1 or later */
19078 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19079         __db_version_compat
19080 #endif
19081         
19082 EOF
19083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19084   egrep "__db_version_compat" >/dev/null 2>&1; then
19085   rm -rf conftest*
19086   ol_cv_bdb_compat=yes
19087 else
19088   rm -rf conftest*
19089   ol_cv_bdb_compat=no
19090 fi
19091 rm -f conftest*
19092
19093 fi
19094
19095 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19096
19097
19098         if test $ol_cv_bdb_compat = yes ; then
19099                 ol_enable_bdb=yes
19100         elif test $ol_enable_bdb = yes ; then
19101                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19102         else
19103                 ol_enable_bdb=no
19104         fi
19105 fi
19106 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19107         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19108 fi
19109
19110 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19111         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19112         ol_with_ldbm_api=none
19113 fi
19114
19115 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19116         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19117 echo "configure:19118: checking for MDBM library" >&5
19118 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19119   echo $ac_n "(cached) $ac_c" 1>&6
19120 else
19121         ol_LIBS="$LIBS"
19122         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19123 echo "configure:19124: checking for mdbm_set_chain" >&5
19124 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19125   echo $ac_n "(cached) $ac_c" 1>&6
19126 else
19127   cat > conftest.$ac_ext <<EOF
19128 #line 19129 "configure"
19129 #include "confdefs.h"
19130 /* System header to define __stub macros and hopefully few prototypes,
19131     which can conflict with char mdbm_set_chain(); below.  */
19132 #include <assert.h>
19133 /* Override any gcc2 internal prototype to avoid an error.  */
19134 /* We use char because int might match the return type of a gcc2
19135     builtin and then its argument prototype would still apply.  */
19136 char mdbm_set_chain();
19137 char (*f)();
19138
19139 int main() {
19140
19141 /* The GNU C library defines this for functions which it implements
19142     to always fail with ENOSYS.  Some functions are actually named
19143     something starting with __ and the normal name is an alias.  */
19144 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19145 choke me
19146 #else
19147 f = mdbm_set_chain;
19148 #endif
19149
19150 ; return 0; }
19151 EOF
19152 if { (eval echo configure:19153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19153   rm -rf conftest*
19154   eval "ac_cv_func_mdbm_set_chain=yes"
19155 else
19156   echo "configure: failed program was:" >&5
19157   cat conftest.$ac_ext >&5
19158   rm -rf conftest*
19159   eval "ac_cv_func_mdbm_set_chain=no"
19160 fi
19161 rm -f conftest*
19162 fi
19163
19164 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19165   echo "$ac_t""yes" 1>&6
19166   ol_cv_lib_mdbm=yes
19167 else
19168   echo "$ac_t""no" 1>&6
19169
19170                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19171 echo "configure:19172: checking for mdbm_set_chain in -lmdbm" >&5
19172 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19173 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19174   echo $ac_n "(cached) $ac_c" 1>&6
19175 else
19176   ac_save_LIBS="$LIBS"
19177 LIBS="-lmdbm  $LIBS"
19178 cat > conftest.$ac_ext <<EOF
19179 #line 19180 "configure"
19180 #include "confdefs.h"
19181 /* Override any gcc2 internal prototype to avoid an error.  */
19182 /* We use char because int might match the return type of a gcc2
19183     builtin and then its argument prototype would still apply.  */
19184 char mdbm_set_chain();
19185
19186 int main() {
19187 mdbm_set_chain()
19188 ; return 0; }
19189 EOF
19190 if { (eval echo configure:19191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19191   rm -rf conftest*
19192   eval "ac_cv_lib_$ac_lib_var=yes"
19193 else
19194   echo "configure: failed program was:" >&5
19195   cat conftest.$ac_ext >&5
19196   rm -rf conftest*
19197   eval "ac_cv_lib_$ac_lib_var=no"
19198 fi
19199 rm -f conftest*
19200 LIBS="$ac_save_LIBS"
19201
19202 fi
19203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19204   echo "$ac_t""yes" 1>&6
19205   ol_cv_lib_mdbm=-lmdbm
19206 else
19207   echo "$ac_t""no" 1>&6
19208 ol_cv_lib_mdbm=no
19209 fi
19210
19211         
19212 fi
19213
19214         LIBS="$ol_LIBS"
19215
19216 fi
19217
19218 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19219
19220
19221  for ac_hdr in mdbm.h
19222 do
19223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19225 echo "configure:19226: checking for $ac_hdr" >&5
19226 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19227   echo $ac_n "(cached) $ac_c" 1>&6
19228 else
19229   cat > conftest.$ac_ext <<EOF
19230 #line 19231 "configure"
19231 #include "confdefs.h"
19232 #include <$ac_hdr>
19233 EOF
19234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19235 { (eval echo configure:19236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19237 if test -z "$ac_err"; then
19238   rm -rf conftest*
19239   eval "ac_cv_header_$ac_safe=yes"
19240 else
19241   echo "$ac_err" >&5
19242   echo "configure: failed program was:" >&5
19243   cat conftest.$ac_ext >&5
19244   rm -rf conftest*
19245   eval "ac_cv_header_$ac_safe=no"
19246 fi
19247 rm -f conftest*
19248 fi
19249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19250   echo "$ac_t""yes" 1>&6
19251     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19252   cat >> confdefs.h <<EOF
19253 #define $ac_tr_hdr 1
19254 EOF
19255  
19256 else
19257   echo "$ac_t""no" 1>&6
19258 fi
19259 done
19260
19261  echo $ac_n "checking for db""... $ac_c" 1>&6
19262 echo "configure:19263: checking for db" >&5
19263 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19264   echo $ac_n "(cached) $ac_c" 1>&6
19265 else
19266   
19267         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19268                 ol_cv_mdbm=no
19269         else
19270                 ol_cv_mdbm=yes
19271         fi
19272
19273 fi
19274
19275 echo "$ac_t""$ol_cv_mdbm" 1>&6
19276  if test $ol_cv_mdbm = yes ; then
19277         cat >> confdefs.h <<\EOF
19278 #define HAVE_MDBM 1
19279 EOF
19280
19281  fi
19282
19283
19284         if test $ol_cv_mdbm = yes ; then
19285                 ol_link_ldbm=mdbm
19286                 ol_with_ldbm_api=mdbm
19287                 if test $ol_cv_lib_mdbm != yes ; then
19288                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19289                 fi
19290         fi
19291 fi
19292
19293 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19294         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19295 echo "configure:19296: checking for GDBM library" >&5
19296 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19297   echo $ac_n "(cached) $ac_c" 1>&6
19298 else
19299         ol_LIBS="$LIBS"
19300         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19301 echo "configure:19302: checking for gdbm_open" >&5
19302 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19303   echo $ac_n "(cached) $ac_c" 1>&6
19304 else
19305   cat > conftest.$ac_ext <<EOF
19306 #line 19307 "configure"
19307 #include "confdefs.h"
19308 /* System header to define __stub macros and hopefully few prototypes,
19309     which can conflict with char gdbm_open(); below.  */
19310 #include <assert.h>
19311 /* Override any gcc2 internal prototype to avoid an error.  */
19312 /* We use char because int might match the return type of a gcc2
19313     builtin and then its argument prototype would still apply.  */
19314 char gdbm_open();
19315 char (*f)();
19316
19317 int main() {
19318
19319 /* The GNU C library defines this for functions which it implements
19320     to always fail with ENOSYS.  Some functions are actually named
19321     something starting with __ and the normal name is an alias.  */
19322 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19323 choke me
19324 #else
19325 f = gdbm_open;
19326 #endif
19327
19328 ; return 0; }
19329 EOF
19330 if { (eval echo configure:19331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19331   rm -rf conftest*
19332   eval "ac_cv_func_gdbm_open=yes"
19333 else
19334   echo "configure: failed program was:" >&5
19335   cat conftest.$ac_ext >&5
19336   rm -rf conftest*
19337   eval "ac_cv_func_gdbm_open=no"
19338 fi
19339 rm -f conftest*
19340 fi
19341
19342 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19343   echo "$ac_t""yes" 1>&6
19344   ol_cv_lib_gdbm=yes
19345 else
19346   echo "$ac_t""no" 1>&6
19347
19348                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19349 echo "configure:19350: checking for gdbm_open in -lgdbm" >&5
19350 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19351 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19352   echo $ac_n "(cached) $ac_c" 1>&6
19353 else
19354   ac_save_LIBS="$LIBS"
19355 LIBS="-lgdbm  $LIBS"
19356 cat > conftest.$ac_ext <<EOF
19357 #line 19358 "configure"
19358 #include "confdefs.h"
19359 /* Override any gcc2 internal prototype to avoid an error.  */
19360 /* We use char because int might match the return type of a gcc2
19361     builtin and then its argument prototype would still apply.  */
19362 char gdbm_open();
19363
19364 int main() {
19365 gdbm_open()
19366 ; return 0; }
19367 EOF
19368 if { (eval echo configure:19369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19369   rm -rf conftest*
19370   eval "ac_cv_lib_$ac_lib_var=yes"
19371 else
19372   echo "configure: failed program was:" >&5
19373   cat conftest.$ac_ext >&5
19374   rm -rf conftest*
19375   eval "ac_cv_lib_$ac_lib_var=no"
19376 fi
19377 rm -f conftest*
19378 LIBS="$ac_save_LIBS"
19379
19380 fi
19381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19382   echo "$ac_t""yes" 1>&6
19383   ol_cv_lib_gdbm=-lgdbm
19384 else
19385   echo "$ac_t""no" 1>&6
19386 ol_cv_lib_gdbm=no
19387 fi
19388
19389         
19390 fi
19391
19392         LIBS="$ol_LIBS"
19393
19394 fi
19395
19396 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19397
19398
19399  for ac_hdr in gdbm.h
19400 do
19401 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19402 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19403 echo "configure:19404: checking for $ac_hdr" >&5
19404 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19405   echo $ac_n "(cached) $ac_c" 1>&6
19406 else
19407   cat > conftest.$ac_ext <<EOF
19408 #line 19409 "configure"
19409 #include "confdefs.h"
19410 #include <$ac_hdr>
19411 EOF
19412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19413 { (eval echo configure:19414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19415 if test -z "$ac_err"; then
19416   rm -rf conftest*
19417   eval "ac_cv_header_$ac_safe=yes"
19418 else
19419   echo "$ac_err" >&5
19420   echo "configure: failed program was:" >&5
19421   cat conftest.$ac_ext >&5
19422   rm -rf conftest*
19423   eval "ac_cv_header_$ac_safe=no"
19424 fi
19425 rm -f conftest*
19426 fi
19427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19428   echo "$ac_t""yes" 1>&6
19429     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19430   cat >> confdefs.h <<EOF
19431 #define $ac_tr_hdr 1
19432 EOF
19433  
19434 else
19435   echo "$ac_t""no" 1>&6
19436 fi
19437 done
19438
19439  echo $ac_n "checking for db""... $ac_c" 1>&6
19440 echo "configure:19441: checking for db" >&5
19441 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19442   echo $ac_n "(cached) $ac_c" 1>&6
19443 else
19444   
19445         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19446                 ol_cv_gdbm=no
19447         else
19448                 ol_cv_gdbm=yes
19449         fi
19450
19451 fi
19452
19453 echo "$ac_t""$ol_cv_gdbm" 1>&6
19454  if test $ol_cv_gdbm = yes ; then
19455         cat >> confdefs.h <<\EOF
19456 #define HAVE_GDBM 1
19457 EOF
19458
19459  fi
19460
19461
19462         if test $ol_cv_gdbm = yes ; then
19463                 ol_link_ldbm=gdbm
19464                 ol_with_ldbm_api=gdbm
19465
19466                 if test $ol_cv_lib_gdbm != yes ; then
19467                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19468                 fi
19469         fi
19470 fi
19471
19472 if test $ol_with_ldbm_api = ndbm ; then
19473         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19474 echo "configure:19475: checking for NDBM library" >&5
19475 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19476   echo $ac_n "(cached) $ac_c" 1>&6
19477 else
19478         ol_LIBS="$LIBS"
19479         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19480 echo "configure:19481: checking for dbm_open" >&5
19481 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19482   echo $ac_n "(cached) $ac_c" 1>&6
19483 else
19484   cat > conftest.$ac_ext <<EOF
19485 #line 19486 "configure"
19486 #include "confdefs.h"
19487 /* System header to define __stub macros and hopefully few prototypes,
19488     which can conflict with char dbm_open(); below.  */
19489 #include <assert.h>
19490 /* Override any gcc2 internal prototype to avoid an error.  */
19491 /* We use char because int might match the return type of a gcc2
19492     builtin and then its argument prototype would still apply.  */
19493 char dbm_open();
19494 char (*f)();
19495
19496 int main() {
19497
19498 /* The GNU C library defines this for functions which it implements
19499     to always fail with ENOSYS.  Some functions are actually named
19500     something starting with __ and the normal name is an alias.  */
19501 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19502 choke me
19503 #else
19504 f = dbm_open;
19505 #endif
19506
19507 ; return 0; }
19508 EOF
19509 if { (eval echo configure:19510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19510   rm -rf conftest*
19511   eval "ac_cv_func_dbm_open=yes"
19512 else
19513   echo "configure: failed program was:" >&5
19514   cat conftest.$ac_ext >&5
19515   rm -rf conftest*
19516   eval "ac_cv_func_dbm_open=no"
19517 fi
19518 rm -f conftest*
19519 fi
19520
19521 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19522   echo "$ac_t""yes" 1>&6
19523   ol_cv_lib_ndbm=yes
19524 else
19525   echo "$ac_t""no" 1>&6
19526
19527                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19528 echo "configure:19529: checking for dbm_open in -lndbm" >&5
19529 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19531   echo $ac_n "(cached) $ac_c" 1>&6
19532 else
19533   ac_save_LIBS="$LIBS"
19534 LIBS="-lndbm  $LIBS"
19535 cat > conftest.$ac_ext <<EOF
19536 #line 19537 "configure"
19537 #include "confdefs.h"
19538 /* Override any gcc2 internal prototype to avoid an error.  */
19539 /* We use char because int might match the return type of a gcc2
19540     builtin and then its argument prototype would still apply.  */
19541 char dbm_open();
19542
19543 int main() {
19544 dbm_open()
19545 ; return 0; }
19546 EOF
19547 if { (eval echo configure:19548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19548   rm -rf conftest*
19549   eval "ac_cv_lib_$ac_lib_var=yes"
19550 else
19551   echo "configure: failed program was:" >&5
19552   cat conftest.$ac_ext >&5
19553   rm -rf conftest*
19554   eval "ac_cv_lib_$ac_lib_var=no"
19555 fi
19556 rm -f conftest*
19557 LIBS="$ac_save_LIBS"
19558
19559 fi
19560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19561   echo "$ac_t""yes" 1>&6
19562   ol_cv_lib_ndbm=-lndbm
19563 else
19564   echo "$ac_t""no" 1>&6
19565
19566                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19567 echo "configure:19568: checking for dbm_open in -ldbm" >&5
19568 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19569 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19570   echo $ac_n "(cached) $ac_c" 1>&6
19571 else
19572   ac_save_LIBS="$LIBS"
19573 LIBS="-ldbm  $LIBS"
19574 cat > conftest.$ac_ext <<EOF
19575 #line 19576 "configure"
19576 #include "confdefs.h"
19577 /* Override any gcc2 internal prototype to avoid an error.  */
19578 /* We use char because int might match the return type of a gcc2
19579     builtin and then its argument prototype would still apply.  */
19580 char dbm_open();
19581
19582 int main() {
19583 dbm_open()
19584 ; return 0; }
19585 EOF
19586 if { (eval echo configure:19587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19587   rm -rf conftest*
19588   eval "ac_cv_lib_$ac_lib_var=yes"
19589 else
19590   echo "configure: failed program was:" >&5
19591   cat conftest.$ac_ext >&5
19592   rm -rf conftest*
19593   eval "ac_cv_lib_$ac_lib_var=no"
19594 fi
19595 rm -f conftest*
19596 LIBS="$ac_save_LIBS"
19597
19598 fi
19599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19600   echo "$ac_t""yes" 1>&6
19601   ol_cv_lib_ndbm=-ldbm
19602 else
19603   echo "$ac_t""no" 1>&6
19604 ol_cv_lib_ndbm=no
19605 fi
19606                 
19607 fi
19608
19609         
19610 fi
19611
19612         LIBS="$ol_LIBS"
19613
19614 fi
19615
19616 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19617
19618
19619  for ac_hdr in ndbm.h
19620 do
19621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19623 echo "configure:19624: checking for $ac_hdr" >&5
19624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19625   echo $ac_n "(cached) $ac_c" 1>&6
19626 else
19627   cat > conftest.$ac_ext <<EOF
19628 #line 19629 "configure"
19629 #include "confdefs.h"
19630 #include <$ac_hdr>
19631 EOF
19632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19633 { (eval echo configure:19634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19635 if test -z "$ac_err"; then
19636   rm -rf conftest*
19637   eval "ac_cv_header_$ac_safe=yes"
19638 else
19639   echo "$ac_err" >&5
19640   echo "configure: failed program was:" >&5
19641   cat conftest.$ac_ext >&5
19642   rm -rf conftest*
19643   eval "ac_cv_header_$ac_safe=no"
19644 fi
19645 rm -f conftest*
19646 fi
19647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19648   echo "$ac_t""yes" 1>&6
19649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19650   cat >> confdefs.h <<EOF
19651 #define $ac_tr_hdr 1
19652 EOF
19653  
19654 else
19655   echo "$ac_t""no" 1>&6
19656 fi
19657 done
19658
19659  echo $ac_n "checking for db""... $ac_c" 1>&6
19660 echo "configure:19661: checking for db" >&5
19661 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19662   echo $ac_n "(cached) $ac_c" 1>&6
19663 else
19664   
19665         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19666                 ol_cv_ndbm=no
19667         else
19668                 ol_cv_ndbm=yes
19669         fi
19670
19671 fi
19672
19673 echo "$ac_t""$ol_cv_ndbm" 1>&6
19674  if test $ol_cv_ndbm = yes ; then
19675         cat >> confdefs.h <<\EOF
19676 #define HAVE_NDBM 1
19677 EOF
19678
19679  fi
19680
19681
19682         if test $ol_cv_ndbm = yes ; then
19683                 ol_link_ldbm=ndbm
19684                 ol_with_ldbm_api=ndbm
19685
19686                 if test $ol_cv_lib_ndbm != yes ; then
19687                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19688                 fi
19689         fi
19690 fi
19691
19692 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19693         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19694         if test $ol_enable_ldbm = yes ; then
19695                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19696         fi
19697
19698         echo "configure: warning: disabling LDBM" 1>&2
19699         ol_enable_ldbm=no
19700 fi
19701
19702
19703 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19704         BUILD_LIBS_DYNAMIC=shared
19705         cat >> confdefs.h <<\EOF
19706 #define LDAP_LIBS_DYNAMIC 1
19707 EOF
19708
19709         LTSTATIC=""
19710 else
19711         BUILD_LIBS_DYNAMIC=static
19712         LTSTATIC="-static"
19713 fi
19714
19715 if test $ol_enable_wrappers != no ; then
19716         for ac_hdr in tcpd.h
19717 do
19718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19720 echo "configure:19721: checking for $ac_hdr" >&5
19721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19722   echo $ac_n "(cached) $ac_c" 1>&6
19723 else
19724   cat > conftest.$ac_ext <<EOF
19725 #line 19726 "configure"
19726 #include "confdefs.h"
19727 #include <$ac_hdr>
19728 EOF
19729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19730 { (eval echo configure:19731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19732 if test -z "$ac_err"; then
19733   rm -rf conftest*
19734   eval "ac_cv_header_$ac_safe=yes"
19735 else
19736   echo "$ac_err" >&5
19737   echo "configure: failed program was:" >&5
19738   cat conftest.$ac_ext >&5
19739   rm -rf conftest*
19740   eval "ac_cv_header_$ac_safe=no"
19741 fi
19742 rm -f conftest*
19743 fi
19744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19745   echo "$ac_t""yes" 1>&6
19746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19747   cat >> confdefs.h <<EOF
19748 #define $ac_tr_hdr 1
19749 EOF
19750  
19751                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19752 echo "configure:19753: checking for TCP wrappers library" >&5
19753                 save_LIBS="$LIBS"
19754                 LIBS="$LIBS -lwrap"
19755                 cat > conftest.$ac_ext <<EOF
19756 #line 19757 "configure"
19757 #include "confdefs.h"
19758
19759 #include <tcpd.h>
19760 int allow_severity = 0;
19761 int deny_severity  = 0;
19762
19763 struct request_info *req;
19764                 
19765 int main() {
19766
19767 hosts_access(req)
19768                 
19769 ; return 0; }
19770 EOF
19771 if { (eval echo configure:19772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19772   rm -rf conftest*
19773   echo "$ac_t""-lwrap" 1>&6
19774                 have_wrappers=yes
19775                 LIBS="$save_LIBS"
19776 else
19777   echo "configure: failed program was:" >&5
19778   cat conftest.$ac_ext >&5
19779   rm -rf conftest*
19780   
19781                                 LIBS="$LIBS -lnsl"
19782                 cat > conftest.$ac_ext <<EOF
19783 #line 19784 "configure"
19784 #include "confdefs.h"
19785
19786 #include <tcpd.h>
19787 int allow_severity = 0;
19788 int deny_severity  = 0;
19789
19790 struct request_info *req;
19791                 
19792 int main() {
19793
19794 hosts_access(req)
19795                 
19796 ; return 0; }
19797 EOF
19798 if { (eval echo configure:19799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19799   rm -rf conftest*
19800   echo "$ac_t""-lwrap -lnsl" 1>&6
19801                 have_wrappers=yes
19802                 LIBS="$save_LIBS -lnsl"
19803 else
19804   echo "configure: failed program was:" >&5
19805   cat conftest.$ac_ext >&5
19806   rm -rf conftest*
19807   
19808                 echo "$ac_t""no" 1>&6
19809                 have_wrappers=no
19810                 LIBS=$save_LIBS
19811 fi
19812 rm -f conftest*
19813 fi
19814 rm -f conftest*
19815 else
19816   echo "$ac_t""no" 1>&6
19817 have_wrappers=no
19818 fi
19819 done
19820
19821
19822         if test $have_wrappers = yes ; then
19823                 cat >> confdefs.h <<\EOF
19824 #define HAVE_TCPD 1
19825 EOF
19826
19827                 WRAP_LIBS="-lwrap"
19828         elif test $ol_enable_wrappers = yes ; then
19829                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19830         else
19831                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19832                 WRAP_LIBS=""
19833         fi
19834 fi
19835
19836 if test $ol_enable_syslog != no ; then
19837         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19838 echo "configure:19839: checking for openlog" >&5
19839 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19840   echo $ac_n "(cached) $ac_c" 1>&6
19841 else
19842   cat > conftest.$ac_ext <<EOF
19843 #line 19844 "configure"
19844 #include "confdefs.h"
19845 /* System header to define __stub macros and hopefully few prototypes,
19846     which can conflict with char openlog(); below.  */
19847 #include <assert.h>
19848 /* Override any gcc2 internal prototype to avoid an error.  */
19849 /* We use char because int might match the return type of a gcc2
19850     builtin and then its argument prototype would still apply.  */
19851 char openlog();
19852 char (*f)();
19853
19854 int main() {
19855
19856 /* The GNU C library defines this for functions which it implements
19857     to always fail with ENOSYS.  Some functions are actually named
19858     something starting with __ and the normal name is an alias.  */
19859 #if defined (__stub_openlog) || defined (__stub___openlog)
19860 choke me
19861 #else
19862 f = openlog;
19863 #endif
19864
19865 ; return 0; }
19866 EOF
19867 if { (eval echo configure:19868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19868   rm -rf conftest*
19869   eval "ac_cv_func_openlog=yes"
19870 else
19871   echo "configure: failed program was:" >&5
19872   cat conftest.$ac_ext >&5
19873   rm -rf conftest*
19874   eval "ac_cv_func_openlog=no"
19875 fi
19876 rm -f conftest*
19877 fi
19878
19879 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19880   echo "$ac_t""yes" 1>&6
19881   :
19882 else
19883   echo "$ac_t""no" 1>&6
19884 fi
19885
19886         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19887                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19888         fi
19889         ol_enable_syslog=$ac_cv_func_openlog
19890 fi
19891
19892
19893 ol_link_sql=no
19894 if test $ol_enable_sql != no ; then
19895         for ac_hdr in sql.h sqlext.h
19896 do
19897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19899 echo "configure:19900: checking for $ac_hdr" >&5
19900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19901   echo $ac_n "(cached) $ac_c" 1>&6
19902 else
19903   cat > conftest.$ac_ext <<EOF
19904 #line 19905 "configure"
19905 #include "confdefs.h"
19906 #include <$ac_hdr>
19907 EOF
19908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19909 { (eval echo configure:19910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19911 if test -z "$ac_err"; then
19912   rm -rf conftest*
19913   eval "ac_cv_header_$ac_safe=yes"
19914 else
19915   echo "$ac_err" >&5
19916   echo "configure: failed program was:" >&5
19917   cat conftest.$ac_ext >&5
19918   rm -rf conftest*
19919   eval "ac_cv_header_$ac_safe=no"
19920 fi
19921 rm -f conftest*
19922 fi
19923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19924   echo "$ac_t""yes" 1>&6
19925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19926   cat >> confdefs.h <<EOF
19927 #define $ac_tr_hdr 1
19928 EOF
19929  
19930 else
19931   echo "$ac_t""no" 1>&6
19932 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19933         
19934 fi
19935 done
19936
19937
19938         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19939 echo "configure:19940: checking for SQLDriverConnect in -liodbc" >&5
19940 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19941 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19942   echo $ac_n "(cached) $ac_c" 1>&6
19943 else
19944   ac_save_LIBS="$LIBS"
19945 LIBS="-liodbc  $LIBS"
19946 cat > conftest.$ac_ext <<EOF
19947 #line 19948 "configure"
19948 #include "confdefs.h"
19949 /* Override any gcc2 internal prototype to avoid an error.  */
19950 /* We use char because int might match the return type of a gcc2
19951     builtin and then its argument prototype would still apply.  */
19952 char SQLDriverConnect();
19953
19954 int main() {
19955 SQLDriverConnect()
19956 ; return 0; }
19957 EOF
19958 if { (eval echo configure:19959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19959   rm -rf conftest*
19960   eval "ac_cv_lib_$ac_lib_var=yes"
19961 else
19962   echo "configure: failed program was:" >&5
19963   cat conftest.$ac_ext >&5
19964   rm -rf conftest*
19965   eval "ac_cv_lib_$ac_lib_var=no"
19966 fi
19967 rm -f conftest*
19968 LIBS="$ac_save_LIBS"
19969
19970 fi
19971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19972   echo "$ac_t""yes" 1>&6
19973   have_iodbc=yes
19974 else
19975   echo "$ac_t""no" 1>&6
19976 have_iodbc=no
19977 fi
19978
19979         if test $have_iodbc = yes ; then
19980                 ol_link_sql="-liodbc"
19981         else
19982                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19983 echo "configure:19984: checking for SQLDriverConnect in -lodbc" >&5
19984 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19986   echo $ac_n "(cached) $ac_c" 1>&6
19987 else
19988   ac_save_LIBS="$LIBS"
19989 LIBS="-lodbc  $LIBS"
19990 cat > conftest.$ac_ext <<EOF
19991 #line 19992 "configure"
19992 #include "confdefs.h"
19993 /* Override any gcc2 internal prototype to avoid an error.  */
19994 /* We use char because int might match the return type of a gcc2
19995     builtin and then its argument prototype would still apply.  */
19996 char SQLDriverConnect();
19997
19998 int main() {
19999 SQLDriverConnect()
20000 ; return 0; }
20001 EOF
20002 if { (eval echo configure:20003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20003   rm -rf conftest*
20004   eval "ac_cv_lib_$ac_lib_var=yes"
20005 else
20006   echo "configure: failed program was:" >&5
20007   cat conftest.$ac_ext >&5
20008   rm -rf conftest*
20009   eval "ac_cv_lib_$ac_lib_var=no"
20010 fi
20011 rm -f conftest*
20012 LIBS="$ac_save_LIBS"
20013
20014 fi
20015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20016   echo "$ac_t""yes" 1>&6
20017   have_odbc=yes
20018 else
20019   echo "$ac_t""no" 1>&6
20020 have_odbc=no
20021 fi
20022
20023                 if test $have_odbc = yes ; then
20024                         ol_link_sql="-lodbc"
20025                 fi
20026         fi
20027
20028         if test $ol_link_sql != no ; then
20029                 SLAPD_SQL_LIBS="$ol_link_sql"
20030
20031         elif test $ol_enable_sql != auto ; then
20032                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20033         fi
20034 fi
20035
20036 ol_link_termcap=no
20037 for ac_hdr in termcap.h ncurses.h
20038 do
20039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20041 echo "configure:20042: checking for $ac_hdr" >&5
20042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20043   echo $ac_n "(cached) $ac_c" 1>&6
20044 else
20045   cat > conftest.$ac_ext <<EOF
20046 #line 20047 "configure"
20047 #include "confdefs.h"
20048 #include <$ac_hdr>
20049 EOF
20050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20051 { (eval echo configure:20052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20053 if test -z "$ac_err"; then
20054   rm -rf conftest*
20055   eval "ac_cv_header_$ac_safe=yes"
20056 else
20057   echo "$ac_err" >&5
20058   echo "configure: failed program was:" >&5
20059   cat conftest.$ac_ext >&5
20060   rm -rf conftest*
20061   eval "ac_cv_header_$ac_safe=no"
20062 fi
20063 rm -f conftest*
20064 fi
20065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20066   echo "$ac_t""yes" 1>&6
20067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20068   cat >> confdefs.h <<EOF
20069 #define $ac_tr_hdr 1
20070 EOF
20071  
20072 else
20073   echo "$ac_t""no" 1>&6
20074 fi
20075 done
20076
20077
20078 if test $ol_link_termcap = no ; then
20079         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20080 echo "configure:20081: checking for tputs in -ltermcap" >&5
20081 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20083   echo $ac_n "(cached) $ac_c" 1>&6
20084 else
20085   ac_save_LIBS="$LIBS"
20086 LIBS="-ltermcap  $LIBS"
20087 cat > conftest.$ac_ext <<EOF
20088 #line 20089 "configure"
20089 #include "confdefs.h"
20090 /* Override any gcc2 internal prototype to avoid an error.  */
20091 /* We use char because int might match the return type of a gcc2
20092     builtin and then its argument prototype would still apply.  */
20093 char tputs();
20094
20095 int main() {
20096 tputs()
20097 ; return 0; }
20098 EOF
20099 if { (eval echo configure:20100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20100   rm -rf conftest*
20101   eval "ac_cv_lib_$ac_lib_var=yes"
20102 else
20103   echo "configure: failed program was:" >&5
20104   cat conftest.$ac_ext >&5
20105   rm -rf conftest*
20106   eval "ac_cv_lib_$ac_lib_var=no"
20107 fi
20108 rm -f conftest*
20109 LIBS="$ac_save_LIBS"
20110
20111 fi
20112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20113   echo "$ac_t""yes" 1>&6
20114   have_termcap=yes
20115 else
20116   echo "$ac_t""no" 1>&6
20117 have_termcap=no
20118 fi
20119
20120         if test $have_termcap = yes ; then
20121                 cat >> confdefs.h <<\EOF
20122 #define HAVE_TERMCAP 1
20123 EOF
20124
20125                 ol_link_termcap=yes
20126                 TERMCAP_LIBS=-ltermcap
20127         fi
20128 fi
20129
20130 if test $ol_link_termcap = no ; then
20131         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20132 echo "configure:20133: checking for initscr in -lncurses" >&5
20133 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20135   echo $ac_n "(cached) $ac_c" 1>&6
20136 else
20137   ac_save_LIBS="$LIBS"
20138 LIBS="-lncurses  $LIBS"
20139 cat > conftest.$ac_ext <<EOF
20140 #line 20141 "configure"
20141 #include "confdefs.h"
20142 /* Override any gcc2 internal prototype to avoid an error.  */
20143 /* We use char because int might match the return type of a gcc2
20144     builtin and then its argument prototype would still apply.  */
20145 char initscr();
20146
20147 int main() {
20148 initscr()
20149 ; return 0; }
20150 EOF
20151 if { (eval echo configure:20152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20152   rm -rf conftest*
20153   eval "ac_cv_lib_$ac_lib_var=yes"
20154 else
20155   echo "configure: failed program was:" >&5
20156   cat conftest.$ac_ext >&5
20157   rm -rf conftest*
20158   eval "ac_cv_lib_$ac_lib_var=no"
20159 fi
20160 rm -f conftest*
20161 LIBS="$ac_save_LIBS"
20162
20163 fi
20164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20165   echo "$ac_t""yes" 1>&6
20166   have_ncurses=yes
20167 else
20168   echo "$ac_t""no" 1>&6
20169 have_ncurses=no
20170 fi
20171
20172         if test $have_ncurses = yes ; then
20173                 cat >> confdefs.h <<\EOF
20174 #define HAVE_NCURSES 1
20175 EOF
20176
20177                 ol_link_termcap=yes
20178                 TERMCAP_LIBS=-lncurses
20179         fi
20180 fi
20181
20182 if test $ol_link_termcap = no ; then
20183         cat >> confdefs.h <<\EOF
20184 #define NO_TERMCAP 1
20185 EOF
20186
20187         TERMCAP_LIBS=
20188 fi
20189
20190 ol_link_sasl=no
20191 ol_link_spasswd=no
20192 if test $ol_with_cyrus_sasl != no ; then
20193         for ac_hdr in sasl/sasl.h sasl.h
20194 do
20195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20197 echo "configure:20198: checking for $ac_hdr" >&5
20198 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20199   echo $ac_n "(cached) $ac_c" 1>&6
20200 else
20201   cat > conftest.$ac_ext <<EOF
20202 #line 20203 "configure"
20203 #include "confdefs.h"
20204 #include <$ac_hdr>
20205 EOF
20206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20207 { (eval echo configure:20208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20209 if test -z "$ac_err"; then
20210   rm -rf conftest*
20211   eval "ac_cv_header_$ac_safe=yes"
20212 else
20213   echo "$ac_err" >&5
20214   echo "configure: failed program was:" >&5
20215   cat conftest.$ac_ext >&5
20216   rm -rf conftest*
20217   eval "ac_cv_header_$ac_safe=no"
20218 fi
20219 rm -f conftest*
20220 fi
20221 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20222   echo "$ac_t""yes" 1>&6
20223     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20224   cat >> confdefs.h <<EOF
20225 #define $ac_tr_hdr 1
20226 EOF
20227  
20228 else
20229   echo "$ac_t""no" 1>&6
20230 fi
20231 done
20232
20233
20234         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20235                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20236 echo "configure:20237: checking for sasl_client_init in -lsasl2" >&5
20237 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20238 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20239   echo $ac_n "(cached) $ac_c" 1>&6
20240 else
20241   ac_save_LIBS="$LIBS"
20242 LIBS="-lsasl2  $LIBS"
20243 cat > conftest.$ac_ext <<EOF
20244 #line 20245 "configure"
20245 #include "confdefs.h"
20246 /* Override any gcc2 internal prototype to avoid an error.  */
20247 /* We use char because int might match the return type of a gcc2
20248     builtin and then its argument prototype would still apply.  */
20249 char sasl_client_init();
20250
20251 int main() {
20252 sasl_client_init()
20253 ; return 0; }
20254 EOF
20255 if { (eval echo configure:20256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20256   rm -rf conftest*
20257   eval "ac_cv_lib_$ac_lib_var=yes"
20258 else
20259   echo "configure: failed program was:" >&5
20260   cat conftest.$ac_ext >&5
20261   rm -rf conftest*
20262   eval "ac_cv_lib_$ac_lib_var=no"
20263 fi
20264 rm -f conftest*
20265 LIBS="$ac_save_LIBS"
20266
20267 fi
20268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20269   echo "$ac_t""yes" 1>&6
20270   ol_link_sasl="-lsasl2"
20271 else
20272   echo "$ac_t""no" 1>&6
20273 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20274 echo "configure:20275: checking for sasl_client_init in -lsasl" >&5
20275 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20276 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   ac_save_LIBS="$LIBS"
20280 LIBS="-lsasl  $LIBS"
20281 cat > conftest.$ac_ext <<EOF
20282 #line 20283 "configure"
20283 #include "confdefs.h"
20284 /* Override any gcc2 internal prototype to avoid an error.  */
20285 /* We use char because int might match the return type of a gcc2
20286     builtin and then its argument prototype would still apply.  */
20287 char sasl_client_init();
20288
20289 int main() {
20290 sasl_client_init()
20291 ; return 0; }
20292 EOF
20293 if { (eval echo configure:20294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20294   rm -rf conftest*
20295   eval "ac_cv_lib_$ac_lib_var=yes"
20296 else
20297   echo "configure: failed program was:" >&5
20298   cat conftest.$ac_ext >&5
20299   rm -rf conftest*
20300   eval "ac_cv_lib_$ac_lib_var=no"
20301 fi
20302 rm -f conftest*
20303 LIBS="$ac_save_LIBS"
20304
20305 fi
20306 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20307   echo "$ac_t""yes" 1>&6
20308   ol_link_sasl="-lsasl"
20309 else
20310   echo "$ac_t""no" 1>&6
20311 fi
20312
20313 fi
20314
20315         fi
20316
20317         if test $ol_link_sasl = no ; then
20318                 if test $ol_with_cyrus_sasl != auto ; then
20319                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20320                 else
20321                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20322                         echo "configure: warning: SASL authentication not supported!" 1>&2
20323                         if test $ol_link_tls = no ; then
20324                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20325                         fi
20326                 fi
20327         else
20328                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20329 echo "configure:20330: checking Cyrus SASL library version" >&5
20330 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20331   echo $ac_n "(cached) $ac_c" 1>&6
20332 else
20333   
20334         cat > conftest.$ac_ext <<EOF
20335 #line 20336 "configure"
20336 #include "confdefs.h"
20337
20338 #ifdef HAVE_SASL_SASL_H
20339 #include <sasl/sasl.h>
20340 #else
20341 #include <sasl.h>
20342 #endif
20343
20344 /* require 2.1.3 or later */
20345 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20346         char *__sasl_compat = "2.2+ or better okay (we guess)";
20347 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20348         && SASL_VERSION_STEP >=3
20349         char *__sasl_compat = "2.1.3+ or better okay";
20350 #endif
20351         
20352 EOF
20353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20354   egrep "__sasl_compat" >/dev/null 2>&1; then
20355   rm -rf conftest*
20356   ol_cv_sasl_compat=yes
20357 else
20358   rm -rf conftest*
20359   ol_cv_sasl_compat=no
20360 fi
20361 rm -f conftest*
20362
20363 fi
20364
20365 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20366
20367                 if test $ol_cv_sasl_compat = no ; then
20368                         ol_link_sasl=no
20369                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20370                 fi
20371
20372                 cat >> confdefs.h <<\EOF
20373 #define HAVE_CYRUS_SASL 1
20374 EOF
20375
20376                 SASL_LIBS="$ol_link_sasl"
20377                 if test $ol_enable_spasswd != no ; then
20378                         ol_link_spasswd=yes
20379                 fi
20380
20381                 ac_save_LIBS="$LIBS"
20382                 LIBS="$LIBS $ol_link_sasl"
20383                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20384 echo "configure:20385: checking for sasl_version" >&5
20385 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20386   echo $ac_n "(cached) $ac_c" 1>&6
20387 else
20388   cat > conftest.$ac_ext <<EOF
20389 #line 20390 "configure"
20390 #include "confdefs.h"
20391 /* System header to define __stub macros and hopefully few prototypes,
20392     which can conflict with char sasl_version(); below.  */
20393 #include <assert.h>
20394 /* Override any gcc2 internal prototype to avoid an error.  */
20395 /* We use char because int might match the return type of a gcc2
20396     builtin and then its argument prototype would still apply.  */
20397 char sasl_version();
20398 char (*f)();
20399
20400 int main() {
20401
20402 /* The GNU C library defines this for functions which it implements
20403     to always fail with ENOSYS.  Some functions are actually named
20404     something starting with __ and the normal name is an alias.  */
20405 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20406 choke me
20407 #else
20408 f = sasl_version;
20409 #endif
20410
20411 ; return 0; }
20412 EOF
20413 if { (eval echo configure:20414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20414   rm -rf conftest*
20415   eval "ac_cv_func_sasl_version=yes"
20416 else
20417   echo "configure: failed program was:" >&5
20418   cat conftest.$ac_ext >&5
20419   rm -rf conftest*
20420   eval "ac_cv_func_sasl_version=no"
20421 fi
20422 rm -f conftest*
20423 fi
20424
20425 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20426   echo "$ac_t""yes" 1>&6
20427   cat >> confdefs.h <<\EOF
20428 #define HAVE_SASL_VERSION 1
20429 EOF
20430
20431 else
20432   echo "$ac_t""no" 1>&6
20433 fi
20434
20435                 LIBS="$ac_save_LIBS"
20436         fi
20437
20438 else
20439         echo "configure: warning: SASL authentication not supported!" 1>&2
20440         if test $ol_link_tls = no ; then
20441                 echo "configure: warning: Strong authentication not supported!" 1>&2
20442         fi
20443 fi
20444
20445 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20446         dev=no
20447         if test -r /dev/urandom ; then
20448                 dev="/dev/urandom";
20449         elif test -r /idev/urandom ; then
20450                 dev="/idev/urandom";
20451         elif test -r /dev/srandom ; then
20452                 dev="/dev/srandom";
20453         elif test -r /dev/random ; then
20454                 dev="/dev/random";
20455         elif test -r /idev/random ; then
20456                 dev="/idev/random";
20457         fi
20458
20459         if test $dev != no ; then
20460                 cat >> confdefs.h <<EOF
20461 #define URANDOM_DEVICE "$dev"
20462 EOF
20463
20464         fi
20465 fi
20466
20467 ol_link_fetch=no
20468 if test $ol_with_fetch != no ; then
20469         ol_LIBS=$LIBS
20470 LIBS="-lfetch -lcom_err $LIBS"
20471 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20472 echo "configure:20473: checking fetch(3) library" >&5
20473 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20474   echo $ac_n "(cached) $ac_c" 1>&6
20475 else
20476   
20477         cat > conftest.$ac_ext <<EOF
20478 #line 20479 "configure"
20479 #include "confdefs.h"
20480
20481 #include <sys/param.h>
20482 #include <stdio.h>
20483 #include <fetch.h>
20484 int main() {
20485 struct url *u = fetchParseURL("file:///"); 
20486 ; return 0; }
20487 EOF
20488 if { (eval echo configure:20489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20489   rm -rf conftest*
20490   ol_cv_lib_fetch=yes
20491 else
20492   echo "configure: failed program was:" >&5
20493   cat conftest.$ac_ext >&5
20494   rm -rf conftest*
20495   ol_cv_lib_fetch=no
20496 fi
20497 rm -f conftest*
20498 fi
20499
20500 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20501 LIBS=$ol_LIBS
20502 if test $ol_cv_lib_fetch != no ; then
20503         ol_link_fetch="-lfetch -lcom_err"
20504         cat >> confdefs.h <<\EOF
20505 #define HAVE_FETCH 1
20506 EOF
20507
20508 fi
20509
20510
20511         if test $ol_cv_lib_fetch != no ; then
20512                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20513                 ol_link_fetch=freebsd
20514
20515         elif test $ol_with_fetch != auto ; then
20516                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20517         fi 
20518 fi
20519
20520 if test $ol_enable_crypt != no ; then
20521         save_LIBS="$LIBS"
20522         LIBS="$TLS_LIBS $LIBS"
20523
20524         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20525 echo "configure:20526: checking for crypt" >&5
20526 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20527   echo $ac_n "(cached) $ac_c" 1>&6
20528 else
20529   cat > conftest.$ac_ext <<EOF
20530 #line 20531 "configure"
20531 #include "confdefs.h"
20532 /* System header to define __stub macros and hopefully few prototypes,
20533     which can conflict with char crypt(); below.  */
20534 #include <assert.h>
20535 /* Override any gcc2 internal prototype to avoid an error.  */
20536 /* We use char because int might match the return type of a gcc2
20537     builtin and then its argument prototype would still apply.  */
20538 char crypt();
20539 char (*f)();
20540
20541 int main() {
20542
20543 /* The GNU C library defines this for functions which it implements
20544     to always fail with ENOSYS.  Some functions are actually named
20545     something starting with __ and the normal name is an alias.  */
20546 #if defined (__stub_crypt) || defined (__stub___crypt)
20547 choke me
20548 #else
20549 f = crypt;
20550 #endif
20551
20552 ; return 0; }
20553 EOF
20554 if { (eval echo configure:20555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20555   rm -rf conftest*
20556   eval "ac_cv_func_crypt=yes"
20557 else
20558   echo "configure: failed program was:" >&5
20559   cat conftest.$ac_ext >&5
20560   rm -rf conftest*
20561   eval "ac_cv_func_crypt=no"
20562 fi
20563 rm -f conftest*
20564 fi
20565
20566 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20567   echo "$ac_t""yes" 1>&6
20568   have_crypt=yes
20569 else
20570   echo "$ac_t""no" 1>&6
20571
20572                 LIBS="$save_LIBS"
20573                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20574 echo "configure:20575: checking for crypt in -lcrypt" >&5
20575 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20577   echo $ac_n "(cached) $ac_c" 1>&6
20578 else
20579   ac_save_LIBS="$LIBS"
20580 LIBS="-lcrypt  $LIBS"
20581 cat > conftest.$ac_ext <<EOF
20582 #line 20583 "configure"
20583 #include "confdefs.h"
20584 /* Override any gcc2 internal prototype to avoid an error.  */
20585 /* We use char because int might match the return type of a gcc2
20586     builtin and then its argument prototype would still apply.  */
20587 char crypt();
20588
20589 int main() {
20590 crypt()
20591 ; return 0; }
20592 EOF
20593 if { (eval echo configure:20594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20594   rm -rf conftest*
20595   eval "ac_cv_lib_$ac_lib_var=yes"
20596 else
20597   echo "configure: failed program was:" >&5
20598   cat conftest.$ac_ext >&5
20599   rm -rf conftest*
20600   eval "ac_cv_lib_$ac_lib_var=no"
20601 fi
20602 rm -f conftest*
20603 LIBS="$ac_save_LIBS"
20604
20605 fi
20606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20607   echo "$ac_t""yes" 1>&6
20608   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20609                         have_crypt=yes
20610 else
20611   echo "$ac_t""no" 1>&6
20612 have_crypt=no
20613 fi
20614
20615 fi
20616
20617
20618         LIBS="$save_LIBS"
20619
20620         if test $have_crypt = yes ; then
20621                 cat >> confdefs.h <<\EOF
20622 #define HAVE_CRYPT 1
20623 EOF
20624
20625         else
20626                 echo "configure: warning: could not find crypt" 1>&2
20627                 if test $ol_enable_crypt = yes ; then
20628                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20629                 fi
20630
20631                 echo "configure: warning: disabling crypt support" 1>&2
20632                 ol_enable_crypt=no
20633         fi
20634 fi
20635
20636 if test $ol_enable_proctitle != no ; then
20637         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20638 echo "configure:20639: checking for setproctitle" >&5
20639 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20640   echo $ac_n "(cached) $ac_c" 1>&6
20641 else
20642   cat > conftest.$ac_ext <<EOF
20643 #line 20644 "configure"
20644 #include "confdefs.h"
20645 /* System header to define __stub macros and hopefully few prototypes,
20646     which can conflict with char setproctitle(); below.  */
20647 #include <assert.h>
20648 /* Override any gcc2 internal prototype to avoid an error.  */
20649 /* We use char because int might match the return type of a gcc2
20650     builtin and then its argument prototype would still apply.  */
20651 char setproctitle();
20652 char (*f)();
20653
20654 int main() {
20655
20656 /* The GNU C library defines this for functions which it implements
20657     to always fail with ENOSYS.  Some functions are actually named
20658     something starting with __ and the normal name is an alias.  */
20659 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20660 choke me
20661 #else
20662 f = setproctitle;
20663 #endif
20664
20665 ; return 0; }
20666 EOF
20667 if { (eval echo configure:20668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20668   rm -rf conftest*
20669   eval "ac_cv_func_setproctitle=yes"
20670 else
20671   echo "configure: failed program was:" >&5
20672   cat conftest.$ac_ext >&5
20673   rm -rf conftest*
20674   eval "ac_cv_func_setproctitle=no"
20675 fi
20676 rm -f conftest*
20677 fi
20678
20679 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20680   echo "$ac_t""yes" 1>&6
20681   have_setproctitle=yes
20682 else
20683   echo "$ac_t""no" 1>&6
20684
20685                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20686 echo "configure:20687: checking for setproctitle in -lutil" >&5
20687 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20688 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20689   echo $ac_n "(cached) $ac_c" 1>&6
20690 else
20691   ac_save_LIBS="$LIBS"
20692 LIBS="-lutil  $LIBS"
20693 cat > conftest.$ac_ext <<EOF
20694 #line 20695 "configure"
20695 #include "confdefs.h"
20696 /* Override any gcc2 internal prototype to avoid an error.  */
20697 /* We use char because int might match the return type of a gcc2
20698     builtin and then its argument prototype would still apply.  */
20699 char setproctitle();
20700
20701 int main() {
20702 setproctitle()
20703 ; return 0; }
20704 EOF
20705 if { (eval echo configure:20706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20706   rm -rf conftest*
20707   eval "ac_cv_lib_$ac_lib_var=yes"
20708 else
20709   echo "configure: failed program was:" >&5
20710   cat conftest.$ac_ext >&5
20711   rm -rf conftest*
20712   eval "ac_cv_lib_$ac_lib_var=no"
20713 fi
20714 rm -f conftest*
20715 LIBS="$ac_save_LIBS"
20716
20717 fi
20718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20719   echo "$ac_t""yes" 1>&6
20720   have_setproctitle=yes
20721                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20722 else
20723   echo "$ac_t""no" 1>&6
20724 have_setproctitle=no
20725                         LIBOBJS="$LIBOBJS setproctitle.o"
20726                         LIBSRCS="$LIBSRCS setproctitle.c"
20727 fi
20728
20729 fi
20730
20731
20732         if test $have_setproctitle = yes ; then
20733                 cat >> confdefs.h <<\EOF
20734 #define HAVE_SETPROCTITLE 1
20735 EOF
20736
20737         fi
20738 fi
20739
20740 if test $ol_enable_slp != no ; then
20741         for ac_hdr in slp.h 
20742 do
20743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20745 echo "configure:20746: checking for $ac_hdr" >&5
20746 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20747   echo $ac_n "(cached) $ac_c" 1>&6
20748 else
20749   cat > conftest.$ac_ext <<EOF
20750 #line 20751 "configure"
20751 #include "confdefs.h"
20752 #include <$ac_hdr>
20753 EOF
20754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20755 { (eval echo configure:20756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20757 if test -z "$ac_err"; then
20758   rm -rf conftest*
20759   eval "ac_cv_header_$ac_safe=yes"
20760 else
20761   echo "$ac_err" >&5
20762   echo "configure: failed program was:" >&5
20763   cat conftest.$ac_ext >&5
20764   rm -rf conftest*
20765   eval "ac_cv_header_$ac_safe=no"
20766 fi
20767 rm -f conftest*
20768 fi
20769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20770   echo "$ac_t""yes" 1>&6
20771     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20772   cat >> confdefs.h <<EOF
20773 #define $ac_tr_hdr 1
20774 EOF
20775  
20776 else
20777   echo "$ac_t""no" 1>&6
20778 fi
20779 done
20780
20781
20782         if test $ac_cv_header_slp_h = yes ; then
20783                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20784 echo "configure:20785: checking for SLPOpen in -lslp" >&5
20785 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20787   echo $ac_n "(cached) $ac_c" 1>&6
20788 else
20789   ac_save_LIBS="$LIBS"
20790 LIBS="-lslp  $LIBS"
20791 cat > conftest.$ac_ext <<EOF
20792 #line 20793 "configure"
20793 #include "confdefs.h"
20794 /* Override any gcc2 internal prototype to avoid an error.  */
20795 /* We use char because int might match the return type of a gcc2
20796     builtin and then its argument prototype would still apply.  */
20797 char SLPOpen();
20798
20799 int main() {
20800 SLPOpen()
20801 ; return 0; }
20802 EOF
20803 if { (eval echo configure:20804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20804   rm -rf conftest*
20805   eval "ac_cv_lib_$ac_lib_var=yes"
20806 else
20807   echo "configure: failed program was:" >&5
20808   cat conftest.$ac_ext >&5
20809   rm -rf conftest*
20810   eval "ac_cv_lib_$ac_lib_var=no"
20811 fi
20812 rm -f conftest*
20813 LIBS="$ac_save_LIBS"
20814
20815 fi
20816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20817   echo "$ac_t""yes" 1>&6
20818   have_slp=yes
20819 else
20820   echo "$ac_t""no" 1>&6
20821 have_slp=no
20822 fi
20823
20824                 if test $have_slp = yes ; then
20825                         cat >> confdefs.h <<\EOF
20826 #define HAVE_SLP 1
20827 EOF
20828
20829                         SLAPD_SLP_LIBS=-lslp
20830                 fi
20831
20832         elif test $ol_enable_slp = yes ; then
20833                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20834         fi
20835 fi
20836
20837
20838 echo $ac_n "checking long long""... $ac_c" 1>&6
20839 echo "configure:20840: checking long long" >&5
20840 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20841   echo $ac_n "(cached) $ac_c" 1>&6
20842 else
20843   
20844         cat > conftest.$ac_ext <<EOF
20845 #line 20846 "configure"
20846 #include "confdefs.h"
20847
20848 int main() {
20849 long long x;
20850 ; return 0; }
20851 EOF
20852 if { (eval echo configure:20853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20853   rm -rf conftest*
20854   ol_cv_type_long_long=yes
20855 else
20856   echo "configure: failed program was:" >&5
20857   cat conftest.$ac_ext >&5
20858   rm -rf conftest*
20859   ol_cv_type_long_long=no
20860 fi
20861 rm -f conftest*
20862 fi
20863
20864 echo "$ac_t""$ol_cv_type_long_long" 1>&6
20865 if test $ol_cv_type_long_long = yes; then
20866         cat >> confdefs.h <<\EOF
20867 #define HAVE_LONG_LONG 1
20868 EOF
20869
20870 fi
20871
20872 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20873 echo "configure:20874: checking for ANSI C header files" >&5
20874 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20875   echo $ac_n "(cached) $ac_c" 1>&6
20876 else
20877   cat > conftest.$ac_ext <<EOF
20878 #line 20879 "configure"
20879 #include "confdefs.h"
20880 #include <stdlib.h>
20881 #include <stdarg.h>
20882 #include <string.h>
20883 #include <float.h>
20884 EOF
20885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20886 { (eval echo configure:20887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20888 if test -z "$ac_err"; then
20889   rm -rf conftest*
20890   ac_cv_header_stdc=yes
20891 else
20892   echo "$ac_err" >&5
20893   echo "configure: failed program was:" >&5
20894   cat conftest.$ac_ext >&5
20895   rm -rf conftest*
20896   ac_cv_header_stdc=no
20897 fi
20898 rm -f conftest*
20899
20900 if test $ac_cv_header_stdc = yes; then
20901   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20902 cat > conftest.$ac_ext <<EOF
20903 #line 20904 "configure"
20904 #include "confdefs.h"
20905 #include <string.h>
20906 EOF
20907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20908   egrep "memchr" >/dev/null 2>&1; then
20909   :
20910 else
20911   rm -rf conftest*
20912   ac_cv_header_stdc=no
20913 fi
20914 rm -f conftest*
20915
20916 fi
20917
20918 if test $ac_cv_header_stdc = yes; then
20919   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20920 cat > conftest.$ac_ext <<EOF
20921 #line 20922 "configure"
20922 #include "confdefs.h"
20923 #include <stdlib.h>
20924 EOF
20925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20926   egrep "free" >/dev/null 2>&1; then
20927   :
20928 else
20929   rm -rf conftest*
20930   ac_cv_header_stdc=no
20931 fi
20932 rm -f conftest*
20933
20934 fi
20935
20936 if test $ac_cv_header_stdc = yes; then
20937   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20938 if test "$cross_compiling" = yes; then
20939   :
20940 else
20941   cat > conftest.$ac_ext <<EOF
20942 #line 20943 "configure"
20943 #include "confdefs.h"
20944 #include <ctype.h>
20945 #if ((' ' & 0x0FF) == 0x020)
20946 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20947 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20948 #else
20949 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20950  || ('j' <= (c) && (c) <= 'r') \
20951  || ('s' <= (c) && (c) <= 'z'))
20952 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20953 #endif
20954 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20955 int main () { int i; for (i = 0; i < 256; i++)
20956 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20957 exit (0); }
20958
20959 EOF
20960 if { (eval echo configure:20961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20961 then
20962   :
20963 else
20964   echo "configure: failed program was:" >&5
20965   cat conftest.$ac_ext >&5
20966   rm -fr conftest*
20967   ac_cv_header_stdc=no
20968 fi
20969 rm -fr conftest*
20970 fi
20971
20972 fi
20973 fi
20974
20975 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20976 if test $ac_cv_header_stdc = yes; then
20977   cat >> confdefs.h <<\EOF
20978 #define STDC_HEADERS 1
20979 EOF
20980
20981 fi
20982
20983 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20984 echo "configure:20985: checking for mode_t" >&5
20985 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20986   echo $ac_n "(cached) $ac_c" 1>&6
20987 else
20988   cat > conftest.$ac_ext <<EOF
20989 #line 20990 "configure"
20990 #include "confdefs.h"
20991 #include <sys/types.h>
20992 #if STDC_HEADERS
20993 #include <stdlib.h>
20994 #include <stddef.h>
20995 #endif
20996
20997 EOF
20998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20999   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21000   rm -rf conftest*
21001   eval "ac_cv_type_mode_t=yes"
21002 else
21003   rm -rf conftest*
21004   eval "ac_cv_type_mode_t=no"
21005 fi
21006 rm -f conftest*
21007
21008 fi
21009 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21010   echo "$ac_t""yes" 1>&6
21011 else
21012   echo "$ac_t""no" 1>&6
21013   cat >> confdefs.h <<EOF
21014 #define mode_t int
21015 EOF
21016
21017 fi
21018
21019 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21020 echo "configure:21021: checking for off_t" >&5
21021 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21022   echo $ac_n "(cached) $ac_c" 1>&6
21023 else
21024   cat > conftest.$ac_ext <<EOF
21025 #line 21026 "configure"
21026 #include "confdefs.h"
21027 #include <sys/types.h>
21028 #if STDC_HEADERS
21029 #include <stdlib.h>
21030 #include <stddef.h>
21031 #endif
21032
21033 EOF
21034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21035   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21036   rm -rf conftest*
21037   eval "ac_cv_type_off_t=yes"
21038 else
21039   rm -rf conftest*
21040   eval "ac_cv_type_off_t=no"
21041 fi
21042 rm -f conftest*
21043
21044 fi
21045 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21046   echo "$ac_t""yes" 1>&6
21047 else
21048   echo "$ac_t""no" 1>&6
21049   cat >> confdefs.h <<EOF
21050 #define off_t long
21051 EOF
21052
21053 fi
21054
21055 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21056 echo "configure:21057: checking for pid_t" >&5
21057 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21058   echo $ac_n "(cached) $ac_c" 1>&6
21059 else
21060   cat > conftest.$ac_ext <<EOF
21061 #line 21062 "configure"
21062 #include "confdefs.h"
21063 #include <sys/types.h>
21064 #if STDC_HEADERS
21065 #include <stdlib.h>
21066 #include <stddef.h>
21067 #endif
21068
21069 EOF
21070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21071   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21072   rm -rf conftest*
21073   eval "ac_cv_type_pid_t=yes"
21074 else
21075   rm -rf conftest*
21076   eval "ac_cv_type_pid_t=no"
21077 fi
21078 rm -f conftest*
21079
21080 fi
21081 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21082   echo "$ac_t""yes" 1>&6
21083 else
21084   echo "$ac_t""no" 1>&6
21085   cat >> confdefs.h <<EOF
21086 #define pid_t int
21087 EOF
21088
21089 fi
21090
21091 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21092 echo "configure:21093: checking for ptrdiff_t" >&5
21093 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21094   echo $ac_n "(cached) $ac_c" 1>&6
21095 else
21096   cat > conftest.$ac_ext <<EOF
21097 #line 21098 "configure"
21098 #include "confdefs.h"
21099 #include <stddef.h>
21100 int main() {
21101 ptrdiff_t p
21102 ; return 0; }
21103 EOF
21104 if { (eval echo configure:21105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21105   rm -rf conftest*
21106   am_cv_type_ptrdiff_t=yes
21107 else
21108   echo "configure: failed program was:" >&5
21109   cat conftest.$ac_ext >&5
21110   rm -rf conftest*
21111   am_cv_type_ptrdiff_t=no
21112 fi
21113 rm -f conftest*
21114 fi
21115
21116 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21117    if test $am_cv_type_ptrdiff_t = yes; then
21118      cat >> confdefs.h <<\EOF
21119 #define HAVE_PTRDIFF_T 1
21120 EOF
21121
21122    fi
21123
21124 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21125 echo "configure:21126: checking return type of signal handlers" >&5
21126 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21127   echo $ac_n "(cached) $ac_c" 1>&6
21128 else
21129   cat > conftest.$ac_ext <<EOF
21130 #line 21131 "configure"
21131 #include "confdefs.h"
21132 #include <sys/types.h>
21133 #include <signal.h>
21134 #ifdef signal
21135 #undef signal
21136 #endif
21137 #ifdef __cplusplus
21138 extern "C" void (*signal (int, void (*)(int)))(int);
21139 #else
21140 void (*signal ()) ();
21141 #endif
21142
21143 int main() {
21144 int i;
21145 ; return 0; }
21146 EOF
21147 if { (eval echo configure:21148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21148   rm -rf conftest*
21149   ac_cv_type_signal=void
21150 else
21151   echo "configure: failed program was:" >&5
21152   cat conftest.$ac_ext >&5
21153   rm -rf conftest*
21154   ac_cv_type_signal=int
21155 fi
21156 rm -f conftest*
21157 fi
21158
21159 echo "$ac_t""$ac_cv_type_signal" 1>&6
21160 cat >> confdefs.h <<EOF
21161 #define RETSIGTYPE $ac_cv_type_signal
21162 EOF
21163
21164
21165 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21166 echo "configure:21167: checking for size_t" >&5
21167 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21168   echo $ac_n "(cached) $ac_c" 1>&6
21169 else
21170   cat > conftest.$ac_ext <<EOF
21171 #line 21172 "configure"
21172 #include "confdefs.h"
21173 #include <sys/types.h>
21174 #if STDC_HEADERS
21175 #include <stdlib.h>
21176 #include <stddef.h>
21177 #endif
21178
21179 EOF
21180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21181   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21182   rm -rf conftest*
21183   eval "ac_cv_type_size_t=yes"
21184 else
21185   rm -rf conftest*
21186   eval "ac_cv_type_size_t=no"
21187 fi
21188 rm -f conftest*
21189
21190 fi
21191 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21192   echo "$ac_t""yes" 1>&6
21193 else
21194   echo "$ac_t""no" 1>&6
21195   cat >> confdefs.h <<EOF
21196 #define size_t unsigned
21197 EOF
21198
21199 fi
21200
21201
21202 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21203 echo "configure:21204: checking for ssize_t" >&5
21204 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21205   echo $ac_n "(cached) $ac_c" 1>&6
21206 else
21207   cat > conftest.$ac_ext <<EOF
21208 #line 21209 "configure"
21209 #include "confdefs.h"
21210 #include <sys/types.h>
21211 #if STDC_HEADERS
21212 #include <stdlib.h>
21213 #include <stddef.h>
21214 #endif
21215
21216 EOF
21217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21218   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21219   rm -rf conftest*
21220   eval "ac_cv_type_ssize_t=yes"
21221 else
21222   rm -rf conftest*
21223   eval "ac_cv_type_ssize_t=no"
21224 fi
21225 rm -f conftest*
21226
21227 fi
21228 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21229   echo "$ac_t""yes" 1>&6
21230 else
21231   echo "$ac_t""no" 1>&6
21232   cat >> confdefs.h <<EOF
21233 #define ssize_t signed int
21234 EOF
21235
21236 fi
21237
21238 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21239 echo "configure:21240: checking for caddr_t" >&5
21240 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21241   echo $ac_n "(cached) $ac_c" 1>&6
21242 else
21243   cat > conftest.$ac_ext <<EOF
21244 #line 21245 "configure"
21245 #include "confdefs.h"
21246 #include <sys/types.h>
21247 #if STDC_HEADERS
21248 #include <stdlib.h>
21249 #include <stddef.h>
21250 #endif
21251
21252 EOF
21253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21254   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21255   rm -rf conftest*
21256   eval "ac_cv_type_caddr_t=yes"
21257 else
21258   rm -rf conftest*
21259   eval "ac_cv_type_caddr_t=no"
21260 fi
21261 rm -f conftest*
21262
21263 fi
21264 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21265   echo "$ac_t""yes" 1>&6
21266 else
21267   echo "$ac_t""no" 1>&6
21268   cat >> confdefs.h <<EOF
21269 #define caddr_t char *
21270 EOF
21271
21272 fi
21273
21274
21275 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21276 echo "configure:21277: checking for socklen_t" >&5
21277 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21278   echo $ac_n "(cached) $ac_c" 1>&6
21279 else
21280   cat > conftest.$ac_ext <<EOF
21281 #line 21282 "configure"
21282 #include "confdefs.h"
21283
21284 #ifdef HAVE_SYS_TYPES_H
21285 #include <sys/types.h>
21286 #endif
21287 #ifdef HAVE_SYS_SOCKET_H
21288 #include <sys/socket.h>
21289 #endif
21290
21291 int main() {
21292 socklen_t len;
21293 ; return 0; }
21294 EOF
21295 if { (eval echo configure:21296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21296   rm -rf conftest*
21297   ol_cv_type_socklen_t=yes
21298 else
21299   echo "configure: failed program was:" >&5
21300   cat conftest.$ac_ext >&5
21301   rm -rf conftest*
21302   ol_cv_type_socklen_t=no
21303 fi
21304 rm -f conftest*
21305 fi
21306
21307 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21308   if test $ol_cv_type_socklen_t = no; then
21309     cat >> confdefs.h <<\EOF
21310 #define socklen_t int
21311 EOF
21312
21313   fi
21314  
21315 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21316 echo "configure:21317: checking for member st_blksize in aggregate type struct stat" >&5
21317 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21318   echo $ac_n "(cached) $ac_c" 1>&6
21319 else
21320   cat > conftest.$ac_ext <<EOF
21321 #line 21322 "configure"
21322 #include "confdefs.h"
21323 #include <sys/types.h>
21324 #include <sys/stat.h>
21325 int main() {
21326 struct stat foo; foo.st_blksize;
21327 ; return 0; }
21328 EOF
21329 if { (eval echo configure:21330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21330   rm -rf conftest*
21331   ac_cv_c_struct_member_st_blksize=yes
21332 else
21333   echo "configure: failed program was:" >&5
21334   cat conftest.$ac_ext >&5
21335   rm -rf conftest*
21336   ac_cv_c_struct_member_st_blksize=no
21337 fi
21338 rm -f conftest*
21339 fi
21340
21341 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21342 st_blksize="$ac_cv_c_struct_member_st_blksize"
21343 if test $ac_cv_c_struct_member_st_blksize = yes; then
21344   cat >> confdefs.h <<\EOF
21345 #define HAVE_ST_BLKSIZE 1
21346 EOF
21347
21348 fi
21349
21350 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21351 echo "configure:21352: checking whether time.h and sys/time.h may both be included" >&5
21352 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21353   echo $ac_n "(cached) $ac_c" 1>&6
21354 else
21355   cat > conftest.$ac_ext <<EOF
21356 #line 21357 "configure"
21357 #include "confdefs.h"
21358 #include <sys/types.h>
21359 #include <sys/time.h>
21360 #include <time.h>
21361 int main() {
21362 struct tm *tp;
21363 ; return 0; }
21364 EOF
21365 if { (eval echo configure:21366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21366   rm -rf conftest*
21367   ac_cv_header_time=yes
21368 else
21369   echo "configure: failed program was:" >&5
21370   cat conftest.$ac_ext >&5
21371   rm -rf conftest*
21372   ac_cv_header_time=no
21373 fi
21374 rm -f conftest*
21375 fi
21376
21377 echo "$ac_t""$ac_cv_header_time" 1>&6
21378 if test $ac_cv_header_time = yes; then
21379   cat >> confdefs.h <<\EOF
21380 #define TIME_WITH_SYS_TIME 1
21381 EOF
21382
21383 fi
21384
21385 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21386 echo "configure:21387: checking whether struct tm is in sys/time.h or time.h" >&5
21387 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21388   echo $ac_n "(cached) $ac_c" 1>&6
21389 else
21390   cat > conftest.$ac_ext <<EOF
21391 #line 21392 "configure"
21392 #include "confdefs.h"
21393 #include <sys/types.h>
21394 #include <time.h>
21395 int main() {
21396 struct tm *tp; tp->tm_sec;
21397 ; return 0; }
21398 EOF
21399 if { (eval echo configure:21400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21400   rm -rf conftest*
21401   ac_cv_struct_tm=time.h
21402 else
21403   echo "configure: failed program was:" >&5
21404   cat conftest.$ac_ext >&5
21405   rm -rf conftest*
21406   ac_cv_struct_tm=sys/time.h
21407 fi
21408 rm -f conftest*
21409 fi
21410
21411 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21412 if test $ac_cv_struct_tm = sys/time.h; then
21413   cat >> confdefs.h <<\EOF
21414 #define TM_IN_SYS_TIME 1
21415 EOF
21416
21417 fi
21418
21419 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21420 echo "configure:21421: checking for uid_t in sys/types.h" >&5
21421 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21422   echo $ac_n "(cached) $ac_c" 1>&6
21423 else
21424   cat > conftest.$ac_ext <<EOF
21425 #line 21426 "configure"
21426 #include "confdefs.h"
21427 #include <sys/types.h>
21428 EOF
21429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21430   egrep "uid_t" >/dev/null 2>&1; then
21431   rm -rf conftest*
21432   ac_cv_type_uid_t=yes
21433 else
21434   rm -rf conftest*
21435   ac_cv_type_uid_t=no
21436 fi
21437 rm -f conftest*
21438
21439 fi
21440
21441 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21442 if test $ac_cv_type_uid_t = no; then
21443   cat >> confdefs.h <<\EOF
21444 #define uid_t int
21445 EOF
21446
21447   cat >> confdefs.h <<\EOF
21448 #define gid_t int
21449 EOF
21450
21451 fi
21452
21453 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21454 echo "configure:21455: checking for sig_atomic_t" >&5
21455 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21456   echo $ac_n "(cached) $ac_c" 1>&6
21457 else
21458   cat > conftest.$ac_ext <<EOF
21459 #line 21460 "configure"
21460 #include "confdefs.h"
21461 #include <signal.h>
21462 int main() {
21463 sig_atomic_t atomic;
21464 ; return 0; }
21465 EOF
21466 if { (eval echo configure:21467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21467   rm -rf conftest*
21468   ol_cv_type_sig_atomic_t=yes
21469 else
21470   echo "configure: failed program was:" >&5
21471   cat conftest.$ac_ext >&5
21472   rm -rf conftest*
21473   ol_cv_type_sig_atomic_t=no
21474 fi
21475 rm -f conftest*
21476 fi
21477
21478 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21479   if test $ol_cv_type_sig_atomic_t = no; then
21480     cat >> confdefs.h <<\EOF
21481 #define sig_atomic_t int
21482 EOF
21483
21484   fi
21485  
21486
21487
21488 # test for pw_gecos in struct passwd
21489 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21490 echo "configure:21491: checking struct passwd for pw_gecos" >&5
21491 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21492   echo $ac_n "(cached) $ac_c" 1>&6
21493 else
21494   
21495         cat > conftest.$ac_ext <<EOF
21496 #line 21497 "configure"
21497 #include "confdefs.h"
21498 #include <pwd.h>
21499 int main() {
21500
21501         struct passwd pwd;
21502         pwd.pw_gecos = pwd.pw_name;
21503
21504 ; return 0; }
21505 EOF
21506 if { (eval echo configure:21507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21507   rm -rf conftest*
21508   ol_cv_struct_passwd_pw_gecos=yes
21509 else
21510   echo "configure: failed program was:" >&5
21511   cat conftest.$ac_ext >&5
21512   rm -rf conftest*
21513   ol_cv_struct_passwd_pw_gecos=no
21514 fi
21515 rm -f conftest*
21516 fi
21517
21518 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21519 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21520         cat >> confdefs.h <<\EOF
21521 #define HAVE_PW_GECOS 1
21522 EOF
21523
21524 fi
21525
21526 # test for pw_passwd in struct passwd
21527 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21528 echo "configure:21529: checking struct passwd for pw_passwd" >&5
21529 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21530   echo $ac_n "(cached) $ac_c" 1>&6
21531 else
21532   
21533         cat > conftest.$ac_ext <<EOF
21534 #line 21535 "configure"
21535 #include "confdefs.h"
21536 #include <pwd.h>
21537 int main() {
21538
21539         struct passwd pwd;
21540         pwd.pw_passwd = pwd.pw_name;
21541
21542 ; return 0; }
21543 EOF
21544 if { (eval echo configure:21545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21545   rm -rf conftest*
21546   ol_cv_struct_passwd_pw_passwd=yes
21547 else
21548   echo "configure: failed program was:" >&5
21549   cat conftest.$ac_ext >&5
21550   rm -rf conftest*
21551   ol_cv_struct_passwd_pw_passwd=no
21552 fi
21553 rm -f conftest*
21554 fi
21555
21556 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21557 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21558         cat >> confdefs.h <<\EOF
21559 #define HAVE_PW_PASSWD 1
21560 EOF
21561
21562 fi
21563
21564
21565 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21566 echo "configure:21567: checking if toupper() requires islower()" >&5
21567 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21568   echo $ac_n "(cached) $ac_c" 1>&6
21569 else
21570   
21571         if test "$cross_compiling" = yes; then
21572   ol_cv_c_upper_lower=safe
21573 else
21574   cat > conftest.$ac_ext <<EOF
21575 #line 21576 "configure"
21576 #include "confdefs.h"
21577
21578 #include <ctype.h>
21579 main()
21580 {
21581         if ('C' == toupper('C'))
21582                 exit(0);
21583         else
21584                 exit(1);
21585 }
21586 EOF
21587 if { (eval echo configure:21588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21588 then
21589   ol_cv_c_upper_lower=no
21590 else
21591   echo "configure: failed program was:" >&5
21592   cat conftest.$ac_ext >&5
21593   rm -fr conftest*
21594   ol_cv_c_upper_lower=yes
21595 fi
21596 rm -fr conftest*
21597 fi
21598
21599 fi
21600
21601 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21602 if test $ol_cv_c_upper_lower != no ; then
21603         cat >> confdefs.h <<\EOF
21604 #define C_UPPER_LOWER 1
21605 EOF
21606
21607 fi
21608
21609 echo $ac_n "checking for working const""... $ac_c" 1>&6
21610 echo "configure:21611: checking for working const" >&5
21611 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21612   echo $ac_n "(cached) $ac_c" 1>&6
21613 else
21614   cat > conftest.$ac_ext <<EOF
21615 #line 21616 "configure"
21616 #include "confdefs.h"
21617
21618 int main() {
21619
21620 /* Ultrix mips cc rejects this.  */
21621 typedef int charset[2]; const charset x;
21622 /* SunOS 4.1.1 cc rejects this.  */
21623 char const *const *ccp;
21624 char **p;
21625 /* NEC SVR4.0.2 mips cc rejects this.  */
21626 struct point {int x, y;};
21627 static struct point const zero = {0,0};
21628 /* AIX XL C 1.02.0.0 rejects this.
21629    It does not let you subtract one const X* pointer from another in an arm
21630    of an if-expression whose if-part is not a constant expression */
21631 const char *g = "string";
21632 ccp = &g + (g ? g-g : 0);
21633 /* HPUX 7.0 cc rejects these. */
21634 ++ccp;
21635 p = (char**) ccp;
21636 ccp = (char const *const *) p;
21637 { /* SCO 3.2v4 cc rejects this.  */
21638   char *t;
21639   char const *s = 0 ? (char *) 0 : (char const *) 0;
21640
21641   *t++ = 0;
21642 }
21643 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21644   int x[] = {25, 17};
21645   const int *foo = &x[0];
21646   ++foo;
21647 }
21648 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21649   typedef const int *iptr;
21650   iptr p = 0;
21651   ++p;
21652 }
21653 { /* AIX XL C 1.02.0.0 rejects this saying
21654      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21655   struct s { int j; const int *ap[3]; };
21656   struct s *b; b->j = 5;
21657 }
21658 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21659   const int foo = 10;
21660 }
21661
21662 ; return 0; }
21663 EOF
21664 if { (eval echo configure:21665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21665   rm -rf conftest*
21666   ac_cv_c_const=yes
21667 else
21668   echo "configure: failed program was:" >&5
21669   cat conftest.$ac_ext >&5
21670   rm -rf conftest*
21671   ac_cv_c_const=no
21672 fi
21673 rm -f conftest*
21674 fi
21675
21676 echo "$ac_t""$ac_cv_c_const" 1>&6
21677 if test $ac_cv_c_const = no; then
21678   cat >> confdefs.h <<\EOF
21679 #define const 
21680 EOF
21681
21682 fi
21683
21684 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21685 echo "configure:21686: checking if compiler understands volatile" >&5
21686 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21687   echo $ac_n "(cached) $ac_c" 1>&6
21688 else
21689   cat > conftest.$ac_ext <<EOF
21690 #line 21691 "configure"
21691 #include "confdefs.h"
21692 int x, y, z;
21693 int main() {
21694 volatile int a; int * volatile b = x ? &y : &z;
21695       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21696       *b = 0;
21697 ; return 0; }
21698 EOF
21699 if { (eval echo configure:21700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21700   rm -rf conftest*
21701   ol_cv_c_volatile=yes
21702 else
21703   echo "configure: failed program was:" >&5
21704   cat conftest.$ac_ext >&5
21705   rm -rf conftest*
21706   ol_cv_c_volatile=no
21707 fi
21708 rm -f conftest*
21709 fi
21710
21711 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21712   if test $ol_cv_c_volatile = yes; then
21713     : 
21714   else
21715     cat >> confdefs.h <<\EOF
21716 #define volatile 
21717 EOF
21718
21719   fi
21720  
21721
21722 if test $cross_compiling = yes ; then
21723         cat >> confdefs.h <<\EOF
21724 #define CROSS_COMPILING 1
21725 EOF
21726
21727 else
21728         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21729 echo "configure:21730: checking whether byte ordering is bigendian" >&5
21730 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21731   echo $ac_n "(cached) $ac_c" 1>&6
21732 else
21733   ac_cv_c_bigendian=unknown
21734 # See if sys/param.h defines the BYTE_ORDER macro.
21735 cat > conftest.$ac_ext <<EOF
21736 #line 21737 "configure"
21737 #include "confdefs.h"
21738 #include <sys/types.h>
21739 #include <sys/param.h>
21740 int main() {
21741
21742 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21743  bogus endian macros
21744 #endif
21745 ; return 0; }
21746 EOF
21747 if { (eval echo configure:21748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21748   rm -rf conftest*
21749   # It does; now see whether it defined to BIG_ENDIAN or not.
21750 cat > conftest.$ac_ext <<EOF
21751 #line 21752 "configure"
21752 #include "confdefs.h"
21753 #include <sys/types.h>
21754 #include <sys/param.h>
21755 int main() {
21756
21757 #if BYTE_ORDER != BIG_ENDIAN
21758  not big endian
21759 #endif
21760 ; return 0; }
21761 EOF
21762 if { (eval echo configure:21763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21763   rm -rf conftest*
21764   ac_cv_c_bigendian=yes
21765 else
21766   echo "configure: failed program was:" >&5
21767   cat conftest.$ac_ext >&5
21768   rm -rf conftest*
21769   ac_cv_c_bigendian=no
21770 fi
21771 rm -f conftest*
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775 fi
21776 rm -f conftest*
21777 if test $ac_cv_c_bigendian = unknown; then
21778 if test "$cross_compiling" = yes; then
21779     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21780 else
21781   cat > conftest.$ac_ext <<EOF
21782 #line 21783 "configure"
21783 #include "confdefs.h"
21784 main () {
21785   /* Are we little or big endian?  From Harbison&Steele.  */
21786   union
21787   {
21788     long l;
21789     char c[sizeof (long)];
21790   } u;
21791   u.l = 1;
21792   exit (u.c[sizeof (long) - 1] == 1);
21793 }
21794 EOF
21795 if { (eval echo configure:21796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21796 then
21797   ac_cv_c_bigendian=no
21798 else
21799   echo "configure: failed program was:" >&5
21800   cat conftest.$ac_ext >&5
21801   rm -fr conftest*
21802   ac_cv_c_bigendian=yes
21803 fi
21804 rm -fr conftest*
21805 fi
21806
21807 fi
21808 fi
21809
21810 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21811 if test $ac_cv_c_bigendian = yes; then
21812   cat >> confdefs.h <<\EOF
21813 #define WORDS_BIGENDIAN 1
21814 EOF
21815
21816 fi
21817
21818 fi
21819
21820 echo $ac_n "checking size of short""... $ac_c" 1>&6
21821 echo "configure:21822: checking size of short" >&5 
21822 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21823   echo $ac_n "(cached) $ac_c" 1>&6
21824 else
21825   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21826   cat > conftest.$ac_ext <<EOF
21827 #line 21828 "configure"
21828 #include "confdefs.h"
21829 #include "confdefs.h" 
21830 #include <sys/types.h> 
21831  
21832
21833 int main() {
21834 switch (0) case 0: case (sizeof (short) == $ac_size):;
21835 ; return 0; }
21836 EOF
21837 if { (eval echo configure:21838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21838   rm -rf conftest*
21839   ac_cv_sizeof_short=$ac_size
21840 else
21841   echo "configure: failed program was:" >&5
21842   cat conftest.$ac_ext >&5
21843 fi
21844 rm -f conftest* 
21845   if test x$ac_cv_sizeof_short != x ; then break; fi 
21846 done 
21847
21848 fi
21849  
21850 if test x$ac_cv_sizeof_short = x ; then 
21851   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21852 fi 
21853 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21854 cat >> confdefs.h <<EOF
21855 #define SIZEOF_SHORT $ac_cv_sizeof_short
21856 EOF
21857  
21858  
21859 echo $ac_n "checking size of int""... $ac_c" 1>&6
21860 echo "configure:21861: checking size of int" >&5 
21861 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21862   echo $ac_n "(cached) $ac_c" 1>&6
21863 else
21864   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21865   cat > conftest.$ac_ext <<EOF
21866 #line 21867 "configure"
21867 #include "confdefs.h"
21868 #include "confdefs.h" 
21869 #include <sys/types.h> 
21870  
21871
21872 int main() {
21873 switch (0) case 0: case (sizeof (int) == $ac_size):;
21874 ; return 0; }
21875 EOF
21876 if { (eval echo configure:21877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21877   rm -rf conftest*
21878   ac_cv_sizeof_int=$ac_size
21879 else
21880   echo "configure: failed program was:" >&5
21881   cat conftest.$ac_ext >&5
21882 fi
21883 rm -f conftest* 
21884   if test x$ac_cv_sizeof_int != x ; then break; fi 
21885 done 
21886
21887 fi
21888  
21889 if test x$ac_cv_sizeof_int = x ; then 
21890   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21891 fi 
21892 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21893 cat >> confdefs.h <<EOF
21894 #define SIZEOF_INT $ac_cv_sizeof_int
21895 EOF
21896  
21897  
21898 echo $ac_n "checking size of long""... $ac_c" 1>&6
21899 echo "configure:21900: checking size of long" >&5 
21900 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21901   echo $ac_n "(cached) $ac_c" 1>&6
21902 else
21903   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21904   cat > conftest.$ac_ext <<EOF
21905 #line 21906 "configure"
21906 #include "confdefs.h"
21907 #include "confdefs.h" 
21908 #include <sys/types.h> 
21909  
21910
21911 int main() {
21912 switch (0) case 0: case (sizeof (long) == $ac_size):;
21913 ; return 0; }
21914 EOF
21915 if { (eval echo configure:21916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21916   rm -rf conftest*
21917   ac_cv_sizeof_long=$ac_size
21918 else
21919   echo "configure: failed program was:" >&5
21920   cat conftest.$ac_ext >&5
21921 fi
21922 rm -f conftest* 
21923   if test x$ac_cv_sizeof_long != x ; then break; fi 
21924 done 
21925
21926 fi
21927  
21928 if test x$ac_cv_sizeof_long = x ; then 
21929   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21930 fi 
21931 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21932 cat >> confdefs.h <<EOF
21933 #define SIZEOF_LONG $ac_cv_sizeof_long
21934 EOF
21935  
21936
21937
21938 if test "$ac_cv_sizeof_int" -lt 4 ; then
21939         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21940
21941         cat >> confdefs.h <<\EOF
21942 #define LBER_INT_T long
21943 EOF
21944
21945 else
21946         cat >> confdefs.h <<\EOF
21947 #define LBER_INT_T int
21948 EOF
21949
21950 fi
21951
21952 cat >> confdefs.h <<\EOF
21953 #define LBER_LEN_T long
21954 EOF
21955
21956 cat >> confdefs.h <<\EOF
21957 #define LBER_SOCKET_T int
21958 EOF
21959
21960 cat >> confdefs.h <<\EOF
21961 #define LBER_TAG_T long
21962 EOF
21963
21964
21965 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21966 echo "configure:21967: checking for 8-bit clean memcmp" >&5
21967 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21968   echo $ac_n "(cached) $ac_c" 1>&6
21969 else
21970   if test "$cross_compiling" = yes; then
21971   ac_cv_func_memcmp_clean=no
21972 else
21973   cat > conftest.$ac_ext <<EOF
21974 #line 21975 "configure"
21975 #include "confdefs.h"
21976
21977 main()
21978 {
21979   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21980   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21981 }
21982
21983 EOF
21984 if { (eval echo configure:21985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21985 then
21986   ac_cv_func_memcmp_clean=yes
21987 else
21988   echo "configure: failed program was:" >&5
21989   cat conftest.$ac_ext >&5
21990   rm -fr conftest*
21991   ac_cv_func_memcmp_clean=no
21992 fi
21993 rm -fr conftest*
21994 fi
21995
21996 fi
21997
21998 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21999 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22000
22001 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22002 echo "configure:22003: checking for strftime" >&5
22003 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22004   echo $ac_n "(cached) $ac_c" 1>&6
22005 else
22006   cat > conftest.$ac_ext <<EOF
22007 #line 22008 "configure"
22008 #include "confdefs.h"
22009 /* System header to define __stub macros and hopefully few prototypes,
22010     which can conflict with char strftime(); below.  */
22011 #include <assert.h>
22012 /* Override any gcc2 internal prototype to avoid an error.  */
22013 /* We use char because int might match the return type of a gcc2
22014     builtin and then its argument prototype would still apply.  */
22015 char strftime();
22016 char (*f)();
22017
22018 int main() {
22019
22020 /* The GNU C library defines this for functions which it implements
22021     to always fail with ENOSYS.  Some functions are actually named
22022     something starting with __ and the normal name is an alias.  */
22023 #if defined (__stub_strftime) || defined (__stub___strftime)
22024 choke me
22025 #else
22026 f = strftime;
22027 #endif
22028
22029 ; return 0; }
22030 EOF
22031 if { (eval echo configure:22032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22032   rm -rf conftest*
22033   eval "ac_cv_func_strftime=yes"
22034 else
22035   echo "configure: failed program was:" >&5
22036   cat conftest.$ac_ext >&5
22037   rm -rf conftest*
22038   eval "ac_cv_func_strftime=no"
22039 fi
22040 rm -f conftest*
22041 fi
22042
22043 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22044   echo "$ac_t""yes" 1>&6
22045   cat >> confdefs.h <<\EOF
22046 #define HAVE_STRFTIME 1
22047 EOF
22048
22049 else
22050   echo "$ac_t""no" 1>&6
22051 # strftime is in -lintl on SCO UNIX.
22052 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22053 echo "configure:22054: checking for strftime in -lintl" >&5
22054 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22056   echo $ac_n "(cached) $ac_c" 1>&6
22057 else
22058   ac_save_LIBS="$LIBS"
22059 LIBS="-lintl  $LIBS"
22060 cat > conftest.$ac_ext <<EOF
22061 #line 22062 "configure"
22062 #include "confdefs.h"
22063 /* Override any gcc2 internal prototype to avoid an error.  */
22064 /* We use char because int might match the return type of a gcc2
22065     builtin and then its argument prototype would still apply.  */
22066 char strftime();
22067
22068 int main() {
22069 strftime()
22070 ; return 0; }
22071 EOF
22072 if { (eval echo configure:22073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22073   rm -rf conftest*
22074   eval "ac_cv_lib_$ac_lib_var=yes"
22075 else
22076   echo "configure: failed program was:" >&5
22077   cat conftest.$ac_ext >&5
22078   rm -rf conftest*
22079   eval "ac_cv_lib_$ac_lib_var=no"
22080 fi
22081 rm -f conftest*
22082 LIBS="$ac_save_LIBS"
22083
22084 fi
22085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22086   echo "$ac_t""yes" 1>&6
22087   cat >> confdefs.h <<\EOF
22088 #define HAVE_STRFTIME 1
22089 EOF
22090
22091 LIBS="-lintl $LIBS"
22092 else
22093   echo "$ac_t""no" 1>&6
22094 fi
22095
22096 fi
22097
22098
22099 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22100 echo "configure:22101: checking for inet_aton()" >&5
22101 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22102   echo $ac_n "(cached) $ac_c" 1>&6
22103 else
22104   cat > conftest.$ac_ext <<EOF
22105 #line 22106 "configure"
22106 #include "confdefs.h"
22107
22108 #ifdef HAVE_SYS_TYPES_H
22109 #       include <sys/types.h>
22110 #endif
22111 #ifdef HAVE_SYS_SOCKET_H
22112 #       include <sys/socket.h>
22113 #       ifdef HAVE_SYS_SELECT_H
22114 #               include <sys/select.h>
22115 #       endif
22116 #       include <netinet/in.h>
22117 #       ifdef HAVE_ARPA_INET_H
22118 #               include <arpa/inet.h>
22119 #       endif
22120 #endif
22121
22122 int main() {
22123 struct in_addr in;
22124 int rc = inet_aton( "255.255.255.255", &in );
22125 ; return 0; }
22126 EOF
22127 if { (eval echo configure:22128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22128   rm -rf conftest*
22129   ol_cv_func_inet_aton=yes
22130 else
22131   echo "configure: failed program was:" >&5
22132   cat conftest.$ac_ext >&5
22133   rm -rf conftest*
22134   ol_cv_func_inet_aton=no
22135 fi
22136 rm -f conftest*
22137 fi
22138
22139 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22140   if test $ol_cv_func_inet_aton != no; then
22141     cat >> confdefs.h <<\EOF
22142 #define HAVE_INET_ATON 1
22143 EOF
22144
22145   fi
22146  
22147
22148 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22149 echo "configure:22150: checking for _spawnlp" >&5
22150 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22151   echo $ac_n "(cached) $ac_c" 1>&6
22152 else
22153   cat > conftest.$ac_ext <<EOF
22154 #line 22155 "configure"
22155 #include "confdefs.h"
22156 /* System header to define __stub macros and hopefully few prototypes,
22157     which can conflict with char _spawnlp(); below.  */
22158 #include <assert.h>
22159 /* Override any gcc2 internal prototype to avoid an error.  */
22160 /* We use char because int might match the return type of a gcc2
22161     builtin and then its argument prototype would still apply.  */
22162 char _spawnlp();
22163 char (*f)();
22164
22165 int main() {
22166
22167 /* The GNU C library defines this for functions which it implements
22168     to always fail with ENOSYS.  Some functions are actually named
22169     something starting with __ and the normal name is an alias.  */
22170 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22171 choke me
22172 #else
22173 f = _spawnlp;
22174 #endif
22175
22176 ; return 0; }
22177 EOF
22178 if { (eval echo configure:22179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22179   rm -rf conftest*
22180   eval "ac_cv_func__spawnlp=yes"
22181 else
22182   echo "configure: failed program was:" >&5
22183   cat conftest.$ac_ext >&5
22184   rm -rf conftest*
22185   eval "ac_cv_func__spawnlp=no"
22186 fi
22187 rm -f conftest*
22188 fi
22189
22190 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22191   echo "$ac_t""yes" 1>&6
22192   cat >> confdefs.h <<\EOF
22193 #define HAVE_SPAWNLP 1
22194 EOF
22195
22196 else
22197   echo "$ac_t""no" 1>&6
22198 fi
22199
22200
22201 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22202 echo "configure:22203: checking for _snprintf" >&5
22203 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22204   echo $ac_n "(cached) $ac_c" 1>&6
22205 else
22206   cat > conftest.$ac_ext <<EOF
22207 #line 22208 "configure"
22208 #include "confdefs.h"
22209 /* System header to define __stub macros and hopefully few prototypes,
22210     which can conflict with char _snprintf(); below.  */
22211 #include <assert.h>
22212 /* Override any gcc2 internal prototype to avoid an error.  */
22213 /* We use char because int might match the return type of a gcc2
22214     builtin and then its argument prototype would still apply.  */
22215 char _snprintf();
22216 char (*f)();
22217
22218 int main() {
22219
22220 /* The GNU C library defines this for functions which it implements
22221     to always fail with ENOSYS.  Some functions are actually named
22222     something starting with __ and the normal name is an alias.  */
22223 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22224 choke me
22225 #else
22226 f = _snprintf;
22227 #endif
22228
22229 ; return 0; }
22230 EOF
22231 if { (eval echo configure:22232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22232   rm -rf conftest*
22233   eval "ac_cv_func__snprintf=yes"
22234 else
22235   echo "configure: failed program was:" >&5
22236   cat conftest.$ac_ext >&5
22237   rm -rf conftest*
22238   eval "ac_cv_func__snprintf=no"
22239 fi
22240 rm -f conftest*
22241 fi
22242
22243 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22244   echo "$ac_t""yes" 1>&6
22245   ac_cv_func_snprintf=yes
22246         cat >> confdefs.h <<\EOF
22247 #define snprintf _snprintf
22248 EOF
22249
22250
22251 else
22252   echo "$ac_t""no" 1>&6
22253 fi
22254
22255
22256 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22257 echo "configure:22258: checking for _vsnprintf" >&5
22258 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22259   echo $ac_n "(cached) $ac_c" 1>&6
22260 else
22261   cat > conftest.$ac_ext <<EOF
22262 #line 22263 "configure"
22263 #include "confdefs.h"
22264 /* System header to define __stub macros and hopefully few prototypes,
22265     which can conflict with char _vsnprintf(); below.  */
22266 #include <assert.h>
22267 /* Override any gcc2 internal prototype to avoid an error.  */
22268 /* We use char because int might match the return type of a gcc2
22269     builtin and then its argument prototype would still apply.  */
22270 char _vsnprintf();
22271 char (*f)();
22272
22273 int main() {
22274
22275 /* The GNU C library defines this for functions which it implements
22276     to always fail with ENOSYS.  Some functions are actually named
22277     something starting with __ and the normal name is an alias.  */
22278 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22279 choke me
22280 #else
22281 f = _vsnprintf;
22282 #endif
22283
22284 ; return 0; }
22285 EOF
22286 if { (eval echo configure:22287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22287   rm -rf conftest*
22288   eval "ac_cv_func__vsnprintf=yes"
22289 else
22290   echo "configure: failed program was:" >&5
22291   cat conftest.$ac_ext >&5
22292   rm -rf conftest*
22293   eval "ac_cv_func__vsnprintf=no"
22294 fi
22295 rm -f conftest*
22296 fi
22297
22298 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22299   echo "$ac_t""yes" 1>&6
22300   ac_cv_func_vsnprintf=yes
22301         cat >> confdefs.h <<\EOF
22302 #define vsnprintf _vsnprintf
22303 EOF
22304
22305
22306 else
22307   echo "$ac_t""no" 1>&6
22308 fi
22309
22310
22311 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22312 echo "configure:22313: checking for vprintf" >&5
22313 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22314   echo $ac_n "(cached) $ac_c" 1>&6
22315 else
22316   cat > conftest.$ac_ext <<EOF
22317 #line 22318 "configure"
22318 #include "confdefs.h"
22319 /* System header to define __stub macros and hopefully few prototypes,
22320     which can conflict with char vprintf(); below.  */
22321 #include <assert.h>
22322 /* Override any gcc2 internal prototype to avoid an error.  */
22323 /* We use char because int might match the return type of a gcc2
22324     builtin and then its argument prototype would still apply.  */
22325 char vprintf();
22326 char (*f)();
22327
22328 int main() {
22329
22330 /* The GNU C library defines this for functions which it implements
22331     to always fail with ENOSYS.  Some functions are actually named
22332     something starting with __ and the normal name is an alias.  */
22333 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22334 choke me
22335 #else
22336 f = vprintf;
22337 #endif
22338
22339 ; return 0; }
22340 EOF
22341 if { (eval echo configure:22342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22342   rm -rf conftest*
22343   eval "ac_cv_func_vprintf=yes"
22344 else
22345   echo "configure: failed program was:" >&5
22346   cat conftest.$ac_ext >&5
22347   rm -rf conftest*
22348   eval "ac_cv_func_vprintf=no"
22349 fi
22350 rm -f conftest*
22351 fi
22352
22353 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22354   echo "$ac_t""yes" 1>&6
22355   cat >> confdefs.h <<\EOF
22356 #define HAVE_VPRINTF 1
22357 EOF
22358
22359 else
22360   echo "$ac_t""no" 1>&6
22361 fi
22362
22363 if test "$ac_cv_func_vprintf" != yes; then
22364 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22365 echo "configure:22366: checking for _doprnt" >&5
22366 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22367   echo $ac_n "(cached) $ac_c" 1>&6
22368 else
22369   cat > conftest.$ac_ext <<EOF
22370 #line 22371 "configure"
22371 #include "confdefs.h"
22372 /* System header to define __stub macros and hopefully few prototypes,
22373     which can conflict with char _doprnt(); below.  */
22374 #include <assert.h>
22375 /* Override any gcc2 internal prototype to avoid an error.  */
22376 /* We use char because int might match the return type of a gcc2
22377     builtin and then its argument prototype would still apply.  */
22378 char _doprnt();
22379 char (*f)();
22380
22381 int main() {
22382
22383 /* The GNU C library defines this for functions which it implements
22384     to always fail with ENOSYS.  Some functions are actually named
22385     something starting with __ and the normal name is an alias.  */
22386 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22387 choke me
22388 #else
22389 f = _doprnt;
22390 #endif
22391
22392 ; return 0; }
22393 EOF
22394 if { (eval echo configure:22395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22395   rm -rf conftest*
22396   eval "ac_cv_func__doprnt=yes"
22397 else
22398   echo "configure: failed program was:" >&5
22399   cat conftest.$ac_ext >&5
22400   rm -rf conftest*
22401   eval "ac_cv_func__doprnt=no"
22402 fi
22403 rm -f conftest*
22404 fi
22405
22406 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22407   echo "$ac_t""yes" 1>&6
22408   cat >> confdefs.h <<\EOF
22409 #define HAVE_DOPRNT 1
22410 EOF
22411
22412 else
22413   echo "$ac_t""no" 1>&6
22414 fi
22415
22416 fi
22417
22418
22419 if test $ac_cv_func_vprintf = yes ; then
22420                 for ac_func in snprintf vsnprintf
22421 do
22422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22423 echo "configure:22424: checking for $ac_func" >&5
22424 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22425   echo $ac_n "(cached) $ac_c" 1>&6
22426 else
22427   cat > conftest.$ac_ext <<EOF
22428 #line 22429 "configure"
22429 #include "confdefs.h"
22430 /* System header to define __stub macros and hopefully few prototypes,
22431     which can conflict with char $ac_func(); below.  */
22432 #include <assert.h>
22433 /* Override any gcc2 internal prototype to avoid an error.  */
22434 /* We use char because int might match the return type of a gcc2
22435     builtin and then its argument prototype would still apply.  */
22436 char $ac_func();
22437 char (*f)();
22438
22439 int main() {
22440
22441 /* The GNU C library defines this for functions which it implements
22442     to always fail with ENOSYS.  Some functions are actually named
22443     something starting with __ and the normal name is an alias.  */
22444 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22445 choke me
22446 #else
22447 f = $ac_func;
22448 #endif
22449
22450 ; return 0; }
22451 EOF
22452 if { (eval echo configure:22453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22453   rm -rf conftest*
22454   eval "ac_cv_func_$ac_func=yes"
22455 else
22456   echo "configure: failed program was:" >&5
22457   cat conftest.$ac_ext >&5
22458   rm -rf conftest*
22459   eval "ac_cv_func_$ac_func=no"
22460 fi
22461 rm -f conftest*
22462 fi
22463
22464 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22465   echo "$ac_t""yes" 1>&6
22466     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22467   cat >> confdefs.h <<EOF
22468 #define $ac_tr_func 1
22469 EOF
22470  
22471 else
22472   echo "$ac_t""no" 1>&6
22473 fi
22474 done
22475
22476 fi
22477
22478 for ac_func in \
22479         bcopy                   \
22480         closesocket             \
22481         chroot                  \
22482         endgrent                \
22483         endpwent                \
22484         fcntl                   \
22485         flock                   \
22486         fstat                   \
22487         getdtablesize   \
22488         getgrgid                \
22489         gethostname             \
22490         getpass                 \
22491         getpassphrase   \
22492         getpwuid                \
22493         getpwnam                \
22494         getspnam                \
22495         gettimeofday    \
22496         initgroups              \
22497         lockf                   \
22498         memcpy                  \
22499         memmove                 \
22500         mkstemp                 \
22501         mktemp                  \
22502         pipe                    \
22503         read                    \
22504         recv                    \
22505         recvfrom                \
22506         setpwfile               \
22507         setgid                  \
22508         setegid                 \
22509         setsid                  \
22510         setuid                  \
22511         seteuid                 \
22512         sigaction               \
22513         signal                  \
22514         sigset                  \
22515         strdup                  \
22516         strerror                \
22517         strpbrk                 \
22518         strrchr                 \
22519         strsep                  \
22520         strstr                  \
22521         strtol                  \
22522         strtoul                 \
22523         strtoq                  \
22524         strtouq                 \
22525         strtoll                 \
22526         strspn                  \
22527         sysconf                 \
22528         usleep                  \
22529         waitpid                 \
22530         wait4                   \
22531         write                   \
22532         send                    \
22533         sendmsg                 \
22534         sendto                  \
22535
22536 do
22537 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22538 echo "configure:22539: checking for $ac_func" >&5
22539 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22540   echo $ac_n "(cached) $ac_c" 1>&6
22541 else
22542   cat > conftest.$ac_ext <<EOF
22543 #line 22544 "configure"
22544 #include "confdefs.h"
22545 /* System header to define __stub macros and hopefully few prototypes,
22546     which can conflict with char $ac_func(); below.  */
22547 #include <assert.h>
22548 /* Override any gcc2 internal prototype to avoid an error.  */
22549 /* We use char because int might match the return type of a gcc2
22550     builtin and then its argument prototype would still apply.  */
22551 char $ac_func();
22552 char (*f)();
22553
22554 int main() {
22555
22556 /* The GNU C library defines this for functions which it implements
22557     to always fail with ENOSYS.  Some functions are actually named
22558     something starting with __ and the normal name is an alias.  */
22559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22560 choke me
22561 #else
22562 f = $ac_func;
22563 #endif
22564
22565 ; return 0; }
22566 EOF
22567 if { (eval echo configure:22568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22568   rm -rf conftest*
22569   eval "ac_cv_func_$ac_func=yes"
22570 else
22571   echo "configure: failed program was:" >&5
22572   cat conftest.$ac_ext >&5
22573   rm -rf conftest*
22574   eval "ac_cv_func_$ac_func=no"
22575 fi
22576 rm -f conftest*
22577 fi
22578
22579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22580   echo "$ac_t""yes" 1>&6
22581     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22582   cat >> confdefs.h <<EOF
22583 #define $ac_tr_func 1
22584 EOF
22585  
22586 else
22587   echo "$ac_t""no" 1>&6
22588 fi
22589 done
22590
22591
22592 for ac_func in getopt getpeereid
22593 do
22594 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22595 echo "configure:22596: checking for $ac_func" >&5
22596 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22597   echo $ac_n "(cached) $ac_c" 1>&6
22598 else
22599   cat > conftest.$ac_ext <<EOF
22600 #line 22601 "configure"
22601 #include "confdefs.h"
22602 /* System header to define __stub macros and hopefully few prototypes,
22603     which can conflict with char $ac_func(); below.  */
22604 #include <assert.h>
22605 /* Override any gcc2 internal prototype to avoid an error.  */
22606 /* We use char because int might match the return type of a gcc2
22607     builtin and then its argument prototype would still apply.  */
22608 char $ac_func();
22609 char (*f)();
22610
22611 int main() {
22612
22613 /* The GNU C library defines this for functions which it implements
22614     to always fail with ENOSYS.  Some functions are actually named
22615     something starting with __ and the normal name is an alias.  */
22616 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22617 choke me
22618 #else
22619 f = $ac_func;
22620 #endif
22621
22622 ; return 0; }
22623 EOF
22624 if { (eval echo configure:22625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22625   rm -rf conftest*
22626   eval "ac_cv_func_$ac_func=yes"
22627 else
22628   echo "configure: failed program was:" >&5
22629   cat conftest.$ac_ext >&5
22630   rm -rf conftest*
22631   eval "ac_cv_func_$ac_func=no"
22632 fi
22633 rm -f conftest*
22634 fi
22635
22636 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22637   echo "$ac_t""yes" 1>&6
22638     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22639   cat >> confdefs.h <<EOF
22640 #define $ac_tr_func 1
22641 EOF
22642  
22643 else
22644   echo "$ac_t""no" 1>&6
22645 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22646 fi
22647 done
22648
22649
22650
22651 if test "$ac_cv_func_getopt" != yes; then
22652         LIBSRCS="$LIBSRCS getopt.c"
22653 fi
22654 if test "$ac_cv_func_getpeereid" != yes; then
22655         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22656 echo "configure:22657: checking for msg_accrights in msghdr" >&5
22657 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22658   echo $ac_n "(cached) $ac_c" 1>&6
22659 else
22660   cat > conftest.$ac_ext <<EOF
22661 #line 22662 "configure"
22662 #include "confdefs.h"
22663 #include <sys/socket.h>
22664 int main() {
22665 struct msghdr m; m.msg_accrightslen=0
22666 ; return 0; }
22667 EOF
22668 if { (eval echo configure:22669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22669   rm -rf conftest*
22670   ol_cv_msghdr_msg_accrights=yes
22671 else
22672   echo "configure: failed program was:" >&5
22673   cat conftest.$ac_ext >&5
22674   rm -rf conftest*
22675   ol_cv_msghdr_msg_accrights=no
22676 fi
22677 rm -f conftest*
22678         
22679 fi
22680
22681 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22682   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22683         cat >> confdefs.h <<\EOF
22684 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22685 EOF
22686
22687   fi
22688
22689         LIBSRCS="$LIBSRCS getpeereid.c"
22690 fi
22691 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22692         if test "$ac_cv_func_snprintf" != yes; then
22693                 cat >> confdefs.h <<\EOF
22694 #define snprintf ber_pvt_snprintf
22695 EOF
22696
22697         fi
22698         if test "$ac_cv_func_vsnprintf" != yes; then
22699                 cat >> confdefs.h <<\EOF
22700 #define vsnprintf ber_pvt_vsnprintf
22701 EOF
22702
22703         fi
22704 fi
22705
22706 # Check Configuration
22707 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22708 echo "configure:22709: checking declaration of sys_errlist" >&5
22709 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22710   echo $ac_n "(cached) $ac_c" 1>&6
22711 else
22712   
22713         cat > conftest.$ac_ext <<EOF
22714 #line 22715 "configure"
22715 #include "confdefs.h"
22716
22717 #include <stdio.h>
22718 #include <sys/types.h>
22719 #include <errno.h>
22720 #ifdef WINNT
22721 #include <stdlib.h>
22722 #endif 
22723 int main() {
22724 char *c = (char *) *sys_errlist
22725 ; return 0; }
22726 EOF
22727 if { (eval echo configure:22728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22728   rm -rf conftest*
22729   ol_cv_dcl_sys_errlist=yes
22730         ol_cv_have_sys_errlist=yes
22731 else
22732   echo "configure: failed program was:" >&5
22733   cat conftest.$ac_ext >&5
22734   rm -rf conftest*
22735   ol_cv_dcl_sys_errlist=no
22736 fi
22737 rm -f conftest*
22738 fi
22739
22740 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22741 #
22742 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22743 if test $ol_cv_dcl_sys_errlist = no ; then
22744         cat >> confdefs.h <<\EOF
22745 #define DECL_SYS_ERRLIST 1
22746 EOF
22747
22748
22749         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22750 echo "configure:22751: checking existence of sys_errlist" >&5
22751 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22752   echo $ac_n "(cached) $ac_c" 1>&6
22753 else
22754   
22755                 cat > conftest.$ac_ext <<EOF
22756 #line 22757 "configure"
22757 #include "confdefs.h"
22758 #include <errno.h>
22759 int main() {
22760 char *c = (char *) *sys_errlist
22761 ; return 0; }
22762 EOF
22763 if { (eval echo configure:22764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22764   rm -rf conftest*
22765   ol_cv_have_sys_errlist=yes
22766 else
22767   echo "configure: failed program was:" >&5
22768   cat conftest.$ac_ext >&5
22769   rm -rf conftest*
22770   ol_cv_have_sys_errlist=no
22771 fi
22772 rm -f conftest*
22773 fi
22774
22775 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22776 fi
22777 if test $ol_cv_have_sys_errlist = yes ; then
22778         cat >> confdefs.h <<\EOF
22779 #define HAVE_SYS_ERRLIST 1
22780 EOF
22781
22782 fi
22783
22784
22785
22786 if test "$ol_enable_slapi" != no ; then
22787                         for ac_hdr in ltdl.h
22788 do
22789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22791 echo "configure:22792: checking for $ac_hdr" >&5
22792 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22793   echo $ac_n "(cached) $ac_c" 1>&6
22794 else
22795   cat > conftest.$ac_ext <<EOF
22796 #line 22797 "configure"
22797 #include "confdefs.h"
22798 #include <$ac_hdr>
22799 EOF
22800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22801 { (eval echo configure:22802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22803 if test -z "$ac_err"; then
22804   rm -rf conftest*
22805   eval "ac_cv_header_$ac_safe=yes"
22806 else
22807   echo "$ac_err" >&5
22808   echo "configure: failed program was:" >&5
22809   cat conftest.$ac_ext >&5
22810   rm -rf conftest*
22811   eval "ac_cv_header_$ac_safe=no"
22812 fi
22813 rm -f conftest*
22814 fi
22815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22816   echo "$ac_t""yes" 1>&6
22817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22818   cat >> confdefs.h <<EOF
22819 #define $ac_tr_hdr 1
22820 EOF
22821  
22822 else
22823   echo "$ac_t""no" 1>&6
22824 fi
22825 done
22826
22827
22828         if test $ac_cv_header_ltdl_h != yes ; then
22829                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22830         fi
22831         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22832 echo "configure:22833: checking for lt_dlinit in -lltdl" >&5
22833 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22834 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22835   echo $ac_n "(cached) $ac_c" 1>&6
22836 else
22837   ac_save_LIBS="$LIBS"
22838 LIBS="-lltdl  $LIBS"
22839 cat > conftest.$ac_ext <<EOF
22840 #line 22841 "configure"
22841 #include "confdefs.h"
22842 /* Override any gcc2 internal prototype to avoid an error.  */
22843 /* We use char because int might match the return type of a gcc2
22844     builtin and then its argument prototype would still apply.  */
22845 char lt_dlinit();
22846
22847 int main() {
22848 lt_dlinit()
22849 ; return 0; }
22850 EOF
22851 if { (eval echo configure:22852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22852   rm -rf conftest*
22853   eval "ac_cv_lib_$ac_lib_var=yes"
22854 else
22855   echo "configure: failed program was:" >&5
22856   cat conftest.$ac_ext >&5
22857   rm -rf conftest*
22858   eval "ac_cv_lib_$ac_lib_var=no"
22859 fi
22860 rm -f conftest*
22861 LIBS="$ac_save_LIBS"
22862
22863 fi
22864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22865   echo "$ac_t""yes" 1>&6
22866   
22867                 SLAPI_LIBS=-lltdl
22868                 LIBSLAPI=libslapi.a
22869                 LIBSLAPITOOLS=../libslapi.a
22870                 cat >> confdefs.h <<\EOF
22871 #define HAVE_LIBLTDL 1
22872 EOF
22873
22874         
22875 else
22876   echo "$ac_t""no" 1>&6
22877 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22878 fi
22879
22880
22881         cat >> confdefs.h <<\EOF
22882 #define LDAP_SLAPI 1
22883 EOF
22884
22885 fi
22886
22887 if test "$ol_enable_debug" != no ; then
22888         cat >> confdefs.h <<\EOF
22889 #define LDAP_DEBUG 1
22890 EOF
22891
22892 fi
22893 if test "$ol_enable_syslog" = yes ; then
22894         cat >> confdefs.h <<\EOF
22895 #define LDAP_SYSLOG 1
22896 EOF
22897
22898 fi
22899 if test "$ol_link_kbind" != no ; then
22900         cat >> confdefs.h <<\EOF
22901 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22902 EOF
22903
22904 fi
22905 if test "$ol_enable_proctitle" != no ; then
22906         cat >> confdefs.h <<\EOF
22907 #define LDAP_PROCTITLE 1
22908 EOF
22909
22910 fi
22911 if test "$ol_enable_referrals" != no ; then
22912         cat >> confdefs.h <<\EOF
22913 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22914 EOF
22915
22916 fi
22917 if test "$ol_enable_local" != no; then
22918         cat >> confdefs.h <<\EOF
22919 #define LDAP_PF_LOCAL 1
22920 EOF
22921
22922 fi
22923 if test "$ol_link_ipv6" != no; then
22924         cat >> confdefs.h <<\EOF
22925 #define LDAP_PF_INET6 1
22926 EOF
22927
22928 fi
22929 if test "$ol_enable_cleartext" != no ; then
22930         cat >> confdefs.h <<\EOF
22931 #define SLAPD_CLEARTEXT 1
22932 EOF
22933
22934 fi
22935 if test "$ol_enable_crypt" != no ; then
22936         cat >> confdefs.h <<\EOF
22937 #define SLAPD_CRYPT 1
22938 EOF
22939
22940 fi
22941 if test "$ol_link_kpasswd" != no ; then
22942         cat >> confdefs.h <<\EOF
22943 #define SLAPD_KPASSWD 1
22944 EOF
22945
22946 fi
22947 if test "$ol_link_spasswd" != no ; then
22948         cat >> confdefs.h <<\EOF
22949 #define SLAPD_SPASSWD 1
22950 EOF
22951
22952 fi
22953 if test "$ol_enable_multimaster" != no ; then
22954         cat >> confdefs.h <<\EOF
22955 #define SLAPD_MULTIMASTER 1
22956 EOF
22957
22958 fi
22959 if test "$ol_enable_rlookups" != no ; then
22960         cat >> confdefs.h <<\EOF
22961 #define SLAPD_RLOOKUPS 1
22962 EOF
22963
22964 fi
22965 if test "$ol_enable_aci" != no ; then
22966         cat >> confdefs.h <<\EOF
22967 #define SLAPD_ACI_ENABLED 1
22968 EOF
22969
22970 fi
22971
22972 if test "$ol_link_modules" != no ; then
22973         cat >> confdefs.h <<\EOF
22974 #define SLAPD_MODULES 1
22975 EOF
22976
22977         BUILD_SLAPD=yes
22978         SLAPD_MODULES_LDFLAGS="-dlopen self"
22979 fi
22980
22981 if test "$ol_enable_bdb" != no ; then
22982         cat >> confdefs.h <<\EOF
22983 #define SLAPD_BDB 1
22984 EOF
22985
22986         BUILD_SLAPD=yes
22987         BUILD_BDB=yes
22988         if test "$ol_with_bdb_module" != static ; then
22989                 cat >> confdefs.h <<\EOF
22990 #define SLAPD_BDB_DYNAMIC 1
22991 EOF
22992
22993                 BUILD_BDB=mod
22994                 BUILD_BDB_DYNAMIC=shared
22995                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22996         else
22997                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22998         fi
22999 fi
23000
23001 if test "$ol_link_dnssrv" != no ; then
23002         cat >> confdefs.h <<\EOF
23003 #define SLAPD_DNSSRV 1
23004 EOF
23005
23006         BUILD_SLAPD=yes
23007         BUILD_DNSSRV=yes
23008         if test "$ol_with_dnssrv_module" != static ; then
23009                 cat >> confdefs.h <<\EOF
23010 #define SLAPD_DNSSRV_DYNAMIC 1
23011 EOF
23012
23013                 BUILD_DNSSRV=mod
23014                 BUILD_DNSSRV_DYNAMIC=shared
23015                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23016         else
23017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23018         fi
23019 fi
23020
23021 if test "$ol_enable_hdb" != no ; then
23022         cat >> confdefs.h <<\EOF
23023 #define SLAPD_HDB 1
23024 EOF
23025
23026         BUILD_SLAPD=yes
23027         BUILD_HDB=yes
23028         if test "$ol_with_hdb_module" != static ; then
23029                 cat >> confdefs.h <<\EOF
23030 #define SLAPD_HDB_DYNAMIC 1
23031 EOF
23032
23033                 BUILD_HDB=mod
23034                 BUILD_HDB_DYNAMIC=shared
23035                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23036         else
23037                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23038         fi
23039 fi
23040
23041 if test "$ol_enable_ldap" != no ; then
23042         cat >> confdefs.h <<\EOF
23043 #define SLAPD_LDAP 1
23044 EOF
23045
23046         BUILD_SLAPD=yes
23047         BUILD_LDAP=yes
23048         if test "$ol_with_ldap_module" != static ; then
23049                 cat >> confdefs.h <<\EOF
23050 #define SLAPD_LDAP_DYNAMIC 1
23051 EOF
23052
23053                 BUILD_LDAP=mod
23054                 BUILD_LDAP_DYNAMIC=shared
23055                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23056         else
23057                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23058         fi
23059 fi
23060
23061 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23062         cat >> confdefs.h <<\EOF
23063 #define SLAPD_LDBM 1
23064 EOF
23065
23066         BUILD_SLAPD=yes
23067         BUILD_LDBM=yes
23068         if test "$ol_with_ldbm_module" != static ; then
23069                 cat >> confdefs.h <<\EOF
23070 #define SLAPD_LDBM_DYNAMIC 1
23071 EOF
23072
23073                 BUILD_LDBM=mod
23074                 BUILD_LDBM_DYNAMIC=shared
23075                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23076         else
23077                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23078         fi
23079 fi
23080
23081 if test "$ol_enable_meta" != no ; then
23082         if test "$ol_enable_ldap" = no ; then
23083                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23084         fi
23085         if test "$ol_enable_rewrite" = no ; then
23086                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23087         fi
23088         cat >> confdefs.h <<\EOF
23089 #define SLAPD_META 1
23090 EOF
23091
23092         BUILD_SLAPD=yes
23093         BUILD_META=yes
23094         BUILD_REWRITE=yes
23095         if test $ol_enable_ldbm = yes -o \
23096                 $ol_enable_bdb = yes ; then 
23097                 BUILD_CACHE=yes
23098         fi
23099         if test "$ol_with_meta_module" != static ; then
23100                 cat >> confdefs.h <<\EOF
23101 #define SLAPD_META_DYNAMIC 1
23102 EOF
23103
23104                 BUILD_META=mod
23105                 BUILD_META_DYNAMIC=shared
23106                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23107         else
23108                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23109         fi
23110 fi
23111
23112 if test "$ol_enable_monitor" != no ; then
23113         cat >> confdefs.h <<\EOF
23114 #define SLAPD_MONITOR 1
23115 EOF
23116
23117         BUILD_SLAPD=yes
23118         BUILD_MONITOR=yes
23119         if test "$ol_with_monitor_module" != static ; then
23120                 cat >> confdefs.h <<\EOF
23121 #define SLAPD_MONITOR_DYNAMIC 1
23122 EOF
23123
23124                 BUILD_MONITOR=mod
23125                 BUILD_MONITOR_DYNAMIC=shared
23126                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23127         else
23128                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23129         fi
23130 fi
23131
23132 if test "$ol_enable_null" != no ; then
23133         cat >> confdefs.h <<\EOF
23134 #define SLAPD_NULL 1
23135 EOF
23136
23137         BUILD_SLAPD=yes
23138         BUILD_NULL=yes
23139         if test "$ol_with_null_module" != static ; then
23140                 cat >> confdefs.h <<\EOF
23141 #define SLAPD_NULL_DYNAMIC 1
23142 EOF
23143
23144                 BUILD_NULL=mod
23145                 BUILD_NULL_DYNAMIC=shared
23146                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23147         else
23148                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23149         fi
23150 fi
23151
23152 if test "$ol_enable_passwd" != no ; then
23153         cat >> confdefs.h <<\EOF
23154 #define SLAPD_PASSWD 1
23155 EOF
23156
23157         BUILD_SLAPD=yes
23158         BUILD_PASSWD=yes
23159         if test "$ol_with_passwd_module" != static ; then
23160                 cat >> confdefs.h <<\EOF
23161 #define SLAPD_PASSWD_DYNAMIC 1
23162 EOF
23163
23164                 BUILD_PASSWD=mod
23165                 BUILD_PASSWD_DYNAMIC=shared
23166                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23167         else
23168                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23169         fi
23170 fi
23171
23172 if test "$ol_link_perl" != no ; then
23173         cat >> confdefs.h <<\EOF
23174 #define SLAPD_PERL 1
23175 EOF
23176
23177         BUILD_SLAPD=yes
23178         BUILD_PERL=yes
23179         if test "$ol_with_perl_module" != static ; then
23180                 cat >> confdefs.h <<\EOF
23181 #define SLAPD_PERL_DYNAMIC 1
23182 EOF
23183
23184                 BUILD_PERL=mod
23185                 BUILD_PERL_DYNAMIC=shared
23186                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23187         else
23188                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23189         fi
23190 fi
23191
23192 if test "$ol_enable_shell" != no ; then
23193         if test "$ol_link_thread" != no ; then
23194                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23195         fi
23196         cat >> confdefs.h <<\EOF
23197 #define SLAPD_SHELL 1
23198 EOF
23199
23200         BUILD_SLAPD=yes
23201         BUILD_SHELL=yes
23202         if test "$ol_with_shell_module" != static ; then
23203                 cat >> confdefs.h <<\EOF
23204 #define SLAPD_SHELL_DYNAMIC 1
23205 EOF
23206
23207                 BUILD_SHELL=mod
23208                 BUILD_SHELL_DYNAMIC=shared
23209                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23210         else
23211                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23212         fi
23213 fi
23214
23215 if test "$ol_link_sql" != no ; then
23216         cat >> confdefs.h <<\EOF
23217 #define SLAPD_SQL 1
23218 EOF
23219
23220         BUILD_SLAPD=yes
23221         BUILD_SQL=yes
23222         if test "$ol_with_sql_module" != static; then
23223                 cat >> confdefs.h <<\EOF
23224 #define SLAPD_SQL_DYNAMIC 1
23225 EOF
23226
23227                 BUILD_SQL=mod
23228                 BUILD_SQL_DYNAMIC=shared
23229                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23230         else
23231                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23232         fi
23233 fi
23234
23235 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23236         $BUILD_SLAPD = yes ; then
23237         BUILD_SLURPD=yes
23238 fi
23239
23240 if test "$ol_enable_rewrite" != no ; then
23241         cat >> confdefs.h <<\EOF
23242 #define ENABLE_REWRITE 1
23243 EOF
23244
23245         BUILD_REWRITE=yes
23246 fi
23247
23248 if test "$ol_enable_slapi" != no ; then
23249         cat >> confdefs.h <<\EOF
23250 #define ENABLE_SLAPI 1
23251 EOF
23252
23253         BUILD_SLAPI=yes
23254         SLAPD_SLAPI_DEPEND=libslapi.a
23255 fi
23256
23257
23258
23259 if test "$ac_cv_mingw32" = yes ; then
23260         PLAT=NT
23261         SLAPD_MODULES_LDFLAGS=
23262 else
23263         PLAT=UNIX
23264 fi
23265
23266 if test -z "$SLAPD_STATIC_BACKENDS"; then
23267         SLAPD_NO_STATIC='#'
23268 else
23269         SLAPD_NO_STATIC=
23270 fi
23271
23272
23273
23274
23275
23276
23277   
23278   
23279   
23280   
23281   
23282   
23283   
23284   
23285   
23286   
23287   
23288   
23289   
23290   
23291   
23292   
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 # Check whether --with-xxinstall or --without-xxinstall was given.
23344 if test "${with_xxinstall+set}" = set; then
23345   withval="$with_xxinstall"
23346   :
23347 fi
23348
23349
23350
23351 trap '' 1 2 15
23352
23353 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23354
23355 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23356 # Let make expand exec_prefix.
23357 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23358
23359 # Any assignment to VPATH causes Sun make to only execute
23360 # the first set of double-colon rules, so remove it if not needed.
23361 # If there is a colon in the path, we need to keep it.
23362 if test "x$srcdir" = x.; then
23363   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23364 fi
23365
23366 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23367
23368 DEFS=-DHAVE_CONFIG_H
23369
23370 # Without the "./", some shells look in PATH for config.status.
23371 : ${CONFIG_STATUS=./config.status}
23372
23373 echo creating $CONFIG_STATUS
23374 rm -f $CONFIG_STATUS
23375 cat > $CONFIG_STATUS <<EOF
23376 #! /bin/sh
23377 # Generated automatically by configure.
23378 # Run this file to recreate the current configuration.
23379 # This directory was configured as follows,
23380 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23381 #
23382 # $0 $ac_configure_args
23383 #
23384 # Compiler output produced by configure, useful for debugging
23385 # configure, is in ./config.log if it exists.
23386
23387 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23388 for ac_option
23389 do
23390   case "\$ac_option" in
23391   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23392     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23393     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23394   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23395     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23396     exit 0 ;;
23397   -help | --help | --hel | --he | --h)
23398     echo "\$ac_cs_usage"; exit 0 ;;
23399   *) echo "\$ac_cs_usage"; exit 1 ;;
23400   esac
23401 done
23402
23403 ac_given_srcdir=$srcdir
23404 ac_given_INSTALL="$INSTALL"
23405
23406 trap 'rm -fr `echo "\
23407 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23408 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23409 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23410 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23411 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23412 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23413 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23414 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23415 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23416 include/Makefile:build/top.mk:include/Makefile.in \
23417 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23418 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23419 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23420 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23421 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23422 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23423 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23424 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23425 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23426 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23427 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23428 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23429 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23430 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23431 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23432 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23433 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23434 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23435 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23436 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23437 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23438 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23439 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23440 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23441 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23442 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23443 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23444 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23445 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23446 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23447  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23448 EOF
23449 cat >> $CONFIG_STATUS <<EOF
23450
23451 # Protect against being on the right side of a sed subst in config.status.
23452 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23453  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23454 $ac_vpsub
23455 $extrasub
23456 s%@SHELL@%$SHELL%g
23457 s%@CFLAGS@%$CFLAGS%g
23458 s%@CPPFLAGS@%$CPPFLAGS%g
23459 s%@CXXFLAGS@%$CXXFLAGS%g
23460 s%@FFLAGS@%$FFLAGS%g
23461 s%@DEFS@%$DEFS%g
23462 s%@LDFLAGS@%$LDFLAGS%g
23463 s%@LIBS@%$LIBS%g
23464 s%@exec_prefix@%$exec_prefix%g
23465 s%@prefix@%$prefix%g
23466 s%@program_transform_name@%$program_transform_name%g
23467 s%@bindir@%$bindir%g
23468 s%@sbindir@%$sbindir%g
23469 s%@libexecdir@%$libexecdir%g
23470 s%@datadir@%$datadir%g
23471 s%@sysconfdir@%$sysconfdir%g
23472 s%@sharedstatedir@%$sharedstatedir%g
23473 s%@localstatedir@%$localstatedir%g
23474 s%@libdir@%$libdir%g
23475 s%@includedir@%$includedir%g
23476 s%@oldincludedir@%$oldincludedir%g
23477 s%@infodir@%$infodir%g
23478 s%@mandir@%$mandir%g
23479 s%@host@%$host%g
23480 s%@host_alias@%$host_alias%g
23481 s%@host_cpu@%$host_cpu%g
23482 s%@host_vendor@%$host_vendor%g
23483 s%@host_os@%$host_os%g
23484 s%@target@%$target%g
23485 s%@target_alias@%$target_alias%g
23486 s%@target_cpu@%$target_cpu%g
23487 s%@target_vendor@%$target_vendor%g
23488 s%@target_os@%$target_os%g
23489 s%@build@%$build%g
23490 s%@build_alias@%$build_alias%g
23491 s%@build_cpu@%$build_cpu%g
23492 s%@build_vendor@%$build_vendor%g
23493 s%@build_os@%$build_os%g
23494 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23495 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23496 s%@INSTALL_DATA@%$INSTALL_DATA%g
23497 s%@PACKAGE@%$PACKAGE%g
23498 s%@VERSION@%$VERSION%g
23499 s%@ACLOCAL@%$ACLOCAL%g
23500 s%@AUTOCONF@%$AUTOCONF%g
23501 s%@AUTOMAKE@%$AUTOMAKE%g
23502 s%@AUTOHEADER@%$AUTOHEADER%g
23503 s%@MAKEINFO@%$MAKEINFO%g
23504 s%@install_sh@%$install_sh%g
23505 s%@AMTAR@%$AMTAR%g
23506 s%@AWK@%$AWK%g
23507 s%@AMTARFLAGS@%$AMTARFLAGS%g
23508 s%@SET_MAKE@%$SET_MAKE%g
23509 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23510 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23511 s%@top_builddir@%$top_builddir%g
23512 s%@ldap_subdir@%$ldap_subdir%g
23513 s%@CC@%$CC%g
23514 s%@AR@%$AR%g
23515 s%@LN_S@%$LN_S%g
23516 s%@OBJEXT@%$OBJEXT%g
23517 s%@EXEEXT@%$EXEEXT%g
23518 s%@ECHO@%$ECHO%g
23519 s%@RANLIB@%$RANLIB%g
23520 s%@STRIP@%$STRIP%g
23521 s%@DLLTOOL@%$DLLTOOL%g
23522 s%@AS@%$AS%g
23523 s%@OBJDUMP@%$OBJDUMP%g
23524 s%@CPP@%$CPP%g
23525 s%@LIBTOOL@%$LIBTOOL%g
23526 s%@LN_H@%$LN_H%g
23527 s%@PERLBIN@%$PERLBIN%g
23528 s%@OL_MKDEP@%$OL_MKDEP%g
23529 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23530 s%@LTSTATIC@%$LTSTATIC%g
23531 s%@LIBOBJS@%$LIBOBJS%g
23532 s%@LIBSRCS@%$LIBSRCS%g
23533 s%@PLAT@%$PLAT%g
23534 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23535 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23536 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23537 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23538 s%@BUILD_BDB@%$BUILD_BDB%g
23539 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23540 s%@BUILD_HDB@%$BUILD_HDB%g
23541 s%@BUILD_LDAP@%$BUILD_LDAP%g
23542 s%@BUILD_LDBM@%$BUILD_LDBM%g
23543 s%@BUILD_META@%$BUILD_META%g
23544 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23545 s%@BUILD_CACHE@%$BUILD_CACHE%g
23546 s%@BUILD_NULL@%$BUILD_NULL%g
23547 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23548 s%@BUILD_PERL@%$BUILD_PERL%g
23549 s%@BUILD_SHELL@%$BUILD_SHELL%g
23550 s%@BUILD_SQL@%$BUILD_SQL%g
23551 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23552 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23553 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23554 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23555 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23556 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23557 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23558 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23559 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23560 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23561 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23562 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23563 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23564 s%@LDAP_LIBS@%$LDAP_LIBS%g
23565 s%@LDIF_LIBS@%$LDIF_LIBS%g
23566 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23567 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23568 s%@LDBM_LIBS@%$LDBM_LIBS%g
23569 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23570 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23571 s%@WRAP_LIBS@%$WRAP_LIBS%g
23572 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23573 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23574 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23575 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23576 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23577 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23578 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23579 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23580 s%@KRB4_LIBS@%$KRB4_LIBS%g
23581 s%@KRB5_LIBS@%$KRB5_LIBS%g
23582 s%@SASL_LIBS@%$SASL_LIBS%g
23583 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23584 s%@TLS_LIBS@%$TLS_LIBS%g
23585 s%@MODULES_LIBS@%$MODULES_LIBS%g
23586 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23587 s%@LIBSLAPI@%$LIBSLAPI%g
23588 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23589 s%@AUTH_LIBS@%$AUTH_LIBS%g
23590 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23591 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23592 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23593 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23594
23595 CEOF
23596 EOF
23597
23598 cat >> $CONFIG_STATUS <<\EOF
23599
23600 # Split the substitutions into bite-sized pieces for seds with
23601 # small command number limits, like on Digital OSF/1 and HP-UX.
23602 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23603 ac_file=1 # Number of current file.
23604 ac_beg=1 # First line for current file.
23605 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23606 ac_more_lines=:
23607 ac_sed_cmds=""
23608 while $ac_more_lines; do
23609   if test $ac_beg -gt 1; then
23610     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23611   else
23612     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23613   fi
23614   if test ! -s conftest.s$ac_file; then
23615     ac_more_lines=false
23616     rm -f conftest.s$ac_file
23617   else
23618     if test -z "$ac_sed_cmds"; then
23619       ac_sed_cmds="sed -f conftest.s$ac_file"
23620     else
23621       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23622     fi
23623     ac_file=`expr $ac_file + 1`
23624     ac_beg=$ac_end
23625     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23626   fi
23627 done
23628 if test -z "$ac_sed_cmds"; then
23629   ac_sed_cmds=cat
23630 fi
23631 EOF
23632
23633 cat >> $CONFIG_STATUS <<EOF
23634
23635 CONFIG_FILES=\${CONFIG_FILES-"\
23636 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23637 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23638 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23639 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23640 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23641 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23642 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23643 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23644 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23645 include/Makefile:build/top.mk:include/Makefile.in \
23646 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23647 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23648 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23649 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23650 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23651 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23652 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23653 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23654 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23655 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23656 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23657 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23658 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23659 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23660 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23661 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23662 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23663 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23664 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23665 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23666 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23667 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23668 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23669 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23670 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23671 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23672 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23673 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23674 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23675 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23676 "}
23677 EOF
23678 cat >> $CONFIG_STATUS <<\EOF
23679 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23680   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23681   case "$ac_file" in
23682   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23683        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23684   *) ac_file_in="${ac_file}.in" ;;
23685   esac
23686
23687   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23688
23689   # Remove last slash and all that follows it.  Not all systems have dirname.
23690   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23691   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23692     # The file is in a subdirectory.
23693     test ! -d "$ac_dir" && mkdir "$ac_dir"
23694     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23695     # A "../" for each directory in $ac_dir_suffix.
23696     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23697   else
23698     ac_dir_suffix= ac_dots=
23699   fi
23700
23701   case "$ac_given_srcdir" in
23702   .)  srcdir=.
23703       if test -z "$ac_dots"; then top_srcdir=.
23704       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23705   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23706   *) # Relative path.
23707     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23708     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23709   esac
23710
23711   case "$ac_given_INSTALL" in
23712   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23713   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23714   esac
23715
23716   echo creating "$ac_file"
23717   rm -f "$ac_file"
23718   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23719   case "$ac_file" in
23720   *[Mm]akefile*) ac_comsub="1i\\
23721 # $configure_input" ;;
23722   *) ac_comsub= ;;
23723   esac
23724
23725   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23726   sed -e "$ac_comsub
23727 s%@configure_input@%$configure_input%g
23728 s%@srcdir@%$srcdir%g
23729 s%@top_srcdir@%$top_srcdir%g
23730 s%@INSTALL@%$INSTALL%g
23731 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23732 fi; done
23733 rm -f conftest.s*
23734
23735 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23736 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23737 #
23738 # ac_d sets the value in "#define NAME VALUE" lines.
23739 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23740 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23741 ac_dC='\3'
23742 ac_dD='%g'
23743 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23744 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23745 ac_uB='\([      ]\)%\1#\2define\3'
23746 ac_uC=' '
23747 ac_uD='\4%g'
23748 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23749 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23750 ac_eB='$%\1#\2define\3'
23751 ac_eC=' '
23752 ac_eD='%g'
23753
23754 if test "${CONFIG_HEADERS+set}" != set; then
23755 EOF
23756 cat >> $CONFIG_STATUS <<EOF
23757   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23758 EOF
23759 cat >> $CONFIG_STATUS <<\EOF
23760 fi
23761 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23762   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23763   case "$ac_file" in
23764   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23765        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23766   *) ac_file_in="${ac_file}.in" ;;
23767   esac
23768
23769   echo creating $ac_file
23770
23771   rm -f conftest.frag conftest.in conftest.out
23772   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23773   cat $ac_file_inputs > conftest.in
23774
23775 EOF
23776
23777 # Transform confdefs.h into a sed script conftest.vals that substitutes
23778 # the proper values into config.h.in to produce config.h.  And first:
23779 # Protect against being on the right side of a sed subst in config.status.
23780 # Protect against being in an unquoted here document in config.status.
23781 rm -f conftest.vals
23782 cat > conftest.hdr <<\EOF
23783 s/[\\&%]/\\&/g
23784 s%[\\$`]%\\&%g
23785 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23786 s%ac_d%ac_u%gp
23787 s%ac_u%ac_e%gp
23788 EOF
23789 sed -n -f conftest.hdr confdefs.h > conftest.vals
23790 rm -f conftest.hdr
23791
23792 # This sed command replaces #undef with comments.  This is necessary, for
23793 # example, in the case of _POSIX_SOURCE, which is predefined and required
23794 # on some systems where configure will not decide to define it.
23795 cat >> conftest.vals <<\EOF
23796 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23797 EOF
23798
23799 # Break up conftest.vals because some shells have a limit on
23800 # the size of here documents, and old seds have small limits too.
23801
23802 rm -f conftest.tail
23803 while :
23804 do
23805   ac_lines=`grep -c . conftest.vals`
23806   # grep -c gives empty output for an empty file on some AIX systems.
23807   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23808   # Write a limited-size here document to conftest.frag.
23809   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23810   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23811   echo 'CEOF
23812   sed -f conftest.frag conftest.in > conftest.out
23813   rm -f conftest.in
23814   mv conftest.out conftest.in
23815 ' >> $CONFIG_STATUS
23816   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23817   rm -f conftest.vals
23818   mv conftest.tail conftest.vals
23819 done
23820 rm -f conftest.vals
23821
23822 cat >> $CONFIG_STATUS <<\EOF
23823   rm -f conftest.frag conftest.h
23824   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23825   cat conftest.in >> conftest.h
23826   rm -f conftest.in
23827   if cmp -s $ac_file conftest.h 2>/dev/null; then
23828     echo "$ac_file is unchanged"
23829     rm -f conftest.h
23830   else
23831     # Remove last slash and all that follows it.  Not all systems have dirname.
23832       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23833       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23834       # The file is in a subdirectory.
23835       test ! -d "$ac_dir" && mkdir "$ac_dir"
23836     fi
23837     rm -f $ac_file
23838     mv conftest.h $ac_file
23839   fi
23840 fi; done
23841
23842 EOF
23843 cat >> $CONFIG_STATUS <<EOF
23844
23845 EOF
23846 cat >> $CONFIG_STATUS <<\EOF
23847
23848 date > stamp-h
23849 echo Please run \"make depend\" to build dependencies
23850
23851 exit 0
23852 EOF
23853 chmod +x $CONFIG_STATUS
23854 rm -fr confdefs* $ac_clean_files
23855 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23856