]> git.sur5r.net Git - openldap/blob - configure
Dont mention bare oc in list.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.507 2003/12/14 05:46:35 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2003 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-2003 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   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139
140 SLAPD Overlay Options:"
141 ac_help="$ac_help
142     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
143 ac_help="$ac_help
144     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
145 ac_help="$ac_help
146     --with-rwm            Rewrite/Remap overlay no|yes|mod [no]"
147 ac_help="$ac_help
148
149 SLURPD (Replication Daemon) Options:"
150 ac_help="$ac_help
151   --enable-slurpd         enable building slurpd [auto]"
152 ac_help="$ac_help
153
154 Library Generation & Linking Options"
155 ac_help="$ac_help
156   --enable-static[=PKGS]  build static libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-shared[=PKGS]  build shared libraries [default=yes]"
159 ac_help="$ac_help
160   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
161 ac_help="$ac_help
162   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
163
164 # Find the correct PATH separator.  Usually this is `:', but
165 # DJGPP uses `;' like DOS.
166 if test "X${PATH_SEPARATOR+set}" != Xset; then
167   UNAME=${UNAME-`uname 2>/dev/null`}
168   case X$UNAME in
169     *-DOS) lt_cv_sys_path_separator=';' ;;
170     *)     lt_cv_sys_path_separator=':' ;;
171   esac
172   PATH_SEPARATOR=$lt_cv_sys_path_separator
173 fi
174
175
176 # Check that we are running under the correct shell.
177 SHELL=${CONFIG_SHELL-/bin/sh}
178
179 case X$ECHO in
180 X*--fallback-echo)
181   # Remove one level of quotation (which was required for Make).
182   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
183   ;;
184 esac
185
186 echo=${ECHO-echo}
187 if test "X$1" = X--no-reexec; then
188   # Discard the --no-reexec flag, and continue.
189   shift
190 elif test "X$1" = X--fallback-echo; then
191   # Avoid inline document here, it may be left over
192   :
193 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
194   # Yippee, $echo works!
195   :
196 else
197   # Restart under the correct shell.
198   exec $SHELL "$0" --no-reexec ${1+"$@"}
199 fi
200
201 if test "X$1" = X--fallback-echo; then
202   # used as fallback echo
203   shift
204   cat <<EOF
205
206 EOF
207   exit 0
208 fi
209
210 # The HP-UX ksh and POSIX shell print the target directory to stdout
211 # if CDPATH is set.
212 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
213
214 if test -z "$ECHO"; then
215 if test "X${echo_test_string+set}" != Xset; then
216 # find a string as large as possible, as long as the shell can cope with it
217   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
218     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
219     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
220        echo_test_string="`eval $cmd`" &&
221        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
222     then
223       break
224     fi
225   done
226 fi
227
228 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
229    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
230    test "X$echo_testing_string" = "X$echo_test_string"; then
231   :
232 else
233   # The Solaris, AIX, and Digital Unix default echo programs unquote
234   # backslashes.  This makes it impossible to quote backslashes using
235   #   echo "$something" | sed 's/\\/\\\\/g'
236   #
237   # So, first we look for a working echo in the user's PATH.
238
239   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
240   for dir in $PATH /usr/ucb; do
241     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
242        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
243        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
244        test "X$echo_testing_string" = "X$echo_test_string"; then
245       echo="$dir/echo"
246       break
247     fi
248   done
249   IFS="$save_ifs"
250
251   if test "X$echo" = Xecho; then
252     # We didn't find a better echo, so look for alternatives.
253     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
254        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
255        test "X$echo_testing_string" = "X$echo_test_string"; then
256       # This shell has a builtin print -r that does the trick.
257       echo='print -r'
258     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
259          test "X$CONFIG_SHELL" != X/bin/ksh; then
260       # If we have ksh, try running configure again with it.
261       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
262       export ORIGINAL_CONFIG_SHELL
263       CONFIG_SHELL=/bin/ksh
264       export CONFIG_SHELL
265       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
266     else
267       # Try using printf.
268       echo='printf %s\n'
269       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
270          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
271          test "X$echo_testing_string" = "X$echo_test_string"; then
272         # Cool, printf works
273         :
274       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
275            test "X$echo_testing_string" = 'X\t' &&
276            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
277            test "X$echo_testing_string" = "X$echo_test_string"; then
278         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
279         export CONFIG_SHELL
280         SHELL="$CONFIG_SHELL"
281         export SHELL
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
284            test "X$echo_testing_string" = 'X\t' &&
285            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
286            test "X$echo_testing_string" = "X$echo_test_string"; then
287         echo="$CONFIG_SHELL $0 --fallback-echo"
288       else
289         # maybe with a smaller string...
290         prev=:
291
292         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
293           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
294           then
295             break
296           fi
297           prev="$cmd"
298         done
299
300         if test "$prev" != 'sed 50q "$0"'; then
301           echo_test_string=`eval $prev`
302           export echo_test_string
303           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
304         else
305           # Oops.  We lost completely, so just stick with echo.
306           echo=echo
307         fi
308       fi
309     fi
310   fi
311 fi
312 fi
313
314 # Copy echo and quote the copy suitably for passing to libtool from
315 # the Makefile, instead of quoting the original, which is used later.
316 ECHO=$echo
317 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
318    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
319 fi
320
321
322 ac_help="$ac_help
323   --disable-libtool-lock  avoid locking (might break parallel builds)"
324 ac_help="$ac_help
325   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
326 ac_help="$ac_help
327
328 See INSTALL file for further details."
329
330 # Initialize some variables set by options.
331 # The variables have the same names as the options, with
332 # dashes changed to underlines.
333 build=NONE
334 cache_file=./config.cache
335 exec_prefix=NONE
336 host=NONE
337 no_create=
338 nonopt=NONE
339 no_recursion=
340 prefix=NONE
341 program_prefix=NONE
342 program_suffix=NONE
343 program_transform_name=s,x,x,
344 silent=
345 site=
346 srcdir=
347 target=NONE
348 verbose=
349 x_includes=NONE
350 x_libraries=NONE
351 bindir='${exec_prefix}/bin'
352 sbindir='${exec_prefix}/sbin'
353 libexecdir='${exec_prefix}/libexec'
354 datadir='${prefix}/share'
355 sysconfdir='${prefix}/etc'
356 sharedstatedir='${prefix}/com'
357 localstatedir='${prefix}/var'
358 libdir='${exec_prefix}/lib'
359 includedir='${prefix}/include'
360 oldincludedir='/usr/include'
361 infodir='${prefix}/info'
362 mandir='${prefix}/man'
363
364 # Initialize some other variables.
365 subdirs=
366 MFLAGS= MAKEFLAGS=
367 SHELL=${CONFIG_SHELL-/bin/sh}
368 # Maximum number of lines to put in a shell here document.
369 ac_max_here_lines=12
370
371 ac_prev=
372 for ac_option
373 do
374
375   # If the previous option needs an argument, assign it.
376   if test -n "$ac_prev"; then
377     eval "$ac_prev=\$ac_option"
378     ac_prev=
379     continue
380   fi
381
382   case "$ac_option" in
383   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
384   *) ac_optarg= ;;
385   esac
386
387   # Accept the important Cygnus configure options, so we can diagnose typos.
388
389   case "$ac_option" in
390
391   -bindir | --bindir | --bindi | --bind | --bin | --bi)
392     ac_prev=bindir ;;
393   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
394     bindir="$ac_optarg" ;;
395
396   -build | --build | --buil | --bui | --bu)
397     ac_prev=build ;;
398   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
399     build="$ac_optarg" ;;
400
401   -cache-file | --cache-file | --cache-fil | --cache-fi \
402   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
403     ac_prev=cache_file ;;
404   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
405   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
406     cache_file="$ac_optarg" ;;
407
408   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
409     ac_prev=datadir ;;
410   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
411   | --da=*)
412     datadir="$ac_optarg" ;;
413
414   -disable-* | --disable-*)
415     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
416     # Reject names that are not valid shell variable names.
417     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
418       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
419     fi
420     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
421     eval "enable_${ac_feature}=no" ;;
422
423   -enable-* | --enable-*)
424     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
428     fi
429     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "enable_${ac_feature}='$ac_optarg'" ;;
435
436   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
437   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
438   | --exec | --exe | --ex)
439     ac_prev=exec_prefix ;;
440   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
441   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
442   | --exec=* | --exe=* | --ex=*)
443     exec_prefix="$ac_optarg" ;;
444
445   -gas | --gas | --ga | --g)
446     # Obsolete; use --with-gas.
447     with_gas=yes ;;
448
449   -help | --help | --hel | --he)
450     # Omit some internal or obsolete options to make the list less imposing.
451     # This message is too long to be a string in the A/UX 3.1 sh.
452     cat << EOF
453 Usage: configure [options] [host]
454 Options: [defaults in brackets after descriptions]
455 Configuration:
456   --cache-file=FILE       cache test results in FILE
457   --help                  print this message
458   --no-create             do not create output files
459   --quiet, --silent       do not print \`checking...' messages
460   --version               print the version of autoconf that created configure
461 Directory and file names:
462   --prefix=PREFIX         install architecture-independent files in PREFIX
463                           [$ac_default_prefix]
464   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
465                           [same as prefix]
466   --bindir=DIR            user executables in DIR [EPREFIX/bin]
467   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
468   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
469   --datadir=DIR           read-only architecture-independent data in DIR
470                           [PREFIX/share]
471   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
472   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
473                           [PREFIX/com]
474   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
475   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
476   --includedir=DIR        C header files in DIR [PREFIX/include]
477   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
478   --infodir=DIR           info documentation in DIR [PREFIX/info]
479   --mandir=DIR            man documentation in DIR [PREFIX/man]
480   --srcdir=DIR            find the sources in DIR [configure dir or ..]
481   --program-prefix=PREFIX prepend PREFIX to installed program names
482   --program-suffix=SUFFIX append SUFFIX to installed program names
483   --program-transform-name=PROGRAM
484                           run sed PROGRAM on installed program names
485 EOF
486     cat << EOF
487 Host type:
488   --build=BUILD           configure for building on BUILD [BUILD=HOST]
489   --host=HOST             configure for HOST [guessed]
490   --target=TARGET         configure for TARGET [TARGET=HOST]
491 Features and packages:
492   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
493   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
494   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
495   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
496   --x-includes=DIR        X include files are in DIR
497   --x-libraries=DIR       X library files are in DIR
498 EOF
499     if test -n "$ac_help"; then
500       echo "--enable and --with options recognized:$ac_help"
501     fi
502     exit 0 ;;
503
504   -host | --host | --hos | --ho)
505     ac_prev=host ;;
506   -host=* | --host=* | --hos=* | --ho=*)
507     host="$ac_optarg" ;;
508
509   -includedir | --includedir | --includedi | --included | --include \
510   | --includ | --inclu | --incl | --inc)
511     ac_prev=includedir ;;
512   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
513   | --includ=* | --inclu=* | --incl=* | --inc=*)
514     includedir="$ac_optarg" ;;
515
516   -infodir | --infodir | --infodi | --infod | --info | --inf)
517     ac_prev=infodir ;;
518   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
519     infodir="$ac_optarg" ;;
520
521   -libdir | --libdir | --libdi | --libd)
522     ac_prev=libdir ;;
523   -libdir=* | --libdir=* | --libdi=* | --libd=*)
524     libdir="$ac_optarg" ;;
525
526   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
527   | --libexe | --libex | --libe)
528     ac_prev=libexecdir ;;
529   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
530   | --libexe=* | --libex=* | --libe=*)
531     libexecdir="$ac_optarg" ;;
532
533   -localstatedir | --localstatedir | --localstatedi | --localstated \
534   | --localstate | --localstat | --localsta | --localst \
535   | --locals | --local | --loca | --loc | --lo)
536     ac_prev=localstatedir ;;
537   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
538   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
539   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
540     localstatedir="$ac_optarg" ;;
541
542   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
543     ac_prev=mandir ;;
544   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
545     mandir="$ac_optarg" ;;
546
547   -nfp | --nfp | --nf)
548     # Obsolete; use --without-fp.
549     with_fp=no ;;
550
551   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
552   | --no-cr | --no-c)
553     no_create=yes ;;
554
555   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
556   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
557     no_recursion=yes ;;
558
559   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
560   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
561   | --oldin | --oldi | --old | --ol | --o)
562     ac_prev=oldincludedir ;;
563   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
564   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
565   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
566     oldincludedir="$ac_optarg" ;;
567
568   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
569     ac_prev=prefix ;;
570   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
571     prefix="$ac_optarg" ;;
572
573   -program-prefix | --program-prefix | --program-prefi | --program-pref \
574   | --program-pre | --program-pr | --program-p)
575     ac_prev=program_prefix ;;
576   -program-prefix=* | --program-prefix=* | --program-prefi=* \
577   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
578     program_prefix="$ac_optarg" ;;
579
580   -program-suffix | --program-suffix | --program-suffi | --program-suff \
581   | --program-suf | --program-su | --program-s)
582     ac_prev=program_suffix ;;
583   -program-suffix=* | --program-suffix=* | --program-suffi=* \
584   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
585     program_suffix="$ac_optarg" ;;
586
587   -program-transform-name | --program-transform-name \
588   | --program-transform-nam | --program-transform-na \
589   | --program-transform-n | --program-transform- \
590   | --program-transform | --program-transfor \
591   | --program-transfo | --program-transf \
592   | --program-trans | --program-tran \
593   | --progr-tra | --program-tr | --program-t)
594     ac_prev=program_transform_name ;;
595   -program-transform-name=* | --program-transform-name=* \
596   | --program-transform-nam=* | --program-transform-na=* \
597   | --program-transform-n=* | --program-transform-=* \
598   | --program-transform=* | --program-transfor=* \
599   | --program-transfo=* | --program-transf=* \
600   | --program-trans=* | --program-tran=* \
601   | --progr-tra=* | --program-tr=* | --program-t=*)
602     program_transform_name="$ac_optarg" ;;
603
604   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
605   | -silent | --silent | --silen | --sile | --sil)
606     silent=yes ;;
607
608   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
609     ac_prev=sbindir ;;
610   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
611   | --sbi=* | --sb=*)
612     sbindir="$ac_optarg" ;;
613
614   -sharedstatedir | --sharedstatedir | --sharedstatedi \
615   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
616   | --sharedst | --shareds | --shared | --share | --shar \
617   | --sha | --sh)
618     ac_prev=sharedstatedir ;;
619   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
620   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
621   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
622   | --sha=* | --sh=*)
623     sharedstatedir="$ac_optarg" ;;
624
625   -site | --site | --sit)
626     ac_prev=site ;;
627   -site=* | --site=* | --sit=*)
628     site="$ac_optarg" ;;
629
630   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
631     ac_prev=srcdir ;;
632   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
633     srcdir="$ac_optarg" ;;
634
635   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
636   | --syscon | --sysco | --sysc | --sys | --sy)
637     ac_prev=sysconfdir ;;
638   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
639   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
640     sysconfdir="$ac_optarg" ;;
641
642   -target | --target | --targe | --targ | --tar | --ta | --t)
643     ac_prev=target ;;
644   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
645     target="$ac_optarg" ;;
646
647   -v | -verbose | --verbose | --verbos | --verbo | --verb)
648     verbose=yes ;;
649
650   -version | --version | --versio | --versi | --vers)
651     echo "configure generated by autoconf version 2.13.1"
652     exit 0 ;;
653
654   -with-* | --with-*)
655     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
656     # Reject names that are not valid shell variable names.
657     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
658       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
659     fi
660     ac_package=`echo $ac_package| sed 's/-/_/g'`
661     case "$ac_option" in
662       *=*) ;;
663       *) ac_optarg=yes ;;
664     esac
665     eval "with_${ac_package}='$ac_optarg'" ;;
666
667   -without-* | --without-*)
668     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
669     # Reject names that are not valid shell variable names.
670     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
671       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
672     fi
673     ac_package=`echo $ac_package| sed 's/-/_/g'`
674     eval "with_${ac_package}=no" ;;
675
676   --x)
677     # Obsolete; use --with-x.
678     with_x=yes ;;
679
680   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
681   | --x-incl | --x-inc | --x-in | --x-i)
682     ac_prev=x_includes ;;
683   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
684   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
685     x_includes="$ac_optarg" ;;
686
687   -x-libraries | --x-libraries | --x-librarie | --x-librari \
688   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
689     ac_prev=x_libraries ;;
690   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
691   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
692     x_libraries="$ac_optarg" ;;
693
694   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
695     ;;
696
697   *)
698     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
699       echo "configure: warning: $ac_option: invalid host type" 1>&2
700     fi
701     if test "x$nonopt" != xNONE; then
702       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
703     fi
704     nonopt="$ac_option"
705     ;;
706
707   esac
708 done
709
710 if test -n "$ac_prev"; then
711   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
712 fi
713
714 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
715
716 # File descriptor usage:
717 # 0 standard input
718 # 1 file creation
719 # 2 errors and warnings
720 # 3 some systems may open it to /dev/tty
721 # 4 used on the Kubota Titan
722 # 6 checking for... messages and results
723 # 5 compiler messages saved in config.log
724 if test "$silent" = yes; then
725   exec 6>/dev/null
726 else
727   exec 6>&1
728 fi
729 exec 5>./config.log
730
731 echo "\
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734 " 1>&5
735
736 # Strip out --no-create and --no-recursion so they do not pile up.
737 # Also quote any args containing shell metacharacters.
738 ac_configure_args=
739 for ac_arg
740 do
741   case "$ac_arg" in
742   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
743   | --no-cr | --no-c) ;;
744   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
745   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
746   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
747   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
748   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
749   esac
750 done
751
752 # NLS nuisances.
753 # Only set these to C if already set.  These must not be set unconditionally
754 # because not all systems understand e.g. LANG=C (notably SCO).
755 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
756 # Non-C LC_CTYPE values break the ctype check.
757 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
758 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
759 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
760 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
761
762 # confdefs.h avoids OS command line length limits that DEFS can exceed.
763 rm -rf conftest* confdefs.h
764 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
765 echo > confdefs.h
766
767 # A filename unique to this package, relative to the directory that
768 # configure is in, which we can look for to find out if srcdir is correct.
769 ac_unique_file=build/version.sh
770
771 # Find the source files, if location was not specified.
772 if test -z "$srcdir"; then
773   ac_srcdir_defaulted=yes
774   # Try the directory containing this script, then its parent.
775   ac_prog=$0
776   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
777   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
778   srcdir=$ac_confdir
779   if test ! -r $srcdir/$ac_unique_file; then
780     srcdir=..
781   fi
782 else
783   ac_srcdir_defaulted=no
784 fi
785 if test ! -r $srcdir/$ac_unique_file; then
786   if test "$ac_srcdir_defaulted" = yes; then
787     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
788   else
789     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
790   fi
791 fi
792 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
793
794 # Prefer explicitly selected file to automatically selected ones.
795 if test -z "$CONFIG_SITE"; then
796   if test "x$prefix" != xNONE; then
797     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
798   else
799     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
800   fi
801 fi
802 for ac_site_file in $CONFIG_SITE; do
803   if test -r "$ac_site_file"; then
804     echo "loading site script $ac_site_file"
805     . "$ac_site_file"
806   fi
807 done
808
809
810 ac_ext=c
811 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
812 ac_cpp='$CPP $CPPFLAGS'
813 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
814 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
815 cross_compiling=$ac_cv_prog_cc_cross
816
817 ac_exeext=
818 ac_objext=o
819 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
820   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
821   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
822     ac_n= ac_c='
823 ' ac_t='        '
824   else
825     ac_n=-n ac_c= ac_t=
826   fi
827 else
828   ac_n= ac_c='\c' ac_t=
829 fi
830
831
832 # set unset (borrowed from autoconf 2.49c)
833 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
834   ol_unset=unset
835 else
836   ol_unset=false
837 fi
838 # unset CDPATH
839 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
840
841 ac_aux_dir=
842 for ac_dir in build $srcdir/build; do
843   if 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/install.sh; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/install.sh -c"
850     break
851   elif test -f $ac_dir/shtool; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/shtool install -c"
854     break
855   fi
856 done
857 if test -z "$ac_aux_dir"; then
858   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
859 fi
860 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
861 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
862 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
863
864 eval `$ac_aux_dir/version.sh`
865 if test -z "$OL_STRING"; then
866         { echo "configure: error: could not determine version" 1>&2; exit 1; }
867 fi
868
869 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
870         ac_cv_shtool="$ac_aux_dir/shtool"
871 else
872         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
873 fi
874
875 SHTOOL="$ac_cv_shtool"
876
877 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
878 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
879
880 OPENLDAP_CVS=""
881 if test -d $ac_aux_dir/CVS; then
882         OPENLDAP_CVS="(from CVS sources) "
883 fi
884
885 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
886
887
888 echo $ac_n "checking host system type""... $ac_c" 1>&6
889 echo "configure:890: checking host system type" >&5
890 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
891
892 # Make sure we can run config.sub.
893   if $ac_config_sub sun4 >/dev/null 2>&1; then :
894     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
895   fi
896
897   ac_cv_host_alias=$host
898   case "$ac_cv_host_alias" in
899   NONE)
900     case $nonopt in
901     NONE)
902       if ac_cv_host_alias=`$ac_config_guess`; then :
903       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
904       fi ;;
905     *) ac_cv_host_alias=$nonopt ;;
906     esac ;;
907   esac
908
909   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
910   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
911   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
912   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
913 else
914   echo $ac_n "(cached) $ac_c" 1>&6
915 fi
916
917 echo "$ac_t""$ac_cv_host" 1>&6
918
919 host=$ac_cv_host
920 host_alias=$ac_cv_host_alias
921 host_cpu=$ac_cv_host_cpu
922 host_vendor=$ac_cv_host_vendor
923 host_os=$ac_cv_host_os
924
925
926
927
928
929 echo $ac_n "checking target system type""... $ac_c" 1>&6
930 echo "configure:931: checking target system type" >&5
931 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
932
933 # Make sure we can run config.sub.
934   if $ac_config_sub sun4 >/dev/null 2>&1; then :
935     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
936   fi
937
938   ac_cv_target_alias=$target
939   case "$ac_cv_target_alias" in
940   NONE)
941     case $nonopt in
942     NONE)
943       ac_cv_target_alias=$host_alias ;;
944
945     *) ac_cv_target_alias=$nonopt ;;
946     esac ;;
947   esac
948
949   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
950   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
951   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
952   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
953 else
954   echo $ac_n "(cached) $ac_c" 1>&6
955 fi
956
957 echo "$ac_t""$ac_cv_target" 1>&6
958
959 target=$ac_cv_target
960 target_alias=$ac_cv_target_alias
961 target_cpu=$ac_cv_target_cpu
962 target_vendor=$ac_cv_target_vendor
963 target_os=$ac_cv_target_os
964
965
966
967
968
969 echo $ac_n "checking build system type""... $ac_c" 1>&6
970 echo "configure:971: checking build system type" >&5
971 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
972
973 # Make sure we can run config.sub.
974   if $ac_config_sub sun4 >/dev/null 2>&1; then :
975     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
976   fi
977
978   ac_cv_build_alias=$build
979   case "$ac_cv_build_alias" in
980   NONE)
981     case $nonopt in
982     NONE)
983       ac_cv_build_alias=$host_alias ;;
984
985     *) ac_cv_build_alias=$nonopt ;;
986     esac ;;
987   esac
988
989   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
990   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
991   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
992   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
993 else
994   echo $ac_n "(cached) $ac_c" 1>&6
995 fi
996
997 echo "$ac_t""$ac_cv_build" 1>&6
998
999 build=$ac_cv_build
1000 build_alias=$ac_cv_build_alias
1001 build_cpu=$ac_cv_build_cpu
1002 build_vendor=$ac_cv_build_vendor
1003 build_os=$ac_cv_build_os
1004
1005
1006
1007
1008
1009 # Do some error checking and defaulting for the host and target type.
1010 # The inputs are:
1011 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1012 #
1013 # The rules are:
1014 # 1. You are not allowed to specify --host, --target, and nonopt at the
1015 #    same time.
1016 # 2. Host defaults to nonopt.
1017 # 3. If nonopt is not specified, then host defaults to the current host,
1018 #    as determined by config.guess.
1019 # 4. Target and build default to nonopt.
1020 # 5. If nonopt is not specified, then target and build default to host.
1021
1022 # The aliases save the names the user supplied, while $host etc.
1023 # will get canonicalized.
1024 case $host---$target---$nonopt in
1025 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1026 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1027 esac
1028
1029 test "$host_alias" != "$target_alias" &&
1030   test "$program_prefix$program_suffix$program_transform_name" = \
1031     NONENONEs,x,x, &&
1032   program_prefix=${target_alias}-
1033
1034
1035 # Find a good install program.  We prefer a C program (faster),
1036 # so one script is as good as another.  But avoid the broken or
1037 # incompatible versions:
1038 # SysV /etc/install, /usr/sbin/install
1039 # SunOS /usr/etc/install
1040 # IRIX /sbin/install
1041 # AIX /bin/install
1042 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1043 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1044 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1045 # ./install, which can be erroneously created by make from ./install.sh.
1046 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1047 echo "configure:1048: checking for a BSD compatible install" >&5
1048 if test -z "$INSTALL"; then
1049 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1053   for ac_dir in $PATH; do
1054     # Account for people who put trailing slashes in PATH elements.
1055     case "$ac_dir/" in
1056     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1057     *)
1058       # OSF1 and SCO ODT 3.0 have their own names for install.
1059       # Don't use installbsd from OSF since it installs stuff as root
1060       # by default.
1061       for ac_prog in ginstall scoinst install; do
1062         if test -f $ac_dir/$ac_prog; then
1063           if test $ac_prog = install &&
1064             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # AIX install.  It has an incompatible calling convention.
1066             :
1067           elif test $ac_prog = install &&
1068             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1069             # program-specific install script used by HP pwplus--don't use.
1070             :
1071           else
1072             ac_cv_path_install="$ac_dir/$ac_prog -c"
1073             break 2
1074           fi
1075         fi
1076       done
1077       ;;
1078     esac
1079   done
1080   IFS="$ac_save_IFS"
1081
1082 fi
1083   if test "${ac_cv_path_install+set}" = set; then
1084     INSTALL="$ac_cv_path_install"
1085   else
1086     # As a last resort, use the slow shell script.  We don't cache a
1087     # path for INSTALL within a source directory, because that will
1088     # break other packages using the cache if that directory is
1089     # removed, or if the path is relative.
1090     INSTALL="$ac_install_sh"
1091   fi
1092 fi
1093 echo "$ac_t""$INSTALL" 1>&6
1094
1095 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1096 # It thinks the first close brace ends the variable substitution.
1097 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1098
1099 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1100
1101 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1102
1103 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether build environment is sane" >&5
1105 # Just in case
1106 sleep 1
1107 echo timestamp > conftestfile
1108 # Do `set' in a subshell so we don't clobber the current shell's
1109 # arguments.  Must try -L first in case configure is actually a
1110 # symlink; some systems play weird games with the mod time of symlinks
1111 # (eg FreeBSD returns the mod time of the symlink's containing
1112 # directory).
1113 if (
1114    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1115    if test "$*" = "X"; then
1116       # -L didn't work.
1117       set X `ls -t $srcdir/configure conftestfile`
1118    fi
1119    if test "$*" != "X $srcdir/configure conftestfile" \
1120       && test "$*" != "X conftestfile $srcdir/configure"; then
1121
1122       # If neither matched, then we have a broken ls.  This can happen
1123       # if, for instance, CONFIG_SHELL is bash and it inherits a
1124       # broken ls alias from the environment.  This has actually
1125       # happened.  Such a system could not be considered "sane".
1126       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1127 alias in your environment" 1>&2; exit 1; }
1128    fi
1129
1130    test "$2" = conftestfile
1131    )
1132 then
1133    # Ok.
1134    :
1135 else
1136    { echo "configure: error: newly created file is older than distributed files!
1137 Check your system clock" 1>&2; exit 1; }
1138 fi
1139 rm -f conftest*
1140 echo "$ac_t""yes" 1>&6
1141 if test "$program_transform_name" = s,x,x,; then
1142   program_transform_name=
1143 else
1144   # Double any \ or $.  echo might interpret backslashes.
1145   cat <<\EOF_SED > conftestsed
1146 s,\\,\\\\,g; s,\$,$$,g
1147 EOF_SED
1148   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1149   rm -f conftestsed
1150 fi
1151 test "$program_prefix" != NONE &&
1152   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1153 # Use a double $ so make ignores it.
1154 test "$program_suffix" != NONE &&
1155   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1156
1157 # sed with no file args requires a program.
1158 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1159
1160 for ac_prog in mawk gawk nawk awk
1161 do
1162 # Extract the first word of "$ac_prog", so it can be a program name with args.
1163 set dummy $ac_prog; ac_word=$2
1164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1165 echo "configure:1166: checking for $ac_word" >&5
1166 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -n "$AWK"; then
1170   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1171 else
1172   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1173   ac_dummy="$PATH"
1174   for ac_dir in $ac_dummy; do
1175     test -z "$ac_dir" && ac_dir=.
1176     if test -f $ac_dir/$ac_word; then
1177       ac_cv_prog_AWK="$ac_prog"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 fi
1183 fi
1184 AWK="$ac_cv_prog_AWK"
1185 if test -n "$AWK"; then
1186   echo "$ac_t""$AWK" 1>&6
1187 else
1188   echo "$ac_t""no" 1>&6
1189 fi
1190
1191 test -n "$AWK" && break
1192 done
1193
1194 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1195 echo "configure:1196: checking whether ${MAKE-make} sets \${MAKE}" >&5
1196 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1197 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftestmake <<\EOF
1201 all:
1202         @echo 'ac_maketemp="${MAKE}"'
1203 EOF
1204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1205 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1206 if test -n "$ac_maketemp"; then
1207   eval ac_cv_prog_make_${ac_make}_set=yes
1208 else
1209   eval ac_cv_prog_make_${ac_make}_set=no
1210 fi
1211 rm -f conftestmake
1212 fi
1213 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1214   echo "$ac_t""yes" 1>&6
1215   SET_MAKE=
1216 else
1217   echo "$ac_t""no" 1>&6
1218   SET_MAKE="MAKE=${MAKE-make}"
1219 fi
1220
1221
1222
1223 PACKAGE=$OL_PACKAGE
1224
1225 VERSION=$OL_VERSION
1226
1227 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1228   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1229 fi
1230
1231
1232
1233 missing_dir=`cd $ac_aux_dir && pwd`
1234 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working aclocal" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1240    ACLOCAL=aclocal
1241    echo "$ac_t""found" 1>&6
1242 else
1243    ACLOCAL="$missing_dir/missing aclocal"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working autoconf" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOCONF=autoconf
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOCONF="$missing_dir/missing autoconf"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working automake" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (automake --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOMAKE=automake
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOMAKE="$missing_dir/missing automake"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working autoheader" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1279    AUTOHEADER=autoheader
1280    echo "$ac_t""found" 1>&6
1281 else
1282    AUTOHEADER="$missing_dir/missing autoheader"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1287 echo "configure:1288: checking for working makeinfo" >&5
1288 # Run test in a subshell; some versions of sh will print an error if
1289 # an executable is not found, even if stderr is redirected.
1290 # Redirect stdin to placate older versions of autoconf.  Sigh.
1291 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1292    MAKEINFO=makeinfo
1293    echo "$ac_t""found" 1>&6
1294 else
1295    MAKEINFO="$missing_dir/missing makeinfo"
1296    echo "$ac_t""missing" 1>&6
1297 fi
1298
1299 install_sh="$missing_dir/install-sh"
1300 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1301
1302 for ac_prog in gnutar gtar tar
1303 do
1304 # Extract the first word of "$ac_prog", so it can be a program name with args.
1305 set dummy $ac_prog; ac_word=$2
1306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1307 echo "configure:1308: checking for $ac_word" >&5
1308 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1309   echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311   if test -n "$AMTAR"; then
1312   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1313 else
1314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1315   ac_dummy="$PATH"
1316   for ac_dir in $ac_dummy; do
1317     test -z "$ac_dir" && ac_dir=.
1318     if test -f $ac_dir/$ac_word; then
1319       ac_cv_prog_AMTAR="$ac_prog"
1320       break
1321     fi
1322   done
1323   IFS="$ac_save_ifs"
1324 fi
1325 fi
1326 AMTAR="$ac_cv_prog_AMTAR"
1327 if test -n "$AMTAR"; then
1328   echo "$ac_t""$AMTAR" 1>&6
1329 else
1330   echo "$ac_t""no" 1>&6
1331 fi
1332
1333 test -n "$AMTAR" && break
1334 done
1335
1336
1337 AMTARFLAGS=
1338 if test -n "$AMTAR"; then
1339   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1340         AMTARFLAGS=o
1341   fi
1342 fi
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_PACKAGE "$PACKAGE"
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define OPENLDAP_VERSION "$VERSION"
1350 EOF
1351
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION $OL_API_INC
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1367 EOF
1368
1369
1370 OPENLDAP_LIBVERSION=$OL_API_LIB
1371
1372 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1373
1374
1375
1376 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1377 echo "configure:1378: checking configure arguments" >&5
1378
1379
1380 top_builddir=`pwd`
1381
1382 ldap_subdir="/openldap"
1383
1384 # Check whether --with-subdir or --without-subdir was given.
1385 if test "${with_subdir+set}" = set; then
1386   withval="$with_subdir"
1387   case "$withval" in
1388         no) ldap_subdir=""
1389                 ;;
1390         yes)
1391                 ;;
1392         /*|\\*)
1393                 ldap_subdir="$withval"
1394                 ;;
1395         *)
1396                 ldap_subdir="/$withval"
1397                 ;;
1398 esac
1399
1400 fi
1401
1402
1403 # OpenLDAP --enable-debug
1404         # Check whether --enable-debug or --disable-debug was given.
1405 if test "${enable_debug+set}" = set; then
1406   enableval="$enable_debug"
1407   
1408         ol_arg=invalid
1409         for ol_val in auto yes no ; do
1410                 if test "$enableval" = "$ol_val" ; then
1411                         ol_arg="$ol_val"
1412                 fi
1413         done
1414         if test "$ol_arg" = "invalid" ; then
1415                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1416         fi
1417         ol_enable_debug="$ol_arg"
1418
1419 else
1420         ol_enable_debug="yes"
1421 fi
1422 # end --enable-debug
1423 # OpenLDAP --enable-dynamic
1424         # Check whether --enable-dynamic or --disable-dynamic was given.
1425 if test "${enable_dynamic+set}" = set; then
1426   enableval="$enable_dynamic"
1427   
1428         ol_arg=invalid
1429         for ol_val in auto yes no ; do
1430                 if test "$enableval" = "$ol_val" ; then
1431                         ol_arg="$ol_val"
1432                 fi
1433         done
1434         if test "$ol_arg" = "invalid" ; then
1435                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1436         fi
1437         ol_enable_dynamic="$ol_arg"
1438
1439 else
1440         ol_enable_dynamic="no"
1441 fi
1442 # end --enable-dynamic
1443 # OpenLDAP --enable-syslog
1444         # Check whether --enable-syslog or --disable-syslog was given.
1445 if test "${enable_syslog+set}" = set; then
1446   enableval="$enable_syslog"
1447   
1448         ol_arg=invalid
1449         for ol_val in auto yes no ; do
1450                 if test "$enableval" = "$ol_val" ; then
1451                         ol_arg="$ol_val"
1452                 fi
1453         done
1454         if test "$ol_arg" = "invalid" ; then
1455                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1456         fi
1457         ol_enable_syslog="$ol_arg"
1458
1459 else
1460         ol_enable_syslog="auto"
1461 fi
1462 # end --enable-syslog
1463 # OpenLDAP --enable-proctitle
1464         # Check whether --enable-proctitle or --disable-proctitle was given.
1465 if test "${enable_proctitle+set}" = set; then
1466   enableval="$enable_proctitle"
1467   
1468         ol_arg=invalid
1469         for ol_val in auto yes no ; do
1470                 if test "$enableval" = "$ol_val" ; then
1471                         ol_arg="$ol_val"
1472                 fi
1473         done
1474         if test "$ol_arg" = "invalid" ; then
1475                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1476         fi
1477         ol_enable_proctitle="$ol_arg"
1478
1479 else
1480         ol_enable_proctitle="yes"
1481 fi
1482 # end --enable-proctitle
1483 ol_enable_referrals=${ol_enable_referrals-no}
1484 ol_enable_kbind=${ol_enable_kbind-no}
1485 # OpenLDAP --enable-ipv6
1486         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1487 if test "${enable_ipv6+set}" = set; then
1488   enableval="$enable_ipv6"
1489   
1490         ol_arg=invalid
1491         for ol_val in auto yes no ; do
1492                 if test "$enableval" = "$ol_val" ; then
1493                         ol_arg="$ol_val"
1494                 fi
1495         done
1496         if test "$ol_arg" = "invalid" ; then
1497                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1498         fi
1499         ol_enable_ipv6="$ol_arg"
1500
1501 else
1502         ol_enable_ipv6="auto"
1503 fi
1504 # end --enable-ipv6
1505 # OpenLDAP --enable-local
1506         # Check whether --enable-local or --disable-local was given.
1507 if test "${enable_local+set}" = set; then
1508   enableval="$enable_local"
1509   
1510         ol_arg=invalid
1511         for ol_val in auto yes no ; do
1512                 if test "$enableval" = "$ol_val" ; then
1513                         ol_arg="$ol_val"
1514                 fi
1515         done
1516         if test "$ol_arg" = "invalid" ; then
1517                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1518         fi
1519         ol_enable_local="$ol_arg"
1520
1521 else
1522         ol_enable_local="auto"
1523 fi
1524 # end --enable-local
1525 # OpenLDAP --enable-x_compile
1526         # Check whether --enable-x_compile or --disable-x_compile was given.
1527 if test "${enable_x_compile+set}" = set; then
1528   enableval="$enable_x_compile"
1529   
1530         ol_arg=invalid
1531         for ol_val in yes no ; do
1532                 if test "$enableval" = "$ol_val" ; then
1533                         ol_arg="$ol_val"
1534                 fi
1535         done
1536         if test "$ol_arg" = "invalid" ; then
1537                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1538         fi
1539         ol_enable_x_compile="$ol_arg"
1540
1541 else
1542         ol_enable_x_compile="no"
1543 fi
1544 # end --enable-x_compile
1545
1546
1547 # OpenLDAP --with-cyrus_sasl
1548         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1549 if test "${with_cyrus_sasl+set}" = set; then
1550   withval="$with_cyrus_sasl"
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-cyrus_sasl" 1>&2; exit 1; }
1560         fi
1561         ol_with_cyrus_sasl="$ol_arg"
1562
1563 else
1564         ol_with_cyrus_sasl="auto"
1565 fi
1566 # end --with-cyrus_sasl
1567
1568 # OpenLDAP --with-fetch
1569         # Check whether --with-fetch or --without-fetch was given.
1570 if test "${with_fetch+set}" = set; then
1571   withval="$with_fetch"
1572   
1573         ol_arg=invalid
1574         for ol_val in auto yes no  ; do
1575                 if test "$withval" = "$ol_val" ; then
1576                         ol_arg="$ol_val"
1577                 fi
1578         done
1579         if test "$ol_arg" = "invalid" ; then
1580                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1581         fi
1582         ol_with_fetch="$ol_arg"
1583
1584 else
1585         ol_with_fetch="auto"
1586 fi
1587 # end --with-fetch
1588
1589 ol_with_kerberos=${ol_with_kerberos-auto}
1590 # OpenLDAP --with-threads
1591         # Check whether --with-threads or --without-threads was given.
1592 if test "${with_threads+set}" = set; then
1593   withval="$with_threads"
1594   
1595         ol_arg=invalid
1596         for ol_val in auto nt posix mach pth lwp yes no manual  ; 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-threads" 1>&2; exit 1; }
1603         fi
1604         ol_with_threads="$ol_arg"
1605
1606 else
1607         ol_with_threads="auto"
1608 fi
1609 # end --with-threads
1610
1611 # OpenLDAP --with-tls
1612         # Check whether --with-tls or --without-tls was given.
1613 if test "${with_tls+set}" = set; then
1614   withval="$with_tls"
1615   
1616         ol_arg=invalid
1617         for ol_val in auto ssleay openssl yes no  ; 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-tls" 1>&2; exit 1; }
1624         fi
1625         ol_with_tls="$ol_arg"
1626
1627 else
1628         ol_with_tls="auto"
1629 fi
1630 # end --with-tls
1631
1632 # OpenLDAP --with-yielding_select
1633         # Check whether --with-yielding_select or --without-yielding_select was given.
1634 if test "${with_yielding_select+set}" = set; then
1635   withval="$with_yielding_select"
1636   
1637         ol_arg=invalid
1638         for ol_val in auto yes no manual  ; do
1639                 if test "$withval" = "$ol_val" ; then
1640                         ol_arg="$ol_val"
1641                 fi
1642         done
1643         if test "$ol_arg" = "invalid" ; then
1644                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1645         fi
1646         ol_with_yielding_select="$ol_arg"
1647
1648 else
1649         ol_with_yielding_select="auto"
1650 fi
1651 # end --with-yielding_select
1652
1653
1654
1655 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1656 if test "${with_xxslapdoptions+set}" = set; then
1657   withval="$with_xxslapdoptions"
1658   :
1659 fi
1660
1661 # OpenLDAP --enable-slapd
1662         # Check whether --enable-slapd or --disable-slapd was given.
1663 if test "${enable_slapd+set}" = set; then
1664   enableval="$enable_slapd"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no ; do
1668                 if test "$enableval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1674         fi
1675         ol_enable_slapd="$ol_arg"
1676
1677 else
1678         ol_enable_slapd="yes"
1679 fi
1680 # end --enable-slapd
1681 # OpenLDAP --enable-aci
1682         # Check whether --enable-aci or --disable-aci was given.
1683 if test "${enable_aci+set}" = set; then
1684   enableval="$enable_aci"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto yes no ; do
1688                 if test "$enableval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1694         fi
1695         ol_enable_aci="$ol_arg"
1696
1697 else
1698         ol_enable_aci="no"
1699 fi
1700 # end --enable-aci
1701 # OpenLDAP --enable-cleartext
1702         # Check whether --enable-cleartext or --disable-cleartext was given.
1703 if test "${enable_cleartext+set}" = set; then
1704   enableval="$enable_cleartext"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto yes no ; do
1708                 if test "$enableval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1714         fi
1715         ol_enable_cleartext="$ol_arg"
1716
1717 else
1718         ol_enable_cleartext="yes"
1719 fi
1720 # end --enable-cleartext
1721 # OpenLDAP --enable-crypt
1722         # Check whether --enable-crypt or --disable-crypt was given.
1723 if test "${enable_crypt+set}" = set; then
1724   enableval="$enable_crypt"
1725   
1726         ol_arg=invalid
1727         for ol_val in auto yes no ; do
1728                 if test "$enableval" = "$ol_val" ; then
1729                         ol_arg="$ol_val"
1730                 fi
1731         done
1732         if test "$ol_arg" = "invalid" ; then
1733                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1734         fi
1735         ol_enable_crypt="$ol_arg"
1736
1737 else
1738         ol_enable_crypt="no"
1739 fi
1740 # end --enable-crypt
1741 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1742 # OpenLDAP --enable-lmpasswd
1743         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1744 if test "${enable_lmpasswd+set}" = set; then
1745   enableval="$enable_lmpasswd"
1746   
1747         ol_arg=invalid
1748         for ol_val in auto yes no ; do
1749                 if test "$enableval" = "$ol_val" ; then
1750                         ol_arg="$ol_val"
1751                 fi
1752         done
1753         if test "$ol_arg" = "invalid" ; then
1754                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1755         fi
1756         ol_enable_lmpasswd="$ol_arg"
1757
1758 else
1759         ol_enable_lmpasswd="no"
1760 fi
1761 # end --enable-lmpasswd
1762 # OpenLDAP --enable-spasswd
1763         # Check whether --enable-spasswd or --disable-spasswd was given.
1764 if test "${enable_spasswd+set}" = set; then
1765   enableval="$enable_spasswd"
1766   
1767         ol_arg=invalid
1768         for ol_val in auto yes no ; do
1769                 if test "$enableval" = "$ol_val" ; then
1770                         ol_arg="$ol_val"
1771                 fi
1772         done
1773         if test "$ol_arg" = "invalid" ; then
1774                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1775         fi
1776         ol_enable_spasswd="$ol_arg"
1777
1778 else
1779         ol_enable_spasswd="no"
1780 fi
1781 # end --enable-spasswd
1782 # OpenLDAP --enable-modules
1783         # Check whether --enable-modules or --disable-modules was given.
1784 if test "${enable_modules+set}" = set; then
1785   enableval="$enable_modules"
1786   
1787         ol_arg=invalid
1788         for ol_val in auto yes no ; do
1789                 if test "$enableval" = "$ol_val" ; then
1790                         ol_arg="$ol_val"
1791                 fi
1792         done
1793         if test "$ol_arg" = "invalid" ; then
1794                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1795         fi
1796         ol_enable_modules="$ol_arg"
1797
1798 else
1799         ol_enable_modules="no"
1800 fi
1801 # end --enable-modules
1802 ol_enable_multimaster=${ol_enable_multimaster-no}
1803 # OpenLDAP --enable-rewrite
1804         # Check whether --enable-rewrite or --disable-rewrite was given.
1805 if test "${enable_rewrite+set}" = set; then
1806   enableval="$enable_rewrite"
1807   
1808         ol_arg=invalid
1809         for ol_val in auto yes no ; do
1810                 if test "$enableval" = "$ol_val" ; then
1811                         ol_arg="$ol_val"
1812                 fi
1813         done
1814         if test "$ol_arg" = "invalid" ; then
1815                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1816         fi
1817         ol_enable_rewrite="$ol_arg"
1818
1819 else
1820         ol_enable_rewrite="no"
1821 fi
1822 # end --enable-rewrite
1823 # OpenLDAP --enable-rlookups
1824         # Check whether --enable-rlookups or --disable-rlookups was given.
1825 if test "${enable_rlookups+set}" = set; then
1826   enableval="$enable_rlookups"
1827   
1828         ol_arg=invalid
1829         for ol_val in auto yes no ; do
1830                 if test "$enableval" = "$ol_val" ; then
1831                         ol_arg="$ol_val"
1832                 fi
1833         done
1834         if test "$ol_arg" = "invalid" ; then
1835                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1836         fi
1837         ol_enable_rlookups="$ol_arg"
1838
1839 else
1840         ol_enable_rlookups="no"
1841 fi
1842 # end --enable-rlookups
1843 # OpenLDAP --enable-slapi
1844         # Check whether --enable-slapi or --disable-slapi was given.
1845 if test "${enable_slapi+set}" = set; then
1846   enableval="$enable_slapi"
1847   
1848         ol_arg=invalid
1849         for ol_val in auto yes no ; do
1850                 if test "$enableval" = "$ol_val" ; then
1851                         ol_arg="$ol_val"
1852                 fi
1853         done
1854         if test "$ol_arg" = "invalid" ; then
1855                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1856         fi
1857         ol_enable_slapi="$ol_arg"
1858
1859 else
1860         ol_enable_slapi="no"
1861 fi
1862 # end --enable-slapi
1863 # OpenLDAP --enable-slp
1864         # Check whether --enable-slp or --disable-slp was given.
1865 if test "${enable_slp+set}" = set; then
1866   enableval="$enable_slp"
1867   
1868         ol_arg=invalid
1869         for ol_val in auto yes no ; do
1870                 if test "$enableval" = "$ol_val" ; then
1871                         ol_arg="$ol_val"
1872                 fi
1873         done
1874         if test "$ol_arg" = "invalid" ; then
1875                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1876         fi
1877         ol_enable_slp="$ol_arg"
1878
1879 else
1880         ol_enable_slp="no"
1881 fi
1882 # end --enable-slp
1883 # OpenLDAP --enable-wrappers
1884         # Check whether --enable-wrappers or --disable-wrappers was given.
1885 if test "${enable_wrappers+set}" = set; then
1886   enableval="$enable_wrappers"
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-wrappers" 1>&2; exit 1; }
1896         fi
1897         ol_enable_wrappers="$ol_arg"
1898
1899 else
1900         ol_enable_wrappers="no"
1901 fi
1902 # end --enable-wrappers
1903
1904
1905 # OpenLDAP --enable-bdb
1906         # Check whether --enable-bdb or --disable-bdb was given.
1907 if test "${enable_bdb+set}" = set; then
1908   enableval="$enable_bdb"
1909   
1910         ol_arg=invalid
1911         for ol_val in auto yes no ; do
1912                 if test "$enableval" = "$ol_val" ; then
1913                         ol_arg="$ol_val"
1914                 fi
1915         done
1916         if test "$ol_arg" = "invalid" ; then
1917                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1918         fi
1919         ol_enable_bdb="$ol_arg"
1920
1921 else
1922         ol_enable_bdb="yes"
1923 fi
1924 # end --enable-bdb
1925 # OpenLDAP --with-bdb_module
1926         # Check whether --with-bdb_module or --without-bdb_module was given.
1927 if test "${with_bdb_module+set}" = set; then
1928   withval="$with_bdb_module"
1929   
1930         ol_arg=invalid
1931         for ol_val in static dynamic ; do
1932                 if test "$withval" = "$ol_val" ; then
1933                         ol_arg="$ol_val"
1934                 fi
1935         done
1936         if test "$ol_arg" = "invalid" ; then
1937                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1938         fi
1939         ol_with_bdb_module="$ol_arg"
1940
1941 else
1942         ol_with_bdb_module="static"
1943 fi
1944 # end --with-bdb_module
1945
1946 # OpenLDAP --enable-dnssrv
1947         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1948 if test "${enable_dnssrv+set}" = set; then
1949   enableval="$enable_dnssrv"
1950   
1951         ol_arg=invalid
1952         for ol_val in auto yes no ; do
1953                 if test "$enableval" = "$ol_val" ; then
1954                         ol_arg="$ol_val"
1955                 fi
1956         done
1957         if test "$ol_arg" = "invalid" ; then
1958                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1959         fi
1960         ol_enable_dnssrv="$ol_arg"
1961
1962 else
1963         ol_enable_dnssrv="no"
1964 fi
1965 # end --enable-dnssrv
1966 # OpenLDAP --with-dnssrv_module
1967         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1968 if test "${with_dnssrv_module+set}" = set; then
1969   withval="$with_dnssrv_module"
1970   
1971         ol_arg=invalid
1972         for ol_val in static dynamic ; do
1973                 if test "$withval" = "$ol_val" ; then
1974                         ol_arg="$ol_val"
1975                 fi
1976         done
1977         if test "$ol_arg" = "invalid" ; then
1978                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1979         fi
1980         ol_with_dnssrv_module="$ol_arg"
1981
1982 else
1983         ol_with_dnssrv_module="static"
1984 fi
1985 # end --with-dnssrv_module
1986
1987 # OpenLDAP --enable-hdb
1988         # Check whether --enable-hdb or --disable-hdb was given.
1989 if test "${enable_hdb+set}" = set; then
1990   enableval="$enable_hdb"
1991   
1992         ol_arg=invalid
1993         for ol_val in auto yes no ; do
1994                 if test "$enableval" = "$ol_val" ; then
1995                         ol_arg="$ol_val"
1996                 fi
1997         done
1998         if test "$ol_arg" = "invalid" ; then
1999                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
2000         fi
2001         ol_enable_hdb="$ol_arg"
2002
2003 else
2004         ol_enable_hdb="no"
2005 fi
2006 # end --enable-hdb
2007 # OpenLDAP --with-hdb_module
2008         # Check whether --with-hdb_module or --without-hdb_module was given.
2009 if test "${with_hdb_module+set}" = set; then
2010   withval="$with_hdb_module"
2011   
2012         ol_arg=invalid
2013         for ol_val in static dynamic ; do
2014                 if test "$withval" = "$ol_val" ; then
2015                         ol_arg="$ol_val"
2016                 fi
2017         done
2018         if test "$ol_arg" = "invalid" ; then
2019                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2020         fi
2021         ol_with_hdb_module="$ol_arg"
2022
2023 else
2024         ol_with_hdb_module="static"
2025 fi
2026 # end --with-hdb_module
2027
2028 # OpenLDAP --enable-ldap
2029         # Check whether --enable-ldap or --disable-ldap was given.
2030 if test "${enable_ldap+set}" = set; then
2031   enableval="$enable_ldap"
2032   
2033         ol_arg=invalid
2034         for ol_val in auto yes no ; do
2035                 if test "$enableval" = "$ol_val" ; then
2036                         ol_arg="$ol_val"
2037                 fi
2038         done
2039         if test "$ol_arg" = "invalid" ; then
2040                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2041         fi
2042         ol_enable_ldap="$ol_arg"
2043
2044 else
2045         ol_enable_ldap="no"
2046 fi
2047 # end --enable-ldap
2048 # OpenLDAP --with-ldap_module
2049         # Check whether --with-ldap_module or --without-ldap_module was given.
2050 if test "${with_ldap_module+set}" = set; then
2051   withval="$with_ldap_module"
2052   
2053         ol_arg=invalid
2054         for ol_val in static dynamic ; do
2055                 if test "$withval" = "$ol_val" ; then
2056                         ol_arg="$ol_val"
2057                 fi
2058         done
2059         if test "$ol_arg" = "invalid" ; then
2060                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2061         fi
2062         ol_with_ldap_module="$ol_arg"
2063
2064 else
2065         ol_with_ldap_module="static"
2066 fi
2067 # end --with-ldap_module
2068
2069 # OpenLDAP --enable-ldbm
2070         # Check whether --enable-ldbm or --disable-ldbm was given.
2071 if test "${enable_ldbm+set}" = set; then
2072   enableval="$enable_ldbm"
2073   
2074         ol_arg=invalid
2075         for ol_val in auto yes no ; do
2076                 if test "$enableval" = "$ol_val" ; then
2077                         ol_arg="$ol_val"
2078                 fi
2079         done
2080         if test "$ol_arg" = "invalid" ; then
2081                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2082         fi
2083         ol_enable_ldbm="$ol_arg"
2084
2085 else
2086         ol_enable_ldbm="no"
2087 fi
2088 # end --enable-ldbm
2089 # OpenLDAP --with-ldbm_api
2090         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2091 if test "${with_ldbm_api+set}" = set; then
2092   withval="$with_ldbm_api"
2093   
2094         ol_arg=invalid
2095         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2096                 if test "$withval" = "$ol_val" ; then
2097                         ol_arg="$ol_val"
2098                 fi
2099         done
2100         if test "$ol_arg" = "invalid" ; then
2101                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2102         fi
2103         ol_with_ldbm_api="$ol_arg"
2104
2105 else
2106         ol_with_ldbm_api="auto"
2107 fi
2108 # end --with-ldbm_api
2109
2110 # OpenLDAP --with-ldbm_module
2111         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2112 if test "${with_ldbm_module+set}" = set; then
2113   withval="$with_ldbm_module"
2114   
2115         ol_arg=invalid
2116         for ol_val in static dynamic ; do
2117                 if test "$withval" = "$ol_val" ; then
2118                         ol_arg="$ol_val"
2119                 fi
2120         done
2121         if test "$ol_arg" = "invalid" ; then
2122                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2123         fi
2124         ol_with_ldbm_module="$ol_arg"
2125
2126 else
2127         ol_with_ldbm_module="static"
2128 fi
2129 # end --with-ldbm_module
2130
2131 # OpenLDAP --with-ldbm_type
2132         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2133 if test "${with_ldbm_type+set}" = set; then
2134   withval="$with_ldbm_type"
2135   
2136         ol_arg=invalid
2137         for ol_val in auto btree hash ; do
2138                 if test "$withval" = "$ol_val" ; then
2139                         ol_arg="$ol_val"
2140                 fi
2141         done
2142         if test "$ol_arg" = "invalid" ; then
2143                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2144         fi
2145         ol_with_ldbm_type="$ol_arg"
2146
2147 else
2148         ol_with_ldbm_type="auto"
2149 fi
2150 # end --with-ldbm_type
2151
2152 # OpenLDAP --enable-meta
2153         # Check whether --enable-meta or --disable-meta was given.
2154 if test "${enable_meta+set}" = set; then
2155   enableval="$enable_meta"
2156   
2157         ol_arg=invalid
2158         for ol_val in auto yes no ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2165         fi
2166         ol_enable_meta="$ol_arg"
2167
2168 else
2169         ol_enable_meta="no"
2170 fi
2171 # end --enable-meta
2172 # OpenLDAP --with-meta_module
2173         # Check whether --with-meta_module or --without-meta_module was given.
2174 if test "${with_meta_module+set}" = set; then
2175   withval="$with_meta_module"
2176   
2177         ol_arg=invalid
2178         for ol_val in static dynamic ; do
2179                 if test "$withval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2185         fi
2186         ol_with_meta_module="$ol_arg"
2187
2188 else
2189         ol_with_meta_module="static"
2190 fi
2191 # end --with-meta_module
2192
2193 # OpenLDAP --enable-monitor
2194         # Check whether --enable-monitor or --disable-monitor was given.
2195 if test "${enable_monitor+set}" = set; then
2196   enableval="$enable_monitor"
2197   
2198         ol_arg=invalid
2199         for ol_val in auto yes no ; do
2200                 if test "$enableval" = "$ol_val" ; then
2201                         ol_arg="$ol_val"
2202                 fi
2203         done
2204         if test "$ol_arg" = "invalid" ; then
2205                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2206         fi
2207         ol_enable_monitor="$ol_arg"
2208
2209 else
2210         ol_enable_monitor="yes"
2211 fi
2212 # end --enable-monitor
2213 # OpenLDAP --with-monitor_module
2214         # Check whether --with-monitor_module or --without-monitor_module was given.
2215 if test "${with_monitor_module+set}" = set; then
2216   withval="$with_monitor_module"
2217   
2218         ol_arg=invalid
2219         for ol_val in static dynamic ; do
2220                 if test "$withval" = "$ol_val" ; then
2221                         ol_arg="$ol_val"
2222                 fi
2223         done
2224         if test "$ol_arg" = "invalid" ; then
2225                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2226         fi
2227         ol_with_monitor_module="$ol_arg"
2228
2229 else
2230         ol_with_monitor_module="static"
2231 fi
2232 # end --with-monitor_module
2233
2234 # OpenLDAP --enable-null
2235         # Check whether --enable-null or --disable-null was given.
2236 if test "${enable_null+set}" = set; then
2237   enableval="$enable_null"
2238   
2239         ol_arg=invalid
2240         for ol_val in auto yes no ; do
2241                 if test "$enableval" = "$ol_val" ; then
2242                         ol_arg="$ol_val"
2243                 fi
2244         done
2245         if test "$ol_arg" = "invalid" ; then
2246                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2247         fi
2248         ol_enable_null="$ol_arg"
2249
2250 else
2251         ol_enable_null="no"
2252 fi
2253 # end --enable-null
2254 # OpenLDAP --with-null_module
2255         # Check whether --with-null_module or --without-null_module was given.
2256 if test "${with_null_module+set}" = set; then
2257   withval="$with_null_module"
2258   
2259         ol_arg=invalid
2260         for ol_val in static dynamic ; do
2261                 if test "$withval" = "$ol_val" ; then
2262                         ol_arg="$ol_val"
2263                 fi
2264         done
2265         if test "$ol_arg" = "invalid" ; then
2266                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2267         fi
2268         ol_with_null_module="$ol_arg"
2269
2270 else
2271         ol_with_null_module="static"
2272 fi
2273 # end --with-null_module
2274
2275 # OpenLDAP --enable-passwd
2276         # Check whether --enable-passwd or --disable-passwd was given.
2277 if test "${enable_passwd+set}" = set; then
2278   enableval="$enable_passwd"
2279   
2280         ol_arg=invalid
2281         for ol_val in auto yes no ; do
2282                 if test "$enableval" = "$ol_val" ; then
2283                         ol_arg="$ol_val"
2284                 fi
2285         done
2286         if test "$ol_arg" = "invalid" ; then
2287                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2288         fi
2289         ol_enable_passwd="$ol_arg"
2290
2291 else
2292         ol_enable_passwd="no"
2293 fi
2294 # end --enable-passwd
2295 # OpenLDAP --with-passwd_module
2296         # Check whether --with-passwd_module or --without-passwd_module was given.
2297 if test "${with_passwd_module+set}" = set; then
2298   withval="$with_passwd_module"
2299   
2300         ol_arg=invalid
2301         for ol_val in static dynamic ; do
2302                 if test "$withval" = "$ol_val" ; then
2303                         ol_arg="$ol_val"
2304                 fi
2305         done
2306         if test "$ol_arg" = "invalid" ; then
2307                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2308         fi
2309         ol_with_passwd_module="$ol_arg"
2310
2311 else
2312         ol_with_passwd_module="static"
2313 fi
2314 # end --with-passwd_module
2315
2316 # OpenLDAP --enable-perl
2317         # Check whether --enable-perl or --disable-perl was given.
2318 if test "${enable_perl+set}" = set; then
2319   enableval="$enable_perl"
2320   
2321         ol_arg=invalid
2322         for ol_val in auto yes no ; do
2323                 if test "$enableval" = "$ol_val" ; then
2324                         ol_arg="$ol_val"
2325                 fi
2326         done
2327         if test "$ol_arg" = "invalid" ; then
2328                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2329         fi
2330         ol_enable_perl="$ol_arg"
2331
2332 else
2333         ol_enable_perl="no"
2334 fi
2335 # end --enable-perl
2336 # OpenLDAP --with-perl_module
2337         # Check whether --with-perl_module or --without-perl_module was given.
2338 if test "${with_perl_module+set}" = set; then
2339   withval="$with_perl_module"
2340   
2341         ol_arg=invalid
2342         for ol_val in static dynamic ; do
2343                 if test "$withval" = "$ol_val" ; then
2344                         ol_arg="$ol_val"
2345                 fi
2346         done
2347         if test "$ol_arg" = "invalid" ; then
2348                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2349         fi
2350         ol_with_perl_module="$ol_arg"
2351
2352 else
2353         ol_with_perl_module="static"
2354 fi
2355 # end --with-perl_module
2356
2357 # OpenLDAP --enable-shell
2358         # Check whether --enable-shell or --disable-shell was given.
2359 if test "${enable_shell+set}" = set; then
2360   enableval="$enable_shell"
2361   
2362         ol_arg=invalid
2363         for ol_val in auto yes no ; do
2364                 if test "$enableval" = "$ol_val" ; then
2365                         ol_arg="$ol_val"
2366                 fi
2367         done
2368         if test "$ol_arg" = "invalid" ; then
2369                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2370         fi
2371         ol_enable_shell="$ol_arg"
2372
2373 else
2374         ol_enable_shell="no"
2375 fi
2376 # end --enable-shell
2377 # OpenLDAP --with-shell_module
2378         # Check whether --with-shell_module or --without-shell_module was given.
2379 if test "${with_shell_module+set}" = set; then
2380   withval="$with_shell_module"
2381   
2382         ol_arg=invalid
2383         for ol_val in static dynamic ; do
2384                 if test "$withval" = "$ol_val" ; then
2385                         ol_arg="$ol_val"
2386                 fi
2387         done
2388         if test "$ol_arg" = "invalid" ; then
2389                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2390         fi
2391         ol_with_shell_module="$ol_arg"
2392
2393 else
2394         ol_with_shell_module="static"
2395 fi
2396 # end --with-shell_module
2397
2398 # OpenLDAP --enable-sql
2399         # Check whether --enable-sql or --disable-sql was given.
2400 if test "${enable_sql+set}" = set; then
2401   enableval="$enable_sql"
2402   
2403         ol_arg=invalid
2404         for ol_val in auto yes no ; do
2405                 if test "$enableval" = "$ol_val" ; then
2406                         ol_arg="$ol_val"
2407                 fi
2408         done
2409         if test "$ol_arg" = "invalid" ; then
2410                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2411         fi
2412         ol_enable_sql="$ol_arg"
2413
2414 else
2415         ol_enable_sql="no"
2416 fi
2417 # end --enable-sql
2418 # OpenLDAP --with-sql_module
2419         # Check whether --with-sql_module or --without-sql_module was given.
2420 if test "${with_sql_module+set}" = set; then
2421   withval="$with_sql_module"
2422   
2423         ol_arg=invalid
2424         for ol_val in static dynamic ; do
2425                 if test "$withval" = "$ol_val" ; then
2426                         ol_arg="$ol_val"
2427                 fi
2428         done
2429         if test "$ol_arg" = "invalid" ; then
2430                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2431         fi
2432         ol_with_sql_module="$ol_arg"
2433
2434 else
2435         ol_with_sql_module="static"
2436 fi
2437 # end --with-sql_module
2438
2439
2440 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2441 if test "${with_xxslapoverlays+set}" = set; then
2442   withval="$with_xxslapoverlays"
2443   :
2444 fi
2445
2446 # OpenLDAP --with-dyngroup
2447         # Check whether --with-dyngroup or --without-dyngroup was given.
2448 if test "${with_dyngroup+set}" = set; then
2449   withval="$with_dyngroup"
2450   
2451         ol_arg=invalid
2452         for ol_val in no yes mod ; do
2453                 if test "$withval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $withval for --with-dyngroup" 1>&2; exit 1; }
2459         fi
2460         ol_with_dyngroup="$ol_arg"
2461
2462 else
2463         ol_with_dyngroup="no"
2464 fi
2465 # end --with-dyngroup
2466
2467 # OpenLDAP --with-proxycache
2468         # Check whether --with-proxycache or --without-proxycache was given.
2469 if test "${with_proxycache+set}" = set; then
2470   withval="$with_proxycache"
2471   
2472         ol_arg=invalid
2473         for ol_val in no yes mod ; do
2474                 if test "$withval" = "$ol_val" ; then
2475                         ol_arg="$ol_val"
2476                 fi
2477         done
2478         if test "$ol_arg" = "invalid" ; then
2479                 { echo "configure: error: bad value $withval for --with-proxycache" 1>&2; exit 1; }
2480         fi
2481         ol_with_proxycache="$ol_arg"
2482
2483 else
2484         ol_with_proxycache="no"
2485 fi
2486 # end --with-proxycache
2487
2488 # OpenLDAP --with-rwm
2489         # Check whether --with-rwm or --without-rwm was given.
2490 if test "${with_rwm+set}" = set; then
2491   withval="$with_rwm"
2492   
2493         ol_arg=invalid
2494         for ol_val in no yes mod ; do
2495                 if test "$withval" = "$ol_val" ; then
2496                         ol_arg="$ol_val"
2497                 fi
2498         done
2499         if test "$ol_arg" = "invalid" ; then
2500                 { echo "configure: error: bad value $withval for --with-rwm" 1>&2; exit 1; }
2501         fi
2502         ol_with_rwm="$ol_arg"
2503
2504 else
2505         ol_with_rwm="no"
2506 fi
2507 # end --with-rwm
2508
2509
2510 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2511 if test "${with_xxslurpdoptions+set}" = set; then
2512   withval="$with_xxslurpdoptions"
2513   :
2514 fi
2515
2516 # OpenLDAP --enable-slurpd
2517         # Check whether --enable-slurpd or --disable-slurpd was given.
2518 if test "${enable_slurpd+set}" = set; then
2519   enableval="$enable_slurpd"
2520   
2521         ol_arg=invalid
2522         for ol_val in auto yes no ; do
2523                 if test "$enableval" = "$ol_val" ; then
2524                         ol_arg="$ol_val"
2525                 fi
2526         done
2527         if test "$ol_arg" = "invalid" ; then
2528                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2529         fi
2530         ol_enable_slurpd="$ol_arg"
2531
2532 else
2533         ol_enable_slurpd="auto"
2534 fi
2535 # end --enable-slurpd
2536
2537 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2538 if test "${with_xxliboptions+set}" = set; then
2539   withval="$with_xxliboptions"
2540   :
2541 fi
2542
2543 # Check whether --enable-static or --disable-static was given.
2544 if test "${enable_static+set}" = set; then
2545   enableval="$enable_static"
2546   p=${PACKAGE-default}
2547 case $enableval in
2548 yes) enable_static=yes ;;
2549 no) enable_static=no ;;
2550 *)
2551   enable_static=no
2552   # Look at the argument we got.  We use all the common list separators.
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2554   for pkg in $enableval; do
2555     if test "X$pkg" = "X$p"; then
2556       enable_static=yes
2557     fi
2558   done
2559   IFS="$ac_save_ifs"
2560   ;;
2561 esac
2562 else
2563   enable_static=yes
2564 fi
2565
2566 # Check whether --enable-shared or --disable-shared was given.
2567 if test "${enable_shared+set}" = set; then
2568   enableval="$enable_shared"
2569   p=${PACKAGE-default}
2570 case $enableval in
2571 yes) enable_shared=yes ;;
2572 no) enable_shared=no ;;
2573 *)
2574   enable_shared=no
2575   # Look at the argument we got.  We use all the common list separators.
2576   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2577   for pkg in $enableval; do
2578     if test "X$pkg" = "X$p"; then
2579       enable_shared=yes
2580     fi
2581   done
2582   IFS="$ac_save_ifs"
2583   ;;
2584 esac
2585 else
2586   enable_shared=yes
2587 fi
2588
2589
2590
2591 # validate options
2592 if test $ol_enable_slapd = no ; then
2593                 if test $ol_enable_slapi = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2595         fi
2596         if test $ol_enable_bdb = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2598         fi
2599         if test $ol_enable_dnssrv = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2601         fi
2602         if test $ol_enable_hdb = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2604         fi
2605         if test $ol_enable_ldap = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2607         fi
2608         if test $ol_enable_ldbm = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2610         fi
2611         if test $ol_enable_meta = yes ; then
2612                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2613         fi
2614         if test $ol_enable_monitor = yes ; then
2615                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2616         fi
2617         if test $ol_enable_null = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2619         fi
2620         if test $ol_enable_passwd = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2622         fi
2623         if test $ol_enable_perl = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2625         fi
2626         if test $ol_enable_shell = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2628         fi
2629         if test $ol_enable_sql = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2631         fi
2632         if test $ol_enable_modules = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2634         fi
2635         if test $ol_enable_multimaster = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2637         fi
2638         if test $ol_enable_wrappers = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2640         fi
2641         if test $ol_enable_rlookups = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2643         fi
2644         if test $ol_enable_aci = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2646         fi
2647         if test $ol_with_ldbm_api != auto ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2649         fi
2650         if test $ol_with_ldbm_type != auto ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2652         fi
2653         if test $ol_with_bdb_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2655         fi
2656         if test $ol_with_dnssrv_module != static ; then
2657                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2658         fi
2659         if test $ol_with_hdb_module != static ; then
2660                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2661         fi
2662         if test $ol_with_ldap_module != static ; then
2663                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2664         fi
2665         if test $ol_with_ldbm_module != static ; then
2666                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2667         fi
2668         if test $ol_with_meta_module != static ; then
2669                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2670         fi
2671         if test $ol_with_monitor_module != static ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2673         fi
2674         if test $ol_with_null_module != static ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2676         fi
2677         if test $ol_with_passwd_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2679         fi
2680         if test $ol_with_perl_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2682         fi
2683         if test $ol_with_shell_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2685         fi
2686         if test $ol_with_sql_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2688         fi
2689         if test $ol_enable_slurpd = yes ; then
2690                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2691         fi
2692         if test $ol_enable_rewrite = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2694         fi
2695         if test $ol_with_dyngroup != no ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2697         fi
2698         if test $ol_with_proxycache != no ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2700         fi
2701         if test $ol_with_rwm != no ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2703         fi
2704
2705         # force settings to no
2706         ol_enable_slapi=no
2707         ol_enable_bdb=no
2708         ol_enable_dnssrv=no
2709         ol_enable_hdb=no
2710         ol_enable_ldap=no
2711         ol_enable_ldbm=no
2712         ol_enable_meta=no
2713         ol_enable_monitor=no
2714         ol_enable_null=no
2715         ol_enable_passwd=no
2716         ol_enable_perl=no
2717         ol_enable_shell=no
2718         ol_enable_sql=no
2719
2720         ol_enable_modules=no
2721         ol_enable_multimaster=no
2722         ol_enable_rlookups=no
2723         ol_enable_aci=no
2724         ol_enable_wrappers=no
2725
2726         ol_with_ldbm_api=no
2727         ol_with_ldbm_type=no
2728
2729         ol_with_bdb_module=static
2730         ol_with_dnssrv_module=static
2731         ol_with_hdb_module=static
2732         ol_with_ldap_module=static
2733         ol_with_ldbm_module=static
2734         ol_with_meta_module=static
2735         ol_with_monitor_module=static
2736         ol_with_null_module=static
2737         ol_with_passwd_module=static
2738         ol_with_perl_module=static
2739         ol_with_shell_module=static
2740         ol_with_sql_module=static
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746         ol_with_dyngroup=no
2747         ol_with_proxycache=no
2748         ol_with_rwm=no
2749
2750 elif test $ol_enable_ldbm = no ; then
2751         
2752         if test $ol_with_ldbm_api != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_type != auto ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2758         fi
2759
2760         if test $ol_with_ldbm_module != static ; then
2761                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2762         fi
2763
2764         if test $ol_enable_modules != yes -a \
2765                 $ol_enable_bdb = no -a \
2766                 $ol_enable_dnssrv = no -a \
2767                 $ol_enable_hdb = no -a \
2768                 $ol_enable_ldap = no -a \
2769                 $ol_enable_meta = no -a \
2770                 $ol_enable_monitor = no -a \
2771                 $ol_enable_null = no -a \
2772                 $ol_enable_passwd = no -a \
2773                 $ol_enable_perl = no -a \
2774                 $ol_enable_shell = no -a \
2775                 $ol_enable_sql = no ; then
2776
2777                 if test $ol_enable_slapd = yes ; then
2778                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2779                 else
2780                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2781                         ol_enable_slapd=no
2782                 fi
2783         fi
2784
2785         ol_with_ldbm_api=no
2786         ol_with_ldbm_type=no
2787         ol_with_ldbm_module=static
2788
2789         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2790                 ol_with_ldbm_api=berkeley
2791         fi
2792
2793 else
2794                 if test $ol_with_ldbm_api = gdbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798         if test $ol_with_ldbm_api = mdbm -a \
2799                 $ol_with_ldbm_type = btree ; then
2800                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2801         fi
2802         if test $ol_with_ldbm_api = ndbm -a \
2803                 $ol_with_ldbm_type = btree ; then
2804                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2805         fi
2806
2807         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2808                 if test $ol_with_ldbm_api = auto ; then
2809                         ol_with_ldbm_api=berkeley
2810                 elif test $ol_with_ldbm_api != berkeley ; then
2811                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2812                 fi
2813
2814         elif test $ol_enable_bdb = auto ; then
2815                 if test $ol_with_ldbm_api != berkeley \
2816                         -o $ol_with_ldbm_api != auto ; then
2817                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2818                         ol_enable_bdb=no
2819                 fi
2820         fi
2821 fi
2822
2823 if test $ol_enable_slurpd = yes ; then
2824                 if test $ol_with_threads = no ; then
2825                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2826         fi
2827 fi
2828
2829 if test $ol_enable_lmpasswd = yes ; then
2830         if test $ol_with_tls = no ; then
2831                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2832         fi
2833 fi
2834
2835 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2836         if test $ol_with_kerberos = no ; then
2837                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2838         elif test $ol_with_kerberos = auto ; then
2839                 ol_with_kerberos=yes
2840         fi
2841
2842 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2843         if test $ol_with_kerberos = auto ; then
2844                 ol_with_kerberos=no
2845         elif test $ol_with_kerberos != no ; then
2846                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2847                 ol_with_kerberos=no
2848         fi
2849 fi
2850
2851 if test $ol_enable_spasswd = yes ; then
2852         if test $ol_with_cyrus_sasl = no ; then
2853                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2854         fi
2855         ol_with_cyrus_sasl=yes
2856 fi
2857
2858 echo "$ac_t""done" 1>&6
2859
2860 LDAP_LIBS=
2861 LDBM_LIBS=
2862 LTHREAD_LIBS=
2863 LUTIL_LIBS=
2864
2865 SLAPD_LIBS=
2866 SLURPD_LIBS=
2867
2868 BUILD_SLAPD=no
2869 BUILD_SLURPD=no
2870
2871 BUILD_THREAD=no
2872
2873 BUILD_SLAPI=no
2874 SLAPD_SLAPI_DEPEND=
2875
2876 BUILD_BDB=no
2877 BUILD_DNSSRV=no
2878 BUILD_HDB=no
2879 BUILD_LDAP=no
2880 BUILD_LDBM=no
2881 BUILD_META=no
2882 BUILD_MONITOR=no
2883 BUILD_NULL=no
2884 BUILD_PASSWD=no
2885 BUILD_PERL=no
2886 BUILD_SHELL=no
2887 BUILD_SQL=no
2888
2889 BUILD_BDB_DYNAMIC=static
2890 BUILD_DNSSRV_DYNAMIC=static
2891 BUILD_HDB_DYNAMIC=static
2892 BUILD_LDAP_DYNAMIC=static
2893 BUILD_LDBM_DYNAMIC=static
2894 BUILD_META_DYNAMIC=static
2895 BUILD_MONITOR_DYNAMIC=static
2896 BUILD_NULL_DYNAMIC=static
2897 BUILD_PASSWD_DYNAMIC=static
2898 BUILD_PERL_DYNAMIC=static
2899 BUILD_SHELL_DYNAMIC=static
2900 BUILD_SQL_DYNAMIC=static
2901
2902 BUILD_DYNGROUP=no
2903 BUILD_PROXYCACHE=no
2904 BUILD_RWM=no
2905
2906 SLAPD_DYNAMIC_OVERLAYS=
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 KRB4_LIBS=
2923 KRB5_LIBS=
2924 SASL_LIBS=
2925 TLS_LIBS=
2926 MODULES_LIBS=
2927 SLAPI_LIBS=
2928 LIBSLAPI=
2929 LIBSLAPITOOLS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3731 echo "configure:3732: checking for a sed that does not truncate output" >&5
3732 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   # Loop through the user's path and test for sed and gsed.
3736 # Then use that list of sed's as ones to test for truncation.
3737 as_executable_p="test -f"
3738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739 for as_dir in $PATH
3740 do
3741   IFS=$as_save_IFS
3742   test -z "$as_dir" && as_dir=.
3743   for ac_prog in sed gsed; do
3744     for ac_exec_ext in '' $ac_executable_extensions; do
3745       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3746         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3747       fi
3748     done
3749   done
3750 done
3751
3752   # Create a temporary directory, and hook for its removal unless debugging.
3753 $debug ||
3754 {
3755   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3756   trap '{ (exit 1); exit 1; }' 1 2 13 15
3757 }
3758
3759 # Create a (secure) tmp directory for tmp files.
3760 : ${TMPDIR=/tmp}
3761 {
3762   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3763   test -n "$tmp" && test -d "$tmp"
3764 }  ||
3765 {
3766   tmp=$TMPDIR/sed$$-$RANDOM
3767   (umask 077 && mkdir $tmp)
3768 } ||
3769 {
3770    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3771    { (exit 1); exit 1; }
3772 }
3773   _max=0
3774   _count=0
3775   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3776   # along with /bin/sed that truncates output.
3777   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3778     test ! -f ${_sed} && break
3779     cat /dev/null > "$tmp/sed.in"
3780     _count=0
3781     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3782     # Check for GNU sed and select it if it is found.
3783     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3784       lt_cv_path_SED=${_sed}
3785       break
3786     fi
3787     while true; do
3788       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3789       mv "$tmp/sed.tmp" "$tmp/sed.in"
3790       cp "$tmp/sed.in" "$tmp/sed.nl"
3791       echo >>"$tmp/sed.nl"
3792       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3793       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3794       # 40000 chars as input seems more than enough
3795       test $_count -gt 10 && break
3796       _count=`expr $_count + 1`
3797       if test $_count -gt $_max; then
3798         _max=$_count
3799         lt_cv_path_SED=$_sed
3800       fi
3801     done
3802   done
3803   rm -rf "$tmp"
3804
3805 fi
3806
3807 if test "X$SED" != "X"; then
3808   lt_cv_path_SED=$SED
3809 else
3810   SED=$lt_cv_path_SED
3811 fi
3812 echo "$ac_t""$SED" 1>&6
3813
3814 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3815 echo "configure:3816: checking whether ln -s works" >&5
3816 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3817   echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819   rm -f conftestdata
3820 if ln -s X conftestdata 2>/dev/null
3821 then
3822   rm -f conftestdata
3823   ac_cv_prog_LN_S="ln -s"
3824 else
3825   ac_cv_prog_LN_S=ln
3826 fi
3827 fi
3828 LN_S="$ac_cv_prog_LN_S"
3829 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3830   echo "$ac_t""yes" 1>&6
3831 else
3832   echo "$ac_t""no" 1>&6
3833 fi
3834
3835 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3836 echo "configure:3837: checking how to recognise dependent libraries" >&5
3837 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3838   echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840   lt_cv_file_magic_cmd='$MAGIC_CMD'
3841 lt_cv_file_magic_test_file=
3842 lt_cv_deplibs_check_method='unknown'
3843 # Need to set the preceding variable on all platforms that support
3844 # interlibrary dependencies.
3845 # 'none' -- dependencies not supported.
3846 # `unknown' -- same as none, but documents that we really don't know.
3847 # 'pass_all' -- all dependencies passed with no checks.
3848 # 'test_compile' -- check by making test program.
3849 # 'file_magic [[regex]]' -- check by looking for files in library path
3850 # which responds to the $file_magic_cmd with a given egrep regex.
3851 # If you have `file' or equivalent on your system and you're not sure
3852 # whether `pass_all' will *always* work, you probably want this one.
3853
3854 case $host_os in
3855 aix4* | aix5*)
3856   lt_cv_deplibs_check_method=pass_all
3857   ;;
3858
3859 beos*)
3860   lt_cv_deplibs_check_method=pass_all
3861   ;;
3862
3863 bsdi4*)
3864   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3865   lt_cv_file_magic_cmd='/usr/bin/file -L'
3866   lt_cv_file_magic_test_file=/shlib/libc.so
3867   ;;
3868
3869 cygwin* | mingw* | pw32*)
3870   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3871   lt_cv_file_magic_cmd='$OBJDUMP -f'
3872   ;;
3873
3874 darwin* | rhapsody*)
3875   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3876   lt_cv_file_magic_cmd='/usr/bin/file -L'
3877   case "$host_os" in
3878   rhapsody* | darwin1.[012])
3879     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3880     ;;
3881   *) # Darwin 1.3 on
3882     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3883     ;;
3884   esac
3885   ;;
3886
3887 freebsd*)
3888   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3889     case $host_cpu in
3890     i*86 )
3891       # Not sure whether the presence of OpenBSD here was a mistake.
3892       # Let's accept both of them until this is cleared up.
3893       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3894       lt_cv_file_magic_cmd=/usr/bin/file
3895       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3896       ;;
3897     esac
3898   else
3899     lt_cv_deplibs_check_method=pass_all
3900   fi
3901   ;;
3902
3903 gnu*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 hpux10.20*|hpux11*)
3908   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3909   lt_cv_file_magic_cmd=/usr/bin/file
3910   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3911   ;;
3912
3913 irix5* | irix6* | nonstopux*)
3914   case $host_os in
3915   irix5* | nonstopux*)
3916     # this will be overridden with pass_all, but let us keep it just in case
3917     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3918     ;;
3919   *)
3920     case $LD in
3921     *-32|*"-32 ") libmagic=32-bit;;
3922     *-n32|*"-n32 ") libmagic=N32;;
3923     *-64|*"-64 ") libmagic=64-bit;;
3924     *) libmagic=never-match;;
3925     esac
3926     # this will be overridden with pass_all, but let us keep it just in case
3927     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3928     ;;
3929   esac
3930   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3931   lt_cv_deplibs_check_method=pass_all
3932   ;;
3933
3934 # This must be Linux ELF.
3935 linux-gnu*)
3936   case $host_cpu in
3937   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3938     lt_cv_deplibs_check_method=pass_all ;;
3939   *)
3940     # glibc up to 2.1.1 does not perform some relocations on ARM
3941     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3942   esac
3943   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3944   ;;
3945
3946 netbsd*)
3947   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3948     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3949   else
3950     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3951   fi
3952   ;;
3953
3954 newos6*)
3955   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3956   lt_cv_file_magic_cmd=/usr/bin/file
3957   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3958   ;;
3959
3960 openbsd*)
3961   lt_cv_file_magic_cmd=/usr/bin/file
3962   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3963   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3964     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3965   else
3966     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3967   fi
3968   ;;
3969
3970 osf3* | osf4* | osf5*)
3971   # this will be overridden with pass_all, but let us keep it just in case
3972   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3973   lt_cv_file_magic_test_file=/shlib/libc.so
3974   lt_cv_deplibs_check_method=pass_all
3975   ;;
3976
3977 sco3.2v5*)
3978   lt_cv_deplibs_check_method=pass_all
3979   ;;
3980
3981 solaris*)
3982   lt_cv_deplibs_check_method=pass_all
3983   lt_cv_file_magic_test_file=/lib/libc.so
3984   ;;
3985
3986 sysv5uw[78]* | sysv4*uw2*)
3987   lt_cv_deplibs_check_method=pass_all
3988   ;;
3989
3990 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3991   case $host_vendor in
3992   motorola)
3993     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]'
3994     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3995     ;;
3996   ncr)
3997     lt_cv_deplibs_check_method=pass_all
3998     ;;
3999   sequent)
4000     lt_cv_file_magic_cmd='/bin/file'
4001     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4002     ;;
4003   sni)
4004     lt_cv_file_magic_cmd='/bin/file'
4005     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4006     lt_cv_file_magic_test_file=/lib/libc.so
4007     ;;
4008   siemens)
4009     lt_cv_deplibs_check_method=pass_all
4010     ;;
4011   esac
4012   ;;
4013 esac
4014
4015 fi
4016
4017 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4018 file_magic_cmd=$lt_cv_file_magic_cmd
4019 deplibs_check_method=$lt_cv_deplibs_check_method
4020
4021 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4022 echo "configure:4023: checking for object suffix" >&5
4023 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4024   echo $ac_n "(cached) $ac_c" 1>&6
4025 else
4026   rm -f conftest*
4027 echo 'int i = 1;' > conftest.$ac_ext
4028 if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4029   for ac_file in conftest.*; do
4030     case $ac_file in
4031     *.c) ;;
4032     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4033     esac
4034   done
4035 else
4036   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4037 fi
4038 rm -f conftest*
4039 fi
4040
4041 echo "$ac_t""$ac_cv_objext" 1>&6
4042 OBJEXT=$ac_cv_objext
4043 ac_objext=$ac_cv_objext
4044
4045
4046
4047
4048 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4049 echo "configure:4050: checking for executable suffix" >&5
4050 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4051   echo $ac_n "(cached) $ac_c" 1>&6
4052 else
4053   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4054   ac_cv_exeext=.exe
4055 else
4056   rm -f conftest*
4057   echo 'int main () { return 0; }' > conftest.$ac_ext
4058   ac_cv_exeext=
4059   if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4060     for file in conftest.*; do
4061       case $file in
4062       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4063       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4064       esac
4065     done
4066   else
4067     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4068   fi
4069   rm -f conftest*
4070   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4071 fi
4072 fi
4073
4074 EXEEXT=""
4075 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4076 echo "$ac_t""${ac_cv_exeext}" 1>&6
4077 ac_exeext=$EXEEXT
4078
4079 if test $host != $build; then
4080   ac_tool_prefix=${host_alias}-
4081 else
4082   ac_tool_prefix=
4083 fi
4084
4085
4086
4087
4088 # Check for command to grab the raw symbol name followed by C symbol from nm.
4089 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4090 echo "configure:4091: checking command to parse $NM output" >&5
4091 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4092   echo $ac_n "(cached) $ac_c" 1>&6
4093 else
4094   
4095 # These are sane defaults that work on at least a few old systems.
4096 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4097
4098 # Character class describing NM global symbol codes.
4099 symcode='[BCDEGRST]'
4100
4101 # Regexp to match symbols that can be accessed directly from C.
4102 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4103
4104 # Transform the above into a raw symbol and a C symbol.
4105 symxfrm='\1 \2\3 \3'
4106
4107 # Transform an extracted symbol line into a proper C declaration
4108 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4109
4110 # Transform an extracted symbol line into symbol name and symbol address
4111 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'"
4112
4113 # Define system-specific variables.
4114 case $host_os in
4115 aix*)
4116   symcode='[BCDT]'
4117   ;;
4118 cygwin* | mingw* | pw32*)
4119   symcode='[ABCDGISTW]'
4120   ;;
4121 hpux*) # Its linker distinguishes data from code symbols
4122   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4123   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'"
4124   ;;
4125 irix* | nonstopux*)
4126   symcode='[BCDEGRST]'
4127   ;;
4128 osf*)
4129   symcode='[BCDEGQRST]'
4130   ;;
4131 solaris* | sysv5*)
4132   symcode='[BDT]'
4133   ;;
4134 sysv4)
4135   symcode='[DFNSTU]'
4136   ;;
4137 esac
4138
4139 # Handle CRLF in mingw tool chain
4140 opt_cr=
4141 case $host_os in
4142 mingw*)
4143   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4144   ;;
4145 esac
4146
4147 # If we're using GNU nm, then use its standard symbol codes.
4148 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4149   symcode='[ABCDGISTW]'
4150 fi
4151
4152 # Try without a prefix undercore, then with it.
4153 for ac_symprfx in "" "_"; do
4154
4155   # Write the raw and C identifiers.
4156 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4157
4158   # Check to see that the pipe works correctly.
4159   pipe_works=no
4160   rm -f conftest*
4161   cat > conftest.$ac_ext <<EOF
4162 #ifdef __cplusplus
4163 extern "C" {
4164 #endif
4165 char nm_test_var;
4166 void nm_test_func(){}
4167 #ifdef __cplusplus
4168 }
4169 #endif
4170 int main(){nm_test_var='a';nm_test_func();return(0);}
4171 EOF
4172
4173   if { (eval echo configure:4174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4174     # Now try to grab the symbols.
4175     nlist=conftest.nm
4176     if { (eval echo configure:4177: \"$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
4177       # Try sorting and uniquifying the output.
4178       if sort "$nlist" | uniq > "$nlist"T; then
4179         mv -f "$nlist"T "$nlist"
4180       else
4181         rm -f "$nlist"T
4182       fi
4183
4184       # Make sure that we snagged all the symbols we need.
4185       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4186         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4187           cat <<EOF > conftest.$ac_ext
4188 #ifdef __cplusplus
4189 extern "C" {
4190 #endif
4191
4192 EOF
4193           # Now generate the symbol file.
4194           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4195
4196           cat <<EOF >> conftest.$ac_ext
4197 #if defined (__STDC__) && __STDC__
4198 # define lt_ptr void *
4199 #else
4200 # define lt_ptr char *
4201 # define const
4202 #endif
4203
4204 /* The mapping between symbol names and symbols. */
4205 const struct {
4206   const char *name;
4207   lt_ptr address;
4208 }
4209 lt_preloaded_symbols[] =
4210 {
4211 EOF
4212           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4213           cat <<\EOF >> conftest.$ac_ext
4214   {0, (lt_ptr) 0}
4215 };
4216
4217 #ifdef __cplusplus
4218 }
4219 #endif
4220 EOF
4221           # Now try linking the two files.
4222           mv conftest.$ac_objext conftstm.$ac_objext
4223           save_LIBS="$LIBS"
4224           save_CFLAGS="$CFLAGS"
4225           LIBS="conftstm.$ac_objext"
4226           CFLAGS="$CFLAGS$no_builtin_flag"
4227           if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4228             pipe_works=yes
4229           fi
4230           LIBS="$save_LIBS"
4231           CFLAGS="$save_CFLAGS"
4232         else
4233           echo "cannot find nm_test_func in $nlist" >&5
4234         fi
4235       else
4236         echo "cannot find nm_test_var in $nlist" >&5
4237       fi
4238     else
4239       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4240     fi
4241   else
4242     echo "$progname: failed program was:" >&5
4243     cat conftest.$ac_ext >&5
4244   fi
4245   rm -f conftest* conftst*
4246
4247   # Do not use the global_symbol_pipe unless it works.
4248   if test "$pipe_works" = yes; then
4249     break
4250   else
4251     lt_cv_sys_global_symbol_pipe=
4252   fi
4253 done
4254
4255 fi
4256
4257 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4258 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4259   global_symbol_to_cdecl=
4260   global_symbol_to_c_name_address=
4261 else
4262   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4263   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4264 fi
4265 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4266 then
4267   echo "$ac_t""failed" 1>&6
4268 else
4269   echo "$ac_t""ok" 1>&6
4270 fi
4271
4272 for ac_hdr in dlfcn.h
4273 do
4274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4276 echo "configure:4277: checking for $ac_hdr" >&5
4277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4278   echo $ac_n "(cached) $ac_c" 1>&6
4279 else
4280   cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4283 #include <$ac_hdr>
4284 EOF
4285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4286 { (eval echo configure:4287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4288 if test -z "$ac_err"; then
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=yes"
4291 else
4292   echo "$ac_err" >&5
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_header_$ac_safe=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4301   echo "$ac_t""yes" 1>&6
4302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4303   cat >> confdefs.h <<EOF
4304 #define $ac_tr_hdr 1
4305 EOF
4306  
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310 done
4311
4312
4313
4314
4315
4316
4317 # Only perform the check for file, if the check method requires it
4318 case $deplibs_check_method in
4319 file_magic*)
4320   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4321     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4322 echo "configure:4323: checking for ${ac_tool_prefix}file" >&5
4323 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4324   echo $ac_n "(cached) $ac_c" 1>&6
4325 else
4326   case $MAGIC_CMD in
4327   /*)
4328   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4329   ;;
4330   ?:/*)
4331   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4332   ;;
4333   *)
4334   ac_save_MAGIC_CMD="$MAGIC_CMD"
4335   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4336   ac_dummy="/usr/bin:$PATH"
4337   for ac_dir in $ac_dummy; do
4338     test -z "$ac_dir" && ac_dir=.
4339     if test -f $ac_dir/${ac_tool_prefix}file; then
4340       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4341       if test -n "$file_magic_test_file"; then
4342         case $deplibs_check_method in
4343         "file_magic "*)
4344           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4345           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4346           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4347             egrep "$file_magic_regex" > /dev/null; then
4348             :
4349           else
4350             cat <<EOF 1>&2
4351
4352 *** Warning: the command libtool uses to detect shared libraries,
4353 *** $file_magic_cmd, produces output that libtool cannot recognize.
4354 *** The result is that libtool may fail to recognize shared libraries
4355 *** as such.  This will affect the creation of libtool libraries that
4356 *** depend on shared libraries, but programs linked with such libtool
4357 *** libraries will work regardless of this problem.  Nevertheless, you
4358 *** may want to report the problem to your system manager and/or to
4359 *** bug-libtool@gnu.org
4360
4361 EOF
4362           fi ;;
4363         esac
4364       fi
4365       break
4366     fi
4367   done
4368   IFS="$ac_save_ifs"
4369   MAGIC_CMD="$ac_save_MAGIC_CMD"
4370   ;;
4371 esac
4372 fi
4373
4374 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4375 if test -n "$MAGIC_CMD"; then
4376   echo "$ac_t""$MAGIC_CMD" 1>&6
4377 else
4378   echo "$ac_t""no" 1>&6
4379 fi
4380
4381 if test -z "$lt_cv_path_MAGIC_CMD"; then
4382   if test -n "$ac_tool_prefix"; then
4383     echo $ac_n "checking for file""... $ac_c" 1>&6
4384 echo "configure:4385: checking for file" >&5
4385 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4386   echo $ac_n "(cached) $ac_c" 1>&6
4387 else
4388   case $MAGIC_CMD in
4389   /*)
4390   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4391   ;;
4392   ?:/*)
4393   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4394   ;;
4395   *)
4396   ac_save_MAGIC_CMD="$MAGIC_CMD"
4397   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4398   ac_dummy="/usr/bin:$PATH"
4399   for ac_dir in $ac_dummy; do
4400     test -z "$ac_dir" && ac_dir=.
4401     if test -f $ac_dir/file; then
4402       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4403       if test -n "$file_magic_test_file"; then
4404         case $deplibs_check_method in
4405         "file_magic "*)
4406           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4407           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4408           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4409             egrep "$file_magic_regex" > /dev/null; then
4410             :
4411           else
4412             cat <<EOF 1>&2
4413
4414 *** Warning: the command libtool uses to detect shared libraries,
4415 *** $file_magic_cmd, produces output that libtool cannot recognize.
4416 *** The result is that libtool may fail to recognize shared libraries
4417 *** as such.  This will affect the creation of libtool libraries that
4418 *** depend on shared libraries, but programs linked with such libtool
4419 *** libraries will work regardless of this problem.  Nevertheless, you
4420 *** may want to report the problem to your system manager and/or to
4421 *** bug-libtool@gnu.org
4422
4423 EOF
4424           fi ;;
4425         esac
4426       fi
4427       break
4428     fi
4429   done
4430   IFS="$ac_save_ifs"
4431   MAGIC_CMD="$ac_save_MAGIC_CMD"
4432   ;;
4433 esac
4434 fi
4435
4436 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4437 if test -n "$MAGIC_CMD"; then
4438   echo "$ac_t""$MAGIC_CMD" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443   else
4444     MAGIC_CMD=:
4445   fi
4446 fi
4447
4448   fi
4449   ;;
4450 esac
4451
4452 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4453 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4455 echo "configure:4456: checking for $ac_word" >&5
4456 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4457   echo $ac_n "(cached) $ac_c" 1>&6
4458 else
4459   if test -n "$RANLIB"; then
4460   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4461 else
4462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4463   ac_dummy="$PATH"
4464   for ac_dir in $ac_dummy; do
4465     test -z "$ac_dir" && ac_dir=.
4466     if test -f $ac_dir/$ac_word; then
4467       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4468       break
4469     fi
4470   done
4471   IFS="$ac_save_ifs"
4472 fi
4473 fi
4474 RANLIB="$ac_cv_prog_RANLIB"
4475 if test -n "$RANLIB"; then
4476   echo "$ac_t""$RANLIB" 1>&6
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481
4482 if test -z "$ac_cv_prog_RANLIB"; then
4483 if test -n "$ac_tool_prefix"; then
4484   # Extract the first word of "ranlib", so it can be a program name with args.
4485 set dummy ranlib; ac_word=$2
4486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4487 echo "configure:4488: checking for $ac_word" >&5
4488 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4489   echo $ac_n "(cached) $ac_c" 1>&6
4490 else
4491   if test -n "$RANLIB"; then
4492   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4493 else
4494   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4495   ac_dummy="$PATH"
4496   for ac_dir in $ac_dummy; do
4497     test -z "$ac_dir" && ac_dir=.
4498     if test -f $ac_dir/$ac_word; then
4499       ac_cv_prog_RANLIB="ranlib"
4500       break
4501     fi
4502   done
4503   IFS="$ac_save_ifs"
4504   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4505 fi
4506 fi
4507 RANLIB="$ac_cv_prog_RANLIB"
4508 if test -n "$RANLIB"; then
4509   echo "$ac_t""$RANLIB" 1>&6
4510 else
4511   echo "$ac_t""no" 1>&6
4512 fi
4513
4514 else
4515   RANLIB=":"
4516 fi
4517 fi
4518
4519 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4520 set dummy ${ac_tool_prefix}strip; ac_word=$2
4521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4522 echo "configure:4523: checking for $ac_word" >&5
4523 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   if test -n "$STRIP"; then
4527   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4528 else
4529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4530   ac_dummy="$PATH"
4531   for ac_dir in $ac_dummy; do
4532     test -z "$ac_dir" && ac_dir=.
4533     if test -f $ac_dir/$ac_word; then
4534       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4535       break
4536     fi
4537   done
4538   IFS="$ac_save_ifs"
4539 fi
4540 fi
4541 STRIP="$ac_cv_prog_STRIP"
4542 if test -n "$STRIP"; then
4543   echo "$ac_t""$STRIP" 1>&6
4544 else
4545   echo "$ac_t""no" 1>&6
4546 fi
4547
4548
4549 if test -z "$ac_cv_prog_STRIP"; then
4550 if test -n "$ac_tool_prefix"; then
4551   # Extract the first word of "strip", so it can be a program name with args.
4552 set dummy strip; ac_word=$2
4553 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4554 echo "configure:4555: checking for $ac_word" >&5
4555 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   if test -n "$STRIP"; then
4559   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4560 else
4561   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4562   ac_dummy="$PATH"
4563   for ac_dir in $ac_dummy; do
4564     test -z "$ac_dir" && ac_dir=.
4565     if test -f $ac_dir/$ac_word; then
4566       ac_cv_prog_STRIP="strip"
4567       break
4568     fi
4569   done
4570   IFS="$ac_save_ifs"
4571   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4572 fi
4573 fi
4574 STRIP="$ac_cv_prog_STRIP"
4575 if test -n "$STRIP"; then
4576   echo "$ac_t""$STRIP" 1>&6
4577 else
4578   echo "$ac_t""no" 1>&6
4579 fi
4580
4581 else
4582   STRIP=":"
4583 fi
4584 fi
4585
4586
4587 enable_dlopen=yes
4588 enable_win32_dll=yes
4589
4590 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4591 if test "${enable_libtool_lock+set}" = set; then
4592   enableval="$enable_libtool_lock"
4593   :
4594 fi
4595
4596 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4597
4598 # Some flags need to be propagated to the compiler or linker for good
4599 # libtool support.
4600 case $host in
4601 *-*-irix6*)
4602   # Find out which ABI we are using.
4603   echo '#line 4604 "configure"' > conftest.$ac_ext
4604   if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4605     case `/usr/bin/file conftest.$ac_objext` in
4606     *32-bit*)
4607       LD="${LD-ld} -32"
4608       ;;
4609     *N32*)
4610       LD="${LD-ld} -n32"
4611       ;;
4612     *64-bit*)
4613       LD="${LD-ld} -64"
4614       ;;
4615     esac
4616   fi
4617   rm -rf conftest*
4618   ;;
4619
4620 *-*-sco3.2v5*)
4621   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4622   SAVE_CFLAGS="$CFLAGS"
4623   CFLAGS="$CFLAGS -belf"
4624   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4625 echo "configure:4626: checking whether the C compiler needs -belf" >&5
4626 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   
4630      ac_ext=c
4631 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4632 ac_cpp='$CPP $CPPFLAGS'
4633 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4634 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4635 cross_compiling=$ac_cv_prog_cc_cross
4636
4637      cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640
4641 int main() {
4642
4643 ; return 0; }
4644 EOF
4645 if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4646   rm -rf conftest*
4647   lt_cv_cc_needs_belf=yes
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651   rm -rf conftest*
4652   lt_cv_cc_needs_belf=no
4653 fi
4654 rm -f conftest*
4655      ac_ext=c
4656 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4657 ac_cpp='$CPP $CPPFLAGS'
4658 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4659 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4660 cross_compiling=$ac_cv_prog_cc_cross
4661
4662 fi
4663
4664 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4665   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4666     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4667     CFLAGS="$SAVE_CFLAGS"
4668   fi
4669   ;;
4670
4671 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4672   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4673 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4675 echo "configure:4676: checking for $ac_word" >&5
4676 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4677   echo $ac_n "(cached) $ac_c" 1>&6
4678 else
4679   if test -n "$DLLTOOL"; then
4680   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4681 else
4682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4683   ac_dummy="$PATH"
4684   for ac_dir in $ac_dummy; do
4685     test -z "$ac_dir" && ac_dir=.
4686     if test -f $ac_dir/$ac_word; then
4687       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4688       break
4689     fi
4690   done
4691   IFS="$ac_save_ifs"
4692 fi
4693 fi
4694 DLLTOOL="$ac_cv_prog_DLLTOOL"
4695 if test -n "$DLLTOOL"; then
4696   echo "$ac_t""$DLLTOOL" 1>&6
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701
4702 if test -z "$ac_cv_prog_DLLTOOL"; then
4703 if test -n "$ac_tool_prefix"; then
4704   # Extract the first word of "dlltool", so it can be a program name with args.
4705 set dummy dlltool; ac_word=$2
4706 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4707 echo "configure:4708: checking for $ac_word" >&5
4708 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4709   echo $ac_n "(cached) $ac_c" 1>&6
4710 else
4711   if test -n "$DLLTOOL"; then
4712   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4713 else
4714   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4715   ac_dummy="$PATH"
4716   for ac_dir in $ac_dummy; do
4717     test -z "$ac_dir" && ac_dir=.
4718     if test -f $ac_dir/$ac_word; then
4719       ac_cv_prog_DLLTOOL="dlltool"
4720       break
4721     fi
4722   done
4723   IFS="$ac_save_ifs"
4724   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4725 fi
4726 fi
4727 DLLTOOL="$ac_cv_prog_DLLTOOL"
4728 if test -n "$DLLTOOL"; then
4729   echo "$ac_t""$DLLTOOL" 1>&6
4730 else
4731   echo "$ac_t""no" 1>&6
4732 fi
4733
4734 else
4735   DLLTOOL="false"
4736 fi
4737 fi
4738
4739   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4740 set dummy ${ac_tool_prefix}as; ac_word=$2
4741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_word" >&5
4743 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4744   echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746   if test -n "$AS"; then
4747   ac_cv_prog_AS="$AS" # Let the user override the test.
4748 else
4749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4750   ac_dummy="$PATH"
4751   for ac_dir in $ac_dummy; do
4752     test -z "$ac_dir" && ac_dir=.
4753     if test -f $ac_dir/$ac_word; then
4754       ac_cv_prog_AS="${ac_tool_prefix}as"
4755       break
4756     fi
4757   done
4758   IFS="$ac_save_ifs"
4759 fi
4760 fi
4761 AS="$ac_cv_prog_AS"
4762 if test -n "$AS"; then
4763   echo "$ac_t""$AS" 1>&6
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767
4768
4769 if test -z "$ac_cv_prog_AS"; then
4770 if test -n "$ac_tool_prefix"; then
4771   # Extract the first word of "as", so it can be a program name with args.
4772 set dummy as; ac_word=$2
4773 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4774 echo "configure:4775: checking for $ac_word" >&5
4775 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   if test -n "$AS"; then
4779   ac_cv_prog_AS="$AS" # Let the user override the test.
4780 else
4781   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4782   ac_dummy="$PATH"
4783   for ac_dir in $ac_dummy; do
4784     test -z "$ac_dir" && ac_dir=.
4785     if test -f $ac_dir/$ac_word; then
4786       ac_cv_prog_AS="as"
4787       break
4788     fi
4789   done
4790   IFS="$ac_save_ifs"
4791   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4792 fi
4793 fi
4794 AS="$ac_cv_prog_AS"
4795 if test -n "$AS"; then
4796   echo "$ac_t""$AS" 1>&6
4797 else
4798   echo "$ac_t""no" 1>&6
4799 fi
4800
4801 else
4802   AS="false"
4803 fi
4804 fi
4805
4806   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4807 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4809 echo "configure:4810: checking for $ac_word" >&5
4810 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4811   echo $ac_n "(cached) $ac_c" 1>&6
4812 else
4813   if test -n "$OBJDUMP"; then
4814   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4815 else
4816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4817   ac_dummy="$PATH"
4818   for ac_dir in $ac_dummy; do
4819     test -z "$ac_dir" && ac_dir=.
4820     if test -f $ac_dir/$ac_word; then
4821       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4822       break
4823     fi
4824   done
4825   IFS="$ac_save_ifs"
4826 fi
4827 fi
4828 OBJDUMP="$ac_cv_prog_OBJDUMP"
4829 if test -n "$OBJDUMP"; then
4830   echo "$ac_t""$OBJDUMP" 1>&6
4831 else
4832   echo "$ac_t""no" 1>&6
4833 fi
4834
4835
4836 if test -z "$ac_cv_prog_OBJDUMP"; then
4837 if test -n "$ac_tool_prefix"; then
4838   # Extract the first word of "objdump", so it can be a program name with args.
4839 set dummy objdump; ac_word=$2
4840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4841 echo "configure:4842: checking for $ac_word" >&5
4842 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   if test -n "$OBJDUMP"; then
4846   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4847 else
4848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4849   ac_dummy="$PATH"
4850   for ac_dir in $ac_dummy; do
4851     test -z "$ac_dir" && ac_dir=.
4852     if test -f $ac_dir/$ac_word; then
4853       ac_cv_prog_OBJDUMP="objdump"
4854       break
4855     fi
4856   done
4857   IFS="$ac_save_ifs"
4858   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4859 fi
4860 fi
4861 OBJDUMP="$ac_cv_prog_OBJDUMP"
4862 if test -n "$OBJDUMP"; then
4863   echo "$ac_t""$OBJDUMP" 1>&6
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867
4868 else
4869   OBJDUMP="false"
4870 fi
4871 fi
4872
4873
4874   # recent cygwin and mingw systems supply a stub DllMain which the user
4875   # can override, but on older systems we have to supply one
4876   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4877 echo "configure:4878: checking if libtool should supply DllMain function" >&5
4878 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4879   echo $ac_n "(cached) $ac_c" 1>&6
4880 else
4881   cat > conftest.$ac_ext <<EOF
4882 #line 4883 "configure"
4883 #include "confdefs.h"
4884
4885 int main() {
4886 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4887       DllMain (0, 0, 0);
4888 ; return 0; }
4889 EOF
4890 if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4891   rm -rf conftest*
4892   lt_cv_need_dllmain=no
4893 else
4894   echo "configure: failed program was:" >&5
4895   cat conftest.$ac_ext >&5
4896   rm -rf conftest*
4897   lt_cv_need_dllmain=yes
4898 fi
4899 rm -f conftest*
4900 fi
4901
4902 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4903
4904   case $host/$CC in
4905   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4906     # old mingw systems require "-dll" to link a DLL, while more recent ones
4907     # require "-mdll"
4908     SAVE_CFLAGS="$CFLAGS"
4909     CFLAGS="$CFLAGS -mdll"
4910     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4911 echo "configure:4912: checking how to link DLLs" >&5
4912 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4913   echo $ac_n "(cached) $ac_c" 1>&6
4914 else
4915   cat > conftest.$ac_ext <<EOF
4916 #line 4917 "configure"
4917 #include "confdefs.h"
4918
4919 int main() {
4920
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   lt_cv_cc_dll_switch=-mdll
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   lt_cv_cc_dll_switch=-dll
4931 fi
4932 rm -f conftest*
4933 fi
4934
4935 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4936     CFLAGS="$SAVE_CFLAGS" ;;
4937   *-*-cygwin* | *-*-pw32*)
4938     # cygwin systems need to pass --dll to the linker, and not link
4939     # crt.o which will require a WinMain@16 definition.
4940     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4941   esac
4942   ;;
4943   
4944 esac
4945
4946 # Sed substitution that helps us do robust quoting.  It backslashifies
4947 # metacharacters that are still active within double-quoted strings.
4948 Xsed='sed -e s/^X//'
4949 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4950
4951 # Same as above, but do not quote variable references.
4952 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4953
4954 # Sed substitution to delay expansion of an escaped shell variable in a
4955 # double_quote_subst'ed string.
4956 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4957
4958 # Constants:
4959 rm="rm -f"
4960
4961 # Global variables:
4962 default_ofile=libtool
4963 can_build_shared=yes
4964
4965 # All known linkers require a `.a' archive for static linking (except M$VC,
4966 # which needs '.lib').
4967 libext=a
4968 ltmain="$ac_aux_dir/ltmain.sh"
4969 ofile="$default_ofile"
4970 with_gnu_ld="$lt_cv_prog_gnu_ld"
4971 need_locks="$enable_libtool_lock"
4972
4973 old_CC="$CC"
4974 old_CFLAGS="$CFLAGS"
4975
4976 # Set sane defaults for various variables
4977 test -z "$AR" && AR=ar
4978 test -z "$AR_FLAGS" && AR_FLAGS=cru
4979 test -z "$AS" && AS=as
4980 test -z "$CC" && CC=cc
4981 test -z "$DLLTOOL" && DLLTOOL=dlltool
4982 test -z "$LD" && LD=ld
4983 test -z "$LN_S" && LN_S="ln -s"
4984 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4985 test -z "$NM" && NM=nm
4986 test -z "$OBJDUMP" && OBJDUMP=objdump
4987 test -z "$RANLIB" && RANLIB=:
4988 test -z "$STRIP" && STRIP=:
4989 test -z "$ac_objext" && ac_objext=o
4990
4991 if test x"$host" != x"$build"; then
4992   ac_tool_prefix=${host_alias}-
4993 else
4994   ac_tool_prefix=
4995 fi
4996
4997 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4998 case $host_os in
4999 linux-gnu*) ;;
5000 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5001 esac
5002
5003 case $host_os in
5004 aix3*)
5005   # AIX sometimes has problems with the GCC collect2 program.  For some
5006   # reason, if we set the COLLECT_NAMES environment variable, the problems
5007   # vanish in a puff of smoke.
5008   if test "X${COLLECT_NAMES+set}" != Xset; then
5009     COLLECT_NAMES=
5010     export COLLECT_NAMES
5011   fi
5012   ;;
5013 esac
5014
5015 # Determine commands to create old-style static archives.
5016 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5017 old_postinstall_cmds='chmod 644 $oldlib'
5018 old_postuninstall_cmds=
5019
5020 if test -n "$RANLIB"; then
5021   case $host_os in
5022   openbsd*)
5023     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5024     ;;
5025   *)
5026     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5027     ;;
5028   esac
5029   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5030 fi
5031
5032 # Allow CC to be a program name with arguments.
5033 set dummy $CC
5034 compiler="$2"
5035
5036 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5037 echo "configure:5038: checking for objdir" >&5
5038 rm -f .libs 2>/dev/null
5039 mkdir .libs 2>/dev/null
5040 if test -d .libs; then
5041   objdir=.libs
5042 else
5043   # MS-DOS does not allow filenames that begin with a dot.
5044   objdir=_libs
5045 fi
5046 rmdir .libs 2>/dev/null
5047 echo "$ac_t""$objdir" 1>&6
5048
5049
5050 # Check whether --with-pic or --without-pic was given.
5051 if test "${with_pic+set}" = set; then
5052   withval="$with_pic"
5053   pic_mode="$withval"
5054 else
5055   pic_mode=default
5056 fi
5057
5058 test -z "$pic_mode" && pic_mode=default
5059
5060 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5061 # in isolation, and that seeing it set (from the cache) indicates that
5062 # the associated values are set (in the cache) correctly too.
5063 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $compiler option to produce PIC" >&5
5065 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068    lt_cv_prog_cc_pic=
5069   lt_cv_prog_cc_shlib=
5070   lt_cv_prog_cc_wl=
5071   lt_cv_prog_cc_static=
5072   lt_cv_prog_cc_no_builtin=
5073   lt_cv_prog_cc_can_build_shared=$can_build_shared
5074
5075   if test "$GCC" = yes; then
5076     lt_cv_prog_cc_wl='-Wl,'
5077     lt_cv_prog_cc_static='-static'
5078
5079     case $host_os in
5080     aix*)
5081       # Below there is a dirty hack to force normal static linking with -ldl
5082       # The problem is because libdl dynamically linked with both libc and
5083       # libC (AIX C++ library), which obviously doesn't included in libraries
5084       # list by gcc. This cause undefined symbols with -static flags.
5085       # This hack allows C programs to be linked with "-static -ldl", but
5086       # not sure about C++ programs.
5087       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5088       ;;
5089     amigaos*)
5090       # FIXME: we need at least 68020 code to build shared libraries, but
5091       # adding the `-m68020' flag to GCC prevents building anything better,
5092       # like `-m68040'.
5093       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5094       ;;
5095     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5096       # PIC is the default for these OSes.
5097       ;;
5098     darwin* | rhapsody*)
5099       # PIC is the default on this platform
5100       # Common symbols not allowed in MH_DYLIB files
5101       lt_cv_prog_cc_pic='-fno-common'
5102       ;;
5103     cygwin* | mingw* | pw32* | os2*)
5104       # This hack is so that the source file can tell whether it is being
5105       # built for inclusion in a dll (and should export symbols for example).
5106       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5107       ;;
5108     sysv4*MP*)
5109       if test -d /usr/nec; then
5110          lt_cv_prog_cc_pic=-Kconform_pic
5111       fi
5112       ;;
5113     *)
5114       lt_cv_prog_cc_pic='-fPIC'
5115       ;;
5116     esac
5117   else
5118     # PORTME Check for PIC flags for the system compiler.
5119     case $host_os in
5120     aix3* | aix4* | aix5*)
5121       lt_cv_prog_cc_wl='-Wl,'
5122       # All AIX code is PIC.
5123       if test "$host_cpu" = ia64; then
5124         # AIX 5 now supports IA64 processor
5125         lt_cv_prog_cc_static='-Bstatic'
5126       else
5127         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5128       fi
5129       ;;
5130
5131     hpux9* | hpux10* | hpux11*)
5132       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5133       lt_cv_prog_cc_wl='-Wl,'
5134       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5135       lt_cv_prog_cc_pic='+Z'
5136       ;;
5137
5138     irix5* | irix6* | nonstopux*)
5139       lt_cv_prog_cc_wl='-Wl,'
5140       lt_cv_prog_cc_static='-non_shared'
5141       # PIC (with -KPIC) is the default.
5142       ;;
5143
5144     cygwin* | mingw* | pw32* | os2*)
5145       # This hack is so that the source file can tell whether it is being
5146       # built for inclusion in a dll (and should export symbols for example).
5147       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5148       ;;
5149
5150     newsos6)
5151       lt_cv_prog_cc_pic='-KPIC'
5152       lt_cv_prog_cc_static='-Bstatic'
5153       ;;
5154
5155     osf3* | osf4* | osf5*)
5156       # All OSF/1 code is PIC.
5157       lt_cv_prog_cc_wl='-Wl,'
5158       lt_cv_prog_cc_static='-non_shared'
5159       ;;
5160
5161     sco3.2v5*)
5162       lt_cv_prog_cc_pic='-Kpic'
5163       lt_cv_prog_cc_static='-dn'
5164       lt_cv_prog_cc_shlib='-belf'
5165       ;;
5166
5167     solaris*)
5168       lt_cv_prog_cc_pic='-KPIC'
5169       lt_cv_prog_cc_static='-Bstatic'
5170       lt_cv_prog_cc_wl='-Wl,'
5171       ;;
5172
5173     sunos4*)
5174       lt_cv_prog_cc_pic='-PIC'
5175       lt_cv_prog_cc_static='-Bstatic'
5176       lt_cv_prog_cc_wl='-Qoption ld '
5177       ;;
5178
5179     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5180       lt_cv_prog_cc_pic='-KPIC'
5181       lt_cv_prog_cc_static='-Bstatic'
5182       lt_cv_prog_cc_wl='-Wl,'
5183       ;;
5184
5185     uts4*)
5186       lt_cv_prog_cc_pic='-pic'
5187       lt_cv_prog_cc_static='-Bstatic'
5188       ;;
5189
5190     sysv4*MP*)
5191       if test -d /usr/nec ;then
5192         lt_cv_prog_cc_pic='-Kconform_pic'
5193         lt_cv_prog_cc_static='-Bstatic'
5194       fi
5195       ;;
5196
5197     *)
5198       lt_cv_prog_cc_can_build_shared=no
5199       ;;
5200     esac
5201   fi
5202
5203 fi
5204
5205 if test -z "$lt_cv_prog_cc_pic"; then
5206   echo "$ac_t""none" 1>&6
5207 else
5208   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5209
5210   # Check to make sure the pic_flag actually works.
5211   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5212 echo "configure:5213: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5213   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216       save_CFLAGS="$CFLAGS"
5217     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5218     cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221
5222 int main() {
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5227   rm -rf conftest*
5228         case $host_os in
5229       hpux9* | hpux10* | hpux11*)
5230         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5231         # they create non-PIC objects.  So, if there were any warnings, we
5232         # assume that PIC is not supported.
5233         if test -s conftest.err; then
5234           lt_cv_prog_cc_pic_works=no
5235         else
5236           lt_cv_prog_cc_pic_works=yes
5237         fi
5238         ;;
5239       *)
5240         lt_cv_prog_cc_pic_works=yes
5241         ;;
5242       esac
5243     
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248         lt_cv_prog_cc_pic_works=no
5249     
5250 fi
5251 rm -f conftest*
5252     CFLAGS="$save_CFLAGS"
5253   
5254 fi
5255
5256
5257   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5258     lt_cv_prog_cc_pic=
5259     lt_cv_prog_cc_can_build_shared=no
5260   else
5261     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5262   fi
5263
5264   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5265 fi
5266
5267 # Check for any special shared library compilation flags.
5268 if test -n "$lt_cv_prog_cc_shlib"; then
5269   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5270   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5271   else
5272    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5273     lt_cv_prog_cc_can_build_shared=no
5274   fi
5275 fi
5276
5277 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5279 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282     lt_cv_prog_cc_static_works=no
5283   save_LDFLAGS="$LDFLAGS"
5284   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288
5289 int main() {
5290
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5294   rm -rf conftest*
5295   lt_cv_prog_cc_static_works=yes
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299 fi
5300 rm -f conftest*
5301   LDFLAGS="$save_LDFLAGS"
5302
5303 fi
5304
5305
5306 # Belt *and* braces to stop my trousers falling down:
5307 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5308 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5309
5310 pic_flag="$lt_cv_prog_cc_pic"
5311 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5312 wl="$lt_cv_prog_cc_wl"
5313 link_static_flag="$lt_cv_prog_cc_static"
5314 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5315 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5316
5317
5318 # Check to see if options -o and -c are simultaneously supported by compiler
5319 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5320 echo "configure:5321: checking if $compiler supports -c -o file.$ac_objext" >&5
5321 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5322   echo $ac_n "(cached) $ac_c" 1>&6
5323 else
5324   
5325 $rm -r conftest 2>/dev/null
5326 mkdir conftest
5327 cd conftest
5328 echo "int some_variable = 0;" > conftest.$ac_ext
5329 mkdir out
5330 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5331 # that will create temporary files in the current directory regardless of
5332 # the output directory.  Thus, making CWD read-only will cause this test
5333 # to fail, enabling locking or at least warning the user not to do parallel
5334 # builds.
5335 chmod -w .
5336 save_CFLAGS="$CFLAGS"
5337 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5338 compiler_c_o=no
5339 if { (eval echo configure:5340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5340   # The compiler can only warn and ignore the option if not recognized
5341   # So say no if there are warnings
5342   if test -s out/conftest.err; then
5343     lt_cv_compiler_c_o=no
5344   else
5345     lt_cv_compiler_c_o=yes
5346   fi
5347 else
5348   # Append any errors to the config.log.
5349   cat out/conftest.err 1>&5
5350   lt_cv_compiler_c_o=no
5351 fi
5352 CFLAGS="$save_CFLAGS"
5353 chmod u+w .
5354 $rm conftest* out/*
5355 rmdir out
5356 cd ..
5357 rmdir conftest
5358 $rm -r conftest 2>/dev/null
5359
5360 fi
5361
5362 compiler_c_o=$lt_cv_compiler_c_o
5363 echo "$ac_t""$compiler_c_o" 1>&6
5364
5365 if test x"$compiler_c_o" = x"yes"; then
5366   # Check to see if we can write to a .lo
5367   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5368 echo "configure:5369: checking if $compiler supports -c -o file.lo" >&5
5369   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5370   echo $ac_n "(cached) $ac_c" 1>&6
5371 else
5372   
5373   lt_cv_compiler_o_lo=no
5374   save_CFLAGS="$CFLAGS"
5375   CFLAGS="$CFLAGS -c -o conftest.lo"
5376   save_objext="$ac_objext"
5377   ac_objext=lo
5378   cat > conftest.$ac_ext <<EOF
5379 #line 5380 "configure"
5380 #include "confdefs.h"
5381
5382 int main() {
5383 int some_variable = 0;
5384 ; return 0; }
5385 EOF
5386 if { (eval echo configure:5387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5387   rm -rf conftest*
5388       # The compiler can only warn and ignore the option if not recognized
5389     # So say no if there are warnings
5390     if test -s conftest.err; then
5391       lt_cv_compiler_o_lo=no
5392     else
5393       lt_cv_compiler_o_lo=yes
5394     fi
5395   
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399 fi
5400 rm -f conftest*
5401   ac_objext="$save_objext"
5402   CFLAGS="$save_CFLAGS"
5403   
5404 fi
5405
5406   compiler_o_lo=$lt_cv_compiler_o_lo
5407   echo "$ac_t""$compiler_o_lo" 1>&6
5408 else
5409   compiler_o_lo=no
5410 fi
5411
5412 # Check to see if we can do hard links to lock some files if needed
5413 hard_links="nottested"
5414 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5415   # do not overwrite the value of need_locks provided by the user
5416   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5417 echo "configure:5418: checking if we can lock with hard links" >&5
5418   hard_links=yes
5419   $rm conftest*
5420   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5421   touch conftest.a
5422   ln conftest.a conftest.b 2>&5 || hard_links=no
5423   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5424   echo "$ac_t""$hard_links" 1>&6
5425   if test "$hard_links" = no; then
5426     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5427     need_locks=warn
5428   fi
5429 else
5430   need_locks=no
5431 fi
5432
5433 if test "$GCC" = yes; then
5434   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5435   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5436 echo "configure:5437: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5437   echo "int some_variable = 0;" > conftest.$ac_ext
5438   save_CFLAGS="$CFLAGS"
5439   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5440   compiler_rtti_exceptions=no
5441   cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444
5445 int main() {
5446 int some_variable = 0;
5447 ; return 0; }
5448 EOF
5449 if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5450   rm -rf conftest*
5451       # The compiler can only warn and ignore the option if not recognized
5452     # So say no if there are warnings
5453     if test -s conftest.err; then
5454       compiler_rtti_exceptions=no
5455     else
5456       compiler_rtti_exceptions=yes
5457     fi
5458   
5459 else
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462 fi
5463 rm -f conftest*
5464   CFLAGS="$save_CFLAGS"
5465   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5466
5467   if test "$compiler_rtti_exceptions" = "yes"; then
5468     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5469   else
5470     no_builtin_flag=' -fno-builtin'
5471   fi
5472 fi
5473
5474 # See if the linker supports building shared libraries.
5475 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5476 echo "configure:5477: checking whether the linker ($LD) supports shared libraries" >&5
5477
5478 allow_undefined_flag=
5479 no_undefined_flag=
5480 need_lib_prefix=unknown
5481 need_version=unknown
5482 # when you set need_version to no, make sure it does not cause -set_version
5483 # flags to be left without arguments
5484 archive_cmds=
5485 archive_expsym_cmds=
5486 old_archive_from_new_cmds=
5487 old_archive_from_expsyms_cmds=
5488 export_dynamic_flag_spec=
5489 whole_archive_flag_spec=
5490 thread_safe_flag_spec=
5491 hardcode_into_libs=no
5492 hardcode_libdir_flag_spec=
5493 hardcode_libdir_separator=
5494 hardcode_direct=no
5495 hardcode_minus_L=no
5496 hardcode_shlibpath_var=unsupported
5497 runpath_var=
5498 link_all_deplibs=unknown
5499 always_export_symbols=no
5500 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5501 # include_expsyms should be a list of space-separated symbols to be *always*
5502 # included in the symbol list
5503 include_expsyms=
5504 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5505 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5506 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5507 # as well as any symbol that contains `d'.
5508 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5509 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5510 # platforms (ab)use it in PIC code, but their linkers get confused if
5511 # the symbol is explicitly referenced.  Since portable code cannot
5512 # rely on this symbol name, it's probably fine to never include it in
5513 # preloaded symbol tables.
5514 extract_expsyms_cmds=
5515
5516 case $host_os in
5517 cygwin* | mingw* | pw32*)
5518   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5519   # When not using gcc, we currently assume that we are using
5520   # Microsoft Visual C++.
5521   if test "$GCC" != yes; then
5522     with_gnu_ld=no
5523   fi
5524   ;;
5525 openbsd*)
5526   with_gnu_ld=no
5527   ;;
5528 esac
5529
5530 ld_shlibs=yes
5531 if test "$with_gnu_ld" = yes; then
5532   # If archive_cmds runs LD, not CC, wlarc should be empty
5533   wlarc='${wl}'
5534
5535   # See if GNU ld supports shared libraries.
5536   case $host_os in
5537   aix3* | aix4* | aix5*)
5538     # On AIX, the GNU linker is very broken
5539     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5540     ld_shlibs=no
5541     cat <<EOF 1>&2
5542
5543 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5544 *** to be unable to reliably create shared libraries on AIX.
5545 *** Therefore, libtool is disabling shared libraries support.  If you
5546 *** really care for shared libraries, you may want to modify your PATH
5547 *** so that a non-GNU linker is found, and then restart.
5548
5549 EOF
5550     ;;
5551
5552   amigaos*)
5553     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)'
5554     hardcode_libdir_flag_spec='-L$libdir'
5555     hardcode_minus_L=yes
5556
5557     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5558     # that the semantics of dynamic libraries on AmigaOS, at least up
5559     # to version 4, is to share data among multiple programs linked
5560     # with the same dynamic library.  Since this doesn't match the
5561     # behavior of shared libraries on other platforms, we can use
5562     # them.
5563     ld_shlibs=no
5564     ;;
5565
5566   beos*)
5567     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5568       allow_undefined_flag=unsupported
5569       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5570       # support --undefined.  This deserves some investigation.  FIXME
5571       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5572     else
5573       ld_shlibs=no
5574     fi
5575     ;;
5576
5577   cygwin* | mingw* | pw32*)
5578     # hardcode_libdir_flag_spec is actually meaningless, as there is
5579     # no search path for DLLs.
5580     hardcode_libdir_flag_spec='-L$libdir'
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583
5584     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5585       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5586       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5587       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5588       else $CC -o impgen impgen.c ; fi)~
5589       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5590
5591     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5592
5593     # cygwin and mingw dlls have different entry points and sets of symbols
5594     # to exclude.
5595     # FIXME: what about values for MSVC?
5596     dll_entry=__cygwin_dll_entry@12
5597     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5598     case $host_os in
5599     mingw*)
5600       # mingw values
5601       dll_entry=_DllMainCRTStartup@12
5602       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5603       ;;
5604     esac
5605
5606     # mingw and cygwin differ, and it's simplest to just exclude the union
5607     # of the two symbol sets.
5608     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5609
5610     # recent cygwin and mingw systems supply a stub DllMain which the user
5611     # can override, but on older systems we have to supply one (in ltdll.c)
5612     if test "x$lt_cv_need_dllmain" = "xyes"; then
5613       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5614       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~
5615         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5616     else
5617       ltdll_obj=
5618       ltdll_cmds=
5619     fi
5620
5621     # Extract the symbol export list from an `--export-all' def file,
5622     # then regenerate the def file from the symbol export list, so that
5623     # the compiled dll only exports the symbol export list.
5624     # Be careful not to strip the DATA tag left be newer dlltools.
5625     export_symbols_cmds="$ltdll_cmds"'
5626       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5627       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5628
5629     # If the export-symbols file already is a .def file (1st line
5630     # is EXPORTS), use it as is.
5631     # If DATA tags from a recent dlltool are present, honour them!
5632     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5633         cp $export_symbols $output_objdir/$soname-def;
5634       else
5635         echo EXPORTS > $output_objdir/$soname-def;
5636         _lt_hint=1;
5637         cat $export_symbols | while read symbol; do
5638          set dummy \$symbol;
5639          case \$# in
5640            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5641            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5642            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5643          esac;
5644          _lt_hint=`expr 1 + \$_lt_hint`;
5645         done;
5646       fi~
5647       '"$ltdll_cmds"'
5648       $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~
5649       $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~
5650       $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~
5651       $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~
5652       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5653     ;;
5654
5655   netbsd*)
5656     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5657       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5658       wlarc=
5659     else
5660       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5661       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5662     fi
5663     ;;
5664
5665   solaris* | sysv5*)
5666     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5667       ld_shlibs=no
5668       cat <<EOF 1>&2
5669
5670 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5671 *** create shared libraries on Solaris systems.  Therefore, libtool
5672 *** is disabling shared libraries support.  We urge you to upgrade GNU
5673 *** binutils to release 2.9.1 or newer.  Another option is to modify
5674 *** your PATH or compiler configuration so that the native linker is
5675 *** used, and then restart.
5676
5677 EOF
5678     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5679       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5680       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5681     else
5682       ld_shlibs=no
5683     fi
5684     ;;
5685
5686   sunos4*)
5687     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688     wlarc=
5689     hardcode_direct=yes
5690     hardcode_shlibpath_var=no
5691     ;;
5692
5693   *)
5694     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5695       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5696       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5697     else
5698       ld_shlibs=no
5699     fi
5700     ;;
5701   esac
5702
5703   if test "$ld_shlibs" = yes; then
5704     runpath_var=LD_RUN_PATH
5705     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5706     export_dynamic_flag_spec='${wl}--export-dynamic'
5707     case $host_os in
5708     cygwin* | mingw* | pw32*)
5709       # dlltool doesn't understand --whole-archive et. al.
5710       whole_archive_flag_spec=
5711       ;;
5712     *)
5713       # ancient GNU ld didn't support --whole-archive et. al.
5714       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5715         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5716       else
5717         whole_archive_flag_spec=
5718       fi
5719       ;;
5720     esac
5721   fi
5722 else
5723   # PORTME fill in a description of your system's linker (not GNU ld)
5724   case $host_os in
5725   aix3*)
5726     allow_undefined_flag=unsupported
5727     always_export_symbols=yes
5728     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'
5729     # Note: this linker hardcodes the directories in LIBPATH if there
5730     # are no directories specified by -L.
5731     hardcode_minus_L=yes
5732     if test "$GCC" = yes && test -z "$link_static_flag"; then
5733       # Neither direct hardcoding nor static linking is supported with a
5734       # broken collect2.
5735       hardcode_direct=unsupported
5736     fi
5737     ;;
5738
5739   aix4* | aix5*)
5740     if test "$host_cpu" = ia64; then
5741       # On IA64, the linker does run time linking by default, so we don't
5742       # have to do anything special.
5743       aix_use_runtimelinking=no
5744       exp_sym_flag='-Bexport'
5745       no_entry_flag=""
5746     else
5747       aix_use_runtimelinking=no
5748
5749       # Test if we are trying to use run time linking or normal
5750       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5751       # need to do runtime linking.
5752       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5753         for ld_flag in $LDFLAGS; do
5754           case $ld_flag in
5755           *-brtl*)
5756             aix_use_runtimelinking=yes
5757             break
5758           ;;
5759           esac
5760         done
5761       esac
5762
5763       exp_sym_flag='-bexport'
5764       no_entry_flag='-bnoentry'
5765     fi
5766
5767     # When large executables or shared objects are built, AIX ld can
5768     # have problems creating the table of contents.  If linking a library
5769     # or program results in "error TOC overflow" add -mminimal-toc to
5770     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5771     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5772
5773     hardcode_direct=yes
5774     archive_cmds=''
5775     hardcode_libdir_separator=':'
5776     if test "$GCC" = yes; then
5777       case $host_os in aix4.[012]|aix4.[012].*)
5778         collect2name=`${CC} -print-prog-name=collect2`
5779         if test -f "$collect2name" && \
5780           strings "$collect2name" | grep resolve_lib_name >/dev/null
5781         then
5782           # We have reworked collect2
5783           hardcode_direct=yes
5784         else
5785           # We have old collect2
5786           hardcode_direct=unsupported
5787           # It fails to find uninstalled libraries when the uninstalled
5788           # path is not listed in the libpath.  Setting hardcode_minus_L
5789           # to unsupported forces relinking
5790           hardcode_minus_L=yes
5791           hardcode_libdir_flag_spec='-L$libdir'
5792           hardcode_libdir_separator=
5793         fi
5794       esac
5795
5796       shared_flag='-shared'
5797     else
5798       # not using gcc
5799       if test "$host_cpu" = ia64; then
5800         shared_flag='${wl}-G'
5801       else
5802         if test "$aix_use_runtimelinking" = yes; then
5803           shared_flag='${wl}-G'
5804         else
5805           shared_flag='${wl}-bM:SRE'
5806         fi
5807       fi
5808     fi
5809
5810     # It seems that -bexpall can do strange things, so it is better to
5811     # generate a list of symbols to export.
5812     always_export_symbols=yes
5813     if test "$aix_use_runtimelinking" = yes; then
5814       # Warning - without using the other runtime loading flags (-brtl),
5815       # -berok will link without error, but may produce a broken library.
5816       allow_undefined_flag='-berok'
5817       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5818       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"
5819     else
5820       if test "$host_cpu" = ia64; then
5821         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5822         allow_undefined_flag="-z nodefs"
5823         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"
5824       else
5825         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5826         # Warning - without using the other run time loading flags,
5827         # -berok will link without error, but may produce a broken library.
5828         allow_undefined_flag='${wl}-berok'
5829         # This is a bit strange, but is similar to how AIX traditionally builds
5830         # it's shared libraries.
5831         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'
5832       fi
5833     fi
5834     ;;
5835
5836   amigaos*)
5837     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)'
5838     hardcode_libdir_flag_spec='-L$libdir'
5839     hardcode_minus_L=yes
5840     # see comment about different semantics on the GNU ld section
5841     ld_shlibs=no
5842     ;;
5843
5844   cygwin* | mingw* | pw32*)
5845     # When not using gcc, we currently assume that we are using
5846     # Microsoft Visual C++.
5847     # hardcode_libdir_flag_spec is actually meaningless, as there is
5848     # no search path for DLLs.
5849     hardcode_libdir_flag_spec=' '
5850     allow_undefined_flag=unsupported
5851     # Tell ltmain to make .lib files, not .a files.
5852     libext=lib
5853     # FIXME: Setting linknames here is a bad hack.
5854     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5855     # The linker will automatically build a .lib file if we build a DLL.
5856     old_archive_from_new_cmds='true'
5857     # FIXME: Should let the user specify the lib program.
5858     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5859     fix_srcfile_path='`cygpath -w "$srcfile"`'
5860     ;;
5861
5862   darwin* | rhapsody*)
5863     case "$host_os" in
5864     rhapsody* | darwin1.[012])
5865       allow_undefined_flag='-undefined suppress'
5866       ;;
5867     *) # Darwin 1.3 on
5868       allow_undefined_flag='-flat_namespace -undefined suppress'
5869       ;;
5870     esac
5871     # FIXME: Relying on posixy $() will cause problems for
5872     #        cross-compilation, but unfortunately the echo tests do not
5873     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5874     #        `"' quotes if we put them in here... so don't!
5875     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)'
5876     # We need to add '_' to the symbols in $export_symbols first
5877     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5878     hardcode_direct=yes
5879     hardcode_shlibpath_var=no
5880     whole_archive_flag_spec='-all_load $convenience'
5881     ;;
5882
5883   freebsd1*)
5884     ld_shlibs=no
5885     ;;
5886
5887   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5888   # support.  Future versions do this automatically, but an explicit c++rt0.o
5889   # does not break anything, and helps significantly (at the cost of a little
5890   # extra space).
5891   freebsd2.2*)
5892     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5893     hardcode_libdir_flag_spec='-R$libdir'
5894     hardcode_direct=yes
5895     hardcode_shlibpath_var=no
5896     ;;
5897
5898   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5899   freebsd2*)
5900     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5901     hardcode_direct=yes
5902     hardcode_minus_L=yes
5903     hardcode_shlibpath_var=no
5904     ;;
5905
5906   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5907   freebsd*)
5908     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5909     hardcode_libdir_flag_spec='-R$libdir'
5910     hardcode_direct=yes
5911     hardcode_shlibpath_var=no
5912     ;;
5913
5914   hpux9* | hpux10* | hpux11*)
5915     case $host_os in
5916     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' ;;
5917     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5918     esac
5919     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5920     hardcode_libdir_separator=:
5921     hardcode_direct=yes
5922     hardcode_minus_L=yes # Not in the search PATH, but as the default
5923                          # location of the library.
5924     export_dynamic_flag_spec='${wl}-E'
5925     ;;
5926
5927   irix5* | irix6* | nonstopux*)
5928     if test "$GCC" = yes; then
5929       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'
5930       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5931     else
5932       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'
5933       hardcode_libdir_flag_spec='-rpath $libdir'
5934     fi
5935     hardcode_libdir_separator=:
5936     link_all_deplibs=yes
5937     ;;
5938
5939   netbsd*)
5940     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5941       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5942     else
5943       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5944     fi
5945     hardcode_libdir_flag_spec='-R$libdir'
5946     hardcode_direct=yes
5947     hardcode_shlibpath_var=no
5948     ;;
5949
5950   newsos6)
5951     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5952     hardcode_direct=yes
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   openbsd*)
5959     hardcode_direct=yes
5960     hardcode_shlibpath_var=no
5961     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5962       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5963       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5964       export_dynamic_flag_spec='${wl}-E'
5965     else
5966       case "$host_os" in
5967       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5968         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5969         hardcode_libdir_flag_spec='-R$libdir'
5970         ;;
5971       *)
5972         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5973         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5974         ;;
5975       esac
5976     fi
5977     ;;
5978
5979   os2*)
5980     hardcode_libdir_flag_spec='-L$libdir'
5981     hardcode_minus_L=yes
5982     allow_undefined_flag=unsupported
5983     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'
5984     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5985     ;;
5986
5987   osf3*)
5988     if test "$GCC" = yes; then
5989       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5990       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'
5991     else
5992       allow_undefined_flag=' -expect_unresolved \*'
5993       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'
5994     fi
5995     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5996     hardcode_libdir_separator=:
5997     ;;
5998
5999   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6000     if test "$GCC" = yes; then
6001       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6002       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'
6003       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6004     else
6005       allow_undefined_flag=' -expect_unresolved \*'
6006       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'
6007       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6008       $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'
6009
6010       #Both c and cxx compiler support -rpath directly
6011       hardcode_libdir_flag_spec='-rpath $libdir'
6012     fi
6013     hardcode_libdir_separator=:
6014     ;;
6015
6016   sco3.2v5*)
6017     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     hardcode_shlibpath_var=no
6019     runpath_var=LD_RUN_PATH
6020     hardcode_runpath_var=yes
6021     export_dynamic_flag_spec='${wl}-Bexport'
6022     ;;
6023
6024   solaris*)
6025     # gcc --version < 3.0 without binutils cannot create self contained
6026     # shared libraries reliably, requiring libgcc.a to resolve some of
6027     # the object symbols generated in some cases.  Libraries that use
6028     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6029     # a copy of libgcc.a into every shared library to guarantee resolving
6030     # such symbols causes other problems:  According to Tim Van Holder
6031     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6032     # (to the application) exception stack for one thing.
6033     no_undefined_flag=' -z defs'
6034     if test "$GCC" = yes; then
6035       case `$CC --version 2>/dev/null` in
6036       [12].*)
6037         cat <<EOF 1>&2
6038
6039 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6040 *** create self contained shared libraries on Solaris systems, without
6041 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6042 *** -no-undefined support, which will at least allow you to build shared
6043 *** libraries.  However, you may find that when you link such libraries
6044 *** into an application without using GCC, you have to manually add
6045 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6046 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6047 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6048
6049 EOF
6050         no_undefined_flag=
6051         ;;
6052       esac
6053     fi
6054     # $CC -shared without GNU ld will not create a library from C++
6055     # object files and a static libstdc++, better avoid it by now
6056     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6057     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6058                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6059     hardcode_libdir_flag_spec='-R$libdir'
6060     hardcode_shlibpath_var=no
6061     case $host_os in
6062     solaris2.[0-5] | solaris2.[0-5].*) ;;
6063     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6064       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6065     esac
6066     link_all_deplibs=yes
6067     ;;
6068
6069   sunos4*)
6070     if test "x$host_vendor" = xsequent; then
6071       # Use $CC to link under sequent, because it throws in some extra .o
6072       # files that make .init and .fini sections work.
6073       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6074     else
6075       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6076     fi
6077     hardcode_libdir_flag_spec='-L$libdir'
6078     hardcode_direct=yes
6079     hardcode_minus_L=yes
6080     hardcode_shlibpath_var=no
6081     ;;
6082
6083   sysv4)
6084     case $host_vendor in
6085       sni)
6086         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6087         hardcode_direct=yes # is this really true???
6088         ;;
6089       siemens)
6090         ## LD is ld it makes a PLAMLIB
6091         ## CC just makes a GrossModule.
6092         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6093         reload_cmds='$CC -r -o $output$reload_objs'
6094         hardcode_direct=no
6095         ;;
6096       motorola)
6097         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6099         ;;
6100     esac
6101     runpath_var='LD_RUN_PATH'
6102     hardcode_shlibpath_var=no
6103     ;;
6104
6105   sysv4.3*)
6106     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6107     hardcode_shlibpath_var=no
6108     export_dynamic_flag_spec='-Bexport'
6109     ;;
6110
6111   sysv5*)
6112     no_undefined_flag=' -z text'
6113     # $CC -shared without GNU ld will not create a library from C++
6114     # object files and a static libstdc++, better avoid it by now
6115     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6116     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6117                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6118     hardcode_libdir_flag_spec=
6119     hardcode_shlibpath_var=no
6120     runpath_var='LD_RUN_PATH'
6121     ;;
6122
6123   uts4*)
6124     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6125     hardcode_libdir_flag_spec='-L$libdir'
6126     hardcode_shlibpath_var=no
6127     ;;
6128
6129   dgux*)
6130     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6131     hardcode_libdir_flag_spec='-L$libdir'
6132     hardcode_shlibpath_var=no
6133     ;;
6134
6135   sysv4*MP*)
6136     if test -d /usr/nec; then
6137       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138       hardcode_shlibpath_var=no
6139       runpath_var=LD_RUN_PATH
6140       hardcode_runpath_var=yes
6141       ld_shlibs=yes
6142     fi
6143     ;;
6144
6145   sysv4.2uw2*)
6146     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6147     hardcode_direct=yes
6148     hardcode_minus_L=no
6149     hardcode_shlibpath_var=no
6150     hardcode_runpath_var=yes
6151     runpath_var=LD_RUN_PATH
6152     ;;
6153
6154   sysv5uw7* | unixware7*)
6155     no_undefined_flag='${wl}-z ${wl}text'
6156     if test "$GCC" = yes; then
6157       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6158     else
6159       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6160     fi
6161     runpath_var='LD_RUN_PATH'
6162     hardcode_shlibpath_var=no
6163     ;;
6164
6165   *)
6166     ld_shlibs=no
6167     ;;
6168   esac
6169 fi
6170 echo "$ac_t""$ld_shlibs" 1>&6
6171 test "$ld_shlibs" = no && can_build_shared=no
6172
6173 # Check hardcoding attributes.
6174 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6175 echo "configure:6176: checking how to hardcode library paths into programs" >&5
6176 hardcode_action=
6177 if test -n "$hardcode_libdir_flag_spec" || \
6178    test -n "$runpath_var"; then
6179
6180   # We can hardcode non-existant directories.
6181   if test "$hardcode_direct" != no &&
6182      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6183      # have to relink, otherwise we might link with an installed library
6184      # when we should be linking with a yet-to-be-installed one
6185      ## test "$hardcode_shlibpath_var" != no &&
6186      test "$hardcode_minus_L" != no; then
6187     # Linking always hardcodes the temporary library directory.
6188     hardcode_action=relink
6189   else
6190     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6191     hardcode_action=immediate
6192   fi
6193 else
6194   # We cannot hardcode anything, or else we can only hardcode existing
6195   # directories.
6196   hardcode_action=unsupported
6197 fi
6198 echo "$ac_t""$hardcode_action" 1>&6
6199
6200 striplib=
6201 old_striplib=
6202 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6203 echo "configure:6204: checking whether stripping libraries is possible" >&5
6204 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6205   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6206   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6207   echo "$ac_t""yes" 1>&6
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6213 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6214
6215 # PORTME Fill in your ld.so characteristics
6216 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6217 echo "configure:6218: checking dynamic linker characteristics" >&5
6218 library_names_spec=
6219 libname_spec='lib$name'
6220 soname_spec=
6221 postinstall_cmds=
6222 postuninstall_cmds=
6223 finish_cmds=
6224 finish_eval=
6225 shlibpath_var=
6226 shlibpath_overrides_runpath=unknown
6227 version_type=none
6228 dynamic_linker="$host_os ld.so"
6229 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6230 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6231
6232 case $host_os in
6233 aix3*)
6234   version_type=linux
6235   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6236   shlibpath_var=LIBPATH
6237
6238   # AIX has no versioning support, so we append a major version to the name.
6239   soname_spec='${libname}${release}.so$major'
6240   ;;
6241
6242 aix4* | aix5*)
6243   version_type=linux
6244   need_lib_prefix=no
6245   need_version=no
6246   hardcode_into_libs=yes
6247   if test "$host_cpu" = ia64; then
6248     # AIX 5 supports IA64
6249     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6250     shlibpath_var=LD_LIBRARY_PATH
6251   else
6252     # With GCC up to 2.95.x, collect2 would create an import file
6253     # for dependence libraries.  The import file would start with
6254     # the line `#! .'.  This would cause the generated library to
6255     # depend on `.', always an invalid library.  This was fixed in
6256     # development snapshots of GCC prior to 3.0.
6257     case $host_os in
6258       aix4 | aix4.[01] | aix4.[01].*)
6259         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6260              echo ' yes '
6261              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6262           :
6263         else
6264           can_build_shared=no
6265         fi
6266         ;;
6267     esac
6268     # AIX (on Power*) has no versioning support, so currently we can
6269     # not hardcode correct soname into executable. Probably we can
6270     # add versioning support to collect2, so additional links can
6271     # be useful in future.
6272     if test "$aix_use_runtimelinking" = yes; then
6273       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6274       # instead of lib<name>.a to let people know that these are not
6275       # typical AIX shared libraries.
6276       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6277     else
6278       # We preserve .a as extension for shared libraries through AIX4.2
6279       # and later when we are not doing run time linking.
6280       library_names_spec='${libname}${release}.a $libname.a'
6281       soname_spec='${libname}${release}.so$major'
6282     fi
6283     shlibpath_var=LIBPATH
6284   fi
6285   hardcode_into_libs=yes
6286   ;;
6287
6288 amigaos*)
6289   library_names_spec='$libname.ixlibrary $libname.a'
6290   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6291   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'
6292   ;;
6293
6294 beos*)
6295   library_names_spec='${libname}.so'
6296   dynamic_linker="$host_os ld.so"
6297   shlibpath_var=LIBRARY_PATH
6298   ;;
6299
6300 bsdi4*)
6301   version_type=linux
6302   need_version=no
6303   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6304   soname_spec='${libname}${release}.so$major'
6305   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6306   shlibpath_var=LD_LIBRARY_PATH
6307   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6308   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6309   export_dynamic_flag_spec=-rdynamic
6310   # the default ld.so.conf also contains /usr/contrib/lib and
6311   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6312   # libtool to hard-code these into programs
6313   ;;
6314
6315 cygwin* | mingw* | pw32*)
6316   version_type=windows
6317   need_version=no
6318   need_lib_prefix=no
6319   case $GCC,$host_os in
6320   yes,cygwin*)
6321     library_names_spec='$libname.dll.a'
6322     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6323     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6324       dldir=$destdir/`dirname \$dlpath`~
6325       test -d \$dldir || mkdir -p \$dldir~
6326       $install_prog .libs/$dlname \$dldir/$dlname'
6327     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6328       dlpath=$dir/\$dldll~
6329        $rm \$dlpath'
6330     ;;
6331   yes,mingw*)
6332     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6333     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6334     ;;
6335   yes,pw32*)
6336     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6337     ;;
6338   *)
6339     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6340     ;;
6341   esac
6342   dynamic_linker='Win32 ld.exe'
6343   # FIXME: first we should search . and the directory the executable is in
6344   shlibpath_var=PATH
6345   ;;
6346
6347 darwin* | rhapsody*)
6348   dynamic_linker="$host_os dyld"
6349   version_type=darwin
6350   need_lib_prefix=no
6351   need_version=no
6352   # FIXME: Relying on posixy $() will cause problems for
6353   #        cross-compilation, but unfortunately the echo tests do not
6354   #        yet detect zsh echo's removal of \ escapes.
6355   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)'
6356   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6357   shlibpath_overrides_runpath=yes
6358   shlibpath_var=DYLD_LIBRARY_PATH
6359   ;;
6360
6361 freebsd1*)
6362   dynamic_linker=no
6363   ;;
6364
6365 freebsd*)
6366   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6367   version_type=freebsd-$objformat
6368   case $version_type in
6369     freebsd-elf*)
6370       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6371       need_version=no
6372       need_lib_prefix=no
6373       ;;
6374     freebsd-*)
6375       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6376       need_version=yes
6377       ;;
6378   esac
6379   shlibpath_var=LD_LIBRARY_PATH
6380   case $host_os in
6381   freebsd2*)
6382     shlibpath_overrides_runpath=yes
6383     ;;
6384   *)
6385     shlibpath_overrides_runpath=no
6386     hardcode_into_libs=yes
6387     ;;
6388   esac
6389   ;;
6390
6391 gnu*)
6392   version_type=linux
6393   need_lib_prefix=no
6394   need_version=no
6395   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6396   soname_spec='${libname}${release}.so$major'
6397   shlibpath_var=LD_LIBRARY_PATH
6398   hardcode_into_libs=yes
6399   ;;
6400
6401 hpux9* | hpux10* | hpux11*)
6402   # Give a soname corresponding to the major version so that dld.sl refuses to
6403   # link against other versions.
6404   dynamic_linker="$host_os dld.sl"
6405   version_type=sunos
6406   need_lib_prefix=no
6407   need_version=no
6408   shlibpath_var=SHLIB_PATH
6409   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6410   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6411   soname_spec='${libname}${release}.sl$major'
6412   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6413   postinstall_cmds='chmod 555 $lib'
6414   ;;
6415
6416 irix5* | irix6* | nonstopux*)
6417   case $host_os in
6418     nonstopux*) version_type=nonstopux ;;
6419     *)          version_type=irix ;;
6420   esac
6421   need_lib_prefix=no
6422   need_version=no
6423   soname_spec='${libname}${release}.so$major'
6424   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6425   case $host_os in
6426   irix5* | nonstopux*)
6427     libsuff= shlibsuff=
6428     ;;
6429   *)
6430     case $LD in # libtool.m4 will add one of these switches to LD
6431     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6432     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6433     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6434     *) libsuff= shlibsuff= libmagic=never-match;;
6435     esac
6436     ;;
6437   esac
6438   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6439   shlibpath_overrides_runpath=no
6440   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6441   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6442   ;;
6443
6444 # No shared lib support for Linux oldld, aout, or coff.
6445 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6446   dynamic_linker=no
6447   ;;
6448
6449 # This must be Linux ELF.
6450 linux-gnu*)
6451   version_type=linux
6452   need_lib_prefix=no
6453   need_version=no
6454   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6455   soname_spec='${libname}${release}.so$major'
6456   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   shlibpath_overrides_runpath=no
6459   # This implies no fast_install, which is unacceptable.
6460   # Some rework will be needed to allow for fast_install
6461   # before this can be enabled.
6462   hardcode_into_libs=yes
6463
6464   # We used to test for /lib/ld.so.1 and disable shared libraries on
6465   # powerpc, because MkLinux only supported shared libraries with the
6466   # GNU dynamic linker.  Since this was broken with cross compilers,
6467   # most powerpc-linux boxes support dynamic linking these days and
6468   # people can always --disable-shared, the test was removed, and we
6469   # assume the GNU/Linux dynamic linker is in use.
6470   dynamic_linker='GNU/Linux ld.so'
6471   ;;
6472
6473 netbsd*)
6474   version_type=sunos
6475   need_lib_prefix=no
6476   need_version=no
6477   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6478     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6479     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6480     dynamic_linker='NetBSD (a.out) ld.so'
6481   else
6482     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6483     soname_spec='${libname}${release}.so$major'
6484     dynamic_linker='NetBSD ld.elf_so'
6485   fi
6486   shlibpath_var=LD_LIBRARY_PATH
6487   shlibpath_overrides_runpath=yes
6488   hardcode_into_libs=yes
6489   ;;
6490
6491 newsos6)
6492   version_type=linux
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   shlibpath_var=LD_LIBRARY_PATH
6495   shlibpath_overrides_runpath=yes
6496   ;;
6497
6498 openbsd*)
6499   version_type=sunos
6500   need_lib_prefix=no
6501   need_version=no
6502   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6503     case "$host_os" in
6504     openbsd2.[89] | openbsd2.[89].*)
6505       shlibpath_overrides_runpath=no
6506       ;;
6507     *)
6508       shlibpath_overrides_runpath=yes
6509       ;;
6510     esac
6511   else
6512     shlibpath_overrides_runpath=yes
6513   fi
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6515   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   ;;
6518
6519 os2*)
6520   libname_spec='$name'
6521   need_lib_prefix=no
6522   library_names_spec='$libname.dll $libname.a'
6523   dynamic_linker='OS/2 ld.exe'
6524   shlibpath_var=LIBPATH
6525   ;;
6526
6527 osf3* | osf4* | osf5*)
6528   version_type=osf
6529   need_version=no
6530   soname_spec='${libname}${release}.so$major'
6531   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6534   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6535   hardcode_into_libs=yes
6536   ;;
6537
6538 sco3.2v5*)
6539   version_type=osf
6540   soname_spec='${libname}${release}.so$major'
6541   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6542   shlibpath_var=LD_LIBRARY_PATH
6543   ;;
6544
6545 solaris*)
6546   version_type=linux
6547   need_lib_prefix=no
6548   need_version=no
6549   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6550   soname_spec='${libname}${release}.so$major'
6551   shlibpath_var=LD_LIBRARY_PATH
6552   shlibpath_overrides_runpath=yes
6553   hardcode_into_libs=yes
6554   # ldd complains unless libraries are executable
6555   postinstall_cmds='chmod +x $lib'
6556   ;;
6557
6558 sunos4*)
6559   version_type=sunos
6560   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6561   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6562   shlibpath_var=LD_LIBRARY_PATH
6563   shlibpath_overrides_runpath=yes
6564   if test "$with_gnu_ld" = yes; then
6565     need_lib_prefix=no
6566   fi
6567   need_version=yes
6568   ;;
6569
6570 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6571   version_type=linux
6572   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6573   soname_spec='${libname}${release}.so$major'
6574   shlibpath_var=LD_LIBRARY_PATH
6575   case $host_vendor in
6576     sni)
6577       shlibpath_overrides_runpath=no
6578       need_lib_prefix=no
6579       export_dynamic_flag_spec='${wl}-Blargedynsym'
6580       runpath_var=LD_RUN_PATH
6581       ;;
6582     siemens)
6583       need_lib_prefix=no
6584       ;;
6585     motorola)
6586       need_lib_prefix=no
6587       need_version=no
6588       shlibpath_overrides_runpath=no
6589       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6590       ;;
6591   esac
6592   ;;
6593
6594 uts4*)
6595   version_type=linux
6596   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6597   soname_spec='${libname}${release}.so$major'
6598   shlibpath_var=LD_LIBRARY_PATH
6599   ;;
6600
6601 dgux*)
6602   version_type=linux
6603   need_lib_prefix=no
6604   need_version=no
6605   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6606   soname_spec='${libname}${release}.so$major'
6607   shlibpath_var=LD_LIBRARY_PATH
6608   ;;
6609
6610 sysv4*MP*)
6611   if test -d /usr/nec ;then
6612     version_type=linux
6613     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6614     soname_spec='$libname.so.$major'
6615     shlibpath_var=LD_LIBRARY_PATH
6616   fi
6617   ;;
6618
6619 *)
6620   dynamic_linker=no
6621   ;;
6622 esac
6623 echo "$ac_t""$dynamic_linker" 1>&6
6624 test "$dynamic_linker" = no && can_build_shared=no
6625
6626 # Report the final consequences.
6627 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6628 echo "configure:6629: checking if libtool supports shared libraries" >&5
6629 echo "$ac_t""$can_build_shared" 1>&6
6630
6631 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6632 echo "configure:6633: checking whether to build shared libraries" >&5
6633 test "$can_build_shared" = "no" && enable_shared=no
6634
6635 # On AIX, shared libraries and static libraries use the same namespace, and
6636 # are all built from PIC.
6637 case "$host_os" in
6638 aix3*)
6639   test "$enable_shared" = yes && enable_static=no
6640   if test -n "$RANLIB"; then
6641     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6642     postinstall_cmds='$RANLIB $lib'
6643   fi
6644   ;;
6645
6646 aix4*)
6647   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6648     test "$enable_shared" = yes && enable_static=no
6649   fi
6650   ;;
6651 esac
6652 echo "$ac_t""$enable_shared" 1>&6
6653
6654 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6655 echo "configure:6656: checking whether to build static libraries" >&5
6656 # Make sure either enable_shared or enable_static is yes.
6657 test "$enable_shared" = yes || enable_static=yes
6658 echo "$ac_t""$enable_static" 1>&6
6659
6660 if test "$hardcode_action" = relink; then
6661   # Fast installation is not supported
6662   enable_fast_install=no
6663 elif test "$shlibpath_overrides_runpath" = yes ||
6664      test "$enable_shared" = no; then
6665   # Fast installation is not necessary
6666   enable_fast_install=needless
6667 fi
6668
6669 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6670 if test "$GCC" = yes; then
6671   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6672 fi
6673
6674 if test "x$enable_dlopen" != xyes; then
6675   enable_dlopen=unknown
6676   enable_dlopen_self=unknown
6677   enable_dlopen_self_static=unknown
6678 else
6679   lt_cv_dlopen=no
6680   lt_cv_dlopen_libs=
6681
6682   case $host_os in
6683   beos*)
6684     lt_cv_dlopen="load_add_on"
6685     lt_cv_dlopen_libs=
6686     lt_cv_dlopen_self=yes
6687     ;;
6688
6689   cygwin* | mingw* | pw32*)
6690     lt_cv_dlopen="LoadLibrary"
6691     lt_cv_dlopen_libs=
6692    ;;
6693
6694   *)
6695     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6696 echo "configure:6697: checking for shl_load" >&5
6697 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6698   echo $ac_n "(cached) $ac_c" 1>&6
6699 else
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* System header to define __stub macros and hopefully few prototypes,
6704     which can conflict with char shl_load(); below.  */
6705 #include <assert.h>
6706 /* Override any gcc2 internal prototype to avoid an error.  */
6707 /* We use char because int might match the return type of a gcc2
6708     builtin and then its argument prototype would still apply.  */
6709 char shl_load();
6710 char (*f)();
6711
6712 int main() {
6713
6714 /* The GNU C library defines this for functions which it implements
6715     to always fail with ENOSYS.  Some functions are actually named
6716     something starting with __ and the normal name is an alias.  */
6717 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6718 choke me
6719 #else
6720 f = shl_load;
6721 #endif
6722
6723 ; return 0; }
6724 EOF
6725 if { (eval echo configure:6726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6726   rm -rf conftest*
6727   eval "ac_cv_func_shl_load=yes"
6728 else
6729   echo "configure: failed program was:" >&5
6730   cat conftest.$ac_ext >&5
6731   rm -rf conftest*
6732   eval "ac_cv_func_shl_load=no"
6733 fi
6734 rm -f conftest*
6735 fi
6736
6737 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   lt_cv_dlopen="shl_load"
6740 else
6741   echo "$ac_t""no" 1>&6
6742 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6743 echo "configure:6744: checking for shl_load in -ldld" >&5
6744 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   ac_save_LIBS="$LIBS"
6749 LIBS="-ldld  $LIBS"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char shl_load();
6757
6758 int main() {
6759 shl_load()
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=no"
6770 fi
6771 rm -f conftest*
6772 LIBS="$ac_save_LIBS"
6773
6774 fi
6775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6776   echo "$ac_t""yes" 1>&6
6777   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6778 else
6779   echo "$ac_t""no" 1>&6
6780 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6781 echo "configure:6782: checking for dlopen" >&5
6782 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* System header to define __stub macros and hopefully few prototypes,
6789     which can conflict with char dlopen(); below.  */
6790 #include <assert.h>
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char dlopen();
6795 char (*f)();
6796
6797 int main() {
6798
6799 /* The GNU C library defines this for functions which it implements
6800     to always fail with ENOSYS.  Some functions are actually named
6801     something starting with __ and the normal name is an alias.  */
6802 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6803 choke me
6804 #else
6805 f = dlopen;
6806 #endif
6807
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811   rm -rf conftest*
6812   eval "ac_cv_func_dlopen=yes"
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   eval "ac_cv_func_dlopen=no"
6818 fi
6819 rm -f conftest*
6820 fi
6821
6822 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="dlopen"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dlopen in -ldl" >&5
6829 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   ac_save_LIBS="$LIBS"
6834 LIBS="-ldl  $LIBS"
6835 cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char dlopen();
6842
6843 int main() {
6844 dlopen()
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_lib_$ac_lib_var=no"
6855 fi
6856 rm -f conftest*
6857 LIBS="$ac_save_LIBS"
6858
6859 fi
6860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6863 else
6864   echo "$ac_t""no" 1>&6
6865 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6866 echo "configure:6867: checking for dlopen in -lsvld" >&5
6867 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871   ac_save_LIBS="$LIBS"
6872 LIBS="-lsvld  $LIBS"
6873 cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 /* Override any gcc2 internal prototype to avoid an error.  */
6877 /* We use char because int might match the return type of a gcc2
6878     builtin and then its argument prototype would still apply.  */
6879 char dlopen();
6880
6881 int main() {
6882 dlopen()
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=yes"
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=no"
6893 fi
6894 rm -f conftest*
6895 LIBS="$ac_save_LIBS"
6896
6897 fi
6898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6899   echo "$ac_t""yes" 1>&6
6900   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6901 else
6902   echo "$ac_t""no" 1>&6
6903 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6904 echo "configure:6905: checking for dld_link in -ldld" >&5
6905 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6906 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6907   echo $ac_n "(cached) $ac_c" 1>&6
6908 else
6909   ac_save_LIBS="$LIBS"
6910 LIBS="-ldld  $LIBS"
6911 cat > conftest.$ac_ext <<EOF
6912 #line 6913 "configure"
6913 #include "confdefs.h"
6914 /* Override any gcc2 internal prototype to avoid an error.  */
6915 /* We use char because int might match the return type of a gcc2
6916     builtin and then its argument prototype would still apply.  */
6917 char dld_link();
6918
6919 int main() {
6920 dld_link()
6921 ; return 0; }
6922 EOF
6923 if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6924   rm -rf conftest*
6925   eval "ac_cv_lib_$ac_lib_var=yes"
6926 else
6927   echo "configure: failed program was:" >&5
6928   cat conftest.$ac_ext >&5
6929   rm -rf conftest*
6930   eval "ac_cv_lib_$ac_lib_var=no"
6931 fi
6932 rm -f conftest*
6933 LIBS="$ac_save_LIBS"
6934
6935 fi
6936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6939 else
6940   echo "$ac_t""no" 1>&6
6941 fi
6942
6943               
6944 fi
6945
6946             
6947 fi
6948
6949           
6950 fi
6951
6952         
6953 fi
6954
6955       
6956 fi
6957
6958     ;;
6959   esac
6960
6961   if test "x$lt_cv_dlopen" != xno; then
6962     enable_dlopen=yes
6963   else
6964     enable_dlopen=no
6965   fi
6966
6967   case $lt_cv_dlopen in
6968   dlopen)
6969     save_CPPFLAGS="$CPPFLAGS"
6970         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6971
6972     save_LDFLAGS="$LDFLAGS"
6973     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6974
6975     save_LIBS="$LIBS"
6976     LIBS="$lt_cv_dlopen_libs $LIBS"
6977
6978     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6979 echo "configure:6980: checking whether a program can dlopen itself" >&5
6980 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6981   echo $ac_n "(cached) $ac_c" 1>&6
6982 else
6983           if test "$cross_compiling" = yes; then :
6984   lt_cv_dlopen_self=cross
6985 else
6986     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6987   lt_status=$lt_dlunknown
6988   cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991
6992 #if HAVE_DLFCN_H
6993 #include <dlfcn.h>
6994 #endif
6995
6996 #include <stdio.h>
6997
6998 #ifdef RTLD_GLOBAL
6999 #  define LT_DLGLOBAL           RTLD_GLOBAL
7000 #else
7001 #  ifdef DL_GLOBAL
7002 #    define LT_DLGLOBAL         DL_GLOBAL
7003 #  else
7004 #    define LT_DLGLOBAL         0
7005 #  endif
7006 #endif
7007
7008 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7009    find out it does not work in some platform. */
7010 #ifndef LT_DLLAZY_OR_NOW
7011 #  ifdef RTLD_LAZY
7012 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7013 #  else
7014 #    ifdef DL_LAZY
7015 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7016 #    else
7017 #      ifdef RTLD_NOW
7018 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7019 #      else
7020 #        ifdef DL_NOW
7021 #          define LT_DLLAZY_OR_NOW      DL_NOW
7022 #        else
7023 #          define LT_DLLAZY_OR_NOW      0
7024 #        endif
7025 #      endif
7026 #    endif
7027 #  endif
7028 #endif
7029
7030 #ifdef __cplusplus
7031 extern "C" void exit (int);
7032 #endif
7033
7034 void fnord() { int i=42;}
7035 int main ()
7036 {
7037   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7038   int status = $lt_dlunknown;
7039
7040   if (self)
7041     {
7042       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7043       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7044       /* dlclose (self); */
7045     }
7046
7047     exit (status);
7048 }
7049 EOF
7050   if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7051     (./conftest; exit; ) 2>/dev/null
7052     lt_status=$?
7053     case x$lt_status in
7054       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7055       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7056       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7057     esac
7058   else :
7059     # compilation failed
7060     lt_cv_dlopen_self=no
7061   fi
7062 fi
7063 rm -fr conftest*
7064
7065     
7066 fi
7067
7068 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7069
7070     if test "x$lt_cv_dlopen_self" = xyes; then
7071       LDFLAGS="$LDFLAGS $link_static_flag"
7072       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7073 echo "configure:7074: checking whether a statically linked program can dlopen itself" >&5
7074 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7075   echo $ac_n "(cached) $ac_c" 1>&6
7076 else
7077           if test "$cross_compiling" = yes; then :
7078   lt_cv_dlopen_self_static=cross
7079 else
7080     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7081   lt_status=$lt_dlunknown
7082   cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085
7086 #if HAVE_DLFCN_H
7087 #include <dlfcn.h>
7088 #endif
7089
7090 #include <stdio.h>
7091
7092 #ifdef RTLD_GLOBAL
7093 #  define LT_DLGLOBAL           RTLD_GLOBAL
7094 #else
7095 #  ifdef DL_GLOBAL
7096 #    define LT_DLGLOBAL         DL_GLOBAL
7097 #  else
7098 #    define LT_DLGLOBAL         0
7099 #  endif
7100 #endif
7101
7102 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7103    find out it does not work in some platform. */
7104 #ifndef LT_DLLAZY_OR_NOW
7105 #  ifdef RTLD_LAZY
7106 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7107 #  else
7108 #    ifdef DL_LAZY
7109 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7110 #    else
7111 #      ifdef RTLD_NOW
7112 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7113 #      else
7114 #        ifdef DL_NOW
7115 #          define LT_DLLAZY_OR_NOW      DL_NOW
7116 #        else
7117 #          define LT_DLLAZY_OR_NOW      0
7118 #        endif
7119 #      endif
7120 #    endif
7121 #  endif
7122 #endif
7123
7124 #ifdef __cplusplus
7125 extern "C" void exit (int);
7126 #endif
7127
7128 void fnord() { int i=42;}
7129 int main ()
7130 {
7131   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7132   int status = $lt_dlunknown;
7133
7134   if (self)
7135     {
7136       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7137       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7138       /* dlclose (self); */
7139     }
7140
7141     exit (status);
7142 }
7143 EOF
7144   if { (eval echo configure:7145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7145     (./conftest; exit; ) 2>/dev/null
7146     lt_status=$?
7147     case x$lt_status in
7148       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7149       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7150       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7151     esac
7152   else :
7153     # compilation failed
7154     lt_cv_dlopen_self_static=no
7155   fi
7156 fi
7157 rm -fr conftest*
7158
7159       
7160 fi
7161
7162 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7163     fi
7164
7165     CPPFLAGS="$save_CPPFLAGS"
7166     LDFLAGS="$save_LDFLAGS"
7167     LIBS="$save_LIBS"
7168     ;;
7169   esac
7170
7171   case $lt_cv_dlopen_self in
7172   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7173   *) enable_dlopen_self=unknown ;;
7174   esac
7175
7176   case $lt_cv_dlopen_self_static in
7177   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7178   *) enable_dlopen_self_static=unknown ;;
7179   esac
7180 fi
7181
7182
7183 if test "$enable_shared" = yes && test "$GCC" = yes; then
7184   case $archive_cmds in
7185   *'~'*)
7186     # FIXME: we may have to deal with multi-command sequences.
7187     ;;
7188   '$CC '*)
7189     # Test whether the compiler implicitly links with -lc since on some
7190     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7191     # to ld, don't add -lc before -lgcc.
7192     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7193 echo "configure:7194: checking whether -lc should be explicitly linked in" >&5
7194     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7195   echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197   $rm conftest*
7198     echo 'static int dummy;' > conftest.$ac_ext
7199
7200     if { (eval echo configure:7201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7201       soname=conftest
7202       lib=conftest
7203       libobjs=conftest.$ac_objext
7204       deplibs=
7205       wl=$lt_cv_prog_cc_wl
7206       compiler_flags=-v
7207       linker_flags=-v
7208       verstring=
7209       output_objdir=.
7210       libname=conftest
7211       save_allow_undefined_flag=$allow_undefined_flag
7212       allow_undefined_flag=
7213       if { (eval echo configure:7214: \"$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; }
7214       then
7215         lt_cv_archive_cmds_need_lc=no
7216       else
7217         lt_cv_archive_cmds_need_lc=yes
7218       fi
7219       allow_undefined_flag=$save_allow_undefined_flag
7220     else
7221       cat conftest.err 1>&5
7222     fi
7223 fi
7224
7225     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7226     ;;
7227   esac
7228 fi
7229 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7230
7231 # The second clause should only fire when bootstrapping the
7232 # libtool distribution, otherwise you forgot to ship ltmain.sh
7233 # with your package, and you will get complaints that there are
7234 # no rules to generate ltmain.sh.
7235 if test -f "$ltmain"; then
7236   :
7237 else
7238   # If there is no Makefile yet, we rely on a make rule to execute
7239   # `config.status --recheck' to rerun these tests and create the
7240   # libtool script then.
7241   test -f Makefile && make "$ltmain"
7242 fi
7243
7244 if test -f "$ltmain"; then
7245   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7246   $rm -f "${ofile}T"
7247
7248   echo creating $ofile
7249
7250   # Now quote all the things that may contain metacharacters while being
7251   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7252   # variables and quote the copies for generation of the libtool script.
7253   for var in echo old_CC old_CFLAGS SED \
7254     AR AR_FLAGS CC LD LN_S NM SHELL \
7255     reload_flag reload_cmds wl \
7256     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7257     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7258     library_names_spec soname_spec \
7259     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7260     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7261     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7262     old_striplib striplib file_magic_cmd export_symbols_cmds \
7263     deplibs_check_method allow_undefined_flag no_undefined_flag \
7264     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7265     global_symbol_to_c_name_address \
7266     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7267     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7268     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7269
7270     case $var in
7271     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7272     old_postinstall_cmds | old_postuninstall_cmds | \
7273     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7274     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7275     postinstall_cmds | postuninstall_cmds | \
7276     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7277       # Double-quote double-evaled strings.
7278       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7279       ;;
7280     *)
7281       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7282       ;;
7283     esac
7284   done
7285
7286   cat <<__EOF__ > "${ofile}T"
7287 #! $SHELL
7288
7289 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7290 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7291 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7292 #
7293 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7294 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7295 #
7296 # This program is free software; you can redistribute it and/or modify
7297 # it under the terms of the GNU General Public License as published by
7298 # the Free Software Foundation; either version 2 of the License, or
7299 # (at your option) any later version.
7300 #
7301 # This program is distributed in the hope that it will be useful, but
7302 # WITHOUT ANY WARRANTY; without even the implied warranty of
7303 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7304 # General Public License for more details.
7305 #
7306 # You should have received a copy of the GNU General Public License
7307 # along with this program; if not, write to the Free Software
7308 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7309 #
7310 # As a special exception to the GNU General Public License, if you
7311 # distribute this file as part of a program that contains a
7312 # configuration script generated by Autoconf, you may include it under
7313 # the same distribution terms that you use for the rest of that program.
7314
7315 # A sed that does not truncate output.
7316 SED=$lt_SED
7317
7318 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7319 Xsed="${SED} -e s/^X//"
7320
7321 # The HP-UX ksh and POSIX shell print the target directory to stdout
7322 # if CDPATH is set.
7323 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7324
7325 # ### BEGIN LIBTOOL CONFIG
7326
7327 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7328
7329 # Shell to use when invoking shell scripts.
7330 SHELL=$lt_SHELL
7331
7332 # Whether or not to build shared libraries.
7333 build_libtool_libs=$enable_shared
7334
7335 # Whether or not to build static libraries.
7336 build_old_libs=$enable_static
7337
7338 # Whether or not to add -lc for building shared libraries.
7339 build_libtool_need_lc=$need_lc
7340
7341 # Whether or not to optimize for fast installation.
7342 fast_install=$enable_fast_install
7343
7344 # The host system.
7345 host_alias=$host_alias
7346 host=$host
7347
7348 # An echo program that does not interpret backslashes.
7349 echo=$lt_echo
7350
7351 # The archiver.
7352 AR=$lt_AR
7353 AR_FLAGS=$lt_AR_FLAGS
7354
7355 # The default C compiler.
7356 CC=$lt_CC
7357
7358 # Is the compiler the GNU C compiler?
7359 with_gcc=$GCC
7360
7361 # The linker used to build libraries.
7362 LD=$lt_LD
7363
7364 # Whether we need hard or soft links.
7365 LN_S=$lt_LN_S
7366
7367 # A BSD-compatible nm program.
7368 NM=$lt_NM
7369
7370 # A symbol stripping program
7371 STRIP=$STRIP
7372
7373 # Used to examine libraries when file_magic_cmd begins "file"
7374 MAGIC_CMD=$MAGIC_CMD
7375
7376 # Used on cygwin: DLL creation program.
7377 DLLTOOL="$DLLTOOL"
7378
7379 # Used on cygwin: object dumper.
7380 OBJDUMP="$OBJDUMP"
7381
7382 # Used on cygwin: assembler.
7383 AS="$AS"
7384
7385 # The name of the directory that contains temporary libtool files.
7386 objdir=$objdir
7387
7388 # How to create reloadable object files.
7389 reload_flag=$lt_reload_flag
7390 reload_cmds=$lt_reload_cmds
7391
7392 # How to pass a linker flag through the compiler.
7393 wl=$lt_wl
7394
7395 # Object file suffix (normally "o").
7396 objext="$ac_objext"
7397
7398 # Old archive suffix (normally "a").
7399 libext="$libext"
7400
7401 # Executable file suffix (normally "").
7402 exeext="$exeext"
7403
7404 # Additional compiler flags for building library objects.
7405 pic_flag=$lt_pic_flag
7406 pic_mode=$pic_mode
7407
7408 # Does compiler simultaneously support -c and -o options?
7409 compiler_c_o=$lt_compiler_c_o
7410
7411 # Can we write directly to a .lo ?
7412 compiler_o_lo=$lt_compiler_o_lo
7413
7414 # Must we lock files when doing compilation ?
7415 need_locks=$lt_need_locks
7416
7417 # Do we need the lib prefix for modules?
7418 need_lib_prefix=$need_lib_prefix
7419
7420 # Do we need a version for libraries?
7421 need_version=$need_version
7422
7423 # Whether dlopen is supported.
7424 dlopen_support=$enable_dlopen
7425
7426 # Whether dlopen of programs is supported.
7427 dlopen_self=$enable_dlopen_self
7428
7429 # Whether dlopen of statically linked programs is supported.
7430 dlopen_self_static=$enable_dlopen_self_static
7431
7432 # Compiler flag to prevent dynamic linking.
7433 link_static_flag=$lt_link_static_flag
7434
7435 # Compiler flag to turn off builtin functions.
7436 no_builtin_flag=$lt_no_builtin_flag
7437
7438 # Compiler flag to allow reflexive dlopens.
7439 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7440
7441 # Compiler flag to generate shared objects directly from archives.
7442 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7443
7444 # Compiler flag to generate thread-safe objects.
7445 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7446
7447 # Library versioning type.
7448 version_type=$version_type
7449
7450 # Format of library name prefix.
7451 libname_spec=$lt_libname_spec
7452
7453 # List of archive names.  First name is the real one, the rest are links.
7454 # The last name is the one that the linker finds with -lNAME.
7455 library_names_spec=$lt_library_names_spec
7456
7457 # The coded name of the library, if different from the real name.
7458 soname_spec=$lt_soname_spec
7459
7460 # Commands used to build and install an old-style archive.
7461 RANLIB=$lt_RANLIB
7462 old_archive_cmds=$lt_old_archive_cmds
7463 old_postinstall_cmds=$lt_old_postinstall_cmds
7464 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7465
7466 # Create an old-style archive from a shared archive.
7467 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7468
7469 # Create a temporary old-style archive to link instead of a shared archive.
7470 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7471
7472 # Commands used to build and install a shared archive.
7473 archive_cmds=$lt_archive_cmds
7474 archive_expsym_cmds=$lt_archive_expsym_cmds
7475 postinstall_cmds=$lt_postinstall_cmds
7476 postuninstall_cmds=$lt_postuninstall_cmds
7477
7478 # Commands to strip libraries.
7479 old_striplib=$lt_old_striplib
7480 striplib=$lt_striplib
7481
7482 # Method to check whether dependent libraries are shared objects.
7483 deplibs_check_method=$lt_deplibs_check_method
7484
7485 # Command to use when deplibs_check_method == file_magic.
7486 file_magic_cmd=$lt_file_magic_cmd
7487
7488 # Flag that allows shared libraries with undefined symbols to be built.
7489 allow_undefined_flag=$lt_allow_undefined_flag
7490
7491 # Flag that forces no undefined symbols.
7492 no_undefined_flag=$lt_no_undefined_flag
7493
7494 # Commands used to finish a libtool library installation in a directory.
7495 finish_cmds=$lt_finish_cmds
7496
7497 # Same as above, but a single script fragment to be evaled but not shown.
7498 finish_eval=$lt_finish_eval
7499
7500 # Take the output of nm and produce a listing of raw symbols and C names.
7501 global_symbol_pipe=$lt_global_symbol_pipe
7502
7503 # Transform the output of nm in a proper C declaration
7504 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7505
7506 # Transform the output of nm in a C name address pair
7507 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7508
7509 # This is the shared library runtime path variable.
7510 runpath_var=$runpath_var
7511
7512 # This is the shared library path variable.
7513 shlibpath_var=$shlibpath_var
7514
7515 # Is shlibpath searched before the hard-coded library search path?
7516 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7517
7518 # How to hardcode a shared library path into an executable.
7519 hardcode_action=$hardcode_action
7520
7521 # Whether we should hardcode library paths into libraries.
7522 hardcode_into_libs=$hardcode_into_libs
7523
7524 # Flag to hardcode \$libdir into a binary during linking.
7525 # This must work even if \$libdir does not exist.
7526 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7527
7528 # Whether we need a single -rpath flag with a separated argument.
7529 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7530
7531 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7532 # resulting binary.
7533 hardcode_direct=$hardcode_direct
7534
7535 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7536 # resulting binary.
7537 hardcode_minus_L=$hardcode_minus_L
7538
7539 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7540 # the resulting binary.
7541 hardcode_shlibpath_var=$hardcode_shlibpath_var
7542
7543 # Variables whose values should be saved in libtool wrapper scripts and
7544 # restored at relink time.
7545 variables_saved_for_relink="$variables_saved_for_relink"
7546
7547 # Whether libtool must link a program against all its dependency libraries.
7548 link_all_deplibs=$link_all_deplibs
7549
7550 # Compile-time system search path for libraries
7551 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7552
7553 # Run-time system search path for libraries
7554 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7555
7556 # Fix the shell variable \$srcfile for the compiler.
7557 fix_srcfile_path="$fix_srcfile_path"
7558
7559 # Set to yes if exported symbols are required.
7560 always_export_symbols=$always_export_symbols
7561
7562 # The commands to list exported symbols.
7563 export_symbols_cmds=$lt_export_symbols_cmds
7564
7565 # The commands to extract the exported symbol list from a shared archive.
7566 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7567
7568 # Symbols that should not be listed in the preloaded symbols.
7569 exclude_expsyms=$lt_exclude_expsyms
7570
7571 # Symbols that must always be exported.
7572 include_expsyms=$lt_include_expsyms
7573
7574 # ### END LIBTOOL CONFIG
7575
7576 __EOF__
7577
7578   case $host_os in
7579   aix3*)
7580     cat <<\EOF >> "${ofile}T"
7581
7582 # AIX sometimes has problems with the GCC collect2 program.  For some
7583 # reason, if we set the COLLECT_NAMES environment variable, the problems
7584 # vanish in a puff of smoke.
7585 if test "X${COLLECT_NAMES+set}" != Xset; then
7586   COLLECT_NAMES=
7587   export COLLECT_NAMES
7588 fi
7589 EOF
7590     ;;
7591   esac
7592
7593   case $host_os in
7594   cygwin* | mingw* | pw32* | os2*)
7595     cat <<'EOF' >> "${ofile}T"
7596       # This is a source program that is used to create dlls on Windows
7597       # Don't remove nor modify the starting and closing comments
7598 # /* ltdll.c starts here */
7599 # #define WIN32_LEAN_AND_MEAN
7600 # #include <windows.h>
7601 # #undef WIN32_LEAN_AND_MEAN
7602 # #include <stdio.h>
7603 #
7604 # #ifndef __CYGWIN__
7605 # #  ifdef __CYGWIN32__
7606 # #    define __CYGWIN__ __CYGWIN32__
7607 # #  endif
7608 # #endif
7609 #
7610 # #ifdef __cplusplus
7611 # extern "C" {
7612 # #endif
7613 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7614 # #ifdef __cplusplus
7615 # }
7616 # #endif
7617 #
7618 # #ifdef __CYGWIN__
7619 # #include <cygwin/cygwin_dll.h>
7620 # DECLARE_CYGWIN_DLL( DllMain );
7621 # #endif
7622 # HINSTANCE __hDllInstance_base;
7623 #
7624 # BOOL APIENTRY
7625 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7626 # {
7627 #   __hDllInstance_base = hInst;
7628 #   return TRUE;
7629 # }
7630 # /* ltdll.c ends here */
7631         # This is a source program that is used to create import libraries
7632         # on Windows for dlls which lack them. Don't remove nor modify the
7633         # starting and closing comments
7634 # /* impgen.c starts here */
7635 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7636 #
7637 #  This file is part of GNU libtool.
7638 #
7639 #  This program is free software; you can redistribute it and/or modify
7640 #  it under the terms of the GNU General Public License as published by
7641 #  the Free Software Foundation; either version 2 of the License, or
7642 #  (at your option) any later version.
7643 #
7644 #  This program is distributed in the hope that it will be useful,
7645 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7646 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7647 #  GNU General Public License for more details.
7648 #
7649 #  You should have received a copy of the GNU General Public License
7650 #  along with this program; if not, write to the Free Software
7651 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7652 #  */
7653 #
7654 # #include <stdio.h>            /* for printf() */
7655 # #include <unistd.h>           /* for open(), lseek(), read() */
7656 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7657 # #include <string.h>           /* for strdup() */
7658 #
7659 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7660 # #ifndef O_BINARY
7661 # #define O_BINARY 0
7662 # #endif
7663 #
7664 # static unsigned int
7665 # pe_get16 (fd, offset)
7666 #      int fd;
7667 #      int offset;
7668 # {
7669 #   unsigned char b[2];
7670 #   lseek (fd, offset, SEEK_SET);
7671 #   read (fd, b, 2);
7672 #   return b[0] + (b[1]<<8);
7673 # }
7674 #
7675 # static unsigned int
7676 # pe_get32 (fd, offset)
7677 #     int fd;
7678 #     int offset;
7679 # {
7680 #   unsigned char b[4];
7681 #   lseek (fd, offset, SEEK_SET);
7682 #   read (fd, b, 4);
7683 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7684 # }
7685 #
7686 # static unsigned int
7687 # pe_as32 (ptr)
7688 #      void *ptr;
7689 # {
7690 #   unsigned char *b = ptr;
7691 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7692 # }
7693 #
7694 # int
7695 # main (argc, argv)
7696 #     int argc;
7697 #     char *argv[];
7698 # {
7699 #     int dll;
7700 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7701 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7702 #     unsigned long name_rvas, nexp;
7703 #     unsigned char *expdata, *erva;
7704 #     char *filename, *dll_name;
7705 #
7706 #     filename = argv[1];
7707 #
7708 #     dll = open(filename, O_RDONLY|O_BINARY);
7709 #     if (dll < 1)
7710 #       return 1;
7711 #
7712 #     dll_name = filename;
7713 #
7714 #     for (i=0; filename[i]; i++)
7715 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7716 #           dll_name = filename + i +1;
7717 #
7718 #     pe_header_offset = pe_get32 (dll, 0x3c);
7719 #     opthdr_ofs = pe_header_offset + 4 + 20;
7720 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7721 #
7722 #     if (num_entries < 1) /* no exports */
7723 #       return 1;
7724 #
7725 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7726 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7727 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7728 #     secptr = (pe_header_offset + 4 + 20 +
7729 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7730 #
7731 #     expptr = 0;
7732 #     for (i = 0; i < nsections; i++)
7733 #     {
7734 #       char sname[8];
7735 #       unsigned long secptr1 = secptr + 40 * i;
7736 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7737 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7738 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7739 #       lseek(dll, secptr1, SEEK_SET);
7740 #       read(dll, sname, 8);
7741 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7742 #       {
7743 #           expptr = fptr + (export_rva - vaddr);
7744 #           if (export_rva + export_size > vaddr + vsize)
7745 #               export_size = vsize - (export_rva - vaddr);
7746 #           break;
7747 #       }
7748 #     }
7749 #
7750 #     expdata = (unsigned char*)malloc(export_size);
7751 #     lseek (dll, expptr, SEEK_SET);
7752 #     read (dll, expdata, export_size);
7753 #     erva = expdata - export_rva;
7754 #
7755 #     nexp = pe_as32 (expdata+24);
7756 #     name_rvas = pe_as32 (expdata+32);
7757 #
7758 #     printf ("EXPORTS\n");
7759 #     for (i = 0; i<nexp; i++)
7760 #     {
7761 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7762 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7763 #     }
7764 #
7765 #     return 0;
7766 # }
7767 # /* impgen.c ends here */
7768
7769 EOF
7770     ;;
7771   esac
7772
7773   # We use sed instead of cat because bash on DJGPP gets confused if
7774   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7775   # text mode, it properly converts lines to CR/LF.  This bash problem
7776   # is reportedly fixed, but why not run on old versions too?
7777   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7778
7779   mv -f "${ofile}T" "$ofile" || \
7780     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7781   chmod +x "$ofile"
7782 fi
7783
7784
7785
7786
7787
7788 # This can be used to rebuild libtool when needed
7789 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7790
7791 # Always use our own libtool.
7792 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7793
7794 # Prevent multiple expansion
7795
7796
7797
7798 # test for ln hardlink support
7799 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7800 echo "configure:7801: checking whether ln works" >&5
7801 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7802   echo $ac_n "(cached) $ac_c" 1>&6
7803 else
7804   rm -f conftest.src conftest.dst
7805 echo "conftest" > conftest.src
7806 if ln conftest.src conftest.dst 2>/dev/null
7807 then
7808   ol_cv_prog_LN_H="ln"
7809 else
7810   ol_cv_prog_LN_H="cp"
7811 fi
7812 rm -f conftest.src conftest.dst
7813
7814 fi
7815 LN_H="$ol_cv_prog_LN_H"
7816 if test "$ol_cv_prog_LN_H" = "ln"; then
7817         echo "$ac_t""yes" 1>&6
7818 else
7819         echo "$ac_t""no" 1>&6
7820 fi
7821
7822 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7823 echo "configure:7824: checking whether ln -s works" >&5
7824 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   rm -f conftestdata
7828 if ln -s X conftestdata 2>/dev/null
7829 then
7830   rm -f conftestdata
7831   ac_cv_prog_LN_S="ln -s"
7832 else
7833   ac_cv_prog_LN_S=ln
7834 fi
7835 fi
7836 LN_S="$ac_cv_prog_LN_S"
7837 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7838   echo "$ac_t""yes" 1>&6
7839 else
7840   echo "$ac_t""no" 1>&6
7841 fi
7842
7843
7844 ol_link_perl=no
7845 if test $ol_enable_perl != no ; then
7846         # Extract the first word of "perl", so it can be a program name with args.
7847 set dummy perl; ac_word=$2
7848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7849 echo "configure:7850: checking for $ac_word" >&5
7850 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   case "$PERLBIN" in
7854   /*)
7855   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7856   ;;
7857   ?:/*)
7858   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7859   ;;
7860   *)
7861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7862   ac_dummy="$PATH"
7863   for ac_dir in $ac_dummy; do 
7864     test -z "$ac_dir" && ac_dir=.
7865     if test -f $ac_dir/$ac_word; then
7866       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7867       break
7868     fi
7869   done
7870   IFS="$ac_save_ifs"
7871   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7872   ;;
7873 esac
7874 fi
7875 PERLBIN="$ac_cv_path_PERLBIN"
7876 if test -n "$PERLBIN"; then
7877   echo "$ac_t""$PERLBIN" 1>&6
7878 else
7879   echo "$ac_t""no" 1>&6
7880 fi
7881
7882
7883         if test "no$PERLBIN" = "no" ; then
7884                 if test $ol_enable_perl = yes ; then
7885                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7886                 fi
7887
7888         else
7889                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7890                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7891
7892                 if test x"$ol_with_perl_module" = "xstatic" ; then
7893                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7894                 else
7895                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7896                 fi
7897                                 ol_link_perl=yes
7898         fi
7899 fi
7900
7901 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7902 echo "configure:7903: checking how to run the C preprocessor" >&5
7903 # On Suns, sometimes $CPP names a directory.
7904 if test -n "$CPP" && test -d "$CPP"; then
7905   CPP=
7906 fi
7907 if test -z "$CPP"; then
7908 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7909   echo $ac_n "(cached) $ac_c" 1>&6
7910 else
7911     # This must be in double quotes, not single quotes, because CPP may get
7912   # substituted into the Makefile and "${CC-cc}" will confuse make.
7913   CPP="${CC-cc} -E"
7914   # On the NeXT, cc -E runs the code through the compiler's parser,
7915   # not just through cpp.
7916   cat > conftest.$ac_ext <<EOF
7917 #line 7918 "configure"
7918 #include "confdefs.h"
7919 #include <assert.h>
7920 Syntax Error
7921 EOF
7922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7923 { (eval echo configure:7924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7925 if test -z "$ac_err"; then
7926   :
7927 else
7928   echo "$ac_err" >&5
7929   echo "configure: failed program was:" >&5
7930   cat conftest.$ac_ext >&5
7931   rm -rf conftest*
7932   CPP="${CC-cc} -E -traditional-cpp"
7933   cat > conftest.$ac_ext <<EOF
7934 #line 7935 "configure"
7935 #include "confdefs.h"
7936 #include <assert.h>
7937 Syntax Error
7938 EOF
7939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7940 { (eval echo configure:7941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7942 if test -z "$ac_err"; then
7943   :
7944 else
7945   echo "$ac_err" >&5
7946   echo "configure: failed program was:" >&5
7947   cat conftest.$ac_ext >&5
7948   rm -rf conftest*
7949   CPP="${CC-cc} -nologo -E"
7950   cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 #include <assert.h>
7954 Syntax Error
7955 EOF
7956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7957 { (eval echo configure:7958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7959 if test -z "$ac_err"; then
7960   :
7961 else
7962   echo "$ac_err" >&5
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   CPP=/lib/cpp
7967 fi
7968 rm -f conftest*
7969 fi
7970 rm -f conftest*
7971 fi
7972 rm -f conftest*
7973   ac_cv_prog_CPP="$CPP"
7974 fi
7975   CPP="$ac_cv_prog_CPP"
7976 else
7977   ac_cv_prog_CPP="$CPP"
7978 fi
7979 echo "$ac_t""$CPP" 1>&6
7980
7981
7982 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7983         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7984
7985 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7986         echo "configure: warning: programs compiled here do run here..." 1>&2
7987         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7988
7989 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7990         echo "configure: warning: programs compiled here do not run here..." 1>&2
7991         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7992 fi
7993
7994
7995 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7996 echo "configure:7997: checking for Cygwin environment" >&5
7997 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7998   echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000   cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003
8004 int main() {
8005
8006 #ifndef __CYGWIN__
8007 #define __CYGWIN__ __CYGWIN32__
8008 #endif
8009 return __CYGWIN__;
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8013   rm -rf conftest*
8014   ac_cv_cygwin=yes
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   ac_cv_cygwin=no
8020 fi
8021 rm -f conftest*
8022 fi
8023
8024 echo "$ac_t""$ac_cv_cygwin" 1>&6
8025 CYGWIN=
8026 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8027 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8028 echo "configure:8029: checking for mingw32 environment" >&5
8029 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8030   echo $ac_n "(cached) $ac_c" 1>&6
8031 else
8032   cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035
8036 int main() {
8037 return __MINGW32__;
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8041   rm -rf conftest*
8042   ac_cv_mingw32=yes
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046   rm -rf conftest*
8047   ac_cv_mingw32=no
8048 fi
8049 rm -f conftest*
8050 fi
8051
8052 echo "$ac_t""$ac_cv_mingw32" 1>&6
8053 MINGW32=
8054 test "$ac_cv_mingw32" = yes && MINGW32=yes
8055
8056
8057
8058 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8059 echo "configure:8060: checking for executable suffix" >&5
8060 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8061   echo $ac_n "(cached) $ac_c" 1>&6
8062 else
8063   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8064   ac_cv_exeext=.exe
8065 else
8066   rm -f conftest*
8067   echo 'int main () { return 0; }' > conftest.$ac_ext
8068   ac_cv_exeext=
8069   if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8070     for file in conftest.*; do
8071       case $file in
8072       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8073       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8074       esac
8075     done
8076   else
8077     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8078   fi
8079   rm -f conftest*
8080   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8081 fi
8082 fi
8083
8084 EXEEXT=""
8085 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8086 echo "$ac_t""${ac_cv_exeext}" 1>&6
8087 ac_exeext=$EXEEXT
8088
8089 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8090 echo "configure:8091: checking for object suffix" >&5
8091 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8092   echo $ac_n "(cached) $ac_c" 1>&6
8093 else
8094   rm -f conftest*
8095 echo 'int i = 1;' > conftest.$ac_ext
8096 if { (eval echo configure:8097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8097   for ac_file in conftest.*; do
8098     case $ac_file in
8099     *.c) ;;
8100     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8101     esac
8102   done
8103 else
8104   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8105 fi
8106 rm -f conftest*
8107 fi
8108
8109 echo "$ac_t""$ac_cv_objext" 1>&6
8110 OBJEXT=$ac_cv_objext
8111 ac_objext=$ac_cv_objext
8112
8113
8114 cat >> confdefs.h <<EOF
8115 #define EXEEXT "${EXEEXT}"
8116 EOF
8117
8118
8119 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8120 echo "configure:8121: checking for be_app in -lbe" >&5
8121 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8123   echo $ac_n "(cached) $ac_c" 1>&6
8124 else
8125   ac_save_LIBS="$LIBS"
8126 LIBS="-lbe -lroot -lnet $LIBS"
8127 cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 /* Override any gcc2 internal prototype to avoid an error.  */
8131 /* We use char because int might match the return type of a gcc2
8132     builtin and then its argument prototype would still apply.  */
8133 char be_app();
8134
8135 int main() {
8136 be_app()
8137 ; return 0; }
8138 EOF
8139 if { (eval echo configure:8140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8140   rm -rf conftest*
8141   eval "ac_cv_lib_$ac_lib_var=yes"
8142 else
8143   echo "configure: failed program was:" >&5
8144   cat conftest.$ac_ext >&5
8145   rm -rf conftest*
8146   eval "ac_cv_lib_$ac_lib_var=no"
8147 fi
8148 rm -f conftest*
8149 LIBS="$ac_save_LIBS"
8150
8151 fi
8152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8153   echo "$ac_t""yes" 1>&6
8154   LIBS="$LIBS -lbe -lroot -lnet"
8155 else
8156   echo "$ac_t""no" 1>&6
8157 :
8158 fi
8159
8160
8161
8162
8163
8164 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8165 echo "configure:8166: checking for ${CC-cc} option to accept ANSI C" >&5
8166 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8167   echo $ac_n "(cached) $ac_c" 1>&6
8168 else
8169   am_cv_prog_cc_stdc=no
8170 ac_save_CC="$CC"
8171 # Don't try gcc -ansi; that turns off useful extensions and
8172 # breaks some systems' header files.
8173 # AIX                   -qlanglvl=ansi
8174 # Ultrix and OSF/1      -std1
8175 # HP-UX 10.20 and later -Ae
8176 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8177 # SVR4                  -Xc -D__EXTENSIONS__
8178 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8179 do
8180   CC="$ac_save_CC $ac_arg"
8181   cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 #include <stdarg.h>
8185 #include <stdio.h>
8186 #include <sys/types.h>
8187 #include <sys/stat.h>
8188 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8189 struct buf { int x; };
8190 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8191 static char *e (p, i)
8192      char **p;
8193      int i;
8194 {
8195   return p[i];
8196 }
8197 static char *f (char * (*g) (char **, int), char **p, ...)
8198 {
8199   char *s;
8200   va_list v;
8201   va_start (v,p);
8202   s = g (p, va_arg (v,int));
8203   va_end (v);
8204   return s;
8205 }
8206 int test (int i, double x);
8207 struct s1 {int (*f) (int a);};
8208 struct s2 {int (*f) (double a);};
8209 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8210 int argc;
8211 char **argv;
8212
8213 int main() {
8214
8215 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8216
8217 ; return 0; }
8218 EOF
8219 if { (eval echo configure:8220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8220   rm -rf conftest*
8221   am_cv_prog_cc_stdc="$ac_arg"; break
8222 else
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225 fi
8226 rm -f conftest*
8227 done
8228 CC="$ac_save_CC"
8229
8230 fi
8231
8232 if test -z "$am_cv_prog_cc_stdc"; then
8233   echo "$ac_t""none needed" 1>&6
8234 else
8235   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8236 fi
8237 case "x$am_cv_prog_cc_stdc" in
8238   x|xno) ;;
8239   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8240 esac
8241
8242 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8243         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8244 fi
8245
8246 # test for make depend flag
8247 OL_MKDEP=
8248 OL_MKDEP_FLAGS=
8249 if test -z "${MKDEP}"; then
8250         OL_MKDEP="${CC-cc}"
8251         if test -z "${MKDEP_FLAGS}"; then
8252                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8253 echo "configure:8254: checking for ${OL_MKDEP} depend flag" >&5
8254 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8255   echo $ac_n "(cached) $ac_c" 1>&6
8256 else
8257   
8258                         ol_cv_mkdep=no
8259                         for flag in "-M" "-xM"; do
8260                                 cat > conftest.c <<EOF
8261  noCode;
8262 EOF
8263                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8264                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8265                                 then
8266                                         if test ! -f conftest."${ac_object}" ; then
8267                                                 ol_cv_mkdep=$flag
8268                                                 OL_MKDEP_FLAGS="$flag"
8269                                                 break
8270                                         fi
8271                                 fi
8272                         done
8273                         rm -f conftest*
8274                 
8275 fi
8276
8277 echo "$ac_t""$ol_cv_mkdep" 1>&6
8278         else
8279                 cc_cv_mkdep=yes
8280                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8281         fi
8282 else
8283         cc_cv_mkdep=yes
8284         OL_MKDEP="${MKDEP}"
8285         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8286 fi
8287
8288
8289
8290 if test "${ol_cv_mkdep}" = no ; then
8291         # this will soon become an error
8292         echo "configure: warning: do not know how to generate dependencies" 1>&2
8293 fi
8294
8295 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8296 echo "configure:8297: checking for afopen in -ls" >&5
8297 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8298 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8299   echo $ac_n "(cached) $ac_c" 1>&6
8300 else
8301   ac_save_LIBS="$LIBS"
8302 LIBS="-ls  $LIBS"
8303 cat > conftest.$ac_ext <<EOF
8304 #line 8305 "configure"
8305 #include "confdefs.h"
8306 /* Override any gcc2 internal prototype to avoid an error.  */
8307 /* We use char because int might match the return type of a gcc2
8308     builtin and then its argument prototype would still apply.  */
8309 char afopen();
8310
8311 int main() {
8312 afopen()
8313 ; return 0; }
8314 EOF
8315 if { (eval echo configure:8316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8316   rm -rf conftest*
8317   eval "ac_cv_lib_$ac_lib_var=yes"
8318 else
8319   echo "configure: failed program was:" >&5
8320   cat conftest.$ac_ext >&5
8321   rm -rf conftest*
8322   eval "ac_cv_lib_$ac_lib_var=no"
8323 fi
8324 rm -f conftest*
8325 LIBS="$ac_save_LIBS"
8326
8327 fi
8328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8329   echo "$ac_t""yes" 1>&6
8330   
8331         AUTH_LIBS=-ls
8332         cat >> confdefs.h <<\EOF
8333 #define HAVE_AIX_SECURITY 1
8334 EOF
8335
8336
8337 else
8338   echo "$ac_t""no" 1>&6
8339 fi
8340
8341
8342 case "$target" in
8343 *-ibm-openedition)
8344         ac_cv_func_getopt=no
8345         cat >> confdefs.h <<\EOF
8346 #define BOTH_STRINGS_H 1
8347 EOF
8348
8349         ;;
8350 esac
8351
8352 ol_link_modules=no
8353 if test $ol_enable_modules != no ; then
8354         for ac_hdr in ltdl.h
8355 do
8356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8358 echo "configure:8359: checking for $ac_hdr" >&5
8359 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   cat > conftest.$ac_ext <<EOF
8363 #line 8364 "configure"
8364 #include "confdefs.h"
8365 #include <$ac_hdr>
8366 EOF
8367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8368 { (eval echo configure:8369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8370 if test -z "$ac_err"; then
8371   rm -rf conftest*
8372   eval "ac_cv_header_$ac_safe=yes"
8373 else
8374   echo "$ac_err" >&5
8375   echo "configure: failed program was:" >&5
8376   cat conftest.$ac_ext >&5
8377   rm -rf conftest*
8378   eval "ac_cv_header_$ac_safe=no"
8379 fi
8380 rm -f conftest*
8381 fi
8382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8383   echo "$ac_t""yes" 1>&6
8384     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8385   cat >> confdefs.h <<EOF
8386 #define $ac_tr_hdr 1
8387 EOF
8388  
8389 else
8390   echo "$ac_t""no" 1>&6
8391 fi
8392 done
8393
8394
8395         if test $ac_cv_header_ltdl_h = no ; then
8396                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8397         fi
8398
8399         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8400 echo "configure:8401: checking for lt_dlinit in -lltdl" >&5
8401 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8402 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8403   echo $ac_n "(cached) $ac_c" 1>&6
8404 else
8405   ac_save_LIBS="$LIBS"
8406 LIBS="-lltdl  $LIBS"
8407 cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* Override any gcc2 internal prototype to avoid an error.  */
8411 /* We use char because int might match the return type of a gcc2
8412     builtin and then its argument prototype would still apply.  */
8413 char lt_dlinit();
8414
8415 int main() {
8416 lt_dlinit()
8417 ; return 0; }
8418 EOF
8419 if { (eval echo configure:8420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8420   rm -rf conftest*
8421   eval "ac_cv_lib_$ac_lib_var=yes"
8422 else
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   eval "ac_cv_lib_$ac_lib_var=no"
8427 fi
8428 rm -f conftest*
8429 LIBS="$ac_save_LIBS"
8430
8431 fi
8432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8433   echo "$ac_t""yes" 1>&6
8434   
8435                 MODULES_LIBS=-lltdl
8436                 cat >> confdefs.h <<\EOF
8437 #define HAVE_LIBLTDL 1
8438 EOF
8439
8440         
8441 else
8442   echo "$ac_t""no" 1>&6
8443 fi
8444
8445
8446         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8447                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8448         fi
8449         ol_link_modules=yes
8450 else
8451         ol_with_bdb_module=static
8452         ol_with_dnssrv_module=static
8453         ol_with_hdb_module=static
8454         ol_with_ldap_module=static
8455         ol_with_ldbm_module=static
8456         ol_with_meta_module=static
8457         ol_with_monitor_module=static
8458         ol_with_null_module=static
8459         ol_with_passwd_module=static
8460         ol_with_perl_module=static
8461         ol_with_shell_module=static
8462         ol_with_sql_module=static
8463         if test $ol_with_dyngroup = mod ; then
8464                 echo "configure: warning: building static dyngroup overlay" 1>&2
8465                 ol_with_dyngroup = yes
8466         fi
8467         if test $ol_with_proxycache = mod ; then
8468                 echo "configure: warning: building static proxycache overlay" 1>&2
8469                 ol_with_proxycache = yes
8470         fi
8471         if test $ol_with_rwm = mod ; then
8472                 echo "configure: warning: building static rwm overlay" 1>&2
8473                 ol_with_rwm = yes
8474         fi
8475 fi
8476
8477 # test for EBCDIC
8478 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8479 echo "configure:8480: checking for EBCDIC" >&5
8480 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8481   echo $ac_n "(cached) $ac_c" 1>&6
8482 else
8483   
8484         cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487
8488 #if !('M' == 0xd4)
8489 #include <__ASCII__/generate_error.h>
8490 #endif
8491
8492 EOF
8493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8494 { (eval echo configure:8495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8496 if test -z "$ac_err"; then
8497   rm -rf conftest*
8498   ol_cv_cpp_ebcdic=yes
8499 else
8500   echo "$ac_err" >&5
8501   echo "configure: failed program was:" >&5
8502   cat conftest.$ac_ext >&5
8503   rm -rf conftest*
8504   ol_cv_cpp_ebcdic=no
8505 fi
8506 rm -f conftest*
8507 fi
8508
8509 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8510 if test $ol_cv_cpp_ebcdic = yes ; then
8511         cat >> confdefs.h <<\EOF
8512 #define HAVE_EBCDIC 1
8513 EOF
8514
8515 fi
8516
8517 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8518 echo "configure:8519: checking for ANSI C header files" >&5
8519 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8520   echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522   cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 #include <stdlib.h>
8526 #include <stdarg.h>
8527 #include <string.h>
8528 #include <float.h>
8529 EOF
8530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8531 { (eval echo configure:8532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8533 if test -z "$ac_err"; then
8534   rm -rf conftest*
8535   ol_cv_header_stdc=yes
8536 else
8537   echo "$ac_err" >&5
8538   echo "configure: failed program was:" >&5
8539   cat conftest.$ac_ext >&5
8540   rm -rf conftest*
8541   ol_cv_header_stdc=no
8542 fi
8543 rm -f conftest*
8544
8545 if test $ol_cv_header_stdc = yes; then
8546   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8547 cat > conftest.$ac_ext <<EOF
8548 #line 8549 "configure"
8549 #include "confdefs.h"
8550 #include <string.h>
8551 EOF
8552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8553   egrep "memchr" >/dev/null 2>&1; then
8554   :
8555 else
8556   rm -rf conftest*
8557   ol_cv_header_stdc=no
8558 fi
8559 rm -f conftest*
8560
8561 fi
8562
8563 if test $ol_cv_header_stdc = yes; then
8564   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8565 cat > conftest.$ac_ext <<EOF
8566 #line 8567 "configure"
8567 #include "confdefs.h"
8568 #include <stdlib.h>
8569 EOF
8570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8571   egrep "free" >/dev/null 2>&1; then
8572   :
8573 else
8574   rm -rf conftest*
8575   ol_cv_header_stdc=no
8576 fi
8577 rm -f conftest*
8578
8579 fi
8580
8581 if test $ol_cv_header_stdc = yes; then
8582   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8583 if test "$cross_compiling" = yes; then
8584   :
8585 else
8586   cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <ctype.h>
8590 #ifndef HAVE_EBCDIC
8591 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8592 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8593 #else
8594 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8595                 || ('j' <= (c) && (c) <= 'r') \
8596                 || ('s' <= (c) && (c) <= 'z'))
8597 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8598 #endif
8599 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8600 int main () { int i; for (i = 0; i < 256; i++)
8601 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8602 exit (0); }
8603
8604 EOF
8605 if { (eval echo configure:8606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8606 then
8607   :
8608 else
8609   echo "configure: failed program was:" >&5
8610   cat conftest.$ac_ext >&5
8611   rm -fr conftest*
8612   ol_cv_header_stdc=no
8613 fi
8614 rm -fr conftest*
8615 fi
8616
8617 fi
8618 fi
8619
8620 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8621 if test $ol_cv_header_stdc = yes; then
8622   cat >> confdefs.h <<\EOF
8623 #define STDC_HEADERS 1
8624 EOF
8625
8626 fi
8627 ac_cv_header_stdc=disable
8628
8629
8630 if test $ol_cv_header_stdc != yes; then
8631         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8632 fi
8633
8634 ac_header_dirent=no
8635 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8636 do
8637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8638 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8639 echo "configure:8640: checking for $ac_hdr that defines DIR" >&5
8640 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8641   echo $ac_n "(cached) $ac_c" 1>&6
8642 else
8643   cat > conftest.$ac_ext <<EOF
8644 #line 8645 "configure"
8645 #include "confdefs.h"
8646 #include <sys/types.h>
8647 #include <$ac_hdr>
8648 int main() {
8649 DIR *dirp = 0;
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8653   rm -rf conftest*
8654   eval "ac_cv_header_dirent_$ac_safe=yes"
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   eval "ac_cv_header_dirent_$ac_safe=no"
8660 fi
8661 rm -f conftest*
8662 fi
8663 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8666   cat >> confdefs.h <<EOF
8667 #define $ac_tr_hdr 1
8668 EOF
8669  ac_header_dirent=$ac_hdr; break
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673 done
8674 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8675 if test $ac_header_dirent = dirent.h; then
8676 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8677 echo "configure:8678: checking for opendir in -ldir" >&5
8678 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   ac_save_LIBS="$LIBS"
8683 LIBS="-ldir  $LIBS"
8684 cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 /* Override any gcc2 internal prototype to avoid an error.  */
8688 /* We use char because int might match the return type of a gcc2
8689     builtin and then its argument prototype would still apply.  */
8690 char opendir();
8691
8692 int main() {
8693 opendir()
8694 ; return 0; }
8695 EOF
8696 if { (eval echo configure:8697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8697   rm -rf conftest*
8698   eval "ac_cv_lib_$ac_lib_var=yes"
8699 else
8700   echo "configure: failed program was:" >&5
8701   cat conftest.$ac_ext >&5
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=no"
8704 fi
8705 rm -f conftest*
8706 LIBS="$ac_save_LIBS"
8707
8708 fi
8709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8710   echo "$ac_t""yes" 1>&6
8711   LIBS="$LIBS -ldir"
8712 else
8713   echo "$ac_t""no" 1>&6
8714 fi
8715
8716 else
8717 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8718 echo "configure:8719: checking for opendir in -lx" >&5
8719 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8720 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8721   echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723   ac_save_LIBS="$LIBS"
8724 LIBS="-lx  $LIBS"
8725 cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 /* Override any gcc2 internal prototype to avoid an error.  */
8729 /* We use char because int might match the return type of a gcc2
8730     builtin and then its argument prototype would still apply.  */
8731 char opendir();
8732
8733 int main() {
8734 opendir()
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   eval "ac_cv_lib_$ac_lib_var=yes"
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=no"
8745 fi
8746 rm -f conftest*
8747 LIBS="$ac_save_LIBS"
8748
8749 fi
8750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8751   echo "$ac_t""yes" 1>&6
8752   LIBS="$LIBS -lx"
8753 else
8754   echo "$ac_t""no" 1>&6
8755 fi
8756
8757 fi
8758
8759 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8760 echo "configure:8761: checking for sys/wait.h that is POSIX.1 compatible" >&5
8761 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8762   echo $ac_n "(cached) $ac_c" 1>&6
8763 else
8764   cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <sys/types.h>
8768 #include <sys/wait.h>
8769 #ifndef WEXITSTATUS
8770 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8771 #endif
8772 #ifndef WIFEXITED
8773 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8774 #endif
8775 int main() {
8776 int s;
8777 wait (&s);
8778 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8779 ; return 0; }
8780 EOF
8781 if { (eval echo configure:8782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8782   rm -rf conftest*
8783   ac_cv_header_sys_wait_h=yes
8784 else
8785   echo "configure: failed program was:" >&5
8786   cat conftest.$ac_ext >&5
8787   rm -rf conftest*
8788   ac_cv_header_sys_wait_h=no
8789 fi
8790 rm -f conftest*
8791 fi
8792
8793 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8794 if test $ac_cv_header_sys_wait_h = yes; then
8795   cat >> confdefs.h <<\EOF
8796 #define HAVE_SYS_WAIT_H 1
8797 EOF
8798
8799 fi
8800
8801 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8802 echo "configure:8803: checking POSIX termios" >&5
8803 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8804   echo $ac_n "(cached) $ac_c" 1>&6
8805 else
8806   cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #include <unistd.h>
8811 #include <termios.h>
8812 int main() {
8813 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8814    tcgetattr(0, 0);
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   am_cv_sys_posix_termios=yes
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   am_cv_sys_posix_termios=no
8825 fi
8826 rm -f conftest*
8827 fi
8828
8829 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8830
8831
8832  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8833 echo "configure:8834: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8834 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8835   echo $ac_n "(cached) $ac_c" 1>&6
8836 else
8837   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8838
8839   gwinsz_in_termios_h=no
8840   if test $am_cv_sys_posix_termios = yes; then
8841     cat > conftest.$ac_ext <<EOF
8842 #line 8843 "configure"
8843 #include "confdefs.h"
8844 #include <sys/types.h>
8845 #     include <termios.h>
8846 #     ifdef TIOCGWINSZ
8847         yes
8848 #     endif
8849     
8850 EOF
8851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8852   egrep "yes" >/dev/null 2>&1; then
8853   rm -rf conftest*
8854   gwinsz_in_termios_h=yes
8855 fi
8856 rm -f conftest*
8857
8858   fi
8859
8860   if test $gwinsz_in_termios_h = no; then
8861     cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8864 #include <sys/types.h>
8865 #     include <sys/ioctl.h>
8866 #     ifdef TIOCGWINSZ
8867         yes
8868 #     endif
8869     
8870 EOF
8871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8872   egrep "yes" >/dev/null 2>&1; then
8873   rm -rf conftest*
8874   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8875 fi
8876 rm -f conftest*
8877
8878   fi
8879   
8880 fi
8881
8882 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8883   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8884     cat >> confdefs.h <<\EOF
8885 #define GWINSZ_IN_SYS_IOCTL 1
8886 EOF
8887
8888   fi
8889
8890 if test $am_cv_sys_posix_termios = yes ; then
8891         cat >> confdefs.h <<\EOF
8892 #define HAVE_POSIX_TERMIOS 1
8893 EOF
8894
8895 fi
8896
8897 for ac_hdr in \
8898         arpa/inet.h             \
8899         arpa/nameser.h  \
8900         assert.h                \
8901         bits/types.h    \
8902         conio.h                 \
8903         crypt.h                 \
8904         direct.h                \
8905         errno.h                 \
8906         fcntl.h                 \
8907         filio.h                 \
8908         getopt.h                \
8909         grp.h                   \
8910         io.h                    \
8911         libutil.h               \
8912         limits.h                \
8913         locale.h                \
8914         netinet/tcp.h   \
8915         malloc.h                \
8916         memory.h                \
8917         psap.h                  \
8918         pwd.h                   \
8919         process.h               \
8920         resolv.h                \
8921         sgtty.h                 \
8922         shadow.h                \
8923         stddef.h                \
8924         string.h                \
8925         strings.h               \
8926         sysexits.h              \
8927         sys/file.h              \
8928         sys/filio.h             \
8929         sys/errno.h             \
8930         sys/ioctl.h             \
8931         sys/param.h             \
8932         sys/resource.h  \
8933         sys/select.h    \
8934         sys/socket.h    \
8935         sys/stat.h              \
8936         sys/syslog.h    \
8937         sys/time.h              \
8938         sys/types.h             \
8939         sys/ucred.h             \
8940         sys/uio.h               \
8941         syslog.h                \
8942         termios.h               \
8943         unistd.h                \
8944         winsock.h               \
8945         winsock2.h              \
8946
8947 do
8948 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8949 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8950 echo "configure:8951: checking for $ac_hdr" >&5
8951 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8952   echo $ac_n "(cached) $ac_c" 1>&6
8953 else
8954   cat > conftest.$ac_ext <<EOF
8955 #line 8956 "configure"
8956 #include "confdefs.h"
8957 #include <$ac_hdr>
8958 EOF
8959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8960 { (eval echo configure:8961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8962 if test -z "$ac_err"; then
8963   rm -rf conftest*
8964   eval "ac_cv_header_$ac_safe=yes"
8965 else
8966   echo "$ac_err" >&5
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_header_$ac_safe=no"
8971 fi
8972 rm -f conftest*
8973 fi
8974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8975   echo "$ac_t""yes" 1>&6
8976     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8977   cat >> confdefs.h <<EOF
8978 #define $ac_tr_hdr 1
8979 EOF
8980  
8981 else
8982   echo "$ac_t""no" 1>&6
8983 fi
8984 done
8985
8986
8987
8988
8989 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8990 echo "configure:8991: checking for dlopen" >&5
8991 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8992   echo $ac_n "(cached) $ac_c" 1>&6
8993 else
8994   cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* System header to define __stub macros and hopefully few prototypes,
8998     which can conflict with char dlopen(); below.  */
8999 #include <assert.h>
9000 /* Override any gcc2 internal prototype to avoid an error.  */
9001 /* We use char because int might match the return type of a gcc2
9002     builtin and then its argument prototype would still apply.  */
9003 char dlopen();
9004 char (*f)();
9005
9006 int main() {
9007
9008 /* The GNU C library defines this for functions which it implements
9009     to always fail with ENOSYS.  Some functions are actually named
9010     something starting with __ and the normal name is an alias.  */
9011 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9012 choke me
9013 #else
9014 f = dlopen;
9015 #endif
9016
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9020   rm -rf conftest*
9021   eval "ac_cv_func_dlopen=yes"
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   eval "ac_cv_func_dlopen=no"
9027 fi
9028 rm -f conftest*
9029 fi
9030
9031 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033   :
9034 else
9035   echo "$ac_t""no" 1>&6
9036 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9037 echo "configure:9038: checking for dlopen in -ldl" >&5
9038 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   ac_save_LIBS="$LIBS"
9043 LIBS="-ldl  $LIBS"
9044 cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* Override any gcc2 internal prototype to avoid an error.  */
9048 /* We use char because int might match the return type of a gcc2
9049     builtin and then its argument prototype would still apply.  */
9050 char dlopen();
9051
9052 int main() {
9053 dlopen()
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=yes"
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=no"
9064 fi
9065 rm -f conftest*
9066 LIBS="$ac_save_LIBS"
9067
9068 fi
9069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9070   echo "$ac_t""yes" 1>&6
9071     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9072     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9073   cat >> confdefs.h <<EOF
9074 #define $ac_tr_lib 1
9075 EOF
9076
9077   LIBS="-ldl $LIBS"
9078
9079 else
9080   echo "$ac_t""no" 1>&6
9081 fi
9082
9083 fi
9084
9085
9086 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9087 echo "configure:9088: checking for sigset in -lV3" >&5
9088 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9090   echo $ac_n "(cached) $ac_c" 1>&6
9091 else
9092   ac_save_LIBS="$LIBS"
9093 LIBS="-lV3  $LIBS"
9094 cat > conftest.$ac_ext <<EOF
9095 #line 9096 "configure"
9096 #include "confdefs.h"
9097 /* Override any gcc2 internal prototype to avoid an error.  */
9098 /* We use char because int might match the return type of a gcc2
9099     builtin and then its argument prototype would still apply.  */
9100 char sigset();
9101
9102 int main() {
9103 sigset()
9104 ; return 0; }
9105 EOF
9106 if { (eval echo configure:9107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9107   rm -rf conftest*
9108   eval "ac_cv_lib_$ac_lib_var=yes"
9109 else
9110   echo "configure: failed program was:" >&5
9111   cat conftest.$ac_ext >&5
9112   rm -rf conftest*
9113   eval "ac_cv_lib_$ac_lib_var=no"
9114 fi
9115 rm -f conftest*
9116 LIBS="$ac_save_LIBS"
9117
9118 fi
9119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9120   echo "$ac_t""yes" 1>&6
9121     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9123   cat >> confdefs.h <<EOF
9124 #define $ac_tr_lib 1
9125 EOF
9126
9127   LIBS="-lV3 $LIBS"
9128
9129 else
9130   echo "$ac_t""no" 1>&6
9131 fi
9132
9133
9134 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9135 echo "configure:9136: checking for winsock" >&5
9136 save_LIBS="$LIBS"
9137 for curlib in ws2_32 wsock32; do
9138         LIBS="$LIBS -l$curlib"
9139         cat > conftest.$ac_ext <<EOF
9140 #line 9141 "configure"
9141 #include "confdefs.h"
9142
9143                         char socket@12();
9144                         char select@20();
9145                         char closesocket@4();
9146                         char gethostname@8();
9147                         
9148 int main() {
9149
9150                         socket@12();
9151                         select@20();
9152                         closesocket@4();
9153                         gethostname@8();
9154                         
9155 ; return 0; }
9156 EOF
9157 if { (eval echo configure:9158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9158   rm -rf conftest*
9159   have_winsock=yes
9160 else
9161   echo "configure: failed program was:" >&5
9162   cat conftest.$ac_ext >&5
9163   rm -rf conftest*
9164   have_winsock=no
9165 fi
9166 rm -f conftest*
9167
9168         if test $have_winsock = yes; then
9169                 cat >> confdefs.h <<\EOF
9170 #define HAVE_WINSOCK 1
9171 EOF
9172
9173                 ac_cv_func_socket=yes
9174                 ac_cv_func_select=yes
9175                 ac_cv_func_closesocket=yes
9176                 ac_cv_func_gethostname=yes
9177                 if test $curlib = ws2_32; then
9178                         have_winsock=winsock2
9179                         cat >> confdefs.h <<\EOF
9180 #define HAVE_WINSOCK2 1
9181 EOF
9182
9183                 fi
9184                 break
9185         fi
9186         LIBS="$save_LIBS"
9187 done
9188 echo "$ac_t""$have_winsock" 1>&6
9189
9190
9191 echo $ac_n "checking for socket""... $ac_c" 1>&6
9192 echo "configure:9193: checking for socket" >&5
9193 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   cat > conftest.$ac_ext <<EOF
9197 #line 9198 "configure"
9198 #include "confdefs.h"
9199 /* System header to define __stub macros and hopefully few prototypes,
9200     which can conflict with char socket(); below.  */
9201 #include <assert.h>
9202 /* Override any gcc2 internal prototype to avoid an error.  */
9203 /* We use char because int might match the return type of a gcc2
9204     builtin and then its argument prototype would still apply.  */
9205 char socket();
9206 char (*f)();
9207
9208 int main() {
9209
9210 /* The GNU C library defines this for functions which it implements
9211     to always fail with ENOSYS.  Some functions are actually named
9212     something starting with __ and the normal name is an alias.  */
9213 #if defined (__stub_socket) || defined (__stub___socket)
9214 choke me
9215 #else
9216 f = socket;
9217 #endif
9218
9219 ; return 0; }
9220 EOF
9221 if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9222   rm -rf conftest*
9223   eval "ac_cv_func_socket=yes"
9224 else
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -rf conftest*
9228   eval "ac_cv_func_socket=no"
9229 fi
9230 rm -f conftest*
9231 fi
9232
9233 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9234   echo "$ac_t""yes" 1>&6
9235   :
9236 else
9237   echo "$ac_t""no" 1>&6
9238         
9239         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9240 echo "configure:9241: checking for main in -lsocket" >&5
9241 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9243   echo $ac_n "(cached) $ac_c" 1>&6
9244 else
9245   ac_save_LIBS="$LIBS"
9246 LIBS="-lsocket  $LIBS"
9247 cat > conftest.$ac_ext <<EOF
9248 #line 9249 "configure"
9249 #include "confdefs.h"
9250
9251 int main() {
9252 main()
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   eval "ac_cv_lib_$ac_lib_var=yes"
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_lib_$ac_lib_var=no"
9263 fi
9264 rm -f conftest*
9265 LIBS="$ac_save_LIBS"
9266
9267 fi
9268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9269   echo "$ac_t""yes" 1>&6
9270     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9272   cat >> confdefs.h <<EOF
9273 #define $ac_tr_lib 1
9274 EOF
9275
9276   LIBS="-lsocket $LIBS"
9277
9278 else
9279   echo "$ac_t""no" 1>&6
9280 fi
9281
9282         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9283 echo "configure:9284: checking for main in -lnet" >&5
9284 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   ac_save_LIBS="$LIBS"
9289 LIBS="-lnet  $LIBS"
9290 cat > conftest.$ac_ext <<EOF
9291 #line 9292 "configure"
9292 #include "confdefs.h"
9293
9294 int main() {
9295 main()
9296 ; return 0; }
9297 EOF
9298 if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9299   rm -rf conftest*
9300   eval "ac_cv_lib_$ac_lib_var=yes"
9301 else
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_lib_$ac_lib_var=no"
9306 fi
9307 rm -f conftest*
9308 LIBS="$ac_save_LIBS"
9309
9310 fi
9311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9315   cat >> confdefs.h <<EOF
9316 #define $ac_tr_lib 1
9317 EOF
9318
9319   LIBS="-lnet $LIBS"
9320
9321 else
9322   echo "$ac_t""no" 1>&6
9323 fi
9324
9325         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9326 echo "configure:9327: checking for main in -lnsl_s" >&5
9327 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9328 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9329   echo $ac_n "(cached) $ac_c" 1>&6
9330 else
9331   ac_save_LIBS="$LIBS"
9332 LIBS="-lnsl_s  $LIBS"
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336
9337 int main() {
9338 main()
9339 ; return 0; }
9340 EOF
9341 if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=yes"
9344 else
9345   echo "configure: failed program was:" >&5
9346   cat conftest.$ac_ext >&5
9347   rm -rf conftest*
9348   eval "ac_cv_lib_$ac_lib_var=no"
9349 fi
9350 rm -f conftest*
9351 LIBS="$ac_save_LIBS"
9352
9353 fi
9354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9358   cat >> confdefs.h <<EOF
9359 #define $ac_tr_lib 1
9360 EOF
9361
9362   LIBS="-lnsl_s $LIBS"
9363
9364 else
9365   echo "$ac_t""no" 1>&6
9366 fi
9367
9368         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9369 echo "configure:9370: checking for main in -lnsl" >&5
9370 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9371 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9372   echo $ac_n "(cached) $ac_c" 1>&6
9373 else
9374   ac_save_LIBS="$LIBS"
9375 LIBS="-lnsl  $LIBS"
9376 cat > conftest.$ac_ext <<EOF
9377 #line 9378 "configure"
9378 #include "confdefs.h"
9379
9380 int main() {
9381 main()
9382 ; return 0; }
9383 EOF
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9385   rm -rf conftest*
9386   eval "ac_cv_lib_$ac_lib_var=yes"
9387 else
9388   echo "configure: failed program was:" >&5
9389   cat conftest.$ac_ext >&5
9390   rm -rf conftest*
9391   eval "ac_cv_lib_$ac_lib_var=no"
9392 fi
9393 rm -f conftest*
9394 LIBS="$ac_save_LIBS"
9395
9396 fi
9397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9398   echo "$ac_t""yes" 1>&6
9399     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9401   cat >> confdefs.h <<EOF
9402 #define $ac_tr_lib 1
9403 EOF
9404
9405   LIBS="-lnsl $LIBS"
9406
9407 else
9408   echo "$ac_t""no" 1>&6
9409 fi
9410
9411         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9412 echo "configure:9413: checking for socket in -linet" >&5
9413 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9415   echo $ac_n "(cached) $ac_c" 1>&6
9416 else
9417   ac_save_LIBS="$LIBS"
9418 LIBS="-linet  $LIBS"
9419 cat > conftest.$ac_ext <<EOF
9420 #line 9421 "configure"
9421 #include "confdefs.h"
9422 /* Override any gcc2 internal prototype to avoid an error.  */
9423 /* We use char because int might match the return type of a gcc2
9424     builtin and then its argument prototype would still apply.  */
9425 char socket();
9426
9427 int main() {
9428 socket()
9429 ; return 0; }
9430 EOF
9431 if { (eval echo configure:9432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9432   rm -rf conftest*
9433   eval "ac_cv_lib_$ac_lib_var=yes"
9434 else
9435   echo "configure: failed program was:" >&5
9436   cat conftest.$ac_ext >&5
9437   rm -rf conftest*
9438   eval "ac_cv_lib_$ac_lib_var=no"
9439 fi
9440 rm -f conftest*
9441 LIBS="$ac_save_LIBS"
9442
9443 fi
9444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9445   echo "$ac_t""yes" 1>&6
9446     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9448   cat >> confdefs.h <<EOF
9449 #define $ac_tr_lib 1
9450 EOF
9451
9452   LIBS="-linet $LIBS"
9453
9454 else
9455   echo "$ac_t""no" 1>&6
9456 fi
9457
9458         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9459 echo "configure:9460: checking for main in -lgen" >&5
9460 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9461 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464   ac_save_LIBS="$LIBS"
9465 LIBS="-lgen  $LIBS"
9466 cat > conftest.$ac_ext <<EOF
9467 #line 9468 "configure"
9468 #include "confdefs.h"
9469
9470 int main() {
9471 main()
9472 ; return 0; }
9473 EOF
9474 if { (eval echo configure:9475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9475   rm -rf conftest*
9476   eval "ac_cv_lib_$ac_lib_var=yes"
9477 else
9478   echo "configure: failed program was:" >&5
9479   cat conftest.$ac_ext >&5
9480   rm -rf conftest*
9481   eval "ac_cv_lib_$ac_lib_var=no"
9482 fi
9483 rm -f conftest*
9484 LIBS="$ac_save_LIBS"
9485
9486 fi
9487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9488   echo "$ac_t""yes" 1>&6
9489     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9490     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9491   cat >> confdefs.h <<EOF
9492 #define $ac_tr_lib 1
9493 EOF
9494
9495   LIBS="-lgen $LIBS"
9496
9497 else
9498   echo "$ac_t""no" 1>&6
9499 fi
9500
9501
9502 fi
9503
9504
9505 echo $ac_n "checking for select""... $ac_c" 1>&6
9506 echo "configure:9507: checking for select" >&5
9507 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510   cat > conftest.$ac_ext <<EOF
9511 #line 9512 "configure"
9512 #include "confdefs.h"
9513 /* System header to define __stub macros and hopefully few prototypes,
9514     which can conflict with char select(); below.  */
9515 #include <assert.h>
9516 /* Override any gcc2 internal prototype to avoid an error.  */
9517 /* We use char because int might match the return type of a gcc2
9518     builtin and then its argument prototype would still apply.  */
9519 char select();
9520 char (*f)();
9521
9522 int main() {
9523
9524 /* The GNU C library defines this for functions which it implements
9525     to always fail with ENOSYS.  Some functions are actually named
9526     something starting with __ and the normal name is an alias.  */
9527 #if defined (__stub_select) || defined (__stub___select)
9528 choke me
9529 #else
9530 f = select;
9531 #endif
9532
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9536   rm -rf conftest*
9537   eval "ac_cv_func_select=yes"
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   eval "ac_cv_func_select=no"
9543 fi
9544 rm -f conftest*
9545 fi
9546
9547 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9548   echo "$ac_t""yes" 1>&6
9549   :
9550 else
9551   echo "$ac_t""no" 1>&6
9552 { echo "configure: error: select() required." 1>&2; exit 1; }
9553 fi
9554
9555
9556 if test "${ac_cv_header_winsock_h}" != yes; then
9557                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9558 echo "configure:9559: checking types of arguments for select()" >&5
9559  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9560   echo $ac_n "(cached) $ac_c" 1>&6
9561 else
9562    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9566   echo $ac_n "(cached) $ac_c" 1>&6
9567 else
9568      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9569      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9570       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9571        cat > conftest.$ac_ext <<EOF
9572 #line 9573 "configure"
9573 #include "confdefs.h"
9574 #ifdef HAVE_SYS_TYPES_H
9575 #include <sys/types.h>
9576 #endif
9577 #ifdef HAVE_SYS_TIME_H
9578 #include <sys/time.h>
9579 #endif
9580 #ifdef HAVE_SYS_SELECT_H
9581 #include <sys/select.h>
9582 #endif
9583 #ifdef HAVE_SYS_SOCKET_H
9584 #include <sys/socket.h>
9585 #endif
9586 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);
9587 int main() {
9588
9589 ; return 0; }
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9592   rm -rf conftest*
9593           ac_not_found=no ; break 3
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   ac_not_found=yes
9599 fi
9600 rm -f conftest*
9601       done
9602      done
9603     done
9604    
9605 fi
9606   
9607 fi
9608  
9609 fi
9610  if test "$ac_not_found" = yes; then
9611   ac_cv_func_select_arg1=int 
9612   ac_cv_func_select_arg234='int *' 
9613   ac_cv_func_select_arg5='struct timeval *'
9614  fi
9615  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9616  cat >> confdefs.h <<EOF
9617 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9618 EOF
9619
9620  cat >> confdefs.h <<EOF
9621 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9622 EOF
9623
9624  cat >> confdefs.h <<EOF
9625 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9626 EOF
9627
9628
9629 fi
9630
9631
9632 for ac_hdr in regex.h 
9633 do
9634 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9635 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9636 echo "configure:9637: checking for $ac_hdr" >&5
9637 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9638   echo $ac_n "(cached) $ac_c" 1>&6
9639 else
9640   cat > conftest.$ac_ext <<EOF
9641 #line 9642 "configure"
9642 #include "confdefs.h"
9643 #include <$ac_hdr>
9644 EOF
9645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9646 { (eval echo configure:9647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9648 if test -z "$ac_err"; then
9649   rm -rf conftest*
9650   eval "ac_cv_header_$ac_safe=yes"
9651 else
9652   echo "$ac_err" >&5
9653   echo "configure: failed program was:" >&5
9654   cat conftest.$ac_ext >&5
9655   rm -rf conftest*
9656   eval "ac_cv_header_$ac_safe=no"
9657 fi
9658 rm -f conftest*
9659 fi
9660 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9661   echo "$ac_t""yes" 1>&6
9662     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9663   cat >> confdefs.h <<EOF
9664 #define $ac_tr_hdr 1
9665 EOF
9666  
9667 else
9668   echo "$ac_t""no" 1>&6
9669 fi
9670 done
9671
9672 if test "$ac_cv_header_regex_h" != yes ; then
9673         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9674 fi
9675
9676 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9677 echo "configure:9678: checking for library containing regfree" >&5
9678 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9679   echo $ac_n "(cached) $ac_c" 1>&6
9680 else
9681   ac_func_search_save_LIBS="$LIBS"
9682 ac_cv_search_regfree="no"
9683 cat > conftest.$ac_ext <<EOF
9684 #line 9685 "configure"
9685 #include "confdefs.h"
9686 /* Override any gcc2 internal prototype to avoid an error.  */
9687 /* We use char because int might match the return type of a gcc2
9688     builtin and then its argument prototype would still apply.  */
9689 char regfree();
9690
9691 int main() {
9692 regfree()
9693 ; return 0; }
9694 EOF
9695 if { (eval echo configure:9696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9696   rm -rf conftest*
9697   ac_cv_search_regfree="none required"
9698 else
9699   echo "configure: failed program was:" >&5
9700   cat conftest.$ac_ext >&5
9701 fi
9702 rm -f conftest*
9703 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9704 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9705 cat > conftest.$ac_ext <<EOF
9706 #line 9707 "configure"
9707 #include "confdefs.h"
9708 /* Override any gcc2 internal prototype to avoid an error.  */
9709 /* We use char because int might match the return type of a gcc2
9710     builtin and then its argument prototype would still apply.  */
9711 char regfree();
9712
9713 int main() {
9714 regfree()
9715 ; return 0; }
9716 EOF
9717 if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9718   rm -rf conftest*
9719   ac_cv_search_regfree="-l$ac_lib"
9720 break
9721 else
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724 fi
9725 rm -f conftest*
9726 done
9727 LIBS="$ac_func_search_save_LIBS"
9728 fi
9729
9730 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9731 if test "$ac_cv_search_regfree" != "no"; then
9732   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9733   :
9734 else :
9735   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9736 fi
9737
9738
9739 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9740 echo "configure:9741: checking for compatible POSIX regex" >&5
9741 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9742   echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744   
9745         if test "$cross_compiling" = yes; then
9746   ol_cv_c_posix_regex=cross
9747 else
9748   cat > conftest.$ac_ext <<EOF
9749 #line 9750 "configure"
9750 #include "confdefs.h"
9751
9752 #include <sys/types.h>
9753 #include <regex.h>
9754 static char *pattern, *string;
9755 main()
9756 {
9757         int rc;
9758         regex_t re;
9759
9760         pattern = "^A";
9761
9762         if(regcomp(&re, pattern, 0)) {
9763                 return -1;
9764         }
9765         
9766         string = "ALL MATCH";
9767         
9768         rc = regexec(&re, string, 0, (void*)0, 0);
9769
9770         regfree(&re);
9771
9772         return rc;
9773 }
9774 EOF
9775 if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9776 then
9777   ol_cv_c_posix_regex=yes
9778 else
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -fr conftest*
9782   ol_cv_c_posix_regex=no
9783 fi
9784 rm -fr conftest*
9785 fi
9786
9787 fi
9788
9789 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9790
9791 if test "$ol_cv_c_posix_regex" = no ; then
9792         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9793 fi
9794
9795
9796 have_uuid=no
9797 for ac_hdr in sys/uuid.h
9798 do
9799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9801 echo "configure:9802: checking for $ac_hdr" >&5
9802 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9803   echo $ac_n "(cached) $ac_c" 1>&6
9804 else
9805   cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 #include <$ac_hdr>
9809 EOF
9810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9811 { (eval echo configure:9812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9813 if test -z "$ac_err"; then
9814   rm -rf conftest*
9815   eval "ac_cv_header_$ac_safe=yes"
9816 else
9817   echo "$ac_err" >&5
9818   echo "configure: failed program was:" >&5
9819   cat conftest.$ac_ext >&5
9820   rm -rf conftest*
9821   eval "ac_cv_header_$ac_safe=no"
9822 fi
9823 rm -f conftest*
9824 fi
9825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9826   echo "$ac_t""yes" 1>&6
9827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9828   cat >> confdefs.h <<EOF
9829 #define $ac_tr_hdr 1
9830 EOF
9831  
9832 else
9833   echo "$ac_t""no" 1>&6
9834 fi
9835 done
9836
9837 if test $ac_cv_header_sys_uuid_h = yes ; then
9838         save_LIBS="$LIBS"
9839         
9840 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9841 echo "configure:9842: checking for library containing uuid_to_str" >&5
9842 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9843   echo $ac_n "(cached) $ac_c" 1>&6
9844 else
9845   ac_func_search_save_LIBS="$LIBS"
9846 ac_cv_search_uuid_to_str="no"
9847 cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 /* Override any gcc2 internal prototype to avoid an error.  */
9851 /* We use char because int might match the return type of a gcc2
9852     builtin and then its argument prototype would still apply.  */
9853 char uuid_to_str();
9854
9855 int main() {
9856 uuid_to_str()
9857 ; return 0; }
9858 EOF
9859 if { (eval echo configure:9860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9860   rm -rf conftest*
9861   ac_cv_search_uuid_to_str="none required"
9862 else
9863   echo "configure: failed program was:" >&5
9864   cat conftest.$ac_ext >&5
9865 fi
9866 rm -f conftest*
9867 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9868 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 /* Override any gcc2 internal prototype to avoid an error.  */
9873 /* We use char because int might match the return type of a gcc2
9874     builtin and then its argument prototype would still apply.  */
9875 char uuid_to_str();
9876
9877 int main() {
9878 uuid_to_str()
9879 ; return 0; }
9880 EOF
9881 if { (eval echo configure:9882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9882   rm -rf conftest*
9883   ac_cv_search_uuid_to_str="-l$ac_lib"
9884 break
9885 else
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888 fi
9889 rm -f conftest*
9890 done
9891 LIBS="$ac_func_search_save_LIBS"
9892 fi
9893
9894 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9895 if test "$ac_cv_search_uuid_to_str" != "no"; then
9896   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9897   have_uuid=yes
9898 else :
9899   :
9900 fi
9901         LIBS="$save_LIBS"
9902
9903         if test have_uuid = yes ; then
9904                 cat >> confdefs.h <<\EOF
9905 #define HAVE_UUID_TO_STR 1
9906 EOF
9907
9908
9909                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9910                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9911         fi
9912 fi
9913
9914 if test $have_uuid = no ; then
9915         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9916 echo "configure:9917: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9917         save_LIBS="$LIBS"
9918         LIBS="$LIBS -lrpcrt4"
9919         cat > conftest.$ac_ext <<EOF
9920 #line 9921 "configure"
9921 #include "confdefs.h"
9922
9923                 char UuidCreate@4();
9924                 char UuidToStringA@8();
9925                 
9926 int main() {
9927
9928                 UuidCreate@4();
9929                 UuidToStringA@8();
9930                 
9931 ; return 0; }
9932 EOF
9933 if { (eval echo configure:9934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9934   rm -rf conftest*
9935   need_rpcrt=yes
9936 else
9937   echo "configure: failed program was:" >&5
9938   cat conftest.$ac_ext >&5
9939   rm -rf conftest*
9940   need_rpcrt=no
9941 fi
9942 rm -f conftest*
9943         if test $need_rpcrt = yes; then
9944                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9945         fi
9946         LIBS="$save_LIBS"
9947         echo "$ac_t""$need_rpcrt" 1>&6
9948 fi
9949
9950 ol_link_dnssrv=no
9951 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9952 echo "configure:9953: checking for res_query" >&5
9953 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9954   echo $ac_n "(cached) $ac_c" 1>&6
9955 else
9956   cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 /* System header to define __stub macros and hopefully few prototypes,
9960     which can conflict with char res_query(); below.  */
9961 #include <assert.h>
9962 /* Override any gcc2 internal prototype to avoid an error.  */
9963 /* We use char because int might match the return type of a gcc2
9964     builtin and then its argument prototype would still apply.  */
9965 char res_query();
9966 char (*f)();
9967
9968 int main() {
9969
9970 /* The GNU C library defines this for functions which it implements
9971     to always fail with ENOSYS.  Some functions are actually named
9972     something starting with __ and the normal name is an alias.  */
9973 #if defined (__stub_res_query) || defined (__stub___res_query)
9974 choke me
9975 #else
9976 f = res_query;
9977 #endif
9978
9979 ; return 0; }
9980 EOF
9981 if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9982   rm -rf conftest*
9983   eval "ac_cv_func_res_query=yes"
9984 else
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -rf conftest*
9988   eval "ac_cv_func_res_query=no"
9989 fi
9990 rm -f conftest*
9991 fi
9992
9993 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9994   echo "$ac_t""yes" 1>&6
9995   :
9996 else
9997   echo "$ac_t""no" 1>&6
9998 fi
9999
10000 if test $ac_cv_func_res_query = no ; then 
10001         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10002 echo "configure:10003: checking for __res_query" >&5
10003 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009 /* System header to define __stub macros and hopefully few prototypes,
10010     which can conflict with char __res_query(); below.  */
10011 #include <assert.h>
10012 /* Override any gcc2 internal prototype to avoid an error.  */
10013 /* We use char because int might match the return type of a gcc2
10014     builtin and then its argument prototype would still apply.  */
10015 char __res_query();
10016 char (*f)();
10017
10018 int main() {
10019
10020 /* The GNU C library defines this for functions which it implements
10021     to always fail with ENOSYS.  Some functions are actually named
10022     something starting with __ and the normal name is an alias.  */
10023 #if defined (__stub___res_query) || defined (__stub_____res_query)
10024 choke me
10025 #else
10026 f = __res_query;
10027 #endif
10028
10029 ; return 0; }
10030 EOF
10031 if { (eval echo configure:10032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10032   rm -rf conftest*
10033   eval "ac_cv_func___res_query=yes"
10034 else
10035   echo "configure: failed program was:" >&5
10036   cat conftest.$ac_ext >&5
10037   rm -rf conftest*
10038   eval "ac_cv_func___res_query=no"
10039 fi
10040 rm -f conftest*
10041 fi
10042
10043 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10044   echo "$ac_t""yes" 1>&6
10045   :
10046 else
10047   echo "$ac_t""no" 1>&6
10048 fi
10049
10050         ac_cv_func_res_query=$ac_cv_func___res_query
10051 fi
10052
10053 if test $ac_cv_func_res_query = no ; then 
10054         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10055 echo "configure:10056: checking for res_query in -lbind" >&5
10056 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10057 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10058   echo $ac_n "(cached) $ac_c" 1>&6
10059 else
10060   ac_save_LIBS="$LIBS"
10061 LIBS="-lbind  $LIBS"
10062 cat > conftest.$ac_ext <<EOF
10063 #line 10064 "configure"
10064 #include "confdefs.h"
10065 /* Override any gcc2 internal prototype to avoid an error.  */
10066 /* We use char because int might match the return type of a gcc2
10067     builtin and then its argument prototype would still apply.  */
10068 char res_query();
10069
10070 int main() {
10071 res_query()
10072 ; return 0; }
10073 EOF
10074 if { (eval echo configure:10075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10075   rm -rf conftest*
10076   eval "ac_cv_lib_$ac_lib_var=yes"
10077 else
10078   echo "configure: failed program was:" >&5
10079   cat conftest.$ac_ext >&5
10080   rm -rf conftest*
10081   eval "ac_cv_lib_$ac_lib_var=no"
10082 fi
10083 rm -f conftest*
10084 LIBS="$ac_save_LIBS"
10085
10086 fi
10087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10088   echo "$ac_t""yes" 1>&6
10089     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10090     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10091   cat >> confdefs.h <<EOF
10092 #define $ac_tr_lib 1
10093 EOF
10094
10095   LIBS="-lbind $LIBS"
10096
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100
10101         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10102 fi
10103
10104 if test $ac_cv_func_res_query = no ; then 
10105         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10106 echo "configure:10107: checking for __res_query in -lbind" >&5
10107 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10109   echo $ac_n "(cached) $ac_c" 1>&6
10110 else
10111   ac_save_LIBS="$LIBS"
10112 LIBS="-lbind  $LIBS"
10113 cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 /* Override any gcc2 internal prototype to avoid an error.  */
10117 /* We use char because int might match the return type of a gcc2
10118     builtin and then its argument prototype would still apply.  */
10119 char __res_query();
10120
10121 int main() {
10122 __res_query()
10123 ; return 0; }
10124 EOF
10125 if { (eval echo configure:10126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10126   rm -rf conftest*
10127   eval "ac_cv_lib_$ac_lib_var=yes"
10128 else
10129   echo "configure: failed program was:" >&5
10130   cat conftest.$ac_ext >&5
10131   rm -rf conftest*
10132   eval "ac_cv_lib_$ac_lib_var=no"
10133 fi
10134 rm -f conftest*
10135 LIBS="$ac_save_LIBS"
10136
10137 fi
10138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10139   echo "$ac_t""yes" 1>&6
10140     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10142   cat >> confdefs.h <<EOF
10143 #define $ac_tr_lib 1
10144 EOF
10145
10146   LIBS="-lbind $LIBS"
10147
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151
10152         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10153 fi
10154
10155 if test $ac_cv_func_res_query = no ; then 
10156         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10157 echo "configure:10158: checking for res_query in -lresolv" >&5
10158 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10160   echo $ac_n "(cached) $ac_c" 1>&6
10161 else
10162   ac_save_LIBS="$LIBS"
10163 LIBS="-lresolv  $LIBS"
10164 cat > conftest.$ac_ext <<EOF
10165 #line 10166 "configure"
10166 #include "confdefs.h"
10167 /* Override any gcc2 internal prototype to avoid an error.  */
10168 /* We use char because int might match the return type of a gcc2
10169     builtin and then its argument prototype would still apply.  */
10170 char res_query();
10171
10172 int main() {
10173 res_query()
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   eval "ac_cv_lib_$ac_lib_var=yes"
10179 else
10180   echo "configure: failed program was:" >&5
10181   cat conftest.$ac_ext >&5
10182   rm -rf conftest*
10183   eval "ac_cv_lib_$ac_lib_var=no"
10184 fi
10185 rm -f conftest*
10186 LIBS="$ac_save_LIBS"
10187
10188 fi
10189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10192     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10193   cat >> confdefs.h <<EOF
10194 #define $ac_tr_lib 1
10195 EOF
10196
10197   LIBS="-lresolv $LIBS"
10198
10199 else
10200   echo "$ac_t""no" 1>&6
10201 fi
10202
10203         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10204 fi
10205
10206 if test $ac_cv_func_res_query = no ; then 
10207         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10208 echo "configure:10209: checking for __res_query in -lresolv" >&5
10209 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10210 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10211   echo $ac_n "(cached) $ac_c" 1>&6
10212 else
10213   ac_save_LIBS="$LIBS"
10214 LIBS="-lresolv  $LIBS"
10215 cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 /* Override any gcc2 internal prototype to avoid an error.  */
10219 /* We use char because int might match the return type of a gcc2
10220     builtin and then its argument prototype would still apply.  */
10221 char __res_query();
10222
10223 int main() {
10224 __res_query()
10225 ; return 0; }
10226 EOF
10227 if { (eval echo configure:10228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10228   rm -rf conftest*
10229   eval "ac_cv_lib_$ac_lib_var=yes"
10230 else
10231   echo "configure: failed program was:" >&5
10232   cat conftest.$ac_ext >&5
10233   rm -rf conftest*
10234   eval "ac_cv_lib_$ac_lib_var=no"
10235 fi
10236 rm -f conftest*
10237 LIBS="$ac_save_LIBS"
10238
10239 fi
10240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10241   echo "$ac_t""yes" 1>&6
10242     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10243     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10244   cat >> confdefs.h <<EOF
10245 #define $ac_tr_lib 1
10246 EOF
10247
10248   LIBS="-lresolv $LIBS"
10249
10250 else
10251   echo "$ac_t""no" 1>&6
10252 fi
10253
10254         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10255 fi
10256
10257 if test "$ac_cv_func_res_query" = yes ; then
10258         cat >> confdefs.h <<\EOF
10259 #define HAVE_RES_QUERY 1
10260 EOF
10261
10262
10263         if test $ol_enable_dnssrv != no ; then
10264                 ol_link_dnssrv=yes
10265         fi
10266 fi
10267
10268 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10269         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10270 fi
10271
10272 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10273 do
10274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10275 echo "configure:10276: checking for $ac_func" >&5
10276 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10277   echo $ac_n "(cached) $ac_c" 1>&6
10278 else
10279   cat > conftest.$ac_ext <<EOF
10280 #line 10281 "configure"
10281 #include "confdefs.h"
10282 /* System header to define __stub macros and hopefully few prototypes,
10283     which can conflict with char $ac_func(); below.  */
10284 #include <assert.h>
10285 /* Override any gcc2 internal prototype to avoid an error.  */
10286 /* We use char because int might match the return type of a gcc2
10287     builtin and then its argument prototype would still apply.  */
10288 char $ac_func();
10289 char (*f)();
10290
10291 int main() {
10292
10293 /* The GNU C library defines this for functions which it implements
10294     to always fail with ENOSYS.  Some functions are actually named
10295     something starting with __ and the normal name is an alias.  */
10296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10297 choke me
10298 #else
10299 f = $ac_func;
10300 #endif
10301
10302 ; return 0; }
10303 EOF
10304 if { (eval echo configure:10305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10305   rm -rf conftest*
10306   eval "ac_cv_func_$ac_func=yes"
10307 else
10308   echo "configure: failed program was:" >&5
10309   cat conftest.$ac_ext >&5
10310   rm -rf conftest*
10311   eval "ac_cv_func_$ac_func=no"
10312 fi
10313 rm -f conftest*
10314 fi
10315
10316 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10317   echo "$ac_t""yes" 1>&6
10318     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10319   cat >> confdefs.h <<EOF
10320 #define $ac_tr_func 1
10321 EOF
10322  
10323 else
10324   echo "$ac_t""no" 1>&6
10325 fi
10326 done
10327
10328
10329 ol_link_ipv6=no
10330 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10331         if test $ol_enable_ipv6 = yes ; then
10332                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10333         fi
10334 elif test $ol_enable_ipv6 != no ; then
10335         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10336 echo "configure:10337: checking INET6_ADDRSTRLEN" >&5
10337 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10338   echo $ac_n "(cached) $ac_c" 1>&6
10339 else
10340   
10341                 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344
10345 #                       include <netinet/in.h>
10346 #                       ifdef INET6_ADDRSTRLEN
10347                                 __has_inet6_addrstrlen__;
10348 #                       endif
10349                 
10350 EOF
10351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10352   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10353   rm -rf conftest*
10354   ol_cv_inet6_addrstrlen=yes
10355 else
10356   rm -rf conftest*
10357   ol_cv_inet6_addrstrlen=no
10358 fi
10359 rm -f conftest*
10360
10361 fi
10362
10363 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10364
10365
10366         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10367 echo "configure:10368: checking struct sockaddr_storage" >&5
10368 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   
10372                 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375
10376 #include <sys/types.h>
10377 #include <sys/socket.h>
10378
10379 int main() {
10380
10381                         struct sockaddr_storage ss;
10382
10383 ; return 0; }
10384 EOF
10385 if { (eval echo configure:10386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10386   rm -rf conftest*
10387   ol_cv_struct_sockaddr_storage=yes
10388 else
10389   echo "configure: failed program was:" >&5
10390   cat conftest.$ac_ext >&5
10391   rm -rf conftest*
10392   ol_cv_struct_sockaddr_storage=no
10393 fi
10394 rm -f conftest*
10395 fi
10396
10397 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10398
10399         if test $ol_cv_inet6_addrstrlen = yes \
10400                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10401                 ol_link_ipv6=yes
10402         elif test $ol_enable_ipv6 = yes \
10403                         -a $ol_cv_inet6_addrstrlen = no ; then
10404                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10405         elif test $ol_enable_ipv6 = yes \
10406                         -a $ol_cv_struct_sockaddr_storage = no ; then
10407                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10408         fi
10409 fi
10410
10411 if test $ol_enable_local != no ; then
10412         for ac_hdr in sys/un.h 
10413 do
10414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10416 echo "configure:10417: checking for $ac_hdr" >&5
10417 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10418   echo $ac_n "(cached) $ac_c" 1>&6
10419 else
10420   cat > conftest.$ac_ext <<EOF
10421 #line 10422 "configure"
10422 #include "confdefs.h"
10423 #include <$ac_hdr>
10424 EOF
10425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10426 { (eval echo configure:10427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10428 if test -z "$ac_err"; then
10429   rm -rf conftest*
10430   eval "ac_cv_header_$ac_safe=yes"
10431 else
10432   echo "$ac_err" >&5
10433   echo "configure: failed program was:" >&5
10434   cat conftest.$ac_ext >&5
10435   rm -rf conftest*
10436   eval "ac_cv_header_$ac_safe=no"
10437 fi
10438 rm -f conftest*
10439 fi
10440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10441   echo "$ac_t""yes" 1>&6
10442     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10443   cat >> confdefs.h <<EOF
10444 #define $ac_tr_hdr 1
10445 EOF
10446  
10447 else
10448   echo "$ac_t""no" 1>&6
10449 fi
10450 done
10451
10452
10453         if test $ol_enable_local = auto ; then
10454                 ol_enable_local=$ac_cv_header_sys_un_h
10455         elif test $ac_cv_header_sys_un_h = no ; then
10456                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10457         fi
10458 fi
10459
10460 ol_link_kbind=no
10461 ol_link_kpasswd=no
10462 ol_link_krb5=no
10463 ol_link_krb4=no
10464
10465 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10466         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10467         -o $ol_with_kerberos = k425 ; then
10468
10469         for ac_hdr in krb5.h
10470 do
10471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10473 echo "configure:10474: checking for $ac_hdr" >&5
10474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10475   echo $ac_n "(cached) $ac_c" 1>&6
10476 else
10477   cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 #include <$ac_hdr>
10481 EOF
10482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10483 { (eval echo configure:10484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10485 if test -z "$ac_err"; then
10486   rm -rf conftest*
10487   eval "ac_cv_header_$ac_safe=yes"
10488 else
10489   echo "$ac_err" >&5
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   eval "ac_cv_header_$ac_safe=no"
10494 fi
10495 rm -f conftest*
10496 fi
10497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10498   echo "$ac_t""yes" 1>&6
10499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10500   cat >> confdefs.h <<EOF
10501 #define $ac_tr_hdr 1
10502 EOF
10503  
10504 else
10505   echo "$ac_t""no" 1>&6
10506 fi
10507 done
10508
10509
10510         if test $ac_cv_header_krb5_h = yes ; then
10511                                 for ac_hdr in heim_err.h
10512 do
10513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10515 echo "configure:10516: checking for $ac_hdr" >&5
10516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10517   echo $ac_n "(cached) $ac_c" 1>&6
10518 else
10519   cat > conftest.$ac_ext <<EOF
10520 #line 10521 "configure"
10521 #include "confdefs.h"
10522 #include <$ac_hdr>
10523 EOF
10524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10525 { (eval echo configure:10526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10527 if test -z "$ac_err"; then
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=yes"
10530 else
10531   echo "$ac_err" >&5
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_header_$ac_safe=no"
10536 fi
10537 rm -f conftest*
10538 fi
10539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10542   cat >> confdefs.h <<EOF
10543 #define $ac_tr_hdr 1
10544 EOF
10545  
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549 done
10550
10551                 if test $ac_cv_header_heim_err_h = yes ; then
10552                         krb5_impl=heimdal
10553                 else
10554                         krb5_impl=mit
10555                 fi
10556
10557                 if test $krb5_impl = mit; then
10558                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10559 echo "configure:10560: checking for main in -lk5crypto" >&5
10560 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10562   echo $ac_n "(cached) $ac_c" 1>&6
10563 else
10564   ac_save_LIBS="$LIBS"
10565 LIBS="-lk5crypto  $LIBS"
10566 cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569
10570 int main() {
10571 main()
10572 ; return 0; }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=yes"
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=no"
10582 fi
10583 rm -f conftest*
10584 LIBS="$ac_save_LIBS"
10585
10586 fi
10587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   krb5crypto=k5crypto
10590 else
10591   echo "$ac_t""no" 1>&6
10592 krb5crypto=crypto
10593 fi
10594
10595
10596                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10597 echo "configure:10598: checking for main in -lkrb5" >&5
10598 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   ac_save_LIBS="$LIBS"
10603 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10604 cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607
10608 int main() {
10609 main()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 LIBS="$ac_save_LIBS"
10623
10624 fi
10625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10626   echo "$ac_t""yes" 1>&6
10627   have_krb5=yes
10628                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10629 else
10630   echo "$ac_t""no" 1>&6
10631 have_krb5=no
10632 fi
10633
10634
10635                 elif test $krb5_impl = heimdal; then
10636                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10637 echo "configure:10638: checking for main in -ldes" >&5
10638 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10640   echo $ac_n "(cached) $ac_c" 1>&6
10641 else
10642   ac_save_LIBS="$LIBS"
10643 LIBS="-ldes  $LIBS"
10644 cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647
10648 int main() {
10649 main()
10650 ; return 0; }
10651 EOF
10652 if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10653   rm -rf conftest*
10654   eval "ac_cv_lib_$ac_lib_var=yes"
10655 else
10656   echo "configure: failed program was:" >&5
10657   cat conftest.$ac_ext >&5
10658   rm -rf conftest*
10659   eval "ac_cv_lib_$ac_lib_var=no"
10660 fi
10661 rm -f conftest*
10662 LIBS="$ac_save_LIBS"
10663
10664 fi
10665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667   krb5crypto=des
10668 else
10669   echo "$ac_t""no" 1>&6
10670 krb5crypto=crypto
10671 fi
10672
10673
10674                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10675 echo "configure:10676: checking for main in -lkrb5" >&5
10676 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10677 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10678   echo $ac_n "(cached) $ac_c" 1>&6
10679 else
10680   ac_save_LIBS="$LIBS"
10681 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10682 cat > conftest.$ac_ext <<EOF
10683 #line 10684 "configure"
10684 #include "confdefs.h"
10685
10686 int main() {
10687 main()
10688 ; return 0; }
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10691   rm -rf conftest*
10692   eval "ac_cv_lib_$ac_lib_var=yes"
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -rf conftest*
10697   eval "ac_cv_lib_$ac_lib_var=no"
10698 fi
10699 rm -f conftest*
10700 LIBS="$ac_save_LIBS"
10701
10702 fi
10703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10704   echo "$ac_t""yes" 1>&6
10705   have_krb5=yes
10706                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10707 else
10708   echo "$ac_t""no" 1>&6
10709 have_krb5=no
10710 fi
10711
10712
10713                         cat >> confdefs.h <<\EOF
10714 #define HAVE_HEIMDAL_KERBEROS 1
10715 EOF
10716
10717
10718                 else
10719                         have_krb5=no
10720                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10721                 fi
10722
10723                 if test $have_krb5 = yes ; then
10724                         ol_link_krb5=yes
10725
10726                         cat >> confdefs.h <<\EOF
10727 #define HAVE_KRB5 1
10728 EOF
10729
10730
10731                         if test $ol_enable_kpasswd != no ; then
10732                                 ol_link_kpasswd=yes;
10733                         fi
10734
10735                         if test $ol_with_kerberos = k5only ; then
10736                                 ol_with_kerberos=found
10737                         fi
10738
10739                 elif test $ol_with_kerberos != auto ; then
10740                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10741                 fi
10742
10743         fi
10744 fi
10745
10746 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10747         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10748
10749         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10750 do
10751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10753 echo "configure:10754: checking for $ac_hdr" >&5
10754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10755   echo $ac_n "(cached) $ac_c" 1>&6
10756 else
10757   cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760 #include <$ac_hdr>
10761 EOF
10762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10763 { (eval echo configure:10764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10765 if test -z "$ac_err"; then
10766   rm -rf conftest*
10767   eval "ac_cv_header_$ac_safe=yes"
10768 else
10769   echo "$ac_err" >&5
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   eval "ac_cv_header_$ac_safe=no"
10774 fi
10775 rm -f conftest*
10776 fi
10777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10778   echo "$ac_t""yes" 1>&6
10779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10780   cat >> confdefs.h <<EOF
10781 #define $ac_tr_hdr 1
10782 EOF
10783  
10784 else
10785   echo "$ac_t""no" 1>&6
10786 fi
10787 done
10788
10789
10790         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10791                 if test $krb5_impl = mit; then
10792                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10793 echo "configure:10794: checking for main in -lkrb4" >&5
10794 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   ac_save_LIBS="$LIBS"
10799 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10800 cat > conftest.$ac_ext <<EOF
10801 #line 10802 "configure"
10802 #include "confdefs.h"
10803
10804 int main() {
10805 main()
10806 ; return 0; }
10807 EOF
10808 if { (eval echo configure:10809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10809   rm -rf conftest*
10810   eval "ac_cv_lib_$ac_lib_var=yes"
10811 else
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_lib_$ac_lib_var=no"
10816 fi
10817 rm -f conftest*
10818 LIBS="$ac_save_LIBS"
10819
10820 fi
10821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10822   echo "$ac_t""yes" 1>&6
10823   have_k425=yes
10824                                 KRB4_LIBS="-lkrb4 -ldes425"
10825 else
10826   echo "$ac_t""no" 1>&6
10827 have_k425=no
10828 fi
10829
10830
10831                 elif test $krb5_impl = heimdal; then
10832                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10833 echo "configure:10834: checking for main in -lkrb4" >&5
10834 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10835 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10836   echo $ac_n "(cached) $ac_c" 1>&6
10837 else
10838   ac_save_LIBS="$LIBS"
10839 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10840 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843
10844 int main() {
10845 main()
10846 ; return 0; }
10847 EOF
10848 if { (eval echo configure:10849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10849   rm -rf conftest*
10850   eval "ac_cv_lib_$ac_lib_var=yes"
10851 else
10852   echo "configure: failed program was:" >&5
10853   cat conftest.$ac_ext >&5
10854   rm -rf conftest*
10855   eval "ac_cv_lib_$ac_lib_var=no"
10856 fi
10857 rm -f conftest*
10858 LIBS="$ac_save_LIBS"
10859
10860 fi
10861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10862   echo "$ac_t""yes" 1>&6
10863   have_k425=yes
10864                                 KRB4_LIBS="-lkrb4"
10865 else
10866   echo "$ac_t""no" 1>&6
10867 have_k425=no
10868 fi
10869
10870
10871                 else
10872                         have_425=no
10873                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10874                 fi
10875
10876                 if test $have_k425 = yes ; then
10877                         ol_with_kerberos=found
10878                         ol_link_krb4=yes
10879
10880                         cat >> confdefs.h <<\EOF
10881 #define HAVE_KRB425 1
10882 EOF
10883
10884                         cat >> confdefs.h <<\EOF
10885 #define HAVE_KRB4 1
10886 EOF
10887
10888
10889                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10890 echo "configure:10891: checking for des_debug in Kerberos libraries" >&5
10891 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   
10895                                                                 save_LIBS="$LIBS"
10896                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10897                                 cat > conftest.$ac_ext <<EOF
10898 #line 10899 "configure"
10899 #include "confdefs.h"
10900
10901 #include <kerberosIV/krb.h>
10902 #include <kerberosIV/des.h>
10903 extern int des_debug;
10904
10905 int main() {
10906
10907 des_debug = 1;
10908
10909 ; return 0; }
10910 EOF
10911 if { (eval echo configure:10912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10912   rm -rf conftest*
10913   ol_cv_var_des_debug=yes
10914 else
10915   echo "configure: failed program was:" >&5
10916   cat conftest.$ac_ext >&5
10917   rm -rf conftest*
10918   ol_cv_var_des_debug=no
10919 fi
10920 rm -f conftest*
10921                                                                 LIBS="$save_LIBS"
10922                         
10923 fi
10924
10925 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10926
10927                         if test $ol_cv_var_des_debug = yes ; then
10928                                 cat >> confdefs.h <<\EOF
10929 #define HAVE_DES_DEBUG 1
10930 EOF
10931
10932                         fi
10933
10934                         LIBS="$save_LIBS"
10935                 fi
10936         fi
10937 fi
10938
10939 if test $ol_link_krb5 = yes ; then
10940         ol_with_kerberos=found
10941 fi
10942
10943 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10944         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10945
10946         for ac_hdr in krb.h des.h krb-archaeology.h 
10947 do
10948 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10949 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10950 echo "configure:10951: checking for $ac_hdr" >&5
10951 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10952   echo $ac_n "(cached) $ac_c" 1>&6
10953 else
10954   cat > conftest.$ac_ext <<EOF
10955 #line 10956 "configure"
10956 #include "confdefs.h"
10957 #include <$ac_hdr>
10958 EOF
10959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10960 { (eval echo configure:10961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10962 if test -z "$ac_err"; then
10963   rm -rf conftest*
10964   eval "ac_cv_header_$ac_safe=yes"
10965 else
10966   echo "$ac_err" >&5
10967   echo "configure: failed program was:" >&5
10968   cat conftest.$ac_ext >&5
10969   rm -rf conftest*
10970   eval "ac_cv_header_$ac_safe=no"
10971 fi
10972 rm -f conftest*
10973 fi
10974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10975   echo "$ac_t""yes" 1>&6
10976     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10977   cat >> confdefs.h <<EOF
10978 #define $ac_tr_hdr 1
10979 EOF
10980  
10981 else
10982   echo "$ac_t""no" 1>&6
10983 fi
10984 done
10985
10986
10987         if test $ac_cv_header_krb_h = yes ; then
10988                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10989 echo "configure:10990: checking for main in -lkrb" >&5
10990 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10991 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10992   echo $ac_n "(cached) $ac_c" 1>&6
10993 else
10994   ac_save_LIBS="$LIBS"
10995 LIBS="-lkrb -ldes $LIBS"
10996 cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999
11000 int main() {
11001 main()
11002 ; return 0; }
11003 EOF
11004 if { (eval echo configure:11005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11005   rm -rf conftest*
11006   eval "ac_cv_lib_$ac_lib_var=yes"
11007 else
11008   echo "configure: failed program was:" >&5
11009   cat conftest.$ac_ext >&5
11010   rm -rf conftest*
11011   eval "ac_cv_lib_$ac_lib_var=no"
11012 fi
11013 rm -f conftest*
11014 LIBS="$ac_save_LIBS"
11015
11016 fi
11017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11018   echo "$ac_t""yes" 1>&6
11019   have_k4=yes
11020 else
11021   echo "$ac_t""no" 1>&6
11022 have_k4=no
11023 fi
11024
11025
11026                 if test $have_k4 = yes ; then
11027                         ol_with_kerberos=found
11028                         ol_link_krb4=yes
11029
11030                         cat >> confdefs.h <<\EOF
11031 #define HAVE_KRB4 1
11032 EOF
11033
11034
11035                         KRB4_LIBS="-lkrb -ldes"
11036
11037                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11038                                 cat >> confdefs.h <<\EOF
11039 #define HAVE_KTH_KERBEROS 1
11040 EOF
11041
11042                         fi
11043                 fi
11044         fi
11045 fi
11046
11047 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11048         ol_link_kpasswd=yes
11049 fi
11050
11051 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11052         ol_link_kbind=yes
11053
11054 elif test $ol_enable_kbind = yes ; then
11055         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11056 fi
11057
11058 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11059         cat >> confdefs.h <<\EOF
11060 #define HAVE_KERBEROS 1
11061 EOF
11062
11063
11064 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11065         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11066 fi
11067
11068 ol_link_tls=no
11069 if test $ol_with_tls != no ; then
11070         for ac_hdr in openssl/ssl.h ssl.h
11071 do
11072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11074 echo "configure:11075: checking for $ac_hdr" >&5
11075 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11076   echo $ac_n "(cached) $ac_c" 1>&6
11077 else
11078   cat > conftest.$ac_ext <<EOF
11079 #line 11080 "configure"
11080 #include "confdefs.h"
11081 #include <$ac_hdr>
11082 EOF
11083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11084 { (eval echo configure:11085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11086 if test -z "$ac_err"; then
11087   rm -rf conftest*
11088   eval "ac_cv_header_$ac_safe=yes"
11089 else
11090   echo "$ac_err" >&5
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   eval "ac_cv_header_$ac_safe=no"
11095 fi
11096 rm -f conftest*
11097 fi
11098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11099   echo "$ac_t""yes" 1>&6
11100     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11101   cat >> confdefs.h <<EOF
11102 #define $ac_tr_hdr 1
11103 EOF
11104  
11105 else
11106   echo "$ac_t""no" 1>&6
11107 fi
11108 done
11109
11110         
11111         if test $ac_cv_header_openssl_ssl_h = yes \
11112                 -o $ac_cv_header_ssl_h = yes ; then
11113                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11114 echo "configure:11115: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11115 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11117   echo $ac_n "(cached) $ac_c" 1>&6
11118 else
11119   ac_save_LIBS="$LIBS"
11120 LIBS="-lssl -lcrypto $LIBS"
11121 cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 /* Override any gcc2 internal prototype to avoid an error.  */
11125 /* We use char because int might match the return type of a gcc2
11126     builtin and then its argument prototype would still apply.  */
11127 char SSLeay_add_ssl_algorithms();
11128
11129 int main() {
11130 SSLeay_add_ssl_algorithms()
11131 ; return 0; }
11132 EOF
11133 if { (eval echo configure:11134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11134   rm -rf conftest*
11135   eval "ac_cv_lib_$ac_lib_var=yes"
11136 else
11137   echo "configure: failed program was:" >&5
11138   cat conftest.$ac_ext >&5
11139   rm -rf conftest*
11140   eval "ac_cv_lib_$ac_lib_var=no"
11141 fi
11142 rm -f conftest*
11143 LIBS="$ac_save_LIBS"
11144
11145 fi
11146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148   have_ssleay=yes
11149                         need_rsaref=no
11150 else
11151   echo "$ac_t""no" 1>&6
11152 have_ssleay=no
11153 fi
11154
11155                         
11156                 if test $have_ssleay = no ; then
11157                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11158 echo "configure:11159: checking for SSL_library_init in -lssl" >&5
11159 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11161   echo $ac_n "(cached) $ac_c" 1>&6
11162 else
11163   ac_save_LIBS="$LIBS"
11164 LIBS="-lssl -lcrypto $LIBS"
11165 cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168 /* Override any gcc2 internal prototype to avoid an error.  */
11169 /* We use char because int might match the return type of a gcc2
11170     builtin and then its argument prototype would still apply.  */
11171 char SSL_library_init();
11172
11173 int main() {
11174 SSL_library_init()
11175 ; return 0; }
11176 EOF
11177 if { (eval echo configure:11178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=yes"
11180 else
11181   echo "configure: failed program was:" >&5
11182   cat conftest.$ac_ext >&5
11183   rm -rf conftest*
11184   eval "ac_cv_lib_$ac_lib_var=no"
11185 fi
11186 rm -f conftest*
11187 LIBS="$ac_save_LIBS"
11188
11189 fi
11190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192   have_ssleay=yes
11193                                 need_rsaref=no
11194 else
11195   echo "$ac_t""no" 1>&6
11196 have_ssleay=no
11197 fi
11198
11199                 fi
11200
11201                 if test $have_ssleay = no ; then
11202                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11203 echo "configure:11204: checking for ssl3_accept in -lssl" >&5
11204 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11205 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11206   echo $ac_n "(cached) $ac_c" 1>&6
11207 else
11208   ac_save_LIBS="$LIBS"
11209 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11210 cat > conftest.$ac_ext <<EOF
11211 #line 11212 "configure"
11212 #include "confdefs.h"
11213 /* Override any gcc2 internal prototype to avoid an error.  */
11214 /* We use char because int might match the return type of a gcc2
11215     builtin and then its argument prototype would still apply.  */
11216 char ssl3_accept();
11217
11218 int main() {
11219 ssl3_accept()
11220 ; return 0; }
11221 EOF
11222 if { (eval echo configure:11223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11223   rm -rf conftest*
11224   eval "ac_cv_lib_$ac_lib_var=yes"
11225 else
11226   echo "configure: failed program was:" >&5
11227   cat conftest.$ac_ext >&5
11228   rm -rf conftest*
11229   eval "ac_cv_lib_$ac_lib_var=no"
11230 fi
11231 rm -f conftest*
11232 LIBS="$ac_save_LIBS"
11233
11234 fi
11235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11236   echo "$ac_t""yes" 1>&6
11237   have_ssleay=yes
11238                                 need_rsaref=yes
11239 else
11240   echo "$ac_t""no" 1>&6
11241 have_ssleay=no
11242 fi
11243
11244                 fi
11245
11246                 if test $have_ssleay = yes ; then
11247                         ol_with_tls=found
11248                         ol_link_tls=yes
11249
11250                         cat >> confdefs.h <<\EOF
11251 #define HAVE_SSLEAY 1
11252 EOF
11253
11254
11255                         if test $need_rsaref = yes; then
11256                                 cat >> confdefs.h <<\EOF
11257 #define HAVE_RSAREF 1
11258 EOF
11259
11260
11261                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11262                         else
11263                                 TLS_LIBS="-lssl -lcrypto"
11264                         fi
11265                 fi
11266         fi
11267
11268 else
11269         echo "configure: warning: TLS data protection not supported!" 1>&2
11270 fi
11271
11272 WITH_TLS=no
11273 if test $ol_link_tls = yes ; then
11274         cat >> confdefs.h <<\EOF
11275 #define HAVE_TLS 1
11276 EOF
11277
11278         WITH_TLS=yes
11279
11280 elif test $ol_with_tls = auto ; then
11281         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11282         echo "configure: warning: TLS data protection not supported!" 1>&2
11283
11284 elif test $ol_with_tls != no ; then
11285         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11286 fi
11287
11288 if test $ol_enable_lmpasswd != no; then
11289         if test $ol_link_tls != yes ; then
11290                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11291         fi
11292
11293         cat >> confdefs.h <<\EOF
11294 #define SLAPD_LMHASH 1
11295 EOF
11296
11297 fi
11298
11299 ol_link_threads=no
11300
11301 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11302         -o $ol_with_threads = nt ; then
11303
11304         
11305         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11306 echo "configure:11307: checking for _beginthread" >&5
11307 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11308   echo $ac_n "(cached) $ac_c" 1>&6
11309 else
11310   cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313 /* System header to define __stub macros and hopefully few prototypes,
11314     which can conflict with char _beginthread(); below.  */
11315 #include <assert.h>
11316 /* Override any gcc2 internal prototype to avoid an error.  */
11317 /* We use char because int might match the return type of a gcc2
11318     builtin and then its argument prototype would still apply.  */
11319 char _beginthread();
11320 char (*f)();
11321
11322 int main() {
11323
11324 /* The GNU C library defines this for functions which it implements
11325     to always fail with ENOSYS.  Some functions are actually named
11326     something starting with __ and the normal name is an alias.  */
11327 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11328 choke me
11329 #else
11330 f = _beginthread;
11331 #endif
11332
11333 ; return 0; }
11334 EOF
11335 if { (eval echo configure:11336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11336   rm -rf conftest*
11337   eval "ac_cv_func__beginthread=yes"
11338 else
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -rf conftest*
11342   eval "ac_cv_func__beginthread=no"
11343 fi
11344 rm -f conftest*
11345 fi
11346
11347 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11348   echo "$ac_t""yes" 1>&6
11349   :
11350 else
11351   echo "$ac_t""no" 1>&6
11352 fi
11353
11354
11355         if test $ac_cv_func__beginthread = yes ; then
11356                 cat >> confdefs.h <<\EOF
11357 #define HAVE_NT_THREADS 1
11358 EOF
11359
11360                 ol_cv_nt_threads=yes
11361         fi
11362
11363
11364         if test "$ol_cv_nt_threads" = yes ; then
11365                 ol_link_threads=nt
11366                 ol_with_threads=found
11367                 ol_with_yielding_select=yes
11368
11369                 cat >> confdefs.h <<\EOF
11370 #define HAVE_NT_SERVICE_MANAGER 1
11371 EOF
11372
11373                 cat >> confdefs.h <<\EOF
11374 #define HAVE_NT_EVENT_LOG 1
11375 EOF
11376
11377         fi
11378
11379         if test $ol_with_threads = nt ; then
11380                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11381         fi
11382 fi
11383
11384 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11385         -o $ol_with_threads = posix ; then
11386
11387         for ac_hdr in pthread.h
11388 do
11389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11391 echo "configure:11392: checking for $ac_hdr" >&5
11392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <$ac_hdr>
11399 EOF
11400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11401 { (eval echo configure:11402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11403 if test -z "$ac_err"; then
11404   rm -rf conftest*
11405   eval "ac_cv_header_$ac_safe=yes"
11406 else
11407   echo "$ac_err" >&5
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   eval "ac_cv_header_$ac_safe=no"
11412 fi
11413 rm -f conftest*
11414 fi
11415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11416   echo "$ac_t""yes" 1>&6
11417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11418   cat >> confdefs.h <<EOF
11419 #define $ac_tr_hdr 1
11420 EOF
11421  
11422 else
11423   echo "$ac_t""no" 1>&6
11424 fi
11425 done
11426
11427
11428         if test $ac_cv_header_pthread_h = yes ; then
11429                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11430 echo "configure:11431: checking POSIX thread version" >&5
11431 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11432   echo $ac_n "(cached) $ac_c" 1>&6
11433 else
11434   
11435         cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438
11439 #               include <pthread.h>
11440         
11441 int main() {
11442
11443                 int i = PTHREAD_CREATE_JOINABLE;
11444         
11445 ; return 0; }
11446 EOF
11447 if { (eval echo configure:11448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11448   rm -rf conftest*
11449   
11450         cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 #include <pthread.h>
11454 EOF
11455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11456   egrep "pthread_detach" >/dev/null 2>&1; then
11457   rm -rf conftest*
11458   ol_cv_pthread_version=10
11459 else
11460   rm -rf conftest*
11461   ol_cv_pthread_version=8
11462 fi
11463 rm -f conftest*
11464
11465 else
11466   echo "configure: failed program was:" >&5
11467   cat conftest.$ac_ext >&5
11468   rm -rf conftest*
11469   
11470         cat > conftest.$ac_ext <<EOF
11471 #line 11472 "configure"
11472 #include "confdefs.h"
11473
11474 #               include <pthread.h>
11475 #               ifdef PTHREAD_CREATE_UNDETACHED
11476                 draft7
11477 #               endif
11478         
11479 EOF
11480 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11481   egrep "draft7" >/dev/null 2>&1; then
11482   rm -rf conftest*
11483   ol_cv_pthread_version=7
11484 else
11485   rm -rf conftest*
11486   
11487         cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <pthread.h>
11491 EOF
11492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11493   egrep "pthread_attr_init" >/dev/null 2>&1; then
11494   rm -rf conftest*
11495   ol_cv_pthread_version=6
11496 else
11497   rm -rf conftest*
11498   
11499         cat > conftest.$ac_ext <<EOF
11500 #line 11501 "configure"
11501 #include "confdefs.h"
11502
11503 #               include <pthread.h>
11504 #ifdef          PTHREAD_MUTEX_INITIALIZER
11505                 draft5
11506 #endif
11507         
11508 EOF
11509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11510   egrep "draft5" >/dev/null 2>&1; then
11511   rm -rf conftest*
11512   ol_cv_pthread_version=5
11513 else
11514   rm -rf conftest*
11515   ol_cv_pthread_version=4
11516 fi
11517 rm -f conftest*
11518  
11519 fi
11520 rm -f conftest*
11521  
11522 fi
11523 rm -f conftest*
11524  
11525 fi
11526 rm -f conftest*
11527
11528 fi
11529
11530 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11531
11532
11533                 if test $ol_cv_pthread_version != 0 ; then
11534                         cat >> confdefs.h <<EOF
11535 #define HAVE_PTHREADS $ol_cv_pthread_version
11536 EOF
11537
11538                 else
11539                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11540                 fi
11541
11542                 # consider threads found
11543                 ol_with_threads=found
11544
11545                 
11546         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11547 echo "configure:11548: checking for LinuxThreads pthread.h" >&5
11548 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11549   echo $ac_n "(cached) $ac_c" 1>&6
11550 else
11551   cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554 #include <pthread.h>
11555 EOF
11556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11557   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11558   rm -rf conftest*
11559   ol_cv_header_linux_threads=yes
11560 else
11561   rm -rf conftest*
11562   ol_cv_header_linux_threads=no
11563 fi
11564 rm -f conftest*
11565
11566                 
11567 fi
11568
11569 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11570         if test $ol_cv_header_linux_threads = yes; then
11571                 cat >> confdefs.h <<\EOF
11572 #define HAVE_LINUX_THREADS 1
11573 EOF
11574
11575         fi
11576
11577                 
11578         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11579 echo "configure:11580: checking for GNU Pth pthread.h" >&5
11580 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11581   echo $ac_n "(cached) $ac_c" 1>&6
11582 else
11583   cat > conftest.$ac_ext <<EOF
11584 #line 11585 "configure"
11585 #include "confdefs.h"
11586 #include <pthread.h>
11587 #ifdef _POSIX_THREAD_IS_GNU_PTH
11588         __gnu_pth__;
11589 #endif
11590
11591 EOF
11592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11593   egrep "__gnu_pth__" >/dev/null 2>&1; then
11594   rm -rf conftest*
11595   ol_cv_header_gnu_pth_pthread_h=yes
11596 else
11597   rm -rf conftest*
11598   ol_cv_header_gnu_pth_pthread_h=no
11599 fi
11600 rm -f conftest*
11601
11602                 
11603 fi
11604
11605 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11606
11607
11608                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11609                         for ac_hdr in sched.h
11610 do
11611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11613 echo "configure:11614: checking for $ac_hdr" >&5
11614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11615   echo $ac_n "(cached) $ac_c" 1>&6
11616 else
11617   cat > conftest.$ac_ext <<EOF
11618 #line 11619 "configure"
11619 #include "confdefs.h"
11620 #include <$ac_hdr>
11621 EOF
11622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11623 { (eval echo configure:11624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11625 if test -z "$ac_err"; then
11626   rm -rf conftest*
11627   eval "ac_cv_header_$ac_safe=yes"
11628 else
11629   echo "$ac_err" >&5
11630   echo "configure: failed program was:" >&5
11631   cat conftest.$ac_ext >&5
11632   rm -rf conftest*
11633   eval "ac_cv_header_$ac_safe=no"
11634 fi
11635 rm -f conftest*
11636 fi
11637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11638   echo "$ac_t""yes" 1>&6
11639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11640   cat >> confdefs.h <<EOF
11641 #define $ac_tr_hdr 1
11642 EOF
11643  
11644 else
11645   echo "$ac_t""no" 1>&6
11646 fi
11647 done
11648
11649                 fi
11650
11651                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11652                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11653 echo "configure:11654: checking for pthread_create in default libraries" >&5
11654 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11655   echo $ac_n "(cached) $ac_c" 1>&6
11656 else
11657   
11658                 if test "$cross_compiling" = yes; then
11659   cat > conftest.$ac_ext <<EOF
11660 #line 11661 "configure"
11661 #include "confdefs.h"
11662 /* pthread test headers */
11663 #include <pthread.h>
11664 #if HAVE_PTHREADS < 7
11665 #include <errno.h>
11666 #endif
11667 #ifndef NULL
11668 #define NULL (void*)0
11669 #endif
11670
11671 static void *task(p)
11672         void *p;
11673 {
11674         return (void *) (p == NULL);
11675 }
11676
11677 int main() {
11678
11679         /* pthread test function */
11680 #ifndef PTHREAD_CREATE_DETACHED
11681 #define PTHREAD_CREATE_DETACHED 1
11682 #endif
11683         pthread_t t;
11684         int status;
11685         int detach = PTHREAD_CREATE_DETACHED;
11686
11687 #if HAVE_PTHREADS > 4
11688         /* Final pthreads */
11689         pthread_attr_t attr;
11690
11691         status = pthread_attr_init(&attr);
11692         if( status ) return status;
11693
11694 #if HAVE_PTHREADS < 7
11695         status = pthread_attr_setdetachstate(&attr, &detach);
11696         if( status < 0 ) status = errno;
11697 #else
11698         status = pthread_attr_setdetachstate(&attr, detach);
11699 #endif
11700         if( status ) return status;
11701         status = pthread_create( &t, &attr, task, NULL );
11702 #if HAVE_PTHREADS < 7
11703         if( status < 0 ) status = errno;
11704 #endif
11705         if( status ) return status;
11706 #else
11707         /* Draft 4 pthreads */
11708         status = pthread_create( &t, pthread_attr_default, task, NULL );
11709         if( status ) return errno;
11710
11711         /* give thread a chance to complete */
11712         /* it should remain joinable and hence detachable */
11713         sleep( 1 );
11714
11715         status = pthread_detach( &t );
11716         if( status ) return errno;
11717 #endif
11718
11719 #ifdef HAVE_LINUX_THREADS
11720         pthread_kill_other_threads_np();
11721 #endif
11722
11723         return 0;
11724
11725 ; return 0; }
11726 EOF
11727 if { (eval echo configure:11728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11728   rm -rf conftest*
11729   ol_cv_pthread_create=yes
11730 else
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -rf conftest*
11734   ol_cv_pthread_create=no
11735 fi
11736 rm -f conftest*
11737 else
11738   cat > conftest.$ac_ext <<EOF
11739 #line 11740 "configure"
11740 #include "confdefs.h"
11741 /* pthread test headers */
11742 #include <pthread.h>
11743 #if HAVE_PTHREADS < 7
11744 #include <errno.h>
11745 #endif
11746 #ifndef NULL
11747 #define NULL (void*)0
11748 #endif
11749
11750 static void *task(p)
11751         void *p;
11752 {
11753         return (void *) (p == NULL);
11754 }
11755
11756
11757 int main(argc, argv)
11758         int argc;
11759         char **argv;
11760 {
11761
11762         /* pthread test function */
11763 #ifndef PTHREAD_CREATE_DETACHED
11764 #define PTHREAD_CREATE_DETACHED 1
11765 #endif
11766         pthread_t t;
11767         int status;
11768         int detach = PTHREAD_CREATE_DETACHED;
11769
11770 #if HAVE_PTHREADS > 4
11771         /* Final pthreads */
11772         pthread_attr_t attr;
11773
11774         status = pthread_attr_init(&attr);
11775         if( status ) return status;
11776
11777 #if HAVE_PTHREADS < 7
11778         status = pthread_attr_setdetachstate(&attr, &detach);
11779         if( status < 0 ) status = errno;
11780 #else
11781         status = pthread_attr_setdetachstate(&attr, detach);
11782 #endif
11783         if( status ) return status;
11784         status = pthread_create( &t, &attr, task, NULL );
11785 #if HAVE_PTHREADS < 7
11786         if( status < 0 ) status = errno;
11787 #endif
11788         if( status ) return status;
11789 #else
11790         /* Draft 4 pthreads */
11791         status = pthread_create( &t, pthread_attr_default, task, NULL );
11792         if( status ) return errno;
11793
11794         /* give thread a chance to complete */
11795         /* it should remain joinable and hence detachable */
11796         sleep( 1 );
11797
11798         status = pthread_detach( &t );
11799         if( status ) return errno;
11800 #endif
11801
11802 #ifdef HAVE_LINUX_THREADS
11803         pthread_kill_other_threads_np();
11804 #endif
11805
11806         return 0;
11807
11808 }
11809
11810 EOF
11811 if { (eval echo configure:11812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11812 then
11813   ol_cv_pthread_create=yes
11814 else
11815   echo "configure: failed program was:" >&5
11816   cat conftest.$ac_ext >&5
11817   rm -fr conftest*
11818   ol_cv_pthread_create=no
11819 fi
11820 rm -fr conftest*
11821 fi
11822
11823 fi
11824
11825 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11826
11827                 if test $ol_cv_pthread_create != no ; then
11828                         ol_link_threads=posix
11829                         ol_link_pthreads=""
11830                 fi
11831                 
11832                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11833 if test "$ol_link_threads" = no ; then
11834         # try -kthread
11835         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11836 echo "configure:11837: checking for pthread link with -kthread" >&5
11837 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11838   echo $ac_n "(cached) $ac_c" 1>&6
11839 else
11840   
11841                 # save the flags
11842                 ol_LIBS="$LIBS"
11843                 LIBS="-kthread $LIBS"
11844
11845                 if test "$cross_compiling" = yes; then
11846   cat > conftest.$ac_ext <<EOF
11847 #line 11848 "configure"
11848 #include "confdefs.h"
11849 /* pthread test headers */
11850 #include <pthread.h>
11851 #if HAVE_PTHREADS < 7
11852 #include <errno.h>
11853 #endif
11854 #ifndef NULL
11855 #define NULL (void*)0
11856 #endif
11857
11858 static void *task(p)
11859         void *p;
11860 {
11861         return (void *) (p == NULL);
11862 }
11863
11864 int main() {
11865
11866         /* pthread test function */
11867 #ifndef PTHREAD_CREATE_DETACHED
11868 #define PTHREAD_CREATE_DETACHED 1
11869 #endif
11870         pthread_t t;
11871         int status;
11872         int detach = PTHREAD_CREATE_DETACHED;
11873
11874 #if HAVE_PTHREADS > 4
11875         /* Final pthreads */
11876         pthread_attr_t attr;
11877
11878         status = pthread_attr_init(&attr);
11879         if( status ) return status;
11880
11881 #if HAVE_PTHREADS < 7
11882         status = pthread_attr_setdetachstate(&attr, &detach);
11883         if( status < 0 ) status = errno;
11884 #else
11885         status = pthread_attr_setdetachstate(&attr, detach);
11886 #endif
11887         if( status ) return status;
11888         status = pthread_create( &t, &attr, task, NULL );
11889 #if HAVE_PTHREADS < 7
11890         if( status < 0 ) status = errno;
11891 #endif
11892         if( status ) return status;
11893 #else
11894         /* Draft 4 pthreads */
11895         status = pthread_create( &t, pthread_attr_default, task, NULL );
11896         if( status ) return errno;
11897
11898         /* give thread a chance to complete */
11899         /* it should remain joinable and hence detachable */
11900         sleep( 1 );
11901
11902         status = pthread_detach( &t );
11903         if( status ) return errno;
11904 #endif
11905
11906 #ifdef HAVE_LINUX_THREADS
11907         pthread_kill_other_threads_np();
11908 #endif
11909
11910         return 0;
11911
11912 ; return 0; }
11913 EOF
11914 if { (eval echo configure:11915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11915   rm -rf conftest*
11916   ol_cv_pthread_kthread=yes
11917 else
11918   echo "configure: failed program was:" >&5
11919   cat conftest.$ac_ext >&5
11920   rm -rf conftest*
11921   ol_cv_pthread_kthread=no
11922 fi
11923 rm -f conftest*
11924 else
11925   cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 /* pthread test headers */
11929 #include <pthread.h>
11930 #if HAVE_PTHREADS < 7
11931 #include <errno.h>
11932 #endif
11933 #ifndef NULL
11934 #define NULL (void*)0
11935 #endif
11936
11937 static void *task(p)
11938         void *p;
11939 {
11940         return (void *) (p == NULL);
11941 }
11942
11943
11944 int main(argc, argv)
11945         int argc;
11946         char **argv;
11947 {
11948
11949         /* pthread test function */
11950 #ifndef PTHREAD_CREATE_DETACHED
11951 #define PTHREAD_CREATE_DETACHED 1
11952 #endif
11953         pthread_t t;
11954         int status;
11955         int detach = PTHREAD_CREATE_DETACHED;
11956
11957 #if HAVE_PTHREADS > 4
11958         /* Final pthreads */
11959         pthread_attr_t attr;
11960
11961         status = pthread_attr_init(&attr);
11962         if( status ) return status;
11963
11964 #if HAVE_PTHREADS < 7
11965         status = pthread_attr_setdetachstate(&attr, &detach);
11966         if( status < 0 ) status = errno;
11967 #else
11968         status = pthread_attr_setdetachstate(&attr, detach);
11969 #endif
11970         if( status ) return status;
11971         status = pthread_create( &t, &attr, task, NULL );
11972 #if HAVE_PTHREADS < 7
11973         if( status < 0 ) status = errno;
11974 #endif
11975         if( status ) return status;
11976 #else
11977         /* Draft 4 pthreads */
11978         status = pthread_create( &t, pthread_attr_default, task, NULL );
11979         if( status ) return errno;
11980
11981         /* give thread a chance to complete */
11982         /* it should remain joinable and hence detachable */
11983         sleep( 1 );
11984
11985         status = pthread_detach( &t );
11986         if( status ) return errno;
11987 #endif
11988
11989 #ifdef HAVE_LINUX_THREADS
11990         pthread_kill_other_threads_np();
11991 #endif
11992
11993         return 0;
11994
11995 }
11996
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11999 then
12000   ol_cv_pthread_kthread=yes
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -fr conftest*
12005   ol_cv_pthread_kthread=no
12006 fi
12007 rm -fr conftest*
12008 fi
12009
12010
12011                 # restore the LIBS
12012                 LIBS="$ol_LIBS"
12013         
12014 fi
12015
12016 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12017
12018         if test $ol_cv_pthread_kthread = yes ; then
12019                 ol_link_pthreads="-kthread"
12020                 ol_link_threads=posix
12021         fi
12022 fi
12023
12024                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12025 if test "$ol_link_threads" = no ; then
12026         # try -pthread
12027         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12028 echo "configure:12029: checking for pthread link with -pthread" >&5
12029 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12030   echo $ac_n "(cached) $ac_c" 1>&6
12031 else
12032   
12033                 # save the flags
12034                 ol_LIBS="$LIBS"
12035                 LIBS="-pthread $LIBS"
12036
12037                 if test "$cross_compiling" = yes; then
12038   cat > conftest.$ac_ext <<EOF
12039 #line 12040 "configure"
12040 #include "confdefs.h"
12041 /* pthread test headers */
12042 #include <pthread.h>
12043 #if HAVE_PTHREADS < 7
12044 #include <errno.h>
12045 #endif
12046 #ifndef NULL
12047 #define NULL (void*)0
12048 #endif
12049
12050 static void *task(p)
12051         void *p;
12052 {
12053         return (void *) (p == NULL);
12054 }
12055
12056 int main() {
12057
12058         /* pthread test function */
12059 #ifndef PTHREAD_CREATE_DETACHED
12060 #define PTHREAD_CREATE_DETACHED 1
12061 #endif
12062         pthread_t t;
12063         int status;
12064         int detach = PTHREAD_CREATE_DETACHED;
12065
12066 #if HAVE_PTHREADS > 4
12067         /* Final pthreads */
12068         pthread_attr_t attr;
12069
12070         status = pthread_attr_init(&attr);
12071         if( status ) return status;
12072
12073 #if HAVE_PTHREADS < 7
12074         status = pthread_attr_setdetachstate(&attr, &detach);
12075         if( status < 0 ) status = errno;
12076 #else
12077         status = pthread_attr_setdetachstate(&attr, detach);
12078 #endif
12079         if( status ) return status;
12080         status = pthread_create( &t, &attr, task, NULL );
12081 #if HAVE_PTHREADS < 7
12082         if( status < 0 ) status = errno;
12083 #endif
12084         if( status ) return status;
12085 #else
12086         /* Draft 4 pthreads */
12087         status = pthread_create( &t, pthread_attr_default, task, NULL );
12088         if( status ) return errno;
12089
12090         /* give thread a chance to complete */
12091         /* it should remain joinable and hence detachable */
12092         sleep( 1 );
12093
12094         status = pthread_detach( &t );
12095         if( status ) return errno;
12096 #endif
12097
12098 #ifdef HAVE_LINUX_THREADS
12099         pthread_kill_other_threads_np();
12100 #endif
12101
12102         return 0;
12103
12104 ; return 0; }
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12107   rm -rf conftest*
12108   ol_cv_pthread_pthread=yes
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -rf conftest*
12113   ol_cv_pthread_pthread=no
12114 fi
12115 rm -f conftest*
12116 else
12117   cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 /* pthread test headers */
12121 #include <pthread.h>
12122 #if HAVE_PTHREADS < 7
12123 #include <errno.h>
12124 #endif
12125 #ifndef NULL
12126 #define NULL (void*)0
12127 #endif
12128
12129 static void *task(p)
12130         void *p;
12131 {
12132         return (void *) (p == NULL);
12133 }
12134
12135
12136 int main(argc, argv)
12137         int argc;
12138         char **argv;
12139 {
12140
12141         /* pthread test function */
12142 #ifndef PTHREAD_CREATE_DETACHED
12143 #define PTHREAD_CREATE_DETACHED 1
12144 #endif
12145         pthread_t t;
12146         int status;
12147         int detach = PTHREAD_CREATE_DETACHED;
12148
12149 #if HAVE_PTHREADS > 4
12150         /* Final pthreads */
12151         pthread_attr_t attr;
12152
12153         status = pthread_attr_init(&attr);
12154         if( status ) return status;
12155
12156 #if HAVE_PTHREADS < 7
12157         status = pthread_attr_setdetachstate(&attr, &detach);
12158         if( status < 0 ) status = errno;
12159 #else
12160         status = pthread_attr_setdetachstate(&attr, detach);
12161 #endif
12162         if( status ) return status;
12163         status = pthread_create( &t, &attr, task, NULL );
12164 #if HAVE_PTHREADS < 7
12165         if( status < 0 ) status = errno;
12166 #endif
12167         if( status ) return status;
12168 #else
12169         /* Draft 4 pthreads */
12170         status = pthread_create( &t, pthread_attr_default, task, NULL );
12171         if( status ) return errno;
12172
12173         /* give thread a chance to complete */
12174         /* it should remain joinable and hence detachable */
12175         sleep( 1 );
12176
12177         status = pthread_detach( &t );
12178         if( status ) return errno;
12179 #endif
12180
12181 #ifdef HAVE_LINUX_THREADS
12182         pthread_kill_other_threads_np();
12183 #endif
12184
12185         return 0;
12186
12187 }
12188
12189 EOF
12190 if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12191 then
12192   ol_cv_pthread_pthread=yes
12193 else
12194   echo "configure: failed program was:" >&5
12195   cat conftest.$ac_ext >&5
12196   rm -fr conftest*
12197   ol_cv_pthread_pthread=no
12198 fi
12199 rm -fr conftest*
12200 fi
12201
12202
12203                 # restore the LIBS
12204                 LIBS="$ol_LIBS"
12205         
12206 fi
12207
12208 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12209
12210         if test $ol_cv_pthread_pthread = yes ; then
12211                 ol_link_pthreads="-pthread"
12212                 ol_link_threads=posix
12213         fi
12214 fi
12215
12216                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12217 if test "$ol_link_threads" = no ; then
12218         # try -pthreads
12219         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12220 echo "configure:12221: checking for pthread link with -pthreads" >&5
12221 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12222   echo $ac_n "(cached) $ac_c" 1>&6
12223 else
12224   
12225                 # save the flags
12226                 ol_LIBS="$LIBS"
12227                 LIBS="-pthreads $LIBS"
12228
12229                 if test "$cross_compiling" = yes; then
12230   cat > conftest.$ac_ext <<EOF
12231 #line 12232 "configure"
12232 #include "confdefs.h"
12233 /* pthread test headers */
12234 #include <pthread.h>
12235 #if HAVE_PTHREADS < 7
12236 #include <errno.h>
12237 #endif
12238 #ifndef NULL
12239 #define NULL (void*)0
12240 #endif
12241
12242 static void *task(p)
12243         void *p;
12244 {
12245         return (void *) (p == NULL);
12246 }
12247
12248 int main() {
12249
12250         /* pthread test function */
12251 #ifndef PTHREAD_CREATE_DETACHED
12252 #define PTHREAD_CREATE_DETACHED 1
12253 #endif
12254         pthread_t t;
12255         int status;
12256         int detach = PTHREAD_CREATE_DETACHED;
12257
12258 #if HAVE_PTHREADS > 4
12259         /* Final pthreads */
12260         pthread_attr_t attr;
12261
12262         status = pthread_attr_init(&attr);
12263         if( status ) return status;
12264
12265 #if HAVE_PTHREADS < 7
12266         status = pthread_attr_setdetachstate(&attr, &detach);
12267         if( status < 0 ) status = errno;
12268 #else
12269         status = pthread_attr_setdetachstate(&attr, detach);
12270 #endif
12271         if( status ) return status;
12272         status = pthread_create( &t, &attr, task, NULL );
12273 #if HAVE_PTHREADS < 7
12274         if( status < 0 ) status = errno;
12275 #endif
12276         if( status ) return status;
12277 #else
12278         /* Draft 4 pthreads */
12279         status = pthread_create( &t, pthread_attr_default, task, NULL );
12280         if( status ) return errno;
12281
12282         /* give thread a chance to complete */
12283         /* it should remain joinable and hence detachable */
12284         sleep( 1 );
12285
12286         status = pthread_detach( &t );
12287         if( status ) return errno;
12288 #endif
12289
12290 #ifdef HAVE_LINUX_THREADS
12291         pthread_kill_other_threads_np();
12292 #endif
12293
12294         return 0;
12295
12296 ; return 0; }
12297 EOF
12298 if { (eval echo configure:12299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12299   rm -rf conftest*
12300   ol_cv_pthread_pthreads=yes
12301 else
12302   echo "configure: failed program was:" >&5
12303   cat conftest.$ac_ext >&5
12304   rm -rf conftest*
12305   ol_cv_pthread_pthreads=no
12306 fi
12307 rm -f conftest*
12308 else
12309   cat > conftest.$ac_ext <<EOF
12310 #line 12311 "configure"
12311 #include "confdefs.h"
12312 /* pthread test headers */
12313 #include <pthread.h>
12314 #if HAVE_PTHREADS < 7
12315 #include <errno.h>
12316 #endif
12317 #ifndef NULL
12318 #define NULL (void*)0
12319 #endif
12320
12321 static void *task(p)
12322         void *p;
12323 {
12324         return (void *) (p == NULL);
12325 }
12326
12327
12328 int main(argc, argv)
12329         int argc;
12330         char **argv;
12331 {
12332
12333         /* pthread test function */
12334 #ifndef PTHREAD_CREATE_DETACHED
12335 #define PTHREAD_CREATE_DETACHED 1
12336 #endif
12337         pthread_t t;
12338         int status;
12339         int detach = PTHREAD_CREATE_DETACHED;
12340
12341 #if HAVE_PTHREADS > 4
12342         /* Final pthreads */
12343         pthread_attr_t attr;
12344
12345         status = pthread_attr_init(&attr);
12346         if( status ) return status;
12347
12348 #if HAVE_PTHREADS < 7
12349         status = pthread_attr_setdetachstate(&attr, &detach);
12350         if( status < 0 ) status = errno;
12351 #else
12352         status = pthread_attr_setdetachstate(&attr, detach);
12353 #endif
12354         if( status ) return status;
12355         status = pthread_create( &t, &attr, task, NULL );
12356 #if HAVE_PTHREADS < 7
12357         if( status < 0 ) status = errno;
12358 #endif
12359         if( status ) return status;
12360 #else
12361         /* Draft 4 pthreads */
12362         status = pthread_create( &t, pthread_attr_default, task, NULL );
12363         if( status ) return errno;
12364
12365         /* give thread a chance to complete */
12366         /* it should remain joinable and hence detachable */
12367         sleep( 1 );
12368
12369         status = pthread_detach( &t );
12370         if( status ) return errno;
12371 #endif
12372
12373 #ifdef HAVE_LINUX_THREADS
12374         pthread_kill_other_threads_np();
12375 #endif
12376
12377         return 0;
12378
12379 }
12380
12381 EOF
12382 if { (eval echo configure:12383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12383 then
12384   ol_cv_pthread_pthreads=yes
12385 else
12386   echo "configure: failed program was:" >&5
12387   cat conftest.$ac_ext >&5
12388   rm -fr conftest*
12389   ol_cv_pthread_pthreads=no
12390 fi
12391 rm -fr conftest*
12392 fi
12393
12394
12395                 # restore the LIBS
12396                 LIBS="$ol_LIBS"
12397         
12398 fi
12399
12400 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12401
12402         if test $ol_cv_pthread_pthreads = yes ; then
12403                 ol_link_pthreads="-pthreads"
12404                 ol_link_threads=posix
12405         fi
12406 fi
12407
12408                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12409 if test "$ol_link_threads" = no ; then
12410         # try -mthreads
12411         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12412 echo "configure:12413: checking for pthread link with -mthreads" >&5
12413 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12414   echo $ac_n "(cached) $ac_c" 1>&6
12415 else
12416   
12417                 # save the flags
12418                 ol_LIBS="$LIBS"
12419                 LIBS="-mthreads $LIBS"
12420
12421                 if test "$cross_compiling" = yes; then
12422   cat > conftest.$ac_ext <<EOF
12423 #line 12424 "configure"
12424 #include "confdefs.h"
12425 /* pthread test headers */
12426 #include <pthread.h>
12427 #if HAVE_PTHREADS < 7
12428 #include <errno.h>
12429 #endif
12430 #ifndef NULL
12431 #define NULL (void*)0
12432 #endif
12433
12434 static void *task(p)
12435         void *p;
12436 {
12437         return (void *) (p == NULL);
12438 }
12439
12440 int main() {
12441
12442         /* pthread test function */
12443 #ifndef PTHREAD_CREATE_DETACHED
12444 #define PTHREAD_CREATE_DETACHED 1
12445 #endif
12446         pthread_t t;
12447         int status;
12448         int detach = PTHREAD_CREATE_DETACHED;
12449
12450 #if HAVE_PTHREADS > 4
12451         /* Final pthreads */
12452         pthread_attr_t attr;
12453
12454         status = pthread_attr_init(&attr);
12455         if( status ) return status;
12456
12457 #if HAVE_PTHREADS < 7
12458         status = pthread_attr_setdetachstate(&attr, &detach);
12459         if( status < 0 ) status = errno;
12460 #else
12461         status = pthread_attr_setdetachstate(&attr, detach);
12462 #endif
12463         if( status ) return status;
12464         status = pthread_create( &t, &attr, task, NULL );
12465 #if HAVE_PTHREADS < 7
12466         if( status < 0 ) status = errno;
12467 #endif
12468         if( status ) return status;
12469 #else
12470         /* Draft 4 pthreads */
12471         status = pthread_create( &t, pthread_attr_default, task, NULL );
12472         if( status ) return errno;
12473
12474         /* give thread a chance to complete */
12475         /* it should remain joinable and hence detachable */
12476         sleep( 1 );
12477
12478         status = pthread_detach( &t );
12479         if( status ) return errno;
12480 #endif
12481
12482 #ifdef HAVE_LINUX_THREADS
12483         pthread_kill_other_threads_np();
12484 #endif
12485
12486         return 0;
12487
12488 ; return 0; }
12489 EOF
12490 if { (eval echo configure:12491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12491   rm -rf conftest*
12492   ol_cv_pthread_mthreads=yes
12493 else
12494   echo "configure: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   rm -rf conftest*
12497   ol_cv_pthread_mthreads=no
12498 fi
12499 rm -f conftest*
12500 else
12501   cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504 /* pthread test headers */
12505 #include <pthread.h>
12506 #if HAVE_PTHREADS < 7
12507 #include <errno.h>
12508 #endif
12509 #ifndef NULL
12510 #define NULL (void*)0
12511 #endif
12512
12513 static void *task(p)
12514         void *p;
12515 {
12516         return (void *) (p == NULL);
12517 }
12518
12519
12520 int main(argc, argv)
12521         int argc;
12522         char **argv;
12523 {
12524
12525         /* pthread test function */
12526 #ifndef PTHREAD_CREATE_DETACHED
12527 #define PTHREAD_CREATE_DETACHED 1
12528 #endif
12529         pthread_t t;
12530         int status;
12531         int detach = PTHREAD_CREATE_DETACHED;
12532
12533 #if HAVE_PTHREADS > 4
12534         /* Final pthreads */
12535         pthread_attr_t attr;
12536
12537         status = pthread_attr_init(&attr);
12538         if( status ) return status;
12539
12540 #if HAVE_PTHREADS < 7
12541         status = pthread_attr_setdetachstate(&attr, &detach);
12542         if( status < 0 ) status = errno;
12543 #else
12544         status = pthread_attr_setdetachstate(&attr, detach);
12545 #endif
12546         if( status ) return status;
12547         status = pthread_create( &t, &attr, task, NULL );
12548 #if HAVE_PTHREADS < 7
12549         if( status < 0 ) status = errno;
12550 #endif
12551         if( status ) return status;
12552 #else
12553         /* Draft 4 pthreads */
12554         status = pthread_create( &t, pthread_attr_default, task, NULL );
12555         if( status ) return errno;
12556
12557         /* give thread a chance to complete */
12558         /* it should remain joinable and hence detachable */
12559         sleep( 1 );
12560
12561         status = pthread_detach( &t );
12562         if( status ) return errno;
12563 #endif
12564
12565 #ifdef HAVE_LINUX_THREADS
12566         pthread_kill_other_threads_np();
12567 #endif
12568
12569         return 0;
12570
12571 }
12572
12573 EOF
12574 if { (eval echo configure:12575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12575 then
12576   ol_cv_pthread_mthreads=yes
12577 else
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -fr conftest*
12581   ol_cv_pthread_mthreads=no
12582 fi
12583 rm -fr conftest*
12584 fi
12585
12586
12587                 # restore the LIBS
12588                 LIBS="$ol_LIBS"
12589         
12590 fi
12591
12592 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12593
12594         if test $ol_cv_pthread_mthreads = yes ; then
12595                 ol_link_pthreads="-mthreads"
12596                 ol_link_threads=posix
12597         fi
12598 fi
12599
12600                 # Pthread try link: -thread (ol_cv_pthread_thread)
12601 if test "$ol_link_threads" = no ; then
12602         # try -thread
12603         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12604 echo "configure:12605: checking for pthread link with -thread" >&5
12605 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12606   echo $ac_n "(cached) $ac_c" 1>&6
12607 else
12608   
12609                 # save the flags
12610                 ol_LIBS="$LIBS"
12611                 LIBS="-thread $LIBS"
12612
12613                 if test "$cross_compiling" = yes; then
12614   cat > conftest.$ac_ext <<EOF
12615 #line 12616 "configure"
12616 #include "confdefs.h"
12617 /* pthread test headers */
12618 #include <pthread.h>
12619 #if HAVE_PTHREADS < 7
12620 #include <errno.h>
12621 #endif
12622 #ifndef NULL
12623 #define NULL (void*)0
12624 #endif
12625
12626 static void *task(p)
12627         void *p;
12628 {
12629         return (void *) (p == NULL);
12630 }
12631
12632 int main() {
12633
12634         /* pthread test function */
12635 #ifndef PTHREAD_CREATE_DETACHED
12636 #define PTHREAD_CREATE_DETACHED 1
12637 #endif
12638         pthread_t t;
12639         int status;
12640         int detach = PTHREAD_CREATE_DETACHED;
12641
12642 #if HAVE_PTHREADS > 4
12643         /* Final pthreads */
12644         pthread_attr_t attr;
12645
12646         status = pthread_attr_init(&attr);
12647         if( status ) return status;
12648
12649 #if HAVE_PTHREADS < 7
12650         status = pthread_attr_setdetachstate(&attr, &detach);
12651         if( status < 0 ) status = errno;
12652 #else
12653         status = pthread_attr_setdetachstate(&attr, detach);
12654 #endif
12655         if( status ) return status;
12656         status = pthread_create( &t, &attr, task, NULL );
12657 #if HAVE_PTHREADS < 7
12658         if( status < 0 ) status = errno;
12659 #endif
12660         if( status ) return status;
12661 #else
12662         /* Draft 4 pthreads */
12663         status = pthread_create( &t, pthread_attr_default, task, NULL );
12664         if( status ) return errno;
12665
12666         /* give thread a chance to complete */
12667         /* it should remain joinable and hence detachable */
12668         sleep( 1 );
12669
12670         status = pthread_detach( &t );
12671         if( status ) return errno;
12672 #endif
12673
12674 #ifdef HAVE_LINUX_THREADS
12675         pthread_kill_other_threads_np();
12676 #endif
12677
12678         return 0;
12679
12680 ; return 0; }
12681 EOF
12682 if { (eval echo configure:12683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12683   rm -rf conftest*
12684   ol_cv_pthread_thread=yes
12685 else
12686   echo "configure: failed program was:" >&5
12687   cat conftest.$ac_ext >&5
12688   rm -rf conftest*
12689   ol_cv_pthread_thread=no
12690 fi
12691 rm -f conftest*
12692 else
12693   cat > conftest.$ac_ext <<EOF
12694 #line 12695 "configure"
12695 #include "confdefs.h"
12696 /* pthread test headers */
12697 #include <pthread.h>
12698 #if HAVE_PTHREADS < 7
12699 #include <errno.h>
12700 #endif
12701 #ifndef NULL
12702 #define NULL (void*)0
12703 #endif
12704
12705 static void *task(p)
12706         void *p;
12707 {
12708         return (void *) (p == NULL);
12709 }
12710
12711
12712 int main(argc, argv)
12713         int argc;
12714         char **argv;
12715 {
12716
12717         /* pthread test function */
12718 #ifndef PTHREAD_CREATE_DETACHED
12719 #define PTHREAD_CREATE_DETACHED 1
12720 #endif
12721         pthread_t t;
12722         int status;
12723         int detach = PTHREAD_CREATE_DETACHED;
12724
12725 #if HAVE_PTHREADS > 4
12726         /* Final pthreads */
12727         pthread_attr_t attr;
12728
12729         status = pthread_attr_init(&attr);
12730         if( status ) return status;
12731
12732 #if HAVE_PTHREADS < 7
12733         status = pthread_attr_setdetachstate(&attr, &detach);
12734         if( status < 0 ) status = errno;
12735 #else
12736         status = pthread_attr_setdetachstate(&attr, detach);
12737 #endif
12738         if( status ) return status;
12739         status = pthread_create( &t, &attr, task, NULL );
12740 #if HAVE_PTHREADS < 7
12741         if( status < 0 ) status = errno;
12742 #endif
12743         if( status ) return status;
12744 #else
12745         /* Draft 4 pthreads */
12746         status = pthread_create( &t, pthread_attr_default, task, NULL );
12747         if( status ) return errno;
12748
12749         /* give thread a chance to complete */
12750         /* it should remain joinable and hence detachable */
12751         sleep( 1 );
12752
12753         status = pthread_detach( &t );
12754         if( status ) return errno;
12755 #endif
12756
12757 #ifdef HAVE_LINUX_THREADS
12758         pthread_kill_other_threads_np();
12759 #endif
12760
12761         return 0;
12762
12763 }
12764
12765 EOF
12766 if { (eval echo configure:12767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12767 then
12768   ol_cv_pthread_thread=yes
12769 else
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -fr conftest*
12773   ol_cv_pthread_thread=no
12774 fi
12775 rm -fr conftest*
12776 fi
12777
12778
12779                 # restore the LIBS
12780                 LIBS="$ol_LIBS"
12781         
12782 fi
12783
12784 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12785
12786         if test $ol_cv_pthread_thread = yes ; then
12787                 ol_link_pthreads="-thread"
12788                 ol_link_threads=posix
12789         fi
12790 fi
12791
12792
12793                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12794 if test "$ol_link_threads" = no ; then
12795         # try -lpthread -lmach -lexc -lc_r
12796         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12797 echo "configure:12798: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12798 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12799   echo $ac_n "(cached) $ac_c" 1>&6
12800 else
12801   
12802                 # save the flags
12803                 ol_LIBS="$LIBS"
12804                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12805
12806                 if test "$cross_compiling" = yes; then
12807   cat > conftest.$ac_ext <<EOF
12808 #line 12809 "configure"
12809 #include "confdefs.h"
12810 /* pthread test headers */
12811 #include <pthread.h>
12812 #if HAVE_PTHREADS < 7
12813 #include <errno.h>
12814 #endif
12815 #ifndef NULL
12816 #define NULL (void*)0
12817 #endif
12818
12819 static void *task(p)
12820         void *p;
12821 {
12822         return (void *) (p == NULL);
12823 }
12824
12825 int main() {
12826
12827         /* pthread test function */
12828 #ifndef PTHREAD_CREATE_DETACHED
12829 #define PTHREAD_CREATE_DETACHED 1
12830 #endif
12831         pthread_t t;
12832         int status;
12833         int detach = PTHREAD_CREATE_DETACHED;
12834
12835 #if HAVE_PTHREADS > 4
12836         /* Final pthreads */
12837         pthread_attr_t attr;
12838
12839         status = pthread_attr_init(&attr);
12840         if( status ) return status;
12841
12842 #if HAVE_PTHREADS < 7
12843         status = pthread_attr_setdetachstate(&attr, &detach);
12844         if( status < 0 ) status = errno;
12845 #else
12846         status = pthread_attr_setdetachstate(&attr, detach);
12847 #endif
12848         if( status ) return status;
12849         status = pthread_create( &t, &attr, task, NULL );
12850 #if HAVE_PTHREADS < 7
12851         if( status < 0 ) status = errno;
12852 #endif
12853         if( status ) return status;
12854 #else
12855         /* Draft 4 pthreads */
12856         status = pthread_create( &t, pthread_attr_default, task, NULL );
12857         if( status ) return errno;
12858
12859         /* give thread a chance to complete */
12860         /* it should remain joinable and hence detachable */
12861         sleep( 1 );
12862
12863         status = pthread_detach( &t );
12864         if( status ) return errno;
12865 #endif
12866
12867 #ifdef HAVE_LINUX_THREADS
12868         pthread_kill_other_threads_np();
12869 #endif
12870
12871         return 0;
12872
12873 ; return 0; }
12874 EOF
12875 if { (eval echo configure:12876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12876   rm -rf conftest*
12877   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12878 else
12879   echo "configure: failed program was:" >&5
12880   cat conftest.$ac_ext >&5
12881   rm -rf conftest*
12882   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12883 fi
12884 rm -f conftest*
12885 else
12886   cat > conftest.$ac_ext <<EOF
12887 #line 12888 "configure"
12888 #include "confdefs.h"
12889 /* pthread test headers */
12890 #include <pthread.h>
12891 #if HAVE_PTHREADS < 7
12892 #include <errno.h>
12893 #endif
12894 #ifndef NULL
12895 #define NULL (void*)0
12896 #endif
12897
12898 static void *task(p)
12899         void *p;
12900 {
12901         return (void *) (p == NULL);
12902 }
12903
12904
12905 int main(argc, argv)
12906         int argc;
12907         char **argv;
12908 {
12909
12910         /* pthread test function */
12911 #ifndef PTHREAD_CREATE_DETACHED
12912 #define PTHREAD_CREATE_DETACHED 1
12913 #endif
12914         pthread_t t;
12915         int status;
12916         int detach = PTHREAD_CREATE_DETACHED;
12917
12918 #if HAVE_PTHREADS > 4
12919         /* Final pthreads */
12920         pthread_attr_t attr;
12921
12922         status = pthread_attr_init(&attr);
12923         if( status ) return status;
12924
12925 #if HAVE_PTHREADS < 7
12926         status = pthread_attr_setdetachstate(&attr, &detach);
12927         if( status < 0 ) status = errno;
12928 #else
12929         status = pthread_attr_setdetachstate(&attr, detach);
12930 #endif
12931         if( status ) return status;
12932         status = pthread_create( &t, &attr, task, NULL );
12933 #if HAVE_PTHREADS < 7
12934         if( status < 0 ) status = errno;
12935 #endif
12936         if( status ) return status;
12937 #else
12938         /* Draft 4 pthreads */
12939         status = pthread_create( &t, pthread_attr_default, task, NULL );
12940         if( status ) return errno;
12941
12942         /* give thread a chance to complete */
12943         /* it should remain joinable and hence detachable */
12944         sleep( 1 );
12945
12946         status = pthread_detach( &t );
12947         if( status ) return errno;
12948 #endif
12949
12950 #ifdef HAVE_LINUX_THREADS
12951         pthread_kill_other_threads_np();
12952 #endif
12953
12954         return 0;
12955
12956 }
12957
12958 EOF
12959 if { (eval echo configure:12960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12960 then
12961   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12962 else
12963   echo "configure: failed program was:" >&5
12964   cat conftest.$ac_ext >&5
12965   rm -fr conftest*
12966   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12967 fi
12968 rm -fr conftest*
12969 fi
12970
12971
12972                 # restore the LIBS
12973                 LIBS="$ol_LIBS"
12974         
12975 fi
12976
12977 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12978
12979         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12980                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12981                 ol_link_threads=posix
12982         fi
12983 fi
12984
12985                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12986 if test "$ol_link_threads" = no ; then
12987         # try -lpthread -lmach -lexc
12988         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12989 echo "configure:12990: checking for pthread link with -lpthread -lmach -lexc" >&5
12990 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12991   echo $ac_n "(cached) $ac_c" 1>&6
12992 else
12993   
12994                 # save the flags
12995                 ol_LIBS="$LIBS"
12996                 LIBS="-lpthread -lmach -lexc $LIBS"
12997
12998                 if test "$cross_compiling" = yes; then
12999   cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002 /* pthread test headers */
13003 #include <pthread.h>
13004 #if HAVE_PTHREADS < 7
13005 #include <errno.h>
13006 #endif
13007 #ifndef NULL
13008 #define NULL (void*)0
13009 #endif
13010
13011 static void *task(p)
13012         void *p;
13013 {
13014         return (void *) (p == NULL);
13015 }
13016
13017 int main() {
13018
13019         /* pthread test function */
13020 #ifndef PTHREAD_CREATE_DETACHED
13021 #define PTHREAD_CREATE_DETACHED 1
13022 #endif
13023         pthread_t t;
13024         int status;
13025         int detach = PTHREAD_CREATE_DETACHED;
13026
13027 #if HAVE_PTHREADS > 4
13028         /* Final pthreads */
13029         pthread_attr_t attr;
13030
13031         status = pthread_attr_init(&attr);
13032         if( status ) return status;
13033
13034 #if HAVE_PTHREADS < 7
13035         status = pthread_attr_setdetachstate(&attr, &detach);
13036         if( status < 0 ) status = errno;
13037 #else
13038         status = pthread_attr_setdetachstate(&attr, detach);
13039 #endif
13040         if( status ) return status;
13041         status = pthread_create( &t, &attr, task, NULL );
13042 #if HAVE_PTHREADS < 7
13043         if( status < 0 ) status = errno;
13044 #endif
13045         if( status ) return status;
13046 #else
13047         /* Draft 4 pthreads */
13048         status = pthread_create( &t, pthread_attr_default, task, NULL );
13049         if( status ) return errno;
13050
13051         /* give thread a chance to complete */
13052         /* it should remain joinable and hence detachable */
13053         sleep( 1 );
13054
13055         status = pthread_detach( &t );
13056         if( status ) return errno;
13057 #endif
13058
13059 #ifdef HAVE_LINUX_THREADS
13060         pthread_kill_other_threads_np();
13061 #endif
13062
13063         return 0;
13064
13065 ; return 0; }
13066 EOF
13067 if { (eval echo configure:13068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13068   rm -rf conftest*
13069   ol_cv_pthread_lpthread_lmach_lexc=yes
13070 else
13071   echo "configure: failed program was:" >&5
13072   cat conftest.$ac_ext >&5
13073   rm -rf conftest*
13074   ol_cv_pthread_lpthread_lmach_lexc=no
13075 fi
13076 rm -f conftest*
13077 else
13078   cat > conftest.$ac_ext <<EOF
13079 #line 13080 "configure"
13080 #include "confdefs.h"
13081 /* pthread test headers */
13082 #include <pthread.h>
13083 #if HAVE_PTHREADS < 7
13084 #include <errno.h>
13085 #endif
13086 #ifndef NULL
13087 #define NULL (void*)0
13088 #endif
13089
13090 static void *task(p)
13091         void *p;
13092 {
13093         return (void *) (p == NULL);
13094 }
13095
13096
13097 int main(argc, argv)
13098         int argc;
13099         char **argv;
13100 {
13101
13102         /* pthread test function */
13103 #ifndef PTHREAD_CREATE_DETACHED
13104 #define PTHREAD_CREATE_DETACHED 1
13105 #endif
13106         pthread_t t;
13107         int status;
13108         int detach = PTHREAD_CREATE_DETACHED;
13109
13110 #if HAVE_PTHREADS > 4
13111         /* Final pthreads */
13112         pthread_attr_t attr;
13113
13114         status = pthread_attr_init(&attr);
13115         if( status ) return status;
13116
13117 #if HAVE_PTHREADS < 7
13118         status = pthread_attr_setdetachstate(&attr, &detach);
13119         if( status < 0 ) status = errno;
13120 #else
13121         status = pthread_attr_setdetachstate(&attr, detach);
13122 #endif
13123         if( status ) return status;
13124         status = pthread_create( &t, &attr, task, NULL );
13125 #if HAVE_PTHREADS < 7
13126         if( status < 0 ) status = errno;
13127 #endif
13128         if( status ) return status;
13129 #else
13130         /* Draft 4 pthreads */
13131         status = pthread_create( &t, pthread_attr_default, task, NULL );
13132         if( status ) return errno;
13133
13134         /* give thread a chance to complete */
13135         /* it should remain joinable and hence detachable */
13136         sleep( 1 );
13137
13138         status = pthread_detach( &t );
13139         if( status ) return errno;
13140 #endif
13141
13142 #ifdef HAVE_LINUX_THREADS
13143         pthread_kill_other_threads_np();
13144 #endif
13145
13146         return 0;
13147
13148 }
13149
13150 EOF
13151 if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13152 then
13153   ol_cv_pthread_lpthread_lmach_lexc=yes
13154 else
13155   echo "configure: failed program was:" >&5
13156   cat conftest.$ac_ext >&5
13157   rm -fr conftest*
13158   ol_cv_pthread_lpthread_lmach_lexc=no
13159 fi
13160 rm -fr conftest*
13161 fi
13162
13163
13164                 # restore the LIBS
13165                 LIBS="$ol_LIBS"
13166         
13167 fi
13168
13169 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13170
13171         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13172                 ol_link_pthreads="-lpthread -lmach -lexc"
13173                 ol_link_threads=posix
13174         fi
13175 fi
13176
13177
13178                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13179 if test "$ol_link_threads" = no ; then
13180         # try -lpthread -Wl,-woff,85
13181         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13182 echo "configure:13183: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13183 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   
13187                 # save the flags
13188                 ol_LIBS="$LIBS"
13189                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13190
13191                 if test "$cross_compiling" = yes; then
13192   cat > conftest.$ac_ext <<EOF
13193 #line 13194 "configure"
13194 #include "confdefs.h"
13195 /* pthread test headers */
13196 #include <pthread.h>
13197 #if HAVE_PTHREADS < 7
13198 #include <errno.h>
13199 #endif
13200 #ifndef NULL
13201 #define NULL (void*)0
13202 #endif
13203
13204 static void *task(p)
13205         void *p;
13206 {
13207         return (void *) (p == NULL);
13208 }
13209
13210 int main() {
13211
13212         /* pthread test function */
13213 #ifndef PTHREAD_CREATE_DETACHED
13214 #define PTHREAD_CREATE_DETACHED 1
13215 #endif
13216         pthread_t t;
13217         int status;
13218         int detach = PTHREAD_CREATE_DETACHED;
13219
13220 #if HAVE_PTHREADS > 4
13221         /* Final pthreads */
13222         pthread_attr_t attr;
13223
13224         status = pthread_attr_init(&attr);
13225         if( status ) return status;
13226
13227 #if HAVE_PTHREADS < 7
13228         status = pthread_attr_setdetachstate(&attr, &detach);
13229         if( status < 0 ) status = errno;
13230 #else
13231         status = pthread_attr_setdetachstate(&attr, detach);
13232 #endif
13233         if( status ) return status;
13234         status = pthread_create( &t, &attr, task, NULL );
13235 #if HAVE_PTHREADS < 7
13236         if( status < 0 ) status = errno;
13237 #endif
13238         if( status ) return status;
13239 #else
13240         /* Draft 4 pthreads */
13241         status = pthread_create( &t, pthread_attr_default, task, NULL );
13242         if( status ) return errno;
13243
13244         /* give thread a chance to complete */
13245         /* it should remain joinable and hence detachable */
13246         sleep( 1 );
13247
13248         status = pthread_detach( &t );
13249         if( status ) return errno;
13250 #endif
13251
13252 #ifdef HAVE_LINUX_THREADS
13253         pthread_kill_other_threads_np();
13254 #endif
13255
13256         return 0;
13257
13258 ; return 0; }
13259 EOF
13260 if { (eval echo configure:13261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13261   rm -rf conftest*
13262   ol_cv_pthread_lib_lpthread_woff=yes
13263 else
13264   echo "configure: failed program was:" >&5
13265   cat conftest.$ac_ext >&5
13266   rm -rf conftest*
13267   ol_cv_pthread_lib_lpthread_woff=no
13268 fi
13269 rm -f conftest*
13270 else
13271   cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274 /* pthread test headers */
13275 #include <pthread.h>
13276 #if HAVE_PTHREADS < 7
13277 #include <errno.h>
13278 #endif
13279 #ifndef NULL
13280 #define NULL (void*)0
13281 #endif
13282
13283 static void *task(p)
13284         void *p;
13285 {
13286         return (void *) (p == NULL);
13287 }
13288
13289
13290 int main(argc, argv)
13291         int argc;
13292         char **argv;
13293 {
13294
13295         /* pthread test function */
13296 #ifndef PTHREAD_CREATE_DETACHED
13297 #define PTHREAD_CREATE_DETACHED 1
13298 #endif
13299         pthread_t t;
13300         int status;
13301         int detach = PTHREAD_CREATE_DETACHED;
13302
13303 #if HAVE_PTHREADS > 4
13304         /* Final pthreads */
13305         pthread_attr_t attr;
13306
13307         status = pthread_attr_init(&attr);
13308         if( status ) return status;
13309
13310 #if HAVE_PTHREADS < 7
13311         status = pthread_attr_setdetachstate(&attr, &detach);
13312         if( status < 0 ) status = errno;
13313 #else
13314         status = pthread_attr_setdetachstate(&attr, detach);
13315 #endif
13316         if( status ) return status;
13317         status = pthread_create( &t, &attr, task, NULL );
13318 #if HAVE_PTHREADS < 7
13319         if( status < 0 ) status = errno;
13320 #endif
13321         if( status ) return status;
13322 #else
13323         /* Draft 4 pthreads */
13324         status = pthread_create( &t, pthread_attr_default, task, NULL );
13325         if( status ) return errno;
13326
13327         /* give thread a chance to complete */
13328         /* it should remain joinable and hence detachable */
13329         sleep( 1 );
13330
13331         status = pthread_detach( &t );
13332         if( status ) return errno;
13333 #endif
13334
13335 #ifdef HAVE_LINUX_THREADS
13336         pthread_kill_other_threads_np();
13337 #endif
13338
13339         return 0;
13340
13341 }
13342
13343 EOF
13344 if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13345 then
13346   ol_cv_pthread_lib_lpthread_woff=yes
13347 else
13348   echo "configure: failed program was:" >&5
13349   cat conftest.$ac_ext >&5
13350   rm -fr conftest*
13351   ol_cv_pthread_lib_lpthread_woff=no
13352 fi
13353 rm -fr conftest*
13354 fi
13355
13356
13357                 # restore the LIBS
13358                 LIBS="$ol_LIBS"
13359         
13360 fi
13361
13362 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13363
13364         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13365                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13366                 ol_link_threads=posix
13367         fi
13368 fi
13369
13370
13371                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13372 if test "$ol_link_threads" = no ; then
13373         # try -lpthread
13374         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13375 echo "configure:13376: checking for pthread link with -lpthread" >&5
13376 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13377   echo $ac_n "(cached) $ac_c" 1>&6
13378 else
13379   
13380                 # save the flags
13381                 ol_LIBS="$LIBS"
13382                 LIBS="-lpthread $LIBS"
13383
13384                 if test "$cross_compiling" = yes; then
13385   cat > conftest.$ac_ext <<EOF
13386 #line 13387 "configure"
13387 #include "confdefs.h"
13388 /* pthread test headers */
13389 #include <pthread.h>
13390 #if HAVE_PTHREADS < 7
13391 #include <errno.h>
13392 #endif
13393 #ifndef NULL
13394 #define NULL (void*)0
13395 #endif
13396
13397 static void *task(p)
13398         void *p;
13399 {
13400         return (void *) (p == NULL);
13401 }
13402
13403 int main() {
13404
13405         /* pthread test function */
13406 #ifndef PTHREAD_CREATE_DETACHED
13407 #define PTHREAD_CREATE_DETACHED 1
13408 #endif
13409         pthread_t t;
13410         int status;
13411         int detach = PTHREAD_CREATE_DETACHED;
13412
13413 #if HAVE_PTHREADS > 4
13414         /* Final pthreads */
13415         pthread_attr_t attr;
13416
13417         status = pthread_attr_init(&attr);
13418         if( status ) return status;
13419
13420 #if HAVE_PTHREADS < 7
13421         status = pthread_attr_setdetachstate(&attr, &detach);
13422         if( status < 0 ) status = errno;
13423 #else
13424         status = pthread_attr_setdetachstate(&attr, detach);
13425 #endif
13426         if( status ) return status;
13427         status = pthread_create( &t, &attr, task, NULL );
13428 #if HAVE_PTHREADS < 7
13429         if( status < 0 ) status = errno;
13430 #endif
13431         if( status ) return status;
13432 #else
13433         /* Draft 4 pthreads */
13434         status = pthread_create( &t, pthread_attr_default, task, NULL );
13435         if( status ) return errno;
13436
13437         /* give thread a chance to complete */
13438         /* it should remain joinable and hence detachable */
13439         sleep( 1 );
13440
13441         status = pthread_detach( &t );
13442         if( status ) return errno;
13443 #endif
13444
13445 #ifdef HAVE_LINUX_THREADS
13446         pthread_kill_other_threads_np();
13447 #endif
13448
13449         return 0;
13450
13451 ; return 0; }
13452 EOF
13453 if { (eval echo configure:13454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13454   rm -rf conftest*
13455   ol_cv_pthread_lpthread=yes
13456 else
13457   echo "configure: failed program was:" >&5
13458   cat conftest.$ac_ext >&5
13459   rm -rf conftest*
13460   ol_cv_pthread_lpthread=no
13461 fi
13462 rm -f conftest*
13463 else
13464   cat > conftest.$ac_ext <<EOF
13465 #line 13466 "configure"
13466 #include "confdefs.h"
13467 /* pthread test headers */
13468 #include <pthread.h>
13469 #if HAVE_PTHREADS < 7
13470 #include <errno.h>
13471 #endif
13472 #ifndef NULL
13473 #define NULL (void*)0
13474 #endif
13475
13476 static void *task(p)
13477         void *p;
13478 {
13479         return (void *) (p == NULL);
13480 }
13481
13482
13483 int main(argc, argv)
13484         int argc;
13485         char **argv;
13486 {
13487
13488         /* pthread test function */
13489 #ifndef PTHREAD_CREATE_DETACHED
13490 #define PTHREAD_CREATE_DETACHED 1
13491 #endif
13492         pthread_t t;
13493         int status;
13494         int detach = PTHREAD_CREATE_DETACHED;
13495
13496 #if HAVE_PTHREADS > 4
13497         /* Final pthreads */
13498         pthread_attr_t attr;
13499
13500         status = pthread_attr_init(&attr);
13501         if( status ) return status;
13502
13503 #if HAVE_PTHREADS < 7
13504         status = pthread_attr_setdetachstate(&attr, &detach);
13505         if( status < 0 ) status = errno;
13506 #else
13507         status = pthread_attr_setdetachstate(&attr, detach);
13508 #endif
13509         if( status ) return status;
13510         status = pthread_create( &t, &attr, task, NULL );
13511 #if HAVE_PTHREADS < 7
13512         if( status < 0 ) status = errno;
13513 #endif
13514         if( status ) return status;
13515 #else
13516         /* Draft 4 pthreads */
13517         status = pthread_create( &t, pthread_attr_default, task, NULL );
13518         if( status ) return errno;
13519
13520         /* give thread a chance to complete */
13521         /* it should remain joinable and hence detachable */
13522         sleep( 1 );
13523
13524         status = pthread_detach( &t );
13525         if( status ) return errno;
13526 #endif
13527
13528 #ifdef HAVE_LINUX_THREADS
13529         pthread_kill_other_threads_np();
13530 #endif
13531
13532         return 0;
13533
13534 }
13535
13536 EOF
13537 if { (eval echo configure:13538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13538 then
13539   ol_cv_pthread_lpthread=yes
13540 else
13541   echo "configure: failed program was:" >&5
13542   cat conftest.$ac_ext >&5
13543   rm -fr conftest*
13544   ol_cv_pthread_lpthread=no
13545 fi
13546 rm -fr conftest*
13547 fi
13548
13549
13550                 # restore the LIBS
13551                 LIBS="$ol_LIBS"
13552         
13553 fi
13554
13555 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13556
13557         if test $ol_cv_pthread_lpthread = yes ; then
13558                 ol_link_pthreads="-lpthread"
13559                 ol_link_threads=posix
13560         fi
13561 fi
13562
13563                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13564 if test "$ol_link_threads" = no ; then
13565         # try -lc_r
13566         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13567 echo "configure:13568: checking for pthread link with -lc_r" >&5
13568 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13569   echo $ac_n "(cached) $ac_c" 1>&6
13570 else
13571   
13572                 # save the flags
13573                 ol_LIBS="$LIBS"
13574                 LIBS="-lc_r $LIBS"
13575
13576                 if test "$cross_compiling" = yes; then
13577   cat > conftest.$ac_ext <<EOF
13578 #line 13579 "configure"
13579 #include "confdefs.h"
13580 /* pthread test headers */
13581 #include <pthread.h>
13582 #if HAVE_PTHREADS < 7
13583 #include <errno.h>
13584 #endif
13585 #ifndef NULL
13586 #define NULL (void*)0
13587 #endif
13588
13589 static void *task(p)
13590         void *p;
13591 {
13592         return (void *) (p == NULL);
13593 }
13594
13595 int main() {
13596
13597         /* pthread test function */
13598 #ifndef PTHREAD_CREATE_DETACHED
13599 #define PTHREAD_CREATE_DETACHED 1
13600 #endif
13601         pthread_t t;
13602         int status;
13603         int detach = PTHREAD_CREATE_DETACHED;
13604
13605 #if HAVE_PTHREADS > 4
13606         /* Final pthreads */
13607         pthread_attr_t attr;
13608
13609         status = pthread_attr_init(&attr);
13610         if( status ) return status;
13611
13612 #if HAVE_PTHREADS < 7
13613         status = pthread_attr_setdetachstate(&attr, &detach);
13614         if( status < 0 ) status = errno;
13615 #else
13616         status = pthread_attr_setdetachstate(&attr, detach);
13617 #endif
13618         if( status ) return status;
13619         status = pthread_create( &t, &attr, task, NULL );
13620 #if HAVE_PTHREADS < 7
13621         if( status < 0 ) status = errno;
13622 #endif
13623         if( status ) return status;
13624 #else
13625         /* Draft 4 pthreads */
13626         status = pthread_create( &t, pthread_attr_default, task, NULL );
13627         if( status ) return errno;
13628
13629         /* give thread a chance to complete */
13630         /* it should remain joinable and hence detachable */
13631         sleep( 1 );
13632
13633         status = pthread_detach( &t );
13634         if( status ) return errno;
13635 #endif
13636
13637 #ifdef HAVE_LINUX_THREADS
13638         pthread_kill_other_threads_np();
13639 #endif
13640
13641         return 0;
13642
13643 ; return 0; }
13644 EOF
13645 if { (eval echo configure:13646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13646   rm -rf conftest*
13647   ol_cv_pthread_lc_r=yes
13648 else
13649   echo "configure: failed program was:" >&5
13650   cat conftest.$ac_ext >&5
13651   rm -rf conftest*
13652   ol_cv_pthread_lc_r=no
13653 fi
13654 rm -f conftest*
13655 else
13656   cat > conftest.$ac_ext <<EOF
13657 #line 13658 "configure"
13658 #include "confdefs.h"
13659 /* pthread test headers */
13660 #include <pthread.h>
13661 #if HAVE_PTHREADS < 7
13662 #include <errno.h>
13663 #endif
13664 #ifndef NULL
13665 #define NULL (void*)0
13666 #endif
13667
13668 static void *task(p)
13669         void *p;
13670 {
13671         return (void *) (p == NULL);
13672 }
13673
13674
13675 int main(argc, argv)
13676         int argc;
13677         char **argv;
13678 {
13679
13680         /* pthread test function */
13681 #ifndef PTHREAD_CREATE_DETACHED
13682 #define PTHREAD_CREATE_DETACHED 1
13683 #endif
13684         pthread_t t;
13685         int status;
13686         int detach = PTHREAD_CREATE_DETACHED;
13687
13688 #if HAVE_PTHREADS > 4
13689         /* Final pthreads */
13690         pthread_attr_t attr;
13691
13692         status = pthread_attr_init(&attr);
13693         if( status ) return status;
13694
13695 #if HAVE_PTHREADS < 7
13696         status = pthread_attr_setdetachstate(&attr, &detach);
13697         if( status < 0 ) status = errno;
13698 #else
13699         status = pthread_attr_setdetachstate(&attr, detach);
13700 #endif
13701         if( status ) return status;
13702         status = pthread_create( &t, &attr, task, NULL );
13703 #if HAVE_PTHREADS < 7
13704         if( status < 0 ) status = errno;
13705 #endif
13706         if( status ) return status;
13707 #else
13708         /* Draft 4 pthreads */
13709         status = pthread_create( &t, pthread_attr_default, task, NULL );
13710         if( status ) return errno;
13711
13712         /* give thread a chance to complete */
13713         /* it should remain joinable and hence detachable */
13714         sleep( 1 );
13715
13716         status = pthread_detach( &t );
13717         if( status ) return errno;
13718 #endif
13719
13720 #ifdef HAVE_LINUX_THREADS
13721         pthread_kill_other_threads_np();
13722 #endif
13723
13724         return 0;
13725
13726 }
13727
13728 EOF
13729 if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13730 then
13731   ol_cv_pthread_lc_r=yes
13732 else
13733   echo "configure: failed program was:" >&5
13734   cat conftest.$ac_ext >&5
13735   rm -fr conftest*
13736   ol_cv_pthread_lc_r=no
13737 fi
13738 rm -fr conftest*
13739 fi
13740
13741
13742                 # restore the LIBS
13743                 LIBS="$ol_LIBS"
13744         
13745 fi
13746
13747 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13748
13749         if test $ol_cv_pthread_lc_r = yes ; then
13750                 ol_link_pthreads="-lc_r"
13751                 ol_link_threads=posix
13752         fi
13753 fi
13754
13755
13756                 # Pthread try link: -threads (ol_cv_pthread_threads)
13757 if test "$ol_link_threads" = no ; then
13758         # try -threads
13759         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13760 echo "configure:13761: checking for pthread link with -threads" >&5
13761 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13762   echo $ac_n "(cached) $ac_c" 1>&6
13763 else
13764   
13765                 # save the flags
13766                 ol_LIBS="$LIBS"
13767                 LIBS="-threads $LIBS"
13768
13769                 if test "$cross_compiling" = yes; then
13770   cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773 /* pthread test headers */
13774 #include <pthread.h>
13775 #if HAVE_PTHREADS < 7
13776 #include <errno.h>
13777 #endif
13778 #ifndef NULL
13779 #define NULL (void*)0
13780 #endif
13781
13782 static void *task(p)
13783         void *p;
13784 {
13785         return (void *) (p == NULL);
13786 }
13787
13788 int main() {
13789
13790         /* pthread test function */
13791 #ifndef PTHREAD_CREATE_DETACHED
13792 #define PTHREAD_CREATE_DETACHED 1
13793 #endif
13794         pthread_t t;
13795         int status;
13796         int detach = PTHREAD_CREATE_DETACHED;
13797
13798 #if HAVE_PTHREADS > 4
13799         /* Final pthreads */
13800         pthread_attr_t attr;
13801
13802         status = pthread_attr_init(&attr);
13803         if( status ) return status;
13804
13805 #if HAVE_PTHREADS < 7
13806         status = pthread_attr_setdetachstate(&attr, &detach);
13807         if( status < 0 ) status = errno;
13808 #else
13809         status = pthread_attr_setdetachstate(&attr, detach);
13810 #endif
13811         if( status ) return status;
13812         status = pthread_create( &t, &attr, task, NULL );
13813 #if HAVE_PTHREADS < 7
13814         if( status < 0 ) status = errno;
13815 #endif
13816         if( status ) return status;
13817 #else
13818         /* Draft 4 pthreads */
13819         status = pthread_create( &t, pthread_attr_default, task, NULL );
13820         if( status ) return errno;
13821
13822         /* give thread a chance to complete */
13823         /* it should remain joinable and hence detachable */
13824         sleep( 1 );
13825
13826         status = pthread_detach( &t );
13827         if( status ) return errno;
13828 #endif
13829
13830 #ifdef HAVE_LINUX_THREADS
13831         pthread_kill_other_threads_np();
13832 #endif
13833
13834         return 0;
13835
13836 ; return 0; }
13837 EOF
13838 if { (eval echo configure:13839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13839   rm -rf conftest*
13840   ol_cv_pthread_threads=yes
13841 else
13842   echo "configure: failed program was:" >&5
13843   cat conftest.$ac_ext >&5
13844   rm -rf conftest*
13845   ol_cv_pthread_threads=no
13846 fi
13847 rm -f conftest*
13848 else
13849   cat > conftest.$ac_ext <<EOF
13850 #line 13851 "configure"
13851 #include "confdefs.h"
13852 /* pthread test headers */
13853 #include <pthread.h>
13854 #if HAVE_PTHREADS < 7
13855 #include <errno.h>
13856 #endif
13857 #ifndef NULL
13858 #define NULL (void*)0
13859 #endif
13860
13861 static void *task(p)
13862         void *p;
13863 {
13864         return (void *) (p == NULL);
13865 }
13866
13867
13868 int main(argc, argv)
13869         int argc;
13870         char **argv;
13871 {
13872
13873         /* pthread test function */
13874 #ifndef PTHREAD_CREATE_DETACHED
13875 #define PTHREAD_CREATE_DETACHED 1
13876 #endif
13877         pthread_t t;
13878         int status;
13879         int detach = PTHREAD_CREATE_DETACHED;
13880
13881 #if HAVE_PTHREADS > 4
13882         /* Final pthreads */
13883         pthread_attr_t attr;
13884
13885         status = pthread_attr_init(&attr);
13886         if( status ) return status;
13887
13888 #if HAVE_PTHREADS < 7
13889         status = pthread_attr_setdetachstate(&attr, &detach);
13890         if( status < 0 ) status = errno;
13891 #else
13892         status = pthread_attr_setdetachstate(&attr, detach);
13893 #endif
13894         if( status ) return status;
13895         status = pthread_create( &t, &attr, task, NULL );
13896 #if HAVE_PTHREADS < 7
13897         if( status < 0 ) status = errno;
13898 #endif
13899         if( status ) return status;
13900 #else
13901         /* Draft 4 pthreads */
13902         status = pthread_create( &t, pthread_attr_default, task, NULL );
13903         if( status ) return errno;
13904
13905         /* give thread a chance to complete */
13906         /* it should remain joinable and hence detachable */
13907         sleep( 1 );
13908
13909         status = pthread_detach( &t );
13910         if( status ) return errno;
13911 #endif
13912
13913 #ifdef HAVE_LINUX_THREADS
13914         pthread_kill_other_threads_np();
13915 #endif
13916
13917         return 0;
13918
13919 }
13920
13921 EOF
13922 if { (eval echo configure:13923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13923 then
13924   ol_cv_pthread_threads=yes
13925 else
13926   echo "configure: failed program was:" >&5
13927   cat conftest.$ac_ext >&5
13928   rm -fr conftest*
13929   ol_cv_pthread_threads=no
13930 fi
13931 rm -fr conftest*
13932 fi
13933
13934
13935                 # restore the LIBS
13936                 LIBS="$ol_LIBS"
13937         
13938 fi
13939
13940 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13941
13942         if test $ol_cv_pthread_threads = yes ; then
13943                 ol_link_pthreads="-threads"
13944                 ol_link_threads=posix
13945         fi
13946 fi
13947
13948
13949                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13950 if test "$ol_link_threads" = no ; then
13951         # try -lpthreads -lmach -lexc -lc_r
13952         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13953 echo "configure:13954: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13954 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13955   echo $ac_n "(cached) $ac_c" 1>&6
13956 else
13957   
13958                 # save the flags
13959                 ol_LIBS="$LIBS"
13960                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13961
13962                 if test "$cross_compiling" = yes; then
13963   cat > conftest.$ac_ext <<EOF
13964 #line 13965 "configure"
13965 #include "confdefs.h"
13966 /* pthread test headers */
13967 #include <pthread.h>
13968 #if HAVE_PTHREADS < 7
13969 #include <errno.h>
13970 #endif
13971 #ifndef NULL
13972 #define NULL (void*)0
13973 #endif
13974
13975 static void *task(p)
13976         void *p;
13977 {
13978         return (void *) (p == NULL);
13979 }
13980
13981 int main() {
13982
13983         /* pthread test function */
13984 #ifndef PTHREAD_CREATE_DETACHED
13985 #define PTHREAD_CREATE_DETACHED 1
13986 #endif
13987         pthread_t t;
13988         int status;
13989         int detach = PTHREAD_CREATE_DETACHED;
13990
13991 #if HAVE_PTHREADS > 4
13992         /* Final pthreads */
13993         pthread_attr_t attr;
13994
13995         status = pthread_attr_init(&attr);
13996         if( status ) return status;
13997
13998 #if HAVE_PTHREADS < 7
13999         status = pthread_attr_setdetachstate(&attr, &detach);
14000         if( status < 0 ) status = errno;
14001 #else
14002         status = pthread_attr_setdetachstate(&attr, detach);
14003 #endif
14004         if( status ) return status;
14005         status = pthread_create( &t, &attr, task, NULL );
14006 #if HAVE_PTHREADS < 7
14007         if( status < 0 ) status = errno;
14008 #endif
14009         if( status ) return status;
14010 #else
14011         /* Draft 4 pthreads */
14012         status = pthread_create( &t, pthread_attr_default, task, NULL );
14013         if( status ) return errno;
14014
14015         /* give thread a chance to complete */
14016         /* it should remain joinable and hence detachable */
14017         sleep( 1 );
14018
14019         status = pthread_detach( &t );
14020         if( status ) return errno;
14021 #endif
14022
14023 #ifdef HAVE_LINUX_THREADS
14024         pthread_kill_other_threads_np();
14025 #endif
14026
14027         return 0;
14028
14029 ; return 0; }
14030 EOF
14031 if { (eval echo configure:14032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14032   rm -rf conftest*
14033   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14034 else
14035   echo "configure: failed program was:" >&5
14036   cat conftest.$ac_ext >&5
14037   rm -rf conftest*
14038   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14039 fi
14040 rm -f conftest*
14041 else
14042   cat > conftest.$ac_ext <<EOF
14043 #line 14044 "configure"
14044 #include "confdefs.h"
14045 /* pthread test headers */
14046 #include <pthread.h>
14047 #if HAVE_PTHREADS < 7
14048 #include <errno.h>
14049 #endif
14050 #ifndef NULL
14051 #define NULL (void*)0
14052 #endif
14053
14054 static void *task(p)
14055         void *p;
14056 {
14057         return (void *) (p == NULL);
14058 }
14059
14060
14061 int main(argc, argv)
14062         int argc;
14063         char **argv;
14064 {
14065
14066         /* pthread test function */
14067 #ifndef PTHREAD_CREATE_DETACHED
14068 #define PTHREAD_CREATE_DETACHED 1
14069 #endif
14070         pthread_t t;
14071         int status;
14072         int detach = PTHREAD_CREATE_DETACHED;
14073
14074 #if HAVE_PTHREADS > 4
14075         /* Final pthreads */
14076         pthread_attr_t attr;
14077
14078         status = pthread_attr_init(&attr);
14079         if( status ) return status;
14080
14081 #if HAVE_PTHREADS < 7
14082         status = pthread_attr_setdetachstate(&attr, &detach);
14083         if( status < 0 ) status = errno;
14084 #else
14085         status = pthread_attr_setdetachstate(&attr, detach);
14086 #endif
14087         if( status ) return status;
14088         status = pthread_create( &t, &attr, task, NULL );
14089 #if HAVE_PTHREADS < 7
14090         if( status < 0 ) status = errno;
14091 #endif
14092         if( status ) return status;
14093 #else
14094         /* Draft 4 pthreads */
14095         status = pthread_create( &t, pthread_attr_default, task, NULL );
14096         if( status ) return errno;
14097
14098         /* give thread a chance to complete */
14099         /* it should remain joinable and hence detachable */
14100         sleep( 1 );
14101
14102         status = pthread_detach( &t );
14103         if( status ) return errno;
14104 #endif
14105
14106 #ifdef HAVE_LINUX_THREADS
14107         pthread_kill_other_threads_np();
14108 #endif
14109
14110         return 0;
14111
14112 }
14113
14114 EOF
14115 if { (eval echo configure:14116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14116 then
14117   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14118 else
14119   echo "configure: failed program was:" >&5
14120   cat conftest.$ac_ext >&5
14121   rm -fr conftest*
14122   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14123 fi
14124 rm -fr conftest*
14125 fi
14126
14127
14128                 # restore the LIBS
14129                 LIBS="$ol_LIBS"
14130         
14131 fi
14132
14133 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14134
14135         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14136                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14137                 ol_link_threads=posix
14138         fi
14139 fi
14140
14141                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14142 if test "$ol_link_threads" = no ; then
14143         # try -lpthreads -lmach -lexc
14144         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14145 echo "configure:14146: checking for pthread link with -lpthreads -lmach -lexc" >&5
14146 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14147   echo $ac_n "(cached) $ac_c" 1>&6
14148 else
14149   
14150                 # save the flags
14151                 ol_LIBS="$LIBS"
14152                 LIBS="-lpthreads -lmach -lexc $LIBS"
14153
14154                 if test "$cross_compiling" = yes; then
14155   cat > conftest.$ac_ext <<EOF
14156 #line 14157 "configure"
14157 #include "confdefs.h"
14158 /* pthread test headers */
14159 #include <pthread.h>
14160 #if HAVE_PTHREADS < 7
14161 #include <errno.h>
14162 #endif
14163 #ifndef NULL
14164 #define NULL (void*)0
14165 #endif
14166
14167 static void *task(p)
14168         void *p;
14169 {
14170         return (void *) (p == NULL);
14171 }
14172
14173 int main() {
14174
14175         /* pthread test function */
14176 #ifndef PTHREAD_CREATE_DETACHED
14177 #define PTHREAD_CREATE_DETACHED 1
14178 #endif
14179         pthread_t t;
14180         int status;
14181         int detach = PTHREAD_CREATE_DETACHED;
14182
14183 #if HAVE_PTHREADS > 4
14184         /* Final pthreads */
14185         pthread_attr_t attr;
14186
14187         status = pthread_attr_init(&attr);
14188         if( status ) return status;
14189
14190 #if HAVE_PTHREADS < 7
14191         status = pthread_attr_setdetachstate(&attr, &detach);
14192         if( status < 0 ) status = errno;
14193 #else
14194         status = pthread_attr_setdetachstate(&attr, detach);
14195 #endif
14196         if( status ) return status;
14197         status = pthread_create( &t, &attr, task, NULL );
14198 #if HAVE_PTHREADS < 7
14199         if( status < 0 ) status = errno;
14200 #endif
14201         if( status ) return status;
14202 #else
14203         /* Draft 4 pthreads */
14204         status = pthread_create( &t, pthread_attr_default, task, NULL );
14205         if( status ) return errno;
14206
14207         /* give thread a chance to complete */
14208         /* it should remain joinable and hence detachable */
14209         sleep( 1 );
14210
14211         status = pthread_detach( &t );
14212         if( status ) return errno;
14213 #endif
14214
14215 #ifdef HAVE_LINUX_THREADS
14216         pthread_kill_other_threads_np();
14217 #endif
14218
14219         return 0;
14220
14221 ; return 0; }
14222 EOF
14223 if { (eval echo configure:14224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14224   rm -rf conftest*
14225   ol_cv_pthread_lpthreads_lmach_lexc=yes
14226 else
14227   echo "configure: failed program was:" >&5
14228   cat conftest.$ac_ext >&5
14229   rm -rf conftest*
14230   ol_cv_pthread_lpthreads_lmach_lexc=no
14231 fi
14232 rm -f conftest*
14233 else
14234   cat > conftest.$ac_ext <<EOF
14235 #line 14236 "configure"
14236 #include "confdefs.h"
14237 /* pthread test headers */
14238 #include <pthread.h>
14239 #if HAVE_PTHREADS < 7
14240 #include <errno.h>
14241 #endif
14242 #ifndef NULL
14243 #define NULL (void*)0
14244 #endif
14245
14246 static void *task(p)
14247         void *p;
14248 {
14249         return (void *) (p == NULL);
14250 }
14251
14252
14253 int main(argc, argv)
14254         int argc;
14255         char **argv;
14256 {
14257
14258         /* pthread test function */
14259 #ifndef PTHREAD_CREATE_DETACHED
14260 #define PTHREAD_CREATE_DETACHED 1
14261 #endif
14262         pthread_t t;
14263         int status;
14264         int detach = PTHREAD_CREATE_DETACHED;
14265
14266 #if HAVE_PTHREADS > 4
14267         /* Final pthreads */
14268         pthread_attr_t attr;
14269
14270         status = pthread_attr_init(&attr);
14271         if( status ) return status;
14272
14273 #if HAVE_PTHREADS < 7
14274         status = pthread_attr_setdetachstate(&attr, &detach);
14275         if( status < 0 ) status = errno;
14276 #else
14277         status = pthread_attr_setdetachstate(&attr, detach);
14278 #endif
14279         if( status ) return status;
14280         status = pthread_create( &t, &attr, task, NULL );
14281 #if HAVE_PTHREADS < 7
14282         if( status < 0 ) status = errno;
14283 #endif
14284         if( status ) return status;
14285 #else
14286         /* Draft 4 pthreads */
14287         status = pthread_create( &t, pthread_attr_default, task, NULL );
14288         if( status ) return errno;
14289
14290         /* give thread a chance to complete */
14291         /* it should remain joinable and hence detachable */
14292         sleep( 1 );
14293
14294         status = pthread_detach( &t );
14295         if( status ) return errno;
14296 #endif
14297
14298 #ifdef HAVE_LINUX_THREADS
14299         pthread_kill_other_threads_np();
14300 #endif
14301
14302         return 0;
14303
14304 }
14305
14306 EOF
14307 if { (eval echo configure:14308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14308 then
14309   ol_cv_pthread_lpthreads_lmach_lexc=yes
14310 else
14311   echo "configure: failed program was:" >&5
14312   cat conftest.$ac_ext >&5
14313   rm -fr conftest*
14314   ol_cv_pthread_lpthreads_lmach_lexc=no
14315 fi
14316 rm -fr conftest*
14317 fi
14318
14319
14320                 # restore the LIBS
14321                 LIBS="$ol_LIBS"
14322         
14323 fi
14324
14325 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14326
14327         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14328                 ol_link_pthreads="-lpthreads -lmach -lexc"
14329                 ol_link_threads=posix
14330         fi
14331 fi
14332
14333                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14334 if test "$ol_link_threads" = no ; then
14335         # try -lpthreads -lexc
14336         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14337 echo "configure:14338: checking for pthread link with -lpthreads -lexc" >&5
14338 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14339   echo $ac_n "(cached) $ac_c" 1>&6
14340 else
14341   
14342                 # save the flags
14343                 ol_LIBS="$LIBS"
14344                 LIBS="-lpthreads -lexc $LIBS"
14345
14346                 if test "$cross_compiling" = yes; then
14347   cat > conftest.$ac_ext <<EOF
14348 #line 14349 "configure"
14349 #include "confdefs.h"
14350 /* pthread test headers */
14351 #include <pthread.h>
14352 #if HAVE_PTHREADS < 7
14353 #include <errno.h>
14354 #endif
14355 #ifndef NULL
14356 #define NULL (void*)0
14357 #endif
14358
14359 static void *task(p)
14360         void *p;
14361 {
14362         return (void *) (p == NULL);
14363 }
14364
14365 int main() {
14366
14367         /* pthread test function */
14368 #ifndef PTHREAD_CREATE_DETACHED
14369 #define PTHREAD_CREATE_DETACHED 1
14370 #endif
14371         pthread_t t;
14372         int status;
14373         int detach = PTHREAD_CREATE_DETACHED;
14374
14375 #if HAVE_PTHREADS > 4
14376         /* Final pthreads */
14377         pthread_attr_t attr;
14378
14379         status = pthread_attr_init(&attr);
14380         if( status ) return status;
14381
14382 #if HAVE_PTHREADS < 7
14383         status = pthread_attr_setdetachstate(&attr, &detach);
14384         if( status < 0 ) status = errno;
14385 #else
14386         status = pthread_attr_setdetachstate(&attr, detach);
14387 #endif
14388         if( status ) return status;
14389         status = pthread_create( &t, &attr, task, NULL );
14390 #if HAVE_PTHREADS < 7
14391         if( status < 0 ) status = errno;
14392 #endif
14393         if( status ) return status;
14394 #else
14395         /* Draft 4 pthreads */
14396         status = pthread_create( &t, pthread_attr_default, task, NULL );
14397         if( status ) return errno;
14398
14399         /* give thread a chance to complete */
14400         /* it should remain joinable and hence detachable */
14401         sleep( 1 );
14402
14403         status = pthread_detach( &t );
14404         if( status ) return errno;
14405 #endif
14406
14407 #ifdef HAVE_LINUX_THREADS
14408         pthread_kill_other_threads_np();
14409 #endif
14410
14411         return 0;
14412
14413 ; return 0; }
14414 EOF
14415 if { (eval echo configure:14416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14416   rm -rf conftest*
14417   ol_cv_pthread_lpthreads_lexc=yes
14418 else
14419   echo "configure: failed program was:" >&5
14420   cat conftest.$ac_ext >&5
14421   rm -rf conftest*
14422   ol_cv_pthread_lpthreads_lexc=no
14423 fi
14424 rm -f conftest*
14425 else
14426   cat > conftest.$ac_ext <<EOF
14427 #line 14428 "configure"
14428 #include "confdefs.h"
14429 /* pthread test headers */
14430 #include <pthread.h>
14431 #if HAVE_PTHREADS < 7
14432 #include <errno.h>
14433 #endif
14434 #ifndef NULL
14435 #define NULL (void*)0
14436 #endif
14437
14438 static void *task(p)
14439         void *p;
14440 {
14441         return (void *) (p == NULL);
14442 }
14443
14444
14445 int main(argc, argv)
14446         int argc;
14447         char **argv;
14448 {
14449
14450         /* pthread test function */
14451 #ifndef PTHREAD_CREATE_DETACHED
14452 #define PTHREAD_CREATE_DETACHED 1
14453 #endif
14454         pthread_t t;
14455         int status;
14456         int detach = PTHREAD_CREATE_DETACHED;
14457
14458 #if HAVE_PTHREADS > 4
14459         /* Final pthreads */
14460         pthread_attr_t attr;
14461
14462         status = pthread_attr_init(&attr);
14463         if( status ) return status;
14464
14465 #if HAVE_PTHREADS < 7
14466         status = pthread_attr_setdetachstate(&attr, &detach);
14467         if( status < 0 ) status = errno;
14468 #else
14469         status = pthread_attr_setdetachstate(&attr, detach);
14470 #endif
14471         if( status ) return status;
14472         status = pthread_create( &t, &attr, task, NULL );
14473 #if HAVE_PTHREADS < 7
14474         if( status < 0 ) status = errno;
14475 #endif
14476         if( status ) return status;
14477 #else
14478         /* Draft 4 pthreads */
14479         status = pthread_create( &t, pthread_attr_default, task, NULL );
14480         if( status ) return errno;
14481
14482         /* give thread a chance to complete */
14483         /* it should remain joinable and hence detachable */
14484         sleep( 1 );
14485
14486         status = pthread_detach( &t );
14487         if( status ) return errno;
14488 #endif
14489
14490 #ifdef HAVE_LINUX_THREADS
14491         pthread_kill_other_threads_np();
14492 #endif
14493
14494         return 0;
14495
14496 }
14497
14498 EOF
14499 if { (eval echo configure:14500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14500 then
14501   ol_cv_pthread_lpthreads_lexc=yes
14502 else
14503   echo "configure: failed program was:" >&5
14504   cat conftest.$ac_ext >&5
14505   rm -fr conftest*
14506   ol_cv_pthread_lpthreads_lexc=no
14507 fi
14508 rm -fr conftest*
14509 fi
14510
14511
14512                 # restore the LIBS
14513                 LIBS="$ol_LIBS"
14514         
14515 fi
14516
14517 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14518
14519         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14520                 ol_link_pthreads="-lpthreads -lexc"
14521                 ol_link_threads=posix
14522         fi
14523 fi
14524
14525
14526                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14527 if test "$ol_link_threads" = no ; then
14528         # try -lpthreads
14529         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14530 echo "configure:14531: checking for pthread link with -lpthreads" >&5
14531 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14532   echo $ac_n "(cached) $ac_c" 1>&6
14533 else
14534   
14535                 # save the flags
14536                 ol_LIBS="$LIBS"
14537                 LIBS="-lpthreads $LIBS"
14538
14539                 if test "$cross_compiling" = yes; then
14540   cat > conftest.$ac_ext <<EOF
14541 #line 14542 "configure"
14542 #include "confdefs.h"
14543 /* pthread test headers */
14544 #include <pthread.h>
14545 #if HAVE_PTHREADS < 7
14546 #include <errno.h>
14547 #endif
14548 #ifndef NULL
14549 #define NULL (void*)0
14550 #endif
14551
14552 static void *task(p)
14553         void *p;
14554 {
14555         return (void *) (p == NULL);
14556 }
14557
14558 int main() {
14559
14560         /* pthread test function */
14561 #ifndef PTHREAD_CREATE_DETACHED
14562 #define PTHREAD_CREATE_DETACHED 1
14563 #endif
14564         pthread_t t;
14565         int status;
14566         int detach = PTHREAD_CREATE_DETACHED;
14567
14568 #if HAVE_PTHREADS > 4
14569         /* Final pthreads */
14570         pthread_attr_t attr;
14571
14572         status = pthread_attr_init(&attr);
14573         if( status ) return status;
14574
14575 #if HAVE_PTHREADS < 7
14576         status = pthread_attr_setdetachstate(&attr, &detach);
14577         if( status < 0 ) status = errno;
14578 #else
14579         status = pthread_attr_setdetachstate(&attr, detach);
14580 #endif
14581         if( status ) return status;
14582         status = pthread_create( &t, &attr, task, NULL );
14583 #if HAVE_PTHREADS < 7
14584         if( status < 0 ) status = errno;
14585 #endif
14586         if( status ) return status;
14587 #else
14588         /* Draft 4 pthreads */
14589         status = pthread_create( &t, pthread_attr_default, task, NULL );
14590         if( status ) return errno;
14591
14592         /* give thread a chance to complete */
14593         /* it should remain joinable and hence detachable */
14594         sleep( 1 );
14595
14596         status = pthread_detach( &t );
14597         if( status ) return errno;
14598 #endif
14599
14600 #ifdef HAVE_LINUX_THREADS
14601         pthread_kill_other_threads_np();
14602 #endif
14603
14604         return 0;
14605
14606 ; return 0; }
14607 EOF
14608 if { (eval echo configure:14609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14609   rm -rf conftest*
14610   ol_cv_pthread_lib_lpthreads=yes
14611 else
14612   echo "configure: failed program was:" >&5
14613   cat conftest.$ac_ext >&5
14614   rm -rf conftest*
14615   ol_cv_pthread_lib_lpthreads=no
14616 fi
14617 rm -f conftest*
14618 else
14619   cat > conftest.$ac_ext <<EOF
14620 #line 14621 "configure"
14621 #include "confdefs.h"
14622 /* pthread test headers */
14623 #include <pthread.h>
14624 #if HAVE_PTHREADS < 7
14625 #include <errno.h>
14626 #endif
14627 #ifndef NULL
14628 #define NULL (void*)0
14629 #endif
14630
14631 static void *task(p)
14632         void *p;
14633 {
14634         return (void *) (p == NULL);
14635 }
14636
14637
14638 int main(argc, argv)
14639         int argc;
14640         char **argv;
14641 {
14642
14643         /* pthread test function */
14644 #ifndef PTHREAD_CREATE_DETACHED
14645 #define PTHREAD_CREATE_DETACHED 1
14646 #endif
14647         pthread_t t;
14648         int status;
14649         int detach = PTHREAD_CREATE_DETACHED;
14650
14651 #if HAVE_PTHREADS > 4
14652         /* Final pthreads */
14653         pthread_attr_t attr;
14654
14655         status = pthread_attr_init(&attr);
14656         if( status ) return status;
14657
14658 #if HAVE_PTHREADS < 7
14659         status = pthread_attr_setdetachstate(&attr, &detach);
14660         if( status < 0 ) status = errno;
14661 #else
14662         status = pthread_attr_setdetachstate(&attr, detach);
14663 #endif
14664         if( status ) return status;
14665         status = pthread_create( &t, &attr, task, NULL );
14666 #if HAVE_PTHREADS < 7
14667         if( status < 0 ) status = errno;
14668 #endif
14669         if( status ) return status;
14670 #else
14671         /* Draft 4 pthreads */
14672         status = pthread_create( &t, pthread_attr_default, task, NULL );
14673         if( status ) return errno;
14674
14675         /* give thread a chance to complete */
14676         /* it should remain joinable and hence detachable */
14677         sleep( 1 );
14678
14679         status = pthread_detach( &t );
14680         if( status ) return errno;
14681 #endif
14682
14683 #ifdef HAVE_LINUX_THREADS
14684         pthread_kill_other_threads_np();
14685 #endif
14686
14687         return 0;
14688
14689 }
14690
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14693 then
14694   ol_cv_pthread_lib_lpthreads=yes
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -fr conftest*
14699   ol_cv_pthread_lib_lpthreads=no
14700 fi
14701 rm -fr conftest*
14702 fi
14703
14704
14705                 # restore the LIBS
14706                 LIBS="$ol_LIBS"
14707         
14708 fi
14709
14710 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14711
14712         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14713                 ol_link_pthreads="-lpthreads"
14714                 ol_link_threads=posix
14715         fi
14716 fi
14717
14718
14719                 if test $ol_link_threads != no ; then
14720                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14721
14722                                                 save_CPPFLAGS="$CPPFLAGS"
14723                         save_LIBS="$LIBS"
14724                         LIBS="$LTHREAD_LIBS $LIBS"
14725
14726                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14727 do
14728 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14729 echo "configure:14730: checking for $ac_func" >&5
14730 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14731   echo $ac_n "(cached) $ac_c" 1>&6
14732 else
14733   cat > conftest.$ac_ext <<EOF
14734 #line 14735 "configure"
14735 #include "confdefs.h"
14736 /* System header to define __stub macros and hopefully few prototypes,
14737     which can conflict with char $ac_func(); below.  */
14738 #include <assert.h>
14739 /* Override any gcc2 internal prototype to avoid an error.  */
14740 /* We use char because int might match the return type of a gcc2
14741     builtin and then its argument prototype would still apply.  */
14742 char $ac_func();
14743 char (*f)();
14744
14745 int main() {
14746
14747 /* The GNU C library defines this for functions which it implements
14748     to always fail with ENOSYS.  Some functions are actually named
14749     something starting with __ and the normal name is an alias.  */
14750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14751 choke me
14752 #else
14753 f = $ac_func;
14754 #endif
14755
14756 ; return 0; }
14757 EOF
14758 if { (eval echo configure:14759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14759   rm -rf conftest*
14760   eval "ac_cv_func_$ac_func=yes"
14761 else
14762   echo "configure: failed program was:" >&5
14763   cat conftest.$ac_ext >&5
14764   rm -rf conftest*
14765   eval "ac_cv_func_$ac_func=no"
14766 fi
14767 rm -f conftest*
14768 fi
14769
14770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14771   echo "$ac_t""yes" 1>&6
14772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14773   cat >> confdefs.h <<EOF
14774 #define $ac_tr_func 1
14775 EOF
14776  
14777 else
14778   echo "$ac_t""no" 1>&6
14779 fi
14780 done
14781
14782
14783                         if test $ac_cv_func_sched_yield = no -a \
14784                                 $ac_cv_func_pthread_yield = no -a \
14785                                 $ac_cv_func_thr_yield = no ; then
14786                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14787 echo "configure:14788: checking for sched_yield in -lrt" >&5
14788 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14790   echo $ac_n "(cached) $ac_c" 1>&6
14791 else
14792   ac_save_LIBS="$LIBS"
14793 LIBS="-lrt  $LIBS"
14794 cat > conftest.$ac_ext <<EOF
14795 #line 14796 "configure"
14796 #include "confdefs.h"
14797 /* Override any gcc2 internal prototype to avoid an error.  */
14798 /* We use char because int might match the return type of a gcc2
14799     builtin and then its argument prototype would still apply.  */
14800 char sched_yield();
14801
14802 int main() {
14803 sched_yield()
14804 ; return 0; }
14805 EOF
14806 if { (eval echo configure:14807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14807   rm -rf conftest*
14808   eval "ac_cv_lib_$ac_lib_var=yes"
14809 else
14810   echo "configure: failed program was:" >&5
14811   cat conftest.$ac_ext >&5
14812   rm -rf conftest*
14813   eval "ac_cv_lib_$ac_lib_var=no"
14814 fi
14815 rm -f conftest*
14816 LIBS="$ac_save_LIBS"
14817
14818 fi
14819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14820   echo "$ac_t""yes" 1>&6
14821   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14822                                         cat >> confdefs.h <<\EOF
14823 #define HAVE_SCHED_YIELD 1
14824 EOF
14825
14826                                         ac_cv_func_sched_yield=yes
14827 else
14828   echo "$ac_t""no" 1>&6
14829 ac_cv_func_sched_yield=no
14830 fi
14831
14832                         fi
14833                         if test $ac_cv_func_sched_yield = no -a \
14834                                 $ac_cv_func_pthread_yield = no -a \
14835                                 "$ac_cv_func_thr_yield" = no ; then
14836                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14837                         fi
14838
14839                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14840 do
14841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14842 echo "configure:14843: checking for $ac_func" >&5
14843 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14844   echo $ac_n "(cached) $ac_c" 1>&6
14845 else
14846   cat > conftest.$ac_ext <<EOF
14847 #line 14848 "configure"
14848 #include "confdefs.h"
14849 /* System header to define __stub macros and hopefully few prototypes,
14850     which can conflict with char $ac_func(); below.  */
14851 #include <assert.h>
14852 /* Override any gcc2 internal prototype to avoid an error.  */
14853 /* We use char because int might match the return type of a gcc2
14854     builtin and then its argument prototype would still apply.  */
14855 char $ac_func();
14856 char (*f)();
14857
14858 int main() {
14859
14860 /* The GNU C library defines this for functions which it implements
14861     to always fail with ENOSYS.  Some functions are actually named
14862     something starting with __ and the normal name is an alias.  */
14863 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14864 choke me
14865 #else
14866 f = $ac_func;
14867 #endif
14868
14869 ; return 0; }
14870 EOF
14871 if { (eval echo configure:14872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14872   rm -rf conftest*
14873   eval "ac_cv_func_$ac_func=yes"
14874 else
14875   echo "configure: failed program was:" >&5
14876   cat conftest.$ac_ext >&5
14877   rm -rf conftest*
14878   eval "ac_cv_func_$ac_func=no"
14879 fi
14880 rm -f conftest*
14881 fi
14882
14883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14884   echo "$ac_t""yes" 1>&6
14885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14886   cat >> confdefs.h <<EOF
14887 #define $ac_tr_func 1
14888 EOF
14889  
14890 else
14891   echo "$ac_t""no" 1>&6
14892 fi
14893 done
14894
14895
14896                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14897 echo "configure:14898: checking for pthread_detach with <pthread.h>" >&5
14898 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14899   echo $ac_n "(cached) $ac_c" 1>&6
14900 else
14901   
14902                                                                 cat > conftest.$ac_ext <<EOF
14903 #line 14904 "configure"
14904 #include "confdefs.h"
14905
14906 #include <pthread.h>
14907 #ifndef NULL
14908 #define NULL (void*)0
14909 #endif
14910
14911 int main() {
14912 pthread_detach(NULL);
14913 ; return 0; }
14914 EOF
14915 if { (eval echo configure:14916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14916   rm -rf conftest*
14917   ol_cv_func_pthread_detach=yes
14918 else
14919   echo "configure: failed program was:" >&5
14920   cat conftest.$ac_ext >&5
14921   rm -rf conftest*
14922   ol_cv_func_pthread_detach=no
14923 fi
14924 rm -f conftest*
14925                         
14926 fi
14927
14928 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14929
14930                         if test $ol_cv_func_pthread_detach = no ; then
14931                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14932                         fi
14933
14934                         cat >> confdefs.h <<\EOF
14935 #define HAVE_PTHREAD_DETACH 1
14936 EOF
14937
14938
14939                                                 for ac_func in \
14940                                 pthread_setconcurrency \
14941                                 pthread_getconcurrency \
14942                                 thr_setconcurrency \
14943                                 thr_getconcurrency \
14944                         
14945 do
14946 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14947 echo "configure:14948: checking for $ac_func" >&5
14948 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14949   echo $ac_n "(cached) $ac_c" 1>&6
14950 else
14951   cat > conftest.$ac_ext <<EOF
14952 #line 14953 "configure"
14953 #include "confdefs.h"
14954 /* System header to define __stub macros and hopefully few prototypes,
14955     which can conflict with char $ac_func(); below.  */
14956 #include <assert.h>
14957 /* Override any gcc2 internal prototype to avoid an error.  */
14958 /* We use char because int might match the return type of a gcc2
14959     builtin and then its argument prototype would still apply.  */
14960 char $ac_func();
14961 char (*f)();
14962
14963 int main() {
14964
14965 /* The GNU C library defines this for functions which it implements
14966     to always fail with ENOSYS.  Some functions are actually named
14967     something starting with __ and the normal name is an alias.  */
14968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14969 choke me
14970 #else
14971 f = $ac_func;
14972 #endif
14973
14974 ; return 0; }
14975 EOF
14976 if { (eval echo configure:14977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14977   rm -rf conftest*
14978   eval "ac_cv_func_$ac_func=yes"
14979 else
14980   echo "configure: failed program was:" >&5
14981   cat conftest.$ac_ext >&5
14982   rm -rf conftest*
14983   eval "ac_cv_func_$ac_func=no"
14984 fi
14985 rm -f conftest*
14986 fi
14987
14988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14989   echo "$ac_t""yes" 1>&6
14990     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14991   cat >> confdefs.h <<EOF
14992 #define $ac_tr_func 1
14993 EOF
14994  
14995 else
14996   echo "$ac_t""no" 1>&6
14997 fi
14998 done
14999
15000
15001                         
15002         for ac_func in pthread_kill_other_threads_np
15003 do
15004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15005 echo "configure:15006: checking for $ac_func" >&5
15006 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15007   echo $ac_n "(cached) $ac_c" 1>&6
15008 else
15009   cat > conftest.$ac_ext <<EOF
15010 #line 15011 "configure"
15011 #include "confdefs.h"
15012 /* System header to define __stub macros and hopefully few prototypes,
15013     which can conflict with char $ac_func(); below.  */
15014 #include <assert.h>
15015 /* Override any gcc2 internal prototype to avoid an error.  */
15016 /* We use char because int might match the return type of a gcc2
15017     builtin and then its argument prototype would still apply.  */
15018 char $ac_func();
15019 char (*f)();
15020
15021 int main() {
15022
15023 /* The GNU C library defines this for functions which it implements
15024     to always fail with ENOSYS.  Some functions are actually named
15025     something starting with __ and the normal name is an alias.  */
15026 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15027 choke me
15028 #else
15029 f = $ac_func;
15030 #endif
15031
15032 ; return 0; }
15033 EOF
15034 if { (eval echo configure:15035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15035   rm -rf conftest*
15036   eval "ac_cv_func_$ac_func=yes"
15037 else
15038   echo "configure: failed program was:" >&5
15039   cat conftest.$ac_ext >&5
15040   rm -rf conftest*
15041   eval "ac_cv_func_$ac_func=no"
15042 fi
15043 rm -f conftest*
15044 fi
15045
15046 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15047   echo "$ac_t""yes" 1>&6
15048     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15049   cat >> confdefs.h <<EOF
15050 #define $ac_tr_func 1
15051 EOF
15052  
15053 else
15054   echo "$ac_t""no" 1>&6
15055 fi
15056 done
15057
15058         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15059 echo "configure:15060: checking for LinuxThreads implementation" >&5
15060 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15061   echo $ac_n "(cached) $ac_c" 1>&6
15062 else
15063   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15064 fi
15065
15066 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15067
15068                         
15069         
15070         
15071         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15072 echo "configure:15073: checking for LinuxThreads consistency" >&5
15073 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15074   echo $ac_n "(cached) $ac_c" 1>&6
15075 else
15076   
15077                 if test $ol_cv_header_linux_threads = yes -a \
15078                         $ol_cv_sys_linux_threads = yes; then
15079                         ol_cv_linux_threads=yes
15080                 elif test $ol_cv_header_linux_threads = no -a \
15081                         $ol_cv_sys_linux_threads = no; then
15082                         ol_cv_linux_threads=no
15083                 else
15084                         ol_cv_linux_threads=error
15085                 fi
15086         
15087 fi
15088
15089 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15090
15091
15092                         if test $ol_cv_linux_threads = error; then
15093                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15094                         fi
15095
15096                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15097 echo "configure:15098: checking if pthread_create() works" >&5
15098 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15099   echo $ac_n "(cached) $ac_c" 1>&6
15100 else
15101   
15102                         if test "$cross_compiling" = yes; then
15103                                 ol_cv_pthread_create_works=yes
15104 else
15105   cat > conftest.$ac_ext <<EOF
15106 #line 15107 "configure"
15107 #include "confdefs.h"
15108 /* pthread test headers */
15109 #include <pthread.h>
15110 #if HAVE_PTHREADS < 7
15111 #include <errno.h>
15112 #endif
15113 #ifndef NULL
15114 #define NULL (void*)0
15115 #endif
15116
15117 static void *task(p)
15118         void *p;
15119 {
15120         return (void *) (p == NULL);
15121 }
15122
15123
15124 int main(argc, argv)
15125         int argc;
15126         char **argv;
15127 {
15128
15129         /* pthread test function */
15130 #ifndef PTHREAD_CREATE_DETACHED
15131 #define PTHREAD_CREATE_DETACHED 1
15132 #endif
15133         pthread_t t;
15134         int status;
15135         int detach = PTHREAD_CREATE_DETACHED;
15136
15137 #if HAVE_PTHREADS > 4
15138         /* Final pthreads */
15139         pthread_attr_t attr;
15140
15141         status = pthread_attr_init(&attr);
15142         if( status ) return status;
15143
15144 #if HAVE_PTHREADS < 7
15145         status = pthread_attr_setdetachstate(&attr, &detach);
15146         if( status < 0 ) status = errno;
15147 #else
15148         status = pthread_attr_setdetachstate(&attr, detach);
15149 #endif
15150         if( status ) return status;
15151         status = pthread_create( &t, &attr, task, NULL );
15152 #if HAVE_PTHREADS < 7
15153         if( status < 0 ) status = errno;
15154 #endif
15155         if( status ) return status;
15156 #else
15157         /* Draft 4 pthreads */
15158         status = pthread_create( &t, pthread_attr_default, task, NULL );
15159         if( status ) return errno;
15160
15161         /* give thread a chance to complete */
15162         /* it should remain joinable and hence detachable */
15163         sleep( 1 );
15164
15165         status = pthread_detach( &t );
15166         if( status ) return errno;
15167 #endif
15168
15169 #ifdef HAVE_LINUX_THREADS
15170         pthread_kill_other_threads_np();
15171 #endif
15172
15173         return 0;
15174
15175 }
15176
15177 EOF
15178 if { (eval echo configure:15179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15179 then
15180   ol_cv_pthread_create_works=yes
15181 else
15182   echo "configure: failed program was:" >&5
15183   cat conftest.$ac_ext >&5
15184   rm -fr conftest*
15185   ol_cv_pthread_create_works=no
15186 fi
15187 rm -fr conftest*
15188 fi
15189
15190 fi
15191
15192 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15193
15194                         if test $ol_cv_pthread_create_works = no ; then
15195                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15196                         fi
15197
15198                                                 if test $ol_with_yielding_select = auto ; then
15199                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15200 echo "configure:15201: checking if select yields when using pthreads" >&5
15201 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15202   echo $ac_n "(cached) $ac_c" 1>&6
15203 else
15204   
15205                                 if test "$cross_compiling" = yes; then
15206   ol_cv_pthread_select_yields=cross
15207 else
15208   cat > conftest.$ac_ext <<EOF
15209 #line 15210 "configure"
15210 #include "confdefs.h"
15211
15212 #include <sys/types.h>
15213 #include <sys/time.h>
15214 #include <unistd.h>
15215 #include <pthread.h>
15216 #ifndef NULL
15217 #define NULL (void*) 0
15218 #endif
15219
15220 static int fildes[2];
15221
15222 static void *task(p)
15223         void *p;
15224 {
15225         int i;
15226         struct timeval tv;
15227
15228         fd_set rfds;
15229
15230         tv.tv_sec=10;
15231         tv.tv_usec=0;
15232
15233         FD_ZERO(&rfds);
15234         FD_SET(fildes[0], &rfds);
15235
15236         /* we're not interested in any fds */
15237         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15238
15239         if(i < 0) {
15240                 perror("select");
15241                 exit(10);
15242         }
15243
15244         exit(0); /* if we exit here, the select blocked the whole process */
15245 }
15246
15247 int main(argc, argv)
15248         int argc;
15249         char **argv;
15250 {
15251         pthread_t t;
15252
15253         /* create a pipe to select */
15254         if(pipe(&fildes[0])) {
15255                 perror("select");
15256                 exit(1);
15257         }
15258
15259 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15260         (void) pthread_setconcurrency(2);
15261 #else
15262 #ifdef HAVE_THR_SETCONCURRENCY
15263         /* Set Solaris LWP concurrency to 2 */
15264         thr_setconcurrency(2);
15265 #endif
15266 #endif
15267
15268 #if HAVE_PTHREADS < 6
15269         pthread_create(&t, pthread_attr_default, task, NULL);
15270 #else
15271         pthread_create(&t, NULL, task, NULL);
15272 #endif
15273
15274         /* make sure task runs first */
15275 #if HAVE_THR_YIELD
15276         thr_yield();
15277 #elif defined( HAVE_SCHED_YIELD )
15278         sched_yield();
15279 #elif defined( HAVE_PTHREAD_YIELD )
15280         pthread_yield();
15281 #endif
15282
15283         exit(2);
15284 }
15285 EOF
15286 if { (eval echo configure:15287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15287 then
15288   ol_cv_pthread_select_yields=no
15289 else
15290   echo "configure: failed program was:" >&5
15291   cat conftest.$ac_ext >&5
15292   rm -fr conftest*
15293   ol_cv_pthread_select_yields=yes
15294 fi
15295 rm -fr conftest*
15296 fi
15297
15298 fi
15299
15300 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15301
15302                                 if test $ol_cv_pthread_select_yields = cross ; then
15303                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15304                                 fi
15305
15306                                 if test $ol_cv_pthread_select_yields = yes ; then
15307                                         ol_with_yielding_select=yes
15308                                 fi
15309                         fi
15310
15311                                                 CPPFLAGS="$save_CPPFLAGS"
15312                         LIBS="$save_LIBS"
15313                 else
15314                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15315                 fi
15316         fi
15317
15318         if test $ol_with_threads = posix ; then
15319                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15320         fi
15321 fi
15322
15323 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15324         -o $ol_with_threads = mach ; then
15325
15326                 for ac_hdr in mach/cthreads.h cthreads.h
15327 do
15328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15330 echo "configure:15331: checking for $ac_hdr" >&5
15331 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15332   echo $ac_n "(cached) $ac_c" 1>&6
15333 else
15334   cat > conftest.$ac_ext <<EOF
15335 #line 15336 "configure"
15336 #include "confdefs.h"
15337 #include <$ac_hdr>
15338 EOF
15339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15340 { (eval echo configure:15341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15342 if test -z "$ac_err"; then
15343   rm -rf conftest*
15344   eval "ac_cv_header_$ac_safe=yes"
15345 else
15346   echo "$ac_err" >&5
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   eval "ac_cv_header_$ac_safe=no"
15351 fi
15352 rm -f conftest*
15353 fi
15354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15355   echo "$ac_t""yes" 1>&6
15356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15357   cat >> confdefs.h <<EOF
15358 #define $ac_tr_hdr 1
15359 EOF
15360  
15361 else
15362   echo "$ac_t""no" 1>&6
15363 fi
15364 done
15365
15366         if test $ac_cv_header_mach_cthreads_h = yes ; then
15367                 ol_with_threads=found
15368
15369                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15370 echo "configure:15371: checking for cthread_fork" >&5
15371 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 /* System header to define __stub macros and hopefully few prototypes,
15378     which can conflict with char cthread_fork(); below.  */
15379 #include <assert.h>
15380 /* Override any gcc2 internal prototype to avoid an error.  */
15381 /* We use char because int might match the return type of a gcc2
15382     builtin and then its argument prototype would still apply.  */
15383 char cthread_fork();
15384 char (*f)();
15385
15386 int main() {
15387
15388 /* The GNU C library defines this for functions which it implements
15389     to always fail with ENOSYS.  Some functions are actually named
15390     something starting with __ and the normal name is an alias.  */
15391 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15392 choke me
15393 #else
15394 f = cthread_fork;
15395 #endif
15396
15397 ; return 0; }
15398 EOF
15399 if { (eval echo configure:15400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15400   rm -rf conftest*
15401   eval "ac_cv_func_cthread_fork=yes"
15402 else
15403   echo "configure: failed program was:" >&5
15404   cat conftest.$ac_ext >&5
15405   rm -rf conftest*
15406   eval "ac_cv_func_cthread_fork=no"
15407 fi
15408 rm -f conftest*
15409 fi
15410
15411 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15412   echo "$ac_t""yes" 1>&6
15413   ol_link_threads=yes
15414 else
15415   echo "$ac_t""no" 1>&6
15416 fi
15417
15418
15419                 if test $ol_link_threads = no ; then
15420                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15421 echo "configure:15422: checking for cthread_fork with -all_load" >&5
15422 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15423   echo $ac_n "(cached) $ac_c" 1>&6
15424 else
15425   
15426                                                                 save_LIBS="$LIBS"
15427                                 LIBS="-all_load $LIBS"
15428                                 cat > conftest.$ac_ext <<EOF
15429 #line 15430 "configure"
15430 #include "confdefs.h"
15431 #include <mach/cthreads.h>
15432 int main() {
15433
15434                                         cthread_fork((void *)0, (void *)0);
15435                                         
15436 ; return 0; }
15437 EOF
15438 if { (eval echo configure:15439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15439   rm -rf conftest*
15440   ol_cv_cthread_all_load=yes
15441 else
15442   echo "configure: failed program was:" >&5
15443   cat conftest.$ac_ext >&5
15444   rm -rf conftest*
15445   ol_cv_cthread_all_load=no
15446 fi
15447 rm -f conftest*
15448                                                                 LIBS="$save_LIBS"
15449                         
15450 fi
15451
15452 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15453
15454                         if test $ol_cv_cthread_all_load = yes ; then
15455                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15456                                 ol_link_threads=mach
15457                                 ol_with_threads=found
15458                         fi
15459                 fi
15460
15461         elif test $ac_cv_header_cthreads_h = yes ; then
15462                                 
15463                 ol_with_threads=found
15464  
15465                                 save_LIBS="$LIBS"
15466                 LIBS="$LIBS -lthreads"
15467                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15468 echo "configure:15469: checking for cthread_fork" >&5
15469 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15470   echo $ac_n "(cached) $ac_c" 1>&6
15471 else
15472   cat > conftest.$ac_ext <<EOF
15473 #line 15474 "configure"
15474 #include "confdefs.h"
15475 /* System header to define __stub macros and hopefully few prototypes,
15476     which can conflict with char cthread_fork(); below.  */
15477 #include <assert.h>
15478 /* Override any gcc2 internal prototype to avoid an error.  */
15479 /* We use char because int might match the return type of a gcc2
15480     builtin and then its argument prototype would still apply.  */
15481 char cthread_fork();
15482 char (*f)();
15483
15484 int main() {
15485
15486 /* The GNU C library defines this for functions which it implements
15487     to always fail with ENOSYS.  Some functions are actually named
15488     something starting with __ and the normal name is an alias.  */
15489 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15490 choke me
15491 #else
15492 f = cthread_fork;
15493 #endif
15494
15495 ; return 0; }
15496 EOF
15497 if { (eval echo configure:15498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15498   rm -rf conftest*
15499   eval "ac_cv_func_cthread_fork=yes"
15500 else
15501   echo "configure: failed program was:" >&5
15502   cat conftest.$ac_ext >&5
15503   rm -rf conftest*
15504   eval "ac_cv_func_cthread_fork=no"
15505 fi
15506 rm -f conftest*
15507 fi
15508
15509 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15510   echo "$ac_t""yes" 1>&6
15511   ol_link_threads=yes
15512 else
15513   echo "$ac_t""no" 1>&6
15514 fi
15515
15516                 LIBS="$save_LIBS"
15517
15518                 if test $ol_link_threads = yes ; then
15519                         LTHREAD_LIBS="-lthreads"
15520                         ol_link_threads=mach
15521                         ol_with_threads=found
15522                 else
15523                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15524                 fi
15525
15526         elif test $ol_with_threads = mach ; then
15527                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15528         fi
15529
15530         if test $ol_link_threads = mach ; then
15531                 cat >> confdefs.h <<\EOF
15532 #define HAVE_MACH_CTHREADS 1
15533 EOF
15534
15535         elif test $ol_with_threads = found ; then
15536                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15537         fi
15538 fi
15539
15540 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15541         -o $ol_with_threads = pth ; then
15542
15543         for ac_hdr in pth.h
15544 do
15545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15547 echo "configure:15548: checking for $ac_hdr" >&5
15548 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15549   echo $ac_n "(cached) $ac_c" 1>&6
15550 else
15551   cat > conftest.$ac_ext <<EOF
15552 #line 15553 "configure"
15553 #include "confdefs.h"
15554 #include <$ac_hdr>
15555 EOF
15556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15557 { (eval echo configure:15558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15559 if test -z "$ac_err"; then
15560   rm -rf conftest*
15561   eval "ac_cv_header_$ac_safe=yes"
15562 else
15563   echo "$ac_err" >&5
15564   echo "configure: failed program was:" >&5
15565   cat conftest.$ac_ext >&5
15566   rm -rf conftest*
15567   eval "ac_cv_header_$ac_safe=no"
15568 fi
15569 rm -f conftest*
15570 fi
15571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15572   echo "$ac_t""yes" 1>&6
15573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15574   cat >> confdefs.h <<EOF
15575 #define $ac_tr_hdr 1
15576 EOF
15577  
15578 else
15579   echo "$ac_t""no" 1>&6
15580 fi
15581 done
15582
15583
15584         if test $ac_cv_header_pth_h = yes ; then
15585                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15586 echo "configure:15587: checking for pth_version in -lpth" >&5
15587 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15589   echo $ac_n "(cached) $ac_c" 1>&6
15590 else
15591   ac_save_LIBS="$LIBS"
15592 LIBS="-lpth  $LIBS"
15593 cat > conftest.$ac_ext <<EOF
15594 #line 15595 "configure"
15595 #include "confdefs.h"
15596 /* Override any gcc2 internal prototype to avoid an error.  */
15597 /* We use char because int might match the return type of a gcc2
15598     builtin and then its argument prototype would still apply.  */
15599 char pth_version();
15600
15601 int main() {
15602 pth_version()
15603 ; return 0; }
15604 EOF
15605 if { (eval echo configure:15606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15606   rm -rf conftest*
15607   eval "ac_cv_lib_$ac_lib_var=yes"
15608 else
15609   echo "configure: failed program was:" >&5
15610   cat conftest.$ac_ext >&5
15611   rm -rf conftest*
15612   eval "ac_cv_lib_$ac_lib_var=no"
15613 fi
15614 rm -f conftest*
15615 LIBS="$ac_save_LIBS"
15616
15617 fi
15618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15619   echo "$ac_t""yes" 1>&6
15620   have_pth=yes
15621 else
15622   echo "$ac_t""no" 1>&6
15623 have_pth=no
15624 fi
15625
15626
15627                 if test $have_pth = yes ; then
15628                         cat >> confdefs.h <<\EOF
15629 #define HAVE_GNU_PTH 1
15630 EOF
15631
15632                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15633                         ol_link_threads=pth
15634                         ol_with_threads=found
15635
15636                         if test $ol_with_yielding_select = auto ; then
15637                                 ol_with_yielding_select=yes
15638                         fi
15639                 fi
15640         fi
15641 fi
15642
15643 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15644         -o $ol_with_threads = lwp ; then
15645
15646                 for ac_hdr in thread.h synch.h
15647 do
15648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15650 echo "configure:15651: checking for $ac_hdr" >&5
15651 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15652   echo $ac_n "(cached) $ac_c" 1>&6
15653 else
15654   cat > conftest.$ac_ext <<EOF
15655 #line 15656 "configure"
15656 #include "confdefs.h"
15657 #include <$ac_hdr>
15658 EOF
15659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15660 { (eval echo configure:15661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15662 if test -z "$ac_err"; then
15663   rm -rf conftest*
15664   eval "ac_cv_header_$ac_safe=yes"
15665 else
15666   echo "$ac_err" >&5
15667   echo "configure: failed program was:" >&5
15668   cat conftest.$ac_ext >&5
15669   rm -rf conftest*
15670   eval "ac_cv_header_$ac_safe=no"
15671 fi
15672 rm -f conftest*
15673 fi
15674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15675   echo "$ac_t""yes" 1>&6
15676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15677   cat >> confdefs.h <<EOF
15678 #define $ac_tr_hdr 1
15679 EOF
15680  
15681 else
15682   echo "$ac_t""no" 1>&6
15683 fi
15684 done
15685
15686         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15687                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15688 echo "configure:15689: checking for thr_create in -lthread" >&5
15689 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15691   echo $ac_n "(cached) $ac_c" 1>&6
15692 else
15693   ac_save_LIBS="$LIBS"
15694 LIBS="-lthread  $LIBS"
15695 cat > conftest.$ac_ext <<EOF
15696 #line 15697 "configure"
15697 #include "confdefs.h"
15698 /* Override any gcc2 internal prototype to avoid an error.  */
15699 /* We use char because int might match the return type of a gcc2
15700     builtin and then its argument prototype would still apply.  */
15701 char thr_create();
15702
15703 int main() {
15704 thr_create()
15705 ; return 0; }
15706 EOF
15707 if { (eval echo configure:15708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15708   rm -rf conftest*
15709   eval "ac_cv_lib_$ac_lib_var=yes"
15710 else
15711   echo "configure: failed program was:" >&5
15712   cat conftest.$ac_ext >&5
15713   rm -rf conftest*
15714   eval "ac_cv_lib_$ac_lib_var=no"
15715 fi
15716 rm -f conftest*
15717 LIBS="$ac_save_LIBS"
15718
15719 fi
15720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15721   echo "$ac_t""yes" 1>&6
15722   have_thr=yes
15723 else
15724   echo "$ac_t""no" 1>&6
15725 have_thr=no
15726 fi
15727
15728
15729                 if test $have_thr = yes ; then
15730                         cat >> confdefs.h <<\EOF
15731 #define HAVE_THR 1
15732 EOF
15733
15734                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15735                         ol_link_threads=thr
15736
15737                         if test $ol_with_yielding_select = auto ; then
15738                                 ol_with_yielding_select=yes
15739                         fi
15740
15741                                                 for ac_func in \
15742                                 thr_setconcurrency \
15743                                 thr_getconcurrency \
15744                         
15745 do
15746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15747 echo "configure:15748: checking for $ac_func" >&5
15748 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15749   echo $ac_n "(cached) $ac_c" 1>&6
15750 else
15751   cat > conftest.$ac_ext <<EOF
15752 #line 15753 "configure"
15753 #include "confdefs.h"
15754 /* System header to define __stub macros and hopefully few prototypes,
15755     which can conflict with char $ac_func(); below.  */
15756 #include <assert.h>
15757 /* Override any gcc2 internal prototype to avoid an error.  */
15758 /* We use char because int might match the return type of a gcc2
15759     builtin and then its argument prototype would still apply.  */
15760 char $ac_func();
15761 char (*f)();
15762
15763 int main() {
15764
15765 /* The GNU C library defines this for functions which it implements
15766     to always fail with ENOSYS.  Some functions are actually named
15767     something starting with __ and the normal name is an alias.  */
15768 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15769 choke me
15770 #else
15771 f = $ac_func;
15772 #endif
15773
15774 ; return 0; }
15775 EOF
15776 if { (eval echo configure:15777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15777   rm -rf conftest*
15778   eval "ac_cv_func_$ac_func=yes"
15779 else
15780   echo "configure: failed program was:" >&5
15781   cat conftest.$ac_ext >&5
15782   rm -rf conftest*
15783   eval "ac_cv_func_$ac_func=no"
15784 fi
15785 rm -f conftest*
15786 fi
15787
15788 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15789   echo "$ac_t""yes" 1>&6
15790     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15791   cat >> confdefs.h <<EOF
15792 #define $ac_tr_func 1
15793 EOF
15794  
15795 else
15796   echo "$ac_t""no" 1>&6
15797 fi
15798 done
15799
15800                 fi
15801         fi
15802
15803                 for ac_hdr in lwp/lwp.h
15804 do
15805 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15806 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15807 echo "configure:15808: checking for $ac_hdr" >&5
15808 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15809   echo $ac_n "(cached) $ac_c" 1>&6
15810 else
15811   cat > conftest.$ac_ext <<EOF
15812 #line 15813 "configure"
15813 #include "confdefs.h"
15814 #include <$ac_hdr>
15815 EOF
15816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15817 { (eval echo configure:15818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15819 if test -z "$ac_err"; then
15820   rm -rf conftest*
15821   eval "ac_cv_header_$ac_safe=yes"
15822 else
15823   echo "$ac_err" >&5
15824   echo "configure: failed program was:" >&5
15825   cat conftest.$ac_ext >&5
15826   rm -rf conftest*
15827   eval "ac_cv_header_$ac_safe=no"
15828 fi
15829 rm -f conftest*
15830 fi
15831 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15832   echo "$ac_t""yes" 1>&6
15833     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15834   cat >> confdefs.h <<EOF
15835 #define $ac_tr_hdr 1
15836 EOF
15837  
15838 else
15839   echo "$ac_t""no" 1>&6
15840 fi
15841 done
15842
15843         if test $ac_cv_header_lwp_lwp_h = yes ; then
15844                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15845 echo "configure:15846: checking for lwp_create in -llwp" >&5
15846 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15848   echo $ac_n "(cached) $ac_c" 1>&6
15849 else
15850   ac_save_LIBS="$LIBS"
15851 LIBS="-llwp  $LIBS"
15852 cat > conftest.$ac_ext <<EOF
15853 #line 15854 "configure"
15854 #include "confdefs.h"
15855 /* Override any gcc2 internal prototype to avoid an error.  */
15856 /* We use char because int might match the return type of a gcc2
15857     builtin and then its argument prototype would still apply.  */
15858 char lwp_create();
15859
15860 int main() {
15861 lwp_create()
15862 ; return 0; }
15863 EOF
15864 if { (eval echo configure:15865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15865   rm -rf conftest*
15866   eval "ac_cv_lib_$ac_lib_var=yes"
15867 else
15868   echo "configure: failed program was:" >&5
15869   cat conftest.$ac_ext >&5
15870   rm -rf conftest*
15871   eval "ac_cv_lib_$ac_lib_var=no"
15872 fi
15873 rm -f conftest*
15874 LIBS="$ac_save_LIBS"
15875
15876 fi
15877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15878   echo "$ac_t""yes" 1>&6
15879   have_lwp=yes
15880 else
15881   echo "$ac_t""no" 1>&6
15882 have_lwp=no
15883 fi
15884
15885
15886                 if test $have_lwp = yes ; then
15887                         cat >> confdefs.h <<\EOF
15888 #define HAVE_LWP 1
15889 EOF
15890
15891                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15892                         ol_link_threads=lwp
15893
15894                         if test $ol_with_yielding_select = auto ; then
15895                                 ol_with_yielding_select=no
15896                         fi
15897                 fi
15898         fi
15899 fi
15900
15901 if test $ol_with_yielding_select = yes ; then
15902         cat >> confdefs.h <<\EOF
15903 #define HAVE_YIELDING_SELECT 1
15904 EOF
15905
15906 fi
15907
15908 if test $ol_with_threads = manual ; then
15909                 ol_link_threads=yes
15910
15911         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15912
15913         for ac_hdr in pthread.h sched.h
15914 do
15915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15917 echo "configure:15918: checking for $ac_hdr" >&5
15918 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15919   echo $ac_n "(cached) $ac_c" 1>&6
15920 else
15921   cat > conftest.$ac_ext <<EOF
15922 #line 15923 "configure"
15923 #include "confdefs.h"
15924 #include <$ac_hdr>
15925 EOF
15926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15927 { (eval echo configure:15928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15929 if test -z "$ac_err"; then
15930   rm -rf conftest*
15931   eval "ac_cv_header_$ac_safe=yes"
15932 else
15933   echo "$ac_err" >&5
15934   echo "configure: failed program was:" >&5
15935   cat conftest.$ac_ext >&5
15936   rm -rf conftest*
15937   eval "ac_cv_header_$ac_safe=no"
15938 fi
15939 rm -f conftest*
15940 fi
15941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15942   echo "$ac_t""yes" 1>&6
15943     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15944   cat >> confdefs.h <<EOF
15945 #define $ac_tr_hdr 1
15946 EOF
15947  
15948 else
15949   echo "$ac_t""no" 1>&6
15950 fi
15951 done
15952
15953         for ac_func in sched_yield pthread_yield
15954 do
15955 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15956 echo "configure:15957: checking for $ac_func" >&5
15957 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15958   echo $ac_n "(cached) $ac_c" 1>&6
15959 else
15960   cat > conftest.$ac_ext <<EOF
15961 #line 15962 "configure"
15962 #include "confdefs.h"
15963 /* System header to define __stub macros and hopefully few prototypes,
15964     which can conflict with char $ac_func(); below.  */
15965 #include <assert.h>
15966 /* Override any gcc2 internal prototype to avoid an error.  */
15967 /* We use char because int might match the return type of a gcc2
15968     builtin and then its argument prototype would still apply.  */
15969 char $ac_func();
15970 char (*f)();
15971
15972 int main() {
15973
15974 /* The GNU C library defines this for functions which it implements
15975     to always fail with ENOSYS.  Some functions are actually named
15976     something starting with __ and the normal name is an alias.  */
15977 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15978 choke me
15979 #else
15980 f = $ac_func;
15981 #endif
15982
15983 ; return 0; }
15984 EOF
15985 if { (eval echo configure:15986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15986   rm -rf conftest*
15987   eval "ac_cv_func_$ac_func=yes"
15988 else
15989   echo "configure: failed program was:" >&5
15990   cat conftest.$ac_ext >&5
15991   rm -rf conftest*
15992   eval "ac_cv_func_$ac_func=no"
15993 fi
15994 rm -f conftest*
15995 fi
15996
15997 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15998   echo "$ac_t""yes" 1>&6
15999     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16000   cat >> confdefs.h <<EOF
16001 #define $ac_tr_func 1
16002 EOF
16003  
16004 else
16005   echo "$ac_t""no" 1>&6
16006 fi
16007 done
16008
16009         
16010         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16011 echo "configure:16012: checking for LinuxThreads pthread.h" >&5
16012 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16013   echo $ac_n "(cached) $ac_c" 1>&6
16014 else
16015   cat > conftest.$ac_ext <<EOF
16016 #line 16017 "configure"
16017 #include "confdefs.h"
16018 #include <pthread.h>
16019 EOF
16020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16021   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16022   rm -rf conftest*
16023   ol_cv_header_linux_threads=yes
16024 else
16025   rm -rf conftest*
16026   ol_cv_header_linux_threads=no
16027 fi
16028 rm -f conftest*
16029
16030                 
16031 fi
16032
16033 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16034         if test $ol_cv_header_linux_threads = yes; then
16035                 cat >> confdefs.h <<\EOF
16036 #define HAVE_LINUX_THREADS 1
16037 EOF
16038
16039         fi
16040
16041
16042         for ac_hdr in mach/cthreads.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         for ac_hdr in lwp/lwp.h
16083 do
16084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16086 echo "configure:16087: checking for $ac_hdr" >&5
16087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16088   echo $ac_n "(cached) $ac_c" 1>&6
16089 else
16090   cat > conftest.$ac_ext <<EOF
16091 #line 16092 "configure"
16092 #include "confdefs.h"
16093 #include <$ac_hdr>
16094 EOF
16095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16096 { (eval echo configure:16097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16098 if test -z "$ac_err"; then
16099   rm -rf conftest*
16100   eval "ac_cv_header_$ac_safe=yes"
16101 else
16102   echo "$ac_err" >&5
16103   echo "configure: failed program was:" >&5
16104   cat conftest.$ac_ext >&5
16105   rm -rf conftest*
16106   eval "ac_cv_header_$ac_safe=no"
16107 fi
16108 rm -f conftest*
16109 fi
16110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16111   echo "$ac_t""yes" 1>&6
16112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16113   cat >> confdefs.h <<EOF
16114 #define $ac_tr_hdr 1
16115 EOF
16116  
16117 else
16118   echo "$ac_t""no" 1>&6
16119 fi
16120 done
16121
16122         for ac_hdr in thread.h synch.h
16123 do
16124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16126 echo "configure:16127: checking for $ac_hdr" >&5
16127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16128   echo $ac_n "(cached) $ac_c" 1>&6
16129 else
16130   cat > conftest.$ac_ext <<EOF
16131 #line 16132 "configure"
16132 #include "confdefs.h"
16133 #include <$ac_hdr>
16134 EOF
16135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16136 { (eval echo configure:16137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16138 if test -z "$ac_err"; then
16139   rm -rf conftest*
16140   eval "ac_cv_header_$ac_safe=yes"
16141 else
16142   echo "$ac_err" >&5
16143   echo "configure: failed program was:" >&5
16144   cat conftest.$ac_ext >&5
16145   rm -rf conftest*
16146   eval "ac_cv_header_$ac_safe=no"
16147 fi
16148 rm -f conftest*
16149 fi
16150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16151   echo "$ac_t""yes" 1>&6
16152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16153   cat >> confdefs.h <<EOF
16154 #define $ac_tr_hdr 1
16155 EOF
16156  
16157 else
16158   echo "$ac_t""no" 1>&6
16159 fi
16160 done
16161
16162 fi
16163
16164 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16165                         cat >> confdefs.h <<\EOF
16166 #define REENTRANT 1
16167 EOF
16168
16169         cat >> confdefs.h <<\EOF
16170 #define _REENTRANT 1
16171 EOF
16172
16173         cat >> confdefs.h <<\EOF
16174 #define THREAD_SAFE 1
16175 EOF
16176
16177         cat >> confdefs.h <<\EOF
16178 #define _THREAD_SAFE 1
16179 EOF
16180
16181         cat >> confdefs.h <<\EOF
16182 #define THREADSAFE 1
16183 EOF
16184
16185         cat >> confdefs.h <<\EOF
16186 #define _THREADSAFE 1
16187 EOF
16188
16189         cat >> confdefs.h <<\EOF
16190 #define _SGI_MP_SOURCE 1
16191 EOF
16192
16193
16194                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16195 echo "configure:16196: checking for thread specific errno" >&5
16196 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16197   echo $ac_n "(cached) $ac_c" 1>&6
16198 else
16199   
16200                 cat > conftest.$ac_ext <<EOF
16201 #line 16202 "configure"
16202 #include "confdefs.h"
16203 #include <errno.h>
16204 int main() {
16205 errno = 0;
16206 ; return 0; }
16207 EOF
16208 if { (eval echo configure:16209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16209   rm -rf conftest*
16210   ol_cv_errno_thread_specific=yes
16211 else
16212   echo "configure: failed program was:" >&5
16213   cat conftest.$ac_ext >&5
16214   rm -rf conftest*
16215   ol_cv_errno_thread_specific=no
16216 fi
16217 rm -f conftest*
16218         
16219 fi
16220
16221 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16222
16223                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16224 echo "configure:16225: checking for thread specific h_errno" >&5
16225 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16226   echo $ac_n "(cached) $ac_c" 1>&6
16227 else
16228   
16229                 cat > conftest.$ac_ext <<EOF
16230 #line 16231 "configure"
16231 #include "confdefs.h"
16232 #include <netdb.h>
16233 int main() {
16234 h_errno = 0;
16235 ; return 0; }
16236 EOF
16237 if { (eval echo configure:16238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16238   rm -rf conftest*
16239   ol_cv_h_errno_thread_specific=yes
16240 else
16241   echo "configure: failed program was:" >&5
16242   cat conftest.$ac_ext >&5
16243   rm -rf conftest*
16244   ol_cv_h_errno_thread_specific=no
16245 fi
16246 rm -f conftest*
16247         
16248 fi
16249
16250 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16251
16252         if test $ol_cv_errno_thread_specific != yes \
16253                 -o $ol_cv_h_errno_thread_specific != yes ; then
16254                 LIBS="$LTHREAD_LIBS $LIBS"
16255                 LTHREAD_LIBS=""
16256         fi
16257
16258 fi  
16259
16260 if test $ol_link_threads = no ; then
16261         if test $ol_with_threads = yes ; then
16262                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16263         fi
16264
16265         if test $ol_with_threads = auto ; then
16266                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16267                 ol_with_threads=no
16268         fi
16269
16270         cat >> confdefs.h <<\EOF
16271 #define NO_THREADS 1
16272 EOF
16273
16274         LTHREAD_LIBS=""
16275 fi
16276
16277 if test $ol_link_threads != no ; then
16278         cat >> confdefs.h <<\EOF
16279 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16280 EOF
16281
16282 fi
16283
16284 for ac_func in \
16285         ctime_r                 \
16286         gethostbyname_r gethostbyaddr_r \
16287
16288 do
16289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16290 echo "configure:16291: checking for $ac_func" >&5
16291 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16292   echo $ac_n "(cached) $ac_c" 1>&6
16293 else
16294   cat > conftest.$ac_ext <<EOF
16295 #line 16296 "configure"
16296 #include "confdefs.h"
16297 /* System header to define __stub macros and hopefully few prototypes,
16298     which can conflict with char $ac_func(); below.  */
16299 #include <assert.h>
16300 /* Override any gcc2 internal prototype to avoid an error.  */
16301 /* We use char because int might match the return type of a gcc2
16302     builtin and then its argument prototype would still apply.  */
16303 char $ac_func();
16304 char (*f)();
16305
16306 int main() {
16307
16308 /* The GNU C library defines this for functions which it implements
16309     to always fail with ENOSYS.  Some functions are actually named
16310     something starting with __ and the normal name is an alias.  */
16311 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16312 choke me
16313 #else
16314 f = $ac_func;
16315 #endif
16316
16317 ; return 0; }
16318 EOF
16319 if { (eval echo configure:16320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16320   rm -rf conftest*
16321   eval "ac_cv_func_$ac_func=yes"
16322 else
16323   echo "configure: failed program was:" >&5
16324   cat conftest.$ac_ext >&5
16325   rm -rf conftest*
16326   eval "ac_cv_func_$ac_func=no"
16327 fi
16328 rm -f conftest*
16329 fi
16330
16331 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16332   echo "$ac_t""yes" 1>&6
16333     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16334   cat >> confdefs.h <<EOF
16335 #define $ac_tr_func 1
16336 EOF
16337  
16338 else
16339   echo "$ac_t""no" 1>&6
16340 fi
16341 done
16342
16343
16344 if test "$ac_cv_func_ctime_r" = no ; then
16345         ol_cv_func_ctime_r_nargs=0
16346 else
16347         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16348 echo "configure:16349: checking number of arguments of ctime_r" >&5
16349 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16350   echo $ac_n "(cached) $ac_c" 1>&6
16351 else
16352   cat > conftest.$ac_ext <<EOF
16353 #line 16354 "configure"
16354 #include "confdefs.h"
16355 #include <time.h>
16356 int main() {
16357 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16358 ; return 0; }
16359 EOF
16360 if { (eval echo configure:16361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16361   rm -rf conftest*
16362   ol_cv_func_ctime_r_nargs3=yes
16363 else
16364   echo "configure: failed program was:" >&5
16365   cat conftest.$ac_ext >&5
16366   rm -rf conftest*
16367   ol_cv_func_ctime_r_nargs3=no
16368 fi
16369 rm -f conftest*
16370
16371         cat > conftest.$ac_ext <<EOF
16372 #line 16373 "configure"
16373 #include "confdefs.h"
16374 #include <time.h>
16375 int main() {
16376 time_t ti; char *buffer; ctime_r(&ti,buffer);
16377 ; return 0; }
16378 EOF
16379 if { (eval echo configure:16380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16380   rm -rf conftest*
16381   ol_cv_func_ctime_r_nargs2=yes
16382 else
16383   echo "configure: failed program was:" >&5
16384   cat conftest.$ac_ext >&5
16385   rm -rf conftest*
16386   ol_cv_func_ctime_r_nargs2=no
16387 fi
16388 rm -f conftest*
16389
16390         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16391                 $ol_cv_func_ctime_r_nargs2 = no ; then
16392
16393                 ol_cv_func_ctime_r_nargs=3
16394
16395         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16396                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16397
16398                 ol_cv_func_ctime_r_nargs=2
16399
16400         else
16401                 ol_cv_func_ctime_r_nargs=0
16402         fi
16403   
16404 fi
16405
16406 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16407
16408   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16409         cat >> confdefs.h <<EOF
16410 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16411 EOF
16412
16413   fi
16414
16415 fi
16416
16417 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16418         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16419 echo "configure:16420: checking number of arguments of gethostbyname_r" >&5
16420 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16421   echo $ac_n "(cached) $ac_c" 1>&6
16422 else
16423   cat > conftest.$ac_ext <<EOF
16424 #line 16425 "configure"
16425 #include "confdefs.h"
16426 #include <sys/types.h>
16427 #include <sys/socket.h>
16428 #include <netinet/in.h>
16429 #include <netdb.h>
16430 #define BUFSIZE (sizeof(struct hostent)+10)
16431 int main() {
16432 struct hostent hent; char buffer[BUFSIZE];
16433                 int bufsize=BUFSIZE;int h_errno;
16434                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16435                         buffer, bufsize, &h_errno);
16436 ; return 0; }
16437 EOF
16438 if { (eval echo configure:16439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16439   rm -rf conftest*
16440   ol_cv_func_gethostbyname_r_nargs5=yes
16441 else
16442   echo "configure: failed program was:" >&5
16443   cat conftest.$ac_ext >&5
16444   rm -rf conftest*
16445   ol_cv_func_gethostbyname_r_nargs5=no
16446 fi
16447 rm -f conftest*
16448
16449         cat > conftest.$ac_ext <<EOF
16450 #line 16451 "configure"
16451 #include "confdefs.h"
16452 #include <sys/types.h>
16453 #include <sys/socket.h>
16454 #include <netinet/in.h>
16455 #include <netdb.h>
16456 #define BUFSIZE (sizeof(struct hostent)+10)
16457 int main() {
16458 struct hostent hent;struct hostent *rhent;
16459                 char buffer[BUFSIZE];
16460                 int bufsize=BUFSIZE;int h_errno;
16461                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16462                         &rhent, &h_errno);
16463 ; return 0; }
16464 EOF
16465 if { (eval echo configure:16466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16466   rm -rf conftest*
16467   ol_cv_func_gethostbyname_r_nargs6=yes
16468 else
16469   echo "configure: failed program was:" >&5
16470   cat conftest.$ac_ext >&5
16471   rm -rf conftest*
16472   ol_cv_func_gethostbyname_r_nargs6=no
16473 fi
16474 rm -f conftest*
16475
16476         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16477                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16478
16479                 ol_cv_func_gethostbyname_r_nargs=5
16480
16481         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16482                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16483
16484                 ol_cv_func_gethostbyname_r_nargs=6
16485
16486         else
16487                 ol_cv_func_gethostbyname_r_nargs=0
16488         fi
16489   
16490 fi
16491
16492 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16493   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16494         cat >> confdefs.h <<EOF
16495 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16496 EOF
16497
16498   fi
16499
16500 else
16501         ol_cv_func_gethostbyname_r_nargs=0
16502 fi
16503  
16504 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16505         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16506 echo "configure:16507: checking number of arguments of gethostbyaddr_r" >&5
16507 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16508   echo $ac_n "(cached) $ac_c" 1>&6
16509 else
16510   cat > conftest.$ac_ext <<EOF
16511 #line 16512 "configure"
16512 #include "confdefs.h"
16513 #include <sys/types.h>
16514 #include <sys/socket.h>
16515 #include <netinet/in.h>
16516 #include <netdb.h>
16517 #define BUFSIZE (sizeof(struct hostent)+10)
16518 int main() {
16519 struct hostent hent; char buffer[BUFSIZE]; 
16520             struct in_addr add;
16521             size_t alen=sizeof(struct in_addr);
16522             int bufsize=BUFSIZE;int h_errno;
16523                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16524                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16525 ; return 0; }
16526 EOF
16527 if { (eval echo configure:16528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16528   rm -rf conftest*
16529   ol_cv_func_gethostbyaddr_r_nargs7=yes
16530 else
16531   echo "configure: failed program was:" >&5
16532   cat conftest.$ac_ext >&5
16533   rm -rf conftest*
16534   ol_cv_func_gethostbyaddr_r_nargs7=no
16535 fi
16536 rm -f conftest*
16537
16538         cat > conftest.$ac_ext <<EOF
16539 #line 16540 "configure"
16540 #include "confdefs.h"
16541 #include <sys/types.h>
16542 #include <sys/socket.h>
16543 #include <netinet/in.h>
16544 #include <netdb.h>
16545 #define BUFSIZE (sizeof(struct hostent)+10)
16546 int main() {
16547 struct hostent hent;
16548                 struct hostent *rhent; char buffer[BUFSIZE]; 
16549                 struct in_addr add;
16550                 size_t alen=sizeof(struct in_addr);
16551                 int bufsize=BUFSIZE;int h_errno;
16552                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16553                         alen, AF_INET, &hent, buffer, bufsize, 
16554                         &rhent, &h_errno);
16555 ; return 0; }
16556 EOF
16557 if { (eval echo configure:16558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16558   rm -rf conftest*
16559   ol_cv_func_gethostbyaddr_r_nargs8=yes
16560 else
16561   echo "configure: failed program was:" >&5
16562   cat conftest.$ac_ext >&5
16563   rm -rf conftest*
16564   ol_cv_func_gethostbyaddr_r_nargs8=no
16565 fi
16566 rm -f conftest*
16567
16568         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16569                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16570
16571                 ol_cv_func_gethostbyaddr_r_nargs=7
16572
16573         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16574                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16575
16576                 ol_cv_func_gethostbyaddr_r_nargs=8
16577
16578         else
16579                 ol_cv_func_gethostbyaddr_r_nargs=0
16580         fi
16581   
16582 fi
16583
16584 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16585   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16586     cat >> confdefs.h <<EOF
16587 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16588 EOF
16589
16590   fi
16591
16592 else
16593         ol_cv_func_gethostbyaddr_r_nargs=0
16594 fi
16595
16596 ol_link_ldbm=no 
16597
16598 if test $ol_with_ldbm_api = auto \
16599         -o $ol_with_ldbm_api = berkeley \
16600         -o $ol_with_ldbm_api = bcompat ; then
16601
16602         if test $ol_with_ldbm_api = bcompat; then \
16603                 for ac_hdr in db_185.h db.h
16604 do
16605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16607 echo "configure:16608: checking for $ac_hdr" >&5
16608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16609   echo $ac_n "(cached) $ac_c" 1>&6
16610 else
16611   cat > conftest.$ac_ext <<EOF
16612 #line 16613 "configure"
16613 #include "confdefs.h"
16614 #include <$ac_hdr>
16615 EOF
16616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16617 { (eval echo configure:16618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16619 if test -z "$ac_err"; then
16620   rm -rf conftest*
16621   eval "ac_cv_header_$ac_safe=yes"
16622 else
16623   echo "$ac_err" >&5
16624   echo "configure: failed program was:" >&5
16625   cat conftest.$ac_ext >&5
16626   rm -rf conftest*
16627   eval "ac_cv_header_$ac_safe=no"
16628 fi
16629 rm -f conftest*
16630 fi
16631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16632   echo "$ac_t""yes" 1>&6
16633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16634   cat >> confdefs.h <<EOF
16635 #define $ac_tr_hdr 1
16636 EOF
16637  
16638 else
16639   echo "$ac_t""no" 1>&6
16640 fi
16641 done
16642
16643 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16644         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16645 echo "configure:16646: checking if Berkeley DB header compatibility" >&5
16646 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16647   echo $ac_n "(cached) $ac_c" 1>&6
16648 else
16649   
16650                 cat > conftest.$ac_ext <<EOF
16651 #line 16652 "configure"
16652 #include "confdefs.h"
16653
16654 #if HAVE_DB_185_H
16655 #       include <db_185.h>
16656 #else
16657 #       include <db.h>
16658 #endif
16659
16660  /* this check could be improved */
16661 #ifndef DB_VERSION_MAJOR
16662 #       define DB_VERSION_MAJOR 1
16663 #endif
16664
16665 #if DB_VERSION_MAJOR == 1 
16666         __db_version_1
16667 #endif
16668
16669 EOF
16670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16671   egrep "__db_version_1" >/dev/null 2>&1; then
16672   rm -rf conftest*
16673   ol_cv_header_db1=yes
16674 else
16675   rm -rf conftest*
16676   ol_cv_header_db1=no
16677 fi
16678 rm -f conftest*
16679
16680 fi
16681
16682 echo "$ac_t""$ol_cv_header_db1" 1>&6
16683
16684         if test $ol_cv_header_db1 = yes ; then
16685                 ol_cv_lib_db=no
16686 if test $ol_cv_lib_db = no ; then
16687         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16688 echo "configure:16689: checking for Berkeley DB link (default)" >&5
16689 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16690   echo $ac_n "(cached) $ac_c" 1>&6
16691 else
16692   
16693         ol_DB_LIB=
16694         ol_LIBS=$LIBS
16695         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16696
16697         cat > conftest.$ac_ext <<EOF
16698 #line 16699 "configure"
16699 #include "confdefs.h"
16700
16701 #ifdef HAVE_DB_185_H
16702 # include <db_185.h>
16703 #else
16704 # include <db.h>
16705 #endif
16706
16707 #ifndef DB_VERSION_MAJOR
16708 # define DB_VERSION_MAJOR 1
16709 #endif
16710
16711 #ifndef NULL
16712 #define NULL ((void*)0)
16713 #endif
16714
16715 int main() {
16716
16717 #if DB_VERSION_MAJOR > 1
16718         {
16719                 char *version;
16720                 int major, minor, patch;
16721
16722                 version = db_version( &major, &minor, &patch );
16723
16724                 if( major != DB_VERSION_MAJOR ||
16725                         minor < DB_VERSION_MINOR )
16726                 {
16727                         printf("Berkeley DB version mismatch\n"
16728                                 "\texpected: %s\n\tgot: %s\n",
16729                                 DB_VERSION_STRING, version);
16730                         return 1;
16731                 }
16732         }
16733 #endif
16734
16735 #if DB_VERSION_MAJOR > 2
16736         db_env_create( NULL, 0 );
16737 #elif DB_VERSION_MAJOR > 1
16738         db_appexit( NULL );
16739 #else
16740         (void) dbopen( NULL, 0, 0, 0, NULL);
16741 #endif
16742
16743 ; return 0; }
16744 EOF
16745 if { (eval echo configure:16746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16746   rm -rf conftest*
16747   ol_cv_db_none=yes
16748 else
16749   echo "configure: failed program was:" >&5
16750   cat conftest.$ac_ext >&5
16751   rm -rf conftest*
16752   ol_cv_db_none=no
16753 fi
16754 rm -f conftest*
16755
16756         LIBS="$ol_LIBS"
16757
16758 fi
16759
16760 echo "$ac_t""$ol_cv_db_none" 1>&6
16761
16762         if test $ol_cv_db_none = yes ; then
16763                 ol_cv_lib_db=yes
16764         fi
16765 fi
16766
16767 if test $ol_cv_lib_db = no ; then
16768         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16769 echo "configure:16770: checking for Berkeley DB link (-ldb42)" >&5
16770 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16771   echo $ac_n "(cached) $ac_c" 1>&6
16772 else
16773   
16774         ol_DB_LIB=-ldb42
16775         ol_LIBS=$LIBS
16776         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16777
16778         cat > conftest.$ac_ext <<EOF
16779 #line 16780 "configure"
16780 #include "confdefs.h"
16781
16782 #ifdef HAVE_DB_185_H
16783 # include <db_185.h>
16784 #else
16785 # include <db.h>
16786 #endif
16787
16788 #ifndef DB_VERSION_MAJOR
16789 # define DB_VERSION_MAJOR 1
16790 #endif
16791
16792 #ifndef NULL
16793 #define NULL ((void*)0)
16794 #endif
16795
16796 int main() {
16797
16798 #if DB_VERSION_MAJOR > 1
16799         {
16800                 char *version;
16801                 int major, minor, patch;
16802
16803                 version = db_version( &major, &minor, &patch );
16804
16805                 if( major != DB_VERSION_MAJOR ||
16806                         minor < DB_VERSION_MINOR )
16807                 {
16808                         printf("Berkeley DB version mismatch\n"
16809                                 "\texpected: %s\n\tgot: %s\n",
16810                                 DB_VERSION_STRING, version);
16811                         return 1;
16812                 }
16813         }
16814 #endif
16815
16816 #if DB_VERSION_MAJOR > 2
16817         db_env_create( NULL, 0 );
16818 #elif DB_VERSION_MAJOR > 1
16819         db_appexit( NULL );
16820 #else
16821         (void) dbopen( NULL, 0, 0, 0, NULL);
16822 #endif
16823
16824 ; return 0; }
16825 EOF
16826 if { (eval echo configure:16827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16827   rm -rf conftest*
16828   ol_cv_db_db42=yes
16829 else
16830   echo "configure: failed program was:" >&5
16831   cat conftest.$ac_ext >&5
16832   rm -rf conftest*
16833   ol_cv_db_db42=no
16834 fi
16835 rm -f conftest*
16836
16837         LIBS="$ol_LIBS"
16838
16839 fi
16840
16841 echo "$ac_t""$ol_cv_db_db42" 1>&6
16842
16843         if test $ol_cv_db_db42 = yes ; then
16844                 ol_cv_lib_db=-ldb42
16845         fi
16846 fi
16847
16848 if test $ol_cv_lib_db = no ; then
16849         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16850 echo "configure:16851: checking for Berkeley DB link (-ldb-42)" >&5
16851 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16852   echo $ac_n "(cached) $ac_c" 1>&6
16853 else
16854   
16855         ol_DB_LIB=-ldb-42
16856         ol_LIBS=$LIBS
16857         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16858
16859         cat > conftest.$ac_ext <<EOF
16860 #line 16861 "configure"
16861 #include "confdefs.h"
16862
16863 #ifdef HAVE_DB_185_H
16864 # include <db_185.h>
16865 #else
16866 # include <db.h>
16867 #endif
16868
16869 #ifndef DB_VERSION_MAJOR
16870 # define DB_VERSION_MAJOR 1
16871 #endif
16872
16873 #ifndef NULL
16874 #define NULL ((void*)0)
16875 #endif
16876
16877 int main() {
16878
16879 #if DB_VERSION_MAJOR > 1
16880         {
16881                 char *version;
16882                 int major, minor, patch;
16883
16884                 version = db_version( &major, &minor, &patch );
16885
16886                 if( major != DB_VERSION_MAJOR ||
16887                         minor < DB_VERSION_MINOR )
16888                 {
16889                         printf("Berkeley DB version mismatch\n"
16890                                 "\texpected: %s\n\tgot: %s\n",
16891                                 DB_VERSION_STRING, version);
16892                         return 1;
16893                 }
16894         }
16895 #endif
16896
16897 #if DB_VERSION_MAJOR > 2
16898         db_env_create( NULL, 0 );
16899 #elif DB_VERSION_MAJOR > 1
16900         db_appexit( NULL );
16901 #else
16902         (void) dbopen( NULL, 0, 0, 0, NULL);
16903 #endif
16904
16905 ; return 0; }
16906 EOF
16907 if { (eval echo configure:16908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16908   rm -rf conftest*
16909   ol_cv_db_db_42=yes
16910 else
16911   echo "configure: failed program was:" >&5
16912   cat conftest.$ac_ext >&5
16913   rm -rf conftest*
16914   ol_cv_db_db_42=no
16915 fi
16916 rm -f conftest*
16917
16918         LIBS="$ol_LIBS"
16919
16920 fi
16921
16922 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16923
16924         if test $ol_cv_db_db_42 = yes ; then
16925                 ol_cv_lib_db=-ldb-42
16926         fi
16927 fi
16928
16929 if test $ol_cv_lib_db = no ; then
16930         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16931 echo "configure:16932: checking for Berkeley DB link (-ldb-4.2)" >&5
16932 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16933   echo $ac_n "(cached) $ac_c" 1>&6
16934 else
16935   
16936         ol_DB_LIB=-ldb-4.2
16937         ol_LIBS=$LIBS
16938         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16939
16940         cat > conftest.$ac_ext <<EOF
16941 #line 16942 "configure"
16942 #include "confdefs.h"
16943
16944 #ifdef HAVE_DB_185_H
16945 # include <db_185.h>
16946 #else
16947 # include <db.h>
16948 #endif
16949
16950 #ifndef DB_VERSION_MAJOR
16951 # define DB_VERSION_MAJOR 1
16952 #endif
16953
16954 #ifndef NULL
16955 #define NULL ((void*)0)
16956 #endif
16957
16958 int main() {
16959
16960 #if DB_VERSION_MAJOR > 1
16961         {
16962                 char *version;
16963                 int major, minor, patch;
16964
16965                 version = db_version( &major, &minor, &patch );
16966
16967                 if( major != DB_VERSION_MAJOR ||
16968                         minor < DB_VERSION_MINOR )
16969                 {
16970                         printf("Berkeley DB version mismatch\n"
16971                                 "\texpected: %s\n\tgot: %s\n",
16972                                 DB_VERSION_STRING, version);
16973                         return 1;
16974                 }
16975         }
16976 #endif
16977
16978 #if DB_VERSION_MAJOR > 2
16979         db_env_create( NULL, 0 );
16980 #elif DB_VERSION_MAJOR > 1
16981         db_appexit( NULL );
16982 #else
16983         (void) dbopen( NULL, 0, 0, 0, NULL);
16984 #endif
16985
16986 ; return 0; }
16987 EOF
16988 if { (eval echo configure:16989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16989   rm -rf conftest*
16990   ol_cv_db_db_4_dot_2=yes
16991 else
16992   echo "configure: failed program was:" >&5
16993   cat conftest.$ac_ext >&5
16994   rm -rf conftest*
16995   ol_cv_db_db_4_dot_2=no
16996 fi
16997 rm -f conftest*
16998
16999         LIBS="$ol_LIBS"
17000
17001 fi
17002
17003 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17004
17005         if test $ol_cv_db_db_4_dot_2 = yes ; then
17006                 ol_cv_lib_db=-ldb-4.2
17007         fi
17008 fi
17009
17010 if test $ol_cv_lib_db = no ; then
17011         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17012 echo "configure:17013: checking for Berkeley DB link (-ldb-4-2)" >&5
17013 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17014   echo $ac_n "(cached) $ac_c" 1>&6
17015 else
17016   
17017         ol_DB_LIB=-ldb-4-2
17018         ol_LIBS=$LIBS
17019         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17020
17021         cat > conftest.$ac_ext <<EOF
17022 #line 17023 "configure"
17023 #include "confdefs.h"
17024
17025 #ifdef HAVE_DB_185_H
17026 # include <db_185.h>
17027 #else
17028 # include <db.h>
17029 #endif
17030
17031 #ifndef DB_VERSION_MAJOR
17032 # define DB_VERSION_MAJOR 1
17033 #endif
17034
17035 #ifndef NULL
17036 #define NULL ((void*)0)
17037 #endif
17038
17039 int main() {
17040
17041 #if DB_VERSION_MAJOR > 1
17042         {
17043                 char *version;
17044                 int major, minor, patch;
17045
17046                 version = db_version( &major, &minor, &patch );
17047
17048                 if( major != DB_VERSION_MAJOR ||
17049                         minor < DB_VERSION_MINOR )
17050                 {
17051                         printf("Berkeley DB version mismatch\n"
17052                                 "\texpected: %s\n\tgot: %s\n",
17053                                 DB_VERSION_STRING, version);
17054                         return 1;
17055                 }
17056         }
17057 #endif
17058
17059 #if DB_VERSION_MAJOR > 2
17060         db_env_create( NULL, 0 );
17061 #elif DB_VERSION_MAJOR > 1
17062         db_appexit( NULL );
17063 #else
17064         (void) dbopen( NULL, 0, 0, 0, NULL);
17065 #endif
17066
17067 ; return 0; }
17068 EOF
17069 if { (eval echo configure:17070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17070   rm -rf conftest*
17071   ol_cv_db_db_4_2=yes
17072 else
17073   echo "configure: failed program was:" >&5
17074   cat conftest.$ac_ext >&5
17075   rm -rf conftest*
17076   ol_cv_db_db_4_2=no
17077 fi
17078 rm -f conftest*
17079
17080         LIBS="$ol_LIBS"
17081
17082 fi
17083
17084 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17085
17086         if test $ol_cv_db_db_4_2 = yes ; then
17087                 ol_cv_lib_db=-ldb-4-2
17088         fi
17089 fi
17090
17091 if test $ol_cv_lib_db = no ; then
17092         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17093 echo "configure:17094: checking for Berkeley DB link (-ldb-4)" >&5
17094 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17095   echo $ac_n "(cached) $ac_c" 1>&6
17096 else
17097   
17098         ol_DB_LIB=-ldb-4
17099         ol_LIBS=$LIBS
17100         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17101
17102         cat > conftest.$ac_ext <<EOF
17103 #line 17104 "configure"
17104 #include "confdefs.h"
17105
17106 #ifdef HAVE_DB_185_H
17107 # include <db_185.h>
17108 #else
17109 # include <db.h>
17110 #endif
17111
17112 #ifndef DB_VERSION_MAJOR
17113 # define DB_VERSION_MAJOR 1
17114 #endif
17115
17116 #ifndef NULL
17117 #define NULL ((void*)0)
17118 #endif
17119
17120 int main() {
17121
17122 #if DB_VERSION_MAJOR > 1
17123         {
17124                 char *version;
17125                 int major, minor, patch;
17126
17127                 version = db_version( &major, &minor, &patch );
17128
17129                 if( major != DB_VERSION_MAJOR ||
17130                         minor < DB_VERSION_MINOR )
17131                 {
17132                         printf("Berkeley DB version mismatch\n"
17133                                 "\texpected: %s\n\tgot: %s\n",
17134                                 DB_VERSION_STRING, version);
17135                         return 1;
17136                 }
17137         }
17138 #endif
17139
17140 #if DB_VERSION_MAJOR > 2
17141         db_env_create( NULL, 0 );
17142 #elif DB_VERSION_MAJOR > 1
17143         db_appexit( NULL );
17144 #else
17145         (void) dbopen( NULL, 0, 0, 0, NULL);
17146 #endif
17147
17148 ; return 0; }
17149 EOF
17150 if { (eval echo configure:17151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17151   rm -rf conftest*
17152   ol_cv_db_db_4=yes
17153 else
17154   echo "configure: failed program was:" >&5
17155   cat conftest.$ac_ext >&5
17156   rm -rf conftest*
17157   ol_cv_db_db_4=no
17158 fi
17159 rm -f conftest*
17160
17161         LIBS="$ol_LIBS"
17162
17163 fi
17164
17165 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17166
17167         if test $ol_cv_db_db_4 = yes ; then
17168                 ol_cv_lib_db=-ldb-4
17169         fi
17170 fi
17171
17172 if test $ol_cv_lib_db = no ; then
17173         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17174 echo "configure:17175: checking for Berkeley DB link (-ldb4)" >&5
17175 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17176   echo $ac_n "(cached) $ac_c" 1>&6
17177 else
17178   
17179         ol_DB_LIB=-ldb4
17180         ol_LIBS=$LIBS
17181         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17182
17183         cat > conftest.$ac_ext <<EOF
17184 #line 17185 "configure"
17185 #include "confdefs.h"
17186
17187 #ifdef HAVE_DB_185_H
17188 # include <db_185.h>
17189 #else
17190 # include <db.h>
17191 #endif
17192
17193 #ifndef DB_VERSION_MAJOR
17194 # define DB_VERSION_MAJOR 1
17195 #endif
17196
17197 #ifndef NULL
17198 #define NULL ((void*)0)
17199 #endif
17200
17201 int main() {
17202
17203 #if DB_VERSION_MAJOR > 1
17204         {
17205                 char *version;
17206                 int major, minor, patch;
17207
17208                 version = db_version( &major, &minor, &patch );
17209
17210                 if( major != DB_VERSION_MAJOR ||
17211                         minor < DB_VERSION_MINOR )
17212                 {
17213                         printf("Berkeley DB version mismatch\n"
17214                                 "\texpected: %s\n\tgot: %s\n",
17215                                 DB_VERSION_STRING, version);
17216                         return 1;
17217                 }
17218         }
17219 #endif
17220
17221 #if DB_VERSION_MAJOR > 2
17222         db_env_create( NULL, 0 );
17223 #elif DB_VERSION_MAJOR > 1
17224         db_appexit( NULL );
17225 #else
17226         (void) dbopen( NULL, 0, 0, 0, NULL);
17227 #endif
17228
17229 ; return 0; }
17230 EOF
17231 if { (eval echo configure:17232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17232   rm -rf conftest*
17233   ol_cv_db_db4=yes
17234 else
17235   echo "configure: failed program was:" >&5
17236   cat conftest.$ac_ext >&5
17237   rm -rf conftest*
17238   ol_cv_db_db4=no
17239 fi
17240 rm -f conftest*
17241
17242         LIBS="$ol_LIBS"
17243
17244 fi
17245
17246 echo "$ac_t""$ol_cv_db_db4" 1>&6
17247
17248         if test $ol_cv_db_db4 = yes ; then
17249                 ol_cv_lib_db=-ldb4
17250         fi
17251 fi
17252
17253 if test $ol_cv_lib_db = no ; then
17254         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17255 echo "configure:17256: checking for Berkeley DB link (-ldb)" >&5
17256 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17257   echo $ac_n "(cached) $ac_c" 1>&6
17258 else
17259   
17260         ol_DB_LIB=-ldb
17261         ol_LIBS=$LIBS
17262         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17263
17264         cat > conftest.$ac_ext <<EOF
17265 #line 17266 "configure"
17266 #include "confdefs.h"
17267
17268 #ifdef HAVE_DB_185_H
17269 # include <db_185.h>
17270 #else
17271 # include <db.h>
17272 #endif
17273
17274 #ifndef DB_VERSION_MAJOR
17275 # define DB_VERSION_MAJOR 1
17276 #endif
17277
17278 #ifndef NULL
17279 #define NULL ((void*)0)
17280 #endif
17281
17282 int main() {
17283
17284 #if DB_VERSION_MAJOR > 1
17285         {
17286                 char *version;
17287                 int major, minor, patch;
17288
17289                 version = db_version( &major, &minor, &patch );
17290
17291                 if( major != DB_VERSION_MAJOR ||
17292                         minor < DB_VERSION_MINOR )
17293                 {
17294                         printf("Berkeley DB version mismatch\n"
17295                                 "\texpected: %s\n\tgot: %s\n",
17296                                 DB_VERSION_STRING, version);
17297                         return 1;
17298                 }
17299         }
17300 #endif
17301
17302 #if DB_VERSION_MAJOR > 2
17303         db_env_create( NULL, 0 );
17304 #elif DB_VERSION_MAJOR > 1
17305         db_appexit( NULL );
17306 #else
17307         (void) dbopen( NULL, 0, 0, 0, NULL);
17308 #endif
17309
17310 ; return 0; }
17311 EOF
17312 if { (eval echo configure:17313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17313   rm -rf conftest*
17314   ol_cv_db_db=yes
17315 else
17316   echo "configure: failed program was:" >&5
17317   cat conftest.$ac_ext >&5
17318   rm -rf conftest*
17319   ol_cv_db_db=no
17320 fi
17321 rm -f conftest*
17322
17323         LIBS="$ol_LIBS"
17324
17325 fi
17326
17327 echo "$ac_t""$ol_cv_db_db" 1>&6
17328
17329         if test $ol_cv_db_db = yes ; then
17330                 ol_cv_lib_db=-ldb
17331         fi
17332 fi
17333
17334 if test $ol_cv_lib_db = no ; then
17335         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17336 echo "configure:17337: checking for Berkeley DB link (-ldb41)" >&5
17337 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17338   echo $ac_n "(cached) $ac_c" 1>&6
17339 else
17340   
17341         ol_DB_LIB=-ldb41
17342         ol_LIBS=$LIBS
17343         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17344
17345         cat > conftest.$ac_ext <<EOF
17346 #line 17347 "configure"
17347 #include "confdefs.h"
17348
17349 #ifdef HAVE_DB_185_H
17350 # include <db_185.h>
17351 #else
17352 # include <db.h>
17353 #endif
17354
17355 #ifndef DB_VERSION_MAJOR
17356 # define DB_VERSION_MAJOR 1
17357 #endif
17358
17359 #ifndef NULL
17360 #define NULL ((void*)0)
17361 #endif
17362
17363 int main() {
17364
17365 #if DB_VERSION_MAJOR > 1
17366         {
17367                 char *version;
17368                 int major, minor, patch;
17369
17370                 version = db_version( &major, &minor, &patch );
17371
17372                 if( major != DB_VERSION_MAJOR ||
17373                         minor < DB_VERSION_MINOR )
17374                 {
17375                         printf("Berkeley DB version mismatch\n"
17376                                 "\texpected: %s\n\tgot: %s\n",
17377                                 DB_VERSION_STRING, version);
17378                         return 1;
17379                 }
17380         }
17381 #endif
17382
17383 #if DB_VERSION_MAJOR > 2
17384         db_env_create( NULL, 0 );
17385 #elif DB_VERSION_MAJOR > 1
17386         db_appexit( NULL );
17387 #else
17388         (void) dbopen( NULL, 0, 0, 0, NULL);
17389 #endif
17390
17391 ; return 0; }
17392 EOF
17393 if { (eval echo configure:17394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17394   rm -rf conftest*
17395   ol_cv_db_db41=yes
17396 else
17397   echo "configure: failed program was:" >&5
17398   cat conftest.$ac_ext >&5
17399   rm -rf conftest*
17400   ol_cv_db_db41=no
17401 fi
17402 rm -f conftest*
17403
17404         LIBS="$ol_LIBS"
17405
17406 fi
17407
17408 echo "$ac_t""$ol_cv_db_db41" 1>&6
17409
17410         if test $ol_cv_db_db41 = yes ; then
17411                 ol_cv_lib_db=-ldb41
17412         fi
17413 fi
17414
17415 if test $ol_cv_lib_db = no ; then
17416         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17417 echo "configure:17418: checking for Berkeley DB link (-ldb-41)" >&5
17418 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17419   echo $ac_n "(cached) $ac_c" 1>&6
17420 else
17421   
17422         ol_DB_LIB=-ldb-41
17423         ol_LIBS=$LIBS
17424         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17425
17426         cat > conftest.$ac_ext <<EOF
17427 #line 17428 "configure"
17428 #include "confdefs.h"
17429
17430 #ifdef HAVE_DB_185_H
17431 # include <db_185.h>
17432 #else
17433 # include <db.h>
17434 #endif
17435
17436 #ifndef DB_VERSION_MAJOR
17437 # define DB_VERSION_MAJOR 1
17438 #endif
17439
17440 #ifndef NULL
17441 #define NULL ((void*)0)
17442 #endif
17443
17444 int main() {
17445
17446 #if DB_VERSION_MAJOR > 1
17447         {
17448                 char *version;
17449                 int major, minor, patch;
17450
17451                 version = db_version( &major, &minor, &patch );
17452
17453                 if( major != DB_VERSION_MAJOR ||
17454                         minor < DB_VERSION_MINOR )
17455                 {
17456                         printf("Berkeley DB version mismatch\n"
17457                                 "\texpected: %s\n\tgot: %s\n",
17458                                 DB_VERSION_STRING, version);
17459                         return 1;
17460                 }
17461         }
17462 #endif
17463
17464 #if DB_VERSION_MAJOR > 2
17465         db_env_create( NULL, 0 );
17466 #elif DB_VERSION_MAJOR > 1
17467         db_appexit( NULL );
17468 #else
17469         (void) dbopen( NULL, 0, 0, 0, NULL);
17470 #endif
17471
17472 ; return 0; }
17473 EOF
17474 if { (eval echo configure:17475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17475   rm -rf conftest*
17476   ol_cv_db_db_41=yes
17477 else
17478   echo "configure: failed program was:" >&5
17479   cat conftest.$ac_ext >&5
17480   rm -rf conftest*
17481   ol_cv_db_db_41=no
17482 fi
17483 rm -f conftest*
17484
17485         LIBS="$ol_LIBS"
17486
17487 fi
17488
17489 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17490
17491         if test $ol_cv_db_db_41 = yes ; then
17492                 ol_cv_lib_db=-ldb-41
17493         fi
17494 fi
17495
17496 if test $ol_cv_lib_db = no ; then
17497         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17498 echo "configure:17499: checking for Berkeley DB link (-ldb-4.1)" >&5
17499 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17500   echo $ac_n "(cached) $ac_c" 1>&6
17501 else
17502   
17503         ol_DB_LIB=-ldb-4.1
17504         ol_LIBS=$LIBS
17505         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17506
17507         cat > conftest.$ac_ext <<EOF
17508 #line 17509 "configure"
17509 #include "confdefs.h"
17510
17511 #ifdef HAVE_DB_185_H
17512 # include <db_185.h>
17513 #else
17514 # include <db.h>
17515 #endif
17516
17517 #ifndef DB_VERSION_MAJOR
17518 # define DB_VERSION_MAJOR 1
17519 #endif
17520
17521 #ifndef NULL
17522 #define NULL ((void*)0)
17523 #endif
17524
17525 int main() {
17526
17527 #if DB_VERSION_MAJOR > 1
17528         {
17529                 char *version;
17530                 int major, minor, patch;
17531
17532                 version = db_version( &major, &minor, &patch );
17533
17534                 if( major != DB_VERSION_MAJOR ||
17535                         minor < DB_VERSION_MINOR )
17536                 {
17537                         printf("Berkeley DB version mismatch\n"
17538                                 "\texpected: %s\n\tgot: %s\n",
17539                                 DB_VERSION_STRING, version);
17540                         return 1;
17541                 }
17542         }
17543 #endif
17544
17545 #if DB_VERSION_MAJOR > 2
17546         db_env_create( NULL, 0 );
17547 #elif DB_VERSION_MAJOR > 1
17548         db_appexit( NULL );
17549 #else
17550         (void) dbopen( NULL, 0, 0, 0, NULL);
17551 #endif
17552
17553 ; return 0; }
17554 EOF
17555 if { (eval echo configure:17556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17556   rm -rf conftest*
17557   ol_cv_db_db_4_dot_1=yes
17558 else
17559   echo "configure: failed program was:" >&5
17560   cat conftest.$ac_ext >&5
17561   rm -rf conftest*
17562   ol_cv_db_db_4_dot_1=no
17563 fi
17564 rm -f conftest*
17565
17566         LIBS="$ol_LIBS"
17567
17568 fi
17569
17570 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17571
17572         if test $ol_cv_db_db_4_dot_1 = yes ; then
17573                 ol_cv_lib_db=-ldb-4.1
17574         fi
17575 fi
17576
17577 if test $ol_cv_lib_db = no ; then
17578         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17579 echo "configure:17580: checking for Berkeley DB link (-ldb-4-1)" >&5
17580 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17581   echo $ac_n "(cached) $ac_c" 1>&6
17582 else
17583   
17584         ol_DB_LIB=-ldb-4-1
17585         ol_LIBS=$LIBS
17586         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17587
17588         cat > conftest.$ac_ext <<EOF
17589 #line 17590 "configure"
17590 #include "confdefs.h"
17591
17592 #ifdef HAVE_DB_185_H
17593 # include <db_185.h>
17594 #else
17595 # include <db.h>
17596 #endif
17597
17598 #ifndef DB_VERSION_MAJOR
17599 # define DB_VERSION_MAJOR 1
17600 #endif
17601
17602 #ifndef NULL
17603 #define NULL ((void*)0)
17604 #endif
17605
17606 int main() {
17607
17608 #if DB_VERSION_MAJOR > 1
17609         {
17610                 char *version;
17611                 int major, minor, patch;
17612
17613                 version = db_version( &major, &minor, &patch );
17614
17615                 if( major != DB_VERSION_MAJOR ||
17616                         minor < DB_VERSION_MINOR )
17617                 {
17618                         printf("Berkeley DB version mismatch\n"
17619                                 "\texpected: %s\n\tgot: %s\n",
17620                                 DB_VERSION_STRING, version);
17621                         return 1;
17622                 }
17623         }
17624 #endif
17625
17626 #if DB_VERSION_MAJOR > 2
17627         db_env_create( NULL, 0 );
17628 #elif DB_VERSION_MAJOR > 1
17629         db_appexit( NULL );
17630 #else
17631         (void) dbopen( NULL, 0, 0, 0, NULL);
17632 #endif
17633
17634 ; return 0; }
17635 EOF
17636 if { (eval echo configure:17637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17637   rm -rf conftest*
17638   ol_cv_db_db_4_1=yes
17639 else
17640   echo "configure: failed program was:" >&5
17641   cat conftest.$ac_ext >&5
17642   rm -rf conftest*
17643   ol_cv_db_db_4_1=no
17644 fi
17645 rm -f conftest*
17646
17647         LIBS="$ol_LIBS"
17648
17649 fi
17650
17651 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17652
17653         if test $ol_cv_db_db_4_1 = yes ; then
17654                 ol_cv_lib_db=-ldb-4-1
17655         fi
17656 fi
17657
17658 if test $ol_cv_lib_db = no ; then
17659         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17660 echo "configure:17661: checking for Berkeley DB link (-ldb3)" >&5
17661 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17662   echo $ac_n "(cached) $ac_c" 1>&6
17663 else
17664   
17665         ol_DB_LIB=-ldb3
17666         ol_LIBS=$LIBS
17667         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17668
17669         cat > conftest.$ac_ext <<EOF
17670 #line 17671 "configure"
17671 #include "confdefs.h"
17672
17673 #ifdef HAVE_DB_185_H
17674 # include <db_185.h>
17675 #else
17676 # include <db.h>
17677 #endif
17678
17679 #ifndef DB_VERSION_MAJOR
17680 # define DB_VERSION_MAJOR 1
17681 #endif
17682
17683 #ifndef NULL
17684 #define NULL ((void*)0)
17685 #endif
17686
17687 int main() {
17688
17689 #if DB_VERSION_MAJOR > 1
17690         {
17691                 char *version;
17692                 int major, minor, patch;
17693
17694                 version = db_version( &major, &minor, &patch );
17695
17696                 if( major != DB_VERSION_MAJOR ||
17697                         minor < DB_VERSION_MINOR )
17698                 {
17699                         printf("Berkeley DB version mismatch\n"
17700                                 "\texpected: %s\n\tgot: %s\n",
17701                                 DB_VERSION_STRING, version);
17702                         return 1;
17703                 }
17704         }
17705 #endif
17706
17707 #if DB_VERSION_MAJOR > 2
17708         db_env_create( NULL, 0 );
17709 #elif DB_VERSION_MAJOR > 1
17710         db_appexit( NULL );
17711 #else
17712         (void) dbopen( NULL, 0, 0, 0, NULL);
17713 #endif
17714
17715 ; return 0; }
17716 EOF
17717 if { (eval echo configure:17718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17718   rm -rf conftest*
17719   ol_cv_db_db3=yes
17720 else
17721   echo "configure: failed program was:" >&5
17722   cat conftest.$ac_ext >&5
17723   rm -rf conftest*
17724   ol_cv_db_db3=no
17725 fi
17726 rm -f conftest*
17727
17728         LIBS="$ol_LIBS"
17729
17730 fi
17731
17732 echo "$ac_t""$ol_cv_db_db3" 1>&6
17733
17734         if test $ol_cv_db_db3 = yes ; then
17735                 ol_cv_lib_db=-ldb3
17736         fi
17737 fi
17738
17739 if test $ol_cv_lib_db = no ; then
17740         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17741 echo "configure:17742: checking for Berkeley DB link (-ldb-3)" >&5
17742 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17743   echo $ac_n "(cached) $ac_c" 1>&6
17744 else
17745   
17746         ol_DB_LIB=-ldb-3
17747         ol_LIBS=$LIBS
17748         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17749
17750         cat > conftest.$ac_ext <<EOF
17751 #line 17752 "configure"
17752 #include "confdefs.h"
17753
17754 #ifdef HAVE_DB_185_H
17755 # include <db_185.h>
17756 #else
17757 # include <db.h>
17758 #endif
17759
17760 #ifndef DB_VERSION_MAJOR
17761 # define DB_VERSION_MAJOR 1
17762 #endif
17763
17764 #ifndef NULL
17765 #define NULL ((void*)0)
17766 #endif
17767
17768 int main() {
17769
17770 #if DB_VERSION_MAJOR > 1
17771         {
17772                 char *version;
17773                 int major, minor, patch;
17774
17775                 version = db_version( &major, &minor, &patch );
17776
17777                 if( major != DB_VERSION_MAJOR ||
17778                         minor < DB_VERSION_MINOR )
17779                 {
17780                         printf("Berkeley DB version mismatch\n"
17781                                 "\texpected: %s\n\tgot: %s\n",
17782                                 DB_VERSION_STRING, version);
17783                         return 1;
17784                 }
17785         }
17786 #endif
17787
17788 #if DB_VERSION_MAJOR > 2
17789         db_env_create( NULL, 0 );
17790 #elif DB_VERSION_MAJOR > 1
17791         db_appexit( NULL );
17792 #else
17793         (void) dbopen( NULL, 0, 0, 0, NULL);
17794 #endif
17795
17796 ; return 0; }
17797 EOF
17798 if { (eval echo configure:17799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17799   rm -rf conftest*
17800   ol_cv_db_db_3=yes
17801 else
17802   echo "configure: failed program was:" >&5
17803   cat conftest.$ac_ext >&5
17804   rm -rf conftest*
17805   ol_cv_db_db_3=no
17806 fi
17807 rm -f conftest*
17808
17809         LIBS="$ol_LIBS"
17810
17811 fi
17812
17813 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17814
17815         if test $ol_cv_db_db_3 = yes ; then
17816                 ol_cv_lib_db=-ldb-3
17817         fi
17818 fi
17819
17820 if test $ol_cv_lib_db = no ; then
17821         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17822 echo "configure:17823: checking for Berkeley DB link (-ldb2)" >&5
17823 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17824   echo $ac_n "(cached) $ac_c" 1>&6
17825 else
17826   
17827         ol_DB_LIB=-ldb2
17828         ol_LIBS=$LIBS
17829         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17830
17831         cat > conftest.$ac_ext <<EOF
17832 #line 17833 "configure"
17833 #include "confdefs.h"
17834
17835 #ifdef HAVE_DB_185_H
17836 # include <db_185.h>
17837 #else
17838 # include <db.h>
17839 #endif
17840
17841 #ifndef DB_VERSION_MAJOR
17842 # define DB_VERSION_MAJOR 1
17843 #endif
17844
17845 #ifndef NULL
17846 #define NULL ((void*)0)
17847 #endif
17848
17849 int main() {
17850
17851 #if DB_VERSION_MAJOR > 1
17852         {
17853                 char *version;
17854                 int major, minor, patch;
17855
17856                 version = db_version( &major, &minor, &patch );
17857
17858                 if( major != DB_VERSION_MAJOR ||
17859                         minor < DB_VERSION_MINOR )
17860                 {
17861                         printf("Berkeley DB version mismatch\n"
17862                                 "\texpected: %s\n\tgot: %s\n",
17863                                 DB_VERSION_STRING, version);
17864                         return 1;
17865                 }
17866         }
17867 #endif
17868
17869 #if DB_VERSION_MAJOR > 2
17870         db_env_create( NULL, 0 );
17871 #elif DB_VERSION_MAJOR > 1
17872         db_appexit( NULL );
17873 #else
17874         (void) dbopen( NULL, 0, 0, 0, NULL);
17875 #endif
17876
17877 ; return 0; }
17878 EOF
17879 if { (eval echo configure:17880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17880   rm -rf conftest*
17881   ol_cv_db_db2=yes
17882 else
17883   echo "configure: failed program was:" >&5
17884   cat conftest.$ac_ext >&5
17885   rm -rf conftest*
17886   ol_cv_db_db2=no
17887 fi
17888 rm -f conftest*
17889
17890         LIBS="$ol_LIBS"
17891
17892 fi
17893
17894 echo "$ac_t""$ol_cv_db_db2" 1>&6
17895
17896         if test $ol_cv_db_db2 = yes ; then
17897                 ol_cv_lib_db=-ldb2
17898         fi
17899 fi
17900
17901 if test $ol_cv_lib_db = no ; then
17902         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17903 echo "configure:17904: checking for Berkeley DB link (-ldb-2)" >&5
17904 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17905   echo $ac_n "(cached) $ac_c" 1>&6
17906 else
17907   
17908         ol_DB_LIB=-ldb-2
17909         ol_LIBS=$LIBS
17910         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17911
17912         cat > conftest.$ac_ext <<EOF
17913 #line 17914 "configure"
17914 #include "confdefs.h"
17915
17916 #ifdef HAVE_DB_185_H
17917 # include <db_185.h>
17918 #else
17919 # include <db.h>
17920 #endif
17921
17922 #ifndef DB_VERSION_MAJOR
17923 # define DB_VERSION_MAJOR 1
17924 #endif
17925
17926 #ifndef NULL
17927 #define NULL ((void*)0)
17928 #endif
17929
17930 int main() {
17931
17932 #if DB_VERSION_MAJOR > 1
17933         {
17934                 char *version;
17935                 int major, minor, patch;
17936
17937                 version = db_version( &major, &minor, &patch );
17938
17939                 if( major != DB_VERSION_MAJOR ||
17940                         minor < DB_VERSION_MINOR )
17941                 {
17942                         printf("Berkeley DB version mismatch\n"
17943                                 "\texpected: %s\n\tgot: %s\n",
17944                                 DB_VERSION_STRING, version);
17945                         return 1;
17946                 }
17947         }
17948 #endif
17949
17950 #if DB_VERSION_MAJOR > 2
17951         db_env_create( NULL, 0 );
17952 #elif DB_VERSION_MAJOR > 1
17953         db_appexit( NULL );
17954 #else
17955         (void) dbopen( NULL, 0, 0, 0, NULL);
17956 #endif
17957
17958 ; return 0; }
17959 EOF
17960 if { (eval echo configure:17961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17961   rm -rf conftest*
17962   ol_cv_db_db_2=yes
17963 else
17964   echo "configure: failed program was:" >&5
17965   cat conftest.$ac_ext >&5
17966   rm -rf conftest*
17967   ol_cv_db_db_2=no
17968 fi
17969 rm -f conftest*
17970
17971         LIBS="$ol_LIBS"
17972
17973 fi
17974
17975 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17976
17977         if test $ol_cv_db_db_2 = yes ; then
17978                 ol_cv_lib_db=-ldb-2
17979         fi
17980 fi
17981
17982 if test $ol_cv_lib_db = no ; then
17983         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17984 echo "configure:17985: checking for Berkeley DB link (-ldb1)" >&5
17985 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17986   echo $ac_n "(cached) $ac_c" 1>&6
17987 else
17988   
17989         ol_DB_LIB=-ldb1
17990         ol_LIBS=$LIBS
17991         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17992
17993         cat > conftest.$ac_ext <<EOF
17994 #line 17995 "configure"
17995 #include "confdefs.h"
17996
17997 #ifdef HAVE_DB_185_H
17998 # include <db_185.h>
17999 #else
18000 # include <db.h>
18001 #endif
18002
18003 #ifndef DB_VERSION_MAJOR
18004 # define DB_VERSION_MAJOR 1
18005 #endif
18006
18007 #ifndef NULL
18008 #define NULL ((void*)0)
18009 #endif
18010
18011 int main() {
18012
18013 #if DB_VERSION_MAJOR > 1
18014         {
18015                 char *version;
18016                 int major, minor, patch;
18017
18018                 version = db_version( &major, &minor, &patch );
18019
18020                 if( major != DB_VERSION_MAJOR ||
18021                         minor < DB_VERSION_MINOR )
18022                 {
18023                         printf("Berkeley DB version mismatch\n"
18024                                 "\texpected: %s\n\tgot: %s\n",
18025                                 DB_VERSION_STRING, version);
18026                         return 1;
18027                 }
18028         }
18029 #endif
18030
18031 #if DB_VERSION_MAJOR > 2
18032         db_env_create( NULL, 0 );
18033 #elif DB_VERSION_MAJOR > 1
18034         db_appexit( NULL );
18035 #else
18036         (void) dbopen( NULL, 0, 0, 0, NULL);
18037 #endif
18038
18039 ; return 0; }
18040 EOF
18041 if { (eval echo configure:18042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18042   rm -rf conftest*
18043   ol_cv_db_db1=yes
18044 else
18045   echo "configure: failed program was:" >&5
18046   cat conftest.$ac_ext >&5
18047   rm -rf conftest*
18048   ol_cv_db_db1=no
18049 fi
18050 rm -f conftest*
18051
18052         LIBS="$ol_LIBS"
18053
18054 fi
18055
18056 echo "$ac_t""$ol_cv_db_db1" 1>&6
18057
18058         if test $ol_cv_db_db1 = yes ; then
18059                 ol_cv_lib_db=-ldb1
18060         fi
18061 fi
18062
18063 if test $ol_cv_lib_db = no ; then
18064         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18065 echo "configure:18066: checking for Berkeley DB link (-ldb-1)" >&5
18066 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18067   echo $ac_n "(cached) $ac_c" 1>&6
18068 else
18069   
18070         ol_DB_LIB=-ldb-1
18071         ol_LIBS=$LIBS
18072         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18073
18074         cat > conftest.$ac_ext <<EOF
18075 #line 18076 "configure"
18076 #include "confdefs.h"
18077
18078 #ifdef HAVE_DB_185_H
18079 # include <db_185.h>
18080 #else
18081 # include <db.h>
18082 #endif
18083
18084 #ifndef DB_VERSION_MAJOR
18085 # define DB_VERSION_MAJOR 1
18086 #endif
18087
18088 #ifndef NULL
18089 #define NULL ((void*)0)
18090 #endif
18091
18092 int main() {
18093
18094 #if DB_VERSION_MAJOR > 1
18095         {
18096                 char *version;
18097                 int major, minor, patch;
18098
18099                 version = db_version( &major, &minor, &patch );
18100
18101                 if( major != DB_VERSION_MAJOR ||
18102                         minor < DB_VERSION_MINOR )
18103                 {
18104                         printf("Berkeley DB version mismatch\n"
18105                                 "\texpected: %s\n\tgot: %s\n",
18106                                 DB_VERSION_STRING, version);
18107                         return 1;
18108                 }
18109         }
18110 #endif
18111
18112 #if DB_VERSION_MAJOR > 2
18113         db_env_create( NULL, 0 );
18114 #elif DB_VERSION_MAJOR > 1
18115         db_appexit( NULL );
18116 #else
18117         (void) dbopen( NULL, 0, 0, 0, NULL);
18118 #endif
18119
18120 ; return 0; }
18121 EOF
18122 if { (eval echo configure:18123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18123   rm -rf conftest*
18124   ol_cv_db_db_1=yes
18125 else
18126   echo "configure: failed program was:" >&5
18127   cat conftest.$ac_ext >&5
18128   rm -rf conftest*
18129   ol_cv_db_db_1=no
18130 fi
18131 rm -f conftest*
18132
18133         LIBS="$ol_LIBS"
18134
18135 fi
18136
18137 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18138
18139         if test $ol_cv_db_db_1 = yes ; then
18140                 ol_cv_lib_db=-ldb-1
18141         fi
18142 fi
18143
18144
18145                 if test "$ol_cv_lib_db" != no ; then
18146                         ol_cv_berkeley_db=yes
18147                 fi
18148         fi
18149 fi
18150
18151         else
18152                 ol_cv_berkeley_db=no
18153 for ac_hdr in db.h
18154 do
18155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18157 echo "configure:18158: checking for $ac_hdr" >&5
18158 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   cat > conftest.$ac_ext <<EOF
18162 #line 18163 "configure"
18163 #include "confdefs.h"
18164 #include <$ac_hdr>
18165 EOF
18166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18167 { (eval echo configure:18168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18169 if test -z "$ac_err"; then
18170   rm -rf conftest*
18171   eval "ac_cv_header_$ac_safe=yes"
18172 else
18173   echo "$ac_err" >&5
18174   echo "configure: failed program was:" >&5
18175   cat conftest.$ac_ext >&5
18176   rm -rf conftest*
18177   eval "ac_cv_header_$ac_safe=no"
18178 fi
18179 rm -f conftest*
18180 fi
18181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18182   echo "$ac_t""yes" 1>&6
18183     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18184   cat >> confdefs.h <<EOF
18185 #define $ac_tr_hdr 1
18186 EOF
18187  
18188 else
18189   echo "$ac_t""no" 1>&6
18190 fi
18191 done
18192
18193 if test $ac_cv_header_db_h = yes; then
18194         ol_cv_lib_db=no
18195 if test $ol_cv_lib_db = no ; then
18196         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18197 echo "configure:18198: checking for Berkeley DB link (default)" >&5
18198 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18199   echo $ac_n "(cached) $ac_c" 1>&6
18200 else
18201   
18202         ol_DB_LIB=
18203         ol_LIBS=$LIBS
18204         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18205
18206         cat > conftest.$ac_ext <<EOF
18207 #line 18208 "configure"
18208 #include "confdefs.h"
18209
18210 #ifdef HAVE_DB_185_H
18211 # include <db_185.h>
18212 #else
18213 # include <db.h>
18214 #endif
18215
18216 #ifndef DB_VERSION_MAJOR
18217 # define DB_VERSION_MAJOR 1
18218 #endif
18219
18220 #ifndef NULL
18221 #define NULL ((void*)0)
18222 #endif
18223
18224 int main() {
18225
18226 #if DB_VERSION_MAJOR > 1
18227         {
18228                 char *version;
18229                 int major, minor, patch;
18230
18231                 version = db_version( &major, &minor, &patch );
18232
18233                 if( major != DB_VERSION_MAJOR ||
18234                         minor < DB_VERSION_MINOR )
18235                 {
18236                         printf("Berkeley DB version mismatch\n"
18237                                 "\texpected: %s\n\tgot: %s\n",
18238                                 DB_VERSION_STRING, version);
18239                         return 1;
18240                 }
18241         }
18242 #endif
18243
18244 #if DB_VERSION_MAJOR > 2
18245         db_env_create( NULL, 0 );
18246 #elif DB_VERSION_MAJOR > 1
18247         db_appexit( NULL );
18248 #else
18249         (void) dbopen( NULL, 0, 0, 0, NULL);
18250 #endif
18251
18252 ; return 0; }
18253 EOF
18254 if { (eval echo configure:18255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18255   rm -rf conftest*
18256   ol_cv_db_none=yes
18257 else
18258   echo "configure: failed program was:" >&5
18259   cat conftest.$ac_ext >&5
18260   rm -rf conftest*
18261   ol_cv_db_none=no
18262 fi
18263 rm -f conftest*
18264
18265         LIBS="$ol_LIBS"
18266
18267 fi
18268
18269 echo "$ac_t""$ol_cv_db_none" 1>&6
18270
18271         if test $ol_cv_db_none = yes ; then
18272                 ol_cv_lib_db=yes
18273         fi
18274 fi
18275
18276 if test $ol_cv_lib_db = no ; then
18277         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18278 echo "configure:18279: checking for Berkeley DB link (-ldb42)" >&5
18279 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18280   echo $ac_n "(cached) $ac_c" 1>&6
18281 else
18282   
18283         ol_DB_LIB=-ldb42
18284         ol_LIBS=$LIBS
18285         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18286
18287         cat > conftest.$ac_ext <<EOF
18288 #line 18289 "configure"
18289 #include "confdefs.h"
18290
18291 #ifdef HAVE_DB_185_H
18292 # include <db_185.h>
18293 #else
18294 # include <db.h>
18295 #endif
18296
18297 #ifndef DB_VERSION_MAJOR
18298 # define DB_VERSION_MAJOR 1
18299 #endif
18300
18301 #ifndef NULL
18302 #define NULL ((void*)0)
18303 #endif
18304
18305 int main() {
18306
18307 #if DB_VERSION_MAJOR > 1
18308         {
18309                 char *version;
18310                 int major, minor, patch;
18311
18312                 version = db_version( &major, &minor, &patch );
18313
18314                 if( major != DB_VERSION_MAJOR ||
18315                         minor < DB_VERSION_MINOR )
18316                 {
18317                         printf("Berkeley DB version mismatch\n"
18318                                 "\texpected: %s\n\tgot: %s\n",
18319                                 DB_VERSION_STRING, version);
18320                         return 1;
18321                 }
18322         }
18323 #endif
18324
18325 #if DB_VERSION_MAJOR > 2
18326         db_env_create( NULL, 0 );
18327 #elif DB_VERSION_MAJOR > 1
18328         db_appexit( NULL );
18329 #else
18330         (void) dbopen( NULL, 0, 0, 0, NULL);
18331 #endif
18332
18333 ; return 0; }
18334 EOF
18335 if { (eval echo configure:18336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18336   rm -rf conftest*
18337   ol_cv_db_db42=yes
18338 else
18339   echo "configure: failed program was:" >&5
18340   cat conftest.$ac_ext >&5
18341   rm -rf conftest*
18342   ol_cv_db_db42=no
18343 fi
18344 rm -f conftest*
18345
18346         LIBS="$ol_LIBS"
18347
18348 fi
18349
18350 echo "$ac_t""$ol_cv_db_db42" 1>&6
18351
18352         if test $ol_cv_db_db42 = yes ; then
18353                 ol_cv_lib_db=-ldb42
18354         fi
18355 fi
18356
18357 if test $ol_cv_lib_db = no ; then
18358         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18359 echo "configure:18360: checking for Berkeley DB link (-ldb-42)" >&5
18360 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18361   echo $ac_n "(cached) $ac_c" 1>&6
18362 else
18363   
18364         ol_DB_LIB=-ldb-42
18365         ol_LIBS=$LIBS
18366         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18367
18368         cat > conftest.$ac_ext <<EOF
18369 #line 18370 "configure"
18370 #include "confdefs.h"
18371
18372 #ifdef HAVE_DB_185_H
18373 # include <db_185.h>
18374 #else
18375 # include <db.h>
18376 #endif
18377
18378 #ifndef DB_VERSION_MAJOR
18379 # define DB_VERSION_MAJOR 1
18380 #endif
18381
18382 #ifndef NULL
18383 #define NULL ((void*)0)
18384 #endif
18385
18386 int main() {
18387
18388 #if DB_VERSION_MAJOR > 1
18389         {
18390                 char *version;
18391                 int major, minor, patch;
18392
18393                 version = db_version( &major, &minor, &patch );
18394
18395                 if( major != DB_VERSION_MAJOR ||
18396                         minor < DB_VERSION_MINOR )
18397                 {
18398                         printf("Berkeley DB version mismatch\n"
18399                                 "\texpected: %s\n\tgot: %s\n",
18400                                 DB_VERSION_STRING, version);
18401                         return 1;
18402                 }
18403         }
18404 #endif
18405
18406 #if DB_VERSION_MAJOR > 2
18407         db_env_create( NULL, 0 );
18408 #elif DB_VERSION_MAJOR > 1
18409         db_appexit( NULL );
18410 #else
18411         (void) dbopen( NULL, 0, 0, 0, NULL);
18412 #endif
18413
18414 ; return 0; }
18415 EOF
18416 if { (eval echo configure:18417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18417   rm -rf conftest*
18418   ol_cv_db_db_42=yes
18419 else
18420   echo "configure: failed program was:" >&5
18421   cat conftest.$ac_ext >&5
18422   rm -rf conftest*
18423   ol_cv_db_db_42=no
18424 fi
18425 rm -f conftest*
18426
18427         LIBS="$ol_LIBS"
18428
18429 fi
18430
18431 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18432
18433         if test $ol_cv_db_db_42 = yes ; then
18434                 ol_cv_lib_db=-ldb-42
18435         fi
18436 fi
18437
18438 if test $ol_cv_lib_db = no ; then
18439         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18440 echo "configure:18441: checking for Berkeley DB link (-ldb-4.2)" >&5
18441 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18442   echo $ac_n "(cached) $ac_c" 1>&6
18443 else
18444   
18445         ol_DB_LIB=-ldb-4.2
18446         ol_LIBS=$LIBS
18447         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18448
18449         cat > conftest.$ac_ext <<EOF
18450 #line 18451 "configure"
18451 #include "confdefs.h"
18452
18453 #ifdef HAVE_DB_185_H
18454 # include <db_185.h>
18455 #else
18456 # include <db.h>
18457 #endif
18458
18459 #ifndef DB_VERSION_MAJOR
18460 # define DB_VERSION_MAJOR 1
18461 #endif
18462
18463 #ifndef NULL
18464 #define NULL ((void*)0)
18465 #endif
18466
18467 int main() {
18468
18469 #if DB_VERSION_MAJOR > 1
18470         {
18471                 char *version;
18472                 int major, minor, patch;
18473
18474                 version = db_version( &major, &minor, &patch );
18475
18476                 if( major != DB_VERSION_MAJOR ||
18477                         minor < DB_VERSION_MINOR )
18478                 {
18479                         printf("Berkeley DB version mismatch\n"
18480                                 "\texpected: %s\n\tgot: %s\n",
18481                                 DB_VERSION_STRING, version);
18482                         return 1;
18483                 }
18484         }
18485 #endif
18486
18487 #if DB_VERSION_MAJOR > 2
18488         db_env_create( NULL, 0 );
18489 #elif DB_VERSION_MAJOR > 1
18490         db_appexit( NULL );
18491 #else
18492         (void) dbopen( NULL, 0, 0, 0, NULL);
18493 #endif
18494
18495 ; return 0; }
18496 EOF
18497 if { (eval echo configure:18498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18498   rm -rf conftest*
18499   ol_cv_db_db_4_dot_2=yes
18500 else
18501   echo "configure: failed program was:" >&5
18502   cat conftest.$ac_ext >&5
18503   rm -rf conftest*
18504   ol_cv_db_db_4_dot_2=no
18505 fi
18506 rm -f conftest*
18507
18508         LIBS="$ol_LIBS"
18509
18510 fi
18511
18512 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18513
18514         if test $ol_cv_db_db_4_dot_2 = yes ; then
18515                 ol_cv_lib_db=-ldb-4.2
18516         fi
18517 fi
18518
18519 if test $ol_cv_lib_db = no ; then
18520         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18521 echo "configure:18522: checking for Berkeley DB link (-ldb-4-2)" >&5
18522 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18523   echo $ac_n "(cached) $ac_c" 1>&6
18524 else
18525   
18526         ol_DB_LIB=-ldb-4-2
18527         ol_LIBS=$LIBS
18528         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18529
18530         cat > conftest.$ac_ext <<EOF
18531 #line 18532 "configure"
18532 #include "confdefs.h"
18533
18534 #ifdef HAVE_DB_185_H
18535 # include <db_185.h>
18536 #else
18537 # include <db.h>
18538 #endif
18539
18540 #ifndef DB_VERSION_MAJOR
18541 # define DB_VERSION_MAJOR 1
18542 #endif
18543
18544 #ifndef NULL
18545 #define NULL ((void*)0)
18546 #endif
18547
18548 int main() {
18549
18550 #if DB_VERSION_MAJOR > 1
18551         {
18552                 char *version;
18553                 int major, minor, patch;
18554
18555                 version = db_version( &major, &minor, &patch );
18556
18557                 if( major != DB_VERSION_MAJOR ||
18558                         minor < DB_VERSION_MINOR )
18559                 {
18560                         printf("Berkeley DB version mismatch\n"
18561                                 "\texpected: %s\n\tgot: %s\n",
18562                                 DB_VERSION_STRING, version);
18563                         return 1;
18564                 }
18565         }
18566 #endif
18567
18568 #if DB_VERSION_MAJOR > 2
18569         db_env_create( NULL, 0 );
18570 #elif DB_VERSION_MAJOR > 1
18571         db_appexit( NULL );
18572 #else
18573         (void) dbopen( NULL, 0, 0, 0, NULL);
18574 #endif
18575
18576 ; return 0; }
18577 EOF
18578 if { (eval echo configure:18579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18579   rm -rf conftest*
18580   ol_cv_db_db_4_2=yes
18581 else
18582   echo "configure: failed program was:" >&5
18583   cat conftest.$ac_ext >&5
18584   rm -rf conftest*
18585   ol_cv_db_db_4_2=no
18586 fi
18587 rm -f conftest*
18588
18589         LIBS="$ol_LIBS"
18590
18591 fi
18592
18593 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18594
18595         if test $ol_cv_db_db_4_2 = yes ; then
18596                 ol_cv_lib_db=-ldb-4-2
18597         fi
18598 fi
18599
18600 if test $ol_cv_lib_db = no ; then
18601         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18602 echo "configure:18603: checking for Berkeley DB link (-ldb-4)" >&5
18603 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18604   echo $ac_n "(cached) $ac_c" 1>&6
18605 else
18606   
18607         ol_DB_LIB=-ldb-4
18608         ol_LIBS=$LIBS
18609         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18610
18611         cat > conftest.$ac_ext <<EOF
18612 #line 18613 "configure"
18613 #include "confdefs.h"
18614
18615 #ifdef HAVE_DB_185_H
18616 # include <db_185.h>
18617 #else
18618 # include <db.h>
18619 #endif
18620
18621 #ifndef DB_VERSION_MAJOR
18622 # define DB_VERSION_MAJOR 1
18623 #endif
18624
18625 #ifndef NULL
18626 #define NULL ((void*)0)
18627 #endif
18628
18629 int main() {
18630
18631 #if DB_VERSION_MAJOR > 1
18632         {
18633                 char *version;
18634                 int major, minor, patch;
18635
18636                 version = db_version( &major, &minor, &patch );
18637
18638                 if( major != DB_VERSION_MAJOR ||
18639                         minor < DB_VERSION_MINOR )
18640                 {
18641                         printf("Berkeley DB version mismatch\n"
18642                                 "\texpected: %s\n\tgot: %s\n",
18643                                 DB_VERSION_STRING, version);
18644                         return 1;
18645                 }
18646         }
18647 #endif
18648
18649 #if DB_VERSION_MAJOR > 2
18650         db_env_create( NULL, 0 );
18651 #elif DB_VERSION_MAJOR > 1
18652         db_appexit( NULL );
18653 #else
18654         (void) dbopen( NULL, 0, 0, 0, NULL);
18655 #endif
18656
18657 ; return 0; }
18658 EOF
18659 if { (eval echo configure:18660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18660   rm -rf conftest*
18661   ol_cv_db_db_4=yes
18662 else
18663   echo "configure: failed program was:" >&5
18664   cat conftest.$ac_ext >&5
18665   rm -rf conftest*
18666   ol_cv_db_db_4=no
18667 fi
18668 rm -f conftest*
18669
18670         LIBS="$ol_LIBS"
18671
18672 fi
18673
18674 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18675
18676         if test $ol_cv_db_db_4 = yes ; then
18677                 ol_cv_lib_db=-ldb-4
18678         fi
18679 fi
18680
18681 if test $ol_cv_lib_db = no ; then
18682         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18683 echo "configure:18684: checking for Berkeley DB link (-ldb4)" >&5
18684 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18685   echo $ac_n "(cached) $ac_c" 1>&6
18686 else
18687   
18688         ol_DB_LIB=-ldb4
18689         ol_LIBS=$LIBS
18690         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18691
18692         cat > conftest.$ac_ext <<EOF
18693 #line 18694 "configure"
18694 #include "confdefs.h"
18695
18696 #ifdef HAVE_DB_185_H
18697 # include <db_185.h>
18698 #else
18699 # include <db.h>
18700 #endif
18701
18702 #ifndef DB_VERSION_MAJOR
18703 # define DB_VERSION_MAJOR 1
18704 #endif
18705
18706 #ifndef NULL
18707 #define NULL ((void*)0)
18708 #endif
18709
18710 int main() {
18711
18712 #if DB_VERSION_MAJOR > 1
18713         {
18714                 char *version;
18715                 int major, minor, patch;
18716
18717                 version = db_version( &major, &minor, &patch );
18718
18719                 if( major != DB_VERSION_MAJOR ||
18720                         minor < DB_VERSION_MINOR )
18721                 {
18722                         printf("Berkeley DB version mismatch\n"
18723                                 "\texpected: %s\n\tgot: %s\n",
18724                                 DB_VERSION_STRING, version);
18725                         return 1;
18726                 }
18727         }
18728 #endif
18729
18730 #if DB_VERSION_MAJOR > 2
18731         db_env_create( NULL, 0 );
18732 #elif DB_VERSION_MAJOR > 1
18733         db_appexit( NULL );
18734 #else
18735         (void) dbopen( NULL, 0, 0, 0, NULL);
18736 #endif
18737
18738 ; return 0; }
18739 EOF
18740 if { (eval echo configure:18741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18741   rm -rf conftest*
18742   ol_cv_db_db4=yes
18743 else
18744   echo "configure: failed program was:" >&5
18745   cat conftest.$ac_ext >&5
18746   rm -rf conftest*
18747   ol_cv_db_db4=no
18748 fi
18749 rm -f conftest*
18750
18751         LIBS="$ol_LIBS"
18752
18753 fi
18754
18755 echo "$ac_t""$ol_cv_db_db4" 1>&6
18756
18757         if test $ol_cv_db_db4 = yes ; then
18758                 ol_cv_lib_db=-ldb4
18759         fi
18760 fi
18761
18762 if test $ol_cv_lib_db = no ; then
18763         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18764 echo "configure:18765: checking for Berkeley DB link (-ldb)" >&5
18765 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18766   echo $ac_n "(cached) $ac_c" 1>&6
18767 else
18768   
18769         ol_DB_LIB=-ldb
18770         ol_LIBS=$LIBS
18771         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18772
18773         cat > conftest.$ac_ext <<EOF
18774 #line 18775 "configure"
18775 #include "confdefs.h"
18776
18777 #ifdef HAVE_DB_185_H
18778 # include <db_185.h>
18779 #else
18780 # include <db.h>
18781 #endif
18782
18783 #ifndef DB_VERSION_MAJOR
18784 # define DB_VERSION_MAJOR 1
18785 #endif
18786
18787 #ifndef NULL
18788 #define NULL ((void*)0)
18789 #endif
18790
18791 int main() {
18792
18793 #if DB_VERSION_MAJOR > 1
18794         {
18795                 char *version;
18796                 int major, minor, patch;
18797
18798                 version = db_version( &major, &minor, &patch );
18799
18800                 if( major != DB_VERSION_MAJOR ||
18801                         minor < DB_VERSION_MINOR )
18802                 {
18803                         printf("Berkeley DB version mismatch\n"
18804                                 "\texpected: %s\n\tgot: %s\n",
18805                                 DB_VERSION_STRING, version);
18806                         return 1;
18807                 }
18808         }
18809 #endif
18810
18811 #if DB_VERSION_MAJOR > 2
18812         db_env_create( NULL, 0 );
18813 #elif DB_VERSION_MAJOR > 1
18814         db_appexit( NULL );
18815 #else
18816         (void) dbopen( NULL, 0, 0, 0, NULL);
18817 #endif
18818
18819 ; return 0; }
18820 EOF
18821 if { (eval echo configure:18822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18822   rm -rf conftest*
18823   ol_cv_db_db=yes
18824 else
18825   echo "configure: failed program was:" >&5
18826   cat conftest.$ac_ext >&5
18827   rm -rf conftest*
18828   ol_cv_db_db=no
18829 fi
18830 rm -f conftest*
18831
18832         LIBS="$ol_LIBS"
18833
18834 fi
18835
18836 echo "$ac_t""$ol_cv_db_db" 1>&6
18837
18838         if test $ol_cv_db_db = yes ; then
18839                 ol_cv_lib_db=-ldb
18840         fi
18841 fi
18842
18843 if test $ol_cv_lib_db = no ; then
18844         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18845 echo "configure:18846: checking for Berkeley DB link (-ldb41)" >&5
18846 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18847   echo $ac_n "(cached) $ac_c" 1>&6
18848 else
18849   
18850         ol_DB_LIB=-ldb41
18851         ol_LIBS=$LIBS
18852         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18853
18854         cat > conftest.$ac_ext <<EOF
18855 #line 18856 "configure"
18856 #include "confdefs.h"
18857
18858 #ifdef HAVE_DB_185_H
18859 # include <db_185.h>
18860 #else
18861 # include <db.h>
18862 #endif
18863
18864 #ifndef DB_VERSION_MAJOR
18865 # define DB_VERSION_MAJOR 1
18866 #endif
18867
18868 #ifndef NULL
18869 #define NULL ((void*)0)
18870 #endif
18871
18872 int main() {
18873
18874 #if DB_VERSION_MAJOR > 1
18875         {
18876                 char *version;
18877                 int major, minor, patch;
18878
18879                 version = db_version( &major, &minor, &patch );
18880
18881                 if( major != DB_VERSION_MAJOR ||
18882                         minor < DB_VERSION_MINOR )
18883                 {
18884                         printf("Berkeley DB version mismatch\n"
18885                                 "\texpected: %s\n\tgot: %s\n",
18886                                 DB_VERSION_STRING, version);
18887                         return 1;
18888                 }
18889         }
18890 #endif
18891
18892 #if DB_VERSION_MAJOR > 2
18893         db_env_create( NULL, 0 );
18894 #elif DB_VERSION_MAJOR > 1
18895         db_appexit( NULL );
18896 #else
18897         (void) dbopen( NULL, 0, 0, 0, NULL);
18898 #endif
18899
18900 ; return 0; }
18901 EOF
18902 if { (eval echo configure:18903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18903   rm -rf conftest*
18904   ol_cv_db_db41=yes
18905 else
18906   echo "configure: failed program was:" >&5
18907   cat conftest.$ac_ext >&5
18908   rm -rf conftest*
18909   ol_cv_db_db41=no
18910 fi
18911 rm -f conftest*
18912
18913         LIBS="$ol_LIBS"
18914
18915 fi
18916
18917 echo "$ac_t""$ol_cv_db_db41" 1>&6
18918
18919         if test $ol_cv_db_db41 = yes ; then
18920                 ol_cv_lib_db=-ldb41
18921         fi
18922 fi
18923
18924 if test $ol_cv_lib_db = no ; then
18925         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18926 echo "configure:18927: checking for Berkeley DB link (-ldb-41)" >&5
18927 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18928   echo $ac_n "(cached) $ac_c" 1>&6
18929 else
18930   
18931         ol_DB_LIB=-ldb-41
18932         ol_LIBS=$LIBS
18933         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18934
18935         cat > conftest.$ac_ext <<EOF
18936 #line 18937 "configure"
18937 #include "confdefs.h"
18938
18939 #ifdef HAVE_DB_185_H
18940 # include <db_185.h>
18941 #else
18942 # include <db.h>
18943 #endif
18944
18945 #ifndef DB_VERSION_MAJOR
18946 # define DB_VERSION_MAJOR 1
18947 #endif
18948
18949 #ifndef NULL
18950 #define NULL ((void*)0)
18951 #endif
18952
18953 int main() {
18954
18955 #if DB_VERSION_MAJOR > 1
18956         {
18957                 char *version;
18958                 int major, minor, patch;
18959
18960                 version = db_version( &major, &minor, &patch );
18961
18962                 if( major != DB_VERSION_MAJOR ||
18963                         minor < DB_VERSION_MINOR )
18964                 {
18965                         printf("Berkeley DB version mismatch\n"
18966                                 "\texpected: %s\n\tgot: %s\n",
18967                                 DB_VERSION_STRING, version);
18968                         return 1;
18969                 }
18970         }
18971 #endif
18972
18973 #if DB_VERSION_MAJOR > 2
18974         db_env_create( NULL, 0 );
18975 #elif DB_VERSION_MAJOR > 1
18976         db_appexit( NULL );
18977 #else
18978         (void) dbopen( NULL, 0, 0, 0, NULL);
18979 #endif
18980
18981 ; return 0; }
18982 EOF
18983 if { (eval echo configure:18984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18984   rm -rf conftest*
18985   ol_cv_db_db_41=yes
18986 else
18987   echo "configure: failed program was:" >&5
18988   cat conftest.$ac_ext >&5
18989   rm -rf conftest*
18990   ol_cv_db_db_41=no
18991 fi
18992 rm -f conftest*
18993
18994         LIBS="$ol_LIBS"
18995
18996 fi
18997
18998 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18999
19000         if test $ol_cv_db_db_41 = yes ; then
19001                 ol_cv_lib_db=-ldb-41
19002         fi
19003 fi
19004
19005 if test $ol_cv_lib_db = no ; then
19006         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19007 echo "configure:19008: checking for Berkeley DB link (-ldb-4.1)" >&5
19008 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19009   echo $ac_n "(cached) $ac_c" 1>&6
19010 else
19011   
19012         ol_DB_LIB=-ldb-4.1
19013         ol_LIBS=$LIBS
19014         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19015
19016         cat > conftest.$ac_ext <<EOF
19017 #line 19018 "configure"
19018 #include "confdefs.h"
19019
19020 #ifdef HAVE_DB_185_H
19021 # include <db_185.h>
19022 #else
19023 # include <db.h>
19024 #endif
19025
19026 #ifndef DB_VERSION_MAJOR
19027 # define DB_VERSION_MAJOR 1
19028 #endif
19029
19030 #ifndef NULL
19031 #define NULL ((void*)0)
19032 #endif
19033
19034 int main() {
19035
19036 #if DB_VERSION_MAJOR > 1
19037         {
19038                 char *version;
19039                 int major, minor, patch;
19040
19041                 version = db_version( &major, &minor, &patch );
19042
19043                 if( major != DB_VERSION_MAJOR ||
19044                         minor < DB_VERSION_MINOR )
19045                 {
19046                         printf("Berkeley DB version mismatch\n"
19047                                 "\texpected: %s\n\tgot: %s\n",
19048                                 DB_VERSION_STRING, version);
19049                         return 1;
19050                 }
19051         }
19052 #endif
19053
19054 #if DB_VERSION_MAJOR > 2
19055         db_env_create( NULL, 0 );
19056 #elif DB_VERSION_MAJOR > 1
19057         db_appexit( NULL );
19058 #else
19059         (void) dbopen( NULL, 0, 0, 0, NULL);
19060 #endif
19061
19062 ; return 0; }
19063 EOF
19064 if { (eval echo configure:19065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19065   rm -rf conftest*
19066   ol_cv_db_db_4_dot_1=yes
19067 else
19068   echo "configure: failed program was:" >&5
19069   cat conftest.$ac_ext >&5
19070   rm -rf conftest*
19071   ol_cv_db_db_4_dot_1=no
19072 fi
19073 rm -f conftest*
19074
19075         LIBS="$ol_LIBS"
19076
19077 fi
19078
19079 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19080
19081         if test $ol_cv_db_db_4_dot_1 = yes ; then
19082                 ol_cv_lib_db=-ldb-4.1
19083         fi
19084 fi
19085
19086 if test $ol_cv_lib_db = no ; then
19087         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19088 echo "configure:19089: checking for Berkeley DB link (-ldb-4-1)" >&5
19089 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19090   echo $ac_n "(cached) $ac_c" 1>&6
19091 else
19092   
19093         ol_DB_LIB=-ldb-4-1
19094         ol_LIBS=$LIBS
19095         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19096
19097         cat > conftest.$ac_ext <<EOF
19098 #line 19099 "configure"
19099 #include "confdefs.h"
19100
19101 #ifdef HAVE_DB_185_H
19102 # include <db_185.h>
19103 #else
19104 # include <db.h>
19105 #endif
19106
19107 #ifndef DB_VERSION_MAJOR
19108 # define DB_VERSION_MAJOR 1
19109 #endif
19110
19111 #ifndef NULL
19112 #define NULL ((void*)0)
19113 #endif
19114
19115 int main() {
19116
19117 #if DB_VERSION_MAJOR > 1
19118         {
19119                 char *version;
19120                 int major, minor, patch;
19121
19122                 version = db_version( &major, &minor, &patch );
19123
19124                 if( major != DB_VERSION_MAJOR ||
19125                         minor < DB_VERSION_MINOR )
19126                 {
19127                         printf("Berkeley DB version mismatch\n"
19128                                 "\texpected: %s\n\tgot: %s\n",
19129                                 DB_VERSION_STRING, version);
19130                         return 1;
19131                 }
19132         }
19133 #endif
19134
19135 #if DB_VERSION_MAJOR > 2
19136         db_env_create( NULL, 0 );
19137 #elif DB_VERSION_MAJOR > 1
19138         db_appexit( NULL );
19139 #else
19140         (void) dbopen( NULL, 0, 0, 0, NULL);
19141 #endif
19142
19143 ; return 0; }
19144 EOF
19145 if { (eval echo configure:19146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19146   rm -rf conftest*
19147   ol_cv_db_db_4_1=yes
19148 else
19149   echo "configure: failed program was:" >&5
19150   cat conftest.$ac_ext >&5
19151   rm -rf conftest*
19152   ol_cv_db_db_4_1=no
19153 fi
19154 rm -f conftest*
19155
19156         LIBS="$ol_LIBS"
19157
19158 fi
19159
19160 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19161
19162         if test $ol_cv_db_db_4_1 = yes ; then
19163                 ol_cv_lib_db=-ldb-4-1
19164         fi
19165 fi
19166
19167 if test $ol_cv_lib_db = no ; then
19168         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19169 echo "configure:19170: checking for Berkeley DB link (-ldb3)" >&5
19170 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19171   echo $ac_n "(cached) $ac_c" 1>&6
19172 else
19173   
19174         ol_DB_LIB=-ldb3
19175         ol_LIBS=$LIBS
19176         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19177
19178         cat > conftest.$ac_ext <<EOF
19179 #line 19180 "configure"
19180 #include "confdefs.h"
19181
19182 #ifdef HAVE_DB_185_H
19183 # include <db_185.h>
19184 #else
19185 # include <db.h>
19186 #endif
19187
19188 #ifndef DB_VERSION_MAJOR
19189 # define DB_VERSION_MAJOR 1
19190 #endif
19191
19192 #ifndef NULL
19193 #define NULL ((void*)0)
19194 #endif
19195
19196 int main() {
19197
19198 #if DB_VERSION_MAJOR > 1
19199         {
19200                 char *version;
19201                 int major, minor, patch;
19202
19203                 version = db_version( &major, &minor, &patch );
19204
19205                 if( major != DB_VERSION_MAJOR ||
19206                         minor < DB_VERSION_MINOR )
19207                 {
19208                         printf("Berkeley DB version mismatch\n"
19209                                 "\texpected: %s\n\tgot: %s\n",
19210                                 DB_VERSION_STRING, version);
19211                         return 1;
19212                 }
19213         }
19214 #endif
19215
19216 #if DB_VERSION_MAJOR > 2
19217         db_env_create( NULL, 0 );
19218 #elif DB_VERSION_MAJOR > 1
19219         db_appexit( NULL );
19220 #else
19221         (void) dbopen( NULL, 0, 0, 0, NULL);
19222 #endif
19223
19224 ; return 0; }
19225 EOF
19226 if { (eval echo configure:19227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19227   rm -rf conftest*
19228   ol_cv_db_db3=yes
19229 else
19230   echo "configure: failed program was:" >&5
19231   cat conftest.$ac_ext >&5
19232   rm -rf conftest*
19233   ol_cv_db_db3=no
19234 fi
19235 rm -f conftest*
19236
19237         LIBS="$ol_LIBS"
19238
19239 fi
19240
19241 echo "$ac_t""$ol_cv_db_db3" 1>&6
19242
19243         if test $ol_cv_db_db3 = yes ; then
19244                 ol_cv_lib_db=-ldb3
19245         fi
19246 fi
19247
19248 if test $ol_cv_lib_db = no ; then
19249         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19250 echo "configure:19251: checking for Berkeley DB link (-ldb-3)" >&5
19251 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19252   echo $ac_n "(cached) $ac_c" 1>&6
19253 else
19254   
19255         ol_DB_LIB=-ldb-3
19256         ol_LIBS=$LIBS
19257         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19258
19259         cat > conftest.$ac_ext <<EOF
19260 #line 19261 "configure"
19261 #include "confdefs.h"
19262
19263 #ifdef HAVE_DB_185_H
19264 # include <db_185.h>
19265 #else
19266 # include <db.h>
19267 #endif
19268
19269 #ifndef DB_VERSION_MAJOR
19270 # define DB_VERSION_MAJOR 1
19271 #endif
19272
19273 #ifndef NULL
19274 #define NULL ((void*)0)
19275 #endif
19276
19277 int main() {
19278
19279 #if DB_VERSION_MAJOR > 1
19280         {
19281                 char *version;
19282                 int major, minor, patch;
19283
19284                 version = db_version( &major, &minor, &patch );
19285
19286                 if( major != DB_VERSION_MAJOR ||
19287                         minor < DB_VERSION_MINOR )
19288                 {
19289                         printf("Berkeley DB version mismatch\n"
19290                                 "\texpected: %s\n\tgot: %s\n",
19291                                 DB_VERSION_STRING, version);
19292                         return 1;
19293                 }
19294         }
19295 #endif
19296
19297 #if DB_VERSION_MAJOR > 2
19298         db_env_create( NULL, 0 );
19299 #elif DB_VERSION_MAJOR > 1
19300         db_appexit( NULL );
19301 #else
19302         (void) dbopen( NULL, 0, 0, 0, NULL);
19303 #endif
19304
19305 ; return 0; }
19306 EOF
19307 if { (eval echo configure:19308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19308   rm -rf conftest*
19309   ol_cv_db_db_3=yes
19310 else
19311   echo "configure: failed program was:" >&5
19312   cat conftest.$ac_ext >&5
19313   rm -rf conftest*
19314   ol_cv_db_db_3=no
19315 fi
19316 rm -f conftest*
19317
19318         LIBS="$ol_LIBS"
19319
19320 fi
19321
19322 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19323
19324         if test $ol_cv_db_db_3 = yes ; then
19325                 ol_cv_lib_db=-ldb-3
19326         fi
19327 fi
19328
19329 if test $ol_cv_lib_db = no ; then
19330         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19331 echo "configure:19332: checking for Berkeley DB link (-ldb2)" >&5
19332 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19333   echo $ac_n "(cached) $ac_c" 1>&6
19334 else
19335   
19336         ol_DB_LIB=-ldb2
19337         ol_LIBS=$LIBS
19338         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19339
19340         cat > conftest.$ac_ext <<EOF
19341 #line 19342 "configure"
19342 #include "confdefs.h"
19343
19344 #ifdef HAVE_DB_185_H
19345 # include <db_185.h>
19346 #else
19347 # include <db.h>
19348 #endif
19349
19350 #ifndef DB_VERSION_MAJOR
19351 # define DB_VERSION_MAJOR 1
19352 #endif
19353
19354 #ifndef NULL
19355 #define NULL ((void*)0)
19356 #endif
19357
19358 int main() {
19359
19360 #if DB_VERSION_MAJOR > 1
19361         {
19362                 char *version;
19363                 int major, minor, patch;
19364
19365                 version = db_version( &major, &minor, &patch );
19366
19367                 if( major != DB_VERSION_MAJOR ||
19368                         minor < DB_VERSION_MINOR )
19369                 {
19370                         printf("Berkeley DB version mismatch\n"
19371                                 "\texpected: %s\n\tgot: %s\n",
19372                                 DB_VERSION_STRING, version);
19373                         return 1;
19374                 }
19375         }
19376 #endif
19377
19378 #if DB_VERSION_MAJOR > 2
19379         db_env_create( NULL, 0 );
19380 #elif DB_VERSION_MAJOR > 1
19381         db_appexit( NULL );
19382 #else
19383         (void) dbopen( NULL, 0, 0, 0, NULL);
19384 #endif
19385
19386 ; return 0; }
19387 EOF
19388 if { (eval echo configure:19389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19389   rm -rf conftest*
19390   ol_cv_db_db2=yes
19391 else
19392   echo "configure: failed program was:" >&5
19393   cat conftest.$ac_ext >&5
19394   rm -rf conftest*
19395   ol_cv_db_db2=no
19396 fi
19397 rm -f conftest*
19398
19399         LIBS="$ol_LIBS"
19400
19401 fi
19402
19403 echo "$ac_t""$ol_cv_db_db2" 1>&6
19404
19405         if test $ol_cv_db_db2 = yes ; then
19406                 ol_cv_lib_db=-ldb2
19407         fi
19408 fi
19409
19410 if test $ol_cv_lib_db = no ; then
19411         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19412 echo "configure:19413: checking for Berkeley DB link (-ldb-2)" >&5
19413 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19414   echo $ac_n "(cached) $ac_c" 1>&6
19415 else
19416   
19417         ol_DB_LIB=-ldb-2
19418         ol_LIBS=$LIBS
19419         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19420
19421         cat > conftest.$ac_ext <<EOF
19422 #line 19423 "configure"
19423 #include "confdefs.h"
19424
19425 #ifdef HAVE_DB_185_H
19426 # include <db_185.h>
19427 #else
19428 # include <db.h>
19429 #endif
19430
19431 #ifndef DB_VERSION_MAJOR
19432 # define DB_VERSION_MAJOR 1
19433 #endif
19434
19435 #ifndef NULL
19436 #define NULL ((void*)0)
19437 #endif
19438
19439 int main() {
19440
19441 #if DB_VERSION_MAJOR > 1
19442         {
19443                 char *version;
19444                 int major, minor, patch;
19445
19446                 version = db_version( &major, &minor, &patch );
19447
19448                 if( major != DB_VERSION_MAJOR ||
19449                         minor < DB_VERSION_MINOR )
19450                 {
19451                         printf("Berkeley DB version mismatch\n"
19452                                 "\texpected: %s\n\tgot: %s\n",
19453                                 DB_VERSION_STRING, version);
19454                         return 1;
19455                 }
19456         }
19457 #endif
19458
19459 #if DB_VERSION_MAJOR > 2
19460         db_env_create( NULL, 0 );
19461 #elif DB_VERSION_MAJOR > 1
19462         db_appexit( NULL );
19463 #else
19464         (void) dbopen( NULL, 0, 0, 0, NULL);
19465 #endif
19466
19467 ; return 0; }
19468 EOF
19469 if { (eval echo configure:19470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19470   rm -rf conftest*
19471   ol_cv_db_db_2=yes
19472 else
19473   echo "configure: failed program was:" >&5
19474   cat conftest.$ac_ext >&5
19475   rm -rf conftest*
19476   ol_cv_db_db_2=no
19477 fi
19478 rm -f conftest*
19479
19480         LIBS="$ol_LIBS"
19481
19482 fi
19483
19484 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19485
19486         if test $ol_cv_db_db_2 = yes ; then
19487                 ol_cv_lib_db=-ldb-2
19488         fi
19489 fi
19490
19491 if test $ol_cv_lib_db = no ; then
19492         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19493 echo "configure:19494: checking for Berkeley DB link (-ldb1)" >&5
19494 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19495   echo $ac_n "(cached) $ac_c" 1>&6
19496 else
19497   
19498         ol_DB_LIB=-ldb1
19499         ol_LIBS=$LIBS
19500         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19501
19502         cat > conftest.$ac_ext <<EOF
19503 #line 19504 "configure"
19504 #include "confdefs.h"
19505
19506 #ifdef HAVE_DB_185_H
19507 # include <db_185.h>
19508 #else
19509 # include <db.h>
19510 #endif
19511
19512 #ifndef DB_VERSION_MAJOR
19513 # define DB_VERSION_MAJOR 1
19514 #endif
19515
19516 #ifndef NULL
19517 #define NULL ((void*)0)
19518 #endif
19519
19520 int main() {
19521
19522 #if DB_VERSION_MAJOR > 1
19523         {
19524                 char *version;
19525                 int major, minor, patch;
19526
19527                 version = db_version( &major, &minor, &patch );
19528
19529                 if( major != DB_VERSION_MAJOR ||
19530                         minor < DB_VERSION_MINOR )
19531                 {
19532                         printf("Berkeley DB version mismatch\n"
19533                                 "\texpected: %s\n\tgot: %s\n",
19534                                 DB_VERSION_STRING, version);
19535                         return 1;
19536                 }
19537         }
19538 #endif
19539
19540 #if DB_VERSION_MAJOR > 2
19541         db_env_create( NULL, 0 );
19542 #elif DB_VERSION_MAJOR > 1
19543         db_appexit( NULL );
19544 #else
19545         (void) dbopen( NULL, 0, 0, 0, NULL);
19546 #endif
19547
19548 ; return 0; }
19549 EOF
19550 if { (eval echo configure:19551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19551   rm -rf conftest*
19552   ol_cv_db_db1=yes
19553 else
19554   echo "configure: failed program was:" >&5
19555   cat conftest.$ac_ext >&5
19556   rm -rf conftest*
19557   ol_cv_db_db1=no
19558 fi
19559 rm -f conftest*
19560
19561         LIBS="$ol_LIBS"
19562
19563 fi
19564
19565 echo "$ac_t""$ol_cv_db_db1" 1>&6
19566
19567         if test $ol_cv_db_db1 = yes ; then
19568                 ol_cv_lib_db=-ldb1
19569         fi
19570 fi
19571
19572 if test $ol_cv_lib_db = no ; then
19573         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19574 echo "configure:19575: checking for Berkeley DB link (-ldb-1)" >&5
19575 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19576   echo $ac_n "(cached) $ac_c" 1>&6
19577 else
19578   
19579         ol_DB_LIB=-ldb-1
19580         ol_LIBS=$LIBS
19581         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19582
19583         cat > conftest.$ac_ext <<EOF
19584 #line 19585 "configure"
19585 #include "confdefs.h"
19586
19587 #ifdef HAVE_DB_185_H
19588 # include <db_185.h>
19589 #else
19590 # include <db.h>
19591 #endif
19592
19593 #ifndef DB_VERSION_MAJOR
19594 # define DB_VERSION_MAJOR 1
19595 #endif
19596
19597 #ifndef NULL
19598 #define NULL ((void*)0)
19599 #endif
19600
19601 int main() {
19602
19603 #if DB_VERSION_MAJOR > 1
19604         {
19605                 char *version;
19606                 int major, minor, patch;
19607
19608                 version = db_version( &major, &minor, &patch );
19609
19610                 if( major != DB_VERSION_MAJOR ||
19611                         minor < DB_VERSION_MINOR )
19612                 {
19613                         printf("Berkeley DB version mismatch\n"
19614                                 "\texpected: %s\n\tgot: %s\n",
19615                                 DB_VERSION_STRING, version);
19616                         return 1;
19617                 }
19618         }
19619 #endif
19620
19621 #if DB_VERSION_MAJOR > 2
19622         db_env_create( NULL, 0 );
19623 #elif DB_VERSION_MAJOR > 1
19624         db_appexit( NULL );
19625 #else
19626         (void) dbopen( NULL, 0, 0, 0, NULL);
19627 #endif
19628
19629 ; return 0; }
19630 EOF
19631 if { (eval echo configure:19632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19632   rm -rf conftest*
19633   ol_cv_db_db_1=yes
19634 else
19635   echo "configure: failed program was:" >&5
19636   cat conftest.$ac_ext >&5
19637   rm -rf conftest*
19638   ol_cv_db_db_1=no
19639 fi
19640 rm -f conftest*
19641
19642         LIBS="$ol_LIBS"
19643
19644 fi
19645
19646 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19647
19648         if test $ol_cv_db_db_1 = yes ; then
19649                 ol_cv_lib_db=-ldb-1
19650         fi
19651 fi
19652
19653
19654         if test "$ol_cv_lib_db" != no ; then
19655                 ol_cv_berkeley_db=yes
19656                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19657 echo "configure:19658: checking for Berkeley DB thread support" >&5
19658 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19659   echo $ac_n "(cached) $ac_c" 1>&6
19660 else
19661   
19662         ol_LIBS="$LIBS"
19663         LIBS="$LTHREAD_LIBS $LIBS"
19664         if test $ol_cv_lib_db != yes ; then
19665                 LIBS="$ol_cv_lib_db $LIBS"
19666         fi
19667
19668         if test "$cross_compiling" = yes; then
19669   ol_cv_berkeley_db_thread=cross
19670 else
19671   cat > conftest.$ac_ext <<EOF
19672 #line 19673 "configure"
19673 #include "confdefs.h"
19674
19675 #ifdef HAVE_DB_185_H
19676         choke me;
19677 #else
19678 #include <db.h>
19679 #endif
19680 #ifndef NULL
19681 #define NULL ((void *)0)
19682 #endif
19683 main()
19684 {
19685         int rc;
19686         u_int32_t flags = DB_CREATE |
19687 #ifdef DB_PRIVATE
19688                 DB_PRIVATE |
19689 #endif
19690                 DB_THREAD;
19691
19692 #if DB_VERSION_MAJOR > 2
19693         DB_ENV *env = NULL;
19694
19695         rc = db_env_create( &env, 0 );
19696
19697         flags |= DB_INIT_MPOOL;
19698 #ifdef DB_MPOOL_PRIVATE
19699         flags |= DB_MPOOL_PRIVATE;
19700 #endif
19701
19702         if( rc ) {
19703                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19704                 return rc;
19705         }
19706
19707 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19708         rc = env->open( env, NULL, flags, 0 );
19709 #else
19710         rc = env->open( env, NULL, NULL, flags, 0 );
19711 #endif
19712
19713         if ( rc == 0 ) {
19714                 rc = env->close( env, 0 );
19715         }
19716
19717         if( rc ) {
19718                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19719                 return rc;
19720         }
19721
19722 #else
19723         DB_ENV env;
19724         memset( &env, '\0', sizeof(env) );
19725
19726         rc = db_appinit( NULL, NULL, &env, flags );
19727
19728         if( rc == 0 ) {
19729                 db_appexit( &env );
19730         }
19731
19732         unlink("__db_mpool.share");
19733         unlink("__db_lock.share");
19734 #endif
19735
19736         return rc;
19737 }
19738 EOF
19739 if { (eval echo configure:19740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19740 then
19741   ol_cv_berkeley_db_thread=yes
19742 else
19743   echo "configure: failed program was:" >&5
19744   cat conftest.$ac_ext >&5
19745   rm -fr conftest*
19746   ol_cv_berkeley_db_thread=no
19747 fi
19748 rm -fr conftest*
19749 fi
19750
19751
19752         LIBS="$ol_LIBS"
19753
19754 fi
19755
19756 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19757
19758         if test $ol_cv_berkeley_db_thread != no ; then
19759                 cat >> confdefs.h <<\EOF
19760 #define HAVE_BERKELEY_DB_THREAD 1
19761 EOF
19762
19763         fi
19764
19765         fi
19766 fi
19767
19768         fi
19769
19770         if test $ol_cv_berkeley_db != no ; then
19771                 cat >> confdefs.h <<\EOF
19772 #define HAVE_BERKELEY_DB 1
19773 EOF
19774
19775
19776                 ol_link_ldbm=berkeley
19777                 ol_with_ldbm_api=berkeley
19778
19779                 if test $ol_with_ldbm_type = hash ; then
19780                         cat >> confdefs.h <<\EOF
19781 #define LDBM_USE_DBHASH 1
19782 EOF
19783
19784                 else
19785                         cat >> confdefs.h <<\EOF
19786 #define LDBM_USE_DBBTREE 1
19787 EOF
19788
19789                 fi
19790
19791                                                 if test $ol_cv_lib_db != yes ; then
19792                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19793                 fi
19794         fi
19795 fi
19796
19797 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19798         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19799 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19800         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19801 echo "configure:19802: checking Berkeley DB version for BDB backend" >&5
19802 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19803   echo $ac_n "(cached) $ac_c" 1>&6
19804 else
19805   
19806         cat > conftest.$ac_ext <<EOF
19807 #line 19808 "configure"
19808 #include "confdefs.h"
19809
19810 #include <db.h>
19811
19812  /* this check could be improved */
19813 #ifndef DB_VERSION_MAJOR
19814 #       define DB_VERSION_MAJOR 1
19815 #endif
19816 #ifndef DB_VERSION_MINOR
19817 #       define DB_VERSION_MINOR 0
19818 #endif
19819
19820 /* require 4.2 or later */
19821 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19822         __db_version_compat
19823 #endif
19824         
19825 EOF
19826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19827   egrep "__db_version_compat" >/dev/null 2>&1; then
19828   rm -rf conftest*
19829   ol_cv_bdb_compat=yes
19830 else
19831   rm -rf conftest*
19832   ol_cv_bdb_compat=no
19833 fi
19834 rm -f conftest*
19835
19836 fi
19837
19838 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19839
19840
19841         if test $ol_cv_bdb_compat = yes ; then
19842                 ol_enable_bdb=yes
19843         elif test $ol_enable_bdb = yes ; then
19844                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19845         else
19846                 ol_enable_bdb=no
19847         fi
19848 fi
19849 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19850         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19851 fi
19852
19853 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19854         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19855         ol_with_ldbm_api=none
19856 fi
19857
19858 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19859         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19860 echo "configure:19861: checking for MDBM library" >&5
19861 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19862   echo $ac_n "(cached) $ac_c" 1>&6
19863 else
19864         ol_LIBS="$LIBS"
19865         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19866 echo "configure:19867: checking for mdbm_set_chain" >&5
19867 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19868   echo $ac_n "(cached) $ac_c" 1>&6
19869 else
19870   cat > conftest.$ac_ext <<EOF
19871 #line 19872 "configure"
19872 #include "confdefs.h"
19873 /* System header to define __stub macros and hopefully few prototypes,
19874     which can conflict with char mdbm_set_chain(); below.  */
19875 #include <assert.h>
19876 /* Override any gcc2 internal prototype to avoid an error.  */
19877 /* We use char because int might match the return type of a gcc2
19878     builtin and then its argument prototype would still apply.  */
19879 char mdbm_set_chain();
19880 char (*f)();
19881
19882 int main() {
19883
19884 /* The GNU C library defines this for functions which it implements
19885     to always fail with ENOSYS.  Some functions are actually named
19886     something starting with __ and the normal name is an alias.  */
19887 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19888 choke me
19889 #else
19890 f = mdbm_set_chain;
19891 #endif
19892
19893 ; return 0; }
19894 EOF
19895 if { (eval echo configure:19896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19896   rm -rf conftest*
19897   eval "ac_cv_func_mdbm_set_chain=yes"
19898 else
19899   echo "configure: failed program was:" >&5
19900   cat conftest.$ac_ext >&5
19901   rm -rf conftest*
19902   eval "ac_cv_func_mdbm_set_chain=no"
19903 fi
19904 rm -f conftest*
19905 fi
19906
19907 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19908   echo "$ac_t""yes" 1>&6
19909   ol_cv_lib_mdbm=yes
19910 else
19911   echo "$ac_t""no" 1>&6
19912
19913                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19914 echo "configure:19915: checking for mdbm_set_chain in -lmdbm" >&5
19915 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19916 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19917   echo $ac_n "(cached) $ac_c" 1>&6
19918 else
19919   ac_save_LIBS="$LIBS"
19920 LIBS="-lmdbm  $LIBS"
19921 cat > conftest.$ac_ext <<EOF
19922 #line 19923 "configure"
19923 #include "confdefs.h"
19924 /* Override any gcc2 internal prototype to avoid an error.  */
19925 /* We use char because int might match the return type of a gcc2
19926     builtin and then its argument prototype would still apply.  */
19927 char mdbm_set_chain();
19928
19929 int main() {
19930 mdbm_set_chain()
19931 ; return 0; }
19932 EOF
19933 if { (eval echo configure:19934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19934   rm -rf conftest*
19935   eval "ac_cv_lib_$ac_lib_var=yes"
19936 else
19937   echo "configure: failed program was:" >&5
19938   cat conftest.$ac_ext >&5
19939   rm -rf conftest*
19940   eval "ac_cv_lib_$ac_lib_var=no"
19941 fi
19942 rm -f conftest*
19943 LIBS="$ac_save_LIBS"
19944
19945 fi
19946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19947   echo "$ac_t""yes" 1>&6
19948   ol_cv_lib_mdbm=-lmdbm
19949 else
19950   echo "$ac_t""no" 1>&6
19951 ol_cv_lib_mdbm=no
19952 fi
19953
19954         
19955 fi
19956
19957         LIBS="$ol_LIBS"
19958
19959 fi
19960
19961 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19962
19963
19964  for ac_hdr in mdbm.h
19965 do
19966 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19967 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19968 echo "configure:19969: checking for $ac_hdr" >&5
19969 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19970   echo $ac_n "(cached) $ac_c" 1>&6
19971 else
19972   cat > conftest.$ac_ext <<EOF
19973 #line 19974 "configure"
19974 #include "confdefs.h"
19975 #include <$ac_hdr>
19976 EOF
19977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19978 { (eval echo configure:19979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19980 if test -z "$ac_err"; then
19981   rm -rf conftest*
19982   eval "ac_cv_header_$ac_safe=yes"
19983 else
19984   echo "$ac_err" >&5
19985   echo "configure: failed program was:" >&5
19986   cat conftest.$ac_ext >&5
19987   rm -rf conftest*
19988   eval "ac_cv_header_$ac_safe=no"
19989 fi
19990 rm -f conftest*
19991 fi
19992 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19993   echo "$ac_t""yes" 1>&6
19994     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19995   cat >> confdefs.h <<EOF
19996 #define $ac_tr_hdr 1
19997 EOF
19998  
19999 else
20000   echo "$ac_t""no" 1>&6
20001 fi
20002 done
20003
20004  echo $ac_n "checking for db""... $ac_c" 1>&6
20005 echo "configure:20006: checking for db" >&5
20006 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20007   echo $ac_n "(cached) $ac_c" 1>&6
20008 else
20009   
20010         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20011                 ol_cv_mdbm=no
20012         else
20013                 ol_cv_mdbm=yes
20014         fi
20015
20016 fi
20017
20018 echo "$ac_t""$ol_cv_mdbm" 1>&6
20019  if test $ol_cv_mdbm = yes ; then
20020         cat >> confdefs.h <<\EOF
20021 #define HAVE_MDBM 1
20022 EOF
20023
20024  fi
20025
20026
20027         if test $ol_cv_mdbm = yes ; then
20028                 ol_link_ldbm=mdbm
20029                 ol_with_ldbm_api=mdbm
20030                 if test $ol_cv_lib_mdbm != yes ; then
20031                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20032                 fi
20033         fi
20034 fi
20035
20036 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20037         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20038 echo "configure:20039: checking for GDBM library" >&5
20039 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20040   echo $ac_n "(cached) $ac_c" 1>&6
20041 else
20042         ol_LIBS="$LIBS"
20043         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20044 echo "configure:20045: checking for gdbm_open" >&5
20045 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20046   echo $ac_n "(cached) $ac_c" 1>&6
20047 else
20048   cat > conftest.$ac_ext <<EOF
20049 #line 20050 "configure"
20050 #include "confdefs.h"
20051 /* System header to define __stub macros and hopefully few prototypes,
20052     which can conflict with char gdbm_open(); below.  */
20053 #include <assert.h>
20054 /* Override any gcc2 internal prototype to avoid an error.  */
20055 /* We use char because int might match the return type of a gcc2
20056     builtin and then its argument prototype would still apply.  */
20057 char gdbm_open();
20058 char (*f)();
20059
20060 int main() {
20061
20062 /* The GNU C library defines this for functions which it implements
20063     to always fail with ENOSYS.  Some functions are actually named
20064     something starting with __ and the normal name is an alias.  */
20065 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20066 choke me
20067 #else
20068 f = gdbm_open;
20069 #endif
20070
20071 ; return 0; }
20072 EOF
20073 if { (eval echo configure:20074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20074   rm -rf conftest*
20075   eval "ac_cv_func_gdbm_open=yes"
20076 else
20077   echo "configure: failed program was:" >&5
20078   cat conftest.$ac_ext >&5
20079   rm -rf conftest*
20080   eval "ac_cv_func_gdbm_open=no"
20081 fi
20082 rm -f conftest*
20083 fi
20084
20085 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20086   echo "$ac_t""yes" 1>&6
20087   ol_cv_lib_gdbm=yes
20088 else
20089   echo "$ac_t""no" 1>&6
20090
20091                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20092 echo "configure:20093: checking for gdbm_open in -lgdbm" >&5
20093 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20095   echo $ac_n "(cached) $ac_c" 1>&6
20096 else
20097   ac_save_LIBS="$LIBS"
20098 LIBS="-lgdbm  $LIBS"
20099 cat > conftest.$ac_ext <<EOF
20100 #line 20101 "configure"
20101 #include "confdefs.h"
20102 /* Override any gcc2 internal prototype to avoid an error.  */
20103 /* We use char because int might match the return type of a gcc2
20104     builtin and then its argument prototype would still apply.  */
20105 char gdbm_open();
20106
20107 int main() {
20108 gdbm_open()
20109 ; return 0; }
20110 EOF
20111 if { (eval echo configure:20112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20112   rm -rf conftest*
20113   eval "ac_cv_lib_$ac_lib_var=yes"
20114 else
20115   echo "configure: failed program was:" >&5
20116   cat conftest.$ac_ext >&5
20117   rm -rf conftest*
20118   eval "ac_cv_lib_$ac_lib_var=no"
20119 fi
20120 rm -f conftest*
20121 LIBS="$ac_save_LIBS"
20122
20123 fi
20124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20125   echo "$ac_t""yes" 1>&6
20126   ol_cv_lib_gdbm=-lgdbm
20127 else
20128   echo "$ac_t""no" 1>&6
20129 ol_cv_lib_gdbm=no
20130 fi
20131
20132         
20133 fi
20134
20135         LIBS="$ol_LIBS"
20136
20137 fi
20138
20139 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20140
20141
20142  for ac_hdr in gdbm.h
20143 do
20144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20146 echo "configure:20147: checking for $ac_hdr" >&5
20147 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20148   echo $ac_n "(cached) $ac_c" 1>&6
20149 else
20150   cat > conftest.$ac_ext <<EOF
20151 #line 20152 "configure"
20152 #include "confdefs.h"
20153 #include <$ac_hdr>
20154 EOF
20155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20156 { (eval echo configure:20157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20158 if test -z "$ac_err"; then
20159   rm -rf conftest*
20160   eval "ac_cv_header_$ac_safe=yes"
20161 else
20162   echo "$ac_err" >&5
20163   echo "configure: failed program was:" >&5
20164   cat conftest.$ac_ext >&5
20165   rm -rf conftest*
20166   eval "ac_cv_header_$ac_safe=no"
20167 fi
20168 rm -f conftest*
20169 fi
20170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20171   echo "$ac_t""yes" 1>&6
20172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20173   cat >> confdefs.h <<EOF
20174 #define $ac_tr_hdr 1
20175 EOF
20176  
20177 else
20178   echo "$ac_t""no" 1>&6
20179 fi
20180 done
20181
20182  echo $ac_n "checking for db""... $ac_c" 1>&6
20183 echo "configure:20184: checking for db" >&5
20184 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20185   echo $ac_n "(cached) $ac_c" 1>&6
20186 else
20187   
20188         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20189                 ol_cv_gdbm=no
20190         else
20191                 ol_cv_gdbm=yes
20192         fi
20193
20194 fi
20195
20196 echo "$ac_t""$ol_cv_gdbm" 1>&6
20197  if test $ol_cv_gdbm = yes ; then
20198         cat >> confdefs.h <<\EOF
20199 #define HAVE_GDBM 1
20200 EOF
20201
20202  fi
20203
20204
20205         if test $ol_cv_gdbm = yes ; then
20206                 ol_link_ldbm=gdbm
20207                 ol_with_ldbm_api=gdbm
20208
20209                 if test $ol_cv_lib_gdbm != yes ; then
20210                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20211                 fi
20212         fi
20213 fi
20214
20215 if test $ol_with_ldbm_api = ndbm ; then
20216         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20217 echo "configure:20218: checking for NDBM library" >&5
20218 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20219   echo $ac_n "(cached) $ac_c" 1>&6
20220 else
20221         ol_LIBS="$LIBS"
20222         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20223 echo "configure:20224: checking for dbm_open" >&5
20224 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20225   echo $ac_n "(cached) $ac_c" 1>&6
20226 else
20227   cat > conftest.$ac_ext <<EOF
20228 #line 20229 "configure"
20229 #include "confdefs.h"
20230 /* System header to define __stub macros and hopefully few prototypes,
20231     which can conflict with char dbm_open(); below.  */
20232 #include <assert.h>
20233 /* Override any gcc2 internal prototype to avoid an error.  */
20234 /* We use char because int might match the return type of a gcc2
20235     builtin and then its argument prototype would still apply.  */
20236 char dbm_open();
20237 char (*f)();
20238
20239 int main() {
20240
20241 /* The GNU C library defines this for functions which it implements
20242     to always fail with ENOSYS.  Some functions are actually named
20243     something starting with __ and the normal name is an alias.  */
20244 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20245 choke me
20246 #else
20247 f = dbm_open;
20248 #endif
20249
20250 ; return 0; }
20251 EOF
20252 if { (eval echo configure:20253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20253   rm -rf conftest*
20254   eval "ac_cv_func_dbm_open=yes"
20255 else
20256   echo "configure: failed program was:" >&5
20257   cat conftest.$ac_ext >&5
20258   rm -rf conftest*
20259   eval "ac_cv_func_dbm_open=no"
20260 fi
20261 rm -f conftest*
20262 fi
20263
20264 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20265   echo "$ac_t""yes" 1>&6
20266   ol_cv_lib_ndbm=yes
20267 else
20268   echo "$ac_t""no" 1>&6
20269
20270                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20271 echo "configure:20272: checking for dbm_open in -lndbm" >&5
20272 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20274   echo $ac_n "(cached) $ac_c" 1>&6
20275 else
20276   ac_save_LIBS="$LIBS"
20277 LIBS="-lndbm  $LIBS"
20278 cat > conftest.$ac_ext <<EOF
20279 #line 20280 "configure"
20280 #include "confdefs.h"
20281 /* Override any gcc2 internal prototype to avoid an error.  */
20282 /* We use char because int might match the return type of a gcc2
20283     builtin and then its argument prototype would still apply.  */
20284 char dbm_open();
20285
20286 int main() {
20287 dbm_open()
20288 ; return 0; }
20289 EOF
20290 if { (eval echo configure:20291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20291   rm -rf conftest*
20292   eval "ac_cv_lib_$ac_lib_var=yes"
20293 else
20294   echo "configure: failed program was:" >&5
20295   cat conftest.$ac_ext >&5
20296   rm -rf conftest*
20297   eval "ac_cv_lib_$ac_lib_var=no"
20298 fi
20299 rm -f conftest*
20300 LIBS="$ac_save_LIBS"
20301
20302 fi
20303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20304   echo "$ac_t""yes" 1>&6
20305   ol_cv_lib_ndbm=-lndbm
20306 else
20307   echo "$ac_t""no" 1>&6
20308
20309                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20310 echo "configure:20311: checking for dbm_open in -ldbm" >&5
20311 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   ac_save_LIBS="$LIBS"
20316 LIBS="-ldbm  $LIBS"
20317 cat > conftest.$ac_ext <<EOF
20318 #line 20319 "configure"
20319 #include "confdefs.h"
20320 /* Override any gcc2 internal prototype to avoid an error.  */
20321 /* We use char because int might match the return type of a gcc2
20322     builtin and then its argument prototype would still apply.  */
20323 char dbm_open();
20324
20325 int main() {
20326 dbm_open()
20327 ; return 0; }
20328 EOF
20329 if { (eval echo configure:20330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20330   rm -rf conftest*
20331   eval "ac_cv_lib_$ac_lib_var=yes"
20332 else
20333   echo "configure: failed program was:" >&5
20334   cat conftest.$ac_ext >&5
20335   rm -rf conftest*
20336   eval "ac_cv_lib_$ac_lib_var=no"
20337 fi
20338 rm -f conftest*
20339 LIBS="$ac_save_LIBS"
20340
20341 fi
20342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20343   echo "$ac_t""yes" 1>&6
20344   ol_cv_lib_ndbm=-ldbm
20345 else
20346   echo "$ac_t""no" 1>&6
20347 ol_cv_lib_ndbm=no
20348 fi
20349                 
20350 fi
20351
20352         
20353 fi
20354
20355         LIBS="$ol_LIBS"
20356
20357 fi
20358
20359 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20360
20361
20362  for ac_hdr in ndbm.h
20363 do
20364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20366 echo "configure:20367: checking for $ac_hdr" >&5
20367 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20368   echo $ac_n "(cached) $ac_c" 1>&6
20369 else
20370   cat > conftest.$ac_ext <<EOF
20371 #line 20372 "configure"
20372 #include "confdefs.h"
20373 #include <$ac_hdr>
20374 EOF
20375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20376 { (eval echo configure:20377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20378 if test -z "$ac_err"; then
20379   rm -rf conftest*
20380   eval "ac_cv_header_$ac_safe=yes"
20381 else
20382   echo "$ac_err" >&5
20383   echo "configure: failed program was:" >&5
20384   cat conftest.$ac_ext >&5
20385   rm -rf conftest*
20386   eval "ac_cv_header_$ac_safe=no"
20387 fi
20388 rm -f conftest*
20389 fi
20390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20391   echo "$ac_t""yes" 1>&6
20392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20393   cat >> confdefs.h <<EOF
20394 #define $ac_tr_hdr 1
20395 EOF
20396  
20397 else
20398   echo "$ac_t""no" 1>&6
20399 fi
20400 done
20401
20402  echo $ac_n "checking for db""... $ac_c" 1>&6
20403 echo "configure:20404: checking for db" >&5
20404 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20405   echo $ac_n "(cached) $ac_c" 1>&6
20406 else
20407   
20408         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20409                 ol_cv_ndbm=no
20410         else
20411                 ol_cv_ndbm=yes
20412         fi
20413
20414 fi
20415
20416 echo "$ac_t""$ol_cv_ndbm" 1>&6
20417  if test $ol_cv_ndbm = yes ; then
20418         cat >> confdefs.h <<\EOF
20419 #define HAVE_NDBM 1
20420 EOF
20421
20422  fi
20423
20424
20425         if test $ol_cv_ndbm = yes ; then
20426                 ol_link_ldbm=ndbm
20427                 ol_with_ldbm_api=ndbm
20428
20429                 if test $ol_cv_lib_ndbm != yes ; then
20430                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20431                 fi
20432         fi
20433 fi
20434
20435 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20436         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20437         if test $ol_enable_ldbm = yes ; then
20438                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20439         fi
20440
20441         echo "configure: warning: disabling LDBM" 1>&2
20442         ol_enable_ldbm=no
20443 fi
20444
20445
20446 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20447         BUILD_LIBS_DYNAMIC=shared
20448         cat >> confdefs.h <<\EOF
20449 #define LDAP_LIBS_DYNAMIC 1
20450 EOF
20451
20452         LTSTATIC=""
20453 else
20454         BUILD_LIBS_DYNAMIC=static
20455         LTSTATIC="-static"
20456 fi
20457
20458 if test $ol_enable_wrappers != no ; then
20459         for ac_hdr in tcpd.h
20460 do
20461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20463 echo "configure:20464: checking for $ac_hdr" >&5
20464 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20465   echo $ac_n "(cached) $ac_c" 1>&6
20466 else
20467   cat > conftest.$ac_ext <<EOF
20468 #line 20469 "configure"
20469 #include "confdefs.h"
20470 #include <$ac_hdr>
20471 EOF
20472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20473 { (eval echo configure:20474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20475 if test -z "$ac_err"; then
20476   rm -rf conftest*
20477   eval "ac_cv_header_$ac_safe=yes"
20478 else
20479   echo "$ac_err" >&5
20480   echo "configure: failed program was:" >&5
20481   cat conftest.$ac_ext >&5
20482   rm -rf conftest*
20483   eval "ac_cv_header_$ac_safe=no"
20484 fi
20485 rm -f conftest*
20486 fi
20487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20488   echo "$ac_t""yes" 1>&6
20489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20490   cat >> confdefs.h <<EOF
20491 #define $ac_tr_hdr 1
20492 EOF
20493  
20494                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20495 echo "configure:20496: checking for TCP wrappers library" >&5
20496                 save_LIBS="$LIBS"
20497                 LIBS="$LIBS -lwrap"
20498                 cat > conftest.$ac_ext <<EOF
20499 #line 20500 "configure"
20500 #include "confdefs.h"
20501
20502 #include <tcpd.h>
20503 int allow_severity = 0;
20504 int deny_severity  = 0;
20505
20506 struct request_info *req;
20507                 
20508 int main() {
20509
20510 hosts_access(req)
20511                 
20512 ; return 0; }
20513 EOF
20514 if { (eval echo configure:20515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20515   rm -rf conftest*
20516   echo "$ac_t""-lwrap" 1>&6
20517                 have_wrappers=yes
20518                 LIBS="$save_LIBS"
20519 else
20520   echo "configure: failed program was:" >&5
20521   cat conftest.$ac_ext >&5
20522   rm -rf conftest*
20523   
20524                                 LIBS="$LIBS -lnsl"
20525                 cat > conftest.$ac_ext <<EOF
20526 #line 20527 "configure"
20527 #include "confdefs.h"
20528
20529 #include <tcpd.h>
20530 int allow_severity = 0;
20531 int deny_severity  = 0;
20532
20533 struct request_info *req;
20534                 
20535 int main() {
20536
20537 hosts_access(req)
20538                 
20539 ; return 0; }
20540 EOF
20541 if { (eval echo configure:20542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20542   rm -rf conftest*
20543   echo "$ac_t""-lwrap -lnsl" 1>&6
20544                 have_wrappers=yes
20545                 LIBS="$save_LIBS -lnsl"
20546 else
20547   echo "configure: failed program was:" >&5
20548   cat conftest.$ac_ext >&5
20549   rm -rf conftest*
20550   
20551                 echo "$ac_t""no" 1>&6
20552                 have_wrappers=no
20553                 LIBS=$save_LIBS
20554 fi
20555 rm -f conftest*
20556 fi
20557 rm -f conftest*
20558 else
20559   echo "$ac_t""no" 1>&6
20560 have_wrappers=no
20561 fi
20562 done
20563
20564
20565         if test $have_wrappers = yes ; then
20566                 cat >> confdefs.h <<\EOF
20567 #define HAVE_TCPD 1
20568 EOF
20569
20570                 WRAP_LIBS="-lwrap"
20571         elif test $ol_enable_wrappers = yes ; then
20572                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20573         else
20574                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20575                 WRAP_LIBS=""
20576         fi
20577 fi
20578
20579 if test $ol_enable_syslog != no ; then
20580         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20581 echo "configure:20582: checking for openlog" >&5
20582 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20583   echo $ac_n "(cached) $ac_c" 1>&6
20584 else
20585   cat > conftest.$ac_ext <<EOF
20586 #line 20587 "configure"
20587 #include "confdefs.h"
20588 /* System header to define __stub macros and hopefully few prototypes,
20589     which can conflict with char openlog(); below.  */
20590 #include <assert.h>
20591 /* Override any gcc2 internal prototype to avoid an error.  */
20592 /* We use char because int might match the return type of a gcc2
20593     builtin and then its argument prototype would still apply.  */
20594 char openlog();
20595 char (*f)();
20596
20597 int main() {
20598
20599 /* The GNU C library defines this for functions which it implements
20600     to always fail with ENOSYS.  Some functions are actually named
20601     something starting with __ and the normal name is an alias.  */
20602 #if defined (__stub_openlog) || defined (__stub___openlog)
20603 choke me
20604 #else
20605 f = openlog;
20606 #endif
20607
20608 ; return 0; }
20609 EOF
20610 if { (eval echo configure:20611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20611   rm -rf conftest*
20612   eval "ac_cv_func_openlog=yes"
20613 else
20614   echo "configure: failed program was:" >&5
20615   cat conftest.$ac_ext >&5
20616   rm -rf conftest*
20617   eval "ac_cv_func_openlog=no"
20618 fi
20619 rm -f conftest*
20620 fi
20621
20622 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20623   echo "$ac_t""yes" 1>&6
20624   :
20625 else
20626   echo "$ac_t""no" 1>&6
20627 fi
20628
20629         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20630                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20631         fi
20632         ol_enable_syslog=$ac_cv_func_openlog
20633 fi
20634
20635
20636 ol_link_sql=no
20637 if test $ol_enable_sql != no ; then
20638         for ac_hdr in sql.h sqlext.h
20639 do
20640 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20641 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20642 echo "configure:20643: checking for $ac_hdr" >&5
20643 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20644   echo $ac_n "(cached) $ac_c" 1>&6
20645 else
20646   cat > conftest.$ac_ext <<EOF
20647 #line 20648 "configure"
20648 #include "confdefs.h"
20649 #include <$ac_hdr>
20650 EOF
20651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20652 { (eval echo configure:20653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20654 if test -z "$ac_err"; then
20655   rm -rf conftest*
20656   eval "ac_cv_header_$ac_safe=yes"
20657 else
20658   echo "$ac_err" >&5
20659   echo "configure: failed program was:" >&5
20660   cat conftest.$ac_ext >&5
20661   rm -rf conftest*
20662   eval "ac_cv_header_$ac_safe=no"
20663 fi
20664 rm -f conftest*
20665 fi
20666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20667   echo "$ac_t""yes" 1>&6
20668     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20669   cat >> confdefs.h <<EOF
20670 #define $ac_tr_hdr 1
20671 EOF
20672  
20673 else
20674   echo "$ac_t""no" 1>&6
20675 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20676         
20677 fi
20678 done
20679
20680
20681         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20682 echo "configure:20683: checking for SQLDriverConnect in -liodbc" >&5
20683 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20684 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20685   echo $ac_n "(cached) $ac_c" 1>&6
20686 else
20687   ac_save_LIBS="$LIBS"
20688 LIBS="-liodbc  $LIBS"
20689 cat > conftest.$ac_ext <<EOF
20690 #line 20691 "configure"
20691 #include "confdefs.h"
20692 /* Override any gcc2 internal prototype to avoid an error.  */
20693 /* We use char because int might match the return type of a gcc2
20694     builtin and then its argument prototype would still apply.  */
20695 char SQLDriverConnect();
20696
20697 int main() {
20698 SQLDriverConnect()
20699 ; return 0; }
20700 EOF
20701 if { (eval echo configure:20702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20702   rm -rf conftest*
20703   eval "ac_cv_lib_$ac_lib_var=yes"
20704 else
20705   echo "configure: failed program was:" >&5
20706   cat conftest.$ac_ext >&5
20707   rm -rf conftest*
20708   eval "ac_cv_lib_$ac_lib_var=no"
20709 fi
20710 rm -f conftest*
20711 LIBS="$ac_save_LIBS"
20712
20713 fi
20714 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20715   echo "$ac_t""yes" 1>&6
20716   have_iodbc=yes
20717 else
20718   echo "$ac_t""no" 1>&6
20719 have_iodbc=no
20720 fi
20721
20722         if test $have_iodbc = yes ; then
20723                 ol_link_sql="-liodbc"
20724         else
20725                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20726 echo "configure:20727: checking for SQLDriverConnect in -lodbc" >&5
20727 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20729   echo $ac_n "(cached) $ac_c" 1>&6
20730 else
20731   ac_save_LIBS="$LIBS"
20732 LIBS="-lodbc  $LIBS"
20733 cat > conftest.$ac_ext <<EOF
20734 #line 20735 "configure"
20735 #include "confdefs.h"
20736 /* Override any gcc2 internal prototype to avoid an error.  */
20737 /* We use char because int might match the return type of a gcc2
20738     builtin and then its argument prototype would still apply.  */
20739 char SQLDriverConnect();
20740
20741 int main() {
20742 SQLDriverConnect()
20743 ; return 0; }
20744 EOF
20745 if { (eval echo configure:20746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20746   rm -rf conftest*
20747   eval "ac_cv_lib_$ac_lib_var=yes"
20748 else
20749   echo "configure: failed program was:" >&5
20750   cat conftest.$ac_ext >&5
20751   rm -rf conftest*
20752   eval "ac_cv_lib_$ac_lib_var=no"
20753 fi
20754 rm -f conftest*
20755 LIBS="$ac_save_LIBS"
20756
20757 fi
20758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20759   echo "$ac_t""yes" 1>&6
20760   have_odbc=yes
20761 else
20762   echo "$ac_t""no" 1>&6
20763 have_odbc=no
20764 fi
20765
20766                 if test $have_odbc = yes ; then
20767                         ol_link_sql="-lodbc"
20768                 fi
20769         fi
20770
20771         if test $ol_link_sql != no ; then
20772                 SLAPD_SQL_LIBS="$ol_link_sql"
20773
20774         elif test $ol_enable_sql != auto ; then
20775                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20776         fi
20777 fi
20778
20779 ol_link_sasl=no
20780 ol_link_spasswd=no
20781 if test $ol_with_cyrus_sasl != no ; then
20782         for ac_hdr in sasl/sasl.h sasl.h
20783 do
20784 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20785 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20786 echo "configure:20787: checking for $ac_hdr" >&5
20787 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20788   echo $ac_n "(cached) $ac_c" 1>&6
20789 else
20790   cat > conftest.$ac_ext <<EOF
20791 #line 20792 "configure"
20792 #include "confdefs.h"
20793 #include <$ac_hdr>
20794 EOF
20795 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20796 { (eval echo configure:20797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20797 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20798 if test -z "$ac_err"; then
20799   rm -rf conftest*
20800   eval "ac_cv_header_$ac_safe=yes"
20801 else
20802   echo "$ac_err" >&5
20803   echo "configure: failed program was:" >&5
20804   cat conftest.$ac_ext >&5
20805   rm -rf conftest*
20806   eval "ac_cv_header_$ac_safe=no"
20807 fi
20808 rm -f conftest*
20809 fi
20810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20811   echo "$ac_t""yes" 1>&6
20812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20813   cat >> confdefs.h <<EOF
20814 #define $ac_tr_hdr 1
20815 EOF
20816  
20817 else
20818   echo "$ac_t""no" 1>&6
20819 fi
20820 done
20821
20822
20823         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20824                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20825 echo "configure:20826: checking for sasl_client_init in -lsasl2" >&5
20826 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20827 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20828   echo $ac_n "(cached) $ac_c" 1>&6
20829 else
20830   ac_save_LIBS="$LIBS"
20831 LIBS="-lsasl2  $LIBS"
20832 cat > conftest.$ac_ext <<EOF
20833 #line 20834 "configure"
20834 #include "confdefs.h"
20835 /* Override any gcc2 internal prototype to avoid an error.  */
20836 /* We use char because int might match the return type of a gcc2
20837     builtin and then its argument prototype would still apply.  */
20838 char sasl_client_init();
20839
20840 int main() {
20841 sasl_client_init()
20842 ; return 0; }
20843 EOF
20844 if { (eval echo configure:20845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20845   rm -rf conftest*
20846   eval "ac_cv_lib_$ac_lib_var=yes"
20847 else
20848   echo "configure: failed program was:" >&5
20849   cat conftest.$ac_ext >&5
20850   rm -rf conftest*
20851   eval "ac_cv_lib_$ac_lib_var=no"
20852 fi
20853 rm -f conftest*
20854 LIBS="$ac_save_LIBS"
20855
20856 fi
20857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20858   echo "$ac_t""yes" 1>&6
20859   ol_link_sasl="-lsasl2"
20860 else
20861   echo "$ac_t""no" 1>&6
20862 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20863 echo "configure:20864: checking for sasl_client_init in -lsasl" >&5
20864 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20865 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20866   echo $ac_n "(cached) $ac_c" 1>&6
20867 else
20868   ac_save_LIBS="$LIBS"
20869 LIBS="-lsasl  $LIBS"
20870 cat > conftest.$ac_ext <<EOF
20871 #line 20872 "configure"
20872 #include "confdefs.h"
20873 /* Override any gcc2 internal prototype to avoid an error.  */
20874 /* We use char because int might match the return type of a gcc2
20875     builtin and then its argument prototype would still apply.  */
20876 char sasl_client_init();
20877
20878 int main() {
20879 sasl_client_init()
20880 ; return 0; }
20881 EOF
20882 if { (eval echo configure:20883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20883   rm -rf conftest*
20884   eval "ac_cv_lib_$ac_lib_var=yes"
20885 else
20886   echo "configure: failed program was:" >&5
20887   cat conftest.$ac_ext >&5
20888   rm -rf conftest*
20889   eval "ac_cv_lib_$ac_lib_var=no"
20890 fi
20891 rm -f conftest*
20892 LIBS="$ac_save_LIBS"
20893
20894 fi
20895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20896   echo "$ac_t""yes" 1>&6
20897   ol_link_sasl="-lsasl"
20898 else
20899   echo "$ac_t""no" 1>&6
20900 fi
20901
20902 fi
20903
20904         fi
20905
20906         if test $ol_link_sasl = no ; then
20907                 if test $ol_with_cyrus_sasl != auto ; then
20908                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20909                 else
20910                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20911                         echo "configure: warning: SASL authentication not supported!" 1>&2
20912                         if test $ol_link_tls = no ; then
20913                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20914                         fi
20915                 fi
20916         else
20917                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20918 echo "configure:20919: checking Cyrus SASL library version" >&5
20919 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20920   echo $ac_n "(cached) $ac_c" 1>&6
20921 else
20922   
20923         cat > conftest.$ac_ext <<EOF
20924 #line 20925 "configure"
20925 #include "confdefs.h"
20926
20927 #ifdef HAVE_SASL_SASL_H
20928 #include <sasl/sasl.h>
20929 #else
20930 #include <sasl.h>
20931 #endif
20932
20933 /* require 2.1.3 or later */
20934 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20935         char *__sasl_compat = "2.2+ or better okay (we guess)";
20936 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20937         && SASL_VERSION_STEP >=3
20938         char *__sasl_compat = "2.1.3+ or better okay";
20939 #endif
20940         
20941 EOF
20942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20943   egrep "__sasl_compat" >/dev/null 2>&1; then
20944   rm -rf conftest*
20945   ol_cv_sasl_compat=yes
20946 else
20947   rm -rf conftest*
20948   ol_cv_sasl_compat=no
20949 fi
20950 rm -f conftest*
20951
20952 fi
20953
20954 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20955
20956                 if test $ol_cv_sasl_compat = no ; then
20957                         ol_link_sasl=no
20958                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20959                 fi
20960
20961                 cat >> confdefs.h <<\EOF
20962 #define HAVE_CYRUS_SASL 1
20963 EOF
20964
20965                 SASL_LIBS="$ol_link_sasl"
20966                 if test $ol_enable_spasswd != no ; then
20967                         ol_link_spasswd=yes
20968                 fi
20969
20970                 ac_save_LIBS="$LIBS"
20971                 LIBS="$LIBS $ol_link_sasl"
20972                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20973 echo "configure:20974: checking for sasl_version" >&5
20974 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20975   echo $ac_n "(cached) $ac_c" 1>&6
20976 else
20977   cat > conftest.$ac_ext <<EOF
20978 #line 20979 "configure"
20979 #include "confdefs.h"
20980 /* System header to define __stub macros and hopefully few prototypes,
20981     which can conflict with char sasl_version(); below.  */
20982 #include <assert.h>
20983 /* Override any gcc2 internal prototype to avoid an error.  */
20984 /* We use char because int might match the return type of a gcc2
20985     builtin and then its argument prototype would still apply.  */
20986 char sasl_version();
20987 char (*f)();
20988
20989 int main() {
20990
20991 /* The GNU C library defines this for functions which it implements
20992     to always fail with ENOSYS.  Some functions are actually named
20993     something starting with __ and the normal name is an alias.  */
20994 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20995 choke me
20996 #else
20997 f = sasl_version;
20998 #endif
20999
21000 ; return 0; }
21001 EOF
21002 if { (eval echo configure:21003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21003   rm -rf conftest*
21004   eval "ac_cv_func_sasl_version=yes"
21005 else
21006   echo "configure: failed program was:" >&5
21007   cat conftest.$ac_ext >&5
21008   rm -rf conftest*
21009   eval "ac_cv_func_sasl_version=no"
21010 fi
21011 rm -f conftest*
21012 fi
21013
21014 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21015   echo "$ac_t""yes" 1>&6
21016   cat >> confdefs.h <<\EOF
21017 #define HAVE_SASL_VERSION 1
21018 EOF
21019
21020 else
21021   echo "$ac_t""no" 1>&6
21022 fi
21023
21024                 LIBS="$ac_save_LIBS"
21025         fi
21026
21027 else
21028         echo "configure: warning: SASL authentication not supported!" 1>&2
21029         if test $ol_link_tls = no ; then
21030                 echo "configure: warning: Strong authentication not supported!" 1>&2
21031         fi
21032 fi
21033
21034 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21035         dev=no
21036         if test -r /dev/urandom ; then
21037                 dev="/dev/urandom";
21038         elif test -r /idev/urandom ; then
21039                 dev="/idev/urandom";
21040         elif test -r /dev/srandom ; then
21041                 dev="/dev/srandom";
21042         elif test -r /dev/random ; then
21043                 dev="/dev/random";
21044         elif test -r /idev/random ; then
21045                 dev="/idev/random";
21046         fi
21047
21048         if test $dev != no ; then
21049                 cat >> confdefs.h <<EOF
21050 #define URANDOM_DEVICE "$dev"
21051 EOF
21052
21053         fi
21054 fi
21055
21056 ol_link_fetch=no
21057 if test $ol_with_fetch != no ; then
21058         ol_LIBS=$LIBS
21059 LIBS="-lfetch -lcom_err $LIBS"
21060 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21061 echo "configure:21062: checking fetch(3) library" >&5
21062 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21063   echo $ac_n "(cached) $ac_c" 1>&6
21064 else
21065   
21066         cat > conftest.$ac_ext <<EOF
21067 #line 21068 "configure"
21068 #include "confdefs.h"
21069
21070 #include <sys/param.h>
21071 #include <stdio.h>
21072 #include <fetch.h>
21073 int main() {
21074 struct url *u = fetchParseURL("file:///"); 
21075 ; return 0; }
21076 EOF
21077 if { (eval echo configure:21078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21078   rm -rf conftest*
21079   ol_cv_lib_fetch=yes
21080 else
21081   echo "configure: failed program was:" >&5
21082   cat conftest.$ac_ext >&5
21083   rm -rf conftest*
21084   ol_cv_lib_fetch=no
21085 fi
21086 rm -f conftest*
21087 fi
21088
21089 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21090 LIBS=$ol_LIBS
21091 if test $ol_cv_lib_fetch != no ; then
21092         ol_link_fetch="-lfetch -lcom_err"
21093         cat >> confdefs.h <<\EOF
21094 #define HAVE_FETCH 1
21095 EOF
21096
21097 fi
21098
21099
21100         if test $ol_cv_lib_fetch != no ; then
21101                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21102                 ol_link_fetch=freebsd
21103
21104         elif test $ol_with_fetch != auto ; then
21105                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21106         fi 
21107 fi
21108
21109 if test $ol_enable_crypt != no ; then
21110         save_LIBS="$LIBS"
21111         LIBS="$TLS_LIBS $LIBS"
21112
21113         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21114 echo "configure:21115: checking for crypt" >&5
21115 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21116   echo $ac_n "(cached) $ac_c" 1>&6
21117 else
21118   cat > conftest.$ac_ext <<EOF
21119 #line 21120 "configure"
21120 #include "confdefs.h"
21121 /* System header to define __stub macros and hopefully few prototypes,
21122     which can conflict with char crypt(); below.  */
21123 #include <assert.h>
21124 /* Override any gcc2 internal prototype to avoid an error.  */
21125 /* We use char because int might match the return type of a gcc2
21126     builtin and then its argument prototype would still apply.  */
21127 char crypt();
21128 char (*f)();
21129
21130 int main() {
21131
21132 /* The GNU C library defines this for functions which it implements
21133     to always fail with ENOSYS.  Some functions are actually named
21134     something starting with __ and the normal name is an alias.  */
21135 #if defined (__stub_crypt) || defined (__stub___crypt)
21136 choke me
21137 #else
21138 f = crypt;
21139 #endif
21140
21141 ; return 0; }
21142 EOF
21143 if { (eval echo configure:21144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21144   rm -rf conftest*
21145   eval "ac_cv_func_crypt=yes"
21146 else
21147   echo "configure: failed program was:" >&5
21148   cat conftest.$ac_ext >&5
21149   rm -rf conftest*
21150   eval "ac_cv_func_crypt=no"
21151 fi
21152 rm -f conftest*
21153 fi
21154
21155 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21156   echo "$ac_t""yes" 1>&6
21157   have_crypt=yes
21158 else
21159   echo "$ac_t""no" 1>&6
21160
21161                 LIBS="$save_LIBS"
21162                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21163 echo "configure:21164: checking for crypt in -lcrypt" >&5
21164 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21166   echo $ac_n "(cached) $ac_c" 1>&6
21167 else
21168   ac_save_LIBS="$LIBS"
21169 LIBS="-lcrypt  $LIBS"
21170 cat > conftest.$ac_ext <<EOF
21171 #line 21172 "configure"
21172 #include "confdefs.h"
21173 /* Override any gcc2 internal prototype to avoid an error.  */
21174 /* We use char because int might match the return type of a gcc2
21175     builtin and then its argument prototype would still apply.  */
21176 char crypt();
21177
21178 int main() {
21179 crypt()
21180 ; return 0; }
21181 EOF
21182 if { (eval echo configure:21183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21183   rm -rf conftest*
21184   eval "ac_cv_lib_$ac_lib_var=yes"
21185 else
21186   echo "configure: failed program was:" >&5
21187   cat conftest.$ac_ext >&5
21188   rm -rf conftest*
21189   eval "ac_cv_lib_$ac_lib_var=no"
21190 fi
21191 rm -f conftest*
21192 LIBS="$ac_save_LIBS"
21193
21194 fi
21195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21196   echo "$ac_t""yes" 1>&6
21197   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21198                         have_crypt=yes
21199 else
21200   echo "$ac_t""no" 1>&6
21201 have_crypt=no
21202 fi
21203
21204 fi
21205
21206
21207         LIBS="$save_LIBS"
21208
21209         if test $have_crypt = yes ; then
21210                 cat >> confdefs.h <<\EOF
21211 #define HAVE_CRYPT 1
21212 EOF
21213
21214         else
21215                 echo "configure: warning: could not find crypt" 1>&2
21216                 if test $ol_enable_crypt = yes ; then
21217                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21218                 fi
21219
21220                 echo "configure: warning: disabling crypt support" 1>&2
21221                 ol_enable_crypt=no
21222         fi
21223 fi
21224
21225 if test $ol_enable_proctitle != no ; then
21226         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21227 echo "configure:21228: checking for setproctitle" >&5
21228 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21229   echo $ac_n "(cached) $ac_c" 1>&6
21230 else
21231   cat > conftest.$ac_ext <<EOF
21232 #line 21233 "configure"
21233 #include "confdefs.h"
21234 /* System header to define __stub macros and hopefully few prototypes,
21235     which can conflict with char setproctitle(); below.  */
21236 #include <assert.h>
21237 /* Override any gcc2 internal prototype to avoid an error.  */
21238 /* We use char because int might match the return type of a gcc2
21239     builtin and then its argument prototype would still apply.  */
21240 char setproctitle();
21241 char (*f)();
21242
21243 int main() {
21244
21245 /* The GNU C library defines this for functions which it implements
21246     to always fail with ENOSYS.  Some functions are actually named
21247     something starting with __ and the normal name is an alias.  */
21248 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21249 choke me
21250 #else
21251 f = setproctitle;
21252 #endif
21253
21254 ; return 0; }
21255 EOF
21256 if { (eval echo configure:21257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21257   rm -rf conftest*
21258   eval "ac_cv_func_setproctitle=yes"
21259 else
21260   echo "configure: failed program was:" >&5
21261   cat conftest.$ac_ext >&5
21262   rm -rf conftest*
21263   eval "ac_cv_func_setproctitle=no"
21264 fi
21265 rm -f conftest*
21266 fi
21267
21268 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21269   echo "$ac_t""yes" 1>&6
21270   have_setproctitle=yes
21271 else
21272   echo "$ac_t""no" 1>&6
21273
21274                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21275 echo "configure:21276: checking for setproctitle in -lutil" >&5
21276 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21277 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21278   echo $ac_n "(cached) $ac_c" 1>&6
21279 else
21280   ac_save_LIBS="$LIBS"
21281 LIBS="-lutil  $LIBS"
21282 cat > conftest.$ac_ext <<EOF
21283 #line 21284 "configure"
21284 #include "confdefs.h"
21285 /* Override any gcc2 internal prototype to avoid an error.  */
21286 /* We use char because int might match the return type of a gcc2
21287     builtin and then its argument prototype would still apply.  */
21288 char setproctitle();
21289
21290 int main() {
21291 setproctitle()
21292 ; return 0; }
21293 EOF
21294 if { (eval echo configure:21295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21295   rm -rf conftest*
21296   eval "ac_cv_lib_$ac_lib_var=yes"
21297 else
21298   echo "configure: failed program was:" >&5
21299   cat conftest.$ac_ext >&5
21300   rm -rf conftest*
21301   eval "ac_cv_lib_$ac_lib_var=no"
21302 fi
21303 rm -f conftest*
21304 LIBS="$ac_save_LIBS"
21305
21306 fi
21307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21308   echo "$ac_t""yes" 1>&6
21309   have_setproctitle=yes
21310                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21311 else
21312   echo "$ac_t""no" 1>&6
21313 have_setproctitle=no
21314                         LIBOBJS="$LIBOBJS setproctitle.o"
21315                         LIBSRCS="$LIBSRCS setproctitle.c"
21316 fi
21317
21318 fi
21319
21320
21321         if test $have_setproctitle = yes ; then
21322                 cat >> confdefs.h <<\EOF
21323 #define HAVE_SETPROCTITLE 1
21324 EOF
21325
21326         fi
21327 fi
21328
21329 if test $ol_enable_slp != no ; then
21330         for ac_hdr in slp.h 
21331 do
21332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21334 echo "configure:21335: checking for $ac_hdr" >&5
21335 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21336   echo $ac_n "(cached) $ac_c" 1>&6
21337 else
21338   cat > conftest.$ac_ext <<EOF
21339 #line 21340 "configure"
21340 #include "confdefs.h"
21341 #include <$ac_hdr>
21342 EOF
21343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21344 { (eval echo configure:21345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21346 if test -z "$ac_err"; then
21347   rm -rf conftest*
21348   eval "ac_cv_header_$ac_safe=yes"
21349 else
21350   echo "$ac_err" >&5
21351   echo "configure: failed program was:" >&5
21352   cat conftest.$ac_ext >&5
21353   rm -rf conftest*
21354   eval "ac_cv_header_$ac_safe=no"
21355 fi
21356 rm -f conftest*
21357 fi
21358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21359   echo "$ac_t""yes" 1>&6
21360     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21361   cat >> confdefs.h <<EOF
21362 #define $ac_tr_hdr 1
21363 EOF
21364  
21365 else
21366   echo "$ac_t""no" 1>&6
21367 fi
21368 done
21369
21370
21371         if test $ac_cv_header_slp_h = yes ; then
21372                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21373 echo "configure:21374: checking for SLPOpen in -lslp" >&5
21374 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21376   echo $ac_n "(cached) $ac_c" 1>&6
21377 else
21378   ac_save_LIBS="$LIBS"
21379 LIBS="-lslp  $LIBS"
21380 cat > conftest.$ac_ext <<EOF
21381 #line 21382 "configure"
21382 #include "confdefs.h"
21383 /* Override any gcc2 internal prototype to avoid an error.  */
21384 /* We use char because int might match the return type of a gcc2
21385     builtin and then its argument prototype would still apply.  */
21386 char SLPOpen();
21387
21388 int main() {
21389 SLPOpen()
21390 ; return 0; }
21391 EOF
21392 if { (eval echo configure:21393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21393   rm -rf conftest*
21394   eval "ac_cv_lib_$ac_lib_var=yes"
21395 else
21396   echo "configure: failed program was:" >&5
21397   cat conftest.$ac_ext >&5
21398   rm -rf conftest*
21399   eval "ac_cv_lib_$ac_lib_var=no"
21400 fi
21401 rm -f conftest*
21402 LIBS="$ac_save_LIBS"
21403
21404 fi
21405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21406   echo "$ac_t""yes" 1>&6
21407   have_slp=yes
21408 else
21409   echo "$ac_t""no" 1>&6
21410 have_slp=no
21411 fi
21412
21413                 if test $have_slp = yes ; then
21414                         cat >> confdefs.h <<\EOF
21415 #define HAVE_SLP 1
21416 EOF
21417
21418                         SLAPD_SLP_LIBS=-lslp
21419                 fi
21420
21421         elif test $ol_enable_slp = yes ; then
21422                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21423         fi
21424 fi
21425
21426
21427 echo $ac_n "checking long long""... $ac_c" 1>&6
21428 echo "configure:21429: checking long long" >&5
21429 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21430   echo $ac_n "(cached) $ac_c" 1>&6
21431 else
21432   
21433         cat > conftest.$ac_ext <<EOF
21434 #line 21435 "configure"
21435 #include "confdefs.h"
21436
21437 int main() {
21438 long long x;
21439 ; return 0; }
21440 EOF
21441 if { (eval echo configure:21442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21442   rm -rf conftest*
21443   ol_cv_type_long_long=yes
21444 else
21445   echo "configure: failed program was:" >&5
21446   cat conftest.$ac_ext >&5
21447   rm -rf conftest*
21448   ol_cv_type_long_long=no
21449 fi
21450 rm -f conftest*
21451 fi
21452
21453 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21454 if test $ol_cv_type_long_long = yes; then
21455         cat >> confdefs.h <<\EOF
21456 #define HAVE_LONG_LONG 1
21457 EOF
21458
21459 fi
21460
21461 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21462 echo "configure:21463: checking for ANSI C header files" >&5
21463 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21464   echo $ac_n "(cached) $ac_c" 1>&6
21465 else
21466   cat > conftest.$ac_ext <<EOF
21467 #line 21468 "configure"
21468 #include "confdefs.h"
21469 #include <stdlib.h>
21470 #include <stdarg.h>
21471 #include <string.h>
21472 #include <float.h>
21473 EOF
21474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21475 { (eval echo configure:21476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21477 if test -z "$ac_err"; then
21478   rm -rf conftest*
21479   ac_cv_header_stdc=yes
21480 else
21481   echo "$ac_err" >&5
21482   echo "configure: failed program was:" >&5
21483   cat conftest.$ac_ext >&5
21484   rm -rf conftest*
21485   ac_cv_header_stdc=no
21486 fi
21487 rm -f conftest*
21488
21489 if test $ac_cv_header_stdc = yes; then
21490   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21491 cat > conftest.$ac_ext <<EOF
21492 #line 21493 "configure"
21493 #include "confdefs.h"
21494 #include <string.h>
21495 EOF
21496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21497   egrep "memchr" >/dev/null 2>&1; then
21498   :
21499 else
21500   rm -rf conftest*
21501   ac_cv_header_stdc=no
21502 fi
21503 rm -f conftest*
21504
21505 fi
21506
21507 if test $ac_cv_header_stdc = yes; then
21508   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21509 cat > conftest.$ac_ext <<EOF
21510 #line 21511 "configure"
21511 #include "confdefs.h"
21512 #include <stdlib.h>
21513 EOF
21514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21515   egrep "free" >/dev/null 2>&1; then
21516   :
21517 else
21518   rm -rf conftest*
21519   ac_cv_header_stdc=no
21520 fi
21521 rm -f conftest*
21522
21523 fi
21524
21525 if test $ac_cv_header_stdc = yes; then
21526   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21527 if test "$cross_compiling" = yes; then
21528   :
21529 else
21530   cat > conftest.$ac_ext <<EOF
21531 #line 21532 "configure"
21532 #include "confdefs.h"
21533 #include <ctype.h>
21534 #if ((' ' & 0x0FF) == 0x020)
21535 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21536 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21537 #else
21538 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21539  || ('j' <= (c) && (c) <= 'r') \
21540  || ('s' <= (c) && (c) <= 'z'))
21541 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21542 #endif
21543 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21544 int main () { int i; for (i = 0; i < 256; i++)
21545 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21546 exit (0); }
21547
21548 EOF
21549 if { (eval echo configure:21550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21550 then
21551   :
21552 else
21553   echo "configure: failed program was:" >&5
21554   cat conftest.$ac_ext >&5
21555   rm -fr conftest*
21556   ac_cv_header_stdc=no
21557 fi
21558 rm -fr conftest*
21559 fi
21560
21561 fi
21562 fi
21563
21564 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21565 if test $ac_cv_header_stdc = yes; then
21566   cat >> confdefs.h <<\EOF
21567 #define STDC_HEADERS 1
21568 EOF
21569
21570 fi
21571
21572 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21573 echo "configure:21574: checking for mode_t" >&5
21574 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21575   echo $ac_n "(cached) $ac_c" 1>&6
21576 else
21577   cat > conftest.$ac_ext <<EOF
21578 #line 21579 "configure"
21579 #include "confdefs.h"
21580 #include <sys/types.h>
21581 #if STDC_HEADERS
21582 #include <stdlib.h>
21583 #include <stddef.h>
21584 #endif
21585
21586 EOF
21587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21588   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21589   rm -rf conftest*
21590   eval "ac_cv_type_mode_t=yes"
21591 else
21592   rm -rf conftest*
21593   eval "ac_cv_type_mode_t=no"
21594 fi
21595 rm -f conftest*
21596
21597 fi
21598 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21599   echo "$ac_t""yes" 1>&6
21600 else
21601   echo "$ac_t""no" 1>&6
21602   cat >> confdefs.h <<EOF
21603 #define mode_t int
21604 EOF
21605
21606 fi
21607
21608 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21609 echo "configure:21610: checking for off_t" >&5
21610 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21611   echo $ac_n "(cached) $ac_c" 1>&6
21612 else
21613   cat > conftest.$ac_ext <<EOF
21614 #line 21615 "configure"
21615 #include "confdefs.h"
21616 #include <sys/types.h>
21617 #if STDC_HEADERS
21618 #include <stdlib.h>
21619 #include <stddef.h>
21620 #endif
21621
21622 EOF
21623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21624   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21625   rm -rf conftest*
21626   eval "ac_cv_type_off_t=yes"
21627 else
21628   rm -rf conftest*
21629   eval "ac_cv_type_off_t=no"
21630 fi
21631 rm -f conftest*
21632
21633 fi
21634 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21635   echo "$ac_t""yes" 1>&6
21636 else
21637   echo "$ac_t""no" 1>&6
21638   cat >> confdefs.h <<EOF
21639 #define off_t long
21640 EOF
21641
21642 fi
21643
21644 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21645 echo "configure:21646: checking for pid_t" >&5
21646 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21647   echo $ac_n "(cached) $ac_c" 1>&6
21648 else
21649   cat > conftest.$ac_ext <<EOF
21650 #line 21651 "configure"
21651 #include "confdefs.h"
21652 #include <sys/types.h>
21653 #if STDC_HEADERS
21654 #include <stdlib.h>
21655 #include <stddef.h>
21656 #endif
21657
21658 EOF
21659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21660   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21661   rm -rf conftest*
21662   eval "ac_cv_type_pid_t=yes"
21663 else
21664   rm -rf conftest*
21665   eval "ac_cv_type_pid_t=no"
21666 fi
21667 rm -f conftest*
21668
21669 fi
21670 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21671   echo "$ac_t""yes" 1>&6
21672 else
21673   echo "$ac_t""no" 1>&6
21674   cat >> confdefs.h <<EOF
21675 #define pid_t int
21676 EOF
21677
21678 fi
21679
21680 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21681 echo "configure:21682: checking for ptrdiff_t" >&5
21682 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21683   echo $ac_n "(cached) $ac_c" 1>&6
21684 else
21685   cat > conftest.$ac_ext <<EOF
21686 #line 21687 "configure"
21687 #include "confdefs.h"
21688 #include <stddef.h>
21689 int main() {
21690 ptrdiff_t p
21691 ; return 0; }
21692 EOF
21693 if { (eval echo configure:21694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21694   rm -rf conftest*
21695   am_cv_type_ptrdiff_t=yes
21696 else
21697   echo "configure: failed program was:" >&5
21698   cat conftest.$ac_ext >&5
21699   rm -rf conftest*
21700   am_cv_type_ptrdiff_t=no
21701 fi
21702 rm -f conftest*
21703 fi
21704
21705 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21706    if test $am_cv_type_ptrdiff_t = yes; then
21707      cat >> confdefs.h <<\EOF
21708 #define HAVE_PTRDIFF_T 1
21709 EOF
21710
21711    fi
21712
21713 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21714 echo "configure:21715: checking return type of signal handlers" >&5
21715 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21716   echo $ac_n "(cached) $ac_c" 1>&6
21717 else
21718   cat > conftest.$ac_ext <<EOF
21719 #line 21720 "configure"
21720 #include "confdefs.h"
21721 #include <sys/types.h>
21722 #include <signal.h>
21723 #ifdef signal
21724 #undef signal
21725 #endif
21726 #ifdef __cplusplus
21727 extern "C" void (*signal (int, void (*)(int)))(int);
21728 #else
21729 void (*signal ()) ();
21730 #endif
21731
21732 int main() {
21733 int i;
21734 ; return 0; }
21735 EOF
21736 if { (eval echo configure:21737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21737   rm -rf conftest*
21738   ac_cv_type_signal=void
21739 else
21740   echo "configure: failed program was:" >&5
21741   cat conftest.$ac_ext >&5
21742   rm -rf conftest*
21743   ac_cv_type_signal=int
21744 fi
21745 rm -f conftest*
21746 fi
21747
21748 echo "$ac_t""$ac_cv_type_signal" 1>&6
21749 cat >> confdefs.h <<EOF
21750 #define RETSIGTYPE $ac_cv_type_signal
21751 EOF
21752
21753
21754 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21755 echo "configure:21756: checking for size_t" >&5
21756 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21757   echo $ac_n "(cached) $ac_c" 1>&6
21758 else
21759   cat > conftest.$ac_ext <<EOF
21760 #line 21761 "configure"
21761 #include "confdefs.h"
21762 #include <sys/types.h>
21763 #if STDC_HEADERS
21764 #include <stdlib.h>
21765 #include <stddef.h>
21766 #endif
21767
21768 EOF
21769 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21770   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21771   rm -rf conftest*
21772   eval "ac_cv_type_size_t=yes"
21773 else
21774   rm -rf conftest*
21775   eval "ac_cv_type_size_t=no"
21776 fi
21777 rm -f conftest*
21778
21779 fi
21780 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21781   echo "$ac_t""yes" 1>&6
21782 else
21783   echo "$ac_t""no" 1>&6
21784   cat >> confdefs.h <<EOF
21785 #define size_t unsigned
21786 EOF
21787
21788 fi
21789
21790
21791 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21792 echo "configure:21793: checking for ssize_t" >&5
21793 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21794   echo $ac_n "(cached) $ac_c" 1>&6
21795 else
21796   cat > conftest.$ac_ext <<EOF
21797 #line 21798 "configure"
21798 #include "confdefs.h"
21799 #include <sys/types.h>
21800 #if STDC_HEADERS
21801 #include <stdlib.h>
21802 #include <stddef.h>
21803 #endif
21804
21805 EOF
21806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21807   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21808   rm -rf conftest*
21809   eval "ac_cv_type_ssize_t=yes"
21810 else
21811   rm -rf conftest*
21812   eval "ac_cv_type_ssize_t=no"
21813 fi
21814 rm -f conftest*
21815
21816 fi
21817 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21818   echo "$ac_t""yes" 1>&6
21819 else
21820   echo "$ac_t""no" 1>&6
21821   cat >> confdefs.h <<EOF
21822 #define ssize_t signed int
21823 EOF
21824
21825 fi
21826
21827 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21828 echo "configure:21829: checking for caddr_t" >&5
21829 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21830   echo $ac_n "(cached) $ac_c" 1>&6
21831 else
21832   cat > conftest.$ac_ext <<EOF
21833 #line 21834 "configure"
21834 #include "confdefs.h"
21835 #include <sys/types.h>
21836 #if STDC_HEADERS
21837 #include <stdlib.h>
21838 #include <stddef.h>
21839 #endif
21840
21841 EOF
21842 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21843   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21844   rm -rf conftest*
21845   eval "ac_cv_type_caddr_t=yes"
21846 else
21847   rm -rf conftest*
21848   eval "ac_cv_type_caddr_t=no"
21849 fi
21850 rm -f conftest*
21851
21852 fi
21853 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21854   echo "$ac_t""yes" 1>&6
21855 else
21856   echo "$ac_t""no" 1>&6
21857   cat >> confdefs.h <<EOF
21858 #define caddr_t char *
21859 EOF
21860
21861 fi
21862
21863
21864 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21865 echo "configure:21866: checking for socklen_t" >&5
21866 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21867   echo $ac_n "(cached) $ac_c" 1>&6
21868 else
21869   cat > conftest.$ac_ext <<EOF
21870 #line 21871 "configure"
21871 #include "confdefs.h"
21872
21873 #ifdef HAVE_SYS_TYPES_H
21874 #include <sys/types.h>
21875 #endif
21876 #ifdef HAVE_SYS_SOCKET_H
21877 #include <sys/socket.h>
21878 #endif
21879
21880 int main() {
21881 socklen_t len;
21882 ; return 0; }
21883 EOF
21884 if { (eval echo configure:21885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21885   rm -rf conftest*
21886   ol_cv_type_socklen_t=yes
21887 else
21888   echo "configure: failed program was:" >&5
21889   cat conftest.$ac_ext >&5
21890   rm -rf conftest*
21891   ol_cv_type_socklen_t=no
21892 fi
21893 rm -f conftest*
21894 fi
21895
21896 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21897   if test $ol_cv_type_socklen_t = no; then
21898     cat >> confdefs.h <<\EOF
21899 #define socklen_t int
21900 EOF
21901
21902   fi
21903  
21904 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21905 echo "configure:21906: checking for member st_blksize in aggregate type struct stat" >&5
21906 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21907   echo $ac_n "(cached) $ac_c" 1>&6
21908 else
21909   cat > conftest.$ac_ext <<EOF
21910 #line 21911 "configure"
21911 #include "confdefs.h"
21912 #include <sys/types.h>
21913 #include <sys/stat.h>
21914 int main() {
21915 struct stat foo; foo.st_blksize;
21916 ; return 0; }
21917 EOF
21918 if { (eval echo configure:21919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21919   rm -rf conftest*
21920   ac_cv_c_struct_member_st_blksize=yes
21921 else
21922   echo "configure: failed program was:" >&5
21923   cat conftest.$ac_ext >&5
21924   rm -rf conftest*
21925   ac_cv_c_struct_member_st_blksize=no
21926 fi
21927 rm -f conftest*
21928 fi
21929
21930 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21931 st_blksize="$ac_cv_c_struct_member_st_blksize"
21932 if test $ac_cv_c_struct_member_st_blksize = yes; then
21933   cat >> confdefs.h <<\EOF
21934 #define HAVE_ST_BLKSIZE 1
21935 EOF
21936
21937 fi
21938
21939 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21940 echo "configure:21941: checking whether time.h and sys/time.h may both be included" >&5
21941 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21942   echo $ac_n "(cached) $ac_c" 1>&6
21943 else
21944   cat > conftest.$ac_ext <<EOF
21945 #line 21946 "configure"
21946 #include "confdefs.h"
21947 #include <sys/types.h>
21948 #include <sys/time.h>
21949 #include <time.h>
21950 int main() {
21951 struct tm *tp;
21952 ; return 0; }
21953 EOF
21954 if { (eval echo configure:21955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21955   rm -rf conftest*
21956   ac_cv_header_time=yes
21957 else
21958   echo "configure: failed program was:" >&5
21959   cat conftest.$ac_ext >&5
21960   rm -rf conftest*
21961   ac_cv_header_time=no
21962 fi
21963 rm -f conftest*
21964 fi
21965
21966 echo "$ac_t""$ac_cv_header_time" 1>&6
21967 if test $ac_cv_header_time = yes; then
21968   cat >> confdefs.h <<\EOF
21969 #define TIME_WITH_SYS_TIME 1
21970 EOF
21971
21972 fi
21973
21974 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21975 echo "configure:21976: checking whether struct tm is in sys/time.h or time.h" >&5
21976 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21977   echo $ac_n "(cached) $ac_c" 1>&6
21978 else
21979   cat > conftest.$ac_ext <<EOF
21980 #line 21981 "configure"
21981 #include "confdefs.h"
21982 #include <sys/types.h>
21983 #include <time.h>
21984 int main() {
21985 struct tm *tp; tp->tm_sec;
21986 ; return 0; }
21987 EOF
21988 if { (eval echo configure:21989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21989   rm -rf conftest*
21990   ac_cv_struct_tm=time.h
21991 else
21992   echo "configure: failed program was:" >&5
21993   cat conftest.$ac_ext >&5
21994   rm -rf conftest*
21995   ac_cv_struct_tm=sys/time.h
21996 fi
21997 rm -f conftest*
21998 fi
21999
22000 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22001 if test $ac_cv_struct_tm = sys/time.h; then
22002   cat >> confdefs.h <<\EOF
22003 #define TM_IN_SYS_TIME 1
22004 EOF
22005
22006 fi
22007
22008 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22009 echo "configure:22010: checking for uid_t in sys/types.h" >&5
22010 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22011   echo $ac_n "(cached) $ac_c" 1>&6
22012 else
22013   cat > conftest.$ac_ext <<EOF
22014 #line 22015 "configure"
22015 #include "confdefs.h"
22016 #include <sys/types.h>
22017 EOF
22018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22019   egrep "uid_t" >/dev/null 2>&1; then
22020   rm -rf conftest*
22021   ac_cv_type_uid_t=yes
22022 else
22023   rm -rf conftest*
22024   ac_cv_type_uid_t=no
22025 fi
22026 rm -f conftest*
22027
22028 fi
22029
22030 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22031 if test $ac_cv_type_uid_t = no; then
22032   cat >> confdefs.h <<\EOF
22033 #define uid_t int
22034 EOF
22035
22036   cat >> confdefs.h <<\EOF
22037 #define gid_t int
22038 EOF
22039
22040 fi
22041
22042 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22043 echo "configure:22044: checking for sig_atomic_t" >&5
22044 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22045   echo $ac_n "(cached) $ac_c" 1>&6
22046 else
22047   cat > conftest.$ac_ext <<EOF
22048 #line 22049 "configure"
22049 #include "confdefs.h"
22050 #include <signal.h>
22051 int main() {
22052 sig_atomic_t atomic;
22053 ; return 0; }
22054 EOF
22055 if { (eval echo configure:22056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22056   rm -rf conftest*
22057   ol_cv_type_sig_atomic_t=yes
22058 else
22059   echo "configure: failed program was:" >&5
22060   cat conftest.$ac_ext >&5
22061   rm -rf conftest*
22062   ol_cv_type_sig_atomic_t=no
22063 fi
22064 rm -f conftest*
22065 fi
22066
22067 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22068   if test $ol_cv_type_sig_atomic_t = no; then
22069     cat >> confdefs.h <<\EOF
22070 #define sig_atomic_t int
22071 EOF
22072
22073   fi
22074  
22075
22076
22077 # test for pw_gecos in struct passwd
22078 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22079 echo "configure:22080: checking struct passwd for pw_gecos" >&5
22080 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22081   echo $ac_n "(cached) $ac_c" 1>&6
22082 else
22083   
22084         cat > conftest.$ac_ext <<EOF
22085 #line 22086 "configure"
22086 #include "confdefs.h"
22087 #include <pwd.h>
22088 int main() {
22089
22090         struct passwd pwd;
22091         pwd.pw_gecos = pwd.pw_name;
22092
22093 ; return 0; }
22094 EOF
22095 if { (eval echo configure:22096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22096   rm -rf conftest*
22097   ol_cv_struct_passwd_pw_gecos=yes
22098 else
22099   echo "configure: failed program was:" >&5
22100   cat conftest.$ac_ext >&5
22101   rm -rf conftest*
22102   ol_cv_struct_passwd_pw_gecos=no
22103 fi
22104 rm -f conftest*
22105 fi
22106
22107 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22108 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22109         cat >> confdefs.h <<\EOF
22110 #define HAVE_PW_GECOS 1
22111 EOF
22112
22113 fi
22114
22115 # test for pw_passwd in struct passwd
22116 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22117 echo "configure:22118: checking struct passwd for pw_passwd" >&5
22118 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22119   echo $ac_n "(cached) $ac_c" 1>&6
22120 else
22121   
22122         cat > conftest.$ac_ext <<EOF
22123 #line 22124 "configure"
22124 #include "confdefs.h"
22125 #include <pwd.h>
22126 int main() {
22127
22128         struct passwd pwd;
22129         pwd.pw_passwd = pwd.pw_name;
22130
22131 ; return 0; }
22132 EOF
22133 if { (eval echo configure:22134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22134   rm -rf conftest*
22135   ol_cv_struct_passwd_pw_passwd=yes
22136 else
22137   echo "configure: failed program was:" >&5
22138   cat conftest.$ac_ext >&5
22139   rm -rf conftest*
22140   ol_cv_struct_passwd_pw_passwd=no
22141 fi
22142 rm -f conftest*
22143 fi
22144
22145 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22146 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22147         cat >> confdefs.h <<\EOF
22148 #define HAVE_PW_PASSWD 1
22149 EOF
22150
22151 fi
22152
22153
22154 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22155 echo "configure:22156: checking if toupper() requires islower()" >&5
22156 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22157   echo $ac_n "(cached) $ac_c" 1>&6
22158 else
22159   
22160         if test "$cross_compiling" = yes; then
22161   ol_cv_c_upper_lower=safe
22162 else
22163   cat > conftest.$ac_ext <<EOF
22164 #line 22165 "configure"
22165 #include "confdefs.h"
22166
22167 #include <ctype.h>
22168 main()
22169 {
22170         if ('C' == toupper('C'))
22171                 exit(0);
22172         else
22173                 exit(1);
22174 }
22175 EOF
22176 if { (eval echo configure:22177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22177 then
22178   ol_cv_c_upper_lower=no
22179 else
22180   echo "configure: failed program was:" >&5
22181   cat conftest.$ac_ext >&5
22182   rm -fr conftest*
22183   ol_cv_c_upper_lower=yes
22184 fi
22185 rm -fr conftest*
22186 fi
22187
22188 fi
22189
22190 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22191 if test $ol_cv_c_upper_lower != no ; then
22192         cat >> confdefs.h <<\EOF
22193 #define C_UPPER_LOWER 1
22194 EOF
22195
22196 fi
22197
22198 echo $ac_n "checking for working const""... $ac_c" 1>&6
22199 echo "configure:22200: checking for working const" >&5
22200 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22201   echo $ac_n "(cached) $ac_c" 1>&6
22202 else
22203   cat > conftest.$ac_ext <<EOF
22204 #line 22205 "configure"
22205 #include "confdefs.h"
22206
22207 int main() {
22208
22209 /* Ultrix mips cc rejects this.  */
22210 typedef int charset[2]; const charset x;
22211 /* SunOS 4.1.1 cc rejects this.  */
22212 char const *const *ccp;
22213 char **p;
22214 /* NEC SVR4.0.2 mips cc rejects this.  */
22215 struct point {int x, y;};
22216 static struct point const zero = {0,0};
22217 /* AIX XL C 1.02.0.0 rejects this.
22218    It does not let you subtract one const X* pointer from another in an arm
22219    of an if-expression whose if-part is not a constant expression */
22220 const char *g = "string";
22221 ccp = &g + (g ? g-g : 0);
22222 /* HPUX 7.0 cc rejects these. */
22223 ++ccp;
22224 p = (char**) ccp;
22225 ccp = (char const *const *) p;
22226 { /* SCO 3.2v4 cc rejects this.  */
22227   char *t;
22228   char const *s = 0 ? (char *) 0 : (char const *) 0;
22229
22230   *t++ = 0;
22231 }
22232 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22233   int x[] = {25, 17};
22234   const int *foo = &x[0];
22235   ++foo;
22236 }
22237 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22238   typedef const int *iptr;
22239   iptr p = 0;
22240   ++p;
22241 }
22242 { /* AIX XL C 1.02.0.0 rejects this saying
22243      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22244   struct s { int j; const int *ap[3]; };
22245   struct s *b; b->j = 5;
22246 }
22247 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22248   const int foo = 10;
22249 }
22250
22251 ; return 0; }
22252 EOF
22253 if { (eval echo configure:22254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22254   rm -rf conftest*
22255   ac_cv_c_const=yes
22256 else
22257   echo "configure: failed program was:" >&5
22258   cat conftest.$ac_ext >&5
22259   rm -rf conftest*
22260   ac_cv_c_const=no
22261 fi
22262 rm -f conftest*
22263 fi
22264
22265 echo "$ac_t""$ac_cv_c_const" 1>&6
22266 if test $ac_cv_c_const = no; then
22267   cat >> confdefs.h <<\EOF
22268 #define const 
22269 EOF
22270
22271 fi
22272
22273 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22274 echo "configure:22275: checking if compiler understands volatile" >&5
22275 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22276   echo $ac_n "(cached) $ac_c" 1>&6
22277 else
22278   cat > conftest.$ac_ext <<EOF
22279 #line 22280 "configure"
22280 #include "confdefs.h"
22281 int x, y, z;
22282 int main() {
22283 volatile int a; int * volatile b = x ? &y : &z;
22284       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22285       *b = 0;
22286 ; return 0; }
22287 EOF
22288 if { (eval echo configure:22289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22289   rm -rf conftest*
22290   ol_cv_c_volatile=yes
22291 else
22292   echo "configure: failed program was:" >&5
22293   cat conftest.$ac_ext >&5
22294   rm -rf conftest*
22295   ol_cv_c_volatile=no
22296 fi
22297 rm -f conftest*
22298 fi
22299
22300 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22301   if test $ol_cv_c_volatile = yes; then
22302     : 
22303   else
22304     cat >> confdefs.h <<\EOF
22305 #define volatile 
22306 EOF
22307
22308   fi
22309  
22310
22311 if test $cross_compiling = yes ; then
22312         cat >> confdefs.h <<\EOF
22313 #define CROSS_COMPILING 1
22314 EOF
22315
22316 else
22317         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22318 echo "configure:22319: checking whether byte ordering is bigendian" >&5
22319 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22320   echo $ac_n "(cached) $ac_c" 1>&6
22321 else
22322   ac_cv_c_bigendian=unknown
22323 # See if sys/param.h defines the BYTE_ORDER macro.
22324 cat > conftest.$ac_ext <<EOF
22325 #line 22326 "configure"
22326 #include "confdefs.h"
22327 #include <sys/types.h>
22328 #include <sys/param.h>
22329 int main() {
22330
22331 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22332  bogus endian macros
22333 #endif
22334 ; return 0; }
22335 EOF
22336 if { (eval echo configure:22337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22337   rm -rf conftest*
22338   # It does; now see whether it defined to BIG_ENDIAN or not.
22339 cat > conftest.$ac_ext <<EOF
22340 #line 22341 "configure"
22341 #include "confdefs.h"
22342 #include <sys/types.h>
22343 #include <sys/param.h>
22344 int main() {
22345
22346 #if BYTE_ORDER != BIG_ENDIAN
22347  not big endian
22348 #endif
22349 ; return 0; }
22350 EOF
22351 if { (eval echo configure:22352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22352   rm -rf conftest*
22353   ac_cv_c_bigendian=yes
22354 else
22355   echo "configure: failed program was:" >&5
22356   cat conftest.$ac_ext >&5
22357   rm -rf conftest*
22358   ac_cv_c_bigendian=no
22359 fi
22360 rm -f conftest*
22361 else
22362   echo "configure: failed program was:" >&5
22363   cat conftest.$ac_ext >&5
22364 fi
22365 rm -f conftest*
22366 if test $ac_cv_c_bigendian = unknown; then
22367 if test "$cross_compiling" = yes; then
22368     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22369 else
22370   cat > conftest.$ac_ext <<EOF
22371 #line 22372 "configure"
22372 #include "confdefs.h"
22373 main () {
22374   /* Are we little or big endian?  From Harbison&Steele.  */
22375   union
22376   {
22377     long l;
22378     char c[sizeof (long)];
22379   } u;
22380   u.l = 1;
22381   exit (u.c[sizeof (long) - 1] == 1);
22382 }
22383 EOF
22384 if { (eval echo configure:22385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22385 then
22386   ac_cv_c_bigendian=no
22387 else
22388   echo "configure: failed program was:" >&5
22389   cat conftest.$ac_ext >&5
22390   rm -fr conftest*
22391   ac_cv_c_bigendian=yes
22392 fi
22393 rm -fr conftest*
22394 fi
22395
22396 fi
22397 fi
22398
22399 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22400 if test $ac_cv_c_bigendian = yes; then
22401   cat >> confdefs.h <<\EOF
22402 #define WORDS_BIGENDIAN 1
22403 EOF
22404
22405 fi
22406
22407 fi
22408
22409 echo $ac_n "checking size of short""... $ac_c" 1>&6
22410 echo "configure:22411: checking size of short" >&5 
22411 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22412   echo $ac_n "(cached) $ac_c" 1>&6
22413 else
22414   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22415   cat > conftest.$ac_ext <<EOF
22416 #line 22417 "configure"
22417 #include "confdefs.h"
22418 #include "confdefs.h" 
22419 #include <sys/types.h> 
22420  
22421
22422 int main() {
22423 switch (0) case 0: case (sizeof (short) == $ac_size):;
22424 ; return 0; }
22425 EOF
22426 if { (eval echo configure:22427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22427   rm -rf conftest*
22428   ac_cv_sizeof_short=$ac_size
22429 else
22430   echo "configure: failed program was:" >&5
22431   cat conftest.$ac_ext >&5
22432 fi
22433 rm -f conftest* 
22434   if test x$ac_cv_sizeof_short != x ; then break; fi 
22435 done 
22436
22437 fi
22438  
22439 if test x$ac_cv_sizeof_short = x ; then 
22440   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22441 fi 
22442 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22443 cat >> confdefs.h <<EOF
22444 #define SIZEOF_SHORT $ac_cv_sizeof_short
22445 EOF
22446  
22447  
22448 echo $ac_n "checking size of int""... $ac_c" 1>&6
22449 echo "configure:22450: checking size of int" >&5 
22450 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22451   echo $ac_n "(cached) $ac_c" 1>&6
22452 else
22453   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22454   cat > conftest.$ac_ext <<EOF
22455 #line 22456 "configure"
22456 #include "confdefs.h"
22457 #include "confdefs.h" 
22458 #include <sys/types.h> 
22459  
22460
22461 int main() {
22462 switch (0) case 0: case (sizeof (int) == $ac_size):;
22463 ; return 0; }
22464 EOF
22465 if { (eval echo configure:22466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22466   rm -rf conftest*
22467   ac_cv_sizeof_int=$ac_size
22468 else
22469   echo "configure: failed program was:" >&5
22470   cat conftest.$ac_ext >&5
22471 fi
22472 rm -f conftest* 
22473   if test x$ac_cv_sizeof_int != x ; then break; fi 
22474 done 
22475
22476 fi
22477  
22478 if test x$ac_cv_sizeof_int = x ; then 
22479   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22480 fi 
22481 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22482 cat >> confdefs.h <<EOF
22483 #define SIZEOF_INT $ac_cv_sizeof_int
22484 EOF
22485  
22486  
22487 echo $ac_n "checking size of long""... $ac_c" 1>&6
22488 echo "configure:22489: checking size of long" >&5 
22489 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22490   echo $ac_n "(cached) $ac_c" 1>&6
22491 else
22492   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22493   cat > conftest.$ac_ext <<EOF
22494 #line 22495 "configure"
22495 #include "confdefs.h"
22496 #include "confdefs.h" 
22497 #include <sys/types.h> 
22498  
22499
22500 int main() {
22501 switch (0) case 0: case (sizeof (long) == $ac_size):;
22502 ; return 0; }
22503 EOF
22504 if { (eval echo configure:22505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22505   rm -rf conftest*
22506   ac_cv_sizeof_long=$ac_size
22507 else
22508   echo "configure: failed program was:" >&5
22509   cat conftest.$ac_ext >&5
22510 fi
22511 rm -f conftest* 
22512   if test x$ac_cv_sizeof_long != x ; then break; fi 
22513 done 
22514
22515 fi
22516  
22517 if test x$ac_cv_sizeof_long = x ; then 
22518   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22519 fi 
22520 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22521 cat >> confdefs.h <<EOF
22522 #define SIZEOF_LONG $ac_cv_sizeof_long
22523 EOF
22524  
22525
22526
22527 if test "$ac_cv_sizeof_int" -lt 4 ; then
22528         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22529
22530         cat >> confdefs.h <<\EOF
22531 #define LBER_INT_T long
22532 EOF
22533
22534 else
22535         cat >> confdefs.h <<\EOF
22536 #define LBER_INT_T int
22537 EOF
22538
22539 fi
22540
22541 cat >> confdefs.h <<\EOF
22542 #define LBER_LEN_T long
22543 EOF
22544
22545 cat >> confdefs.h <<\EOF
22546 #define LBER_SOCKET_T int
22547 EOF
22548
22549 cat >> confdefs.h <<\EOF
22550 #define LBER_TAG_T long
22551 EOF
22552
22553
22554 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22555 echo "configure:22556: checking for 8-bit clean memcmp" >&5
22556 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22557   echo $ac_n "(cached) $ac_c" 1>&6
22558 else
22559   if test "$cross_compiling" = yes; then
22560   ac_cv_func_memcmp_clean=no
22561 else
22562   cat > conftest.$ac_ext <<EOF
22563 #line 22564 "configure"
22564 #include "confdefs.h"
22565
22566 main()
22567 {
22568   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22569   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22570 }
22571
22572 EOF
22573 if { (eval echo configure:22574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22574 then
22575   ac_cv_func_memcmp_clean=yes
22576 else
22577   echo "configure: failed program was:" >&5
22578   cat conftest.$ac_ext >&5
22579   rm -fr conftest*
22580   ac_cv_func_memcmp_clean=no
22581 fi
22582 rm -fr conftest*
22583 fi
22584
22585 fi
22586
22587 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22588 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22589
22590 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22591 echo "configure:22592: checking for strftime" >&5
22592 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22593   echo $ac_n "(cached) $ac_c" 1>&6
22594 else
22595   cat > conftest.$ac_ext <<EOF
22596 #line 22597 "configure"
22597 #include "confdefs.h"
22598 /* System header to define __stub macros and hopefully few prototypes,
22599     which can conflict with char strftime(); below.  */
22600 #include <assert.h>
22601 /* Override any gcc2 internal prototype to avoid an error.  */
22602 /* We use char because int might match the return type of a gcc2
22603     builtin and then its argument prototype would still apply.  */
22604 char strftime();
22605 char (*f)();
22606
22607 int main() {
22608
22609 /* The GNU C library defines this for functions which it implements
22610     to always fail with ENOSYS.  Some functions are actually named
22611     something starting with __ and the normal name is an alias.  */
22612 #if defined (__stub_strftime) || defined (__stub___strftime)
22613 choke me
22614 #else
22615 f = strftime;
22616 #endif
22617
22618 ; return 0; }
22619 EOF
22620 if { (eval echo configure:22621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22621   rm -rf conftest*
22622   eval "ac_cv_func_strftime=yes"
22623 else
22624   echo "configure: failed program was:" >&5
22625   cat conftest.$ac_ext >&5
22626   rm -rf conftest*
22627   eval "ac_cv_func_strftime=no"
22628 fi
22629 rm -f conftest*
22630 fi
22631
22632 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22633   echo "$ac_t""yes" 1>&6
22634   cat >> confdefs.h <<\EOF
22635 #define HAVE_STRFTIME 1
22636 EOF
22637
22638 else
22639   echo "$ac_t""no" 1>&6
22640 # strftime is in -lintl on SCO UNIX.
22641 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22642 echo "configure:22643: checking for strftime in -lintl" >&5
22643 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22645   echo $ac_n "(cached) $ac_c" 1>&6
22646 else
22647   ac_save_LIBS="$LIBS"
22648 LIBS="-lintl  $LIBS"
22649 cat > conftest.$ac_ext <<EOF
22650 #line 22651 "configure"
22651 #include "confdefs.h"
22652 /* Override any gcc2 internal prototype to avoid an error.  */
22653 /* We use char because int might match the return type of a gcc2
22654     builtin and then its argument prototype would still apply.  */
22655 char strftime();
22656
22657 int main() {
22658 strftime()
22659 ; return 0; }
22660 EOF
22661 if { (eval echo configure:22662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22662   rm -rf conftest*
22663   eval "ac_cv_lib_$ac_lib_var=yes"
22664 else
22665   echo "configure: failed program was:" >&5
22666   cat conftest.$ac_ext >&5
22667   rm -rf conftest*
22668   eval "ac_cv_lib_$ac_lib_var=no"
22669 fi
22670 rm -f conftest*
22671 LIBS="$ac_save_LIBS"
22672
22673 fi
22674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22675   echo "$ac_t""yes" 1>&6
22676   cat >> confdefs.h <<\EOF
22677 #define HAVE_STRFTIME 1
22678 EOF
22679
22680 LIBS="-lintl $LIBS"
22681 else
22682   echo "$ac_t""no" 1>&6
22683 fi
22684
22685 fi
22686
22687
22688 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22689 echo "configure:22690: checking for inet_aton()" >&5
22690 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22691   echo $ac_n "(cached) $ac_c" 1>&6
22692 else
22693   cat > conftest.$ac_ext <<EOF
22694 #line 22695 "configure"
22695 #include "confdefs.h"
22696
22697 #ifdef HAVE_SYS_TYPES_H
22698 #       include <sys/types.h>
22699 #endif
22700 #ifdef HAVE_SYS_SOCKET_H
22701 #       include <sys/socket.h>
22702 #       ifdef HAVE_SYS_SELECT_H
22703 #               include <sys/select.h>
22704 #       endif
22705 #       include <netinet/in.h>
22706 #       ifdef HAVE_ARPA_INET_H
22707 #               include <arpa/inet.h>
22708 #       endif
22709 #endif
22710
22711 int main() {
22712 struct in_addr in;
22713 int rc = inet_aton( "255.255.255.255", &in );
22714 ; return 0; }
22715 EOF
22716 if { (eval echo configure:22717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22717   rm -rf conftest*
22718   ol_cv_func_inet_aton=yes
22719 else
22720   echo "configure: failed program was:" >&5
22721   cat conftest.$ac_ext >&5
22722   rm -rf conftest*
22723   ol_cv_func_inet_aton=no
22724 fi
22725 rm -f conftest*
22726 fi
22727
22728 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22729   if test $ol_cv_func_inet_aton != no; then
22730     cat >> confdefs.h <<\EOF
22731 #define HAVE_INET_ATON 1
22732 EOF
22733
22734   fi
22735  
22736
22737 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22738 echo "configure:22739: checking for _spawnlp" >&5
22739 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22740   echo $ac_n "(cached) $ac_c" 1>&6
22741 else
22742   cat > conftest.$ac_ext <<EOF
22743 #line 22744 "configure"
22744 #include "confdefs.h"
22745 /* System header to define __stub macros and hopefully few prototypes,
22746     which can conflict with char _spawnlp(); below.  */
22747 #include <assert.h>
22748 /* Override any gcc2 internal prototype to avoid an error.  */
22749 /* We use char because int might match the return type of a gcc2
22750     builtin and then its argument prototype would still apply.  */
22751 char _spawnlp();
22752 char (*f)();
22753
22754 int main() {
22755
22756 /* The GNU C library defines this for functions which it implements
22757     to always fail with ENOSYS.  Some functions are actually named
22758     something starting with __ and the normal name is an alias.  */
22759 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22760 choke me
22761 #else
22762 f = _spawnlp;
22763 #endif
22764
22765 ; return 0; }
22766 EOF
22767 if { (eval echo configure:22768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22768   rm -rf conftest*
22769   eval "ac_cv_func__spawnlp=yes"
22770 else
22771   echo "configure: failed program was:" >&5
22772   cat conftest.$ac_ext >&5
22773   rm -rf conftest*
22774   eval "ac_cv_func__spawnlp=no"
22775 fi
22776 rm -f conftest*
22777 fi
22778
22779 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22780   echo "$ac_t""yes" 1>&6
22781   cat >> confdefs.h <<\EOF
22782 #define HAVE_SPAWNLP 1
22783 EOF
22784
22785 else
22786   echo "$ac_t""no" 1>&6
22787 fi
22788
22789
22790 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22791 echo "configure:22792: checking for _snprintf" >&5
22792 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22793   echo $ac_n "(cached) $ac_c" 1>&6
22794 else
22795   cat > conftest.$ac_ext <<EOF
22796 #line 22797 "configure"
22797 #include "confdefs.h"
22798 /* System header to define __stub macros and hopefully few prototypes,
22799     which can conflict with char _snprintf(); below.  */
22800 #include <assert.h>
22801 /* Override any gcc2 internal prototype to avoid an error.  */
22802 /* We use char because int might match the return type of a gcc2
22803     builtin and then its argument prototype would still apply.  */
22804 char _snprintf();
22805 char (*f)();
22806
22807 int main() {
22808
22809 /* The GNU C library defines this for functions which it implements
22810     to always fail with ENOSYS.  Some functions are actually named
22811     something starting with __ and the normal name is an alias.  */
22812 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22813 choke me
22814 #else
22815 f = _snprintf;
22816 #endif
22817
22818 ; return 0; }
22819 EOF
22820 if { (eval echo configure:22821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22821   rm -rf conftest*
22822   eval "ac_cv_func__snprintf=yes"
22823 else
22824   echo "configure: failed program was:" >&5
22825   cat conftest.$ac_ext >&5
22826   rm -rf conftest*
22827   eval "ac_cv_func__snprintf=no"
22828 fi
22829 rm -f conftest*
22830 fi
22831
22832 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22833   echo "$ac_t""yes" 1>&6
22834   ac_cv_func_snprintf=yes
22835         cat >> confdefs.h <<\EOF
22836 #define snprintf _snprintf
22837 EOF
22838
22839
22840 else
22841   echo "$ac_t""no" 1>&6
22842 fi
22843
22844
22845 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22846 echo "configure:22847: checking for _vsnprintf" >&5
22847 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22848   echo $ac_n "(cached) $ac_c" 1>&6
22849 else
22850   cat > conftest.$ac_ext <<EOF
22851 #line 22852 "configure"
22852 #include "confdefs.h"
22853 /* System header to define __stub macros and hopefully few prototypes,
22854     which can conflict with char _vsnprintf(); below.  */
22855 #include <assert.h>
22856 /* Override any gcc2 internal prototype to avoid an error.  */
22857 /* We use char because int might match the return type of a gcc2
22858     builtin and then its argument prototype would still apply.  */
22859 char _vsnprintf();
22860 char (*f)();
22861
22862 int main() {
22863
22864 /* The GNU C library defines this for functions which it implements
22865     to always fail with ENOSYS.  Some functions are actually named
22866     something starting with __ and the normal name is an alias.  */
22867 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22868 choke me
22869 #else
22870 f = _vsnprintf;
22871 #endif
22872
22873 ; return 0; }
22874 EOF
22875 if { (eval echo configure:22876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22876   rm -rf conftest*
22877   eval "ac_cv_func__vsnprintf=yes"
22878 else
22879   echo "configure: failed program was:" >&5
22880   cat conftest.$ac_ext >&5
22881   rm -rf conftest*
22882   eval "ac_cv_func__vsnprintf=no"
22883 fi
22884 rm -f conftest*
22885 fi
22886
22887 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22888   echo "$ac_t""yes" 1>&6
22889   ac_cv_func_vsnprintf=yes
22890         cat >> confdefs.h <<\EOF
22891 #define vsnprintf _vsnprintf
22892 EOF
22893
22894
22895 else
22896   echo "$ac_t""no" 1>&6
22897 fi
22898
22899
22900 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22901 echo "configure:22902: checking for vprintf" >&5
22902 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22903   echo $ac_n "(cached) $ac_c" 1>&6
22904 else
22905   cat > conftest.$ac_ext <<EOF
22906 #line 22907 "configure"
22907 #include "confdefs.h"
22908 /* System header to define __stub macros and hopefully few prototypes,
22909     which can conflict with char vprintf(); below.  */
22910 #include <assert.h>
22911 /* Override any gcc2 internal prototype to avoid an error.  */
22912 /* We use char because int might match the return type of a gcc2
22913     builtin and then its argument prototype would still apply.  */
22914 char vprintf();
22915 char (*f)();
22916
22917 int main() {
22918
22919 /* The GNU C library defines this for functions which it implements
22920     to always fail with ENOSYS.  Some functions are actually named
22921     something starting with __ and the normal name is an alias.  */
22922 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22923 choke me
22924 #else
22925 f = vprintf;
22926 #endif
22927
22928 ; return 0; }
22929 EOF
22930 if { (eval echo configure:22931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22931   rm -rf conftest*
22932   eval "ac_cv_func_vprintf=yes"
22933 else
22934   echo "configure: failed program was:" >&5
22935   cat conftest.$ac_ext >&5
22936   rm -rf conftest*
22937   eval "ac_cv_func_vprintf=no"
22938 fi
22939 rm -f conftest*
22940 fi
22941
22942 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22943   echo "$ac_t""yes" 1>&6
22944   cat >> confdefs.h <<\EOF
22945 #define HAVE_VPRINTF 1
22946 EOF
22947
22948 else
22949   echo "$ac_t""no" 1>&6
22950 fi
22951
22952 if test "$ac_cv_func_vprintf" != yes; then
22953 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22954 echo "configure:22955: checking for _doprnt" >&5
22955 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22956   echo $ac_n "(cached) $ac_c" 1>&6
22957 else
22958   cat > conftest.$ac_ext <<EOF
22959 #line 22960 "configure"
22960 #include "confdefs.h"
22961 /* System header to define __stub macros and hopefully few prototypes,
22962     which can conflict with char _doprnt(); below.  */
22963 #include <assert.h>
22964 /* Override any gcc2 internal prototype to avoid an error.  */
22965 /* We use char because int might match the return type of a gcc2
22966     builtin and then its argument prototype would still apply.  */
22967 char _doprnt();
22968 char (*f)();
22969
22970 int main() {
22971
22972 /* The GNU C library defines this for functions which it implements
22973     to always fail with ENOSYS.  Some functions are actually named
22974     something starting with __ and the normal name is an alias.  */
22975 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22976 choke me
22977 #else
22978 f = _doprnt;
22979 #endif
22980
22981 ; return 0; }
22982 EOF
22983 if { (eval echo configure:22984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22984   rm -rf conftest*
22985   eval "ac_cv_func__doprnt=yes"
22986 else
22987   echo "configure: failed program was:" >&5
22988   cat conftest.$ac_ext >&5
22989   rm -rf conftest*
22990   eval "ac_cv_func__doprnt=no"
22991 fi
22992 rm -f conftest*
22993 fi
22994
22995 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22996   echo "$ac_t""yes" 1>&6
22997   cat >> confdefs.h <<\EOF
22998 #define HAVE_DOPRNT 1
22999 EOF
23000
23001 else
23002   echo "$ac_t""no" 1>&6
23003 fi
23004
23005 fi
23006
23007
23008 if test $ac_cv_func_vprintf = yes ; then
23009                 for ac_func in snprintf vsnprintf
23010 do
23011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23012 echo "configure:23013: checking for $ac_func" >&5
23013 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23014   echo $ac_n "(cached) $ac_c" 1>&6
23015 else
23016   cat > conftest.$ac_ext <<EOF
23017 #line 23018 "configure"
23018 #include "confdefs.h"
23019 /* System header to define __stub macros and hopefully few prototypes,
23020     which can conflict with char $ac_func(); below.  */
23021 #include <assert.h>
23022 /* Override any gcc2 internal prototype to avoid an error.  */
23023 /* We use char because int might match the return type of a gcc2
23024     builtin and then its argument prototype would still apply.  */
23025 char $ac_func();
23026 char (*f)();
23027
23028 int main() {
23029
23030 /* The GNU C library defines this for functions which it implements
23031     to always fail with ENOSYS.  Some functions are actually named
23032     something starting with __ and the normal name is an alias.  */
23033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23034 choke me
23035 #else
23036 f = $ac_func;
23037 #endif
23038
23039 ; return 0; }
23040 EOF
23041 if { (eval echo configure:23042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23042   rm -rf conftest*
23043   eval "ac_cv_func_$ac_func=yes"
23044 else
23045   echo "configure: failed program was:" >&5
23046   cat conftest.$ac_ext >&5
23047   rm -rf conftest*
23048   eval "ac_cv_func_$ac_func=no"
23049 fi
23050 rm -f conftest*
23051 fi
23052
23053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23054   echo "$ac_t""yes" 1>&6
23055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23056   cat >> confdefs.h <<EOF
23057 #define $ac_tr_func 1
23058 EOF
23059  
23060 else
23061   echo "$ac_t""no" 1>&6
23062 fi
23063 done
23064
23065 fi
23066
23067 for ac_func in \
23068         bcopy                   \
23069         closesocket             \
23070         chroot                  \
23071         endgrent                \
23072         endpwent                \
23073         fcntl                   \
23074         flock                   \
23075         fstat                   \
23076         getdtablesize   \
23077         getgrgid                \
23078         gethostname             \
23079         getpass                 \
23080         getpassphrase   \
23081         getpwuid                \
23082         getpwnam                \
23083         getspnam                \
23084         gettimeofday    \
23085         initgroups              \
23086         lockf                   \
23087         memcpy                  \
23088         memmove                 \
23089         mkstemp                 \
23090         mktemp                  \
23091         pipe                    \
23092         read                    \
23093         recv                    \
23094         recvfrom                \
23095         setpwfile               \
23096         setgid                  \
23097         setegid                 \
23098         setsid                  \
23099         setuid                  \
23100         seteuid                 \
23101         sigaction               \
23102         signal                  \
23103         sigset                  \
23104         strdup                  \
23105         strerror                \
23106         strpbrk                 \
23107         strrchr                 \
23108         strsep                  \
23109         strstr                  \
23110         strtol                  \
23111         strtoul                 \
23112         strtoq                  \
23113         strtouq                 \
23114         strtoll                 \
23115         strspn                  \
23116         sysconf                 \
23117         usleep                  \
23118         waitpid                 \
23119         wait4                   \
23120         write                   \
23121         send                    \
23122         sendmsg                 \
23123         sendto                  \
23124
23125 do
23126 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23127 echo "configure:23128: checking for $ac_func" >&5
23128 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23129   echo $ac_n "(cached) $ac_c" 1>&6
23130 else
23131   cat > conftest.$ac_ext <<EOF
23132 #line 23133 "configure"
23133 #include "confdefs.h"
23134 /* System header to define __stub macros and hopefully few prototypes,
23135     which can conflict with char $ac_func(); below.  */
23136 #include <assert.h>
23137 /* Override any gcc2 internal prototype to avoid an error.  */
23138 /* We use char because int might match the return type of a gcc2
23139     builtin and then its argument prototype would still apply.  */
23140 char $ac_func();
23141 char (*f)();
23142
23143 int main() {
23144
23145 /* The GNU C library defines this for functions which it implements
23146     to always fail with ENOSYS.  Some functions are actually named
23147     something starting with __ and the normal name is an alias.  */
23148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23149 choke me
23150 #else
23151 f = $ac_func;
23152 #endif
23153
23154 ; return 0; }
23155 EOF
23156 if { (eval echo configure:23157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23157   rm -rf conftest*
23158   eval "ac_cv_func_$ac_func=yes"
23159 else
23160   echo "configure: failed program was:" >&5
23161   cat conftest.$ac_ext >&5
23162   rm -rf conftest*
23163   eval "ac_cv_func_$ac_func=no"
23164 fi
23165 rm -f conftest*
23166 fi
23167
23168 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23169   echo "$ac_t""yes" 1>&6
23170     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23171   cat >> confdefs.h <<EOF
23172 #define $ac_tr_func 1
23173 EOF
23174  
23175 else
23176   echo "$ac_t""no" 1>&6
23177 fi
23178 done
23179
23180
23181 for ac_func in getopt getpeereid
23182 do
23183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23184 echo "configure:23185: checking for $ac_func" >&5
23185 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23186   echo $ac_n "(cached) $ac_c" 1>&6
23187 else
23188   cat > conftest.$ac_ext <<EOF
23189 #line 23190 "configure"
23190 #include "confdefs.h"
23191 /* System header to define __stub macros and hopefully few prototypes,
23192     which can conflict with char $ac_func(); below.  */
23193 #include <assert.h>
23194 /* Override any gcc2 internal prototype to avoid an error.  */
23195 /* We use char because int might match the return type of a gcc2
23196     builtin and then its argument prototype would still apply.  */
23197 char $ac_func();
23198 char (*f)();
23199
23200 int main() {
23201
23202 /* The GNU C library defines this for functions which it implements
23203     to always fail with ENOSYS.  Some functions are actually named
23204     something starting with __ and the normal name is an alias.  */
23205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23206 choke me
23207 #else
23208 f = $ac_func;
23209 #endif
23210
23211 ; return 0; }
23212 EOF
23213 if { (eval echo configure:23214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23214   rm -rf conftest*
23215   eval "ac_cv_func_$ac_func=yes"
23216 else
23217   echo "configure: failed program was:" >&5
23218   cat conftest.$ac_ext >&5
23219   rm -rf conftest*
23220   eval "ac_cv_func_$ac_func=no"
23221 fi
23222 rm -f conftest*
23223 fi
23224
23225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23226   echo "$ac_t""yes" 1>&6
23227     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23228   cat >> confdefs.h <<EOF
23229 #define $ac_tr_func 1
23230 EOF
23231  
23232 else
23233   echo "$ac_t""no" 1>&6
23234 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23235 fi
23236 done
23237
23238
23239
23240 if test "$ac_cv_func_getopt" != yes; then
23241         LIBSRCS="$LIBSRCS getopt.c"
23242 fi
23243 if test "$ac_cv_func_getpeereid" != yes; then
23244         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23245 echo "configure:23246: checking for msg_accrights in msghdr" >&5
23246 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23247   echo $ac_n "(cached) $ac_c" 1>&6
23248 else
23249   cat > conftest.$ac_ext <<EOF
23250 #line 23251 "configure"
23251 #include "confdefs.h"
23252 #include <sys/socket.h>
23253 int main() {
23254 struct msghdr m; m.msg_accrightslen=0
23255 ; return 0; }
23256 EOF
23257 if { (eval echo configure:23258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23258   rm -rf conftest*
23259   ol_cv_msghdr_msg_accrights=yes
23260 else
23261   echo "configure: failed program was:" >&5
23262   cat conftest.$ac_ext >&5
23263   rm -rf conftest*
23264   ol_cv_msghdr_msg_accrights=no
23265 fi
23266 rm -f conftest*
23267         
23268 fi
23269
23270 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23271   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23272         cat >> confdefs.h <<\EOF
23273 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23274 EOF
23275
23276   fi
23277
23278         LIBSRCS="$LIBSRCS getpeereid.c"
23279 fi
23280 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23281         if test "$ac_cv_func_snprintf" != yes; then
23282                 cat >> confdefs.h <<\EOF
23283 #define snprintf ber_pvt_snprintf
23284 EOF
23285
23286         fi
23287         if test "$ac_cv_func_vsnprintf" != yes; then
23288                 cat >> confdefs.h <<\EOF
23289 #define vsnprintf ber_pvt_vsnprintf
23290 EOF
23291
23292         fi
23293 fi
23294
23295 # Check Configuration
23296 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23297 echo "configure:23298: checking declaration of sys_errlist" >&5
23298 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23299   echo $ac_n "(cached) $ac_c" 1>&6
23300 else
23301   
23302         cat > conftest.$ac_ext <<EOF
23303 #line 23304 "configure"
23304 #include "confdefs.h"
23305
23306 #include <stdio.h>
23307 #include <sys/types.h>
23308 #include <errno.h>
23309 #ifdef WINNT
23310 #include <stdlib.h>
23311 #endif 
23312 int main() {
23313 char *c = (char *) *sys_errlist
23314 ; return 0; }
23315 EOF
23316 if { (eval echo configure:23317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23317   rm -rf conftest*
23318   ol_cv_dcl_sys_errlist=yes
23319         ol_cv_have_sys_errlist=yes
23320 else
23321   echo "configure: failed program was:" >&5
23322   cat conftest.$ac_ext >&5
23323   rm -rf conftest*
23324   ol_cv_dcl_sys_errlist=no
23325 fi
23326 rm -f conftest*
23327 fi
23328
23329 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23330 #
23331 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23332 if test $ol_cv_dcl_sys_errlist = no ; then
23333         cat >> confdefs.h <<\EOF
23334 #define DECL_SYS_ERRLIST 1
23335 EOF
23336
23337
23338         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23339 echo "configure:23340: checking existence of sys_errlist" >&5
23340 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23341   echo $ac_n "(cached) $ac_c" 1>&6
23342 else
23343   
23344                 cat > conftest.$ac_ext <<EOF
23345 #line 23346 "configure"
23346 #include "confdefs.h"
23347 #include <errno.h>
23348 int main() {
23349 char *c = (char *) *sys_errlist
23350 ; return 0; }
23351 EOF
23352 if { (eval echo configure:23353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23353   rm -rf conftest*
23354   ol_cv_have_sys_errlist=yes
23355 else
23356   echo "configure: failed program was:" >&5
23357   cat conftest.$ac_ext >&5
23358   rm -rf conftest*
23359   ol_cv_have_sys_errlist=no
23360 fi
23361 rm -f conftest*
23362 fi
23363
23364 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23365 fi
23366 if test $ol_cv_have_sys_errlist = yes ; then
23367         cat >> confdefs.h <<\EOF
23368 #define HAVE_SYS_ERRLIST 1
23369 EOF
23370
23371 fi
23372
23373
23374
23375 if test "$ol_enable_slapi" != no ; then
23376                         for ac_hdr in ltdl.h
23377 do
23378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23380 echo "configure:23381: checking for $ac_hdr" >&5
23381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23382   echo $ac_n "(cached) $ac_c" 1>&6
23383 else
23384   cat > conftest.$ac_ext <<EOF
23385 #line 23386 "configure"
23386 #include "confdefs.h"
23387 #include <$ac_hdr>
23388 EOF
23389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23390 { (eval echo configure:23391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23392 if test -z "$ac_err"; then
23393   rm -rf conftest*
23394   eval "ac_cv_header_$ac_safe=yes"
23395 else
23396   echo "$ac_err" >&5
23397   echo "configure: failed program was:" >&5
23398   cat conftest.$ac_ext >&5
23399   rm -rf conftest*
23400   eval "ac_cv_header_$ac_safe=no"
23401 fi
23402 rm -f conftest*
23403 fi
23404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23405   echo "$ac_t""yes" 1>&6
23406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23407   cat >> confdefs.h <<EOF
23408 #define $ac_tr_hdr 1
23409 EOF
23410  
23411 else
23412   echo "$ac_t""no" 1>&6
23413 fi
23414 done
23415
23416
23417         if test $ac_cv_header_ltdl_h != yes ; then
23418                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23419         fi
23420         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23421 echo "configure:23422: checking for lt_dlinit in -lltdl" >&5
23422 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23423 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23424   echo $ac_n "(cached) $ac_c" 1>&6
23425 else
23426   ac_save_LIBS="$LIBS"
23427 LIBS="-lltdl  $LIBS"
23428 cat > conftest.$ac_ext <<EOF
23429 #line 23430 "configure"
23430 #include "confdefs.h"
23431 /* Override any gcc2 internal prototype to avoid an error.  */
23432 /* We use char because int might match the return type of a gcc2
23433     builtin and then its argument prototype would still apply.  */
23434 char lt_dlinit();
23435
23436 int main() {
23437 lt_dlinit()
23438 ; return 0; }
23439 EOF
23440 if { (eval echo configure:23441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23441   rm -rf conftest*
23442   eval "ac_cv_lib_$ac_lib_var=yes"
23443 else
23444   echo "configure: failed program was:" >&5
23445   cat conftest.$ac_ext >&5
23446   rm -rf conftest*
23447   eval "ac_cv_lib_$ac_lib_var=no"
23448 fi
23449 rm -f conftest*
23450 LIBS="$ac_save_LIBS"
23451
23452 fi
23453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23454   echo "$ac_t""yes" 1>&6
23455   
23456                 SLAPI_LIBS=-lltdl
23457                 LIBSLAPI=libslapi.a
23458                 LIBSLAPITOOLS=../libslapi.a
23459                 cat >> confdefs.h <<\EOF
23460 #define HAVE_LIBLTDL 1
23461 EOF
23462
23463         
23464 else
23465   echo "$ac_t""no" 1>&6
23466 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23467 fi
23468
23469
23470         cat >> confdefs.h <<\EOF
23471 #define LDAP_SLAPI 1
23472 EOF
23473
23474 fi
23475
23476 if test "$ol_enable_debug" != no ; then
23477         cat >> confdefs.h <<\EOF
23478 #define LDAP_DEBUG 1
23479 EOF
23480
23481 fi
23482 if test "$ol_enable_syslog" = yes ; then
23483         cat >> confdefs.h <<\EOF
23484 #define LDAP_SYSLOG 1
23485 EOF
23486
23487 fi
23488 if test "$ol_link_kbind" != no ; then
23489         cat >> confdefs.h <<\EOF
23490 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23491 EOF
23492
23493 fi
23494 if test "$ol_enable_proctitle" != no ; then
23495         cat >> confdefs.h <<\EOF
23496 #define LDAP_PROCTITLE 1
23497 EOF
23498
23499 fi
23500 if test "$ol_enable_referrals" != no ; then
23501         cat >> confdefs.h <<\EOF
23502 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23503 EOF
23504
23505 fi
23506 if test "$ol_enable_local" != no; then
23507         cat >> confdefs.h <<\EOF
23508 #define LDAP_PF_LOCAL 1
23509 EOF
23510
23511 fi
23512 if test "$ol_link_ipv6" != no; then
23513         cat >> confdefs.h <<\EOF
23514 #define LDAP_PF_INET6 1
23515 EOF
23516
23517 fi
23518 if test "$ol_enable_cleartext" != no ; then
23519         cat >> confdefs.h <<\EOF
23520 #define SLAPD_CLEARTEXT 1
23521 EOF
23522
23523 fi
23524 if test "$ol_enable_crypt" != no ; then
23525         cat >> confdefs.h <<\EOF
23526 #define SLAPD_CRYPT 1
23527 EOF
23528
23529 fi
23530 if test "$ol_link_kpasswd" != no ; then
23531         cat >> confdefs.h <<\EOF
23532 #define SLAPD_KPASSWD 1
23533 EOF
23534
23535 fi
23536 if test "$ol_link_spasswd" != no ; then
23537         cat >> confdefs.h <<\EOF
23538 #define SLAPD_SPASSWD 1
23539 EOF
23540
23541 fi
23542 if test "$ol_enable_multimaster" != no ; then
23543         cat >> confdefs.h <<\EOF
23544 #define SLAPD_MULTIMASTER 1
23545 EOF
23546
23547 fi
23548 if test "$ol_enable_rlookups" != no ; then
23549         cat >> confdefs.h <<\EOF
23550 #define SLAPD_RLOOKUPS 1
23551 EOF
23552
23553 fi
23554 if test "$ol_enable_aci" != no ; then
23555         cat >> confdefs.h <<\EOF
23556 #define SLAPD_ACI_ENABLED 1
23557 EOF
23558
23559 fi
23560
23561 if test "$ol_link_modules" != no ; then
23562         cat >> confdefs.h <<\EOF
23563 #define SLAPD_MODULES 1
23564 EOF
23565
23566         BUILD_SLAPD=yes
23567         SLAPD_MODULES_LDFLAGS="-dlopen self"
23568 fi
23569
23570 cat >> confdefs.h <<\EOF
23571 #define SLAPD_MOD_STATIC 1
23572 EOF
23573
23574 cat >> confdefs.h <<\EOF
23575 #define SLAPD_MOD_DYNAMIC 2
23576 EOF
23577
23578
23579 if test "$ol_enable_bdb" != no ; then
23580         cat >> confdefs.h <<\EOF
23581 #define SLAPD_BDB 1
23582 EOF
23583
23584         BUILD_SLAPD=yes
23585         BUILD_BDB=yes
23586         if test "$ol_with_bdb_module" != static ; then
23587                 cat >> confdefs.h <<\EOF
23588 #define SLAPD_BDB_DYNAMIC 1
23589 EOF
23590
23591                 BUILD_BDB=mod
23592                 BUILD_BDB_DYNAMIC=shared
23593                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23594         else
23595                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23596         fi
23597 fi
23598
23599 if test "$ol_link_dnssrv" != no ; then
23600         cat >> confdefs.h <<\EOF
23601 #define SLAPD_DNSSRV 1
23602 EOF
23603
23604         BUILD_SLAPD=yes
23605         BUILD_DNSSRV=yes
23606         if test "$ol_with_dnssrv_module" != static ; then
23607                 cat >> confdefs.h <<\EOF
23608 #define SLAPD_DNSSRV_DYNAMIC 1
23609 EOF
23610
23611                 BUILD_DNSSRV=mod
23612                 BUILD_DNSSRV_DYNAMIC=shared
23613                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23614         else
23615                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23616         fi
23617 fi
23618
23619 if test "$ol_enable_hdb" != no ; then
23620         cat >> confdefs.h <<\EOF
23621 #define SLAPD_HDB 1
23622 EOF
23623
23624         BUILD_SLAPD=yes
23625         BUILD_HDB=yes
23626         if test "$ol_with_hdb_module" != static ; then
23627                 cat >> confdefs.h <<\EOF
23628 #define SLAPD_HDB_DYNAMIC 1
23629 EOF
23630
23631                 BUILD_HDB=mod
23632                 BUILD_HDB_DYNAMIC=shared
23633                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23634         else
23635                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23636         fi
23637 fi
23638
23639 if test "$ol_enable_ldap" != no ; then
23640         cat >> confdefs.h <<\EOF
23641 #define SLAPD_LDAP 1
23642 EOF
23643
23644         BUILD_SLAPD=yes
23645         BUILD_LDAP=yes
23646         if test "$ol_with_ldap_module" != static ; then
23647                 cat >> confdefs.h <<\EOF
23648 #define SLAPD_LDAP_DYNAMIC 1
23649 EOF
23650
23651                 BUILD_LDAP=mod
23652                 BUILD_LDAP_DYNAMIC=shared
23653                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23654         else
23655                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23656         fi
23657 fi
23658
23659 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23660         cat >> confdefs.h <<\EOF
23661 #define SLAPD_LDBM 1
23662 EOF
23663
23664         BUILD_SLAPD=yes
23665         BUILD_LDBM=yes
23666         if test "$ol_with_ldbm_module" != static ; then
23667                 cat >> confdefs.h <<\EOF
23668 #define SLAPD_LDBM_DYNAMIC 1
23669 EOF
23670
23671                 BUILD_LDBM=mod
23672                 BUILD_LDBM_DYNAMIC=shared
23673                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23674         else
23675                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23676         fi
23677 fi
23678
23679 if test "$ol_enable_meta" != no ; then
23680         if test "$ol_enable_ldap" = no ; then
23681                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23682         fi
23683         if test "$ol_enable_rewrite" = no ; then
23684                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23685         fi
23686         cat >> confdefs.h <<\EOF
23687 #define SLAPD_META 1
23688 EOF
23689
23690         BUILD_SLAPD=yes
23691         BUILD_META=yes
23692         BUILD_REWRITE=yes
23693         if test "$ol_with_meta_module" != static ; then
23694                 cat >> confdefs.h <<\EOF
23695 #define SLAPD_META_DYNAMIC 1
23696 EOF
23697
23698                 BUILD_META=mod
23699                 BUILD_META_DYNAMIC=shared
23700                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23701         else
23702                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23703         fi
23704 fi
23705
23706 if test "$ol_enable_monitor" != no ; then
23707         cat >> confdefs.h <<\EOF
23708 #define SLAPD_MONITOR 1
23709 EOF
23710
23711         BUILD_SLAPD=yes
23712         BUILD_MONITOR=yes
23713         if test "$ol_with_monitor_module" != static ; then
23714                 cat >> confdefs.h <<\EOF
23715 #define SLAPD_MONITOR_DYNAMIC 1
23716 EOF
23717
23718                 BUILD_MONITOR=mod
23719                 BUILD_MONITOR_DYNAMIC=shared
23720                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23721         else
23722                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23723         fi
23724 fi
23725
23726 if test "$ol_enable_null" != no ; then
23727         cat >> confdefs.h <<\EOF
23728 #define SLAPD_NULL 1
23729 EOF
23730
23731         BUILD_SLAPD=yes
23732         BUILD_NULL=yes
23733         if test "$ol_with_null_module" != static ; then
23734                 cat >> confdefs.h <<\EOF
23735 #define SLAPD_NULL_DYNAMIC 1
23736 EOF
23737
23738                 BUILD_NULL=mod
23739                 BUILD_NULL_DYNAMIC=shared
23740                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23741         else
23742                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23743         fi
23744 fi
23745
23746 if test "$ol_enable_passwd" != no ; then
23747         cat >> confdefs.h <<\EOF
23748 #define SLAPD_PASSWD 1
23749 EOF
23750
23751         BUILD_SLAPD=yes
23752         BUILD_PASSWD=yes
23753         if test "$ol_with_passwd_module" != static ; then
23754                 cat >> confdefs.h <<\EOF
23755 #define SLAPD_PASSWD_DYNAMIC 1
23756 EOF
23757
23758                 BUILD_PASSWD=mod
23759                 BUILD_PASSWD_DYNAMIC=shared
23760                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23761         else
23762                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23763         fi
23764 fi
23765
23766 if test "$ol_link_perl" != no ; then
23767         cat >> confdefs.h <<\EOF
23768 #define SLAPD_PERL 1
23769 EOF
23770
23771         BUILD_SLAPD=yes
23772         BUILD_PERL=yes
23773         if test "$ol_with_perl_module" != static ; then
23774                 cat >> confdefs.h <<\EOF
23775 #define SLAPD_PERL_DYNAMIC 1
23776 EOF
23777
23778                 BUILD_PERL=mod
23779                 BUILD_PERL_DYNAMIC=shared
23780                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23781         else
23782                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23783         fi
23784 fi
23785
23786 if test "$ol_enable_shell" != no ; then
23787         if test "$ol_link_thread" != no ; then
23788                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23789         fi
23790         cat >> confdefs.h <<\EOF
23791 #define SLAPD_SHELL 1
23792 EOF
23793
23794         BUILD_SLAPD=yes
23795         BUILD_SHELL=yes
23796         if test "$ol_with_shell_module" != static ; then
23797                 cat >> confdefs.h <<\EOF
23798 #define SLAPD_SHELL_DYNAMIC 1
23799 EOF
23800
23801                 BUILD_SHELL=mod
23802                 BUILD_SHELL_DYNAMIC=shared
23803                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23804         else
23805                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23806         fi
23807 fi
23808
23809 if test "$ol_link_sql" != no ; then
23810         cat >> confdefs.h <<\EOF
23811 #define SLAPD_SQL 1
23812 EOF
23813
23814         BUILD_SLAPD=yes
23815         BUILD_SQL=yes
23816         if test "$ol_with_sql_module" != static; then
23817                 cat >> confdefs.h <<\EOF
23818 #define SLAPD_SQL_DYNAMIC 1
23819 EOF
23820
23821                 BUILD_SQL=mod
23822                 BUILD_SQL_DYNAMIC=shared
23823                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23824         else
23825                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23826         fi
23827 fi
23828
23829 if test "$ol_with_dyngroup" != no ; then
23830         BUILD_DYNGROUP=$ol_with_dyngroup
23831         if test "$ol_with_dyngroup" = mod ; then
23832                 MFLAG=SLAPD_MOD_DYNAMIC
23833                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23834         else
23835                 MFLAG=SLAPD_MOD_STATIC
23836         fi
23837         cat >> confdefs.h <<EOF
23838 #define SLAPD_OVER_DYNGROUP $MFLAG
23839 EOF
23840
23841 fi
23842
23843 if test "$ol_with_proxycache" != no ; then
23844         BUILD_PROXYCACHE=$ol_with_proxycache
23845         if test "$ol_with_proxycache" = mod ; then
23846                 MFLAG=SLAPD_MOD_DYNAMIC
23847                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23848         else
23849                 MFLAG=SLAPD_MOD_STATIC
23850         fi
23851         cat >> confdefs.h <<EOF
23852 #define SLAPD_OVER_PROXYCACHE $MFLAG
23853 EOF
23854
23855 fi
23856
23857 if test "$ol_with_rwm " != no ; then
23858         BUILD_REWRITE=yes
23859         BUILD_RWM=$ol_with_rwm
23860         if test "$ol_with_rwm" = mod ; then
23861                 MFLAG=SLAPD_MOD_DYNAMIC
23862                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23863         else
23864                 MFLAG=SLAPD_MOD_STATIC
23865         fi
23866         cat >> confdefs.h <<EOF
23867 #define SLAPD_OVER_RWM $MFLAG
23868 EOF
23869
23870 fi
23871
23872 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23873         $BUILD_SLAPD = yes ; then
23874         BUILD_SLURPD=yes
23875 fi
23876
23877 if test "$ol_enable_rewrite" != no ; then
23878         cat >> confdefs.h <<\EOF
23879 #define ENABLE_REWRITE 1
23880 EOF
23881
23882         BUILD_REWRITE=yes
23883 fi
23884
23885 if test "$ol_enable_slapi" != no ; then
23886         cat >> confdefs.h <<\EOF
23887 #define ENABLE_SLAPI 1
23888 EOF
23889
23890         BUILD_SLAPI=yes
23891         SLAPD_SLAPI_DEPEND=libslapi.a
23892 fi
23893
23894
23895
23896 if test "$ac_cv_mingw32" = yes ; then
23897         PLAT=NT
23898         SLAPD_MODULES_LDFLAGS=
23899 else
23900         PLAT=UNIX
23901 fi
23902
23903 if test -z "$SLAPD_STATIC_BACKENDS"; then
23904         SLAPD_NO_STATIC='#'
23905 else
23906         SLAPD_NO_STATIC=
23907 fi
23908
23909
23910
23911
23912
23913
23914
23915   
23916   
23917   
23918   
23919   
23920   
23921   
23922   
23923   
23924   
23925   
23926   
23927   
23928   
23929   
23930   
23931   
23932   
23933   
23934   
23935   
23936   
23937   
23938   
23939   
23940   
23941   
23942   
23943   
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982 # Check whether --with-xxinstall or --without-xxinstall was given.
23983 if test "${with_xxinstall+set}" = set; then
23984   withval="$with_xxinstall"
23985   :
23986 fi
23987
23988
23989
23990 trap '' 1 2 15
23991
23992 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23993
23994 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23995 # Let make expand exec_prefix.
23996 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23997
23998 # Any assignment to VPATH causes Sun make to only execute
23999 # the first set of double-colon rules, so remove it if not needed.
24000 # If there is a colon in the path, we need to keep it.
24001 if test "x$srcdir" = x.; then
24002   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24003 fi
24004
24005 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24006
24007 DEFS=-DHAVE_CONFIG_H
24008
24009 # Without the "./", some shells look in PATH for config.status.
24010 : ${CONFIG_STATUS=./config.status}
24011
24012 echo creating $CONFIG_STATUS
24013 rm -f $CONFIG_STATUS
24014 cat > $CONFIG_STATUS <<EOF
24015 #! /bin/sh
24016 # Generated automatically by configure.
24017 # Run this file to recreate the current configuration.
24018 # This directory was configured as follows,
24019 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24020 #
24021 # $0 $ac_configure_args
24022 #
24023 # Compiler output produced by configure, useful for debugging
24024 # configure, is in ./config.log if it exists.
24025
24026 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24027 for ac_option
24028 do
24029   case "\$ac_option" in
24030   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24031     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24032     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24033   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24034     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24035     exit 0 ;;
24036   -help | --help | --hel | --he | --h)
24037     echo "\$ac_cs_usage"; exit 0 ;;
24038   *) echo "\$ac_cs_usage"; exit 1 ;;
24039   esac
24040 done
24041
24042 ac_given_srcdir=$srcdir
24043 ac_given_INSTALL="$INSTALL"
24044
24045 trap 'rm -fr `echo "\
24046 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24047 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24048 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24049 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24050 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24051 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24052 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24053 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24054 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24055 include/Makefile:build/top.mk:include/Makefile.in \
24056 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24057 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24058 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24059 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24060 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24061 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24062 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24063 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24064 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24065 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24066 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24067 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24068 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24069 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24070 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24071 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24072 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24073 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24074 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24075 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24076 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24077 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24078 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24079 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24080 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24081 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24082 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24083 tests/run \
24084 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24085  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24086 EOF
24087 cat >> $CONFIG_STATUS <<EOF
24088
24089 # Protect against being on the right side of a sed subst in config.status.
24090 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24091  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24092 $ac_vpsub
24093 $extrasub
24094 s%@SHELL@%$SHELL%g
24095 s%@CFLAGS@%$CFLAGS%g
24096 s%@CPPFLAGS@%$CPPFLAGS%g
24097 s%@CXXFLAGS@%$CXXFLAGS%g
24098 s%@FFLAGS@%$FFLAGS%g
24099 s%@DEFS@%$DEFS%g
24100 s%@LDFLAGS@%$LDFLAGS%g
24101 s%@LIBS@%$LIBS%g
24102 s%@exec_prefix@%$exec_prefix%g
24103 s%@prefix@%$prefix%g
24104 s%@program_transform_name@%$program_transform_name%g
24105 s%@bindir@%$bindir%g
24106 s%@sbindir@%$sbindir%g
24107 s%@libexecdir@%$libexecdir%g
24108 s%@datadir@%$datadir%g
24109 s%@sysconfdir@%$sysconfdir%g
24110 s%@sharedstatedir@%$sharedstatedir%g
24111 s%@localstatedir@%$localstatedir%g
24112 s%@libdir@%$libdir%g
24113 s%@includedir@%$includedir%g
24114 s%@oldincludedir@%$oldincludedir%g
24115 s%@infodir@%$infodir%g
24116 s%@mandir@%$mandir%g
24117 s%@host@%$host%g
24118 s%@host_alias@%$host_alias%g
24119 s%@host_cpu@%$host_cpu%g
24120 s%@host_vendor@%$host_vendor%g
24121 s%@host_os@%$host_os%g
24122 s%@target@%$target%g
24123 s%@target_alias@%$target_alias%g
24124 s%@target_cpu@%$target_cpu%g
24125 s%@target_vendor@%$target_vendor%g
24126 s%@target_os@%$target_os%g
24127 s%@build@%$build%g
24128 s%@build_alias@%$build_alias%g
24129 s%@build_cpu@%$build_cpu%g
24130 s%@build_vendor@%$build_vendor%g
24131 s%@build_os@%$build_os%g
24132 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24133 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24134 s%@INSTALL_DATA@%$INSTALL_DATA%g
24135 s%@PACKAGE@%$PACKAGE%g
24136 s%@VERSION@%$VERSION%g
24137 s%@ACLOCAL@%$ACLOCAL%g
24138 s%@AUTOCONF@%$AUTOCONF%g
24139 s%@AUTOMAKE@%$AUTOMAKE%g
24140 s%@AUTOHEADER@%$AUTOHEADER%g
24141 s%@MAKEINFO@%$MAKEINFO%g
24142 s%@install_sh@%$install_sh%g
24143 s%@AMTAR@%$AMTAR%g
24144 s%@AWK@%$AWK%g
24145 s%@AMTARFLAGS@%$AMTARFLAGS%g
24146 s%@SET_MAKE@%$SET_MAKE%g
24147 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24148 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24149 s%@top_builddir@%$top_builddir%g
24150 s%@ldap_subdir@%$ldap_subdir%g
24151 s%@CC@%$CC%g
24152 s%@AR@%$AR%g
24153 s%@LN_S@%$LN_S%g
24154 s%@OBJEXT@%$OBJEXT%g
24155 s%@EXEEXT@%$EXEEXT%g
24156 s%@ECHO@%$ECHO%g
24157 s%@RANLIB@%$RANLIB%g
24158 s%@STRIP@%$STRIP%g
24159 s%@DLLTOOL@%$DLLTOOL%g
24160 s%@AS@%$AS%g
24161 s%@OBJDUMP@%$OBJDUMP%g
24162 s%@CPP@%$CPP%g
24163 s%@LIBTOOL@%$LIBTOOL%g
24164 s%@LN_H@%$LN_H%g
24165 s%@PERLBIN@%$PERLBIN%g
24166 s%@OL_MKDEP@%$OL_MKDEP%g
24167 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24168 s%@LTSTATIC@%$LTSTATIC%g
24169 s%@LIBOBJS@%$LIBOBJS%g
24170 s%@LIBSRCS@%$LIBSRCS%g
24171 s%@PLAT@%$PLAT%g
24172 s%@WITH_TLS@%$WITH_TLS%g
24173 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24174 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24175 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24176 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24177 s%@BUILD_BDB@%$BUILD_BDB%g
24178 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24179 s%@BUILD_HDB@%$BUILD_HDB%g
24180 s%@BUILD_LDAP@%$BUILD_LDAP%g
24181 s%@BUILD_LDBM@%$BUILD_LDBM%g
24182 s%@BUILD_META@%$BUILD_META%g
24183 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24184 s%@BUILD_NULL@%$BUILD_NULL%g
24185 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24186 s%@BUILD_PERL@%$BUILD_PERL%g
24187 s%@BUILD_SHELL@%$BUILD_SHELL%g
24188 s%@BUILD_SQL@%$BUILD_SQL%g
24189 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24190 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24191 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24192 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24193 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24194 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24195 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24196 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24197 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24198 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24199 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24200 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24201 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24202 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24203 s%@BUILD_RWM@%$BUILD_RWM%g
24204 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24205 s%@LDAP_LIBS@%$LDAP_LIBS%g
24206 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24207 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24208 s%@LDBM_LIBS@%$LDBM_LIBS%g
24209 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24210 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24211 s%@WRAP_LIBS@%$WRAP_LIBS%g
24212 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24213 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24214 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24215 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24216 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24217 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24218 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24219 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24220 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24221 s%@KRB4_LIBS@%$KRB4_LIBS%g
24222 s%@KRB5_LIBS@%$KRB5_LIBS%g
24223 s%@SASL_LIBS@%$SASL_LIBS%g
24224 s%@TLS_LIBS@%$TLS_LIBS%g
24225 s%@MODULES_LIBS@%$MODULES_LIBS%g
24226 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24227 s%@LIBSLAPI@%$LIBSLAPI%g
24228 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24229 s%@AUTH_LIBS@%$AUTH_LIBS%g
24230 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24231 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24232 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24233 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24234
24235 CEOF
24236 EOF
24237
24238 cat >> $CONFIG_STATUS <<\EOF
24239
24240 # Split the substitutions into bite-sized pieces for seds with
24241 # small command number limits, like on Digital OSF/1 and HP-UX.
24242 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24243 ac_file=1 # Number of current file.
24244 ac_beg=1 # First line for current file.
24245 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24246 ac_more_lines=:
24247 ac_sed_cmds=""
24248 while $ac_more_lines; do
24249   if test $ac_beg -gt 1; then
24250     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24251   else
24252     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24253   fi
24254   if test ! -s conftest.s$ac_file; then
24255     ac_more_lines=false
24256     rm -f conftest.s$ac_file
24257   else
24258     if test -z "$ac_sed_cmds"; then
24259       ac_sed_cmds="sed -f conftest.s$ac_file"
24260     else
24261       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24262     fi
24263     ac_file=`expr $ac_file + 1`
24264     ac_beg=$ac_end
24265     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24266   fi
24267 done
24268 if test -z "$ac_sed_cmds"; then
24269   ac_sed_cmds=cat
24270 fi
24271 EOF
24272
24273 cat >> $CONFIG_STATUS <<EOF
24274
24275 CONFIG_FILES=\${CONFIG_FILES-"\
24276 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24277 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24278 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24279 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24280 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24281 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24282 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24283 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24284 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24285 include/Makefile:build/top.mk:include/Makefile.in \
24286 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24287 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24288 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24289 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24290 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24291 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24292 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24293 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24294 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24295 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24296 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24297 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24298 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24299 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24300 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24301 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24302 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24303 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24304 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24305 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24306 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24307 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24308 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24309 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24310 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24311 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24312 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24313 tests/run \
24314 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24315 "}
24316 EOF
24317 cat >> $CONFIG_STATUS <<\EOF
24318 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24319   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24320   case "$ac_file" in
24321   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24322        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24323   *) ac_file_in="${ac_file}.in" ;;
24324   esac
24325
24326   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24327
24328   # Remove last slash and all that follows it.  Not all systems have dirname.
24329   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24330   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24331     # The file is in a subdirectory.
24332     test ! -d "$ac_dir" && mkdir "$ac_dir"
24333     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24334     # A "../" for each directory in $ac_dir_suffix.
24335     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24336   else
24337     ac_dir_suffix= ac_dots=
24338   fi
24339
24340   case "$ac_given_srcdir" in
24341   .)  srcdir=.
24342       if test -z "$ac_dots"; then top_srcdir=.
24343       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24344   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24345   *) # Relative path.
24346     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24347     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24348   esac
24349
24350   case "$ac_given_INSTALL" in
24351   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24352   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24353   esac
24354
24355   echo creating "$ac_file"
24356   rm -f "$ac_file"
24357   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24358   case "$ac_file" in
24359   *[Mm]akefile*) ac_comsub="1i\\
24360 # $configure_input" ;;
24361   *) ac_comsub= ;;
24362   esac
24363
24364   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24365   sed -e "$ac_comsub
24366 s%@configure_input@%$configure_input%g
24367 s%@srcdir@%$srcdir%g
24368 s%@top_srcdir@%$top_srcdir%g
24369 s%@INSTALL@%$INSTALL%g
24370 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24371 fi; done
24372 rm -f conftest.s*
24373
24374 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24375 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24376 #
24377 # ac_d sets the value in "#define NAME VALUE" lines.
24378 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24379 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24380 ac_dC='\3'
24381 ac_dD='%g'
24382 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24383 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24384 ac_uB='\([      ]\)%\1#\2define\3'
24385 ac_uC=' '
24386 ac_uD='\4%g'
24387 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24388 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24389 ac_eB='$%\1#\2define\3'
24390 ac_eC=' '
24391 ac_eD='%g'
24392
24393 if test "${CONFIG_HEADERS+set}" != set; then
24394 EOF
24395 cat >> $CONFIG_STATUS <<EOF
24396   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24397 EOF
24398 cat >> $CONFIG_STATUS <<\EOF
24399 fi
24400 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24401   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24402   case "$ac_file" in
24403   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24404        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24405   *) ac_file_in="${ac_file}.in" ;;
24406   esac
24407
24408   echo creating $ac_file
24409
24410   rm -f conftest.frag conftest.in conftest.out
24411   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24412   cat $ac_file_inputs > conftest.in
24413
24414 EOF
24415
24416 # Transform confdefs.h into a sed script conftest.vals that substitutes
24417 # the proper values into config.h.in to produce config.h.  And first:
24418 # Protect against being on the right side of a sed subst in config.status.
24419 # Protect against being in an unquoted here document in config.status.
24420 rm -f conftest.vals
24421 cat > conftest.hdr <<\EOF
24422 s/[\\&%]/\\&/g
24423 s%[\\$`]%\\&%g
24424 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24425 s%ac_d%ac_u%gp
24426 s%ac_u%ac_e%gp
24427 EOF
24428 sed -n -f conftest.hdr confdefs.h > conftest.vals
24429 rm -f conftest.hdr
24430
24431 # This sed command replaces #undef with comments.  This is necessary, for
24432 # example, in the case of _POSIX_SOURCE, which is predefined and required
24433 # on some systems where configure will not decide to define it.
24434 cat >> conftest.vals <<\EOF
24435 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24436 EOF
24437
24438 # Break up conftest.vals because some shells have a limit on
24439 # the size of here documents, and old seds have small limits too.
24440
24441 rm -f conftest.tail
24442 while :
24443 do
24444   ac_lines=`grep -c . conftest.vals`
24445   # grep -c gives empty output for an empty file on some AIX systems.
24446   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24447   # Write a limited-size here document to conftest.frag.
24448   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24449   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24450   echo 'CEOF
24451   sed -f conftest.frag conftest.in > conftest.out
24452   rm -f conftest.in
24453   mv conftest.out conftest.in
24454 ' >> $CONFIG_STATUS
24455   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24456   rm -f conftest.vals
24457   mv conftest.tail conftest.vals
24458 done
24459 rm -f conftest.vals
24460
24461 cat >> $CONFIG_STATUS <<\EOF
24462   rm -f conftest.frag conftest.h
24463   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24464   cat conftest.in >> conftest.h
24465   rm -f conftest.in
24466   if cmp -s $ac_file conftest.h 2>/dev/null; then
24467     echo "$ac_file is unchanged"
24468     rm -f conftest.h
24469   else
24470     # Remove last slash and all that follows it.  Not all systems have dirname.
24471       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24472       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24473       # The file is in a subdirectory.
24474       test ! -d "$ac_dir" && mkdir "$ac_dir"
24475     fi
24476     rm -f $ac_file
24477     mv conftest.h $ac_file
24478   fi
24479 fi; done
24480
24481 EOF
24482 cat >> $CONFIG_STATUS <<EOF
24483
24484 EOF
24485 cat >> $CONFIG_STATUS <<\EOF
24486
24487 chmod +x tests/run
24488 date > stamp-h
24489 echo Please run \"make depend\" to build dependencies
24490
24491 exit 0
24492 EOF
24493 chmod +x $CONFIG_STATUS
24494 rm -fr confdefs* $ac_clean_files
24495 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24496