]> git.sur5r.net Git - openldap/blob - configure
Reflect latest changes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.14 2004/03/17 20:15:30 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend [yes]"
86 ac_help="$ac_help
87     --with-bdb-module     module type static|dynamic [static]"
88 ac_help="$ac_help
89     --enable-dnssrv       enable dnssrv backend [no]"
90 ac_help="$ac_help
91     --with-dnssrv-module  module type static|dynamic [static]"
92 ac_help="$ac_help
93     --enable-hdb          enable Hierarchical DB backend [no]"
94 ac_help="$ac_help
95     --with-hdb-module     module type static|dynamic [static]"
96 ac_help="$ac_help
97     --enable-ldap         enable ldap backend [no]"
98 ac_help="$ac_help
99     --with-ldap-module    module type static|dynamic [static]"
100 ac_help="$ac_help
101     --enable-ldbm         enable ldbm backend [no]"
102 ac_help="$ac_help
103     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
104 ac_help="$ac_help
105     --with-ldbm-module    module type static|dynamic [static]"
106 ac_help="$ac_help
107     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
108 ac_help="$ac_help
109     --enable-meta         enable metadirectory backend [no]"
110 ac_help="$ac_help
111     --with-meta-module    module type static|dynamic [static]"
112 ac_help="$ac_help
113     --enable-monitor      enable monitor backend [yes]"
114 ac_help="$ac_help
115     --with-monitor-module module type static|dynamic [static]"
116 ac_help="$ac_help
117     --enable-null         enable null backend [no]"
118 ac_help="$ac_help
119     --with-null-module    module type static|dynamic [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type static|dynamic [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type static|dynamic [static]"
128 ac_help="$ac_help
129     --enable-shell        enable shell backend [no]"
130 ac_help="$ac_help
131     --with-shell-module   module type static|dynamic [static]"
132 ac_help="$ac_help
133     --enable-sql          enable sql backend [no]"
134 ac_help="$ac_help
135     --with-sql-module     module type static|dynamic [static]"
136 ac_help="$ac_help
137
138 SLAPD Overlay Options:"
139 ac_help="$ac_help
140     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
141 ac_help="$ac_help
142     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
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     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
874 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
875
876 OPENLDAP_CVS=""
877 if test -d $ac_aux_dir/CVS; then
878         OPENLDAP_CVS="(from CVS sources) "
879 fi
880
881 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
882
883
884 echo $ac_n "checking host system type""... $ac_c" 1>&6
885 echo "configure:886: checking host system type" >&5
886 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
887
888 # Make sure we can run config.sub.
889   if $ac_config_sub sun4 >/dev/null 2>&1; then :
890     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
891   fi
892
893   ac_cv_host_alias=$host
894   case "$ac_cv_host_alias" in
895   NONE)
896     case $nonopt in
897     NONE)
898       if ac_cv_host_alias=`$ac_config_guess`; then :
899       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
900       fi ;;
901     *) ac_cv_host_alias=$nonopt ;;
902     esac ;;
903   esac
904
905   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
906   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
907   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
908   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
909 else
910   echo $ac_n "(cached) $ac_c" 1>&6
911 fi
912
913 echo "$ac_t""$ac_cv_host" 1>&6
914
915 host=$ac_cv_host
916 host_alias=$ac_cv_host_alias
917 host_cpu=$ac_cv_host_cpu
918 host_vendor=$ac_cv_host_vendor
919 host_os=$ac_cv_host_os
920
921
922
923
924
925 echo $ac_n "checking target system type""... $ac_c" 1>&6
926 echo "configure:927: checking target system type" >&5
927 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
928
929 # Make sure we can run config.sub.
930   if $ac_config_sub sun4 >/dev/null 2>&1; then :
931     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
932   fi
933
934   ac_cv_target_alias=$target
935   case "$ac_cv_target_alias" in
936   NONE)
937     case $nonopt in
938     NONE)
939       ac_cv_target_alias=$host_alias ;;
940
941     *) ac_cv_target_alias=$nonopt ;;
942     esac ;;
943   esac
944
945   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
946   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949 else
950   echo $ac_n "(cached) $ac_c" 1>&6
951 fi
952
953 echo "$ac_t""$ac_cv_target" 1>&6
954
955 target=$ac_cv_target
956 target_alias=$ac_cv_target_alias
957 target_cpu=$ac_cv_target_cpu
958 target_vendor=$ac_cv_target_vendor
959 target_os=$ac_cv_target_os
960
961
962
963
964
965 echo $ac_n "checking build system type""... $ac_c" 1>&6
966 echo "configure:967: checking build system type" >&5
967 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
968
969 # Make sure we can run config.sub.
970   if $ac_config_sub sun4 >/dev/null 2>&1; then :
971     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
972   fi
973
974   ac_cv_build_alias=$build
975   case "$ac_cv_build_alias" in
976   NONE)
977     case $nonopt in
978     NONE)
979       ac_cv_build_alias=$host_alias ;;
980
981     *) ac_cv_build_alias=$nonopt ;;
982     esac ;;
983   esac
984
985   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
986   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
987   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
988   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
989 else
990   echo $ac_n "(cached) $ac_c" 1>&6
991 fi
992
993 echo "$ac_t""$ac_cv_build" 1>&6
994
995 build=$ac_cv_build
996 build_alias=$ac_cv_build_alias
997 build_cpu=$ac_cv_build_cpu
998 build_vendor=$ac_cv_build_vendor
999 build_os=$ac_cv_build_os
1000
1001
1002
1003
1004
1005 # Do some error checking and defaulting for the host and target type.
1006 # The inputs are:
1007 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1008 #
1009 # The rules are:
1010 # 1. You are not allowed to specify --host, --target, and nonopt at the
1011 #    same time.
1012 # 2. Host defaults to nonopt.
1013 # 3. If nonopt is not specified, then host defaults to the current host,
1014 #    as determined by config.guess.
1015 # 4. Target and build default to nonopt.
1016 # 5. If nonopt is not specified, then target and build default to host.
1017
1018 # The aliases save the names the user supplied, while $host etc.
1019 # will get canonicalized.
1020 case $host---$target---$nonopt in
1021 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1022 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1023 esac
1024
1025 test "$host_alias" != "$target_alias" &&
1026   test "$program_prefix$program_suffix$program_transform_name" = \
1027     NONENONEs,x,x, &&
1028   program_prefix=${target_alias}-
1029
1030
1031 # Find a good install program.  We prefer a C program (faster),
1032 # so one script is as good as another.  But avoid the broken or
1033 # incompatible versions:
1034 # SysV /etc/install, /usr/sbin/install
1035 # SunOS /usr/etc/install
1036 # IRIX /sbin/install
1037 # AIX /bin/install
1038 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1039 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1040 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1041 # ./install, which can be erroneously created by make from ./install.sh.
1042 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1043 echo "configure:1044: checking for a BSD compatible install" >&5
1044 if test -z "$INSTALL"; then
1045 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1049   for ac_dir in $PATH; do
1050     # Account for people who put trailing slashes in PATH elements.
1051     case "$ac_dir/" in
1052     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1053     *)
1054       # OSF1 and SCO ODT 3.0 have their own names for install.
1055       # Don't use installbsd from OSF since it installs stuff as root
1056       # by default.
1057       for ac_prog in ginstall scoinst install; do
1058         if test -f $ac_dir/$ac_prog; then
1059           if test $ac_prog = install &&
1060             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1061             # AIX install.  It has an incompatible calling convention.
1062             :
1063           elif test $ac_prog = install &&
1064             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # program-specific install script used by HP pwplus--don't use.
1066             :
1067           else
1068             ac_cv_path_install="$ac_dir/$ac_prog -c"
1069             break 2
1070           fi
1071         fi
1072       done
1073       ;;
1074     esac
1075   done
1076   IFS="$ac_save_IFS"
1077
1078 fi
1079   if test "${ac_cv_path_install+set}" = set; then
1080     INSTALL="$ac_cv_path_install"
1081   else
1082     # As a last resort, use the slow shell script.  We don't cache a
1083     # path for INSTALL within a source directory, because that will
1084     # break other packages using the cache if that directory is
1085     # removed, or if the path is relative.
1086     INSTALL="$ac_install_sh"
1087   fi
1088 fi
1089 echo "$ac_t""$INSTALL" 1>&6
1090
1091 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1092 # It thinks the first close brace ends the variable substitution.
1093 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1094
1095 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1096
1097 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1098
1099 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether build environment is sane" >&5
1101 # Just in case
1102 sleep 1
1103 echo timestamp > conftestfile
1104 # Do `set' in a subshell so we don't clobber the current shell's
1105 # arguments.  Must try -L first in case configure is actually a
1106 # symlink; some systems play weird games with the mod time of symlinks
1107 # (eg FreeBSD returns the mod time of the symlink's containing
1108 # directory).
1109 if (
1110    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1111    if test "$*" = "X"; then
1112       # -L didn't work.
1113       set X `ls -t $srcdir/configure conftestfile`
1114    fi
1115    if test "$*" != "X $srcdir/configure conftestfile" \
1116       && test "$*" != "X conftestfile $srcdir/configure"; then
1117
1118       # If neither matched, then we have a broken ls.  This can happen
1119       # if, for instance, CONFIG_SHELL is bash and it inherits a
1120       # broken ls alias from the environment.  This has actually
1121       # happened.  Such a system could not be considered "sane".
1122       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1123 alias in your environment" 1>&2; exit 1; }
1124    fi
1125
1126    test "$2" = conftestfile
1127    )
1128 then
1129    # Ok.
1130    :
1131 else
1132    { echo "configure: error: newly created file is older than distributed files!
1133 Check your system clock" 1>&2; exit 1; }
1134 fi
1135 rm -f conftest*
1136 echo "$ac_t""yes" 1>&6
1137 if test "$program_transform_name" = s,x,x,; then
1138   program_transform_name=
1139 else
1140   # Double any \ or $.  echo might interpret backslashes.
1141   cat <<\EOF_SED > conftestsed
1142 s,\\,\\\\,g; s,\$,$$,g
1143 EOF_SED
1144   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1145   rm -f conftestsed
1146 fi
1147 test "$program_prefix" != NONE &&
1148   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1149 # Use a double $ so make ignores it.
1150 test "$program_suffix" != NONE &&
1151   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1152
1153 # sed with no file args requires a program.
1154 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1155
1156 for ac_prog in mawk gawk nawk awk
1157 do
1158 # Extract the first word of "$ac_prog", so it can be a program name with args.
1159 set dummy $ac_prog; ac_word=$2
1160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1161 echo "configure:1162: checking for $ac_word" >&5
1162 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   if test -n "$AWK"; then
1166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1167 else
1168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1169   ac_dummy="$PATH"
1170   for ac_dir in $ac_dummy; do
1171     test -z "$ac_dir" && ac_dir=.
1172     if test -f $ac_dir/$ac_word; then
1173       ac_cv_prog_AWK="$ac_prog"
1174       break
1175     fi
1176   done
1177   IFS="$ac_save_ifs"
1178 fi
1179 fi
1180 AWK="$ac_cv_prog_AWK"
1181 if test -n "$AWK"; then
1182   echo "$ac_t""$AWK" 1>&6
1183 else
1184   echo "$ac_t""no" 1>&6
1185 fi
1186
1187 test -n "$AWK" && break
1188 done
1189
1190 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1191 echo "configure:1192: checking whether ${MAKE-make} sets \${MAKE}" >&5
1192 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1193 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   cat > conftestmake <<\EOF
1197 all:
1198         @echo 'ac_maketemp="${MAKE}"'
1199 EOF
1200 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1201 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1202 if test -n "$ac_maketemp"; then
1203   eval ac_cv_prog_make_${ac_make}_set=yes
1204 else
1205   eval ac_cv_prog_make_${ac_make}_set=no
1206 fi
1207 rm -f conftestmake
1208 fi
1209 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1210   echo "$ac_t""yes" 1>&6
1211   SET_MAKE=
1212 else
1213   echo "$ac_t""no" 1>&6
1214   SET_MAKE="MAKE=${MAKE-make}"
1215 fi
1216
1217
1218
1219 PACKAGE=$OL_PACKAGE
1220
1221 VERSION=$OL_VERSION
1222
1223 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1224   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1225 fi
1226
1227
1228
1229 missing_dir=`cd $ac_aux_dir && pwd`
1230 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1231 echo "configure:1232: checking for working aclocal" >&5
1232 # Run test in a subshell; some versions of sh will print an error if
1233 # an executable is not found, even if stderr is redirected.
1234 # Redirect stdin to placate older versions of autoconf.  Sigh.
1235 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1236    ACLOCAL=aclocal
1237    echo "$ac_t""found" 1>&6
1238 else
1239    ACLOCAL="$missing_dir/missing aclocal"
1240    echo "$ac_t""missing" 1>&6
1241 fi
1242
1243 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working autoconf" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1249    AUTOCONF=autoconf
1250    echo "$ac_t""found" 1>&6
1251 else
1252    AUTOCONF="$missing_dir/missing autoconf"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working automake" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (automake --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOMAKE=automake
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOMAKE="$missing_dir/missing automake"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working autoheader" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOHEADER=autoheader
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOHEADER="$missing_dir/missing autoheader"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working makeinfo" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1288    MAKEINFO=makeinfo
1289    echo "$ac_t""found" 1>&6
1290 else
1291    MAKEINFO="$missing_dir/missing makeinfo"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 install_sh="$missing_dir/install-sh"
1296 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1297
1298 for ac_prog in gnutar gtar tar
1299 do
1300 # Extract the first word of "$ac_prog", so it can be a program name with args.
1301 set dummy $ac_prog; ac_word=$2
1302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1303 echo "configure:1304: checking for $ac_word" >&5
1304 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307   if test -n "$AMTAR"; then
1308   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1309 else
1310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1311   ac_dummy="$PATH"
1312   for ac_dir in $ac_dummy; do
1313     test -z "$ac_dir" && ac_dir=.
1314     if test -f $ac_dir/$ac_word; then
1315       ac_cv_prog_AMTAR="$ac_prog"
1316       break
1317     fi
1318   done
1319   IFS="$ac_save_ifs"
1320 fi
1321 fi
1322 AMTAR="$ac_cv_prog_AMTAR"
1323 if test -n "$AMTAR"; then
1324   echo "$ac_t""$AMTAR" 1>&6
1325 else
1326   echo "$ac_t""no" 1>&6
1327 fi
1328
1329 test -n "$AMTAR" && break
1330 done
1331
1332
1333 AMTARFLAGS=
1334 if test -n "$AMTAR"; then
1335   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1336         AMTARFLAGS=o
1337   fi
1338 fi
1339
1340 cat >> confdefs.h <<EOF
1341 #define OPENLDAP_PACKAGE "$PACKAGE"
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_VERSION "$VERSION"
1346 EOF
1347
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION $OL_API_INC
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1363 EOF
1364
1365
1366 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1369
1370 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1371
1372
1373
1374 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1375 echo "configure:1376: checking configure arguments" >&5
1376
1377
1378 top_builddir=`pwd`
1379
1380 ldap_subdir="/openldap"
1381
1382 # Check whether --with-subdir or --without-subdir was given.
1383 if test "${with_subdir+set}" = set; then
1384   withval="$with_subdir"
1385   case "$withval" in
1386         no) ldap_subdir=""
1387                 ;;
1388         yes)
1389                 ;;
1390         /*|\\*)
1391                 ldap_subdir="$withval"
1392                 ;;
1393         *)
1394                 ldap_subdir="/$withval"
1395                 ;;
1396 esac
1397
1398 fi
1399
1400
1401 # OpenLDAP --enable-debug
1402         # Check whether --enable-debug or --disable-debug was given.
1403 if test "${enable_debug+set}" = set; then
1404   enableval="$enable_debug"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no ; do
1408                 if test "$enableval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1414         fi
1415         ol_enable_debug="$ol_arg"
1416
1417 else
1418         ol_enable_debug="yes"
1419 fi
1420 # end --enable-debug
1421 # OpenLDAP --enable-dynamic
1422         # Check whether --enable-dynamic or --disable-dynamic was given.
1423 if test "${enable_dynamic+set}" = set; then
1424   enableval="$enable_dynamic"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1434         fi
1435         ol_enable_dynamic="$ol_arg"
1436
1437 else
1438         ol_enable_dynamic="no"
1439 fi
1440 # end --enable-dynamic
1441 # OpenLDAP --enable-syslog
1442         # Check whether --enable-syslog or --disable-syslog was given.
1443 if test "${enable_syslog+set}" = set; then
1444   enableval="$enable_syslog"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1454         fi
1455         ol_enable_syslog="$ol_arg"
1456
1457 else
1458         ol_enable_syslog="auto"
1459 fi
1460 # end --enable-syslog
1461 # OpenLDAP --enable-proctitle
1462         # Check whether --enable-proctitle or --disable-proctitle was given.
1463 if test "${enable_proctitle+set}" = set; then
1464   enableval="$enable_proctitle"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1474         fi
1475         ol_enable_proctitle="$ol_arg"
1476
1477 else
1478         ol_enable_proctitle="yes"
1479 fi
1480 # end --enable-proctitle
1481 ol_enable_referrals=${ol_enable_referrals-no}
1482 ol_enable_kbind=${ol_enable_kbind-no}
1483 # OpenLDAP --enable-ipv6
1484         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1485 if test "${enable_ipv6+set}" = set; then
1486   enableval="$enable_ipv6"
1487   
1488         ol_arg=invalid
1489         for ol_val in auto yes no ; do
1490                 if test "$enableval" = "$ol_val" ; then
1491                         ol_arg="$ol_val"
1492                 fi
1493         done
1494         if test "$ol_arg" = "invalid" ; then
1495                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1496         fi
1497         ol_enable_ipv6="$ol_arg"
1498
1499 else
1500         ol_enable_ipv6="auto"
1501 fi
1502 # end --enable-ipv6
1503 # OpenLDAP --enable-local
1504         # Check whether --enable-local or --disable-local was given.
1505 if test "${enable_local+set}" = set; then
1506   enableval="$enable_local"
1507   
1508         ol_arg=invalid
1509         for ol_val in auto yes no ; do
1510                 if test "$enableval" = "$ol_val" ; then
1511                         ol_arg="$ol_val"
1512                 fi
1513         done
1514         if test "$ol_arg" = "invalid" ; then
1515                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1516         fi
1517         ol_enable_local="$ol_arg"
1518
1519 else
1520         ol_enable_local="auto"
1521 fi
1522 # end --enable-local
1523 ol_enable_x_compile=${ol_enable_x_compile-no}
1524
1525
1526 # OpenLDAP --with-cyrus_sasl
1527         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1528 if test "${with_cyrus_sasl+set}" = set; then
1529   withval="$with_cyrus_sasl"
1530   
1531         ol_arg=invalid
1532         for ol_val in auto yes no  ; do
1533                 if test "$withval" = "$ol_val" ; then
1534                         ol_arg="$ol_val"
1535                 fi
1536         done
1537         if test "$ol_arg" = "invalid" ; then
1538                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1539         fi
1540         ol_with_cyrus_sasl="$ol_arg"
1541
1542 else
1543         ol_with_cyrus_sasl="auto"
1544 fi
1545 # end --with-cyrus_sasl
1546
1547 # OpenLDAP --with-fetch
1548         # Check whether --with-fetch or --without-fetch was given.
1549 if test "${with_fetch+set}" = set; then
1550   withval="$with_fetch"
1551   
1552         ol_arg=invalid
1553         for ol_val in auto yes no  ; do
1554                 if test "$withval" = "$ol_val" ; then
1555                         ol_arg="$ol_val"
1556                 fi
1557         done
1558         if test "$ol_arg" = "invalid" ; then
1559                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1560         fi
1561         ol_with_fetch="$ol_arg"
1562
1563 else
1564         ol_with_fetch="auto"
1565 fi
1566 # end --with-fetch
1567
1568 ol_with_kerberos=${ol_with_kerberos-auto}
1569 # OpenLDAP --with-threads
1570         # Check whether --with-threads or --without-threads was given.
1571 if test "${with_threads+set}" = set; then
1572   withval="$with_threads"
1573   
1574         ol_arg=invalid
1575         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1576                 if test "$withval" = "$ol_val" ; then
1577                         ol_arg="$ol_val"
1578                 fi
1579         done
1580         if test "$ol_arg" = "invalid" ; then
1581                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1582         fi
1583         ol_with_threads="$ol_arg"
1584
1585 else
1586         ol_with_threads="auto"
1587 fi
1588 # end --with-threads
1589
1590 # OpenLDAP --with-tls
1591         # Check whether --with-tls or --without-tls was given.
1592 if test "${with_tls+set}" = set; then
1593   withval="$with_tls"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto ssleay openssl yes no  ; do
1597                 if test "$withval" = "$ol_val" ; then
1598                         ol_arg="$ol_val"
1599                 fi
1600         done
1601         if test "$ol_arg" = "invalid" ; then
1602                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1603         fi
1604         ol_with_tls="$ol_arg"
1605
1606 else
1607         ol_with_tls="auto"
1608 fi
1609 # end --with-tls
1610
1611 # OpenLDAP --with-yielding_select
1612         # Check whether --with-yielding_select or --without-yielding_select was given.
1613 if test "${with_yielding_select+set}" = set; then
1614   withval="$with_yielding_select"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto yes no manual  ; do
1618                 if test "$withval" = "$ol_val" ; then
1619                         ol_arg="$ol_val"
1620                 fi
1621         done
1622         if test "$ol_arg" = "invalid" ; then
1623                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1624         fi
1625         ol_with_yielding_select="$ol_arg"
1626
1627 else
1628         ol_with_yielding_select="auto"
1629 fi
1630 # end --with-yielding_select
1631
1632
1633
1634 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1635 if test "${with_xxslapdoptions+set}" = set; then
1636   withval="$with_xxslapdoptions"
1637   :
1638 fi
1639
1640 # OpenLDAP --enable-slapd
1641         # Check whether --enable-slapd or --disable-slapd was given.
1642 if test "${enable_slapd+set}" = set; then
1643   enableval="$enable_slapd"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto yes no ; do
1647                 if test "$enableval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1653         fi
1654         ol_enable_slapd="$ol_arg"
1655
1656 else
1657         ol_enable_slapd="yes"
1658 fi
1659 # end --enable-slapd
1660 # OpenLDAP --enable-aci
1661         # Check whether --enable-aci or --disable-aci was given.
1662 if test "${enable_aci+set}" = set; then
1663   enableval="$enable_aci"
1664   
1665         ol_arg=invalid
1666         for ol_val in auto yes no ; do
1667                 if test "$enableval" = "$ol_val" ; then
1668                         ol_arg="$ol_val"
1669                 fi
1670         done
1671         if test "$ol_arg" = "invalid" ; then
1672                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1673         fi
1674         ol_enable_aci="$ol_arg"
1675
1676 else
1677         ol_enable_aci="no"
1678 fi
1679 # end --enable-aci
1680 # OpenLDAP --enable-cleartext
1681         # Check whether --enable-cleartext or --disable-cleartext was given.
1682 if test "${enable_cleartext+set}" = set; then
1683   enableval="$enable_cleartext"
1684   
1685         ol_arg=invalid
1686         for ol_val in auto yes no ; do
1687                 if test "$enableval" = "$ol_val" ; then
1688                         ol_arg="$ol_val"
1689                 fi
1690         done
1691         if test "$ol_arg" = "invalid" ; then
1692                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1693         fi
1694         ol_enable_cleartext="$ol_arg"
1695
1696 else
1697         ol_enable_cleartext="yes"
1698 fi
1699 # end --enable-cleartext
1700 # OpenLDAP --enable-crypt
1701         # Check whether --enable-crypt or --disable-crypt was given.
1702 if test "${enable_crypt+set}" = set; then
1703   enableval="$enable_crypt"
1704   
1705         ol_arg=invalid
1706         for ol_val in auto yes no ; do
1707                 if test "$enableval" = "$ol_val" ; then
1708                         ol_arg="$ol_val"
1709                 fi
1710         done
1711         if test "$ol_arg" = "invalid" ; then
1712                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1713         fi
1714         ol_enable_crypt="$ol_arg"
1715
1716 else
1717         ol_enable_crypt="no"
1718 fi
1719 # end --enable-crypt
1720 # OpenLDAP --enable-lmpasswd
1721         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1722 if test "${enable_lmpasswd+set}" = set; then
1723   enableval="$enable_lmpasswd"
1724   
1725         ol_arg=invalid
1726         for ol_val in auto yes no ; do
1727                 if test "$enableval" = "$ol_val" ; then
1728                         ol_arg="$ol_val"
1729                 fi
1730         done
1731         if test "$ol_arg" = "invalid" ; then
1732                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1733         fi
1734         ol_enable_lmpasswd="$ol_arg"
1735
1736 else
1737         ol_enable_lmpasswd="no"
1738 fi
1739 # end --enable-lmpasswd
1740 # OpenLDAP --enable-spasswd
1741         # Check whether --enable-spasswd or --disable-spasswd was given.
1742 if test "${enable_spasswd+set}" = set; then
1743   enableval="$enable_spasswd"
1744   
1745         ol_arg=invalid
1746         for ol_val in auto yes no ; do
1747                 if test "$enableval" = "$ol_val" ; then
1748                         ol_arg="$ol_val"
1749                 fi
1750         done
1751         if test "$ol_arg" = "invalid" ; then
1752                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1753         fi
1754         ol_enable_spasswd="$ol_arg"
1755
1756 else
1757         ol_enable_spasswd="no"
1758 fi
1759 # end --enable-spasswd
1760 # OpenLDAP --enable-modules
1761         # Check whether --enable-modules or --disable-modules was given.
1762 if test "${enable_modules+set}" = set; then
1763   enableval="$enable_modules"
1764   
1765         ol_arg=invalid
1766         for ol_val in auto yes no ; do
1767                 if test "$enableval" = "$ol_val" ; then
1768                         ol_arg="$ol_val"
1769                 fi
1770         done
1771         if test "$ol_arg" = "invalid" ; then
1772                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1773         fi
1774         ol_enable_modules="$ol_arg"
1775
1776 else
1777         ol_enable_modules="no"
1778 fi
1779 # end --enable-modules
1780 ol_enable_multimaster=${ol_enable_multimaster-no}
1781 # OpenLDAP --enable-rewrite
1782         # Check whether --enable-rewrite or --disable-rewrite was given.
1783 if test "${enable_rewrite+set}" = set; then
1784   enableval="$enable_rewrite"
1785   
1786         ol_arg=invalid
1787         for ol_val in auto yes no ; do
1788                 if test "$enableval" = "$ol_val" ; then
1789                         ol_arg="$ol_val"
1790                 fi
1791         done
1792         if test "$ol_arg" = "invalid" ; then
1793                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1794         fi
1795         ol_enable_rewrite="$ol_arg"
1796
1797 else
1798         ol_enable_rewrite="no"
1799 fi
1800 # end --enable-rewrite
1801 # OpenLDAP --enable-rlookups
1802         # Check whether --enable-rlookups or --disable-rlookups was given.
1803 if test "${enable_rlookups+set}" = set; then
1804   enableval="$enable_rlookups"
1805   
1806         ol_arg=invalid
1807         for ol_val in auto yes no ; do
1808                 if test "$enableval" = "$ol_val" ; then
1809                         ol_arg="$ol_val"
1810                 fi
1811         done
1812         if test "$ol_arg" = "invalid" ; then
1813                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1814         fi
1815         ol_enable_rlookups="$ol_arg"
1816
1817 else
1818         ol_enable_rlookups="no"
1819 fi
1820 # end --enable-rlookups
1821 # OpenLDAP --enable-slapi
1822         # Check whether --enable-slapi or --disable-slapi was given.
1823 if test "${enable_slapi+set}" = set; then
1824   enableval="$enable_slapi"
1825   
1826         ol_arg=invalid
1827         for ol_val in auto yes no ; do
1828                 if test "$enableval" = "$ol_val" ; then
1829                         ol_arg="$ol_val"
1830                 fi
1831         done
1832         if test "$ol_arg" = "invalid" ; then
1833                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1834         fi
1835         ol_enable_slapi="$ol_arg"
1836
1837 else
1838         ol_enable_slapi="no"
1839 fi
1840 # end --enable-slapi
1841 # OpenLDAP --enable-slp
1842         # Check whether --enable-slp or --disable-slp was given.
1843 if test "${enable_slp+set}" = set; then
1844   enableval="$enable_slp"
1845   
1846         ol_arg=invalid
1847         for ol_val in auto yes no ; do
1848                 if test "$enableval" = "$ol_val" ; then
1849                         ol_arg="$ol_val"
1850                 fi
1851         done
1852         if test "$ol_arg" = "invalid" ; then
1853                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1854         fi
1855         ol_enable_slp="$ol_arg"
1856
1857 else
1858         ol_enable_slp="no"
1859 fi
1860 # end --enable-slp
1861 # OpenLDAP --enable-wrappers
1862         # Check whether --enable-wrappers or --disable-wrappers was given.
1863 if test "${enable_wrappers+set}" = set; then
1864   enableval="$enable_wrappers"
1865   
1866         ol_arg=invalid
1867         for ol_val in auto yes no ; do
1868                 if test "$enableval" = "$ol_val" ; then
1869                         ol_arg="$ol_val"
1870                 fi
1871         done
1872         if test "$ol_arg" = "invalid" ; then
1873                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1874         fi
1875         ol_enable_wrappers="$ol_arg"
1876
1877 else
1878         ol_enable_wrappers="no"
1879 fi
1880 # end --enable-wrappers
1881
1882
1883 # OpenLDAP --enable-bdb
1884         # Check whether --enable-bdb or --disable-bdb was given.
1885 if test "${enable_bdb+set}" = set; then
1886   enableval="$enable_bdb"
1887   
1888         ol_arg=invalid
1889         for ol_val in auto yes no ; do
1890                 if test "$enableval" = "$ol_val" ; then
1891                         ol_arg="$ol_val"
1892                 fi
1893         done
1894         if test "$ol_arg" = "invalid" ; then
1895                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1896         fi
1897         ol_enable_bdb="$ol_arg"
1898
1899 else
1900         ol_enable_bdb="yes"
1901 fi
1902 # end --enable-bdb
1903 # OpenLDAP --with-bdb_module
1904         # Check whether --with-bdb_module or --without-bdb_module was given.
1905 if test "${with_bdb_module+set}" = set; then
1906   withval="$with_bdb_module"
1907   
1908         ol_arg=invalid
1909         for ol_val in static dynamic ; do
1910                 if test "$withval" = "$ol_val" ; then
1911                         ol_arg="$ol_val"
1912                 fi
1913         done
1914         if test "$ol_arg" = "invalid" ; then
1915                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1916         fi
1917         ol_with_bdb_module="$ol_arg"
1918
1919 else
1920         ol_with_bdb_module="static"
1921 fi
1922 # end --with-bdb_module
1923
1924 # OpenLDAP --enable-dnssrv
1925         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1926 if test "${enable_dnssrv+set}" = set; then
1927   enableval="$enable_dnssrv"
1928   
1929         ol_arg=invalid
1930         for ol_val in auto yes no ; do
1931                 if test "$enableval" = "$ol_val" ; then
1932                         ol_arg="$ol_val"
1933                 fi
1934         done
1935         if test "$ol_arg" = "invalid" ; then
1936                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1937         fi
1938         ol_enable_dnssrv="$ol_arg"
1939
1940 else
1941         ol_enable_dnssrv="no"
1942 fi
1943 # end --enable-dnssrv
1944 # OpenLDAP --with-dnssrv_module
1945         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1946 if test "${with_dnssrv_module+set}" = set; then
1947   withval="$with_dnssrv_module"
1948   
1949         ol_arg=invalid
1950         for ol_val in static dynamic ; do
1951                 if test "$withval" = "$ol_val" ; then
1952                         ol_arg="$ol_val"
1953                 fi
1954         done
1955         if test "$ol_arg" = "invalid" ; then
1956                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1957         fi
1958         ol_with_dnssrv_module="$ol_arg"
1959
1960 else
1961         ol_with_dnssrv_module="static"
1962 fi
1963 # end --with-dnssrv_module
1964
1965 # OpenLDAP --enable-hdb
1966         # Check whether --enable-hdb or --disable-hdb was given.
1967 if test "${enable_hdb+set}" = set; then
1968   enableval="$enable_hdb"
1969   
1970         ol_arg=invalid
1971         for ol_val in auto yes no ; do
1972                 if test "$enableval" = "$ol_val" ; then
1973                         ol_arg="$ol_val"
1974                 fi
1975         done
1976         if test "$ol_arg" = "invalid" ; then
1977                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1978         fi
1979         ol_enable_hdb="$ol_arg"
1980
1981 else
1982         ol_enable_hdb="no"
1983 fi
1984 # end --enable-hdb
1985 # OpenLDAP --with-hdb_module
1986         # Check whether --with-hdb_module or --without-hdb_module was given.
1987 if test "${with_hdb_module+set}" = set; then
1988   withval="$with_hdb_module"
1989   
1990         ol_arg=invalid
1991         for ol_val in static dynamic ; do
1992                 if test "$withval" = "$ol_val" ; then
1993                         ol_arg="$ol_val"
1994                 fi
1995         done
1996         if test "$ol_arg" = "invalid" ; then
1997                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
1998         fi
1999         ol_with_hdb_module="$ol_arg"
2000
2001 else
2002         ol_with_hdb_module="static"
2003 fi
2004 # end --with-hdb_module
2005
2006 # OpenLDAP --enable-ldap
2007         # Check whether --enable-ldap or --disable-ldap was given.
2008 if test "${enable_ldap+set}" = set; then
2009   enableval="$enable_ldap"
2010   
2011         ol_arg=invalid
2012         for ol_val in auto yes no ; do
2013                 if test "$enableval" = "$ol_val" ; then
2014                         ol_arg="$ol_val"
2015                 fi
2016         done
2017         if test "$ol_arg" = "invalid" ; then
2018                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2019         fi
2020         ol_enable_ldap="$ol_arg"
2021
2022 else
2023         ol_enable_ldap="no"
2024 fi
2025 # end --enable-ldap
2026 # OpenLDAP --with-ldap_module
2027         # Check whether --with-ldap_module or --without-ldap_module was given.
2028 if test "${with_ldap_module+set}" = set; then
2029   withval="$with_ldap_module"
2030   
2031         ol_arg=invalid
2032         for ol_val in static dynamic ; do
2033                 if test "$withval" = "$ol_val" ; then
2034                         ol_arg="$ol_val"
2035                 fi
2036         done
2037         if test "$ol_arg" = "invalid" ; then
2038                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2039         fi
2040         ol_with_ldap_module="$ol_arg"
2041
2042 else
2043         ol_with_ldap_module="static"
2044 fi
2045 # end --with-ldap_module
2046
2047 # OpenLDAP --enable-ldbm
2048         # Check whether --enable-ldbm or --disable-ldbm was given.
2049 if test "${enable_ldbm+set}" = set; then
2050   enableval="$enable_ldbm"
2051   
2052         ol_arg=invalid
2053         for ol_val in auto yes no ; do
2054                 if test "$enableval" = "$ol_val" ; then
2055                         ol_arg="$ol_val"
2056                 fi
2057         done
2058         if test "$ol_arg" = "invalid" ; then
2059                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2060         fi
2061         ol_enable_ldbm="$ol_arg"
2062
2063 else
2064         ol_enable_ldbm="no"
2065 fi
2066 # end --enable-ldbm
2067 # OpenLDAP --with-ldbm_api
2068         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2069 if test "${with_ldbm_api+set}" = set; then
2070   withval="$with_ldbm_api"
2071   
2072         ol_arg=invalid
2073         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2074                 if test "$withval" = "$ol_val" ; then
2075                         ol_arg="$ol_val"
2076                 fi
2077         done
2078         if test "$ol_arg" = "invalid" ; then
2079                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2080         fi
2081         ol_with_ldbm_api="$ol_arg"
2082
2083 else
2084         ol_with_ldbm_api="auto"
2085 fi
2086 # end --with-ldbm_api
2087
2088 # OpenLDAP --with-ldbm_module
2089         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2090 if test "${with_ldbm_module+set}" = set; then
2091   withval="$with_ldbm_module"
2092   
2093         ol_arg=invalid
2094         for ol_val in static dynamic ; do
2095                 if test "$withval" = "$ol_val" ; then
2096                         ol_arg="$ol_val"
2097                 fi
2098         done
2099         if test "$ol_arg" = "invalid" ; then
2100                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2101         fi
2102         ol_with_ldbm_module="$ol_arg"
2103
2104 else
2105         ol_with_ldbm_module="static"
2106 fi
2107 # end --with-ldbm_module
2108
2109 # OpenLDAP --with-ldbm_type
2110         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2111 if test "${with_ldbm_type+set}" = set; then
2112   withval="$with_ldbm_type"
2113   
2114         ol_arg=invalid
2115         for ol_val in auto btree hash ; do
2116                 if test "$withval" = "$ol_val" ; then
2117                         ol_arg="$ol_val"
2118                 fi
2119         done
2120         if test "$ol_arg" = "invalid" ; then
2121                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2122         fi
2123         ol_with_ldbm_type="$ol_arg"
2124
2125 else
2126         ol_with_ldbm_type="auto"
2127 fi
2128 # end --with-ldbm_type
2129
2130 # OpenLDAP --enable-meta
2131         # Check whether --enable-meta or --disable-meta was given.
2132 if test "${enable_meta+set}" = set; then
2133   enableval="$enable_meta"
2134   
2135         ol_arg=invalid
2136         for ol_val in auto yes no ; do
2137                 if test "$enableval" = "$ol_val" ; then
2138                         ol_arg="$ol_val"
2139                 fi
2140         done
2141         if test "$ol_arg" = "invalid" ; then
2142                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2143         fi
2144         ol_enable_meta="$ol_arg"
2145
2146 else
2147         ol_enable_meta="no"
2148 fi
2149 # end --enable-meta
2150 # OpenLDAP --with-meta_module
2151         # Check whether --with-meta_module or --without-meta_module was given.
2152 if test "${with_meta_module+set}" = set; then
2153   withval="$with_meta_module"
2154   
2155         ol_arg=invalid
2156         for ol_val in static dynamic ; do
2157                 if test "$withval" = "$ol_val" ; then
2158                         ol_arg="$ol_val"
2159                 fi
2160         done
2161         if test "$ol_arg" = "invalid" ; then
2162                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2163         fi
2164         ol_with_meta_module="$ol_arg"
2165
2166 else
2167         ol_with_meta_module="static"
2168 fi
2169 # end --with-meta_module
2170
2171 # OpenLDAP --enable-monitor
2172         # Check whether --enable-monitor or --disable-monitor was given.
2173 if test "${enable_monitor+set}" = set; then
2174   enableval="$enable_monitor"
2175   
2176         ol_arg=invalid
2177         for ol_val in auto yes no ; do
2178                 if test "$enableval" = "$ol_val" ; then
2179                         ol_arg="$ol_val"
2180                 fi
2181         done
2182         if test "$ol_arg" = "invalid" ; then
2183                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2184         fi
2185         ol_enable_monitor="$ol_arg"
2186
2187 else
2188         ol_enable_monitor="yes"
2189 fi
2190 # end --enable-monitor
2191 # OpenLDAP --with-monitor_module
2192         # Check whether --with-monitor_module or --without-monitor_module was given.
2193 if test "${with_monitor_module+set}" = set; then
2194   withval="$with_monitor_module"
2195   
2196         ol_arg=invalid
2197         for ol_val in static dynamic ; do
2198                 if test "$withval" = "$ol_val" ; then
2199                         ol_arg="$ol_val"
2200                 fi
2201         done
2202         if test "$ol_arg" = "invalid" ; then
2203                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2204         fi
2205         ol_with_monitor_module="$ol_arg"
2206
2207 else
2208         ol_with_monitor_module="static"
2209 fi
2210 # end --with-monitor_module
2211
2212 # OpenLDAP --enable-null
2213         # Check whether --enable-null or --disable-null was given.
2214 if test "${enable_null+set}" = set; then
2215   enableval="$enable_null"
2216   
2217         ol_arg=invalid
2218         for ol_val in auto yes no ; do
2219                 if test "$enableval" = "$ol_val" ; then
2220                         ol_arg="$ol_val"
2221                 fi
2222         done
2223         if test "$ol_arg" = "invalid" ; then
2224                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2225         fi
2226         ol_enable_null="$ol_arg"
2227
2228 else
2229         ol_enable_null="no"
2230 fi
2231 # end --enable-null
2232 # OpenLDAP --with-null_module
2233         # Check whether --with-null_module or --without-null_module was given.
2234 if test "${with_null_module+set}" = set; then
2235   withval="$with_null_module"
2236   
2237         ol_arg=invalid
2238         for ol_val in static dynamic ; do
2239                 if test "$withval" = "$ol_val" ; then
2240                         ol_arg="$ol_val"
2241                 fi
2242         done
2243         if test "$ol_arg" = "invalid" ; then
2244                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2245         fi
2246         ol_with_null_module="$ol_arg"
2247
2248 else
2249         ol_with_null_module="static"
2250 fi
2251 # end --with-null_module
2252
2253 # OpenLDAP --enable-passwd
2254         # Check whether --enable-passwd or --disable-passwd was given.
2255 if test "${enable_passwd+set}" = set; then
2256   enableval="$enable_passwd"
2257   
2258         ol_arg=invalid
2259         for ol_val in auto yes no ; do
2260                 if test "$enableval" = "$ol_val" ; then
2261                         ol_arg="$ol_val"
2262                 fi
2263         done
2264         if test "$ol_arg" = "invalid" ; then
2265                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2266         fi
2267         ol_enable_passwd="$ol_arg"
2268
2269 else
2270         ol_enable_passwd="no"
2271 fi
2272 # end --enable-passwd
2273 # OpenLDAP --with-passwd_module
2274         # Check whether --with-passwd_module or --without-passwd_module was given.
2275 if test "${with_passwd_module+set}" = set; then
2276   withval="$with_passwd_module"
2277   
2278         ol_arg=invalid
2279         for ol_val in static dynamic ; do
2280                 if test "$withval" = "$ol_val" ; then
2281                         ol_arg="$ol_val"
2282                 fi
2283         done
2284         if test "$ol_arg" = "invalid" ; then
2285                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2286         fi
2287         ol_with_passwd_module="$ol_arg"
2288
2289 else
2290         ol_with_passwd_module="static"
2291 fi
2292 # end --with-passwd_module
2293
2294 # OpenLDAP --enable-perl
2295         # Check whether --enable-perl or --disable-perl was given.
2296 if test "${enable_perl+set}" = set; then
2297   enableval="$enable_perl"
2298   
2299         ol_arg=invalid
2300         for ol_val in auto yes no ; do
2301                 if test "$enableval" = "$ol_val" ; then
2302                         ol_arg="$ol_val"
2303                 fi
2304         done
2305         if test "$ol_arg" = "invalid" ; then
2306                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2307         fi
2308         ol_enable_perl="$ol_arg"
2309
2310 else
2311         ol_enable_perl="no"
2312 fi
2313 # end --enable-perl
2314 # OpenLDAP --with-perl_module
2315         # Check whether --with-perl_module or --without-perl_module was given.
2316 if test "${with_perl_module+set}" = set; then
2317   withval="$with_perl_module"
2318   
2319         ol_arg=invalid
2320         for ol_val in static dynamic ; do
2321                 if test "$withval" = "$ol_val" ; then
2322                         ol_arg="$ol_val"
2323                 fi
2324         done
2325         if test "$ol_arg" = "invalid" ; then
2326                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2327         fi
2328         ol_with_perl_module="$ol_arg"
2329
2330 else
2331         ol_with_perl_module="static"
2332 fi
2333 # end --with-perl_module
2334
2335 # OpenLDAP --enable-shell
2336         # Check whether --enable-shell or --disable-shell was given.
2337 if test "${enable_shell+set}" = set; then
2338   enableval="$enable_shell"
2339   
2340         ol_arg=invalid
2341         for ol_val in auto yes no ; do
2342                 if test "$enableval" = "$ol_val" ; then
2343                         ol_arg="$ol_val"
2344                 fi
2345         done
2346         if test "$ol_arg" = "invalid" ; then
2347                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2348         fi
2349         ol_enable_shell="$ol_arg"
2350
2351 else
2352         ol_enable_shell="no"
2353 fi
2354 # end --enable-shell
2355 # OpenLDAP --with-shell_module
2356         # Check whether --with-shell_module or --without-shell_module was given.
2357 if test "${with_shell_module+set}" = set; then
2358   withval="$with_shell_module"
2359   
2360         ol_arg=invalid
2361         for ol_val in static dynamic ; do
2362                 if test "$withval" = "$ol_val" ; then
2363                         ol_arg="$ol_val"
2364                 fi
2365         done
2366         if test "$ol_arg" = "invalid" ; then
2367                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2368         fi
2369         ol_with_shell_module="$ol_arg"
2370
2371 else
2372         ol_with_shell_module="static"
2373 fi
2374 # end --with-shell_module
2375
2376 # OpenLDAP --enable-sql
2377         # Check whether --enable-sql or --disable-sql was given.
2378 if test "${enable_sql+set}" = set; then
2379   enableval="$enable_sql"
2380   
2381         ol_arg=invalid
2382         for ol_val in auto yes no ; do
2383                 if test "$enableval" = "$ol_val" ; then
2384                         ol_arg="$ol_val"
2385                 fi
2386         done
2387         if test "$ol_arg" = "invalid" ; then
2388                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2389         fi
2390         ol_enable_sql="$ol_arg"
2391
2392 else
2393         ol_enable_sql="no"
2394 fi
2395 # end --enable-sql
2396 # OpenLDAP --with-sql_module
2397         # Check whether --with-sql_module or --without-sql_module was given.
2398 if test "${with_sql_module+set}" = set; then
2399   withval="$with_sql_module"
2400   
2401         ol_arg=invalid
2402         for ol_val in static dynamic ; do
2403                 if test "$withval" = "$ol_val" ; then
2404                         ol_arg="$ol_val"
2405                 fi
2406         done
2407         if test "$ol_arg" = "invalid" ; then
2408                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2409         fi
2410         ol_with_sql_module="$ol_arg"
2411
2412 else
2413         ol_with_sql_module="static"
2414 fi
2415 # end --with-sql_module
2416
2417
2418 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2419 if test "${with_xxslapoverlays+set}" = set; then
2420   withval="$with_xxslapoverlays"
2421   :
2422 fi
2423
2424 # OpenLDAP --with-dyngroup
2425         # Check whether --with-dyngroup or --without-dyngroup was given.
2426 if test "${with_dyngroup+set}" = set; then
2427   withval="$with_dyngroup"
2428   
2429         ol_arg=invalid
2430         for ol_val in no yes mod ; do
2431                 if test "$withval" = "$ol_val" ; then
2432                         ol_arg="$ol_val"
2433                 fi
2434         done
2435         if test "$ol_arg" = "invalid" ; then
2436                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2437         fi
2438         ol_with_dyngroup="$ol_arg"
2439
2440 else
2441         ol_with_dyngroup="no"
2442 fi
2443 # end --with-dyngroup
2444
2445 # OpenLDAP --with-proxycache
2446         # Check whether --with-proxycache or --without-proxycache was given.
2447 if test "${with_proxycache+set}" = set; then
2448   withval="$with_proxycache"
2449   
2450         ol_arg=invalid
2451         for ol_val in no yes mod ; do
2452                 if test "$withval" = "$ol_val" ; then
2453                         ol_arg="$ol_val"
2454                 fi
2455         done
2456         if test "$ol_arg" = "invalid" ; then
2457                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2458         fi
2459         ol_with_proxycache="$ol_arg"
2460
2461 else
2462         ol_with_proxycache="no"
2463 fi
2464 # end --with-proxycache
2465
2466
2467 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2468 if test "${with_xxslurpdoptions+set}" = set; then
2469   withval="$with_xxslurpdoptions"
2470   :
2471 fi
2472
2473 # OpenLDAP --enable-slurpd
2474         # Check whether --enable-slurpd or --disable-slurpd was given.
2475 if test "${enable_slurpd+set}" = set; then
2476   enableval="$enable_slurpd"
2477   
2478         ol_arg=invalid
2479         for ol_val in auto yes no ; do
2480                 if test "$enableval" = "$ol_val" ; then
2481                         ol_arg="$ol_val"
2482                 fi
2483         done
2484         if test "$ol_arg" = "invalid" ; then
2485                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2486         fi
2487         ol_enable_slurpd="$ol_arg"
2488
2489 else
2490         ol_enable_slurpd="auto"
2491 fi
2492 # end --enable-slurpd
2493
2494 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2495 if test "${with_xxliboptions+set}" = set; then
2496   withval="$with_xxliboptions"
2497   :
2498 fi
2499
2500 # Check whether --enable-static or --disable-static was given.
2501 if test "${enable_static+set}" = set; then
2502   enableval="$enable_static"
2503   p=${PACKAGE-default}
2504 case $enableval in
2505 yes) enable_static=yes ;;
2506 no) enable_static=no ;;
2507 *)
2508   enable_static=no
2509   # Look at the argument we got.  We use all the common list separators.
2510   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2511   for pkg in $enableval; do
2512     if test "X$pkg" = "X$p"; then
2513       enable_static=yes
2514     fi
2515   done
2516   IFS="$ac_save_ifs"
2517   ;;
2518 esac
2519 else
2520   enable_static=yes
2521 fi
2522
2523 # Check whether --enable-shared or --disable-shared was given.
2524 if test "${enable_shared+set}" = set; then
2525   enableval="$enable_shared"
2526   p=${PACKAGE-default}
2527 case $enableval in
2528 yes) enable_shared=yes ;;
2529 no) enable_shared=no ;;
2530 *)
2531   enable_shared=no
2532   # Look at the argument we got.  We use all the common list separators.
2533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2534   for pkg in $enableval; do
2535     if test "X$pkg" = "X$p"; then
2536       enable_shared=yes
2537     fi
2538   done
2539   IFS="$ac_save_ifs"
2540   ;;
2541 esac
2542 else
2543   enable_shared=yes
2544 fi
2545
2546
2547
2548 # validate options
2549 if test $ol_enable_slapd = no ; then
2550                 if test $ol_enable_slapi = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2552         fi
2553         if test $ol_enable_bdb = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2555         fi
2556         if test $ol_enable_dnssrv = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2558         fi
2559         if test $ol_enable_hdb = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2561         fi
2562         if test $ol_enable_ldap = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2564         fi
2565         if test $ol_enable_ldbm = yes ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2567         fi
2568         if test $ol_enable_meta = yes ; then
2569                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2570         fi
2571         if test $ol_enable_monitor = yes ; then
2572                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2573         fi
2574         if test $ol_enable_null = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2576         fi
2577         if test $ol_enable_passwd = yes ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2579         fi
2580         if test $ol_enable_perl = yes ; then
2581                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2582         fi
2583         if test $ol_enable_shell = yes ; then
2584                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2585         fi
2586         if test $ol_enable_sql = yes ; then
2587                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2588         fi
2589         if test $ol_enable_modules = yes ; then
2590                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2591         fi
2592         if test $ol_enable_multimaster = yes ; then
2593                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2594         fi
2595         if test $ol_enable_wrappers = yes ; then
2596                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2597         fi
2598         if test $ol_enable_rlookups = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2600         fi
2601         if test $ol_enable_aci = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2603         fi
2604         if test $ol_with_ldbm_api != auto ; then
2605                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2606         fi
2607         if test $ol_with_ldbm_type != auto ; then
2608                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2609         fi
2610         if test $ol_with_bdb_module != static ; then
2611                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2612         fi
2613         if test $ol_with_dnssrv_module != static ; then
2614                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2615         fi
2616         if test $ol_with_hdb_module != static ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2618         fi
2619         if test $ol_with_ldap_module != static ; then
2620                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2621         fi
2622         if test $ol_with_ldbm_module != static ; then
2623                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2624         fi
2625         if test $ol_with_meta_module != static ; then
2626                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2627         fi
2628         if test $ol_with_monitor_module != static ; then
2629                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2630         fi
2631         if test $ol_with_null_module != static ; then
2632                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2633         fi
2634         if test $ol_with_passwd_module != static ; then
2635                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2636         fi
2637         if test $ol_with_perl_module != static ; then
2638                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2639         fi
2640         if test $ol_with_shell_module != static ; then
2641                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2642         fi
2643         if test $ol_with_sql_module != static ; then
2644                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2645         fi
2646         if test $ol_enable_slurpd = yes ; then
2647                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2648         fi
2649         if test $ol_enable_rewrite = yes ; then
2650                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2651         fi
2652         if test $ol_with_dyngroup != no ; then
2653                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2654         fi
2655         if test $ol_with_proxycache != no ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2657         fi
2658
2659         # force settings to no
2660         ol_enable_slapi=no
2661         ol_enable_bdb=no
2662         ol_enable_dnssrv=no
2663         ol_enable_hdb=no
2664         ol_enable_ldap=no
2665         ol_enable_ldbm=no
2666         ol_enable_meta=no
2667         ol_enable_monitor=no
2668         ol_enable_null=no
2669         ol_enable_passwd=no
2670         ol_enable_perl=no
2671         ol_enable_shell=no
2672         ol_enable_sql=no
2673
2674         ol_enable_modules=no
2675         ol_enable_multimaster=no
2676         ol_enable_rlookups=no
2677         ol_enable_aci=no
2678         ol_enable_wrappers=no
2679
2680         ol_with_ldbm_api=no
2681         ol_with_ldbm_type=no
2682
2683         ol_with_bdb_module=static
2684         ol_with_dnssrv_module=static
2685         ol_with_hdb_module=static
2686         ol_with_ldap_module=static
2687         ol_with_ldbm_module=static
2688         ol_with_meta_module=static
2689         ol_with_monitor_module=static
2690         ol_with_null_module=static
2691         ol_with_passwd_module=static
2692         ol_with_perl_module=static
2693         ol_with_shell_module=static
2694         ol_with_sql_module=static
2695
2696         ol_enable_slurpd=no
2697
2698         ol_enable_rewrite=no
2699
2700         ol_with_dyngroup=no
2701         ol_with_proxycache=no
2702
2703 elif test $ol_enable_ldbm = no ; then
2704         
2705         if test $ol_with_ldbm_api != auto ; then
2706                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2707         fi
2708
2709         if test $ol_with_ldbm_type != auto ; then
2710                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2711         fi
2712
2713         if test $ol_with_ldbm_module != static ; then
2714                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2715         fi
2716
2717         if test $ol_enable_modules != yes -a \
2718                 $ol_enable_bdb = no -a \
2719                 $ol_enable_dnssrv = no -a \
2720                 $ol_enable_hdb = no -a \
2721                 $ol_enable_ldap = no -a \
2722                 $ol_enable_meta = no -a \
2723                 $ol_enable_monitor = no -a \
2724                 $ol_enable_null = no -a \
2725                 $ol_enable_passwd = no -a \
2726                 $ol_enable_perl = no -a \
2727                 $ol_enable_shell = no -a \
2728                 $ol_enable_sql = no ; then
2729
2730                 if test $ol_enable_slapd = yes ; then
2731                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2732                 else
2733                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2734                         ol_enable_slapd=no
2735                 fi
2736         fi
2737
2738         ol_with_ldbm_api=no
2739         ol_with_ldbm_type=no
2740         ol_with_ldbm_module=static
2741
2742         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2743                 ol_with_ldbm_api=berkeley
2744         fi
2745
2746 else
2747                 if test $ol_with_ldbm_api = gdbm -a \
2748                 $ol_with_ldbm_type = btree ; then
2749                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2750         fi
2751         if test $ol_with_ldbm_api = mdbm -a \
2752                 $ol_with_ldbm_type = btree ; then
2753                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2754         fi
2755         if test $ol_with_ldbm_api = ndbm -a \
2756                 $ol_with_ldbm_type = btree ; then
2757                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2758         fi
2759
2760         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2761                 if test $ol_with_ldbm_api = auto ; then
2762                         ol_with_ldbm_api=berkeley
2763                 elif test $ol_with_ldbm_api != berkeley ; then
2764                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2765                 fi
2766
2767         elif test $ol_enable_bdb = auto ; then
2768                 if test $ol_with_ldbm_api != berkeley \
2769                         -o $ol_with_ldbm_api != auto ; then
2770                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2771                         ol_enable_bdb=no
2772                 fi
2773         fi
2774 fi
2775
2776 if test $ol_enable_slurpd = yes ; then
2777                 if test $ol_with_threads = no ; then
2778                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_lmpasswd = yes ; then
2783         if test $ol_with_tls = no ; then
2784                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2785         fi
2786 fi
2787
2788 if test $ol_enable_kbind = yes ; then
2789         if test $ol_with_kerberos = no ; then
2790                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2791         elif test $ol_with_kerberos = auto ; then
2792                 ol_with_kerberos=yes
2793         fi
2794
2795 elif test $ol_enable_kbind = no ; then
2796         if test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=no
2798         elif test $ol_with_kerberos != no ; then
2799                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2800                 ol_with_kerberos=no
2801         fi
2802 fi
2803
2804 if test $ol_enable_spasswd = yes ; then
2805         if test $ol_with_cyrus_sasl = no ; then
2806                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2807         fi
2808         ol_with_cyrus_sasl=yes
2809 fi
2810
2811 echo "$ac_t""done" 1>&6
2812
2813 LDAP_LIBS=
2814 LDBM_LIBS=
2815 LTHREAD_LIBS=
2816 LUTIL_LIBS=
2817
2818 SLAPD_LIBS=
2819 SLURPD_LIBS=
2820
2821 BUILD_SLAPD=no
2822 BUILD_SLURPD=no
2823
2824 BUILD_THREAD=no
2825
2826 BUILD_SLAPI=no
2827 SLAPD_SLAPI_DEPEND=
2828
2829 BUILD_BDB=no
2830 BUILD_DNSSRV=no
2831 BUILD_HDB=no
2832 BUILD_LDAP=no
2833 BUILD_LDBM=no
2834 BUILD_META=no
2835 BUILD_MONITOR=no
2836 BUILD_NULL=no
2837 BUILD_PASSWD=no
2838 BUILD_PERL=no
2839 BUILD_SHELL=no
2840 BUILD_SQL=no
2841
2842 BUILD_BDB_DYNAMIC=static
2843 BUILD_DNSSRV_DYNAMIC=static
2844 BUILD_HDB_DYNAMIC=static
2845 BUILD_LDAP_DYNAMIC=static
2846 BUILD_LDBM_DYNAMIC=static
2847 BUILD_META_DYNAMIC=static
2848 BUILD_MONITOR_DYNAMIC=static
2849 BUILD_NULL_DYNAMIC=static
2850 BUILD_PASSWD_DYNAMIC=static
2851 BUILD_PERL_DYNAMIC=static
2852 BUILD_SHELL_DYNAMIC=static
2853 BUILD_SQL_DYNAMIC=static
2854
2855 BUILD_DYNGROUP=no
2856 BUILD_PROXYCACHE=no
2857
2858 SLAPD_DYNAMIC_OVERLAYS=
2859
2860 SLAPD_MODULES_LDFLAGS=
2861 SLAPD_MODULES_CPPFLAGS=
2862
2863 SLAPD_STATIC_BACKENDS=
2864 SLAPD_DYNAMIC_BACKENDS=
2865
2866 SLAPD_PERL_LDFLAGS=
2867 MOD_PERL_LDFLAGS=
2868 PERL_CPPFLAGS=
2869
2870 SLAPD_SQL_LDFLAGS=
2871 SLAPD_SQL_LIBS=
2872 SLAPD_SQL_INCLUDES=
2873
2874 KRB4_LIBS=
2875 KRB5_LIBS=
2876 SASL_LIBS=
2877 TLS_LIBS=
2878 MODULES_LIBS=
2879 SLAPI_LIBS=
2880 LIBSLAPI=
2881 LIBSLAPITOOLS=
2882 AUTH_LIBS=
2883
2884 SLAPD_SLP_LIBS=
2885
2886
2887 # Find a good install program.  We prefer a C program (faster),
2888 # so one script is as good as another.  But avoid the broken or
2889 # incompatible versions:
2890 # SysV /etc/install, /usr/sbin/install
2891 # SunOS /usr/etc/install
2892 # IRIX /sbin/install
2893 # AIX /bin/install
2894 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2895 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2896 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2897 # ./install, which can be erroneously created by make from ./install.sh.
2898 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2899 echo "configure:2900: checking for a BSD compatible install" >&5
2900 if test -z "$INSTALL"; then
2901 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2902   echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2905   for ac_dir in $PATH; do
2906     # Account for people who put trailing slashes in PATH elements.
2907     case "$ac_dir/" in
2908     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2909     *)
2910       # OSF1 and SCO ODT 3.0 have their own names for install.
2911       # Don't use installbsd from OSF since it installs stuff as root
2912       # by default.
2913       for ac_prog in ginstall scoinst install; do
2914         if test -f $ac_dir/$ac_prog; then
2915           if test $ac_prog = install &&
2916             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2917             # AIX install.  It has an incompatible calling convention.
2918             :
2919           elif test $ac_prog = install &&
2920             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2921             # program-specific install script used by HP pwplus--don't use.
2922             :
2923           else
2924             ac_cv_path_install="$ac_dir/$ac_prog -c"
2925             break 2
2926           fi
2927         fi
2928       done
2929       ;;
2930     esac
2931   done
2932   IFS="$ac_save_IFS"
2933
2934 fi
2935   if test "${ac_cv_path_install+set}" = set; then
2936     INSTALL="$ac_cv_path_install"
2937   else
2938     # As a last resort, use the slow shell script.  We don't cache a
2939     # path for INSTALL within a source directory, because that will
2940     # break other packages using the cache if that directory is
2941     # removed, or if the path is relative.
2942     INSTALL="$ac_install_sh"
2943   fi
2944 fi
2945 echo "$ac_t""$INSTALL" 1>&6
2946
2947 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2948 # It thinks the first close brace ends the variable substitution.
2949 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2950
2951 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2952
2953 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2954
2955
2956 cat >> confdefs.h <<\EOF
2957 #define HAVE_MKVERSION 1
2958 EOF
2959
2960
2961
2962
2963 ol_aix_threads=no
2964 case "$target" in
2965 *-*-aix*)       if test -z "$CC" ; then
2966                 case "$ol_with_threads" in
2967                 auto | yes |  posix) ol_aix_threads=yes ;;
2968                 esac
2969         fi
2970 ;;
2971 esac
2972
2973 if test $ol_aix_threads = yes ; then
2974         if test -z "${CC}" ; then
2975                 for ac_prog in cc_r xlc_r cc
2976 do
2977 # Extract the first word of "$ac_prog", so it can be a program name with args.
2978 set dummy $ac_prog; ac_word=$2
2979 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2980 echo "configure:2981: checking for $ac_word" >&5
2981 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2982   echo $ac_n "(cached) $ac_c" 1>&6
2983 else
2984   if test -n "$CC"; then
2985   ac_cv_prog_CC="$CC" # Let the user override the test.
2986 else
2987   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2988   ac_dummy="$PATH"
2989   for ac_dir in $ac_dummy; do
2990     test -z "$ac_dir" && ac_dir=.
2991     if test -f $ac_dir/$ac_word; then
2992       ac_cv_prog_CC="$ac_prog"
2993       break
2994     fi
2995   done
2996   IFS="$ac_save_ifs"
2997 fi
2998 fi
2999 CC="$ac_cv_prog_CC"
3000 if test -n "$CC"; then
3001   echo "$ac_t""$CC" 1>&6
3002 else
3003   echo "$ac_t""no" 1>&6
3004 fi
3005
3006 test -n "$CC" && break
3007 done
3008
3009
3010                 if test "$CC" = cc ; then
3011                                                 if test $ol_with_threads != auto ; then
3012                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3013                         else
3014                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3015                         fi
3016                         ol_with_threads=no
3017                 fi
3018         fi
3019
3020         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3021                 ol_with_threads=posix
3022                 ol_cv_pthread_create=yes
3023         fi
3024 fi
3025
3026 if test -z "${CC}"; then
3027         for ac_prog in cc gcc
3028 do
3029 # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   if test -n "$CC"; then
3037   ac_cv_prog_CC="$CC" # Let the user override the test.
3038 else
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_prog_CC="$ac_prog"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049 fi
3050 fi
3051 CC="$ac_cv_prog_CC"
3052 if test -n "$CC"; then
3053   echo "$ac_t""$CC" 1>&6
3054 else
3055   echo "$ac_t""no" 1>&6
3056 fi
3057
3058 test -n "$CC" && break
3059 done
3060 test -n "$CC" || CC="missing"
3061
3062
3063         if test "${CC}" = "missing" ; then
3064                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3065         fi
3066 fi
3067
3068 if test -z "${AR}"; then
3069         for ac_prog in ar gar
3070 do
3071 # Extract the first word of "$ac_prog", so it can be a program name with args.
3072 set dummy $ac_prog; ac_word=$2
3073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3074 echo "configure:3075: checking for $ac_word" >&5
3075 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   if test -n "$AR"; then
3079   ac_cv_prog_AR="$AR" # Let the user override the test.
3080 else
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3082   ac_dummy="$PATH"
3083   for ac_dir in $ac_dummy; do
3084     test -z "$ac_dir" && ac_dir=.
3085     if test -f $ac_dir/$ac_word; then
3086       ac_cv_prog_AR="$ac_prog"
3087       break
3088     fi
3089   done
3090   IFS="$ac_save_ifs"
3091 fi
3092 fi
3093 AR="$ac_cv_prog_AR"
3094 if test -n "$AR"; then
3095   echo "$ac_t""$AR" 1>&6
3096 else
3097   echo "$ac_t""no" 1>&6
3098 fi
3099
3100 test -n "$AR" && break
3101 done
3102 test -n "$AR" || AR="missing"
3103
3104
3105         if test "${AR}" = "missing" ; then
3106                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3107         fi
3108 fi
3109
3110
3111
3112 # Find the correct PATH separator.  Usually this is `:', but
3113 # DJGPP uses `;' like DOS.
3114 if test "X${PATH_SEPARATOR+set}" != Xset; then
3115   UNAME=${UNAME-`uname 2>/dev/null`}
3116   case X$UNAME in
3117     *-DOS) lt_cv_sys_path_separator=';' ;;
3118     *)     lt_cv_sys_path_separator=':' ;;
3119   esac
3120   PATH_SEPARATOR=$lt_cv_sys_path_separator
3121 fi
3122
3123 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3124 echo "configure:3125: checking for Cygwin environment" >&5
3125 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3126   echo $ac_n "(cached) $ac_c" 1>&6
3127 else
3128   cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131
3132 int main() {
3133
3134 #ifndef __CYGWIN__
3135 #define __CYGWIN__ __CYGWIN32__
3136 #endif
3137 return __CYGWIN__;
3138 ; return 0; }
3139 EOF
3140 if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3141   rm -rf conftest*
3142   ac_cv_cygwin=yes
3143 else
3144   echo "configure: failed program was:" >&5
3145   cat conftest.$ac_ext >&5
3146   rm -rf conftest*
3147   ac_cv_cygwin=no
3148 fi
3149 rm -f conftest*
3150 fi
3151
3152 echo "$ac_t""$ac_cv_cygwin" 1>&6
3153 CYGWIN=
3154 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3155 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3156 echo "configure:3157: checking for mingw32 environment" >&5
3157 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3158   echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160   cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163
3164 int main() {
3165 return __MINGW32__;
3166 ; return 0; }
3167 EOF
3168 if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3169   rm -rf conftest*
3170   ac_cv_mingw32=yes
3171 else
3172   echo "configure: failed program was:" >&5
3173   cat conftest.$ac_ext >&5
3174   rm -rf conftest*
3175   ac_cv_mingw32=no
3176 fi
3177 rm -f conftest*
3178 fi
3179
3180 echo "$ac_t""$ac_cv_mingw32" 1>&6
3181 MINGW32=
3182 test "$ac_cv_mingw32" = yes && MINGW32=yes
3183 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3184 echo "configure:3185: checking for EMX OS/2 environment" >&5
3185 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3186   echo $ac_n "(cached) $ac_c" 1>&6
3187 else
3188   cat > conftest.$ac_ext <<EOF
3189 #line 3190 "configure"
3190 #include "confdefs.h"
3191
3192 int main() {
3193 return __EMX__;
3194 ; return 0; }
3195 EOF
3196 if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3197   rm -rf conftest*
3198   ac_cv_emxos2=yes
3199 else
3200   echo "configure: failed program was:" >&5
3201   cat conftest.$ac_ext >&5
3202   rm -rf conftest*
3203   ac_cv_emxos2=no
3204 fi
3205 rm -f conftest*
3206 fi
3207
3208 echo "$ac_t""$ac_cv_emxos2" 1>&6
3209 EMXOS2=
3210 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3211 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3212 echo "configure:3213: checking how to run the C preprocessor" >&5
3213 # On Suns, sometimes $CPP names a directory.
3214 if test -n "$CPP" && test -d "$CPP"; then
3215   CPP=
3216 fi
3217 if test -z "$CPP"; then
3218 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221     # This must be in double quotes, not single quotes, because CPP may get
3222   # substituted into the Makefile and "${CC-cc}" will confuse make.
3223   CPP="${CC-cc} -E"
3224   # On the NeXT, cc -E runs the code through the compiler's parser,
3225   # not just through cpp.
3226   cat > conftest.$ac_ext <<EOF
3227 #line 3228 "configure"
3228 #include "confdefs.h"
3229 #include <assert.h>
3230 Syntax Error
3231 EOF
3232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3233 { (eval echo configure:3234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3235 if test -z "$ac_err"; then
3236   :
3237 else
3238   echo "$ac_err" >&5
3239   echo "configure: failed program was:" >&5
3240   cat conftest.$ac_ext >&5
3241   rm -rf conftest*
3242   CPP="${CC-cc} -E -traditional-cpp"
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 #include <assert.h>
3247 Syntax Error
3248 EOF
3249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3250 { (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3252 if test -z "$ac_err"; then
3253   :
3254 else
3255   echo "$ac_err" >&5
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   CPP="${CC-cc} -nologo -E"
3260   cat > conftest.$ac_ext <<EOF
3261 #line 3262 "configure"
3262 #include "confdefs.h"
3263 #include <assert.h>
3264 Syntax Error
3265 EOF
3266 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3267 { (eval echo configure:3268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3268 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3269 if test -z "$ac_err"; then
3270   :
3271 else
3272   echo "$ac_err" >&5
3273   echo "configure: failed program was:" >&5
3274   cat conftest.$ac_ext >&5
3275   rm -rf conftest*
3276   CPP=/lib/cpp
3277 fi
3278 rm -f conftest*
3279 fi
3280 rm -f conftest*
3281 fi
3282 rm -f conftest*
3283   ac_cv_prog_CPP="$CPP"
3284 fi
3285   CPP="$ac_cv_prog_CPP"
3286 else
3287   ac_cv_prog_CPP="$CPP"
3288 fi
3289 echo "$ac_t""$CPP" 1>&6
3290
3291 # Check whether --enable-fast-install or --disable-fast-install was given.
3292 if test "${enable_fast_install+set}" = set; then
3293   enableval="$enable_fast_install"
3294   p=${PACKAGE-default}
3295 case $enableval in
3296 yes) enable_fast_install=yes ;;
3297 no) enable_fast_install=no ;;
3298 *)
3299   enable_fast_install=no
3300   # Look at the argument we got.  We use all the common list separators.
3301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3302   for pkg in $enableval; do
3303     if test "X$pkg" = "X$p"; then
3304       enable_fast_install=yes
3305     fi
3306   done
3307   IFS="$ac_save_ifs"
3308   ;;
3309 esac
3310 else
3311   enable_fast_install=yes
3312 fi
3313
3314 # Extract the first word of "gcc", so it can be a program name with args.
3315 set dummy gcc; 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_dummy="$PATH"
3326   for ac_dir in $ac_dummy; do
3327     test -z "$ac_dir" && ac_dir=.
3328     if test -f $ac_dir/$ac_word; then
3329       ac_cv_prog_CC="gcc"
3330       break
3331     fi
3332   done
3333   IFS="$ac_save_ifs"
3334 fi
3335 fi
3336 CC="$ac_cv_prog_CC"
3337 if test -n "$CC"; then
3338   echo "$ac_t""$CC" 1>&6
3339 else
3340   echo "$ac_t""no" 1>&6
3341 fi
3342
3343 if test -z "$CC"; then
3344   # Extract the first word of "cc", so it can be a program name with args.
3345 set dummy cc; ac_word=$2
3346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3347 echo "configure:3348: checking for $ac_word" >&5
3348 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   if test -n "$CC"; then
3352   ac_cv_prog_CC="$CC" # Let the user override the test.
3353 else
3354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3355   ac_prog_rejected=no
3356   ac_dummy="$PATH"
3357   for ac_dir in $ac_dummy; do
3358     test -z "$ac_dir" && ac_dir=.
3359     if test -f $ac_dir/$ac_word; then
3360       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3361         ac_prog_rejected=yes
3362         continue
3363       fi
3364       ac_cv_prog_CC="cc"
3365       break
3366     fi
3367   done
3368   IFS="$ac_save_ifs"
3369 if test $ac_prog_rejected = yes; then
3370   # We found a bogon in the path, so make sure we never use it.
3371   set dummy $ac_cv_prog_CC
3372   shift
3373   if test $# -gt 0; then
3374     # We chose a different compiler from the bogus one.
3375     # However, it has the same basename, so the bogon will be chosen
3376     # first if we set CC to just the basename; use the full file name.
3377     shift
3378     set dummy "$ac_dir/$ac_word" "$@"
3379     shift
3380     ac_cv_prog_CC="$@"
3381   fi
3382 fi
3383 fi
3384 fi
3385 CC="$ac_cv_prog_CC"
3386 if test -n "$CC"; then
3387   echo "$ac_t""$CC" 1>&6
3388 else
3389   echo "$ac_t""no" 1>&6
3390 fi
3391
3392   if test -z "$CC"; then
3393     case "`uname -s`" in
3394     *win32* | *WIN32* | *CYGWIN*)
3395       # Extract the first word of "cl", so it can be a program name with args.
3396 set dummy cl; ac_word=$2
3397 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3398 echo "configure:3399: checking for $ac_word" >&5
3399 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3400   echo $ac_n "(cached) $ac_c" 1>&6
3401 else
3402   if test -n "$CC"; then
3403   ac_cv_prog_CC="$CC" # Let the user override the test.
3404 else
3405   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3406   ac_dummy="$PATH"
3407   for ac_dir in $ac_dummy; do
3408     test -z "$ac_dir" && ac_dir=.
3409     if test -f $ac_dir/$ac_word; then
3410       ac_cv_prog_CC="cl"
3411       break
3412     fi
3413   done
3414   IFS="$ac_save_ifs"
3415 fi
3416 fi
3417 CC="$ac_cv_prog_CC"
3418 if test -n "$CC"; then
3419   echo "$ac_t""$CC" 1>&6
3420 else
3421   echo "$ac_t""no" 1>&6
3422 fi
3423  ;;
3424     esac
3425   fi
3426   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3427 fi
3428
3429 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3430 echo "configure:3431: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3431
3432 ac_ext=c
3433 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3434 ac_cpp='$CPP $CPPFLAGS'
3435 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3436 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3437 cross_compiling=$ac_cv_prog_cc_cross
3438
3439 cat > conftest.$ac_ext << EOF
3440
3441 #line 3442 "configure"
3442 #include "confdefs.h"
3443
3444 main(){return(0);}
3445 EOF
3446 if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3447   ac_cv_prog_cc_works=yes
3448   # If we can't run a trivial program, we are probably using a cross compiler.
3449   if (./conftest; exit) 2>/dev/null; then
3450     ac_cv_prog_cc_cross=no
3451   else
3452     ac_cv_prog_cc_cross=yes
3453   fi
3454 else
3455   echo "configure: failed program was:" >&5
3456   cat conftest.$ac_ext >&5
3457   ac_cv_prog_cc_works=no
3458 fi
3459 rm -fr conftest*
3460 ac_ext=c
3461 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3462 ac_cpp='$CPP $CPPFLAGS'
3463 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3464 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3465 cross_compiling=$ac_cv_prog_cc_cross
3466
3467 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3468 if test $ac_cv_prog_cc_works = no; then
3469   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3470 fi
3471 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3472 echo "configure:3473: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3473 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3474 cross_compiling=$ac_cv_prog_cc_cross
3475
3476 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3477 echo "configure:3478: checking whether we are using GNU C" >&5
3478 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.c <<EOF
3482 #ifdef __GNUC__
3483   yes;
3484 #endif
3485 EOF
3486 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3487   ac_cv_prog_gcc=yes
3488 else
3489   ac_cv_prog_gcc=no
3490 fi
3491 fi
3492
3493 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3494
3495 if test $ac_cv_prog_gcc = yes; then
3496   GCC=yes
3497 else
3498   GCC=
3499 fi
3500
3501 ac_test_CFLAGS="${CFLAGS+set}"
3502 ac_save_CFLAGS="$CFLAGS"
3503 CFLAGS=
3504 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3505 echo "configure:3506: checking whether ${CC-cc} accepts -g" >&5
3506 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3507   echo $ac_n "(cached) $ac_c" 1>&6
3508 else
3509   echo 'void f(){}' > conftest.c
3510 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3511   ac_cv_prog_cc_g=yes
3512 else
3513   ac_cv_prog_cc_g=no
3514 fi
3515 rm -f conftest*
3516
3517 fi
3518
3519 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3520 if test "$ac_test_CFLAGS" = set; then
3521   CFLAGS="$ac_save_CFLAGS"
3522 elif test $ac_cv_prog_cc_g = yes; then
3523   if test "$GCC" = yes; then
3524     CFLAGS="-g -O2"
3525   else
3526     CFLAGS="-g"
3527   fi
3528 else
3529   if test "$GCC" = yes; then
3530     CFLAGS="-O2"
3531   else
3532     CFLAGS=
3533   fi
3534 fi
3535
3536 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3537 if test "${with_gnu_ld+set}" = set; then
3538   withval="$with_gnu_ld"
3539   test "$withval" = no || with_gnu_ld=yes
3540 else
3541   with_gnu_ld=no
3542 fi
3543
3544 ac_prog=ld
3545 if test "$GCC" = yes; then
3546   # Check if gcc -print-prog-name=ld gives a path.
3547   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3548 echo "configure:3549: checking for ld used by GCC" >&5
3549   case $host in
3550   *-*-mingw*)
3551     # gcc leaves a trailing carriage return which upsets mingw
3552     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3553   *)
3554     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3555   esac
3556   case $ac_prog in
3557     # Accept absolute paths.
3558     [\\/]* | [A-Za-z]:[\\/]*)
3559       re_direlt='/[^/][^/]*/\.\./'
3560       # Canonicalize the path of ld
3561       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3562       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3563         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3564       done
3565       test -z "$LD" && LD="$ac_prog"
3566       ;;
3567   "")
3568     # If it fails, then pretend we aren't using GCC.
3569     ac_prog=ld
3570     ;;
3571   *)
3572     # If it is relative, then search for the first ld in PATH.
3573     with_gnu_ld=unknown
3574     ;;
3575   esac
3576 elif test "$with_gnu_ld" = yes; then
3577   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3578 echo "configure:3579: checking for GNU ld" >&5
3579 else
3580   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3581 echo "configure:3582: checking for non-GNU ld" >&5
3582 fi
3583 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3584   echo $ac_n "(cached) $ac_c" 1>&6
3585 else
3586   if test -z "$LD"; then
3587   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3588   for ac_dir in $PATH; do
3589     test -z "$ac_dir" && ac_dir=.
3590     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3591       lt_cv_path_LD="$ac_dir/$ac_prog"
3592       # Check to see if the program is GNU ld.  I'd rather use --version,
3593       # but apparently some GNU ld's only accept -v.
3594       # Break only if it was the GNU/non-GNU ld that we prefer.
3595       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3596         test "$with_gnu_ld" != no && break
3597       else
3598         test "$with_gnu_ld" != yes && break
3599       fi
3600     fi
3601   done
3602   IFS="$ac_save_ifs"
3603 else
3604   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3605 fi
3606 fi
3607
3608 LD="$lt_cv_path_LD"
3609 if test -n "$LD"; then
3610   echo "$ac_t""$LD" 1>&6
3611 else
3612   echo "$ac_t""no" 1>&6
3613 fi
3614 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3615 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3616 echo "configure:3617: checking if the linker ($LD) is GNU ld" >&5
3617 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3618   echo $ac_n "(cached) $ac_c" 1>&6
3619 else
3620   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3621 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3622   lt_cv_prog_gnu_ld=yes
3623 else
3624   lt_cv_prog_gnu_ld=no
3625 fi
3626 fi
3627
3628 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3629 with_gnu_ld=$lt_cv_prog_gnu_ld
3630
3631
3632 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3633 echo "configure:3634: checking for $LD option to reload object files" >&5
3634 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3635   echo $ac_n "(cached) $ac_c" 1>&6
3636 else
3637   lt_cv_ld_reload_flag='-r'
3638 fi
3639
3640 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3641 reload_flag=$lt_cv_ld_reload_flag
3642 test -n "$reload_flag" && reload_flag=" $reload_flag"
3643
3644 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3645 echo "configure:3646: checking for BSD-compatible nm" >&5
3646 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3647   echo $ac_n "(cached) $ac_c" 1>&6
3648 else
3649   if test -n "$NM"; then
3650   # Let the user override the test.
3651   lt_cv_path_NM="$NM"
3652 else
3653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3654   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3655     test -z "$ac_dir" && ac_dir=.
3656     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3657     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3658       # Check to see if the nm accepts a BSD-compat flag.
3659       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3660       #   nm: unknown option "B" ignored
3661       # Tru64's nm complains that /dev/null is an invalid object file
3662       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3663         lt_cv_path_NM="$tmp_nm -B"
3664         break
3665       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3666         lt_cv_path_NM="$tmp_nm -p"
3667         break
3668       else
3669         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3670         continue # so that we can try to find one that supports BSD flags
3671       fi
3672     fi
3673   done
3674   IFS="$ac_save_ifs"
3675   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3676 fi
3677 fi
3678
3679 NM="$lt_cv_path_NM"
3680 echo "$ac_t""$NM" 1>&6
3681
3682 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3683 echo "configure:3684: checking for a sed that does not truncate output" >&5
3684 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   # Loop through the user's path and test for sed and gsed.
3688 # Then use that list of sed's as ones to test for truncation.
3689 as_executable_p="test -f"
3690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691 for as_dir in $PATH
3692 do
3693   IFS=$as_save_IFS
3694   test -z "$as_dir" && as_dir=.
3695   for ac_prog in sed gsed; do
3696     for ac_exec_ext in '' $ac_executable_extensions; do
3697       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3698         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3699       fi
3700     done
3701   done
3702 done
3703
3704   # Create a temporary directory, and hook for its removal unless debugging.
3705 $debug ||
3706 {
3707   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3708   trap '{ (exit 1); exit 1; }' 1 2 13 15
3709 }
3710
3711 # Create a (secure) tmp directory for tmp files.
3712 : ${TMPDIR=/tmp}
3713 {
3714   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3715   test -n "$tmp" && test -d "$tmp"
3716 }  ||
3717 {
3718   tmp=$TMPDIR/sed$$-$RANDOM
3719   (umask 077 && mkdir $tmp)
3720 } ||
3721 {
3722    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3723    { (exit 1); exit 1; }
3724 }
3725   _max=0
3726   _count=0
3727   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3728   # along with /bin/sed that truncates output.
3729   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3730     test ! -f ${_sed} && break
3731     cat /dev/null > "$tmp/sed.in"
3732     _count=0
3733     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3734     # Check for GNU sed and select it if it is found.
3735     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3736       lt_cv_path_SED=${_sed}
3737       break
3738     fi
3739     while true; do
3740       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3741       mv "$tmp/sed.tmp" "$tmp/sed.in"
3742       cp "$tmp/sed.in" "$tmp/sed.nl"
3743       echo >>"$tmp/sed.nl"
3744       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3745       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3746       # 40000 chars as input seems more than enough
3747       test $_count -gt 10 && break
3748       _count=`expr $_count + 1`
3749       if test $_count -gt $_max; then
3750         _max=$_count
3751         lt_cv_path_SED=$_sed
3752       fi
3753     done
3754   done
3755   rm -rf "$tmp"
3756
3757 fi
3758
3759 if test "X$SED" != "X"; then
3760   lt_cv_path_SED=$SED
3761 else
3762   SED=$lt_cv_path_SED
3763 fi
3764 echo "$ac_t""$SED" 1>&6
3765
3766 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3767 echo "configure:3768: checking whether ln -s works" >&5
3768 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3769   echo $ac_n "(cached) $ac_c" 1>&6
3770 else
3771   rm -f conftestdata
3772 if ln -s X conftestdata 2>/dev/null
3773 then
3774   rm -f conftestdata
3775   ac_cv_prog_LN_S="ln -s"
3776 else
3777   ac_cv_prog_LN_S=ln
3778 fi
3779 fi
3780 LN_S="$ac_cv_prog_LN_S"
3781 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3782   echo "$ac_t""yes" 1>&6
3783 else
3784   echo "$ac_t""no" 1>&6
3785 fi
3786
3787 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3788 echo "configure:3789: checking how to recognise dependent libraries" >&5
3789 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   lt_cv_file_magic_cmd='$MAGIC_CMD'
3793 lt_cv_file_magic_test_file=
3794 lt_cv_deplibs_check_method='unknown'
3795 # Need to set the preceding variable on all platforms that support
3796 # interlibrary dependencies.
3797 # 'none' -- dependencies not supported.
3798 # `unknown' -- same as none, but documents that we really don't know.
3799 # 'pass_all' -- all dependencies passed with no checks.
3800 # 'test_compile' -- check by making test program.
3801 # 'file_magic [[regex]]' -- check by looking for files in library path
3802 # which responds to the $file_magic_cmd with a given egrep regex.
3803 # If you have `file' or equivalent on your system and you're not sure
3804 # whether `pass_all' will *always* work, you probably want this one.
3805
3806 case $host_os in
3807 aix4* | aix5*)
3808   lt_cv_deplibs_check_method=pass_all
3809   ;;
3810
3811 beos*)
3812   lt_cv_deplibs_check_method=pass_all
3813   ;;
3814
3815 bsdi4*)
3816   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3817   lt_cv_file_magic_cmd='/usr/bin/file -L'
3818   lt_cv_file_magic_test_file=/shlib/libc.so
3819   ;;
3820
3821 cygwin* | mingw* | pw32*)
3822   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3823   lt_cv_file_magic_cmd='$OBJDUMP -f'
3824   ;;
3825
3826 darwin* | rhapsody*)
3827   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3828   lt_cv_file_magic_cmd='/usr/bin/file -L'
3829   case "$host_os" in
3830   rhapsody* | darwin1.[012])
3831     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3832     ;;
3833   *) # Darwin 1.3 on
3834     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3835     ;;
3836   esac
3837   ;;
3838
3839 freebsd*)
3840   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3841     case $host_cpu in
3842     i*86 )
3843       # Not sure whether the presence of OpenBSD here was a mistake.
3844       # Let's accept both of them until this is cleared up.
3845       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3846       lt_cv_file_magic_cmd=/usr/bin/file
3847       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3848       ;;
3849     esac
3850   else
3851     lt_cv_deplibs_check_method=pass_all
3852   fi
3853   ;;
3854
3855 gnu*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 hpux10.20*|hpux11*)
3860   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3861   lt_cv_file_magic_cmd=/usr/bin/file
3862   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3863   ;;
3864
3865 irix5* | irix6* | nonstopux*)
3866   case $host_os in
3867   irix5* | nonstopux*)
3868     # this will be overridden with pass_all, but let us keep it just in case
3869     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3870     ;;
3871   *)
3872     case $LD in
3873     *-32|*"-32 ") libmagic=32-bit;;
3874     *-n32|*"-n32 ") libmagic=N32;;
3875     *-64|*"-64 ") libmagic=64-bit;;
3876     *) libmagic=never-match;;
3877     esac
3878     # this will be overridden with pass_all, but let us keep it just in case
3879     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3880     ;;
3881   esac
3882   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3883   lt_cv_deplibs_check_method=pass_all
3884   ;;
3885
3886 # This must be Linux ELF.
3887 linux-gnu*)
3888   case $host_cpu in
3889   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3890     lt_cv_deplibs_check_method=pass_all ;;
3891   *)
3892     # glibc up to 2.1.1 does not perform some relocations on ARM
3893     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3894   esac
3895   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3896   ;;
3897
3898 netbsd*)
3899   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3900     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3901   else
3902     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3903   fi
3904   ;;
3905
3906 newos6*)
3907   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3908   lt_cv_file_magic_cmd=/usr/bin/file
3909   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3910   ;;
3911
3912 openbsd*)
3913   lt_cv_file_magic_cmd=/usr/bin/file
3914   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3915   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3916     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3917   else
3918     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3919   fi
3920   ;;
3921
3922 openedition*)
3923   lt_cv_deplibs_check_method=pass_all
3924   ;;
3925
3926 osf3* | osf4* | osf5*)
3927   # this will be overridden with pass_all, but let us keep it just in case
3928   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3929   lt_cv_file_magic_test_file=/shlib/libc.so
3930   lt_cv_deplibs_check_method=pass_all
3931   ;;
3932
3933 sco3.2v5*)
3934   lt_cv_deplibs_check_method=pass_all
3935   ;;
3936
3937 solaris*)
3938   lt_cv_deplibs_check_method=pass_all
3939   lt_cv_file_magic_test_file=/lib/libc.so
3940   ;;
3941
3942 sysv5uw[78]* | sysv4*uw2*)
3943   lt_cv_deplibs_check_method=pass_all
3944   ;;
3945
3946 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3947   case $host_vendor in
3948   motorola)
3949     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]'
3950     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3951     ;;
3952   ncr)
3953     lt_cv_deplibs_check_method=pass_all
3954     ;;
3955   sequent)
3956     lt_cv_file_magic_cmd='/bin/file'
3957     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3958     ;;
3959   sni)
3960     lt_cv_file_magic_cmd='/bin/file'
3961     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3962     lt_cv_file_magic_test_file=/lib/libc.so
3963     ;;
3964   siemens)
3965     lt_cv_deplibs_check_method=pass_all
3966     ;;
3967   esac
3968   ;;
3969 esac
3970
3971 fi
3972
3973 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3974 file_magic_cmd=$lt_cv_file_magic_cmd
3975 deplibs_check_method=$lt_cv_deplibs_check_method
3976
3977 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3978 echo "configure:3979: checking for object suffix" >&5
3979 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3980   echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982   rm -f conftest*
3983 echo 'int i = 1;' > conftest.$ac_ext
3984 if { (eval echo configure:3985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3985   for ac_file in conftest.*; do
3986     case $ac_file in
3987     *.c) ;;
3988     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3989     esac
3990   done
3991 else
3992   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3993 fi
3994 rm -f conftest*
3995 fi
3996
3997 echo "$ac_t""$ac_cv_objext" 1>&6
3998 OBJEXT=$ac_cv_objext
3999 ac_objext=$ac_cv_objext
4000
4001
4002
4003
4004 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4005 echo "configure:4006: checking for executable suffix" >&5
4006 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4007   echo $ac_n "(cached) $ac_c" 1>&6
4008 else
4009   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4010   ac_cv_exeext=.exe
4011 else
4012   rm -f conftest*
4013   echo 'int main () { return 0; }' > conftest.$ac_ext
4014   ac_cv_exeext=
4015   if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4016     for file in conftest.*; do
4017       case $file in
4018       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4019       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4020       esac
4021     done
4022   else
4023     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4024   fi
4025   rm -f conftest*
4026   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4027 fi
4028 fi
4029
4030 EXEEXT=""
4031 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4032 echo "$ac_t""${ac_cv_exeext}" 1>&6
4033 ac_exeext=$EXEEXT
4034
4035 if test $host != $build; then
4036   ac_tool_prefix=${host_alias}-
4037 else
4038   ac_tool_prefix=
4039 fi
4040
4041
4042
4043
4044 # Check for command to grab the raw symbol name followed by C symbol from nm.
4045 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4046 echo "configure:4047: checking command to parse $NM output" >&5
4047 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4048   echo $ac_n "(cached) $ac_c" 1>&6
4049 else
4050   
4051 # These are sane defaults that work on at least a few old systems.
4052 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4053
4054 # Character class describing NM global symbol codes.
4055 symcode='[BCDEGRST]'
4056
4057 # Regexp to match symbols that can be accessed directly from C.
4058 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4059
4060 # Transform the above into a raw symbol and a C symbol.
4061 symxfrm='\1 \2\3 \3'
4062
4063 # Transform an extracted symbol line into a proper C declaration
4064 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4065
4066 # Transform an extracted symbol line into symbol name and symbol address
4067 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4068
4069 # Define system-specific variables.
4070 case $host_os in
4071 aix*)
4072   symcode='[BCDT]'
4073   ;;
4074 cygwin* | mingw* | pw32*)
4075   symcode='[ABCDGISTW]'
4076   ;;
4077 hpux*) # Its linker distinguishes data from code symbols
4078   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4079   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'"
4080   ;;
4081 irix* | nonstopux*)
4082   symcode='[BCDEGRST]'
4083   ;;
4084 osf*)
4085   symcode='[BCDEGQRST]'
4086   ;;
4087 solaris* | sysv5*)
4088   symcode='[BDT]'
4089   ;;
4090 sysv4)
4091   symcode='[DFNSTU]'
4092   ;;
4093 esac
4094
4095 # Handle CRLF in mingw tool chain
4096 opt_cr=
4097 case $host_os in
4098 mingw*)
4099   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4100   ;;
4101 esac
4102
4103 # If we're using GNU nm, then use its standard symbol codes.
4104 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4105   symcode='[ABCDGISTW]'
4106 fi
4107
4108 # Try without a prefix undercore, then with it.
4109 for ac_symprfx in "" "_"; do
4110
4111   # Write the raw and C identifiers.
4112 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4113
4114   # Check to see that the pipe works correctly.
4115   pipe_works=no
4116   rm -f conftest*
4117   cat > conftest.$ac_ext <<EOF
4118 #ifdef __cplusplus
4119 extern "C" {
4120 #endif
4121 char nm_test_var;
4122 void nm_test_func(){}
4123 #ifdef __cplusplus
4124 }
4125 #endif
4126 int main(){nm_test_var='a';nm_test_func();return(0);}
4127 EOF
4128
4129   if { (eval echo configure:4130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4130     # Now try to grab the symbols.
4131     nlist=conftest.nm
4132     if { (eval echo configure:4133: \"$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
4133       # Try sorting and uniquifying the output.
4134       if sort "$nlist" | uniq > "$nlist"T; then
4135         mv -f "$nlist"T "$nlist"
4136       else
4137         rm -f "$nlist"T
4138       fi
4139
4140       # Make sure that we snagged all the symbols we need.
4141       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4142         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4143           cat <<EOF > conftest.$ac_ext
4144 #ifdef __cplusplus
4145 extern "C" {
4146 #endif
4147
4148 EOF
4149           # Now generate the symbol file.
4150           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4151
4152           cat <<EOF >> conftest.$ac_ext
4153 #if defined (__STDC__) && __STDC__
4154 # define lt_ptr void *
4155 #else
4156 # define lt_ptr char *
4157 # define const
4158 #endif
4159
4160 /* The mapping between symbol names and symbols. */
4161 const struct {
4162   const char *name;
4163   lt_ptr address;
4164 }
4165 lt_preloaded_symbols[] =
4166 {
4167 EOF
4168           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4169           cat <<\EOF >> conftest.$ac_ext
4170   {0, (lt_ptr) 0}
4171 };
4172
4173 #ifdef __cplusplus
4174 }
4175 #endif
4176 EOF
4177           # Now try linking the two files.
4178           mv conftest.$ac_objext conftstm.$ac_objext
4179           save_LIBS="$LIBS"
4180           save_CFLAGS="$CFLAGS"
4181           LIBS="conftstm.$ac_objext"
4182           CFLAGS="$CFLAGS$no_builtin_flag"
4183           if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4184             pipe_works=yes
4185           fi
4186           LIBS="$save_LIBS"
4187           CFLAGS="$save_CFLAGS"
4188         else
4189           echo "cannot find nm_test_func in $nlist" >&5
4190         fi
4191       else
4192         echo "cannot find nm_test_var in $nlist" >&5
4193       fi
4194     else
4195       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4196     fi
4197   else
4198     echo "$progname: failed program was:" >&5
4199     cat conftest.$ac_ext >&5
4200   fi
4201   rm -f conftest* conftst*
4202
4203   # Do not use the global_symbol_pipe unless it works.
4204   if test "$pipe_works" = yes; then
4205     break
4206   else
4207     lt_cv_sys_global_symbol_pipe=
4208   fi
4209 done
4210
4211 fi
4212
4213 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4214 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4215   global_symbol_to_cdecl=
4216   global_symbol_to_c_name_address=
4217 else
4218   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4219   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4220 fi
4221 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4222 then
4223   echo "$ac_t""failed" 1>&6
4224 else
4225   echo "$ac_t""ok" 1>&6
4226 fi
4227
4228 for ac_hdr in dlfcn.h
4229 do
4230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4232 echo "configure:4233: checking for $ac_hdr" >&5
4233 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   cat > conftest.$ac_ext <<EOF
4237 #line 4238 "configure"
4238 #include "confdefs.h"
4239 #include <$ac_hdr>
4240 EOF
4241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4242 { (eval echo configure:4243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4244 if test -z "$ac_err"; then
4245   rm -rf conftest*
4246   eval "ac_cv_header_$ac_safe=yes"
4247 else
4248   echo "$ac_err" >&5
4249   echo "configure: failed program was:" >&5
4250   cat conftest.$ac_ext >&5
4251   rm -rf conftest*
4252   eval "ac_cv_header_$ac_safe=no"
4253 fi
4254 rm -f conftest*
4255 fi
4256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4257   echo "$ac_t""yes" 1>&6
4258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4259   cat >> confdefs.h <<EOF
4260 #define $ac_tr_hdr 1
4261 EOF
4262  
4263 else
4264   echo "$ac_t""no" 1>&6
4265 fi
4266 done
4267
4268
4269
4270
4271
4272
4273 # Only perform the check for file, if the check method requires it
4274 case $deplibs_check_method in
4275 file_magic*)
4276   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4277     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4278 echo "configure:4279: checking for ${ac_tool_prefix}file" >&5
4279 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4280   echo $ac_n "(cached) $ac_c" 1>&6
4281 else
4282   case $MAGIC_CMD in
4283   /*)
4284   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4285   ;;
4286   ?:/*)
4287   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4288   ;;
4289   *)
4290   ac_save_MAGIC_CMD="$MAGIC_CMD"
4291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4292   ac_dummy="/usr/bin:$PATH"
4293   for ac_dir in $ac_dummy; do
4294     test -z "$ac_dir" && ac_dir=.
4295     if test -f $ac_dir/${ac_tool_prefix}file; then
4296       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4297       if test -n "$file_magic_test_file"; then
4298         case $deplibs_check_method in
4299         "file_magic "*)
4300           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4301           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4302           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4303             egrep "$file_magic_regex" > /dev/null; then
4304             :
4305           else
4306             cat <<EOF 1>&2
4307
4308 *** Warning: the command libtool uses to detect shared libraries,
4309 *** $file_magic_cmd, produces output that libtool cannot recognize.
4310 *** The result is that libtool may fail to recognize shared libraries
4311 *** as such.  This will affect the creation of libtool libraries that
4312 *** depend on shared libraries, but programs linked with such libtool
4313 *** libraries will work regardless of this problem.  Nevertheless, you
4314 *** may want to report the problem to your system manager and/or to
4315 *** bug-libtool@gnu.org
4316
4317 EOF
4318           fi ;;
4319         esac
4320       fi
4321       break
4322     fi
4323   done
4324   IFS="$ac_save_ifs"
4325   MAGIC_CMD="$ac_save_MAGIC_CMD"
4326   ;;
4327 esac
4328 fi
4329
4330 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4331 if test -n "$MAGIC_CMD"; then
4332   echo "$ac_t""$MAGIC_CMD" 1>&6
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336
4337 if test -z "$lt_cv_path_MAGIC_CMD"; then
4338   if test -n "$ac_tool_prefix"; then
4339     echo $ac_n "checking for file""... $ac_c" 1>&6
4340 echo "configure:4341: checking for file" >&5
4341 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4342   echo $ac_n "(cached) $ac_c" 1>&6
4343 else
4344   case $MAGIC_CMD in
4345   /*)
4346   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4347   ;;
4348   ?:/*)
4349   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4350   ;;
4351   *)
4352   ac_save_MAGIC_CMD="$MAGIC_CMD"
4353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4354   ac_dummy="/usr/bin:$PATH"
4355   for ac_dir in $ac_dummy; do
4356     test -z "$ac_dir" && ac_dir=.
4357     if test -f $ac_dir/file; then
4358       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4359       if test -n "$file_magic_test_file"; then
4360         case $deplibs_check_method in
4361         "file_magic "*)
4362           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4363           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4364           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4365             egrep "$file_magic_regex" > /dev/null; then
4366             :
4367           else
4368             cat <<EOF 1>&2
4369
4370 *** Warning: the command libtool uses to detect shared libraries,
4371 *** $file_magic_cmd, produces output that libtool cannot recognize.
4372 *** The result is that libtool may fail to recognize shared libraries
4373 *** as such.  This will affect the creation of libtool libraries that
4374 *** depend on shared libraries, but programs linked with such libtool
4375 *** libraries will work regardless of this problem.  Nevertheless, you
4376 *** may want to report the problem to your system manager and/or to
4377 *** bug-libtool@gnu.org
4378
4379 EOF
4380           fi ;;
4381         esac
4382       fi
4383       break
4384     fi
4385   done
4386   IFS="$ac_save_ifs"
4387   MAGIC_CMD="$ac_save_MAGIC_CMD"
4388   ;;
4389 esac
4390 fi
4391
4392 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4393 if test -n "$MAGIC_CMD"; then
4394   echo "$ac_t""$MAGIC_CMD" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399   else
4400     MAGIC_CMD=:
4401   fi
4402 fi
4403
4404   fi
4405   ;;
4406 esac
4407
4408 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4409 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4411 echo "configure:4412: checking for $ac_word" >&5
4412 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4413   echo $ac_n "(cached) $ac_c" 1>&6
4414 else
4415   if test -n "$RANLIB"; then
4416   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4417 else
4418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4419   ac_dummy="$PATH"
4420   for ac_dir in $ac_dummy; do
4421     test -z "$ac_dir" && ac_dir=.
4422     if test -f $ac_dir/$ac_word; then
4423       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4424       break
4425     fi
4426   done
4427   IFS="$ac_save_ifs"
4428 fi
4429 fi
4430 RANLIB="$ac_cv_prog_RANLIB"
4431 if test -n "$RANLIB"; then
4432   echo "$ac_t""$RANLIB" 1>&6
4433 else
4434   echo "$ac_t""no" 1>&6
4435 fi
4436
4437
4438 if test -z "$ac_cv_prog_RANLIB"; then
4439 if test -n "$ac_tool_prefix"; then
4440   # Extract the first word of "ranlib", so it can be a program name with args.
4441 set dummy ranlib; ac_word=$2
4442 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4443 echo "configure:4444: checking for $ac_word" >&5
4444 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4445   echo $ac_n "(cached) $ac_c" 1>&6
4446 else
4447   if test -n "$RANLIB"; then
4448   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4449 else
4450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4451   ac_dummy="$PATH"
4452   for ac_dir in $ac_dummy; do
4453     test -z "$ac_dir" && ac_dir=.
4454     if test -f $ac_dir/$ac_word; then
4455       ac_cv_prog_RANLIB="ranlib"
4456       break
4457     fi
4458   done
4459   IFS="$ac_save_ifs"
4460   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4461 fi
4462 fi
4463 RANLIB="$ac_cv_prog_RANLIB"
4464 if test -n "$RANLIB"; then
4465   echo "$ac_t""$RANLIB" 1>&6
4466 else
4467   echo "$ac_t""no" 1>&6
4468 fi
4469
4470 else
4471   RANLIB=":"
4472 fi
4473 fi
4474
4475 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4476 set dummy ${ac_tool_prefix}strip; ac_word=$2
4477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4478 echo "configure:4479: checking for $ac_word" >&5
4479 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4480   echo $ac_n "(cached) $ac_c" 1>&6
4481 else
4482   if test -n "$STRIP"; then
4483   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4484 else
4485   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4486   ac_dummy="$PATH"
4487   for ac_dir in $ac_dummy; do
4488     test -z "$ac_dir" && ac_dir=.
4489     if test -f $ac_dir/$ac_word; then
4490       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4491       break
4492     fi
4493   done
4494   IFS="$ac_save_ifs"
4495 fi
4496 fi
4497 STRIP="$ac_cv_prog_STRIP"
4498 if test -n "$STRIP"; then
4499   echo "$ac_t""$STRIP" 1>&6
4500 else
4501   echo "$ac_t""no" 1>&6
4502 fi
4503
4504
4505 if test -z "$ac_cv_prog_STRIP"; then
4506 if test -n "$ac_tool_prefix"; then
4507   # Extract the first word of "strip", so it can be a program name with args.
4508 set dummy strip; ac_word=$2
4509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4510 echo "configure:4511: checking for $ac_word" >&5
4511 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4512   echo $ac_n "(cached) $ac_c" 1>&6
4513 else
4514   if test -n "$STRIP"; then
4515   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4516 else
4517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4518   ac_dummy="$PATH"
4519   for ac_dir in $ac_dummy; do
4520     test -z "$ac_dir" && ac_dir=.
4521     if test -f $ac_dir/$ac_word; then
4522       ac_cv_prog_STRIP="strip"
4523       break
4524     fi
4525   done
4526   IFS="$ac_save_ifs"
4527   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4528 fi
4529 fi
4530 STRIP="$ac_cv_prog_STRIP"
4531 if test -n "$STRIP"; then
4532   echo "$ac_t""$STRIP" 1>&6
4533 else
4534   echo "$ac_t""no" 1>&6
4535 fi
4536
4537 else
4538   STRIP=":"
4539 fi
4540 fi
4541
4542
4543 enable_dlopen=yes
4544 enable_win32_dll=yes
4545
4546 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4547 if test "${enable_libtool_lock+set}" = set; then
4548   enableval="$enable_libtool_lock"
4549   :
4550 fi
4551
4552 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4553
4554 # Some flags need to be propagated to the compiler or linker for good
4555 # libtool support.
4556 case $host in
4557 *-*-irix6*)
4558   # Find out which ABI we are using.
4559   echo '#line 4560 "configure"' > conftest.$ac_ext
4560   if { (eval echo configure:4561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4561     case `/usr/bin/file conftest.$ac_objext` in
4562     *32-bit*)
4563       LD="${LD-ld} -32"
4564       ;;
4565     *N32*)
4566       LD="${LD-ld} -n32"
4567       ;;
4568     *64-bit*)
4569       LD="${LD-ld} -64"
4570       ;;
4571     esac
4572   fi
4573   rm -rf conftest*
4574   ;;
4575
4576 *-*-sco3.2v5*)
4577   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4578   SAVE_CFLAGS="$CFLAGS"
4579   CFLAGS="$CFLAGS -belf"
4580   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4581 echo "configure:4582: checking whether the C compiler needs -belf" >&5
4582 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4583   echo $ac_n "(cached) $ac_c" 1>&6
4584 else
4585   
4586      ac_ext=c
4587 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4588 ac_cpp='$CPP $CPPFLAGS'
4589 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4590 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4591 cross_compiling=$ac_cv_prog_cc_cross
4592
4593      cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596
4597 int main() {
4598
4599 ; return 0; }
4600 EOF
4601 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4602   rm -rf conftest*
4603   lt_cv_cc_needs_belf=yes
4604 else
4605   echo "configure: failed program was:" >&5
4606   cat conftest.$ac_ext >&5
4607   rm -rf conftest*
4608   lt_cv_cc_needs_belf=no
4609 fi
4610 rm -f conftest*
4611      ac_ext=c
4612 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4613 ac_cpp='$CPP $CPPFLAGS'
4614 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4615 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4616 cross_compiling=$ac_cv_prog_cc_cross
4617
4618 fi
4619
4620 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4621   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4622     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4623     CFLAGS="$SAVE_CFLAGS"
4624   fi
4625   ;;
4626
4627 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4628   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4629 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4631 echo "configure:4632: checking for $ac_word" >&5
4632 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4633   echo $ac_n "(cached) $ac_c" 1>&6
4634 else
4635   if test -n "$DLLTOOL"; then
4636   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4637 else
4638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4639   ac_dummy="$PATH"
4640   for ac_dir in $ac_dummy; do
4641     test -z "$ac_dir" && ac_dir=.
4642     if test -f $ac_dir/$ac_word; then
4643       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4644       break
4645     fi
4646   done
4647   IFS="$ac_save_ifs"
4648 fi
4649 fi
4650 DLLTOOL="$ac_cv_prog_DLLTOOL"
4651 if test -n "$DLLTOOL"; then
4652   echo "$ac_t""$DLLTOOL" 1>&6
4653 else
4654   echo "$ac_t""no" 1>&6
4655 fi
4656
4657
4658 if test -z "$ac_cv_prog_DLLTOOL"; then
4659 if test -n "$ac_tool_prefix"; then
4660   # Extract the first word of "dlltool", so it can be a program name with args.
4661 set dummy dlltool; ac_word=$2
4662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4663 echo "configure:4664: checking for $ac_word" >&5
4664 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4665   echo $ac_n "(cached) $ac_c" 1>&6
4666 else
4667   if test -n "$DLLTOOL"; then
4668   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4669 else
4670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4671   ac_dummy="$PATH"
4672   for ac_dir in $ac_dummy; do
4673     test -z "$ac_dir" && ac_dir=.
4674     if test -f $ac_dir/$ac_word; then
4675       ac_cv_prog_DLLTOOL="dlltool"
4676       break
4677     fi
4678   done
4679   IFS="$ac_save_ifs"
4680   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4681 fi
4682 fi
4683 DLLTOOL="$ac_cv_prog_DLLTOOL"
4684 if test -n "$DLLTOOL"; then
4685   echo "$ac_t""$DLLTOOL" 1>&6
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689
4690 else
4691   DLLTOOL="false"
4692 fi
4693 fi
4694
4695   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4696 set dummy ${ac_tool_prefix}as; ac_word=$2
4697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4698 echo "configure:4699: checking for $ac_word" >&5
4699 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4700   echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702   if test -n "$AS"; then
4703   ac_cv_prog_AS="$AS" # Let the user override the test.
4704 else
4705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4706   ac_dummy="$PATH"
4707   for ac_dir in $ac_dummy; do
4708     test -z "$ac_dir" && ac_dir=.
4709     if test -f $ac_dir/$ac_word; then
4710       ac_cv_prog_AS="${ac_tool_prefix}as"
4711       break
4712     fi
4713   done
4714   IFS="$ac_save_ifs"
4715 fi
4716 fi
4717 AS="$ac_cv_prog_AS"
4718 if test -n "$AS"; then
4719   echo "$ac_t""$AS" 1>&6
4720 else
4721   echo "$ac_t""no" 1>&6
4722 fi
4723
4724
4725 if test -z "$ac_cv_prog_AS"; then
4726 if test -n "$ac_tool_prefix"; then
4727   # Extract the first word of "as", so it can be a program name with args.
4728 set dummy as; ac_word=$2
4729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4730 echo "configure:4731: checking for $ac_word" >&5
4731 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4732   echo $ac_n "(cached) $ac_c" 1>&6
4733 else
4734   if test -n "$AS"; then
4735   ac_cv_prog_AS="$AS" # Let the user override the test.
4736 else
4737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4738   ac_dummy="$PATH"
4739   for ac_dir in $ac_dummy; do
4740     test -z "$ac_dir" && ac_dir=.
4741     if test -f $ac_dir/$ac_word; then
4742       ac_cv_prog_AS="as"
4743       break
4744     fi
4745   done
4746   IFS="$ac_save_ifs"
4747   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4748 fi
4749 fi
4750 AS="$ac_cv_prog_AS"
4751 if test -n "$AS"; then
4752   echo "$ac_t""$AS" 1>&6
4753 else
4754   echo "$ac_t""no" 1>&6
4755 fi
4756
4757 else
4758   AS="false"
4759 fi
4760 fi
4761
4762   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4763 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4764 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4765 echo "configure:4766: checking for $ac_word" >&5
4766 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4767   echo $ac_n "(cached) $ac_c" 1>&6
4768 else
4769   if test -n "$OBJDUMP"; then
4770   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4771 else
4772   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4773   ac_dummy="$PATH"
4774   for ac_dir in $ac_dummy; do
4775     test -z "$ac_dir" && ac_dir=.
4776     if test -f $ac_dir/$ac_word; then
4777       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4778       break
4779     fi
4780   done
4781   IFS="$ac_save_ifs"
4782 fi
4783 fi
4784 OBJDUMP="$ac_cv_prog_OBJDUMP"
4785 if test -n "$OBJDUMP"; then
4786   echo "$ac_t""$OBJDUMP" 1>&6
4787 else
4788   echo "$ac_t""no" 1>&6
4789 fi
4790
4791
4792 if test -z "$ac_cv_prog_OBJDUMP"; then
4793 if test -n "$ac_tool_prefix"; then
4794   # Extract the first word of "objdump", so it can be a program name with args.
4795 set dummy objdump; ac_word=$2
4796 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4797 echo "configure:4798: checking for $ac_word" >&5
4798 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4799   echo $ac_n "(cached) $ac_c" 1>&6
4800 else
4801   if test -n "$OBJDUMP"; then
4802   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4803 else
4804   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4805   ac_dummy="$PATH"
4806   for ac_dir in $ac_dummy; do
4807     test -z "$ac_dir" && ac_dir=.
4808     if test -f $ac_dir/$ac_word; then
4809       ac_cv_prog_OBJDUMP="objdump"
4810       break
4811     fi
4812   done
4813   IFS="$ac_save_ifs"
4814   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4815 fi
4816 fi
4817 OBJDUMP="$ac_cv_prog_OBJDUMP"
4818 if test -n "$OBJDUMP"; then
4819   echo "$ac_t""$OBJDUMP" 1>&6
4820 else
4821   echo "$ac_t""no" 1>&6
4822 fi
4823
4824 else
4825   OBJDUMP="false"
4826 fi
4827 fi
4828
4829
4830   # recent cygwin and mingw systems supply a stub DllMain which the user
4831   # can override, but on older systems we have to supply one
4832   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4833 echo "configure:4834: checking if libtool should supply DllMain function" >&5
4834 if eval "test \"\${lt_cv_need_dllmain+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 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4843       DllMain (0, 0, 0);
4844 ; return 0; }
4845 EOF
4846 if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4847   rm -rf conftest*
4848   lt_cv_need_dllmain=no
4849 else
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   lt_cv_need_dllmain=yes
4854 fi
4855 rm -f conftest*
4856 fi
4857
4858 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4859
4860   case $host/$CC in
4861   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4862     # old mingw systems require "-dll" to link a DLL, while more recent ones
4863     # require "-mdll"
4864     SAVE_CFLAGS="$CFLAGS"
4865     CFLAGS="$CFLAGS -mdll"
4866     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4867 echo "configure:4868: checking how to link DLLs" >&5
4868 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874
4875 int main() {
4876
4877 ; return 0; }
4878 EOF
4879 if { (eval echo configure:4880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4880   rm -rf conftest*
4881   lt_cv_cc_dll_switch=-mdll
4882 else
4883   echo "configure: failed program was:" >&5
4884   cat conftest.$ac_ext >&5
4885   rm -rf conftest*
4886   lt_cv_cc_dll_switch=-dll
4887 fi
4888 rm -f conftest*
4889 fi
4890
4891 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4892     CFLAGS="$SAVE_CFLAGS" ;;
4893   *-*-cygwin* | *-*-pw32*)
4894     # cygwin systems need to pass --dll to the linker, and not link
4895     # crt.o which will require a WinMain@16 definition.
4896     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4897   esac
4898   ;;
4899   
4900 esac
4901
4902 # Sed substitution that helps us do robust quoting.  It backslashifies
4903 # metacharacters that are still active within double-quoted strings.
4904 Xsed='sed -e s/^X//'
4905 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4906
4907 # Same as above, but do not quote variable references.
4908 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4909
4910 # Sed substitution to delay expansion of an escaped shell variable in a
4911 # double_quote_subst'ed string.
4912 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4913
4914 # Constants:
4915 rm="rm -f"
4916
4917 # Global variables:
4918 default_ofile=libtool
4919 can_build_shared=yes
4920
4921 # All known linkers require a `.a' archive for static linking (except M$VC,
4922 # which needs '.lib').
4923 libext=a
4924 ltmain="$ac_aux_dir/ltmain.sh"
4925 ofile="$default_ofile"
4926 with_gnu_ld="$lt_cv_prog_gnu_ld"
4927 need_locks="$enable_libtool_lock"
4928
4929 old_CC="$CC"
4930 old_CFLAGS="$CFLAGS"
4931
4932 # Set sane defaults for various variables
4933 test -z "$AR" && AR=ar
4934 test -z "$AR_FLAGS" && AR_FLAGS=cru
4935 test -z "$AS" && AS=as
4936 test -z "$CC" && CC=cc
4937 test -z "$DLLTOOL" && DLLTOOL=dlltool
4938 test -z "$LD" && LD=ld
4939 test -z "$LN_S" && LN_S="ln -s"
4940 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4941 test -z "$NM" && NM=nm
4942 test -z "$OBJDUMP" && OBJDUMP=objdump
4943 test -z "$RANLIB" && RANLIB=:
4944 test -z "$STRIP" && STRIP=:
4945 test -z "$ac_objext" && ac_objext=o
4946
4947 if test x"$host" != x"$build"; then
4948   ac_tool_prefix=${host_alias}-
4949 else
4950   ac_tool_prefix=
4951 fi
4952
4953 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4954 case $host_os in
4955 linux-gnu*) ;;
4956 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4957 esac
4958
4959 case $host_os in
4960 aix3*)
4961   # AIX sometimes has problems with the GCC collect2 program.  For some
4962   # reason, if we set the COLLECT_NAMES environment variable, the problems
4963   # vanish in a puff of smoke.
4964   if test "X${COLLECT_NAMES+set}" != Xset; then
4965     COLLECT_NAMES=
4966     export COLLECT_NAMES
4967   fi
4968   ;;
4969 esac
4970
4971 # Determine commands to create old-style static archives.
4972 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4973 old_postinstall_cmds='chmod 644 $oldlib'
4974 old_postuninstall_cmds=
4975
4976 if test -n "$RANLIB"; then
4977   case $host_os in
4978   openbsd*)
4979     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4980     ;;
4981   *)
4982     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4983     ;;
4984   esac
4985   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4986 fi
4987
4988 # Allow CC to be a program name with arguments.
4989 set dummy $CC
4990 compiler="$2"
4991
4992 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4993 echo "configure:4994: checking for objdir" >&5
4994 rm -f .libs 2>/dev/null
4995 mkdir .libs 2>/dev/null
4996 if test -d .libs; then
4997   objdir=.libs
4998 else
4999   # MS-DOS does not allow filenames that begin with a dot.
5000   objdir=_libs
5001 fi
5002 rmdir .libs 2>/dev/null
5003 echo "$ac_t""$objdir" 1>&6
5004
5005
5006 # Check whether --with-pic or --without-pic was given.
5007 if test "${with_pic+set}" = set; then
5008   withval="$with_pic"
5009   pic_mode="$withval"
5010 else
5011   pic_mode=default
5012 fi
5013
5014 test -z "$pic_mode" && pic_mode=default
5015
5016 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5017 # in isolation, and that seeing it set (from the cache) indicates that
5018 # the associated values are set (in the cache) correctly too.
5019 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5020 echo "configure:5021: checking for $compiler option to produce PIC" >&5
5021 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5022   echo $ac_n "(cached) $ac_c" 1>&6
5023 else
5024    lt_cv_prog_cc_pic=
5025   lt_cv_prog_cc_shlib=
5026   lt_cv_prog_cc_wl=
5027   lt_cv_prog_cc_static=
5028   lt_cv_prog_cc_no_builtin=
5029   lt_cv_prog_cc_can_build_shared=$can_build_shared
5030
5031   if test "$GCC" = yes; then
5032     lt_cv_prog_cc_wl='-Wl,'
5033     lt_cv_prog_cc_static='-static'
5034
5035     case $host_os in
5036     aix*)
5037       # Below there is a dirty hack to force normal static linking with -ldl
5038       # The problem is because libdl dynamically linked with both libc and
5039       # libC (AIX C++ library), which obviously doesn't included in libraries
5040       # list by gcc. This cause undefined symbols with -static flags.
5041       # This hack allows C programs to be linked with "-static -ldl", but
5042       # not sure about C++ programs.
5043       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5044       ;;
5045     amigaos*)
5046       # FIXME: we need at least 68020 code to build shared libraries, but
5047       # adding the `-m68020' flag to GCC prevents building anything better,
5048       # like `-m68040'.
5049       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5050       ;;
5051     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5052       # PIC is the default for these OSes.
5053       ;;
5054     darwin* | rhapsody*)
5055       # PIC is the default on this platform
5056       # Common symbols not allowed in MH_DYLIB files
5057       lt_cv_prog_cc_pic='-fno-common'
5058       ;;
5059     cygwin* | mingw* | pw32* | os2*)
5060       # This hack is so that the source file can tell whether it is being
5061       # built for inclusion in a dll (and should export symbols for example).
5062       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5063       ;;
5064     sysv4*MP*)
5065       if test -d /usr/nec; then
5066          lt_cv_prog_cc_pic=-Kconform_pic
5067       fi
5068       ;;
5069     *)
5070       lt_cv_prog_cc_pic='-fPIC'
5071       ;;
5072     esac
5073   else
5074     # PORTME Check for PIC flags for the system compiler.
5075     case $host_os in
5076     aix3* | aix4* | aix5*)
5077       lt_cv_prog_cc_wl='-Wl,'
5078       # All AIX code is PIC.
5079       if test "$host_cpu" = ia64; then
5080         # AIX 5 now supports IA64 processor
5081         lt_cv_prog_cc_static='-Bstatic'
5082       else
5083         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5084       fi
5085       ;;
5086
5087     hpux9* | hpux10* | hpux11*)
5088       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5089       lt_cv_prog_cc_wl='-Wl,'
5090       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5091       lt_cv_prog_cc_pic='+Z'
5092       ;;
5093
5094     irix5* | irix6* | nonstopux*)
5095       lt_cv_prog_cc_wl='-Wl,'
5096       lt_cv_prog_cc_static='-non_shared'
5097       # PIC (with -KPIC) is the default.
5098       ;;
5099
5100     cygwin* | mingw* | pw32* | os2*)
5101       # This hack is so that the source file can tell whether it is being
5102       # built for inclusion in a dll (and should export symbols for example).
5103       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5104       ;;
5105
5106     newsos6)
5107       lt_cv_prog_cc_pic='-KPIC'
5108       lt_cv_prog_cc_static='-Bstatic'
5109       ;;
5110     
5111     openedition)
5112       # XPLINK code is PIC by default
5113       ;;
5114
5115     osf3* | osf4* | osf5*)
5116       # All OSF/1 code is PIC.
5117       lt_cv_prog_cc_wl='-Wl,'
5118       lt_cv_prog_cc_static='-non_shared'
5119       ;;
5120
5121     sco3.2v5*)
5122       lt_cv_prog_cc_pic='-Kpic'
5123       lt_cv_prog_cc_static='-dn'
5124       lt_cv_prog_cc_shlib='-belf'
5125       ;;
5126
5127     solaris*)
5128       lt_cv_prog_cc_pic='-KPIC'
5129       lt_cv_prog_cc_static='-Bstatic'
5130       lt_cv_prog_cc_wl='-Wl,'
5131       ;;
5132
5133     sunos4*)
5134       lt_cv_prog_cc_pic='-PIC'
5135       lt_cv_prog_cc_static='-Bstatic'
5136       lt_cv_prog_cc_wl='-Qoption ld '
5137       ;;
5138
5139     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5140       lt_cv_prog_cc_pic='-KPIC'
5141       lt_cv_prog_cc_static='-Bstatic'
5142       lt_cv_prog_cc_wl='-Wl,'
5143       ;;
5144
5145     uts4*)
5146       lt_cv_prog_cc_pic='-pic'
5147       lt_cv_prog_cc_static='-Bstatic'
5148       ;;
5149
5150     sysv4*MP*)
5151       if test -d /usr/nec ;then
5152         lt_cv_prog_cc_pic='-Kconform_pic'
5153         lt_cv_prog_cc_static='-Bstatic'
5154       fi
5155       ;;
5156
5157     *)
5158       lt_cv_prog_cc_can_build_shared=no
5159       ;;
5160     esac
5161   fi
5162
5163 fi
5164
5165 if test -z "$lt_cv_prog_cc_pic"; then
5166   echo "$ac_t""none" 1>&6
5167 else
5168   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5169
5170   # Check to make sure the pic_flag actually works.
5171   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5172 echo "configure:5173: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5173   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176       save_CFLAGS="$CFLAGS"
5177     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5178     cat > conftest.$ac_ext <<EOF
5179 #line 5180 "configure"
5180 #include "confdefs.h"
5181
5182 int main() {
5183
5184 ; return 0; }
5185 EOF
5186 if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5187   rm -rf conftest*
5188         case $host_os in
5189       hpux9* | hpux10* | hpux11*)
5190         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5191         # they create non-PIC objects.  So, if there were any warnings, we
5192         # assume that PIC is not supported.
5193         if test -s conftest.err; then
5194           lt_cv_prog_cc_pic_works=no
5195         else
5196           lt_cv_prog_cc_pic_works=yes
5197         fi
5198         ;;
5199       *)
5200         lt_cv_prog_cc_pic_works=yes
5201         ;;
5202       esac
5203     
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208         lt_cv_prog_cc_pic_works=no
5209     
5210 fi
5211 rm -f conftest*
5212     CFLAGS="$save_CFLAGS"
5213   
5214 fi
5215
5216
5217   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5218     lt_cv_prog_cc_pic=
5219     lt_cv_prog_cc_can_build_shared=no
5220   else
5221     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5222   fi
5223
5224   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5225 fi
5226
5227 # Check for any special shared library compilation flags.
5228 if test -n "$lt_cv_prog_cc_shlib"; then
5229   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5230   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5231   else
5232    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5233     lt_cv_prog_cc_can_build_shared=no
5234   fi
5235 fi
5236
5237 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5239 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242     lt_cv_prog_cc_static_works=no
5243   save_LDFLAGS="$LDFLAGS"
5244   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5245   cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248
5249 int main() {
5250
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   lt_cv_prog_cc_static_works=yes
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259 fi
5260 rm -f conftest*
5261   LDFLAGS="$save_LDFLAGS"
5262
5263 fi
5264
5265
5266 # Belt *and* braces to stop my trousers falling down:
5267 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5268 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5269
5270 pic_flag="$lt_cv_prog_cc_pic"
5271 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5272 wl="$lt_cv_prog_cc_wl"
5273 link_static_flag="$lt_cv_prog_cc_static"
5274 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5275 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5276
5277
5278 # Check to see if options -o and -c are simultaneously supported by compiler
5279 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5280 echo "configure:5281: checking if $compiler supports -c -o file.$ac_objext" >&5
5281 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5282   echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284   
5285 $rm -r conftest 2>/dev/null
5286 mkdir conftest
5287 cd conftest
5288 echo "int some_variable = 0;" > conftest.$ac_ext
5289 mkdir out
5290 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5291 # that will create temporary files in the current directory regardless of
5292 # the output directory.  Thus, making CWD read-only will cause this test
5293 # to fail, enabling locking or at least warning the user not to do parallel
5294 # builds.
5295 chmod -w .
5296 save_CFLAGS="$CFLAGS"
5297 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5298 compiler_c_o=no
5299 if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5300   # The compiler can only warn and ignore the option if not recognized
5301   # So say no if there are warnings
5302   if test -s out/conftest.err; then
5303     lt_cv_compiler_c_o=no
5304   else
5305     lt_cv_compiler_c_o=yes
5306   fi
5307 else
5308   # Append any errors to the config.log.
5309   cat out/conftest.err 1>&5
5310   lt_cv_compiler_c_o=no
5311 fi
5312 CFLAGS="$save_CFLAGS"
5313 chmod u+w .
5314 $rm conftest* out/*
5315 rmdir out
5316 cd ..
5317 rmdir conftest
5318 $rm -r conftest 2>/dev/null
5319
5320 fi
5321
5322 compiler_c_o=$lt_cv_compiler_c_o
5323 echo "$ac_t""$compiler_c_o" 1>&6
5324
5325 if test x"$compiler_c_o" = x"yes"; then
5326   # Check to see if we can write to a .lo
5327   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler supports -c -o file.lo" >&5
5329   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333   lt_cv_compiler_o_lo=no
5334   save_CFLAGS="$CFLAGS"
5335   CFLAGS="$CFLAGS -c -o conftest.lo"
5336   save_objext="$ac_objext"
5337   ac_objext=lo
5338   cat > conftest.$ac_ext <<EOF
5339 #line 5340 "configure"
5340 #include "confdefs.h"
5341
5342 int main() {
5343 int some_variable = 0;
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5347   rm -rf conftest*
5348       # The compiler can only warn and ignore the option if not recognized
5349     # So say no if there are warnings
5350     if test -s conftest.err; then
5351       lt_cv_compiler_o_lo=no
5352     else
5353       lt_cv_compiler_o_lo=yes
5354     fi
5355   
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359 fi
5360 rm -f conftest*
5361   ac_objext="$save_objext"
5362   CFLAGS="$save_CFLAGS"
5363   
5364 fi
5365
5366   compiler_o_lo=$lt_cv_compiler_o_lo
5367   echo "$ac_t""$compiler_o_lo" 1>&6
5368 else
5369   compiler_o_lo=no
5370 fi
5371
5372 # Check to see if we can do hard links to lock some files if needed
5373 hard_links="nottested"
5374 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5375   # do not overwrite the value of need_locks provided by the user
5376   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5377 echo "configure:5378: checking if we can lock with hard links" >&5
5378   hard_links=yes
5379   $rm conftest*
5380   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5381   touch conftest.a
5382   ln conftest.a conftest.b 2>&5 || hard_links=no
5383   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5384   echo "$ac_t""$hard_links" 1>&6
5385   if test "$hard_links" = no; then
5386     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5387     need_locks=warn
5388   fi
5389 else
5390   need_locks=no
5391 fi
5392
5393 if test "$GCC" = yes; then
5394   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5395   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5396 echo "configure:5397: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5397   echo "int some_variable = 0;" > conftest.$ac_ext
5398   save_CFLAGS="$CFLAGS"
5399   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5400   compiler_rtti_exceptions=no
5401   cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404
5405 int main() {
5406 int some_variable = 0;
5407 ; return 0; }
5408 EOF
5409 if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5410   rm -rf conftest*
5411       # The compiler can only warn and ignore the option if not recognized
5412     # So say no if there are warnings
5413     if test -s conftest.err; then
5414       compiler_rtti_exceptions=no
5415     else
5416       compiler_rtti_exceptions=yes
5417     fi
5418   
5419 else
5420   echo "configure: failed program was:" >&5
5421   cat conftest.$ac_ext >&5
5422 fi
5423 rm -f conftest*
5424   CFLAGS="$save_CFLAGS"
5425   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5426
5427   if test "$compiler_rtti_exceptions" = "yes"; then
5428     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5429   else
5430     no_builtin_flag=' -fno-builtin'
5431   fi
5432 fi
5433
5434 # See if the linker supports building shared libraries.
5435 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5436 echo "configure:5437: checking whether the linker ($LD) supports shared libraries" >&5
5437
5438 allow_undefined_flag=
5439 no_undefined_flag=
5440 need_lib_prefix=unknown
5441 need_version=unknown
5442 # when you set need_version to no, make sure it does not cause -set_version
5443 # flags to be left without arguments
5444 archive_cmds=
5445 archive_expsym_cmds=
5446 old_archive_from_new_cmds=
5447 old_archive_from_expsyms_cmds=
5448 export_dynamic_flag_spec=
5449 whole_archive_flag_spec=
5450 thread_safe_flag_spec=
5451 hardcode_into_libs=no
5452 hardcode_libdir_flag_spec=
5453 hardcode_libdir_separator=
5454 hardcode_direct=no
5455 hardcode_minus_L=no
5456 hardcode_shlibpath_var=unsupported
5457 runpath_var=
5458 link_all_deplibs=unknown
5459 always_export_symbols=no
5460 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5461 # include_expsyms should be a list of space-separated symbols to be *always*
5462 # included in the symbol list
5463 include_expsyms=
5464 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5465 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5466 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5467 # as well as any symbol that contains `d'.
5468 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5469 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5470 # platforms (ab)use it in PIC code, but their linkers get confused if
5471 # the symbol is explicitly referenced.  Since portable code cannot
5472 # rely on this symbol name, it's probably fine to never include it in
5473 # preloaded symbol tables.
5474 extract_expsyms_cmds=
5475
5476 case $host_os in
5477 cygwin* | mingw* | pw32*)
5478   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5479   # When not using gcc, we currently assume that we are using
5480   # Microsoft Visual C++.
5481   if test "$GCC" != yes; then
5482     with_gnu_ld=no
5483   fi
5484   ;;
5485 openbsd*)
5486   with_gnu_ld=no
5487   ;;
5488 esac
5489
5490 ld_shlibs=yes
5491 if test "$with_gnu_ld" = yes; then
5492   # If archive_cmds runs LD, not CC, wlarc should be empty
5493   wlarc='${wl}'
5494
5495   # See if GNU ld supports shared libraries.
5496   case $host_os in
5497   aix3* | aix4* | aix5*)
5498     # On AIX, the GNU linker is very broken
5499     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5500     ld_shlibs=no
5501     cat <<EOF 1>&2
5502
5503 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5504 *** to be unable to reliably create shared libraries on AIX.
5505 *** Therefore, libtool is disabling shared libraries support.  If you
5506 *** really care for shared libraries, you may want to modify your PATH
5507 *** so that a non-GNU linker is found, and then restart.
5508
5509 EOF
5510     ;;
5511
5512   amigaos*)
5513     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)'
5514     hardcode_libdir_flag_spec='-L$libdir'
5515     hardcode_minus_L=yes
5516
5517     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5518     # that the semantics of dynamic libraries on AmigaOS, at least up
5519     # to version 4, is to share data among multiple programs linked
5520     # with the same dynamic library.  Since this doesn't match the
5521     # behavior of shared libraries on other platforms, we can use
5522     # them.
5523     ld_shlibs=no
5524     ;;
5525
5526   beos*)
5527     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5528       allow_undefined_flag=unsupported
5529       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5530       # support --undefined.  This deserves some investigation.  FIXME
5531       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5532     else
5533       ld_shlibs=no
5534     fi
5535     ;;
5536
5537   cygwin* | mingw* | pw32*)
5538     # hardcode_libdir_flag_spec is actually meaningless, as there is
5539     # no search path for DLLs.
5540     hardcode_libdir_flag_spec='-L$libdir'
5541     allow_undefined_flag=unsupported
5542     always_export_symbols=yes
5543
5544     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5545       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5546       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5547       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5548       else $CC -o impgen impgen.c ; fi)~
5549       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5550
5551     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5552
5553     # cygwin and mingw dlls have different entry points and sets of symbols
5554     # to exclude.
5555     # FIXME: what about values for MSVC?
5556     dll_entry=__cygwin_dll_entry@12
5557     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5558     case $host_os in
5559     mingw*)
5560       # mingw values
5561       dll_entry=_DllMainCRTStartup@12
5562       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5563       ;;
5564     esac
5565
5566     # mingw and cygwin differ, and it's simplest to just exclude the union
5567     # of the two symbol sets.
5568     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5569
5570     # recent cygwin and mingw systems supply a stub DllMain which the user
5571     # can override, but on older systems we have to supply one (in ltdll.c)
5572     if test "x$lt_cv_need_dllmain" = "xyes"; then
5573       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5574       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~
5575         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5576     else
5577       ltdll_obj=
5578       ltdll_cmds=
5579     fi
5580
5581     # Extract the symbol export list from an `--export-all' def file,
5582     # then regenerate the def file from the symbol export list, so that
5583     # the compiled dll only exports the symbol export list.
5584     # Be careful not to strip the DATA tag left be newer dlltools.
5585     export_symbols_cmds="$ltdll_cmds"'
5586       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5587       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5588
5589     # If the export-symbols file already is a .def file (1st line
5590     # is EXPORTS), use it as is.
5591     # If DATA tags from a recent dlltool are present, honour them!
5592     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5593         cp $export_symbols $output_objdir/$soname-def;
5594       else
5595         echo EXPORTS > $output_objdir/$soname-def;
5596         _lt_hint=1;
5597         cat $export_symbols | while read symbol; do
5598          set dummy \$symbol;
5599          case \$# in
5600            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5601            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5602            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5603          esac;
5604          _lt_hint=`expr 1 + \$_lt_hint`;
5605         done;
5606       fi~
5607       '"$ltdll_cmds"'
5608       $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~
5609       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
5610       $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~
5611       $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~
5612       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5613     ;;
5614
5615   netbsd*)
5616     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5617       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5618       wlarc=
5619     else
5620       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5621       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5622     fi
5623     ;;
5624
5625   solaris* | sysv5*)
5626     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5627       ld_shlibs=no
5628       cat <<EOF 1>&2
5629
5630 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5631 *** create shared libraries on Solaris systems.  Therefore, libtool
5632 *** is disabling shared libraries support.  We urge you to upgrade GNU
5633 *** binutils to release 2.9.1 or newer.  Another option is to modify
5634 *** your PATH or compiler configuration so that the native linker is
5635 *** used, and then restart.
5636
5637 EOF
5638     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5639       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5640       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5641     else
5642       ld_shlibs=no
5643     fi
5644     ;;
5645
5646   sunos4*)
5647     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5648     wlarc=
5649     hardcode_direct=yes
5650     hardcode_shlibpath_var=no
5651     ;;
5652
5653   *)
5654     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5655       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5656       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5657     else
5658       ld_shlibs=no
5659     fi
5660     ;;
5661   esac
5662
5663   if test "$ld_shlibs" = yes; then
5664     runpath_var=LD_RUN_PATH
5665     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5666     export_dynamic_flag_spec='${wl}--export-dynamic'
5667     case $host_os in
5668     cygwin* | mingw* | pw32*)
5669       # dlltool doesn't understand --whole-archive et. al.
5670       whole_archive_flag_spec=
5671       ;;
5672     *)
5673       # ancient GNU ld didn't support --whole-archive et. al.
5674       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5675         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5676       else
5677         whole_archive_flag_spec=
5678       fi
5679       ;;
5680     esac
5681   fi
5682 else
5683   # PORTME fill in a description of your system's linker (not GNU ld)
5684   case $host_os in
5685   aix3*)
5686     allow_undefined_flag=unsupported
5687     always_export_symbols=yes
5688     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'
5689     # Note: this linker hardcodes the directories in LIBPATH if there
5690     # are no directories specified by -L.
5691     hardcode_minus_L=yes
5692     if test "$GCC" = yes && test -z "$link_static_flag"; then
5693       # Neither direct hardcoding nor static linking is supported with a
5694       # broken collect2.
5695       hardcode_direct=unsupported
5696     fi
5697     ;;
5698
5699   aix4* | aix5*)
5700     if test "$host_cpu" = ia64; then
5701       # On IA64, the linker does run time linking by default, so we don't
5702       # have to do anything special.
5703       aix_use_runtimelinking=no
5704       exp_sym_flag='-Bexport'
5705       no_entry_flag=""
5706     else
5707       aix_use_runtimelinking=no
5708
5709       # Test if we are trying to use run time linking or normal
5710       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5711       # need to do runtime linking.
5712       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5713         for ld_flag in $LDFLAGS; do
5714           case $ld_flag in
5715           *-brtl*)
5716             aix_use_runtimelinking=yes
5717             break
5718           ;;
5719           esac
5720         done
5721       esac
5722
5723       exp_sym_flag='-bexport'
5724       no_entry_flag='-bnoentry'
5725     fi
5726
5727     # When large executables or shared objects are built, AIX ld can
5728     # have problems creating the table of contents.  If linking a library
5729     # or program results in "error TOC overflow" add -mminimal-toc to
5730     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5731     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5732
5733     hardcode_direct=yes
5734     archive_cmds=''
5735     hardcode_libdir_separator=':'
5736     if test "$GCC" = yes; then
5737       case $host_os in aix4.[012]|aix4.[012].*)
5738         collect2name=`${CC} -print-prog-name=collect2`
5739         if test -f "$collect2name" && \
5740           strings "$collect2name" | grep resolve_lib_name >/dev/null
5741         then
5742           # We have reworked collect2
5743           hardcode_direct=yes
5744         else
5745           # We have old collect2
5746           hardcode_direct=unsupported
5747           # It fails to find uninstalled libraries when the uninstalled
5748           # path is not listed in the libpath.  Setting hardcode_minus_L
5749           # to unsupported forces relinking
5750           hardcode_minus_L=yes
5751           hardcode_libdir_flag_spec='-L$libdir'
5752           hardcode_libdir_separator=
5753         fi
5754       esac
5755
5756       shared_flag='-shared'
5757     else
5758       # not using gcc
5759       if test "$host_cpu" = ia64; then
5760         shared_flag='${wl}-G'
5761       else
5762         if test "$aix_use_runtimelinking" = yes; then
5763           shared_flag='${wl}-G'
5764         else
5765           shared_flag='${wl}-bM:SRE'
5766         fi
5767       fi
5768     fi
5769
5770     # It seems that -bexpall can do strange things, so it is better to
5771     # generate a list of symbols to export.
5772     always_export_symbols=yes
5773     if test "$aix_use_runtimelinking" = yes; then
5774       # Warning - without using the other runtime loading flags (-brtl),
5775       # -berok will link without error, but may produce a broken library.
5776       allow_undefined_flag='-berok'
5777       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5778       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"
5779     else
5780       if test "$host_cpu" = ia64; then
5781         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5782         allow_undefined_flag="-z nodefs"
5783         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"
5784       else
5785         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5786         # Warning - without using the other run time loading flags,
5787         # -berok will link without error, but may produce a broken library.
5788         allow_undefined_flag='${wl}-berok'
5789         # This is a bit strange, but is similar to how AIX traditionally builds
5790         # it's shared libraries.
5791         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'
5792       fi
5793     fi
5794     ;;
5795
5796   amigaos*)
5797     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)'
5798     hardcode_libdir_flag_spec='-L$libdir'
5799     hardcode_minus_L=yes
5800     # see comment about different semantics on the GNU ld section
5801     ld_shlibs=no
5802     ;;
5803
5804   cygwin* | mingw* | pw32*)
5805     # When not using gcc, we currently assume that we are using
5806     # Microsoft Visual C++.
5807     # hardcode_libdir_flag_spec is actually meaningless, as there is
5808     # no search path for DLLs.
5809     hardcode_libdir_flag_spec=' '
5810     allow_undefined_flag=unsupported
5811     # Tell ltmain to make .lib files, not .a files.
5812     libext=lib
5813     # FIXME: Setting linknames here is a bad hack.
5814     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5815     # The linker will automatically build a .lib file if we build a DLL.
5816     old_archive_from_new_cmds='true'
5817     # FIXME: Should let the user specify the lib program.
5818     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5819     fix_srcfile_path='`cygpath -w "$srcfile"`'
5820     ;;
5821
5822   darwin* | rhapsody*)
5823     case "$host_os" in
5824     rhapsody* | darwin1.[012])
5825       allow_undefined_flag='-undefined suppress'
5826       ;;
5827     *) # Darwin 1.3 on
5828       allow_undefined_flag='-flat_namespace -undefined suppress'
5829       ;;
5830     esac
5831     # FIXME: Relying on posixy $() will cause problems for
5832     #        cross-compilation, but unfortunately the echo tests do not
5833     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5834     #        `"' quotes if we put them in here... so don't!
5835     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)'
5836     # We need to add '_' to the symbols in $export_symbols first
5837     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5838     hardcode_direct=yes
5839     hardcode_shlibpath_var=no
5840     whole_archive_flag_spec='-all_load $convenience'
5841     ;;
5842
5843   freebsd1*)
5844     ld_shlibs=no
5845     ;;
5846
5847   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5848   # support.  Future versions do this automatically, but an explicit c++rt0.o
5849   # does not break anything, and helps significantly (at the cost of a little
5850   # extra space).
5851   freebsd2.2*)
5852     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5853     hardcode_libdir_flag_spec='-R$libdir'
5854     hardcode_direct=yes
5855     hardcode_shlibpath_var=no
5856     ;;
5857
5858   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5859   freebsd2*)
5860     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5861     hardcode_direct=yes
5862     hardcode_minus_L=yes
5863     hardcode_shlibpath_var=no
5864     ;;
5865
5866   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5867   freebsd*)
5868     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5869     hardcode_libdir_flag_spec='-R$libdir'
5870     hardcode_direct=yes
5871     hardcode_shlibpath_var=no
5872     ;;
5873
5874   hpux9* | hpux10* | hpux11*)
5875     case $host_os in
5876     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' ;;
5877     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5878     esac
5879     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5880     hardcode_libdir_separator=:
5881     hardcode_direct=yes
5882     hardcode_minus_L=yes # Not in the search PATH, but as the default
5883                          # location of the library.
5884     export_dynamic_flag_spec='${wl}-E'
5885     ;;
5886
5887   irix5* | irix6* | nonstopux*)
5888     if test "$GCC" = yes; then
5889       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'
5890       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5891     else
5892       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'
5893       hardcode_libdir_flag_spec='-rpath $libdir'
5894     fi
5895     hardcode_libdir_separator=:
5896     link_all_deplibs=yes
5897     ;;
5898
5899   netbsd*)
5900     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5901       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5902     else
5903       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5904     fi
5905     hardcode_libdir_flag_spec='-R$libdir'
5906     hardcode_direct=yes
5907     hardcode_shlibpath_var=no
5908     ;;
5909
5910   newsos6)
5911     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5912     hardcode_direct=yes
5913     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5914     hardcode_libdir_separator=:
5915     hardcode_shlibpath_var=no
5916     ;;
5917
5918   openbsd*)
5919     hardcode_direct=yes
5920     hardcode_shlibpath_var=no
5921     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5922       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5923       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5924       export_dynamic_flag_spec='${wl}-E'
5925     else
5926       case "$host_os" in
5927       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5928         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5929         hardcode_libdir_flag_spec='-R$libdir'
5930         ;;
5931       *)
5932         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5933         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5934         ;;
5935       esac
5936     fi
5937     ;;
5938
5939   openedition*)
5940     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5941         cp \$linknames \$output_objdir && linknames=''"
5942     export_dynamic_flag_spec="-Wl,DLL"
5943     ;;
5944
5945   os2*)
5946     hardcode_libdir_flag_spec='-L$libdir'
5947     hardcode_minus_L=yes
5948     allow_undefined_flag=unsupported
5949     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'
5950     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5951     ;;
5952
5953   osf3*)
5954     if test "$GCC" = yes; then
5955       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5956       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'
5957     else
5958       allow_undefined_flag=' -expect_unresolved \*'
5959       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'
5960     fi
5961     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     hardcode_libdir_separator=:
5963     ;;
5964
5965   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5966     if test "$GCC" = yes; then
5967       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5968       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'
5969       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5970     else
5971       allow_undefined_flag=' -expect_unresolved \*'
5972       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'
5973       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5974       $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'
5975
5976       #Both c and cxx compiler support -rpath directly
5977       hardcode_libdir_flag_spec='-rpath $libdir'
5978     fi
5979     hardcode_libdir_separator=:
5980     ;;
5981
5982   sco3.2v5*)
5983     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5984     hardcode_shlibpath_var=no
5985     runpath_var=LD_RUN_PATH
5986     hardcode_runpath_var=yes
5987     export_dynamic_flag_spec='${wl}-Bexport'
5988     ;;
5989
5990   solaris*)
5991     # gcc --version < 3.0 without binutils cannot create self contained
5992     # shared libraries reliably, requiring libgcc.a to resolve some of
5993     # the object symbols generated in some cases.  Libraries that use
5994     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5995     # a copy of libgcc.a into every shared library to guarantee resolving
5996     # such symbols causes other problems:  According to Tim Van Holder
5997     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5998     # (to the application) exception stack for one thing.
5999     no_undefined_flag=' -z defs'
6000     if test "$GCC" = yes; then
6001       case `$CC --version 2>/dev/null` in
6002       [12].*)
6003         cat <<EOF 1>&2
6004
6005 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6006 *** create self contained shared libraries on Solaris systems, without
6007 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6008 *** -no-undefined support, which will at least allow you to build shared
6009 *** libraries.  However, you may find that when you link such libraries
6010 *** into an application without using GCC, you have to manually add
6011 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6012 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6013 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6014
6015 EOF
6016         no_undefined_flag=
6017         ;;
6018       esac
6019     fi
6020     # $CC -shared without GNU ld will not create a library from C++
6021     # object files and a static libstdc++, better avoid it by now
6022     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6023     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6024                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6025     hardcode_libdir_flag_spec='-R$libdir'
6026     hardcode_shlibpath_var=no
6027     case $host_os in
6028     solaris2.[0-5] | solaris2.[0-5].*) ;;
6029     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6030       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6031     esac
6032     link_all_deplibs=yes
6033     ;;
6034
6035   sunos4*)
6036     if test "x$host_vendor" = xsequent; then
6037       # Use $CC to link under sequent, because it throws in some extra .o
6038       # files that make .init and .fini sections work.
6039       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6040     else
6041       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6042     fi
6043     hardcode_libdir_flag_spec='-L$libdir'
6044     hardcode_direct=yes
6045     hardcode_minus_L=yes
6046     hardcode_shlibpath_var=no
6047     ;;
6048
6049   sysv4)
6050     case $host_vendor in
6051       sni)
6052         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6053         hardcode_direct=yes # is this really true???
6054         ;;
6055       siemens)
6056         ## LD is ld it makes a PLAMLIB
6057         ## CC just makes a GrossModule.
6058         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6059         reload_cmds='$CC -r -o $output$reload_objs'
6060         hardcode_direct=no
6061         ;;
6062       motorola)
6063         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6064         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6065         ;;
6066     esac
6067     runpath_var='LD_RUN_PATH'
6068     hardcode_shlibpath_var=no
6069     ;;
6070
6071   sysv4.3*)
6072     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6073     hardcode_shlibpath_var=no
6074     export_dynamic_flag_spec='-Bexport'
6075     ;;
6076
6077   sysv5*)
6078     no_undefined_flag=' -z text'
6079     # $CC -shared without GNU ld will not create a library from C++
6080     # object files and a static libstdc++, better avoid it by now
6081     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6082     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6083                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6084     hardcode_libdir_flag_spec=
6085     hardcode_shlibpath_var=no
6086     runpath_var='LD_RUN_PATH'
6087     ;;
6088
6089   uts4*)
6090     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6091     hardcode_libdir_flag_spec='-L$libdir'
6092     hardcode_shlibpath_var=no
6093     ;;
6094
6095   dgux*)
6096     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6097     hardcode_libdir_flag_spec='-L$libdir'
6098     hardcode_shlibpath_var=no
6099     ;;
6100
6101   sysv4*MP*)
6102     if test -d /usr/nec; then
6103       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6104       hardcode_shlibpath_var=no
6105       runpath_var=LD_RUN_PATH
6106       hardcode_runpath_var=yes
6107       ld_shlibs=yes
6108     fi
6109     ;;
6110
6111   sysv4.2uw2*)
6112     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6113     hardcode_direct=yes
6114     hardcode_minus_L=no
6115     hardcode_shlibpath_var=no
6116     hardcode_runpath_var=yes
6117     runpath_var=LD_RUN_PATH
6118     ;;
6119
6120   sysv5uw7* | unixware7*)
6121     no_undefined_flag='${wl}-z ${wl}text'
6122     if test "$GCC" = yes; then
6123       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6124     else
6125       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6126     fi
6127     runpath_var='LD_RUN_PATH'
6128     hardcode_shlibpath_var=no
6129     ;;
6130
6131   *)
6132     ld_shlibs=no
6133     ;;
6134   esac
6135 fi
6136 echo "$ac_t""$ld_shlibs" 1>&6
6137 test "$ld_shlibs" = no && can_build_shared=no
6138
6139 # Check hardcoding attributes.
6140 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6141 echo "configure:6142: checking how to hardcode library paths into programs" >&5
6142 hardcode_action=
6143 if test -n "$hardcode_libdir_flag_spec" || \
6144    test -n "$runpath_var"; then
6145
6146   # We can hardcode non-existant directories.
6147   if test "$hardcode_direct" != no &&
6148      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6149      # have to relink, otherwise we might link with an installed library
6150      # when we should be linking with a yet-to-be-installed one
6151      ## test "$hardcode_shlibpath_var" != no &&
6152      test "$hardcode_minus_L" != no; then
6153     # Linking always hardcodes the temporary library directory.
6154     hardcode_action=relink
6155   else
6156     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6157     hardcode_action=immediate
6158   fi
6159 else
6160   # We cannot hardcode anything, or else we can only hardcode existing
6161   # directories.
6162   hardcode_action=unsupported
6163 fi
6164 echo "$ac_t""$hardcode_action" 1>&6
6165
6166 striplib=
6167 old_striplib=
6168 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6169 echo "configure:6170: checking whether stripping libraries is possible" >&5
6170 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6171   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6172   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6173   echo "$ac_t""yes" 1>&6
6174 else
6175   echo "$ac_t""no" 1>&6
6176 fi
6177
6178 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6179 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6180
6181 # PORTME Fill in your ld.so characteristics
6182 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6183 echo "configure:6184: checking dynamic linker characteristics" >&5
6184 library_names_spec=
6185 libname_spec='lib$name'
6186 soname_spec=
6187 postinstall_cmds=
6188 postuninstall_cmds=
6189 finish_cmds=
6190 finish_eval=
6191 shlibpath_var=
6192 shlibpath_overrides_runpath=unknown
6193 version_type=none
6194 dynamic_linker="$host_os ld.so"
6195 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6196 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6197
6198 case $host_os in
6199 aix3*)
6200   version_type=linux
6201   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6202   shlibpath_var=LIBPATH
6203
6204   # AIX has no versioning support, so we append a major version to the name.
6205   soname_spec='${libname}${release}.so$major'
6206   ;;
6207
6208 aix4* | aix5*)
6209   version_type=linux
6210   need_lib_prefix=no
6211   need_version=no
6212   hardcode_into_libs=yes
6213   if test "$host_cpu" = ia64; then
6214     # AIX 5 supports IA64
6215     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6216     shlibpath_var=LD_LIBRARY_PATH
6217   else
6218     # With GCC up to 2.95.x, collect2 would create an import file
6219     # for dependence libraries.  The import file would start with
6220     # the line `#! .'.  This would cause the generated library to
6221     # depend on `.', always an invalid library.  This was fixed in
6222     # development snapshots of GCC prior to 3.0.
6223     case $host_os in
6224       aix4 | aix4.[01] | aix4.[01].*)
6225         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6226              echo ' yes '
6227              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6228           :
6229         else
6230           can_build_shared=no
6231         fi
6232         ;;
6233     esac
6234     # AIX (on Power*) has no versioning support, so currently we can
6235     # not hardcode correct soname into executable. Probably we can
6236     # add versioning support to collect2, so additional links can
6237     # be useful in future.
6238     if test "$aix_use_runtimelinking" = yes; then
6239       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6240       # instead of lib<name>.a to let people know that these are not
6241       # typical AIX shared libraries.
6242       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6243     else
6244       # We preserve .a as extension for shared libraries through AIX4.2
6245       # and later when we are not doing run time linking.
6246       library_names_spec='${libname}${release}.a $libname.a'
6247       soname_spec='${libname}${release}.so$major'
6248     fi
6249     shlibpath_var=LIBPATH
6250   fi
6251   hardcode_into_libs=yes
6252   ;;
6253
6254 amigaos*)
6255   library_names_spec='$libname.ixlibrary $libname.a'
6256   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6257   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'
6258   ;;
6259
6260 beos*)
6261   library_names_spec='${libname}.so'
6262   dynamic_linker="$host_os ld.so"
6263   shlibpath_var=LIBRARY_PATH
6264   ;;
6265
6266 bsdi4*)
6267   version_type=linux
6268   need_version=no
6269   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6270   soname_spec='${libname}${release}.so$major'
6271   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6272   shlibpath_var=LD_LIBRARY_PATH
6273   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6274   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6275   export_dynamic_flag_spec=-rdynamic
6276   # the default ld.so.conf also contains /usr/contrib/lib and
6277   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6278   # libtool to hard-code these into programs
6279   ;;
6280
6281 cygwin* | mingw* | pw32*)
6282   version_type=windows
6283   need_version=no
6284   need_lib_prefix=no
6285   case $GCC,$host_os in
6286   yes,cygwin*)
6287     library_names_spec='$libname.dll.a'
6288     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6289     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6290       dldir=$destdir/`dirname \$dlpath`~
6291       test -d \$dldir || mkdir -p \$dldir~
6292       $install_prog .libs/$dlname \$dldir/$dlname'
6293     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6294       dlpath=$dir/\$dldll~
6295        $rm \$dlpath'
6296     ;;
6297   yes,mingw*)
6298     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6299     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6300     ;;
6301   yes,pw32*)
6302     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6303     ;;
6304   *)
6305     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6306     ;;
6307   esac
6308   dynamic_linker='Win32 ld.exe'
6309   # FIXME: first we should search . and the directory the executable is in
6310   shlibpath_var=PATH
6311   ;;
6312
6313 darwin* | rhapsody*)
6314   dynamic_linker="$host_os dyld"
6315   version_type=darwin
6316   need_lib_prefix=no
6317   need_version=no
6318   # FIXME: Relying on posixy $() will cause problems for
6319   #        cross-compilation, but unfortunately the echo tests do not
6320   #        yet detect zsh echo's removal of \ escapes.
6321   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)'
6322   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6323   shlibpath_overrides_runpath=yes
6324   shlibpath_var=DYLD_LIBRARY_PATH
6325   ;;
6326
6327 freebsd1*)
6328   dynamic_linker=no
6329   ;;
6330
6331 freebsd*)
6332   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6333   version_type=freebsd-$objformat
6334   case $version_type in
6335     freebsd-elf*)
6336       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6337       need_version=no
6338       need_lib_prefix=no
6339       ;;
6340     freebsd-*)
6341       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6342       need_version=yes
6343       ;;
6344   esac
6345   shlibpath_var=LD_LIBRARY_PATH
6346   case $host_os in
6347   freebsd2*)
6348     shlibpath_overrides_runpath=yes
6349     ;;
6350   *)
6351     shlibpath_overrides_runpath=no
6352     hardcode_into_libs=yes
6353     ;;
6354   esac
6355   ;;
6356
6357 gnu*)
6358   version_type=linux
6359   need_lib_prefix=no
6360   need_version=no
6361   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6362   soname_spec='${libname}${release}.so$major'
6363   shlibpath_var=LD_LIBRARY_PATH
6364   hardcode_into_libs=yes
6365   ;;
6366
6367 hpux9* | hpux10* | hpux11*)
6368   # Give a soname corresponding to the major version so that dld.sl refuses to
6369   # link against other versions.
6370   dynamic_linker="$host_os dld.sl"
6371   version_type=sunos
6372   need_lib_prefix=no
6373   need_version=no
6374   shlibpath_var=SHLIB_PATH
6375   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6376   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6377   soname_spec='${libname}${release}.sl$major'
6378   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6379   postinstall_cmds='chmod 555 $lib'
6380   ;;
6381
6382 irix5* | irix6* | nonstopux*)
6383   case $host_os in
6384     nonstopux*) version_type=nonstopux ;;
6385     *)          version_type=irix ;;
6386   esac
6387   need_lib_prefix=no
6388   need_version=no
6389   soname_spec='${libname}${release}.so$major'
6390   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6391   case $host_os in
6392   irix5* | nonstopux*)
6393     libsuff= shlibsuff=
6394     ;;
6395   *)
6396     case $LD in # libtool.m4 will add one of these switches to LD
6397     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6398     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6399     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6400     *) libsuff= shlibsuff= libmagic=never-match;;
6401     esac
6402     ;;
6403   esac
6404   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6405   shlibpath_overrides_runpath=no
6406   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6407   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6408   ;;
6409
6410 # No shared lib support for Linux oldld, aout, or coff.
6411 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6412   dynamic_linker=no
6413   ;;
6414
6415 # This must be Linux ELF.
6416 linux-gnu*)
6417   version_type=linux
6418   need_lib_prefix=no
6419   need_version=no
6420   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6421   soname_spec='${libname}${release}.so$major'
6422   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6423   shlibpath_var=LD_LIBRARY_PATH
6424   shlibpath_overrides_runpath=no
6425   # This implies no fast_install, which is unacceptable.
6426   # Some rework will be needed to allow for fast_install
6427   # before this can be enabled.
6428   hardcode_into_libs=yes
6429
6430   # We used to test for /lib/ld.so.1 and disable shared libraries on
6431   # powerpc, because MkLinux only supported shared libraries with the
6432   # GNU dynamic linker.  Since this was broken with cross compilers,
6433   # most powerpc-linux boxes support dynamic linking these days and
6434   # people can always --disable-shared, the test was removed, and we
6435   # assume the GNU/Linux dynamic linker is in use.
6436   dynamic_linker='GNU/Linux ld.so'
6437   ;;
6438
6439 netbsd*)
6440   version_type=sunos
6441   need_lib_prefix=no
6442   need_version=no
6443   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6444     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6445     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6446     dynamic_linker='NetBSD (a.out) ld.so'
6447   else
6448     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6449     soname_spec='${libname}${release}.so$major'
6450     dynamic_linker='NetBSD ld.elf_so'
6451   fi
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   hardcode_into_libs=yes
6455   ;;
6456
6457 newsos6)
6458   version_type=linux
6459   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6460   shlibpath_var=LD_LIBRARY_PATH
6461   shlibpath_overrides_runpath=yes
6462   ;;
6463
6464 openbsd*)
6465   version_type=sunos
6466   need_lib_prefix=no
6467   need_version=no
6468   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6469     case "$host_os" in
6470     openbsd2.[89] | openbsd2.[89].*)
6471       shlibpath_overrides_runpath=no
6472       ;;
6473     *)
6474       shlibpath_overrides_runpath=yes
6475       ;;
6476     esac
6477   else
6478     shlibpath_overrides_runpath=yes
6479   fi
6480   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6481   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6482   shlibpath_var=LD_LIBRARY_PATH
6483   ;;
6484
6485 openedition*)
6486   need_lib_prefix=no
6487   need_version=no
6488   shlibpath_overrides_runpath=yes
6489   shlibpath_var=LIBPATH
6490   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6491   # the library's exports are in libname.x; this is the file that must
6492   # actually be linked with to use a DLL.
6493   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6494   ;;
6495
6496 os2*)
6497   libname_spec='$name'
6498   need_lib_prefix=no
6499   library_names_spec='$libname.dll $libname.a'
6500   dynamic_linker='OS/2 ld.exe'
6501   shlibpath_var=LIBPATH
6502   ;;
6503
6504 osf3* | osf4* | osf5*)
6505   version_type=osf
6506   need_version=no
6507   soname_spec='${libname}${release}.so$major'
6508   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6509   shlibpath_var=LD_LIBRARY_PATH
6510   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6511   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6512   hardcode_into_libs=yes
6513   ;;
6514
6515 sco3.2v5*)
6516   version_type=osf
6517   soname_spec='${libname}${release}.so$major'
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6519   shlibpath_var=LD_LIBRARY_PATH
6520   ;;
6521
6522 solaris*)
6523   version_type=linux
6524   need_lib_prefix=no
6525   need_version=no
6526   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6527   soname_spec='${libname}${release}.so$major'
6528   shlibpath_var=LD_LIBRARY_PATH
6529   shlibpath_overrides_runpath=yes
6530   hardcode_into_libs=yes
6531   # ldd complains unless libraries are executable
6532   postinstall_cmds='chmod +x $lib'
6533   ;;
6534
6535 sunos4*)
6536   version_type=sunos
6537   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6538   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6539   shlibpath_var=LD_LIBRARY_PATH
6540   shlibpath_overrides_runpath=yes
6541   if test "$with_gnu_ld" = yes; then
6542     need_lib_prefix=no
6543   fi
6544   need_version=yes
6545   ;;
6546
6547 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6548   version_type=linux
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6550   soname_spec='${libname}${release}.so$major'
6551   shlibpath_var=LD_LIBRARY_PATH
6552   case $host_vendor in
6553     sni)
6554       shlibpath_overrides_runpath=no
6555       need_lib_prefix=no
6556       export_dynamic_flag_spec='${wl}-Blargedynsym'
6557       runpath_var=LD_RUN_PATH
6558       ;;
6559     siemens)
6560       need_lib_prefix=no
6561       ;;
6562     motorola)
6563       need_lib_prefix=no
6564       need_version=no
6565       shlibpath_overrides_runpath=no
6566       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6567       ;;
6568   esac
6569   ;;
6570
6571 uts4*)
6572   version_type=linux
6573   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6574   soname_spec='${libname}${release}.so$major'
6575   shlibpath_var=LD_LIBRARY_PATH
6576   ;;
6577
6578 dgux*)
6579   version_type=linux
6580   need_lib_prefix=no
6581   need_version=no
6582   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6583   soname_spec='${libname}${release}.so$major'
6584   shlibpath_var=LD_LIBRARY_PATH
6585   ;;
6586
6587 sysv4*MP*)
6588   if test -d /usr/nec ;then
6589     version_type=linux
6590     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6591     soname_spec='$libname.so.$major'
6592     shlibpath_var=LD_LIBRARY_PATH
6593   fi
6594   ;;
6595
6596 *)
6597   dynamic_linker=no
6598   ;;
6599 esac
6600 echo "$ac_t""$dynamic_linker" 1>&6
6601 test "$dynamic_linker" = no && can_build_shared=no
6602
6603 # Report the final consequences.
6604 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6605 echo "configure:6606: checking if libtool supports shared libraries" >&5
6606 echo "$ac_t""$can_build_shared" 1>&6
6607
6608 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6609 echo "configure:6610: checking whether to build shared libraries" >&5
6610 test "$can_build_shared" = "no" && enable_shared=no
6611
6612 # On AIX, shared libraries and static libraries use the same namespace, and
6613 # are all built from PIC.
6614 case "$host_os" in
6615 aix3*)
6616   test "$enable_shared" = yes && enable_static=no
6617   if test -n "$RANLIB"; then
6618     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6619     postinstall_cmds='$RANLIB $lib'
6620   fi
6621   ;;
6622
6623 aix4*)
6624   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6625     test "$enable_shared" = yes && enable_static=no
6626   fi
6627   ;;
6628 esac
6629 echo "$ac_t""$enable_shared" 1>&6
6630
6631 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6632 echo "configure:6633: checking whether to build static libraries" >&5
6633 # Make sure either enable_shared or enable_static is yes.
6634 test "$enable_shared" = yes || enable_static=yes
6635 echo "$ac_t""$enable_static" 1>&6
6636
6637 if test "$hardcode_action" = relink; then
6638   # Fast installation is not supported
6639   enable_fast_install=no
6640 elif test "$shlibpath_overrides_runpath" = yes ||
6641      test "$enable_shared" = no; then
6642   # Fast installation is not necessary
6643   enable_fast_install=needless
6644 fi
6645
6646 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6647 if test "$GCC" = yes; then
6648   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6649 fi
6650
6651 if test "x$enable_dlopen" != xyes; then
6652   enable_dlopen=unknown
6653   enable_dlopen_self=unknown
6654   enable_dlopen_self_static=unknown
6655 else
6656   lt_cv_dlopen=no
6657   lt_cv_dlopen_libs=
6658
6659   case $host_os in
6660   beos*)
6661     lt_cv_dlopen="load_add_on"
6662     lt_cv_dlopen_libs=
6663     lt_cv_dlopen_self=yes
6664     ;;
6665
6666   cygwin* | mingw* | pw32*)
6667     lt_cv_dlopen="LoadLibrary"
6668     lt_cv_dlopen_libs=
6669    ;;
6670
6671   *)
6672     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6673 echo "configure:6674: checking for dllload" >&5
6674 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6675   echo $ac_n "(cached) $ac_c" 1>&6
6676 else
6677   cat > conftest.$ac_ext <<EOF
6678 #line 6679 "configure"
6679 #include "confdefs.h"
6680 /* System header to define __stub macros and hopefully few prototypes,
6681     which can conflict with char dllload(); below.  */
6682 #include <assert.h>
6683 /* Override any gcc2 internal prototype to avoid an error.  */
6684 /* We use char because int might match the return type of a gcc2
6685     builtin and then its argument prototype would still apply.  */
6686 char dllload();
6687 char (*f)();
6688
6689 int main() {
6690
6691 /* The GNU C library defines this for functions which it implements
6692     to always fail with ENOSYS.  Some functions are actually named
6693     something starting with __ and the normal name is an alias.  */
6694 #if defined (__stub_dllload) || defined (__stub___dllload)
6695 choke me
6696 #else
6697 f = dllload;
6698 #endif
6699
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   eval "ac_cv_func_dllload=yes"
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   eval "ac_cv_func_dllload=no"
6710 fi
6711 rm -f conftest*
6712 fi
6713
6714 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6715   echo "$ac_t""yes" 1>&6
6716   lt_cv_dlopen="dllload"
6717 else
6718   echo "$ac_t""no" 1>&6
6719 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6720 echo "configure:6721: checking for shl_load" >&5
6721 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* System header to define __stub macros and hopefully few prototypes,
6728     which can conflict with char shl_load(); below.  */
6729 #include <assert.h>
6730 /* Override any gcc2 internal prototype to avoid an error.  */
6731 /* We use char because int might match the return type of a gcc2
6732     builtin and then its argument prototype would still apply.  */
6733 char shl_load();
6734 char (*f)();
6735
6736 int main() {
6737
6738 /* The GNU C library defines this for functions which it implements
6739     to always fail with ENOSYS.  Some functions are actually named
6740     something starting with __ and the normal name is an alias.  */
6741 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6742 choke me
6743 #else
6744 f = shl_load;
6745 #endif
6746
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750   rm -rf conftest*
6751   eval "ac_cv_func_shl_load=yes"
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_func_shl_load=no"
6757 fi
6758 rm -f conftest*
6759 fi
6760
6761 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763   lt_cv_dlopen="shl_load"
6764 else
6765   echo "$ac_t""no" 1>&6
6766 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6767 echo "configure:6768: checking for shl_load in -ldld" >&5
6768 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6770   echo $ac_n "(cached) $ac_c" 1>&6
6771 else
6772   ac_save_LIBS="$LIBS"
6773 LIBS="-ldld  $LIBS"
6774 cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6777 /* Override any gcc2 internal prototype to avoid an error.  */
6778 /* We use char because int might match the return type of a gcc2
6779     builtin and then its argument prototype would still apply.  */
6780 char shl_load();
6781
6782 int main() {
6783 shl_load()
6784 ; return 0; }
6785 EOF
6786 if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6787   rm -rf conftest*
6788   eval "ac_cv_lib_$ac_lib_var=yes"
6789 else
6790   echo "configure: failed program was:" >&5
6791   cat conftest.$ac_ext >&5
6792   rm -rf conftest*
6793   eval "ac_cv_lib_$ac_lib_var=no"
6794 fi
6795 rm -f conftest*
6796 LIBS="$ac_save_LIBS"
6797
6798 fi
6799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6800   echo "$ac_t""yes" 1>&6
6801   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6802 else
6803   echo "$ac_t""no" 1>&6
6804 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6805 echo "configure:6806: checking for dlopen" >&5
6806 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809   cat > conftest.$ac_ext <<EOF
6810 #line 6811 "configure"
6811 #include "confdefs.h"
6812 /* System header to define __stub macros and hopefully few prototypes,
6813     which can conflict with char dlopen(); below.  */
6814 #include <assert.h>
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char dlopen();
6819 char (*f)();
6820
6821 int main() {
6822
6823 /* The GNU C library defines this for functions which it implements
6824     to always fail with ENOSYS.  Some functions are actually named
6825     something starting with __ and the normal name is an alias.  */
6826 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6827 choke me
6828 #else
6829 f = dlopen;
6830 #endif
6831
6832 ; return 0; }
6833 EOF
6834 if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6835   rm -rf conftest*
6836   eval "ac_cv_func_dlopen=yes"
6837 else
6838   echo "configure: failed program was:" >&5
6839   cat conftest.$ac_ext >&5
6840   rm -rf conftest*
6841   eval "ac_cv_func_dlopen=no"
6842 fi
6843 rm -f conftest*
6844 fi
6845
6846 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6847   echo "$ac_t""yes" 1>&6
6848   lt_cv_dlopen="dlopen"
6849 else
6850   echo "$ac_t""no" 1>&6
6851 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6852 echo "configure:6853: checking for dlopen in -ldl" >&5
6853 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6855   echo $ac_n "(cached) $ac_c" 1>&6
6856 else
6857   ac_save_LIBS="$LIBS"
6858 LIBS="-ldl  $LIBS"
6859 cat > conftest.$ac_ext <<EOF
6860 #line 6861 "configure"
6861 #include "confdefs.h"
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char dlopen();
6866
6867 int main() {
6868 dlopen()
6869 ; return 0; }
6870 EOF
6871 if { (eval echo configure:6872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6872   rm -rf conftest*
6873   eval "ac_cv_lib_$ac_lib_var=yes"
6874 else
6875   echo "configure: failed program was:" >&5
6876   cat conftest.$ac_ext >&5
6877   rm -rf conftest*
6878   eval "ac_cv_lib_$ac_lib_var=no"
6879 fi
6880 rm -f conftest*
6881 LIBS="$ac_save_LIBS"
6882
6883 fi
6884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6885   echo "$ac_t""yes" 1>&6
6886   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6887 else
6888   echo "$ac_t""no" 1>&6
6889 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6890 echo "configure:6891: checking for dlopen in -lsvld" >&5
6891 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6892 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6893   echo $ac_n "(cached) $ac_c" 1>&6
6894 else
6895   ac_save_LIBS="$LIBS"
6896 LIBS="-lsvld  $LIBS"
6897 cat > conftest.$ac_ext <<EOF
6898 #line 6899 "configure"
6899 #include "confdefs.h"
6900 /* Override any gcc2 internal prototype to avoid an error.  */
6901 /* We use char because int might match the return type of a gcc2
6902     builtin and then its argument prototype would still apply.  */
6903 char dlopen();
6904
6905 int main() {
6906 dlopen()
6907 ; return 0; }
6908 EOF
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6910   rm -rf conftest*
6911   eval "ac_cv_lib_$ac_lib_var=yes"
6912 else
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   eval "ac_cv_lib_$ac_lib_var=no"
6917 fi
6918 rm -f conftest*
6919 LIBS="$ac_save_LIBS"
6920
6921 fi
6922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6923   echo "$ac_t""yes" 1>&6
6924   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6925 else
6926   echo "$ac_t""no" 1>&6
6927 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6928 echo "configure:6929: checking for dld_link in -ldld" >&5
6929 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6931   echo $ac_n "(cached) $ac_c" 1>&6
6932 else
6933   ac_save_LIBS="$LIBS"
6934 LIBS="-ldld  $LIBS"
6935 cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938 /* Override any gcc2 internal prototype to avoid an error.  */
6939 /* We use char because int might match the return type of a gcc2
6940     builtin and then its argument prototype would still apply.  */
6941 char dld_link();
6942
6943 int main() {
6944 dld_link()
6945 ; return 0; }
6946 EOF
6947 if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6948   rm -rf conftest*
6949   eval "ac_cv_lib_$ac_lib_var=yes"
6950 else
6951   echo "configure: failed program was:" >&5
6952   cat conftest.$ac_ext >&5
6953   rm -rf conftest*
6954   eval "ac_cv_lib_$ac_lib_var=no"
6955 fi
6956 rm -f conftest*
6957 LIBS="$ac_save_LIBS"
6958
6959 fi
6960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6961   echo "$ac_t""yes" 1>&6
6962   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6963 else
6964   echo "$ac_t""no" 1>&6
6965 fi
6966
6967               
6968 fi
6969
6970             
6971 fi
6972
6973           
6974 fi
6975
6976         
6977 fi
6978
6979       
6980 fi
6981
6982     
6983 fi
6984
6985     ;;
6986   esac
6987
6988   if test "x$lt_cv_dlopen" != xno; then
6989     enable_dlopen=yes
6990   else
6991     enable_dlopen=no
6992   fi
6993
6994   case $lt_cv_dlopen in
6995   dlopen)
6996     save_CPPFLAGS="$CPPFLAGS"
6997         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6998
6999     save_LDFLAGS="$LDFLAGS"
7000     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7001
7002     save_LIBS="$LIBS"
7003     LIBS="$lt_cv_dlopen_libs $LIBS"
7004
7005     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7006 echo "configure:7007: checking whether a program can dlopen itself" >&5
7007 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7008   echo $ac_n "(cached) $ac_c" 1>&6
7009 else
7010           if test "$cross_compiling" = yes; then :
7011   lt_cv_dlopen_self=cross
7012 else
7013     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7014   lt_status=$lt_dlunknown
7015   cat > conftest.$ac_ext <<EOF
7016 #line 7017 "configure"
7017 #include "confdefs.h"
7018
7019 #if HAVE_DLFCN_H
7020 #include <dlfcn.h>
7021 #endif
7022
7023 #include <stdio.h>
7024
7025 #ifdef RTLD_GLOBAL
7026 #  define LT_DLGLOBAL           RTLD_GLOBAL
7027 #else
7028 #  ifdef DL_GLOBAL
7029 #    define LT_DLGLOBAL         DL_GLOBAL
7030 #  else
7031 #    define LT_DLGLOBAL         0
7032 #  endif
7033 #endif
7034
7035 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7036    find out it does not work in some platform. */
7037 #ifndef LT_DLLAZY_OR_NOW
7038 #  ifdef RTLD_LAZY
7039 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7040 #  else
7041 #    ifdef DL_LAZY
7042 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7043 #    else
7044 #      ifdef RTLD_NOW
7045 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7046 #      else
7047 #        ifdef DL_NOW
7048 #          define LT_DLLAZY_OR_NOW      DL_NOW
7049 #        else
7050 #          define LT_DLLAZY_OR_NOW      0
7051 #        endif
7052 #      endif
7053 #    endif
7054 #  endif
7055 #endif
7056
7057 #ifdef __cplusplus
7058 extern "C" void exit (int);
7059 #endif
7060
7061 void fnord() { int i=42;}
7062 int main ()
7063 {
7064   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7065   int status = $lt_dlunknown;
7066
7067   if (self)
7068     {
7069       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7070       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7071       /* dlclose (self); */
7072     }
7073
7074     exit (status);
7075 }
7076 EOF
7077   if { (eval echo configure:7078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7078     (./conftest; exit; ) 2>/dev/null
7079     lt_status=$?
7080     case x$lt_status in
7081       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7082       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7083       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7084     esac
7085   else :
7086     # compilation failed
7087     lt_cv_dlopen_self=no
7088   fi
7089 fi
7090 rm -fr conftest*
7091
7092     
7093 fi
7094
7095 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7096
7097     if test "x$lt_cv_dlopen_self" = xyes; then
7098       LDFLAGS="$LDFLAGS $link_static_flag"
7099       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7100 echo "configure:7101: checking whether a statically linked program can dlopen itself" >&5
7101 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7102   echo $ac_n "(cached) $ac_c" 1>&6
7103 else
7104           if test "$cross_compiling" = yes; then :
7105   lt_cv_dlopen_self_static=cross
7106 else
7107     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7108   lt_status=$lt_dlunknown
7109   cat > conftest.$ac_ext <<EOF
7110 #line 7111 "configure"
7111 #include "confdefs.h"
7112
7113 #if HAVE_DLFCN_H
7114 #include <dlfcn.h>
7115 #endif
7116
7117 #include <stdio.h>
7118
7119 #ifdef RTLD_GLOBAL
7120 #  define LT_DLGLOBAL           RTLD_GLOBAL
7121 #else
7122 #  ifdef DL_GLOBAL
7123 #    define LT_DLGLOBAL         DL_GLOBAL
7124 #  else
7125 #    define LT_DLGLOBAL         0
7126 #  endif
7127 #endif
7128
7129 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7130    find out it does not work in some platform. */
7131 #ifndef LT_DLLAZY_OR_NOW
7132 #  ifdef RTLD_LAZY
7133 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7134 #  else
7135 #    ifdef DL_LAZY
7136 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7137 #    else
7138 #      ifdef RTLD_NOW
7139 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7140 #      else
7141 #        ifdef DL_NOW
7142 #          define LT_DLLAZY_OR_NOW      DL_NOW
7143 #        else
7144 #          define LT_DLLAZY_OR_NOW      0
7145 #        endif
7146 #      endif
7147 #    endif
7148 #  endif
7149 #endif
7150
7151 #ifdef __cplusplus
7152 extern "C" void exit (int);
7153 #endif
7154
7155 void fnord() { int i=42;}
7156 int main ()
7157 {
7158   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7159   int status = $lt_dlunknown;
7160
7161   if (self)
7162     {
7163       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7164       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7165       /* dlclose (self); */
7166     }
7167
7168     exit (status);
7169 }
7170 EOF
7171   if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7172     (./conftest; exit; ) 2>/dev/null
7173     lt_status=$?
7174     case x$lt_status in
7175       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7176       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7177       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7178     esac
7179   else :
7180     # compilation failed
7181     lt_cv_dlopen_self_static=no
7182   fi
7183 fi
7184 rm -fr conftest*
7185
7186       
7187 fi
7188
7189 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7190     fi
7191
7192     CPPFLAGS="$save_CPPFLAGS"
7193     LDFLAGS="$save_LDFLAGS"
7194     LIBS="$save_LIBS"
7195     ;;
7196   esac
7197
7198   case $lt_cv_dlopen_self in
7199   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7200   *) enable_dlopen_self=unknown ;;
7201   esac
7202
7203   case $lt_cv_dlopen_self_static in
7204   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7205   *) enable_dlopen_self_static=unknown ;;
7206   esac
7207 fi
7208
7209
7210 if test "$enable_shared" = yes && test "$GCC" = yes; then
7211   case $archive_cmds in
7212   *'~'*)
7213     # FIXME: we may have to deal with multi-command sequences.
7214     ;;
7215   '$CC '*)
7216     # Test whether the compiler implicitly links with -lc since on some
7217     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7218     # to ld, don't add -lc before -lgcc.
7219     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7220 echo "configure:7221: checking whether -lc should be explicitly linked in" >&5
7221     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7222   echo $ac_n "(cached) $ac_c" 1>&6
7223 else
7224   $rm conftest*
7225     echo 'static int dummy;' > conftest.$ac_ext
7226
7227     if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7228       soname=conftest
7229       lib=conftest
7230       libobjs=conftest.$ac_objext
7231       deplibs=
7232       wl=$lt_cv_prog_cc_wl
7233       compiler_flags=-v
7234       linker_flags=-v
7235       verstring=
7236       output_objdir=.
7237       libname=conftest
7238       save_allow_undefined_flag=$allow_undefined_flag
7239       allow_undefined_flag=
7240       if { (eval echo configure:7241: \"$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; }
7241       then
7242         lt_cv_archive_cmds_need_lc=no
7243       else
7244         lt_cv_archive_cmds_need_lc=yes
7245       fi
7246       allow_undefined_flag=$save_allow_undefined_flag
7247     else
7248       cat conftest.err 1>&5
7249     fi
7250 fi
7251
7252     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7253     ;;
7254   esac
7255 fi
7256 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7257
7258 # The second clause should only fire when bootstrapping the
7259 # libtool distribution, otherwise you forgot to ship ltmain.sh
7260 # with your package, and you will get complaints that there are
7261 # no rules to generate ltmain.sh.
7262 if test -f "$ltmain"; then
7263   :
7264 else
7265   # If there is no Makefile yet, we rely on a make rule to execute
7266   # `config.status --recheck' to rerun these tests and create the
7267   # libtool script then.
7268   test -f Makefile && make "$ltmain"
7269 fi
7270
7271 if test -f "$ltmain"; then
7272   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7273   $rm -f "${ofile}T"
7274
7275   echo creating $ofile
7276
7277   # Now quote all the things that may contain metacharacters while being
7278   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7279   # variables and quote the copies for generation of the libtool script.
7280   for var in echo old_CC old_CFLAGS SED \
7281     AR AR_FLAGS CC LD LN_S NM SHELL \
7282     reload_flag reload_cmds wl \
7283     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7284     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7285     library_names_spec soname_spec \
7286     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7287     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7288     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7289     old_striplib striplib file_magic_cmd export_symbols_cmds \
7290     deplibs_check_method allow_undefined_flag no_undefined_flag \
7291     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7292     global_symbol_to_c_name_address \
7293     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7294     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7295     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7296
7297     case $var in
7298     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7299     old_postinstall_cmds | old_postuninstall_cmds | \
7300     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7301     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7302     postinstall_cmds | postuninstall_cmds | \
7303     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7304       # Double-quote double-evaled strings.
7305       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7306       ;;
7307     *)
7308       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7309       ;;
7310     esac
7311   done
7312
7313   cat <<__EOF__ > "${ofile}T"
7314 #! $SHELL
7315
7316 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7317 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7318 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7319 #
7320 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7321 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7322 #
7323 # This program is free software; you can redistribute it and/or modify
7324 # it under the terms of the GNU General Public License as published by
7325 # the Free Software Foundation; either version 2 of the License, or
7326 # (at your option) any later version.
7327 #
7328 # This program is distributed in the hope that it will be useful, but
7329 # WITHOUT ANY WARRANTY; without even the implied warranty of
7330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7331 # General Public License for more details.
7332 #
7333 # You should have received a copy of the GNU General Public License
7334 # along with this program; if not, write to the Free Software
7335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7336 #
7337 # As a special exception to the GNU General Public License, if you
7338 # distribute this file as part of a program that contains a
7339 # configuration script generated by Autoconf, you may include it under
7340 # the same distribution terms that you use for the rest of that program.
7341
7342 # A sed that does not truncate output.
7343 SED=$lt_SED
7344
7345 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7346 Xsed="${SED} -e s/^X//"
7347
7348 # The HP-UX ksh and POSIX shell print the target directory to stdout
7349 # if CDPATH is set.
7350 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7351
7352 # ### BEGIN LIBTOOL CONFIG
7353
7354 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7355
7356 # Shell to use when invoking shell scripts.
7357 SHELL=$lt_SHELL
7358
7359 # Whether or not to build shared libraries.
7360 build_libtool_libs=$enable_shared
7361
7362 # Whether or not to build static libraries.
7363 build_old_libs=$enable_static
7364
7365 # Whether or not to add -lc for building shared libraries.
7366 build_libtool_need_lc=$need_lc
7367
7368 # Whether or not to optimize for fast installation.
7369 fast_install=$enable_fast_install
7370
7371 # The host system.
7372 host_alias=$host_alias
7373 host=$host
7374
7375 # An echo program that does not interpret backslashes.
7376 echo=$lt_echo
7377
7378 # The archiver.
7379 AR=$lt_AR
7380 AR_FLAGS=$lt_AR_FLAGS
7381
7382 # The default C compiler.
7383 CC=$lt_CC
7384
7385 # Is the compiler the GNU C compiler?
7386 with_gcc=$GCC
7387
7388 # The linker used to build libraries.
7389 LD=$lt_LD
7390
7391 # Whether we need hard or soft links.
7392 LN_S=$lt_LN_S
7393
7394 # A BSD-compatible nm program.
7395 NM=$lt_NM
7396
7397 # A symbol stripping program
7398 STRIP=$STRIP
7399
7400 # Used to examine libraries when file_magic_cmd begins "file"
7401 MAGIC_CMD=$MAGIC_CMD
7402
7403 # Used on cygwin: DLL creation program.
7404 DLLTOOL="$DLLTOOL"
7405
7406 # Used on cygwin: object dumper.
7407 OBJDUMP="$OBJDUMP"
7408
7409 # Used on cygwin: assembler.
7410 AS="$AS"
7411
7412 # The name of the directory that contains temporary libtool files.
7413 objdir=$objdir
7414
7415 # How to create reloadable object files.
7416 reload_flag=$lt_reload_flag
7417 reload_cmds=$lt_reload_cmds
7418
7419 # How to pass a linker flag through the compiler.
7420 wl=$lt_wl
7421
7422 # Object file suffix (normally "o").
7423 objext="$ac_objext"
7424
7425 # Old archive suffix (normally "a").
7426 libext="$libext"
7427
7428 # Executable file suffix (normally "").
7429 exeext="$exeext"
7430
7431 # Additional compiler flags for building library objects.
7432 pic_flag=$lt_pic_flag
7433 pic_mode=$pic_mode
7434
7435 # Does compiler simultaneously support -c and -o options?
7436 compiler_c_o=$lt_compiler_c_o
7437
7438 # Can we write directly to a .lo ?
7439 compiler_o_lo=$lt_compiler_o_lo
7440
7441 # Must we lock files when doing compilation ?
7442 need_locks=$lt_need_locks
7443
7444 # Do we need the lib prefix for modules?
7445 need_lib_prefix=$need_lib_prefix
7446
7447 # Do we need a version for libraries?
7448 need_version=$need_version
7449
7450 # Whether dlopen is supported.
7451 dlopen_support=$enable_dlopen
7452
7453 # Whether dlopen of programs is supported.
7454 dlopen_self=$enable_dlopen_self
7455
7456 # Whether dlopen of statically linked programs is supported.
7457 dlopen_self_static=$enable_dlopen_self_static
7458
7459 # Compiler flag to prevent dynamic linking.
7460 link_static_flag=$lt_link_static_flag
7461
7462 # Compiler flag to turn off builtin functions.
7463 no_builtin_flag=$lt_no_builtin_flag
7464
7465 # Compiler flag to allow reflexive dlopens.
7466 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7467
7468 # Compiler flag to generate shared objects directly from archives.
7469 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7470
7471 # Compiler flag to generate thread-safe objects.
7472 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7473
7474 # Library versioning type.
7475 version_type=$version_type
7476
7477 # Format of library name prefix.
7478 libname_spec=$lt_libname_spec
7479
7480 # List of archive names.  First name is the real one, the rest are links.
7481 # The last name is the one that the linker finds with -lNAME.
7482 library_names_spec=$lt_library_names_spec
7483
7484 # The coded name of the library, if different from the real name.
7485 soname_spec=$lt_soname_spec
7486
7487 # Commands used to build and install an old-style archive.
7488 RANLIB=$lt_RANLIB
7489 old_archive_cmds=$lt_old_archive_cmds
7490 old_postinstall_cmds=$lt_old_postinstall_cmds
7491 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7492
7493 # Create an old-style archive from a shared archive.
7494 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7495
7496 # Create a temporary old-style archive to link instead of a shared archive.
7497 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7498
7499 # Commands used to build and install a shared archive.
7500 archive_cmds=$lt_archive_cmds
7501 archive_expsym_cmds=$lt_archive_expsym_cmds
7502 postinstall_cmds=$lt_postinstall_cmds
7503 postuninstall_cmds=$lt_postuninstall_cmds
7504
7505 # Commands to strip libraries.
7506 old_striplib=$lt_old_striplib
7507 striplib=$lt_striplib
7508
7509 # Method to check whether dependent libraries are shared objects.
7510 deplibs_check_method=$lt_deplibs_check_method
7511
7512 # Command to use when deplibs_check_method == file_magic.
7513 file_magic_cmd=$lt_file_magic_cmd
7514
7515 # Flag that allows shared libraries with undefined symbols to be built.
7516 allow_undefined_flag=$lt_allow_undefined_flag
7517
7518 # Flag that forces no undefined symbols.
7519 no_undefined_flag=$lt_no_undefined_flag
7520
7521 # Commands used to finish a libtool library installation in a directory.
7522 finish_cmds=$lt_finish_cmds
7523
7524 # Same as above, but a single script fragment to be evaled but not shown.
7525 finish_eval=$lt_finish_eval
7526
7527 # Take the output of nm and produce a listing of raw symbols and C names.
7528 global_symbol_pipe=$lt_global_symbol_pipe
7529
7530 # Transform the output of nm in a proper C declaration
7531 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7532
7533 # Transform the output of nm in a C name address pair
7534 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7535
7536 # This is the shared library runtime path variable.
7537 runpath_var=$runpath_var
7538
7539 # This is the shared library path variable.
7540 shlibpath_var=$shlibpath_var
7541
7542 # Is shlibpath searched before the hard-coded library search path?
7543 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7544
7545 # How to hardcode a shared library path into an executable.
7546 hardcode_action=$hardcode_action
7547
7548 # Whether we should hardcode library paths into libraries.
7549 hardcode_into_libs=$hardcode_into_libs
7550
7551 # Flag to hardcode \$libdir into a binary during linking.
7552 # This must work even if \$libdir does not exist.
7553 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7554
7555 # Whether we need a single -rpath flag with a separated argument.
7556 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7557
7558 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7559 # resulting binary.
7560 hardcode_direct=$hardcode_direct
7561
7562 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7563 # resulting binary.
7564 hardcode_minus_L=$hardcode_minus_L
7565
7566 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7567 # the resulting binary.
7568 hardcode_shlibpath_var=$hardcode_shlibpath_var
7569
7570 # Variables whose values should be saved in libtool wrapper scripts and
7571 # restored at relink time.
7572 variables_saved_for_relink="$variables_saved_for_relink"
7573
7574 # Whether libtool must link a program against all its dependency libraries.
7575 link_all_deplibs=$link_all_deplibs
7576
7577 # Compile-time system search path for libraries
7578 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7579
7580 # Run-time system search path for libraries
7581 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7582
7583 # Fix the shell variable \$srcfile for the compiler.
7584 fix_srcfile_path="$fix_srcfile_path"
7585
7586 # Set to yes if exported symbols are required.
7587 always_export_symbols=$always_export_symbols
7588
7589 # The commands to list exported symbols.
7590 export_symbols_cmds=$lt_export_symbols_cmds
7591
7592 # The commands to extract the exported symbol list from a shared archive.
7593 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7594
7595 # Symbols that should not be listed in the preloaded symbols.
7596 exclude_expsyms=$lt_exclude_expsyms
7597
7598 # Symbols that must always be exported.
7599 include_expsyms=$lt_include_expsyms
7600
7601 # ### END LIBTOOL CONFIG
7602
7603 __EOF__
7604
7605   case $host_os in
7606   aix3*)
7607     cat <<\EOF >> "${ofile}T"
7608
7609 # AIX sometimes has problems with the GCC collect2 program.  For some
7610 # reason, if we set the COLLECT_NAMES environment variable, the problems
7611 # vanish in a puff of smoke.
7612 if test "X${COLLECT_NAMES+set}" != Xset; then
7613   COLLECT_NAMES=
7614   export COLLECT_NAMES
7615 fi
7616 EOF
7617     ;;
7618   esac
7619
7620   case $host_os in
7621   cygwin* | mingw* | pw32* | os2*)
7622     cat <<'EOF' >> "${ofile}T"
7623       # This is a source program that is used to create dlls on Windows
7624       # Don't remove nor modify the starting and closing comments
7625 # /* ltdll.c starts here */
7626 # #define WIN32_LEAN_AND_MEAN
7627 # #include <windows.h>
7628 # #undef WIN32_LEAN_AND_MEAN
7629 # #include <stdio.h>
7630 #
7631 # #ifndef __CYGWIN__
7632 # #  ifdef __CYGWIN32__
7633 # #    define __CYGWIN__ __CYGWIN32__
7634 # #  endif
7635 # #endif
7636 #
7637 # #ifdef __cplusplus
7638 # extern "C" {
7639 # #endif
7640 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7641 # #ifdef __cplusplus
7642 # }
7643 # #endif
7644 #
7645 # #ifdef __CYGWIN__
7646 # #include <cygwin/cygwin_dll.h>
7647 # DECLARE_CYGWIN_DLL( DllMain );
7648 # #endif
7649 # HINSTANCE __hDllInstance_base;
7650 #
7651 # BOOL APIENTRY
7652 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7653 # {
7654 #   __hDllInstance_base = hInst;
7655 #   return TRUE;
7656 # }
7657 # /* ltdll.c ends here */
7658         # This is a source program that is used to create import libraries
7659         # on Windows for dlls which lack them. Don't remove nor modify the
7660         # starting and closing comments
7661 # /* impgen.c starts here */
7662 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7663 #
7664 #  This file is part of GNU libtool.
7665 #
7666 #  This program is free software; you can redistribute it and/or modify
7667 #  it under the terms of the GNU General Public License as published by
7668 #  the Free Software Foundation; either version 2 of the License, or
7669 #  (at your option) any later version.
7670 #
7671 #  This program is distributed in the hope that it will be useful,
7672 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7673 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7674 #  GNU General Public License for more details.
7675 #
7676 #  You should have received a copy of the GNU General Public License
7677 #  along with this program; if not, write to the Free Software
7678 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7679 #  */
7680 #
7681 # #include <stdio.h>            /* for printf() */
7682 # #include <unistd.h>           /* for open(), lseek(), read() */
7683 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7684 # #include <string.h>           /* for strdup() */
7685 #
7686 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7687 # #ifndef O_BINARY
7688 # #define O_BINARY 0
7689 # #endif
7690 #
7691 # static unsigned int
7692 # pe_get16 (fd, offset)
7693 #      int fd;
7694 #      int offset;
7695 # {
7696 #   unsigned char b[2];
7697 #   lseek (fd, offset, SEEK_SET);
7698 #   read (fd, b, 2);
7699 #   return b[0] + (b[1]<<8);
7700 # }
7701 #
7702 # static unsigned int
7703 # pe_get32 (fd, offset)
7704 #     int fd;
7705 #     int offset;
7706 # {
7707 #   unsigned char b[4];
7708 #   lseek (fd, offset, SEEK_SET);
7709 #   read (fd, b, 4);
7710 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7711 # }
7712 #
7713 # static unsigned int
7714 # pe_as32 (ptr)
7715 #      void *ptr;
7716 # {
7717 #   unsigned char *b = ptr;
7718 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7719 # }
7720 #
7721 # int
7722 # main (argc, argv)
7723 #     int argc;
7724 #     char *argv[];
7725 # {
7726 #     int dll;
7727 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7728 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7729 #     unsigned long name_rvas, nexp;
7730 #     unsigned char *expdata, *erva;
7731 #     char *filename, *dll_name;
7732 #
7733 #     filename = argv[1];
7734 #
7735 #     dll = open(filename, O_RDONLY|O_BINARY);
7736 #     if (dll < 1)
7737 #       return 1;
7738 #
7739 #     dll_name = filename;
7740 #
7741 #     for (i=0; filename[i]; i++)
7742 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7743 #           dll_name = filename + i +1;
7744 #
7745 #     pe_header_offset = pe_get32 (dll, 0x3c);
7746 #     opthdr_ofs = pe_header_offset + 4 + 20;
7747 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7748 #
7749 #     if (num_entries < 1) /* no exports */
7750 #       return 1;
7751 #
7752 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7753 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7754 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7755 #     secptr = (pe_header_offset + 4 + 20 +
7756 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7757 #
7758 #     expptr = 0;
7759 #     for (i = 0; i < nsections; i++)
7760 #     {
7761 #       char sname[8];
7762 #       unsigned long secptr1 = secptr + 40 * i;
7763 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7764 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7765 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7766 #       lseek(dll, secptr1, SEEK_SET);
7767 #       read(dll, sname, 8);
7768 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7769 #       {
7770 #           expptr = fptr + (export_rva - vaddr);
7771 #           if (export_rva + export_size > vaddr + vsize)
7772 #               export_size = vsize - (export_rva - vaddr);
7773 #           break;
7774 #       }
7775 #     }
7776 #
7777 #     expdata = (unsigned char*)malloc(export_size);
7778 #     lseek (dll, expptr, SEEK_SET);
7779 #     read (dll, expdata, export_size);
7780 #     erva = expdata - export_rva;
7781 #
7782 #     nexp = pe_as32 (expdata+24);
7783 #     name_rvas = pe_as32 (expdata+32);
7784 #
7785 #     printf ("EXPORTS\n");
7786 #     for (i = 0; i<nexp; i++)
7787 #     {
7788 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7789 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7790 #     }
7791 #
7792 #     return 0;
7793 # }
7794 # /* impgen.c ends here */
7795
7796 EOF
7797     ;;
7798   esac
7799
7800   # We use sed instead of cat because bash on DJGPP gets confused if
7801   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7802   # text mode, it properly converts lines to CR/LF.  This bash problem
7803   # is reportedly fixed, but why not run on old versions too?
7804   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7805
7806   mv -f "${ofile}T" "$ofile" || \
7807     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7808   chmod +x "$ofile"
7809 fi
7810
7811
7812
7813
7814
7815 # This can be used to rebuild libtool when needed
7816 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7817
7818 # Always use our own libtool.
7819 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7820
7821 # Prevent multiple expansion
7822
7823
7824
7825 # test for ln hardlink support
7826 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7827 echo "configure:7828: checking whether ln works" >&5
7828 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7829   echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831   rm -f conftest.src conftest.dst
7832 echo "conftest" > conftest.src
7833 if ln conftest.src conftest.dst 2>/dev/null
7834 then
7835   ol_cv_prog_LN_H="ln"
7836 else
7837   ol_cv_prog_LN_H="cp"
7838 fi
7839 rm -f conftest.src conftest.dst
7840
7841 fi
7842 LN_H="$ol_cv_prog_LN_H"
7843 if test "$ol_cv_prog_LN_H" = "ln"; then
7844         echo "$ac_t""yes" 1>&6
7845 else
7846         echo "$ac_t""no" 1>&6
7847 fi
7848
7849 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7850 echo "configure:7851: checking whether ln -s works" >&5
7851 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7852   echo $ac_n "(cached) $ac_c" 1>&6
7853 else
7854   rm -f conftestdata
7855 if ln -s X conftestdata 2>/dev/null
7856 then
7857   rm -f conftestdata
7858   ac_cv_prog_LN_S="ln -s"
7859 else
7860   ac_cv_prog_LN_S=ln
7861 fi
7862 fi
7863 LN_S="$ac_cv_prog_LN_S"
7864 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7865   echo "$ac_t""yes" 1>&6
7866 else
7867   echo "$ac_t""no" 1>&6
7868 fi
7869
7870
7871 ol_link_perl=no
7872 if test $ol_enable_perl != no ; then
7873         # Extract the first word of "perl", so it can be a program name with args.
7874 set dummy perl; ac_word=$2
7875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7876 echo "configure:7877: checking for $ac_word" >&5
7877 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   case "$PERLBIN" in
7881   /*)
7882   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7883   ;;
7884   ?:/*)
7885   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7886   ;;
7887   *)
7888   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7889   ac_dummy="$PATH"
7890   for ac_dir in $ac_dummy; do 
7891     test -z "$ac_dir" && ac_dir=.
7892     if test -f $ac_dir/$ac_word; then
7893       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7894       break
7895     fi
7896   done
7897   IFS="$ac_save_ifs"
7898   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7899   ;;
7900 esac
7901 fi
7902 PERLBIN="$ac_cv_path_PERLBIN"
7903 if test -n "$PERLBIN"; then
7904   echo "$ac_t""$PERLBIN" 1>&6
7905 else
7906   echo "$ac_t""no" 1>&6
7907 fi
7908
7909
7910         if test "no$PERLBIN" = "no" ; then
7911                 if test $ol_enable_perl = yes ; then
7912                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7913                 fi
7914
7915         else
7916                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7917                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7918
7919                 if test x"$ol_with_perl_module" = "xstatic" ; then
7920                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7921                 else
7922                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7923                 fi
7924                                 ol_link_perl=yes
7925         fi
7926 fi
7927
7928 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7929 echo "configure:7930: checking how to run the C preprocessor" >&5
7930 # On Suns, sometimes $CPP names a directory.
7931 if test -n "$CPP" && test -d "$CPP"; then
7932   CPP=
7933 fi
7934 if test -z "$CPP"; then
7935 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938     # This must be in double quotes, not single quotes, because CPP may get
7939   # substituted into the Makefile and "${CC-cc}" will confuse make.
7940   CPP="${CC-cc} -E"
7941   # On the NeXT, cc -E runs the code through the compiler's parser,
7942   # not just through cpp.
7943   cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 #include <assert.h>
7947 Syntax Error
7948 EOF
7949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7950 { (eval echo configure:7951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7952 if test -z "$ac_err"; then
7953   :
7954 else
7955   echo "$ac_err" >&5
7956   echo "configure: failed program was:" >&5
7957   cat conftest.$ac_ext >&5
7958   rm -rf conftest*
7959   CPP="${CC-cc} -E -traditional-cpp"
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 #include <assert.h>
7964 Syntax Error
7965 EOF
7966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7967 { (eval echo configure:7968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7969 if test -z "$ac_err"; then
7970   :
7971 else
7972   echo "$ac_err" >&5
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   CPP="${CC-cc} -nologo -E"
7977   cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 #include <assert.h>
7981 Syntax Error
7982 EOF
7983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7984 { (eval echo configure:7985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7986 if test -z "$ac_err"; then
7987   :
7988 else
7989   echo "$ac_err" >&5
7990   echo "configure: failed program was:" >&5
7991   cat conftest.$ac_ext >&5
7992   rm -rf conftest*
7993   CPP=/lib/cpp
7994 fi
7995 rm -f conftest*
7996 fi
7997 rm -f conftest*
7998 fi
7999 rm -f conftest*
8000   ac_cv_prog_CPP="$CPP"
8001 fi
8002   CPP="$ac_cv_prog_CPP"
8003 else
8004   ac_cv_prog_CPP="$CPP"
8005 fi
8006 echo "$ac_t""$CPP" 1>&6
8007
8008
8009 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8010         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8011
8012 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8013         echo "configure: warning: programs compiled here do run here..." 1>&2
8014         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8015
8016 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8017         echo "configure: warning: programs compiled here do not run here..." 1>&2
8018         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8019 fi
8020
8021
8022 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8023 echo "configure:8024: checking for Cygwin environment" >&5
8024 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8025   echo $ac_n "(cached) $ac_c" 1>&6
8026 else
8027   cat > conftest.$ac_ext <<EOF
8028 #line 8029 "configure"
8029 #include "confdefs.h"
8030
8031 int main() {
8032
8033 #ifndef __CYGWIN__
8034 #define __CYGWIN__ __CYGWIN32__
8035 #endif
8036 return __CYGWIN__;
8037 ; return 0; }
8038 EOF
8039 if { (eval echo configure:8040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8040   rm -rf conftest*
8041   ac_cv_cygwin=yes
8042 else
8043   echo "configure: failed program was:" >&5
8044   cat conftest.$ac_ext >&5
8045   rm -rf conftest*
8046   ac_cv_cygwin=no
8047 fi
8048 rm -f conftest*
8049 fi
8050
8051 echo "$ac_t""$ac_cv_cygwin" 1>&6
8052 CYGWIN=
8053 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8054 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8055 echo "configure:8056: checking for mingw32 environment" >&5
8056 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062
8063 int main() {
8064 return __MINGW32__;
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8068   rm -rf conftest*
8069   ac_cv_mingw32=yes
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   ac_cv_mingw32=no
8075 fi
8076 rm -f conftest*
8077 fi
8078
8079 echo "$ac_t""$ac_cv_mingw32" 1>&6
8080 MINGW32=
8081 test "$ac_cv_mingw32" = yes && MINGW32=yes
8082
8083
8084
8085 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8086 echo "configure:8087: checking for executable suffix" >&5
8087 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8091   ac_cv_exeext=.exe
8092 else
8093   rm -f conftest*
8094   echo 'int main () { return 0; }' > conftest.$ac_ext
8095   ac_cv_exeext=
8096   if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8097     for file in conftest.*; do
8098       case $file in
8099       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8100       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8101       esac
8102     done
8103   else
8104     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8105   fi
8106   rm -f conftest*
8107   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8108 fi
8109 fi
8110
8111 EXEEXT=""
8112 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8113 echo "$ac_t""${ac_cv_exeext}" 1>&6
8114 ac_exeext=$EXEEXT
8115
8116 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8117 echo "configure:8118: checking for object suffix" >&5
8118 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   rm -f conftest*
8122 echo 'int i = 1;' > conftest.$ac_ext
8123 if { (eval echo configure:8124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8124   for ac_file in conftest.*; do
8125     case $ac_file in
8126     *.c) ;;
8127     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8128     esac
8129   done
8130 else
8131   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8132 fi
8133 rm -f conftest*
8134 fi
8135
8136 echo "$ac_t""$ac_cv_objext" 1>&6
8137 OBJEXT=$ac_cv_objext
8138 ac_objext=$ac_cv_objext
8139
8140
8141 cat >> confdefs.h <<EOF
8142 #define EXEEXT "${EXEEXT}"
8143 EOF
8144
8145
8146 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8147 echo "configure:8148: checking for be_app in -lbe" >&5
8148 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8150   echo $ac_n "(cached) $ac_c" 1>&6
8151 else
8152   ac_save_LIBS="$LIBS"
8153 LIBS="-lbe -lroot -lnet $LIBS"
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* Override any gcc2 internal prototype to avoid an error.  */
8158 /* We use char because int might match the return type of a gcc2
8159     builtin and then its argument prototype would still apply.  */
8160 char be_app();
8161
8162 int main() {
8163 be_app()
8164 ; return 0; }
8165 EOF
8166 if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=yes"
8169 else
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   eval "ac_cv_lib_$ac_lib_var=no"
8174 fi
8175 rm -f conftest*
8176 LIBS="$ac_save_LIBS"
8177
8178 fi
8179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8180   echo "$ac_t""yes" 1>&6
8181   LIBS="$LIBS -lbe -lroot -lnet"
8182 else
8183   echo "$ac_t""no" 1>&6
8184 :
8185 fi
8186
8187
8188
8189
8190
8191 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8192 echo "configure:8193: checking for ${CC-cc} option to accept ANSI C" >&5
8193 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   am_cv_prog_cc_stdc=no
8197 ac_save_CC="$CC"
8198 # Don't try gcc -ansi; that turns off useful extensions and
8199 # breaks some systems' header files.
8200 # AIX                   -qlanglvl=ansi
8201 # Ultrix and OSF/1      -std1
8202 # HP-UX 10.20 and later -Ae
8203 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8204 # SVR4                  -Xc -D__EXTENSIONS__
8205 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8206 do
8207   CC="$ac_save_CC $ac_arg"
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 #include <stdarg.h>
8212 #include <stdio.h>
8213 #include <sys/types.h>
8214 #include <sys/stat.h>
8215 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8216 struct buf { int x; };
8217 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8218 static char *e (p, i)
8219      char **p;
8220      int i;
8221 {
8222   return p[i];
8223 }
8224 static char *f (char * (*g) (char **, int), char **p, ...)
8225 {
8226   char *s;
8227   va_list v;
8228   va_start (v,p);
8229   s = g (p, va_arg (v,int));
8230   va_end (v);
8231   return s;
8232 }
8233 int test (int i, double x);
8234 struct s1 {int (*f) (int a);};
8235 struct s2 {int (*f) (double a);};
8236 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8237 int argc;
8238 char **argv;
8239
8240 int main() {
8241
8242 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8243
8244 ; return 0; }
8245 EOF
8246 if { (eval echo configure:8247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8247   rm -rf conftest*
8248   am_cv_prog_cc_stdc="$ac_arg"; break
8249 else
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252 fi
8253 rm -f conftest*
8254 done
8255 CC="$ac_save_CC"
8256
8257 fi
8258
8259 if test -z "$am_cv_prog_cc_stdc"; then
8260   echo "$ac_t""none needed" 1>&6
8261 else
8262   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8263 fi
8264 case "x$am_cv_prog_cc_stdc" in
8265   x|xno) ;;
8266   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8267 esac
8268
8269 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8270         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8271 fi
8272
8273 # test for make depend flag
8274 OL_MKDEP=
8275 OL_MKDEP_FLAGS=
8276 if test -z "${MKDEP}"; then
8277         OL_MKDEP="${CC-cc}"
8278         if test -z "${MKDEP_FLAGS}"; then
8279                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8280 echo "configure:8281: checking for ${OL_MKDEP} depend flag" >&5
8281 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   
8285                         ol_cv_mkdep=no
8286                         for flag in "-M" "-xM"; do
8287                                 cat > conftest.c <<EOF
8288  noCode;
8289 EOF
8290                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8291                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8292                                 then
8293                                         if test ! -f conftest."${ac_object}" ; then
8294                                                 ol_cv_mkdep=$flag
8295                                                 OL_MKDEP_FLAGS="$flag"
8296                                                 break
8297                                         fi
8298                                 fi
8299                         done
8300                         rm -f conftest*
8301                 
8302 fi
8303
8304 echo "$ac_t""$ol_cv_mkdep" 1>&6
8305         else
8306                 cc_cv_mkdep=yes
8307                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8308         fi
8309 else
8310         cc_cv_mkdep=yes
8311         OL_MKDEP="${MKDEP}"
8312         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8313 fi
8314
8315
8316
8317 if test "${ol_cv_mkdep}" = no ; then
8318         # this will soon become an error
8319         echo "configure: warning: do not know how to generate dependencies" 1>&2
8320 fi
8321
8322 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8323 echo "configure:8324: checking for afopen in -ls" >&5
8324 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8326   echo $ac_n "(cached) $ac_c" 1>&6
8327 else
8328   ac_save_LIBS="$LIBS"
8329 LIBS="-ls  $LIBS"
8330 cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 /* Override any gcc2 internal prototype to avoid an error.  */
8334 /* We use char because int might match the return type of a gcc2
8335     builtin and then its argument prototype would still apply.  */
8336 char afopen();
8337
8338 int main() {
8339 afopen()
8340 ; return 0; }
8341 EOF
8342 if { (eval echo configure:8343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8343   rm -rf conftest*
8344   eval "ac_cv_lib_$ac_lib_var=yes"
8345 else
8346   echo "configure: failed program was:" >&5
8347   cat conftest.$ac_ext >&5
8348   rm -rf conftest*
8349   eval "ac_cv_lib_$ac_lib_var=no"
8350 fi
8351 rm -f conftest*
8352 LIBS="$ac_save_LIBS"
8353
8354 fi
8355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357   
8358         AUTH_LIBS=-ls
8359         cat >> confdefs.h <<\EOF
8360 #define HAVE_AIX_SECURITY 1
8361 EOF
8362
8363
8364 else
8365   echo "$ac_t""no" 1>&6
8366 fi
8367
8368
8369 case "$target" in
8370 *-ibm-openedition)
8371         ac_cv_func_getopt=no
8372         cat >> confdefs.h <<\EOF
8373 #define BOTH_STRINGS_H 1
8374 EOF
8375
8376         ;;
8377 esac
8378
8379 ol_link_modules=no
8380 if test $ol_enable_modules != no ; then
8381         for ac_hdr in ltdl.h
8382 do
8383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8385 echo "configure:8386: checking for $ac_hdr" >&5
8386 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8387   echo $ac_n "(cached) $ac_c" 1>&6
8388 else
8389   cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 #include <$ac_hdr>
8393 EOF
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8398   rm -rf conftest*
8399   eval "ac_cv_header_$ac_safe=yes"
8400 else
8401   echo "$ac_err" >&5
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   eval "ac_cv_header_$ac_safe=no"
8406 fi
8407 rm -f conftest*
8408 fi
8409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8410   echo "$ac_t""yes" 1>&6
8411     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8412   cat >> confdefs.h <<EOF
8413 #define $ac_tr_hdr 1
8414 EOF
8415  
8416 else
8417   echo "$ac_t""no" 1>&6
8418 fi
8419 done
8420
8421
8422         if test $ac_cv_header_ltdl_h = no ; then
8423                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8424         fi
8425
8426         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8427 echo "configure:8428: checking for lt_dlinit in -lltdl" >&5
8428 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   ac_save_LIBS="$LIBS"
8433 LIBS="-lltdl  $LIBS"
8434 cat > conftest.$ac_ext <<EOF
8435 #line 8436 "configure"
8436 #include "confdefs.h"
8437 /* Override any gcc2 internal prototype to avoid an error.  */
8438 /* We use char because int might match the return type of a gcc2
8439     builtin and then its argument prototype would still apply.  */
8440 char lt_dlinit();
8441
8442 int main() {
8443 lt_dlinit()
8444 ; return 0; }
8445 EOF
8446 if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8447   rm -rf conftest*
8448   eval "ac_cv_lib_$ac_lib_var=yes"
8449 else
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   eval "ac_cv_lib_$ac_lib_var=no"
8454 fi
8455 rm -f conftest*
8456 LIBS="$ac_save_LIBS"
8457
8458 fi
8459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8460   echo "$ac_t""yes" 1>&6
8461   
8462                 MODULES_LIBS=-lltdl
8463                 cat >> confdefs.h <<\EOF
8464 #define HAVE_LIBLTDL 1
8465 EOF
8466
8467         
8468 else
8469   echo "$ac_t""no" 1>&6
8470 fi
8471
8472
8473         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8474                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8475         fi
8476         ol_link_modules=yes
8477 else
8478         ol_with_bdb_module=static
8479         ol_with_dnssrv_module=static
8480         ol_with_hdb_module=static
8481         ol_with_ldap_module=static
8482         ol_with_ldbm_module=static
8483         ol_with_meta_module=static
8484         ol_with_monitor_module=static
8485         ol_with_null_module=static
8486         ol_with_passwd_module=static
8487         ol_with_perl_module=static
8488         ol_with_shell_module=static
8489         ol_with_sql_module=static
8490         if test $ol_with_dyngroup = mod ; then
8491                 echo "configure: warning: building static dyngroup overlay" 1>&2
8492                 ol_with_dyngroup=yes
8493         fi
8494         if test $ol_with_proxycache = mod ; then
8495                 echo "configure: warning: building static proxycache overlay" 1>&2
8496                 ol_with_proxycache=yes
8497         fi
8498 fi
8499
8500 # test for EBCDIC
8501 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8502 echo "configure:8503: checking for EBCDIC" >&5
8503 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8504   echo $ac_n "(cached) $ac_c" 1>&6
8505 else
8506   
8507         cat > conftest.$ac_ext <<EOF
8508 #line 8509 "configure"
8509 #include "confdefs.h"
8510
8511 #if !('M' == 0xd4)
8512 #include <__ASCII__/generate_error.h>
8513 #endif
8514
8515 EOF
8516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8517 { (eval echo configure:8518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8519 if test -z "$ac_err"; then
8520   rm -rf conftest*
8521   ol_cv_cpp_ebcdic=yes
8522 else
8523   echo "$ac_err" >&5
8524   echo "configure: failed program was:" >&5
8525   cat conftest.$ac_ext >&5
8526   rm -rf conftest*
8527   ol_cv_cpp_ebcdic=no
8528 fi
8529 rm -f conftest*
8530 fi
8531
8532 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8533 if test $ol_cv_cpp_ebcdic = yes ; then
8534         cat >> confdefs.h <<\EOF
8535 #define HAVE_EBCDIC 1
8536 EOF
8537
8538 fi
8539
8540 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8541 echo "configure:8542: checking for ANSI C header files" >&5
8542 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8543   echo $ac_n "(cached) $ac_c" 1>&6
8544 else
8545   cat > conftest.$ac_ext <<EOF
8546 #line 8547 "configure"
8547 #include "confdefs.h"
8548 #include <stdlib.h>
8549 #include <stdarg.h>
8550 #include <string.h>
8551 #include <float.h>
8552 EOF
8553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8554 { (eval echo configure:8555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8556 if test -z "$ac_err"; then
8557   rm -rf conftest*
8558   ol_cv_header_stdc=yes
8559 else
8560   echo "$ac_err" >&5
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   ol_cv_header_stdc=no
8565 fi
8566 rm -f conftest*
8567
8568 if test $ol_cv_header_stdc = yes; then
8569   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8570 cat > conftest.$ac_ext <<EOF
8571 #line 8572 "configure"
8572 #include "confdefs.h"
8573 #include <string.h>
8574 EOF
8575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8576   egrep "memchr" >/dev/null 2>&1; then
8577   :
8578 else
8579   rm -rf conftest*
8580   ol_cv_header_stdc=no
8581 fi
8582 rm -f conftest*
8583
8584 fi
8585
8586 if test $ol_cv_header_stdc = yes; then
8587   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8588 cat > conftest.$ac_ext <<EOF
8589 #line 8590 "configure"
8590 #include "confdefs.h"
8591 #include <stdlib.h>
8592 EOF
8593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8594   egrep "free" >/dev/null 2>&1; then
8595   :
8596 else
8597   rm -rf conftest*
8598   ol_cv_header_stdc=no
8599 fi
8600 rm -f conftest*
8601
8602 fi
8603
8604 if test $ol_cv_header_stdc = yes; then
8605   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8606 if test "$cross_compiling" = yes; then
8607   :
8608 else
8609   cat > conftest.$ac_ext <<EOF
8610 #line 8611 "configure"
8611 #include "confdefs.h"
8612 #include <ctype.h>
8613 #ifndef HAVE_EBCDIC
8614 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8615 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8616 #else
8617 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8618                 || ('j' <= (c) && (c) <= 'r') \
8619                 || ('s' <= (c) && (c) <= 'z'))
8620 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8621 #endif
8622 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8623 int main () { int i; for (i = 0; i < 256; i++)
8624 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8625 exit (0); }
8626
8627 EOF
8628 if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8629 then
8630   :
8631 else
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -fr conftest*
8635   ol_cv_header_stdc=no
8636 fi
8637 rm -fr conftest*
8638 fi
8639
8640 fi
8641 fi
8642
8643 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8644 if test $ol_cv_header_stdc = yes; then
8645   cat >> confdefs.h <<\EOF
8646 #define STDC_HEADERS 1
8647 EOF
8648
8649 fi
8650 ac_cv_header_stdc=disable
8651
8652
8653 if test $ol_cv_header_stdc != yes; then
8654         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8655 fi
8656
8657 ac_header_dirent=no
8658 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8659 do
8660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8661 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8662 echo "configure:8663: checking for $ac_hdr that defines DIR" >&5
8663 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8664   echo $ac_n "(cached) $ac_c" 1>&6
8665 else
8666   cat > conftest.$ac_ext <<EOF
8667 #line 8668 "configure"
8668 #include "confdefs.h"
8669 #include <sys/types.h>
8670 #include <$ac_hdr>
8671 int main() {
8672 DIR *dirp = 0;
8673 ; return 0; }
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8676   rm -rf conftest*
8677   eval "ac_cv_header_dirent_$ac_safe=yes"
8678 else
8679   echo "configure: failed program was:" >&5
8680   cat conftest.$ac_ext >&5
8681   rm -rf conftest*
8682   eval "ac_cv_header_dirent_$ac_safe=no"
8683 fi
8684 rm -f conftest*
8685 fi
8686 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8687   echo "$ac_t""yes" 1>&6
8688     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8689   cat >> confdefs.h <<EOF
8690 #define $ac_tr_hdr 1
8691 EOF
8692  ac_header_dirent=$ac_hdr; break
8693 else
8694   echo "$ac_t""no" 1>&6
8695 fi
8696 done
8697 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8698 if test $ac_header_dirent = dirent.h; then
8699 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8700 echo "configure:8701: checking for opendir in -ldir" >&5
8701 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8703   echo $ac_n "(cached) $ac_c" 1>&6
8704 else
8705   ac_save_LIBS="$LIBS"
8706 LIBS="-ldir  $LIBS"
8707 cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 /* Override any gcc2 internal prototype to avoid an error.  */
8711 /* We use char because int might match the return type of a gcc2
8712     builtin and then its argument prototype would still apply.  */
8713 char opendir();
8714
8715 int main() {
8716 opendir()
8717 ; return 0; }
8718 EOF
8719 if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8720   rm -rf conftest*
8721   eval "ac_cv_lib_$ac_lib_var=yes"
8722 else
8723   echo "configure: failed program was:" >&5
8724   cat conftest.$ac_ext >&5
8725   rm -rf conftest*
8726   eval "ac_cv_lib_$ac_lib_var=no"
8727 fi
8728 rm -f conftest*
8729 LIBS="$ac_save_LIBS"
8730
8731 fi
8732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8733   echo "$ac_t""yes" 1>&6
8734   LIBS="$LIBS -ldir"
8735 else
8736   echo "$ac_t""no" 1>&6
8737 fi
8738
8739 else
8740 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8741 echo "configure:8742: checking for opendir in -lx" >&5
8742 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8744   echo $ac_n "(cached) $ac_c" 1>&6
8745 else
8746   ac_save_LIBS="$LIBS"
8747 LIBS="-lx  $LIBS"
8748 cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 /* Override any gcc2 internal prototype to avoid an error.  */
8752 /* We use char because int might match the return type of a gcc2
8753     builtin and then its argument prototype would still apply.  */
8754 char opendir();
8755
8756 int main() {
8757 opendir()
8758 ; return 0; }
8759 EOF
8760 if { (eval echo configure:8761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8761   rm -rf conftest*
8762   eval "ac_cv_lib_$ac_lib_var=yes"
8763 else
8764   echo "configure: failed program was:" >&5
8765   cat conftest.$ac_ext >&5
8766   rm -rf conftest*
8767   eval "ac_cv_lib_$ac_lib_var=no"
8768 fi
8769 rm -f conftest*
8770 LIBS="$ac_save_LIBS"
8771
8772 fi
8773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8774   echo "$ac_t""yes" 1>&6
8775   LIBS="$LIBS -lx"
8776 else
8777   echo "$ac_t""no" 1>&6
8778 fi
8779
8780 fi
8781
8782 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8783 echo "configure:8784: checking for sys/wait.h that is POSIX.1 compatible" >&5
8784 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8785   echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787   cat > conftest.$ac_ext <<EOF
8788 #line 8789 "configure"
8789 #include "confdefs.h"
8790 #include <sys/types.h>
8791 #include <sys/wait.h>
8792 #ifndef WEXITSTATUS
8793 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8794 #endif
8795 #ifndef WIFEXITED
8796 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8797 #endif
8798 int main() {
8799 int s;
8800 wait (&s);
8801 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8802 ; return 0; }
8803 EOF
8804 if { (eval echo configure:8805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8805   rm -rf conftest*
8806   ac_cv_header_sys_wait_h=yes
8807 else
8808   echo "configure: failed program was:" >&5
8809   cat conftest.$ac_ext >&5
8810   rm -rf conftest*
8811   ac_cv_header_sys_wait_h=no
8812 fi
8813 rm -f conftest*
8814 fi
8815
8816 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8817 if test $ac_cv_header_sys_wait_h = yes; then
8818   cat >> confdefs.h <<\EOF
8819 #define HAVE_SYS_WAIT_H 1
8820 EOF
8821
8822 fi
8823
8824 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8825 echo "configure:8826: checking POSIX termios" >&5
8826 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   cat > conftest.$ac_ext <<EOF
8830 #line 8831 "configure"
8831 #include "confdefs.h"
8832 #include <sys/types.h>
8833 #include <unistd.h>
8834 #include <termios.h>
8835 int main() {
8836 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8837    tcgetattr(0, 0);
8838 ; return 0; }
8839 EOF
8840 if { (eval echo configure:8841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8841   rm -rf conftest*
8842   am_cv_sys_posix_termios=yes
8843 else
8844   echo "configure: failed program was:" >&5
8845   cat conftest.$ac_ext >&5
8846   rm -rf conftest*
8847   am_cv_sys_posix_termios=no
8848 fi
8849 rm -f conftest*
8850 fi
8851
8852 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8853
8854
8855  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8856 echo "configure:8857: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8857 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8858   echo $ac_n "(cached) $ac_c" 1>&6
8859 else
8860   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8861
8862   gwinsz_in_termios_h=no
8863   if test $am_cv_sys_posix_termios = yes; then
8864     cat > conftest.$ac_ext <<EOF
8865 #line 8866 "configure"
8866 #include "confdefs.h"
8867 #include <sys/types.h>
8868 #     include <termios.h>
8869 #     ifdef TIOCGWINSZ
8870         yes
8871 #     endif
8872     
8873 EOF
8874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8875   egrep "yes" >/dev/null 2>&1; then
8876   rm -rf conftest*
8877   gwinsz_in_termios_h=yes
8878 fi
8879 rm -f conftest*
8880
8881   fi
8882
8883   if test $gwinsz_in_termios_h = no; then
8884     cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 #include <sys/types.h>
8888 #     include <sys/ioctl.h>
8889 #     ifdef TIOCGWINSZ
8890         yes
8891 #     endif
8892     
8893 EOF
8894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8895   egrep "yes" >/dev/null 2>&1; then
8896   rm -rf conftest*
8897   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8898 fi
8899 rm -f conftest*
8900
8901   fi
8902   
8903 fi
8904
8905 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8906   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8907     cat >> confdefs.h <<\EOF
8908 #define GWINSZ_IN_SYS_IOCTL 1
8909 EOF
8910
8911   fi
8912
8913 if test $am_cv_sys_posix_termios = yes ; then
8914         cat >> confdefs.h <<\EOF
8915 #define HAVE_POSIX_TERMIOS 1
8916 EOF
8917
8918 fi
8919
8920 for ac_hdr in \
8921         arpa/inet.h             \
8922         arpa/nameser.h  \
8923         assert.h                \
8924         bits/types.h    \
8925         conio.h                 \
8926         crypt.h                 \
8927         direct.h                \
8928         errno.h                 \
8929         fcntl.h                 \
8930         filio.h                 \
8931         getopt.h                \
8932         grp.h                   \
8933         io.h                    \
8934         libutil.h               \
8935         limits.h                \
8936         locale.h                \
8937         netinet/tcp.h   \
8938         malloc.h                \
8939         memory.h                \
8940         psap.h                  \
8941         pwd.h                   \
8942         process.h               \
8943         resolv.h                \
8944         sgtty.h                 \
8945         shadow.h                \
8946         stddef.h                \
8947         string.h                \
8948         strings.h               \
8949         sysexits.h              \
8950         sys/file.h              \
8951         sys/filio.h             \
8952         sys/errno.h             \
8953         sys/ioctl.h             \
8954         sys/param.h             \
8955         sys/resource.h  \
8956         sys/select.h    \
8957         sys/socket.h    \
8958         sys/stat.h              \
8959         sys/syslog.h    \
8960         sys/time.h              \
8961         sys/types.h             \
8962         sys/ucred.h             \
8963         sys/uio.h               \
8964         syslog.h                \
8965         termios.h               \
8966         unistd.h                \
8967         winsock.h               \
8968         winsock2.h              \
8969
8970 do
8971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8973 echo "configure:8974: checking for $ac_hdr" >&5
8974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8975   echo $ac_n "(cached) $ac_c" 1>&6
8976 else
8977   cat > conftest.$ac_ext <<EOF
8978 #line 8979 "configure"
8979 #include "confdefs.h"
8980 #include <$ac_hdr>
8981 EOF
8982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8983 { (eval echo configure:8984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8985 if test -z "$ac_err"; then
8986   rm -rf conftest*
8987   eval "ac_cv_header_$ac_safe=yes"
8988 else
8989   echo "$ac_err" >&5
8990   echo "configure: failed program was:" >&5
8991   cat conftest.$ac_ext >&5
8992   rm -rf conftest*
8993   eval "ac_cv_header_$ac_safe=no"
8994 fi
8995 rm -f conftest*
8996 fi
8997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8998   echo "$ac_t""yes" 1>&6
8999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9000   cat >> confdefs.h <<EOF
9001 #define $ac_tr_hdr 1
9002 EOF
9003  
9004 else
9005   echo "$ac_t""no" 1>&6
9006 fi
9007 done
9008
9009
9010
9011
9012 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9013 echo "configure:9014: checking for sigset in -lV3" >&5
9014 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9015 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9016   echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018   ac_save_LIBS="$LIBS"
9019 LIBS="-lV3  $LIBS"
9020 cat > conftest.$ac_ext <<EOF
9021 #line 9022 "configure"
9022 #include "confdefs.h"
9023 /* Override any gcc2 internal prototype to avoid an error.  */
9024 /* We use char because int might match the return type of a gcc2
9025     builtin and then its argument prototype would still apply.  */
9026 char sigset();
9027
9028 int main() {
9029 sigset()
9030 ; return 0; }
9031 EOF
9032 if { (eval echo configure:9033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9033   rm -rf conftest*
9034   eval "ac_cv_lib_$ac_lib_var=yes"
9035 else
9036   echo "configure: failed program was:" >&5
9037   cat conftest.$ac_ext >&5
9038   rm -rf conftest*
9039   eval "ac_cv_lib_$ac_lib_var=no"
9040 fi
9041 rm -f conftest*
9042 LIBS="$ac_save_LIBS"
9043
9044 fi
9045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9046   echo "$ac_t""yes" 1>&6
9047     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9049   cat >> confdefs.h <<EOF
9050 #define $ac_tr_lib 1
9051 EOF
9052
9053   LIBS="-lV3 $LIBS"
9054
9055 else
9056   echo "$ac_t""no" 1>&6
9057 fi
9058
9059
9060 if test "$ac_cv_header_winsock_h" = yes; then
9061 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9062 echo "configure:9063: checking for winsock" >&5
9063 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   save_LIBS="$LIBS"
9067 for curlib in ws2_32 wsock32; do
9068         LIBS="$LIBS -l$curlib"
9069         cat > conftest.$ac_ext <<EOF
9070 #line 9071 "configure"
9071 #include "confdefs.h"
9072 #include <winsock.h>
9073                         
9074 int main() {
9075
9076                         socket(0,0,0);
9077                         select(0,NULL,NULL,NULL,NULL);
9078                         closesocket(0);
9079                         gethostname(NULL,0);
9080                         
9081 ; return 0; }
9082 EOF
9083 if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9084   rm -rf conftest*
9085   ol_cv_winsock=yes
9086 else
9087   echo "configure: failed program was:" >&5
9088   cat conftest.$ac_ext >&5
9089   rm -rf conftest*
9090   ol_cv_winsock=no
9091 fi
9092 rm -f conftest*
9093
9094         if test $ol_cv_winsock = yes; then
9095                 cat >> confdefs.h <<\EOF
9096 #define HAVE_WINSOCK 1
9097 EOF
9098
9099                 ac_cv_func_socket=yes
9100                 ac_cv_func_select=yes
9101                 ac_cv_func_closesocket=yes
9102                 ac_cv_func_gethostname=yes
9103                 if test $curlib = ws2_32; then
9104                         ol_cv_winsock=winsock2
9105                         cat >> confdefs.h <<\EOF
9106 #define HAVE_WINSOCK2 1
9107 EOF
9108
9109                 fi
9110                 break
9111         fi
9112         LIBS="$save_LIBS"
9113 done
9114 fi
9115
9116 echo "$ac_t""$ol_cv_winsock" 1>&6
9117 fi
9118
9119
9120 echo $ac_n "checking for socket""... $ac_c" 1>&6
9121 echo "configure:9122: checking for socket" >&5
9122 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9123   echo $ac_n "(cached) $ac_c" 1>&6
9124 else
9125   cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 /* System header to define __stub macros and hopefully few prototypes,
9129     which can conflict with char socket(); below.  */
9130 #include <assert.h>
9131 /* Override any gcc2 internal prototype to avoid an error.  */
9132 /* We use char because int might match the return type of a gcc2
9133     builtin and then its argument prototype would still apply.  */
9134 char socket();
9135 char (*f)();
9136
9137 int main() {
9138
9139 /* The GNU C library defines this for functions which it implements
9140     to always fail with ENOSYS.  Some functions are actually named
9141     something starting with __ and the normal name is an alias.  */
9142 #if defined (__stub_socket) || defined (__stub___socket)
9143 choke me
9144 #else
9145 f = socket;
9146 #endif
9147
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9151   rm -rf conftest*
9152   eval "ac_cv_func_socket=yes"
9153 else
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_func_socket=no"
9158 fi
9159 rm -f conftest*
9160 fi
9161
9162 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9163   echo "$ac_t""yes" 1>&6
9164   :
9165 else
9166   echo "$ac_t""no" 1>&6
9167         
9168         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9169 echo "configure:9170: checking for main in -lsocket" >&5
9170 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9172   echo $ac_n "(cached) $ac_c" 1>&6
9173 else
9174   ac_save_LIBS="$LIBS"
9175 LIBS="-lsocket  $LIBS"
9176 cat > conftest.$ac_ext <<EOF
9177 #line 9178 "configure"
9178 #include "confdefs.h"
9179
9180 int main() {
9181 main()
9182 ; return 0; }
9183 EOF
9184 if { (eval echo configure:9185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9185   rm -rf conftest*
9186   eval "ac_cv_lib_$ac_lib_var=yes"
9187 else
9188   echo "configure: failed program was:" >&5
9189   cat conftest.$ac_ext >&5
9190   rm -rf conftest*
9191   eval "ac_cv_lib_$ac_lib_var=no"
9192 fi
9193 rm -f conftest*
9194 LIBS="$ac_save_LIBS"
9195
9196 fi
9197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9198   echo "$ac_t""yes" 1>&6
9199     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9200     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9201   cat >> confdefs.h <<EOF
9202 #define $ac_tr_lib 1
9203 EOF
9204
9205   LIBS="-lsocket $LIBS"
9206
9207 else
9208   echo "$ac_t""no" 1>&6
9209 fi
9210
9211         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9212 echo "configure:9213: checking for main in -lnet" >&5
9213 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   ac_save_LIBS="$LIBS"
9218 LIBS="-lnet  $LIBS"
9219 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222
9223 int main() {
9224 main()
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_lib_$ac_lib_var=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_lib_$ac_lib_var=no"
9235 fi
9236 rm -f conftest*
9237 LIBS="$ac_save_LIBS"
9238
9239 fi
9240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9241   echo "$ac_t""yes" 1>&6
9242     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9243     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9244   cat >> confdefs.h <<EOF
9245 #define $ac_tr_lib 1
9246 EOF
9247
9248   LIBS="-lnet $LIBS"
9249
9250 else
9251   echo "$ac_t""no" 1>&6
9252 fi
9253
9254         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9255 echo "configure:9256: checking for main in -lnsl_s" >&5
9256 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260   ac_save_LIBS="$LIBS"
9261 LIBS="-lnsl_s  $LIBS"
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265
9266 int main() {
9267 main()
9268 ; return 0; }
9269 EOF
9270 if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9271   rm -rf conftest*
9272   eval "ac_cv_lib_$ac_lib_var=yes"
9273 else
9274   echo "configure: failed program was:" >&5
9275   cat conftest.$ac_ext >&5
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=no"
9278 fi
9279 rm -f conftest*
9280 LIBS="$ac_save_LIBS"
9281
9282 fi
9283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9284   echo "$ac_t""yes" 1>&6
9285     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9287   cat >> confdefs.h <<EOF
9288 #define $ac_tr_lib 1
9289 EOF
9290
9291   LIBS="-lnsl_s $LIBS"
9292
9293 else
9294   echo "$ac_t""no" 1>&6
9295 fi
9296
9297         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9298 echo "configure:9299: checking for main in -lnsl" >&5
9299 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   ac_save_LIBS="$LIBS"
9304 LIBS="-lnsl  $LIBS"
9305 cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308
9309 int main() {
9310 main()
9311 ; return 0; }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9314   rm -rf conftest*
9315   eval "ac_cv_lib_$ac_lib_var=yes"
9316 else
9317   echo "configure: failed program was:" >&5
9318   cat conftest.$ac_ext >&5
9319   rm -rf conftest*
9320   eval "ac_cv_lib_$ac_lib_var=no"
9321 fi
9322 rm -f conftest*
9323 LIBS="$ac_save_LIBS"
9324
9325 fi
9326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9327   echo "$ac_t""yes" 1>&6
9328     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9330   cat >> confdefs.h <<EOF
9331 #define $ac_tr_lib 1
9332 EOF
9333
9334   LIBS="-lnsl $LIBS"
9335
9336 else
9337   echo "$ac_t""no" 1>&6
9338 fi
9339
9340         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9341 echo "configure:9342: checking for socket in -linet" >&5
9342 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   ac_save_LIBS="$LIBS"
9347 LIBS="-linet  $LIBS"
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351 /* Override any gcc2 internal prototype to avoid an error.  */
9352 /* We use char because int might match the return type of a gcc2
9353     builtin and then its argument prototype would still apply.  */
9354 char socket();
9355
9356 int main() {
9357 socket()
9358 ; return 0; }
9359 EOF
9360 if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9361   rm -rf conftest*
9362   eval "ac_cv_lib_$ac_lib_var=yes"
9363 else
9364   echo "configure: failed program was:" >&5
9365   cat conftest.$ac_ext >&5
9366   rm -rf conftest*
9367   eval "ac_cv_lib_$ac_lib_var=no"
9368 fi
9369 rm -f conftest*
9370 LIBS="$ac_save_LIBS"
9371
9372 fi
9373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9374   echo "$ac_t""yes" 1>&6
9375     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9376     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9377   cat >> confdefs.h <<EOF
9378 #define $ac_tr_lib 1
9379 EOF
9380
9381   LIBS="-linet $LIBS"
9382
9383 else
9384   echo "$ac_t""no" 1>&6
9385 fi
9386
9387         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9388 echo "configure:9389: checking for main in -lgen" >&5
9389 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9391   echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393   ac_save_LIBS="$LIBS"
9394 LIBS="-lgen  $LIBS"
9395 cat > conftest.$ac_ext <<EOF
9396 #line 9397 "configure"
9397 #include "confdefs.h"
9398
9399 int main() {
9400 main()
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9404   rm -rf conftest*
9405   eval "ac_cv_lib_$ac_lib_var=yes"
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -rf conftest*
9410   eval "ac_cv_lib_$ac_lib_var=no"
9411 fi
9412 rm -f conftest*
9413 LIBS="$ac_save_LIBS"
9414
9415 fi
9416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9417   echo "$ac_t""yes" 1>&6
9418     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9419     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9420   cat >> confdefs.h <<EOF
9421 #define $ac_tr_lib 1
9422 EOF
9423
9424   LIBS="-lgen $LIBS"
9425
9426 else
9427   echo "$ac_t""no" 1>&6
9428 fi
9429
9430
9431 fi
9432
9433
9434 echo $ac_n "checking for select""... $ac_c" 1>&6
9435 echo "configure:9436: checking for select" >&5
9436 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9437   echo $ac_n "(cached) $ac_c" 1>&6
9438 else
9439   cat > conftest.$ac_ext <<EOF
9440 #line 9441 "configure"
9441 #include "confdefs.h"
9442 /* System header to define __stub macros and hopefully few prototypes,
9443     which can conflict with char select(); below.  */
9444 #include <assert.h>
9445 /* Override any gcc2 internal prototype to avoid an error.  */
9446 /* We use char because int might match the return type of a gcc2
9447     builtin and then its argument prototype would still apply.  */
9448 char select();
9449 char (*f)();
9450
9451 int main() {
9452
9453 /* The GNU C library defines this for functions which it implements
9454     to always fail with ENOSYS.  Some functions are actually named
9455     something starting with __ and the normal name is an alias.  */
9456 #if defined (__stub_select) || defined (__stub___select)
9457 choke me
9458 #else
9459 f = select;
9460 #endif
9461
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9465   rm -rf conftest*
9466   eval "ac_cv_func_select=yes"
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   eval "ac_cv_func_select=no"
9472 fi
9473 rm -f conftest*
9474 fi
9475
9476 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9477   echo "$ac_t""yes" 1>&6
9478   :
9479 else
9480   echo "$ac_t""no" 1>&6
9481 { echo "configure: error: select() required." 1>&2; exit 1; }
9482 fi
9483
9484
9485 if test "${ac_cv_header_winsock_h}" != yes; then
9486                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9487 echo "configure:9488: checking types of arguments for select()" >&5
9488  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9489   echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9492   echo $ac_n "(cached) $ac_c" 1>&6
9493 else
9494     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9495   echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9498      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9499       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9500        cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 #ifdef HAVE_SYS_TYPES_H
9504 #include <sys/types.h>
9505 #endif
9506 #ifdef HAVE_SYS_TIME_H
9507 #include <sys/time.h>
9508 #endif
9509 #ifdef HAVE_SYS_SELECT_H
9510 #include <sys/select.h>
9511 #endif
9512 #ifdef HAVE_SYS_SOCKET_H
9513 #include <sys/socket.h>
9514 #endif
9515 extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
9516 int main() {
9517
9518 ; return 0; }
9519 EOF
9520 if { (eval echo configure:9521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9521   rm -rf conftest*
9522           ac_not_found=no ; break 3
9523 else
9524   echo "configure: failed program was:" >&5
9525   cat conftest.$ac_ext >&5
9526   rm -rf conftest*
9527   ac_not_found=yes
9528 fi
9529 rm -f conftest*
9530       done
9531      done
9532     done
9533    
9534 fi
9535   
9536 fi
9537  
9538 fi
9539  if test "$ac_not_found" = yes; then
9540   ac_cv_func_select_arg1=int 
9541   ac_cv_func_select_arg234='int *' 
9542   ac_cv_func_select_arg5='struct timeval *'
9543  fi
9544  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9545  cat >> confdefs.h <<EOF
9546 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9547 EOF
9548
9549  cat >> confdefs.h <<EOF
9550 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9551 EOF
9552
9553  cat >> confdefs.h <<EOF
9554 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9555 EOF
9556
9557
9558 fi
9559
9560
9561 for ac_hdr in regex.h 
9562 do
9563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9565 echo "configure:9566: checking for $ac_hdr" >&5
9566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9567   echo $ac_n "(cached) $ac_c" 1>&6
9568 else
9569   cat > conftest.$ac_ext <<EOF
9570 #line 9571 "configure"
9571 #include "confdefs.h"
9572 #include <$ac_hdr>
9573 EOF
9574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9575 { (eval echo configure:9576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9577 if test -z "$ac_err"; then
9578   rm -rf conftest*
9579   eval "ac_cv_header_$ac_safe=yes"
9580 else
9581   echo "$ac_err" >&5
9582   echo "configure: failed program was:" >&5
9583   cat conftest.$ac_ext >&5
9584   rm -rf conftest*
9585   eval "ac_cv_header_$ac_safe=no"
9586 fi
9587 rm -f conftest*
9588 fi
9589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9592   cat >> confdefs.h <<EOF
9593 #define $ac_tr_hdr 1
9594 EOF
9595  
9596 else
9597   echo "$ac_t""no" 1>&6
9598 fi
9599 done
9600
9601 if test "$ac_cv_header_regex_h" != yes ; then
9602         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9603 fi
9604
9605 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9606 echo "configure:9607: checking for library containing regfree" >&5
9607 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9608   echo $ac_n "(cached) $ac_c" 1>&6
9609 else
9610   ac_func_search_save_LIBS="$LIBS"
9611 ac_cv_search_regfree="no"
9612 cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 /* Override any gcc2 internal prototype to avoid an error.  */
9616 /* We use char because int might match the return type of a gcc2
9617     builtin and then its argument prototype would still apply.  */
9618 char regfree();
9619
9620 int main() {
9621 regfree()
9622 ; return 0; }
9623 EOF
9624 if { (eval echo configure:9625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9625   rm -rf conftest*
9626   ac_cv_search_regfree="none required"
9627 else
9628   echo "configure: failed program was:" >&5
9629   cat conftest.$ac_ext >&5
9630 fi
9631 rm -f conftest*
9632 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9633 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char regfree();
9641
9642 int main() {
9643 regfree()
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   ac_cv_search_regfree="-l$ac_lib"
9649 break
9650 else
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653 fi
9654 rm -f conftest*
9655 done
9656 LIBS="$ac_func_search_save_LIBS"
9657 fi
9658
9659 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9660 if test "$ac_cv_search_regfree" != "no"; then
9661   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9662   :
9663 else :
9664   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9665 fi
9666
9667
9668 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9669 echo "configure:9670: checking for compatible POSIX regex" >&5
9670 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   
9674         if test "$cross_compiling" = yes; then
9675   ol_cv_c_posix_regex=cross
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680
9681 #include <sys/types.h>
9682 #include <regex.h>
9683 static char *pattern, *string;
9684 main()
9685 {
9686         int rc;
9687         regex_t re;
9688
9689         pattern = "^A";
9690
9691         if(regcomp(&re, pattern, 0)) {
9692                 return -1;
9693         }
9694         
9695         string = "ALL MATCH";
9696         
9697         rc = regexec(&re, string, 0, (void*)0, 0);
9698
9699         regfree(&re);
9700
9701         return rc;
9702 }
9703 EOF
9704 if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9705 then
9706   ol_cv_c_posix_regex=yes
9707 else
9708   echo "configure: failed program was:" >&5
9709   cat conftest.$ac_ext >&5
9710   rm -fr conftest*
9711   ol_cv_c_posix_regex=no
9712 fi
9713 rm -fr conftest*
9714 fi
9715
9716 fi
9717
9718 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9719
9720 if test "$ol_cv_c_posix_regex" = no ; then
9721         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9722 fi
9723
9724
9725 have_uuid=no
9726 for ac_hdr in sys/uuid.h
9727 do
9728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9730 echo "configure:9731: checking for $ac_hdr" >&5
9731 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737 #include <$ac_hdr>
9738 EOF
9739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9740 { (eval echo configure:9741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9742 if test -z "$ac_err"; then
9743   rm -rf conftest*
9744   eval "ac_cv_header_$ac_safe=yes"
9745 else
9746   echo "$ac_err" >&5
9747   echo "configure: failed program was:" >&5
9748   cat conftest.$ac_ext >&5
9749   rm -rf conftest*
9750   eval "ac_cv_header_$ac_safe=no"
9751 fi
9752 rm -f conftest*
9753 fi
9754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9755   echo "$ac_t""yes" 1>&6
9756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9757   cat >> confdefs.h <<EOF
9758 #define $ac_tr_hdr 1
9759 EOF
9760  
9761 else
9762   echo "$ac_t""no" 1>&6
9763 fi
9764 done
9765
9766 if test $ac_cv_header_sys_uuid_h = yes ; then
9767         save_LIBS="$LIBS"
9768         
9769 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9770 echo "configure:9771: checking for library containing uuid_to_str" >&5
9771 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9772   echo $ac_n "(cached) $ac_c" 1>&6
9773 else
9774   ac_func_search_save_LIBS="$LIBS"
9775 ac_cv_search_uuid_to_str="no"
9776 cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 /* Override any gcc2 internal prototype to avoid an error.  */
9780 /* We use char because int might match the return type of a gcc2
9781     builtin and then its argument prototype would still apply.  */
9782 char uuid_to_str();
9783
9784 int main() {
9785 uuid_to_str()
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9789   rm -rf conftest*
9790   ac_cv_search_uuid_to_str="none required"
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794 fi
9795 rm -f conftest*
9796 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9797 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9798 cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 /* Override any gcc2 internal prototype to avoid an error.  */
9802 /* We use char because int might match the return type of a gcc2
9803     builtin and then its argument prototype would still apply.  */
9804 char uuid_to_str();
9805
9806 int main() {
9807 uuid_to_str()
9808 ; return 0; }
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9811   rm -rf conftest*
9812   ac_cv_search_uuid_to_str="-l$ac_lib"
9813 break
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817 fi
9818 rm -f conftest*
9819 done
9820 LIBS="$ac_func_search_save_LIBS"
9821 fi
9822
9823 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9824 if test "$ac_cv_search_uuid_to_str" != "no"; then
9825   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9826   have_uuid=yes
9827 else :
9828   :
9829 fi
9830         LIBS="$save_LIBS"
9831
9832         if test have_uuid = yes ; then
9833                 cat >> confdefs.h <<\EOF
9834 #define HAVE_UUID_TO_STR 1
9835 EOF
9836
9837
9838                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9839                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9840         fi
9841 fi
9842
9843 if test $have_uuid = no ; then
9844         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9845 echo "configure:9846: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9846         save_LIBS="$LIBS"
9847         LIBS="$LIBS -lrpcrt4"
9848         cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.h"
9851
9852                 int __stdcall UuidCreate(void *);
9853                 int __stdcall UuidToStringA(void *,void **);
9854                 
9855 int main() {
9856
9857                 UuidCreate(0);
9858                 UuidToStringA(0,0);
9859                 
9860 ; return 0; }
9861 EOF
9862 if { (eval echo configure:9863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9863   rm -rf conftest*
9864   need_rpcrt=yes
9865 else
9866   echo "configure: failed program was:" >&5
9867   cat conftest.$ac_ext >&5
9868   rm -rf conftest*
9869   need_rpcrt=no
9870 fi
9871 rm -f conftest*
9872         if test $need_rpcrt = yes; then
9873                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9874         fi
9875         LIBS="$save_LIBS"
9876         echo "$ac_t""$need_rpcrt" 1>&6
9877 fi
9878
9879 ol_link_dnssrv=no
9880 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9881 echo "configure:9882: checking for res_query" >&5
9882 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888 /* System header to define __stub macros and hopefully few prototypes,
9889     which can conflict with char res_query(); below.  */
9890 #include <assert.h>
9891 /* Override any gcc2 internal prototype to avoid an error.  */
9892 /* We use char because int might match the return type of a gcc2
9893     builtin and then its argument prototype would still apply.  */
9894 char res_query();
9895 char (*f)();
9896
9897 int main() {
9898
9899 /* The GNU C library defines this for functions which it implements
9900     to always fail with ENOSYS.  Some functions are actually named
9901     something starting with __ and the normal name is an alias.  */
9902 #if defined (__stub_res_query) || defined (__stub___res_query)
9903 choke me
9904 #else
9905 f = res_query;
9906 #endif
9907
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   eval "ac_cv_func_res_query=yes"
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   eval "ac_cv_func_res_query=no"
9918 fi
9919 rm -f conftest*
9920 fi
9921
9922 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9923   echo "$ac_t""yes" 1>&6
9924   :
9925 else
9926   echo "$ac_t""no" 1>&6
9927 fi
9928
9929 if test $ac_cv_func_res_query = no ; then 
9930         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9931 echo "configure:9932: checking for __res_query" >&5
9932 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9933   echo $ac_n "(cached) $ac_c" 1>&6
9934 else
9935   cat > conftest.$ac_ext <<EOF
9936 #line 9937 "configure"
9937 #include "confdefs.h"
9938 /* System header to define __stub macros and hopefully few prototypes,
9939     which can conflict with char __res_query(); below.  */
9940 #include <assert.h>
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 /* We use char because int might match the return type of a gcc2
9943     builtin and then its argument prototype would still apply.  */
9944 char __res_query();
9945 char (*f)();
9946
9947 int main() {
9948
9949 /* The GNU C library defines this for functions which it implements
9950     to always fail with ENOSYS.  Some functions are actually named
9951     something starting with __ and the normal name is an alias.  */
9952 #if defined (__stub___res_query) || defined (__stub_____res_query)
9953 choke me
9954 #else
9955 f = __res_query;
9956 #endif
9957
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   eval "ac_cv_func___res_query=yes"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966   rm -rf conftest*
9967   eval "ac_cv_func___res_query=no"
9968 fi
9969 rm -f conftest*
9970 fi
9971
9972 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9973   echo "$ac_t""yes" 1>&6
9974   :
9975 else
9976   echo "$ac_t""no" 1>&6
9977 fi
9978
9979         ac_cv_func_res_query=$ac_cv_func___res_query
9980 fi
9981
9982 if test $ac_cv_func_res_query = no ; then 
9983         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9984 echo "configure:9985: checking for res_query in -lbind" >&5
9985 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9987   echo $ac_n "(cached) $ac_c" 1>&6
9988 else
9989   ac_save_LIBS="$LIBS"
9990 LIBS="-lbind  $LIBS"
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 /* We use char because int might match the return type of a gcc2
9996     builtin and then its argument prototype would still apply.  */
9997 char res_query();
9998
9999 int main() {
10000 res_query()
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10004   rm -rf conftest*
10005   eval "ac_cv_lib_$ac_lib_var=yes"
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_lib_$ac_lib_var=no"
10011 fi
10012 rm -f conftest*
10013 LIBS="$ac_save_LIBS"
10014
10015 fi
10016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10017   echo "$ac_t""yes" 1>&6
10018     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10019     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10020   cat >> confdefs.h <<EOF
10021 #define $ac_tr_lib 1
10022 EOF
10023
10024   LIBS="-lbind $LIBS"
10025
10026 else
10027   echo "$ac_t""no" 1>&6
10028 fi
10029
10030         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10031 fi
10032
10033 if test $ac_cv_func_res_query = no ; then 
10034         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10035 echo "configure:10036: checking for __res_query in -lbind" >&5
10036 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10038   echo $ac_n "(cached) $ac_c" 1>&6
10039 else
10040   ac_save_LIBS="$LIBS"
10041 LIBS="-lbind  $LIBS"
10042 cat > conftest.$ac_ext <<EOF
10043 #line 10044 "configure"
10044 #include "confdefs.h"
10045 /* Override any gcc2 internal prototype to avoid an error.  */
10046 /* We use char because int might match the return type of a gcc2
10047     builtin and then its argument prototype would still apply.  */
10048 char __res_query();
10049
10050 int main() {
10051 __res_query()
10052 ; return 0; }
10053 EOF
10054 if { (eval echo configure:10055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=yes"
10057 else
10058   echo "configure: failed program was:" >&5
10059   cat conftest.$ac_ext >&5
10060   rm -rf conftest*
10061   eval "ac_cv_lib_$ac_lib_var=no"
10062 fi
10063 rm -f conftest*
10064 LIBS="$ac_save_LIBS"
10065
10066 fi
10067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10068   echo "$ac_t""yes" 1>&6
10069     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10070     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10071   cat >> confdefs.h <<EOF
10072 #define $ac_tr_lib 1
10073 EOF
10074
10075   LIBS="-lbind $LIBS"
10076
10077 else
10078   echo "$ac_t""no" 1>&6
10079 fi
10080
10081         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10082 fi
10083
10084 if test $ac_cv_func_res_query = no ; then 
10085         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10086 echo "configure:10087: checking for res_query in -lresolv" >&5
10087 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10088 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10089   echo $ac_n "(cached) $ac_c" 1>&6
10090 else
10091   ac_save_LIBS="$LIBS"
10092 LIBS="-lresolv  $LIBS"
10093 cat > conftest.$ac_ext <<EOF
10094 #line 10095 "configure"
10095 #include "confdefs.h"
10096 /* Override any gcc2 internal prototype to avoid an error.  */
10097 /* We use char because int might match the return type of a gcc2
10098     builtin and then its argument prototype would still apply.  */
10099 char res_query();
10100
10101 int main() {
10102 res_query()
10103 ; return 0; }
10104 EOF
10105 if { (eval echo configure:10106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10106   rm -rf conftest*
10107   eval "ac_cv_lib_$ac_lib_var=yes"
10108 else
10109   echo "configure: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   rm -rf conftest*
10112   eval "ac_cv_lib_$ac_lib_var=no"
10113 fi
10114 rm -f conftest*
10115 LIBS="$ac_save_LIBS"
10116
10117 fi
10118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10119   echo "$ac_t""yes" 1>&6
10120     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10122   cat >> confdefs.h <<EOF
10123 #define $ac_tr_lib 1
10124 EOF
10125
10126   LIBS="-lresolv $LIBS"
10127
10128 else
10129   echo "$ac_t""no" 1>&6
10130 fi
10131
10132         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10133 fi
10134
10135 if test $ac_cv_func_res_query = no ; then 
10136         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10137 echo "configure:10138: checking for __res_query in -lresolv" >&5
10138 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10140   echo $ac_n "(cached) $ac_c" 1>&6
10141 else
10142   ac_save_LIBS="$LIBS"
10143 LIBS="-lresolv  $LIBS"
10144 cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 /* Override any gcc2 internal prototype to avoid an error.  */
10148 /* We use char because int might match the return type of a gcc2
10149     builtin and then its argument prototype would still apply.  */
10150 char __res_query();
10151
10152 int main() {
10153 __res_query()
10154 ; return 0; }
10155 EOF
10156 if { (eval echo configure:10157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10157   rm -rf conftest*
10158   eval "ac_cv_lib_$ac_lib_var=yes"
10159 else
10160   echo "configure: failed program was:" >&5
10161   cat conftest.$ac_ext >&5
10162   rm -rf conftest*
10163   eval "ac_cv_lib_$ac_lib_var=no"
10164 fi
10165 rm -f conftest*
10166 LIBS="$ac_save_LIBS"
10167
10168 fi
10169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10170   echo "$ac_t""yes" 1>&6
10171     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10173   cat >> confdefs.h <<EOF
10174 #define $ac_tr_lib 1
10175 EOF
10176
10177   LIBS="-lresolv $LIBS"
10178
10179 else
10180   echo "$ac_t""no" 1>&6
10181 fi
10182
10183         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10184 fi
10185
10186 if test "$ac_cv_func_res_query" = yes ; then
10187         cat >> confdefs.h <<\EOF
10188 #define HAVE_RES_QUERY 1
10189 EOF
10190
10191
10192         if test $ol_enable_dnssrv != no ; then
10193                 ol_link_dnssrv=yes
10194         fi
10195 fi
10196
10197 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10198         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10199 fi
10200
10201 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10202 do
10203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10204 echo "configure:10205: checking for $ac_func" >&5
10205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10206   echo $ac_n "(cached) $ac_c" 1>&6
10207 else
10208   cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 /* System header to define __stub macros and hopefully few prototypes,
10212     which can conflict with char $ac_func(); below.  */
10213 #include <assert.h>
10214 /* Override any gcc2 internal prototype to avoid an error.  */
10215 /* We use char because int might match the return type of a gcc2
10216     builtin and then its argument prototype would still apply.  */
10217 char $ac_func();
10218 char (*f)();
10219
10220 int main() {
10221
10222 /* The GNU C library defines this for functions which it implements
10223     to always fail with ENOSYS.  Some functions are actually named
10224     something starting with __ and the normal name is an alias.  */
10225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10226 choke me
10227 #else
10228 f = $ac_func;
10229 #endif
10230
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10234   rm -rf conftest*
10235   eval "ac_cv_func_$ac_func=yes"
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   eval "ac_cv_func_$ac_func=no"
10241 fi
10242 rm -f conftest*
10243 fi
10244
10245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10246   echo "$ac_t""yes" 1>&6
10247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10248   cat >> confdefs.h <<EOF
10249 #define $ac_tr_func 1
10250 EOF
10251  
10252 else
10253   echo "$ac_t""no" 1>&6
10254 fi
10255 done
10256
10257
10258 ol_link_ipv6=no
10259 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10260         if test $ol_enable_ipv6 = yes ; then
10261                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10262         fi
10263 elif test $ol_enable_ipv6 != no ; then
10264         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10265 echo "configure:10266: checking INET6_ADDRSTRLEN" >&5
10266 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   
10270                 cat > conftest.$ac_ext <<EOF
10271 #line 10272 "configure"
10272 #include "confdefs.h"
10273
10274 #                       include <netinet/in.h>
10275 #                       ifdef INET6_ADDRSTRLEN
10276                                 __has_inet6_addrstrlen__;
10277 #                       endif
10278                 
10279 EOF
10280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10281   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10282   rm -rf conftest*
10283   ol_cv_inet6_addrstrlen=yes
10284 else
10285   rm -rf conftest*
10286   ol_cv_inet6_addrstrlen=no
10287 fi
10288 rm -f conftest*
10289
10290 fi
10291
10292 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10293
10294
10295         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10296 echo "configure:10297: checking struct sockaddr_storage" >&5
10297 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10298   echo $ac_n "(cached) $ac_c" 1>&6
10299 else
10300   
10301                 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 #include <sys/types.h>
10306 #include <sys/socket.h>
10307
10308 int main() {
10309
10310                         struct sockaddr_storage ss;
10311
10312 ; return 0; }
10313 EOF
10314 if { (eval echo configure:10315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10315   rm -rf conftest*
10316   ol_cv_struct_sockaddr_storage=yes
10317 else
10318   echo "configure: failed program was:" >&5
10319   cat conftest.$ac_ext >&5
10320   rm -rf conftest*
10321   ol_cv_struct_sockaddr_storage=no
10322 fi
10323 rm -f conftest*
10324 fi
10325
10326 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10327
10328         if test $ol_cv_inet6_addrstrlen = yes \
10329                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10330                 ol_link_ipv6=yes
10331         elif test $ol_enable_ipv6 = yes \
10332                         -a $ol_cv_inet6_addrstrlen = no ; then
10333                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10334         elif test $ol_enable_ipv6 = yes \
10335                         -a $ol_cv_struct_sockaddr_storage = no ; then
10336                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10337         fi
10338 fi
10339
10340 if test $ol_enable_local != no ; then
10341         for ac_hdr in sys/un.h 
10342 do
10343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10345 echo "configure:10346: checking for $ac_hdr" >&5
10346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10347   echo $ac_n "(cached) $ac_c" 1>&6
10348 else
10349   cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <$ac_hdr>
10353 EOF
10354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10355 { (eval echo configure:10356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10357 if test -z "$ac_err"; then
10358   rm -rf conftest*
10359   eval "ac_cv_header_$ac_safe=yes"
10360 else
10361   echo "$ac_err" >&5
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_header_$ac_safe=no"
10366 fi
10367 rm -f conftest*
10368 fi
10369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10370   echo "$ac_t""yes" 1>&6
10371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10372   cat >> confdefs.h <<EOF
10373 #define $ac_tr_hdr 1
10374 EOF
10375  
10376 else
10377   echo "$ac_t""no" 1>&6
10378 fi
10379 done
10380
10381
10382         if test $ol_enable_local = auto ; then
10383                 ol_enable_local=$ac_cv_header_sys_un_h
10384         elif test $ac_cv_header_sys_un_h = no ; then
10385                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10386         fi
10387 fi
10388
10389 ol_link_kbind=no
10390 ol_link_krb5=no
10391 ol_link_krb4=no
10392
10393 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10394         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10395         -o $ol_with_kerberos = k425 ; then
10396
10397         for ac_hdr in krb5.h
10398 do
10399 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10400 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10401 echo "configure:10402: checking for $ac_hdr" >&5
10402 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10403   echo $ac_n "(cached) $ac_c" 1>&6
10404 else
10405   cat > conftest.$ac_ext <<EOF
10406 #line 10407 "configure"
10407 #include "confdefs.h"
10408 #include <$ac_hdr>
10409 EOF
10410 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10411 { (eval echo configure:10412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10412 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10413 if test -z "$ac_err"; then
10414   rm -rf conftest*
10415   eval "ac_cv_header_$ac_safe=yes"
10416 else
10417   echo "$ac_err" >&5
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   eval "ac_cv_header_$ac_safe=no"
10422 fi
10423 rm -f conftest*
10424 fi
10425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10426   echo "$ac_t""yes" 1>&6
10427     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10428   cat >> confdefs.h <<EOF
10429 #define $ac_tr_hdr 1
10430 EOF
10431  
10432 else
10433   echo "$ac_t""no" 1>&6
10434 fi
10435 done
10436
10437
10438         if test $ac_cv_header_krb5_h = yes ; then
10439                                 for ac_hdr in heim_err.h
10440 do
10441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10443 echo "configure:10444: checking for $ac_hdr" >&5
10444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10445   echo $ac_n "(cached) $ac_c" 1>&6
10446 else
10447   cat > conftest.$ac_ext <<EOF
10448 #line 10449 "configure"
10449 #include "confdefs.h"
10450 #include <$ac_hdr>
10451 EOF
10452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10453 { (eval echo configure:10454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10455 if test -z "$ac_err"; then
10456   rm -rf conftest*
10457   eval "ac_cv_header_$ac_safe=yes"
10458 else
10459   echo "$ac_err" >&5
10460   echo "configure: failed program was:" >&5
10461   cat conftest.$ac_ext >&5
10462   rm -rf conftest*
10463   eval "ac_cv_header_$ac_safe=no"
10464 fi
10465 rm -f conftest*
10466 fi
10467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10468   echo "$ac_t""yes" 1>&6
10469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10470   cat >> confdefs.h <<EOF
10471 #define $ac_tr_hdr 1
10472 EOF
10473  
10474 else
10475   echo "$ac_t""no" 1>&6
10476 fi
10477 done
10478
10479                 if test $ac_cv_header_heim_err_h = yes ; then
10480                         krb5_impl=heimdal
10481                 else
10482                         krb5_impl=mit
10483                 fi
10484
10485                 if test $krb5_impl = mit; then
10486                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10487 echo "configure:10488: checking for main in -lk5crypto" >&5
10488 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10490   echo $ac_n "(cached) $ac_c" 1>&6
10491 else
10492   ac_save_LIBS="$LIBS"
10493 LIBS="-lk5crypto  $LIBS"
10494 cat > conftest.$ac_ext <<EOF
10495 #line 10496 "configure"
10496 #include "confdefs.h"
10497
10498 int main() {
10499 main()
10500 ; return 0; }
10501 EOF
10502 if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10503   rm -rf conftest*
10504   eval "ac_cv_lib_$ac_lib_var=yes"
10505 else
10506   echo "configure: failed program was:" >&5
10507   cat conftest.$ac_ext >&5
10508   rm -rf conftest*
10509   eval "ac_cv_lib_$ac_lib_var=no"
10510 fi
10511 rm -f conftest*
10512 LIBS="$ac_save_LIBS"
10513
10514 fi
10515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10516   echo "$ac_t""yes" 1>&6
10517   krb5crypto=k5crypto
10518 else
10519   echo "$ac_t""no" 1>&6
10520 krb5crypto=crypto
10521 fi
10522
10523
10524                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10525 echo "configure:10526: checking for main in -lkrb5" >&5
10526 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10527 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10528   echo $ac_n "(cached) $ac_c" 1>&6
10529 else
10530   ac_save_LIBS="$LIBS"
10531 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10532 cat > conftest.$ac_ext <<EOF
10533 #line 10534 "configure"
10534 #include "confdefs.h"
10535
10536 int main() {
10537 main()
10538 ; return 0; }
10539 EOF
10540 if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10541   rm -rf conftest*
10542   eval "ac_cv_lib_$ac_lib_var=yes"
10543 else
10544   echo "configure: failed program was:" >&5
10545   cat conftest.$ac_ext >&5
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=no"
10548 fi
10549 rm -f conftest*
10550 LIBS="$ac_save_LIBS"
10551
10552 fi
10553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10554   echo "$ac_t""yes" 1>&6
10555   have_krb5=yes
10556                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10557 else
10558   echo "$ac_t""no" 1>&6
10559 have_krb5=no
10560 fi
10561
10562
10563                 elif test $krb5_impl = heimdal; then
10564                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10565 echo "configure:10566: checking for main in -ldes" >&5
10566 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10567 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10568   echo $ac_n "(cached) $ac_c" 1>&6
10569 else
10570   ac_save_LIBS="$LIBS"
10571 LIBS="-ldes  $LIBS"
10572 cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575
10576 int main() {
10577 main()
10578 ; return 0; }
10579 EOF
10580 if { (eval echo configure:10581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10581   rm -rf conftest*
10582   eval "ac_cv_lib_$ac_lib_var=yes"
10583 else
10584   echo "configure: failed program was:" >&5
10585   cat conftest.$ac_ext >&5
10586   rm -rf conftest*
10587   eval "ac_cv_lib_$ac_lib_var=no"
10588 fi
10589 rm -f conftest*
10590 LIBS="$ac_save_LIBS"
10591
10592 fi
10593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10594   echo "$ac_t""yes" 1>&6
10595   krb5crypto=des
10596 else
10597   echo "$ac_t""no" 1>&6
10598 krb5crypto=crypto
10599 fi
10600
10601
10602                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10603 echo "configure:10604: checking for main in -lkrb5" >&5
10604 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10605 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10606   echo $ac_n "(cached) $ac_c" 1>&6
10607 else
10608   ac_save_LIBS="$LIBS"
10609 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10610 cat > conftest.$ac_ext <<EOF
10611 #line 10612 "configure"
10612 #include "confdefs.h"
10613
10614 int main() {
10615 main()
10616 ; return 0; }
10617 EOF
10618 if { (eval echo configure:10619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10619   rm -rf conftest*
10620   eval "ac_cv_lib_$ac_lib_var=yes"
10621 else
10622   echo "configure: failed program was:" >&5
10623   cat conftest.$ac_ext >&5
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=no"
10626 fi
10627 rm -f conftest*
10628 LIBS="$ac_save_LIBS"
10629
10630 fi
10631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633   have_krb5=yes
10634                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10635 else
10636   echo "$ac_t""no" 1>&6
10637 have_krb5=no
10638 fi
10639
10640
10641                         cat >> confdefs.h <<\EOF
10642 #define HAVE_HEIMDAL_KERBEROS 1
10643 EOF
10644
10645
10646                 else
10647                         have_krb5=no
10648                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10649                 fi
10650
10651                 if test $have_krb5 = yes ; then
10652                         ol_link_krb5=yes
10653
10654                         cat >> confdefs.h <<\EOF
10655 #define HAVE_KRB5 1
10656 EOF
10657
10658
10659                         if test $ol_with_kerberos = k5only ; then
10660                                 ol_with_kerberos=found
10661                         fi
10662
10663                 elif test $ol_with_kerberos != auto ; then
10664                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10665                 fi
10666
10667         fi
10668 fi
10669
10670 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10671         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10672
10673         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10674 do
10675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10677 echo "configure:10678: checking for $ac_hdr" >&5
10678 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10679   echo $ac_n "(cached) $ac_c" 1>&6
10680 else
10681   cat > conftest.$ac_ext <<EOF
10682 #line 10683 "configure"
10683 #include "confdefs.h"
10684 #include <$ac_hdr>
10685 EOF
10686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10687 { (eval echo configure:10688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10689 if test -z "$ac_err"; then
10690   rm -rf conftest*
10691   eval "ac_cv_header_$ac_safe=yes"
10692 else
10693   echo "$ac_err" >&5
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   eval "ac_cv_header_$ac_safe=no"
10698 fi
10699 rm -f conftest*
10700 fi
10701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10702   echo "$ac_t""yes" 1>&6
10703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10704   cat >> confdefs.h <<EOF
10705 #define $ac_tr_hdr 1
10706 EOF
10707  
10708 else
10709   echo "$ac_t""no" 1>&6
10710 fi
10711 done
10712
10713
10714         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10715                 if test $krb5_impl = mit; then
10716                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10717 echo "configure:10718: checking for main in -lkrb4" >&5
10718 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   ac_save_LIBS="$LIBS"
10723 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10724 cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727
10728 int main() {
10729 main()
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   eval "ac_cv_lib_$ac_lib_var=yes"
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=no"
10740 fi
10741 rm -f conftest*
10742 LIBS="$ac_save_LIBS"
10743
10744 fi
10745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10746   echo "$ac_t""yes" 1>&6
10747   have_k425=yes
10748                                 KRB4_LIBS="-lkrb4 -ldes425"
10749 else
10750   echo "$ac_t""no" 1>&6
10751 have_k425=no
10752 fi
10753
10754
10755                 elif test $krb5_impl = heimdal; then
10756                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10757 echo "configure:10758: checking for main in -lkrb4" >&5
10758 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10759 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10760   echo $ac_n "(cached) $ac_c" 1>&6
10761 else
10762   ac_save_LIBS="$LIBS"
10763 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10764 cat > conftest.$ac_ext <<EOF
10765 #line 10766 "configure"
10766 #include "confdefs.h"
10767
10768 int main() {
10769 main()
10770 ; return 0; }
10771 EOF
10772 if { (eval echo configure:10773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10773   rm -rf conftest*
10774   eval "ac_cv_lib_$ac_lib_var=yes"
10775 else
10776   echo "configure: failed program was:" >&5
10777   cat conftest.$ac_ext >&5
10778   rm -rf conftest*
10779   eval "ac_cv_lib_$ac_lib_var=no"
10780 fi
10781 rm -f conftest*
10782 LIBS="$ac_save_LIBS"
10783
10784 fi
10785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10786   echo "$ac_t""yes" 1>&6
10787   have_k425=yes
10788                                 KRB4_LIBS="-lkrb4"
10789 else
10790   echo "$ac_t""no" 1>&6
10791 have_k425=no
10792 fi
10793
10794
10795                 else
10796                         have_425=no
10797                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10798                 fi
10799
10800                 if test $have_k425 = yes ; then
10801                         ol_with_kerberos=found
10802                         ol_link_krb4=yes
10803
10804                         cat >> confdefs.h <<\EOF
10805 #define HAVE_KRB425 1
10806 EOF
10807
10808                         cat >> confdefs.h <<\EOF
10809 #define HAVE_KRB4 1
10810 EOF
10811
10812
10813                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10814 echo "configure:10815: checking for des_debug in Kerberos libraries" >&5
10815 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10816   echo $ac_n "(cached) $ac_c" 1>&6
10817 else
10818   
10819                                                                 save_LIBS="$LIBS"
10820                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10821                                 cat > conftest.$ac_ext <<EOF
10822 #line 10823 "configure"
10823 #include "confdefs.h"
10824
10825 #include <kerberosIV/krb.h>
10826 #include <kerberosIV/des.h>
10827 extern int des_debug;
10828
10829 int main() {
10830
10831 des_debug = 1;
10832
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   ol_cv_var_des_debug=yes
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   ol_cv_var_des_debug=no
10843 fi
10844 rm -f conftest*
10845                                                                 LIBS="$save_LIBS"
10846                         
10847 fi
10848
10849 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10850
10851                         if test $ol_cv_var_des_debug = yes ; then
10852                                 cat >> confdefs.h <<\EOF
10853 #define HAVE_DES_DEBUG 1
10854 EOF
10855
10856                         fi
10857
10858                         LIBS="$save_LIBS"
10859                 fi
10860         fi
10861 fi
10862
10863 if test $ol_link_krb5 = yes ; then
10864         ol_with_kerberos=found
10865 fi
10866
10867 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10868         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10869
10870         for ac_hdr in krb.h des.h krb-archaeology.h 
10871 do
10872 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10873 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10874 echo "configure:10875: checking for $ac_hdr" >&5
10875 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10876   echo $ac_n "(cached) $ac_c" 1>&6
10877 else
10878   cat > conftest.$ac_ext <<EOF
10879 #line 10880 "configure"
10880 #include "confdefs.h"
10881 #include <$ac_hdr>
10882 EOF
10883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10884 { (eval echo configure:10885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10886 if test -z "$ac_err"; then
10887   rm -rf conftest*
10888   eval "ac_cv_header_$ac_safe=yes"
10889 else
10890   echo "$ac_err" >&5
10891   echo "configure: failed program was:" >&5
10892   cat conftest.$ac_ext >&5
10893   rm -rf conftest*
10894   eval "ac_cv_header_$ac_safe=no"
10895 fi
10896 rm -f conftest*
10897 fi
10898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10899   echo "$ac_t""yes" 1>&6
10900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10901   cat >> confdefs.h <<EOF
10902 #define $ac_tr_hdr 1
10903 EOF
10904  
10905 else
10906   echo "$ac_t""no" 1>&6
10907 fi
10908 done
10909
10910
10911         if test $ac_cv_header_krb_h = yes ; then
10912                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10913 echo "configure:10914: checking for main in -lkrb" >&5
10914 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10916   echo $ac_n "(cached) $ac_c" 1>&6
10917 else
10918   ac_save_LIBS="$LIBS"
10919 LIBS="-lkrb -ldes $LIBS"
10920 cat > conftest.$ac_ext <<EOF
10921 #line 10922 "configure"
10922 #include "confdefs.h"
10923
10924 int main() {
10925 main()
10926 ; return 0; }
10927 EOF
10928 if { (eval echo configure:10929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10929   rm -rf conftest*
10930   eval "ac_cv_lib_$ac_lib_var=yes"
10931 else
10932   echo "configure: failed program was:" >&5
10933   cat conftest.$ac_ext >&5
10934   rm -rf conftest*
10935   eval "ac_cv_lib_$ac_lib_var=no"
10936 fi
10937 rm -f conftest*
10938 LIBS="$ac_save_LIBS"
10939
10940 fi
10941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10942   echo "$ac_t""yes" 1>&6
10943   have_k4=yes
10944 else
10945   echo "$ac_t""no" 1>&6
10946 have_k4=no
10947 fi
10948
10949
10950                 if test $have_k4 = yes ; then
10951                         ol_with_kerberos=found
10952                         ol_link_krb4=yes
10953
10954                         cat >> confdefs.h <<\EOF
10955 #define HAVE_KRB4 1
10956 EOF
10957
10958
10959                         KRB4_LIBS="-lkrb -ldes"
10960
10961                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10962                                 cat >> confdefs.h <<\EOF
10963 #define HAVE_KTH_KERBEROS 1
10964 EOF
10965
10966                         fi
10967                 fi
10968         fi
10969 fi
10970
10971 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10972         ol_link_kbind=yes
10973
10974 elif test $ol_enable_kbind = yes ; then
10975         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10976 fi
10977
10978 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10979         cat >> confdefs.h <<\EOF
10980 #define HAVE_KERBEROS 1
10981 EOF
10982
10983
10984 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10985         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10986 fi
10987
10988 ol_link_tls=no
10989 if test $ol_with_tls != no ; then
10990         for ac_hdr in openssl/ssl.h ssl.h
10991 do
10992 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10993 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10994 echo "configure:10995: checking for $ac_hdr" >&5
10995 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10996   echo $ac_n "(cached) $ac_c" 1>&6
10997 else
10998   cat > conftest.$ac_ext <<EOF
10999 #line 11000 "configure"
11000 #include "confdefs.h"
11001 #include <$ac_hdr>
11002 EOF
11003 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11004 { (eval echo configure:11005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11005 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11006 if test -z "$ac_err"; then
11007   rm -rf conftest*
11008   eval "ac_cv_header_$ac_safe=yes"
11009 else
11010   echo "$ac_err" >&5
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   eval "ac_cv_header_$ac_safe=no"
11015 fi
11016 rm -f conftest*
11017 fi
11018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11019   echo "$ac_t""yes" 1>&6
11020     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11021   cat >> confdefs.h <<EOF
11022 #define $ac_tr_hdr 1
11023 EOF
11024  
11025 else
11026   echo "$ac_t""no" 1>&6
11027 fi
11028 done
11029
11030         
11031         if test $ac_cv_header_openssl_ssl_h = yes \
11032                 -o $ac_cv_header_ssl_h = yes ; then
11033                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11034 echo "configure:11035: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11035 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11037   echo $ac_n "(cached) $ac_c" 1>&6
11038 else
11039   ac_save_LIBS="$LIBS"
11040 LIBS="-lssl -lcrypto $LIBS"
11041 cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 /* Override any gcc2 internal prototype to avoid an error.  */
11045 /* We use char because int might match the return type of a gcc2
11046     builtin and then its argument prototype would still apply.  */
11047 char SSLeay_add_ssl_algorithms();
11048
11049 int main() {
11050 SSLeay_add_ssl_algorithms()
11051 ; return 0; }
11052 EOF
11053 if { (eval echo configure:11054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11054   rm -rf conftest*
11055   eval "ac_cv_lib_$ac_lib_var=yes"
11056 else
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   eval "ac_cv_lib_$ac_lib_var=no"
11061 fi
11062 rm -f conftest*
11063 LIBS="$ac_save_LIBS"
11064
11065 fi
11066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11067   echo "$ac_t""yes" 1>&6
11068   have_ssleay=yes
11069                         need_rsaref=no
11070 else
11071   echo "$ac_t""no" 1>&6
11072 have_ssleay=no
11073 fi
11074
11075                         
11076                 if test $have_ssleay = no ; then
11077                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11078 echo "configure:11079: checking for SSL_library_init in -lssl" >&5
11079 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11080 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   ac_save_LIBS="$LIBS"
11084 LIBS="-lssl -lcrypto $LIBS"
11085 cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088 /* Override any gcc2 internal prototype to avoid an error.  */
11089 /* We use char because int might match the return type of a gcc2
11090     builtin and then its argument prototype would still apply.  */
11091 char SSL_library_init();
11092
11093 int main() {
11094 SSL_library_init()
11095 ; return 0; }
11096 EOF
11097 if { (eval echo configure:11098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11098   rm -rf conftest*
11099   eval "ac_cv_lib_$ac_lib_var=yes"
11100 else
11101   echo "configure: failed program was:" >&5
11102   cat conftest.$ac_ext >&5
11103   rm -rf conftest*
11104   eval "ac_cv_lib_$ac_lib_var=no"
11105 fi
11106 rm -f conftest*
11107 LIBS="$ac_save_LIBS"
11108
11109 fi
11110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11111   echo "$ac_t""yes" 1>&6
11112   have_ssleay=yes
11113                                 need_rsaref=no
11114 else
11115   echo "$ac_t""no" 1>&6
11116 have_ssleay=no
11117 fi
11118
11119                 fi
11120
11121                 if test $have_ssleay = no ; then
11122                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11123 echo "configure:11124: checking for ssl3_accept in -lssl" >&5
11124 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11126   echo $ac_n "(cached) $ac_c" 1>&6
11127 else
11128   ac_save_LIBS="$LIBS"
11129 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11130 cat > conftest.$ac_ext <<EOF
11131 #line 11132 "configure"
11132 #include "confdefs.h"
11133 /* Override any gcc2 internal prototype to avoid an error.  */
11134 /* We use char because int might match the return type of a gcc2
11135     builtin and then its argument prototype would still apply.  */
11136 char ssl3_accept();
11137
11138 int main() {
11139 ssl3_accept()
11140 ; return 0; }
11141 EOF
11142 if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11143   rm -rf conftest*
11144   eval "ac_cv_lib_$ac_lib_var=yes"
11145 else
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_lib_$ac_lib_var=no"
11150 fi
11151 rm -f conftest*
11152 LIBS="$ac_save_LIBS"
11153
11154 fi
11155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11156   echo "$ac_t""yes" 1>&6
11157   have_ssleay=yes
11158                                 need_rsaref=yes
11159 else
11160   echo "$ac_t""no" 1>&6
11161 have_ssleay=no
11162 fi
11163
11164                 fi
11165
11166                 if test $have_ssleay = yes ; then
11167                         ol_with_tls=found
11168                         ol_link_tls=yes
11169
11170                         cat >> confdefs.h <<\EOF
11171 #define HAVE_SSLEAY 1
11172 EOF
11173
11174
11175                         if test $need_rsaref = yes; then
11176                                 cat >> confdefs.h <<\EOF
11177 #define HAVE_RSAREF 1
11178 EOF
11179
11180
11181                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11182                         else
11183                                 TLS_LIBS="-lssl -lcrypto"
11184                         fi
11185                 fi
11186         fi
11187
11188 else
11189         echo "configure: warning: TLS data protection not supported!" 1>&2
11190 fi
11191
11192 WITH_TLS=no
11193 if test $ol_link_tls = yes ; then
11194         cat >> confdefs.h <<\EOF
11195 #define HAVE_TLS 1
11196 EOF
11197
11198         WITH_TLS=yes
11199
11200 elif test $ol_with_tls = auto ; then
11201         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11202         echo "configure: warning: TLS data protection not supported!" 1>&2
11203
11204 elif test $ol_with_tls != no ; then
11205         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11206 fi
11207
11208 if test $ol_enable_lmpasswd != no; then
11209         if test $ol_link_tls != yes ; then
11210                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11211         fi
11212
11213         cat >> confdefs.h <<\EOF
11214 #define SLAPD_LMHASH 1
11215 EOF
11216
11217 fi
11218
11219 ol_link_threads=no
11220
11221 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11222         -o $ol_with_threads = nt ; then
11223
11224         
11225         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11226 echo "configure:11227: checking for _beginthread" >&5
11227 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11228   echo $ac_n "(cached) $ac_c" 1>&6
11229 else
11230   cat > conftest.$ac_ext <<EOF
11231 #line 11232 "configure"
11232 #include "confdefs.h"
11233 /* System header to define __stub macros and hopefully few prototypes,
11234     which can conflict with char _beginthread(); below.  */
11235 #include <assert.h>
11236 /* Override any gcc2 internal prototype to avoid an error.  */
11237 /* We use char because int might match the return type of a gcc2
11238     builtin and then its argument prototype would still apply.  */
11239 char _beginthread();
11240 char (*f)();
11241
11242 int main() {
11243
11244 /* The GNU C library defines this for functions which it implements
11245     to always fail with ENOSYS.  Some functions are actually named
11246     something starting with __ and the normal name is an alias.  */
11247 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11248 choke me
11249 #else
11250 f = _beginthread;
11251 #endif
11252
11253 ; return 0; }
11254 EOF
11255 if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11256   rm -rf conftest*
11257   eval "ac_cv_func__beginthread=yes"
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   eval "ac_cv_func__beginthread=no"
11263 fi
11264 rm -f conftest*
11265 fi
11266
11267 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11268   echo "$ac_t""yes" 1>&6
11269   :
11270 else
11271   echo "$ac_t""no" 1>&6
11272 fi
11273
11274
11275         if test $ac_cv_func__beginthread = yes ; then
11276                 cat >> confdefs.h <<\EOF
11277 #define HAVE_NT_THREADS 1
11278 EOF
11279
11280                 ol_cv_nt_threads=yes
11281         fi
11282
11283
11284         if test "$ol_cv_nt_threads" = yes ; then
11285                 ol_link_threads=nt
11286                 ol_with_threads=found
11287                 ol_with_yielding_select=yes
11288
11289                 cat >> confdefs.h <<\EOF
11290 #define HAVE_NT_SERVICE_MANAGER 1
11291 EOF
11292
11293                 cat >> confdefs.h <<\EOF
11294 #define HAVE_NT_EVENT_LOG 1
11295 EOF
11296
11297         fi
11298
11299         if test $ol_with_threads = nt ; then
11300                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11301         fi
11302 fi
11303
11304 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11305         -o $ol_with_threads = posix ; then
11306
11307         for ac_hdr in pthread.h
11308 do
11309 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11310 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11311 echo "configure:11312: checking for $ac_hdr" >&5
11312 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11313   echo $ac_n "(cached) $ac_c" 1>&6
11314 else
11315   cat > conftest.$ac_ext <<EOF
11316 #line 11317 "configure"
11317 #include "confdefs.h"
11318 #include <$ac_hdr>
11319 EOF
11320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11321 { (eval echo configure:11322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11323 if test -z "$ac_err"; then
11324   rm -rf conftest*
11325   eval "ac_cv_header_$ac_safe=yes"
11326 else
11327   echo "$ac_err" >&5
11328   echo "configure: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   rm -rf conftest*
11331   eval "ac_cv_header_$ac_safe=no"
11332 fi
11333 rm -f conftest*
11334 fi
11335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11336   echo "$ac_t""yes" 1>&6
11337     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11338   cat >> confdefs.h <<EOF
11339 #define $ac_tr_hdr 1
11340 EOF
11341  
11342 else
11343   echo "$ac_t""no" 1>&6
11344 fi
11345 done
11346
11347
11348         if test $ac_cv_header_pthread_h = yes ; then
11349                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11350 echo "configure:11351: checking POSIX thread version" >&5
11351 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11352   echo $ac_n "(cached) $ac_c" 1>&6
11353 else
11354   
11355         cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358
11359 #               include <pthread.h>
11360         
11361 int main() {
11362
11363                 int i = PTHREAD_CREATE_JOINABLE;
11364         
11365 ; return 0; }
11366 EOF
11367 if { (eval echo configure:11368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11368   rm -rf conftest*
11369   
11370         cat > conftest.$ac_ext <<EOF
11371 #line 11372 "configure"
11372 #include "confdefs.h"
11373 #include <pthread.h>
11374 EOF
11375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11376   egrep "pthread_detach" >/dev/null 2>&1; then
11377   rm -rf conftest*
11378   ol_cv_pthread_version=10
11379 else
11380   rm -rf conftest*
11381   ol_cv_pthread_version=8
11382 fi
11383 rm -f conftest*
11384
11385 else
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -rf conftest*
11389   
11390         cat > conftest.$ac_ext <<EOF
11391 #line 11392 "configure"
11392 #include "confdefs.h"
11393
11394 #               include <pthread.h>
11395 #               ifdef PTHREAD_CREATE_UNDETACHED
11396                 draft7
11397 #               endif
11398         
11399 EOF
11400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11401   egrep "draft7" >/dev/null 2>&1; then
11402   rm -rf conftest*
11403   ol_cv_pthread_version=7
11404 else
11405   rm -rf conftest*
11406   
11407         cat > conftest.$ac_ext <<EOF
11408 #line 11409 "configure"
11409 #include "confdefs.h"
11410 #include <pthread.h>
11411 EOF
11412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11413   egrep "pthread_attr_init" >/dev/null 2>&1; then
11414   rm -rf conftest*
11415   ol_cv_pthread_version=6
11416 else
11417   rm -rf conftest*
11418   
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422
11423 #               include <pthread.h>
11424 #ifdef          PTHREAD_MUTEX_INITIALIZER
11425                 draft5
11426 #endif
11427         
11428 EOF
11429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11430   egrep "draft5" >/dev/null 2>&1; then
11431   rm -rf conftest*
11432   ol_cv_pthread_version=5
11433 else
11434   rm -rf conftest*
11435   ol_cv_pthread_version=4
11436 fi
11437 rm -f conftest*
11438  
11439 fi
11440 rm -f conftest*
11441  
11442 fi
11443 rm -f conftest*
11444  
11445 fi
11446 rm -f conftest*
11447
11448 fi
11449
11450 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11451
11452
11453                 if test $ol_cv_pthread_version != 0 ; then
11454                         cat >> confdefs.h <<EOF
11455 #define HAVE_PTHREADS $ol_cv_pthread_version
11456 EOF
11457
11458                 else
11459                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11460                 fi
11461
11462                 # consider threads found
11463                 ol_with_threads=found
11464
11465                 
11466         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11467 echo "configure:11468: checking for LinuxThreads pthread.h" >&5
11468 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11469   echo $ac_n "(cached) $ac_c" 1>&6
11470 else
11471   cat > conftest.$ac_ext <<EOF
11472 #line 11473 "configure"
11473 #include "confdefs.h"
11474 #include <pthread.h>
11475 EOF
11476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11477   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11478   rm -rf conftest*
11479   ol_cv_header_linux_threads=yes
11480 else
11481   rm -rf conftest*
11482   ol_cv_header_linux_threads=no
11483 fi
11484 rm -f conftest*
11485
11486                 
11487 fi
11488
11489 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11490         if test $ol_cv_header_linux_threads = yes; then
11491                 cat >> confdefs.h <<\EOF
11492 #define HAVE_LINUX_THREADS 1
11493 EOF
11494
11495         fi
11496
11497                 
11498         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11499 echo "configure:11500: checking for GNU Pth pthread.h" >&5
11500 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11501   echo $ac_n "(cached) $ac_c" 1>&6
11502 else
11503   cat > conftest.$ac_ext <<EOF
11504 #line 11505 "configure"
11505 #include "confdefs.h"
11506 #include <pthread.h>
11507 #ifdef _POSIX_THREAD_IS_GNU_PTH
11508         __gnu_pth__;
11509 #endif
11510
11511 EOF
11512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11513   egrep "__gnu_pth__" >/dev/null 2>&1; then
11514   rm -rf conftest*
11515   ol_cv_header_gnu_pth_pthread_h=yes
11516 else
11517   rm -rf conftest*
11518   ol_cv_header_gnu_pth_pthread_h=no
11519 fi
11520 rm -f conftest*
11521
11522                 
11523 fi
11524
11525 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11526
11527
11528                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11529                         for ac_hdr in sched.h
11530 do
11531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11533 echo "configure:11534: checking for $ac_hdr" >&5
11534 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11535   echo $ac_n "(cached) $ac_c" 1>&6
11536 else
11537   cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540 #include <$ac_hdr>
11541 EOF
11542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11543 { (eval echo configure:11544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11545 if test -z "$ac_err"; then
11546   rm -rf conftest*
11547   eval "ac_cv_header_$ac_safe=yes"
11548 else
11549   echo "$ac_err" >&5
11550   echo "configure: failed program was:" >&5
11551   cat conftest.$ac_ext >&5
11552   rm -rf conftest*
11553   eval "ac_cv_header_$ac_safe=no"
11554 fi
11555 rm -f conftest*
11556 fi
11557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11558   echo "$ac_t""yes" 1>&6
11559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11560   cat >> confdefs.h <<EOF
11561 #define $ac_tr_hdr 1
11562 EOF
11563  
11564 else
11565   echo "$ac_t""no" 1>&6
11566 fi
11567 done
11568
11569                 fi
11570
11571                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11572                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11573 echo "configure:11574: checking for pthread_create in default libraries" >&5
11574 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11575   echo $ac_n "(cached) $ac_c" 1>&6
11576 else
11577   
11578                 if test "$cross_compiling" = yes; then
11579   cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 /* pthread test headers */
11583 #include <pthread.h>
11584 #if HAVE_PTHREADS < 7
11585 #include <errno.h>
11586 #endif
11587 #ifndef NULL
11588 #define NULL (void*)0
11589 #endif
11590
11591 static void *task(p)
11592         void *p;
11593 {
11594         return (void *) (p == NULL);
11595 }
11596
11597 int main() {
11598
11599         /* pthread test function */
11600 #ifndef PTHREAD_CREATE_DETACHED
11601 #define PTHREAD_CREATE_DETACHED 1
11602 #endif
11603         pthread_t t;
11604         int status;
11605         int detach = PTHREAD_CREATE_DETACHED;
11606
11607 #if HAVE_PTHREADS > 4
11608         /* Final pthreads */
11609         pthread_attr_t attr;
11610
11611         status = pthread_attr_init(&attr);
11612         if( status ) return status;
11613
11614 #if HAVE_PTHREADS < 7
11615         status = pthread_attr_setdetachstate(&attr, &detach);
11616         if( status < 0 ) status = errno;
11617 #else
11618         status = pthread_attr_setdetachstate(&attr, detach);
11619 #endif
11620         if( status ) return status;
11621         status = pthread_create( &t, &attr, task, NULL );
11622 #if HAVE_PTHREADS < 7
11623         if( status < 0 ) status = errno;
11624 #endif
11625         if( status ) return status;
11626 #else
11627         /* Draft 4 pthreads */
11628         status = pthread_create( &t, pthread_attr_default, task, NULL );
11629         if( status ) return errno;
11630
11631         /* give thread a chance to complete */
11632         /* it should remain joinable and hence detachable */
11633         sleep( 1 );
11634
11635         status = pthread_detach( &t );
11636         if( status ) return errno;
11637 #endif
11638
11639 #ifdef HAVE_LINUX_THREADS
11640         pthread_kill_other_threads_np();
11641 #endif
11642
11643         return 0;
11644
11645 ; return 0; }
11646 EOF
11647 if { (eval echo configure:11648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11648   rm -rf conftest*
11649   ol_cv_pthread_create=yes
11650 else
11651   echo "configure: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   rm -rf conftest*
11654   ol_cv_pthread_create=no
11655 fi
11656 rm -f conftest*
11657 else
11658   cat > conftest.$ac_ext <<EOF
11659 #line 11660 "configure"
11660 #include "confdefs.h"
11661 /* pthread test headers */
11662 #include <pthread.h>
11663 #if HAVE_PTHREADS < 7
11664 #include <errno.h>
11665 #endif
11666 #ifndef NULL
11667 #define NULL (void*)0
11668 #endif
11669
11670 static void *task(p)
11671         void *p;
11672 {
11673         return (void *) (p == NULL);
11674 }
11675
11676
11677 int main(argc, argv)
11678         int argc;
11679         char **argv;
11680 {
11681
11682         /* pthread test function */
11683 #ifndef PTHREAD_CREATE_DETACHED
11684 #define PTHREAD_CREATE_DETACHED 1
11685 #endif
11686         pthread_t t;
11687         int status;
11688         int detach = PTHREAD_CREATE_DETACHED;
11689
11690 #if HAVE_PTHREADS > 4
11691         /* Final pthreads */
11692         pthread_attr_t attr;
11693
11694         status = pthread_attr_init(&attr);
11695         if( status ) return status;
11696
11697 #if HAVE_PTHREADS < 7
11698         status = pthread_attr_setdetachstate(&attr, &detach);
11699         if( status < 0 ) status = errno;
11700 #else
11701         status = pthread_attr_setdetachstate(&attr, detach);
11702 #endif
11703         if( status ) return status;
11704         status = pthread_create( &t, &attr, task, NULL );
11705 #if HAVE_PTHREADS < 7
11706         if( status < 0 ) status = errno;
11707 #endif
11708         if( status ) return status;
11709 #else
11710         /* Draft 4 pthreads */
11711         status = pthread_create( &t, pthread_attr_default, task, NULL );
11712         if( status ) return errno;
11713
11714         /* give thread a chance to complete */
11715         /* it should remain joinable and hence detachable */
11716         sleep( 1 );
11717
11718         status = pthread_detach( &t );
11719         if( status ) return errno;
11720 #endif
11721
11722 #ifdef HAVE_LINUX_THREADS
11723         pthread_kill_other_threads_np();
11724 #endif
11725
11726         return 0;
11727
11728 }
11729
11730 EOF
11731 if { (eval echo configure:11732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11732 then
11733   ol_cv_pthread_create=yes
11734 else
11735   echo "configure: failed program was:" >&5
11736   cat conftest.$ac_ext >&5
11737   rm -fr conftest*
11738   ol_cv_pthread_create=no
11739 fi
11740 rm -fr conftest*
11741 fi
11742
11743 fi
11744
11745 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11746
11747                 if test $ol_cv_pthread_create != no ; then
11748                         ol_link_threads=posix
11749                         ol_link_pthreads=""
11750                 fi
11751                 
11752                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11753 if test "$ol_link_threads" = no ; then
11754         # try -kthread
11755         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11756 echo "configure:11757: checking for pthread link with -kthread" >&5
11757 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11758   echo $ac_n "(cached) $ac_c" 1>&6
11759 else
11760   
11761                 # save the flags
11762                 ol_LIBS="$LIBS"
11763                 LIBS="-kthread $LIBS"
11764
11765                 if test "$cross_compiling" = yes; then
11766   cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769 /* pthread test headers */
11770 #include <pthread.h>
11771 #if HAVE_PTHREADS < 7
11772 #include <errno.h>
11773 #endif
11774 #ifndef NULL
11775 #define NULL (void*)0
11776 #endif
11777
11778 static void *task(p)
11779         void *p;
11780 {
11781         return (void *) (p == NULL);
11782 }
11783
11784 int main() {
11785
11786         /* pthread test function */
11787 #ifndef PTHREAD_CREATE_DETACHED
11788 #define PTHREAD_CREATE_DETACHED 1
11789 #endif
11790         pthread_t t;
11791         int status;
11792         int detach = PTHREAD_CREATE_DETACHED;
11793
11794 #if HAVE_PTHREADS > 4
11795         /* Final pthreads */
11796         pthread_attr_t attr;
11797
11798         status = pthread_attr_init(&attr);
11799         if( status ) return status;
11800
11801 #if HAVE_PTHREADS < 7
11802         status = pthread_attr_setdetachstate(&attr, &detach);
11803         if( status < 0 ) status = errno;
11804 #else
11805         status = pthread_attr_setdetachstate(&attr, detach);
11806 #endif
11807         if( status ) return status;
11808         status = pthread_create( &t, &attr, task, NULL );
11809 #if HAVE_PTHREADS < 7
11810         if( status < 0 ) status = errno;
11811 #endif
11812         if( status ) return status;
11813 #else
11814         /* Draft 4 pthreads */
11815         status = pthread_create( &t, pthread_attr_default, task, NULL );
11816         if( status ) return errno;
11817
11818         /* give thread a chance to complete */
11819         /* it should remain joinable and hence detachable */
11820         sleep( 1 );
11821
11822         status = pthread_detach( &t );
11823         if( status ) return errno;
11824 #endif
11825
11826 #ifdef HAVE_LINUX_THREADS
11827         pthread_kill_other_threads_np();
11828 #endif
11829
11830         return 0;
11831
11832 ; return 0; }
11833 EOF
11834 if { (eval echo configure:11835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11835   rm -rf conftest*
11836   ol_cv_pthread_kthread=yes
11837 else
11838   echo "configure: failed program was:" >&5
11839   cat conftest.$ac_ext >&5
11840   rm -rf conftest*
11841   ol_cv_pthread_kthread=no
11842 fi
11843 rm -f conftest*
11844 else
11845   cat > conftest.$ac_ext <<EOF
11846 #line 11847 "configure"
11847 #include "confdefs.h"
11848 /* pthread test headers */
11849 #include <pthread.h>
11850 #if HAVE_PTHREADS < 7
11851 #include <errno.h>
11852 #endif
11853 #ifndef NULL
11854 #define NULL (void*)0
11855 #endif
11856
11857 static void *task(p)
11858         void *p;
11859 {
11860         return (void *) (p == NULL);
11861 }
11862
11863
11864 int main(argc, argv)
11865         int argc;
11866         char **argv;
11867 {
11868
11869         /* pthread test function */
11870 #ifndef PTHREAD_CREATE_DETACHED
11871 #define PTHREAD_CREATE_DETACHED 1
11872 #endif
11873         pthread_t t;
11874         int status;
11875         int detach = PTHREAD_CREATE_DETACHED;
11876
11877 #if HAVE_PTHREADS > 4
11878         /* Final pthreads */
11879         pthread_attr_t attr;
11880
11881         status = pthread_attr_init(&attr);
11882         if( status ) return status;
11883
11884 #if HAVE_PTHREADS < 7
11885         status = pthread_attr_setdetachstate(&attr, &detach);
11886         if( status < 0 ) status = errno;
11887 #else
11888         status = pthread_attr_setdetachstate(&attr, detach);
11889 #endif
11890         if( status ) return status;
11891         status = pthread_create( &t, &attr, task, NULL );
11892 #if HAVE_PTHREADS < 7
11893         if( status < 0 ) status = errno;
11894 #endif
11895         if( status ) return status;
11896 #else
11897         /* Draft 4 pthreads */
11898         status = pthread_create( &t, pthread_attr_default, task, NULL );
11899         if( status ) return errno;
11900
11901         /* give thread a chance to complete */
11902         /* it should remain joinable and hence detachable */
11903         sleep( 1 );
11904
11905         status = pthread_detach( &t );
11906         if( status ) return errno;
11907 #endif
11908
11909 #ifdef HAVE_LINUX_THREADS
11910         pthread_kill_other_threads_np();
11911 #endif
11912
11913         return 0;
11914
11915 }
11916
11917 EOF
11918 if { (eval echo configure:11919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11919 then
11920   ol_cv_pthread_kthread=yes
11921 else
11922   echo "configure: failed program was:" >&5
11923   cat conftest.$ac_ext >&5
11924   rm -fr conftest*
11925   ol_cv_pthread_kthread=no
11926 fi
11927 rm -fr conftest*
11928 fi
11929
11930
11931                 # restore the LIBS
11932                 LIBS="$ol_LIBS"
11933         
11934 fi
11935
11936 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11937
11938         if test $ol_cv_pthread_kthread = yes ; then
11939                 ol_link_pthreads="-kthread"
11940                 ol_link_threads=posix
11941         fi
11942 fi
11943
11944                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11945 if test "$ol_link_threads" = no ; then
11946         # try -pthread
11947         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11948 echo "configure:11949: checking for pthread link with -pthread" >&5
11949 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11950   echo $ac_n "(cached) $ac_c" 1>&6
11951 else
11952   
11953                 # save the flags
11954                 ol_LIBS="$LIBS"
11955                 LIBS="-pthread $LIBS"
11956
11957                 if test "$cross_compiling" = yes; then
11958   cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961 /* pthread test headers */
11962 #include <pthread.h>
11963 #if HAVE_PTHREADS < 7
11964 #include <errno.h>
11965 #endif
11966 #ifndef NULL
11967 #define NULL (void*)0
11968 #endif
11969
11970 static void *task(p)
11971         void *p;
11972 {
11973         return (void *) (p == NULL);
11974 }
11975
11976 int main() {
11977
11978         /* pthread test function */
11979 #ifndef PTHREAD_CREATE_DETACHED
11980 #define PTHREAD_CREATE_DETACHED 1
11981 #endif
11982         pthread_t t;
11983         int status;
11984         int detach = PTHREAD_CREATE_DETACHED;
11985
11986 #if HAVE_PTHREADS > 4
11987         /* Final pthreads */
11988         pthread_attr_t attr;
11989
11990         status = pthread_attr_init(&attr);
11991         if( status ) return status;
11992
11993 #if HAVE_PTHREADS < 7
11994         status = pthread_attr_setdetachstate(&attr, &detach);
11995         if( status < 0 ) status = errno;
11996 #else
11997         status = pthread_attr_setdetachstate(&attr, detach);
11998 #endif
11999         if( status ) return status;
12000         status = pthread_create( &t, &attr, task, NULL );
12001 #if HAVE_PTHREADS < 7
12002         if( status < 0 ) status = errno;
12003 #endif
12004         if( status ) return status;
12005 #else
12006         /* Draft 4 pthreads */
12007         status = pthread_create( &t, pthread_attr_default, task, NULL );
12008         if( status ) return errno;
12009
12010         /* give thread a chance to complete */
12011         /* it should remain joinable and hence detachable */
12012         sleep( 1 );
12013
12014         status = pthread_detach( &t );
12015         if( status ) return errno;
12016 #endif
12017
12018 #ifdef HAVE_LINUX_THREADS
12019         pthread_kill_other_threads_np();
12020 #endif
12021
12022         return 0;
12023
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   ol_cv_pthread_pthread=yes
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   ol_cv_pthread_pthread=no
12034 fi
12035 rm -f conftest*
12036 else
12037   cat > conftest.$ac_ext <<EOF
12038 #line 12039 "configure"
12039 #include "confdefs.h"
12040 /* pthread test headers */
12041 #include <pthread.h>
12042 #if HAVE_PTHREADS < 7
12043 #include <errno.h>
12044 #endif
12045 #ifndef NULL
12046 #define NULL (void*)0
12047 #endif
12048
12049 static void *task(p)
12050         void *p;
12051 {
12052         return (void *) (p == NULL);
12053 }
12054
12055
12056 int main(argc, argv)
12057         int argc;
12058         char **argv;
12059 {
12060
12061         /* pthread test function */
12062 #ifndef PTHREAD_CREATE_DETACHED
12063 #define PTHREAD_CREATE_DETACHED 1
12064 #endif
12065         pthread_t t;
12066         int status;
12067         int detach = PTHREAD_CREATE_DETACHED;
12068
12069 #if HAVE_PTHREADS > 4
12070         /* Final pthreads */
12071         pthread_attr_t attr;
12072
12073         status = pthread_attr_init(&attr);
12074         if( status ) return status;
12075
12076 #if HAVE_PTHREADS < 7
12077         status = pthread_attr_setdetachstate(&attr, &detach);
12078         if( status < 0 ) status = errno;
12079 #else
12080         status = pthread_attr_setdetachstate(&attr, detach);
12081 #endif
12082         if( status ) return status;
12083         status = pthread_create( &t, &attr, task, NULL );
12084 #if HAVE_PTHREADS < 7
12085         if( status < 0 ) status = errno;
12086 #endif
12087         if( status ) return status;
12088 #else
12089         /* Draft 4 pthreads */
12090         status = pthread_create( &t, pthread_attr_default, task, NULL );
12091         if( status ) return errno;
12092
12093         /* give thread a chance to complete */
12094         /* it should remain joinable and hence detachable */
12095         sleep( 1 );
12096
12097         status = pthread_detach( &t );
12098         if( status ) return errno;
12099 #endif
12100
12101 #ifdef HAVE_LINUX_THREADS
12102         pthread_kill_other_threads_np();
12103 #endif
12104
12105         return 0;
12106
12107 }
12108
12109 EOF
12110 if { (eval echo configure:12111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12111 then
12112   ol_cv_pthread_pthread=yes
12113 else
12114   echo "configure: failed program was:" >&5
12115   cat conftest.$ac_ext >&5
12116   rm -fr conftest*
12117   ol_cv_pthread_pthread=no
12118 fi
12119 rm -fr conftest*
12120 fi
12121
12122
12123                 # restore the LIBS
12124                 LIBS="$ol_LIBS"
12125         
12126 fi
12127
12128 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12129
12130         if test $ol_cv_pthread_pthread = yes ; then
12131                 ol_link_pthreads="-pthread"
12132                 ol_link_threads=posix
12133         fi
12134 fi
12135
12136                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12137 if test "$ol_link_threads" = no ; then
12138         # try -pthreads
12139         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12140 echo "configure:12141: checking for pthread link with -pthreads" >&5
12141 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12142   echo $ac_n "(cached) $ac_c" 1>&6
12143 else
12144   
12145                 # save the flags
12146                 ol_LIBS="$LIBS"
12147                 LIBS="-pthreads $LIBS"
12148
12149                 if test "$cross_compiling" = yes; then
12150   cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 /* pthread test headers */
12154 #include <pthread.h>
12155 #if HAVE_PTHREADS < 7
12156 #include <errno.h>
12157 #endif
12158 #ifndef NULL
12159 #define NULL (void*)0
12160 #endif
12161
12162 static void *task(p)
12163         void *p;
12164 {
12165         return (void *) (p == NULL);
12166 }
12167
12168 int main() {
12169
12170         /* pthread test function */
12171 #ifndef PTHREAD_CREATE_DETACHED
12172 #define PTHREAD_CREATE_DETACHED 1
12173 #endif
12174         pthread_t t;
12175         int status;
12176         int detach = PTHREAD_CREATE_DETACHED;
12177
12178 #if HAVE_PTHREADS > 4
12179         /* Final pthreads */
12180         pthread_attr_t attr;
12181
12182         status = pthread_attr_init(&attr);
12183         if( status ) return status;
12184
12185 #if HAVE_PTHREADS < 7
12186         status = pthread_attr_setdetachstate(&attr, &detach);
12187         if( status < 0 ) status = errno;
12188 #else
12189         status = pthread_attr_setdetachstate(&attr, detach);
12190 #endif
12191         if( status ) return status;
12192         status = pthread_create( &t, &attr, task, NULL );
12193 #if HAVE_PTHREADS < 7
12194         if( status < 0 ) status = errno;
12195 #endif
12196         if( status ) return status;
12197 #else
12198         /* Draft 4 pthreads */
12199         status = pthread_create( &t, pthread_attr_default, task, NULL );
12200         if( status ) return errno;
12201
12202         /* give thread a chance to complete */
12203         /* it should remain joinable and hence detachable */
12204         sleep( 1 );
12205
12206         status = pthread_detach( &t );
12207         if( status ) return errno;
12208 #endif
12209
12210 #ifdef HAVE_LINUX_THREADS
12211         pthread_kill_other_threads_np();
12212 #endif
12213
12214         return 0;
12215
12216 ; return 0; }
12217 EOF
12218 if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12219   rm -rf conftest*
12220   ol_cv_pthread_pthreads=yes
12221 else
12222   echo "configure: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   rm -rf conftest*
12225   ol_cv_pthread_pthreads=no
12226 fi
12227 rm -f conftest*
12228 else
12229   cat > conftest.$ac_ext <<EOF
12230 #line 12231 "configure"
12231 #include "confdefs.h"
12232 /* pthread test headers */
12233 #include <pthread.h>
12234 #if HAVE_PTHREADS < 7
12235 #include <errno.h>
12236 #endif
12237 #ifndef NULL
12238 #define NULL (void*)0
12239 #endif
12240
12241 static void *task(p)
12242         void *p;
12243 {
12244         return (void *) (p == NULL);
12245 }
12246
12247
12248 int main(argc, argv)
12249         int argc;
12250         char **argv;
12251 {
12252
12253         /* pthread test function */
12254 #ifndef PTHREAD_CREATE_DETACHED
12255 #define PTHREAD_CREATE_DETACHED 1
12256 #endif
12257         pthread_t t;
12258         int status;
12259         int detach = PTHREAD_CREATE_DETACHED;
12260
12261 #if HAVE_PTHREADS > 4
12262         /* Final pthreads */
12263         pthread_attr_t attr;
12264
12265         status = pthread_attr_init(&attr);
12266         if( status ) return status;
12267
12268 #if HAVE_PTHREADS < 7
12269         status = pthread_attr_setdetachstate(&attr, &detach);
12270         if( status < 0 ) status = errno;
12271 #else
12272         status = pthread_attr_setdetachstate(&attr, detach);
12273 #endif
12274         if( status ) return status;
12275         status = pthread_create( &t, &attr, task, NULL );
12276 #if HAVE_PTHREADS < 7
12277         if( status < 0 ) status = errno;
12278 #endif
12279         if( status ) return status;
12280 #else
12281         /* Draft 4 pthreads */
12282         status = pthread_create( &t, pthread_attr_default, task, NULL );
12283         if( status ) return errno;
12284
12285         /* give thread a chance to complete */
12286         /* it should remain joinable and hence detachable */
12287         sleep( 1 );
12288
12289         status = pthread_detach( &t );
12290         if( status ) return errno;
12291 #endif
12292
12293 #ifdef HAVE_LINUX_THREADS
12294         pthread_kill_other_threads_np();
12295 #endif
12296
12297         return 0;
12298
12299 }
12300
12301 EOF
12302 if { (eval echo configure:12303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12303 then
12304   ol_cv_pthread_pthreads=yes
12305 else
12306   echo "configure: failed program was:" >&5
12307   cat conftest.$ac_ext >&5
12308   rm -fr conftest*
12309   ol_cv_pthread_pthreads=no
12310 fi
12311 rm -fr conftest*
12312 fi
12313
12314
12315                 # restore the LIBS
12316                 LIBS="$ol_LIBS"
12317         
12318 fi
12319
12320 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12321
12322         if test $ol_cv_pthread_pthreads = yes ; then
12323                 ol_link_pthreads="-pthreads"
12324                 ol_link_threads=posix
12325         fi
12326 fi
12327
12328                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12329 if test "$ol_link_threads" = no ; then
12330         # try -mthreads
12331         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12332 echo "configure:12333: checking for pthread link with -mthreads" >&5
12333 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12334   echo $ac_n "(cached) $ac_c" 1>&6
12335 else
12336   
12337                 # save the flags
12338                 ol_LIBS="$LIBS"
12339                 LIBS="-mthreads $LIBS"
12340
12341                 if test "$cross_compiling" = yes; then
12342   cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345 /* pthread test headers */
12346 #include <pthread.h>
12347 #if HAVE_PTHREADS < 7
12348 #include <errno.h>
12349 #endif
12350 #ifndef NULL
12351 #define NULL (void*)0
12352 #endif
12353
12354 static void *task(p)
12355         void *p;
12356 {
12357         return (void *) (p == NULL);
12358 }
12359
12360 int main() {
12361
12362         /* pthread test function */
12363 #ifndef PTHREAD_CREATE_DETACHED
12364 #define PTHREAD_CREATE_DETACHED 1
12365 #endif
12366         pthread_t t;
12367         int status;
12368         int detach = PTHREAD_CREATE_DETACHED;
12369
12370 #if HAVE_PTHREADS > 4
12371         /* Final pthreads */
12372         pthread_attr_t attr;
12373
12374         status = pthread_attr_init(&attr);
12375         if( status ) return status;
12376
12377 #if HAVE_PTHREADS < 7
12378         status = pthread_attr_setdetachstate(&attr, &detach);
12379         if( status < 0 ) status = errno;
12380 #else
12381         status = pthread_attr_setdetachstate(&attr, detach);
12382 #endif
12383         if( status ) return status;
12384         status = pthread_create( &t, &attr, task, NULL );
12385 #if HAVE_PTHREADS < 7
12386         if( status < 0 ) status = errno;
12387 #endif
12388         if( status ) return status;
12389 #else
12390         /* Draft 4 pthreads */
12391         status = pthread_create( &t, pthread_attr_default, task, NULL );
12392         if( status ) return errno;
12393
12394         /* give thread a chance to complete */
12395         /* it should remain joinable and hence detachable */
12396         sleep( 1 );
12397
12398         status = pthread_detach( &t );
12399         if( status ) return errno;
12400 #endif
12401
12402 #ifdef HAVE_LINUX_THREADS
12403         pthread_kill_other_threads_np();
12404 #endif
12405
12406         return 0;
12407
12408 ; return 0; }
12409 EOF
12410 if { (eval echo configure:12411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12411   rm -rf conftest*
12412   ol_cv_pthread_mthreads=yes
12413 else
12414   echo "configure: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   rm -rf conftest*
12417   ol_cv_pthread_mthreads=no
12418 fi
12419 rm -f conftest*
12420 else
12421   cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 /* pthread test headers */
12425 #include <pthread.h>
12426 #if HAVE_PTHREADS < 7
12427 #include <errno.h>
12428 #endif
12429 #ifndef NULL
12430 #define NULL (void*)0
12431 #endif
12432
12433 static void *task(p)
12434         void *p;
12435 {
12436         return (void *) (p == NULL);
12437 }
12438
12439
12440 int main(argc, argv)
12441         int argc;
12442         char **argv;
12443 {
12444
12445         /* pthread test function */
12446 #ifndef PTHREAD_CREATE_DETACHED
12447 #define PTHREAD_CREATE_DETACHED 1
12448 #endif
12449         pthread_t t;
12450         int status;
12451         int detach = PTHREAD_CREATE_DETACHED;
12452
12453 #if HAVE_PTHREADS > 4
12454         /* Final pthreads */
12455         pthread_attr_t attr;
12456
12457         status = pthread_attr_init(&attr);
12458         if( status ) return status;
12459
12460 #if HAVE_PTHREADS < 7
12461         status = pthread_attr_setdetachstate(&attr, &detach);
12462         if( status < 0 ) status = errno;
12463 #else
12464         status = pthread_attr_setdetachstate(&attr, detach);
12465 #endif
12466         if( status ) return status;
12467         status = pthread_create( &t, &attr, task, NULL );
12468 #if HAVE_PTHREADS < 7
12469         if( status < 0 ) status = errno;
12470 #endif
12471         if( status ) return status;
12472 #else
12473         /* Draft 4 pthreads */
12474         status = pthread_create( &t, pthread_attr_default, task, NULL );
12475         if( status ) return errno;
12476
12477         /* give thread a chance to complete */
12478         /* it should remain joinable and hence detachable */
12479         sleep( 1 );
12480
12481         status = pthread_detach( &t );
12482         if( status ) return errno;
12483 #endif
12484
12485 #ifdef HAVE_LINUX_THREADS
12486         pthread_kill_other_threads_np();
12487 #endif
12488
12489         return 0;
12490
12491 }
12492
12493 EOF
12494 if { (eval echo configure:12495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12495 then
12496   ol_cv_pthread_mthreads=yes
12497 else
12498   echo "configure: failed program was:" >&5
12499   cat conftest.$ac_ext >&5
12500   rm -fr conftest*
12501   ol_cv_pthread_mthreads=no
12502 fi
12503 rm -fr conftest*
12504 fi
12505
12506
12507                 # restore the LIBS
12508                 LIBS="$ol_LIBS"
12509         
12510 fi
12511
12512 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12513
12514         if test $ol_cv_pthread_mthreads = yes ; then
12515                 ol_link_pthreads="-mthreads"
12516                 ol_link_threads=posix
12517         fi
12518 fi
12519
12520                 # Pthread try link: -thread (ol_cv_pthread_thread)
12521 if test "$ol_link_threads" = no ; then
12522         # try -thread
12523         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12524 echo "configure:12525: checking for pthread link with -thread" >&5
12525 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12526   echo $ac_n "(cached) $ac_c" 1>&6
12527 else
12528   
12529                 # save the flags
12530                 ol_LIBS="$LIBS"
12531                 LIBS="-thread $LIBS"
12532
12533                 if test "$cross_compiling" = yes; then
12534   cat > conftest.$ac_ext <<EOF
12535 #line 12536 "configure"
12536 #include "confdefs.h"
12537 /* pthread test headers */
12538 #include <pthread.h>
12539 #if HAVE_PTHREADS < 7
12540 #include <errno.h>
12541 #endif
12542 #ifndef NULL
12543 #define NULL (void*)0
12544 #endif
12545
12546 static void *task(p)
12547         void *p;
12548 {
12549         return (void *) (p == NULL);
12550 }
12551
12552 int main() {
12553
12554         /* pthread test function */
12555 #ifndef PTHREAD_CREATE_DETACHED
12556 #define PTHREAD_CREATE_DETACHED 1
12557 #endif
12558         pthread_t t;
12559         int status;
12560         int detach = PTHREAD_CREATE_DETACHED;
12561
12562 #if HAVE_PTHREADS > 4
12563         /* Final pthreads */
12564         pthread_attr_t attr;
12565
12566         status = pthread_attr_init(&attr);
12567         if( status ) return status;
12568
12569 #if HAVE_PTHREADS < 7
12570         status = pthread_attr_setdetachstate(&attr, &detach);
12571         if( status < 0 ) status = errno;
12572 #else
12573         status = pthread_attr_setdetachstate(&attr, detach);
12574 #endif
12575         if( status ) return status;
12576         status = pthread_create( &t, &attr, task, NULL );
12577 #if HAVE_PTHREADS < 7
12578         if( status < 0 ) status = errno;
12579 #endif
12580         if( status ) return status;
12581 #else
12582         /* Draft 4 pthreads */
12583         status = pthread_create( &t, pthread_attr_default, task, NULL );
12584         if( status ) return errno;
12585
12586         /* give thread a chance to complete */
12587         /* it should remain joinable and hence detachable */
12588         sleep( 1 );
12589
12590         status = pthread_detach( &t );
12591         if( status ) return errno;
12592 #endif
12593
12594 #ifdef HAVE_LINUX_THREADS
12595         pthread_kill_other_threads_np();
12596 #endif
12597
12598         return 0;
12599
12600 ; return 0; }
12601 EOF
12602 if { (eval echo configure:12603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12603   rm -rf conftest*
12604   ol_cv_pthread_thread=yes
12605 else
12606   echo "configure: failed program was:" >&5
12607   cat conftest.$ac_ext >&5
12608   rm -rf conftest*
12609   ol_cv_pthread_thread=no
12610 fi
12611 rm -f conftest*
12612 else
12613   cat > conftest.$ac_ext <<EOF
12614 #line 12615 "configure"
12615 #include "confdefs.h"
12616 /* pthread test headers */
12617 #include <pthread.h>
12618 #if HAVE_PTHREADS < 7
12619 #include <errno.h>
12620 #endif
12621 #ifndef NULL
12622 #define NULL (void*)0
12623 #endif
12624
12625 static void *task(p)
12626         void *p;
12627 {
12628         return (void *) (p == NULL);
12629 }
12630
12631
12632 int main(argc, argv)
12633         int argc;
12634         char **argv;
12635 {
12636
12637         /* pthread test function */
12638 #ifndef PTHREAD_CREATE_DETACHED
12639 #define PTHREAD_CREATE_DETACHED 1
12640 #endif
12641         pthread_t t;
12642         int status;
12643         int detach = PTHREAD_CREATE_DETACHED;
12644
12645 #if HAVE_PTHREADS > 4
12646         /* Final pthreads */
12647         pthread_attr_t attr;
12648
12649         status = pthread_attr_init(&attr);
12650         if( status ) return status;
12651
12652 #if HAVE_PTHREADS < 7
12653         status = pthread_attr_setdetachstate(&attr, &detach);
12654         if( status < 0 ) status = errno;
12655 #else
12656         status = pthread_attr_setdetachstate(&attr, detach);
12657 #endif
12658         if( status ) return status;
12659         status = pthread_create( &t, &attr, task, NULL );
12660 #if HAVE_PTHREADS < 7
12661         if( status < 0 ) status = errno;
12662 #endif
12663         if( status ) return status;
12664 #else
12665         /* Draft 4 pthreads */
12666         status = pthread_create( &t, pthread_attr_default, task, NULL );
12667         if( status ) return errno;
12668
12669         /* give thread a chance to complete */
12670         /* it should remain joinable and hence detachable */
12671         sleep( 1 );
12672
12673         status = pthread_detach( &t );
12674         if( status ) return errno;
12675 #endif
12676
12677 #ifdef HAVE_LINUX_THREADS
12678         pthread_kill_other_threads_np();
12679 #endif
12680
12681         return 0;
12682
12683 }
12684
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12687 then
12688   ol_cv_pthread_thread=yes
12689 else
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -fr conftest*
12693   ol_cv_pthread_thread=no
12694 fi
12695 rm -fr conftest*
12696 fi
12697
12698
12699                 # restore the LIBS
12700                 LIBS="$ol_LIBS"
12701         
12702 fi
12703
12704 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12705
12706         if test $ol_cv_pthread_thread = yes ; then
12707                 ol_link_pthreads="-thread"
12708                 ol_link_threads=posix
12709         fi
12710 fi
12711
12712
12713                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12714 if test "$ol_link_threads" = no ; then
12715         # try -lpthread -lmach -lexc -lc_r
12716         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12717 echo "configure:12718: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12718 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12719   echo $ac_n "(cached) $ac_c" 1>&6
12720 else
12721   
12722                 # save the flags
12723                 ol_LIBS="$LIBS"
12724                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12725
12726                 if test "$cross_compiling" = yes; then
12727   cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 /* pthread test headers */
12731 #include <pthread.h>
12732 #if HAVE_PTHREADS < 7
12733 #include <errno.h>
12734 #endif
12735 #ifndef NULL
12736 #define NULL (void*)0
12737 #endif
12738
12739 static void *task(p)
12740         void *p;
12741 {
12742         return (void *) (p == NULL);
12743 }
12744
12745 int main() {
12746
12747         /* pthread test function */
12748 #ifndef PTHREAD_CREATE_DETACHED
12749 #define PTHREAD_CREATE_DETACHED 1
12750 #endif
12751         pthread_t t;
12752         int status;
12753         int detach = PTHREAD_CREATE_DETACHED;
12754
12755 #if HAVE_PTHREADS > 4
12756         /* Final pthreads */
12757         pthread_attr_t attr;
12758
12759         status = pthread_attr_init(&attr);
12760         if( status ) return status;
12761
12762 #if HAVE_PTHREADS < 7
12763         status = pthread_attr_setdetachstate(&attr, &detach);
12764         if( status < 0 ) status = errno;
12765 #else
12766         status = pthread_attr_setdetachstate(&attr, detach);
12767 #endif
12768         if( status ) return status;
12769         status = pthread_create( &t, &attr, task, NULL );
12770 #if HAVE_PTHREADS < 7
12771         if( status < 0 ) status = errno;
12772 #endif
12773         if( status ) return status;
12774 #else
12775         /* Draft 4 pthreads */
12776         status = pthread_create( &t, pthread_attr_default, task, NULL );
12777         if( status ) return errno;
12778
12779         /* give thread a chance to complete */
12780         /* it should remain joinable and hence detachable */
12781         sleep( 1 );
12782
12783         status = pthread_detach( &t );
12784         if( status ) return errno;
12785 #endif
12786
12787 #ifdef HAVE_LINUX_THREADS
12788         pthread_kill_other_threads_np();
12789 #endif
12790
12791         return 0;
12792
12793 ; return 0; }
12794 EOF
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12796   rm -rf conftest*
12797   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12798 else
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12803 fi
12804 rm -f conftest*
12805 else
12806   cat > conftest.$ac_ext <<EOF
12807 #line 12808 "configure"
12808 #include "confdefs.h"
12809 /* pthread test headers */
12810 #include <pthread.h>
12811 #if HAVE_PTHREADS < 7
12812 #include <errno.h>
12813 #endif
12814 #ifndef NULL
12815 #define NULL (void*)0
12816 #endif
12817
12818 static void *task(p)
12819         void *p;
12820 {
12821         return (void *) (p == NULL);
12822 }
12823
12824
12825 int main(argc, argv)
12826         int argc;
12827         char **argv;
12828 {
12829
12830         /* pthread test function */
12831 #ifndef PTHREAD_CREATE_DETACHED
12832 #define PTHREAD_CREATE_DETACHED 1
12833 #endif
12834         pthread_t t;
12835         int status;
12836         int detach = PTHREAD_CREATE_DETACHED;
12837
12838 #if HAVE_PTHREADS > 4
12839         /* Final pthreads */
12840         pthread_attr_t attr;
12841
12842         status = pthread_attr_init(&attr);
12843         if( status ) return status;
12844
12845 #if HAVE_PTHREADS < 7
12846         status = pthread_attr_setdetachstate(&attr, &detach);
12847         if( status < 0 ) status = errno;
12848 #else
12849         status = pthread_attr_setdetachstate(&attr, detach);
12850 #endif
12851         if( status ) return status;
12852         status = pthread_create( &t, &attr, task, NULL );
12853 #if HAVE_PTHREADS < 7
12854         if( status < 0 ) status = errno;
12855 #endif
12856         if( status ) return status;
12857 #else
12858         /* Draft 4 pthreads */
12859         status = pthread_create( &t, pthread_attr_default, task, NULL );
12860         if( status ) return errno;
12861
12862         /* give thread a chance to complete */
12863         /* it should remain joinable and hence detachable */
12864         sleep( 1 );
12865
12866         status = pthread_detach( &t );
12867         if( status ) return errno;
12868 #endif
12869
12870 #ifdef HAVE_LINUX_THREADS
12871         pthread_kill_other_threads_np();
12872 #endif
12873
12874         return 0;
12875
12876 }
12877
12878 EOF
12879 if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12880 then
12881   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12882 else
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -fr conftest*
12886   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12887 fi
12888 rm -fr conftest*
12889 fi
12890
12891
12892                 # restore the LIBS
12893                 LIBS="$ol_LIBS"
12894         
12895 fi
12896
12897 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12898
12899         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12900                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12901                 ol_link_threads=posix
12902         fi
12903 fi
12904
12905                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12906 if test "$ol_link_threads" = no ; then
12907         # try -lpthread -lmach -lexc
12908         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12909 echo "configure:12910: checking for pthread link with -lpthread -lmach -lexc" >&5
12910 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12911   echo $ac_n "(cached) $ac_c" 1>&6
12912 else
12913   
12914                 # save the flags
12915                 ol_LIBS="$LIBS"
12916                 LIBS="-lpthread -lmach -lexc $LIBS"
12917
12918                 if test "$cross_compiling" = yes; then
12919   cat > conftest.$ac_ext <<EOF
12920 #line 12921 "configure"
12921 #include "confdefs.h"
12922 /* pthread test headers */
12923 #include <pthread.h>
12924 #if HAVE_PTHREADS < 7
12925 #include <errno.h>
12926 #endif
12927 #ifndef NULL
12928 #define NULL (void*)0
12929 #endif
12930
12931 static void *task(p)
12932         void *p;
12933 {
12934         return (void *) (p == NULL);
12935 }
12936
12937 int main() {
12938
12939         /* pthread test function */
12940 #ifndef PTHREAD_CREATE_DETACHED
12941 #define PTHREAD_CREATE_DETACHED 1
12942 #endif
12943         pthread_t t;
12944         int status;
12945         int detach = PTHREAD_CREATE_DETACHED;
12946
12947 #if HAVE_PTHREADS > 4
12948         /* Final pthreads */
12949         pthread_attr_t attr;
12950
12951         status = pthread_attr_init(&attr);
12952         if( status ) return status;
12953
12954 #if HAVE_PTHREADS < 7
12955         status = pthread_attr_setdetachstate(&attr, &detach);
12956         if( status < 0 ) status = errno;
12957 #else
12958         status = pthread_attr_setdetachstate(&attr, detach);
12959 #endif
12960         if( status ) return status;
12961         status = pthread_create( &t, &attr, task, NULL );
12962 #if HAVE_PTHREADS < 7
12963         if( status < 0 ) status = errno;
12964 #endif
12965         if( status ) return status;
12966 #else
12967         /* Draft 4 pthreads */
12968         status = pthread_create( &t, pthread_attr_default, task, NULL );
12969         if( status ) return errno;
12970
12971         /* give thread a chance to complete */
12972         /* it should remain joinable and hence detachable */
12973         sleep( 1 );
12974
12975         status = pthread_detach( &t );
12976         if( status ) return errno;
12977 #endif
12978
12979 #ifdef HAVE_LINUX_THREADS
12980         pthread_kill_other_threads_np();
12981 #endif
12982
12983         return 0;
12984
12985 ; return 0; }
12986 EOF
12987 if { (eval echo configure:12988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12988   rm -rf conftest*
12989   ol_cv_pthread_lpthread_lmach_lexc=yes
12990 else
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   ol_cv_pthread_lpthread_lmach_lexc=no
12995 fi
12996 rm -f conftest*
12997 else
12998   cat > conftest.$ac_ext <<EOF
12999 #line 13000 "configure"
13000 #include "confdefs.h"
13001 /* pthread test headers */
13002 #include <pthread.h>
13003 #if HAVE_PTHREADS < 7
13004 #include <errno.h>
13005 #endif
13006 #ifndef NULL
13007 #define NULL (void*)0
13008 #endif
13009
13010 static void *task(p)
13011         void *p;
13012 {
13013         return (void *) (p == NULL);
13014 }
13015
13016
13017 int main(argc, argv)
13018         int argc;
13019         char **argv;
13020 {
13021
13022         /* pthread test function */
13023 #ifndef PTHREAD_CREATE_DETACHED
13024 #define PTHREAD_CREATE_DETACHED 1
13025 #endif
13026         pthread_t t;
13027         int status;
13028         int detach = PTHREAD_CREATE_DETACHED;
13029
13030 #if HAVE_PTHREADS > 4
13031         /* Final pthreads */
13032         pthread_attr_t attr;
13033
13034         status = pthread_attr_init(&attr);
13035         if( status ) return status;
13036
13037 #if HAVE_PTHREADS < 7
13038         status = pthread_attr_setdetachstate(&attr, &detach);
13039         if( status < 0 ) status = errno;
13040 #else
13041         status = pthread_attr_setdetachstate(&attr, detach);
13042 #endif
13043         if( status ) return status;
13044         status = pthread_create( &t, &attr, task, NULL );
13045 #if HAVE_PTHREADS < 7
13046         if( status < 0 ) status = errno;
13047 #endif
13048         if( status ) return status;
13049 #else
13050         /* Draft 4 pthreads */
13051         status = pthread_create( &t, pthread_attr_default, task, NULL );
13052         if( status ) return errno;
13053
13054         /* give thread a chance to complete */
13055         /* it should remain joinable and hence detachable */
13056         sleep( 1 );
13057
13058         status = pthread_detach( &t );
13059         if( status ) return errno;
13060 #endif
13061
13062 #ifdef HAVE_LINUX_THREADS
13063         pthread_kill_other_threads_np();
13064 #endif
13065
13066         return 0;
13067
13068 }
13069
13070 EOF
13071 if { (eval echo configure:13072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13072 then
13073   ol_cv_pthread_lpthread_lmach_lexc=yes
13074 else
13075   echo "configure: failed program was:" >&5
13076   cat conftest.$ac_ext >&5
13077   rm -fr conftest*
13078   ol_cv_pthread_lpthread_lmach_lexc=no
13079 fi
13080 rm -fr conftest*
13081 fi
13082
13083
13084                 # restore the LIBS
13085                 LIBS="$ol_LIBS"
13086         
13087 fi
13088
13089 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13090
13091         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13092                 ol_link_pthreads="-lpthread -lmach -lexc"
13093                 ol_link_threads=posix
13094         fi
13095 fi
13096
13097
13098                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13099 if test "$ol_link_threads" = no ; then
13100         # try -lpthread -Wl,-woff,85
13101         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13102 echo "configure:13103: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13103 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13104   echo $ac_n "(cached) $ac_c" 1>&6
13105 else
13106   
13107                 # save the flags
13108                 ol_LIBS="$LIBS"
13109                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13110
13111                 if test "$cross_compiling" = yes; then
13112   cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 /* pthread test headers */
13116 #include <pthread.h>
13117 #if HAVE_PTHREADS < 7
13118 #include <errno.h>
13119 #endif
13120 #ifndef NULL
13121 #define NULL (void*)0
13122 #endif
13123
13124 static void *task(p)
13125         void *p;
13126 {
13127         return (void *) (p == NULL);
13128 }
13129
13130 int main() {
13131
13132         /* pthread test function */
13133 #ifndef PTHREAD_CREATE_DETACHED
13134 #define PTHREAD_CREATE_DETACHED 1
13135 #endif
13136         pthread_t t;
13137         int status;
13138         int detach = PTHREAD_CREATE_DETACHED;
13139
13140 #if HAVE_PTHREADS > 4
13141         /* Final pthreads */
13142         pthread_attr_t attr;
13143
13144         status = pthread_attr_init(&attr);
13145         if( status ) return status;
13146
13147 #if HAVE_PTHREADS < 7
13148         status = pthread_attr_setdetachstate(&attr, &detach);
13149         if( status < 0 ) status = errno;
13150 #else
13151         status = pthread_attr_setdetachstate(&attr, detach);
13152 #endif
13153         if( status ) return status;
13154         status = pthread_create( &t, &attr, task, NULL );
13155 #if HAVE_PTHREADS < 7
13156         if( status < 0 ) status = errno;
13157 #endif
13158         if( status ) return status;
13159 #else
13160         /* Draft 4 pthreads */
13161         status = pthread_create( &t, pthread_attr_default, task, NULL );
13162         if( status ) return errno;
13163
13164         /* give thread a chance to complete */
13165         /* it should remain joinable and hence detachable */
13166         sleep( 1 );
13167
13168         status = pthread_detach( &t );
13169         if( status ) return errno;
13170 #endif
13171
13172 #ifdef HAVE_LINUX_THREADS
13173         pthread_kill_other_threads_np();
13174 #endif
13175
13176         return 0;
13177
13178 ; return 0; }
13179 EOF
13180 if { (eval echo configure:13181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13181   rm -rf conftest*
13182   ol_cv_pthread_lib_lpthread_woff=yes
13183 else
13184   echo "configure: failed program was:" >&5
13185   cat conftest.$ac_ext >&5
13186   rm -rf conftest*
13187   ol_cv_pthread_lib_lpthread_woff=no
13188 fi
13189 rm -f conftest*
13190 else
13191   cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 /* pthread test headers */
13195 #include <pthread.h>
13196 #if HAVE_PTHREADS < 7
13197 #include <errno.h>
13198 #endif
13199 #ifndef NULL
13200 #define NULL (void*)0
13201 #endif
13202
13203 static void *task(p)
13204         void *p;
13205 {
13206         return (void *) (p == NULL);
13207 }
13208
13209
13210 int main(argc, argv)
13211         int argc;
13212         char **argv;
13213 {
13214
13215         /* pthread test function */
13216 #ifndef PTHREAD_CREATE_DETACHED
13217 #define PTHREAD_CREATE_DETACHED 1
13218 #endif
13219         pthread_t t;
13220         int status;
13221         int detach = PTHREAD_CREATE_DETACHED;
13222
13223 #if HAVE_PTHREADS > 4
13224         /* Final pthreads */
13225         pthread_attr_t attr;
13226
13227         status = pthread_attr_init(&attr);
13228         if( status ) return status;
13229
13230 #if HAVE_PTHREADS < 7
13231         status = pthread_attr_setdetachstate(&attr, &detach);
13232         if( status < 0 ) status = errno;
13233 #else
13234         status = pthread_attr_setdetachstate(&attr, detach);
13235 #endif
13236         if( status ) return status;
13237         status = pthread_create( &t, &attr, task, NULL );
13238 #if HAVE_PTHREADS < 7
13239         if( status < 0 ) status = errno;
13240 #endif
13241         if( status ) return status;
13242 #else
13243         /* Draft 4 pthreads */
13244         status = pthread_create( &t, pthread_attr_default, task, NULL );
13245         if( status ) return errno;
13246
13247         /* give thread a chance to complete */
13248         /* it should remain joinable and hence detachable */
13249         sleep( 1 );
13250
13251         status = pthread_detach( &t );
13252         if( status ) return errno;
13253 #endif
13254
13255 #ifdef HAVE_LINUX_THREADS
13256         pthread_kill_other_threads_np();
13257 #endif
13258
13259         return 0;
13260
13261 }
13262
13263 EOF
13264 if { (eval echo configure:13265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13265 then
13266   ol_cv_pthread_lib_lpthread_woff=yes
13267 else
13268   echo "configure: failed program was:" >&5
13269   cat conftest.$ac_ext >&5
13270   rm -fr conftest*
13271   ol_cv_pthread_lib_lpthread_woff=no
13272 fi
13273 rm -fr conftest*
13274 fi
13275
13276
13277                 # restore the LIBS
13278                 LIBS="$ol_LIBS"
13279         
13280 fi
13281
13282 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13283
13284         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13285                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13286                 ol_link_threads=posix
13287         fi
13288 fi
13289
13290
13291                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13292 if test "$ol_link_threads" = no ; then
13293         # try -lpthread
13294         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13295 echo "configure:13296: checking for pthread link with -lpthread" >&5
13296 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   
13300                 # save the flags
13301                 ol_LIBS="$LIBS"
13302                 LIBS="-lpthread $LIBS"
13303
13304                 if test "$cross_compiling" = yes; then
13305   cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* pthread test headers */
13309 #include <pthread.h>
13310 #if HAVE_PTHREADS < 7
13311 #include <errno.h>
13312 #endif
13313 #ifndef NULL
13314 #define NULL (void*)0
13315 #endif
13316
13317 static void *task(p)
13318         void *p;
13319 {
13320         return (void *) (p == NULL);
13321 }
13322
13323 int main() {
13324
13325         /* pthread test function */
13326 #ifndef PTHREAD_CREATE_DETACHED
13327 #define PTHREAD_CREATE_DETACHED 1
13328 #endif
13329         pthread_t t;
13330         int status;
13331         int detach = PTHREAD_CREATE_DETACHED;
13332
13333 #if HAVE_PTHREADS > 4
13334         /* Final pthreads */
13335         pthread_attr_t attr;
13336
13337         status = pthread_attr_init(&attr);
13338         if( status ) return status;
13339
13340 #if HAVE_PTHREADS < 7
13341         status = pthread_attr_setdetachstate(&attr, &detach);
13342         if( status < 0 ) status = errno;
13343 #else
13344         status = pthread_attr_setdetachstate(&attr, detach);
13345 #endif
13346         if( status ) return status;
13347         status = pthread_create( &t, &attr, task, NULL );
13348 #if HAVE_PTHREADS < 7
13349         if( status < 0 ) status = errno;
13350 #endif
13351         if( status ) return status;
13352 #else
13353         /* Draft 4 pthreads */
13354         status = pthread_create( &t, pthread_attr_default, task, NULL );
13355         if( status ) return errno;
13356
13357         /* give thread a chance to complete */
13358         /* it should remain joinable and hence detachable */
13359         sleep( 1 );
13360
13361         status = pthread_detach( &t );
13362         if( status ) return errno;
13363 #endif
13364
13365 #ifdef HAVE_LINUX_THREADS
13366         pthread_kill_other_threads_np();
13367 #endif
13368
13369         return 0;
13370
13371 ; return 0; }
13372 EOF
13373 if { (eval echo configure:13374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13374   rm -rf conftest*
13375   ol_cv_pthread_lpthread=yes
13376 else
13377   echo "configure: failed program was:" >&5
13378   cat conftest.$ac_ext >&5
13379   rm -rf conftest*
13380   ol_cv_pthread_lpthread=no
13381 fi
13382 rm -f conftest*
13383 else
13384   cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387 /* pthread test headers */
13388 #include <pthread.h>
13389 #if HAVE_PTHREADS < 7
13390 #include <errno.h>
13391 #endif
13392 #ifndef NULL
13393 #define NULL (void*)0
13394 #endif
13395
13396 static void *task(p)
13397         void *p;
13398 {
13399         return (void *) (p == NULL);
13400 }
13401
13402
13403 int main(argc, argv)
13404         int argc;
13405         char **argv;
13406 {
13407
13408         /* pthread test function */
13409 #ifndef PTHREAD_CREATE_DETACHED
13410 #define PTHREAD_CREATE_DETACHED 1
13411 #endif
13412         pthread_t t;
13413         int status;
13414         int detach = PTHREAD_CREATE_DETACHED;
13415
13416 #if HAVE_PTHREADS > 4
13417         /* Final pthreads */
13418         pthread_attr_t attr;
13419
13420         status = pthread_attr_init(&attr);
13421         if( status ) return status;
13422
13423 #if HAVE_PTHREADS < 7
13424         status = pthread_attr_setdetachstate(&attr, &detach);
13425         if( status < 0 ) status = errno;
13426 #else
13427         status = pthread_attr_setdetachstate(&attr, detach);
13428 #endif
13429         if( status ) return status;
13430         status = pthread_create( &t, &attr, task, NULL );
13431 #if HAVE_PTHREADS < 7
13432         if( status < 0 ) status = errno;
13433 #endif
13434         if( status ) return status;
13435 #else
13436         /* Draft 4 pthreads */
13437         status = pthread_create( &t, pthread_attr_default, task, NULL );
13438         if( status ) return errno;
13439
13440         /* give thread a chance to complete */
13441         /* it should remain joinable and hence detachable */
13442         sleep( 1 );
13443
13444         status = pthread_detach( &t );
13445         if( status ) return errno;
13446 #endif
13447
13448 #ifdef HAVE_LINUX_THREADS
13449         pthread_kill_other_threads_np();
13450 #endif
13451
13452         return 0;
13453
13454 }
13455
13456 EOF
13457 if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13458 then
13459   ol_cv_pthread_lpthread=yes
13460 else
13461   echo "configure: failed program was:" >&5
13462   cat conftest.$ac_ext >&5
13463   rm -fr conftest*
13464   ol_cv_pthread_lpthread=no
13465 fi
13466 rm -fr conftest*
13467 fi
13468
13469
13470                 # restore the LIBS
13471                 LIBS="$ol_LIBS"
13472         
13473 fi
13474
13475 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13476
13477         if test $ol_cv_pthread_lpthread = yes ; then
13478                 ol_link_pthreads="-lpthread"
13479                 ol_link_threads=posix
13480         fi
13481 fi
13482
13483                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13484 if test "$ol_link_threads" = no ; then
13485         # try -lc_r
13486         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13487 echo "configure:13488: checking for pthread link with -lc_r" >&5
13488 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13489   echo $ac_n "(cached) $ac_c" 1>&6
13490 else
13491   
13492                 # save the flags
13493                 ol_LIBS="$LIBS"
13494                 LIBS="-lc_r $LIBS"
13495
13496                 if test "$cross_compiling" = yes; then
13497   cat > conftest.$ac_ext <<EOF
13498 #line 13499 "configure"
13499 #include "confdefs.h"
13500 /* pthread test headers */
13501 #include <pthread.h>
13502 #if HAVE_PTHREADS < 7
13503 #include <errno.h>
13504 #endif
13505 #ifndef NULL
13506 #define NULL (void*)0
13507 #endif
13508
13509 static void *task(p)
13510         void *p;
13511 {
13512         return (void *) (p == NULL);
13513 }
13514
13515 int main() {
13516
13517         /* pthread test function */
13518 #ifndef PTHREAD_CREATE_DETACHED
13519 #define PTHREAD_CREATE_DETACHED 1
13520 #endif
13521         pthread_t t;
13522         int status;
13523         int detach = PTHREAD_CREATE_DETACHED;
13524
13525 #if HAVE_PTHREADS > 4
13526         /* Final pthreads */
13527         pthread_attr_t attr;
13528
13529         status = pthread_attr_init(&attr);
13530         if( status ) return status;
13531
13532 #if HAVE_PTHREADS < 7
13533         status = pthread_attr_setdetachstate(&attr, &detach);
13534         if( status < 0 ) status = errno;
13535 #else
13536         status = pthread_attr_setdetachstate(&attr, detach);
13537 #endif
13538         if( status ) return status;
13539         status = pthread_create( &t, &attr, task, NULL );
13540 #if HAVE_PTHREADS < 7
13541         if( status < 0 ) status = errno;
13542 #endif
13543         if( status ) return status;
13544 #else
13545         /* Draft 4 pthreads */
13546         status = pthread_create( &t, pthread_attr_default, task, NULL );
13547         if( status ) return errno;
13548
13549         /* give thread a chance to complete */
13550         /* it should remain joinable and hence detachable */
13551         sleep( 1 );
13552
13553         status = pthread_detach( &t );
13554         if( status ) return errno;
13555 #endif
13556
13557 #ifdef HAVE_LINUX_THREADS
13558         pthread_kill_other_threads_np();
13559 #endif
13560
13561         return 0;
13562
13563 ; return 0; }
13564 EOF
13565 if { (eval echo configure:13566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13566   rm -rf conftest*
13567   ol_cv_pthread_lc_r=yes
13568 else
13569   echo "configure: failed program was:" >&5
13570   cat conftest.$ac_ext >&5
13571   rm -rf conftest*
13572   ol_cv_pthread_lc_r=no
13573 fi
13574 rm -f conftest*
13575 else
13576   cat > conftest.$ac_ext <<EOF
13577 #line 13578 "configure"
13578 #include "confdefs.h"
13579 /* pthread test headers */
13580 #include <pthread.h>
13581 #if HAVE_PTHREADS < 7
13582 #include <errno.h>
13583 #endif
13584 #ifndef NULL
13585 #define NULL (void*)0
13586 #endif
13587
13588 static void *task(p)
13589         void *p;
13590 {
13591         return (void *) (p == NULL);
13592 }
13593
13594
13595 int main(argc, argv)
13596         int argc;
13597         char **argv;
13598 {
13599
13600         /* pthread test function */
13601 #ifndef PTHREAD_CREATE_DETACHED
13602 #define PTHREAD_CREATE_DETACHED 1
13603 #endif
13604         pthread_t t;
13605         int status;
13606         int detach = PTHREAD_CREATE_DETACHED;
13607
13608 #if HAVE_PTHREADS > 4
13609         /* Final pthreads */
13610         pthread_attr_t attr;
13611
13612         status = pthread_attr_init(&attr);
13613         if( status ) return status;
13614
13615 #if HAVE_PTHREADS < 7
13616         status = pthread_attr_setdetachstate(&attr, &detach);
13617         if( status < 0 ) status = errno;
13618 #else
13619         status = pthread_attr_setdetachstate(&attr, detach);
13620 #endif
13621         if( status ) return status;
13622         status = pthread_create( &t, &attr, task, NULL );
13623 #if HAVE_PTHREADS < 7
13624         if( status < 0 ) status = errno;
13625 #endif
13626         if( status ) return status;
13627 #else
13628         /* Draft 4 pthreads */
13629         status = pthread_create( &t, pthread_attr_default, task, NULL );
13630         if( status ) return errno;
13631
13632         /* give thread a chance to complete */
13633         /* it should remain joinable and hence detachable */
13634         sleep( 1 );
13635
13636         status = pthread_detach( &t );
13637         if( status ) return errno;
13638 #endif
13639
13640 #ifdef HAVE_LINUX_THREADS
13641         pthread_kill_other_threads_np();
13642 #endif
13643
13644         return 0;
13645
13646 }
13647
13648 EOF
13649 if { (eval echo configure:13650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13650 then
13651   ol_cv_pthread_lc_r=yes
13652 else
13653   echo "configure: failed program was:" >&5
13654   cat conftest.$ac_ext >&5
13655   rm -fr conftest*
13656   ol_cv_pthread_lc_r=no
13657 fi
13658 rm -fr conftest*
13659 fi
13660
13661
13662                 # restore the LIBS
13663                 LIBS="$ol_LIBS"
13664         
13665 fi
13666
13667 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13668
13669         if test $ol_cv_pthread_lc_r = yes ; then
13670                 ol_link_pthreads="-lc_r"
13671                 ol_link_threads=posix
13672         fi
13673 fi
13674
13675
13676                 # Pthread try link: -threads (ol_cv_pthread_threads)
13677 if test "$ol_link_threads" = no ; then
13678         # try -threads
13679         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13680 echo "configure:13681: checking for pthread link with -threads" >&5
13681 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13682   echo $ac_n "(cached) $ac_c" 1>&6
13683 else
13684   
13685                 # save the flags
13686                 ol_LIBS="$LIBS"
13687                 LIBS="-threads $LIBS"
13688
13689                 if test "$cross_compiling" = yes; then
13690   cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693 /* pthread test headers */
13694 #include <pthread.h>
13695 #if HAVE_PTHREADS < 7
13696 #include <errno.h>
13697 #endif
13698 #ifndef NULL
13699 #define NULL (void*)0
13700 #endif
13701
13702 static void *task(p)
13703         void *p;
13704 {
13705         return (void *) (p == NULL);
13706 }
13707
13708 int main() {
13709
13710         /* pthread test function */
13711 #ifndef PTHREAD_CREATE_DETACHED
13712 #define PTHREAD_CREATE_DETACHED 1
13713 #endif
13714         pthread_t t;
13715         int status;
13716         int detach = PTHREAD_CREATE_DETACHED;
13717
13718 #if HAVE_PTHREADS > 4
13719         /* Final pthreads */
13720         pthread_attr_t attr;
13721
13722         status = pthread_attr_init(&attr);
13723         if( status ) return status;
13724
13725 #if HAVE_PTHREADS < 7
13726         status = pthread_attr_setdetachstate(&attr, &detach);
13727         if( status < 0 ) status = errno;
13728 #else
13729         status = pthread_attr_setdetachstate(&attr, detach);
13730 #endif
13731         if( status ) return status;
13732         status = pthread_create( &t, &attr, task, NULL );
13733 #if HAVE_PTHREADS < 7
13734         if( status < 0 ) status = errno;
13735 #endif
13736         if( status ) return status;
13737 #else
13738         /* Draft 4 pthreads */
13739         status = pthread_create( &t, pthread_attr_default, task, NULL );
13740         if( status ) return errno;
13741
13742         /* give thread a chance to complete */
13743         /* it should remain joinable and hence detachable */
13744         sleep( 1 );
13745
13746         status = pthread_detach( &t );
13747         if( status ) return errno;
13748 #endif
13749
13750 #ifdef HAVE_LINUX_THREADS
13751         pthread_kill_other_threads_np();
13752 #endif
13753
13754         return 0;
13755
13756 ; return 0; }
13757 EOF
13758 if { (eval echo configure:13759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13759   rm -rf conftest*
13760   ol_cv_pthread_threads=yes
13761 else
13762   echo "configure: failed program was:" >&5
13763   cat conftest.$ac_ext >&5
13764   rm -rf conftest*
13765   ol_cv_pthread_threads=no
13766 fi
13767 rm -f conftest*
13768 else
13769   cat > conftest.$ac_ext <<EOF
13770 #line 13771 "configure"
13771 #include "confdefs.h"
13772 /* pthread test headers */
13773 #include <pthread.h>
13774 #if HAVE_PTHREADS < 7
13775 #include <errno.h>
13776 #endif
13777 #ifndef NULL
13778 #define NULL (void*)0
13779 #endif
13780
13781 static void *task(p)
13782         void *p;
13783 {
13784         return (void *) (p == NULL);
13785 }
13786
13787
13788 int main(argc, argv)
13789         int argc;
13790         char **argv;
13791 {
13792
13793         /* pthread test function */
13794 #ifndef PTHREAD_CREATE_DETACHED
13795 #define PTHREAD_CREATE_DETACHED 1
13796 #endif
13797         pthread_t t;
13798         int status;
13799         int detach = PTHREAD_CREATE_DETACHED;
13800
13801 #if HAVE_PTHREADS > 4
13802         /* Final pthreads */
13803         pthread_attr_t attr;
13804
13805         status = pthread_attr_init(&attr);
13806         if( status ) return status;
13807
13808 #if HAVE_PTHREADS < 7
13809         status = pthread_attr_setdetachstate(&attr, &detach);
13810         if( status < 0 ) status = errno;
13811 #else
13812         status = pthread_attr_setdetachstate(&attr, detach);
13813 #endif
13814         if( status ) return status;
13815         status = pthread_create( &t, &attr, task, NULL );
13816 #if HAVE_PTHREADS < 7
13817         if( status < 0 ) status = errno;
13818 #endif
13819         if( status ) return status;
13820 #else
13821         /* Draft 4 pthreads */
13822         status = pthread_create( &t, pthread_attr_default, task, NULL );
13823         if( status ) return errno;
13824
13825         /* give thread a chance to complete */
13826         /* it should remain joinable and hence detachable */
13827         sleep( 1 );
13828
13829         status = pthread_detach( &t );
13830         if( status ) return errno;
13831 #endif
13832
13833 #ifdef HAVE_LINUX_THREADS
13834         pthread_kill_other_threads_np();
13835 #endif
13836
13837         return 0;
13838
13839 }
13840
13841 EOF
13842 if { (eval echo configure:13843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13843 then
13844   ol_cv_pthread_threads=yes
13845 else
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -fr conftest*
13849   ol_cv_pthread_threads=no
13850 fi
13851 rm -fr conftest*
13852 fi
13853
13854
13855                 # restore the LIBS
13856                 LIBS="$ol_LIBS"
13857         
13858 fi
13859
13860 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13861
13862         if test $ol_cv_pthread_threads = yes ; then
13863                 ol_link_pthreads="-threads"
13864                 ol_link_threads=posix
13865         fi
13866 fi
13867
13868
13869                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13870 if test "$ol_link_threads" = no ; then
13871         # try -lpthreads -lmach -lexc -lc_r
13872         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13873 echo "configure:13874: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13874 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13875   echo $ac_n "(cached) $ac_c" 1>&6
13876 else
13877   
13878                 # save the flags
13879                 ol_LIBS="$LIBS"
13880                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13881
13882                 if test "$cross_compiling" = yes; then
13883   cat > conftest.$ac_ext <<EOF
13884 #line 13885 "configure"
13885 #include "confdefs.h"
13886 /* pthread test headers */
13887 #include <pthread.h>
13888 #if HAVE_PTHREADS < 7
13889 #include <errno.h>
13890 #endif
13891 #ifndef NULL
13892 #define NULL (void*)0
13893 #endif
13894
13895 static void *task(p)
13896         void *p;
13897 {
13898         return (void *) (p == NULL);
13899 }
13900
13901 int main() {
13902
13903         /* pthread test function */
13904 #ifndef PTHREAD_CREATE_DETACHED
13905 #define PTHREAD_CREATE_DETACHED 1
13906 #endif
13907         pthread_t t;
13908         int status;
13909         int detach = PTHREAD_CREATE_DETACHED;
13910
13911 #if HAVE_PTHREADS > 4
13912         /* Final pthreads */
13913         pthread_attr_t attr;
13914
13915         status = pthread_attr_init(&attr);
13916         if( status ) return status;
13917
13918 #if HAVE_PTHREADS < 7
13919         status = pthread_attr_setdetachstate(&attr, &detach);
13920         if( status < 0 ) status = errno;
13921 #else
13922         status = pthread_attr_setdetachstate(&attr, detach);
13923 #endif
13924         if( status ) return status;
13925         status = pthread_create( &t, &attr, task, NULL );
13926 #if HAVE_PTHREADS < 7
13927         if( status < 0 ) status = errno;
13928 #endif
13929         if( status ) return status;
13930 #else
13931         /* Draft 4 pthreads */
13932         status = pthread_create( &t, pthread_attr_default, task, NULL );
13933         if( status ) return errno;
13934
13935         /* give thread a chance to complete */
13936         /* it should remain joinable and hence detachable */
13937         sleep( 1 );
13938
13939         status = pthread_detach( &t );
13940         if( status ) return errno;
13941 #endif
13942
13943 #ifdef HAVE_LINUX_THREADS
13944         pthread_kill_other_threads_np();
13945 #endif
13946
13947         return 0;
13948
13949 ; return 0; }
13950 EOF
13951 if { (eval echo configure:13952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13952   rm -rf conftest*
13953   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13954 else
13955   echo "configure: failed program was:" >&5
13956   cat conftest.$ac_ext >&5
13957   rm -rf conftest*
13958   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13959 fi
13960 rm -f conftest*
13961 else
13962   cat > conftest.$ac_ext <<EOF
13963 #line 13964 "configure"
13964 #include "confdefs.h"
13965 /* pthread test headers */
13966 #include <pthread.h>
13967 #if HAVE_PTHREADS < 7
13968 #include <errno.h>
13969 #endif
13970 #ifndef NULL
13971 #define NULL (void*)0
13972 #endif
13973
13974 static void *task(p)
13975         void *p;
13976 {
13977         return (void *) (p == NULL);
13978 }
13979
13980
13981 int main(argc, argv)
13982         int argc;
13983         char **argv;
13984 {
13985
13986         /* pthread test function */
13987 #ifndef PTHREAD_CREATE_DETACHED
13988 #define PTHREAD_CREATE_DETACHED 1
13989 #endif
13990         pthread_t t;
13991         int status;
13992         int detach = PTHREAD_CREATE_DETACHED;
13993
13994 #if HAVE_PTHREADS > 4
13995         /* Final pthreads */
13996         pthread_attr_t attr;
13997
13998         status = pthread_attr_init(&attr);
13999         if( status ) return status;
14000
14001 #if HAVE_PTHREADS < 7
14002         status = pthread_attr_setdetachstate(&attr, &detach);
14003         if( status < 0 ) status = errno;
14004 #else
14005         status = pthread_attr_setdetachstate(&attr, detach);
14006 #endif
14007         if( status ) return status;
14008         status = pthread_create( &t, &attr, task, NULL );
14009 #if HAVE_PTHREADS < 7
14010         if( status < 0 ) status = errno;
14011 #endif
14012         if( status ) return status;
14013 #else
14014         /* Draft 4 pthreads */
14015         status = pthread_create( &t, pthread_attr_default, task, NULL );
14016         if( status ) return errno;
14017
14018         /* give thread a chance to complete */
14019         /* it should remain joinable and hence detachable */
14020         sleep( 1 );
14021
14022         status = pthread_detach( &t );
14023         if( status ) return errno;
14024 #endif
14025
14026 #ifdef HAVE_LINUX_THREADS
14027         pthread_kill_other_threads_np();
14028 #endif
14029
14030         return 0;
14031
14032 }
14033
14034 EOF
14035 if { (eval echo configure:14036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14036 then
14037   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14038 else
14039   echo "configure: failed program was:" >&5
14040   cat conftest.$ac_ext >&5
14041   rm -fr conftest*
14042   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14043 fi
14044 rm -fr conftest*
14045 fi
14046
14047
14048                 # restore the LIBS
14049                 LIBS="$ol_LIBS"
14050         
14051 fi
14052
14053 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14054
14055         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14056                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14057                 ol_link_threads=posix
14058         fi
14059 fi
14060
14061                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14062 if test "$ol_link_threads" = no ; then
14063         # try -lpthreads -lmach -lexc
14064         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14065 echo "configure:14066: checking for pthread link with -lpthreads -lmach -lexc" >&5
14066 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14067   echo $ac_n "(cached) $ac_c" 1>&6
14068 else
14069   
14070                 # save the flags
14071                 ol_LIBS="$LIBS"
14072                 LIBS="-lpthreads -lmach -lexc $LIBS"
14073
14074                 if test "$cross_compiling" = yes; then
14075   cat > conftest.$ac_ext <<EOF
14076 #line 14077 "configure"
14077 #include "confdefs.h"
14078 /* pthread test headers */
14079 #include <pthread.h>
14080 #if HAVE_PTHREADS < 7
14081 #include <errno.h>
14082 #endif
14083 #ifndef NULL
14084 #define NULL (void*)0
14085 #endif
14086
14087 static void *task(p)
14088         void *p;
14089 {
14090         return (void *) (p == NULL);
14091 }
14092
14093 int main() {
14094
14095         /* pthread test function */
14096 #ifndef PTHREAD_CREATE_DETACHED
14097 #define PTHREAD_CREATE_DETACHED 1
14098 #endif
14099         pthread_t t;
14100         int status;
14101         int detach = PTHREAD_CREATE_DETACHED;
14102
14103 #if HAVE_PTHREADS > 4
14104         /* Final pthreads */
14105         pthread_attr_t attr;
14106
14107         status = pthread_attr_init(&attr);
14108         if( status ) return status;
14109
14110 #if HAVE_PTHREADS < 7
14111         status = pthread_attr_setdetachstate(&attr, &detach);
14112         if( status < 0 ) status = errno;
14113 #else
14114         status = pthread_attr_setdetachstate(&attr, detach);
14115 #endif
14116         if( status ) return status;
14117         status = pthread_create( &t, &attr, task, NULL );
14118 #if HAVE_PTHREADS < 7
14119         if( status < 0 ) status = errno;
14120 #endif
14121         if( status ) return status;
14122 #else
14123         /* Draft 4 pthreads */
14124         status = pthread_create( &t, pthread_attr_default, task, NULL );
14125         if( status ) return errno;
14126
14127         /* give thread a chance to complete */
14128         /* it should remain joinable and hence detachable */
14129         sleep( 1 );
14130
14131         status = pthread_detach( &t );
14132         if( status ) return errno;
14133 #endif
14134
14135 #ifdef HAVE_LINUX_THREADS
14136         pthread_kill_other_threads_np();
14137 #endif
14138
14139         return 0;
14140
14141 ; return 0; }
14142 EOF
14143 if { (eval echo configure:14144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14144   rm -rf conftest*
14145   ol_cv_pthread_lpthreads_lmach_lexc=yes
14146 else
14147   echo "configure: failed program was:" >&5
14148   cat conftest.$ac_ext >&5
14149   rm -rf conftest*
14150   ol_cv_pthread_lpthreads_lmach_lexc=no
14151 fi
14152 rm -f conftest*
14153 else
14154   cat > conftest.$ac_ext <<EOF
14155 #line 14156 "configure"
14156 #include "confdefs.h"
14157 /* pthread test headers */
14158 #include <pthread.h>
14159 #if HAVE_PTHREADS < 7
14160 #include <errno.h>
14161 #endif
14162 #ifndef NULL
14163 #define NULL (void*)0
14164 #endif
14165
14166 static void *task(p)
14167         void *p;
14168 {
14169         return (void *) (p == NULL);
14170 }
14171
14172
14173 int main(argc, argv)
14174         int argc;
14175         char **argv;
14176 {
14177
14178         /* pthread test function */
14179 #ifndef PTHREAD_CREATE_DETACHED
14180 #define PTHREAD_CREATE_DETACHED 1
14181 #endif
14182         pthread_t t;
14183         int status;
14184         int detach = PTHREAD_CREATE_DETACHED;
14185
14186 #if HAVE_PTHREADS > 4
14187         /* Final pthreads */
14188         pthread_attr_t attr;
14189
14190         status = pthread_attr_init(&attr);
14191         if( status ) return status;
14192
14193 #if HAVE_PTHREADS < 7
14194         status = pthread_attr_setdetachstate(&attr, &detach);
14195         if( status < 0 ) status = errno;
14196 #else
14197         status = pthread_attr_setdetachstate(&attr, detach);
14198 #endif
14199         if( status ) return status;
14200         status = pthread_create( &t, &attr, task, NULL );
14201 #if HAVE_PTHREADS < 7
14202         if( status < 0 ) status = errno;
14203 #endif
14204         if( status ) return status;
14205 #else
14206         /* Draft 4 pthreads */
14207         status = pthread_create( &t, pthread_attr_default, task, NULL );
14208         if( status ) return errno;
14209
14210         /* give thread a chance to complete */
14211         /* it should remain joinable and hence detachable */
14212         sleep( 1 );
14213
14214         status = pthread_detach( &t );
14215         if( status ) return errno;
14216 #endif
14217
14218 #ifdef HAVE_LINUX_THREADS
14219         pthread_kill_other_threads_np();
14220 #endif
14221
14222         return 0;
14223
14224 }
14225
14226 EOF
14227 if { (eval echo configure:14228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14228 then
14229   ol_cv_pthread_lpthreads_lmach_lexc=yes
14230 else
14231   echo "configure: failed program was:" >&5
14232   cat conftest.$ac_ext >&5
14233   rm -fr conftest*
14234   ol_cv_pthread_lpthreads_lmach_lexc=no
14235 fi
14236 rm -fr conftest*
14237 fi
14238
14239
14240                 # restore the LIBS
14241                 LIBS="$ol_LIBS"
14242         
14243 fi
14244
14245 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14246
14247         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14248                 ol_link_pthreads="-lpthreads -lmach -lexc"
14249                 ol_link_threads=posix
14250         fi
14251 fi
14252
14253                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14254 if test "$ol_link_threads" = no ; then
14255         # try -lpthreads -lexc
14256         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14257 echo "configure:14258: checking for pthread link with -lpthreads -lexc" >&5
14258 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14259   echo $ac_n "(cached) $ac_c" 1>&6
14260 else
14261   
14262                 # save the flags
14263                 ol_LIBS="$LIBS"
14264                 LIBS="-lpthreads -lexc $LIBS"
14265
14266                 if test "$cross_compiling" = yes; then
14267   cat > conftest.$ac_ext <<EOF
14268 #line 14269 "configure"
14269 #include "confdefs.h"
14270 /* pthread test headers */
14271 #include <pthread.h>
14272 #if HAVE_PTHREADS < 7
14273 #include <errno.h>
14274 #endif
14275 #ifndef NULL
14276 #define NULL (void*)0
14277 #endif
14278
14279 static void *task(p)
14280         void *p;
14281 {
14282         return (void *) (p == NULL);
14283 }
14284
14285 int main() {
14286
14287         /* pthread test function */
14288 #ifndef PTHREAD_CREATE_DETACHED
14289 #define PTHREAD_CREATE_DETACHED 1
14290 #endif
14291         pthread_t t;
14292         int status;
14293         int detach = PTHREAD_CREATE_DETACHED;
14294
14295 #if HAVE_PTHREADS > 4
14296         /* Final pthreads */
14297         pthread_attr_t attr;
14298
14299         status = pthread_attr_init(&attr);
14300         if( status ) return status;
14301
14302 #if HAVE_PTHREADS < 7
14303         status = pthread_attr_setdetachstate(&attr, &detach);
14304         if( status < 0 ) status = errno;
14305 #else
14306         status = pthread_attr_setdetachstate(&attr, detach);
14307 #endif
14308         if( status ) return status;
14309         status = pthread_create( &t, &attr, task, NULL );
14310 #if HAVE_PTHREADS < 7
14311         if( status < 0 ) status = errno;
14312 #endif
14313         if( status ) return status;
14314 #else
14315         /* Draft 4 pthreads */
14316         status = pthread_create( &t, pthread_attr_default, task, NULL );
14317         if( status ) return errno;
14318
14319         /* give thread a chance to complete */
14320         /* it should remain joinable and hence detachable */
14321         sleep( 1 );
14322
14323         status = pthread_detach( &t );
14324         if( status ) return errno;
14325 #endif
14326
14327 #ifdef HAVE_LINUX_THREADS
14328         pthread_kill_other_threads_np();
14329 #endif
14330
14331         return 0;
14332
14333 ; return 0; }
14334 EOF
14335 if { (eval echo configure:14336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14336   rm -rf conftest*
14337   ol_cv_pthread_lpthreads_lexc=yes
14338 else
14339   echo "configure: failed program was:" >&5
14340   cat conftest.$ac_ext >&5
14341   rm -rf conftest*
14342   ol_cv_pthread_lpthreads_lexc=no
14343 fi
14344 rm -f conftest*
14345 else
14346   cat > conftest.$ac_ext <<EOF
14347 #line 14348 "configure"
14348 #include "confdefs.h"
14349 /* pthread test headers */
14350 #include <pthread.h>
14351 #if HAVE_PTHREADS < 7
14352 #include <errno.h>
14353 #endif
14354 #ifndef NULL
14355 #define NULL (void*)0
14356 #endif
14357
14358 static void *task(p)
14359         void *p;
14360 {
14361         return (void *) (p == NULL);
14362 }
14363
14364
14365 int main(argc, argv)
14366         int argc;
14367         char **argv;
14368 {
14369
14370         /* pthread test function */
14371 #ifndef PTHREAD_CREATE_DETACHED
14372 #define PTHREAD_CREATE_DETACHED 1
14373 #endif
14374         pthread_t t;
14375         int status;
14376         int detach = PTHREAD_CREATE_DETACHED;
14377
14378 #if HAVE_PTHREADS > 4
14379         /* Final pthreads */
14380         pthread_attr_t attr;
14381
14382         status = pthread_attr_init(&attr);
14383         if( status ) return status;
14384
14385 #if HAVE_PTHREADS < 7
14386         status = pthread_attr_setdetachstate(&attr, &detach);
14387         if( status < 0 ) status = errno;
14388 #else
14389         status = pthread_attr_setdetachstate(&attr, detach);
14390 #endif
14391         if( status ) return status;
14392         status = pthread_create( &t, &attr, task, NULL );
14393 #if HAVE_PTHREADS < 7
14394         if( status < 0 ) status = errno;
14395 #endif
14396         if( status ) return status;
14397 #else
14398         /* Draft 4 pthreads */
14399         status = pthread_create( &t, pthread_attr_default, task, NULL );
14400         if( status ) return errno;
14401
14402         /* give thread a chance to complete */
14403         /* it should remain joinable and hence detachable */
14404         sleep( 1 );
14405
14406         status = pthread_detach( &t );
14407         if( status ) return errno;
14408 #endif
14409
14410 #ifdef HAVE_LINUX_THREADS
14411         pthread_kill_other_threads_np();
14412 #endif
14413
14414         return 0;
14415
14416 }
14417
14418 EOF
14419 if { (eval echo configure:14420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14420 then
14421   ol_cv_pthread_lpthreads_lexc=yes
14422 else
14423   echo "configure: failed program was:" >&5
14424   cat conftest.$ac_ext >&5
14425   rm -fr conftest*
14426   ol_cv_pthread_lpthreads_lexc=no
14427 fi
14428 rm -fr conftest*
14429 fi
14430
14431
14432                 # restore the LIBS
14433                 LIBS="$ol_LIBS"
14434         
14435 fi
14436
14437 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14438
14439         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14440                 ol_link_pthreads="-lpthreads -lexc"
14441                 ol_link_threads=posix
14442         fi
14443 fi
14444
14445
14446                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14447 if test "$ol_link_threads" = no ; then
14448         # try -lpthreads
14449         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14450 echo "configure:14451: checking for pthread link with -lpthreads" >&5
14451 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14452   echo $ac_n "(cached) $ac_c" 1>&6
14453 else
14454   
14455                 # save the flags
14456                 ol_LIBS="$LIBS"
14457                 LIBS="-lpthreads $LIBS"
14458
14459                 if test "$cross_compiling" = yes; then
14460   cat > conftest.$ac_ext <<EOF
14461 #line 14462 "configure"
14462 #include "confdefs.h"
14463 /* pthread test headers */
14464 #include <pthread.h>
14465 #if HAVE_PTHREADS < 7
14466 #include <errno.h>
14467 #endif
14468 #ifndef NULL
14469 #define NULL (void*)0
14470 #endif
14471
14472 static void *task(p)
14473         void *p;
14474 {
14475         return (void *) (p == NULL);
14476 }
14477
14478 int main() {
14479
14480         /* pthread test function */
14481 #ifndef PTHREAD_CREATE_DETACHED
14482 #define PTHREAD_CREATE_DETACHED 1
14483 #endif
14484         pthread_t t;
14485         int status;
14486         int detach = PTHREAD_CREATE_DETACHED;
14487
14488 #if HAVE_PTHREADS > 4
14489         /* Final pthreads */
14490         pthread_attr_t attr;
14491
14492         status = pthread_attr_init(&attr);
14493         if( status ) return status;
14494
14495 #if HAVE_PTHREADS < 7
14496         status = pthread_attr_setdetachstate(&attr, &detach);
14497         if( status < 0 ) status = errno;
14498 #else
14499         status = pthread_attr_setdetachstate(&attr, detach);
14500 #endif
14501         if( status ) return status;
14502         status = pthread_create( &t, &attr, task, NULL );
14503 #if HAVE_PTHREADS < 7
14504         if( status < 0 ) status = errno;
14505 #endif
14506         if( status ) return status;
14507 #else
14508         /* Draft 4 pthreads */
14509         status = pthread_create( &t, pthread_attr_default, task, NULL );
14510         if( status ) return errno;
14511
14512         /* give thread a chance to complete */
14513         /* it should remain joinable and hence detachable */
14514         sleep( 1 );
14515
14516         status = pthread_detach( &t );
14517         if( status ) return errno;
14518 #endif
14519
14520 #ifdef HAVE_LINUX_THREADS
14521         pthread_kill_other_threads_np();
14522 #endif
14523
14524         return 0;
14525
14526 ; return 0; }
14527 EOF
14528 if { (eval echo configure:14529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14529   rm -rf conftest*
14530   ol_cv_pthread_lib_lpthreads=yes
14531 else
14532   echo "configure: failed program was:" >&5
14533   cat conftest.$ac_ext >&5
14534   rm -rf conftest*
14535   ol_cv_pthread_lib_lpthreads=no
14536 fi
14537 rm -f conftest*
14538 else
14539   cat > conftest.$ac_ext <<EOF
14540 #line 14541 "configure"
14541 #include "confdefs.h"
14542 /* pthread test headers */
14543 #include <pthread.h>
14544 #if HAVE_PTHREADS < 7
14545 #include <errno.h>
14546 #endif
14547 #ifndef NULL
14548 #define NULL (void*)0
14549 #endif
14550
14551 static void *task(p)
14552         void *p;
14553 {
14554         return (void *) (p == NULL);
14555 }
14556
14557
14558 int main(argc, argv)
14559         int argc;
14560         char **argv;
14561 {
14562
14563         /* pthread test function */
14564 #ifndef PTHREAD_CREATE_DETACHED
14565 #define PTHREAD_CREATE_DETACHED 1
14566 #endif
14567         pthread_t t;
14568         int status;
14569         int detach = PTHREAD_CREATE_DETACHED;
14570
14571 #if HAVE_PTHREADS > 4
14572         /* Final pthreads */
14573         pthread_attr_t attr;
14574
14575         status = pthread_attr_init(&attr);
14576         if( status ) return status;
14577
14578 #if HAVE_PTHREADS < 7
14579         status = pthread_attr_setdetachstate(&attr, &detach);
14580         if( status < 0 ) status = errno;
14581 #else
14582         status = pthread_attr_setdetachstate(&attr, detach);
14583 #endif
14584         if( status ) return status;
14585         status = pthread_create( &t, &attr, task, NULL );
14586 #if HAVE_PTHREADS < 7
14587         if( status < 0 ) status = errno;
14588 #endif
14589         if( status ) return status;
14590 #else
14591         /* Draft 4 pthreads */
14592         status = pthread_create( &t, pthread_attr_default, task, NULL );
14593         if( status ) return errno;
14594
14595         /* give thread a chance to complete */
14596         /* it should remain joinable and hence detachable */
14597         sleep( 1 );
14598
14599         status = pthread_detach( &t );
14600         if( status ) return errno;
14601 #endif
14602
14603 #ifdef HAVE_LINUX_THREADS
14604         pthread_kill_other_threads_np();
14605 #endif
14606
14607         return 0;
14608
14609 }
14610
14611 EOF
14612 if { (eval echo configure:14613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14613 then
14614   ol_cv_pthread_lib_lpthreads=yes
14615 else
14616   echo "configure: failed program was:" >&5
14617   cat conftest.$ac_ext >&5
14618   rm -fr conftest*
14619   ol_cv_pthread_lib_lpthreads=no
14620 fi
14621 rm -fr conftest*
14622 fi
14623
14624
14625                 # restore the LIBS
14626                 LIBS="$ol_LIBS"
14627         
14628 fi
14629
14630 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14631
14632         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14633                 ol_link_pthreads="-lpthreads"
14634                 ol_link_threads=posix
14635         fi
14636 fi
14637
14638
14639                 if test $ol_link_threads != no ; then
14640                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14641
14642                                                 save_CPPFLAGS="$CPPFLAGS"
14643                         save_LIBS="$LIBS"
14644                         LIBS="$LTHREAD_LIBS $LIBS"
14645
14646                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14647 do
14648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14649 echo "configure:14650: checking for $ac_func" >&5
14650 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14651   echo $ac_n "(cached) $ac_c" 1>&6
14652 else
14653   cat > conftest.$ac_ext <<EOF
14654 #line 14655 "configure"
14655 #include "confdefs.h"
14656 /* System header to define __stub macros and hopefully few prototypes,
14657     which can conflict with char $ac_func(); below.  */
14658 #include <assert.h>
14659 /* Override any gcc2 internal prototype to avoid an error.  */
14660 /* We use char because int might match the return type of a gcc2
14661     builtin and then its argument prototype would still apply.  */
14662 char $ac_func();
14663 char (*f)();
14664
14665 int main() {
14666
14667 /* The GNU C library defines this for functions which it implements
14668     to always fail with ENOSYS.  Some functions are actually named
14669     something starting with __ and the normal name is an alias.  */
14670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14671 choke me
14672 #else
14673 f = $ac_func;
14674 #endif
14675
14676 ; return 0; }
14677 EOF
14678 if { (eval echo configure:14679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14679   rm -rf conftest*
14680   eval "ac_cv_func_$ac_func=yes"
14681 else
14682   echo "configure: failed program was:" >&5
14683   cat conftest.$ac_ext >&5
14684   rm -rf conftest*
14685   eval "ac_cv_func_$ac_func=no"
14686 fi
14687 rm -f conftest*
14688 fi
14689
14690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14691   echo "$ac_t""yes" 1>&6
14692     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14693   cat >> confdefs.h <<EOF
14694 #define $ac_tr_func 1
14695 EOF
14696  
14697 else
14698   echo "$ac_t""no" 1>&6
14699 fi
14700 done
14701
14702
14703                         if test $ac_cv_func_sched_yield = no -a \
14704                                 $ac_cv_func_pthread_yield = no -a \
14705                                 $ac_cv_func_thr_yield = no ; then
14706                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14707 echo "configure:14708: checking for sched_yield in -lrt" >&5
14708 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14709 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14710   echo $ac_n "(cached) $ac_c" 1>&6
14711 else
14712   ac_save_LIBS="$LIBS"
14713 LIBS="-lrt  $LIBS"
14714 cat > conftest.$ac_ext <<EOF
14715 #line 14716 "configure"
14716 #include "confdefs.h"
14717 /* Override any gcc2 internal prototype to avoid an error.  */
14718 /* We use char because int might match the return type of a gcc2
14719     builtin and then its argument prototype would still apply.  */
14720 char sched_yield();
14721
14722 int main() {
14723 sched_yield()
14724 ; return 0; }
14725 EOF
14726 if { (eval echo configure:14727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14727   rm -rf conftest*
14728   eval "ac_cv_lib_$ac_lib_var=yes"
14729 else
14730   echo "configure: failed program was:" >&5
14731   cat conftest.$ac_ext >&5
14732   rm -rf conftest*
14733   eval "ac_cv_lib_$ac_lib_var=no"
14734 fi
14735 rm -f conftest*
14736 LIBS="$ac_save_LIBS"
14737
14738 fi
14739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14740   echo "$ac_t""yes" 1>&6
14741   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14742                                         cat >> confdefs.h <<\EOF
14743 #define HAVE_SCHED_YIELD 1
14744 EOF
14745
14746                                         ac_cv_func_sched_yield=yes
14747 else
14748   echo "$ac_t""no" 1>&6
14749 ac_cv_func_sched_yield=no
14750 fi
14751
14752                         fi
14753                         if test $ac_cv_func_sched_yield = no -a \
14754                                 $ac_cv_func_pthread_yield = no -a \
14755                                 "$ac_cv_func_thr_yield" = no ; then
14756                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14757                         fi
14758
14759                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14760 do
14761 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14762 echo "configure:14763: checking for $ac_func" >&5
14763 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14764   echo $ac_n "(cached) $ac_c" 1>&6
14765 else
14766   cat > conftest.$ac_ext <<EOF
14767 #line 14768 "configure"
14768 #include "confdefs.h"
14769 /* System header to define __stub macros and hopefully few prototypes,
14770     which can conflict with char $ac_func(); below.  */
14771 #include <assert.h>
14772 /* Override any gcc2 internal prototype to avoid an error.  */
14773 /* We use char because int might match the return type of a gcc2
14774     builtin and then its argument prototype would still apply.  */
14775 char $ac_func();
14776 char (*f)();
14777
14778 int main() {
14779
14780 /* The GNU C library defines this for functions which it implements
14781     to always fail with ENOSYS.  Some functions are actually named
14782     something starting with __ and the normal name is an alias.  */
14783 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14784 choke me
14785 #else
14786 f = $ac_func;
14787 #endif
14788
14789 ; return 0; }
14790 EOF
14791 if { (eval echo configure:14792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14792   rm -rf conftest*
14793   eval "ac_cv_func_$ac_func=yes"
14794 else
14795   echo "configure: failed program was:" >&5
14796   cat conftest.$ac_ext >&5
14797   rm -rf conftest*
14798   eval "ac_cv_func_$ac_func=no"
14799 fi
14800 rm -f conftest*
14801 fi
14802
14803 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14804   echo "$ac_t""yes" 1>&6
14805     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14806   cat >> confdefs.h <<EOF
14807 #define $ac_tr_func 1
14808 EOF
14809  
14810 else
14811   echo "$ac_t""no" 1>&6
14812 fi
14813 done
14814
14815
14816                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14817 echo "configure:14818: checking for pthread_detach with <pthread.h>" >&5
14818 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14819   echo $ac_n "(cached) $ac_c" 1>&6
14820 else
14821   
14822                                                                 cat > conftest.$ac_ext <<EOF
14823 #line 14824 "configure"
14824 #include "confdefs.h"
14825
14826 #include <pthread.h>
14827 #ifndef NULL
14828 #define NULL (void*)0
14829 #endif
14830
14831 int main() {
14832 pthread_detach(NULL);
14833 ; return 0; }
14834 EOF
14835 if { (eval echo configure:14836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14836   rm -rf conftest*
14837   ol_cv_func_pthread_detach=yes
14838 else
14839   echo "configure: failed program was:" >&5
14840   cat conftest.$ac_ext >&5
14841   rm -rf conftest*
14842   ol_cv_func_pthread_detach=no
14843 fi
14844 rm -f conftest*
14845                         
14846 fi
14847
14848 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14849
14850                         if test $ol_cv_func_pthread_detach = no ; then
14851                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14852                         fi
14853
14854                         cat >> confdefs.h <<\EOF
14855 #define HAVE_PTHREAD_DETACH 1
14856 EOF
14857
14858
14859                                                 for ac_func in \
14860                                 pthread_setconcurrency \
14861                                 pthread_getconcurrency \
14862                                 thr_setconcurrency \
14863                                 thr_getconcurrency \
14864                         
14865 do
14866 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14867 echo "configure:14868: checking for $ac_func" >&5
14868 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14869   echo $ac_n "(cached) $ac_c" 1>&6
14870 else
14871   cat > conftest.$ac_ext <<EOF
14872 #line 14873 "configure"
14873 #include "confdefs.h"
14874 /* System header to define __stub macros and hopefully few prototypes,
14875     which can conflict with char $ac_func(); below.  */
14876 #include <assert.h>
14877 /* Override any gcc2 internal prototype to avoid an error.  */
14878 /* We use char because int might match the return type of a gcc2
14879     builtin and then its argument prototype would still apply.  */
14880 char $ac_func();
14881 char (*f)();
14882
14883 int main() {
14884
14885 /* The GNU C library defines this for functions which it implements
14886     to always fail with ENOSYS.  Some functions are actually named
14887     something starting with __ and the normal name is an alias.  */
14888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14889 choke me
14890 #else
14891 f = $ac_func;
14892 #endif
14893
14894 ; return 0; }
14895 EOF
14896 if { (eval echo configure:14897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14897   rm -rf conftest*
14898   eval "ac_cv_func_$ac_func=yes"
14899 else
14900   echo "configure: failed program was:" >&5
14901   cat conftest.$ac_ext >&5
14902   rm -rf conftest*
14903   eval "ac_cv_func_$ac_func=no"
14904 fi
14905 rm -f conftest*
14906 fi
14907
14908 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14909   echo "$ac_t""yes" 1>&6
14910     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14911   cat >> confdefs.h <<EOF
14912 #define $ac_tr_func 1
14913 EOF
14914  
14915 else
14916   echo "$ac_t""no" 1>&6
14917 fi
14918 done
14919
14920
14921                         
14922         for ac_func in pthread_kill_other_threads_np
14923 do
14924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14925 echo "configure:14926: checking for $ac_func" >&5
14926 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14927   echo $ac_n "(cached) $ac_c" 1>&6
14928 else
14929   cat > conftest.$ac_ext <<EOF
14930 #line 14931 "configure"
14931 #include "confdefs.h"
14932 /* System header to define __stub macros and hopefully few prototypes,
14933     which can conflict with char $ac_func(); below.  */
14934 #include <assert.h>
14935 /* Override any gcc2 internal prototype to avoid an error.  */
14936 /* We use char because int might match the return type of a gcc2
14937     builtin and then its argument prototype would still apply.  */
14938 char $ac_func();
14939 char (*f)();
14940
14941 int main() {
14942
14943 /* The GNU C library defines this for functions which it implements
14944     to always fail with ENOSYS.  Some functions are actually named
14945     something starting with __ and the normal name is an alias.  */
14946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14947 choke me
14948 #else
14949 f = $ac_func;
14950 #endif
14951
14952 ; return 0; }
14953 EOF
14954 if { (eval echo configure:14955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14955   rm -rf conftest*
14956   eval "ac_cv_func_$ac_func=yes"
14957 else
14958   echo "configure: failed program was:" >&5
14959   cat conftest.$ac_ext >&5
14960   rm -rf conftest*
14961   eval "ac_cv_func_$ac_func=no"
14962 fi
14963 rm -f conftest*
14964 fi
14965
14966 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14967   echo "$ac_t""yes" 1>&6
14968     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14969   cat >> confdefs.h <<EOF
14970 #define $ac_tr_func 1
14971 EOF
14972  
14973 else
14974   echo "$ac_t""no" 1>&6
14975 fi
14976 done
14977
14978         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14979 echo "configure:14980: checking for LinuxThreads implementation" >&5
14980 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14981   echo $ac_n "(cached) $ac_c" 1>&6
14982 else
14983   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14984 fi
14985
14986 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14987
14988                         
14989         
14990         
14991         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14992 echo "configure:14993: checking for LinuxThreads consistency" >&5
14993 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14994   echo $ac_n "(cached) $ac_c" 1>&6
14995 else
14996   
14997                 if test $ol_cv_header_linux_threads = yes -a \
14998                         $ol_cv_sys_linux_threads = yes; then
14999                         ol_cv_linux_threads=yes
15000                 elif test $ol_cv_header_linux_threads = no -a \
15001                         $ol_cv_sys_linux_threads = no; then
15002                         ol_cv_linux_threads=no
15003                 else
15004                         ol_cv_linux_threads=error
15005                 fi
15006         
15007 fi
15008
15009 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15010
15011
15012                         if test $ol_cv_linux_threads = error; then
15013                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15014                         fi
15015
15016                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15017 echo "configure:15018: checking if pthread_create() works" >&5
15018 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15019   echo $ac_n "(cached) $ac_c" 1>&6
15020 else
15021   
15022                         if test "$cross_compiling" = yes; then
15023                                 ol_cv_pthread_create_works=yes
15024 else
15025   cat > conftest.$ac_ext <<EOF
15026 #line 15027 "configure"
15027 #include "confdefs.h"
15028 /* pthread test headers */
15029 #include <pthread.h>
15030 #if HAVE_PTHREADS < 7
15031 #include <errno.h>
15032 #endif
15033 #ifndef NULL
15034 #define NULL (void*)0
15035 #endif
15036
15037 static void *task(p)
15038         void *p;
15039 {
15040         return (void *) (p == NULL);
15041 }
15042
15043
15044 int main(argc, argv)
15045         int argc;
15046         char **argv;
15047 {
15048
15049         /* pthread test function */
15050 #ifndef PTHREAD_CREATE_DETACHED
15051 #define PTHREAD_CREATE_DETACHED 1
15052 #endif
15053         pthread_t t;
15054         int status;
15055         int detach = PTHREAD_CREATE_DETACHED;
15056
15057 #if HAVE_PTHREADS > 4
15058         /* Final pthreads */
15059         pthread_attr_t attr;
15060
15061         status = pthread_attr_init(&attr);
15062         if( status ) return status;
15063
15064 #if HAVE_PTHREADS < 7
15065         status = pthread_attr_setdetachstate(&attr, &detach);
15066         if( status < 0 ) status = errno;
15067 #else
15068         status = pthread_attr_setdetachstate(&attr, detach);
15069 #endif
15070         if( status ) return status;
15071         status = pthread_create( &t, &attr, task, NULL );
15072 #if HAVE_PTHREADS < 7
15073         if( status < 0 ) status = errno;
15074 #endif
15075         if( status ) return status;
15076 #else
15077         /* Draft 4 pthreads */
15078         status = pthread_create( &t, pthread_attr_default, task, NULL );
15079         if( status ) return errno;
15080
15081         /* give thread a chance to complete */
15082         /* it should remain joinable and hence detachable */
15083         sleep( 1 );
15084
15085         status = pthread_detach( &t );
15086         if( status ) return errno;
15087 #endif
15088
15089 #ifdef HAVE_LINUX_THREADS
15090         pthread_kill_other_threads_np();
15091 #endif
15092
15093         return 0;
15094
15095 }
15096
15097 EOF
15098 if { (eval echo configure:15099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15099 then
15100   ol_cv_pthread_create_works=yes
15101 else
15102   echo "configure: failed program was:" >&5
15103   cat conftest.$ac_ext >&5
15104   rm -fr conftest*
15105   ol_cv_pthread_create_works=no
15106 fi
15107 rm -fr conftest*
15108 fi
15109
15110 fi
15111
15112 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15113
15114                         if test $ol_cv_pthread_create_works = no ; then
15115                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15116                         fi
15117
15118                                                 if test $ol_with_yielding_select = auto ; then
15119                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15120 echo "configure:15121: checking if select yields when using pthreads" >&5
15121 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15122   echo $ac_n "(cached) $ac_c" 1>&6
15123 else
15124   
15125                                 if test "$cross_compiling" = yes; then
15126   ol_cv_pthread_select_yields=cross
15127 else
15128   cat > conftest.$ac_ext <<EOF
15129 #line 15130 "configure"
15130 #include "confdefs.h"
15131
15132 #include <sys/types.h>
15133 #include <sys/time.h>
15134 #include <unistd.h>
15135 #include <pthread.h>
15136 #ifndef NULL
15137 #define NULL (void*) 0
15138 #endif
15139
15140 static int fildes[2];
15141
15142 static void *task(p)
15143         void *p;
15144 {
15145         int i;
15146         struct timeval tv;
15147
15148         fd_set rfds;
15149
15150         tv.tv_sec=10;
15151         tv.tv_usec=0;
15152
15153         FD_ZERO(&rfds);
15154         FD_SET(fildes[0], &rfds);
15155
15156         /* we're not interested in any fds */
15157         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15158
15159         if(i < 0) {
15160                 perror("select");
15161                 exit(10);
15162         }
15163
15164         exit(0); /* if we exit here, the select blocked the whole process */
15165 }
15166
15167 int main(argc, argv)
15168         int argc;
15169         char **argv;
15170 {
15171         pthread_t t;
15172
15173         /* create a pipe to select */
15174         if(pipe(&fildes[0])) {
15175                 perror("select");
15176                 exit(1);
15177         }
15178
15179 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15180         (void) pthread_setconcurrency(2);
15181 #else
15182 #ifdef HAVE_THR_SETCONCURRENCY
15183         /* Set Solaris LWP concurrency to 2 */
15184         thr_setconcurrency(2);
15185 #endif
15186 #endif
15187
15188 #if HAVE_PTHREADS < 6
15189         pthread_create(&t, pthread_attr_default, task, NULL);
15190 #else
15191         pthread_create(&t, NULL, task, NULL);
15192 #endif
15193
15194         /* make sure task runs first */
15195 #if HAVE_THR_YIELD
15196         thr_yield();
15197 #elif defined( HAVE_SCHED_YIELD )
15198         sched_yield();
15199 #elif defined( HAVE_PTHREAD_YIELD )
15200         pthread_yield();
15201 #endif
15202
15203         exit(2);
15204 }
15205 EOF
15206 if { (eval echo configure:15207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15207 then
15208   ol_cv_pthread_select_yields=no
15209 else
15210   echo "configure: failed program was:" >&5
15211   cat conftest.$ac_ext >&5
15212   rm -fr conftest*
15213   ol_cv_pthread_select_yields=yes
15214 fi
15215 rm -fr conftest*
15216 fi
15217
15218 fi
15219
15220 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15221
15222                                 if test $ol_cv_pthread_select_yields = cross ; then
15223                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15224                                 fi
15225
15226                                 if test $ol_cv_pthread_select_yields = yes ; then
15227                                         ol_with_yielding_select=yes
15228                                 fi
15229                         fi
15230
15231                                                 CPPFLAGS="$save_CPPFLAGS"
15232                         LIBS="$save_LIBS"
15233                 else
15234                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15235                 fi
15236         fi
15237
15238         if test $ol_with_threads = posix ; then
15239                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15240         fi
15241 fi
15242
15243 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15244         -o $ol_with_threads = mach ; then
15245
15246                 for ac_hdr in mach/cthreads.h cthreads.h
15247 do
15248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15250 echo "configure:15251: checking for $ac_hdr" >&5
15251 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15252   echo $ac_n "(cached) $ac_c" 1>&6
15253 else
15254   cat > conftest.$ac_ext <<EOF
15255 #line 15256 "configure"
15256 #include "confdefs.h"
15257 #include <$ac_hdr>
15258 EOF
15259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15260 { (eval echo configure:15261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15262 if test -z "$ac_err"; then
15263   rm -rf conftest*
15264   eval "ac_cv_header_$ac_safe=yes"
15265 else
15266   echo "$ac_err" >&5
15267   echo "configure: failed program was:" >&5
15268   cat conftest.$ac_ext >&5
15269   rm -rf conftest*
15270   eval "ac_cv_header_$ac_safe=no"
15271 fi
15272 rm -f conftest*
15273 fi
15274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15275   echo "$ac_t""yes" 1>&6
15276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15277   cat >> confdefs.h <<EOF
15278 #define $ac_tr_hdr 1
15279 EOF
15280  
15281 else
15282   echo "$ac_t""no" 1>&6
15283 fi
15284 done
15285
15286         if test $ac_cv_header_mach_cthreads_h = yes ; then
15287                 ol_with_threads=found
15288
15289                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15290 echo "configure:15291: checking for cthread_fork" >&5
15291 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15292   echo $ac_n "(cached) $ac_c" 1>&6
15293 else
15294   cat > conftest.$ac_ext <<EOF
15295 #line 15296 "configure"
15296 #include "confdefs.h"
15297 /* System header to define __stub macros and hopefully few prototypes,
15298     which can conflict with char cthread_fork(); below.  */
15299 #include <assert.h>
15300 /* Override any gcc2 internal prototype to avoid an error.  */
15301 /* We use char because int might match the return type of a gcc2
15302     builtin and then its argument prototype would still apply.  */
15303 char cthread_fork();
15304 char (*f)();
15305
15306 int main() {
15307
15308 /* The GNU C library defines this for functions which it implements
15309     to always fail with ENOSYS.  Some functions are actually named
15310     something starting with __ and the normal name is an alias.  */
15311 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15312 choke me
15313 #else
15314 f = cthread_fork;
15315 #endif
15316
15317 ; return 0; }
15318 EOF
15319 if { (eval echo configure:15320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15320   rm -rf conftest*
15321   eval "ac_cv_func_cthread_fork=yes"
15322 else
15323   echo "configure: failed program was:" >&5
15324   cat conftest.$ac_ext >&5
15325   rm -rf conftest*
15326   eval "ac_cv_func_cthread_fork=no"
15327 fi
15328 rm -f conftest*
15329 fi
15330
15331 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15332   echo "$ac_t""yes" 1>&6
15333   ol_link_threads=yes
15334 else
15335   echo "$ac_t""no" 1>&6
15336 fi
15337
15338
15339                 if test $ol_link_threads = no ; then
15340                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15341 echo "configure:15342: checking for cthread_fork with -all_load" >&5
15342 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15343   echo $ac_n "(cached) $ac_c" 1>&6
15344 else
15345   
15346                                                                 save_LIBS="$LIBS"
15347                                 LIBS="-all_load $LIBS"
15348                                 cat > conftest.$ac_ext <<EOF
15349 #line 15350 "configure"
15350 #include "confdefs.h"
15351 #include <mach/cthreads.h>
15352 int main() {
15353
15354                                         cthread_fork((void *)0, (void *)0);
15355                                         
15356 ; return 0; }
15357 EOF
15358 if { (eval echo configure:15359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15359   rm -rf conftest*
15360   ol_cv_cthread_all_load=yes
15361 else
15362   echo "configure: failed program was:" >&5
15363   cat conftest.$ac_ext >&5
15364   rm -rf conftest*
15365   ol_cv_cthread_all_load=no
15366 fi
15367 rm -f conftest*
15368                                                                 LIBS="$save_LIBS"
15369                         
15370 fi
15371
15372 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15373
15374                         if test $ol_cv_cthread_all_load = yes ; then
15375                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15376                                 ol_link_threads=mach
15377                                 ol_with_threads=found
15378                         fi
15379                 fi
15380
15381         elif test $ac_cv_header_cthreads_h = yes ; then
15382                                 
15383                 ol_with_threads=found
15384  
15385                                 save_LIBS="$LIBS"
15386                 LIBS="$LIBS -lthreads"
15387                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15388 echo "configure:15389: checking for cthread_fork" >&5
15389 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15390   echo $ac_n "(cached) $ac_c" 1>&6
15391 else
15392   cat > conftest.$ac_ext <<EOF
15393 #line 15394 "configure"
15394 #include "confdefs.h"
15395 /* System header to define __stub macros and hopefully few prototypes,
15396     which can conflict with char cthread_fork(); below.  */
15397 #include <assert.h>
15398 /* Override any gcc2 internal prototype to avoid an error.  */
15399 /* We use char because int might match the return type of a gcc2
15400     builtin and then its argument prototype would still apply.  */
15401 char cthread_fork();
15402 char (*f)();
15403
15404 int main() {
15405
15406 /* The GNU C library defines this for functions which it implements
15407     to always fail with ENOSYS.  Some functions are actually named
15408     something starting with __ and the normal name is an alias.  */
15409 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15410 choke me
15411 #else
15412 f = cthread_fork;
15413 #endif
15414
15415 ; return 0; }
15416 EOF
15417 if { (eval echo configure:15418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15418   rm -rf conftest*
15419   eval "ac_cv_func_cthread_fork=yes"
15420 else
15421   echo "configure: failed program was:" >&5
15422   cat conftest.$ac_ext >&5
15423   rm -rf conftest*
15424   eval "ac_cv_func_cthread_fork=no"
15425 fi
15426 rm -f conftest*
15427 fi
15428
15429 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15430   echo "$ac_t""yes" 1>&6
15431   ol_link_threads=yes
15432 else
15433   echo "$ac_t""no" 1>&6
15434 fi
15435
15436                 LIBS="$save_LIBS"
15437
15438                 if test $ol_link_threads = yes ; then
15439                         LTHREAD_LIBS="-lthreads"
15440                         ol_link_threads=mach
15441                         ol_with_threads=found
15442                 else
15443                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15444                 fi
15445
15446         elif test $ol_with_threads = mach ; then
15447                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15448         fi
15449
15450         if test $ol_link_threads = mach ; then
15451                 cat >> confdefs.h <<\EOF
15452 #define HAVE_MACH_CTHREADS 1
15453 EOF
15454
15455         elif test $ol_with_threads = found ; then
15456                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15457         fi
15458 fi
15459
15460 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15461         -o $ol_with_threads = pth ; then
15462
15463         for ac_hdr in pth.h
15464 do
15465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15467 echo "configure:15468: checking for $ac_hdr" >&5
15468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15469   echo $ac_n "(cached) $ac_c" 1>&6
15470 else
15471   cat > conftest.$ac_ext <<EOF
15472 #line 15473 "configure"
15473 #include "confdefs.h"
15474 #include <$ac_hdr>
15475 EOF
15476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15477 { (eval echo configure:15478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15479 if test -z "$ac_err"; then
15480   rm -rf conftest*
15481   eval "ac_cv_header_$ac_safe=yes"
15482 else
15483   echo "$ac_err" >&5
15484   echo "configure: failed program was:" >&5
15485   cat conftest.$ac_ext >&5
15486   rm -rf conftest*
15487   eval "ac_cv_header_$ac_safe=no"
15488 fi
15489 rm -f conftest*
15490 fi
15491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15492   echo "$ac_t""yes" 1>&6
15493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15494   cat >> confdefs.h <<EOF
15495 #define $ac_tr_hdr 1
15496 EOF
15497  
15498 else
15499   echo "$ac_t""no" 1>&6
15500 fi
15501 done
15502
15503
15504         if test $ac_cv_header_pth_h = yes ; then
15505                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15506 echo "configure:15507: checking for pth_version in -lpth" >&5
15507 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15509   echo $ac_n "(cached) $ac_c" 1>&6
15510 else
15511   ac_save_LIBS="$LIBS"
15512 LIBS="-lpth  $LIBS"
15513 cat > conftest.$ac_ext <<EOF
15514 #line 15515 "configure"
15515 #include "confdefs.h"
15516 /* Override any gcc2 internal prototype to avoid an error.  */
15517 /* We use char because int might match the return type of a gcc2
15518     builtin and then its argument prototype would still apply.  */
15519 char pth_version();
15520
15521 int main() {
15522 pth_version()
15523 ; return 0; }
15524 EOF
15525 if { (eval echo configure:15526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15526   rm -rf conftest*
15527   eval "ac_cv_lib_$ac_lib_var=yes"
15528 else
15529   echo "configure: failed program was:" >&5
15530   cat conftest.$ac_ext >&5
15531   rm -rf conftest*
15532   eval "ac_cv_lib_$ac_lib_var=no"
15533 fi
15534 rm -f conftest*
15535 LIBS="$ac_save_LIBS"
15536
15537 fi
15538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15539   echo "$ac_t""yes" 1>&6
15540   have_pth=yes
15541 else
15542   echo "$ac_t""no" 1>&6
15543 have_pth=no
15544 fi
15545
15546
15547                 if test $have_pth = yes ; then
15548                         cat >> confdefs.h <<\EOF
15549 #define HAVE_GNU_PTH 1
15550 EOF
15551
15552                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15553                         ol_link_threads=pth
15554                         ol_with_threads=found
15555
15556                         if test $ol_with_yielding_select = auto ; then
15557                                 ol_with_yielding_select=yes
15558                         fi
15559                 fi
15560         fi
15561 fi
15562
15563 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15564         -o $ol_with_threads = lwp ; then
15565
15566                 for ac_hdr in thread.h synch.h
15567 do
15568 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15569 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15570 echo "configure:15571: checking for $ac_hdr" >&5
15571 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15572   echo $ac_n "(cached) $ac_c" 1>&6
15573 else
15574   cat > conftest.$ac_ext <<EOF
15575 #line 15576 "configure"
15576 #include "confdefs.h"
15577 #include <$ac_hdr>
15578 EOF
15579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15580 { (eval echo configure:15581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15582 if test -z "$ac_err"; then
15583   rm -rf conftest*
15584   eval "ac_cv_header_$ac_safe=yes"
15585 else
15586   echo "$ac_err" >&5
15587   echo "configure: failed program was:" >&5
15588   cat conftest.$ac_ext >&5
15589   rm -rf conftest*
15590   eval "ac_cv_header_$ac_safe=no"
15591 fi
15592 rm -f conftest*
15593 fi
15594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15595   echo "$ac_t""yes" 1>&6
15596     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15597   cat >> confdefs.h <<EOF
15598 #define $ac_tr_hdr 1
15599 EOF
15600  
15601 else
15602   echo "$ac_t""no" 1>&6
15603 fi
15604 done
15605
15606         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15607                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15608 echo "configure:15609: checking for thr_create in -lthread" >&5
15609 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15611   echo $ac_n "(cached) $ac_c" 1>&6
15612 else
15613   ac_save_LIBS="$LIBS"
15614 LIBS="-lthread  $LIBS"
15615 cat > conftest.$ac_ext <<EOF
15616 #line 15617 "configure"
15617 #include "confdefs.h"
15618 /* Override any gcc2 internal prototype to avoid an error.  */
15619 /* We use char because int might match the return type of a gcc2
15620     builtin and then its argument prototype would still apply.  */
15621 char thr_create();
15622
15623 int main() {
15624 thr_create()
15625 ; return 0; }
15626 EOF
15627 if { (eval echo configure:15628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15628   rm -rf conftest*
15629   eval "ac_cv_lib_$ac_lib_var=yes"
15630 else
15631   echo "configure: failed program was:" >&5
15632   cat conftest.$ac_ext >&5
15633   rm -rf conftest*
15634   eval "ac_cv_lib_$ac_lib_var=no"
15635 fi
15636 rm -f conftest*
15637 LIBS="$ac_save_LIBS"
15638
15639 fi
15640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15641   echo "$ac_t""yes" 1>&6
15642   have_thr=yes
15643 else
15644   echo "$ac_t""no" 1>&6
15645 have_thr=no
15646 fi
15647
15648
15649                 if test $have_thr = yes ; then
15650                         cat >> confdefs.h <<\EOF
15651 #define HAVE_THR 1
15652 EOF
15653
15654                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15655                         ol_link_threads=thr
15656
15657                         if test $ol_with_yielding_select = auto ; then
15658                                 ol_with_yielding_select=yes
15659                         fi
15660
15661                                                 for ac_func in \
15662                                 thr_setconcurrency \
15663                                 thr_getconcurrency \
15664                         
15665 do
15666 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15667 echo "configure:15668: checking for $ac_func" >&5
15668 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15669   echo $ac_n "(cached) $ac_c" 1>&6
15670 else
15671   cat > conftest.$ac_ext <<EOF
15672 #line 15673 "configure"
15673 #include "confdefs.h"
15674 /* System header to define __stub macros and hopefully few prototypes,
15675     which can conflict with char $ac_func(); below.  */
15676 #include <assert.h>
15677 /* Override any gcc2 internal prototype to avoid an error.  */
15678 /* We use char because int might match the return type of a gcc2
15679     builtin and then its argument prototype would still apply.  */
15680 char $ac_func();
15681 char (*f)();
15682
15683 int main() {
15684
15685 /* The GNU C library defines this for functions which it implements
15686     to always fail with ENOSYS.  Some functions are actually named
15687     something starting with __ and the normal name is an alias.  */
15688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15689 choke me
15690 #else
15691 f = $ac_func;
15692 #endif
15693
15694 ; return 0; }
15695 EOF
15696 if { (eval echo configure:15697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15697   rm -rf conftest*
15698   eval "ac_cv_func_$ac_func=yes"
15699 else
15700   echo "configure: failed program was:" >&5
15701   cat conftest.$ac_ext >&5
15702   rm -rf conftest*
15703   eval "ac_cv_func_$ac_func=no"
15704 fi
15705 rm -f conftest*
15706 fi
15707
15708 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15709   echo "$ac_t""yes" 1>&6
15710     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15711   cat >> confdefs.h <<EOF
15712 #define $ac_tr_func 1
15713 EOF
15714  
15715 else
15716   echo "$ac_t""no" 1>&6
15717 fi
15718 done
15719
15720                 fi
15721         fi
15722
15723                 for ac_hdr in lwp/lwp.h
15724 do
15725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15727 echo "configure:15728: checking for $ac_hdr" >&5
15728 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15729   echo $ac_n "(cached) $ac_c" 1>&6
15730 else
15731   cat > conftest.$ac_ext <<EOF
15732 #line 15733 "configure"
15733 #include "confdefs.h"
15734 #include <$ac_hdr>
15735 EOF
15736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15737 { (eval echo configure:15738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15739 if test -z "$ac_err"; then
15740   rm -rf conftest*
15741   eval "ac_cv_header_$ac_safe=yes"
15742 else
15743   echo "$ac_err" >&5
15744   echo "configure: failed program was:" >&5
15745   cat conftest.$ac_ext >&5
15746   rm -rf conftest*
15747   eval "ac_cv_header_$ac_safe=no"
15748 fi
15749 rm -f conftest*
15750 fi
15751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15752   echo "$ac_t""yes" 1>&6
15753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15754   cat >> confdefs.h <<EOF
15755 #define $ac_tr_hdr 1
15756 EOF
15757  
15758 else
15759   echo "$ac_t""no" 1>&6
15760 fi
15761 done
15762
15763         if test $ac_cv_header_lwp_lwp_h = yes ; then
15764                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15765 echo "configure:15766: checking for lwp_create in -llwp" >&5
15766 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15768   echo $ac_n "(cached) $ac_c" 1>&6
15769 else
15770   ac_save_LIBS="$LIBS"
15771 LIBS="-llwp  $LIBS"
15772 cat > conftest.$ac_ext <<EOF
15773 #line 15774 "configure"
15774 #include "confdefs.h"
15775 /* Override any gcc2 internal prototype to avoid an error.  */
15776 /* We use char because int might match the return type of a gcc2
15777     builtin and then its argument prototype would still apply.  */
15778 char lwp_create();
15779
15780 int main() {
15781 lwp_create()
15782 ; return 0; }
15783 EOF
15784 if { (eval echo configure:15785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15785   rm -rf conftest*
15786   eval "ac_cv_lib_$ac_lib_var=yes"
15787 else
15788   echo "configure: failed program was:" >&5
15789   cat conftest.$ac_ext >&5
15790   rm -rf conftest*
15791   eval "ac_cv_lib_$ac_lib_var=no"
15792 fi
15793 rm -f conftest*
15794 LIBS="$ac_save_LIBS"
15795
15796 fi
15797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15798   echo "$ac_t""yes" 1>&6
15799   have_lwp=yes
15800 else
15801   echo "$ac_t""no" 1>&6
15802 have_lwp=no
15803 fi
15804
15805
15806                 if test $have_lwp = yes ; then
15807                         cat >> confdefs.h <<\EOF
15808 #define HAVE_LWP 1
15809 EOF
15810
15811                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15812                         ol_link_threads=lwp
15813
15814                         if test $ol_with_yielding_select = auto ; then
15815                                 ol_with_yielding_select=no
15816                         fi
15817                 fi
15818         fi
15819 fi
15820
15821 if test $ol_with_yielding_select = yes ; then
15822         cat >> confdefs.h <<\EOF
15823 #define HAVE_YIELDING_SELECT 1
15824 EOF
15825
15826 fi
15827
15828 if test $ol_with_threads = manual ; then
15829                 ol_link_threads=yes
15830
15831         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15832
15833         for ac_hdr in pthread.h sched.h
15834 do
15835 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15836 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15837 echo "configure:15838: checking for $ac_hdr" >&5
15838 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15839   echo $ac_n "(cached) $ac_c" 1>&6
15840 else
15841   cat > conftest.$ac_ext <<EOF
15842 #line 15843 "configure"
15843 #include "confdefs.h"
15844 #include <$ac_hdr>
15845 EOF
15846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15847 { (eval echo configure:15848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15849 if test -z "$ac_err"; then
15850   rm -rf conftest*
15851   eval "ac_cv_header_$ac_safe=yes"
15852 else
15853   echo "$ac_err" >&5
15854   echo "configure: failed program was:" >&5
15855   cat conftest.$ac_ext >&5
15856   rm -rf conftest*
15857   eval "ac_cv_header_$ac_safe=no"
15858 fi
15859 rm -f conftest*
15860 fi
15861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15862   echo "$ac_t""yes" 1>&6
15863     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15864   cat >> confdefs.h <<EOF
15865 #define $ac_tr_hdr 1
15866 EOF
15867  
15868 else
15869   echo "$ac_t""no" 1>&6
15870 fi
15871 done
15872
15873         for ac_func in sched_yield pthread_yield
15874 do
15875 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15876 echo "configure:15877: checking for $ac_func" >&5
15877 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15878   echo $ac_n "(cached) $ac_c" 1>&6
15879 else
15880   cat > conftest.$ac_ext <<EOF
15881 #line 15882 "configure"
15882 #include "confdefs.h"
15883 /* System header to define __stub macros and hopefully few prototypes,
15884     which can conflict with char $ac_func(); below.  */
15885 #include <assert.h>
15886 /* Override any gcc2 internal prototype to avoid an error.  */
15887 /* We use char because int might match the return type of a gcc2
15888     builtin and then its argument prototype would still apply.  */
15889 char $ac_func();
15890 char (*f)();
15891
15892 int main() {
15893
15894 /* The GNU C library defines this for functions which it implements
15895     to always fail with ENOSYS.  Some functions are actually named
15896     something starting with __ and the normal name is an alias.  */
15897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15898 choke me
15899 #else
15900 f = $ac_func;
15901 #endif
15902
15903 ; return 0; }
15904 EOF
15905 if { (eval echo configure:15906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15906   rm -rf conftest*
15907   eval "ac_cv_func_$ac_func=yes"
15908 else
15909   echo "configure: failed program was:" >&5
15910   cat conftest.$ac_ext >&5
15911   rm -rf conftest*
15912   eval "ac_cv_func_$ac_func=no"
15913 fi
15914 rm -f conftest*
15915 fi
15916
15917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15918   echo "$ac_t""yes" 1>&6
15919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15920   cat >> confdefs.h <<EOF
15921 #define $ac_tr_func 1
15922 EOF
15923  
15924 else
15925   echo "$ac_t""no" 1>&6
15926 fi
15927 done
15928
15929         
15930         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15931 echo "configure:15932: checking for LinuxThreads pthread.h" >&5
15932 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15933   echo $ac_n "(cached) $ac_c" 1>&6
15934 else
15935   cat > conftest.$ac_ext <<EOF
15936 #line 15937 "configure"
15937 #include "confdefs.h"
15938 #include <pthread.h>
15939 EOF
15940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15941   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15942   rm -rf conftest*
15943   ol_cv_header_linux_threads=yes
15944 else
15945   rm -rf conftest*
15946   ol_cv_header_linux_threads=no
15947 fi
15948 rm -f conftest*
15949
15950                 
15951 fi
15952
15953 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15954         if test $ol_cv_header_linux_threads = yes; then
15955                 cat >> confdefs.h <<\EOF
15956 #define HAVE_LINUX_THREADS 1
15957 EOF
15958
15959         fi
15960
15961
15962         for ac_hdr in mach/cthreads.h
15963 do
15964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15966 echo "configure:15967: checking for $ac_hdr" >&5
15967 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15968   echo $ac_n "(cached) $ac_c" 1>&6
15969 else
15970   cat > conftest.$ac_ext <<EOF
15971 #line 15972 "configure"
15972 #include "confdefs.h"
15973 #include <$ac_hdr>
15974 EOF
15975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15976 { (eval echo configure:15977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15978 if test -z "$ac_err"; then
15979   rm -rf conftest*
15980   eval "ac_cv_header_$ac_safe=yes"
15981 else
15982   echo "$ac_err" >&5
15983   echo "configure: failed program was:" >&5
15984   cat conftest.$ac_ext >&5
15985   rm -rf conftest*
15986   eval "ac_cv_header_$ac_safe=no"
15987 fi
15988 rm -f conftest*
15989 fi
15990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15991   echo "$ac_t""yes" 1>&6
15992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15993   cat >> confdefs.h <<EOF
15994 #define $ac_tr_hdr 1
15995 EOF
15996  
15997 else
15998   echo "$ac_t""no" 1>&6
15999 fi
16000 done
16001
16002         for ac_hdr in lwp/lwp.h
16003 do
16004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16006 echo "configure:16007: checking for $ac_hdr" >&5
16007 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16008   echo $ac_n "(cached) $ac_c" 1>&6
16009 else
16010   cat > conftest.$ac_ext <<EOF
16011 #line 16012 "configure"
16012 #include "confdefs.h"
16013 #include <$ac_hdr>
16014 EOF
16015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16016 { (eval echo configure:16017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16018 if test -z "$ac_err"; then
16019   rm -rf conftest*
16020   eval "ac_cv_header_$ac_safe=yes"
16021 else
16022   echo "$ac_err" >&5
16023   echo "configure: failed program was:" >&5
16024   cat conftest.$ac_ext >&5
16025   rm -rf conftest*
16026   eval "ac_cv_header_$ac_safe=no"
16027 fi
16028 rm -f conftest*
16029 fi
16030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16031   echo "$ac_t""yes" 1>&6
16032     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16033   cat >> confdefs.h <<EOF
16034 #define $ac_tr_hdr 1
16035 EOF
16036  
16037 else
16038   echo "$ac_t""no" 1>&6
16039 fi
16040 done
16041
16042         for ac_hdr in thread.h synch.h
16043 do
16044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16046 echo "configure:16047: checking for $ac_hdr" >&5
16047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16048   echo $ac_n "(cached) $ac_c" 1>&6
16049 else
16050   cat > conftest.$ac_ext <<EOF
16051 #line 16052 "configure"
16052 #include "confdefs.h"
16053 #include <$ac_hdr>
16054 EOF
16055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16056 { (eval echo configure:16057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16058 if test -z "$ac_err"; then
16059   rm -rf conftest*
16060   eval "ac_cv_header_$ac_safe=yes"
16061 else
16062   echo "$ac_err" >&5
16063   echo "configure: failed program was:" >&5
16064   cat conftest.$ac_ext >&5
16065   rm -rf conftest*
16066   eval "ac_cv_header_$ac_safe=no"
16067 fi
16068 rm -f conftest*
16069 fi
16070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16071   echo "$ac_t""yes" 1>&6
16072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16073   cat >> confdefs.h <<EOF
16074 #define $ac_tr_hdr 1
16075 EOF
16076  
16077 else
16078   echo "$ac_t""no" 1>&6
16079 fi
16080 done
16081
16082 fi
16083
16084 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16085                         cat >> confdefs.h <<\EOF
16086 #define REENTRANT 1
16087 EOF
16088
16089         cat >> confdefs.h <<\EOF
16090 #define _REENTRANT 1
16091 EOF
16092
16093         cat >> confdefs.h <<\EOF
16094 #define THREAD_SAFE 1
16095 EOF
16096
16097         cat >> confdefs.h <<\EOF
16098 #define _THREAD_SAFE 1
16099 EOF
16100
16101         cat >> confdefs.h <<\EOF
16102 #define THREADSAFE 1
16103 EOF
16104
16105         cat >> confdefs.h <<\EOF
16106 #define _THREADSAFE 1
16107 EOF
16108
16109         cat >> confdefs.h <<\EOF
16110 #define _SGI_MP_SOURCE 1
16111 EOF
16112
16113
16114                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16115 echo "configure:16116: checking for thread specific errno" >&5
16116 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16117   echo $ac_n "(cached) $ac_c" 1>&6
16118 else
16119   
16120                 cat > conftest.$ac_ext <<EOF
16121 #line 16122 "configure"
16122 #include "confdefs.h"
16123 #include <errno.h>
16124 int main() {
16125 errno = 0;
16126 ; return 0; }
16127 EOF
16128 if { (eval echo configure:16129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16129   rm -rf conftest*
16130   ol_cv_errno_thread_specific=yes
16131 else
16132   echo "configure: failed program was:" >&5
16133   cat conftest.$ac_ext >&5
16134   rm -rf conftest*
16135   ol_cv_errno_thread_specific=no
16136 fi
16137 rm -f conftest*
16138         
16139 fi
16140
16141 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16142
16143                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16144 echo "configure:16145: checking for thread specific h_errno" >&5
16145 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16146   echo $ac_n "(cached) $ac_c" 1>&6
16147 else
16148   
16149                 cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16152 #include <netdb.h>
16153 int main() {
16154 h_errno = 0;
16155 ; return 0; }
16156 EOF
16157 if { (eval echo configure:16158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16158   rm -rf conftest*
16159   ol_cv_h_errno_thread_specific=yes
16160 else
16161   echo "configure: failed program was:" >&5
16162   cat conftest.$ac_ext >&5
16163   rm -rf conftest*
16164   ol_cv_h_errno_thread_specific=no
16165 fi
16166 rm -f conftest*
16167         
16168 fi
16169
16170 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16171
16172         if test $ol_cv_errno_thread_specific != yes \
16173                 -o $ol_cv_h_errno_thread_specific != yes ; then
16174                 LIBS="$LTHREAD_LIBS $LIBS"
16175                 LTHREAD_LIBS=""
16176         fi
16177
16178 fi  
16179
16180 if test $ol_link_threads = no ; then
16181         if test $ol_with_threads = yes ; then
16182                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16183         fi
16184
16185         if test $ol_with_threads = auto ; then
16186                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16187                 ol_with_threads=no
16188         fi
16189
16190         cat >> confdefs.h <<\EOF
16191 #define NO_THREADS 1
16192 EOF
16193
16194         LTHREAD_LIBS=""
16195 fi
16196
16197 if test $ol_link_threads != no ; then
16198         cat >> confdefs.h <<\EOF
16199 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16200 EOF
16201
16202 fi
16203
16204 for ac_func in \
16205         ctime_r                 \
16206         gethostbyname_r gethostbyaddr_r \
16207
16208 do
16209 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16210 echo "configure:16211: checking for $ac_func" >&5
16211 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16212   echo $ac_n "(cached) $ac_c" 1>&6
16213 else
16214   cat > conftest.$ac_ext <<EOF
16215 #line 16216 "configure"
16216 #include "confdefs.h"
16217 /* System header to define __stub macros and hopefully few prototypes,
16218     which can conflict with char $ac_func(); below.  */
16219 #include <assert.h>
16220 /* Override any gcc2 internal prototype to avoid an error.  */
16221 /* We use char because int might match the return type of a gcc2
16222     builtin and then its argument prototype would still apply.  */
16223 char $ac_func();
16224 char (*f)();
16225
16226 int main() {
16227
16228 /* The GNU C library defines this for functions which it implements
16229     to always fail with ENOSYS.  Some functions are actually named
16230     something starting with __ and the normal name is an alias.  */
16231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16232 choke me
16233 #else
16234 f = $ac_func;
16235 #endif
16236
16237 ; return 0; }
16238 EOF
16239 if { (eval echo configure:16240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16240   rm -rf conftest*
16241   eval "ac_cv_func_$ac_func=yes"
16242 else
16243   echo "configure: failed program was:" >&5
16244   cat conftest.$ac_ext >&5
16245   rm -rf conftest*
16246   eval "ac_cv_func_$ac_func=no"
16247 fi
16248 rm -f conftest*
16249 fi
16250
16251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16252   echo "$ac_t""yes" 1>&6
16253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16254   cat >> confdefs.h <<EOF
16255 #define $ac_tr_func 1
16256 EOF
16257  
16258 else
16259   echo "$ac_t""no" 1>&6
16260 fi
16261 done
16262
16263
16264 if test "$ac_cv_func_ctime_r" = no ; then
16265         ol_cv_func_ctime_r_nargs=0
16266 else
16267         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16268 echo "configure:16269: checking number of arguments of ctime_r" >&5
16269 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16270   echo $ac_n "(cached) $ac_c" 1>&6
16271 else
16272   cat > conftest.$ac_ext <<EOF
16273 #line 16274 "configure"
16274 #include "confdefs.h"
16275 #include <time.h>
16276 int main() {
16277 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16278 ; return 0; }
16279 EOF
16280 if { (eval echo configure:16281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16281   rm -rf conftest*
16282   ol_cv_func_ctime_r_nargs3=yes
16283 else
16284   echo "configure: failed program was:" >&5
16285   cat conftest.$ac_ext >&5
16286   rm -rf conftest*
16287   ol_cv_func_ctime_r_nargs3=no
16288 fi
16289 rm -f conftest*
16290
16291         cat > conftest.$ac_ext <<EOF
16292 #line 16293 "configure"
16293 #include "confdefs.h"
16294 #include <time.h>
16295 int main() {
16296 time_t ti; char *buffer; ctime_r(&ti,buffer);
16297 ; return 0; }
16298 EOF
16299 if { (eval echo configure:16300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16300   rm -rf conftest*
16301   ol_cv_func_ctime_r_nargs2=yes
16302 else
16303   echo "configure: failed program was:" >&5
16304   cat conftest.$ac_ext >&5
16305   rm -rf conftest*
16306   ol_cv_func_ctime_r_nargs2=no
16307 fi
16308 rm -f conftest*
16309
16310         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16311                 $ol_cv_func_ctime_r_nargs2 = no ; then
16312
16313                 ol_cv_func_ctime_r_nargs=3
16314
16315         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16316                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16317
16318                 ol_cv_func_ctime_r_nargs=2
16319
16320         else
16321                 ol_cv_func_ctime_r_nargs=0
16322         fi
16323   
16324 fi
16325
16326 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16327
16328   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16329         cat >> confdefs.h <<EOF
16330 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16331 EOF
16332
16333   fi
16334
16335 fi
16336
16337 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16338         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16339 echo "configure:16340: checking number of arguments of gethostbyname_r" >&5
16340 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16341   echo $ac_n "(cached) $ac_c" 1>&6
16342 else
16343   cat > conftest.$ac_ext <<EOF
16344 #line 16345 "configure"
16345 #include "confdefs.h"
16346 #include <sys/types.h>
16347 #include <sys/socket.h>
16348 #include <netinet/in.h>
16349 #include <netdb.h>
16350 #define BUFSIZE (sizeof(struct hostent)+10)
16351 int main() {
16352 struct hostent hent; char buffer[BUFSIZE];
16353                 int bufsize=BUFSIZE;int h_errno;
16354                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16355                         buffer, bufsize, &h_errno);
16356 ; return 0; }
16357 EOF
16358 if { (eval echo configure:16359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16359   rm -rf conftest*
16360   ol_cv_func_gethostbyname_r_nargs5=yes
16361 else
16362   echo "configure: failed program was:" >&5
16363   cat conftest.$ac_ext >&5
16364   rm -rf conftest*
16365   ol_cv_func_gethostbyname_r_nargs5=no
16366 fi
16367 rm -f conftest*
16368
16369         cat > conftest.$ac_ext <<EOF
16370 #line 16371 "configure"
16371 #include "confdefs.h"
16372 #include <sys/types.h>
16373 #include <sys/socket.h>
16374 #include <netinet/in.h>
16375 #include <netdb.h>
16376 #define BUFSIZE (sizeof(struct hostent)+10)
16377 int main() {
16378 struct hostent hent;struct hostent *rhent;
16379                 char buffer[BUFSIZE];
16380                 int bufsize=BUFSIZE;int h_errno;
16381                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16382                         &rhent, &h_errno);
16383 ; return 0; }
16384 EOF
16385 if { (eval echo configure:16386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16386   rm -rf conftest*
16387   ol_cv_func_gethostbyname_r_nargs6=yes
16388 else
16389   echo "configure: failed program was:" >&5
16390   cat conftest.$ac_ext >&5
16391   rm -rf conftest*
16392   ol_cv_func_gethostbyname_r_nargs6=no
16393 fi
16394 rm -f conftest*
16395
16396         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16397                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16398
16399                 ol_cv_func_gethostbyname_r_nargs=5
16400
16401         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16402                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16403
16404                 ol_cv_func_gethostbyname_r_nargs=6
16405
16406         else
16407                 ol_cv_func_gethostbyname_r_nargs=0
16408         fi
16409   
16410 fi
16411
16412 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16413   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16414         cat >> confdefs.h <<EOF
16415 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16416 EOF
16417
16418   fi
16419
16420 else
16421         ol_cv_func_gethostbyname_r_nargs=0
16422 fi
16423  
16424 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16425         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16426 echo "configure:16427: checking number of arguments of gethostbyaddr_r" >&5
16427 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16428   echo $ac_n "(cached) $ac_c" 1>&6
16429 else
16430   cat > conftest.$ac_ext <<EOF
16431 #line 16432 "configure"
16432 #include "confdefs.h"
16433 #include <sys/types.h>
16434 #include <sys/socket.h>
16435 #include <netinet/in.h>
16436 #include <netdb.h>
16437 #define BUFSIZE (sizeof(struct hostent)+10)
16438 int main() {
16439 struct hostent hent; char buffer[BUFSIZE]; 
16440             struct in_addr add;
16441             size_t alen=sizeof(struct in_addr);
16442             int bufsize=BUFSIZE;int h_errno;
16443                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16444                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16445 ; return 0; }
16446 EOF
16447 if { (eval echo configure:16448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16448   rm -rf conftest*
16449   ol_cv_func_gethostbyaddr_r_nargs7=yes
16450 else
16451   echo "configure: failed program was:" >&5
16452   cat conftest.$ac_ext >&5
16453   rm -rf conftest*
16454   ol_cv_func_gethostbyaddr_r_nargs7=no
16455 fi
16456 rm -f conftest*
16457
16458         cat > conftest.$ac_ext <<EOF
16459 #line 16460 "configure"
16460 #include "confdefs.h"
16461 #include <sys/types.h>
16462 #include <sys/socket.h>
16463 #include <netinet/in.h>
16464 #include <netdb.h>
16465 #define BUFSIZE (sizeof(struct hostent)+10)
16466 int main() {
16467 struct hostent hent;
16468                 struct hostent *rhent; char buffer[BUFSIZE]; 
16469                 struct in_addr add;
16470                 size_t alen=sizeof(struct in_addr);
16471                 int bufsize=BUFSIZE;int h_errno;
16472                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16473                         alen, AF_INET, &hent, buffer, bufsize, 
16474                         &rhent, &h_errno);
16475 ; return 0; }
16476 EOF
16477 if { (eval echo configure:16478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16478   rm -rf conftest*
16479   ol_cv_func_gethostbyaddr_r_nargs8=yes
16480 else
16481   echo "configure: failed program was:" >&5
16482   cat conftest.$ac_ext >&5
16483   rm -rf conftest*
16484   ol_cv_func_gethostbyaddr_r_nargs8=no
16485 fi
16486 rm -f conftest*
16487
16488         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16489                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16490
16491                 ol_cv_func_gethostbyaddr_r_nargs=7
16492
16493         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16494                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16495
16496                 ol_cv_func_gethostbyaddr_r_nargs=8
16497
16498         else
16499                 ol_cv_func_gethostbyaddr_r_nargs=0
16500         fi
16501   
16502 fi
16503
16504 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16505   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16506     cat >> confdefs.h <<EOF
16507 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16508 EOF
16509
16510   fi
16511
16512 else
16513         ol_cv_func_gethostbyaddr_r_nargs=0
16514 fi
16515
16516 ol_link_ldbm=no 
16517
16518 if test $ol_with_ldbm_api = auto \
16519         -o $ol_with_ldbm_api = berkeley \
16520         -o $ol_with_ldbm_api = bcompat ; then
16521
16522         if test $ol_with_ldbm_api = bcompat; then \
16523                 for ac_hdr in db_185.h db.h
16524 do
16525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16527 echo "configure:16528: checking for $ac_hdr" >&5
16528 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16529   echo $ac_n "(cached) $ac_c" 1>&6
16530 else
16531   cat > conftest.$ac_ext <<EOF
16532 #line 16533 "configure"
16533 #include "confdefs.h"
16534 #include <$ac_hdr>
16535 EOF
16536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16537 { (eval echo configure:16538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16539 if test -z "$ac_err"; then
16540   rm -rf conftest*
16541   eval "ac_cv_header_$ac_safe=yes"
16542 else
16543   echo "$ac_err" >&5
16544   echo "configure: failed program was:" >&5
16545   cat conftest.$ac_ext >&5
16546   rm -rf conftest*
16547   eval "ac_cv_header_$ac_safe=no"
16548 fi
16549 rm -f conftest*
16550 fi
16551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16552   echo "$ac_t""yes" 1>&6
16553     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16554   cat >> confdefs.h <<EOF
16555 #define $ac_tr_hdr 1
16556 EOF
16557  
16558 else
16559   echo "$ac_t""no" 1>&6
16560 fi
16561 done
16562
16563 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16564         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16565 echo "configure:16566: checking if Berkeley DB header compatibility" >&5
16566 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16567   echo $ac_n "(cached) $ac_c" 1>&6
16568 else
16569   
16570                 cat > conftest.$ac_ext <<EOF
16571 #line 16572 "configure"
16572 #include "confdefs.h"
16573
16574 #if HAVE_DB_185_H
16575 #       include <db_185.h>
16576 #else
16577 #       include <db.h>
16578 #endif
16579
16580  /* this check could be improved */
16581 #ifndef DB_VERSION_MAJOR
16582 #       define DB_VERSION_MAJOR 1
16583 #endif
16584
16585 #if DB_VERSION_MAJOR == 1 
16586         __db_version_1
16587 #endif
16588
16589 EOF
16590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16591   egrep "__db_version_1" >/dev/null 2>&1; then
16592   rm -rf conftest*
16593   ol_cv_header_db1=yes
16594 else
16595   rm -rf conftest*
16596   ol_cv_header_db1=no
16597 fi
16598 rm -f conftest*
16599
16600 fi
16601
16602 echo "$ac_t""$ol_cv_header_db1" 1>&6
16603
16604         if test $ol_cv_header_db1 = yes ; then
16605                 ol_cv_lib_db=no
16606 if test $ol_cv_lib_db = no ; then
16607         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16608 echo "configure:16609: checking for Berkeley DB link (default)" >&5
16609 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16610   echo $ac_n "(cached) $ac_c" 1>&6
16611 else
16612   
16613         ol_DB_LIB=
16614         ol_LIBS=$LIBS
16615         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16616
16617         cat > conftest.$ac_ext <<EOF
16618 #line 16619 "configure"
16619 #include "confdefs.h"
16620
16621 #ifdef HAVE_DB_185_H
16622 # include <db_185.h>
16623 #else
16624 # include <db.h>
16625 #endif
16626
16627 #ifndef DB_VERSION_MAJOR
16628 # define DB_VERSION_MAJOR 1
16629 #endif
16630
16631 #ifndef NULL
16632 #define NULL ((void*)0)
16633 #endif
16634
16635 int main() {
16636
16637 #if DB_VERSION_MAJOR > 1
16638         {
16639                 char *version;
16640                 int major, minor, patch;
16641
16642                 version = db_version( &major, &minor, &patch );
16643
16644                 if( major != DB_VERSION_MAJOR ||
16645                         minor < DB_VERSION_MINOR )
16646                 {
16647                         printf("Berkeley DB version mismatch\n"
16648                                 "\texpected: %s\n\tgot: %s\n",
16649                                 DB_VERSION_STRING, version);
16650                         return 1;
16651                 }
16652         }
16653 #endif
16654
16655 #if DB_VERSION_MAJOR > 2
16656         db_env_create( NULL, 0 );
16657 #elif DB_VERSION_MAJOR > 1
16658         db_appexit( NULL );
16659 #else
16660         (void) dbopen( NULL, 0, 0, 0, NULL);
16661 #endif
16662
16663 ; return 0; }
16664 EOF
16665 if { (eval echo configure:16666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16666   rm -rf conftest*
16667   ol_cv_db_none=yes
16668 else
16669   echo "configure: failed program was:" >&5
16670   cat conftest.$ac_ext >&5
16671   rm -rf conftest*
16672   ol_cv_db_none=no
16673 fi
16674 rm -f conftest*
16675
16676         LIBS="$ol_LIBS"
16677
16678 fi
16679
16680 echo "$ac_t""$ol_cv_db_none" 1>&6
16681
16682         if test $ol_cv_db_none = yes ; then
16683                 ol_cv_lib_db=yes
16684         fi
16685 fi
16686
16687 if test $ol_cv_lib_db = no ; then
16688         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16689 echo "configure:16690: checking for Berkeley DB link (-ldb42)" >&5
16690 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16691   echo $ac_n "(cached) $ac_c" 1>&6
16692 else
16693   
16694         ol_DB_LIB=-ldb42
16695         ol_LIBS=$LIBS
16696         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16697
16698         cat > conftest.$ac_ext <<EOF
16699 #line 16700 "configure"
16700 #include "confdefs.h"
16701
16702 #ifdef HAVE_DB_185_H
16703 # include <db_185.h>
16704 #else
16705 # include <db.h>
16706 #endif
16707
16708 #ifndef DB_VERSION_MAJOR
16709 # define DB_VERSION_MAJOR 1
16710 #endif
16711
16712 #ifndef NULL
16713 #define NULL ((void*)0)
16714 #endif
16715
16716 int main() {
16717
16718 #if DB_VERSION_MAJOR > 1
16719         {
16720                 char *version;
16721                 int major, minor, patch;
16722
16723                 version = db_version( &major, &minor, &patch );
16724
16725                 if( major != DB_VERSION_MAJOR ||
16726                         minor < DB_VERSION_MINOR )
16727                 {
16728                         printf("Berkeley DB version mismatch\n"
16729                                 "\texpected: %s\n\tgot: %s\n",
16730                                 DB_VERSION_STRING, version);
16731                         return 1;
16732                 }
16733         }
16734 #endif
16735
16736 #if DB_VERSION_MAJOR > 2
16737         db_env_create( NULL, 0 );
16738 #elif DB_VERSION_MAJOR > 1
16739         db_appexit( NULL );
16740 #else
16741         (void) dbopen( NULL, 0, 0, 0, NULL);
16742 #endif
16743
16744 ; return 0; }
16745 EOF
16746 if { (eval echo configure:16747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16747   rm -rf conftest*
16748   ol_cv_db_db42=yes
16749 else
16750   echo "configure: failed program was:" >&5
16751   cat conftest.$ac_ext >&5
16752   rm -rf conftest*
16753   ol_cv_db_db42=no
16754 fi
16755 rm -f conftest*
16756
16757         LIBS="$ol_LIBS"
16758
16759 fi
16760
16761 echo "$ac_t""$ol_cv_db_db42" 1>&6
16762
16763         if test $ol_cv_db_db42 = yes ; then
16764                 ol_cv_lib_db=-ldb42
16765         fi
16766 fi
16767
16768 if test $ol_cv_lib_db = no ; then
16769         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16770 echo "configure:16771: checking for Berkeley DB link (-ldb-42)" >&5
16771 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16772   echo $ac_n "(cached) $ac_c" 1>&6
16773 else
16774   
16775         ol_DB_LIB=-ldb-42
16776         ol_LIBS=$LIBS
16777         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16778
16779         cat > conftest.$ac_ext <<EOF
16780 #line 16781 "configure"
16781 #include "confdefs.h"
16782
16783 #ifdef HAVE_DB_185_H
16784 # include <db_185.h>
16785 #else
16786 # include <db.h>
16787 #endif
16788
16789 #ifndef DB_VERSION_MAJOR
16790 # define DB_VERSION_MAJOR 1
16791 #endif
16792
16793 #ifndef NULL
16794 #define NULL ((void*)0)
16795 #endif
16796
16797 int main() {
16798
16799 #if DB_VERSION_MAJOR > 1
16800         {
16801                 char *version;
16802                 int major, minor, patch;
16803
16804                 version = db_version( &major, &minor, &patch );
16805
16806                 if( major != DB_VERSION_MAJOR ||
16807                         minor < DB_VERSION_MINOR )
16808                 {
16809                         printf("Berkeley DB version mismatch\n"
16810                                 "\texpected: %s\n\tgot: %s\n",
16811                                 DB_VERSION_STRING, version);
16812                         return 1;
16813                 }
16814         }
16815 #endif
16816
16817 #if DB_VERSION_MAJOR > 2
16818         db_env_create( NULL, 0 );
16819 #elif DB_VERSION_MAJOR > 1
16820         db_appexit( NULL );
16821 #else
16822         (void) dbopen( NULL, 0, 0, 0, NULL);
16823 #endif
16824
16825 ; return 0; }
16826 EOF
16827 if { (eval echo configure:16828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16828   rm -rf conftest*
16829   ol_cv_db_db_42=yes
16830 else
16831   echo "configure: failed program was:" >&5
16832   cat conftest.$ac_ext >&5
16833   rm -rf conftest*
16834   ol_cv_db_db_42=no
16835 fi
16836 rm -f conftest*
16837
16838         LIBS="$ol_LIBS"
16839
16840 fi
16841
16842 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16843
16844         if test $ol_cv_db_db_42 = yes ; then
16845                 ol_cv_lib_db=-ldb-42
16846         fi
16847 fi
16848
16849 if test $ol_cv_lib_db = no ; then
16850         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16851 echo "configure:16852: checking for Berkeley DB link (-ldb-4.2)" >&5
16852 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16853   echo $ac_n "(cached) $ac_c" 1>&6
16854 else
16855   
16856         ol_DB_LIB=-ldb-4.2
16857         ol_LIBS=$LIBS
16858         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16859
16860         cat > conftest.$ac_ext <<EOF
16861 #line 16862 "configure"
16862 #include "confdefs.h"
16863
16864 #ifdef HAVE_DB_185_H
16865 # include <db_185.h>
16866 #else
16867 # include <db.h>
16868 #endif
16869
16870 #ifndef DB_VERSION_MAJOR
16871 # define DB_VERSION_MAJOR 1
16872 #endif
16873
16874 #ifndef NULL
16875 #define NULL ((void*)0)
16876 #endif
16877
16878 int main() {
16879
16880 #if DB_VERSION_MAJOR > 1
16881         {
16882                 char *version;
16883                 int major, minor, patch;
16884
16885                 version = db_version( &major, &minor, &patch );
16886
16887                 if( major != DB_VERSION_MAJOR ||
16888                         minor < DB_VERSION_MINOR )
16889                 {
16890                         printf("Berkeley DB version mismatch\n"
16891                                 "\texpected: %s\n\tgot: %s\n",
16892                                 DB_VERSION_STRING, version);
16893                         return 1;
16894                 }
16895         }
16896 #endif
16897
16898 #if DB_VERSION_MAJOR > 2
16899         db_env_create( NULL, 0 );
16900 #elif DB_VERSION_MAJOR > 1
16901         db_appexit( NULL );
16902 #else
16903         (void) dbopen( NULL, 0, 0, 0, NULL);
16904 #endif
16905
16906 ; return 0; }
16907 EOF
16908 if { (eval echo configure:16909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16909   rm -rf conftest*
16910   ol_cv_db_db_4_dot_2=yes
16911 else
16912   echo "configure: failed program was:" >&5
16913   cat conftest.$ac_ext >&5
16914   rm -rf conftest*
16915   ol_cv_db_db_4_dot_2=no
16916 fi
16917 rm -f conftest*
16918
16919         LIBS="$ol_LIBS"
16920
16921 fi
16922
16923 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16924
16925         if test $ol_cv_db_db_4_dot_2 = yes ; then
16926                 ol_cv_lib_db=-ldb-4.2
16927         fi
16928 fi
16929
16930 if test $ol_cv_lib_db = no ; then
16931         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16932 echo "configure:16933: checking for Berkeley DB link (-ldb-4-2)" >&5
16933 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16934   echo $ac_n "(cached) $ac_c" 1>&6
16935 else
16936   
16937         ol_DB_LIB=-ldb-4-2
16938         ol_LIBS=$LIBS
16939         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16940
16941         cat > conftest.$ac_ext <<EOF
16942 #line 16943 "configure"
16943 #include "confdefs.h"
16944
16945 #ifdef HAVE_DB_185_H
16946 # include <db_185.h>
16947 #else
16948 # include <db.h>
16949 #endif
16950
16951 #ifndef DB_VERSION_MAJOR
16952 # define DB_VERSION_MAJOR 1
16953 #endif
16954
16955 #ifndef NULL
16956 #define NULL ((void*)0)
16957 #endif
16958
16959 int main() {
16960
16961 #if DB_VERSION_MAJOR > 1
16962         {
16963                 char *version;
16964                 int major, minor, patch;
16965
16966                 version = db_version( &major, &minor, &patch );
16967
16968                 if( major != DB_VERSION_MAJOR ||
16969                         minor < DB_VERSION_MINOR )
16970                 {
16971                         printf("Berkeley DB version mismatch\n"
16972                                 "\texpected: %s\n\tgot: %s\n",
16973                                 DB_VERSION_STRING, version);
16974                         return 1;
16975                 }
16976         }
16977 #endif
16978
16979 #if DB_VERSION_MAJOR > 2
16980         db_env_create( NULL, 0 );
16981 #elif DB_VERSION_MAJOR > 1
16982         db_appexit( NULL );
16983 #else
16984         (void) dbopen( NULL, 0, 0, 0, NULL);
16985 #endif
16986
16987 ; return 0; }
16988 EOF
16989 if { (eval echo configure:16990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16990   rm -rf conftest*
16991   ol_cv_db_db_4_2=yes
16992 else
16993   echo "configure: failed program was:" >&5
16994   cat conftest.$ac_ext >&5
16995   rm -rf conftest*
16996   ol_cv_db_db_4_2=no
16997 fi
16998 rm -f conftest*
16999
17000         LIBS="$ol_LIBS"
17001
17002 fi
17003
17004 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17005
17006         if test $ol_cv_db_db_4_2 = yes ; then
17007                 ol_cv_lib_db=-ldb-4-2
17008         fi
17009 fi
17010
17011 if test $ol_cv_lib_db = no ; then
17012         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17013 echo "configure:17014: checking for Berkeley DB link (-ldb-4)" >&5
17014 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17015   echo $ac_n "(cached) $ac_c" 1>&6
17016 else
17017   
17018         ol_DB_LIB=-ldb-4
17019         ol_LIBS=$LIBS
17020         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17021
17022         cat > conftest.$ac_ext <<EOF
17023 #line 17024 "configure"
17024 #include "confdefs.h"
17025
17026 #ifdef HAVE_DB_185_H
17027 # include <db_185.h>
17028 #else
17029 # include <db.h>
17030 #endif
17031
17032 #ifndef DB_VERSION_MAJOR
17033 # define DB_VERSION_MAJOR 1
17034 #endif
17035
17036 #ifndef NULL
17037 #define NULL ((void*)0)
17038 #endif
17039
17040 int main() {
17041
17042 #if DB_VERSION_MAJOR > 1
17043         {
17044                 char *version;
17045                 int major, minor, patch;
17046
17047                 version = db_version( &major, &minor, &patch );
17048
17049                 if( major != DB_VERSION_MAJOR ||
17050                         minor < DB_VERSION_MINOR )
17051                 {
17052                         printf("Berkeley DB version mismatch\n"
17053                                 "\texpected: %s\n\tgot: %s\n",
17054                                 DB_VERSION_STRING, version);
17055                         return 1;
17056                 }
17057         }
17058 #endif
17059
17060 #if DB_VERSION_MAJOR > 2
17061         db_env_create( NULL, 0 );
17062 #elif DB_VERSION_MAJOR > 1
17063         db_appexit( NULL );
17064 #else
17065         (void) dbopen( NULL, 0, 0, 0, NULL);
17066 #endif
17067
17068 ; return 0; }
17069 EOF
17070 if { (eval echo configure:17071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17071   rm -rf conftest*
17072   ol_cv_db_db_4=yes
17073 else
17074   echo "configure: failed program was:" >&5
17075   cat conftest.$ac_ext >&5
17076   rm -rf conftest*
17077   ol_cv_db_db_4=no
17078 fi
17079 rm -f conftest*
17080
17081         LIBS="$ol_LIBS"
17082
17083 fi
17084
17085 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17086
17087         if test $ol_cv_db_db_4 = yes ; then
17088                 ol_cv_lib_db=-ldb-4
17089         fi
17090 fi
17091
17092 if test $ol_cv_lib_db = no ; then
17093         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17094 echo "configure:17095: checking for Berkeley DB link (-ldb4)" >&5
17095 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17096   echo $ac_n "(cached) $ac_c" 1>&6
17097 else
17098   
17099         ol_DB_LIB=-ldb4
17100         ol_LIBS=$LIBS
17101         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17102
17103         cat > conftest.$ac_ext <<EOF
17104 #line 17105 "configure"
17105 #include "confdefs.h"
17106
17107 #ifdef HAVE_DB_185_H
17108 # include <db_185.h>
17109 #else
17110 # include <db.h>
17111 #endif
17112
17113 #ifndef DB_VERSION_MAJOR
17114 # define DB_VERSION_MAJOR 1
17115 #endif
17116
17117 #ifndef NULL
17118 #define NULL ((void*)0)
17119 #endif
17120
17121 int main() {
17122
17123 #if DB_VERSION_MAJOR > 1
17124         {
17125                 char *version;
17126                 int major, minor, patch;
17127
17128                 version = db_version( &major, &minor, &patch );
17129
17130                 if( major != DB_VERSION_MAJOR ||
17131                         minor < DB_VERSION_MINOR )
17132                 {
17133                         printf("Berkeley DB version mismatch\n"
17134                                 "\texpected: %s\n\tgot: %s\n",
17135                                 DB_VERSION_STRING, version);
17136                         return 1;
17137                 }
17138         }
17139 #endif
17140
17141 #if DB_VERSION_MAJOR > 2
17142         db_env_create( NULL, 0 );
17143 #elif DB_VERSION_MAJOR > 1
17144         db_appexit( NULL );
17145 #else
17146         (void) dbopen( NULL, 0, 0, 0, NULL);
17147 #endif
17148
17149 ; return 0; }
17150 EOF
17151 if { (eval echo configure:17152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17152   rm -rf conftest*
17153   ol_cv_db_db4=yes
17154 else
17155   echo "configure: failed program was:" >&5
17156   cat conftest.$ac_ext >&5
17157   rm -rf conftest*
17158   ol_cv_db_db4=no
17159 fi
17160 rm -f conftest*
17161
17162         LIBS="$ol_LIBS"
17163
17164 fi
17165
17166 echo "$ac_t""$ol_cv_db_db4" 1>&6
17167
17168         if test $ol_cv_db_db4 = yes ; then
17169                 ol_cv_lib_db=-ldb4
17170         fi
17171 fi
17172
17173 if test $ol_cv_lib_db = no ; then
17174         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17175 echo "configure:17176: checking for Berkeley DB link (-ldb)" >&5
17176 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17177   echo $ac_n "(cached) $ac_c" 1>&6
17178 else
17179   
17180         ol_DB_LIB=-ldb
17181         ol_LIBS=$LIBS
17182         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17183
17184         cat > conftest.$ac_ext <<EOF
17185 #line 17186 "configure"
17186 #include "confdefs.h"
17187
17188 #ifdef HAVE_DB_185_H
17189 # include <db_185.h>
17190 #else
17191 # include <db.h>
17192 #endif
17193
17194 #ifndef DB_VERSION_MAJOR
17195 # define DB_VERSION_MAJOR 1
17196 #endif
17197
17198 #ifndef NULL
17199 #define NULL ((void*)0)
17200 #endif
17201
17202 int main() {
17203
17204 #if DB_VERSION_MAJOR > 1
17205         {
17206                 char *version;
17207                 int major, minor, patch;
17208
17209                 version = db_version( &major, &minor, &patch );
17210
17211                 if( major != DB_VERSION_MAJOR ||
17212                         minor < DB_VERSION_MINOR )
17213                 {
17214                         printf("Berkeley DB version mismatch\n"
17215                                 "\texpected: %s\n\tgot: %s\n",
17216                                 DB_VERSION_STRING, version);
17217                         return 1;
17218                 }
17219         }
17220 #endif
17221
17222 #if DB_VERSION_MAJOR > 2
17223         db_env_create( NULL, 0 );
17224 #elif DB_VERSION_MAJOR > 1
17225         db_appexit( NULL );
17226 #else
17227         (void) dbopen( NULL, 0, 0, 0, NULL);
17228 #endif
17229
17230 ; return 0; }
17231 EOF
17232 if { (eval echo configure:17233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17233   rm -rf conftest*
17234   ol_cv_db_db=yes
17235 else
17236   echo "configure: failed program was:" >&5
17237   cat conftest.$ac_ext >&5
17238   rm -rf conftest*
17239   ol_cv_db_db=no
17240 fi
17241 rm -f conftest*
17242
17243         LIBS="$ol_LIBS"
17244
17245 fi
17246
17247 echo "$ac_t""$ol_cv_db_db" 1>&6
17248
17249         if test $ol_cv_db_db = yes ; then
17250                 ol_cv_lib_db=-ldb
17251         fi
17252 fi
17253
17254 if test $ol_cv_lib_db = no ; then
17255         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17256 echo "configure:17257: checking for Berkeley DB link (-ldb41)" >&5
17257 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17258   echo $ac_n "(cached) $ac_c" 1>&6
17259 else
17260   
17261         ol_DB_LIB=-ldb41
17262         ol_LIBS=$LIBS
17263         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17264
17265         cat > conftest.$ac_ext <<EOF
17266 #line 17267 "configure"
17267 #include "confdefs.h"
17268
17269 #ifdef HAVE_DB_185_H
17270 # include <db_185.h>
17271 #else
17272 # include <db.h>
17273 #endif
17274
17275 #ifndef DB_VERSION_MAJOR
17276 # define DB_VERSION_MAJOR 1
17277 #endif
17278
17279 #ifndef NULL
17280 #define NULL ((void*)0)
17281 #endif
17282
17283 int main() {
17284
17285 #if DB_VERSION_MAJOR > 1
17286         {
17287                 char *version;
17288                 int major, minor, patch;
17289
17290                 version = db_version( &major, &minor, &patch );
17291
17292                 if( major != DB_VERSION_MAJOR ||
17293                         minor < DB_VERSION_MINOR )
17294                 {
17295                         printf("Berkeley DB version mismatch\n"
17296                                 "\texpected: %s\n\tgot: %s\n",
17297                                 DB_VERSION_STRING, version);
17298                         return 1;
17299                 }
17300         }
17301 #endif
17302
17303 #if DB_VERSION_MAJOR > 2
17304         db_env_create( NULL, 0 );
17305 #elif DB_VERSION_MAJOR > 1
17306         db_appexit( NULL );
17307 #else
17308         (void) dbopen( NULL, 0, 0, 0, NULL);
17309 #endif
17310
17311 ; return 0; }
17312 EOF
17313 if { (eval echo configure:17314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17314   rm -rf conftest*
17315   ol_cv_db_db41=yes
17316 else
17317   echo "configure: failed program was:" >&5
17318   cat conftest.$ac_ext >&5
17319   rm -rf conftest*
17320   ol_cv_db_db41=no
17321 fi
17322 rm -f conftest*
17323
17324         LIBS="$ol_LIBS"
17325
17326 fi
17327
17328 echo "$ac_t""$ol_cv_db_db41" 1>&6
17329
17330         if test $ol_cv_db_db41 = yes ; then
17331                 ol_cv_lib_db=-ldb41
17332         fi
17333 fi
17334
17335 if test $ol_cv_lib_db = no ; then
17336         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17337 echo "configure:17338: checking for Berkeley DB link (-ldb-41)" >&5
17338 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17339   echo $ac_n "(cached) $ac_c" 1>&6
17340 else
17341   
17342         ol_DB_LIB=-ldb-41
17343         ol_LIBS=$LIBS
17344         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17345
17346         cat > conftest.$ac_ext <<EOF
17347 #line 17348 "configure"
17348 #include "confdefs.h"
17349
17350 #ifdef HAVE_DB_185_H
17351 # include <db_185.h>
17352 #else
17353 # include <db.h>
17354 #endif
17355
17356 #ifndef DB_VERSION_MAJOR
17357 # define DB_VERSION_MAJOR 1
17358 #endif
17359
17360 #ifndef NULL
17361 #define NULL ((void*)0)
17362 #endif
17363
17364 int main() {
17365
17366 #if DB_VERSION_MAJOR > 1
17367         {
17368                 char *version;
17369                 int major, minor, patch;
17370
17371                 version = db_version( &major, &minor, &patch );
17372
17373                 if( major != DB_VERSION_MAJOR ||
17374                         minor < DB_VERSION_MINOR )
17375                 {
17376                         printf("Berkeley DB version mismatch\n"
17377                                 "\texpected: %s\n\tgot: %s\n",
17378                                 DB_VERSION_STRING, version);
17379                         return 1;
17380                 }
17381         }
17382 #endif
17383
17384 #if DB_VERSION_MAJOR > 2
17385         db_env_create( NULL, 0 );
17386 #elif DB_VERSION_MAJOR > 1
17387         db_appexit( NULL );
17388 #else
17389         (void) dbopen( NULL, 0, 0, 0, NULL);
17390 #endif
17391
17392 ; return 0; }
17393 EOF
17394 if { (eval echo configure:17395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17395   rm -rf conftest*
17396   ol_cv_db_db_41=yes
17397 else
17398   echo "configure: failed program was:" >&5
17399   cat conftest.$ac_ext >&5
17400   rm -rf conftest*
17401   ol_cv_db_db_41=no
17402 fi
17403 rm -f conftest*
17404
17405         LIBS="$ol_LIBS"
17406
17407 fi
17408
17409 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17410
17411         if test $ol_cv_db_db_41 = yes ; then
17412                 ol_cv_lib_db=-ldb-41
17413         fi
17414 fi
17415
17416 if test $ol_cv_lib_db = no ; then
17417         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17418 echo "configure:17419: checking for Berkeley DB link (-ldb-4.1)" >&5
17419 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17420   echo $ac_n "(cached) $ac_c" 1>&6
17421 else
17422   
17423         ol_DB_LIB=-ldb-4.1
17424         ol_LIBS=$LIBS
17425         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17426
17427         cat > conftest.$ac_ext <<EOF
17428 #line 17429 "configure"
17429 #include "confdefs.h"
17430
17431 #ifdef HAVE_DB_185_H
17432 # include <db_185.h>
17433 #else
17434 # include <db.h>
17435 #endif
17436
17437 #ifndef DB_VERSION_MAJOR
17438 # define DB_VERSION_MAJOR 1
17439 #endif
17440
17441 #ifndef NULL
17442 #define NULL ((void*)0)
17443 #endif
17444
17445 int main() {
17446
17447 #if DB_VERSION_MAJOR > 1
17448         {
17449                 char *version;
17450                 int major, minor, patch;
17451
17452                 version = db_version( &major, &minor, &patch );
17453
17454                 if( major != DB_VERSION_MAJOR ||
17455                         minor < DB_VERSION_MINOR )
17456                 {
17457                         printf("Berkeley DB version mismatch\n"
17458                                 "\texpected: %s\n\tgot: %s\n",
17459                                 DB_VERSION_STRING, version);
17460                         return 1;
17461                 }
17462         }
17463 #endif
17464
17465 #if DB_VERSION_MAJOR > 2
17466         db_env_create( NULL, 0 );
17467 #elif DB_VERSION_MAJOR > 1
17468         db_appexit( NULL );
17469 #else
17470         (void) dbopen( NULL, 0, 0, 0, NULL);
17471 #endif
17472
17473 ; return 0; }
17474 EOF
17475 if { (eval echo configure:17476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17476   rm -rf conftest*
17477   ol_cv_db_db_4_dot_1=yes
17478 else
17479   echo "configure: failed program was:" >&5
17480   cat conftest.$ac_ext >&5
17481   rm -rf conftest*
17482   ol_cv_db_db_4_dot_1=no
17483 fi
17484 rm -f conftest*
17485
17486         LIBS="$ol_LIBS"
17487
17488 fi
17489
17490 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17491
17492         if test $ol_cv_db_db_4_dot_1 = yes ; then
17493                 ol_cv_lib_db=-ldb-4.1
17494         fi
17495 fi
17496
17497 if test $ol_cv_lib_db = no ; then
17498         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17499 echo "configure:17500: checking for Berkeley DB link (-ldb-4-1)" >&5
17500 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17501   echo $ac_n "(cached) $ac_c" 1>&6
17502 else
17503   
17504         ol_DB_LIB=-ldb-4-1
17505         ol_LIBS=$LIBS
17506         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17507
17508         cat > conftest.$ac_ext <<EOF
17509 #line 17510 "configure"
17510 #include "confdefs.h"
17511
17512 #ifdef HAVE_DB_185_H
17513 # include <db_185.h>
17514 #else
17515 # include <db.h>
17516 #endif
17517
17518 #ifndef DB_VERSION_MAJOR
17519 # define DB_VERSION_MAJOR 1
17520 #endif
17521
17522 #ifndef NULL
17523 #define NULL ((void*)0)
17524 #endif
17525
17526 int main() {
17527
17528 #if DB_VERSION_MAJOR > 1
17529         {
17530                 char *version;
17531                 int major, minor, patch;
17532
17533                 version = db_version( &major, &minor, &patch );
17534
17535                 if( major != DB_VERSION_MAJOR ||
17536                         minor < DB_VERSION_MINOR )
17537                 {
17538                         printf("Berkeley DB version mismatch\n"
17539                                 "\texpected: %s\n\tgot: %s\n",
17540                                 DB_VERSION_STRING, version);
17541                         return 1;
17542                 }
17543         }
17544 #endif
17545
17546 #if DB_VERSION_MAJOR > 2
17547         db_env_create( NULL, 0 );
17548 #elif DB_VERSION_MAJOR > 1
17549         db_appexit( NULL );
17550 #else
17551         (void) dbopen( NULL, 0, 0, 0, NULL);
17552 #endif
17553
17554 ; return 0; }
17555 EOF
17556 if { (eval echo configure:17557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17557   rm -rf conftest*
17558   ol_cv_db_db_4_1=yes
17559 else
17560   echo "configure: failed program was:" >&5
17561   cat conftest.$ac_ext >&5
17562   rm -rf conftest*
17563   ol_cv_db_db_4_1=no
17564 fi
17565 rm -f conftest*
17566
17567         LIBS="$ol_LIBS"
17568
17569 fi
17570
17571 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17572
17573         if test $ol_cv_db_db_4_1 = yes ; then
17574                 ol_cv_lib_db=-ldb-4-1
17575         fi
17576 fi
17577
17578 if test $ol_cv_lib_db = no ; then
17579         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17580 echo "configure:17581: checking for Berkeley DB link (-ldb3)" >&5
17581 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17582   echo $ac_n "(cached) $ac_c" 1>&6
17583 else
17584   
17585         ol_DB_LIB=-ldb3
17586         ol_LIBS=$LIBS
17587         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17588
17589         cat > conftest.$ac_ext <<EOF
17590 #line 17591 "configure"
17591 #include "confdefs.h"
17592
17593 #ifdef HAVE_DB_185_H
17594 # include <db_185.h>
17595 #else
17596 # include <db.h>
17597 #endif
17598
17599 #ifndef DB_VERSION_MAJOR
17600 # define DB_VERSION_MAJOR 1
17601 #endif
17602
17603 #ifndef NULL
17604 #define NULL ((void*)0)
17605 #endif
17606
17607 int main() {
17608
17609 #if DB_VERSION_MAJOR > 1
17610         {
17611                 char *version;
17612                 int major, minor, patch;
17613
17614                 version = db_version( &major, &minor, &patch );
17615
17616                 if( major != DB_VERSION_MAJOR ||
17617                         minor < DB_VERSION_MINOR )
17618                 {
17619                         printf("Berkeley DB version mismatch\n"
17620                                 "\texpected: %s\n\tgot: %s\n",
17621                                 DB_VERSION_STRING, version);
17622                         return 1;
17623                 }
17624         }
17625 #endif
17626
17627 #if DB_VERSION_MAJOR > 2
17628         db_env_create( NULL, 0 );
17629 #elif DB_VERSION_MAJOR > 1
17630         db_appexit( NULL );
17631 #else
17632         (void) dbopen( NULL, 0, 0, 0, NULL);
17633 #endif
17634
17635 ; return 0; }
17636 EOF
17637 if { (eval echo configure:17638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17638   rm -rf conftest*
17639   ol_cv_db_db3=yes
17640 else
17641   echo "configure: failed program was:" >&5
17642   cat conftest.$ac_ext >&5
17643   rm -rf conftest*
17644   ol_cv_db_db3=no
17645 fi
17646 rm -f conftest*
17647
17648         LIBS="$ol_LIBS"
17649
17650 fi
17651
17652 echo "$ac_t""$ol_cv_db_db3" 1>&6
17653
17654         if test $ol_cv_db_db3 = yes ; then
17655                 ol_cv_lib_db=-ldb3
17656         fi
17657 fi
17658
17659 if test $ol_cv_lib_db = no ; then
17660         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17661 echo "configure:17662: checking for Berkeley DB link (-ldb-3)" >&5
17662 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17663   echo $ac_n "(cached) $ac_c" 1>&6
17664 else
17665   
17666         ol_DB_LIB=-ldb-3
17667         ol_LIBS=$LIBS
17668         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17669
17670         cat > conftest.$ac_ext <<EOF
17671 #line 17672 "configure"
17672 #include "confdefs.h"
17673
17674 #ifdef HAVE_DB_185_H
17675 # include <db_185.h>
17676 #else
17677 # include <db.h>
17678 #endif
17679
17680 #ifndef DB_VERSION_MAJOR
17681 # define DB_VERSION_MAJOR 1
17682 #endif
17683
17684 #ifndef NULL
17685 #define NULL ((void*)0)
17686 #endif
17687
17688 int main() {
17689
17690 #if DB_VERSION_MAJOR > 1
17691         {
17692                 char *version;
17693                 int major, minor, patch;
17694
17695                 version = db_version( &major, &minor, &patch );
17696
17697                 if( major != DB_VERSION_MAJOR ||
17698                         minor < DB_VERSION_MINOR )
17699                 {
17700                         printf("Berkeley DB version mismatch\n"
17701                                 "\texpected: %s\n\tgot: %s\n",
17702                                 DB_VERSION_STRING, version);
17703                         return 1;
17704                 }
17705         }
17706 #endif
17707
17708 #if DB_VERSION_MAJOR > 2
17709         db_env_create( NULL, 0 );
17710 #elif DB_VERSION_MAJOR > 1
17711         db_appexit( NULL );
17712 #else
17713         (void) dbopen( NULL, 0, 0, 0, NULL);
17714 #endif
17715
17716 ; return 0; }
17717 EOF
17718 if { (eval echo configure:17719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17719   rm -rf conftest*
17720   ol_cv_db_db_3=yes
17721 else
17722   echo "configure: failed program was:" >&5
17723   cat conftest.$ac_ext >&5
17724   rm -rf conftest*
17725   ol_cv_db_db_3=no
17726 fi
17727 rm -f conftest*
17728
17729         LIBS="$ol_LIBS"
17730
17731 fi
17732
17733 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17734
17735         if test $ol_cv_db_db_3 = yes ; then
17736                 ol_cv_lib_db=-ldb-3
17737         fi
17738 fi
17739
17740 if test $ol_cv_lib_db = no ; then
17741         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17742 echo "configure:17743: checking for Berkeley DB link (-ldb2)" >&5
17743 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17744   echo $ac_n "(cached) $ac_c" 1>&6
17745 else
17746   
17747         ol_DB_LIB=-ldb2
17748         ol_LIBS=$LIBS
17749         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17750
17751         cat > conftest.$ac_ext <<EOF
17752 #line 17753 "configure"
17753 #include "confdefs.h"
17754
17755 #ifdef HAVE_DB_185_H
17756 # include <db_185.h>
17757 #else
17758 # include <db.h>
17759 #endif
17760
17761 #ifndef DB_VERSION_MAJOR
17762 # define DB_VERSION_MAJOR 1
17763 #endif
17764
17765 #ifndef NULL
17766 #define NULL ((void*)0)
17767 #endif
17768
17769 int main() {
17770
17771 #if DB_VERSION_MAJOR > 1
17772         {
17773                 char *version;
17774                 int major, minor, patch;
17775
17776                 version = db_version( &major, &minor, &patch );
17777
17778                 if( major != DB_VERSION_MAJOR ||
17779                         minor < DB_VERSION_MINOR )
17780                 {
17781                         printf("Berkeley DB version mismatch\n"
17782                                 "\texpected: %s\n\tgot: %s\n",
17783                                 DB_VERSION_STRING, version);
17784                         return 1;
17785                 }
17786         }
17787 #endif
17788
17789 #if DB_VERSION_MAJOR > 2
17790         db_env_create( NULL, 0 );
17791 #elif DB_VERSION_MAJOR > 1
17792         db_appexit( NULL );
17793 #else
17794         (void) dbopen( NULL, 0, 0, 0, NULL);
17795 #endif
17796
17797 ; return 0; }
17798 EOF
17799 if { (eval echo configure:17800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17800   rm -rf conftest*
17801   ol_cv_db_db2=yes
17802 else
17803   echo "configure: failed program was:" >&5
17804   cat conftest.$ac_ext >&5
17805   rm -rf conftest*
17806   ol_cv_db_db2=no
17807 fi
17808 rm -f conftest*
17809
17810         LIBS="$ol_LIBS"
17811
17812 fi
17813
17814 echo "$ac_t""$ol_cv_db_db2" 1>&6
17815
17816         if test $ol_cv_db_db2 = yes ; then
17817                 ol_cv_lib_db=-ldb2
17818         fi
17819 fi
17820
17821 if test $ol_cv_lib_db = no ; then
17822         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17823 echo "configure:17824: checking for Berkeley DB link (-ldb-2)" >&5
17824 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17825   echo $ac_n "(cached) $ac_c" 1>&6
17826 else
17827   
17828         ol_DB_LIB=-ldb-2
17829         ol_LIBS=$LIBS
17830         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17831
17832         cat > conftest.$ac_ext <<EOF
17833 #line 17834 "configure"
17834 #include "confdefs.h"
17835
17836 #ifdef HAVE_DB_185_H
17837 # include <db_185.h>
17838 #else
17839 # include <db.h>
17840 #endif
17841
17842 #ifndef DB_VERSION_MAJOR
17843 # define DB_VERSION_MAJOR 1
17844 #endif
17845
17846 #ifndef NULL
17847 #define NULL ((void*)0)
17848 #endif
17849
17850 int main() {
17851
17852 #if DB_VERSION_MAJOR > 1
17853         {
17854                 char *version;
17855                 int major, minor, patch;
17856
17857                 version = db_version( &major, &minor, &patch );
17858
17859                 if( major != DB_VERSION_MAJOR ||
17860                         minor < DB_VERSION_MINOR )
17861                 {
17862                         printf("Berkeley DB version mismatch\n"
17863                                 "\texpected: %s\n\tgot: %s\n",
17864                                 DB_VERSION_STRING, version);
17865                         return 1;
17866                 }
17867         }
17868 #endif
17869
17870 #if DB_VERSION_MAJOR > 2
17871         db_env_create( NULL, 0 );
17872 #elif DB_VERSION_MAJOR > 1
17873         db_appexit( NULL );
17874 #else
17875         (void) dbopen( NULL, 0, 0, 0, NULL);
17876 #endif
17877
17878 ; return 0; }
17879 EOF
17880 if { (eval echo configure:17881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17881   rm -rf conftest*
17882   ol_cv_db_db_2=yes
17883 else
17884   echo "configure: failed program was:" >&5
17885   cat conftest.$ac_ext >&5
17886   rm -rf conftest*
17887   ol_cv_db_db_2=no
17888 fi
17889 rm -f conftest*
17890
17891         LIBS="$ol_LIBS"
17892
17893 fi
17894
17895 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17896
17897         if test $ol_cv_db_db_2 = yes ; then
17898                 ol_cv_lib_db=-ldb-2
17899         fi
17900 fi
17901
17902 if test $ol_cv_lib_db = no ; then
17903         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17904 echo "configure:17905: checking for Berkeley DB link (-ldb1)" >&5
17905 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17906   echo $ac_n "(cached) $ac_c" 1>&6
17907 else
17908   
17909         ol_DB_LIB=-ldb1
17910         ol_LIBS=$LIBS
17911         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17912
17913         cat > conftest.$ac_ext <<EOF
17914 #line 17915 "configure"
17915 #include "confdefs.h"
17916
17917 #ifdef HAVE_DB_185_H
17918 # include <db_185.h>
17919 #else
17920 # include <db.h>
17921 #endif
17922
17923 #ifndef DB_VERSION_MAJOR
17924 # define DB_VERSION_MAJOR 1
17925 #endif
17926
17927 #ifndef NULL
17928 #define NULL ((void*)0)
17929 #endif
17930
17931 int main() {
17932
17933 #if DB_VERSION_MAJOR > 1
17934         {
17935                 char *version;
17936                 int major, minor, patch;
17937
17938                 version = db_version( &major, &minor, &patch );
17939
17940                 if( major != DB_VERSION_MAJOR ||
17941                         minor < DB_VERSION_MINOR )
17942                 {
17943                         printf("Berkeley DB version mismatch\n"
17944                                 "\texpected: %s\n\tgot: %s\n",
17945                                 DB_VERSION_STRING, version);
17946                         return 1;
17947                 }
17948         }
17949 #endif
17950
17951 #if DB_VERSION_MAJOR > 2
17952         db_env_create( NULL, 0 );
17953 #elif DB_VERSION_MAJOR > 1
17954         db_appexit( NULL );
17955 #else
17956         (void) dbopen( NULL, 0, 0, 0, NULL);
17957 #endif
17958
17959 ; return 0; }
17960 EOF
17961 if { (eval echo configure:17962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17962   rm -rf conftest*
17963   ol_cv_db_db1=yes
17964 else
17965   echo "configure: failed program was:" >&5
17966   cat conftest.$ac_ext >&5
17967   rm -rf conftest*
17968   ol_cv_db_db1=no
17969 fi
17970 rm -f conftest*
17971
17972         LIBS="$ol_LIBS"
17973
17974 fi
17975
17976 echo "$ac_t""$ol_cv_db_db1" 1>&6
17977
17978         if test $ol_cv_db_db1 = yes ; then
17979                 ol_cv_lib_db=-ldb1
17980         fi
17981 fi
17982
17983 if test $ol_cv_lib_db = no ; then
17984         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17985 echo "configure:17986: checking for Berkeley DB link (-ldb-1)" >&5
17986 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17987   echo $ac_n "(cached) $ac_c" 1>&6
17988 else
17989   
17990         ol_DB_LIB=-ldb-1
17991         ol_LIBS=$LIBS
17992         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17993
17994         cat > conftest.$ac_ext <<EOF
17995 #line 17996 "configure"
17996 #include "confdefs.h"
17997
17998 #ifdef HAVE_DB_185_H
17999 # include <db_185.h>
18000 #else
18001 # include <db.h>
18002 #endif
18003
18004 #ifndef DB_VERSION_MAJOR
18005 # define DB_VERSION_MAJOR 1
18006 #endif
18007
18008 #ifndef NULL
18009 #define NULL ((void*)0)
18010 #endif
18011
18012 int main() {
18013
18014 #if DB_VERSION_MAJOR > 1
18015         {
18016                 char *version;
18017                 int major, minor, patch;
18018
18019                 version = db_version( &major, &minor, &patch );
18020
18021                 if( major != DB_VERSION_MAJOR ||
18022                         minor < DB_VERSION_MINOR )
18023                 {
18024                         printf("Berkeley DB version mismatch\n"
18025                                 "\texpected: %s\n\tgot: %s\n",
18026                                 DB_VERSION_STRING, version);
18027                         return 1;
18028                 }
18029         }
18030 #endif
18031
18032 #if DB_VERSION_MAJOR > 2
18033         db_env_create( NULL, 0 );
18034 #elif DB_VERSION_MAJOR > 1
18035         db_appexit( NULL );
18036 #else
18037         (void) dbopen( NULL, 0, 0, 0, NULL);
18038 #endif
18039
18040 ; return 0; }
18041 EOF
18042 if { (eval echo configure:18043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18043   rm -rf conftest*
18044   ol_cv_db_db_1=yes
18045 else
18046   echo "configure: failed program was:" >&5
18047   cat conftest.$ac_ext >&5
18048   rm -rf conftest*
18049   ol_cv_db_db_1=no
18050 fi
18051 rm -f conftest*
18052
18053         LIBS="$ol_LIBS"
18054
18055 fi
18056
18057 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18058
18059         if test $ol_cv_db_db_1 = yes ; then
18060                 ol_cv_lib_db=-ldb-1
18061         fi
18062 fi
18063
18064
18065                 if test "$ol_cv_lib_db" != no ; then
18066                         ol_cv_berkeley_db=yes
18067                 fi
18068         fi
18069 fi
18070
18071         else
18072                 ol_cv_berkeley_db=no
18073 for ac_hdr in db.h
18074 do
18075 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18076 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18077 echo "configure:18078: checking for $ac_hdr" >&5
18078 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18079   echo $ac_n "(cached) $ac_c" 1>&6
18080 else
18081   cat > conftest.$ac_ext <<EOF
18082 #line 18083 "configure"
18083 #include "confdefs.h"
18084 #include <$ac_hdr>
18085 EOF
18086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18087 { (eval echo configure:18088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18089 if test -z "$ac_err"; then
18090   rm -rf conftest*
18091   eval "ac_cv_header_$ac_safe=yes"
18092 else
18093   echo "$ac_err" >&5
18094   echo "configure: failed program was:" >&5
18095   cat conftest.$ac_ext >&5
18096   rm -rf conftest*
18097   eval "ac_cv_header_$ac_safe=no"
18098 fi
18099 rm -f conftest*
18100 fi
18101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18102   echo "$ac_t""yes" 1>&6
18103     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18104   cat >> confdefs.h <<EOF
18105 #define $ac_tr_hdr 1
18106 EOF
18107  
18108 else
18109   echo "$ac_t""no" 1>&6
18110 fi
18111 done
18112
18113 if test $ac_cv_header_db_h = yes; then
18114         ol_cv_lib_db=no
18115 if test $ol_cv_lib_db = no ; then
18116         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18117 echo "configure:18118: checking for Berkeley DB link (default)" >&5
18118 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18119   echo $ac_n "(cached) $ac_c" 1>&6
18120 else
18121   
18122         ol_DB_LIB=
18123         ol_LIBS=$LIBS
18124         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18125
18126         cat > conftest.$ac_ext <<EOF
18127 #line 18128 "configure"
18128 #include "confdefs.h"
18129
18130 #ifdef HAVE_DB_185_H
18131 # include <db_185.h>
18132 #else
18133 # include <db.h>
18134 #endif
18135
18136 #ifndef DB_VERSION_MAJOR
18137 # define DB_VERSION_MAJOR 1
18138 #endif
18139
18140 #ifndef NULL
18141 #define NULL ((void*)0)
18142 #endif
18143
18144 int main() {
18145
18146 #if DB_VERSION_MAJOR > 1
18147         {
18148                 char *version;
18149                 int major, minor, patch;
18150
18151                 version = db_version( &major, &minor, &patch );
18152
18153                 if( major != DB_VERSION_MAJOR ||
18154                         minor < DB_VERSION_MINOR )
18155                 {
18156                         printf("Berkeley DB version mismatch\n"
18157                                 "\texpected: %s\n\tgot: %s\n",
18158                                 DB_VERSION_STRING, version);
18159                         return 1;
18160                 }
18161         }
18162 #endif
18163
18164 #if DB_VERSION_MAJOR > 2
18165         db_env_create( NULL, 0 );
18166 #elif DB_VERSION_MAJOR > 1
18167         db_appexit( NULL );
18168 #else
18169         (void) dbopen( NULL, 0, 0, 0, NULL);
18170 #endif
18171
18172 ; return 0; }
18173 EOF
18174 if { (eval echo configure:18175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18175   rm -rf conftest*
18176   ol_cv_db_none=yes
18177 else
18178   echo "configure: failed program was:" >&5
18179   cat conftest.$ac_ext >&5
18180   rm -rf conftest*
18181   ol_cv_db_none=no
18182 fi
18183 rm -f conftest*
18184
18185         LIBS="$ol_LIBS"
18186
18187 fi
18188
18189 echo "$ac_t""$ol_cv_db_none" 1>&6
18190
18191         if test $ol_cv_db_none = yes ; then
18192                 ol_cv_lib_db=yes
18193         fi
18194 fi
18195
18196 if test $ol_cv_lib_db = no ; then
18197         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18198 echo "configure:18199: checking for Berkeley DB link (-ldb42)" >&5
18199 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18200   echo $ac_n "(cached) $ac_c" 1>&6
18201 else
18202   
18203         ol_DB_LIB=-ldb42
18204         ol_LIBS=$LIBS
18205         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18206
18207         cat > conftest.$ac_ext <<EOF
18208 #line 18209 "configure"
18209 #include "confdefs.h"
18210
18211 #ifdef HAVE_DB_185_H
18212 # include <db_185.h>
18213 #else
18214 # include <db.h>
18215 #endif
18216
18217 #ifndef DB_VERSION_MAJOR
18218 # define DB_VERSION_MAJOR 1
18219 #endif
18220
18221 #ifndef NULL
18222 #define NULL ((void*)0)
18223 #endif
18224
18225 int main() {
18226
18227 #if DB_VERSION_MAJOR > 1
18228         {
18229                 char *version;
18230                 int major, minor, patch;
18231
18232                 version = db_version( &major, &minor, &patch );
18233
18234                 if( major != DB_VERSION_MAJOR ||
18235                         minor < DB_VERSION_MINOR )
18236                 {
18237                         printf("Berkeley DB version mismatch\n"
18238                                 "\texpected: %s\n\tgot: %s\n",
18239                                 DB_VERSION_STRING, version);
18240                         return 1;
18241                 }
18242         }
18243 #endif
18244
18245 #if DB_VERSION_MAJOR > 2
18246         db_env_create( NULL, 0 );
18247 #elif DB_VERSION_MAJOR > 1
18248         db_appexit( NULL );
18249 #else
18250         (void) dbopen( NULL, 0, 0, 0, NULL);
18251 #endif
18252
18253 ; return 0; }
18254 EOF
18255 if { (eval echo configure:18256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18256   rm -rf conftest*
18257   ol_cv_db_db42=yes
18258 else
18259   echo "configure: failed program was:" >&5
18260   cat conftest.$ac_ext >&5
18261   rm -rf conftest*
18262   ol_cv_db_db42=no
18263 fi
18264 rm -f conftest*
18265
18266         LIBS="$ol_LIBS"
18267
18268 fi
18269
18270 echo "$ac_t""$ol_cv_db_db42" 1>&6
18271
18272         if test $ol_cv_db_db42 = yes ; then
18273                 ol_cv_lib_db=-ldb42
18274         fi
18275 fi
18276
18277 if test $ol_cv_lib_db = no ; then
18278         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18279 echo "configure:18280: checking for Berkeley DB link (-ldb-42)" >&5
18280 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18281   echo $ac_n "(cached) $ac_c" 1>&6
18282 else
18283   
18284         ol_DB_LIB=-ldb-42
18285         ol_LIBS=$LIBS
18286         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18287
18288         cat > conftest.$ac_ext <<EOF
18289 #line 18290 "configure"
18290 #include "confdefs.h"
18291
18292 #ifdef HAVE_DB_185_H
18293 # include <db_185.h>
18294 #else
18295 # include <db.h>
18296 #endif
18297
18298 #ifndef DB_VERSION_MAJOR
18299 # define DB_VERSION_MAJOR 1
18300 #endif
18301
18302 #ifndef NULL
18303 #define NULL ((void*)0)
18304 #endif
18305
18306 int main() {
18307
18308 #if DB_VERSION_MAJOR > 1
18309         {
18310                 char *version;
18311                 int major, minor, patch;
18312
18313                 version = db_version( &major, &minor, &patch );
18314
18315                 if( major != DB_VERSION_MAJOR ||
18316                         minor < DB_VERSION_MINOR )
18317                 {
18318                         printf("Berkeley DB version mismatch\n"
18319                                 "\texpected: %s\n\tgot: %s\n",
18320                                 DB_VERSION_STRING, version);
18321                         return 1;
18322                 }
18323         }
18324 #endif
18325
18326 #if DB_VERSION_MAJOR > 2
18327         db_env_create( NULL, 0 );
18328 #elif DB_VERSION_MAJOR > 1
18329         db_appexit( NULL );
18330 #else
18331         (void) dbopen( NULL, 0, 0, 0, NULL);
18332 #endif
18333
18334 ; return 0; }
18335 EOF
18336 if { (eval echo configure:18337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18337   rm -rf conftest*
18338   ol_cv_db_db_42=yes
18339 else
18340   echo "configure: failed program was:" >&5
18341   cat conftest.$ac_ext >&5
18342   rm -rf conftest*
18343   ol_cv_db_db_42=no
18344 fi
18345 rm -f conftest*
18346
18347         LIBS="$ol_LIBS"
18348
18349 fi
18350
18351 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18352
18353         if test $ol_cv_db_db_42 = yes ; then
18354                 ol_cv_lib_db=-ldb-42
18355         fi
18356 fi
18357
18358 if test $ol_cv_lib_db = no ; then
18359         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18360 echo "configure:18361: checking for Berkeley DB link (-ldb-4.2)" >&5
18361 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18362   echo $ac_n "(cached) $ac_c" 1>&6
18363 else
18364   
18365         ol_DB_LIB=-ldb-4.2
18366         ol_LIBS=$LIBS
18367         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18368
18369         cat > conftest.$ac_ext <<EOF
18370 #line 18371 "configure"
18371 #include "confdefs.h"
18372
18373 #ifdef HAVE_DB_185_H
18374 # include <db_185.h>
18375 #else
18376 # include <db.h>
18377 #endif
18378
18379 #ifndef DB_VERSION_MAJOR
18380 # define DB_VERSION_MAJOR 1
18381 #endif
18382
18383 #ifndef NULL
18384 #define NULL ((void*)0)
18385 #endif
18386
18387 int main() {
18388
18389 #if DB_VERSION_MAJOR > 1
18390         {
18391                 char *version;
18392                 int major, minor, patch;
18393
18394                 version = db_version( &major, &minor, &patch );
18395
18396                 if( major != DB_VERSION_MAJOR ||
18397                         minor < DB_VERSION_MINOR )
18398                 {
18399                         printf("Berkeley DB version mismatch\n"
18400                                 "\texpected: %s\n\tgot: %s\n",
18401                                 DB_VERSION_STRING, version);
18402                         return 1;
18403                 }
18404         }
18405 #endif
18406
18407 #if DB_VERSION_MAJOR > 2
18408         db_env_create( NULL, 0 );
18409 #elif DB_VERSION_MAJOR > 1
18410         db_appexit( NULL );
18411 #else
18412         (void) dbopen( NULL, 0, 0, 0, NULL);
18413 #endif
18414
18415 ; return 0; }
18416 EOF
18417 if { (eval echo configure:18418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18418   rm -rf conftest*
18419   ol_cv_db_db_4_dot_2=yes
18420 else
18421   echo "configure: failed program was:" >&5
18422   cat conftest.$ac_ext >&5
18423   rm -rf conftest*
18424   ol_cv_db_db_4_dot_2=no
18425 fi
18426 rm -f conftest*
18427
18428         LIBS="$ol_LIBS"
18429
18430 fi
18431
18432 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18433
18434         if test $ol_cv_db_db_4_dot_2 = yes ; then
18435                 ol_cv_lib_db=-ldb-4.2
18436         fi
18437 fi
18438
18439 if test $ol_cv_lib_db = no ; then
18440         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18441 echo "configure:18442: checking for Berkeley DB link (-ldb-4-2)" >&5
18442 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18443   echo $ac_n "(cached) $ac_c" 1>&6
18444 else
18445   
18446         ol_DB_LIB=-ldb-4-2
18447         ol_LIBS=$LIBS
18448         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18449
18450         cat > conftest.$ac_ext <<EOF
18451 #line 18452 "configure"
18452 #include "confdefs.h"
18453
18454 #ifdef HAVE_DB_185_H
18455 # include <db_185.h>
18456 #else
18457 # include <db.h>
18458 #endif
18459
18460 #ifndef DB_VERSION_MAJOR
18461 # define DB_VERSION_MAJOR 1
18462 #endif
18463
18464 #ifndef NULL
18465 #define NULL ((void*)0)
18466 #endif
18467
18468 int main() {
18469
18470 #if DB_VERSION_MAJOR > 1
18471         {
18472                 char *version;
18473                 int major, minor, patch;
18474
18475                 version = db_version( &major, &minor, &patch );
18476
18477                 if( major != DB_VERSION_MAJOR ||
18478                         minor < DB_VERSION_MINOR )
18479                 {
18480                         printf("Berkeley DB version mismatch\n"
18481                                 "\texpected: %s\n\tgot: %s\n",
18482                                 DB_VERSION_STRING, version);
18483                         return 1;
18484                 }
18485         }
18486 #endif
18487
18488 #if DB_VERSION_MAJOR > 2
18489         db_env_create( NULL, 0 );
18490 #elif DB_VERSION_MAJOR > 1
18491         db_appexit( NULL );
18492 #else
18493         (void) dbopen( NULL, 0, 0, 0, NULL);
18494 #endif
18495
18496 ; return 0; }
18497 EOF
18498 if { (eval echo configure:18499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18499   rm -rf conftest*
18500   ol_cv_db_db_4_2=yes
18501 else
18502   echo "configure: failed program was:" >&5
18503   cat conftest.$ac_ext >&5
18504   rm -rf conftest*
18505   ol_cv_db_db_4_2=no
18506 fi
18507 rm -f conftest*
18508
18509         LIBS="$ol_LIBS"
18510
18511 fi
18512
18513 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18514
18515         if test $ol_cv_db_db_4_2 = yes ; then
18516                 ol_cv_lib_db=-ldb-4-2
18517         fi
18518 fi
18519
18520 if test $ol_cv_lib_db = no ; then
18521         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18522 echo "configure:18523: checking for Berkeley DB link (-ldb-4)" >&5
18523 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18524   echo $ac_n "(cached) $ac_c" 1>&6
18525 else
18526   
18527         ol_DB_LIB=-ldb-4
18528         ol_LIBS=$LIBS
18529         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18530
18531         cat > conftest.$ac_ext <<EOF
18532 #line 18533 "configure"
18533 #include "confdefs.h"
18534
18535 #ifdef HAVE_DB_185_H
18536 # include <db_185.h>
18537 #else
18538 # include <db.h>
18539 #endif
18540
18541 #ifndef DB_VERSION_MAJOR
18542 # define DB_VERSION_MAJOR 1
18543 #endif
18544
18545 #ifndef NULL
18546 #define NULL ((void*)0)
18547 #endif
18548
18549 int main() {
18550
18551 #if DB_VERSION_MAJOR > 1
18552         {
18553                 char *version;
18554                 int major, minor, patch;
18555
18556                 version = db_version( &major, &minor, &patch );
18557
18558                 if( major != DB_VERSION_MAJOR ||
18559                         minor < DB_VERSION_MINOR )
18560                 {
18561                         printf("Berkeley DB version mismatch\n"
18562                                 "\texpected: %s\n\tgot: %s\n",
18563                                 DB_VERSION_STRING, version);
18564                         return 1;
18565                 }
18566         }
18567 #endif
18568
18569 #if DB_VERSION_MAJOR > 2
18570         db_env_create( NULL, 0 );
18571 #elif DB_VERSION_MAJOR > 1
18572         db_appexit( NULL );
18573 #else
18574         (void) dbopen( NULL, 0, 0, 0, NULL);
18575 #endif
18576
18577 ; return 0; }
18578 EOF
18579 if { (eval echo configure:18580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18580   rm -rf conftest*
18581   ol_cv_db_db_4=yes
18582 else
18583   echo "configure: failed program was:" >&5
18584   cat conftest.$ac_ext >&5
18585   rm -rf conftest*
18586   ol_cv_db_db_4=no
18587 fi
18588 rm -f conftest*
18589
18590         LIBS="$ol_LIBS"
18591
18592 fi
18593
18594 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18595
18596         if test $ol_cv_db_db_4 = yes ; then
18597                 ol_cv_lib_db=-ldb-4
18598         fi
18599 fi
18600
18601 if test $ol_cv_lib_db = no ; then
18602         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18603 echo "configure:18604: checking for Berkeley DB link (-ldb4)" >&5
18604 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18605   echo $ac_n "(cached) $ac_c" 1>&6
18606 else
18607   
18608         ol_DB_LIB=-ldb4
18609         ol_LIBS=$LIBS
18610         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18611
18612         cat > conftest.$ac_ext <<EOF
18613 #line 18614 "configure"
18614 #include "confdefs.h"
18615
18616 #ifdef HAVE_DB_185_H
18617 # include <db_185.h>
18618 #else
18619 # include <db.h>
18620 #endif
18621
18622 #ifndef DB_VERSION_MAJOR
18623 # define DB_VERSION_MAJOR 1
18624 #endif
18625
18626 #ifndef NULL
18627 #define NULL ((void*)0)
18628 #endif
18629
18630 int main() {
18631
18632 #if DB_VERSION_MAJOR > 1
18633         {
18634                 char *version;
18635                 int major, minor, patch;
18636
18637                 version = db_version( &major, &minor, &patch );
18638
18639                 if( major != DB_VERSION_MAJOR ||
18640                         minor < DB_VERSION_MINOR )
18641                 {
18642                         printf("Berkeley DB version mismatch\n"
18643                                 "\texpected: %s\n\tgot: %s\n",
18644                                 DB_VERSION_STRING, version);
18645                         return 1;
18646                 }
18647         }
18648 #endif
18649
18650 #if DB_VERSION_MAJOR > 2
18651         db_env_create( NULL, 0 );
18652 #elif DB_VERSION_MAJOR > 1
18653         db_appexit( NULL );
18654 #else
18655         (void) dbopen( NULL, 0, 0, 0, NULL);
18656 #endif
18657
18658 ; return 0; }
18659 EOF
18660 if { (eval echo configure:18661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18661   rm -rf conftest*
18662   ol_cv_db_db4=yes
18663 else
18664   echo "configure: failed program was:" >&5
18665   cat conftest.$ac_ext >&5
18666   rm -rf conftest*
18667   ol_cv_db_db4=no
18668 fi
18669 rm -f conftest*
18670
18671         LIBS="$ol_LIBS"
18672
18673 fi
18674
18675 echo "$ac_t""$ol_cv_db_db4" 1>&6
18676
18677         if test $ol_cv_db_db4 = yes ; then
18678                 ol_cv_lib_db=-ldb4
18679         fi
18680 fi
18681
18682 if test $ol_cv_lib_db = no ; then
18683         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18684 echo "configure:18685: checking for Berkeley DB link (-ldb)" >&5
18685 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18686   echo $ac_n "(cached) $ac_c" 1>&6
18687 else
18688   
18689         ol_DB_LIB=-ldb
18690         ol_LIBS=$LIBS
18691         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18692
18693         cat > conftest.$ac_ext <<EOF
18694 #line 18695 "configure"
18695 #include "confdefs.h"
18696
18697 #ifdef HAVE_DB_185_H
18698 # include <db_185.h>
18699 #else
18700 # include <db.h>
18701 #endif
18702
18703 #ifndef DB_VERSION_MAJOR
18704 # define DB_VERSION_MAJOR 1
18705 #endif
18706
18707 #ifndef NULL
18708 #define NULL ((void*)0)
18709 #endif
18710
18711 int main() {
18712
18713 #if DB_VERSION_MAJOR > 1
18714         {
18715                 char *version;
18716                 int major, minor, patch;
18717
18718                 version = db_version( &major, &minor, &patch );
18719
18720                 if( major != DB_VERSION_MAJOR ||
18721                         minor < DB_VERSION_MINOR )
18722                 {
18723                         printf("Berkeley DB version mismatch\n"
18724                                 "\texpected: %s\n\tgot: %s\n",
18725                                 DB_VERSION_STRING, version);
18726                         return 1;
18727                 }
18728         }
18729 #endif
18730
18731 #if DB_VERSION_MAJOR > 2
18732         db_env_create( NULL, 0 );
18733 #elif DB_VERSION_MAJOR > 1
18734         db_appexit( NULL );
18735 #else
18736         (void) dbopen( NULL, 0, 0, 0, NULL);
18737 #endif
18738
18739 ; return 0; }
18740 EOF
18741 if { (eval echo configure:18742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18742   rm -rf conftest*
18743   ol_cv_db_db=yes
18744 else
18745   echo "configure: failed program was:" >&5
18746   cat conftest.$ac_ext >&5
18747   rm -rf conftest*
18748   ol_cv_db_db=no
18749 fi
18750 rm -f conftest*
18751
18752         LIBS="$ol_LIBS"
18753
18754 fi
18755
18756 echo "$ac_t""$ol_cv_db_db" 1>&6
18757
18758         if test $ol_cv_db_db = yes ; then
18759                 ol_cv_lib_db=-ldb
18760         fi
18761 fi
18762
18763 if test $ol_cv_lib_db = no ; then
18764         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18765 echo "configure:18766: checking for Berkeley DB link (-ldb41)" >&5
18766 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18767   echo $ac_n "(cached) $ac_c" 1>&6
18768 else
18769   
18770         ol_DB_LIB=-ldb41
18771         ol_LIBS=$LIBS
18772         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18773
18774         cat > conftest.$ac_ext <<EOF
18775 #line 18776 "configure"
18776 #include "confdefs.h"
18777
18778 #ifdef HAVE_DB_185_H
18779 # include <db_185.h>
18780 #else
18781 # include <db.h>
18782 #endif
18783
18784 #ifndef DB_VERSION_MAJOR
18785 # define DB_VERSION_MAJOR 1
18786 #endif
18787
18788 #ifndef NULL
18789 #define NULL ((void*)0)
18790 #endif
18791
18792 int main() {
18793
18794 #if DB_VERSION_MAJOR > 1
18795         {
18796                 char *version;
18797                 int major, minor, patch;
18798
18799                 version = db_version( &major, &minor, &patch );
18800
18801                 if( major != DB_VERSION_MAJOR ||
18802                         minor < DB_VERSION_MINOR )
18803                 {
18804                         printf("Berkeley DB version mismatch\n"
18805                                 "\texpected: %s\n\tgot: %s\n",
18806                                 DB_VERSION_STRING, version);
18807                         return 1;
18808                 }
18809         }
18810 #endif
18811
18812 #if DB_VERSION_MAJOR > 2
18813         db_env_create( NULL, 0 );
18814 #elif DB_VERSION_MAJOR > 1
18815         db_appexit( NULL );
18816 #else
18817         (void) dbopen( NULL, 0, 0, 0, NULL);
18818 #endif
18819
18820 ; return 0; }
18821 EOF
18822 if { (eval echo configure:18823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18823   rm -rf conftest*
18824   ol_cv_db_db41=yes
18825 else
18826   echo "configure: failed program was:" >&5
18827   cat conftest.$ac_ext >&5
18828   rm -rf conftest*
18829   ol_cv_db_db41=no
18830 fi
18831 rm -f conftest*
18832
18833         LIBS="$ol_LIBS"
18834
18835 fi
18836
18837 echo "$ac_t""$ol_cv_db_db41" 1>&6
18838
18839         if test $ol_cv_db_db41 = yes ; then
18840                 ol_cv_lib_db=-ldb41
18841         fi
18842 fi
18843
18844 if test $ol_cv_lib_db = no ; then
18845         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18846 echo "configure:18847: checking for Berkeley DB link (-ldb-41)" >&5
18847 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18848   echo $ac_n "(cached) $ac_c" 1>&6
18849 else
18850   
18851         ol_DB_LIB=-ldb-41
18852         ol_LIBS=$LIBS
18853         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18854
18855         cat > conftest.$ac_ext <<EOF
18856 #line 18857 "configure"
18857 #include "confdefs.h"
18858
18859 #ifdef HAVE_DB_185_H
18860 # include <db_185.h>
18861 #else
18862 # include <db.h>
18863 #endif
18864
18865 #ifndef DB_VERSION_MAJOR
18866 # define DB_VERSION_MAJOR 1
18867 #endif
18868
18869 #ifndef NULL
18870 #define NULL ((void*)0)
18871 #endif
18872
18873 int main() {
18874
18875 #if DB_VERSION_MAJOR > 1
18876         {
18877                 char *version;
18878                 int major, minor, patch;
18879
18880                 version = db_version( &major, &minor, &patch );
18881
18882                 if( major != DB_VERSION_MAJOR ||
18883                         minor < DB_VERSION_MINOR )
18884                 {
18885                         printf("Berkeley DB version mismatch\n"
18886                                 "\texpected: %s\n\tgot: %s\n",
18887                                 DB_VERSION_STRING, version);
18888                         return 1;
18889                 }
18890         }
18891 #endif
18892
18893 #if DB_VERSION_MAJOR > 2
18894         db_env_create( NULL, 0 );
18895 #elif DB_VERSION_MAJOR > 1
18896         db_appexit( NULL );
18897 #else
18898         (void) dbopen( NULL, 0, 0, 0, NULL);
18899 #endif
18900
18901 ; return 0; }
18902 EOF
18903 if { (eval echo configure:18904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18904   rm -rf conftest*
18905   ol_cv_db_db_41=yes
18906 else
18907   echo "configure: failed program was:" >&5
18908   cat conftest.$ac_ext >&5
18909   rm -rf conftest*
18910   ol_cv_db_db_41=no
18911 fi
18912 rm -f conftest*
18913
18914         LIBS="$ol_LIBS"
18915
18916 fi
18917
18918 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18919
18920         if test $ol_cv_db_db_41 = yes ; then
18921                 ol_cv_lib_db=-ldb-41
18922         fi
18923 fi
18924
18925 if test $ol_cv_lib_db = no ; then
18926         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18927 echo "configure:18928: checking for Berkeley DB link (-ldb-4.1)" >&5
18928 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18929   echo $ac_n "(cached) $ac_c" 1>&6
18930 else
18931   
18932         ol_DB_LIB=-ldb-4.1
18933         ol_LIBS=$LIBS
18934         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18935
18936         cat > conftest.$ac_ext <<EOF
18937 #line 18938 "configure"
18938 #include "confdefs.h"
18939
18940 #ifdef HAVE_DB_185_H
18941 # include <db_185.h>
18942 #else
18943 # include <db.h>
18944 #endif
18945
18946 #ifndef DB_VERSION_MAJOR
18947 # define DB_VERSION_MAJOR 1
18948 #endif
18949
18950 #ifndef NULL
18951 #define NULL ((void*)0)
18952 #endif
18953
18954 int main() {
18955
18956 #if DB_VERSION_MAJOR > 1
18957         {
18958                 char *version;
18959                 int major, minor, patch;
18960
18961                 version = db_version( &major, &minor, &patch );
18962
18963                 if( major != DB_VERSION_MAJOR ||
18964                         minor < DB_VERSION_MINOR )
18965                 {
18966                         printf("Berkeley DB version mismatch\n"
18967                                 "\texpected: %s\n\tgot: %s\n",
18968                                 DB_VERSION_STRING, version);
18969                         return 1;
18970                 }
18971         }
18972 #endif
18973
18974 #if DB_VERSION_MAJOR > 2
18975         db_env_create( NULL, 0 );
18976 #elif DB_VERSION_MAJOR > 1
18977         db_appexit( NULL );
18978 #else
18979         (void) dbopen( NULL, 0, 0, 0, NULL);
18980 #endif
18981
18982 ; return 0; }
18983 EOF
18984 if { (eval echo configure:18985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18985   rm -rf conftest*
18986   ol_cv_db_db_4_dot_1=yes
18987 else
18988   echo "configure: failed program was:" >&5
18989   cat conftest.$ac_ext >&5
18990   rm -rf conftest*
18991   ol_cv_db_db_4_dot_1=no
18992 fi
18993 rm -f conftest*
18994
18995         LIBS="$ol_LIBS"
18996
18997 fi
18998
18999 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19000
19001         if test $ol_cv_db_db_4_dot_1 = yes ; then
19002                 ol_cv_lib_db=-ldb-4.1
19003         fi
19004 fi
19005
19006 if test $ol_cv_lib_db = no ; then
19007         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19008 echo "configure:19009: checking for Berkeley DB link (-ldb-4-1)" >&5
19009 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19010   echo $ac_n "(cached) $ac_c" 1>&6
19011 else
19012   
19013         ol_DB_LIB=-ldb-4-1
19014         ol_LIBS=$LIBS
19015         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19016
19017         cat > conftest.$ac_ext <<EOF
19018 #line 19019 "configure"
19019 #include "confdefs.h"
19020
19021 #ifdef HAVE_DB_185_H
19022 # include <db_185.h>
19023 #else
19024 # include <db.h>
19025 #endif
19026
19027 #ifndef DB_VERSION_MAJOR
19028 # define DB_VERSION_MAJOR 1
19029 #endif
19030
19031 #ifndef NULL
19032 #define NULL ((void*)0)
19033 #endif
19034
19035 int main() {
19036
19037 #if DB_VERSION_MAJOR > 1
19038         {
19039                 char *version;
19040                 int major, minor, patch;
19041
19042                 version = db_version( &major, &minor, &patch );
19043
19044                 if( major != DB_VERSION_MAJOR ||
19045                         minor < DB_VERSION_MINOR )
19046                 {
19047                         printf("Berkeley DB version mismatch\n"
19048                                 "\texpected: %s\n\tgot: %s\n",
19049                                 DB_VERSION_STRING, version);
19050                         return 1;
19051                 }
19052         }
19053 #endif
19054
19055 #if DB_VERSION_MAJOR > 2
19056         db_env_create( NULL, 0 );
19057 #elif DB_VERSION_MAJOR > 1
19058         db_appexit( NULL );
19059 #else
19060         (void) dbopen( NULL, 0, 0, 0, NULL);
19061 #endif
19062
19063 ; return 0; }
19064 EOF
19065 if { (eval echo configure:19066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19066   rm -rf conftest*
19067   ol_cv_db_db_4_1=yes
19068 else
19069   echo "configure: failed program was:" >&5
19070   cat conftest.$ac_ext >&5
19071   rm -rf conftest*
19072   ol_cv_db_db_4_1=no
19073 fi
19074 rm -f conftest*
19075
19076         LIBS="$ol_LIBS"
19077
19078 fi
19079
19080 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19081
19082         if test $ol_cv_db_db_4_1 = yes ; then
19083                 ol_cv_lib_db=-ldb-4-1
19084         fi
19085 fi
19086
19087 if test $ol_cv_lib_db = no ; then
19088         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19089 echo "configure:19090: checking for Berkeley DB link (-ldb3)" >&5
19090 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19091   echo $ac_n "(cached) $ac_c" 1>&6
19092 else
19093   
19094         ol_DB_LIB=-ldb3
19095         ol_LIBS=$LIBS
19096         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19097
19098         cat > conftest.$ac_ext <<EOF
19099 #line 19100 "configure"
19100 #include "confdefs.h"
19101
19102 #ifdef HAVE_DB_185_H
19103 # include <db_185.h>
19104 #else
19105 # include <db.h>
19106 #endif
19107
19108 #ifndef DB_VERSION_MAJOR
19109 # define DB_VERSION_MAJOR 1
19110 #endif
19111
19112 #ifndef NULL
19113 #define NULL ((void*)0)
19114 #endif
19115
19116 int main() {
19117
19118 #if DB_VERSION_MAJOR > 1
19119         {
19120                 char *version;
19121                 int major, minor, patch;
19122
19123                 version = db_version( &major, &minor, &patch );
19124
19125                 if( major != DB_VERSION_MAJOR ||
19126                         minor < DB_VERSION_MINOR )
19127                 {
19128                         printf("Berkeley DB version mismatch\n"
19129                                 "\texpected: %s\n\tgot: %s\n",
19130                                 DB_VERSION_STRING, version);
19131                         return 1;
19132                 }
19133         }
19134 #endif
19135
19136 #if DB_VERSION_MAJOR > 2
19137         db_env_create( NULL, 0 );
19138 #elif DB_VERSION_MAJOR > 1
19139         db_appexit( NULL );
19140 #else
19141         (void) dbopen( NULL, 0, 0, 0, NULL);
19142 #endif
19143
19144 ; return 0; }
19145 EOF
19146 if { (eval echo configure:19147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19147   rm -rf conftest*
19148   ol_cv_db_db3=yes
19149 else
19150   echo "configure: failed program was:" >&5
19151   cat conftest.$ac_ext >&5
19152   rm -rf conftest*
19153   ol_cv_db_db3=no
19154 fi
19155 rm -f conftest*
19156
19157         LIBS="$ol_LIBS"
19158
19159 fi
19160
19161 echo "$ac_t""$ol_cv_db_db3" 1>&6
19162
19163         if test $ol_cv_db_db3 = yes ; then
19164                 ol_cv_lib_db=-ldb3
19165         fi
19166 fi
19167
19168 if test $ol_cv_lib_db = no ; then
19169         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19170 echo "configure:19171: checking for Berkeley DB link (-ldb-3)" >&5
19171 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19172   echo $ac_n "(cached) $ac_c" 1>&6
19173 else
19174   
19175         ol_DB_LIB=-ldb-3
19176         ol_LIBS=$LIBS
19177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19178
19179         cat > conftest.$ac_ext <<EOF
19180 #line 19181 "configure"
19181 #include "confdefs.h"
19182
19183 #ifdef HAVE_DB_185_H
19184 # include <db_185.h>
19185 #else
19186 # include <db.h>
19187 #endif
19188
19189 #ifndef DB_VERSION_MAJOR
19190 # define DB_VERSION_MAJOR 1
19191 #endif
19192
19193 #ifndef NULL
19194 #define NULL ((void*)0)
19195 #endif
19196
19197 int main() {
19198
19199 #if DB_VERSION_MAJOR > 1
19200         {
19201                 char *version;
19202                 int major, minor, patch;
19203
19204                 version = db_version( &major, &minor, &patch );
19205
19206                 if( major != DB_VERSION_MAJOR ||
19207                         minor < DB_VERSION_MINOR )
19208                 {
19209                         printf("Berkeley DB version mismatch\n"
19210                                 "\texpected: %s\n\tgot: %s\n",
19211                                 DB_VERSION_STRING, version);
19212                         return 1;
19213                 }
19214         }
19215 #endif
19216
19217 #if DB_VERSION_MAJOR > 2
19218         db_env_create( NULL, 0 );
19219 #elif DB_VERSION_MAJOR > 1
19220         db_appexit( NULL );
19221 #else
19222         (void) dbopen( NULL, 0, 0, 0, NULL);
19223 #endif
19224
19225 ; return 0; }
19226 EOF
19227 if { (eval echo configure:19228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19228   rm -rf conftest*
19229   ol_cv_db_db_3=yes
19230 else
19231   echo "configure: failed program was:" >&5
19232   cat conftest.$ac_ext >&5
19233   rm -rf conftest*
19234   ol_cv_db_db_3=no
19235 fi
19236 rm -f conftest*
19237
19238         LIBS="$ol_LIBS"
19239
19240 fi
19241
19242 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19243
19244         if test $ol_cv_db_db_3 = yes ; then
19245                 ol_cv_lib_db=-ldb-3
19246         fi
19247 fi
19248
19249 if test $ol_cv_lib_db = no ; then
19250         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19251 echo "configure:19252: checking for Berkeley DB link (-ldb2)" >&5
19252 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19253   echo $ac_n "(cached) $ac_c" 1>&6
19254 else
19255   
19256         ol_DB_LIB=-ldb2
19257         ol_LIBS=$LIBS
19258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19259
19260         cat > conftest.$ac_ext <<EOF
19261 #line 19262 "configure"
19262 #include "confdefs.h"
19263
19264 #ifdef HAVE_DB_185_H
19265 # include <db_185.h>
19266 #else
19267 # include <db.h>
19268 #endif
19269
19270 #ifndef DB_VERSION_MAJOR
19271 # define DB_VERSION_MAJOR 1
19272 #endif
19273
19274 #ifndef NULL
19275 #define NULL ((void*)0)
19276 #endif
19277
19278 int main() {
19279
19280 #if DB_VERSION_MAJOR > 1
19281         {
19282                 char *version;
19283                 int major, minor, patch;
19284
19285                 version = db_version( &major, &minor, &patch );
19286
19287                 if( major != DB_VERSION_MAJOR ||
19288                         minor < DB_VERSION_MINOR )
19289                 {
19290                         printf("Berkeley DB version mismatch\n"
19291                                 "\texpected: %s\n\tgot: %s\n",
19292                                 DB_VERSION_STRING, version);
19293                         return 1;
19294                 }
19295         }
19296 #endif
19297
19298 #if DB_VERSION_MAJOR > 2
19299         db_env_create( NULL, 0 );
19300 #elif DB_VERSION_MAJOR > 1
19301         db_appexit( NULL );
19302 #else
19303         (void) dbopen( NULL, 0, 0, 0, NULL);
19304 #endif
19305
19306 ; return 0; }
19307 EOF
19308 if { (eval echo configure:19309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19309   rm -rf conftest*
19310   ol_cv_db_db2=yes
19311 else
19312   echo "configure: failed program was:" >&5
19313   cat conftest.$ac_ext >&5
19314   rm -rf conftest*
19315   ol_cv_db_db2=no
19316 fi
19317 rm -f conftest*
19318
19319         LIBS="$ol_LIBS"
19320
19321 fi
19322
19323 echo "$ac_t""$ol_cv_db_db2" 1>&6
19324
19325         if test $ol_cv_db_db2 = yes ; then
19326                 ol_cv_lib_db=-ldb2
19327         fi
19328 fi
19329
19330 if test $ol_cv_lib_db = no ; then
19331         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19332 echo "configure:19333: checking for Berkeley DB link (-ldb-2)" >&5
19333 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19334   echo $ac_n "(cached) $ac_c" 1>&6
19335 else
19336   
19337         ol_DB_LIB=-ldb-2
19338         ol_LIBS=$LIBS
19339         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19340
19341         cat > conftest.$ac_ext <<EOF
19342 #line 19343 "configure"
19343 #include "confdefs.h"
19344
19345 #ifdef HAVE_DB_185_H
19346 # include <db_185.h>
19347 #else
19348 # include <db.h>
19349 #endif
19350
19351 #ifndef DB_VERSION_MAJOR
19352 # define DB_VERSION_MAJOR 1
19353 #endif
19354
19355 #ifndef NULL
19356 #define NULL ((void*)0)
19357 #endif
19358
19359 int main() {
19360
19361 #if DB_VERSION_MAJOR > 1
19362         {
19363                 char *version;
19364                 int major, minor, patch;
19365
19366                 version = db_version( &major, &minor, &patch );
19367
19368                 if( major != DB_VERSION_MAJOR ||
19369                         minor < DB_VERSION_MINOR )
19370                 {
19371                         printf("Berkeley DB version mismatch\n"
19372                                 "\texpected: %s\n\tgot: %s\n",
19373                                 DB_VERSION_STRING, version);
19374                         return 1;
19375                 }
19376         }
19377 #endif
19378
19379 #if DB_VERSION_MAJOR > 2
19380         db_env_create( NULL, 0 );
19381 #elif DB_VERSION_MAJOR > 1
19382         db_appexit( NULL );
19383 #else
19384         (void) dbopen( NULL, 0, 0, 0, NULL);
19385 #endif
19386
19387 ; return 0; }
19388 EOF
19389 if { (eval echo configure:19390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19390   rm -rf conftest*
19391   ol_cv_db_db_2=yes
19392 else
19393   echo "configure: failed program was:" >&5
19394   cat conftest.$ac_ext >&5
19395   rm -rf conftest*
19396   ol_cv_db_db_2=no
19397 fi
19398 rm -f conftest*
19399
19400         LIBS="$ol_LIBS"
19401
19402 fi
19403
19404 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19405
19406         if test $ol_cv_db_db_2 = yes ; then
19407                 ol_cv_lib_db=-ldb-2
19408         fi
19409 fi
19410
19411 if test $ol_cv_lib_db = no ; then
19412         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19413 echo "configure:19414: checking for Berkeley DB link (-ldb1)" >&5
19414 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19415   echo $ac_n "(cached) $ac_c" 1>&6
19416 else
19417   
19418         ol_DB_LIB=-ldb1
19419         ol_LIBS=$LIBS
19420         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19421
19422         cat > conftest.$ac_ext <<EOF
19423 #line 19424 "configure"
19424 #include "confdefs.h"
19425
19426 #ifdef HAVE_DB_185_H
19427 # include <db_185.h>
19428 #else
19429 # include <db.h>
19430 #endif
19431
19432 #ifndef DB_VERSION_MAJOR
19433 # define DB_VERSION_MAJOR 1
19434 #endif
19435
19436 #ifndef NULL
19437 #define NULL ((void*)0)
19438 #endif
19439
19440 int main() {
19441
19442 #if DB_VERSION_MAJOR > 1
19443         {
19444                 char *version;
19445                 int major, minor, patch;
19446
19447                 version = db_version( &major, &minor, &patch );
19448
19449                 if( major != DB_VERSION_MAJOR ||
19450                         minor < DB_VERSION_MINOR )
19451                 {
19452                         printf("Berkeley DB version mismatch\n"
19453                                 "\texpected: %s\n\tgot: %s\n",
19454                                 DB_VERSION_STRING, version);
19455                         return 1;
19456                 }
19457         }
19458 #endif
19459
19460 #if DB_VERSION_MAJOR > 2
19461         db_env_create( NULL, 0 );
19462 #elif DB_VERSION_MAJOR > 1
19463         db_appexit( NULL );
19464 #else
19465         (void) dbopen( NULL, 0, 0, 0, NULL);
19466 #endif
19467
19468 ; return 0; }
19469 EOF
19470 if { (eval echo configure:19471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19471   rm -rf conftest*
19472   ol_cv_db_db1=yes
19473 else
19474   echo "configure: failed program was:" >&5
19475   cat conftest.$ac_ext >&5
19476   rm -rf conftest*
19477   ol_cv_db_db1=no
19478 fi
19479 rm -f conftest*
19480
19481         LIBS="$ol_LIBS"
19482
19483 fi
19484
19485 echo "$ac_t""$ol_cv_db_db1" 1>&6
19486
19487         if test $ol_cv_db_db1 = yes ; then
19488                 ol_cv_lib_db=-ldb1
19489         fi
19490 fi
19491
19492 if test $ol_cv_lib_db = no ; then
19493         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19494 echo "configure:19495: checking for Berkeley DB link (-ldb-1)" >&5
19495 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19496   echo $ac_n "(cached) $ac_c" 1>&6
19497 else
19498   
19499         ol_DB_LIB=-ldb-1
19500         ol_LIBS=$LIBS
19501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19502
19503         cat > conftest.$ac_ext <<EOF
19504 #line 19505 "configure"
19505 #include "confdefs.h"
19506
19507 #ifdef HAVE_DB_185_H
19508 # include <db_185.h>
19509 #else
19510 # include <db.h>
19511 #endif
19512
19513 #ifndef DB_VERSION_MAJOR
19514 # define DB_VERSION_MAJOR 1
19515 #endif
19516
19517 #ifndef NULL
19518 #define NULL ((void*)0)
19519 #endif
19520
19521 int main() {
19522
19523 #if DB_VERSION_MAJOR > 1
19524         {
19525                 char *version;
19526                 int major, minor, patch;
19527
19528                 version = db_version( &major, &minor, &patch );
19529
19530                 if( major != DB_VERSION_MAJOR ||
19531                         minor < DB_VERSION_MINOR )
19532                 {
19533                         printf("Berkeley DB version mismatch\n"
19534                                 "\texpected: %s\n\tgot: %s\n",
19535                                 DB_VERSION_STRING, version);
19536                         return 1;
19537                 }
19538         }
19539 #endif
19540
19541 #if DB_VERSION_MAJOR > 2
19542         db_env_create( NULL, 0 );
19543 #elif DB_VERSION_MAJOR > 1
19544         db_appexit( NULL );
19545 #else
19546         (void) dbopen( NULL, 0, 0, 0, NULL);
19547 #endif
19548
19549 ; return 0; }
19550 EOF
19551 if { (eval echo configure:19552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19552   rm -rf conftest*
19553   ol_cv_db_db_1=yes
19554 else
19555   echo "configure: failed program was:" >&5
19556   cat conftest.$ac_ext >&5
19557   rm -rf conftest*
19558   ol_cv_db_db_1=no
19559 fi
19560 rm -f conftest*
19561
19562         LIBS="$ol_LIBS"
19563
19564 fi
19565
19566 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19567
19568         if test $ol_cv_db_db_1 = yes ; then
19569                 ol_cv_lib_db=-ldb-1
19570         fi
19571 fi
19572
19573
19574         if test "$ol_cv_lib_db" != no ; then
19575                 ol_cv_berkeley_db=yes
19576                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19577 echo "configure:19578: checking for Berkeley DB thread support" >&5
19578 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19579   echo $ac_n "(cached) $ac_c" 1>&6
19580 else
19581   
19582         ol_LIBS="$LIBS"
19583         LIBS="$LTHREAD_LIBS $LIBS"
19584         if test $ol_cv_lib_db != yes ; then
19585                 LIBS="$ol_cv_lib_db $LIBS"
19586         fi
19587
19588         if test "$cross_compiling" = yes; then
19589   ol_cv_berkeley_db_thread=cross
19590 else
19591   cat > conftest.$ac_ext <<EOF
19592 #line 19593 "configure"
19593 #include "confdefs.h"
19594
19595 #ifdef HAVE_DB_185_H
19596         choke me;
19597 #else
19598 #include <db.h>
19599 #endif
19600 #ifndef NULL
19601 #define NULL ((void *)0)
19602 #endif
19603 main()
19604 {
19605         int rc;
19606         u_int32_t flags = DB_CREATE |
19607 #ifdef DB_PRIVATE
19608                 DB_PRIVATE |
19609 #endif
19610                 DB_THREAD;
19611
19612 #if DB_VERSION_MAJOR > 2
19613         DB_ENV *env = NULL;
19614
19615         rc = db_env_create( &env, 0 );
19616
19617         flags |= DB_INIT_MPOOL;
19618 #ifdef DB_MPOOL_PRIVATE
19619         flags |= DB_MPOOL_PRIVATE;
19620 #endif
19621
19622         if( rc ) {
19623                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19624                 return rc;
19625         }
19626
19627 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19628         rc = env->open( env, NULL, flags, 0 );
19629 #else
19630         rc = env->open( env, NULL, NULL, flags, 0 );
19631 #endif
19632
19633         if ( rc == 0 ) {
19634                 rc = env->close( env, 0 );
19635         }
19636
19637         if( rc ) {
19638                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19639                 return rc;
19640         }
19641
19642 #else
19643         DB_ENV env;
19644         memset( &env, '\0', sizeof(env) );
19645
19646         rc = db_appinit( NULL, NULL, &env, flags );
19647
19648         if( rc == 0 ) {
19649                 db_appexit( &env );
19650         }
19651
19652         unlink("__db_mpool.share");
19653         unlink("__db_lock.share");
19654 #endif
19655
19656         return rc;
19657 }
19658 EOF
19659 if { (eval echo configure:19660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19660 then
19661   ol_cv_berkeley_db_thread=yes
19662 else
19663   echo "configure: failed program was:" >&5
19664   cat conftest.$ac_ext >&5
19665   rm -fr conftest*
19666   ol_cv_berkeley_db_thread=no
19667 fi
19668 rm -fr conftest*
19669 fi
19670
19671
19672         LIBS="$ol_LIBS"
19673
19674 fi
19675
19676 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19677
19678         if test $ol_cv_berkeley_db_thread != no ; then
19679                 cat >> confdefs.h <<\EOF
19680 #define HAVE_BERKELEY_DB_THREAD 1
19681 EOF
19682
19683         fi
19684
19685         fi
19686 fi
19687
19688         fi
19689
19690         if test $ol_cv_berkeley_db != no ; then
19691                 cat >> confdefs.h <<\EOF
19692 #define HAVE_BERKELEY_DB 1
19693 EOF
19694
19695
19696                 ol_link_ldbm=berkeley
19697                 ol_with_ldbm_api=berkeley
19698
19699                 if test $ol_with_ldbm_type = hash ; then
19700                         cat >> confdefs.h <<\EOF
19701 #define LDBM_USE_DBHASH 1
19702 EOF
19703
19704                 else
19705                         cat >> confdefs.h <<\EOF
19706 #define LDBM_USE_DBBTREE 1
19707 EOF
19708
19709                 fi
19710
19711                                                 if test $ol_cv_lib_db != yes ; then
19712                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19713                 fi
19714         fi
19715 fi
19716
19717 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19718         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19719 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19720         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19721 echo "configure:19722: checking Berkeley DB version for BDB backend" >&5
19722 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19723   echo $ac_n "(cached) $ac_c" 1>&6
19724 else
19725   
19726         cat > conftest.$ac_ext <<EOF
19727 #line 19728 "configure"
19728 #include "confdefs.h"
19729
19730 #include <db.h>
19731
19732  /* this check could be improved */
19733 #ifndef DB_VERSION_MAJOR
19734 #       define DB_VERSION_MAJOR 1
19735 #endif
19736 #ifndef DB_VERSION_MINOR
19737 #       define DB_VERSION_MINOR 0
19738 #endif
19739
19740 /* require 4.2 or later */
19741 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19742         __db_version_compat
19743 #endif
19744         
19745 EOF
19746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19747   egrep "__db_version_compat" >/dev/null 2>&1; then
19748   rm -rf conftest*
19749   ol_cv_bdb_compat=yes
19750 else
19751   rm -rf conftest*
19752   ol_cv_bdb_compat=no
19753 fi
19754 rm -f conftest*
19755
19756 fi
19757
19758 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19759
19760
19761         if test $ol_cv_bdb_compat = yes ; then
19762                 ol_enable_bdb=yes
19763         elif test $ol_enable_bdb = yes ; then
19764                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19765         else
19766                 ol_enable_bdb=no
19767         fi
19768 fi
19769 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19770         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19771 fi
19772
19773 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19774         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19775         ol_with_ldbm_api=none
19776 fi
19777
19778 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19779         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19780 echo "configure:19781: checking for MDBM library" >&5
19781 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19782   echo $ac_n "(cached) $ac_c" 1>&6
19783 else
19784         ol_LIBS="$LIBS"
19785         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19786 echo "configure:19787: checking for mdbm_set_chain" >&5
19787 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19788   echo $ac_n "(cached) $ac_c" 1>&6
19789 else
19790   cat > conftest.$ac_ext <<EOF
19791 #line 19792 "configure"
19792 #include "confdefs.h"
19793 /* System header to define __stub macros and hopefully few prototypes,
19794     which can conflict with char mdbm_set_chain(); below.  */
19795 #include <assert.h>
19796 /* Override any gcc2 internal prototype to avoid an error.  */
19797 /* We use char because int might match the return type of a gcc2
19798     builtin and then its argument prototype would still apply.  */
19799 char mdbm_set_chain();
19800 char (*f)();
19801
19802 int main() {
19803
19804 /* The GNU C library defines this for functions which it implements
19805     to always fail with ENOSYS.  Some functions are actually named
19806     something starting with __ and the normal name is an alias.  */
19807 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19808 choke me
19809 #else
19810 f = mdbm_set_chain;
19811 #endif
19812
19813 ; return 0; }
19814 EOF
19815 if { (eval echo configure:19816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19816   rm -rf conftest*
19817   eval "ac_cv_func_mdbm_set_chain=yes"
19818 else
19819   echo "configure: failed program was:" >&5
19820   cat conftest.$ac_ext >&5
19821   rm -rf conftest*
19822   eval "ac_cv_func_mdbm_set_chain=no"
19823 fi
19824 rm -f conftest*
19825 fi
19826
19827 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19828   echo "$ac_t""yes" 1>&6
19829   ol_cv_lib_mdbm=yes
19830 else
19831   echo "$ac_t""no" 1>&6
19832
19833                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19834 echo "configure:19835: checking for mdbm_set_chain in -lmdbm" >&5
19835 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19836 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19837   echo $ac_n "(cached) $ac_c" 1>&6
19838 else
19839   ac_save_LIBS="$LIBS"
19840 LIBS="-lmdbm  $LIBS"
19841 cat > conftest.$ac_ext <<EOF
19842 #line 19843 "configure"
19843 #include "confdefs.h"
19844 /* Override any gcc2 internal prototype to avoid an error.  */
19845 /* We use char because int might match the return type of a gcc2
19846     builtin and then its argument prototype would still apply.  */
19847 char mdbm_set_chain();
19848
19849 int main() {
19850 mdbm_set_chain()
19851 ; return 0; }
19852 EOF
19853 if { (eval echo configure:19854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19854   rm -rf conftest*
19855   eval "ac_cv_lib_$ac_lib_var=yes"
19856 else
19857   echo "configure: failed program was:" >&5
19858   cat conftest.$ac_ext >&5
19859   rm -rf conftest*
19860   eval "ac_cv_lib_$ac_lib_var=no"
19861 fi
19862 rm -f conftest*
19863 LIBS="$ac_save_LIBS"
19864
19865 fi
19866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19867   echo "$ac_t""yes" 1>&6
19868   ol_cv_lib_mdbm=-lmdbm
19869 else
19870   echo "$ac_t""no" 1>&6
19871 ol_cv_lib_mdbm=no
19872 fi
19873
19874         
19875 fi
19876
19877         LIBS="$ol_LIBS"
19878
19879 fi
19880
19881 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19882
19883
19884  for ac_hdr in mdbm.h
19885 do
19886 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19887 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19888 echo "configure:19889: checking for $ac_hdr" >&5
19889 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19890   echo $ac_n "(cached) $ac_c" 1>&6
19891 else
19892   cat > conftest.$ac_ext <<EOF
19893 #line 19894 "configure"
19894 #include "confdefs.h"
19895 #include <$ac_hdr>
19896 EOF
19897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19898 { (eval echo configure:19899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19900 if test -z "$ac_err"; then
19901   rm -rf conftest*
19902   eval "ac_cv_header_$ac_safe=yes"
19903 else
19904   echo "$ac_err" >&5
19905   echo "configure: failed program was:" >&5
19906   cat conftest.$ac_ext >&5
19907   rm -rf conftest*
19908   eval "ac_cv_header_$ac_safe=no"
19909 fi
19910 rm -f conftest*
19911 fi
19912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19913   echo "$ac_t""yes" 1>&6
19914     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19915   cat >> confdefs.h <<EOF
19916 #define $ac_tr_hdr 1
19917 EOF
19918  
19919 else
19920   echo "$ac_t""no" 1>&6
19921 fi
19922 done
19923
19924  echo $ac_n "checking for db""... $ac_c" 1>&6
19925 echo "configure:19926: checking for db" >&5
19926 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19927   echo $ac_n "(cached) $ac_c" 1>&6
19928 else
19929   
19930         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19931                 ol_cv_mdbm=no
19932         else
19933                 ol_cv_mdbm=yes
19934         fi
19935
19936 fi
19937
19938 echo "$ac_t""$ol_cv_mdbm" 1>&6
19939  if test $ol_cv_mdbm = yes ; then
19940         cat >> confdefs.h <<\EOF
19941 #define HAVE_MDBM 1
19942 EOF
19943
19944  fi
19945
19946
19947         if test $ol_cv_mdbm = yes ; then
19948                 ol_link_ldbm=mdbm
19949                 ol_with_ldbm_api=mdbm
19950                 if test $ol_cv_lib_mdbm != yes ; then
19951                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19952                 fi
19953         fi
19954 fi
19955
19956 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19957         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19958 echo "configure:19959: checking for GDBM library" >&5
19959 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19960   echo $ac_n "(cached) $ac_c" 1>&6
19961 else
19962         ol_LIBS="$LIBS"
19963         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19964 echo "configure:19965: checking for gdbm_open" >&5
19965 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19966   echo $ac_n "(cached) $ac_c" 1>&6
19967 else
19968   cat > conftest.$ac_ext <<EOF
19969 #line 19970 "configure"
19970 #include "confdefs.h"
19971 /* System header to define __stub macros and hopefully few prototypes,
19972     which can conflict with char gdbm_open(); below.  */
19973 #include <assert.h>
19974 /* Override any gcc2 internal prototype to avoid an error.  */
19975 /* We use char because int might match the return type of a gcc2
19976     builtin and then its argument prototype would still apply.  */
19977 char gdbm_open();
19978 char (*f)();
19979
19980 int main() {
19981
19982 /* The GNU C library defines this for functions which it implements
19983     to always fail with ENOSYS.  Some functions are actually named
19984     something starting with __ and the normal name is an alias.  */
19985 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19986 choke me
19987 #else
19988 f = gdbm_open;
19989 #endif
19990
19991 ; return 0; }
19992 EOF
19993 if { (eval echo configure:19994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19994   rm -rf conftest*
19995   eval "ac_cv_func_gdbm_open=yes"
19996 else
19997   echo "configure: failed program was:" >&5
19998   cat conftest.$ac_ext >&5
19999   rm -rf conftest*
20000   eval "ac_cv_func_gdbm_open=no"
20001 fi
20002 rm -f conftest*
20003 fi
20004
20005 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20006   echo "$ac_t""yes" 1>&6
20007   ol_cv_lib_gdbm=yes
20008 else
20009   echo "$ac_t""no" 1>&6
20010
20011                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20012 echo "configure:20013: checking for gdbm_open in -lgdbm" >&5
20013 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20015   echo $ac_n "(cached) $ac_c" 1>&6
20016 else
20017   ac_save_LIBS="$LIBS"
20018 LIBS="-lgdbm  $LIBS"
20019 cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022 /* Override any gcc2 internal prototype to avoid an error.  */
20023 /* We use char because int might match the return type of a gcc2
20024     builtin and then its argument prototype would still apply.  */
20025 char gdbm_open();
20026
20027 int main() {
20028 gdbm_open()
20029 ; return 0; }
20030 EOF
20031 if { (eval echo configure:20032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20032   rm -rf conftest*
20033   eval "ac_cv_lib_$ac_lib_var=yes"
20034 else
20035   echo "configure: failed program was:" >&5
20036   cat conftest.$ac_ext >&5
20037   rm -rf conftest*
20038   eval "ac_cv_lib_$ac_lib_var=no"
20039 fi
20040 rm -f conftest*
20041 LIBS="$ac_save_LIBS"
20042
20043 fi
20044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20045   echo "$ac_t""yes" 1>&6
20046   ol_cv_lib_gdbm=-lgdbm
20047 else
20048   echo "$ac_t""no" 1>&6
20049 ol_cv_lib_gdbm=no
20050 fi
20051
20052         
20053 fi
20054
20055         LIBS="$ol_LIBS"
20056
20057 fi
20058
20059 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20060
20061
20062  for ac_hdr in gdbm.h
20063 do
20064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20066 echo "configure:20067: checking for $ac_hdr" >&5
20067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20068   echo $ac_n "(cached) $ac_c" 1>&6
20069 else
20070   cat > conftest.$ac_ext <<EOF
20071 #line 20072 "configure"
20072 #include "confdefs.h"
20073 #include <$ac_hdr>
20074 EOF
20075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20076 { (eval echo configure:20077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20078 if test -z "$ac_err"; then
20079   rm -rf conftest*
20080   eval "ac_cv_header_$ac_safe=yes"
20081 else
20082   echo "$ac_err" >&5
20083   echo "configure: failed program was:" >&5
20084   cat conftest.$ac_ext >&5
20085   rm -rf conftest*
20086   eval "ac_cv_header_$ac_safe=no"
20087 fi
20088 rm -f conftest*
20089 fi
20090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20091   echo "$ac_t""yes" 1>&6
20092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20093   cat >> confdefs.h <<EOF
20094 #define $ac_tr_hdr 1
20095 EOF
20096  
20097 else
20098   echo "$ac_t""no" 1>&6
20099 fi
20100 done
20101
20102  echo $ac_n "checking for db""... $ac_c" 1>&6
20103 echo "configure:20104: checking for db" >&5
20104 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20105   echo $ac_n "(cached) $ac_c" 1>&6
20106 else
20107   
20108         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20109                 ol_cv_gdbm=no
20110         else
20111                 ol_cv_gdbm=yes
20112         fi
20113
20114 fi
20115
20116 echo "$ac_t""$ol_cv_gdbm" 1>&6
20117  if test $ol_cv_gdbm = yes ; then
20118         cat >> confdefs.h <<\EOF
20119 #define HAVE_GDBM 1
20120 EOF
20121
20122  fi
20123
20124
20125         if test $ol_cv_gdbm = yes ; then
20126                 ol_link_ldbm=gdbm
20127                 ol_with_ldbm_api=gdbm
20128
20129                 if test $ol_cv_lib_gdbm != yes ; then
20130                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20131                 fi
20132         fi
20133 fi
20134
20135 if test $ol_with_ldbm_api = ndbm ; then
20136         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20137 echo "configure:20138: checking for NDBM library" >&5
20138 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20139   echo $ac_n "(cached) $ac_c" 1>&6
20140 else
20141         ol_LIBS="$LIBS"
20142         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20143 echo "configure:20144: checking for dbm_open" >&5
20144 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20145   echo $ac_n "(cached) $ac_c" 1>&6
20146 else
20147   cat > conftest.$ac_ext <<EOF
20148 #line 20149 "configure"
20149 #include "confdefs.h"
20150 /* System header to define __stub macros and hopefully few prototypes,
20151     which can conflict with char dbm_open(); below.  */
20152 #include <assert.h>
20153 /* Override any gcc2 internal prototype to avoid an error.  */
20154 /* We use char because int might match the return type of a gcc2
20155     builtin and then its argument prototype would still apply.  */
20156 char dbm_open();
20157 char (*f)();
20158
20159 int main() {
20160
20161 /* The GNU C library defines this for functions which it implements
20162     to always fail with ENOSYS.  Some functions are actually named
20163     something starting with __ and the normal name is an alias.  */
20164 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20165 choke me
20166 #else
20167 f = dbm_open;
20168 #endif
20169
20170 ; return 0; }
20171 EOF
20172 if { (eval echo configure:20173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20173   rm -rf conftest*
20174   eval "ac_cv_func_dbm_open=yes"
20175 else
20176   echo "configure: failed program was:" >&5
20177   cat conftest.$ac_ext >&5
20178   rm -rf conftest*
20179   eval "ac_cv_func_dbm_open=no"
20180 fi
20181 rm -f conftest*
20182 fi
20183
20184 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20185   echo "$ac_t""yes" 1>&6
20186   ol_cv_lib_ndbm=yes
20187 else
20188   echo "$ac_t""no" 1>&6
20189
20190                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20191 echo "configure:20192: checking for dbm_open in -lndbm" >&5
20192 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20194   echo $ac_n "(cached) $ac_c" 1>&6
20195 else
20196   ac_save_LIBS="$LIBS"
20197 LIBS="-lndbm  $LIBS"
20198 cat > conftest.$ac_ext <<EOF
20199 #line 20200 "configure"
20200 #include "confdefs.h"
20201 /* Override any gcc2 internal prototype to avoid an error.  */
20202 /* We use char because int might match the return type of a gcc2
20203     builtin and then its argument prototype would still apply.  */
20204 char dbm_open();
20205
20206 int main() {
20207 dbm_open()
20208 ; return 0; }
20209 EOF
20210 if { (eval echo configure:20211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20211   rm -rf conftest*
20212   eval "ac_cv_lib_$ac_lib_var=yes"
20213 else
20214   echo "configure: failed program was:" >&5
20215   cat conftest.$ac_ext >&5
20216   rm -rf conftest*
20217   eval "ac_cv_lib_$ac_lib_var=no"
20218 fi
20219 rm -f conftest*
20220 LIBS="$ac_save_LIBS"
20221
20222 fi
20223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20224   echo "$ac_t""yes" 1>&6
20225   ol_cv_lib_ndbm=-lndbm
20226 else
20227   echo "$ac_t""no" 1>&6
20228
20229                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20230 echo "configure:20231: checking for dbm_open in -ldbm" >&5
20231 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20233   echo $ac_n "(cached) $ac_c" 1>&6
20234 else
20235   ac_save_LIBS="$LIBS"
20236 LIBS="-ldbm  $LIBS"
20237 cat > conftest.$ac_ext <<EOF
20238 #line 20239 "configure"
20239 #include "confdefs.h"
20240 /* Override any gcc2 internal prototype to avoid an error.  */
20241 /* We use char because int might match the return type of a gcc2
20242     builtin and then its argument prototype would still apply.  */
20243 char dbm_open();
20244
20245 int main() {
20246 dbm_open()
20247 ; return 0; }
20248 EOF
20249 if { (eval echo configure:20250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20250   rm -rf conftest*
20251   eval "ac_cv_lib_$ac_lib_var=yes"
20252 else
20253   echo "configure: failed program was:" >&5
20254   cat conftest.$ac_ext >&5
20255   rm -rf conftest*
20256   eval "ac_cv_lib_$ac_lib_var=no"
20257 fi
20258 rm -f conftest*
20259 LIBS="$ac_save_LIBS"
20260
20261 fi
20262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20263   echo "$ac_t""yes" 1>&6
20264   ol_cv_lib_ndbm=-ldbm
20265 else
20266   echo "$ac_t""no" 1>&6
20267 ol_cv_lib_ndbm=no
20268 fi
20269                 
20270 fi
20271
20272         
20273 fi
20274
20275         LIBS="$ol_LIBS"
20276
20277 fi
20278
20279 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20280
20281
20282  for ac_hdr in ndbm.h
20283 do
20284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20286 echo "configure:20287: checking for $ac_hdr" >&5
20287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20288   echo $ac_n "(cached) $ac_c" 1>&6
20289 else
20290   cat > conftest.$ac_ext <<EOF
20291 #line 20292 "configure"
20292 #include "confdefs.h"
20293 #include <$ac_hdr>
20294 EOF
20295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20296 { (eval echo configure:20297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20298 if test -z "$ac_err"; then
20299   rm -rf conftest*
20300   eval "ac_cv_header_$ac_safe=yes"
20301 else
20302   echo "$ac_err" >&5
20303   echo "configure: failed program was:" >&5
20304   cat conftest.$ac_ext >&5
20305   rm -rf conftest*
20306   eval "ac_cv_header_$ac_safe=no"
20307 fi
20308 rm -f conftest*
20309 fi
20310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20311   echo "$ac_t""yes" 1>&6
20312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20313   cat >> confdefs.h <<EOF
20314 #define $ac_tr_hdr 1
20315 EOF
20316  
20317 else
20318   echo "$ac_t""no" 1>&6
20319 fi
20320 done
20321
20322  echo $ac_n "checking for db""... $ac_c" 1>&6
20323 echo "configure:20324: checking for db" >&5
20324 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20325   echo $ac_n "(cached) $ac_c" 1>&6
20326 else
20327   
20328         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20329                 ol_cv_ndbm=no
20330         else
20331                 ol_cv_ndbm=yes
20332         fi
20333
20334 fi
20335
20336 echo "$ac_t""$ol_cv_ndbm" 1>&6
20337  if test $ol_cv_ndbm = yes ; then
20338         cat >> confdefs.h <<\EOF
20339 #define HAVE_NDBM 1
20340 EOF
20341
20342  fi
20343
20344
20345         if test $ol_cv_ndbm = yes ; then
20346                 ol_link_ldbm=ndbm
20347                 ol_with_ldbm_api=ndbm
20348
20349                 if test $ol_cv_lib_ndbm != yes ; then
20350                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20351                 fi
20352         fi
20353 fi
20354
20355 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20356         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20357         if test $ol_enable_ldbm = yes ; then
20358                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20359         fi
20360
20361         echo "configure: warning: disabling LDBM" 1>&2
20362         ol_enable_ldbm=no
20363 fi
20364
20365
20366 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20367         BUILD_LIBS_DYNAMIC=shared
20368         cat >> confdefs.h <<\EOF
20369 #define LDAP_LIBS_DYNAMIC 1
20370 EOF
20371
20372         LTSTATIC=""
20373 else
20374         BUILD_LIBS_DYNAMIC=static
20375         LTSTATIC="-static"
20376 fi
20377
20378 if test $ol_enable_wrappers != no ; then
20379         for ac_hdr in tcpd.h
20380 do
20381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20383 echo "configure:20384: checking for $ac_hdr" >&5
20384 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20385   echo $ac_n "(cached) $ac_c" 1>&6
20386 else
20387   cat > conftest.$ac_ext <<EOF
20388 #line 20389 "configure"
20389 #include "confdefs.h"
20390 #include <$ac_hdr>
20391 EOF
20392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20393 { (eval echo configure:20394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20395 if test -z "$ac_err"; then
20396   rm -rf conftest*
20397   eval "ac_cv_header_$ac_safe=yes"
20398 else
20399   echo "$ac_err" >&5
20400   echo "configure: failed program was:" >&5
20401   cat conftest.$ac_ext >&5
20402   rm -rf conftest*
20403   eval "ac_cv_header_$ac_safe=no"
20404 fi
20405 rm -f conftest*
20406 fi
20407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20408   echo "$ac_t""yes" 1>&6
20409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20410   cat >> confdefs.h <<EOF
20411 #define $ac_tr_hdr 1
20412 EOF
20413  
20414                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20415 echo "configure:20416: checking for TCP wrappers library" >&5
20416                 save_LIBS="$LIBS"
20417                 LIBS="$LIBS -lwrap"
20418                 cat > conftest.$ac_ext <<EOF
20419 #line 20420 "configure"
20420 #include "confdefs.h"
20421
20422 #include <tcpd.h>
20423 int allow_severity = 0;
20424 int deny_severity  = 0;
20425
20426 struct request_info *req;
20427                 
20428 int main() {
20429
20430 hosts_access(req)
20431                 
20432 ; return 0; }
20433 EOF
20434 if { (eval echo configure:20435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20435   rm -rf conftest*
20436   echo "$ac_t""-lwrap" 1>&6
20437                 have_wrappers=yes
20438                 LIBS="$save_LIBS"
20439 else
20440   echo "configure: failed program was:" >&5
20441   cat conftest.$ac_ext >&5
20442   rm -rf conftest*
20443   
20444                                 LIBS="$LIBS -lnsl"
20445                 cat > conftest.$ac_ext <<EOF
20446 #line 20447 "configure"
20447 #include "confdefs.h"
20448
20449 #include <tcpd.h>
20450 int allow_severity = 0;
20451 int deny_severity  = 0;
20452
20453 struct request_info *req;
20454                 
20455 int main() {
20456
20457 hosts_access(req)
20458                 
20459 ; return 0; }
20460 EOF
20461 if { (eval echo configure:20462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20462   rm -rf conftest*
20463   echo "$ac_t""-lwrap -lnsl" 1>&6
20464                 have_wrappers=yes
20465                 LIBS="$save_LIBS -lnsl"
20466 else
20467   echo "configure: failed program was:" >&5
20468   cat conftest.$ac_ext >&5
20469   rm -rf conftest*
20470   
20471                 echo "$ac_t""no" 1>&6
20472                 have_wrappers=no
20473                 LIBS=$save_LIBS
20474 fi
20475 rm -f conftest*
20476 fi
20477 rm -f conftest*
20478 else
20479   echo "$ac_t""no" 1>&6
20480 have_wrappers=no
20481 fi
20482 done
20483
20484
20485         if test $have_wrappers = yes ; then
20486                 cat >> confdefs.h <<\EOF
20487 #define HAVE_TCPD 1
20488 EOF
20489
20490                 WRAP_LIBS="-lwrap"
20491         elif test $ol_enable_wrappers = yes ; then
20492                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20493         else
20494                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20495                 WRAP_LIBS=""
20496         fi
20497 fi
20498
20499 if test $ol_enable_syslog != no ; then
20500         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20501 echo "configure:20502: checking for openlog" >&5
20502 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20503   echo $ac_n "(cached) $ac_c" 1>&6
20504 else
20505   cat > conftest.$ac_ext <<EOF
20506 #line 20507 "configure"
20507 #include "confdefs.h"
20508 /* System header to define __stub macros and hopefully few prototypes,
20509     which can conflict with char openlog(); below.  */
20510 #include <assert.h>
20511 /* Override any gcc2 internal prototype to avoid an error.  */
20512 /* We use char because int might match the return type of a gcc2
20513     builtin and then its argument prototype would still apply.  */
20514 char openlog();
20515 char (*f)();
20516
20517 int main() {
20518
20519 /* The GNU C library defines this for functions which it implements
20520     to always fail with ENOSYS.  Some functions are actually named
20521     something starting with __ and the normal name is an alias.  */
20522 #if defined (__stub_openlog) || defined (__stub___openlog)
20523 choke me
20524 #else
20525 f = openlog;
20526 #endif
20527
20528 ; return 0; }
20529 EOF
20530 if { (eval echo configure:20531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20531   rm -rf conftest*
20532   eval "ac_cv_func_openlog=yes"
20533 else
20534   echo "configure: failed program was:" >&5
20535   cat conftest.$ac_ext >&5
20536   rm -rf conftest*
20537   eval "ac_cv_func_openlog=no"
20538 fi
20539 rm -f conftest*
20540 fi
20541
20542 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20543   echo "$ac_t""yes" 1>&6
20544   :
20545 else
20546   echo "$ac_t""no" 1>&6
20547 fi
20548
20549         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20550                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20551         fi
20552         ol_enable_syslog=$ac_cv_func_openlog
20553 fi
20554
20555
20556 ol_link_sql=no
20557 if test $ol_enable_sql != no ; then
20558         for ac_hdr in sql.h sqlext.h
20559 do
20560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20562 echo "configure:20563: checking for $ac_hdr" >&5
20563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20564   echo $ac_n "(cached) $ac_c" 1>&6
20565 else
20566   cat > conftest.$ac_ext <<EOF
20567 #line 20568 "configure"
20568 #include "confdefs.h"
20569 #include <$ac_hdr>
20570 EOF
20571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20572 { (eval echo configure:20573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20574 if test -z "$ac_err"; then
20575   rm -rf conftest*
20576   eval "ac_cv_header_$ac_safe=yes"
20577 else
20578   echo "$ac_err" >&5
20579   echo "configure: failed program was:" >&5
20580   cat conftest.$ac_ext >&5
20581   rm -rf conftest*
20582   eval "ac_cv_header_$ac_safe=no"
20583 fi
20584 rm -f conftest*
20585 fi
20586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20587   echo "$ac_t""yes" 1>&6
20588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20589   cat >> confdefs.h <<EOF
20590 #define $ac_tr_hdr 1
20591 EOF
20592  
20593 else
20594   echo "$ac_t""no" 1>&6
20595 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20596         
20597 fi
20598 done
20599
20600
20601         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20602 echo "configure:20603: checking for SQLDriverConnect in -liodbc" >&5
20603 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20605   echo $ac_n "(cached) $ac_c" 1>&6
20606 else
20607   ac_save_LIBS="$LIBS"
20608 LIBS="-liodbc  $LIBS"
20609 cat > conftest.$ac_ext <<EOF
20610 #line 20611 "configure"
20611 #include "confdefs.h"
20612 /* Override any gcc2 internal prototype to avoid an error.  */
20613 /* We use char because int might match the return type of a gcc2
20614     builtin and then its argument prototype would still apply.  */
20615 char SQLDriverConnect();
20616
20617 int main() {
20618 SQLDriverConnect()
20619 ; return 0; }
20620 EOF
20621 if { (eval echo configure:20622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20622   rm -rf conftest*
20623   eval "ac_cv_lib_$ac_lib_var=yes"
20624 else
20625   echo "configure: failed program was:" >&5
20626   cat conftest.$ac_ext >&5
20627   rm -rf conftest*
20628   eval "ac_cv_lib_$ac_lib_var=no"
20629 fi
20630 rm -f conftest*
20631 LIBS="$ac_save_LIBS"
20632
20633 fi
20634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20635   echo "$ac_t""yes" 1>&6
20636   have_iodbc=yes
20637 else
20638   echo "$ac_t""no" 1>&6
20639 have_iodbc=no
20640 fi
20641
20642         if test $have_iodbc = yes ; then
20643                 ol_link_sql="-liodbc"
20644         else
20645                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20646 echo "configure:20647: checking for SQLDriverConnect in -lodbc" >&5
20647 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20648 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20649   echo $ac_n "(cached) $ac_c" 1>&6
20650 else
20651   ac_save_LIBS="$LIBS"
20652 LIBS="-lodbc  $LIBS"
20653 cat > conftest.$ac_ext <<EOF
20654 #line 20655 "configure"
20655 #include "confdefs.h"
20656 /* Override any gcc2 internal prototype to avoid an error.  */
20657 /* We use char because int might match the return type of a gcc2
20658     builtin and then its argument prototype would still apply.  */
20659 char SQLDriverConnect();
20660
20661 int main() {
20662 SQLDriverConnect()
20663 ; return 0; }
20664 EOF
20665 if { (eval echo configure:20666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20666   rm -rf conftest*
20667   eval "ac_cv_lib_$ac_lib_var=yes"
20668 else
20669   echo "configure: failed program was:" >&5
20670   cat conftest.$ac_ext >&5
20671   rm -rf conftest*
20672   eval "ac_cv_lib_$ac_lib_var=no"
20673 fi
20674 rm -f conftest*
20675 LIBS="$ac_save_LIBS"
20676
20677 fi
20678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20679   echo "$ac_t""yes" 1>&6
20680   have_odbc=yes
20681 else
20682   echo "$ac_t""no" 1>&6
20683 have_odbc=no
20684 fi
20685
20686                 if test $have_odbc = yes ; then
20687                         ol_link_sql="-lodbc"
20688                 fi
20689         fi
20690
20691         if test $ol_link_sql != no ; then
20692                 SLAPD_SQL_LIBS="$ol_link_sql"
20693
20694         elif test $ol_enable_sql != auto ; then
20695                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20696         fi
20697 fi
20698
20699 ol_link_sasl=no
20700 ol_link_spasswd=no
20701 if test $ol_with_cyrus_sasl != no ; then
20702         for ac_hdr in sasl/sasl.h sasl.h
20703 do
20704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20706 echo "configure:20707: checking for $ac_hdr" >&5
20707 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20708   echo $ac_n "(cached) $ac_c" 1>&6
20709 else
20710   cat > conftest.$ac_ext <<EOF
20711 #line 20712 "configure"
20712 #include "confdefs.h"
20713 #include <$ac_hdr>
20714 EOF
20715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20716 { (eval echo configure:20717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20717 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20718 if test -z "$ac_err"; then
20719   rm -rf conftest*
20720   eval "ac_cv_header_$ac_safe=yes"
20721 else
20722   echo "$ac_err" >&5
20723   echo "configure: failed program was:" >&5
20724   cat conftest.$ac_ext >&5
20725   rm -rf conftest*
20726   eval "ac_cv_header_$ac_safe=no"
20727 fi
20728 rm -f conftest*
20729 fi
20730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20731   echo "$ac_t""yes" 1>&6
20732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20733   cat >> confdefs.h <<EOF
20734 #define $ac_tr_hdr 1
20735 EOF
20736  
20737 else
20738   echo "$ac_t""no" 1>&6
20739 fi
20740 done
20741
20742
20743         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20744                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20745 echo "configure:20746: checking for sasl_client_init in -lsasl2" >&5
20746 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20747 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20748   echo $ac_n "(cached) $ac_c" 1>&6
20749 else
20750   ac_save_LIBS="$LIBS"
20751 LIBS="-lsasl2  $LIBS"
20752 cat > conftest.$ac_ext <<EOF
20753 #line 20754 "configure"
20754 #include "confdefs.h"
20755 /* Override any gcc2 internal prototype to avoid an error.  */
20756 /* We use char because int might match the return type of a gcc2
20757     builtin and then its argument prototype would still apply.  */
20758 char sasl_client_init();
20759
20760 int main() {
20761 sasl_client_init()
20762 ; return 0; }
20763 EOF
20764 if { (eval echo configure:20765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20765   rm -rf conftest*
20766   eval "ac_cv_lib_$ac_lib_var=yes"
20767 else
20768   echo "configure: failed program was:" >&5
20769   cat conftest.$ac_ext >&5
20770   rm -rf conftest*
20771   eval "ac_cv_lib_$ac_lib_var=no"
20772 fi
20773 rm -f conftest*
20774 LIBS="$ac_save_LIBS"
20775
20776 fi
20777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20778   echo "$ac_t""yes" 1>&6
20779   ol_link_sasl="-lsasl2"
20780 else
20781   echo "$ac_t""no" 1>&6
20782 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20783 echo "configure:20784: checking for sasl_client_init in -lsasl" >&5
20784 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20785 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20786   echo $ac_n "(cached) $ac_c" 1>&6
20787 else
20788   ac_save_LIBS="$LIBS"
20789 LIBS="-lsasl  $LIBS"
20790 cat > conftest.$ac_ext <<EOF
20791 #line 20792 "configure"
20792 #include "confdefs.h"
20793 /* Override any gcc2 internal prototype to avoid an error.  */
20794 /* We use char because int might match the return type of a gcc2
20795     builtin and then its argument prototype would still apply.  */
20796 char sasl_client_init();
20797
20798 int main() {
20799 sasl_client_init()
20800 ; return 0; }
20801 EOF
20802 if { (eval echo configure:20803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20803   rm -rf conftest*
20804   eval "ac_cv_lib_$ac_lib_var=yes"
20805 else
20806   echo "configure: failed program was:" >&5
20807   cat conftest.$ac_ext >&5
20808   rm -rf conftest*
20809   eval "ac_cv_lib_$ac_lib_var=no"
20810 fi
20811 rm -f conftest*
20812 LIBS="$ac_save_LIBS"
20813
20814 fi
20815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20816   echo "$ac_t""yes" 1>&6
20817   ol_link_sasl="-lsasl"
20818 else
20819   echo "$ac_t""no" 1>&6
20820 fi
20821
20822 fi
20823
20824         fi
20825
20826         if test $ol_link_sasl = no ; then
20827                 if test $ol_with_cyrus_sasl != auto ; then
20828                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20829                 else
20830                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20831                         echo "configure: warning: SASL authentication not supported!" 1>&2
20832                         if test $ol_link_tls = no ; then
20833                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20834                         fi
20835                 fi
20836         else
20837                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20838 echo "configure:20839: checking Cyrus SASL library version" >&5
20839 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20840   echo $ac_n "(cached) $ac_c" 1>&6
20841 else
20842   
20843         cat > conftest.$ac_ext <<EOF
20844 #line 20845 "configure"
20845 #include "confdefs.h"
20846
20847 #ifdef HAVE_SASL_SASL_H
20848 #include <sasl/sasl.h>
20849 #else
20850 #include <sasl.h>
20851 #endif
20852
20853 /* Require 2.1.15+ */
20854 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20855         char *__sasl_compat = "2.2+ or better okay (we guess)";
20856 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20857         && SASL_VERSION_STEP >=15
20858         char *__sasl_compat = "2.1.15+ or better okay";
20859 #endif
20860         
20861 EOF
20862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20863   egrep "__sasl_compat" >/dev/null 2>&1; then
20864   rm -rf conftest*
20865   ol_cv_sasl_compat=yes
20866 else
20867   rm -rf conftest*
20868   ol_cv_sasl_compat=no
20869 fi
20870 rm -f conftest*
20871
20872 fi
20873
20874 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20875
20876                 if test $ol_cv_sasl_compat = no ; then
20877                         ol_link_sasl=no
20878                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20879                 fi
20880
20881                 cat >> confdefs.h <<\EOF
20882 #define HAVE_CYRUS_SASL 1
20883 EOF
20884
20885                 SASL_LIBS="$ol_link_sasl"
20886                 if test $ol_enable_spasswd != no ; then
20887                         ol_link_spasswd=yes
20888                 fi
20889
20890                 ac_save_LIBS="$LIBS"
20891                 LIBS="$LIBS $ol_link_sasl"
20892                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20893 echo "configure:20894: checking for sasl_version" >&5
20894 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20895   echo $ac_n "(cached) $ac_c" 1>&6
20896 else
20897   cat > conftest.$ac_ext <<EOF
20898 #line 20899 "configure"
20899 #include "confdefs.h"
20900 /* System header to define __stub macros and hopefully few prototypes,
20901     which can conflict with char sasl_version(); below.  */
20902 #include <assert.h>
20903 /* Override any gcc2 internal prototype to avoid an error.  */
20904 /* We use char because int might match the return type of a gcc2
20905     builtin and then its argument prototype would still apply.  */
20906 char sasl_version();
20907 char (*f)();
20908
20909 int main() {
20910
20911 /* The GNU C library defines this for functions which it implements
20912     to always fail with ENOSYS.  Some functions are actually named
20913     something starting with __ and the normal name is an alias.  */
20914 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20915 choke me
20916 #else
20917 f = sasl_version;
20918 #endif
20919
20920 ; return 0; }
20921 EOF
20922 if { (eval echo configure:20923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20923   rm -rf conftest*
20924   eval "ac_cv_func_sasl_version=yes"
20925 else
20926   echo "configure: failed program was:" >&5
20927   cat conftest.$ac_ext >&5
20928   rm -rf conftest*
20929   eval "ac_cv_func_sasl_version=no"
20930 fi
20931 rm -f conftest*
20932 fi
20933
20934 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20935   echo "$ac_t""yes" 1>&6
20936   cat >> confdefs.h <<\EOF
20937 #define HAVE_SASL_VERSION 1
20938 EOF
20939
20940 else
20941   echo "$ac_t""no" 1>&6
20942 fi
20943
20944                 LIBS="$ac_save_LIBS"
20945         fi
20946
20947 else
20948         echo "configure: warning: SASL authentication not supported!" 1>&2
20949         if test $ol_link_tls = no ; then
20950                 echo "configure: warning: Strong authentication not supported!" 1>&2
20951         fi
20952 fi
20953
20954 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20955         dev=no
20956         if test -r /dev/urandom ; then
20957                 dev="/dev/urandom";
20958         elif test -r /idev/urandom ; then
20959                 dev="/idev/urandom";
20960         elif test -r /dev/srandom ; then
20961                 dev="/dev/srandom";
20962         elif test -r /dev/random ; then
20963                 dev="/dev/random";
20964         elif test -r /idev/random ; then
20965                 dev="/idev/random";
20966         fi
20967
20968         if test $dev != no ; then
20969                 cat >> confdefs.h <<EOF
20970 #define URANDOM_DEVICE "$dev"
20971 EOF
20972
20973         fi
20974 fi
20975
20976 ol_link_fetch=no
20977 if test $ol_with_fetch != no ; then
20978         ol_LIBS=$LIBS
20979 LIBS="-lfetch -lcom_err $LIBS"
20980 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20981 echo "configure:20982: checking fetch(3) library" >&5
20982 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20983   echo $ac_n "(cached) $ac_c" 1>&6
20984 else
20985   
20986         cat > conftest.$ac_ext <<EOF
20987 #line 20988 "configure"
20988 #include "confdefs.h"
20989
20990 #include <sys/param.h>
20991 #include <stdio.h>
20992 #include <fetch.h>
20993 int main() {
20994 struct url *u = fetchParseURL("file:///"); 
20995 ; return 0; }
20996 EOF
20997 if { (eval echo configure:20998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20998   rm -rf conftest*
20999   ol_cv_lib_fetch=yes
21000 else
21001   echo "configure: failed program was:" >&5
21002   cat conftest.$ac_ext >&5
21003   rm -rf conftest*
21004   ol_cv_lib_fetch=no
21005 fi
21006 rm -f conftest*
21007 fi
21008
21009 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21010 LIBS=$ol_LIBS
21011 if test $ol_cv_lib_fetch != no ; then
21012         ol_link_fetch="-lfetch -lcom_err"
21013         cat >> confdefs.h <<\EOF
21014 #define HAVE_FETCH 1
21015 EOF
21016
21017 fi
21018
21019
21020         if test $ol_cv_lib_fetch != no ; then
21021                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21022                 ol_link_fetch=freebsd
21023
21024         elif test $ol_with_fetch != auto ; then
21025                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21026         fi 
21027 fi
21028
21029 if test $ol_enable_crypt != no ; then
21030         save_LIBS="$LIBS"
21031         LIBS="$TLS_LIBS $LIBS"
21032
21033         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21034 echo "configure:21035: checking for crypt" >&5
21035 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21036   echo $ac_n "(cached) $ac_c" 1>&6
21037 else
21038   cat > conftest.$ac_ext <<EOF
21039 #line 21040 "configure"
21040 #include "confdefs.h"
21041 /* System header to define __stub macros and hopefully few prototypes,
21042     which can conflict with char crypt(); below.  */
21043 #include <assert.h>
21044 /* Override any gcc2 internal prototype to avoid an error.  */
21045 /* We use char because int might match the return type of a gcc2
21046     builtin and then its argument prototype would still apply.  */
21047 char crypt();
21048 char (*f)();
21049
21050 int main() {
21051
21052 /* The GNU C library defines this for functions which it implements
21053     to always fail with ENOSYS.  Some functions are actually named
21054     something starting with __ and the normal name is an alias.  */
21055 #if defined (__stub_crypt) || defined (__stub___crypt)
21056 choke me
21057 #else
21058 f = crypt;
21059 #endif
21060
21061 ; return 0; }
21062 EOF
21063 if { (eval echo configure:21064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21064   rm -rf conftest*
21065   eval "ac_cv_func_crypt=yes"
21066 else
21067   echo "configure: failed program was:" >&5
21068   cat conftest.$ac_ext >&5
21069   rm -rf conftest*
21070   eval "ac_cv_func_crypt=no"
21071 fi
21072 rm -f conftest*
21073 fi
21074
21075 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21076   echo "$ac_t""yes" 1>&6
21077   have_crypt=yes
21078 else
21079   echo "$ac_t""no" 1>&6
21080
21081                 LIBS="$save_LIBS"
21082                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21083 echo "configure:21084: checking for crypt in -lcrypt" >&5
21084 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21085 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21086   echo $ac_n "(cached) $ac_c" 1>&6
21087 else
21088   ac_save_LIBS="$LIBS"
21089 LIBS="-lcrypt  $LIBS"
21090 cat > conftest.$ac_ext <<EOF
21091 #line 21092 "configure"
21092 #include "confdefs.h"
21093 /* Override any gcc2 internal prototype to avoid an error.  */
21094 /* We use char because int might match the return type of a gcc2
21095     builtin and then its argument prototype would still apply.  */
21096 char crypt();
21097
21098 int main() {
21099 crypt()
21100 ; return 0; }
21101 EOF
21102 if { (eval echo configure:21103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21103   rm -rf conftest*
21104   eval "ac_cv_lib_$ac_lib_var=yes"
21105 else
21106   echo "configure: failed program was:" >&5
21107   cat conftest.$ac_ext >&5
21108   rm -rf conftest*
21109   eval "ac_cv_lib_$ac_lib_var=no"
21110 fi
21111 rm -f conftest*
21112 LIBS="$ac_save_LIBS"
21113
21114 fi
21115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21116   echo "$ac_t""yes" 1>&6
21117   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21118                         have_crypt=yes
21119 else
21120   echo "$ac_t""no" 1>&6
21121 have_crypt=no
21122 fi
21123
21124 fi
21125
21126
21127         LIBS="$save_LIBS"
21128
21129         if test $have_crypt = yes ; then
21130                 cat >> confdefs.h <<\EOF
21131 #define HAVE_CRYPT 1
21132 EOF
21133
21134         else
21135                 echo "configure: warning: could not find crypt" 1>&2
21136                 if test $ol_enable_crypt = yes ; then
21137                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21138                 fi
21139
21140                 echo "configure: warning: disabling crypt support" 1>&2
21141                 ol_enable_crypt=no
21142         fi
21143 fi
21144
21145 if test $ol_enable_proctitle != no ; then
21146         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21147 echo "configure:21148: checking for setproctitle" >&5
21148 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21149   echo $ac_n "(cached) $ac_c" 1>&6
21150 else
21151   cat > conftest.$ac_ext <<EOF
21152 #line 21153 "configure"
21153 #include "confdefs.h"
21154 /* System header to define __stub macros and hopefully few prototypes,
21155     which can conflict with char setproctitle(); below.  */
21156 #include <assert.h>
21157 /* Override any gcc2 internal prototype to avoid an error.  */
21158 /* We use char because int might match the return type of a gcc2
21159     builtin and then its argument prototype would still apply.  */
21160 char setproctitle();
21161 char (*f)();
21162
21163 int main() {
21164
21165 /* The GNU C library defines this for functions which it implements
21166     to always fail with ENOSYS.  Some functions are actually named
21167     something starting with __ and the normal name is an alias.  */
21168 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21169 choke me
21170 #else
21171 f = setproctitle;
21172 #endif
21173
21174 ; return 0; }
21175 EOF
21176 if { (eval echo configure:21177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21177   rm -rf conftest*
21178   eval "ac_cv_func_setproctitle=yes"
21179 else
21180   echo "configure: failed program was:" >&5
21181   cat conftest.$ac_ext >&5
21182   rm -rf conftest*
21183   eval "ac_cv_func_setproctitle=no"
21184 fi
21185 rm -f conftest*
21186 fi
21187
21188 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21189   echo "$ac_t""yes" 1>&6
21190   have_setproctitle=yes
21191 else
21192   echo "$ac_t""no" 1>&6
21193
21194                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21195 echo "configure:21196: checking for setproctitle in -lutil" >&5
21196 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21198   echo $ac_n "(cached) $ac_c" 1>&6
21199 else
21200   ac_save_LIBS="$LIBS"
21201 LIBS="-lutil  $LIBS"
21202 cat > conftest.$ac_ext <<EOF
21203 #line 21204 "configure"
21204 #include "confdefs.h"
21205 /* Override any gcc2 internal prototype to avoid an error.  */
21206 /* We use char because int might match the return type of a gcc2
21207     builtin and then its argument prototype would still apply.  */
21208 char setproctitle();
21209
21210 int main() {
21211 setproctitle()
21212 ; return 0; }
21213 EOF
21214 if { (eval echo configure:21215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21215   rm -rf conftest*
21216   eval "ac_cv_lib_$ac_lib_var=yes"
21217 else
21218   echo "configure: failed program was:" >&5
21219   cat conftest.$ac_ext >&5
21220   rm -rf conftest*
21221   eval "ac_cv_lib_$ac_lib_var=no"
21222 fi
21223 rm -f conftest*
21224 LIBS="$ac_save_LIBS"
21225
21226 fi
21227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21228   echo "$ac_t""yes" 1>&6
21229   have_setproctitle=yes
21230                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21231 else
21232   echo "$ac_t""no" 1>&6
21233 have_setproctitle=no
21234                         LIBOBJS="$LIBOBJS setproctitle.o"
21235                         LIBSRCS="$LIBSRCS setproctitle.c"
21236 fi
21237
21238 fi
21239
21240
21241         if test $have_setproctitle = yes ; then
21242                 cat >> confdefs.h <<\EOF
21243 #define HAVE_SETPROCTITLE 1
21244 EOF
21245
21246         fi
21247 fi
21248
21249 if test $ol_enable_slp != no ; then
21250         for ac_hdr in slp.h 
21251 do
21252 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21253 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21254 echo "configure:21255: checking for $ac_hdr" >&5
21255 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21256   echo $ac_n "(cached) $ac_c" 1>&6
21257 else
21258   cat > conftest.$ac_ext <<EOF
21259 #line 21260 "configure"
21260 #include "confdefs.h"
21261 #include <$ac_hdr>
21262 EOF
21263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21264 { (eval echo configure:21265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21266 if test -z "$ac_err"; then
21267   rm -rf conftest*
21268   eval "ac_cv_header_$ac_safe=yes"
21269 else
21270   echo "$ac_err" >&5
21271   echo "configure: failed program was:" >&5
21272   cat conftest.$ac_ext >&5
21273   rm -rf conftest*
21274   eval "ac_cv_header_$ac_safe=no"
21275 fi
21276 rm -f conftest*
21277 fi
21278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21279   echo "$ac_t""yes" 1>&6
21280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21281   cat >> confdefs.h <<EOF
21282 #define $ac_tr_hdr 1
21283 EOF
21284  
21285 else
21286   echo "$ac_t""no" 1>&6
21287 fi
21288 done
21289
21290
21291         if test $ac_cv_header_slp_h = yes ; then
21292                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21293 echo "configure:21294: checking for SLPOpen in -lslp" >&5
21294 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21296   echo $ac_n "(cached) $ac_c" 1>&6
21297 else
21298   ac_save_LIBS="$LIBS"
21299 LIBS="-lslp  $LIBS"
21300 cat > conftest.$ac_ext <<EOF
21301 #line 21302 "configure"
21302 #include "confdefs.h"
21303 /* Override any gcc2 internal prototype to avoid an error.  */
21304 /* We use char because int might match the return type of a gcc2
21305     builtin and then its argument prototype would still apply.  */
21306 char SLPOpen();
21307
21308 int main() {
21309 SLPOpen()
21310 ; return 0; }
21311 EOF
21312 if { (eval echo configure:21313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21313   rm -rf conftest*
21314   eval "ac_cv_lib_$ac_lib_var=yes"
21315 else
21316   echo "configure: failed program was:" >&5
21317   cat conftest.$ac_ext >&5
21318   rm -rf conftest*
21319   eval "ac_cv_lib_$ac_lib_var=no"
21320 fi
21321 rm -f conftest*
21322 LIBS="$ac_save_LIBS"
21323
21324 fi
21325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21326   echo "$ac_t""yes" 1>&6
21327   have_slp=yes
21328 else
21329   echo "$ac_t""no" 1>&6
21330 have_slp=no
21331 fi
21332
21333                 if test $have_slp = yes ; then
21334                         cat >> confdefs.h <<\EOF
21335 #define HAVE_SLP 1
21336 EOF
21337
21338                         SLAPD_SLP_LIBS=-lslp
21339                 fi
21340
21341         elif test $ol_enable_slp = yes ; then
21342                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21343         fi
21344 fi
21345
21346
21347 echo $ac_n "checking long long""... $ac_c" 1>&6
21348 echo "configure:21349: checking long long" >&5
21349 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21350   echo $ac_n "(cached) $ac_c" 1>&6
21351 else
21352   
21353         cat > conftest.$ac_ext <<EOF
21354 #line 21355 "configure"
21355 #include "confdefs.h"
21356
21357 int main() {
21358 long long x;
21359 ; return 0; }
21360 EOF
21361 if { (eval echo configure:21362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21362   rm -rf conftest*
21363   ol_cv_type_long_long=yes
21364 else
21365   echo "configure: failed program was:" >&5
21366   cat conftest.$ac_ext >&5
21367   rm -rf conftest*
21368   ol_cv_type_long_long=no
21369 fi
21370 rm -f conftest*
21371 fi
21372
21373 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21374 if test $ol_cv_type_long_long = yes; then
21375         cat >> confdefs.h <<\EOF
21376 #define HAVE_LONG_LONG 1
21377 EOF
21378
21379 fi
21380
21381 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21382 echo "configure:21383: checking for ANSI C header files" >&5
21383 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21384   echo $ac_n "(cached) $ac_c" 1>&6
21385 else
21386   cat > conftest.$ac_ext <<EOF
21387 #line 21388 "configure"
21388 #include "confdefs.h"
21389 #include <stdlib.h>
21390 #include <stdarg.h>
21391 #include <string.h>
21392 #include <float.h>
21393 EOF
21394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21395 { (eval echo configure:21396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21397 if test -z "$ac_err"; then
21398   rm -rf conftest*
21399   ac_cv_header_stdc=yes
21400 else
21401   echo "$ac_err" >&5
21402   echo "configure: failed program was:" >&5
21403   cat conftest.$ac_ext >&5
21404   rm -rf conftest*
21405   ac_cv_header_stdc=no
21406 fi
21407 rm -f conftest*
21408
21409 if test $ac_cv_header_stdc = yes; then
21410   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21411 cat > conftest.$ac_ext <<EOF
21412 #line 21413 "configure"
21413 #include "confdefs.h"
21414 #include <string.h>
21415 EOF
21416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21417   egrep "memchr" >/dev/null 2>&1; then
21418   :
21419 else
21420   rm -rf conftest*
21421   ac_cv_header_stdc=no
21422 fi
21423 rm -f conftest*
21424
21425 fi
21426
21427 if test $ac_cv_header_stdc = yes; then
21428   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21429 cat > conftest.$ac_ext <<EOF
21430 #line 21431 "configure"
21431 #include "confdefs.h"
21432 #include <stdlib.h>
21433 EOF
21434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21435   egrep "free" >/dev/null 2>&1; then
21436   :
21437 else
21438   rm -rf conftest*
21439   ac_cv_header_stdc=no
21440 fi
21441 rm -f conftest*
21442
21443 fi
21444
21445 if test $ac_cv_header_stdc = yes; then
21446   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21447 if test "$cross_compiling" = yes; then
21448   :
21449 else
21450   cat > conftest.$ac_ext <<EOF
21451 #line 21452 "configure"
21452 #include "confdefs.h"
21453 #include <ctype.h>
21454 #if ((' ' & 0x0FF) == 0x020)
21455 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21456 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21457 #else
21458 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21459  || ('j' <= (c) && (c) <= 'r') \
21460  || ('s' <= (c) && (c) <= 'z'))
21461 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21462 #endif
21463 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21464 int main () { int i; for (i = 0; i < 256; i++)
21465 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21466 exit (0); }
21467
21468 EOF
21469 if { (eval echo configure:21470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21470 then
21471   :
21472 else
21473   echo "configure: failed program was:" >&5
21474   cat conftest.$ac_ext >&5
21475   rm -fr conftest*
21476   ac_cv_header_stdc=no
21477 fi
21478 rm -fr conftest*
21479 fi
21480
21481 fi
21482 fi
21483
21484 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21485 if test $ac_cv_header_stdc = yes; then
21486   cat >> confdefs.h <<\EOF
21487 #define STDC_HEADERS 1
21488 EOF
21489
21490 fi
21491
21492 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21493 echo "configure:21494: checking for mode_t" >&5
21494 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21495   echo $ac_n "(cached) $ac_c" 1>&6
21496 else
21497   cat > conftest.$ac_ext <<EOF
21498 #line 21499 "configure"
21499 #include "confdefs.h"
21500 #include <sys/types.h>
21501 #if STDC_HEADERS
21502 #include <stdlib.h>
21503 #include <stddef.h>
21504 #endif
21505
21506 EOF
21507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21508   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21509   rm -rf conftest*
21510   eval "ac_cv_type_mode_t=yes"
21511 else
21512   rm -rf conftest*
21513   eval "ac_cv_type_mode_t=no"
21514 fi
21515 rm -f conftest*
21516
21517 fi
21518 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21519   echo "$ac_t""yes" 1>&6
21520 else
21521   echo "$ac_t""no" 1>&6
21522   cat >> confdefs.h <<EOF
21523 #define mode_t int
21524 EOF
21525
21526 fi
21527
21528 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21529 echo "configure:21530: checking for off_t" >&5
21530 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21531   echo $ac_n "(cached) $ac_c" 1>&6
21532 else
21533   cat > conftest.$ac_ext <<EOF
21534 #line 21535 "configure"
21535 #include "confdefs.h"
21536 #include <sys/types.h>
21537 #if STDC_HEADERS
21538 #include <stdlib.h>
21539 #include <stddef.h>
21540 #endif
21541
21542 EOF
21543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21544   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21545   rm -rf conftest*
21546   eval "ac_cv_type_off_t=yes"
21547 else
21548   rm -rf conftest*
21549   eval "ac_cv_type_off_t=no"
21550 fi
21551 rm -f conftest*
21552
21553 fi
21554 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21555   echo "$ac_t""yes" 1>&6
21556 else
21557   echo "$ac_t""no" 1>&6
21558   cat >> confdefs.h <<EOF
21559 #define off_t long
21560 EOF
21561
21562 fi
21563
21564 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21565 echo "configure:21566: checking for pid_t" >&5
21566 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21567   echo $ac_n "(cached) $ac_c" 1>&6
21568 else
21569   cat > conftest.$ac_ext <<EOF
21570 #line 21571 "configure"
21571 #include "confdefs.h"
21572 #include <sys/types.h>
21573 #if STDC_HEADERS
21574 #include <stdlib.h>
21575 #include <stddef.h>
21576 #endif
21577
21578 EOF
21579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21580   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21581   rm -rf conftest*
21582   eval "ac_cv_type_pid_t=yes"
21583 else
21584   rm -rf conftest*
21585   eval "ac_cv_type_pid_t=no"
21586 fi
21587 rm -f conftest*
21588
21589 fi
21590 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21591   echo "$ac_t""yes" 1>&6
21592 else
21593   echo "$ac_t""no" 1>&6
21594   cat >> confdefs.h <<EOF
21595 #define pid_t int
21596 EOF
21597
21598 fi
21599
21600 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21601 echo "configure:21602: checking for ptrdiff_t" >&5
21602 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21603   echo $ac_n "(cached) $ac_c" 1>&6
21604 else
21605   cat > conftest.$ac_ext <<EOF
21606 #line 21607 "configure"
21607 #include "confdefs.h"
21608 #include <stddef.h>
21609 int main() {
21610 ptrdiff_t p
21611 ; return 0; }
21612 EOF
21613 if { (eval echo configure:21614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21614   rm -rf conftest*
21615   am_cv_type_ptrdiff_t=yes
21616 else
21617   echo "configure: failed program was:" >&5
21618   cat conftest.$ac_ext >&5
21619   rm -rf conftest*
21620   am_cv_type_ptrdiff_t=no
21621 fi
21622 rm -f conftest*
21623 fi
21624
21625 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21626    if test $am_cv_type_ptrdiff_t = yes; then
21627      cat >> confdefs.h <<\EOF
21628 #define HAVE_PTRDIFF_T 1
21629 EOF
21630
21631    fi
21632
21633 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21634 echo "configure:21635: checking return type of signal handlers" >&5
21635 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21636   echo $ac_n "(cached) $ac_c" 1>&6
21637 else
21638   cat > conftest.$ac_ext <<EOF
21639 #line 21640 "configure"
21640 #include "confdefs.h"
21641 #include <sys/types.h>
21642 #include <signal.h>
21643 #ifdef signal
21644 #undef signal
21645 #endif
21646 #ifdef __cplusplus
21647 extern "C" void (*signal (int, void (*)(int)))(int);
21648 #else
21649 void (*signal ()) ();
21650 #endif
21651
21652 int main() {
21653 int i;
21654 ; return 0; }
21655 EOF
21656 if { (eval echo configure:21657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21657   rm -rf conftest*
21658   ac_cv_type_signal=void
21659 else
21660   echo "configure: failed program was:" >&5
21661   cat conftest.$ac_ext >&5
21662   rm -rf conftest*
21663   ac_cv_type_signal=int
21664 fi
21665 rm -f conftest*
21666 fi
21667
21668 echo "$ac_t""$ac_cv_type_signal" 1>&6
21669 cat >> confdefs.h <<EOF
21670 #define RETSIGTYPE $ac_cv_type_signal
21671 EOF
21672
21673
21674 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21675 echo "configure:21676: checking for size_t" >&5
21676 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21677   echo $ac_n "(cached) $ac_c" 1>&6
21678 else
21679   cat > conftest.$ac_ext <<EOF
21680 #line 21681 "configure"
21681 #include "confdefs.h"
21682 #include <sys/types.h>
21683 #if STDC_HEADERS
21684 #include <stdlib.h>
21685 #include <stddef.h>
21686 #endif
21687
21688 EOF
21689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21690   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21691   rm -rf conftest*
21692   eval "ac_cv_type_size_t=yes"
21693 else
21694   rm -rf conftest*
21695   eval "ac_cv_type_size_t=no"
21696 fi
21697 rm -f conftest*
21698
21699 fi
21700 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21701   echo "$ac_t""yes" 1>&6
21702 else
21703   echo "$ac_t""no" 1>&6
21704   cat >> confdefs.h <<EOF
21705 #define size_t unsigned
21706 EOF
21707
21708 fi
21709
21710
21711 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21712 echo "configure:21713: checking for ssize_t" >&5
21713 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21714   echo $ac_n "(cached) $ac_c" 1>&6
21715 else
21716   cat > conftest.$ac_ext <<EOF
21717 #line 21718 "configure"
21718 #include "confdefs.h"
21719 #include <sys/types.h>
21720 #if STDC_HEADERS
21721 #include <stdlib.h>
21722 #include <stddef.h>
21723 #endif
21724
21725 EOF
21726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21727   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21728   rm -rf conftest*
21729   eval "ac_cv_type_ssize_t=yes"
21730 else
21731   rm -rf conftest*
21732   eval "ac_cv_type_ssize_t=no"
21733 fi
21734 rm -f conftest*
21735
21736 fi
21737 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21738   echo "$ac_t""yes" 1>&6
21739 else
21740   echo "$ac_t""no" 1>&6
21741   cat >> confdefs.h <<EOF
21742 #define ssize_t signed int
21743 EOF
21744
21745 fi
21746
21747 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21748 echo "configure:21749: checking for caddr_t" >&5
21749 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21750   echo $ac_n "(cached) $ac_c" 1>&6
21751 else
21752   cat > conftest.$ac_ext <<EOF
21753 #line 21754 "configure"
21754 #include "confdefs.h"
21755 #include <sys/types.h>
21756 #if STDC_HEADERS
21757 #include <stdlib.h>
21758 #include <stddef.h>
21759 #endif
21760
21761 EOF
21762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21763   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21764   rm -rf conftest*
21765   eval "ac_cv_type_caddr_t=yes"
21766 else
21767   rm -rf conftest*
21768   eval "ac_cv_type_caddr_t=no"
21769 fi
21770 rm -f conftest*
21771
21772 fi
21773 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21774   echo "$ac_t""yes" 1>&6
21775 else
21776   echo "$ac_t""no" 1>&6
21777   cat >> confdefs.h <<EOF
21778 #define caddr_t char *
21779 EOF
21780
21781 fi
21782
21783
21784 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21785 echo "configure:21786: checking for socklen_t" >&5
21786 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21787   echo $ac_n "(cached) $ac_c" 1>&6
21788 else
21789   cat > conftest.$ac_ext <<EOF
21790 #line 21791 "configure"
21791 #include "confdefs.h"
21792
21793 #ifdef HAVE_SYS_TYPES_H
21794 #include <sys/types.h>
21795 #endif
21796 #ifdef HAVE_SYS_SOCKET_H
21797 #include <sys/socket.h>
21798 #endif
21799
21800 int main() {
21801 socklen_t len;
21802 ; return 0; }
21803 EOF
21804 if { (eval echo configure:21805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21805   rm -rf conftest*
21806   ol_cv_type_socklen_t=yes
21807 else
21808   echo "configure: failed program was:" >&5
21809   cat conftest.$ac_ext >&5
21810   rm -rf conftest*
21811   ol_cv_type_socklen_t=no
21812 fi
21813 rm -f conftest*
21814 fi
21815
21816 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21817   if test $ol_cv_type_socklen_t = no; then
21818     cat >> confdefs.h <<\EOF
21819 #define socklen_t int
21820 EOF
21821
21822   fi
21823  
21824 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21825 echo "configure:21826: checking for member st_blksize in aggregate type struct stat" >&5
21826 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21827   echo $ac_n "(cached) $ac_c" 1>&6
21828 else
21829   cat > conftest.$ac_ext <<EOF
21830 #line 21831 "configure"
21831 #include "confdefs.h"
21832 #include <sys/types.h>
21833 #include <sys/stat.h>
21834 int main() {
21835 struct stat foo; foo.st_blksize;
21836 ; return 0; }
21837 EOF
21838 if { (eval echo configure:21839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21839   rm -rf conftest*
21840   ac_cv_c_struct_member_st_blksize=yes
21841 else
21842   echo "configure: failed program was:" >&5
21843   cat conftest.$ac_ext >&5
21844   rm -rf conftest*
21845   ac_cv_c_struct_member_st_blksize=no
21846 fi
21847 rm -f conftest*
21848 fi
21849
21850 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21851 st_blksize="$ac_cv_c_struct_member_st_blksize"
21852 if test $ac_cv_c_struct_member_st_blksize = yes; then
21853   cat >> confdefs.h <<\EOF
21854 #define HAVE_ST_BLKSIZE 1
21855 EOF
21856
21857 fi
21858
21859 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21860 echo "configure:21861: checking whether time.h and sys/time.h may both be included" >&5
21861 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21862   echo $ac_n "(cached) $ac_c" 1>&6
21863 else
21864   cat > conftest.$ac_ext <<EOF
21865 #line 21866 "configure"
21866 #include "confdefs.h"
21867 #include <sys/types.h>
21868 #include <sys/time.h>
21869 #include <time.h>
21870 int main() {
21871 struct tm *tp;
21872 ; return 0; }
21873 EOF
21874 if { (eval echo configure:21875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21875   rm -rf conftest*
21876   ac_cv_header_time=yes
21877 else
21878   echo "configure: failed program was:" >&5
21879   cat conftest.$ac_ext >&5
21880   rm -rf conftest*
21881   ac_cv_header_time=no
21882 fi
21883 rm -f conftest*
21884 fi
21885
21886 echo "$ac_t""$ac_cv_header_time" 1>&6
21887 if test $ac_cv_header_time = yes; then
21888   cat >> confdefs.h <<\EOF
21889 #define TIME_WITH_SYS_TIME 1
21890 EOF
21891
21892 fi
21893
21894 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21895 echo "configure:21896: checking whether struct tm is in sys/time.h or time.h" >&5
21896 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21897   echo $ac_n "(cached) $ac_c" 1>&6
21898 else
21899   cat > conftest.$ac_ext <<EOF
21900 #line 21901 "configure"
21901 #include "confdefs.h"
21902 #include <sys/types.h>
21903 #include <time.h>
21904 int main() {
21905 struct tm *tp; tp->tm_sec;
21906 ; return 0; }
21907 EOF
21908 if { (eval echo configure:21909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21909   rm -rf conftest*
21910   ac_cv_struct_tm=time.h
21911 else
21912   echo "configure: failed program was:" >&5
21913   cat conftest.$ac_ext >&5
21914   rm -rf conftest*
21915   ac_cv_struct_tm=sys/time.h
21916 fi
21917 rm -f conftest*
21918 fi
21919
21920 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21921 if test $ac_cv_struct_tm = sys/time.h; then
21922   cat >> confdefs.h <<\EOF
21923 #define TM_IN_SYS_TIME 1
21924 EOF
21925
21926 fi
21927
21928 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21929 echo "configure:21930: checking for uid_t in sys/types.h" >&5
21930 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21931   echo $ac_n "(cached) $ac_c" 1>&6
21932 else
21933   cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936 #include <sys/types.h>
21937 EOF
21938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21939   egrep "uid_t" >/dev/null 2>&1; then
21940   rm -rf conftest*
21941   ac_cv_type_uid_t=yes
21942 else
21943   rm -rf conftest*
21944   ac_cv_type_uid_t=no
21945 fi
21946 rm -f conftest*
21947
21948 fi
21949
21950 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21951 if test $ac_cv_type_uid_t = no; then
21952   cat >> confdefs.h <<\EOF
21953 #define uid_t int
21954 EOF
21955
21956   cat >> confdefs.h <<\EOF
21957 #define gid_t int
21958 EOF
21959
21960 fi
21961
21962 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21963 echo "configure:21964: checking for sig_atomic_t" >&5
21964 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21965   echo $ac_n "(cached) $ac_c" 1>&6
21966 else
21967   cat > conftest.$ac_ext <<EOF
21968 #line 21969 "configure"
21969 #include "confdefs.h"
21970 #include <signal.h>
21971 int main() {
21972 sig_atomic_t atomic;
21973 ; return 0; }
21974 EOF
21975 if { (eval echo configure:21976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21976   rm -rf conftest*
21977   ol_cv_type_sig_atomic_t=yes
21978 else
21979   echo "configure: failed program was:" >&5
21980   cat conftest.$ac_ext >&5
21981   rm -rf conftest*
21982   ol_cv_type_sig_atomic_t=no
21983 fi
21984 rm -f conftest*
21985 fi
21986
21987 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21988   if test $ol_cv_type_sig_atomic_t = no; then
21989     cat >> confdefs.h <<\EOF
21990 #define sig_atomic_t int
21991 EOF
21992
21993   fi
21994  
21995
21996
21997 # test for pw_gecos in struct passwd
21998 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21999 echo "configure:22000: checking struct passwd for pw_gecos" >&5
22000 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22001   echo $ac_n "(cached) $ac_c" 1>&6
22002 else
22003   
22004         cat > conftest.$ac_ext <<EOF
22005 #line 22006 "configure"
22006 #include "confdefs.h"
22007 #include <pwd.h>
22008 int main() {
22009
22010         struct passwd pwd;
22011         pwd.pw_gecos = pwd.pw_name;
22012
22013 ; return 0; }
22014 EOF
22015 if { (eval echo configure:22016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22016   rm -rf conftest*
22017   ol_cv_struct_passwd_pw_gecos=yes
22018 else
22019   echo "configure: failed program was:" >&5
22020   cat conftest.$ac_ext >&5
22021   rm -rf conftest*
22022   ol_cv_struct_passwd_pw_gecos=no
22023 fi
22024 rm -f conftest*
22025 fi
22026
22027 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22028 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22029         cat >> confdefs.h <<\EOF
22030 #define HAVE_PW_GECOS 1
22031 EOF
22032
22033 fi
22034
22035 # test for pw_passwd in struct passwd
22036 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22037 echo "configure:22038: checking struct passwd for pw_passwd" >&5
22038 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22039   echo $ac_n "(cached) $ac_c" 1>&6
22040 else
22041   
22042         cat > conftest.$ac_ext <<EOF
22043 #line 22044 "configure"
22044 #include "confdefs.h"
22045 #include <pwd.h>
22046 int main() {
22047
22048         struct passwd pwd;
22049         pwd.pw_passwd = pwd.pw_name;
22050
22051 ; return 0; }
22052 EOF
22053 if { (eval echo configure:22054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22054   rm -rf conftest*
22055   ol_cv_struct_passwd_pw_passwd=yes
22056 else
22057   echo "configure: failed program was:" >&5
22058   cat conftest.$ac_ext >&5
22059   rm -rf conftest*
22060   ol_cv_struct_passwd_pw_passwd=no
22061 fi
22062 rm -f conftest*
22063 fi
22064
22065 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22066 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22067         cat >> confdefs.h <<\EOF
22068 #define HAVE_PW_PASSWD 1
22069 EOF
22070
22071 fi
22072
22073
22074 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22075 echo "configure:22076: checking if toupper() requires islower()" >&5
22076 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22077   echo $ac_n "(cached) $ac_c" 1>&6
22078 else
22079   
22080         if test "$cross_compiling" = yes; then
22081   ol_cv_c_upper_lower=safe
22082 else
22083   cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086
22087 #include <ctype.h>
22088 main()
22089 {
22090         if ('C' == toupper('C'))
22091                 exit(0);
22092         else
22093                 exit(1);
22094 }
22095 EOF
22096 if { (eval echo configure:22097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22097 then
22098   ol_cv_c_upper_lower=no
22099 else
22100   echo "configure: failed program was:" >&5
22101   cat conftest.$ac_ext >&5
22102   rm -fr conftest*
22103   ol_cv_c_upper_lower=yes
22104 fi
22105 rm -fr conftest*
22106 fi
22107
22108 fi
22109
22110 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22111 if test $ol_cv_c_upper_lower != no ; then
22112         cat >> confdefs.h <<\EOF
22113 #define C_UPPER_LOWER 1
22114 EOF
22115
22116 fi
22117
22118 echo $ac_n "checking for working const""... $ac_c" 1>&6
22119 echo "configure:22120: checking for working const" >&5
22120 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22121   echo $ac_n "(cached) $ac_c" 1>&6
22122 else
22123   cat > conftest.$ac_ext <<EOF
22124 #line 22125 "configure"
22125 #include "confdefs.h"
22126
22127 int main() {
22128
22129 /* Ultrix mips cc rejects this.  */
22130 typedef int charset[2]; const charset x;
22131 /* SunOS 4.1.1 cc rejects this.  */
22132 char const *const *ccp;
22133 char **p;
22134 /* NEC SVR4.0.2 mips cc rejects this.  */
22135 struct point {int x, y;};
22136 static struct point const zero = {0,0};
22137 /* AIX XL C 1.02.0.0 rejects this.
22138    It does not let you subtract one const X* pointer from another in an arm
22139    of an if-expression whose if-part is not a constant expression */
22140 const char *g = "string";
22141 ccp = &g + (g ? g-g : 0);
22142 /* HPUX 7.0 cc rejects these. */
22143 ++ccp;
22144 p = (char**) ccp;
22145 ccp = (char const *const *) p;
22146 { /* SCO 3.2v4 cc rejects this.  */
22147   char *t;
22148   char const *s = 0 ? (char *) 0 : (char const *) 0;
22149
22150   *t++ = 0;
22151 }
22152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22153   int x[] = {25, 17};
22154   const int *foo = &x[0];
22155   ++foo;
22156 }
22157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22158   typedef const int *iptr;
22159   iptr p = 0;
22160   ++p;
22161 }
22162 { /* AIX XL C 1.02.0.0 rejects this saying
22163      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22164   struct s { int j; const int *ap[3]; };
22165   struct s *b; b->j = 5;
22166 }
22167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22168   const int foo = 10;
22169 }
22170
22171 ; return 0; }
22172 EOF
22173 if { (eval echo configure:22174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22174   rm -rf conftest*
22175   ac_cv_c_const=yes
22176 else
22177   echo "configure: failed program was:" >&5
22178   cat conftest.$ac_ext >&5
22179   rm -rf conftest*
22180   ac_cv_c_const=no
22181 fi
22182 rm -f conftest*
22183 fi
22184
22185 echo "$ac_t""$ac_cv_c_const" 1>&6
22186 if test $ac_cv_c_const = no; then
22187   cat >> confdefs.h <<\EOF
22188 #define const 
22189 EOF
22190
22191 fi
22192
22193 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22194 echo "configure:22195: checking if compiler understands volatile" >&5
22195 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22196   echo $ac_n "(cached) $ac_c" 1>&6
22197 else
22198   cat > conftest.$ac_ext <<EOF
22199 #line 22200 "configure"
22200 #include "confdefs.h"
22201 int x, y, z;
22202 int main() {
22203 volatile int a; int * volatile b = x ? &y : &z;
22204       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22205       *b = 0;
22206 ; return 0; }
22207 EOF
22208 if { (eval echo configure:22209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22209   rm -rf conftest*
22210   ol_cv_c_volatile=yes
22211 else
22212   echo "configure: failed program was:" >&5
22213   cat conftest.$ac_ext >&5
22214   rm -rf conftest*
22215   ol_cv_c_volatile=no
22216 fi
22217 rm -f conftest*
22218 fi
22219
22220 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22221   if test $ol_cv_c_volatile = yes; then
22222     : 
22223   else
22224     cat >> confdefs.h <<\EOF
22225 #define volatile 
22226 EOF
22227
22228   fi
22229  
22230
22231 if test $cross_compiling = yes ; then
22232         cat >> confdefs.h <<\EOF
22233 #define CROSS_COMPILING 1
22234 EOF
22235
22236 else
22237         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22238 echo "configure:22239: checking whether byte ordering is bigendian" >&5
22239 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22240   echo $ac_n "(cached) $ac_c" 1>&6
22241 else
22242   ac_cv_c_bigendian=unknown
22243 # See if sys/param.h defines the BYTE_ORDER macro.
22244 cat > conftest.$ac_ext <<EOF
22245 #line 22246 "configure"
22246 #include "confdefs.h"
22247 #include <sys/types.h>
22248 #include <sys/param.h>
22249 int main() {
22250
22251 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22252  bogus endian macros
22253 #endif
22254 ; return 0; }
22255 EOF
22256 if { (eval echo configure:22257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22257   rm -rf conftest*
22258   # It does; now see whether it defined to BIG_ENDIAN or not.
22259 cat > conftest.$ac_ext <<EOF
22260 #line 22261 "configure"
22261 #include "confdefs.h"
22262 #include <sys/types.h>
22263 #include <sys/param.h>
22264 int main() {
22265
22266 #if BYTE_ORDER != BIG_ENDIAN
22267  not big endian
22268 #endif
22269 ; return 0; }
22270 EOF
22271 if { (eval echo configure:22272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22272   rm -rf conftest*
22273   ac_cv_c_bigendian=yes
22274 else
22275   echo "configure: failed program was:" >&5
22276   cat conftest.$ac_ext >&5
22277   rm -rf conftest*
22278   ac_cv_c_bigendian=no
22279 fi
22280 rm -f conftest*
22281 else
22282   echo "configure: failed program was:" >&5
22283   cat conftest.$ac_ext >&5
22284 fi
22285 rm -f conftest*
22286 if test $ac_cv_c_bigendian = unknown; then
22287 if test "$cross_compiling" = yes; then
22288     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22289 else
22290   cat > conftest.$ac_ext <<EOF
22291 #line 22292 "configure"
22292 #include "confdefs.h"
22293 main () {
22294   /* Are we little or big endian?  From Harbison&Steele.  */
22295   union
22296   {
22297     long l;
22298     char c[sizeof (long)];
22299   } u;
22300   u.l = 1;
22301   exit (u.c[sizeof (long) - 1] == 1);
22302 }
22303 EOF
22304 if { (eval echo configure:22305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22305 then
22306   ac_cv_c_bigendian=no
22307 else
22308   echo "configure: failed program was:" >&5
22309   cat conftest.$ac_ext >&5
22310   rm -fr conftest*
22311   ac_cv_c_bigendian=yes
22312 fi
22313 rm -fr conftest*
22314 fi
22315
22316 fi
22317 fi
22318
22319 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22320 if test $ac_cv_c_bigendian = yes; then
22321   cat >> confdefs.h <<\EOF
22322 #define WORDS_BIGENDIAN 1
22323 EOF
22324
22325 fi
22326
22327 fi
22328
22329 echo $ac_n "checking size of short""... $ac_c" 1>&6
22330 echo "configure:22331: checking size of short" >&5 
22331 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22332   echo $ac_n "(cached) $ac_c" 1>&6
22333 else
22334   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22335   cat > conftest.$ac_ext <<EOF
22336 #line 22337 "configure"
22337 #include "confdefs.h"
22338 #include "confdefs.h" 
22339 #include <sys/types.h> 
22340  
22341
22342 int main() {
22343 switch (0) case 0: case (sizeof (short) == $ac_size):;
22344 ; return 0; }
22345 EOF
22346 if { (eval echo configure:22347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22347   rm -rf conftest*
22348   ac_cv_sizeof_short=$ac_size
22349 else
22350   echo "configure: failed program was:" >&5
22351   cat conftest.$ac_ext >&5
22352 fi
22353 rm -f conftest* 
22354   if test x$ac_cv_sizeof_short != x ; then break; fi 
22355 done 
22356
22357 fi
22358  
22359 if test x$ac_cv_sizeof_short = x ; then 
22360   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22361 fi 
22362 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22363 cat >> confdefs.h <<EOF
22364 #define SIZEOF_SHORT $ac_cv_sizeof_short
22365 EOF
22366  
22367  
22368 echo $ac_n "checking size of int""... $ac_c" 1>&6
22369 echo "configure:22370: checking size of int" >&5 
22370 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22371   echo $ac_n "(cached) $ac_c" 1>&6
22372 else
22373   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22374   cat > conftest.$ac_ext <<EOF
22375 #line 22376 "configure"
22376 #include "confdefs.h"
22377 #include "confdefs.h" 
22378 #include <sys/types.h> 
22379  
22380
22381 int main() {
22382 switch (0) case 0: case (sizeof (int) == $ac_size):;
22383 ; return 0; }
22384 EOF
22385 if { (eval echo configure:22386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22386   rm -rf conftest*
22387   ac_cv_sizeof_int=$ac_size
22388 else
22389   echo "configure: failed program was:" >&5
22390   cat conftest.$ac_ext >&5
22391 fi
22392 rm -f conftest* 
22393   if test x$ac_cv_sizeof_int != x ; then break; fi 
22394 done 
22395
22396 fi
22397  
22398 if test x$ac_cv_sizeof_int = x ; then 
22399   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22400 fi 
22401 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22402 cat >> confdefs.h <<EOF
22403 #define SIZEOF_INT $ac_cv_sizeof_int
22404 EOF
22405  
22406  
22407 echo $ac_n "checking size of long""... $ac_c" 1>&6
22408 echo "configure:22409: checking size of long" >&5 
22409 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22410   echo $ac_n "(cached) $ac_c" 1>&6
22411 else
22412   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22413   cat > conftest.$ac_ext <<EOF
22414 #line 22415 "configure"
22415 #include "confdefs.h"
22416 #include "confdefs.h" 
22417 #include <sys/types.h> 
22418  
22419
22420 int main() {
22421 switch (0) case 0: case (sizeof (long) == $ac_size):;
22422 ; return 0; }
22423 EOF
22424 if { (eval echo configure:22425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22425   rm -rf conftest*
22426   ac_cv_sizeof_long=$ac_size
22427 else
22428   echo "configure: failed program was:" >&5
22429   cat conftest.$ac_ext >&5
22430 fi
22431 rm -f conftest* 
22432   if test x$ac_cv_sizeof_long != x ; then break; fi 
22433 done 
22434
22435 fi
22436  
22437 if test x$ac_cv_sizeof_long = x ; then 
22438   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22439 fi 
22440 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22441 cat >> confdefs.h <<EOF
22442 #define SIZEOF_LONG $ac_cv_sizeof_long
22443 EOF
22444  
22445
22446
22447 if test "$ac_cv_sizeof_int" -lt 4 ; then
22448         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22449
22450         cat >> confdefs.h <<\EOF
22451 #define LBER_INT_T long
22452 EOF
22453
22454 else
22455         cat >> confdefs.h <<\EOF
22456 #define LBER_INT_T int
22457 EOF
22458
22459 fi
22460
22461 cat >> confdefs.h <<\EOF
22462 #define LBER_LEN_T long
22463 EOF
22464
22465 cat >> confdefs.h <<\EOF
22466 #define LBER_SOCKET_T int
22467 EOF
22468
22469 cat >> confdefs.h <<\EOF
22470 #define LBER_TAG_T long
22471 EOF
22472
22473
22474 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22475 echo "configure:22476: checking for 8-bit clean memcmp" >&5
22476 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22477   echo $ac_n "(cached) $ac_c" 1>&6
22478 else
22479   if test "$cross_compiling" = yes; then
22480   ac_cv_func_memcmp_clean=no
22481 else
22482   cat > conftest.$ac_ext <<EOF
22483 #line 22484 "configure"
22484 #include "confdefs.h"
22485
22486 main()
22487 {
22488   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22489   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22490 }
22491
22492 EOF
22493 if { (eval echo configure:22494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22494 then
22495   ac_cv_func_memcmp_clean=yes
22496 else
22497   echo "configure: failed program was:" >&5
22498   cat conftest.$ac_ext >&5
22499   rm -fr conftest*
22500   ac_cv_func_memcmp_clean=no
22501 fi
22502 rm -fr conftest*
22503 fi
22504
22505 fi
22506
22507 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22508 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22509
22510 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22511 echo "configure:22512: checking for strftime" >&5
22512 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22513   echo $ac_n "(cached) $ac_c" 1>&6
22514 else
22515   cat > conftest.$ac_ext <<EOF
22516 #line 22517 "configure"
22517 #include "confdefs.h"
22518 /* System header to define __stub macros and hopefully few prototypes,
22519     which can conflict with char strftime(); below.  */
22520 #include <assert.h>
22521 /* Override any gcc2 internal prototype to avoid an error.  */
22522 /* We use char because int might match the return type of a gcc2
22523     builtin and then its argument prototype would still apply.  */
22524 char strftime();
22525 char (*f)();
22526
22527 int main() {
22528
22529 /* The GNU C library defines this for functions which it implements
22530     to always fail with ENOSYS.  Some functions are actually named
22531     something starting with __ and the normal name is an alias.  */
22532 #if defined (__stub_strftime) || defined (__stub___strftime)
22533 choke me
22534 #else
22535 f = strftime;
22536 #endif
22537
22538 ; return 0; }
22539 EOF
22540 if { (eval echo configure:22541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22541   rm -rf conftest*
22542   eval "ac_cv_func_strftime=yes"
22543 else
22544   echo "configure: failed program was:" >&5
22545   cat conftest.$ac_ext >&5
22546   rm -rf conftest*
22547   eval "ac_cv_func_strftime=no"
22548 fi
22549 rm -f conftest*
22550 fi
22551
22552 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22553   echo "$ac_t""yes" 1>&6
22554   cat >> confdefs.h <<\EOF
22555 #define HAVE_STRFTIME 1
22556 EOF
22557
22558 else
22559   echo "$ac_t""no" 1>&6
22560 # strftime is in -lintl on SCO UNIX.
22561 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22562 echo "configure:22563: checking for strftime in -lintl" >&5
22563 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22564 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22565   echo $ac_n "(cached) $ac_c" 1>&6
22566 else
22567   ac_save_LIBS="$LIBS"
22568 LIBS="-lintl  $LIBS"
22569 cat > conftest.$ac_ext <<EOF
22570 #line 22571 "configure"
22571 #include "confdefs.h"
22572 /* Override any gcc2 internal prototype to avoid an error.  */
22573 /* We use char because int might match the return type of a gcc2
22574     builtin and then its argument prototype would still apply.  */
22575 char strftime();
22576
22577 int main() {
22578 strftime()
22579 ; return 0; }
22580 EOF
22581 if { (eval echo configure:22582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22582   rm -rf conftest*
22583   eval "ac_cv_lib_$ac_lib_var=yes"
22584 else
22585   echo "configure: failed program was:" >&5
22586   cat conftest.$ac_ext >&5
22587   rm -rf conftest*
22588   eval "ac_cv_lib_$ac_lib_var=no"
22589 fi
22590 rm -f conftest*
22591 LIBS="$ac_save_LIBS"
22592
22593 fi
22594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22595   echo "$ac_t""yes" 1>&6
22596   cat >> confdefs.h <<\EOF
22597 #define HAVE_STRFTIME 1
22598 EOF
22599
22600 LIBS="-lintl $LIBS"
22601 else
22602   echo "$ac_t""no" 1>&6
22603 fi
22604
22605 fi
22606
22607
22608 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22609 echo "configure:22610: checking for inet_aton()" >&5
22610 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22611   echo $ac_n "(cached) $ac_c" 1>&6
22612 else
22613   cat > conftest.$ac_ext <<EOF
22614 #line 22615 "configure"
22615 #include "confdefs.h"
22616
22617 #ifdef HAVE_SYS_TYPES_H
22618 #       include <sys/types.h>
22619 #endif
22620 #ifdef HAVE_SYS_SOCKET_H
22621 #       include <sys/socket.h>
22622 #       ifdef HAVE_SYS_SELECT_H
22623 #               include <sys/select.h>
22624 #       endif
22625 #       include <netinet/in.h>
22626 #       ifdef HAVE_ARPA_INET_H
22627 #               include <arpa/inet.h>
22628 #       endif
22629 #endif
22630
22631 int main() {
22632 struct in_addr in;
22633 int rc = inet_aton( "255.255.255.255", &in );
22634 ; return 0; }
22635 EOF
22636 if { (eval echo configure:22637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22637   rm -rf conftest*
22638   ol_cv_func_inet_aton=yes
22639 else
22640   echo "configure: failed program was:" >&5
22641   cat conftest.$ac_ext >&5
22642   rm -rf conftest*
22643   ol_cv_func_inet_aton=no
22644 fi
22645 rm -f conftest*
22646 fi
22647
22648 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22649   if test $ol_cv_func_inet_aton != no; then
22650     cat >> confdefs.h <<\EOF
22651 #define HAVE_INET_ATON 1
22652 EOF
22653
22654   fi
22655  
22656
22657 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22658 echo "configure:22659: checking for _spawnlp" >&5
22659 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22660   echo $ac_n "(cached) $ac_c" 1>&6
22661 else
22662   cat > conftest.$ac_ext <<EOF
22663 #line 22664 "configure"
22664 #include "confdefs.h"
22665 /* System header to define __stub macros and hopefully few prototypes,
22666     which can conflict with char _spawnlp(); below.  */
22667 #include <assert.h>
22668 /* Override any gcc2 internal prototype to avoid an error.  */
22669 /* We use char because int might match the return type of a gcc2
22670     builtin and then its argument prototype would still apply.  */
22671 char _spawnlp();
22672 char (*f)();
22673
22674 int main() {
22675
22676 /* The GNU C library defines this for functions which it implements
22677     to always fail with ENOSYS.  Some functions are actually named
22678     something starting with __ and the normal name is an alias.  */
22679 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22680 choke me
22681 #else
22682 f = _spawnlp;
22683 #endif
22684
22685 ; return 0; }
22686 EOF
22687 if { (eval echo configure:22688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22688   rm -rf conftest*
22689   eval "ac_cv_func__spawnlp=yes"
22690 else
22691   echo "configure: failed program was:" >&5
22692   cat conftest.$ac_ext >&5
22693   rm -rf conftest*
22694   eval "ac_cv_func__spawnlp=no"
22695 fi
22696 rm -f conftest*
22697 fi
22698
22699 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22700   echo "$ac_t""yes" 1>&6
22701   cat >> confdefs.h <<\EOF
22702 #define HAVE_SPAWNLP 1
22703 EOF
22704
22705 else
22706   echo "$ac_t""no" 1>&6
22707 fi
22708
22709
22710 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22711 echo "configure:22712: checking for _snprintf" >&5
22712 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22713   echo $ac_n "(cached) $ac_c" 1>&6
22714 else
22715   cat > conftest.$ac_ext <<EOF
22716 #line 22717 "configure"
22717 #include "confdefs.h"
22718 /* System header to define __stub macros and hopefully few prototypes,
22719     which can conflict with char _snprintf(); below.  */
22720 #include <assert.h>
22721 /* Override any gcc2 internal prototype to avoid an error.  */
22722 /* We use char because int might match the return type of a gcc2
22723     builtin and then its argument prototype would still apply.  */
22724 char _snprintf();
22725 char (*f)();
22726
22727 int main() {
22728
22729 /* The GNU C library defines this for functions which it implements
22730     to always fail with ENOSYS.  Some functions are actually named
22731     something starting with __ and the normal name is an alias.  */
22732 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22733 choke me
22734 #else
22735 f = _snprintf;
22736 #endif
22737
22738 ; return 0; }
22739 EOF
22740 if { (eval echo configure:22741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22741   rm -rf conftest*
22742   eval "ac_cv_func__snprintf=yes"
22743 else
22744   echo "configure: failed program was:" >&5
22745   cat conftest.$ac_ext >&5
22746   rm -rf conftest*
22747   eval "ac_cv_func__snprintf=no"
22748 fi
22749 rm -f conftest*
22750 fi
22751
22752 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22753   echo "$ac_t""yes" 1>&6
22754   ac_cv_func_snprintf=yes
22755         cat >> confdefs.h <<\EOF
22756 #define snprintf _snprintf
22757 EOF
22758
22759
22760 else
22761   echo "$ac_t""no" 1>&6
22762 fi
22763
22764
22765 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22766 echo "configure:22767: checking for _vsnprintf" >&5
22767 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22768   echo $ac_n "(cached) $ac_c" 1>&6
22769 else
22770   cat > conftest.$ac_ext <<EOF
22771 #line 22772 "configure"
22772 #include "confdefs.h"
22773 /* System header to define __stub macros and hopefully few prototypes,
22774     which can conflict with char _vsnprintf(); below.  */
22775 #include <assert.h>
22776 /* Override any gcc2 internal prototype to avoid an error.  */
22777 /* We use char because int might match the return type of a gcc2
22778     builtin and then its argument prototype would still apply.  */
22779 char _vsnprintf();
22780 char (*f)();
22781
22782 int main() {
22783
22784 /* The GNU C library defines this for functions which it implements
22785     to always fail with ENOSYS.  Some functions are actually named
22786     something starting with __ and the normal name is an alias.  */
22787 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22788 choke me
22789 #else
22790 f = _vsnprintf;
22791 #endif
22792
22793 ; return 0; }
22794 EOF
22795 if { (eval echo configure:22796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22796   rm -rf conftest*
22797   eval "ac_cv_func__vsnprintf=yes"
22798 else
22799   echo "configure: failed program was:" >&5
22800   cat conftest.$ac_ext >&5
22801   rm -rf conftest*
22802   eval "ac_cv_func__vsnprintf=no"
22803 fi
22804 rm -f conftest*
22805 fi
22806
22807 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22808   echo "$ac_t""yes" 1>&6
22809   ac_cv_func_vsnprintf=yes
22810         cat >> confdefs.h <<\EOF
22811 #define vsnprintf _vsnprintf
22812 EOF
22813
22814
22815 else
22816   echo "$ac_t""no" 1>&6
22817 fi
22818
22819
22820 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22821 echo "configure:22822: checking for vprintf" >&5
22822 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22823   echo $ac_n "(cached) $ac_c" 1>&6
22824 else
22825   cat > conftest.$ac_ext <<EOF
22826 #line 22827 "configure"
22827 #include "confdefs.h"
22828 /* System header to define __stub macros and hopefully few prototypes,
22829     which can conflict with char vprintf(); below.  */
22830 #include <assert.h>
22831 /* Override any gcc2 internal prototype to avoid an error.  */
22832 /* We use char because int might match the return type of a gcc2
22833     builtin and then its argument prototype would still apply.  */
22834 char vprintf();
22835 char (*f)();
22836
22837 int main() {
22838
22839 /* The GNU C library defines this for functions which it implements
22840     to always fail with ENOSYS.  Some functions are actually named
22841     something starting with __ and the normal name is an alias.  */
22842 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22843 choke me
22844 #else
22845 f = vprintf;
22846 #endif
22847
22848 ; return 0; }
22849 EOF
22850 if { (eval echo configure:22851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22851   rm -rf conftest*
22852   eval "ac_cv_func_vprintf=yes"
22853 else
22854   echo "configure: failed program was:" >&5
22855   cat conftest.$ac_ext >&5
22856   rm -rf conftest*
22857   eval "ac_cv_func_vprintf=no"
22858 fi
22859 rm -f conftest*
22860 fi
22861
22862 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22863   echo "$ac_t""yes" 1>&6
22864   cat >> confdefs.h <<\EOF
22865 #define HAVE_VPRINTF 1
22866 EOF
22867
22868 else
22869   echo "$ac_t""no" 1>&6
22870 fi
22871
22872 if test "$ac_cv_func_vprintf" != yes; then
22873 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22874 echo "configure:22875: checking for _doprnt" >&5
22875 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22876   echo $ac_n "(cached) $ac_c" 1>&6
22877 else
22878   cat > conftest.$ac_ext <<EOF
22879 #line 22880 "configure"
22880 #include "confdefs.h"
22881 /* System header to define __stub macros and hopefully few prototypes,
22882     which can conflict with char _doprnt(); below.  */
22883 #include <assert.h>
22884 /* Override any gcc2 internal prototype to avoid an error.  */
22885 /* We use char because int might match the return type of a gcc2
22886     builtin and then its argument prototype would still apply.  */
22887 char _doprnt();
22888 char (*f)();
22889
22890 int main() {
22891
22892 /* The GNU C library defines this for functions which it implements
22893     to always fail with ENOSYS.  Some functions are actually named
22894     something starting with __ and the normal name is an alias.  */
22895 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22896 choke me
22897 #else
22898 f = _doprnt;
22899 #endif
22900
22901 ; return 0; }
22902 EOF
22903 if { (eval echo configure:22904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22904   rm -rf conftest*
22905   eval "ac_cv_func__doprnt=yes"
22906 else
22907   echo "configure: failed program was:" >&5
22908   cat conftest.$ac_ext >&5
22909   rm -rf conftest*
22910   eval "ac_cv_func__doprnt=no"
22911 fi
22912 rm -f conftest*
22913 fi
22914
22915 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22916   echo "$ac_t""yes" 1>&6
22917   cat >> confdefs.h <<\EOF
22918 #define HAVE_DOPRNT 1
22919 EOF
22920
22921 else
22922   echo "$ac_t""no" 1>&6
22923 fi
22924
22925 fi
22926
22927
22928 if test $ac_cv_func_vprintf = yes ; then
22929                 for ac_func in snprintf vsnprintf
22930 do
22931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22932 echo "configure:22933: checking for $ac_func" >&5
22933 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22934   echo $ac_n "(cached) $ac_c" 1>&6
22935 else
22936   cat > conftest.$ac_ext <<EOF
22937 #line 22938 "configure"
22938 #include "confdefs.h"
22939 /* System header to define __stub macros and hopefully few prototypes,
22940     which can conflict with char $ac_func(); below.  */
22941 #include <assert.h>
22942 /* Override any gcc2 internal prototype to avoid an error.  */
22943 /* We use char because int might match the return type of a gcc2
22944     builtin and then its argument prototype would still apply.  */
22945 char $ac_func();
22946 char (*f)();
22947
22948 int main() {
22949
22950 /* The GNU C library defines this for functions which it implements
22951     to always fail with ENOSYS.  Some functions are actually named
22952     something starting with __ and the normal name is an alias.  */
22953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22954 choke me
22955 #else
22956 f = $ac_func;
22957 #endif
22958
22959 ; return 0; }
22960 EOF
22961 if { (eval echo configure:22962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22962   rm -rf conftest*
22963   eval "ac_cv_func_$ac_func=yes"
22964 else
22965   echo "configure: failed program was:" >&5
22966   cat conftest.$ac_ext >&5
22967   rm -rf conftest*
22968   eval "ac_cv_func_$ac_func=no"
22969 fi
22970 rm -f conftest*
22971 fi
22972
22973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22974   echo "$ac_t""yes" 1>&6
22975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22976   cat >> confdefs.h <<EOF
22977 #define $ac_tr_func 1
22978 EOF
22979  
22980 else
22981   echo "$ac_t""no" 1>&6
22982 fi
22983 done
22984
22985 fi
22986
22987 for ac_func in \
22988         bcopy                   \
22989         closesocket             \
22990         chroot                  \
22991         endgrent                \
22992         endpwent                \
22993         fcntl                   \
22994         flock                   \
22995         fstat                   \
22996         getdtablesize   \
22997         getgrgid                \
22998         gethostname             \
22999         getpass                 \
23000         getpassphrase   \
23001         getpwuid                \
23002         getpwnam                \
23003         getspnam                \
23004         gettimeofday    \
23005         initgroups              \
23006         lockf                   \
23007         memcpy                  \
23008         memmove                 \
23009         mkstemp                 \
23010         mktemp                  \
23011         pipe                    \
23012         read                    \
23013         recv                    \
23014         recvfrom                \
23015         setpwfile               \
23016         setgid                  \
23017         setegid                 \
23018         setsid                  \
23019         setuid                  \
23020         seteuid                 \
23021         sigaction               \
23022         signal                  \
23023         sigset                  \
23024         strdup                  \
23025         strerror                \
23026         strpbrk                 \
23027         strrchr                 \
23028         strsep                  \
23029         strstr                  \
23030         strtol                  \
23031         strtoul                 \
23032         strtoq                  \
23033         strtouq                 \
23034         strtoll                 \
23035         strspn                  \
23036         sysconf                 \
23037         usleep                  \
23038         waitpid                 \
23039         wait4                   \
23040         write                   \
23041         send                    \
23042         sendmsg                 \
23043         sendto                  \
23044
23045 do
23046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23047 echo "configure:23048: checking for $ac_func" >&5
23048 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23049   echo $ac_n "(cached) $ac_c" 1>&6
23050 else
23051   cat > conftest.$ac_ext <<EOF
23052 #line 23053 "configure"
23053 #include "confdefs.h"
23054 /* System header to define __stub macros and hopefully few prototypes,
23055     which can conflict with char $ac_func(); below.  */
23056 #include <assert.h>
23057 /* Override any gcc2 internal prototype to avoid an error.  */
23058 /* We use char because int might match the return type of a gcc2
23059     builtin and then its argument prototype would still apply.  */
23060 char $ac_func();
23061 char (*f)();
23062
23063 int main() {
23064
23065 /* The GNU C library defines this for functions which it implements
23066     to always fail with ENOSYS.  Some functions are actually named
23067     something starting with __ and the normal name is an alias.  */
23068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23069 choke me
23070 #else
23071 f = $ac_func;
23072 #endif
23073
23074 ; return 0; }
23075 EOF
23076 if { (eval echo configure:23077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23077   rm -rf conftest*
23078   eval "ac_cv_func_$ac_func=yes"
23079 else
23080   echo "configure: failed program was:" >&5
23081   cat conftest.$ac_ext >&5
23082   rm -rf conftest*
23083   eval "ac_cv_func_$ac_func=no"
23084 fi
23085 rm -f conftest*
23086 fi
23087
23088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23089   echo "$ac_t""yes" 1>&6
23090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23091   cat >> confdefs.h <<EOF
23092 #define $ac_tr_func 1
23093 EOF
23094  
23095 else
23096   echo "$ac_t""no" 1>&6
23097 fi
23098 done
23099
23100
23101 for ac_func in getopt getpeereid
23102 do
23103 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23104 echo "configure:23105: checking for $ac_func" >&5
23105 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23106   echo $ac_n "(cached) $ac_c" 1>&6
23107 else
23108   cat > conftest.$ac_ext <<EOF
23109 #line 23110 "configure"
23110 #include "confdefs.h"
23111 /* System header to define __stub macros and hopefully few prototypes,
23112     which can conflict with char $ac_func(); below.  */
23113 #include <assert.h>
23114 /* Override any gcc2 internal prototype to avoid an error.  */
23115 /* We use char because int might match the return type of a gcc2
23116     builtin and then its argument prototype would still apply.  */
23117 char $ac_func();
23118 char (*f)();
23119
23120 int main() {
23121
23122 /* The GNU C library defines this for functions which it implements
23123     to always fail with ENOSYS.  Some functions are actually named
23124     something starting with __ and the normal name is an alias.  */
23125 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23126 choke me
23127 #else
23128 f = $ac_func;
23129 #endif
23130
23131 ; return 0; }
23132 EOF
23133 if { (eval echo configure:23134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23134   rm -rf conftest*
23135   eval "ac_cv_func_$ac_func=yes"
23136 else
23137   echo "configure: failed program was:" >&5
23138   cat conftest.$ac_ext >&5
23139   rm -rf conftest*
23140   eval "ac_cv_func_$ac_func=no"
23141 fi
23142 rm -f conftest*
23143 fi
23144
23145 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23146   echo "$ac_t""yes" 1>&6
23147     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23148   cat >> confdefs.h <<EOF
23149 #define $ac_tr_func 1
23150 EOF
23151  
23152 else
23153   echo "$ac_t""no" 1>&6
23154 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23155 fi
23156 done
23157
23158
23159
23160 if test "$ac_cv_func_getopt" != yes; then
23161         LIBSRCS="$LIBSRCS getopt.c"
23162 fi
23163 if test "$ac_cv_func_getpeereid" != yes; then
23164         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23165 echo "configure:23166: checking for msg_accrights in msghdr" >&5
23166 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23167   echo $ac_n "(cached) $ac_c" 1>&6
23168 else
23169   cat > conftest.$ac_ext <<EOF
23170 #line 23171 "configure"
23171 #include "confdefs.h"
23172 #include <sys/socket.h>
23173 int main() {
23174 struct msghdr m; m.msg_accrightslen=0
23175 ; return 0; }
23176 EOF
23177 if { (eval echo configure:23178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23178   rm -rf conftest*
23179   ol_cv_msghdr_msg_accrights=yes
23180 else
23181   echo "configure: failed program was:" >&5
23182   cat conftest.$ac_ext >&5
23183   rm -rf conftest*
23184   ol_cv_msghdr_msg_accrights=no
23185 fi
23186 rm -f conftest*
23187         
23188 fi
23189
23190 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23191   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23192         cat >> confdefs.h <<\EOF
23193 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23194 EOF
23195
23196   fi
23197
23198         LIBSRCS="$LIBSRCS getpeereid.c"
23199 fi
23200 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23201         if test "$ac_cv_func_snprintf" != yes; then
23202                 cat >> confdefs.h <<\EOF
23203 #define snprintf ber_pvt_snprintf
23204 EOF
23205
23206         fi
23207         if test "$ac_cv_func_vsnprintf" != yes; then
23208                 cat >> confdefs.h <<\EOF
23209 #define vsnprintf ber_pvt_vsnprintf
23210 EOF
23211
23212         fi
23213 fi
23214
23215 # Check Configuration
23216 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23217 echo "configure:23218: checking declaration of sys_errlist" >&5
23218 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23219   echo $ac_n "(cached) $ac_c" 1>&6
23220 else
23221   
23222         cat > conftest.$ac_ext <<EOF
23223 #line 23224 "configure"
23224 #include "confdefs.h"
23225
23226 #include <stdio.h>
23227 #include <sys/types.h>
23228 #include <errno.h>
23229 #ifdef WINNT
23230 #include <stdlib.h>
23231 #endif 
23232 int main() {
23233 char *c = (char *) *sys_errlist
23234 ; return 0; }
23235 EOF
23236 if { (eval echo configure:23237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23237   rm -rf conftest*
23238   ol_cv_dcl_sys_errlist=yes
23239         ol_cv_have_sys_errlist=yes
23240 else
23241   echo "configure: failed program was:" >&5
23242   cat conftest.$ac_ext >&5
23243   rm -rf conftest*
23244   ol_cv_dcl_sys_errlist=no
23245 fi
23246 rm -f conftest*
23247 fi
23248
23249 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23250 #
23251 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23252 if test $ol_cv_dcl_sys_errlist = no ; then
23253         cat >> confdefs.h <<\EOF
23254 #define DECL_SYS_ERRLIST 1
23255 EOF
23256
23257
23258         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23259 echo "configure:23260: checking existence of sys_errlist" >&5
23260 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23261   echo $ac_n "(cached) $ac_c" 1>&6
23262 else
23263   
23264                 cat > conftest.$ac_ext <<EOF
23265 #line 23266 "configure"
23266 #include "confdefs.h"
23267 #include <errno.h>
23268 int main() {
23269 char *c = (char *) *sys_errlist
23270 ; return 0; }
23271 EOF
23272 if { (eval echo configure:23273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23273   rm -rf conftest*
23274   ol_cv_have_sys_errlist=yes
23275 else
23276   echo "configure: failed program was:" >&5
23277   cat conftest.$ac_ext >&5
23278   rm -rf conftest*
23279   ol_cv_have_sys_errlist=no
23280 fi
23281 rm -f conftest*
23282 fi
23283
23284 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23285 fi
23286 if test $ol_cv_have_sys_errlist = yes ; then
23287         cat >> confdefs.h <<\EOF
23288 #define HAVE_SYS_ERRLIST 1
23289 EOF
23290
23291 fi
23292
23293
23294
23295 if test "$ol_enable_slapi" != no ; then
23296                         for ac_hdr in ltdl.h
23297 do
23298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23300 echo "configure:23301: checking for $ac_hdr" >&5
23301 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23302   echo $ac_n "(cached) $ac_c" 1>&6
23303 else
23304   cat > conftest.$ac_ext <<EOF
23305 #line 23306 "configure"
23306 #include "confdefs.h"
23307 #include <$ac_hdr>
23308 EOF
23309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23310 { (eval echo configure:23311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23312 if test -z "$ac_err"; then
23313   rm -rf conftest*
23314   eval "ac_cv_header_$ac_safe=yes"
23315 else
23316   echo "$ac_err" >&5
23317   echo "configure: failed program was:" >&5
23318   cat conftest.$ac_ext >&5
23319   rm -rf conftest*
23320   eval "ac_cv_header_$ac_safe=no"
23321 fi
23322 rm -f conftest*
23323 fi
23324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23325   echo "$ac_t""yes" 1>&6
23326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23327   cat >> confdefs.h <<EOF
23328 #define $ac_tr_hdr 1
23329 EOF
23330  
23331 else
23332   echo "$ac_t""no" 1>&6
23333 fi
23334 done
23335
23336
23337         if test $ac_cv_header_ltdl_h != yes ; then
23338                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23339         fi
23340         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23341 echo "configure:23342: checking for lt_dlinit in -lltdl" >&5
23342 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23344   echo $ac_n "(cached) $ac_c" 1>&6
23345 else
23346   ac_save_LIBS="$LIBS"
23347 LIBS="-lltdl  $LIBS"
23348 cat > conftest.$ac_ext <<EOF
23349 #line 23350 "configure"
23350 #include "confdefs.h"
23351 /* Override any gcc2 internal prototype to avoid an error.  */
23352 /* We use char because int might match the return type of a gcc2
23353     builtin and then its argument prototype would still apply.  */
23354 char lt_dlinit();
23355
23356 int main() {
23357 lt_dlinit()
23358 ; return 0; }
23359 EOF
23360 if { (eval echo configure:23361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23361   rm -rf conftest*
23362   eval "ac_cv_lib_$ac_lib_var=yes"
23363 else
23364   echo "configure: failed program was:" >&5
23365   cat conftest.$ac_ext >&5
23366   rm -rf conftest*
23367   eval "ac_cv_lib_$ac_lib_var=no"
23368 fi
23369 rm -f conftest*
23370 LIBS="$ac_save_LIBS"
23371
23372 fi
23373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23374   echo "$ac_t""yes" 1>&6
23375   
23376                 SLAPI_LIBS=-lltdl
23377                 LIBSLAPI=libslapi.a
23378                 LIBSLAPITOOLS=../libslapi.a
23379                 cat >> confdefs.h <<\EOF
23380 #define HAVE_LIBLTDL 1
23381 EOF
23382
23383         
23384 else
23385   echo "$ac_t""no" 1>&6
23386 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23387 fi
23388
23389
23390         cat >> confdefs.h <<\EOF
23391 #define LDAP_SLAPI 1
23392 EOF
23393
23394 fi
23395
23396 if test "$ol_enable_debug" != no ; then
23397         cat >> confdefs.h <<\EOF
23398 #define LDAP_DEBUG 1
23399 EOF
23400
23401 fi
23402 if test "$ol_enable_syslog" = yes ; then
23403         cat >> confdefs.h <<\EOF
23404 #define LDAP_SYSLOG 1
23405 EOF
23406
23407 fi
23408 if test "$ol_link_kbind" != no ; then
23409         cat >> confdefs.h <<\EOF
23410 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23411 EOF
23412
23413 fi
23414 if test "$ol_enable_proctitle" != no ; then
23415         cat >> confdefs.h <<\EOF
23416 #define LDAP_PROCTITLE 1
23417 EOF
23418
23419 fi
23420 if test "$ol_enable_referrals" != no ; then
23421         cat >> confdefs.h <<\EOF
23422 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23423 EOF
23424
23425 fi
23426 if test "$ol_enable_local" != no; then
23427         cat >> confdefs.h <<\EOF
23428 #define LDAP_PF_LOCAL 1
23429 EOF
23430
23431 fi
23432 if test "$ol_link_ipv6" != no; then
23433         cat >> confdefs.h <<\EOF
23434 #define LDAP_PF_INET6 1
23435 EOF
23436
23437 fi
23438 if test "$ol_enable_cleartext" != no ; then
23439         cat >> confdefs.h <<\EOF
23440 #define SLAPD_CLEARTEXT 1
23441 EOF
23442
23443 fi
23444 if test "$ol_enable_crypt" != no ; then
23445         cat >> confdefs.h <<\EOF
23446 #define SLAPD_CRYPT 1
23447 EOF
23448
23449 fi
23450 if test "$ol_link_spasswd" != no ; then
23451         cat >> confdefs.h <<\EOF
23452 #define SLAPD_SPASSWD 1
23453 EOF
23454
23455 fi
23456 if test "$ol_enable_multimaster" != no ; then
23457         cat >> confdefs.h <<\EOF
23458 #define SLAPD_MULTIMASTER 1
23459 EOF
23460
23461 fi
23462 if test "$ol_enable_rlookups" != no ; then
23463         cat >> confdefs.h <<\EOF
23464 #define SLAPD_RLOOKUPS 1
23465 EOF
23466
23467 fi
23468 if test "$ol_enable_aci" != no ; then
23469         cat >> confdefs.h <<\EOF
23470 #define SLAPD_ACI_ENABLED 1
23471 EOF
23472
23473 fi
23474
23475 if test "$ol_link_modules" != no ; then
23476         cat >> confdefs.h <<\EOF
23477 #define SLAPD_MODULES 1
23478 EOF
23479
23480         BUILD_SLAPD=yes
23481         SLAPD_MODULES_LDFLAGS="-dlopen self"
23482 fi
23483
23484 cat >> confdefs.h <<\EOF
23485 #define SLAPD_MOD_STATIC 1
23486 EOF
23487
23488 cat >> confdefs.h <<\EOF
23489 #define SLAPD_MOD_DYNAMIC 2
23490 EOF
23491
23492
23493 if test "$ol_enable_bdb" != no ; then
23494         cat >> confdefs.h <<\EOF
23495 #define SLAPD_BDB 1
23496 EOF
23497
23498         BUILD_SLAPD=yes
23499         BUILD_BDB=yes
23500         if test "$ol_with_bdb_module" != static ; then
23501                 cat >> confdefs.h <<\EOF
23502 #define SLAPD_BDB_DYNAMIC 1
23503 EOF
23504
23505                 BUILD_BDB=mod
23506                 BUILD_BDB_DYNAMIC=shared
23507                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23508         else
23509                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23510         fi
23511 fi
23512
23513 if test "$ol_link_dnssrv" != no ; then
23514         cat >> confdefs.h <<\EOF
23515 #define SLAPD_DNSSRV 1
23516 EOF
23517
23518         BUILD_SLAPD=yes
23519         BUILD_DNSSRV=yes
23520         if test "$ol_with_dnssrv_module" != static ; then
23521                 cat >> confdefs.h <<\EOF
23522 #define SLAPD_DNSSRV_DYNAMIC 1
23523 EOF
23524
23525                 BUILD_DNSSRV=mod
23526                 BUILD_DNSSRV_DYNAMIC=shared
23527                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23528         else
23529                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23530         fi
23531 fi
23532
23533 if test "$ol_enable_hdb" != no ; then
23534         cat >> confdefs.h <<\EOF
23535 #define SLAPD_HDB 1
23536 EOF
23537
23538         BUILD_SLAPD=yes
23539         BUILD_HDB=yes
23540         if test "$ol_with_hdb_module" != static ; then
23541                 cat >> confdefs.h <<\EOF
23542 #define SLAPD_HDB_DYNAMIC 1
23543 EOF
23544
23545                 BUILD_HDB=mod
23546                 BUILD_HDB_DYNAMIC=shared
23547                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23548         else
23549                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23550         fi
23551 fi
23552
23553 if test "$ol_enable_ldap" != no ; then
23554         cat >> confdefs.h <<\EOF
23555 #define SLAPD_LDAP 1
23556 EOF
23557
23558         BUILD_SLAPD=yes
23559         BUILD_LDAP=yes
23560         if test "$ol_with_ldap_module" != static ; then
23561                 cat >> confdefs.h <<\EOF
23562 #define SLAPD_LDAP_DYNAMIC 1
23563 EOF
23564
23565                 BUILD_LDAP=mod
23566                 BUILD_LDAP_DYNAMIC=shared
23567                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23568         else
23569                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23570         fi
23571 fi
23572
23573 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23574         cat >> confdefs.h <<\EOF
23575 #define SLAPD_LDBM 1
23576 EOF
23577
23578         BUILD_SLAPD=yes
23579         BUILD_LDBM=yes
23580         if test "$ol_with_ldbm_module" != static ; then
23581                 cat >> confdefs.h <<\EOF
23582 #define SLAPD_LDBM_DYNAMIC 1
23583 EOF
23584
23585                 BUILD_LDBM=mod
23586                 BUILD_LDBM_DYNAMIC=shared
23587                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23588         else
23589                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23590         fi
23591 fi
23592
23593 if test "$ol_enable_meta" != no ; then
23594         if test "$ol_enable_ldap" = no ; then
23595                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23596         fi
23597         if test "$ol_enable_rewrite" = no ; then
23598                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23599         fi
23600         cat >> confdefs.h <<\EOF
23601 #define SLAPD_META 1
23602 EOF
23603
23604         BUILD_SLAPD=yes
23605         BUILD_META=yes
23606         BUILD_REWRITE=yes
23607         if test "$ol_with_meta_module" != static ; then
23608                 cat >> confdefs.h <<\EOF
23609 #define SLAPD_META_DYNAMIC 1
23610 EOF
23611
23612                 BUILD_META=mod
23613                 BUILD_META_DYNAMIC=shared
23614                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23615         else
23616                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23617         fi
23618 fi
23619
23620 if test "$ol_enable_monitor" != no ; then
23621         cat >> confdefs.h <<\EOF
23622 #define SLAPD_MONITOR 1
23623 EOF
23624
23625         BUILD_SLAPD=yes
23626         BUILD_MONITOR=yes
23627         if test "$ol_with_monitor_module" != static ; then
23628                 cat >> confdefs.h <<\EOF
23629 #define SLAPD_MONITOR_DYNAMIC 1
23630 EOF
23631
23632                 BUILD_MONITOR=mod
23633                 BUILD_MONITOR_DYNAMIC=shared
23634                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23635         else
23636                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23637         fi
23638 fi
23639
23640 if test "$ol_enable_null" != no ; then
23641         cat >> confdefs.h <<\EOF
23642 #define SLAPD_NULL 1
23643 EOF
23644
23645         BUILD_SLAPD=yes
23646         BUILD_NULL=yes
23647         if test "$ol_with_null_module" != static ; then
23648                 cat >> confdefs.h <<\EOF
23649 #define SLAPD_NULL_DYNAMIC 1
23650 EOF
23651
23652                 BUILD_NULL=mod
23653                 BUILD_NULL_DYNAMIC=shared
23654                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23655         else
23656                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23657         fi
23658 fi
23659
23660 if test "$ol_enable_passwd" != no ; then
23661         cat >> confdefs.h <<\EOF
23662 #define SLAPD_PASSWD 1
23663 EOF
23664
23665         BUILD_SLAPD=yes
23666         BUILD_PASSWD=yes
23667         if test "$ol_with_passwd_module" != static ; then
23668                 cat >> confdefs.h <<\EOF
23669 #define SLAPD_PASSWD_DYNAMIC 1
23670 EOF
23671
23672                 BUILD_PASSWD=mod
23673                 BUILD_PASSWD_DYNAMIC=shared
23674                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23675         else
23676                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23677         fi
23678 fi
23679
23680 if test "$ol_link_perl" != no ; then
23681         cat >> confdefs.h <<\EOF
23682 #define SLAPD_PERL 1
23683 EOF
23684
23685         BUILD_SLAPD=yes
23686         BUILD_PERL=yes
23687         if test "$ol_with_perl_module" != static ; then
23688                 cat >> confdefs.h <<\EOF
23689 #define SLAPD_PERL_DYNAMIC 1
23690 EOF
23691
23692                 BUILD_PERL=mod
23693                 BUILD_PERL_DYNAMIC=shared
23694                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23695         else
23696                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23697         fi
23698 fi
23699
23700 if test "$ol_enable_shell" != no ; then
23701         if test "$ol_link_thread" != no ; then
23702                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23703         fi
23704         cat >> confdefs.h <<\EOF
23705 #define SLAPD_SHELL 1
23706 EOF
23707
23708         BUILD_SLAPD=yes
23709         BUILD_SHELL=yes
23710         if test "$ol_with_shell_module" != static ; then
23711                 cat >> confdefs.h <<\EOF
23712 #define SLAPD_SHELL_DYNAMIC 1
23713 EOF
23714
23715                 BUILD_SHELL=mod
23716                 BUILD_SHELL_DYNAMIC=shared
23717                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23718         else
23719                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23720         fi
23721 fi
23722
23723 if test "$ol_link_sql" != no ; then
23724         cat >> confdefs.h <<\EOF
23725 #define SLAPD_SQL 1
23726 EOF
23727
23728         BUILD_SLAPD=yes
23729         BUILD_SQL=yes
23730         if test "$ol_with_sql_module" != static; then
23731                 cat >> confdefs.h <<\EOF
23732 #define SLAPD_SQL_DYNAMIC 1
23733 EOF
23734
23735                 BUILD_SQL=mod
23736                 BUILD_SQL_DYNAMIC=shared
23737                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23738         else
23739                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23740         fi
23741 fi
23742
23743 if test "$ol_with_dyngroup" != no ; then
23744         BUILD_DYNGROUP=$ol_with_dyngroup
23745         if test "$ol_with_dyngroup" = mod ; then
23746                 MFLAG=SLAPD_MOD_DYNAMIC
23747                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23748         else
23749                 MFLAG=SLAPD_MOD_STATIC
23750         fi
23751         cat >> confdefs.h <<EOF
23752 #define SLAPD_OVER_DYNGROUP $MFLAG
23753 EOF
23754
23755 fi
23756
23757 if test "$ol_with_proxycache" != no ; then
23758         BUILD_PROXYCACHE=$ol_with_proxycache
23759         if test "$ol_with_proxycache" = mod ; then
23760                 MFLAG=SLAPD_MOD_DYNAMIC
23761                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23762         else
23763                 MFLAG=SLAPD_MOD_STATIC
23764         fi
23765         cat >> confdefs.h <<EOF
23766 #define SLAPD_OVER_PROXYCACHE $MFLAG
23767 EOF
23768
23769 fi
23770
23771 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23772         $BUILD_SLAPD = yes ; then
23773         BUILD_SLURPD=yes
23774 fi
23775
23776 if test "$ol_enable_rewrite" != no ; then
23777         cat >> confdefs.h <<\EOF
23778 #define ENABLE_REWRITE 1
23779 EOF
23780
23781         BUILD_REWRITE=yes
23782 fi
23783
23784 if test "$ol_enable_slapi" != no ; then
23785         cat >> confdefs.h <<\EOF
23786 #define ENABLE_SLAPI 1
23787 EOF
23788
23789         BUILD_SLAPI=yes
23790         SLAPD_SLAPI_DEPEND=libslapi.a
23791 fi
23792
23793
23794
23795 if test "$ac_cv_mingw32" = yes ; then
23796         PLAT=NT
23797         SLAPD_MODULES_LDFLAGS=
23798 else
23799         PLAT=UNIX
23800 fi
23801
23802 if test -z "$SLAPD_STATIC_BACKENDS"; then
23803         SLAPD_NO_STATIC='#'
23804 else
23805         SLAPD_NO_STATIC=
23806 fi
23807
23808
23809
23810
23811
23812
23813
23814   
23815   
23816   
23817   
23818   
23819   
23820   
23821   
23822   
23823   
23824   
23825   
23826   
23827   
23828   
23829   
23830   
23831   
23832   
23833   
23834   
23835   
23836   
23837   
23838   
23839   
23840   
23841   
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880 # Check whether --with-xxinstall or --without-xxinstall was given.
23881 if test "${with_xxinstall+set}" = set; then
23882   withval="$with_xxinstall"
23883   :
23884 fi
23885
23886
23887
23888 trap '' 1 2 15
23889
23890 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23891
23892 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23893 # Let make expand exec_prefix.
23894 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23895
23896 # Any assignment to VPATH causes Sun make to only execute
23897 # the first set of double-colon rules, so remove it if not needed.
23898 # If there is a colon in the path, we need to keep it.
23899 if test "x$srcdir" = x.; then
23900   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23901 fi
23902
23903 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23904
23905 DEFS=-DHAVE_CONFIG_H
23906
23907 # Without the "./", some shells look in PATH for config.status.
23908 : ${CONFIG_STATUS=./config.status}
23909
23910 echo creating $CONFIG_STATUS
23911 rm -f $CONFIG_STATUS
23912 cat > $CONFIG_STATUS <<EOF
23913 #! /bin/sh
23914 # Generated automatically by configure.
23915 # Run this file to recreate the current configuration.
23916 # This directory was configured as follows,
23917 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23918 #
23919 # $0 $ac_configure_args
23920 #
23921 # Compiler output produced by configure, useful for debugging
23922 # configure, is in ./config.log if it exists.
23923
23924 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23925 for ac_option
23926 do
23927   case "\$ac_option" in
23928   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23929     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23930     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23931   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23932     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23933     exit 0 ;;
23934   -help | --help | --hel | --he | --h)
23935     echo "\$ac_cs_usage"; exit 0 ;;
23936   *) echo "\$ac_cs_usage"; exit 1 ;;
23937   esac
23938 done
23939
23940 ac_given_srcdir=$srcdir
23941 ac_given_INSTALL="$INSTALL"
23942
23943 trap 'rm -fr `echo "\
23944 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23945 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23946 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23947 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23948 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23949 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23950 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23951 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23952 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23953 include/Makefile:build/top.mk:include/Makefile.in \
23954 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23955 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23956 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23957 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23958 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23959 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23960 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23961 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23962 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23963 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23964 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23965 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23966 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23967 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23968 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23969 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23970 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23971 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23972 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23973 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23974 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23975 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23976 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23977 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23978 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23979 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23980 tests/run \
23981 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23982  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23983 EOF
23984 cat >> $CONFIG_STATUS <<EOF
23985
23986 # Protect against being on the right side of a sed subst in config.status.
23987 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23988  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23989 $ac_vpsub
23990 $extrasub
23991 s%@SHELL@%$SHELL%g
23992 s%@CFLAGS@%$CFLAGS%g
23993 s%@CPPFLAGS@%$CPPFLAGS%g
23994 s%@CXXFLAGS@%$CXXFLAGS%g
23995 s%@FFLAGS@%$FFLAGS%g
23996 s%@DEFS@%$DEFS%g
23997 s%@LDFLAGS@%$LDFLAGS%g
23998 s%@LIBS@%$LIBS%g
23999 s%@exec_prefix@%$exec_prefix%g
24000 s%@prefix@%$prefix%g
24001 s%@program_transform_name@%$program_transform_name%g
24002 s%@bindir@%$bindir%g
24003 s%@sbindir@%$sbindir%g
24004 s%@libexecdir@%$libexecdir%g
24005 s%@datadir@%$datadir%g
24006 s%@sysconfdir@%$sysconfdir%g
24007 s%@sharedstatedir@%$sharedstatedir%g
24008 s%@localstatedir@%$localstatedir%g
24009 s%@libdir@%$libdir%g
24010 s%@includedir@%$includedir%g
24011 s%@oldincludedir@%$oldincludedir%g
24012 s%@infodir@%$infodir%g
24013 s%@mandir@%$mandir%g
24014 s%@host@%$host%g
24015 s%@host_alias@%$host_alias%g
24016 s%@host_cpu@%$host_cpu%g
24017 s%@host_vendor@%$host_vendor%g
24018 s%@host_os@%$host_os%g
24019 s%@target@%$target%g
24020 s%@target_alias@%$target_alias%g
24021 s%@target_cpu@%$target_cpu%g
24022 s%@target_vendor@%$target_vendor%g
24023 s%@target_os@%$target_os%g
24024 s%@build@%$build%g
24025 s%@build_alias@%$build_alias%g
24026 s%@build_cpu@%$build_cpu%g
24027 s%@build_vendor@%$build_vendor%g
24028 s%@build_os@%$build_os%g
24029 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24030 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24031 s%@INSTALL_DATA@%$INSTALL_DATA%g
24032 s%@PACKAGE@%$PACKAGE%g
24033 s%@VERSION@%$VERSION%g
24034 s%@ACLOCAL@%$ACLOCAL%g
24035 s%@AUTOCONF@%$AUTOCONF%g
24036 s%@AUTOMAKE@%$AUTOMAKE%g
24037 s%@AUTOHEADER@%$AUTOHEADER%g
24038 s%@MAKEINFO@%$MAKEINFO%g
24039 s%@install_sh@%$install_sh%g
24040 s%@AMTAR@%$AMTAR%g
24041 s%@AWK@%$AWK%g
24042 s%@AMTARFLAGS@%$AMTARFLAGS%g
24043 s%@SET_MAKE@%$SET_MAKE%g
24044 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24045 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24046 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24047 s%@top_builddir@%$top_builddir%g
24048 s%@ldap_subdir@%$ldap_subdir%g
24049 s%@CC@%$CC%g
24050 s%@AR@%$AR%g
24051 s%@LN_S@%$LN_S%g
24052 s%@OBJEXT@%$OBJEXT%g
24053 s%@EXEEXT@%$EXEEXT%g
24054 s%@ECHO@%$ECHO%g
24055 s%@RANLIB@%$RANLIB%g
24056 s%@STRIP@%$STRIP%g
24057 s%@DLLTOOL@%$DLLTOOL%g
24058 s%@AS@%$AS%g
24059 s%@OBJDUMP@%$OBJDUMP%g
24060 s%@CPP@%$CPP%g
24061 s%@LIBTOOL@%$LIBTOOL%g
24062 s%@LN_H@%$LN_H%g
24063 s%@PERLBIN@%$PERLBIN%g
24064 s%@OL_MKDEP@%$OL_MKDEP%g
24065 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24066 s%@LTSTATIC@%$LTSTATIC%g
24067 s%@LIBOBJS@%$LIBOBJS%g
24068 s%@LIBSRCS@%$LIBSRCS%g
24069 s%@PLAT@%$PLAT%g
24070 s%@WITH_TLS@%$WITH_TLS%g
24071 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24072 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24073 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24074 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24075 s%@BUILD_BDB@%$BUILD_BDB%g
24076 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24077 s%@BUILD_HDB@%$BUILD_HDB%g
24078 s%@BUILD_LDAP@%$BUILD_LDAP%g
24079 s%@BUILD_LDBM@%$BUILD_LDBM%g
24080 s%@BUILD_META@%$BUILD_META%g
24081 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24082 s%@BUILD_NULL@%$BUILD_NULL%g
24083 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24084 s%@BUILD_PERL@%$BUILD_PERL%g
24085 s%@BUILD_SHELL@%$BUILD_SHELL%g
24086 s%@BUILD_SQL@%$BUILD_SQL%g
24087 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24088 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24089 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24090 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24091 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24092 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24093 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24094 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24095 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24096 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24097 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24098 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24099 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24100 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24101 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24102 s%@LDAP_LIBS@%$LDAP_LIBS%g
24103 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24104 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24105 s%@LDBM_LIBS@%$LDBM_LIBS%g
24106 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24107 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24108 s%@WRAP_LIBS@%$WRAP_LIBS%g
24109 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24110 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24111 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24112 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24113 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24114 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24115 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24116 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24117 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24118 s%@KRB4_LIBS@%$KRB4_LIBS%g
24119 s%@KRB5_LIBS@%$KRB5_LIBS%g
24120 s%@SASL_LIBS@%$SASL_LIBS%g
24121 s%@TLS_LIBS@%$TLS_LIBS%g
24122 s%@MODULES_LIBS@%$MODULES_LIBS%g
24123 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24124 s%@LIBSLAPI@%$LIBSLAPI%g
24125 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24126 s%@AUTH_LIBS@%$AUTH_LIBS%g
24127 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24128 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24129 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24130 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24131
24132 CEOF
24133 EOF
24134
24135 cat >> $CONFIG_STATUS <<\EOF
24136
24137 # Split the substitutions into bite-sized pieces for seds with
24138 # small command number limits, like on Digital OSF/1 and HP-UX.
24139 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24140 ac_file=1 # Number of current file.
24141 ac_beg=1 # First line for current file.
24142 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24143 ac_more_lines=:
24144 ac_sed_cmds=""
24145 while $ac_more_lines; do
24146   if test $ac_beg -gt 1; then
24147     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24148   else
24149     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24150   fi
24151   if test ! -s conftest.s$ac_file; then
24152     ac_more_lines=false
24153     rm -f conftest.s$ac_file
24154   else
24155     if test -z "$ac_sed_cmds"; then
24156       ac_sed_cmds="sed -f conftest.s$ac_file"
24157     else
24158       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24159     fi
24160     ac_file=`expr $ac_file + 1`
24161     ac_beg=$ac_end
24162     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24163   fi
24164 done
24165 if test -z "$ac_sed_cmds"; then
24166   ac_sed_cmds=cat
24167 fi
24168 EOF
24169
24170 cat >> $CONFIG_STATUS <<EOF
24171
24172 CONFIG_FILES=\${CONFIG_FILES-"\
24173 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24174 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24175 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24176 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24177 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24178 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24179 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24180 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24181 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24182 include/Makefile:build/top.mk:include/Makefile.in \
24183 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24184 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24185 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24186 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24187 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24188 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24189 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24190 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24191 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24192 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24193 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24194 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24195 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24196 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24197 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24198 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24199 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24200 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24201 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24202 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24203 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24204 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24205 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24206 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24207 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24208 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24209 tests/run \
24210 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24211 "}
24212 EOF
24213 cat >> $CONFIG_STATUS <<\EOF
24214 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24215   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24216   case "$ac_file" in
24217   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24218        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24219   *) ac_file_in="${ac_file}.in" ;;
24220   esac
24221
24222   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24223
24224   # Remove last slash and all that follows it.  Not all systems have dirname.
24225   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24226   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24227     # The file is in a subdirectory.
24228     test ! -d "$ac_dir" && mkdir "$ac_dir"
24229     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24230     # A "../" for each directory in $ac_dir_suffix.
24231     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24232   else
24233     ac_dir_suffix= ac_dots=
24234   fi
24235
24236   case "$ac_given_srcdir" in
24237   .)  srcdir=.
24238       if test -z "$ac_dots"; then top_srcdir=.
24239       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24240   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24241   *) # Relative path.
24242     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24243     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24244   esac
24245
24246   case "$ac_given_INSTALL" in
24247   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24248   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24249   esac
24250
24251   echo creating "$ac_file"
24252   rm -f "$ac_file"
24253   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24254   case "$ac_file" in
24255   *[Mm]akefile*) ac_comsub="1i\\
24256 # $configure_input" ;;
24257   *) ac_comsub= ;;
24258   esac
24259
24260   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24261   sed -e "$ac_comsub
24262 s%@configure_input@%$configure_input%g
24263 s%@srcdir@%$srcdir%g
24264 s%@top_srcdir@%$top_srcdir%g
24265 s%@INSTALL@%$INSTALL%g
24266 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24267 fi; done
24268 rm -f conftest.s*
24269
24270 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24271 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24272 #
24273 # ac_d sets the value in "#define NAME VALUE" lines.
24274 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24275 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24276 ac_dC='\3'
24277 ac_dD='%g'
24278 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24279 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24280 ac_uB='\([      ]\)%\1#\2define\3'
24281 ac_uC=' '
24282 ac_uD='\4%g'
24283 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24284 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24285 ac_eB='$%\1#\2define\3'
24286 ac_eC=' '
24287 ac_eD='%g'
24288
24289 if test "${CONFIG_HEADERS+set}" != set; then
24290 EOF
24291 cat >> $CONFIG_STATUS <<EOF
24292   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24293 EOF
24294 cat >> $CONFIG_STATUS <<\EOF
24295 fi
24296 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24297   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24298   case "$ac_file" in
24299   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24300        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24301   *) ac_file_in="${ac_file}.in" ;;
24302   esac
24303
24304   echo creating $ac_file
24305
24306   rm -f conftest.frag conftest.in conftest.out
24307   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24308   cat $ac_file_inputs > conftest.in
24309
24310 EOF
24311
24312 # Transform confdefs.h into a sed script conftest.vals that substitutes
24313 # the proper values into config.h.in to produce config.h.  And first:
24314 # Protect against being on the right side of a sed subst in config.status.
24315 # Protect against being in an unquoted here document in config.status.
24316 rm -f conftest.vals
24317 cat > conftest.hdr <<\EOF
24318 s/[\\&%]/\\&/g
24319 s%[\\$`]%\\&%g
24320 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24321 s%ac_d%ac_u%gp
24322 s%ac_u%ac_e%gp
24323 EOF
24324 sed -n -f conftest.hdr confdefs.h > conftest.vals
24325 rm -f conftest.hdr
24326
24327 # This sed command replaces #undef with comments.  This is necessary, for
24328 # example, in the case of _POSIX_SOURCE, which is predefined and required
24329 # on some systems where configure will not decide to define it.
24330 cat >> conftest.vals <<\EOF
24331 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24332 EOF
24333
24334 # Break up conftest.vals because some shells have a limit on
24335 # the size of here documents, and old seds have small limits too.
24336
24337 rm -f conftest.tail
24338 while :
24339 do
24340   ac_lines=`grep -c . conftest.vals`
24341   # grep -c gives empty output for an empty file on some AIX systems.
24342   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24343   # Write a limited-size here document to conftest.frag.
24344   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24345   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24346   echo 'CEOF
24347   sed -f conftest.frag conftest.in > conftest.out
24348   rm -f conftest.in
24349   mv conftest.out conftest.in
24350 ' >> $CONFIG_STATUS
24351   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24352   rm -f conftest.vals
24353   mv conftest.tail conftest.vals
24354 done
24355 rm -f conftest.vals
24356
24357 cat >> $CONFIG_STATUS <<\EOF
24358   rm -f conftest.frag conftest.h
24359   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24360   cat conftest.in >> conftest.h
24361   rm -f conftest.in
24362   if cmp -s $ac_file conftest.h 2>/dev/null; then
24363     echo "$ac_file is unchanged"
24364     rm -f conftest.h
24365   else
24366     # Remove last slash and all that follows it.  Not all systems have dirname.
24367       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24368       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24369       # The file is in a subdirectory.
24370       test ! -d "$ac_dir" && mkdir "$ac_dir"
24371     fi
24372     rm -f $ac_file
24373     mv conftest.h $ac_file
24374   fi
24375 fi; done
24376
24377 EOF
24378 cat >> $CONFIG_STATUS <<EOF
24379
24380 EOF
24381 cat >> $CONFIG_STATUS <<\EOF
24382
24383 chmod +x tests/run
24384 date > stamp-h
24385 echo Please run \"make depend\" to build dependencies
24386
24387 exit 0
24388 EOF
24389 chmod +x $CONFIG_STATUS
24390 rm -fr confdefs* $ac_clean_files
24391 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24392